Skip to content

AccountSimulation.fromRpc

Converts a JSON-RPC account simulation spec to its domain representation.

Imports

Named
import { AccountSimulation } from 'ox/tempo'

Examples

import { AccountSimulation } from 'ox/tempo'
 
const spec = AccountSimulation.fromRpc(specRpc)

Definition

function fromRpc(
  spec: Rpc,
): Spec

Source: src/tempo/AccountSimulation.ts

Parameters

spec

  • Type: Rpc

JSON-RPC account simulation spec.

spec.approvals

  • Type: readonly PrimitiveApproval[]

Owner approvals to model.

spec.config

  • Type: 0x${string}

Canonical RLP-encoded applicable configuration.

spec.signer

  • Type: Address.Address | undefined
  • Optional

Account that signs the modeled key authorization. Omitted for a direct signature.

Return Type

The account simulation spec with decoded configurations.

Spec