@nostr-dev-kit/ndk-mobile
Version:
NDK Mobile
64 lines • 2.62 kB
TypeScript
/**
* Mint Methods for NDK Mobile
*
* This module provides functionality for managing Cashu mint information
* with SQLite persistence.
*/
import type { NDKCacheAdapterSqlite } from "../cache-adapter/sqlite/index.js";
import type { MintInfoResponse, MintKeys, StoredMintInfo, StoredMintKeys } from "../types/cashu.js";
/**
* Gets mint information from the database
* @param url - The URL of the mint
* @returns The mint information or null if not found
*/
export declare function getMintInfo(this: NDKCacheAdapterSqlite, url: string): MintInfoResponse | null;
/**
* Gets complete mint information record including metadata
* @param url - The URL of the mint
* @returns The complete mint info record or null if not found
*/
export declare function getMintInfoRecord(this: NDKCacheAdapterSqlite, url: string): StoredMintInfo | null;
/**
* Gets all stored mint information
* @returns Array of stored mint info records
*/
export declare function getAllMintInfo(this: NDKCacheAdapterSqlite): StoredMintInfo[];
/**
* Saves mint information to the database
* @param url - The URL of the mint
* @param payload - The mint information to save
*/
export declare function setMintInfo(this: NDKCacheAdapterSqlite, url: string, payload: MintInfoResponse): void;
/**
* Gets all mint keys for a specific mint URL
* @param url - The URL of the mint
* @returns Array of mint keys
*/
export declare function getMintKeys(this: NDKCacheAdapterSqlite, url: string): MintKeys[];
/**
* Gets a specific keyset by mint URL and keyset ID
* @param url - The URL of the mint
* @param keysetId - The ID of the keyset
* @returns The mint keys or null if not found
*/
export declare function getMintKeyset(this: NDKCacheAdapterSqlite, url: string, keysetId: string): MintKeys | null;
/**
* Gets complete mint keys record including metadata
* @param url - The URL of the mint
* @param keysetId - The ID of the keyset
* @returns The complete mint keys record or null if not found
*/
export declare function getMintKeysetRecord(this: NDKCacheAdapterSqlite, url: string, keysetId: string): StoredMintKeys | null;
/**
* Gets all mint keys records for all mints
* @returns Array of stored mint keys records
*/
export declare function getAllMintKeysets(this: NDKCacheAdapterSqlite): StoredMintKeys[];
/**
* Saves a mint keyset to the database
* @param url - The URL of the mint
* @param keysetId - The ID of the keyset
* @param keys - The mint keys to save
*/
export declare function setMintKeys(this: NDKCacheAdapterSqlite, url: string, keysetId: string, keys: MintKeys): void;
//# sourceMappingURL=mint-methods.d.ts.map