Skip to Content
dApps
このページの内容

sendBitcoin

BTC を送信

メソッド

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

パラメーター

  • toAddress — 必須 string 送信先アドレス
  • satoshis — 必須 number 送信する satoshi の数量
  • options — 任意
    • feeRate — 任意 number ネットワーク手数料率

レスポンス

txid — string

例

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);

デモ

例を開く 

最終更新日