@utexo/rgb-sdk is the shared wallet facade. It exports UTEXOWallet, which wraps an application-created RgbLibRn or RgbLibWeb engine. For Node.js and Bare, use the separate @utexo/wdk-wallet-rgb manager/account API.
Current React Native and Web engines support on-chain RGB only, including BFA assets. Lightning remains WIP and testing-only in separate experimental integrations, and is not recommended for production.
Node.js
On-chain Node.js applications using
@utexo/wdk-wallet-rgb.React Native
UTEXOWallet with the native RgbLibRn engine on iOS and Android.Web
UTEXOWallet with RgbLibWeb, backed by rgb-lib WASM and IndexedDB.Platform API Differences
Import
UTEXOWallet from @utexo/rgb-sdk. The React Native and Web engines can be used directly or through the facade; both connect automatically on the first network operation. When using the facade, manage initialization and the session through wallet.
@utexo/wdk-wallet-rgb is not yet integrated into the facade. Use its manager/account API separately for Node.js and Bare.
How RGB Transfers Work
- The receiver creates a blinded or witness invoice.
- The sender pays it with the appropriate on-chain send method.
- Both wallets refresh while consignments are exchanged and Bitcoin confirmations accumulate.
- The receiver checks transfer status and its asset balance after settlement.
witnessData.amountSat in the facade API or witnessAmountSats in WDK.
For transaction and fee review before signing, React Native and Web expose begin/end operations. The one-step send methods sign and submit immediately.
All RGB state is validated client-side. The transport delivers consignments; Bitcoin anchors the state transition. See RGB Concepts for background.
Asset IDs and Amounts
USDT on Bitcoin uses the BFA schema. BothRgbLibRn and RgbLibWeb group assets by schema, including listAssets().bfa. WDK returns a flat array and identifies BFA entries with schema: 'Bfa'.
expectedAssetId from authoritative deployment metadata. A ticker alone does not identify an asset. An unknown asset is learned through a validated receive; do not assume a new wallet already lists it.
React Native and Web invoice and balance APIs use safe JavaScript integers in base units. Their burn() method uses an exact decimal string. WDK uses decimal strings or bigint for amounts and fee rates. BFA receive validation needs evmRpcUrls for the issuing chain.
Network Selection
The quickstarts retain public Bitcoin signet andrpcs://staging.rgb-proxy.utexo.com/json-rpc. React Native uses ssl://stage.electrs-signet.mint.utexo.com:60602. Browsers require HTTP Esplora, so Web uses https://mempool.space/signet/api. Node.js follows the WDK profile and endpoint requirements.
The Web and React Native utexo profile points to hosted Dev infrastructure, which is separate from public signet. Match the sender and receiver’s network and deployment settings.
Backup and Lifecycle
The facade’sdestroy() closes the engine permanently; create a new instance to reopen. React Native additionally exposes shutdown() and reinit() for the same instance. Manage the session through the facade rather than separately calling its engine’s lifecycle.
Back up RGB state as well as the mnemonic. Both engines expose exportBackup(). React Native also exports a file with exportBackupToFile(), while Web supports byte restore and VSS. Restore only with the engine that produced the backup; see the platform reference for the required restore order.
Lightning Status
Neither current facade engine exposes Lightning, channels, LSP, or APay. Separate experimental WDK Lightning documentation is retained for testing only and is not recommended for production.Common Prerequisites
- Separate sender and receiver wallets
- Bitcoin test funds for fees and RGB output preparation
- A sender holding the expected RGB asset
- Secure key storage and a persistent wallet profile
- Compatible facade, engine, and core package versions