Skip to Content
dApps
On this page

sendBitcoin

Send BTC

Method

declare function sendBitcoin( toAddress: string, satoshis: number, options?: { feeRate?: number; memo?: string; memos?: string[] } ): Promise<string>;

Params

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

Response

txid — string

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat; const address = "<RECIPIENT_BITCOIN_ADDRESS>"; // Replace with a valid address const txid = await provider.sendBitcoin(address, 1000);

Demo

Open example 

Last updated on