@particle-network/connectkit
Version:
48 lines (47 loc) • 1.6 kB
TypeScript
import type { CreateWalletConnectorFn } from '@particle-network/connector-core';
import type { CreatePluginFn } from '@particle-network/plugin-core';
import type { Chain } from 'viem/chains';
import type { Languages, Locales } from '../locales';
import type { RoutePath } from '../pages';
import type { ConnectorTypeValue, Mode, Theme } from '../types';
import type { CountryCode } from '../types/country';
export interface Route {
path: RoutePath;
state?: object;
}
export type ConnectKitOptions = {
projectId: string;
clientKey: string;
appId: string;
appearance?: Appearance;
chains: readonly [Chain, ...Chain[]];
walletConnectors: readonly [CreateWalletConnectorFn, ...CreateWalletConnectorFn[]];
plugins?: CreatePluginFn<unknown, any, any>[];
initialChainId?: {
evm?: number;
solana?: 101 | 102 | 103;
};
};
export type Appearance = {
mode?: Mode;
theme?: Theme;
language?: Languages;
overrideLocales?: Locales;
connectorsOrder?: ConnectorTypeValue[];
splitEmailAndPhone?: boolean;
collapseWalletList?: boolean;
hideContinueButton?: boolean;
recommendedWallets?: WalletRecommend[];
logo?: false | string | {
light: string;
dark: string;
};
filterCountryCallingCode?: (countrys: CountryCode[]) => CountryCode[];
collapsePasskeyButton?: boolean | 'as-social';
isDismissable?: boolean;
inlineSelectorId?: string;
};
export type WalletRecommend = {
walletId: string;
label?: 'recommended' | 'popular' | 'Recommended' | 'Popular' | 'none' | string;
};