import type { ShopInterface } from "./repository.js"; import { WebCryptoHmacSigner } from "./signer.js"; export interface DualSignatureConfiguration { appSecret: string; enforceDoubleSignature: boolean; } export declare class DualSignatureVerifier { private readonly signer; private readonly now; constructor(signer: WebCryptoHmacSigner, now?: () => Date); authenticateRegistrationRequest(req: Request, cfg: DualSignatureConfiguration, shop: Shop | null): Promise; authenticateRegistrationConfirmation(req: Request, body: string, shop: Shop, cfg: DualSignatureConfiguration): Promise; authenticatePostRequest(req: Request, body: string, shop: Shop): Promise; authenticateGetRequest(req: Request, shop: Shop): Promise; private verifyRegistrationAppSignature; private verifyRegistrationShopSignature; private verifyPostSignature; private getRegistrationSignatureMessage; private tryAuthenticateWithPreviousSecret; /** * @deprecated tag:v6.0.0 - Will be removed. Double signature verification will always be enforced. * * 1. If the shop has previously verified with a double signature, it must always do so * 2. If the shop is sending a double signature, then we should also verify it * 3. If the app is configured to enforce double signature, then we should force it */ private shouldEnforceDoubleSignature; private shouldEnforceDoubleSignatureForRegister; private shouldEnforceDoubleSignatureForRegisterConfirm; } //# sourceMappingURL=dual-signature-verifier.d.ts.map