Andrew Whitehead
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- tags: aries, connection, invitation, service --- # OutOfBand Protocol The OutOfBand protocol is used when you wish to engage with another agent and you are not aware of a DIDComm connection to use for the interaction. This could be because you are trying to establish a new connection, you might have a connection, but don't know which connection it is, or if you want to have a connection-less interaction. ## Points from Meeting - 20200214 - Sam, George, Andrew, Stephen ~~1. Protocol: OutOfBandMsg~~ 2. Two message types "invitation" and "request" (is there a better name for this one?) 3. The response to this message should use the @id from an OutOfBandMsg message as the @pthid (parent thread id). 4. The "invitation" message should include a "protocol" array of the protocols that the inviter expects to receive back from the invitee (expected to be "connections" or "did-exchange" for now, but could be other things in the future). ~~5. We will remove the "initial" item from the message, but will allow the default "request" item in the "invitation" message.~~ 6. The "request" item will become "~request-attachment" and so support the goodness of the attachment decorator, including the ability to sign the attachment (if that works in this context). 7. Only if a public DID is used in the invitation should the invitee check for an existing connection that was started from that public DID. A note will indicate that we are looking for a way to support the case of using a non-public DID. > NOTE - this increases the number of public DIDs needed as now instead of just issuers, every enterprise app needs a public DID. Something to consider. 8. We will add both the "ack" message to the DID-Exchange protocol (to follow from the invitee to the inviter after the "response" message -- unrelated to OutOfBand) and the "continue" message, which is used to respond to an "invitation" message using an existing connection. 9. We should talk about QR codes in this RFC, and also talk about the existing RFC on URLs and QR codes (from Spaceman.io). 10. The "service" item will be an array, with a note that invitees will ignore the non-didcomm items and select from the didcomm items as they choose. The order of the entries will be in the inviters preference. Un-type entries are assumed to be "didcomm". This use of the array is done to mimick the handling of a the message containing the full "service" block from a DIDDoc. An agent can just drop their normal DIDDoc "service" block into this message. > [name=Stephen Curran] I think the next step is to take the "invitation" section of the DID-Exchange protocol as the starting point and then add in the concepts below and in the list above. ## Required Properties An invitation message has two required properties, `@type` and `service`. ### Invitation Type The `@type` property must use the DIDComm message type format `"https://didcomm.org/invitation/1.0/<messagetype>"` (TBD: exact message types - ideas `connect` a nd `request`, with perhaps another about `discovery`. The `service` property is described below. Unless otherwise indicated, the invitation represents an opportunity to create a pairwise connection. ### Service Descriptor The `service` property of an invitation represents a locator and method for responding to the inviter. The property supports multiple formats, based on the `service` property of DID Documents as defined by the [Decentralized Identifiers working draft](https://w3c.github.io/did-core/). The property may be an object representing a single service entry: ```jsonc "service": { "recipientKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"], "routingKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"], "serviceEndpoint": "https://example.com:5000" } ``` When the service entry contains only a `serviceEndpoint` property, it may be shortened to a string: ```json "service": "did:sov:LjgpST2rjsoxYegQDRm7EL" ``` Finally, the `service` property may contain an array of service entries, the same way a DIDDoc can have multiple services: ```jsonc "service": [ { "id": "did:sov:LjgpST2rjsoxYegQDRm7EL#vcr", "type": "didcomm", "recipientKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"], "routingKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"], "serviceEndpoint": "https://example.com:5000" }, "did:sov:LjgpST2rjsoxYegQDRm7EL" ] ``` the type is assumed to be didcomm if not specified. the invitee is expected to ignore service entries with a different type. ## Invitation Use Cases The invitation message may convey more than the ability to create a pairwise connection. ### Supported Protocols The inviter may advertise the supported Aries protocols the invitee can use by using the `protocol` property at the message level or within a specific service entry. Protocol entries are additive between the two when connecting to a specific service. The `protocol` entry may be either a string or an array of strings and should be listed in order of decreasing preference when protocols fulfill roughly the same purpose (such as the `connection` and `did-exchange` protocols). ```jsonc { "@type": "https://didcomm.org/invitation/1.0/connect", "@id": "<id used for context as pthread>", // ... "protocol": ["https://didcomm.org/did-exchange/1.0"], "service": ["did:sov:LjgpST2rjsoxYegQDRm7EL"], "request~attach" {} //optional } ``` ### Providing a DIDComm Request An invitation may contain a `request` property with a complete agent message. The message is to be interpreted by the client application as if it were received over DIDComm without any encryption. A common use case is to attach a presentation request for the client to fulfill using proof of their own issued credentials. The response to this agent message should be sent to the service described by the invitation, and must be implied by the protocol referenced in the message's `@type` property. A pairwise connection may optionally be created before sending the response, but is not required. _Maybe add a property to indicate whether anon-crypted messages can or should be sent? Add to the service entry?_ ```jsonc { "@type": "https://didcomm.org/invitation/1.0/request", "@id": "<uuid-invitation>", "label": "Authenticate with Service", "request": { //needs to be an attachment "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/request-presentation", "@id": "<uuid-request>", "request_presentations~attach": [ { "@id": "libindy-request-presentation-0", "mime-type": "application/json", "data": { "base64": "<bytes for base64>" } } ] }, "service": "did:sov:LjgpST2rjsoxYegQDRm7EL" } ``` ### Providing an Initial DIDComm Message If provided, the `initial` property of an invitation represents an agent message to be sent by the invitee **after** forming a pairwise connection. The message may contain an identifier or other properties used to tie the request to the invitation message. The `initial` message should only be sent if the invitee application supports the given protocol; otherwise the response is unlikely to be understood. For example, an `initial` message may be used to suggest that the invitee application request an action menu: _Maybe provide a list of initial entries for the client to select from depending which protocols are supported?_ ```jsonc { "@type": "https://didcomm.org/invitation/1.0/connect", "@id": "<uuid-invitation>", "label": "Request a Quote", "initial": { "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/action-menu/1.0/menu-request", "@id": "<uuid-initial>" }, "service": "did:sov:LjgpST2rjsoxYegQDRm7EL" } ``` ## Additional Properties The following properties are optional additions to an invitation. ### Invitation ID The `@id` property, if present, should be used as the `~thread` `thid` for any resulting messages sent by the client application, unless superseded by the `@id` for a `request` or `initial` payload. ### Invitation Label The `label` property defines a default label for the client's agent application to use for this request or connection target. It is self-asserted and should not be presented as authoritative. A `label` property may also be added to individual `service` entries as a descriptor for that service. This is recommended when the invitation represents a specific request beyond a connection. _Add image URL? Maybe a common property for identifying information?_ ## Reusing a Pairwise Connection A client application may be able to identify an existing pairwise connection to use when responding to an invitation. To perform the comparison to existing connections, the `service` entry used to form the connection can be compared to the currently selected `service` entry. In the case of an agent which issues new recipient keys for each invitation (normally an agent without a public DID), the agent may wish to relax the requirements for comparison. The `unique` property may be added to a `service` entry in order to specify which properties are to be considered canonical. The `serviceEndpoint` property must always be considered canonical, whether listed in `unique` or not. Unless listed in the `unique` property, the `id`, `label`, `priority` and `type` properties may be ignored during comparison. The `unique` property itself should not be directly compared between entries. ```jsonc { "id": "#my-service", "recipientKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"], "routingKeys": ["8HH5gYEeNc3z7PYXmd54d4x6qAfCNrqQqEB3nS7Zfu7K"], "serviceEndpoint": "https://example.com:5000", "unique": "routingKeys,serviceEndpoint" } ``` If the invitation provides a `request` or `initial` block then the response may simply be sent along the existing connection. Otherwise, the a connection continuation message may be used to indicate that the invitation has been accepted, with the message referencing the `@id` of the invitation in its `~thread` decorator. The `protocol` property may also suggest an appropriate initial message.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully