Skip to content

Commit

Permalink
Merge pull request #649 from Picolab/636-share-generate_message-for-d…
Browse files Browse the repository at this point in the history
…ido-extensions-to-use

#636 Expose generate_message in did-o ruleset
  • Loading branch information
b1conrad authored Sep 29, 2023
2 parents a889883 + eb89307 commit 9ad5e53
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 9ad5e53

Please sign in to comment.