import type { StandardSchemaV1 } from '@standard-schema/spec'; import type { IAccountInfo, IAdapter, IBaseWalletAdapterOptions, ICommand, IKdaMethodMap, INetworkInfo, IProvider, ISigningRequestPartial, IUnsignedCommand, KdaMethod, KdaRequestArgs } from './types'; /** * @public * An abstract base adapter that implements common (and minimal) functionality. * Concrete adapters (e.g. Ecko, XWallet) can override or extend these behaviors. */ export declare abstract class BaseWalletAdapter implements IAdapter { abstract name: string; protected provider: IProvider; protected networkId: string; connectSchema: StandardSchemaV1; constructor(options: IBaseWalletAdapterOptions); /** * Forward a typed `request` to the underlying provider. * We cast the result to ensure it matches the method's return type. * Validates that the response is a JSON-RPC 2.0 compliant response. * Throws an error if the response does not conform to the standard. */ request(args: KdaRequestArgs): Promise; on(event: string, listener: (...args: any[]) => void): this; off(event: string, listener: (...args: any[]) => void): this; /** * Connect: call `kadena_connect`. params are defined per specific adapter. */ connect(params: StandardSchemaV1.InferInput>): Promise; /** * Disconnect: call `kadena_disconnect` with optional networkId. */ disconnect(): Promise; /** * Returns the currently active account by calling `kadena_getAccount_v1`. */ getActiveAccount(): Promise; /** * Retrieve all accounts via `kadena_getAccounts_v2`. */ getAccounts(): Promise; /** * Get the currently active network by calling `kadena_getNetwork_v1`. */ getActiveNetwork(): Promise; /** * Retrieve all networks via `kadena_getNetworks_v1`. */ getNetworks(): Promise; /** * Sign a transaction: call `kadena_signTransaction`. * Uses kadena_quicksign_v1 */ signTransaction(command: IUnsignedCommand | IUnsignedCommand[]): Promise<(IUnsignedCommand | ICommand) | (IUnsignedCommand | ICommand)[]>; /** * Sign a command: call `kadena_signCommand`. * Uses kadena_sign_v1 */ signCommand(command: IUnsignedCommand | ISigningRequestPartial): Promise; /** * Subscribe to account-change events. */ onAccountChange(cb: (newAccount: IAccountInfo) => void): void; /** * Subscribe to network-change events. */ onNetworkChange(cb: (newNetwork: INetworkInfo) => void): void; }