Getting Started
Last updated
Last updated
v16+
v. 0.4.0 or higher.
For example usage and testing the below APIs using a Demo App, please go here and setup the app locally:
BladeWallet uses the
Install blade-web3
npm package:
npm install --save @bladelabs/blade-web3.js
bladeConnector.createSession(params?: SessionParams)
Create session with Blade Wallet.
bladeConnector.killSession()
Close the session with Blade Wallet.
bladeConnector.getSigner()
Get the currently active BladeSigner.
bladeConnector.getSigners()
Get a list of paired BladeSigner objects.
bladeConnector.onWalletLocked(callback)
Execute a callback when wallet is locked.
bladeConnector.onWalletUnlocked(callback)
Execute a callback when wallet is unlocked.
bladeConnector.onSessionDisconnect(callback)
Execute a callback when a session has been disconnected.
bladeConnector.onSessionExpire(callback)
Execute a callback when a session has expired.
bladeSigner.getAccountId()
Get accountId of active account.
bladeSigner.getAccountBalance(accountId: AccountId⎮string)
Retrieve account balance by accountId
bladeSigner.getAccountInfo(accountId: AccountId⎮string)
Get information about a Hedera account on the connected network.
bladeSigner.checkTransaction(transaction: Transaction)
Check that a transaction is valid.
bladeSigner.populateTransaction(transaction: Transaction)
Set transaction id and node accounts using active account.
bladeSigner.call(request: Executable)
Execute a transaction with provider account.
bladeSigner.sign(message: UInt8Array[])
Sign a transaction with active wallet account.
bladeSigner.signTransaction(transaction: Transaction)
Sign a transaction with active wallet account.
bladeSigner.getLedgerId()
Ledger Id of the currently connected network.
bladeSigner.getMirrorNetwork()
Get an array of mirror nodes for the current network.
bladeSigner.getNetwork()
Get a map of nodes for the current hedera network.
bladeSigner.handshake(serverAccountId: string, serverSignature: string, payload: HandshakePayload)
Make secure client-server handshake
Install dependencies.
Run vite
have a hot-reloaded application.
Note: Once you have the localhost server running, you should be able to connect to the Blade Wallet installed from the GitHub or Chrome Store. In some cases, the Blade Wallet from the Chrome Store will be outdated and may not work so please use the latest build from the GitHub repository mentioned in the prerequisites above.
Run vite build
to build and minify the application.
Note: App must be run in https mode to access Blade Wallet Extension.