import { type CustomTransport, type Transport } from "viem"; export interface SplitTransportParams { overrides: { methods: string[]; transport: Transport; }[]; fallback: Transport; } /** * The Split Transport allows you to split RPC traffic for specific methods across * different RPC providers. This is done by specifying the methods you want handled * specially as overrides and providing a fallback transport for all other methods. * * @example * ```ts * import { createPublicClient, http } from "viem"; * import { split } from "@aa-sdk/core"; * * const bundlerMethods = [ * "eth_sendUserOperation", * "eth_estimateUserOperationGas", * "eth_getUserOperationReceipt", * "eth_getUserOperationByHash", * "eth_supportedEntryPoints" * ]; * * const clientWithSplit = createPublicClient({ * transport: split({ * overrides: [{ * methods: bundlerMethods, * transport: http(BUNDLER_RPC_URL) * }], * fallback: http(OTHER_RPC_URL) * }), * }); * ``` * * @param {SplitTransportParams} params split transport configuration containing the methods overrides and fallback transport * @returns {CustomTransport} a viem Transport that splits traffic */ export declare const split: (params: SplitTransportParams) => CustomTransport;