TransactionRequest.fromRpc
Converts a TransactionRequest.Rpc to a TransactionRequest.TransactionRequest.
Imports
Named
import { TransactionRequest } from 'ox'Examples
import { TransactionRequest } from 'ox'
const request = TransactionRequest.fromRpc({
to: '0x0000000000000000000000000000000000000000',
value: '0x2386f26fc10000',
})Definition
function fromRpc(
request: Rpc,
): TransactionRequestSource: src/core/TransactionRequest.ts
Parameters
request
- Type:
Rpc
The RPC request to convert.
request.data
- Type:
0x${string}
Frame calldata.
request.executionGas
- Type:
0x${string}
Execution gas budget.
request.flags
- Type:
0x${string}
Approval scope and batching bits.
request.mode
- Type:
0x${string}
Execution mode.
request.msg
- Type:
0x${string} - Optional
Explicit digest, or empty bytes for the transaction signing hash.
request.scheme
- Type:
"0x0" | "0x1" | "0x2"
Signature verification scheme.
request.signature
- Type:
0x${string} - Optional
Encoded signature bytes.
request.signer
- Type:
Address.Address | null | undefined - Optional
Signer address; absent for the transaction sender.
request.stateGas
- Type:
0x${string}
State gas budget.
request.target
- Type:
Address.Address | null | undefined - Optional
Target address; absent for the transaction sender.
request.value
- Type:
0x${string}
Value transferred in wei.
Return Type
A transaction request.
TransactionRequest

