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:Methods
request()
Send an RPC request through the provider. Implements the EIP-1193request interface.
Intercepted Methods
Parameters
Returns
Promise<unknown> — the RPC response from the underlying provider
Examples
Captured Data
On Successful Transaction
Wheneth_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 }
Next Steps
EIP-1193 Provider Guide
Detailed guide with library integration examples
Types
EIP1193Provider, MiradorProviderOptions