UNPKG

@particle-network/connectkit

Version:
14 lines (13 loc) 757 B
import type { ChainType, Connection, EVMChain, Evaluate, SolanaWalletClient } from '@particle-network/connector-core'; import type { WalletClient } from 'viem'; import type { Config } from '../createConfig'; export type MapWalletClientParamers = { connections: Connection[]; config: Config; }; export type WalletClientType<chainType extends ChainType = EVMChain> = chainType extends EVMChain ? WalletClient : SolanaWalletClient; export type Wallet = Readonly<Evaluate<{ getWalletClient: <chainType extends ChainType = EVMChain>() => WalletClientType<chainType>; } & Connection>>; export type MapWalletClientReturnType = Wallet[]; export declare const mapWalletClient: (parameters: MapWalletClientParamers) => Promise<MapWalletClientReturnType>;