# Raxol Payments v0.2.0 - Table of Contents

> Autonomous payment capabilities for Raxol agents. Xochi cross-chain
intent settlement, x402/MPP auto-pay, wallet management, and spending controls.

## Pages

- [Raxol Payments](readme.md)

## Modules

- [Raxol.Payments](Raxol.Payments.md): Autonomous payment capabilities for Raxol agents.
- [Raxol.Payments.Accounting](Raxol.Payments.Accounting.md): Reads the settlement-accounting deployment contract from the environment.
- [Raxol.Payments.Actions.Payments](Raxol.Payments.Actions.Payments.md): Payment actions for AI agents.
- [Raxol.Payments.Actions.Payments.CreateMandate](Raxol.Payments.Actions.Payments.CreateMandate.md): Agent Action that issues a Xochi delegation envelope from the
caller's wallet to a specified agent wallet.

- [Raxol.Payments.Actions.Payments.ExecuteDepositRoute](Raxol.Payments.Actions.Payments.ExecuteDepositRoute.md): Fetch and verify a Tron-origin cross-chain deposit-route quote.
- [Raxol.Payments.Actions.Payments.ExecuteRelayTransfer](Raxol.Payments.Actions.Payments.ExecuteRelayTransfer.md): Agent Action that initiates a Tron cross-chain transfer through the Relay rail.
- [Raxol.Payments.Actions.Payments.ExecuteXochiIntent](Raxol.Payments.Actions.Payments.ExecuteXochiIntent.md): Agent Action that runs a cross-chain (and optionally stealth) Xochi intent.
- [Raxol.Payments.Actions.Payments.GetQuote](Raxol.Payments.Actions.Payments.GetQuote.md)
- [Raxol.Payments.Actions.Payments.GetWalletInfo](Raxol.Payments.Actions.Payments.GetWalletInfo.md)
- [Raxol.Payments.Actions.Payments.ListHistory](Raxol.Payments.Actions.Payments.ListHistory.md)
- [Raxol.Payments.Actions.Payments.ListMandates](Raxol.Payments.Actions.Payments.ListMandates.md): Agent Action that lists Xochi delegation envelopes stored locally,
filtered by whether the calling wallet is the issuer (`member`) or
the addressee (`agent`).

- [Raxol.Payments.Actions.Payments.PollRelayStatus](Raxol.Payments.Actions.Payments.PollRelayStatus.md): Agent Action that polls a Relay (Tron) transfer until it reaches a terminal
status.
- [Raxol.Payments.Actions.Payments.PollXochiStatus](Raxol.Payments.Actions.Payments.PollXochiStatus.md): Agent Action that polls a Xochi intent until it reaches a terminal status.
- [Raxol.Payments.Actions.Payments.RevokeMandate](Raxol.Payments.Actions.Payments.RevokeMandate.md): Agent Action that locally deletes a stored Xochi Mandate envelope.
- [Raxol.Payments.Actions.Payments.SpendingStatus](Raxol.Payments.Actions.Payments.SpendingStatus.md)
- [Raxol.Payments.Actions.Payments.Transfer](Raxol.Payments.Actions.Payments.Transfer.md): Agent Action that AUTHORIZES an explicit same-chain transfer to an address.
- [Raxol.Payments.Actions.SpendGate](Raxol.Payments.Actions.SpendGate.md): Single spending choke point for payment Actions.
- [Raxol.Payments.Assets](Raxol.Payments.Assets.md): Asset decimals registry.
- [Raxol.Payments.Assets.UsdcDomains](Raxol.Payments.Assets.UsdcDomains.md): Per-chain USDC EIP-712 domain `name` and `version` values.
- [Raxol.Payments.ChainReader](Raxol.Payments.ChainReader.md): Read-only, multi-chain on-chain reader used by the settlement accounting and
rebalance advisor: fetch a transaction receipt (to price the gas a fill burned)
and read a native/token balance (to size a refuel).
- [Raxol.Payments.ChainReader.JSONRPC](Raxol.Payments.ChainReader.JSONRPC.md): `Req`-backed `Raxol.Payments.ChainReader` over per-chain JSON-RPC endpoints.
- [Raxol.Payments.ChainReader.Stub](Raxol.Payments.ChainReader.Stub.md): Deterministic in-memory `Raxol.Payments.ChainReader` for tests.
- [Raxol.Payments.Checkpoint](Raxol.Payments.Checkpoint.md): Durable idempotency record for an in-flight payment intent.
- [Raxol.Payments.Checkpoint.ContextStore](Raxol.Payments.Checkpoint.ContextStore.md): `Raxol.Payments.Checkpoint` store backed by `Raxol.Agent.ContextStore`.
- [Raxol.Payments.Checkpoint.ETS](Raxol.Payments.Checkpoint.ETS.md): ETS-backed `Raxol.Payments.Checkpoint` store.
- [Raxol.Payments.Confirm](Raxol.Payments.Confirm.md): Built-in confirmation callbacks for `Raxol.Payments.Req.AutoPay`'s
`:on_confirm` option.
- [Raxol.Payments.Deployment](Raxol.Payments.Deployment.md): Runtime deployment detection for fund-moving defaults.
- [Raxol.Payments.Directive.Pay](Raxol.Payments.Directive.Pay.md): Semantic payment directive.
- [Raxol.Payments.EIP712](Raxol.Payments.EIP712.md): EIP-712 typed-structured-data hashing.
- [Raxol.Payments.EchoServer](Raxol.Payments.EchoServer.md): Self-pay x402 endpoint for validating the AutoPay stack end-to-end.
- [Raxol.Payments.Failure](Raxol.Payments.Failure.md): Normalized payment failure surfaced to the caller (agent, LLM, or human).
- [Raxol.Payments.Headers](Raxol.Payments.Headers.md): Shared HTTP header utilities for payment protocol implementations.

