Skip to Content
dApp 接入

sendBitcoin

发送 BTC

方法

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

参数

  • toAddress必填 string 接收地址
  • satoshis必填 number 发送的聪数
  • options可选
    • feeRate必填 number 网络费率

响应

txidstring

示例

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

演示

Last updated on