Field report

Issuing an RGB20 asset in a browser, with no node and no server

RGB has a cold-start problem that nobody talks about: the official toolchain assumes you already run a node. Want to issue an asset? Run rgb-lightning-node. Want a browser wallet? Run rgb-proxy-server and point at it. Either way, "serverless" ends at the first sentence.

I spent a day proving that assumption wrong. The result is a 340-line frontend that issues real RGB20 assets in a browser — no bitcoind on the client, no Docker, no proxy, no server process of any kind. What follows is the cost of that path: the defaults that don't resolve, the protocol detail nobody documents, and the numbers behind each choice.

Scope correction (2026-12-01): the paragraph above is true for issuance, contract export and offline verification. Moving an asset needs one stateless relay — see the update at the end of this post, where the transfer leg is closed end to end with numbers.

The state of the browser path

@utexo/rgb-sdk-web (MIT, 1.0.0-beta.16) compiles rgb-lib to WASM — 19.7 MB of it, 7.1 MB gzipped. It genuinely runs the full RGB state machine client-side, with wallet state in IndexedDB. So far so good.

The problem is its defaults:

OptionDefaultActually resolves?
indexeresplora-api.utexo.comNXDOMAIN
vssUrlvss-server.utexo.comNXDOMAIN
proxyEndpointUtexo SDK proxyNXDOMAIN

Checked every Utexo runtime subdomain through Cloudflare DoH: esplora-mainnet, esplora-api, esplora-testnet3, esplora-testnet4, lsp-signet, vss-server, api — all Status 3. Only utexo.com, www, and docs still resolve.

So RgbLibWeb.create({ network, mnemonic }) with no other options fails on the first call, and nothing in the error says "DNS". Utexo remains the officially recommended browser vendor, its SDK is still published on npm, and every runtime dependency behind it is gone.

The fix is one line of configuration — but you have to know to write it:

const wallet = await RgbLibWeb.create({
  network: 'regtest',
  mnemonic,
  dataDir: 'zero-server-rgb',
  indexer: { type: 'esplora', url: 'http://127.0.0.1:30000' },
  vssUrl: null,          // omit this and it phones a dead host
})

Why issuance has to be two-phase

With a funded wallet, issueAssetNia() fails:

RgbLibWebError: Insufficient allocations

That is the entire message. No stack hint, no mention of UTXOs. Grepping the .d.ts for createUtxos returns a plain method signature with no comment:

createUtxos(params: {
  upTo?: boolean; num?: number; size?: number; feeRate?: number;
} & Abortable<ReadOptions>): Promise<number>;
The actual requirement: RGB commitments cannot sit on ordinary Bitcoin UTXOs. A UTXO has to be explicitly marked colorable first, which broadcasts a real on-chain transaction, which needs a real confirmation. Only then does issueAssetNia have somewhere to put the seal.

So issuance is inherently two-phase:

// phase 1 — reserve allocations (broadcasts a tx)
await wallet.createUtxos({ upTo: true, num: 1, size: 2000, feeRate: 1 })
// ... wait for a block ...

// phase 2 — issue
const asset = await wallet.issueAssetNia({
  ticker: 'ZSRGB', name: 'Zero Server RGB Demo', precision: 0, amounts: [1000],
})

This is a protocol-level property, not an SDK bug. But the SDK gives you no way to discover it short of reading rgb-lib's source.

What actually ran

contractId : rgb:eZSdtiLn-6Ttqj01-jAby79X-aXJ~nRk-0Egy_x_-5~y96b0
ticker     : ZSRGB    precision 0    issuedSupply 1000
balance    : settled 1000 / future 1000 / spendable 1000

Four consecutive runs, four distinct contract IDs, all clean.

Timings, local electrs:

StepTime
WASM engine ready~1.5 s
First getBtcBalance1.5–2.9 s
Subsequent balance refresh235–356 ms
createUtxos~1 s + 1 block
issueAssetNia< 1 s

Indexers are worse than they look

Before settling on local electrs I stress-tested four public Esplora endpoints at 24-way concurrency:

IndexerPassWall time
blockstream.info/signet24/242,975 ms
mempool.space/signet21/24474 ms
mutinynet21/241,402 ms
mempool.space/testnet421/2465,330 ms

Note the mempool.space oddity: in the browser it reports No 'Access-Control-Allow-Origin' header, yet curl with an explicit Origin: gets ACAO=* back. The cause is that rate-limit error responses omit the CORS header, so the browser surfaces a 429 as a CORS failure. Sequential requests are all 200 — you only see this under burst load. That's why the default ended up on the slower-but-solid endpoint.

Why test networks are the real bottleneck

Every one is dead or walled. signetfaucet.com returns 522. The bublina.eu.org family sits behind Turnstile that never clears — and it's not anti-bot working as intended, it's a broken config:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided
('https://challenges.cloudflare.com') does not match the recipient window's
origin ('https://signet257.bublina.eu.org')

Connecting to 'data:,' violates the following Content Security Policy directive:
"connect-src 'self' https://hagen.challenges.cloudflare.com ..."

The widget's own postMessage target doesn't match the parent origin. cf-turnstile-response stays empty forever. Not solvable client-side.

