@tevm/voltaire / primitives/Withdrawal
primitives/Withdrawal
Type Aliases
WithdrawalType
WithdrawalType = object
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:16
Withdrawal type - represents Ethereum withdrawal (post-merge)
Post-merge (Shanghai/Capella upgrade) withdrawal from beacon chain
validators to execution layer accounts
See
- https://voltaire.tevm.sh/primitives/withdrawal for Withdrawal documentation
- https://eips.ethereum.org/EIPS/eip-4895 for EIP-4895 specification
Since
0.0.0Properties
address
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:22 Address receiving withdrawalreadonlyaddress:AddressType
amount
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:24 Amount in Gweireadonlyamount:GweiType
index
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:18 Withdrawal index (monotonically increasing)readonlyindex:WithdrawalIndexType
validatorIndex
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:20 Validator index on beacon chainreadonlyvalidatorIndex:ValidatorIndexType
Variables
Withdrawal
Defined in: src/primitives/Withdrawal/index.ts:8constWithdrawal:object
Type Declaration
equals()
equals: (Check if Withdrawal values are equala,b) =>boolean
Parameters
a
WithdrawalType
First withdrawal
b
WithdrawalType
Second withdrawal
Returns
boolean
true if equal
See
https://voltaire.tevm.sh/primitives/withdrawal for Withdrawal documentationSince
0.0.0Throws
Example
from()
from: (Create Withdrawal from componentsparams) =>WithdrawalType
Parameters
params
Withdrawal parametersaddress
string | Uint8Array<ArrayBufferLike> | AddressType
Withdrawal recipient address
amount
string | number | bigint | GweiType
Amount in Gwei
index
string | number | bigint | WithdrawalIndexType
Global withdrawal counter
validatorIndex
string | number | bigint | ValidatorIndexType
Validator index
Returns
WithdrawalType
Withdrawal
See
https://voltaire.tevm.sh/primitives/withdrawal for Withdrawal documentationSince
0.0.0Throws
If any parameter is invalidExample
Functions
equals()
equals(Defined in: src/primitives/Withdrawal/equals.js:21 Check if Withdrawal values are equala,b):boolean
Parameters
a
WithdrawalType
First withdrawal
b
WithdrawalType
Second withdrawal
Returns
boolean
true if equal
See
https://voltaire.tevm.sh/primitives/withdrawal for Withdrawal documentationSince
0.0.0Throws
Example
from()
from(Defined in: src/primitives/Withdrawal/from.js:29 Create Withdrawal from componentsparams):WithdrawalType
Parameters
params
Withdrawal parametersaddress
string | Uint8Array<ArrayBufferLike> | AddressType
Withdrawal recipient address
amount
string | number | bigint | GweiType
Amount in Gwei
index
string | number | bigint | WithdrawalIndexType
Global withdrawal counter
validatorIndex
string | number | bigint | ValidatorIndexType
Validator index
Returns
WithdrawalType
Withdrawal

