Skip to main content

Overview

Mirador correlates Solana transactions to a trace by transaction signature — the ed25519 signature that uniquely identifies a Solana transaction (base58, ~88 chars). The Web3Plugin exposes this under its web3.solana namespace.
trace.web3.solana.addTxHint(tx.signature);
Unlike EVM hints, Solana hints take no chain argument. The chain identity is implicit — Solana doesn’t have a numeric chain ID, and the hint is emitted on the wire as chain_name = "solana". On the platform side, the hint is routed through the same correlation machinery as EVM tx hints, so Solana transactions appear inline in the trace waterfall alongside any other on-chain or off-chain activity.
Solana methods require the Web3Plugin. See Plugins for setup.

Adding a Solana Transaction Hint

Pass the signature returned by your Solana client of choice — @solana/web3.js, @solana/kit, Anchor, Jupiter, or anything that surfaces a base58 signature string.
import { Connection, sendAndConfirmTransaction } from '@solana/web3.js';

const signature = await sendAndConfirmTransaction(connection, transaction, [payer]);
trace.web3.solana.addTxHint(signature);

With Details

Attach a free-form note for downstream debugging:
trace.web3.solana.addTxHint(signature, 'Jupiter swap');
trace.web3.solana.addTxHint(refundSig, 'Refund leg');

Method Signature

trace.web3.solana.addTxHint(signature: string, details?: string): Trace
ParameterTypeRequiredDescription
signaturestringYesSolana transaction signature (base58, ed25519)
detailsstringNoFree-form note attached to the hint for debugging context

End-to-End Example

import { Client, Web3Plugin } from '@miradorlabs/web-sdk';
import { Connection, Transaction, sendAndConfirmTransaction } from '@solana/web3.js';

const client = new Client('your-api-key', {
  plugins: [Web3Plugin()],
});

async function executeSolanaSwap(params: SwapParams) {
  const trace = client.trace({ name: 'SolanaSwap' })
    .addAttributes({
      user: params.user,
      inputMint: params.inputMint,
      outputMint: params.outputMint,
      amount: params.amount,
    })
    .addTags(['swap', 'jupiter', 'solana']);

  try {
    trace.addEvent('quote_received');

    const tx = await buildSwapTransaction(params);
    const signature = await sendAndConfirmTransaction(connection, tx, [params.signer]);

    trace.web3.solana.addTxHint(signature, 'Swap settlement');
    trace.addEvent('confirmed');
  } catch (err) {
    trace.error('swap_failed', { message: err.message });
  }
}

Cross-Chain Workflows

Solana hints compose freely with EVM hints, Safe hints, and Relay hints. A trace that spans Solana and an EVM chain just calls both methods:
const trace = client.trace({ name: 'CrossChainBridge' });

// Leg 1: deposit on Ethereum
trace.web3.evm.addTxHint(ethTxHash, 'ethereum', 'Deposit');

// Leg 2: fill on Solana
trace.web3.solana.addTxHint(solanaSig, 'Fill');
For intent-based bridges that already touch Solana on one side, prefer web3.relay.addQuoteHint() and let the backend processor co-emit both legs for you.

Why No Chain Argument?

EVM tx hints carry a numeric chain ID so the backend knows which chain to look the tx hash up on. Solana doesn’t have a chain ID — there’s one mainnet, plus testnets/devnets that are identified by RPC endpoint, not by an enum value. So the API simply omits the chain parameter:
// EVM — chain is required
trace.web3.evm.addTxHint('0x123...', 'ethereum');

// Solana — no chain
trace.web3.solana.addTxHint('5Xy...');
The hint emits chain_name = "solana" on the wire so the platform routes it correctly.

Best Practices

Add the Hint as Soon as You Have the Signature

Don’t wait for confirmation. Solana sigs are deterministic from the transaction, so you can record the hint the instant you send:
const signature = await connection.sendTransaction(tx);
trace.web3.solana.addTxHint(signature);

// Then confirm
await connection.confirmTransaction(signature);

Describe Each Leg in a Multi-Tx Flow

When a single user action produces several Solana transactions (e.g. setup + swap, or staged Jupiter route), use the optional details arg to label each leg so the waterfall is self-explanatory:
trace.web3.solana.addTxHint(setupSig, 'ATA setup');
trace.web3.solana.addTxHint(swapSig, 'Swap execution');

Next Steps

EVM Transaction Hints

EVM tx correlation and the supported chain list

Relay Bridges

Intent-based cross-chain bridges

Plugins

Web3Plugin setup and namespaces