Raxol Payments

Agent payment protocols for Elixir. Autonomous agents that can pay for things: x402/MPP auto-pay, Xochi cross-chain intents, stealth addresses, ZKSAR attestation, Xochi Mandate delegation, spending controls.

Install

{:raxol_payments, "~> 0.2"}

Features

Quick start

alias Raxol.Payments.{Router, Req.AgentPlugin}
# Router auto-selects protocol
Router.select(cross_chain: true) # => :xochi
Router.select(privacy: :stealth) # => :xochi
Router.select() # => :x402
# Wire auto-pay into agent HTTP backend
plugin = AgentPlugin.auto_pay(
wallet: Raxol.Payments.Wallets.Env,
ledger: ledger_pid,
policy: SpendingPolicy.dev(),
agent_id: :my_agent
)

Examples

A guided path from an offline rehearsal to a real on-chain settlement lives in examples/: preflight.exs (local echo server, no funds) -> crosschain_stealth_payment.exs (in-process Xochi sim, no funds) -> scripts/run_live_gates.sh at the repo root (live cross-chain settlement across all assets and routes, real funds). Start with the README there.

Relay (Tron) gasless pull

The Relay rail (Raxol.Payments.Relay, actions/payments/execute_relay_transfer) has two EVM->Tron funding paths: gasless (A), signing the quote's gasless typed-data block so the signature rides on /relay/execute with no broadcast; and broadcast (B), an on-chain transfer to the deposit_address.

Path A is delivered on the Riddler side (axol-io/Riddler#120, PR #160): POST /relay/quote returns a Permit2 gasless block for EVM->Tron when the solver runs with RELAY_GASLESS_PULL_ENABLED=true. The client already signs it and plumbs the signature, so no raxol change is needed: the execute_relay_transfer moduledoc "Pending Riddler support ... #120" note can be cleared. Caveats:

Architecture

See Agentic Commerce docs for the full design.