# onchain v0.16.0 - Table of Contents > Shared Ethereum/blockchain library for read (eth_call) and write (transaction signing) operations including ABI codecs, cryptography and transaction signing. ## Modules - [Onchain](Onchain.md): Shared Ethereum/blockchain library providing read and write capabilities. - [Onchain.AA](Onchain.AA.md): ERC-4337 Account Abstraction: UserOperation construction, hashing, signing, and bundler JSON-RPC. - [Onchain.AA.UserOperation](Onchain.AA.UserOperation.md): ERC-4337 UserOperation struct (unpacked representation). - [Onchain.ABI](Onchain.ABI.md): Documentation for ABI, the function interface language for Solidity. Generally, the ABI describes how to take binary Ethereum and transform it to or from types that Solidity understands. - [Onchain.ABI.Event](Onchain.ABI.Event.md): Decodes Ethereum event log data into Solidity-typed arguments. - [Onchain.ABI.FunctionSelector](Onchain.ABI.FunctionSelector.md): Module to help parse the ABI function signatures, e.g. `my_function(uint64, string[])`. - [Onchain.ABI.Math](Onchain.ABI.Math.md): Helper functions for ABI's math functions. - [Onchain.ABI.TypeDecoder](Onchain.ABI.TypeDecoder.md): `Onchain.ABI.TypeDecoder` is responsible for decoding types to the format expected by Solidity. We generally take a function selector and binary data and decode that into the original arguments according to the specification. - [Onchain.ABI.TypeEncoder](Onchain.ABI.TypeEncoder.md): `Onchain.ABI.TypeEncoder` is responsible for encoding types to the format expected by Solidity. We generally take a function selector and an array of data and encode that array according to the specification. - [Onchain.Address](Onchain.Address.md): Ethereum address validation, checksumming, and comparison. - [Onchain.Block](Onchain.Block.md): Represents a block from the Ethereum JSON-RPC endpoint. - [Onchain.Block.Withdrawal](Onchain.Block.Withdrawal.md): A validator withdrawal entry from a post-Shanghai block (EIP-4895). - [Onchain.Chain](Onchain.Chain.md): Chain registry and chain-id parsing helpers. - [Onchain.CloudKMS](Onchain.CloudKMS.md): Shared helpers for the Google Cloud KMS signer backends (`Onchain.Signer.CloudKMS` and an Ed25519 KMS backend). - [Onchain.Configuration](Onchain.Configuration.md): Configuration and API discovery for the signing, transaction and RPC modules (formerly the `Cartouche` root module). Application-env keys stay under `:cartouche`. - [Onchain.Contract](Onchain.Contract.md): Generic contract call: ABI encode → eth_call → ABI decode in one function. - [Onchain.Contract.ABI](Onchain.Contract.ABI.md): Parses contract ABI JSON with alloy-json-abi in the core NIF. - [Onchain.Contract.Generator](Onchain.Contract.Generator.md): Compile-time contract codegen macro. - [Onchain.Contract.Sleuth](Onchain.Contract.Sleuth.md): Auto-generated contract module via `Onchain.Contract.Generator`. - [Onchain.Contract.Sleuth.Multicall](Onchain.Contract.Sleuth.Multicall.md): Typed call builders and result decoders for `Onchain.Multicall.aggregate3/2`. - [Onchain.DEX.Router](Onchain.DEX.Router.md): Optimal DEX swap-path routing across liquidity pools (Uniswap v2/v3-style). - [Onchain.DEX.Router.Pool](Onchain.DEX.Router.Pool.md): A single DEX liquidity pool descriptor consumed by `Onchain.DEX.Router`. - [Onchain.DEX.Router.Route](Onchain.DEX.Router.Route.md): The result of an `Onchain.DEX.Router.route/5` query: the output-maximizing path through a candidate pool set. - [Onchain.DebugTrace](Onchain.DebugTrace.md): Represents an Ethereum transaction debug trace, which contains information about the call graph of an executed transaction. Note: this is different from `trace_call` and instead has deep struct logs for execution. - [Onchain.DebugTrace.StructLog](Onchain.DebugTrace.StructLog.md): One execution step inside a `Onchain.DebugTrace` — the EVM opcode, program counter, call depth, remaining gas, gas cost of this step, and the stack snapshot at that point. - [Onchain.Decimal](Onchain.Decimal.md): Decimal precision helpers for Ethereum token amounts. - [Onchain.ENS](Onchain.ENS.md): ENS (Ethereum Name Service) resolution and namehash computation. - [Onchain.ERC1155](Onchain.ERC1155.md): ERC-1155 (Multi Token) read operations. - [Onchain.ERC20](Onchain.ERC20.md): ERC-20 token operations. - [Onchain.ERC20.Call](Onchain.ERC20.Call.md): Module to call operations and receive return value, without sending a transaction. - [Onchain.ERC20.CallData](Onchain.ERC20.CallData.md): Module to encode `calldata` for given adaptor operations. - [Onchain.ERC721](Onchain.ERC721.md): ERC-721 (NFT) read operations. - [Onchain.ERC7730](Onchain.ERC7730.md): [ERC-7730](https://eips.ethereum.org/EIPS/eip-7730) clear-signing descriptors: load a descriptor, bind it to a signing request, and render human-readable display fields. - [Onchain.ERC7730.Binding](Onchain.ERC7730.Binding.md): Binding evaluator for ERC-7730 descriptors. - [Onchain.ERC7730.Descriptor](Onchain.ERC7730.Descriptor.md): Parsed, validated representation of an [ERC-7730](https://eips.ethereum.org/EIPS/eip-7730) clear-signing descriptor. - [Onchain.ERC7730.Formatter](Onchain.ERC7730.Formatter.md): Display-rule engine for ERC-7730 descriptors. - [Onchain.FeeHistory](Onchain.FeeHistory.md): Represents fee history data as defined in EIP-1559. - [Onchain.Fees](Onchain.Fees.md): EIP-1559 fee suggestion math over `Onchain.FeeHistory.t()`. - [Onchain.Filter](Onchain.Filter.md): Poll an Ethereum node-side filter and deliver results to registered listeners. - [Onchain.Filter.Log](Onchain.Filter.Log.md): A decoded Ethereum log entry. - [Onchain.HTTP](Onchain.HTTP.md): HTTP helpers for the shared JSON-RPC transport and Cartouche HTTP clients. - [Onchain.Hash](Onchain.Hash.md): Keccak-256 helpers for hashing arbitrary binaries. - [Onchain.Hex](Onchain.Hex.md): Helper module for parsing and encoding hex values. - [Onchain.Keys](Onchain.Keys.md): Cartouche library to generate Ethereum key pairs. - [Onchain.MEV](Onchain.MEV.md): MEV protection via private transaction submission to Flashbots-style relays. - [Onchain.Manifest](Onchain.Manifest.md): Runtime accessor for Cartouche's API manifest — returns the same structure that `mix descripex.manifest` (aliased as `mix manifest`) writes to JSON. - [Onchain.Multicall](Onchain.Multicall.md): Multicall3 batched contract reads. - [Onchain.OpenChain](Onchain.OpenChain.md): API Client for [OpenChain.xyz](https://openchain.xyz] API. - [Onchain.Precompiled](Onchain.Precompiled.md): Shared `RustlerPrecompiled` options for the core ABI, EVM and Tempo NIF crates. - [Onchain.RPC](Onchain.RPC.md): Shared JSON-RPC transport and typed Ethereum client. - [Onchain.RPC.Capabilities](Onchain.RPC.Capabilities.md): Deserialized `eth_capabilities` report used to determine which historical resources a node can serve. - [Onchain.RPC.Capabilities.DeleteStrategy](Onchain.RPC.Capabilities.DeleteStrategy.md): Resource-retention strategy advertised by the node. - [Onchain.RPC.Capabilities.Head](Onchain.RPC.Capabilities.Head.md): Block at the head of the node's advertised capability range. - [Onchain.RPC.Capabilities.Resource](Onchain.RPC.Capabilities.Resource.md): Availability and retention details for one node resource. - [Onchain.RPC.Codegen](Onchain.RPC.Codegen.md): Spec-checked JSON-RPC wrapper generation for `Onchain.RPC`. - [Onchain.RPC.Configuration](Onchain.RPC.Configuration.md): Deserialized `eth_config` fork configuration report defined by EIP-7910. - [Onchain.RPC.Configuration.BlobSchedule](Onchain.RPC.Configuration.BlobSchedule.md): Blob fee schedule active for one fork configuration. - [Onchain.RPC.Configuration.Fork](Onchain.RPC.Configuration.Fork.md): Chain parameters active at one fork boundary. - [Onchain.RPC.Proof](Onchain.RPC.Proof.md): EIP-1186 account proof. Quantities are integers; addresses, hashes and RLP proof nodes are raw bytes. Storage keys are integers, accepting either padded DATA or QUANTITY encodings from clients. Proofs are not verified locally. - [Onchain.RPC.Proof.StorageProof](Onchain.RPC.Proof.StorageProof.md): A storage key, value and its RLP-encoded Merkle proof nodes. - [Onchain.RPC.Specs](Onchain.RPC.Specs.md): Compile-time lookup table for the vendored Ethereum OpenRPC method specs. - [Onchain.RPC.SyncStatus](Onchain.RPC.SyncStatus.md): Progress object from `eth_syncing`. - [Onchain.RPC.Trace](Onchain.RPC.Trace.md): Represents an Ethereum transaction trace, which contains information about the call graph of an executed transaction. - [Onchain.RPC.Trace.Action](Onchain.RPC.Trace.Action.md): A single sub-action inside a `Onchain.RPC.Trace` — the `call`, `create`, or `suicide` operation the traced transaction performed at one frame of its call graph (from, to, value, gas, input, and call-type metadata). - [Onchain.Receipt](Onchain.Receipt.md): Represents an Ethereum transaction receipt, which contains information about the success or failure of an Ethereum transaction after it has been included in a mined Ethereum block. - [Onchain.Recover](Onchain.Recover.md): EIP-191 (`personal_sign`) signature recovery primitives. - [Onchain.RecoveryBit](Onchain.RecoveryBit.md): There are a number of ways to look at recovery bits. Either - [Onchain.Signature](Onchain.Signature.md): A secp256k1 signature with integer scalars and an optional recovery ID. - [Onchain.Signer](Onchain.Signer.md): Onchain.Signer is a GenServer which can sign messages. The runtime carrier is a `{backend_module, config}` pair implementing `Onchain.Signer.Backend` (for instance `Onchain.Signer.Secp256k1` with a local key, or `Onchain.Signer.CloudKMS` with GCP Cloud KMS coordinates). A legacy `{module, function, args}` MFA is also accepted so existing call sites (`Onchain.Signer.sign_direct/4`, and `start_link/1` handed a 3-tuple) keep working. In either case, start the GenServer and call `Onchain.Signer.sign(MySigner, "message")` to get a packed `r || s || v` Ethereum signature (`Onchain.Configuration.signature()`). - [Onchain.Signer.Backend](Onchain.Signer.Backend.md): Behaviour for key-custody signer backends — *where the key lives and who computes the raw signature*. - [Onchain.Signer.CloudKMS](Onchain.Signer.CloudKMS.md): Signer backend that signs with a Google Cloud KMS secp256k1 key. - [Onchain.Signer.Secp256k1](Onchain.Signer.Secp256k1.md): Signer backend that signs with a local secp256k1 private key. - [Onchain.Sleuth](Onchain.Sleuth.md): Sleuth allows you to run a contract call as a single `eth_call` call. - [Onchain.Subscription](Onchain.Subscription.md): Real-time Ethereum subscriptions via `eth_subscribe` over WebSocket. - [Onchain.TraceCall](Onchain.TraceCall.md): Represents an Ethereum `eth_callMany` trace, which contains information about the call graph of the speculative execution of several transactions. - [Onchain.Transaction](Onchain.Transaction.md): Build, sign, and encode Ethereum transactions. - [Onchain.Transaction.Call](Onchain.Transaction.Call.md): Represents Ethereum `eth_call` parameters, not a signable or broadcastable transaction. - [Onchain.Transaction.Info](Onchain.Transaction.Info.md): Inclusion metadata for an execution-apis transaction object, plus the typed transaction. - [Onchain.Transaction.JsonField](Onchain.Transaction.JsonField.md): Shared JSON-field decoders used by `from_json/1` on V1/V2/V3/V4. - [Onchain.Transaction.Signature](Onchain.Transaction.Signature.md): Shared signature-field helpers for typed-transaction structs that carry the `signature_y_parity` / `signature_r` / `signature_s` triple (EIP-2930 `V_2930`, EIP-1559 `V2`, EIP-4844 `V3`, EIP-7702 `V4`). - [Onchain.Transaction.TypedDecode](Onchain.Transaction.TypedDecode.md): Access-list shape validation shared by transaction adapters. - [Onchain.Transaction.V1](Onchain.Transaction.V1.md): Represents a V1 or "Legacy" (that is, pre-EIP-1559) transaction. - [Onchain.Transaction.V2](Onchain.Transaction.V2.md): Represents a V2 or EIP-1559 transaction. - [Onchain.Transaction.V3](Onchain.Transaction.V3.md): Represents a V3 or EIP-4844 blob transaction. - [Onchain.Transaction.V4](Onchain.Transaction.V4.md): Represents a V4 or EIP-7702 set-code transaction. - [Onchain.Transaction.V_2930](Onchain.Transaction.V_2930.md): Represents a type-1 EIP-2930 access-list transaction. - [Onchain.Transfer](Onchain.Transfer.md): Transfer event parser for ERC-20, ERC-721, and ERC-1155 token standards. - [Onchain.Typed](Onchain.Typed.md): Module to build EIP-712 typed data, which can then be signed or recovered from. - [Onchain.Typed.Domain](Onchain.Typed.Domain.md): EIP-712 domain separator — the standard `EIP712Domain` struct (`name`, `version`, `chainId`, `verifyingContract`, `salt`). Each field is optional; only the populated fields contribute to the encoded domain type. - [Onchain.Typed.Type](Onchain.Typed.Type.md): EIP-712 type definition — an ordered list of `{name, field_type}` field entries. Field types are either primitives (`:address`, `{:uint, 256}`, `:bool`, …) or string references to other named types. - [Onchain.Wallet](Onchain.Wallet.md): Thin convenience layer for wallet-level queries. - [Onchain.Wei](Onchain.Wei.md): Conversions between Ethereum denominations and wei. - Exceptions - [Onchain.Hex.InvalidHex](Onchain.Hex.InvalidHex.md): Raised by `Onchain.Hex` decode/encode bang functions when input is not valid hex (wrong length, non-hex characters, missing/extra `0x` prefix, etc.). ## Mix Tasks - [mix onchain.coverage](Mix.Tasks.Onchain.Coverage.md): Coverage gates for the three libraries consolidated into onchain. - [mix onchain.manifest](Mix.Tasks.Onchain.Manifest.md): Generates a static `api_manifest.json` from the library's descripex annotations. - [mix onchain.scrape_erigon_methods](Mix.Tasks.Onchain.ScrapeErigonMethods.md): Scrapes Erigon trace/otterscan JSON-RPC methods from vendored Go source.