# BoardsApi

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

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**boardAll**](BoardsApi.md#boardall) | **POST** /api/v1/boards/board-all | Board all on-chain bitcoin |
| [**boardAmount**](BoardsApi.md#boardamount) | **POST** /api/v1/boards/board-amount | Board a specific amount |
| [**getPendingBoards**](BoardsApi.md#getpendingboards) | **GET** /api/v1/boards/pending | List pending boards |



## boardAll

> PendingBoardInfo boardAll()

Board all on-chain bitcoin

Moves all bitcoin in the on-chain wallet onto the Ark protocol. Creates and broadcasts a funding transaction that drains the on-chain balance into a single VTXO, then returns the pending board details. The resulting VTXO is not spendable off-chain until the funding transaction reaches the number of on-chain confirmations required by the Ark server.

### Example

```ts
import {
  Configuration,
  BoardsApi,
} from '@secondts/barkd';
import type { BoardAllRequest } 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 BoardsApi(config);

  try {
    const data = await api.boardAll();
    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

[**PendingBoardInfo**](PendingBoardInfo.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 board 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)


## boardAmount

> PendingBoardInfo boardAmount(boardRequest)

Board a specific amount

Moves the specified amount of bitcoin in the on-chain wallet onto the Ark protocol. Creates and broadcasts a funding transaction, then returns the pending board details. The resulting VTXO is not spendable off-chain until the funding transaction reaches the number of on-chain confirmations required by the Ark server.

### Example

```ts
import {
  Configuration,
  BoardsApi,
} from '@secondts/barkd';
import type { BoardAmountRequest } 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 BoardsApi(config);

  const body = {
    // BoardRequest
    boardRequest: ...,
  } satisfies BoardAmountRequest;

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

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

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **boardRequest** | [BoardRequest](BoardRequest.md) |  | |

### Return type

[**PendingBoardInfo**](PendingBoardInfo.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 board 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)


## getPendingBoards

> Array&lt;PendingBoardInfo&gt; getPendingBoards()

List pending boards

Returns all boards whose funding transactions have not yet reached the number of on-chain confirmations required by the Ark server.

### Example

```ts
import {
  Configuration,
  BoardsApi,
} from '@secondts/barkd';
import type { GetPendingBoardsRequest } 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 BoardsApi(config);

  try {
    const data = await api.getPendingBoards();
    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;PendingBoardInfo&gt;**](PendingBoardInfo.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 all pending boards |  -  |
| **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)

