import { AcmeCrypto } from './acme.classes.crypto.js'; import { type TAcmeLogger } from './acme.classes.http-client.js'; import type { IAcmeAccount, IAcmeAccountCreateRequest, IAcmeAuthorization, IAcmeChallenge, IAcmeIdentifier, IAcmeOrder } from './acme.interfaces.js'; export interface IAcmeClientOptions { directoryUrl: string; accountKeyPem: string; logger?: TAcmeLogger; } /** * Top-level ACME client facade. * Composes HTTP transport, account management, order lifecycle, and challenge handling. */ export declare class AcmeClient { private httpClient; private account; private orderManager; private challengeManager; /** Well-known CA directory URLs */ static directory: { readonly letsencrypt: { readonly production: "https://acme-v02.api.letsencrypt.org/directory"; readonly staging: "https://acme-staging-v02.api.letsencrypt.org/directory"; }; readonly buypass: { readonly production: "https://api.buypass.com/acme/directory"; readonly staging: "https://api.test4.buypass.no/acme/directory"; }; }; /** Crypto utilities */ static crypto: typeof AcmeCrypto; constructor(options: IAcmeClientOptions); /** * Register or retrieve an ACME account */ createAccount(request: IAcmeAccountCreateRequest): Promise; /** * Create a new certificate order */ createOrder(opts: { identifiers: IAcmeIdentifier[]; }): Promise; /** * Get all authorizations for an order */ getAuthorizations(order: IAcmeOrder): Promise; /** * Compute the key authorization string for a challenge (sync) */ getChallengeKeyAuthorization(challenge: IAcmeChallenge): string; /** * Notify the ACME server to validate a challenge */ completeChallenge(challenge: IAcmeChallenge): Promise; /** * Poll an ACME resource until it reaches valid/ready status */ waitForValidStatus(item: { url: string; }): Promise; /** * Finalize an order by submitting the CSR */ finalizeOrder(order: IAcmeOrder, csrPem: string): Promise; /** * Download the certificate chain (PEM) */ getCertificate(order: IAcmeOrder): Promise; /** * Destroy HTTP transport to release sockets and allow process exit. */ destroy(): void; }