The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(x402): add README for x402 payment protocol
Steven Enamakel2734ba11810b
diff --git a/crates/openhuman-core/src/web3/x402/README.md b/crates/openhuman-core/src/web3/x402/README.mdindex e608e69199..925517672b 100644--- a/crates/openhuman-core/src/web3/x402/README.md+++ b/crates/openhuman-core/src/web3/x402/README.md@@ -33,9 +33,11 @@ not need a stub. Signatures must match the real ones exactly; `cargo check| File | Role || --- | --- || `mod.rs` | Facade root: feature gate, re-exports (`handle_402`, `handle_402_and_pay`, `try_paid_request`, `X402Client`, `X402Error`, `X402PaymentResult`, `init_ledger`, the controller pair, wire types). |-| `ops.rs` | Thin include-based split (`include!("ops_part_01.rs")` / `ops_part_02.rs`) of the client logic: parse a 402 challenge, build the Solana (`exact` scheme: ComputeBudget limit/price, SPL `TransferChecked`, optional Memo) or EVM (`exact` scheme: EIP-3009 `transferWithAuthorization`) payment, sign, and retry with the proof. |-| `ops_part_01.rs` | `X402Client`/`try_paid_request`, `X402PaymentResult`, `X402Error`, `handle_402`/`handle_402_and_pay`, `PAYMENT-REQUIRED`/`PAYMENT-RESPONSE` header parsing, `wallet_signer` (Solana signer resolution through the wallet module), `build_solana_payment` and `build_evm_payment` (both sign via `modules::wallet::sign_message`). |-| `ops_part_02.rs` | EVM EIP-712 authorization/payload construction (`evm_payment_authorization`, `evm_payment_payload`), `evm_signer` (EVM signer resolution), the Solana instruction builders (ComputeBudget, `TransferChecked`, Memo), and a `cfg(test)`-only local `k256` signer used to check the construction against a fixed vector. |+| `ops.rs` | Facade over submodules under `ops/` (`client.rs`, `errors.rs`, `headers.rs`, `evm_payment.rs`, `solana_payment.rs`) of the client logic: parse a 402 challenge, build the Solana (`exact` scheme: ComputeBudget limit/price, SPL `TransferChecked`, optional Memo) or EVM (`exact` scheme: EIP-3009 `transferWithAuthorization`) payment, sign, and retry with the proof. |+| `ops/client.rs` / `ops/errors.rs` | `X402Client`/`try_paid_request`, `X402PaymentResult`, `X402Error`, `handle_402`/`handle_402_and_pay`, `wallet_signer` (Solana signer resolution through the wallet module), `build_solana_payment` (also in `solana_payment.rs`) and `build_evm_payment`. |+| `ops/headers.rs` | `PAYMENT-REQUIRED`/`PAYMENT-RESPONSE` header parsing. |+| `ops/evm_payment.rs` | EVM EIP-712 authorization/payload construction (`evm_payment_authorization`, `evm_payment_payload`), `evm_signer` (EVM signer resolution), `build_evm_payment` (signs via `modules::wallet::sign_message`), and a `cfg(test)`-only local `k256` signer used to check the construction against a fixed vector. |+| `ops/solana_payment.rs` | The Solana instruction builders (ComputeBudget, `TransferChecked`, Memo) and `build_solana_payment`. || `store.rs` | Append-only JSONL payment ledger (`PaymentLedger`) with per-request/daily/monthly budget enforcement and session/daily/monthly spend summaries; `PaymentRecord`, `PaymentStatus`, `SpendingSummary`, `SpendingBudget`, `BudgetCheck`, the process-global `GLOBAL_LEDGER`, `init_global` (re-exported as `init_ledger`), and `with_ledger`/`with_ledger_mut` accessors. || `schemas.rs` | RPC controller schemas + handlers for the `x402` namespace: `get_summary`, `list_payments`, `update_budget`. || `tools.rs` | `X402RequestTool` (`x402_request`) — purpose-built agent tool for x402 endpoints, as opposed to the generic `http_request` tool's opportunistic 402 fallback. |