@ethereumjs/util / Withdrawal
Representation of EIP-4895 withdrawal data
• new Withdrawal(index
, validatorIndex
, address
, amount
)
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
Name | Type | Description |
---|---|---|
index |
bigint |
- |
validatorIndex |
bigint |
- |
address |
Address |
- |
amount |
bigint |
withdrawal amount in Gwei to match the CL repesentation and eventually ssz withdrawalsRoot |
packages/util/src/withdrawal.ts:40
• Readonly
address: Address
packages/util/src/withdrawal.ts:43
• Readonly
amount: bigint
withdrawal amount in Gwei to match the CL repesentation and eventually ssz withdrawalsRoot
packages/util/src/withdrawal.ts:47
• Readonly
index: bigint
packages/util/src/withdrawal.ts:41
• Readonly
validatorIndex: bigint
packages/util/src/withdrawal.ts:42
▸ raw(): WithdrawalBuffer
packages/util/src/withdrawal.ts:102
▸ toJSON(): Object
Object
Name | Type |
---|---|
address |
string |
amount |
string |
index |
string |
validatorIndex |
string |
packages/util/src/withdrawal.ts:115
▸ toValue(): Object
Object
Name | Type |
---|---|
address |
Buffer |
amount |
bigint |
index |
bigint |
validatorIndex |
bigint |
packages/util/src/withdrawal.ts:106
▸ Static
fromValuesArray(withdrawalArray
): Withdrawal
Name | Type |
---|---|
withdrawalArray |
WithdrawalBuffer |
packages/util/src/withdrawal.ts:65
▸ Static
fromWithdrawalData(withdrawalData
): Withdrawal
Name | Type |
---|---|
withdrawalData |
WithdrawalData |
packages/util/src/withdrawal.ts:50
▸ Static
toBufferArray(withdrawal
): WithdrawalBuffer
Convert a withdrawal to a buffer array
Name | Type | Description |
---|---|---|
withdrawal |
WithdrawalData | Withdrawal |
the withdrawal to convert |
buffer array of the withdrawal