import type { Credential, DcqlQuery, Effect, GateOrder, Step } from "./types.js"; export declare function gate(): Effect; export declare function discount(opts: { percent?: number; amount?: number; }): Effect; export declare function authorize(): Effect; /** * Concise DCQL for a single mdoc credential: name the doctype and the claim * leaves, get back the full verifier-shaped `DcqlQuery`. Selective disclosure * (never retain) is the default. * * The credential `id` (the key `credential_sets` references, and the key the * wallet echoes each presentation back under) defaults to a stable, unique * derivation from the FULL doctype — pass `id` to name it yourself (like the * hand-written age query's `"mdl"` / `"eupid"`). */ export declare function dcql(spec: { docType: string; claims: string[]; id?: string; }): DcqlQuery; /** * The claim's leaf element id — the LAST path segment (the shape `dcql()` builds: * `[docType, leaf]`). One definition of the path→leaf convention so the request * builder, the org-iso-mdoc doc-spec, and the instant-demo claim derivation agree. */ export declare function claimLeaf(path: string[]): string | undefined; /** Age verification. `age.over(21)` proves the `age_over_21` claim (explicit positive). */ export declare const age: { over(minAge: number): Credential; }; /** Loyalty / membership — optional; presenting it applies a discount. */ export declare const membership: { discount(percent: number): Credential; }; /** * Payment authorization. Settles LAST (the resolver sorts authorize-effect * entries to the end). The amount is derived from the order server-side, never * passed as a field (Principle IV / Security invariant 2). */ export declare const payment: { in(currency: string): Credential; }; /** * The built-in credential ids. They stay on their existing order-parameterized * ceremony + completion paths (age's per-order threshold, membership's percent); * the generalized custom-credential rail + `completeOrder` sweep exclude them so a * custom credential never shadows a built-in and the built-ins never regress (007). */ export declare const RESERVED_CREDENTIAL_IDS: ReadonlySet; /** Define a custom credential — gate ANY consequential action with ANY credential. */ export declare function defineCredential(c: { id: string; request: DcqlQuery; verify: (claims: Record) => boolean; effect: Effect; appliesTo?: (order: GateOrder) => boolean; ui: { label: string; action: string; }; }): Credential; /** A required gate — present in the manifest whenever it applies. */ export declare function required(c: Credential): Step; /** An optional gate — surfaced but never blocking. */ export declare function optional(c: Credential): Step;