sendBitcoin
Send BTC
Method
async function sendBitcoin(
toAddress: string,
satoshis: number,
options?: { feeRate: number }
): stringParams
toAddress— requiredstringthe address to sendsatoshis— requirednumberthe satoshis to sendoptions— optionalfeeRate— requirednumberthe 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
Was this helpful?