Secure storage and distribution of cryptographic keys in ATProto applications
at main 37 lines 939 B view raw
1/** 2 * Type definitions for @atpkeyserver/client 3 */ 4 5// Re-export generated lexicon types 6export type { 7 Keypair, 8 PublicKey, 9 GroupKey, 10 KeyVersionInfo, 11 RotationResult, 12 MemberResult, 13 AccessLogEntry, 14} from './lexicon/types/dev/atpkeyserver/alpha/defs.js' 15 16// Keyserver client configuration 17export interface KeyserverClientConfig { 18 keyserverDid: string 19 keyserverUrl?: string // Optional, derived from DID if not provided 20 getServiceAuthToken: (aud: string, lxm: string) => Promise<string> 21 cache?: CacheOptions 22 retry?: RetryOptions 23} 24 25// Cache configuration 26export interface CacheOptions { 27 activeKeyTtl?: number // Default: 3600000ms (1 hour) 28 historicalKeyTtl?: number // Default: 86400000ms (24 hours) 29 maxSize?: number // Default: 1000 keys 30} 31 32// Retry configuration 33export interface RetryOptions { 34 enabled?: boolean // Default: true 35 maxRetries?: number // Default: 3 36 baseDelay?: number // Default: 100ms 37}