Raxol.Payments.ChainReader.JSONRPC (Raxol Payments v0.2.0)

Copy Markdown View Source

Req-backed Raxol.Payments.ChainReader over per-chain JSON-RPC endpoints.

Implements only the two read-only methods the accounting layer needs (eth_getTransactionReceipt, eth_getBalance). Self-contained on purpose: raxol_payments cannot depend on raxol_acp's RPC (that package depends on this one), so this mirrors the shape of Raxol.ACP.Onchain.RPC without the dependency.

Summary

Functions

Build a reader handle over a chain_id => rpc_url map.

Functions

new(opts)

Build a reader handle over a chain_id => rpc_url map.

Options:

  • :chains -- %{pos_integer() => String.t()} (required)
  • :req_options -- extra Req options merged into every request (e.g. plug: for Req.Test, receive_timeout:)