import { BaseWalletAdapter } from '@kadena/wallet-adapter-core'; import type { IAccountInfo } from '@kadena/wallet-adapter-core'; import type { IBaseWalletAdapterOptions } from '@kadena/wallet-adapter-core'; import type { IBaseWalletFactoryOptions } from '@kadena/wallet-adapter-core'; import type { IKdaMethodMap } from '@kadena/wallet-adapter-core'; import { IProvider } from '@kadena/wallet-adapter-core'; import type { SessionTypes } from '@walletconnect/types'; /** * WalletConnect Adapter Factory * * This function creates a WalletConnect adapter factory that detects the WalletConnect provider * and returns a new instance of the `WalletConnectAdapter`. The adapter method **lazily** imports * the `WalletConnectAdapter` class. The `detect` function is separated so that the `WalletAdapterClient` * can check for the provider without instantiating the adapter. * * By using `await import("./WalletConnectAdapter")`, the adapter code for WalletConnect is only loaded * when it is actually needed. This **lazy loading** approach helps reduce your initial bundle size, * especially when multiple wallet adapters might be registered but not all are necessarily used. * * @param options - The options object from BaseWalletAdapter. * @returns An object containing the adapter factory details for WalletConnect. * @public */ export declare const createWalletConnectAdapter: (options?: IWalletConnectFactoryOptions) => { name: string; detect: () => Promise; adapter: (provider: IProvider) => Promise; }; /** * Provide a mock for wallet connect, since this modal needs to be dynamically built * it will be re-created inside the adapter, and we can safely assume it is always available. * * @returns A promise resolving to the WalletConnect provider or null. * @public */ export declare function detectWalletConnectProvider(): Promise; /** * ExtendedMethod represents the keys of the ExtendedMethodMap. * * @public */ declare type ExtendedMethod = keyof ExtendedMethodMap; /** * ExtendedMethodMap combines the standard KdaMethodMap with Ecko-specific methods. * * @public */ declare type ExtendedMethodMap = IKdaMethodMap & IWalletConnectMethodMap; /** * WalletConnectKadenaProvider interface * * If WalletConnect is not set, detection can fallback or return null. */ declare interface IWalletConnectAdapterOptions extends IBaseWalletAdapterOptions { relayUrl: string; projectId: string; } declare interface IWalletConnectFactoryOptions extends IBaseWalletFactoryOptions { relayUrl?: string; projectId?: string; } /** * Represents the extended method map specific to Ecko Wallet. * * Contains custom methods specific to Ecko Wallet, such as a custom checkStatus. * * @public */ declare interface IWalletConnectMethodMap { } declare interface IWalletConnectProvider extends IProvider { connected: boolean; accounts: string[]; session?: SessionTypes.Struct; } /** @public */ export declare const WALLET_CONNECT_ADAPTER = "WalletConnect"; /** * @public * WalletConnectAdapter is a class that extends BaseWalletAdapter to provide * functionality for connecting to any wallet supporting WalletConnect. */ export declare class WalletConnectAdapter extends BaseWalletAdapter { name: string; protected provider: IWalletConnectProvider; protected networkId: string; private client?; private modal; private options; constructor(options: Partial); request(args: { id: number; method: M; params?: ExtendedMethodMap[M]['params']; }): Promise; private subscribeToEvents; private checkPersistedState; connect(): Promise; private connectWallet; private onSessionConnected; disconnect(): Promise; getAccounts(contracts?: string[]): Promise; getActiveAccount(contracts?: string[]): Promise; checkStatus(): Promise<{ status: string; message?: string; account?: IAccountInfo; }>; changeNetwork(): Promise; } export { }