Animo Solutions
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # AFJ DIDComm V2 Thougts on implementing DidComm V2 in AFJ ## Notes from ACA-Py approach See [this document](https://docs.google.com/document/d/1piGZ-0FW9DWEFRetviV1Vjxv7DDkIFQDWUs38VGqZ-Y/edit#) for notes about the implementation of DIDComm V2 for ACA-Py. - Use same message class, but use a different serializer for v1 / v2 - Mechanically transform DidComm v1 messages to DidComm v2 messages ## DidComm v2 message Each protocol can choose to extend either the `DidCommV1Message` or the `DidCommV2Message`. The `MessageSender` now accepts either of those, and can use different underlying code to handle the v1 and v2 messages. However, the shared didcomm methods allow common processing between the two. ```ts interface DidCommMessage { id: string type: string threadId: string // ... other common didcomm methods and properties ... // } class DidCommV1Message implements DidCommMessage { @Expose({ name: '@id' }) public id: string @Expose({ name: '@type' }) public type: string public get threadId() { return this.thread.thid ?? this.id } } class DidCommV2Message { public id: string public type: string @Expose({ name: 'thid' }) public threadId: string } ``` - Do we need to add a mechanical way to transform DidCommV1 to DidCommV2 format? - Adds a lot of complexity -- Personally I'd like to define different implementation for V1 and V2 ## V3 Issue Credential & Present Proof protocols - Module (and public API) can stay exactly the same - Move more shared logic to the module level from the service (auto-accept, state checks, etc...) - Add a CredentialProtocolVersion and ProofProtocolVersion V3 - Add V3 messages, handlers and services (copy from V2 protocol -> transform to DIDComm v2 structure, so it can version seperately) - Reuse the format services - Messages are not stored in the credential and proof exchange records so we can reuse the same record types - Minimal overhead to the user whether v1 or v2 or v3 is used (all same api) - Extend `DidCommMessageRecord` to also support DidCommV2 messages - It just stored Json so should be relatively simple ## DidCommV2 Envelope - No support for DidCommV2 envelope yet - Extend the wallet interface to support DidComm v2 envelopes in addition to DidComm v1 envelopes - Working on adding Aries Askar - Usability of SICPA didcomm js library for AFJ? - Can't run Wasm natively in React Native - Looking at adding a JSI interface to add a WASM interface for React Native - Would make future additions to AFJ a lot easier as we automatically support Browser, RN, Node - Will be a lot of work ## DidCommV2 Routing and Connections - Already supports generic did resolver with support for `did:key`, `did:web`, `did:sov`, `did:peer` - Working on generic did registrar with suport for `did:key`, `did:sov`, `did:peer` - Extend connection record to store the supported didcomm profile? (ACA-Py) - Includes both the - Probably not needed, we can exract this from the did document - Add support for OOB v2 protocol - Just need to send and accept an invitation - https://github.com/hyperledger/aries-agent-test-harness/blob/main/aries-test-harness/features/oob-v2.feature - Create a connection record - Set their did to did from invitation - Generate peer did (or use already existing public did) for our did - Can still use Oob V1 invitation with `didcomm/v2` accept - Using didcomm v2 - Look at `accept` in oob invitation - Look at `accept` in Did document services (if using public did for connection we can auto update by adding a didcomm v2 service, the other agent should then pick it up) - Updating peer dids to add a service - Is this possible in DidComm v1? - ACA-Py call mentioned defining a decorator to update to new envelope - Community Coordinated Update to migrate unqualified dids to qualified dids - Can add a method to the message sender `sendMessageToDid` (in addition to `sendMessageToService` and `sendMessage`) - How different is DidCommV2 routing compared to DidCommV1 routing? - Add a DidCommV1Router and a DidCommV2Router? - Handles the packing, routing, mediators, return routing etc... for a specific didcomm version - Abstracted in the MessageSender, so the framework user ## DidComm v2 implementation (Jakub) I briefly looked at didcomm-rust, and I don’t understand all the differences introduced by DIDComm v2. Still, it doesn’t have to be so difficult to re-implement missing parts of DIDComm v2 instead of adding and using the whole didcomm-rust library, assuming we’ll add support for aries-askar. AFJ’s `MessageReceiver` and `MessageSender` do have quite similar responsibilities as public methods of [didcomm-rust library](https://github.com/sicpa-dlab/didcomm-rust/blob/main/wasm/README.md). It can be possible to update AFJ's internal structure and allow to call `didcomm.sendMessage(message, toDid, fromDid)` from other parts of the framework (`MessageReceiver` and `MessageSender` would be part of `didcomm` - look at [re-architecture issue](https://github.com/hyperledger/aries-framework-javascript/discussions/722)). DIDComm module would encrypt the message based on DIDDocuments resolved from `toDid` and `fromDid`. I don’t know if it would be required to somehow modify internal `sendMessage` internal behavior from outside.

    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