Bitcoin Provider (Beta)
// get provider
const bitcoin = window.tg_tomo_btc;type BTCNetworkType = 'MAINNET' | 'TESTNET' | 'SIGNET';
type IBtcAddressType = 'bitcoinP2Wpkh' | 'bitcoinP2Sh' | 'bitcoinP2Tr' | 'bitcoinP2Pkh';
const btcAddressTypeMaps: IBtcAddressType[];Connect with the Wallet
// connect wallet
await bitcoin?.connectWallet();Signing Methods
const res = await bitcoin.request({
method: 'btc_signMessage',
params: [
{
addressType: btcAddressTypeMaps[2],
message: 'btc sign message',
},
],
});
return res;Send Transaction
Last updated