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

# Bitcoin

> Transfer BTC and sign raw messages with the MPCVault API.

Examples use [API client signing](https://docs.mpcvault.com/api-reference/overview.md#preparation).

## Signing request types

| Payload | Use |
| - | - |
| [`btcSendNative`](https://docs.mpcvault.com/api-reference/rest/create-signing-request) | Transfer BTC. |

To sign transactions you build yourself or messages you format yourself, use [raw signing](https://docs.mpcvault.com/api-reference/overview.md#raw-signing).

## Wallet

[Create a wallet](https://docs.mpcvault.com/api-reference/rest/create-wallet.md) with `networkType: "NETWORK_TYPE_BITCOIN"`. Fund it with BTC for the transfer and fees. Available unspent transaction outputs (UTXOs) cover both; inputs spent by pending transactions are unavailable.

## Send BTC

This Bitcoin Mainnet example sends `0.0001 BTC`.

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createSigningRequest \
  -H "Content-Type: application/json" \
  -H "x-mtoken: <API_TOKEN>" \
  -d '{
    "vaultUuid": "<VAULT_UUID>",
    "callbackClientSignerPublicKey": "<CLIENT_SIGNER_OPENSSH_PUBLIC_KEY>",
    "broadcastTx": true,
    "btcSendNative": {
      "from": "<YOUR_BITCOIN_ADDRESS>",
      "to": "<RECIPIENT_BITCOIN_ADDRESS>",
      "amount": "10000"
    }
  }'
```

`amount` is an integer string in satoshi: `1 BTC = 100,000,000 satoshi`. MPCVault selects the transaction inputs and creates change when needed.

Optional `networkFee` sets an integer fee rate in satoshi per virtual byte (`sat/vB`). Omit it or set it to `"0"` to use MPCVault's default rate. The total fee depends on the transaction size.

## Sign and track

[Sign the request](https://docs.mpcvault.com/api-reference/overview.md#sign-the-request). The returned `txHash` is the Bitcoin transaction ID (`txid`).

Query a Bitcoin Mainnet node with [`getrawtransaction`](https://bitcoincore.org/en/doc/30.0.0/rpc/rawtransactions/getrawtransaction/):

```bash theme={null}
curl "<BITCOIN_MAINNET_RPC_URL>" \
  --user "<RPC_USER>:<RPC_PASSWORD>" \
  -H "Content-Type: application/json" \
  --data-binary '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getrawtransaction",
    "params": ["<TX_HASH>", 1]
  }'
```

Confirmed-transaction lookup by `txid` requires `txindex=1`; otherwise add the containing block hash as the third parameter or use a Bitcoin indexer.

* Match the recipient in `result.vout[].scriptPubKey.address` and its `value` to the request. This RPC reports output values in BTC.
* Wait until `result.confirmations` reaches your application's required depth. A mempool transaction is unconfirmed; a missing result alone does not establish failure.


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