WDK logoWDK documentation
StartWalletsDeFi & FiatAI & CLITools

Get started with the RGB wallet

Check package availability and open an on-chain RGB account with an existing installation.

Use this guide to open a durable local wallet and read its first address if you already have a working v2.0.3 installation.

Community module, maintained independently by third-party contributors. See Legal and Disclaimers.

@utexo/wdk-wallet-rgb@2.0.3 is currently unavailable on npm. The GitHub tag also requires @utexo/rgb-sdk@1.0.3, which is unavailable on npm.

1. Check the target runtime

The v2.0.3 dependency set published native artifacts for Linux x64, Linux arm64, and macOS arm64. It does not publish a verified Windows or Intel macOS artifact, and the package does not declare a Node.js engine range.

Test installation and native loading on the exact deployment target before integrating wallet state.

2. Confirm your existing installation

The remaining steps require a working v2.0.3 installation, including its native dependency.

3. Choose durable state and services

Create an app-private, persistent directory. Configure an indexer and transport endpoint for the same network.

import WalletManagerRgb from '@utexo/wdk-wallet-rgb'

const seedPhrase = await loadSeedFromSecretStorage()

const manager = new WalletManagerRgb(seedPhrase, {
  network: 'regtest',
  dataDir: '/app-private/wdk/rgb-onchain',
  indexerUrl: 'tcp://127.0.0.1:50001',
  transportEndpoint: 'rpc://127.0.0.1:3000/json-rpc',
})

loadSeedFromSecretStorage() represents your application's secret-management boundary. Do not embed a mnemonic in source, logs, telemetry, or crash reports.

4. Get the account

RGB supports only account index 0.

try {
  const account = await manager.getAccount(0)
  const address = account.getAddress()

  console.log('RGB-aware Bitcoin address:', address)
} finally {
  manager.dispose()
}

getAddress() is synchronous in the released runtime. Using await on its value is harmless, but it is not required.

5. Verify recovery before funding

Before using real funds:

  1. Register and synchronize the wallet against trusted services.
  2. Create an encrypted backup.
  3. Restore into an empty test directory with the same seed.
  4. Confirm addresses, assets, balances, transfers, and UTXOs.
  5. Repeat on the exact deployment runtime.

Do not assume the seed alone restores RGB state. Preserve and test recovery of dataDir and encrypted backups.

Next steps

On this page