/** * IPEX credential artifact assembly for registry-backed ACDC workflows. * * KERIpy correspondence: * - mirrors the byte material gathered by `vdr.credentialing.sendArtifacts` * and the grant/admit command helpers * - keeps EXN route construction in `ipexing.ts` * - keeps registry, wallet, and verifier persistence in VDR modules */ import { SerderACDC, SerderKERI, type Versionage } from "../../../cesr/mod.js"; import type { Reger } from "../db/reger.js"; import { type Hab, type Habery } from "./habbing.js"; import { type IpexBuilderOptions } from "./ipexing.js"; import type { Reactor } from "./reactor.js"; /** Grant-embedded presentation streams required by KERIpy verifier import. */ export interface CredentialPresentationArtifacts { /** ACDC body plus its SealSourceTriples proof attachment. */ acdc: Uint8Array; /** Credential TEL issue/revoke stream message for the presented ACDC. */ iss: Uint8Array; /** Issuer KEL event that anchors `iss`. */ anc: Uint8Array; } /** Complete `/ipex/grant` message plus credential support material. */ export interface CredentialGrantMessage { grant: SerderKERI; attachments: Uint8Array; wire: Uint8Array; artifacts: CredentialPresentationArtifacts; support: Uint8Array[]; } /** Complete `/ipex/admit` response message for an accepted credential grant. */ export interface CredentialAdmitMessage { admit: SerderKERI; attachments: Uint8Array; wire: Uint8Array; } /** Builder options for credential-bearing grants. */ export interface IpexCredentialGrantOptions extends IpexBuilderOptions { agree?: SerderKERI | null; } /** Builder options for grant admits and holder-side save behavior. */ export interface IpexCredentialAdmitOptions extends IpexBuilderOptions { /** Require the credential embedded in the grant to already be saved locally. */ requireSaved?: boolean; } /** Build KERIpy-shaped support artifacts for one credential presentation. */ export declare function credentialSupportMessages(hby: Habery, reger: Reger, creder: SerderACDC, recipient: string): Uint8Array[]; /** * Build the full raw credential stream equivalent of KERIpy `sendCredential`. * * IPEX grant sends the support artifacts and recursively chained source * credentials separately, then embeds the top-level credential in the grant * EXN. Raw import/export paths can append the top-level credential message too. */ export declare function credentialStreamMessages(hby: Habery, reger: Reger, creder: SerderACDC, recipient: string, gvrsn?: Versionage): Uint8Array[]; /** Build the support stream used before sending a credential grant EXN. */ export declare function credentialPresentationSupportMessages(hby: Habery, reger: Reger, creder: SerderACDC, recipient: string, gvrsn?: Versionage): Uint8Array[]; /** Build grant-embedded `acdc`, `iss`, and `anc` artifacts for one credential. */ export declare function credentialPresentationArtifacts(hby: Habery, reger: Reger, credentialSaidValue: string, gvrsn?: Versionage): CredentialPresentationArtifacts; /** Build a signed `/ipex/grant` message with embedded credential artifacts. */ export declare function ipexCredentialGrant(args: { hby: Habery; hab: Hab; reger: Reger; recipient: string; credentialSaid: string; message?: string; options?: IpexCredentialGrantOptions; sign?: boolean; }): CredentialGrantMessage; /** Build a signed `/ipex/admit` response for an accepted grant. */ export declare function ipexCredentialAdmit(args: { hab: Hab; reger: Reger; grant: SerderKERI; message?: string; options?: IpexCredentialAdmitOptions; }): CredentialAdmitMessage; /** Parse grant-embedded artifacts in KERIpy admit order: `anc`, `iss`, `acdc`. */ export declare function processCredentialPresentationArtifacts(reactor: Reactor, artifacts: CredentialPresentationArtifacts): void; /** Rebuild grant-embedded `anc`, `iss`, and `acdc` streams from exchange storage. */ export declare function storedGrantArtifacts(hby: Habery, grant: SerderKERI): CredentialPresentationArtifacts; /** Extract the embedded credential SAID from an accepted `/ipex/grant`. */ export declare function credentialSaidFromGrant(grant: SerderKERI): string | null; /** Return a raw exported credential message by SAID. */ export declare function credentialExportMessage(reger: Reger, credentialSaidValue: string): Uint8Array; //# sourceMappingURL=ipex-credentialing.d.ts.map