@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:41
• Readonly address: Address
packages/util/src/withdrawal.ts:44
• Readonly amount: bigint
withdrawal amount in Gwei to match the CL repesentation and eventually ssz withdrawalsRoot
packages/util/src/withdrawal.ts:48
• Readonly index: bigint
packages/util/src/withdrawal.ts:42
• Readonly validatorIndex: bigint
packages/util/src/withdrawal.ts:43
▸ raw(): WithdrawalBytes
packages/util/src/withdrawal.ts:100
▸ toJSON(): Object
Object
| Name | Type |
|---|---|
address |
string |
amount |
string |
index |
string |
validatorIndex |
string |
packages/util/src/withdrawal.ts:113
▸ toValue(): Object
Object
| Name | Type |
|---|---|
address |
Uint8Array |
amount |
bigint |
index |
bigint |
validatorIndex |
bigint |
packages/util/src/withdrawal.ts:104
▸ Static fromValuesArray(withdrawalArray): Withdrawal
| Name | Type |
|---|---|
withdrawalArray |
WithdrawalBytes |
packages/util/src/withdrawal.ts:66
▸ Static fromWithdrawalData(withdrawalData): Withdrawal
| Name | Type |
|---|---|
withdrawalData |
WithdrawalData |
packages/util/src/withdrawal.ts:51
▸ Static toBytesArray(withdrawal): WithdrawalBytes
Convert a withdrawal to a buffer array
| Name | Type | Description |
|---|---|---|
withdrawal |
WithdrawalData | Withdrawal |
the withdrawal to convert |
buffer array of the withdrawal