Skip to main content

Overview

Plugins extend trace functionality by adding namespaced methods and lifecycle hooks. The SDK ships with a built-in Web3Plugin for blockchain integration, and you can create custom plugins for your own needs.

Web3Plugin

The Web3Plugin provides all blockchain-related methods — EVM transaction hints, Safe multisig tracking, Solana transaction hints, Relay (relay.link) bridge tracking, Canton (Daml Ledger API) transaction hints, and provider-based transaction sending.

Setup

Namespaced Methods

Once installed, Web3 methods are available on every trace under the web3 namespace:

Method Chaining

Web3 methods return the trace instance for chaining:

Plugin Lifecycle Hooks

Plugins can hook into the trace lifecycle:

Creating Custom Plugins

A plugin implements the MiradorPlugin interface:

Using Custom Plugins

TraceContext

The TraceContext object passed to setup() provides read/write access to the trace:
Always check context.isClosed() before starting async work (timers, listeners, network calls) in your plugin — the trace may have been closed between setup and your callback firing.

FlushBuilder

The FlushBuilder passed to onFlush lets plugins contribute data to the outgoing flush:

Next Steps

Transaction Hints

EVM transaction hints via the Web3 plugin

Solana Transactions

Solana signature hints — no chain argument

Safe Multisig

Safe message and transaction tracking

Relay Bridges

Intent-based cross-chain bridges