# WalletApi

All URIs are relative to *http://localhost*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**address**](WalletApi.md#address) | **POST** /api/v1/wallet/addresses/next | Generate Ark address |
| [**arkInfo**](WalletApi.md#arkinfo) | **GET** /api/v1/wallet/ark-info | Get Ark server info |
| [**balance**](WalletApi.md#balance) | **GET** /api/v1/wallet/balance | Get wallet balance |
| [**bip321Uri**](WalletApi.md#bip321urioperation) | **POST** /api/v1/wallet/bip321 | Build a BIP 321 payment URI |
| [**connected**](WalletApi.md#connected) | **GET** /api/v1/wallet/connected | Check server connection |
| [**createWallet**](WalletApi.md#createwalletoperation) | **POST** /api/v1/wallet/create | Create a wallet |
| [**getVtxo**](WalletApi.md#getvtxo) | **GET** /api/v1/wallet/vtxos/{id} | Get VTXO detail |
| [**getVtxoEncoded**](WalletApi.md#getvtxoencoded) | **GET** /api/v1/wallet/vtxos/{id}/encoded | Get encoded VTXO |
| [**history**](WalletApi.md#history) | **GET** /api/v1/wallet/history | Get wallet history (deprecated) |
| [**importVtxo**](WalletApi.md#importvtxooperation) | **POST** /api/v1/wallet/import-vtxo | Import a VTXO |
| [**mnemonic**](WalletApi.md#mnemonic) | **GET** /api/v1/wallet/mnemonic | Get wallet mnemonic |
| [**movements**](WalletApi.md#movements) | **GET** /api/v1/wallet/movements | List movements (deprecated) |
| [**nextRound**](WalletApi.md#nextround) | **GET** /api/v1/wallet/next-round | Get next round time |
| [**offboardAll**](WalletApi.md#offboardalloperation) | **POST** /api/v1/wallet/offboard/all | Offboard all VTXOs |
| [**offboardVtxos**](WalletApi.md#offboardvtxosoperation) | **POST** /api/v1/wallet/offboard/vtxos | Offboard specific VTXOs |
| [**peekAddress**](WalletApi.md#peekaddress) | **GET** /api/v1/wallet/addresses/index/{index} | Get Ark address by index |
| [**pendingRounds**](WalletApi.md#pendingrounds) | **GET** /api/v1/wallet/rounds | List round participations |
| [**refreshAll**](WalletApi.md#refreshall) | **POST** /api/v1/wallet/refresh/all | Refresh all VTXOs |
| [**refreshCounterparty**](WalletApi.md#refreshcounterparty) | **POST** /api/v1/wallet/refresh/counterparty | Refresh received VTXOs |
| [**refreshDelegated**](WalletApi.md#refreshdelegated) | **POST** /api/v1/wallet/refresh/delegated/vtxos | Refresh VTXOs in delegated mode |
| [**refreshVtxos**](WalletApi.md#refreshvtxos) | **POST** /api/v1/wallet/refresh/vtxos | Refresh specific VTXOs |
| [**send**](WalletApi.md#sendoperation) | **POST** /api/v1/wallet/send | Send a payment |
| [**sendOnchain**](WalletApi.md#sendonchainoperation) | **POST** /api/v1/wallet/send-onchain | Send on-chain from Ark balance |
| [**sync**](WalletApi.md#sync) | **POST** /api/v1/wallet/sync | Sync wallet |
| [**syncMailbox**](WalletApi.md#syncmailbox) | **POST** /api/v1/wallet/sync/mailbox | Sync mailbox only |
| [**vtxos**](WalletApi.md#vtxos) | **GET** /api/v1/wallet/vtxos | List VTXOs |
| [**walletDelete**](WalletApi.md#walletdeleteoperation) | **DELETE** /api/v1/wallet |  |
| [**walletExists**](WalletApi.md#walletexists) | **GET** /api/v1/wallet |  |



## address

> ArkAddressResponse address()

Generate Ark address

Generates a new Ark receiving address. Each call returns the next unused address from the wallet\&#39;s HD keychain.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { AddressRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.address();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**ArkAddressResponse**](ArkAddressResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the Ark address |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## arkInfo

> ArkInfo arkInfo()

Get Ark server info

Returns the Ark server\&#39;s configuration parameters, including network, public key, round interval, VTXO expiry and exit deltas, fee settings, and Lightning support details.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { ArkInfoRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.arkInfo();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**ArkInfo**](ArkInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the Ark info |  -  |
| **404** | Wallet not connected to an Ark server |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## balance

> Balance balance()

Get wallet balance

Returns the wallet balance broken down by category: spendable sats available for immediate use, sats pending in an Ark round, sats locked in outgoing or incoming Lightning payments, sats awaiting board confirmation, and sats in a pending exit. The balance is computed from local state, which the background daemon keeps reasonably fresh (Lightning syncs every second, mailbox and boards every 30 seconds). For the most up-to-date figures, call &#x60;sync&#x60; before this endpoint.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { BalanceRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.balance();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**Balance**](Balance.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the wallet balance |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## bip321Uri

> Bip321UriResponse bip321Uri(bip321UriRequest, uppercase)

Build a BIP 321 payment URI

Builds a single BIP 321 &#x60;bitcoin:&#x60; URI bundling multiple ways to receive the same payment, so one call prepares everything needed for an incoming payment. A fresh Ark address is always included. When &#x60;amount_sat&#x60; is given, a BOLT11 invoice for that amount is generated and the amount is embedded in the URI. When &#x60;onchain&#x60; is &#x60;true&#x60;, a fresh on-chain address is added (placed in the URI body on mainnet, as a &#x60;tb&#x3D;&#x60; parameter on test networks). Set the &#x60;uppercase&#x60; query parameter to upper-case the &#x60;bip321&#x60; URI so QR encoders can use the compact alphanumeric mode; this fails if the URI carries case-sensitive data. The individual &#x60;ark&#x60;, &#x60;bolt11&#x60;, and &#x60;onchain&#x60; destinations are always returned in their natural case for direct use.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { Bip321UriOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // Bip321UriRequest
    bip321UriRequest: ...,
    // boolean | Upper-case the returned `bip321` URI for compact QR encoding. Defaults to false. Fails with 400 if the URI carries case-sensitive data (a label, message, or base58 address). (optional)
    uppercase: true,
  } satisfies Bip321UriOperationRequest;

  try {
    const data = await api.bip321Uri(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **bip321UriRequest** | [Bip321UriRequest](Bip321UriRequest.md) |  | |
| **uppercase** | `boolean` | Upper-case the returned &#x60;bip321&#x60; URI for compact QR encoding. Defaults to false. Fails with 400 if the URI carries case-sensitive data (a label, message, or base58 address). | [Optional] [Defaults to `undefined`] |

### Return type

[**Bip321UriResponse**](Bip321UriResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the BIP 321 URI and its destinations |  -  |
| **400** | Requested an upper-case URI that carries case-sensitive data |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## connected

> ConnectedResponse connected()

Check server connection

Checks whether the wallet has an active connection to the Ark server. Returns &#x60;true&#x60; if the wallet can reach the server and retrieve its configuration, &#x60;false&#x60; otherwise. The background daemon checks the server connection every second, so this reflects the most recent known state.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { ConnectedRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.connected();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**ConnectedResponse**](ConnectedResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns whether the wallet is connected to an Ark server |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## createWallet

> CreateWalletResponse createWallet(createWalletRequest)

Create a wallet

Creates a new wallet with the specified Ark server and chain source configuration. Fails if a wallet already exists. Returns the wallet fingerprint on success.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { CreateWalletOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // CreateWalletRequest
    createWalletRequest: ...,
  } satisfies CreateWalletOperationRequest;

  try {
    const data = await api.createWallet(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **createWalletRequest** | [CreateWalletRequest](CreateWalletRequest.md) |  | |

### Return type

[**CreateWalletResponse**](CreateWalletResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Wallet created successfully |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getVtxo

> WalletVtxoInfo getVtxo(id)

Get VTXO detail

Returns detail for a single VTXO. To get the hex-encoded serialization use &#x60;GET /vtxos/{id}/encoded&#x60;.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { GetVtxoRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // string | VTXO identifier formatted as `txid:vout`.
    id: id_example,
  } satisfies GetVtxoRequest;

  try {
    const data = await api.getVtxo(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | VTXO identifier formatted as &#x60;txid:vout&#x60;. | [Defaults to `undefined`] |

### Return type

[**WalletVtxoInfo**](WalletVtxoInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the VTXO detail |  -  |
| **400** | Invalid VTXO id |  -  |
| **404** | VTXO not found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## getVtxoEncoded

> EncodedVtxoResponse getVtxoEncoded(id)

Get encoded VTXO

Returns the hex-encoded serialization of a VTXO. The &#x60;encoded&#x60; field can be passed to &#x60;POST /wallet/import-vtxo&#x60; to re-import this VTXO.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { GetVtxoEncodedRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // string | VTXO identifier formatted as `txid:vout`.
    id: id_example,
  } satisfies GetVtxoEncodedRequest;

  try {
    const data = await api.getVtxoEncoded(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **id** | `string` | VTXO identifier formatted as &#x60;txid:vout&#x60;. | [Defaults to `undefined`] |

### Return type

[**EncodedVtxoResponse**](EncodedVtxoResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the hex-encoded serialized VTXO |  -  |
| **400** | Invalid VTXO id |  -  |
| **404** | VTXO not found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## history

> Array&lt;Movement&gt; history()

Get wallet history (deprecated)

Deprecated: use &#x60;GET /api/v1/history&#x60; instead.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { HistoryRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.history();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**Array&lt;Movement&gt;**](Movement.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the wallet history |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## importVtxo

> Array&lt;WalletVtxoInfo&gt; importVtxo(importVtxoRequest)

Import a VTXO

Imports hex-encoded serialized VTXOs into the wallet. Validates that each VTXO is anchored on-chain, owned by this wallet, and has not expired. Useful for restoring VTXOs after database loss or re-importing from the server mailbox. The operation is idempotent.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { ImportVtxoOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // ImportVtxoRequest
    importVtxoRequest: ...,
  } satisfies ImportVtxoOperationRequest;

  try {
    const data = await api.importVtxo(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **importVtxoRequest** | [ImportVtxoRequest](ImportVtxoRequest.md) |  | |

### Return type

[**Array&lt;WalletVtxoInfo&gt;**](WalletVtxoInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | VTXO imported successfully |  -  |
| **400** | Invalid VTXO hex or VTXO not owned by wallet |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## mnemonic

> MnemonicResponse mnemonic()

Get wallet mnemonic

Returns the BIP-39 mnemonic phrase backing the wallet. Returns 404 when mnemonic exposure is disabled. Exposure is off by default; the endpoint returns 404 unless barkd is started with the &#x60;--expose-mnemonic&#x60; flag.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { MnemonicRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.mnemonic();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**MnemonicResponse**](MnemonicResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the wallet\&#39;s BIP-39 mnemonic phrase |  -  |
| **404** | Mnemonic retrieval is disabled |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## movements

> Array&lt;Movement&gt; movements()

List movements (deprecated)

Deprecated: Use history instead

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { MovementsRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.movements();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**Array&lt;Movement&gt;**](Movement.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the wallet movements |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## nextRound

> NextRoundStart nextRound()

Get next round time

Queries the Ark server for the next scheduled round start time and returns it in RFC 3339 format.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { NextRoundRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.nextRound();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**NextRoundStart**](NextRoundStart.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the next round start time |  -  |
| **404** | Wallet not connected to an Ark server |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## offboardAll

> OffboardResult offboardAll(offboardAllRequest)

Offboard all VTXOs

Cooperatively moves all spendable VTXOs off the Ark protocol to an on-chain address. Each VTXO is offboarded in full—partial amounts are not supported. The on-chain transaction fee is deducted from the total, and the remaining amount is sent to the destination. If no address is specified, the wallet generates a new on-chain address. To send a specific amount on-chain, use &#x60;send-onchain&#x60; instead.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { OffboardAllOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // OffboardAllRequest
    offboardAllRequest: ...,
  } satisfies OffboardAllOperationRequest;

  try {
    const data = await api.offboardAll(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **offboardAllRequest** | [OffboardAllRequest](OffboardAllRequest.md) |  | |

### Return type

[**OffboardResult**](OffboardResult.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the offboard transaction id |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## offboardVtxos

> OffboardResult offboardVtxos(offboardVtxosRequest)

Offboard specific VTXOs

Cooperatively moves the specified VTXOs off the Ark protocol to an on-chain address. Each VTXO is offboarded in full—partial amounts are not supported. The on-chain transaction fee is deducted from the total, and the remaining amount is sent to the destination. If no address is specified, the wallet generates a new on-chain address. To send a specific amount on-chain, use &#x60;send-onchain&#x60; instead.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { OffboardVtxosOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // OffboardVtxosRequest
    offboardVtxosRequest: ...,
  } satisfies OffboardVtxosOperationRequest;

  try {
    const data = await api.offboardVtxos(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **offboardVtxosRequest** | [OffboardVtxosRequest](OffboardVtxosRequest.md) |  | |

### Return type

[**OffboardResult**](OffboardResult.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the offboard transaction id |  -  |
| **400** | No VTXO IDs provided, or one of the provided VTXO IDs is invalid, or destination address is invalid |  -  |
| **404** | One the VTXOs wasn\&#39;t found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## peekAddress

> ArkAddressResponse peekAddress(index)

Get Ark address by index

Returns a previously generated Ark address by its derivation index. Only addresses that have already been generated are available.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { PeekAddressRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // number | Index for the address.
    index: 56,
  } satisfies PeekAddressRequest;

  try {
    const data = await api.peekAddress(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **index** | `number` | Index for the address. | [Defaults to `undefined`] |

### Return type

[**ArkAddressResponse**](ArkAddressResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the Ark address |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## pendingRounds

> Array&lt;PendingRoundInfo&gt; pendingRounds()

List round participations

Returns all active round participations and their current status. A round participation is created when you call one of the &#x60;refresh&#x60; endpoints and persists until the round\&#39;s funding transaction is confirmed on-chain (2 confirmations on mainnet, 1 on testnet). The list can contain multiple entries—for example, a previous round awaiting on-chain confirmation alongside a newly submitted round waiting for the next server round to start. Confirmed and failed rounds are removed automatically by the background daemon.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { PendingRoundsRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.pendingRounds();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**Array&lt;PendingRoundInfo&gt;**](PendingRoundInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the wallet pending rounds |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## refreshAll

> PendingRoundInfo refreshAll()

Refresh all VTXOs

Registers all spendable VTXOs for refresh in the next Ark round. The input VTXOs are locked immediately and will be forfeited once the round completes, yielding new VTXOs with a fresh expiry. The background daemon automatically participates in the round and progresses it to completion. Use the &#x60;rounds&#x60; endpoint to track progress.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { RefreshAllRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.refreshAll();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**PendingRoundInfo**](PendingRoundInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the refresh result |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## refreshCounterparty

> PendingRoundInfo refreshCounterparty()

Refresh received VTXOs

Registers all out-of-round VTXOs held by the wallet for refresh in the next Ark round. Refreshing replaces out-of-round VTXOs under arkoor trust assumptions with trustless, in-round VTXOs. Out-of-round VTXOs whose entire transaction chain originates from your own in-round VTXOs are excluded. The background daemon automatically participates in the round and progresses it to completion. Use the &#x60;rounds&#x60; endpoint to track progress.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { RefreshCounterpartyRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.refreshCounterparty();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**PendingRoundInfo**](PendingRoundInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the refresh result |  -  |
| **404** | There is no VTXO to refresh |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## refreshDelegated

> PendingRoundInfo refreshDelegated(delegatedRefreshRequest)

Refresh VTXOs in delegated mode

Registers the specified VTXOs for refresh as a delegated participation: the wallet hands the server a signed participation and the server carries it through the round, so the wallet doesn\&#39;t need to follow the round interactively. The input VTXOs are locked immediately and will be forfeited once the round completes, yielding new VTXOs with a fresh expiry.  Set &#x60;height&#x60; to schedule the refresh for a future block height: the refresh fee is priced at that height and the server includes the participation in the first round once the chain tip reaches it. When &#x60;height&#x60; is omitted, the participation is eligible for the next round. Use the &#x60;rounds&#x60; endpoint to track progress.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { RefreshDelegatedRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // DelegatedRefreshRequest
    delegatedRefreshRequest: ...,
  } satisfies RefreshDelegatedRequest;

  try {
    const data = await api.refreshDelegated(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **delegatedRefreshRequest** | [DelegatedRefreshRequest](DelegatedRefreshRequest.md) |  | |

### Return type

[**PendingRoundInfo**](PendingRoundInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the refresh result |  -  |
| **400** | No VTXO IDs provided, or one of the provided VTXO IDs is invalid |  -  |
| **404** | One the VTXOs wasn\&#39;t found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## refreshVtxos

> PendingRoundInfo refreshVtxos(refreshRequest)

Refresh specific VTXOs

Registers the specified VTXOs for refresh in the next Ark round. The input VTXOs are locked immediately and will be forfeited once the round completes, yielding new VTXOs with a fresh expiry. The background daemon automatically participates in the round and progresses it to completion. Use the &#x60;rounds&#x60; endpoint to track progress.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { RefreshVtxosRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // RefreshRequest
    refreshRequest: ...,
  } satisfies RefreshVtxosRequest;

  try {
    const data = await api.refreshVtxos(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **refreshRequest** | [RefreshRequest](RefreshRequest.md) |  | |

### Return type

[**PendingRoundInfo**](PendingRoundInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the refresh result |  -  |
| **400** | No VTXO IDs provided, or one of the provided VTXO IDs is invalid |  -  |
| **404** | One the VTXOs wasn\&#39;t found |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## send

> SendResponse send(sendRequest)

Send a payment

Sends an Ark or Lightning payment to the specified destination. Accepts an Ark address, BOLT11 invoice, BOLT12 offer, or Lightning address. Ark address payments are settled instantly via an out-of-round (arkoor) transaction. The &#x60;amount_sat&#x60; field is required for Ark addresses and Lightning addresses but optional for invoices and offers that already encode an amount. Comments are only supported for Lightning addresses. To send to an on-chain bitcoin address, use &#x60;send-onchain&#x60; instead.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { SendOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // SendRequest
    sendRequest: ...,
  } satisfies SendOperationRequest;

  try {
    const data = await api.send(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **sendRequest** | [SendRequest](SendRequest.md) |  | |

### Return type

[**SendResponse**](SendResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Payment sent successfully |  -  |
| **400** | The provided destination is not a valid Ark address, BOLT11 invoice, BOLT12 offer, or Lightning address |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## sendOnchain

> OffboardResult sendOnchain(sendOnchainRequest)

Send on-chain from Ark balance

Sends the specified amount to an on-chain address using the wallet\&#39;s off-chain Ark balance. The on-chain transaction fee is paid on top of the specified amount. Internally creates an out-of-round transaction to consolidate VTXOs into the exact amount needed, then cooperatively sends the on-chain payment via the Ark server. To offboard entire VTXOs without specifying an amount, use &#x60;offboard/vtxos&#x60; or &#x60;offboard/all&#x60; instead.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { SendOnchainOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // SendOnchainRequest
    sendOnchainRequest: ...,
  } satisfies SendOnchainOperationRequest;

  try {
    const data = await api.sendOnchain(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **sendOnchainRequest** | [SendOnchainRequest](SendOnchainRequest.md) |  | |

### Return type

[**OffboardResult**](OffboardResult.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the offboard transaction id |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## sync

> sync()

Sync wallet

Triggers an immediate sync of the wallet\&#39;s off-chain state. Updates on-chain fee rates, processes incoming arkoor payments, resolves outgoing and incoming Lightning payments, and progresses pending rounds and boards toward confirmation. The background daemon already runs these operations automatically (e.g., Lightning every second, mailbox and boards every 30 seconds), but calling &#x60;sync&#x60; forces all of them to run immediately.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { SyncRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.sync();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

`void` (Empty response body)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Wallet was successfully synced |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## syncMailbox

> MailboxSyncResponse syncMailbox()

Sync mailbox only

Triggers an immediate mailbox sync without running any of the other off-chain sync steps. Fetches any pending mailbox messages from the Ark server, processes them (incoming arkoor payments, lightning receive notifications), and returns the new mailbox checkpoint (tip). Useful in &#x60;daemon_manual_sync&#x60; mode where background mailbox subscription is disabled and the operator needs a granular way to pull incoming events.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { SyncMailboxRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.syncMailbox();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**MailboxSyncResponse**](MailboxSyncResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the mailbox tip after sync |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## vtxos

> Array&lt;WalletVtxoInfo&gt; vtxos(all)

List VTXOs

Returns VTXOs held by the wallet, including their state and expiry information. By default returns only non-spent VTXOs. Set &#x60;all&#x3D;true&#x60; to include all VTXOs regardless of state.

### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { VtxosRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // boolean | Return all VTXOs regardless of their state. If not provided, returns only non-spent VTXOs. (optional)
    all: true,
  } satisfies VtxosRequest;

  try {
    const data = await api.vtxos(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **all** | `boolean` | Return all VTXOs regardless of their state. If not provided, returns only non-spent VTXOs. | [Optional] [Defaults to `undefined`] |

### Return type

[**Array&lt;WalletVtxoInfo&gt;**](WalletVtxoInfo.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Returns the wallet VTXOs |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## walletDelete

> WalletDeleteResponse walletDelete(walletDeleteRequest)



### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { WalletDeleteOperationRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  const body = {
    // WalletDeleteRequest
    walletDeleteRequest: ...,
  } satisfies WalletDeleteOperationRequest;

  try {
    const data = await api.walletDelete(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **walletDeleteRequest** | [WalletDeleteRequest](WalletDeleteRequest.md) |  | |

### Return type

[**WalletDeleteResponse**](WalletDeleteResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Wallet deletion status |  -  |
| **400** | Invalid request |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## walletExists

> WalletExistsResponse walletExists()



### Example

```ts
import {
  Configuration,
  WalletApi,
} from '@secondts/barkd';
import type { WalletExistsRequest } from '@secondts/barkd';

async function example() {
  console.log("🚀 Testing @secondts/barkd SDK...");
  const config = new Configuration({ 
    // Configure HTTP bearer authorization: bearer
    accessToken: "YOUR BEARER TOKEN",
  });
  const api = new WalletApi(config);

  try {
    const data = await api.walletExists();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**WalletExistsResponse**](WalletExistsResponse.md)

### Authorization

[bearer](../README.md#bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Wallet existence status |  -  |
| **500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

