> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arksat.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfers and swap funding

> Send BTC, tokens, or protocol swap funding.

Use `client = createArksatClient(provider)`. Example variables are supplied by the application.

## sendToAddress

amount is a positive integer in sats. Requires user approval.

**Parameters**

```ts theme={null}
{ address: string; amount: number }
```

**Returns**

```ts theme={null}
Promise<{ txid: string }>
```

**Example**

```ts theme={null}
const { txid } = await client.sendToAddress({ address, amount: 1000 })
```

## sendAsset

Each asset has assetId and atomic-unit amount. bitcoinAmount is BTC sent in sats, not a fee.

**Parameters**

```ts theme={null}
{ address: string; assets: ArksatAssetTransfer[]; bitcoinAmount?: number }
```

**Returns**

```ts theme={null}
Promise<{ txid: string }>
```

**Example**

```ts theme={null}
const { txid } = await client.sendAsset({ address, assets: [{ assetId, amount: '100' }] })
```

## sendSwapFunding

Submits swap funding; does not fetch quotes or complete an entire swap. Wallet Swap is testnet only.

**Parameters**

```ts theme={null}
ArksatSwapFundingParams
```

**Returns**

```ts theme={null}
Promise<{ txid: string }>
```

**Example**

```ts theme={null}
const { txid } = await client.sendSwapFunding(fundingParams)
```

## Swap funding parameters

| Field | Type | Description |
| - | - | - |
| address | string | Recipient |
| assets | ArksatAssetTransfer\[] | Atomic-unit amounts |
| bitcoinAmount | number | Integer sats |
| extension | `{ type: number; payload: string }` | Protocol extension |
| timingId | string, optional | Diagnostic correlation |
| expectedAddress / expectedNetwork / expectedSessionId | optional | Session guards |

Check activity before retrying a timed-out submission. [Transfer guide](https://docs.arksat.xyz/en/transfers.md).

[Errors](https://docs.arksat.xyz/en/errors.md) · [Type definitions](https://docs.arksat.xyz/en/reference/types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.