Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: RFC JSON formatting #840

Merged
merged 4 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions features/0056-service-decorator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `~service` decorator on a message contains the service definition that you m

Usage looks like this, with the contents defined the [Service Endpoint section of the DID Spec](https://w3c-ccg.github.io/did-spec/#service-endpoints):

```json=
```json
{
"@type": "somemessagetype",
"~service": {
Expand All @@ -34,11 +34,9 @@ Usage looks like this, with the contents defined the [Service Endpoint section o
}
```



## Reference

The contents of the `~service` decorator are defined by the [Service Endpoint section of the DID Spec](https://w3c-ccg.github.io/did-spec/#service-endpoints).
The contents of the `~service` decorator are defined by the [Service Endpoint section of the DID Spec](https://w3c-ccg.github.io/did-spec/#service-endpoints).

The decorator should not be used when the message recipient already has a service endpoint.

Expand All @@ -65,6 +63,6 @@ The Connect Protocol had previously included this same information as an attribu

The following lists the implementations (if any) of this RFC. Please do a pull request to add your implementation. If the implementation is open source, include a link to the repo or to the implementation within the repo. Please be consistent in the "Name" field so that a mechanical processing of the RFCs can generate a list of all RFCs supported by an Aries implementation.

Name / Link | Implementation Notes
--- | ---
| |
| Name / Link | Implementation Notes |
| ----------- | -------------------- |
| |
85 changes: 53 additions & 32 deletions features/0212-pickup/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 0212: Pickup Protocol

- Authors: [Sam Curren](mailto:telegramsam@gmail.com)
- Status: [PROPOSED](/README.md#proposed)
- Since: 2019-09-03
Expand Down Expand Up @@ -32,41 +33,52 @@ batch retrieval can be executed when many messages ...
## Reference

### StatusRequest

Sent by the _recipient_ to the _message_holder_ to request a `status` message.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/status-request"
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/status-request"
}
```

### Status

Status details about pending messages
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/status",
"message_count": 7,
"duration_waited": 3600,
"last_added_time": "2019-05-01 12:00:00Z",
"last_delivered_time": "2019-05-01 12:00:01Z",
"last_removed_time": "2019-05-01 12:00:01Z",
"total_size": 8096
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/status",
"message_count": 7,
"duration_waited": 3600,
"last_added_time": "2019-05-01 12:00:00Z",
"last_delivered_time": "2019-05-01 12:00:01Z",
"last_removed_time": "2019-05-01 12:00:01Z",
"total_size": 8096
}
```

`message_count` is the only required attribute. The others may be present if offered by the _message_holder_.

### Batch Pickup

A request to have multiple waiting messages sent inside a `batch` message.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/batch-pickup",
"batch_size": 10
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/batch-pickup",
"batch_size": 10
}
```

### Batch

A message that contains multiple waiting messages.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/batch",
Expand All @@ -87,22 +99,29 @@ A message that contains multiple waiting messages.
]
}
```

### Message Query With Message Id List

A request to read single or multiple messages with a message message id array.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/list-pickup",
"message_ids": [
"06ca25f6-d3c5-48ac-8eee-1a9e29120c31",
"344a51cf-379f-40ab-ab2c-711dab3f53a9a"
]
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/list-pickup",
"message_ids": [
"06ca25f6-d3c5-48ac-8eee-1a9e29120c31",
"344a51cf-379f-40ab-ab2c-711dab3f53a9a"
]
}
```

`message_ids` message id array for picking up messages. Any message id in `message_ids` could be delivered via several ways to the recipient (Push notification or with an envoloped message).

### Message List Query Response

A response to query with message id list.
```json=

```json
{
"@type": "https://didcomm.org/messagepickup/1.0/list-response",
"messages~attach": [
Expand All @@ -121,16 +140,18 @@ A response to query with message id list.
]
}
```

### Noop

Used to receive another message implicitly. This message has no expected behavior when received.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/noop"
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/1.0/noop"
}
```


## Prior art

