import { type MandateContent } from "./mandates.js"; import type { SignedIntentRequest } from "./request.js"; export interface SimulateOptions { /** The signed request the gate issued (nonce, response-encryption key, transaction data, * and the DCQL id the vp_token is keyed under). Accepts the full `SignedIntentRequest` or * just those two fields, so the same helper drives the in-process flow and a request * reconstructed from the rail's /sign/request response. */ request: Pick; /** The web origin the wallet addresses the key binding to (must match the gate's). */ origin: string; /** The payment instrument id the credential discloses (default the demo fixture's). */ instrumentId?: string; /** TEST-ONLY: bind to a different nonce than the request asked for (replay/tamper). */ overrideNonce?: string; /** TEST-ONLY: present a different credential type (wrong-credential refusal). */ overrideVct?: string; /** TEST-ONLY: omit the instrument claim (missing-claim refusal). */ omitInstrumentId?: boolean; /** TEST-ONLY: sign DIFFERENT mandates than the gate asked for. The single most important * bypass: a wallet that returns terms other than the ones requested must be refused. */ overrideMandates?: MandateContent[]; /** TEST-ONLY: sign the key binding with a key the credential does not name in `cnf`. */ forgeHolderKey?: boolean; /** TEST-ONLY: return no key binding at all. */ omitKeyBinding?: boolean; /** TEST-ONLY: sign only the LAST `delegate` entry, the way a wallet that overwrites its * accumulated payload does (#192). Every entry must be signed, so this must be refused. */ signOnlyLastEntry?: boolean; /** TEST-ONLY: emit a different key-binding `typ` — e.g. the plain `kb+jwt` this rail sent * before the Delegate SD-JWT shape landed. */ overrideKbTyp?: string; /** TEST-ONLY: put the mandates in the KB-JWT as plain objects instead of digests — the * pre-#192 shape, which a draft-conformant verifier must no longer accept. */ plainDelegatePayload?: boolean; /** TEST-ONLY: a MALICIOUS WALLET. The credential is minted without the instrument claim, and * an unsigned disclosure for it is appended to the presentation — then the key binding is * signed over the tampered bytes, which a wallet holding the `cnf` key can do. Only the * issuer's `_sd` digests can catch this; `sd_hash` cannot, because the wallet recomputed it. */ forgeRevealedClaim?: string; /** TEST-ONLY: a MAN IN THE MIDDLE. The key binding names an `sd_hash` that does not cover the * disclosures actually presented — what tampering with the disclosure list after the holder * signed looks like on the wire. */ breakSdHash?: boolean; /** TEST-ONLY: present the SAME disclosure twice, with the key binding re-signed over it. One * digest, two disclosures claiming it — a malformed presentation a verifier must not unpack * into a claim it then trusts. */ duplicateDisclosure?: boolean; } /** * Produce the `result` a browser would POST to /verify: `{ protocol, data: { response: } }`. */ export declare function devSimulateWalletSignature(opts: SimulateOptions): Promise<{ protocol: "openid4vp-v1-signed"; data: { response: string; }; }>;