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

