Build an Inscription Wallet: Quick Start Guide for Wallet API Integration

ยท

Introduction to Inscription Wallet Development

The Wallet API supports five popular inscription assets:

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

  1. Install the latest Signature SDK:

    npm install @okx/js-wallet-sdk
  2. For BTC network development:

    npm install @okx/js-wallet-sdk-btc

Wallet Creation Process

  1. Download the project source code
  2. Run the build script
  3. Create BTC wallet object using Signature SDK
  4. 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

API Integration

Call the account creation endpoint:

POST /api/v5/wallet/account/create

Parameters:

๐Ÿ‘‰ Learn more about address types

Step 3: Construct and Send Inscription Transactions

Transaction Preparation

  1. Get signing information:

    POST /api/v5/wallet/pre-transaction/sign-info
  2. Query UTXOs:

    GET /api/v5/wallet/utxo/utxo
  3. Verify inscription details:

    POST /api/v5/wallet/utxo/utxo-detail

Transaction Broadcasting

POST /api/v5/wallet/transaction/send

Expected response:

{
  "code": "0",
  "txHash": "0x...",
  "orderId": "123456789"
}

Step 4: Query Transaction Details

Status Monitoring

  1. Query by txHash:

    GET /api/v5/wallet/post-transaction/inscription-transaction-detail-by-txhash
  2. 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:

๐Ÿ‘‰ Get started with full API documentation