Concepts here borrow heavily from a [document](https://hackmd.io/@8VtAqKThQ6mKa9T7JgzIaw/SJw9Ead2N?type=view) written by Andrew Whitehead of BCGov.
Expand All @@ -143,6 +164,6 @@ Concepts here borrow heavily from a [document](https://hackmd.io/@8VtAqKThQ6mKa9

The following lists the implementations (if any) of this RFC. Please do a pull request to add your implementation. If the implementation is open source, include a link to the repo or to the implementation within the repo. Please be consistent in the "Name" field so that a mechanical processing of the RFCs can generate a list of all RFCs supported by an Aries implementation.

Name / Link | Implementation Notes
--- | ---
| |
| Name / Link | Implementation Notes |
| ----------- | -------------------- |
| |
68 changes: 37 additions & 31 deletions features/0213-transfer-policy/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 0213: Transfer Policy Protocol

- Authors: [Sam Curren](mailto:telegramsam@gmail.com)
- Status: [PROPOSED](/README.md#proposed)
- Since: 2019-09-03
Expand All @@ -24,65 +25,70 @@ Explicit Policy Enables clear expectations.
## Reference

### Policy Publish

Used to share current policy by policy holder.
This can be sent unsolicited or in response to a `policy_share_request`.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/transferpolicy/1.0/policy",
"queue_max_duration": 86400,
"message_count_limit": 1000,
"message_size_limit": 65536,
"queue_size_limit": 65536000,
"pickup_allowed": true,
"delivery_retry_count_limit":5,
"delivery_retry_count_seconds":86400,
"delivery_retry_backoff": "exponential"
"@id": "123456781",
"@type": "https://didcomm.org/transferpolicy/1.0/policy",
"queue_max_duration": 86400,
"message_count_limit": 1000,
"message_size_limit": 65536,
"queue_size_limit": 65536000,
"pickup_allowed": true,
"delivery_retry_count_limit": 5,
"delivery_retry_count_seconds": 86400,
"delivery_retry_backoff": "exponential"
}
```

### Policy Share Request

Used to ask for a `policy` message to be sent.
```json=

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/transferpolicy/1.0/policy_share_request"
"@id": "123456781",
"@type": "https://didcomm.org/transferpolicy/1.0/policy_share_request"
}
```

### Policy Change Request
Sent to request a policy change. The expected response is a `policy` message.

```json=
Sent to request a policy change. The expected response is a `policy` message.

```json
{
"@id": "123456781",
"@type": "https://didcomm.org/transferpolicy/1.0/policy_change_request",
"queue_max_duration": 86400,
"message_count_limit": 1000,
"message_size_limit": 65536,
"queue_size_limit": 65536000,
"pickup_allowed": true,
"delivery_retry_count_limit":5,
"delivery_retry_count_seconds":86400,
"delivery_retry_backoff": "exponential"
"@id": "123456781",
"@type": "https://didcomm.org/transferpolicy/1.0/policy_change_request",
"queue_max_duration": 86400,
"message_count_limit": 1000,
"message_size_limit": 65536,
"queue_size_limit": 65536000,
"pickup_allowed": true,
"delivery_retry_count_limit": 5,
"delivery_retry_count_seconds": 86400,
"delivery_retry_backoff": "exponential"
}
```
Only attributes that you desire to change need to be included.

Only attributes that you desire to change need to be included.

## Prior art

Concepts here borrow heavily from a [document](https://hackmd.io/@8VtAqKThQ6mKa9T7JgzIaw/SJw9Ead2N?type=view) written by Andrew Whitehead of BCGov.

## Unresolved questions

- Is the attribute list too extensive for a first pass?
- Which policy attributes should be required? Which optional?

## Implementations

The following lists the implementations (if any) of this RFC. Please do a pull request to add your implementation. If the implementation is open source, include a link to the repo or to the implementation within the repo. Please be consistent in the "Name" field so that a mechanical processing of the RFCs can generate a list of all RFCs supported by an Aries implementation.

Name / Link | Implementation Notes
--- | ---
| |
| Name / Link | Implementation Notes |
| ----------- | -------------------- |
| |
18 changes: 9 additions & 9 deletions features/0685-pickup-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ rather than being pushed to the queue. See [Live Mode](#live-mode) for more deta

Each message sent MUST use the `~transport` decorator as follows, which has been adopted from [RFC 0092 transport return route](/features/0092-transport-return-route/README.md) protocol. This has been omitted from the examples for brevity.

```json=
```json
"~transport": {
"return_route": "all"
}
Expand All @@ -58,7 +58,7 @@ Each message sent MUST use the `~transport` decorator as follows, which has been
Sent by the _Recipient_ to the _Mediator_ to request a `status` message.
#### Example:

```json=
```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/2.0/status-request",
Expand All @@ -74,7 +74,7 @@ Status details about waiting messages.

#### Example:

```json=
```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/2.0/status",
Expand Down Expand Up @@ -110,7 +110,7 @@ A request from the _Recipient_ to the _Mediator_ to have pending messages delive

#### Examples:

```json=
```json
{
"@id": "123456781",
"@type": "https://didcomm.org/messagepickup/2.0/delivery-request",
Expand All @@ -119,7 +119,7 @@ A request from the _Recipient_ to the _Mediator_ to have pending messages delive
}
```

```json=
```json
{
"@type": "https://didcomm.org/messagepickup/2.0/delivery-request",
"limit": 1
Expand All @@ -143,7 +143,7 @@ The ONLY valid type of attachment for this message is a DIDComm Message in encry

The `recipient_key` attribute is only included when responding to a `delivery-request` message that indicates a `recipient_key`.

```json=
```json
{
"@id": "123456781",
"~thread": {
Expand All @@ -168,7 +168,7 @@ which messages are safe to clear from the queue.

#### Example:

```json=
```json
{
"@type": "https://didcomm.org/messagepickup/2.0/messages-received",
"message_id_list": ["123","456"]
Expand Down Expand Up @@ -201,7 +201,7 @@ Live Mode is changed with a `live-delivery-change` message.

#### Example:

```json=
```json
{
"@type": "https://didcomm.org/messagepickup/2.0/live-delivery-change",
"live_delivery": true
Expand All @@ -212,7 +212,7 @@ Upon receiving the `live_delivery_change` message, the _Mediator_ MUST respond w

If sent with `live_delivery` set to `true` on a connection incapable of live delivery, a `problem_report` SHOULD be sent as follows:

```json=
```json
{
"@type": "https://didcomm.org/notification/1.0/problem-report",
"~thread": {
Expand Down
Loading