Provider API

Use the following provider api to connect to the Nabox wallet

getAccounts (connect wallet)

const res = await NaboxWallet.bitcoin.getAccounts();
// Returns the currently connected account
['bc1pqw2apzlwqdx5cyp.........a5fupu5l0hsl9n7uw'];

requestAccounts (get the currently connected account)

const res = await NaboxWallet.bitcoin.requestAccounts();
// Returns the currently connected account
['bc1pqw2apzlwqdx5cyp.........a5fupu5l0hsl9n7uw'];

getNetwork (get the current network, Nabox wallet only supports the main network)

const network = await NaboxWallet.bitcoin.getNetwork();
// Returns the currently connected account
livenet

getPublicKey (get the public key of the currently connected account)

const pubKey = await NaboxWallet.bitcoin.getPublicKey();

// 037c92dfbdafb4de8f1249c.........6f95146c8233e107879ad

getBalance (get the balance of the currently connected account)

getInscriptions (get the inscriptions of the currently connected account)

sendBitcoin(sendBitcoin)

pushTx (push transaction)

signPsbt (signature psbt)

signPsbt(signature psbts)

pushPsbt (broadcast psbt transaction)

on(Account change monitoring event)

Last updated