Skip to content

Commit

Permalink
#636 Expose generate_message in did-o ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmann35 committed Jun 16, 2023
1 parent 3a2bc13 commit eb89307
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions packages/pico-engine/krl/io.picolabs.did-o.krl
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ DID-O V 1.0.0
>>
author "Rembrand Paul Pardo, Kekoapoaono Montalbo, Josh Mann"

provides addRoute, routes, send, sendEvent, sendQuery, didMap, clearDidMap, didDocs, clearDidDocs, pendingRotations, clearPendingRotations, generate_invitation
provides addRoute, routes, send, sendEvent, sendQuery, didMap, clearDidMap, didDocs, clearDidDocs, pendingRotations, clearPendingRotations, generate_invitation, generate_message

shares routes, addRoute, didDocs, clearDidDocs, didMap, clearDidMap, pendingRotations, clearPendingRotations, generate_invitation
shares routes, addRoute, didDocs, clearDidDocs, didMap, clearDidMap, pendingRotations, clearPendingRotations, generate_invitation, generate_message

use module io.picolabs.wrangler alias wrangler
}
Expand Down Expand Up @@ -139,6 +139,26 @@ DID-O V 1.0.0

///////////////////////////////////////////// MESSAGE CREATORS //////////////////////////////////////////////

/**
* Generates and returns a DIDComm v2 message with the given message.
* message is formatted as follows:
* {
* type: string,
* body: any,
* from?: string,
* to?: [string],
* thid?: string,
* pthid?: string,
* expires_time?: number,
* attachments?: [Attachment]
* }
*
* Refer to didcomm-node package for Attachment object specifics.
*/
generate_message = function(message) {
dido:generateMessage(message)
}

/**
* Creates an invitation OOB URL that can be used to establish DID based relationships.
* This automates the DID, channel, and message creation and encodes it into a base64 Out-of-Band URL.
Expand Down

0 comments on commit eb89307

Please sign in to comment.