The first production-ready JavaScript implementation of the RGB protocol
rgbjs brings the power of RGB protocol to browsers, Progressive Web Apps, and mobile applications. Create, manage, and interact with RGB20 assets using pure JavaScript.
No compilation needed. Run directly in modern browsers with full RGB protocol support.
Perfect for mobile apps and PWAs. Lightweight and optimized for mobile performance.
134+ tests passing, 100% RGB test vector compatibility. Built for real-world use.
// Create an RGB20 asset in just a few lines
const contract = RGB20Contract.create({
ticker: 'SBTC',
name: 'Synthetic Bitcoin',
precision: 8,
terms: 'Bitcoin-backed synthetic asset',
supply: 2100000000000000,
utxoRef: 'txid:vout'
});
// Get contract information
console.log(contract.getFormattedContractId());
// rgb:012e3b1c-674138bd-248df4f6-5128d24c-97102742-415cf1f9-c2bc9961-3cc46c05
// Validate transfers
const validation = contract.validateTransfer('source:0', 1000, 'dest:1');
console.log(validation.valid); // true
Tests Passing
RGB Test Vector Compatible
Architecture Stages
Contract Creation Time
Create synthetic assets, stablecoins, and tokenized instruments that run entirely in the browser. No backend required for basic operations.
Lightweight RGB protocol implementation perfect for mobile wallets. Small bundle size with full RGB20 functionality.
Integrate RGB protocol directly into web applications. Create asset management interfaces and trading platforms.
Build RGB protocol tools, explorers, and utilities. Full API for contract creation, validation, and management.
Join the future of RGB protocol development with the most accessible implementation available.