import type { CeremonyOrder } from "../types.js"; import type { Origin } from "../origin.js"; /** node:crypto hash names for the SHA-2 algorithms Multipaz can answer with. */ export type TxHashName = "sha256" | "sha384" | "sha512"; /** * Resolve the node:crypto hash name from the COSE id the wallet reported. A MISSING id * (null/undefined) means Multipaz used its SHA-256 default (see above), so it maps to * "sha256"; a PRESENT-but-unrecognized id maps to `null` so verify can fail closed * rather than silently assume SHA-256. */ export declare function txHashNameFromCose(coseAlg: number | null | undefined): TxHashName | null; export interface TransactionData { type: "urn:eudi:sca:payment:1"; credential_ids: string[]; /** JOSE hash-alg identifiers we accept the wallet binding with (Multipaz `JsonData.transactionDataHashesAlg`). */ transaction_data_hashes_alg: string[]; payload: { transaction_id: string; amount: number; currency: string; payee: { id: string; name: string; }; }; } export declare function buildTransactionData(order: CeremonyOrder, origin: Origin): TransactionData; export declare function encodeTransactionData(txData: TransactionData): string; export declare function hashTransactionData(txDataB64: string, alg?: TxHashName): string; export declare function decodeTransactionData(txDataB64: string): TransactionData;