interface StorageProvider { get(key: string): Promise; set(key: string, value: string, expiresAt?: string): Promise; remove(key: string): Promise; } declare class CookieStorage implements StorageProvider { get(key: string): Promise; set(key: string, value: string, expiresAt?: string): Promise; remove(key: string): Promise; } /** * Extracts the project ID from an API key for cookie scoping. * This ensures each project has its own JWT storage to prevent audience mismatch issues. * Falls back to "default" if the API key is invalid or missing. */ declare function getProjectIdFromApiKey(apiKey: string | undefined | null): string; /** * Cookie storage that scopes cookies by project ID. * This prevents JWT conflicts when switching between different projects. * * For reads: scoped cookies are checked first. For refresh tokens only, * falls back to legacy unscoped cookies so the token can be sent to the * server for validation. The caller (CrossmintAuthClient) is responsible * for verifying the JWT audience after refresh and calling * `deleteLegacyCookies()` to clean up the legacy cookies once the * audience has been verified. */ declare class ScopedCookieStorage implements StorageProvider { private projectId; constructor(apiKey: string); getProjectId(): string; private getScopedKey; get(key: string): Promise; set(key: string, value: string, expiresAt?: string): Promise; remove(key: string): Promise; /** * Delete legacy unscoped cookies after a successful, verified refresh. * Called by CrossmintAuthClient once the JWT audience has been confirmed * to match the current project. */ deleteLegacyCookies(): void; } declare function getDefaultStorageProvider(): StorageProvider; declare function getScopedStorageProvider(apiKey: string): StorageProvider; export { CookieStorage, ScopedCookieStorage, type StorageProvider, getDefaultStorageProvider, getProjectIdFromApiKey, getScopedStorageProvider };