Skip to main content

Withdrawal

Representation of EIP-4895 withdrawal data

Index

Constructors

publicconstructor

  • new Withdrawal(index: bigint, validatorIndex: bigint, address: Address, amount: bigint): 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: Address
    • amount: bigint

    Returns Withdrawal

Properties

publicreadonlyaddress

address: Address

publicreadonlyamount

amount: bigint

publicreadonlyindex

index: bigint

publicreadonlyvalidatorIndex

validatorIndex: bigint

Methods

publicraw

publictoJSON

  • toJSON(): { address: string; amount: string; index: string; validatorIndex: string }
  • Returns { address: string; amount: string; index: string; validatorIndex: string }

    • address: string
    • amount: string
    • index: string
    • validatorIndex: string

publictoValue

  • toValue(): { address: Buffer; amount: bigint; index: bigint; validatorIndex: bigint }
  • Returns { address: Buffer; amount: bigint; index: bigint; validatorIndex: bigint }

    • address: Buffer
    • amount: bigint
    • index: bigint
    • validatorIndex: bigint

publicstaticfromValuesArray

publicstaticfromWithdrawalData

publicstatictoBufferArray