Wallet API
Build multi-chain wallet applications

Build multi-chain wallet applications#

Before starting this chapter, please ensure that you have read and completed the content introduced in Preparations and create a wallet. This section will briefly outline how to quickly use the wallet API and build a program instance of a multi-chain application using JavaScript.

1. Check multi-chain capability#

We will continue to integrate more blockchains and support more asset types. You can start by referring to the cases here to understand the range of blockchains and assets supported by the WaaS service, so as to stay updated at all times.

Get supported chains and tokens
Check supported chains and tokens in WaaS

2. Check wallet assets#

Here you can check the assets within the previously created wallet. To ensure successful transactions later on, please ensure that the corresponding wallet address has sufficient balance.

Check wallet assets
Check what asset is in your wallet

3. Subscribe to transaction data#

To ensure you receive real-time notifications upon successful transactions, please subscribe first. Otherwise, you will only be able to query transaction results through polling the API.

Data subscription
Subscribe to transaction data

4. Send transactions#

Now, based on the execution result of Get Supported Chains, you can select the chain you want to interact with and, according to its corresponding ChainId, construct and send transactions.

Multi-chain transactions
How to send transaction in different chains

5. Check transaction history#

After sending the transaction, you can query the transaction result and details.

Query transaction information
Check transaction history and detail

Next, if you want to have a more comprehensive understanding of the capabilities provided by the wallet API, you can proceed to check the API Reference and the SDK Reference.