@web3-react/walletconnect-v2
Version:
23 lines (22 loc) • 929 B
TypeScript
/**
* Necessary type to interface with @walletconnect/ethereum-provider@2.9.2 which is currently unexported
*/
export type ArrayOneOrMore<T> = {
0: T;
} & Array<T>;
/**
* This is a type guard for ArrayOneOrMore
*/
export declare function isArrayOneOrMore<T>(input?: T[]): input is ArrayOneOrMore<T>;
/**
* @param rpcMap - Map of chainIds to rpc url(s).
* @param timeout - Timeout, in milliseconds, after which to consider network calls failed.
*/
export declare function getBestUrlMap(rpcMap: Record<string, string | string[]>, timeout: number): Promise<{
[chainId: string]: string;
}>;
/**
* @param chains - An array of chain IDs.
* @param defaultChainId - The chain ID to treat as the default (it will be the first element in the returned array).
*/
export declare function getChainsWithDefault(chains: number[] | ArrayOneOrMore<number> | undefined, defaultChainId: number | undefined): number[] | undefined;