UNPKG

@exromany/lido-csm-sdk

Version:

[![GitHub license](https://img.shields.io/github/license/lidofinance/lido-csm-sdk?color=limegreen)](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [![Version npm](https://img.shields.io/npm/v/@lidofinance/lido-csm-sdk?label=version)](h

41 lines 1.18 kB
import { Hex } from 'viem'; import { CsmSDKModule } from '../common/class-primitives/csm-sdk-module.js'; export declare class KeysCacheSDK extends CsmSDKModule { private get storageKey(); /** * Get all keys from storage for current chain */ private getKeys; /** * Save keys to storage for current chain */ private setKeys; /** * Add pubkeys to cache with current timestamp * Automatically cleans expired keys */ addPubkeys(pubkeys: Hex[]): void; /** * Remove specific pubkeys from cache * Automatically cleans expired keys */ removePubkeys(pubkeys: Hex[]): void; /** * Clear all cached keys for current chain */ clearAllKeys(): void; /** * Check if a specific pubkey exists in cache and is not expired */ hasCachedKey(pubkey: Hex): boolean; /** * Get all valid (non-expired) cached keys * Automatically cleans expired keys during retrieval */ getCachedKeys(): Hex[]; /** * Check if pubkey would be a duplicate (already exists in cache) */ isDuplicate(pubkey: Hex): boolean; } //# sourceMappingURL=keys-cache-sdk.d.ts.map