- [Raxol.Payments.Ledger](Raxol.Payments.Ledger.md): ETS-backed spend tracking for agent payment operations.
- [Raxol.Payments.Mandate](Raxol.Payments.Mandate.md): Xochi delegation envelope: an EIP-712-signed authorization from a
Xochi Member to a specific agent wallet, scoped to particular
endpoints with a budget.
- [Raxol.Payments.Mandate.Check](Raxol.Payments.Mandate.Check.md): Select the best Mandate envelope from the Store for a given scope
and agent wallet.
- [Raxol.Payments.Mandate.Store](Raxol.Payments.Mandate.Store.md): Local holder for Xochi Mandate envelopes.
- [Raxol.Payments.PolicyGate](Raxol.Payments.PolicyGate.md): Single source of truth for non-budget policy checks.
- [Raxol.Payments.Poll](Raxol.Payments.Poll.md): Shared status-polling engine for cross-chain settlement.
- [Raxol.Payments.Prices.CoinGecko](Raxol.Payments.Prices.CoinGecko.md): A `price_fn` for native gas tokens, backed by the public CoinGecko REST API.
- [Raxol.Payments.Prices.Static](Raxol.Payments.Prices.Static.md): A `price_fn` backed by a fixed symbol -> USD map, for tests and for runs where
the operator supplies prices out of band.
- [Raxol.Payments.PrivacyTier](Raxol.Payments.PrivacyTier.md): Maps trust scores to privacy tiers, fees, and settlement targets.
- [Raxol.Payments.Protocol](Raxol.Payments.Protocol.md): Behaviour for payment protocol implementations.
- [Raxol.Payments.Protocols.MPP](Raxol.Payments.Protocols.MPP.md): Machine Payments Protocol client (Stripe/Tempo).
- [Raxol.Payments.Protocols.Permit2](Raxol.Payments.Protocols.Permit2.md): Permit2 `PermitWitnessTransferFrom` signing for Riddler's `/order`
endpoint.
- [Raxol.Payments.Protocols.Riddler](Raxol.Payments.Protocols.Riddler.md): Riddler cross-chain intent solver protocol.
- [Raxol.Payments.Protocols.X402](Raxol.Payments.Protocols.X402.md): x402 payment protocol client (Coinbase/Linux Foundation).
- [Raxol.Payments.Protocols.Xochi](Raxol.Payments.Protocols.Xochi.md): Xochi private execution protocol.
- [Raxol.Payments.Pxe.Client](Raxol.Payments.Pxe.Client.md): JSON-RPC 2.0 client for the pxe-bridge.
- [Raxol.Payments.Pxe.Schemas](Raxol.Payments.Pxe.Schemas.md): Request/response schemas for the pxe-bridge JSON-RPC API.
- [Raxol.Payments.RebalanceAdvisor](Raxol.Payments.RebalanceAdvisor.md): Recommends -- never executes -- solver treasury moves from a
`Raxol.Payments.RebalancePolicy`, current balances, and per-chain native drain
(from `Raxol.Payments.SettlementLedger`). raxol cannot move the solver's funds
(Riddler owns the wallet), so this produces a recommendation list an operator or
the Riddler rebalancer acts on.
- [Raxol.Payments.RebalanceMonitor](Raxol.Payments.RebalanceMonitor.md): Periodically runs `Raxol.Payments.RebalanceAdvisor` against the solver's live
balances and the `SettlementLedger` drain, emitting recommendations (via the
advisor's telemetry + logs). Recommend-only: raxol cannot move the solver wallet;
the Riddler auto-rebalancer executes.
- [Raxol.Payments.RebalancePolicy](Raxol.Payments.RebalancePolicy.md): Per-chain solver treasury policy: native gas floors/targets, per-asset inventory
floors/targets, asset tiers, gas-refuel source preference, and per-destination-tier
minimum notionals.
- [Raxol.Payments.Relay](Raxol.Payments.Relay.md): High-level facade over `Raxol.Payments.Relay.Client` for the Tron rail.
- [Raxol.Payments.Relay.Broadcaster](Raxol.Payments.Relay.Broadcaster.md): Behaviour for funding a Relay deposit by broadcasting an on-chain token
transfer to the Riddler-managed deposit address (the "B" backstop, used when
the gasless pull is unavailable; see axol-io/Riddler#120).
- [Raxol.Payments.Relay.Broadcaster.InMemory](Raxol.Payments.Relay.Broadcaster.InMemory.md): Deterministic in-memory `Raxol.Payments.Relay.Broadcaster` for tests.
- [Raxol.Payments.Relay.Client](Raxol.Payments.Relay.Client.md): Client for Riddler's Relay API: the Tron cross-chain rail.
- [Raxol.Payments.Relay.Schemas](Raxol.Payments.Relay.Schemas.md): Request and response shapes for Riddler's Relay API (the Tron cross-chain
rail). Distinct from the Xochi schemas: Relay is deposit-address based (no
client signature), supports Tron and EVM addresses, and uses its own field
names (`can_fill`, `to_amount`, `deposit_address`, status
`pending|executing|confirming|completed|failed`).

- [Raxol.Payments.Req.AgentPlugin](Raxol.Payments.Req.AgentPlugin.md): Builds a Req plugin function for use with `Raxol.Agent.Backend.HTTP`.
- [Raxol.Payments.Req.AutoPay](Raxol.Payments.Req.AutoPay.md): Req plugin that transparently handles HTTP 402 Payment Required responses.
- [Raxol.Payments.Req.Mandate](Raxol.Payments.Req.Mandate.md): Req plugin that attaches a Xochi delegation envelope to outbound
requests bound for Xochi endpoints.
- [Raxol.Payments.Riddler.Client](Raxol.Payments.Riddler.Client.md): Elixir client for the Riddler Commerce API.
- [Raxol.Payments.Riddler.Schemas](Raxol.Payments.Riddler.Schemas.md): Request/response schemas for the Riddler Commerce API.
- [Raxol.Payments.Router](Raxol.Payments.Router.md): Selects the optimal payment protocol based on transfer requirements.
- [Raxol.Payments.Secret](Raxol.Payments.Secret.md): An opaque wrapper around sensitive bytes (a private key) that refuses to
reveal itself through `Inspect`, logging, or string interpolation.
- [Raxol.Payments.SettlementAccountant](Raxol.Payments.SettlementAccountant.md): Subscribes to `[:raxol, :payments, :xochi, :settled]` and books each completed
settlement into a `Raxol.Payments.SettlementLedger`.
- [Raxol.Payments.SettlementLedger](Raxol.Payments.SettlementLedger.md): ETS-backed post-settlement P&L ledger: one entry per completed cross-chain fill,
recording the fee collected (in the fee token) against the native gas the fill
burned, so a corridor's margin and a chain's native-token drain can be measured
after the fact.
- [Raxol.Payments.SettlementRecorder](Raxol.Payments.SettlementRecorder.md): Turns a completed cross-chain fill into a `Raxol.Payments.SettlementLedger` entry:
resolves the fee token, fetches the destination fill receipt via a
`Raxol.Payments.ChainReader` to price the native gas burned, and records it.
- [Raxol.Payments.SpendingHook](Raxol.Payments.SpendingHook.md): CommandHook that enforces spending policy on payment operations.
- [Raxol.Payments.SpendingPolicy](Raxol.Payments.SpendingPolicy.md): Spending limits for agent payment operations.
- [Raxol.Payments.Telemetry](Raxol.Payments.Telemetry.md): Telemetry event surface for the payment subsystem.
- [Raxol.Payments.Telemetry.LoggerHandler](Raxol.Payments.Telemetry.LoggerHandler.md): Stock `:telemetry` handler that pretty-prints payment events to
`Logger`. Useful as a starter template -- copy + tailor for Datadog,
OpenTelemetry, Phoenix.LiveDashboard, etc.
- [Raxol.Payments.Tron.Address](Raxol.Payments.Tron.Address.md): Tron Base58Check address codec.
- [Raxol.Payments.Wallet](Raxol.Payments.Wallet.md): Behaviour for wallet implementations providing signing and identity.
- [Raxol.Payments.Wallets.Env](Raxol.Payments.Wallets.Env.md): Wallet that loads a private key from an environment variable.
- [Raxol.Payments.Wallets.Op](Raxol.Payments.Wallets.Op.md): Wallet that loads a private key from 1Password via the `op` CLI.
- [Raxol.Payments.Xochi.Capabilities](Raxol.Payments.Xochi.Capabilities.md): Client for the solver capability matrix -- the single source of truth for
which chains, tokens, and pull methods the Xochi/Riddler stack can settle
right now.
- [Raxol.Payments.Xochi.Client](Raxol.Payments.Xochi.Client.md): Client for the Xochi private execution protocol.
- [Raxol.Payments.Xochi.DepositAttestation](Raxol.Payments.Xochi.DepositAttestation.md): Client-side verification of a Xochi deposit-route quote's `deposit_attestation`.
- [Raxol.Payments.Xochi.Schemas](Raxol.Payments.Xochi.Schemas.md): Request/response schemas for the Xochi intent API.
- [Raxol.Payments.Xochi.Schemas.DepositRouteRequest](Raxol.Payments.Xochi.Schemas.DepositRouteRequest.md): A cross-VM deposit-route quote request: a non-EVM origin (Tron) settling to
an EVM destination. The origin has no gasless pull, so the quote returns a
`deposit_address` (+ `deposit_attestation` to verify) instead of EIP-712
typed data to sign.
- [Raxol.Payments.Xochi.Stealth](Raxol.Payments.Xochi.Stealth.md): ERC-5564/ERC-6538 stealth address derivation and scanning.
- [Raxol.Payments.Zksar](Raxol.Payments.Zksar.md): ZKSAR (Zero-Knowledge Sanctions/AML Reporting) attestation verification.
- [Raxol.Payments.Zksar.TrustScore](Raxol.Payments.Zksar.TrustScore.md): Aggregates verified ZKSAR attestations into a 0-100 trust score
using a diminishing-returns formula.

## Mix Tasks

- [mix raxol_payments.anvil](Mix.Tasks.RaxolPayments.Anvil.md): Reproducible launch-rehearsal harness. Brings up
- [mix raxol_payments.bench](Mix.Tasks.RaxolPayments.Bench.md): Measures the throughput of the fund-moving hot paths that actually gate DEX
volume: secp256k1 signing, atomic ledger reservations, and idempotency
checkpoint reads/writes. (The render frame budget does not gate volume; these
do.)
- [mix raxol_payments.echo](Mix.Tasks.RaxolPayments.Echo.md): Run `Raxol.Payments.EchoServer` for local agent validation.

