didcomm library

Properties

ALL_HANDLERS List<AbstractDidcommMessageHandler>
getter/setter pair
encryptedMessageSchema ↔ JsonSchema
getter/setter pair
plaintextSchema ↔ JsonSchema
getter/setter pair
signedMessageSchema ↔ JsonSchema
getter/setter pair

Functions

decryptMessage(Map<String, dynamic> encryptedMessage, WalletStore wallet) Future<DidcommMessage>
will decrypt a message and return the decrypted message
encryptMessage({required String connectionDid, required WalletStore wallet, required DidcommPlaintextMessage message, required String receiverDid}) Future<DidcommEncryptedMessage>
will encrypt the message using the resolved connectionDid (must be available in the wallet).
generateIssueCredentialMessageFromRequest({required RequestCredential message, required WalletStore wallet, required String connectionDid, required List<String> replyTo}) Future<IssueCredential>
Will issue a credential to the user
generateProposeCredentialMessage({required OfferCredential offer, required WalletStore wallet, required String connectionDid, required List<String> replyTo, required String credentialDid}) Future<ProposeCredential>
will sign the offer using the key derived in credentialDid resulting in a VerifiableCredential. The result is wrapped in a ProposeCredential message, while the offer itself is added as an attachment
generateRequestCredentialMessageFromOffer({required OfferCredential offer, required List<String> replyTo, required WalletStore wallet}) RequestCredential
Response from the holder for a offer credential message
getConversationDid(DidcommPlaintextMessage message, WalletStore wallet, {bool throwIfNotFound = false}) String?
tries to load a conversation given the message if not found, an DidcommServiceException is thrown if throwIfNotFound
getPlaintextFromOobAttachments(OutOfBandMessage message, {List<String>? expectedAttachments}) Future<List<Result<DidcommPlaintextMessage, String>>>
Resolves the attachments and returns them as PlainTextMessages Each message is tried to be resolved. An error is reported for each message if it could not be resolved or parsed.
getSupportedMessageTypes() List<String>
gets a list of supported messages types which the handlers are able to handle
handleDidcommMessage(DidcommMessage plainTextMessage, {String? connectionDid, String? credentialDid, List<String>? replyTo, WalletStore? wallet, dynamic extraParams = const {}}) Future<DidcommMessage?>
main entry point for handling didcomm messages will not send the messages itself, but will return the message to be sent in an unencrypted format
isEncryptedMessage(dynamic message) bool
isPlaintextMessage(dynamic message) bool
isSignedMessage(dynamic message) bool
oobMessageFromUrl(String url) OutOfBandMessage
Converts Out-of-band message url url to OutOfBand message object.
oobOfferCredential({required Map<String, dynamic> credential, required String oobId, required String threadId, required List<String> replyTo, required String issuerDid, required String connectionDid, String proofType = 'Ed25519Signature'}) OutOfBandMessage
offers a credential using oob
oobRequestPresentation({required PresentationDefinition presentationDefinition, required String oobId, required String threadId, required List<String> replyTo, required String issuerDid, required String connectionDid, required String challenge, required String domain}) OutOfBandMessage
resolveAttachments(DidcommPlaintextMessage message) Future<List<Result<void, String>>>
Will resolve all attachments inside a DidcommPlaintextMessage results will be reported as appropriate as Result for each attachment