import { JsonObj, Task } from "../../utils"; import { AgentContext } from "../Context"; import { Domain } from "../.."; /** * RunProtocol exists to bridge the gap between * the strong coupling to DIDComm messages and abstracting to Protocols * * When the abstraction happens this should be removable */ interface IArgs { type: T; pid: string; data: D; } type Args_CredentialIssue = IArgs<"credential-issue", { data: any; thid?: string; }>; type Args_CredentialOffer = IArgs<"credential-offer", { offer: any; thid?: string; }>; type Args_PresentationRequest = IArgs<"presentation-request", { credential: Domain.Credential; presentationRequest: any; }>; type Args_PresentationVerify = IArgs<"presentation-verify", { presentation: any; presentationRequest: any; thid?: string; }>; type Args_RevocationCheck = IArgs<"revocation-check", { credential: Domain.Credential; }>; type Args_Message = IArgs<"message", { message: Domain.Message; }>; type Args_Unknown = IArgs<"unknown", JsonObj>; type Args = Args_CredentialIssue | Args_CredentialOffer | Args_PresentationRequest | Args_PresentationVerify | Args_RevocationCheck | Args_Message | Args_Unknown; /** * Find and execute a task registered by plugins for the given pid (protocol identifier) */ export declare class RunProtocol extends Task { run(ctx: AgentContext): Promise; } export {};