This guide covers Node.js server applications. For mobile, see the React Native guide. For browser applications, see the Web guide.
Prerequisites
- Node.js 20, the version used by the package’s publish and end-to-end workflows
- Bitcoin test funds for transaction fees
- A separately initialized sender wallet that already holds the RGB asset for an end-to-end transfer
- Secure server-side storage for the mnemonic and wallet data
Step 1: Install the SDK
Step 2: Generate Wallet Keys
Step 3: Initialize the Wallet
The archived1.0.0-beta.9 Node.js package retains its legacy constructor and lifecycle:
Step 4: Fund the Wallet
Step 5: Create RGB UTXOs
size is denominated in satoshis.
Step 6: Resolve the Asset From the Sender
listAssets() returns an object grouped by asset schema. NIA assets are in the nia array and use the assetId field.
assets.find(...).id example used the wrong response shape and field name.
Step 7: Create a Receive Invoice
Run this on the receiver wallet initialized above:amount is an integer in asset base units. One displayed unit equals 10 ** precision base units; it is not always equal to 1.
Step 8: Send From the Funded Wallet
The archived Node.js package’s1.0.0-beta.9 API uses the legacy send() method.
UTEXOWallet with sufficient testnet BTC and a spendable asset balance.
Step 9: Refresh and Verify
Lightning Payments
The archived1.0.0-beta.9 Node.js package pins @utexo/rgb-sdk-core 1.0.0-beta.3; the current Web and React Native packages pin 1.0.0-beta.5. Its Lightning request and status types therefore differ from the current cross-platform conformance interface.
This Quickstart does not include a Lightning code sample because the archived Node.js package does not implement the current conformance contract. Check the installed package’s type declarations before building a version-pinned integration.
Troubleshooting
Implementation References
- Node.js wallet implementation
- Node.js package manifest
- Node.js package’s pinned core wallet models
- Current shared conformance contract