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.1"}

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) -> run_live_xochi_gate.sh (live cross-chain settlement, 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) -- sign the quote's gasless typed-data block, the signature rides on /relay/execute, 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.