/** * Allowance auth helper — generates SIWX (Sign-In With X / EIP-4361) headers for Run402 API. * Uses @noble/curves (lighter than viem) for signing. */ import type { AllowanceData } from "./allowance.js"; export interface SIWxAuthHeaders { "SIGN-IN-WITH-X": string; } /** * EIP-55 mixed-case checksum encoding. */ export declare function toChecksumAddress(address: string): string; interface SIWEMessageOpts { domain: string; uri: string; statement: string; version?: string; chainId: number | string; nonce: string; issuedAt: string; expirationTime?: string; resources?: string[]; } export interface SIWxAuthOptions extends SIWEMessageOpts { allowance: Pick; type?: "eip191"; } /** * Format an EIP-4361 (SIWE) message. Must be byte-for-byte compatible * with the `siwe` library's message format used server-side for verification. */ export declare function formatSIWEMessage(opts: SIWEMessageOpts, address: string): string; export declare function buildSIWxAuthHeaders(opts: SIWxAuthOptions): SIWxAuthHeaders; /** * Get SIWX auth headers for the Run402 API. * Returns null if no allowance is configured. * * @param path - API path (e.g. "/projects/v1") used to build the SIWE uri field. */ export declare function getAllowanceAuthHeaders(path: string, allowancePath?: string): SIWxAuthHeaders | null; export {}; //# sourceMappingURL=allowance-auth.d.ts.map