sendBitcoin
Send BTC
Method
async function sendBitcoin(
    toAddress: string, 
    satoshis: number, 
    options?: { feeRate: number }
): stringParams
- toAddress— required- stringthe address to send
- satoshis— required- numberthe satoshis to send
- options— optional- feeRate— required- numberthe 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?
