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