@tevm/voltaire / primitives/Transaction / EIP1559
EIP1559
Classes
TransactionEIP1559
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:54 Factory function for creating EIP-1559 Transaction instancesConstructors
Constructor
new TransactionEIP1559(Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:54 Factory function for creating EIP-1559 Transaction instancestx):TransactionEIP1559
Parameters
tx
any
Returns
TransactionEIP1559
Properties
getEffectiveGasPrice()
getEffectiveGasPrice: (Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:92 Calculate effective gas price given base fee.tx,baseFee) =>bigint
Parameters
tx
TransactionEIP1559Type
Transaction
baseFee
bigint
Block base fee
Returns
bigint
Effective gas price
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
getSender()
getSender: (Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:88 Get sender address from transaction signature (EIP-1559). Recovers the sender address from transaction signature components (r, s, yParity). Returns a BrandedAddress (20 bytes). Assumes transaction uses branded types with validated signature components.tx) =>AddressType
Parameters
tx
TransactionEIP1559Type
Signed transaction with BrandedAddress fields
Returns
AddressType
Sender address (20 bytes, branded)
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
If signature recovery failsExample
getSigningHash()
getSigningHash: (Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:86tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
hash()
hash: (Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:85tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
serialize()
serialize: (Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:83 Serialize EIP-1559 transaction to RLP encoded bytes.tx) =>Uint8Array<ArrayBufferLike>
Parameters
tx
TransactionEIP1559Type
Transaction to serialize
Returns
Uint8Array<ArrayBufferLike>
RLP encoded transaction with type byte prefix
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
verifySignature()
verifySignature: (Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:90tx) =>boolean
Parameters
tx
TransactionEIP1559Type
Returns
boolean
deserialize()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:73staticdeserialize: (bytes) =>TransactionEIP1559Prototype
Parameters
bytes
Uint8Array
Returns
TransactionEIP1559Prototype
getEffectiveGasPrice()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:79 Calculate effective gas price given base fee.staticgetEffectiveGasPrice: (tx,baseFee) =>bigint
Parameters
tx
TransactionEIP1559Type
Transaction
baseFee
bigint
Block base fee
Returns
bigint
Effective gas price
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
getSender()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:77 Get sender address from transaction signature (EIP-1559). Recovers the sender address from transaction signature components (r, s, yParity). Returns a BrandedAddress (20 bytes). Assumes transaction uses branded types with validated signature components.staticgetSender: (tx) =>AddressType
Parameters
tx
TransactionEIP1559Type
Signed transaction with BrandedAddress fields
Returns
AddressType
Sender address (20 bytes, branded)
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
If signature recovery failsExample
getSigningHash()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:76staticgetSigningHash: (tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
hash()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:75statichash: (tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
prototype
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:82staticprototype:object
serialize()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:74 Serialize EIP-1559 transaction to RLP encoded bytes.staticserialize: (tx) =>Uint8Array<ArrayBufferLike>
Parameters
tx
TransactionEIP1559Type
Transaction to serialize
Returns
Uint8Array<ArrayBufferLike>
RLP encoded transaction with type byte prefix
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
verifySignature()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:78staticverifySignature: (tx) =>boolean
Parameters
tx
TransactionEIP1559Type
Returns
boolean
Interfaces
TransactionEIP1559Constructor()
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:20TransactionEIP1559Constructor(Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:21tx):TransactionEIP1559Prototype
Parameters
tx
accessList
AccessList
chainId
bigint
data
Uint8Array
gasLimit
bigint
maxFeePerGas
bigint
maxPriorityFeePerGas
bigint
nonce
bigint
r
Uint8Array
s
Uint8Array
to
AddressType | null
value
bigint
yParity
number
Returns
TransactionEIP1559Prototype
Properties
getEffectiveGasPrice()
getEffectiveGasPrice: (Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:42 Calculate effective gas price given base fee.tx,baseFee) =>bigint
Parameters
tx
TransactionEIP1559Type
Transaction
baseFee
bigint
Block base fee
Returns
bigint
Effective gas price
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
getSender()
getSender: (Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:40 Get sender address from transaction signature (EIP-1559). Recovers the sender address from transaction signature components (r, s, yParity). Returns a BrandedAddress (20 bytes). Assumes transaction uses branded types with validated signature components.tx) =>AddressType
Parameters
tx
TransactionEIP1559Type
Signed transaction with BrandedAddress fields
Returns
AddressType
Sender address (20 bytes, branded)
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
If signature recovery failsExample
getSigningHash()
getSigningHash: (Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:39tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
hash()
hash: (Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:38tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
prototype
prototype: TransactionEIP1559Prototype
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:35
serialize()
serialize: (Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:37 Serialize EIP-1559 transaction to RLP encoded bytes.tx) =>Uint8Array<ArrayBufferLike>
Parameters
tx
TransactionEIP1559Type
Transaction to serialize
Returns
Uint8Array<ArrayBufferLike>
RLP encoded transaction with type byte prefix
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
verifySignature()
verifySignature: (Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:41tx) =>boolean
Parameters
tx
TransactionEIP1559Type
Returns
boolean
Methods
deserialize()
deserialize(Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Constructor.ts:36bytes):TransactionEIP1559Prototype
Parameters
bytes
Uint8Array
Returns
TransactionEIP1559Prototype
Type Aliases
BrandedTransactionEIP1559
BrandedTransactionEIP1559 = TransactionEIP1559Type
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:26
TransactionEIP1559Type
TransactionEIP1559Type = object
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:8
EIP-1559 Transaction type
Properties
[brand]
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:9readonly[brand]:"TransactionEIP1559"
accessList
accessList: AccessList
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:19
chainId
chainId: bigint
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:11
data
data: Uint8Array
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:18
gasLimit
gasLimit: bigint
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:15
maxFeePerGas
maxFeePerGas: bigint
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:14
maxPriorityFeePerGas
maxPriorityFeePerGas: bigint
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:13
nonce
nonce: bigint
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:12
r
r: Uint8Array
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:21
s
s: Uint8Array
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:22
to
to:Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:16AddressType|null
type
type: EIP1559
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:10
value
value: bigint
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:17
yParity
yParity: number
Defined in: src/primitives/Transaction/EIP1559/TransactionEIP1559Type.ts:20
Variables
getSigningHash()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:21constgetSigningHash: (tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
hash()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:22consthash: (tx) =>Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
verifySignature()
Defined in: src/primitives/Transaction/EIP1559/EIP1559.js:23constverifySignature: (tx) =>boolean
Parameters
tx
TransactionEIP1559Type
Returns
boolean
Functions
deserialize()
deserialize(Defined in: src/primitives/Transaction/EIP1559/deserialize.js:20 Deserialize RLP encoded EIP-1559 transaction.data):TransactionEIP1559Type
Parameters
data
Uint8Array<ArrayBufferLike>
RLP encoded transaction with type byte prefix
Returns
TransactionEIP1559Type
Deserialized transaction
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
If transaction format is invalidExample
getEffectiveGasPrice()
getEffectiveGasPrice(Defined in: src/primitives/Transaction/EIP1559/getEffectiveGasPrice.js:16 Calculate effective gas price given base fee.tx,baseFee):bigint
Parameters
tx
TransactionEIP1559Type
Transaction
baseFee
bigint
Block base fee
Returns
bigint
Effective gas price
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
getSender()
getSender(Defined in: src/primitives/Transaction/EIP1559/getSender.js:22 Get sender address from transaction signature (EIP-1559). Recovers the sender address from transaction signature components (r, s, yParity). Returns a BrandedAddress (20 bytes). Assumes transaction uses branded types with validated signature components.tx):AddressType
Parameters
tx
TransactionEIP1559Type
Signed transaction with BrandedAddress fields
Returns
AddressType
Sender address (20 bytes, branded)
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
If signature recovery failsExample
GetSigningHash()
GetSigningHash(Defined in: src/primitives/Transaction/EIP1559/getSigningHash.js:34 Factory: Get signing hash for EIP-1559 transaction. Computes the Keccak256 hash of the RLP-encoded transaction fields that need to be signed. The transaction uses BrandedAddress fordeps): (tx) =>Uint8Array
to field, assumed to be
validated (20 bytes). Returns a HashType (32 bytes).
Parameters
deps
Crypto dependencieskeccak256
(data) => Uint8Array
Keccak256 hash function
rlpEncode
(data) => Uint8Array
RLP encode function
Returns
Function that computes signing hash(tx):Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
Hash()
Hash(Defined in: src/primitives/Transaction/EIP1559/hash.js:22 Factory: Compute transaction hash.deps): (tx) =>Uint8Array
Parameters
deps
Crypto dependencieskeccak256
(data) => Uint8Array
Keccak256 hash function
Returns
Function that computes transaction hash(tx):Uint8Array
Parameters
tx
TransactionEIP1559Type
Returns
Uint8Array
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
serialize()
serialize(Defined in: src/primitives/Transaction/EIP1559/serialize.js:23 Serialize EIP-1559 transaction to RLP encoded bytes.tx):Uint8Array<ArrayBufferLike>
Parameters
tx
TransactionEIP1559Type
Transaction to serialize
Returns
Uint8Array<ArrayBufferLike>
RLP encoded transaction with type byte prefix
See
https://voltaire.tevm.sh/primitives/transaction for Transaction documentationSince
0.0.0Throws
Never throwsExample
VerifySignature()
VerifySignature(Defined in: src/primitives/Transaction/EIP1559/verifySignature.js:43 Factory: Verify transaction signature. Verifies that the transaction signature is valid. This checks that:deps): (tx) =>boolean
- The signature components (r, s) are well-formed
- The yParity/v is valid
- A public key can be recovered from the signature
Parameters
deps
Crypto dependencieskeccak256
(data) => Uint8Array
Keccak256 hash function
rlpEncode
(data) => Uint8Array
RLP encode function
secp256k1RecoverPublicKey
any
secp256k1 public key recovery
Returns
Function that verifies signature(tx):boolean
Parameters
tx
TransactionEIP1559Type
Returns
boolean

