UNPKG

zklogin-plus

Version:

A powerful zkLogin plugin for Sui blockchain - inspired by @mysten/enoki

51 lines 1.4 kB
import type { Storage } from '../types'; /** * 浏览器localStorage存储实现 */ export declare class BrowserStorage implements Storage { private prefix; constructor(prefix?: string); private getKey; get(key: string): string | null; set(key: string, value: string): void; remove(key: string): void; clear(): void; } /** * 浏览器sessionStorage存储实现 */ export declare class BrowserSessionStorage implements Storage { private prefix; constructor(prefix?: string); private getKey; get(key: string): string | null; set(key: string, value: string): void; remove(key: string): void; clear(): void; } /** * 内存存储实现(用于测试或服务端) */ export declare class MemoryStorage implements Storage { private storage; private prefix; constructor(prefix?: string); private getKey; get(key: string): string | null; set(key: string, value: string): void; remove(key: string): void; clear(): void; } /** * 存储键名常量 */ export declare const STORAGE_KEYS: { readonly EPHEMERAL_KEYPAIR: "ephemeral_keypair"; readonly MAX_EPOCH: "max_epoch"; readonly RANDOMNESS: "randomness"; readonly USER_SALT: "user_salt"; readonly JWT_TOKEN: "jwt_token"; readonly ZKLOGIN_ADDRESS: "zklogin_address"; readonly ZK_PROOF: "zk_proof"; }; //# sourceMappingURL=index.d.ts.map