Schemas
Serialized — Bidirectional schema for RLP-encoded transaction bytes. Rpc — Bidirectional schema for JSON-RPC transaction format. Schema — Union schema for all transaction types (validates struct fields). LegacySchema — Type 0 transactions. EIP2930Schema — Type 1 access list transactions. EIP1559Schema — Type 2 dynamic fee transactions. EIP4844Schema — Type 3 blob transactions. EIP7702Schema — Type 4 EOA delegation transactions.Pure Functions
hash(tx) — Computes Keccak-256 hash of serialized transaction. ReturnsHashType.
getSigningHash(tx) — Computes hash for signing (pre-signature). Returns HashType.
getSender(tx) — Recovers sender address from signature. Returns AddressType.
getRecipient(tx) — Gets recipient address. Returns AddressType | null.
getChainId(tx) — Gets chain ID. Returns bigint | null.
getGasPrice(tx, baseFee?) — Gets effective gas price. Returns bigint.
getNonce(tx) — Gets nonce. Returns bigint.
getGasLimit(tx) — Gets gas limit. Returns bigint.
getValue(tx) — Gets value in wei. Returns bigint.
getData(tx) — Gets input data. Returns Uint8Array.
getAccessList(tx) — Gets access list (empty for legacy). Returns AccessList.
getBlobCount(tx) — Gets blob count (EIP-4844 only). Returns number.
getBlobVersionedHashes(tx) — Gets blob hashes (EIP-4844 only). Returns VersionedHash[].
getAuthorizationCount(tx) — Gets authorization count (EIP-7702 only). Returns number.
getAuthorizations(tx) — Gets authorization list (EIP-7702 only). Returns AuthorizationList.
Predicates
isSigned(tx) — Checks if transaction has valid signature. Returnsboolean.
isContractCreation(tx) — Checks if to is null. Returns boolean.
isContractCall(tx) — Checks if to is set and data is non-empty. Returns boolean.
hasAccessList(tx) — Checks if transaction has access list. Returns boolean.
detectType(bytes) — Detects transaction type from serialized data. Returns Type.
Type Guards
isLegacy(tx) — Type guard for Legacy transactions. Returnstx is Legacy.
isEIP2930(tx) — Type guard for EIP-2930 transactions. Returns tx is EIP2930.
isEIP1559(tx) — Type guard for EIP-1559 transactions. Returns tx is EIP1559.
isEIP4844(tx) — Type guard for EIP-4844 transactions. Returns tx is EIP4844.
isEIP7702(tx) — Type guard for EIP-7702 transactions. Returns tx is EIP7702.
Mutation Functions
withNonce(tx, nonce) — Returns new transaction with updated nonce. withGasLimit(tx, gasLimit) — Returns new transaction with updated gas limit. withGasPrice(tx, gasPrice) — Returns new transaction with updated gas price. withData(tx, data) — Returns new transaction with updated data. replaceWith(tx, options?) — Returns new transaction with fee bump for replacement. format(tx) — Returns human-readable string representation.Effect Functions (Validation)
assertSigned(tx) —Effect<void, UnsignedTransactionError>
verifySignature(tx) — Effect<boolean, InvalidSignatureError>
validateChainId(tx) — Effect<void, InvalidChainIdError>
validateGasLimit(tx) — Effect<void, InvalidGasLimitError>
validateGasPrice(tx) — Effect<void, InvalidGasPriceError>
validateNonce(tx) — Effect<void, InvalidNonceError>
validateValue(tx) — Effect<void, InvalidValueError>
Types
Error Classes
UnsignedTransactionError— Transaction is not signedInvalidSignatureError— Signature verification failedInvalidChainIdError— Chain ID validation failedInvalidGasLimitError— Gas limit validation failedInvalidGasPriceError— Gas price validation failedInvalidNonceError— Nonce validation failedInvalidValueError— Value validation failed
See Also
- Receipt - Transaction execution results
- TransactionHash - Transaction identifiers
- AccessList - EIP-2930 access lists
- Nonce - Transaction sequence numbers

