RGB SDK
This is the underlying SDK used by RGB client applications. It provides a complete set of bindings for interacting with the RGB and managing RGB-based transfers.
With this SDK, developers can:
Generate RGB invoices
Create and manage UTXOs
Sign PSBTs using local private keys or hardware signing flows
Fetch asset balances, transfer status, and other RGB-related state
Capabilities of rgb-sdk (via WalletManager)
rgb-sdk (via WalletManager)generateKeys(network)
Generate new wallet keypair with mnemonic/xpub/xpriv/master fingerprint
deriveKeysFromMnemonic(network, mnemonic)
Derive wallet keys (xpub/xpriv) from existing mnemonic
deriveKeysFromSeed(network, seed)
Derive wallet keys (xpub/xpriv) directly from a BIP39 seed
registerWallet()
Register wallet with the RGB Node
getBtcBalance()
Get on-chain BTC balance
getAddress()
Get a derived deposit address
listUnspents()
List unspent UTXOs
listAssets()
List RGB assets held
getAssetBalance(asset_id)
Get balance for a specific asset
createUtxosBegin({ up_to, num, size, fee_rate })
Start creating new UTXOs
createUtxosEnd({ signed_psbt })
Finalize UTXO creation with a signed PSBT
blindReceive({ asset_id, amount })
Generate blinded UTXO for receiving
witnessReceive({ asset_id, amount })
Generate witness UTXO for receiving
issueAssetNia({...})
Issue a new Non-Inflationary Asset
signPsbt(psbt, mnemonic?)
Sign PSBT using mnemonic and BDK (async)
signMessage(message, options?)
Produce a Schnorr signature for an arbitrary message
verifyMessage(message, signature, options?)
Verify Schnorr message signatures using wallet keys or provided public key
refreshWallet()
Sync and refresh wallet state
syncWallet()
Trigger wallet sync without additional refresh logic
listTransactions()
List BTC-level transactions
listTransfers(asset_id)
List RGB transfer history for asset
failTransfers(...)
Mark expired transfers as failed
sendBegin(...)
Prepare a transfer (build unsigned PSBT)
sendEnd(...)
Submit signed PSBT to complete transfer
send(...)
Complete send operation: begin → sign → end
createBackup(password)
Create an encrypted wallet backup
downloadBackup(backupId?)
Download the generated backup binary
restoreFromBackup({ backup, password, ... })
Restore wallet state from a backup file
By using this SDK, developers have full control over:
Transfer orchestration
UTXO selection
Invoice lifecycle
Signing policy
This pattern enables advanced use cases, such as:
Integrating with third-party identity/auth layers
Applying custom fee logic or batching
Implementing compliance and audit tracking
Getting Started
Installation
Important: WASM Module Support
This SDK uses WebAssembly modules for cryptographic operations. When running scripts, you may need to use the --experimental-wasm-modules flag:
Basic Usage
Core Workflows
Wallet Initialization
UTXO Management
Asset Issuance
Asset Transfers
Balance and Asset Management
Setup wallet and issue asset
Security
Key Management
Full Examples
For complete working examples demonstrating all features, see:
Last updated