Wallet API
Initializing
Instantiating the Wallet API.
API Reference
accounts
: Signed-in Accounts.accountId
: Main/first signed-in account ID in the accounts list.contractId
: Contract ID.initNear
: Initializes a connection to the NEAR blockchain. This is called automatically when there's any contract interaction.network
: Current network (testnet
,mainnet
orlocalnet
).recentlySignedInWallets
: Returns ID-s of 5 recently signed in wallets.selectedWalletId
: Selected Wallet IdsignInModal
: Open up the Signin Wallet Modal.wallet
: Wallet instance.walletSelector
: WalletSelector instance.
Opening the Sign-in Wallet Selector Modal
You can open up the NEAR Wallet Selector modal by calling signInModal()
:
Customizing the Wallets Options for NEAR Wallet Selector
By default, naxios only uses @near-wallet-selector/my-near-wallet as a means of connecting the wallet. However, you can add other wallet selectors as follows:
Then, you can start naxius as follows:
Find out all the NEAR wallet selectors here: NEAR Wallet Selector
Last updated