Introduction to Inscription Wallets
Wallet API now supports five major inscription assets:
- BRC-20
- Runes
- ARC-20
- SRC-20
- Ordinals_NFT
Before proceeding, ensure you've completed the preparation steps. This guide will walk you through querying inscription data, constructing transactions, and broadcasting them to the network.
👉 Explore advanced wallet solutions
Step 1: Generating Wallet Mnemonic and Addresses
Our Signature SDK simplifies wallet creation:
Installation Guide
For BTC network implementation:
npm install @okx/wallet-sdkLocal Development Setup
- Download the project source code
- Execute build scripts
Example BTC wallet implementation:
const { BTCWallet } = require('@okx/wallet-sdk');
const wallet = new BTCWallet();
const address = wallet.generateAddress();Demonstration Program
We provide an open-source demo showcasing SDK capabilities. Access source code here.
Step 2: Account Creation
After generating your mnemonic and addresses, create an (AccountId) to:
- Aggregate multiple addresses
- Batch query token balances
- Review transaction history
👉 Master wallet management techniques
Wallet Architecture Concepts
- Wallet: Entity controlling the mnemonic phrase
- Account: Multiple accounts derived from single mnemonic (BIP-44 compliant)
- Address: Unique chain-specific address per account
Call the Create Wallet Account API to establish a BTC wallet account supporting various address types.
Step 3: Constructing and Broadcasting Inscription Transactions
Signature Preparation
Use POST /api/v5/wallet/pre-transaction/sign-info to retrieve:
- BTC network fees
- Inscription size outputs
- Other signing prerequisites
Sample response:
{
"fee_rate": 15,
"inscription_size": 250
}UTXO Management
- Retrieve UTXOs:
GET /api/v5/wallet/utxo/utxo - Inscription Details:
POST /api/v5/wallet/utxo/utxo-detail
Transaction Construction
Utilize the Signature SDK to:
- Validate address legitimacy
- Construct the transaction
Broadcasting Transaction
Call the Send Transaction API to broadcast to the network.
Step 4: Querying Inscription Transaction Details
After broadcasting, use GET /api/v5/wallet/post-transaction/inscription-transaction-detail-by-txhash with txhash to retrieve:
- Transaction status
- Confirmation details
- Asset transfers
Implement Webhook subscriptions for real-time transaction status updates (details).
FAQs
What inscription standards does the Wallet API support?
The API currently supports BRC-20, Runes, ARC-20, SRC-20, and Ordinals_NFT standards for inscription assets.
How do I estimate transaction fees?
Use the sign-info endpoint to retrieve current network fee rates before constructing transactions.
Can I manage multiple accounts under one mnemonic?
Yes, the system fully supports BIP-44 hierarchical deterministic wallet standards for account management.
What's the recommended approach for UTXO management?
Always verify available UTXOs and their inscription details before constructing transactions to ensure sufficient funds.
How can I track transaction status?
Implement both polling (via transaction detail APIs) and push notifications (via Webhooks) for comprehensive status monitoring.
Conclusion
This guide covers fundamental functionality for developing an inscription wallet. The Wallet API offers extensive additional features - explore our documentation for complete capabilities.