BCH Provider API

createSession (connect to Nabox wallet)

const res = await NaboxWallet.bch.createSession();

// Return value example
 {“selectedAddress”: ’The currently connected account address‘}

getAddress (get the currently connected account address)

const address = await NaboxWallet.bch.getAddress();

// qz4054as682..........6jt75f4dff5ur

getBalance (get the balance of the currently connected account)

const balance = await NaboxWallet.bch.getAddress();

// 1.555

getPub (get the public key of the current account)

const publicKey = await NaboxWallet.bch.getPub();

// 037c92dfbdafb4de8f1.........c6f95146c8233e107879ad

sendTransaction(send Transaction)

signMessage(Message Signature)

on(event monitoring)

Last updated