Messaging
Operations about DIDComm messaging. DIDComm messages are addressed by DID using Dock's relay service.
The current most common use case for the messaging service is to send credentials and presentation requests to the Dock Wallet, but other clients can use it too.
Encrypt Message
In most cases you'll want to ensure the privacy of the message by encrypting it before sending.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | The recipients, sender and message |
ยป type | body | string | false | none |
ยป payload | body | object | true | none |
ยป senderDid | body | string | true | none |
ยป algorithm | body | string | false | none |
ยป recipientDids | body | [oneOf] | true | none |
Enumerated Values
Parameter | Value |
---|---|
ยป algorithm | ECDH-1PU+A256KW |
ยป algorithm | ECDH-ES+A256KW |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Message has been encrypted, returning an encrypted DIDComm Message | ||
400 | Message failed to encrypt | ||
402 | Transaction limit reached or upgrade required to proceed | ||
404 | DID was not found |
Decrypt Message
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | The JWM |
ยป jwe | body | object | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Message has been decrypted, returning a DIDComm message | ||
400 | Message failed to decrypt | ||
402 | Transaction limit reached or upgrade required to proceed | ||
404 | DID was not found |
Signing Messages
Signing a message helps to prove to the recipient that the message is valid and unaltered. The message will be signed as a Base64 encoded JWT.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | The message payload |
ยป payload | body | object | true | none |
ยป senderDid | body | string | true | none |
ยป type | body | string | false | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Message has been signed | ||
400 | Message failed to sign | ||
402 | Transaction limit reached or upgrade required to proceed | ||
404 | DID was not found |
Verifying a Message
Verify that the message is valid.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | The message payload |
ยป jws | body | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Message is verified | ||
400 | Message failed to verify | ||
402 | Transaction limit reached or upgrade required to proceed | ||
404 | DID was not found |
Send Message
Sends a DIDComm message using our relay service and DID service endpoints, it also returns a URL for QR code scanning. Supports encrypted, plaintext and signed DIDComm messages. You can generate an encrypted DIDComm message by calling the /messaging/encrypt
route.
The typ
attribute must be a DIDComm type (i.e. starts with "application/didcomm").
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | The message payload |
ยป to | body | string | true | none |
ยป message | body | Message | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | Message has been sent | ||
400 | Message failed to send | ||
402 | Transaction limit reached or upgrade required to proceed | ||
404 | DID was not found |
Last updated