Skip to content

Commit bcc0cdb

Browse files
authored
docs(spec): add also known as patches (#1196)
1 parent 5e20ddf commit bcc0cdb

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

docs/spec/patches.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,40 @@ Without careful validation, use of `ietf-json-patch` may result in unrecoverable
249249
::: warning
250250
Use of `ietf-json-patch` may harm an implmentation's ability to perform validation on operations at ingestion time, which could impact performance negatively.
251251
:::
252+
253+
#### `add-also-known-as`
254+
255+
::: example
256+
```json
257+
{
258+
"action": "add-also-known-as",
259+
"uris": [
260+
"did:example:1234"
261+
]
262+
}
263+
```
264+
:::
265+
266+
The `add-also-known-as` _Patch Action_ describes the addition of [Also Known As](https://www.w3.org/TR/did-core/#also-known-as) to a DID's state. For any part of an `add-also-known-as` _Patch Action_ to be applied to the DID's state, all specified conditions ****MUST**** be met for all properties and values, else the patch ****MUST**** be discarded in its entirety. To construct an `add-also-known-as` patch, compose an object as follows:
267+
268+
1. The object ****MUST**** include an `action` property, and its value ****MUST**** be `add-also-known-as`.
269+
2. The object ****MUST**** include a `uris` property, and its value ****MUST**** be an array. Each value of the array ***MUST*** be a URI. If the value is not of the correct type, the entire _Patch Action_ ****MUST**** be discarded, without any of it being used to modify the DID's state.
270+
271+
272+
#### `remove-also-known-as`
273+
274+
::: example
275+
```json
276+
{
277+
"action": "remove-also-known-as",
278+
"uris": [
279+
"did:example:1234"
280+
]
281+
}
282+
```
283+
:::
284+
285+
The `remove-also-known-as` _Patch Action_ describes the removal of [Also Known As](https://www.w3.org/TR/did-core/#also-known-as) from a DID's state. For any part of an `remove-also-known-as` _Patch Action_ to be applied to the DID's state, all specified conditions ****MUST**** be met for all properties and values, else the patch ****MUST**** be discarded in its entirety. To construct a `remove-also-known-as` _Patch Action_, compose an object as follows:
286+
287+
1. The object ****MUST**** include an `action` property, and its value ****MUST**** be `remove-also-known-as`.
288+
2. The object ****MUST**** include a `uris` property, and its value ****MUST**** be an array of URIs that correspond with `Also Known As` URIs presently associated with the DID that are to be removed.

docs/spec/title.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Sidetree v1.0.0
1+
Sidetree v1.0.1
22
==================
33

44
**Specification Status:** DIF Ratified Specification

0 commit comments

Comments
 (0)