Wallet API
Build Bitcoin Wallet applications

Build Bitcoin 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 supported tokens#

We will continue to support more asset types. You can start by referring to the cases here to understand the range of assets supported by the WaaS service, so as to stay updated at all times. Note: The ChainId for Bitcoin is 0.

Get supported tokens
Get the scope of supported tokens

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.1 Send UTXO transaction#

Next, if you wish to send a basic UTXO transaction, please refer to:

Send UTXO transaction
Construct and broadcast UTXO transactions

4.2 Send BRC-20 transaction#

if you want to send a BRC-20 transaction, please refer to

Send BRC-20 transaction
How-to for BRC-20 transactions

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.