Skip to content

Frank & Cashweb Developer Guide ​

Welcome to Frank & Cashweb: High-assurance, self-custodial, end-to-end encrypted direct messaging and autonomous financial coordination.


1. What is Frank? ​

Conventional communication networks—including Telegram, Signal, WhatsApp, and Discord—fundamentally compromise user sovereignty by gating access behind phone numbers, carrier SIM cards, SMS verification codes, email addresses, and centralized account registries. This forces users into surveillance regimes, telecommunication databases, and SIM-swap vulnerabilities where accounts can be arbitrarily banned, censored, or deanonymized.

Frank eliminates personal identifying information (PII) entirely. There is no registration form, no phone number prompt, no email verification, and no central database of accounts. Identities are self-sovereign mathematical keypairs derived locally and offline on your own device.

The Economic Principle: Free Speech Is Not Free ​

Early internet protocols (SMTP for email, Usenet for discussion, XMPP for chat) were designed as open, federated networks without central authorities. Yet today, over 85% of email and virtually all consumer messaging are concentrated inside a handful of centralized corporate platforms.

This centralization was not an accident; it was an economic inevitability:

  1. The Asymmetric Cost Structure: In zero-cost messaging, the marginal cost to transmit a message is ~$0, while the cost to receive, process, and filter spam is borne entirely by the recipient and the server operator.
  2. The Inevitability of Gatekeepers: Because open networks could not stop automated spam without filtering, users fled to centralized platforms that could afford massive machine-learning filters—at the price of total surveillance, algorithmic control, and arbitrary account de-platforming.

For communication to be genuinely free—free as in liberty, unmoderated, and self-sovereign—it cannot be free of charge. When speaking carries zero economic cost, botnets, Sybil farms, and rage-bait algorithms dominate the conversation. Frank replaces gatekeepers with economic physics:

  • Direct Messages (Paid Delivery): Every direct message carries an on-chain stamp transaction that pays the recipient directly via derived one-time stealth addresses. Senders compensate recipients for their attention, eliminating cold unsolicited spam at the source.
  • Public Topics & Governance (Proof-of-Burn): Public broadcast posts and community votes burn native value to an unspendable burn address, giving provable, non-falsifiable economic weight to public discourse without requiring centralized moderators.

Frank is an open protocol and decentralized communication system that combines:

  1. Zero-PII Sovereign Cryptographic Identity: Every user is an autonomous cryptographic actor. Handles like alice@domain.org map to self-sovereign directory attestations signed by the user's root authority key, with zero central account authorities.
  2. Economic Anti-Spam via Stamps & Burns: Speaking carries verifiable economic stakes. Direct messages pay recipients via one-time stealth keys; public topic posts and votes burn value.
  3. Dual-Key Stealth Address Protocol (DKSAP): Message envelopes and payment transactions leverage stealth address derivation on secp256k1, ensuring mathematical unlinkability between senders and recipients.
  4. Deterministic CBOR (FRNK v1): All wire payloads, directory statements, and topic records are encoded with canonical, deterministic CBOR with strict byte-level invariants and zero ambiguous floating-point or integer encodings.
  5. Dual-Protocol Routing (SRV + MX): A unified identifier (e.g. alice@domain.com) resolves to a high-speed Frank relay over DNS SRV and falls back to traditional SMTP email via standard MX records and an automated bidirectional mail gateway.
  6. Censorship-Resistant Federated Relay Mesh: Relays run either as zero-dependency standalone binaries or horizontally clustered nodes, providing open store-and-forward routing with no centralized gatekeepers.
  7. Ambient Privacy & Graph Entropy: Rather than forcing users into conspicuous mixer pools (e.g. Tornado Cash) which attract regulatory blacklisting and negative taint, Frank's automated UTXO/EVM wallet mixing operates through standard peer-to-peer gas transfers. This creates positive privacy externalities ("herd privacy") across the entire blockchain.

2. Core Architecture Overview ​


3. Cryptographic Roles & Multichain Key Derivation ​

To guarantee that compromising an active messaging session, a change address, or viewing public on-chain transactions never compromises the root identity, Frank wallets implement a two-tier derivation architecture: HKDF Domain Root Isolation (frank-domain-roots-v1) followed by role-specific and chain-specific BIP-44 path derivations.

Protocol Identity & Messaging Roles ​

