import type { Chain } from '../chains.js'; import type { CustomWalletClient } from '../client.js'; import type { TransportFactoryParams } from './createConfig.js'; import type { Transport } from 'viem'; export type CreateCustomWalletClientParams = { /** Default chain for operations when no chain is specified, defaults to {@link ETH_SEPOLIA} */ defaultChain?: Chain; /** Chains this client will work with */ chains?: Chain[]; /** Factory function that creates transport for a given chain */ customTransportFactory: (params: TransportFactoryParams) => Transport; }; /** * Creates a client with a custom wallet provider transport. * * @param params - The parameters for creating the client * @returns A configured Circle client instance with custom wallet support * * @example * Initialize a client with Fireblocks provider * ```typescript * import { createCustomWalletClient } from '@circle-fin/usdckit/utils' * import { custom } from 'viem' * import { FireblocksWeb3Provider } from '@fireblocks/fireblocks-web3-provider' * * const config = { * apiKey: process.env.FIREBLOCKS_API_KEY || '', * privateKey: process.env.FIREBLOCKS_API_PRIVATE_KEY_PATH || '', * vaultAccountIds: ['2'], * apiBaseUrl: ApiBaseUrl.Sandbox, * }; * * const client = createCustomWalletClient({ * defaultChain: chains.ETH_SEPOLIA, * chains: [chains.ETH_SEPOLIA, chains.MATIC_AMOY], * customTransportFactory: ({ chainId }) => * custom( * new FireblocksWeb3Provider({ * ...config, * chainId, * }), * ), * }); * ``` */ export declare function createCustomWalletClient(params: CreateCustomWalletClientParams): CustomWalletClient;