Skip to main content
@tevm/voltaire
@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

Since

0.0.0

Properties

address
readonly address: AddressType
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:22 Address receiving withdrawal
amount
readonly amount: GweiType
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:24 Amount in Gwei
index
readonly index: WithdrawalIndexType
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:18 Withdrawal index (monotonically increasing)
validatorIndex
readonly validatorIndex: ValidatorIndexType
Defined in: src/primitives/Withdrawal/WithdrawalType.ts:20 Validator index on beacon chain

Variables

Withdrawal

const Withdrawal: object
Defined in: src/primitives/Withdrawal/index.ts:8

Type Declaration

equals()
equals: (a, b) => boolean
Check if Withdrawal values are equal
Parameters
a
WithdrawalType First withdrawal
b
WithdrawalType Second withdrawal
Returns
boolean true if equal
See
https://voltaire.tevm.sh/primitives/withdrawal for Withdrawal documentation
Since
0.0.0
Throws
Example
from()
from: (params) => WithdrawalType
Create Withdrawal from components
Parameters
params
Withdrawal parameters
address
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 documentation
Since
0.0.0
Throws
If any parameter is invalid
Example

Functions

equals()

equals(a, b): boolean
Defined in: src/primitives/Withdrawal/equals.js:21 Check if Withdrawal values are equal

Parameters

a
WithdrawalType First withdrawal
b
WithdrawalType Second withdrawal

Returns

boolean true if equal

See

https://voltaire.tevm.sh/primitives/withdrawal for Withdrawal documentation

Since

0.0.0

Throws

Example


from()

from(params): WithdrawalType
Defined in: src/primitives/Withdrawal/from.js:29 Create Withdrawal from components

Parameters

params
Withdrawal parameters
address
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 documentation

Since

0.0.0

Throws

If any parameter is invalid

Example