/** * Zero-dependency ES256 JWT minting for the App Store Connect API. * * Apple requires ES256 (ECDSA P-256 + SHA-256) tokens signed with the .p8 * private key downloaded from App Store Connect → Users and Access → * Integrations. Tokens are valid for at most 20 minutes; we mint with a * 10-minute lifetime and cache in memory until 60 s before expiry. * * SECURITY: the private key and the minted token are NEVER logged or * persisted — the cache is process-memory only. */ export interface AscKeyConfig { /** Key ID, e.g. "2X9R4HXF34" (10 uppercase alphanumeric chars). */ keyId: string; /** Issuer ID (UUID) from the Integrations page. */ issuerId: string; /** Contents of the .p8 file (PEM, PKCS#8 EC P-256). */ privateKeyPem: string; } export interface AscToken { token: string; /** Epoch milliseconds when the token expires. */ expiresAt: number; } /** * Mints (or returns a cached) ES256 JWT for App Store Connect. * * Header: { alg: "ES256", kid, typ: "JWT" } * Payload: { iss, iat, exp: iat + 600, aud: "appstoreconnect-v1" } * Signature: ECDSA P-256 / SHA-256 in IEEE P1363 (r||s) encoding — the JOSE * format. Node's default DER encoding is NOT accepted by Apple. */ export declare function mintAscToken(config: AscKeyConfig): AscToken; /** Clears the in-memory token cache (used by tests). */ export declare function clearAscTokenCache(): void; //# sourceMappingURL=asc-jwt.d.ts.map