• Provide a Sapphire encrypted RPC transport for Wagmi or Viem.

    Example:

    import { createConfig } from 'viem';
    import { sapphireHttpTransport } from '@oasisprotocol/sapphire-viem-v2';

    export const config = createConfig({
    transports: {
    [sapphireTestnet.id]: sapphireHttpTransport()
    },
    ...
    });

    Results for every instance of sapphireHttpTransport() are cached to prevent the wrapper from being instantiated multiple times.

    Type Parameters

    • T extends Transport

    Returns T

    Same as http()