Skip to Content
dApp Integration

sendBitcoin

Send BTC

Method

async function sendBitcoin( toAddress: string, satoshis: number, options?: { feeRate: number } ): string

Params

  • toAddress — required string the address to send
  • satoshis — required number the satoshis to send
  • options — optional
    • feeRate — required number the network fee rate

Response

txid — string

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat; const address = "010203" const txid = async provider.sendBitcoin(address, 1000);

Demo

Last updated on