Regtest is the better answer anyway. Two containers, zero third-party dependencies:

sudo -E docker compose -f docker-compose.yml up -d bitcoin electrs
# electrs serves Esplora REST on :30000 with --cors "*"
CLI="docker exec bitcoin bitcoin-cli -regtest -rpcuser=admin1 -rpcpassword=123"
$CLI createwallet test
$CLI generatetoaddress 101 "$($CLI -rpcwallet=test getnewaddress '' bech32m)"

Two gotchas there: regtest addresses are bcrt1… not tb1p… (same mnemonic, different prefix — the rest of the address matches), and electrs hangs on waiting for bitcoind sync to finish: 0/0 blocks on an empty chain until you mine at least one block.

API shapes an integration has to absorb

  1. listUnspents() puts colorable inside the nested utxo object, not at the top level.
  2. listAssets() returns {nia, ifa, cfa, uda, bfa}, not an array.
  3. A new browser context = new IndexedDB = empty asset list, even though the on-chain commitment is still there (the colored balance still shows). Cross-session persistence needs launchPersistentContext or a consignment import.
  4. Vite must exclude the SDK packages from optimizeDeps or esbuild mangles the WASM load.
  5. generateKeys() returns the mnemonic but doesn't put it anywhere — you have to write it into your UI yourself.
  6. getBtcBalance() returns {vanilla, colored}, each with {settled, future, spendable}. colored is the RGB-bearing UTXO value, not the asset balance — those are separate.

Update, 2026-12-01: the transfer leg is closed

The paragraph that used to sit here said the gap between "can issue" and "can send" was consignment import/export. That gap is now closed, so this section is a receipt rather than a wish list.

A full A→B transfer runs inside the page: invoice → send → two refreshes → Settled on both sides, then a 713-byte transfer consignment exported on either side and checked with validateConsignmentOffchain — no wallet, no indexer, no network. Receipts: txid 4a8bed7fea321cb59c61e52f93995ff41fe04b9bd31ff7f1956dbd659074afdc, asset rgb:57pSd_ph-qz0Bo66-Jr59DMW-VdAb6uL-OByMnOm-RqqHkU0 (supply 1000), sender settled at 700, receiver at 300, consignment rgb:csg:x3VLvHkT-lMDyMgr-zD6iK9b-SPU2PnY-biGiCz8-0cHOc6s#field-polka-legalcontract, verdict {"valid":true,"warnings":[]}. The inspected proof shows one Transfer transition with inputs [{Fungible: 1000}] and outputs [{Fungible: 700}, {concealed: 300}] — the receiver's amount is blinded and still provable by him alone.

The one correction to the earlier claim. "No bitcoind, no Docker, no proxy, no server" was true for issuance, contract export and offline verification. A transfer needs exactly one stateless relay: the sender drops the consignment, the receiver collects it and returns an acknowledgement, the sender broadcasts. It holds no keys and can move nothing. Upstream already ships it as rgb-proxy-server (MIT, TypeScript, RGB JSON-RPC protocol 1.0), and a public instance answers at rpcs://pixelox.top/rgb-proxy/json-rpc. So the honest sentence is: one shared stateless relay, not per-application infrastructure.

Five errors met on the way, in the order they hurt:

  1. Asset ID is required — an invoice built without assetId is asset-agnostic by design, so onchainSend needs the asset passed explicitly.
  2. Insufficient bitcoin funds: needed '2000', available '0' from blindReceive — an allocations error wearing a funds error's clothes; a blinded receive reserves a colorable UTXO and a fresh one needs a confirmation.
  3. WalletTransfer has no assetId, so getConsignment(assetId, txid) has to be probed against listAssets().
  4. Sender expiry must satisfy expiry ≤ invoice expiry − 600 s, and the relay's RETENTION_GRACE_SECS must stay ≥ 86400 or receivers NACK.
  5. Cannot find module 'json-rpc-2.0' on a production install — upstream lists it as a dev dependency while dist/ requires it at runtime.

Deployment notes for anyone self-hosting the relay: set MAX_POW_DIFFICULTY=0 when clients are browsers (the default of 24 burns a minute of CPU per request), raise client_max_body_size and the proxy read timeout, and point proxyEndpoint at your own instance instead of the SDK default, which currently does not resolve.

What's still missing

RGB21/NFT (issueAssetIfa exists, no UI), lightning (rgb-lightning-node is the right path for actual RGB payments — this build is on-chain only), and the ergonomics of consignment import: the API to verify a blob now exists in rgb-lib-wasm, but nothing in the JS SDK class wraps it, so every integrator writes that glue by hand. That wrapper is the single highest-value addition left.

Why this matters for the ecosystem

At the Turin hackathon in October (400+ applicants, 24 finalist teams, "Agentic Dollars on Bitcoin"), all ten finalists were applications. Zero developer infrastructure, zero documentation projects. That's a rational response to judging criteria that weigh "does it still work after Sunday" — but it means everyone building the next RGB app has to rediscover the dead DNS and the Insufficient allocations wall for themselves.

The whole thing is about 340 lines of frontend plus a WASM blob. It's not a product. It's the floor that should have already existed.


The issuer described here is live at pixelox.top/rgb. Source, regtest scripts and the raw measurements ship alongside it.