/** * Credential registry and lifecycle workflow orchestration. * * CLI adapters parse inputs and render outputs. This module owns VDR runtime * service validation, registry state, credential issue/revoke/import/export, * and multisig VC proposal coordination. */ import { type Operation } from "effection"; import { SerderACDC } from "../../../cesr/mod.js"; import { Reger } from "../db/reger.js"; import { Regery } from "../vdr/credentialing.js"; import { Tevery } from "../vdr/eventing.js"; import { type AgentRuntime } from "./agent-runtime.js"; import type { ExchangeDeliveryPreference } from "./forwarding.js"; import type { Hab, Habery } from "./habbing.js"; import { Verifier } from "./verifying.js"; export interface CredentialRegistryInceptOptions { registryName: string; noBackers?: boolean; estOnly?: boolean; usage?: string; } export interface CredentialCreateOptions { registryName: string; schema: string; recipient?: string; data: Record | string; edges?: Record | Record[]; rules?: Record | Record[]; } export interface CredentialListOptions { issued?: boolean; aid?: string; schema?: string; } export interface CredentialListItem { said: string; issuer: string | null; issuee: string | null; schema: string | null; status: string | null; } export interface CredentialCreateResult { creder: SerderACDC; recipient: string; output: Record; } export interface CredentialExportResult { creder: SerderACDC; recipient: string; bytes: Uint8Array; } export interface CredentialImportResult { saved: string[]; } export interface CredentialRevokeOptions { registryName: string; credentialSaid: string; sendRecipients?: readonly string[]; senderHab?: Hab; delivery?: ExchangeDeliveryPreference; } export interface CredentialRevokeResult { creder: SerderACDC; said: string; tel: string | null; status: string; deliveries: string[]; queued: string[]; } /** Pin a JSON schema body into the local schema table. */ export declare function pinSchemaBytes(hby: Habery, raw: Uint8Array): string; /** Create a single-sig registry or propose a group registry inception. */ export declare function inceptCredentialRegistry(hby: Habery, runtime: AgentRuntime, hab: Hab, options: CredentialRegistryInceptOptions): Generator; /** Return locally known credential registry records. */ export declare function credentialRegistryRecords(reger: Reger): Array<{ name: string | undefined; registry: string; issuer: string; }>; /** Return current TEL status for one local registry name. */ export declare function credentialRegistryStatus(runtime: AgentRuntime, reger: Reger, registryName: string): { name: string; registry: string; issuer: string; state: import("../core/records.js").RegStateRecord | null; }; /** Create and issue one registry-backed credential. */ export declare function createCredential(hby: Habery, runtime: AgentRuntime, reger: Reger, options: CredentialCreateOptions): Operation; /** List locally saved credentials through wallet indexes. */ export declare function listCredentials(runtime: AgentRuntime, reger: Reger, options: CredentialListOptions): CredentialListItem[]; /** Build a KERIpy-compatible credential export stream. */ export declare function exportCredentialStream(hby: Habery, reger: Reger, credentialSaid: string, recipient?: string): CredentialExportResult; /** Import one CESR credential stream and return newly saved credential SAIDs. */ export declare function importCredentialStream(runtime: AgentRuntime, reger: Reger, bytes: Uint8Array): CredentialImportResult; /** Revoke one credential and optionally deliver revocation stream bytes. */ export declare function revokeCredential(hby: Habery, runtime: AgentRuntime, reger: Reger, options: CredentialRevokeOptions): Operation; /** Build a KERIpy-compatible credential stream for an already loaded credential. */ export declare function credentialStreamBytes(hby: Habery, reger: Reger, creder: SerderACDC, recipient: string): Uint8Array; /** Resolve revoke delivery recipients from explicit recipients and issuee policy. */ export declare function revocationRecipients(creder: SerderACDC, explicit: readonly string[], includeIssuee: boolean): string[]; export declare function requireReger(runtime: AgentRuntime): Reger; export declare function requireRegery(runtime: AgentRuntime): Regery; export declare function requireTevery(runtime: AgentRuntime): Tevery; export declare function requireVerifier(runtime: AgentRuntime): Verifier; //# sourceMappingURL=credential-workflows.d.ts.map