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

# Send Bitcoin

> Transfer BTC using the high-level sendBitcoin method

`dynamicClient.bitcoin.sendBitcoin` builds, signs, and broadcasts a Bitcoin transfer in a single call. Use it when you don't need to inspect or modify the PSBT before broadcast.

## Parameters

| Parameter          | Type                                     | Notes                                                                                         |
| ------------------ | ---------------------------------------- | --------------------------------------------------------------------------------------------- |
| `walletId`         | `string`                                 | The id of a wallet whose `chain === 'BTC'`.                                                   |
| `recipientAddress` | `string`                                 | Destination address (mainnet or signet, depending on the wallet's network).                   |
| `amount`           | `string`                                 | Amount **in satoshis**, encoded as a string to preserve precision. `1 BTC = 100_000_000 sat`. |
| `feePriority`      | `'high' \| 'medium' \| 'low'` (optional) | Fee tier. Defaults are connector-specific.                                                    |

## Example

```ts React Native theme={"system"}
import { dynamicClient } from '<path to client file>';

const wallet = dynamicClient.wallets.userWallets.find((w) => w.chain === 'BTC');
if (!wallet) {
  throw new Error('No Bitcoin wallet');
}

const { txId } = await dynamicClient.bitcoin.sendBitcoin({
  walletId: wallet.id,
  recipientAddress: 'bc1q...',
  amount: '50000', // 50_000 sats = 0.0005 BTC
  feePriority: 'medium',
});

console.log('Broadcasted:', txId);
```

## Converting between BTC and satoshis

`amount` is always a satoshi string. Convert from a user-supplied BTC value before calling:

```ts theme={"system"}
const btc = '0.0005';
const sats = (Number(btc) * 1e8).toString();
//=> '50000'
```

For arbitrary-precision math (large amounts, or values entered as strings), use `BigInt`:

```ts theme={"system"}
const sats = BigInt(Math.round(parseFloat(btc) * 1e8)).toString();
```

## Errors

`sendBitcoin` rejects when:

* The wallet is not a Bitcoin wallet, or the `walletId` doesn't match a wallet in the current session.
* The user cancels the signing prompt in the WebView.
* The connected external wallet refuses the request (insufficient funds, network mismatch, etc.).
* The broadcast fails (the network rejects the transaction).

The error message comes from the underlying connector — surface it to the user verbatim or wrap with your own copy.
