API Reference onchain v#0.7.0

Copy Markdown View Source

Modules

Shared Ethereum/blockchain library providing read and write capabilities.

ERC-4337 Account Abstraction: UserOperation construction, hashing, signing, and bundler JSON-RPC.

ERC-4337 UserOperation struct (unpacked representation).

ABI encoding/decoding for Ethereum contract calls.

Ethereum address validation, checksumming, and comparison.

Ethereum block fetching and timestamp-based block search.

Generic contract call: ABI encode → eth_call → ABI decode in one function.

Optimal DEX swap-path routing across liquidity pools (Uniswap v2/v3-style).

A single DEX liquidity pool descriptor consumed by Onchain.DEX.Router.

The result of an Onchain.DEX.Router.route/5 query: the output-maximizing path through a candidate pool set.

Decimal precision helpers for Ethereum token amounts.

ENS (Ethereum Name Service) resolution and namehash computation.

ERC-1155 (Multi Token) read operations.

ERC-20 token operations.

ERC-721 (NFT) read operations.

ERC-7730 clear-signing descriptors: load a descriptor, bind it to a signing request, and render human-readable display fields.

Binding evaluator for ERC-7730 descriptors.

Parsed, validated representation of an ERC-7730 clear-signing descriptor.

Display-rule engine for ERC-7730 descriptors.

EIP-1559 fee suggestion math over Cartouche.FeeHistory.t().

Hex encoding/decoding for Ethereum data.

Event log parsing for Ethereum contract events.

MEV protection via private transaction submission to Flashbots-style relays.

Multicall3 batched contract reads.

Ethereum JSON-RPC wrapper using cartouche's RPC client.

Compile-time lookup table for the vendored Ethereum OpenRPC method specs.

EIP-1559 transaction building, signing, encoding, and broadcasting.

Compound-style "deploy-as-call" primitive for arbitrary read-only logic against live chain state.

Real-time Ethereum subscriptions via eth_subscribe over WebSocket.

Transfer event parser for ERC-20, ERC-721, and ERC-1155 token standards.

Thin convenience layer for wallet-level queries.

Mix Tasks

Scrapes Erigon trace/otterscan JSON-RPC methods from vendored Go source.