> ## 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.

# Send transactions

> Send BTC and tokens with the SDK.

Connect first. Call transfers from a user action and handle errors.

## BTC

```ts theme={null}
import type { ArksatClient } from '@arksat/wallet-sdk'

export async function sendBtc(client: ArksatClient, address: string) {
  return client.sendToAddress({ address, amount: 1000 })
}
```

Amount is a positive integer in sats. The result is `{ txid }`.

## Tokens

```ts theme={null}
import { decimalAmountToRaw, type ArksatClient } from '@arksat/wallet-sdk'

export async function sendToken(
  client: ArksatClient,
  address: string,
  assetId: string,
  amountText: string,
  decimals: number,
) {
  const amount = decimalAmountToRaw(amountText, decimals)
  return client.sendAsset({ address, assets: [{ assetId, amount }] })
}
```

Use decimals from verified asset metadata. assetId is a 68-character hexadecimal string; amount is a positive uint64 atomic-unit string.

Optional `bitcoinAmount` is BTC sent with the transaction, in sats. It is not the fee parameter.

## Submission

A transaction ID indicates submission, not final settlement. On timeout or disconnect, check [activity](https://docs.arksat.xyz/en/events.md) before retrying.

`sendSwapFunding` submits protocol funding and does not complete an entire swap. [API reference](https://docs.arksat.xyz/en/reference/transfers.md).


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