UNPKG

@gemini-wallet/core

Version:

Core SDK for Gemini Wallet integration with popup communication

48 lines 1.74 kB
/** * Interface for storage backends used by the Gemini wallet SDK */ export interface IStorage { /** * Store a serializable object in storage * @param key Storage key * @param item Object to store */ storeObject<T>(key: string, item: T): Promise<void>; /** * Load a serializable object from storage * @param key Storage key * @param fallback Default value if key doesn't exist * @returns The stored object or fallback */ loadObject<T>(key: string, fallback: T): Promise<T>; /** * Store a string value in storage * @param key Storage key * @param value String value to store */ setItem(key: string, value: string): Promise<void>; /** * Retrieve a string value from storage * @param key Storage key * @returns The stored string or null if not found */ getItem(key: string): Promise<string | null>; /** * Remove an item from storage * @param key Storage key */ removeItem(key: string): Promise<void>; /** * Remove multiple items from storage * @param keys Array of storage keys to remove */ removeItems(keys: string[]): Promise<void>; } export declare const STORAGE_ETH_ACCOUNTS_KEY = "eth-accounts"; export declare const STORAGE_ETH_ACTIVE_CHAIN_KEY = "eth-active-chain"; export declare const STORAGE_PASSKEY_CREDENTIAL_KEY = "passkey-credential"; export declare const STORAGE_PRESERVED_PASSKEY_CREDENTIALS_KEY = "preserved-passkey-credentials"; export declare const STORAGE_SMART_ACCOUNT_KEY = "smart-account"; export declare const STORAGE_SETTINGS_KEY = "settings"; export declare const STORAGE_WC_REQUESTS_KEY = "wc-requests"; //# sourceMappingURL=storageInterface.d.ts.map