Provider API
NaboxWallet.nuls provider is gradually deprecated, please use or upgrade to the latest NaboxWallet.nai provider.
createSession (connect to Nabox wallet)
const res = NaboxWallet.nai.createSession();
// [NULSd6Hge.........8apXDR]sendTransaction (send normal transaction)
const txParameters = {
from: 'NULSd6Hge.........8apXDR', //The transaction initiation address is required and must be an authorized address
to: '', // Required, receiving address
value: '', // Required, transfer amount (Note: use nai provider value as the smallest unit, nuls provider is the actual transfer amount)
assetChainId: '',// Required, chain id, you can get the corresponding asset ID information through the browser
assetId: '', // Required, asset ID, you can get the corresponding asset ID information through the browser.
contractAddress: '', // Required if it is a contract asset
remarks: 'reamrk' // Remark
};
const hash = await Nabox.nai.sendTransaction(txParameters); // Return hash
// 753dcb3...signTransaction (signing ordinary transactions)
signTxHex(signature txHex)
signNULSTransaction (sign NULS AI Ledger transaction)
contractCreate (create NULS AI contract)
contractCall (call contract)
invokeView (view contract)
transactionSerialize(transaction Serialize)
Send the assembled transaction.
signMessage(Message Signature)
getPub (get the public key of the currently connected account)
sendDepositeTransaction (send NAI pledge transaction)
sendWithDrawTransaction
on(event monitoring)
Last updated