Crate network

Source
Available on crate feature network only.
Expand description

§op-alloy-network

CI op-alloy-network crate MIT License Apache License Book

Optimism blockchain RPC behavior abstraction.

This crate contains a simple abstraction of the RPC behavior of an Op-stack blockchain. It is intended to be used by the Alloy client to provide a consistent interface to the rest of the library, regardless of changes the underlying blockchain makes to the RPC interface.

Modules§

any
Types for handling unknown network types.
eip2718
EIP-2718 traits.
primitives
alloy-network-primitives

Macros§

impl_into_wallet
Utility to implment IntoWallet for signer over the specified network.

Structs§

AnyHeader
Block header representation with certain fields made optional to account for possible differencies in network implementations.
AnyNetwork
Types for a catch-all network.
AnyReceiptEnvelope
Receipt envelope, as defined in EIP-2718.
AnyRpcBlock
A wrapper for AnyRpcBlock that allows for handling unknown block types.
AnyRpcTransaction
A wrapper for AnyRpcTransaction that allows for handling unknown transaction types.
AnyTxType
Transaction type for a catch-all network.
Ethereum
Types for a mainnet-like Ethereum network.
EthereumWallet
A wallet capable of signing any transaction for the Ethereum network.
Optimism
Types for an Op-stack network.
UnbuiltTransactionError
An unbuilt transaction, along with some error.
UnknownTxEnvelope
A transaction envelope from an unknown network.
UnknownTypedTransaction
A typed transaction of an unknown Network

Enums§

AnyTxEnvelope
Transaction envelope for a catch-all network.
AnyTypedTransaction
Unsigned transaction type for a catch-all network.
TransactionBuilderError
Error type for transaction builders.

Traits§

BlockResponse
Block JSON-RPC response.
FullSigner
A unifying trait for asynchronous Ethereum signers that combine the functionalities of both Signer and TxSigner.
FullSignerSync
A unifying trait for synchronous Ethereum signers that implement both SignerSync and TxSignerSync.
IntoWallet
A trait for converting a signer into a NetworkWallet.
Network
Captures type info for network-specific RPC requests/responses.
NetworkWallet
A wallet capable of signing any transaction for the given network.
ReceiptResponse
Receipt JSON-RPC response.
TransactionBuilder
A Transaction builder for a network.
TransactionBuilder4844
Transaction builder type supporting EIP-4844 transaction fields.
TransactionBuilder7702
Transaction builder type supporting EIP-7702 transaction fields.
TransactionResponse
Transaction JSON-RPC response. Aggregates transaction data with its block and signer context.
TxSigner
Asynchronous transaction signer, capable of signing any SignableTransaction for the given Signature type.
TxSignerSync
Synchronous transaction signer, capable of signing any SignableTransaction for the given Signature type.

Type Aliases§

AnyRpcHeader
A catch-all header type for handling headers on multiple networks.
AnyTransactionReceipt
Alias for a catch-all receipt type.
BuildResult
Result type for transaction builders