---
# System prepended metadata

title: ACA-Py RFC 0496 - Transition from Connections to DID Exchange

---

# ACA-Py RFC 0496 - Transition from Connections to DID Exchange
* Step 1 implemented in v0.6.0
    ACA-Py v0.7.3 used
    * Connection Invitation
        * Inline DIDDoc Service Entry
          ```
          /out-of-band/create-invitation
          {
              "handshake_protocols": [
                "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"
              ],
              "metadata": {},
              "my_label": "Faber college",
              "use_public_did": false
          }
          ```
          **Invitation**
          ```
          {
            "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation",
            "@id": "252aac24-45ec-4814-94ad-5e4101c8900c",
            "services": [
              {
                "id": "#inline",
                "type": "did-communication",
                "recipientKeys": [
                  "did:key:z6Mkt8phxfGBNLGqZ7iBZ6dPtokTRPZvEtNcqXFYr8nfm5xY"
                ],
                "serviceEndpoint": "http://host.docker.internal:8002"
              }
            ],
            "label": "Faber college",
            "handshake_protocols": [
              "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"
            ]
          }
          ```
          **Invitation URL**
          ```
          http://host.docker.internal:8002?oob=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9vdXQtb2YtYmFuZC8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiMjUyYWFjMjQtNDVlYy00ODE0LTk0YWQtNWU0MTAxYzg5MDBjIiwgInNlcnZpY2VzIjogW3siaWQiOiAiI2lubGluZSIsICJ0eXBlIjogImRpZC1jb21tdW5pY2F0aW9uIiwgInJlY2lwaWVudEtleXMiOiBbImRpZDprZXk6ejZNa3Q4cGh4ZkdCTkxHcVo3aUJaNmRQdG9rVFJQWnZFdE5jcVhGWXI4bmZtNXhZIl0sICJzZXJ2aWNlRW5kcG9pbnQiOiAiaHR0cDovL2hvc3QuZG9ja2VyLmludGVybmFsOjgwMDIifV0sICJsYWJlbCI6ICJGYWJlciBjb2xsZWdlIiwgImhhbmRzaGFrZV9wcm90b2NvbHMiOiBbImRpZDpzb3Y6QnpDYnNOWWhNcmpIaXFaRFRVQVNIZztzcGVjL2Nvbm5lY3Rpb25zLzEuMCJdfQ==
          ```
          
        * DID Service Entry
          ```
          /out-of-band/create-invitation
          {
              "handshake_protocols": [
                "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"
              ],
              "metadata": {},
              "my_label": "Faber college",
              "use_public_did": true
          }
          ```
          **Invitation**
          ```
          {
            "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation",
            "@id": "74ee9861-e9ea-4ef4-a1d0-2bbb6c7aec22",
            "services": [
              "did:sov:FBmi5JLf5g58kDnNXMy4QM"
            ],
            "label": "Faber college",
            "handshake_protocols": [
              "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"
            ]
          }
          ```
          **Invitation URL**
          ```
          http://host.docker.internal:8002?oob=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9vdXQtb2YtYmFuZC8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiNzRlZTk4NjEtZTllYS00ZWY0LWExZDAtMmJiYjZjN2FlYzIyIiwgInNlcnZpY2VzIjogWyJkaWQ6c292OkZCbWk1SkxmNWc1OGtEbk5YTXk0UU0iXSwgImxhYmVsIjogIkZhYmVyIGNvbGxlZ2UiLCAiaGFuZHNoYWtlX3Byb3RvY29scyI6IFsiZGlkOnNvdjpCekNic05ZaE1yakhpcVpEVFVBU0hnO3NwZWMvY29ubmVjdGlvbnMvMS4wIl19
          ```
    * Connection-less Present Proof Request
      ```
      /out-of-band/create-invitation
      {
          "handshake_protocols": [
            "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0"
          ],
          "attachments": [
            {
              "id": "ab79c785-9675-45d5-8bf7-a8aade6908dc",
              "type": "present-proof"
            }
          ],
          "metadata": {},
          "my_label": "Faber college Present Proof",
          "use_public_did": false
      }
      ```
     **Invitation**
     ```
      {
        "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation",
        "@id": "14c7e69e-e19b-4637-8942-10478f69736b",
        "services": [
          {
            "id": "#inline",
            "type": "did-communication",
            "recipientKeys": [
              "did:key:z6Mkfoh2sHuyQjeZ1Bg5HwWP8VBTNZNbFRRzrEEB4ukaGjka"
            ],
            "serviceEndpoint": "http://host.docker.internal:8002"
          }
        ],
        "handshake_protocols": [
          "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/didexchange/1.0"
        ],
        "label": "Invitation to Barry",
        "requests~attach": [
          {
            "@id": "request-0",
            "mime-type": "application/json",
            "data": {
              "json": {
                "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/request-presentation",
                "@id": "bde119c4-d62a-42cd-aacc-6a9575b68212",
                "comment": "string",
                "request_presentations~attach": [
                  {
                    "@id": "libindy-request-presentation-0",
                    "mime-type": "application/json",
                    "data": {
                      "base64": "eyJuYW1lIjogIlByb29mIHJlcXVlc3QiLCAibm9uY2UiOiAiMSIsICJyZXF1ZXN0ZWRfYXR0cmlidXRlcyI6IHsidGVzdCI6IHsibmFtZSI6ICJzY29yZSJ9fSwgInJlcXVlc3RlZF9wcmVkaWNhdGVzIjoge30sICJ2ZXJzaW9uIjogIjEuMCJ9"
                    }
                  }
                ]
              }
            }
          }
        ]
      }
     ```
     **Invitation URL**
     ```
     http://host.docker.internal:8002?oob=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9vdXQtb2YtYmFuZC8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiMTRjN2U2OWUtZTE5Yi00NjM3LTg5NDItMTA0NzhmNjk3MzZiIiwgInNlcnZpY2VzIjogW3siaWQiOiAiI2lubGluZSIsICJ0eXBlIjogImRpZC1jb21tdW5pY2F0aW9uIiwgInJlY2lwaWVud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  * [URL shortening](https://github.com/hyperledger/aries-rfcs/blob/main/features/0434-outofband/README.md#url-shortening) not implemented, instead we `Base64Url` encode the invitation and send it with the URL.
  `Example transformed invitation message [Step 2]`
  ```
  {
    "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/request-presentation",
    "@id": "1234-1234-1234-1234",
    "comment": "Request proof of some claims from verified credentials",
    "services": {
        "recipientKeys": ["6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH"],
        "routingKeys": [],
        "serviceEndpoint": "https://example.com:5000"
    },
    "requests~attach": [
        {
            "@id": "libindy-request-presentation-0",
            "mime-type": "application/json",
            "data":  {
                "base64": "<bytes for base64>"
            }
        }
    ]
  }
  ```
  * handshake_protocols MUST NOT be present - not implemented, it is still present
  * services MUST have exactly one entry and be in the form above or be a single DID (but not both) - It has exaclty one entry but provided as a list
* [RFC0627](https://github.com/hyperledger/aries-rfcs/blob/main/features/0627-static-peer-dids/README.md) Static Peer DID - not implemented.

Note: Some issues observed in RFC0496 document. 
It should be `requests~attach` and not `request~attach` or `request_presentations~attach`. It should be `services` [[RFC0434](https://github.com/hyperledger/aries-rfcs/blob/main/features/0434-outofband/README.md#invitation-httpsdidcommorgout-of-bandverinvitation)] and not `service` [[RFC0496](https://github.com/hyperledger/aries-rfcs/tree/main/features/0496-transition-to-oob-and-did-exchange#connection-invitationinline-diddoc-service-entry)].
```
The constraints on this form of the out-of-band invitation sent during Step 2 are:

goal_code is ignored and goal is used as the comment.
handshake_protocols MUST NOT be present.
request~attach MUST have exactly one entry and that entry must be a request-presentation message.
service MUST have exactly one entry and be in the form above or be a single DID (but not both)
```
Requirement for `requests~attach` and `services` are same but they are shown as a `list` and `dict` respectively in the transformed example following the above.