The three core protocol roles govern identity assertions, end-to-end encrypted messaging, and canonical direct-message stamp payments:

RoleNamePurposeHKDF Domain RootDerivation Path
PPIdentity AuthoritySigns public directory assertions, key transitions, and account credentials. Never used for ECDH, message encryption, or funding transactions.Purpose 5: identity-authenticationm/44'/60'/1'/0/0
MMMailbox & DM KeyPerforms Diffie-Hellman key exchange for direct-message encryption and authenticates inbox access.Purpose 4: messaging-encryptionm/44'/60'/4'/0'/{g}'
P′P'Stamp Receipt KeyServes as the public base point for recipient-controlled stealth payment addresses on the canonical EVM/Monad rail.Purpose 2: evm-walletm/44'/60'/2'/0'/{g}'

NOTE

The protocol roles use coin type 60' because Frank's identity directory attestations and canonical anti-spam stamp settlement rail run natively on EVM (Monad).

Multichain Spending & Change Derivations ​

For actual on-chain asset transfers, balances, and autonomous wallet hygiene, Frank derives chain-specific accounts from independent domain roots using their respective BIP-44 coin types:

Chain FamilyCoin TypeSub-Account (Spend) PathInternal Change PathCurve / Algorithm
Monad / EVM60'm/44'/60'/0'/0/{i}m/44'/60'/0'/1/{k}secp256k1
eCash / BCH1899'm/44'/1899'/0'/0/{i}m/44'/1899'/0'/1/{k}secp256k1
Solana501'm/44'/501'/0'/0'/{i}'m/44'/501'/0'/1'/{k}'ed25519 (hardened)

Domain Root Isolation (frank-domain-roots-v1) ​

Before any BIP-44 path derivation occurs, the master account root secret (backed by a Codex32 recovery phrase) is cryptographically partitioned via HKDF-SHA256 (RFC 5869) into independent 32-byte domain roots:

  1. identity-authentication → Authority key PP
  2. messaging-encryption → Mailbox and direct-message keys MM
  3. evm-wallet → Monad spend pool and stamp receipt base P′P'
  4. ecash-bch-wallet → eCash and BCH UTXO spend and change pools
  5. solana-wallet → Solana Ed25519 signing and change pools

Because domain roots are non-invertible, mathematical compromises or leaked signatures on an external chain (e.g. Solana or eCash) have zero theoretical leakage into the messaging key or root identity.


4. Repository Structure ​

The Frank monorepo is organized into specialized TypeScript packages and high-performance Rust daemons:

frank/
├── backend/
│   └── cashweb/
│       ├── cashwebd/         # Production Rust relay server daemon
│       ├── frank-cbor/       # Zero-copy Rust deterministic CBOR parser
│       └── cashweb-registry/ # Directory & chain registry storage
├── packages/
│   ├── frank-codec/          # TypeScript reference CBOR encoder/decoder
│   ├── cashweb/              # Client SDK for relays and direct messaging
│   ├── wallet/               # Unified EVM + UTXO wallet and DKSAP engine
│   ├── crypto-box/           # AEAD encryption, ECDH, and key encapsulation
│   ├── nakamoto/             # Typed UTXO chain primitives (BTC, BCH, XEC, XPI)
│   ├── bot-framework/        # Headless bot framework, directory renewal & sequencing
│   ├── bot/                  # Autonomous bots (Qwen AI, Blackjack, Raffle, Faucet)
│   ├── mail-gateway/         # SMTP/MIME to Frank bidirectional bridge
│   ├── codex32/              # Checksummed BIP-93 secret sharing & master recovery
│   └── docs/                 # VitePress documentation portal
└── docs/                     # Formal protocol specifications and CDDL schemas

5. Quick Start & Development ​

Prerequisites ​

  • Node.js >= 20 (recommended: Node 22+)
  • Yarn v1.22.x
  • Rust toolchain (stable cargo and rustc)

Install Dependencies ​

bash
yarn install

Run Type Checking ​

bash
yarn typecheck:fast

Run Protocol Tests ​

bash
# TypeScript CBOR codec tests
yarn workspace @frank/codec test

# Rust zero-copy CBOR parser tests
cargo test --manifest-path backend/cashweb/frank-cbor/Cargo.toml

Launch Documentation Portal Locally ​

bash
yarn docs:dev

Open http://localhost:5173 in your browser.

Frank & Cashweb High-Assurance Protocol Documentation