UNPKG

@citizenwallet/sdk

Version:

An sdk to easily work with citizen wallet.

148 lines 3.92 kB
export interface ConfigCommunityTheme { primary: string; } export interface ConfigCommunityProfile { address: string; chain_id: number; } export interface ConfigContractLocation { address: string; chain_id: number; } export interface ConfigCommunity { name: string; description: string; url: string; alias: string; custom_domain?: string; logo: string; hidden?: boolean; theme?: ConfigCommunityTheme; profile: ConfigCommunityProfile; primary_token: ConfigContractLocation; primary_account_factory: ConfigContractLocation; primary_card_manager?: ConfigContractLocation; primary_session_manager?: ConfigContractLocation; } export interface ConfigToken { standard: string; name: string; address: string; symbol: string; decimals: number; chain_id: number; logo?: string; } export interface ConfigScan { url: string; name: string; } export interface ConfigAccount { chain_id: number; entrypoint_address: string; paymaster_address: string; account_factory_address: string; paymaster_type: string; } export interface ConfigClassicCard { chain_id: number; address: string; type: string; } export interface ConfigSafeCard { chain_id: number; instance_id: string; address: string; type: string; } export interface ConfigSession { chain_id: number; module_address: string; factory_address: string; provider_address: string; } export interface ConfigChainNode { url: string; ws_url: string; } export interface ConfigChain { id: number; node: ConfigChainNode; } export interface ConfigIPFS { url: string; } export interface ConfigPlugin { name: string; icon: string; url: string; action?: string; launch_mode?: string; signature?: boolean; token_chain_id?: number; token_address?: string; } export interface Config { community: ConfigCommunity; tokens: { [key: string]: ConfigToken; }; scan: ConfigScan; accounts: { [key: string]: ConfigAccount; }; cards?: { [key: string]: ConfigClassicCard | ConfigSafeCard; }; sessions?: { [key: string]: ConfigSession; }; chains: { [key: string]: ConfigChain; }; ipfs: ConfigIPFS; plugins?: ConfigPlugin[]; config_location: string; version: number; } export declare class CommunityConfig { config: Config; constructor(config: Config); get primaryToken(): ConfigToken; get primaryNetwork(): ConfigChain; get primaryRPCUrl(): string; getToken(tokenAddress?: string): ConfigToken; getPlugins(tokenAddress: string, _chainId?: number): ConfigPlugin[] | undefined; getActionPlugin(name: string, _tokenAddress?: string, _chainId?: number): ConfigPlugin | undefined; getRPCUrl(accountFactoryAddress?: string): string; get primaryAccountConfig(): ConfigAccount; getAccountConfig(accountFactoryAddress?: string): ConfigAccount; get primarySessionConfig(): ConfigSession; get primaryCardConfig(): ConfigClassicCard | ConfigSafeCard; get primaryClassicCardConfig(): ConfigClassicCard; get primarySafeCardConfig(): ConfigSafeCard; communityUrl(baseDomain: string): string; get explorer(): ConfigScan; get community(): ConfigCommunity; get tokens(): { [key: string]: ConfigToken; }; get scan(): ConfigScan; get accounts(): { [key: string]: ConfigAccount; }; get sessions(): { [key: string]: ConfigSession; } | undefined; get cards(): { [key: string]: ConfigClassicCard | ConfigSafeCard; } | undefined; get chains(): { [key: string]: ConfigChain; }; get ipfs(): ConfigIPFS; get plugins(): ConfigPlugin[] | undefined; get configLocation(): string; get version(): number; } //# sourceMappingURL=index.d.ts.map