Introduction to Inscription Wallet Development
The Wallet API supports five popular inscription assets:
- BRC-20
- Runes
- ARC-20
- SRC-20
- Ordinals_NFT
This guide walks you through querying inscription data, constructing transactions, and broadcasting them to the blockchain.
๐ Explore advanced wallet API features
Step 1: Generate Wallet Mnemonic and Address
Installation Requirements
Install the latest Signature SDK:
npm install @okx/js-wallet-sdkFor BTC network development:
npm install @okx/js-wallet-sdk-btc
Wallet Creation Process
- Download the project source code
- Run the build script
- Create BTC wallet object using Signature SDK
- Derive corresponding addresses
// Sample code for BTC wallet creation
const wallet = new BTCCoreWallet(mnemonic);
const address = wallet.getAddress();Step 2: Create a Wallet Account
Wallet Hierarchy Structure
- Wallet: Owner of mnemonic phrase
- Account: Derived from mnemonic (BIP-44 standard)
- Address: Chain-specific addresses under each account
API Integration
Call the account creation endpoint:
POST /api/v5/wallet/account/createParameters:
coinType: BTCaddressType: (P2PKH, P2SH, Bech32)
๐ Learn more about address types
Step 3: Construct and Send Inscription Transactions
Transaction Preparation
Get signing information:
POST /api/v5/wallet/pre-transaction/sign-infoQuery UTXOs:
GET /api/v5/wallet/utxo/utxoVerify inscription details:
POST /api/v5/wallet/utxo/utxo-detail
Transaction Broadcasting
POST /api/v5/wallet/transaction/sendExpected response:
{
"code": "0",
"txHash": "0x...",
"orderId": "123456789"
}Step 4: Query Transaction Details
Status Monitoring
Query by txHash:
GET /api/v5/wallet/post-transaction/inscription-transaction-detail-by-txhash- Webhook subscription option available for real-time updates
FAQ Section
Q1: What inscription standards does this API support?
A1: The API currently supports BRC-20, Runes, ARC-20, SRC-20, and Ordinals_NFT standards.
Q2: How do I handle transaction fees?
A2: The API automatically calculates appropriate fees based on network conditions. You can adjust fee priorities through additional parameters.
Q3: What security measures should I implement?
A3: Always store mnemonics securely, implement rate limiting, and use HTTPS for all API calls. Consider hardware wallet integration for production environments.
Q4: Can I track multiple addresses simultaneously?
A4: Yes, the account system allows batch queries across multiple addresses associated with a single account.
Q5: How long do inscription transactions typically take?
A5: Processing times vary by network congestion. BTC inscriptions generally take 10-30 minutes for initial confirmations.
Next Steps
For complete implementation details:
- Review API reference documentation
- Test with our sandbox environment
- Monitor network status for optimal transaction timing