Section 8
Status
What is implemented and verified, and how the SDK behaves at its edges.
8.1Status of each part
| Part | State | Detail |
|---|---|---|
| Policy engine | Implemented | Unit-tested: caps, rolling budget, allow-list, expiry, kill switch. |
| HTTP 402 client and paywall | Implemented | Unit-tested end to end. |
| MCP server | Implemented | Five tools. Has paid on Solana mainnet as a stdio server. |
| Privacy Rings adapter | Verified on mainnet | Real USDC payments, run end to end on Solana mainnet. |
| Wallet page and command line | Live | Create a key, fund it, move USDC into the private balance and back out. Run on Solana mainnet. |
| Paid resource and fee check | Live | This site sells a token price for 0.001 USDC a call, and its paywall refuses a payment without the fee. |
| Package release | Installable | @doei/sdk, with the doei and doei-mcp commands. |
8.2What the tests cover
The unit tests run the real code. They cover:
- The policy engine: the deny rules and their order, the rolling window, holds, and validation.
- Fee arithmetic and amount parsing, including rounding.
- The 402 wire format: challenge parsing, proof formatting, proof signatures.
- The paywall: underpayment, forged and expired nonces, a transfer that never arrived, a bystander replaying someone else's transfer, and double redemption.
- The wallet end to end:
pay,fetch, receipts, kill and revive, state restore. - The MCP tools through their handlers, and the server over an in-memory transport.
- The example files: the dry run executes, and its output is compared with the documentation.
8.3Behaviour to know
| Behaviour | What it means |
|---|---|
| The policy is enforced off-chain | Code that holds the key can bypass it. See Policies. |
| The protocol fee is added by the SDK | No on-chain program requires it. A modified client can pay without it. |
| Addresses are public | Who pays whom is visible. See Privacy model. |
| Payees must be registered | A payment to an address with no shielded address fails with PAYEE_NOT_REGISTERED. |
| One asset per wallet | A wallet spends one token. Use two wallets for two tokens. |
| fetch replays string bodies only | Streams and form data are refused. It retries once. |
| The budget ledger is per process | Two processes sharing a key each count their own spending unless they share state. |
| Receipts are in memory by default | Pass a receipt store, or they are gone on restart. |
| Redeemed proofs are in memory by default | A paywall on more than one instance needs a shared, atomic store. |
| Many small notes | Solana transactions are small. A balance split across many notes may need merging before a larger payment. The adapter does not merge. |
| Finality | The paywall accepts a transfer once its own wallet can see it. It does not wait for a commitment level you choose. |