TransactionEnvelopeEip1559.toRpc
Converts an TransactionEnvelopeEip1559.TransactionEnvelopeEip1559
to an TransactionEnvelopeEip1559.Rpc
.
Imports
Named
import { TransactionEnvelopeEip1559 } from 'ox'
Examples
import { RpcRequest, TransactionEnvelopeEip1559, Value } from 'ox'
const envelope = TransactionEnvelopeEip1559.from({
chainId: 1,
nonce: 0n,
gas: 21000n,
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: Value.fromEther('1'),
})
const envelope_rpc = TransactionEnvelopeEip1559.toRpc(envelope)
const request = RpcRequest.from({
id: 0,
method: 'eth_sendTransaction',
params: [envelope_rpc],
})
Definition
function toRpc(
envelope: TransactionEnvelopeEip1559.TransactionEnvelopeEip1559,
): Rpc
Source: src/core/TransactionEnvelopeEip1559.ts
Parameters
envelope
- Type:
TransactionEnvelopeEip1559.TransactionEnvelopeEip1559
The EIP-1559 transaction envelope to convert.
Return Type
An RPC-formatted EIP-1559 transaction envelope.
Rpc