← 0penw0rld / DOCUMENTATION
INTRODUCTION

0penw0rld is a decentralized ecosystem built on Bitcoin Cash. Zero central server, zero custody, zero borders. Every app runs directly in the browser, peer-to-peer.

All private keys stay in your browser or on your hardware wallet. No data is sent to third parties. BCH transactions are broadcast directly to the network via public relays.

No account. No server. No KYC. Your private key = your identity.
ARCHITECTURE

0penw0rld is a Progressive Web App (PWA) made of static HTML/JS files. No backend required — everything works offline once installed.

// Tech stack Frontend : HTML5 + Vanilla JS (no framework) Crypto : @noble/curves 1.8.1 (secp256k1, X25519) + @noble/hashes 1.7.1 Hardware : WebHID (Ledger APDU protocol) Chat : BCH OP_RETURN via Fulcrum/Electrum WebSocket Mesh : Nostr relays (NIP-04 encrypted DMs) DEX : Cauldron AMM (indexer.riften.net) Cache : Service Worker (cache-first, offline-ready) Storage : localStorage (AES-GCM vault, PBKDF2 200k iterations)
ComponentRoleSource
@noble/curves 1.8.1secp256k1 ECDSA + X25519 ECDHesm.sh
@noble/hashes 1.7.1SHA256, SHA512, RIPEMD160, HMACesm.sh
FulcrumUTXO index, BCH history, TX broadcastbch.imaginary.cash, electroncash.de
Nostr relays00 Mesh real-time messaging (NIP-04)relay.damus.io, nos.lol
CauldronBCH token exchange (AMM)indexer.riften.net
THORChainCross-chain swaps (00 Pay)midgard.ninerealms.com
Service WorkerOffline cache, PWA installsw.js
APPLICATIONS
00 CHAT

Chat uses the CCSH (Cash Chat Secure Hub) protocol to exchange encrypted messages directly on the BCH blockchain. Each message is embedded in an OP_RETURN output (max 220 bytes) and sent as a BCH transaction to the recipient's address with a dust output (546 sats). Inbox scanning is done via Fulcrum/Electrum WebSocket every 10 seconds.

Each message generates a fresh ephemeral X25519 keypair for forward secrecy. The ephemeral private key and recipient's public key derive a shared secret via ECDH. The AES key is SHA-256(shared_secret), then the plaintext is encrypted with AES-256-GCM (12-byte random IV, 128-bit auth tag).

// Per-message encryption (ephemeral key → forward secrecy) eph_priv = random(32 bytes) eph_pub = X25519.getPublicKey(eph_priv) shared = X25519(eph_priv, recipient_pubkey) aes_key = SHA-256(shared) iv = random(12 bytes) ciphertext = AES-256-GCM(aes_key, iv, plaintext) // CCSH v1 packet → BCH OP_RETURN transaction chunk = eph_pub(32) || iv(12) || ciphertext+tag packet = CCSH_MAGIC(4) + ver(1) + type(1) + flags(1) + msg_id(16) + sender_pub(32) + chunk_meta(6) + chunk tx = P2PKH(546 sats → recipient) + OP_RETURN(packet)
00 WALLET

Non-custodial BCH wallet with three access modes:

  • 01
    Hardware (Ledger) — WebHID connection. Full BIP44 address scan (gap limit 5). Private key never leaves the device.
  • 02
    Imported seed — BIP39 mnemonic (12+ words) or 64-char hex seed. Derived via BIP44 m/44'/145'/0'/0/0.
  • 03
    New key — Generated via WebCrypto (CSPRNG). Displayed once for backup.

UTXOs are retrieved via Fulcrum/Electrum over WebSocket. Transaction construction and broadcasting are done entirely client-side.

00 PAY

Fast payment interface. Supports CashAddr (bitcoincash:q…), QR codes, and THORChain cross-chain sends (BCH → BTC, ETH, USDT…). Ledger compatible.

LEDGER On 00 Pay, the public key is read directly from the device. Signing is done on-device — the private key never transits. Note: Ledger's BCH app rejects OP_RETURN outputs, so cross-chain THORChain swaps require a software wallet.
THORCHAIN The SEND tab lets you swap BCH to any THORChain-supported asset (BTC, ETH, USDT…) via memo-based routing to the THORChain vault. Rates from Midgard API (midgard.ninerealms.com). Software wallet only.
00 DEX

Decentralized exchange powered by Cauldron AMM for native BCH ↔ CashTokens swaps. Pool data, TVL and prices are fetched from the Cauldron indexer. Swap execution redirects to the Cauldron app. Cross-chain swaps (BCH ↔ BTC, ETH…) are handled separately in 00 Pay via THORChain.

SourcePairsEndpoint
Cauldron AMMBCH ↔ CashTokensindexer.riften.net
LEDGER INTEGRATION

0penw0rld natively supports Ledger Nano S, Nano X, Nano S+, Stax, Flex and Apex P via WebHID (Chrome/Edge only).

PREREQUISITE Open the Bitcoin Cash app on the Ledger before connecting.

Communication uses the Ledger APDU protocol encapsulated in 64-byte HID packets:

