Withdrawal
Index
Constructors
Properties
Methods
Constructors
publicconstructor
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: Address
amount: bigint
Returns Withdrawal
Properties
publicreadonlyaddress
publicreadonlyamount
publicreadonlyindex
publicreadonlyvalidatorIndex
Methods
publicraw
Returns WithdrawalBuffer
publictoJSON
Returns { address: string; amount: string; index: string; validatorIndex: string }
address: string
amount: string
index: string
validatorIndex: string
publictoValue
Returns { address: Buffer; amount: bigint; index: bigint; validatorIndex: bigint }
address: Buffer
amount: bigint
index: bigint
validatorIndex: bigint
publicstaticfromValuesArray
Parameters
withdrawalArray: WithdrawalBuffer
Returns Withdrawal
publicstaticfromWithdrawalData
Parameters
withdrawalData: WithdrawalData
Returns Withdrawal
publicstatictoBufferArray
Convert a withdrawal to a buffer array
Parameters
withdrawal: WithdrawalData | Withdrawal
the withdrawal to convert
Returns WithdrawalBuffer
buffer array of the withdrawal
Representation of EIP-4895 withdrawal data