Skip to content

Withdrawal

Representation of EIP-4895 withdrawal data

Constructors

new Withdrawal()

new Withdrawal(index, validatorIndex, address, amount): Withdrawal

This constructor assigns and validates the values. Use the static factory methods to assist in creating a Withdrawal object from varying data types. Its amount is in Gwei to match CL representation and for eventual ssz withdrawalsRoot

Parameters

index: bigint

validatorIndex: bigint

address: EthjsAddress

amount: bigint

withdrawal amount in Gwei to match the CL repesentation and eventually ssz withdrawalsRoot

Returns

Withdrawal

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:40

Properties

address

readonly address: EthjsAddress

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:30


amount

readonly amount: bigint

withdrawal amount in Gwei to match the CL repesentation and eventually ssz withdrawalsRoot

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:34


index

readonly index: bigint

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:28


validatorIndex

readonly validatorIndex: bigint

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:29

Methods

raw()

raw(): WithdrawalBytes

Returns

WithdrawalBytes

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:53


toJSON()

toJSON(): object

Returns

object

address

address: string

amount

amount: string

index

index: string

validatorIndex

validatorIndex: string

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:60


toValue()

toValue(): object

Returns

object

address

address: Uint8Array

amount

amount: bigint

index

index: bigint

validatorIndex

validatorIndex: bigint

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:54


fromValuesArray()

static fromValuesArray(withdrawalArray): Withdrawal

Parameters

withdrawalArray: WithdrawalBytes

Returns

Withdrawal

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:46


fromWithdrawalData()

static fromWithdrawalData(withdrawalData): Withdrawal

Parameters

withdrawalData: WithdrawalData

Returns

Withdrawal

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:45


toBytesArray()

static toBytesArray(withdrawal): WithdrawalBytes

Convert a withdrawal to a buffer array

Parameters

withdrawal: Withdrawal | WithdrawalData

the withdrawal to convert

Returns

WithdrawalBytes

buffer array of the withdrawal

Defined in

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/withdrawal.d.ts:52