// APDU instructions used (INS) 0x40 GET_WALLET_PUBLIC_KEY → pubKey + CashAddr + chainCode 0x44 HASH_TX_INPUT_START → stream inputs (BIP143 mode) 0x4a HASH_TX_INPUT_FINALIZE → stream outputs 0x48 HASH_SIGN → sign + return DER signature

The ledger.js file exposes a public API:

Ledger.connectLedger() → device WebHID Ledger.getLedgerPubKey(dev, path) → { pubKey, addrRaw, chainCode } Ledger.signLedgerTx(dev, utxos, outputs, scripts, paths) → [DER+0x41] Ledger.buildLedgerTx(utxos, sigs, pubKeys, outputs) → hex tx
BIP44 ADDRESS SCANNING

A Ledger BCH wallet can have funds spread across dozens of addresses (path m/44'/145'/0'/0/k). 0penw0rld automatically scans all used addresses.

// Scan algorithm 1. Retrieve xpub at m/44'/145'/0' (account level) 2. Derive child keys locally via BIP32 (no Ledger contact needed) child_k = BIP32_normal_child(xpub, chainCode, k) 3. Scan external (change=0) k=0..49 + change (change=1) k=0..49 4. Gap limit = 5 (stop after 5 consecutive empty addresses) 5. Aggregate all UTXOs from found addresses

Each UTXO is tagged with its derivation path and public key. During a transaction, each input is signed with the correct Ledger path.

In practice, a wallet with 42+ used addresses (real case: ~87 BCH) is fully supported — the scan takes a few seconds.
CCSH PROTOCOL

CCSH (Cash Chat Secure Hub) is the 0penw0rld messaging protocol. Messages are encrypted end-to-end and embedded in BCH OP_RETURN transactions (max 220 bytes), sent directly to the recipient's BCH address. Inbox scanning uses Fulcrum/Electrum WebSocket indexers. 00 Mesh uses Nostr relays as a separate real-time transport.

LayerTechnologyRole
TransportBCH OP_RETURN (220 bytes max)On-chain encrypted messages to recipient BCH address
IndexingFulcrum/Electrum (WebSocket)UTXO queries + TX scanning every 10s
Keyssecp256k1 (BCH) + X25519 (messaging)BCH signing + E2E encryption
ECDHX25519 (ephemeral per message)Shared secret derivation with forward secrecy
EncryptionAES-256-GCM (12-byte IV, 128-bit tag)Message confidentiality + integrity
KDFSHA-256(shared_secret)AES key from ECDH shared secret
ChunkingCCSH v1 packetsSplit large messages across multiple OP_RETURN TXs
// CCSH v1 packet format (61-byte header + payload) MAGIC : 0x43435348 ("CCSH") VERSION : 0x01 MSG_TYPE : 0x01 = DM | 0x02 = ADDR_CHANGE (identity rotation) FLAGS : 1 byte (reserved) MSG_ID : 16 bytes random (links chunks together) SENDER_PUB : 32 bytes (X25519 public key) CHUNK_IDX : 2 bytes — current chunk index CHUNK_TOTAL : 2 bytes — total chunks for this message CHUNK_LEN : 2 bytes — payload length PAYLOAD : eph_pub(32) + iv(12) + ciphertext + tag(16)
BITCOIN CASH

0penw0rld uses Bitcoin Cash (BCH) as the native currency for payments, fees, and on-chain identity.

// BCH parameters Network : mainnet Coin type : 145 (BIP44: m/44'/145'/0'/0/k) Addresses : CashAddr (bitcoincash:q…) Sighash : SIGHASH_ALL | FORKID (0x41) Script : P2PKH standard UTXO provider : Fulcrum (Electrum protocol over WebSocket)

Transaction fees are estimated at 2 sat/byte (minimum 300 sats). Size estimation: 148 bytes/input + 34 bytes/output + 10 bytes overhead. Transaction construction follows the BIP143 format (segwit-like sighash for BCH REPLAY protection).

PRIVACY

0penw0rld is designed to minimize metadata and maximize privacy:

  • No account — no email, no password, no server-side stored profile.
  • No tracker — no analytics, no third-party cookies, no proprietary CDN (except Google Fonts).
  • Local keys — private keys never leave the browser (or the Ledger).
  • Open source — all code is directly auditable from DevTools.
  • Offline-first — installable as a PWA, functional without connection for local operations.
For maximum privacy on BCH transactions, use CashFusion before sending funds via 00 Wallet.
CCSH_PROTOCOL_V1  ·  X25519_ECDH  ·  AES256_GCM  ·  OP_RETURN  ·  BCH_MAINNET  ·  LORA_MESH  ·  ZERO_SERVERS  ·  ZERO_TRUST  ·  CASHFUSION_READY  ·  END_TO_END  ·  LEDGER_HW_READY  ·  WEBHID_TRANSPORT  ·  BIP44_SCAN  ·  CCSH_PROTOCOL_V1  ·  X25519_ECDH  ·  AES256_GCM  ·  OP_RETURN  ·  BCH_MAINNET  ·  LORA_MESH  ·  ZERO_SERVERS  ·  ZERO_TRUST  ·  CASHFUSION_READY  ·  END_TO_END  ·  LEDGER_HW_READY  ·  WEBHID_TRANSPORT  ·  BIP44_SCAN  ·