UNPKG

@aviarytech/didcomm-messaging

Version:

DIDComm Messaging library for sending and receiving DIDComm messages

21 lines (20 loc) 741 B
import { IJWE } from "@aviarytech/crypto-core"; import { DIDCOMM_MESSAGE_MEDIA_TYPE, IDIDCommPayload } from "@aviarytech/didcomm-core"; interface IDIDCommMessage { payload: IDIDCommPayload; repudiable: boolean; signature?: string; } interface IDIDCommMessageHandler { type: string; handle: ({ message: IDIDCommMessage, didcomm: IDIDComm }: { message: any; didcomm: any; }) => Promise<boolean>; } interface IDIDComm { handleMessage(message: IDIDCommMessage): boolean; sendMessage: (did: string, message: IDIDCommMessage) => Promise<boolean>; receiveMessage(jwe: IJWE, mediaType: DIDCOMM_MESSAGE_MEDIA_TYPE): Promise<boolean>; } export { IDIDComm, IDIDCommMessage, IDIDCommMessageHandler };