extro-402-scheme

Reusable HTTP 402 primitives, typed wire formats, wallet hooks, proof envelopes, and module permissions that any marketplace or exchange module can build on. The Webycash exchange is one such module; extro-402-scheme itself is application-neutral.

Boundary

extrolib owns the rkyv-archived signed wire types: 402 schemes, order requests, proof attachments, module push payloads, and orderbook publication metadata. It does not implement wallet state, UI, referee state machines, or storage.

extro-node owns the reusable runtime: wallet-side primitives, WASM command dispatch, rail adapters, encrypted bearer delivery, fail-to-deliver hooks, ARK 2-of-2 release/refund, PGP identity binding, ZKP proof generation hooks, and capability checks.

This is not a "Webycash DEX inside extro-node". The DEX is a PWA module; the scheme layer is generic.

Reusable scheme families

1

Simple 402 payment

Payment challenge, retry, receipt. Registration, routing, publishing fees, paid actions.

2

Encrypted bearer delivery

Bearer secret delivered plaintext to the local node API or encrypted to a target PGP identity, with ciphertext hash, payload kind, public token hash, and proof binding.

3

Fail-to-deliver

Explicit failure after pre-check: signed failure receipt plus an idempotent holder callback to invalidate/rotate the bearer secret.

4

Order-request 402

Taker/referee requests exact liquidity from a published limit order; the maker returns a ZKP-bound encrypted payload for the exact fill, not arbitrary inventory.

5

ARK 2-of-2 release/refund

Referee partial-signature release, counterparty encrypted partial signature, nonce/session binding, and refund. The referee never holds both sides of the MuSig2 secret path.

6

Proof-attached 402

Carries ZKP proof bytes, public inputs, circuit id/version, verifying-key commitment, and transcript hash; verified against the immutable order and party commitments.

7

Seeder publish fee

0.1% of order value to active seeders (0.01% each across 10). Publication envelope carries fee receipts or a signed failure reason. Fees payable in Webcash or Bitcoin ARK only.

Module permissions

A module runs with capabilities granted by the wallet, not ambient access. Encrypted bearer delivery can target a recipient PGP identity; proof-attached requests bind ciphertext, order id, fill amount, recipient fingerprint, public token hash, and circuit version. The wallet hook for any callback is idempotent by (swap_id, kind, payload_hash).

Push delivery is never proof of processing. State is decided by a signed wallet ack or an independent rail post-check.