The first production-ready JavaScript implementation of the RGB protocol

Run RGB Contracts Anywhere JavaScript Runs

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.

🌐

Browser Native

No compilation needed. Run directly in modern browsers with full RGB protocol support.

📱

Mobile Ready

Perfect for mobile apps and PWAs. Lightweight and optimized for mobile performance.

Production Ready

134+ tests passing, 100% RGB test vector compatibility. Built for real-world use.

Simple, Powerful API

// 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

134+

Tests Passing

100%

RGB Test Vector Compatible

5

Architecture Stages

13ms

Contract Creation Time

Built for Real-World Applications

🎯 DeFi Applications

Create synthetic assets, stablecoins, and tokenized instruments that run entirely in the browser. No backend required for basic operations.

📱 Mobile Wallets

Lightweight RGB protocol implementation perfect for mobile wallets. Small bundle size with full RGB20 functionality.

🌐 Web3 DApps

Integrate RGB protocol directly into web applications. Create asset management interfaces and trading platforms.

🔧 Developer Tools

Build RGB protocol tools, explorers, and utilities. Full API for contract creation, validation, and management.

Ready to Get Started?

Join the future of RGB protocol development with the most accessible implementation available.