/** * KERIpy-shaped multisig exchange coordination. * * This module owns the `/multisig/*` EXN family used to coordinate group * registry, credential, reply, and wrapped business EXN proposals. It does not * own group key-event counseling; local group habitat state still lives under * `Habery.makeGroupHab(...)`, `Baser.habs`, and the keeper member stores. */ import { type Kind, SerderKERI, type Versionage } from "../../../cesr/mod.js"; import type { Exchanger, ExchangeRouteHandler } from "./exchanging.js"; import type { Hab, Habery } from "./habbing.js"; import type { Notifier } from "./notifying.js"; /** KERIpy multisig route constants. */ export declare const MULTISIG_ICP_ROUTE = "/multisig/icp"; export declare const MULTISIG_ROT_ROUTE = "/multisig/rot"; export declare const MULTISIG_IXN_ROUTE = "/multisig/ixn"; export declare const MULTISIG_VCP_ROUTE = "/multisig/vcp"; export declare const MULTISIG_ISS_ROUTE = "/multisig/iss"; export declare const MULTISIG_REV_ROUTE = "/multisig/rev"; export declare const MULTISIG_EXN_ROUTE = "/multisig/exn"; export declare const MULTISIG_RPY_ROUTE = "/multisig/rpy"; /** Ordered route list used for handler registration. */ export declare const MULTISIG_ROUTES: readonly ["/multisig/icp", "/multisig/rot", "/multisig/ixn", "/multisig/vcp", "/multisig/iss", "/multisig/rev", "/multisig/exn", "/multisig/rpy"]; export type MultisigRoute = typeof MULTISIG_ROUTES[number]; interface RawMessage { readonly raw: Uint8Array; } export interface MultisigBuilderOptions { stamp?: string; date?: string; version?: Versionage; pvrsn?: Versionage; gvrsn?: Versionage | null; kind?: Kind; } export type MultisigMessage = readonly [serder: SerderKERI, attachments: Uint8Array]; export type MultisigDecision = { kind: "accept" | "duplicate"; said: string; embeddedSaid: string; route: string; sender: string; } | { kind: "reject"; said: string; reason: string; }; export interface MultisigHandlerOptions { mux?: Multiplexor; notifier?: Notifier | null; } /** Coordinate one proposed group inception event. */ export declare function multisigInceptExn(member: Hab, smids: readonly string[], rmids: readonly string[] | null, icp: Uint8Array | RawMessage, delegator?: string | null, options?: MultisigBuilderOptions): MultisigMessage; /** Coordinate one proposed group rotation event. */ export declare function multisigRotateExn(group: string | Hab, member: Hab, smids: readonly string[], rmids: readonly string[], rot: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Coordinate one proposed group interaction event. */ export declare function multisigInteractExn(group: string | Hab, member: Hab, aids: readonly string[], ixn: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Coordinate one proposed multisig credential-registry inception. */ export declare function multisigRegistryInceptExn(group: string | Hab, member: Hab, usage: string, vcp: Uint8Array | RawMessage, anc: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Coordinate one proposed multisig credential issuance. */ export declare function multisigIssueExn(group: string | Hab, member: Hab, acdc: Uint8Array | RawMessage, iss: Uint8Array | RawMessage, anc: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Coordinate one proposed multisig credential revocation. */ export declare function multisigRevokeExn(group: string | Hab, member: Hab, said: string, rev: Uint8Array | RawMessage, anc: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Coordinate one proposed multisig reply event. */ export declare function multisigRpyExn(group: string | Hab, member: Hab, rpy: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Wrap one business EXN, such as `/ipex/grant`, for group approval. */ export declare function multisigExn(group: string | Hab, member: Hab, exn: Uint8Array | RawMessage, options?: MultisigBuilderOptions): MultisigMessage; /** Route handler that forwards accepted multisig EXNs to the `Multiplexor`. */ export declare class MultisigNotificationHandler implements ExchangeRouteHandler { readonly resource: MultisigRoute; private readonly mux; constructor(resource: MultisigRoute, mux: Multiplexor); verify(args: { serder: SerderKERI; }): boolean; handle(args: { serder: SerderKERI; }): void; } /** Register the KERIpy multisig route family with one exchanger. */ export declare function loadMultisigHandlers(hby: Habery, exchanger: Exchanger, options?: MultisigHandlerOptions): Multiplexor; /** * KERIpy `Multiplexor` analogue. * * The `meids.` and `maids.` indexes group proposals by embedded payload SAID so * later approval/completion logic can find all submitters for the same payload. */ export declare class Multiplexor { readonly hby: Habery; readonly notifier: Notifier | null; constructor(hby: Habery, { notifier }?: { notifier?: Notifier | null; }); add(serder: SerderKERI): MultisigDecision; /** Return true when this wrapper can be accepted for local group work. */ verify(serder: SerderKERI): boolean; private inspect; /** Return all stored wrapper EXNs for one embedded payload SAID. */ get(embeddedSaid: string): Array<{ exn: Record; paths: Record; }>; private verifyMembership; private isLocalHab; } /** Extract the embedded business EXN SAD from a `/multisig/exn` wrapper. */ export declare function embeddedBusinessExnSAD(serder: SerderKERI): Record | null; /** Extract raw attachment bytes for one label from a stored multisig wrapper. */ export declare function multisigPathedAttachment(hby: Habery, wrapperSaid: string, label: string): Uint8Array; export {}; //# sourceMappingURL=grouping.d.ts.map