import { PaymentDetails } from "./types"; /** Compute SHA-256 hash, return hex string */ export declare function sha256hex(data: string | Buffer): string; /** * Convert the fetch BodyInit into the exact bytes the server will see, so the * client-signed `body_sha256` matches what the middleware hashes from the raw * request body. Supports the BodyInit types we can deterministically serialize * synchronously; anything else (Blob, FormData, URLSearchParams, ReadableStream) * is rejected so the caller gets a clear error instead of a silent hash * mismatch downstream at /v1/verify. */ export declare function bodyToBytes(body: unknown): Buffer; /** Compute SHA-256 hash of canonical JSON payment details */ export declare function computePaymentDetailsHash(details: PaymentDetails): string; /** * Compute requestHash per SUBLY402-SVM-V1 spec: * SHA-256("SUBLY402-SVM-V1-REQ\n" || METHOD || "\n" || ORIGIN || "\n" || * PATH_AND_QUERY || "\n" || BODY_SHA256_HEX || "\n" || * PAYMENT_DETAILS_HASH_HEX || "\n") */ export declare function computeRequestHash(method: string, origin: string, pathAndQuery: string, bodySha256: string, paymentDetailsHash: string): string; /** * Build client signature message per spec: * "SUBLY402-SVM-V1-AUTH\n" followed by each field + "\n" */ export declare function buildSignatureMessage(fields: { version: number; scheme: string; paymentId: string; client: string; vault: string; providerId: string; payTo: string; network: string; assetMint: string; amount: string; requestHash: string; paymentDetailsHash: string; expiresAt: string; nonce: string; }): Uint8Array; /** Sign a message with Ed25519 */ export declare function ed25519Sign(message: Uint8Array, secretKey: Uint8Array): Uint8Array; //# sourceMappingURL=crypto.d.ts.map