import { IStore } from "../store"; import { ConnectUniversalDataReply } from "./ton"; import { DappMetadata } from "./dapp-metadata"; import { OpenAppLinkType, ConnectMethodResponseItem, EthereumRpcMap } from "../index"; import { WalletName } from "../../inject"; export type SessionNamespace = SessionTypes.Namespace; export declare namespace SessionTypes { type Expiry = number; interface Namespace { chains: string[]; accounts: string[]; methods: string[]; extra?: { [key: string]: { [key: string]: string; }; }; rpcMap?: EthereumRpcMap; defaultChain?: string; payload?: ConnectUniversalDataReply; } type Namespaces = Record; interface SessionConfig extends ConnectSessionConfig { dappInfo: DappMetadata; } interface ConnectSessionConfig { openUniversalUrl?: boolean; redirect?: string; tmaReturnUrl?: string; useMini?: boolean; connectWalletType?: ConnectWalletType; openAppLinkType?: OpenAppLinkType; sortedIds?: WalletName[]; } interface Wallet { platform: string; appName: string; appVersion: string; maxProtocolVersion: number; walletName?: string; } interface Struct { topic: string; namespaces: Namespaces; sessionConfig?: SessionConfig; signResponse?: ConnectMethodResponseItem[]; wallet?: Wallet; } } export type SessionConfigWallet = { icon: string; downloadUrl: string; }; export type ISession = IStore; export declare enum ConnectWalletType { OKX_MINI = 110, OKX_APP = 100, OKX_WALLET = 120, OKX_APP_COMMON = 130 }