Zilliqa
Properties
boltX.zilliqa.wallet.isBoltX
boltX.zilliqa.wallet.isBoltX
Note: Non-BoltX providers may also set this property to true
.
true
if the Zilliqa provider belongs to Bolt-X
boltX.zilliqa.wallet.isConnected
boltX.zilliqa.wallet.isConnected
true
if there is an active communication between extension and boltX and the user's Zilliqa account is loaded (permission granted by user)
boltX.zilliqa.wallet.isUnlocked
boltX.zilliqa.wallet.isUnlocked
true
if the user's Bolt-X extension is unlocked
boltX.zilliqa.wallet.isEnable
boltX.zilliqa.wallet.isEnable
true
ifboltX.zilliqa.isConnected
is true and the extension wallet is unlockedThe method is provided to standardise with zilPay's wallet provider
boltX.zilliqa.wallet.defaultAccount
boltX.zilliqa.wallet.defaultAccount
The user's current Zilliqa address or null if wallet is not unlocked or permissions is not granted by user
The
defaultAccount
is of the following format:
boltX.zilliqa.wallet.accounts
boltX.zilliqa.wallet.accounts
The Mapping of base16 addresses to user's zilliqa address
Only returns mapping with one address for now.
The
accounts
is of the following format:
boltX.zilliqa.wallet.net
boltX.zilliqa.wallet.net
mainnet
ortestnet
boltX.zilliqa.wallet.node
boltX.zilliqa.wallet.node
The current node URL
Usually default mainnet or testnet URL
Methods
boltX.zilliqa.wallet.connect()
boltX.zilliqa.wallet.connect()
Requests user permission to connect the Zilliqa provider to the extension and requests user's Zilliqa address
Returns boolean indicating whether the wallet is connected
boltX.zilliqa.wallet.sendTransaction(tx)
boltX.zilliqa.wallet.sendTransaction(tx)
Call popup to sign Transaction & send transaction request to the network.
Returns the pending transaction object
Throws an error when rejected or transaction broadcast/signing failed
boltX.zilliqa.wallet.sign(message)
boltX.zilliqa.wallet.sign(message)
Call popup to sign message.
Returns the message signature and the user's public key
boltX.zilliqa.wallet.verify(msg, signature, pubKey)
boltX.zilliqa.wallet.verify(msg, signature, pubKey)
Verifies if the signature is generated from the given message.
pubKey
is optional and will default to the user's public key if undefined
Returns true if it matches, false otherwise
Events
The boltX.zilliqa.wallet
object inherits the eventEmitter
methods and emits the following events.
walletLocked
walletLocked
Emitted when wallet gets locked.
walletUnlocked
walletUnlocked
Emitted when wallet gets unlocked.
connected
connected
Emitted when wallet is connected to Bolt-X extension
disconnected
disconnected
Emitted when loses connection with Bolt-X extension
accountsChanged
accountsChanged
Emits the new
defaultAccount
when account change is detected
networkChanged
networkChanged
Emits the new network type (
'mainnet' | 'testnet'
) when network change is detected
Last updated