Skip to main content
Web Client SDK:
Node.js SDK:

Overview

MiradorProvider wraps any EIP-1193 compatible provider and automatically captures transaction data into Mirador traces. It intercepts eth_sendTransaction and eth_sendRawTransaction calls, recording tx hints and errors, while passing all other RPC methods through unchanged.

Constructor

Parameters

MiradorProviderOptions

Examples

Basic usage:
With trace options:
Bound to a trace:

Methods

request()

Send an RPC request through the provider. Implements the EIP-1193 request interface.

Intercepted Methods

Parameters

Returns

Promise<unknown> — the RPC response from the underlying provider

Examples

Captured Data

On Successful Transaction

When eth_sendTransaction succeeds, the following is captured in the trace:
  • TxHint: transaction hash + chain + input data (calldata)
  • Event tx:sent: { txHash, method: 'eth_sendTransaction' }

On Failed Transaction

When a transaction fails (user rejection, revert, etc.), the following is captured:
  • Event tx:error: { message, code, data, method }
The original error is always re-thrown.

Next Steps

EIP-1193 Provider Guide

Detailed guide with library integration examples

Types

EIP1193Provider, MiradorProviderOptions