Home/RGB++ Examples & Use Cases
Implementation Examples

RGB++ Examples & Use Cases

Explore practical, real-world RGB++ Protocol implementation examples including UDT operations, cross-chain transfers, and asset management workflows.

UDT Issuance
Complete example of issuing RGB++ tokens
// Example code for UDT Issuance
import { RgbppSDK } from 'rgbpp-sdk';
import { CCC } from '@nervosnetwork/ckb-sdk-core';

async function issueUDT() {
  const sdk = new RgbppSDK({
    btcAssetsApiToken: process.env.BTC_ASSETS_API_TOKEN,
    network: 'testnet'
  });

  const udtInfo = {
    name: 'My RGB++ Token',
    symbol: 'MRT',
    decimals: 8,
    totalSupply: '21000000'
  };

  const result = await sdk.issueUDT(udtInfo);
  console.log('UDT issued:', result);
}

issueUDT();

Key Features

  • • Token creation with metadata
  • • Initial distribution setup
  • • Bitcoin UTXO binding
UDT Transfer
Bitcoin-based RGB++ asset transfers
// Example code for UDT Transfer
import { RgbppSDK } from 'rgbpp-sdk';

async function transferUDT() {
  const sdk = new RgbppSDK({
    btcAssetsApiToken: process.env.BTC_ASSETS_API_TOKEN,
    network: 'testnet'
  });

  const transferParams = {
    udtId: 'your-udt-id',
    fromAddress: 'sender-bitcoin-address',
    toAddress: 'receiver-bitcoin-address',
    amount: '1000000' // 0.01 tokens (8 decimals)
  };

  const result = await sdk.transferUDT(transferParams);
  console.log('Transfer completed:', result);
}

transferUDT();

Transfer Features

  • • Secure asset movement
  • • Bitcoin anchoring
  • • RGB++ protocol compliance