-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define and describe DSNP operations.
- Loading branch information
Showing
8 changed files
with
201 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Operations | ||
|
||
DSNP implementations perform well-defined DSNP Operations and generate DSNP State Change Records. | ||
|
||
## Control Keys and Proofs | ||
|
||
Each invocation of a DSNP Operation MUST have verifiable approval of the acting principal(s) via a Control Key Ownership Proof. | ||
The precise data type and representation of both the Control Key and the Control Key Ownership Proof MUST be defined by each DSNP implementation. | ||
For example, an implementation might use the public key of an asymmetric key pair as a control key, and provide a proof for each operation by producing a cryptographic signature of the user's DSNP Identifier and some nonce value. | ||
|
||
Where operations are listed as using control keys or ownership proofs as input parameters, this indicates that they should be provided in addition to those providing invocation authentication. | ||
|
||
## Transaction Identifiers | ||
|
||
Each invocation of a DSNP Operation should be associated with a transaction identifier. The precise data type and usage pattern of a transaction identifier is left implementation-dependent. | ||
Transaction identifiers are useful for association of operations with asynchronously emitted state change records. It MUST be possible to associate a DSNP State Change Record with a transaction identifier from a particular DSNP Operation invocation. | ||
|
||
## Failure Handling | ||
|
||
Compliant implementations may respond to error conditions either synchronously, as a response to the invocation request, or asynchronously, by emitting a [Failure Record](Records.md#failure). | ||
|
||
## List of Operations | ||
|
||
| Operation | Optional? | Principal(s) | Inputs | State Change Record | | ||
|---------- |---------- |------------- |------- |-------------- | | ||
| <a id="CreateIdentifier">Create Identifier</a> | no | None | Control Key, Control Key Ownership Proof | [Identifier Creation Record](Records.md#identifier-creation) | | ||
| <a id="RetireIdentifier">Retire Identifier</a> | no | User | None | [Identifier Retirement Record](Records.md#identifier-retirement) | | ||
| <a id="DefineDelegation">Define Delegation</a> | no | User AND Delegate | User's Identifier, Delegate's Identifier, Set of Allowed [Announcement Types](Announcements.md#announcement-types) | [Delegation Definition Record](Records.md#delegation-definition) | | ||
| <a id="RevokeDelegation">Revoke Delegation</a> | no | User OR Delegate | User's Identifier, Delegate's Identifier | [Delegation Revocation Record](Records.md#delegation-revocation) | | ||
| <a id="AddControlKey">Add Control Key</a> | YES | User | Control Key, Control Key Ownership Proof | [Control Key Addition Record](Records.md#control-key-addition) | | ||
| <a id="RemoveControlKey">Remove Control Key</a> | YES | User | Control Key | [Control Key Removal Record](Records.md#control-key-removal) | | ||
| <a id="PublishAnnouncement">Publish Announcement</a> | no[^1] | User OR Delegate | [Announcement](Announcements.md) | [Announcement Published Record](Records.md#announcement-published) | | ||
| <a id="PublishBatch">Publish Batch</a> | no[^1] | User OR Delegate | [Announcement Type](Announcements.md#announcement-types), [Batch Publication](BatchPublications.md) URL, Batch Publication Content Hash | [Batch Published Record](Records.md#batch-published) | | ||
|
||
[^1]: For each Announcement Type, an implementation may support one or both of these operations. Implementations MUST document which of the operations is available for each announcement type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# State Change Records | ||
|
||
State Change Records constitute the observable output of a DSNP system. | ||
Implementations MUST specify how applications can translate implementation-specific output into State Change Records. | ||
|
||
Each Record is associated with a transaction identifier, which allows [Operations](Operations.md) to be associated with their results asynchronously. | ||
|
||
Records consists of one or more fields. | ||
|
||
<!-- Raw HTML is required to do rowspans --> | ||
<div class="table-wrapper"> | ||
<table> | ||
<thead> | ||
|
||
<tr> | ||
<th align="left">Record Type</th> | ||
<th>Field</th> | ||
<th>Field Data Type</th> | ||
</tr> | ||
|
||
</thead> | ||
<tbody> | ||
|
||
<tr> | ||
<td rowspan="2"><a id="identifier-creation">Identifier Creation Record</a></td> | ||
<td>Control Key</td> | ||
<td><i>Implementation dependent</i></td> | ||
</tr> | ||
<tr> | ||
<td>Control Key Ownership Proof</td> | ||
<td><i>Implementation dependent</i></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="1"><a id="identifier-retirement">Identifier Retirement Record</a></td> | ||
<td>User's Identifier</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="3"><a id="delegation-definition">Delegation Definition Record</a></td> | ||
<td>User Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
<tr> | ||
<td>Delegate Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
<tr> | ||
<td>Allowed Announcement Types</td> | ||
<td>List of <a href="Announcements.html#announcement-types">enum values</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="2"><a id="delegation-revocation">Delegation Revocation Record</a></td> | ||
<td>User Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
<tr> | ||
<td>Delegate Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="3"><a id="control-key-addition">Control Key Addition Record</a></td> | ||
<td>User Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
<tr> | ||
<td>Control Key</td> | ||
<td><i>Implementation dependent</i></td> | ||
</tr> | ||
<tr> | ||
<td>Control Key Ownership Proof</td> | ||
<td><i>Implementation dependent</i></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="2"><a id="control-key-removal">Control Key Removal Record</a></td> | ||
<td>User Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
<tr> | ||
<td>Control Key</td> | ||
<td><i>Implementation dependent</i></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="1"><a id="announcement-published">Announcement Published Record</a></td> | ||
<td>Announcement</td> | ||
<td><i>One of the types described in</i> <a href="Announcements.html">Announcements</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="4"><a id="batch-published">Batch Published Record</a></td> | ||
<td>From Id</td> | ||
<td><a href="Identifiers.html#dsnp-user-id">DSNP User Id</a></td> | ||
</tr> | ||
<tr> | ||
<td>Announcement Type</td> | ||
<td><a href="Announcements.html#announcement-types">Enum value</a></td> | ||
</tr> | ||
<tr> | ||
<td>URL</td> | ||
<td>String</td> | ||
</tr> | ||
<tr> | ||
<td>Content Hash</td> | ||
<td><a href="Identifiers.html#dsnp-content-hash">DSNP Content Hash</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td rowspan="1"><a id="failure">Failure Record</a></td> | ||
<td>Message</td> | ||
<td>String</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters