Withdrawal.fromRpc
Converts a Withdrawal.Rpc
to an Withdrawal.Withdrawal
.
Imports
Named
import { Withdrawal } from 'ox'
Examples
import { Withdrawal } from 'ox'
const withdrawal = Withdrawal.fromRpc({
address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',
amount: '0x620323',
index: '0x0',
validatorIndex: '0x1',
})
{ address: '0x00000000219ab540356cBB839Cbe05303d7705Fa', amount: 6423331n, index: 0, validatorIndex: 1 }
Definition
function fromRpc(
withdrawal: Rpc,
): Withdrawal
Source: src/core/Withdrawal.ts
Parameters
withdrawal
- Type:
Rpc
The RPC withdrawal to convert.
Return Type
An instantiated Withdrawal.Withdrawal
.
Withdrawal