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 broken links, update others to static #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions CHIPs/chip-0004.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Status | Final
Category | Standards Track
Sub-Category | Chialisp
Created | 2022-06-05
Requires | [0005](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0005.md), [Singleton Standard](https://chialisp.com/singletons "Chia's Singleton Standard (pre-CHIP)")
Requires | [0005](https://github.com/Chia-Network/chips/blob/main/CHIPs/chip-0005.md), [Singleton Standard](https://chialisp.com/singletons/#code)
Replaces | None
Superseded-By | None

Expand Down Expand Up @@ -151,17 +151,17 @@ Several aspects of Chia's blockchain and programming environment influenced our

While the DID1 specification requires an inner puzzle, there is no set standard on what functionality that puzzle shall entail. Therefore, DID1-compliant inner puzzles with a wide variety of functionality may be used. DID1 will ship with one optional inner puzzle, the details of which are included in this section for your reference.

The reference inner puzzle sits inside the singleton layer and provides the functionality related to being an identity. It is located in GitHub, under [chia-blockchain/blob/main/chia/wallet/puzzles/did_innerpuz.clvm](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/did_innerpuz.clvm).
The reference inner puzzle sits inside the singleton layer and provides the functionality related to being an identity. It is located in GitHub, under [chia-blockchain/blob/main/chia/wallet/did_wallet/puzzles/did_innerpuz.clvm](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/did_wallet/puzzles/did_innerpuz.clsp).

DID1 implementations that use the reference inner puzzle must curry the following arguments into its solution:
* **INNER_PUZZLE:** A standard "pay-to" (p2) puzzle, used to record ownership of the DID
* **RECOVERY_DID_LIST_HASH:** The hash of the list of DIDs that can be used to recover this DID by sending this DID a message. A hash is stored instead of the full list in order to avoid revealing the whole list every time the singleton is spent
* **NUM_VERIFICATIONS_REQUIRED:** The number of DIDs from the above list that are required for recovery
* **SINGLETON_STRUCT:** Defines the singleton used with this DID. Contains the following structure
* ((SINGLETON_MOD_HASH, (LAUNCHER_ID, LAUNCHER_PUZZLE_HASH))), where:
* **SINGLETON_MOD_HASH** is the tree hash of [singleton_top_layer_v1_1.clvm](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/singleton_top_layer_v1_1.clvm) without any curried arguments
* **SINGLETON_MOD_HASH** is the tree hash of [singleton_top_layer_v1_1.clvm](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/puzzles/singleton_top_layer_v1_1.clsp) without any curried arguments
* **LAUNCHER_ID** is the coin_id of the singleton used with this DID
* **LAUNCHER_PUZZLE_HASH** is the tree hash of [singleton_launcher.clvm](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/singleton_launcher.clvm), which creates the singleton coin and announcement
* **LAUNCHER_PUZZLE_HASH** is the tree hash of [singleton_launcher.clvm](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/puzzles/singleton_launcher.clsp), which creates the singleton coin and announcement
* **METADATA:** A list of customizable key/value pairs, e.g. `"metadata": {"foo": "bar", "something": 5}`. May be used to convey a wide variety of information

Additionally, the reference inner puzzle includes the following solution upon initiating a message creation, recovery or self-destruct action:
Expand Down Expand Up @@ -728,12 +728,12 @@ Response:

## Test Cases
Test cases for Chia DIDs are located in the `main` branch of the chia-blockchain GitHub repository, in the /tests/wallet/did_wallet folder:
* [test_did.py](https://github.com/Chia-Network/chia-blockchain/blob/main/tests/wallet/did_wallet/test_did.py)
* [test_did.py](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/tests/wallet/did_wallet/test_did.py)

## Reference Implementation
At the time of this CHIP's completion, the most recent reference implementation for Chia DIDs is located in the `main` branch of the chia-blockchain GitHub repository, under [chia/wallet/did_wallet](https://github.com/Chia-Network/chia-blockchain/tree/main/chia/wallet/did_wallet).
At the time of this CHIP's completion, the most recent reference implementation for Chia DIDs is located in the `main` branch of the chia-blockchain GitHub repository, under [chia/wallet/did_wallet](https://github.com/Chia-Network/chia-blockchain/tree/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/did_wallet).

DIDs currently require the use of [singleton_launcher.clvm](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/singleton_launcher.clvm), [singleton_top_layer_v1_1.clvm](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/singleton_top_layer_v1_1.clvm) and [did_innerpuz.clvm](https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/puzzles/did_innerpuz.clvm).
DIDs currently require the use of [singleton_launcher.clvm](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/puzzles/singleton_launcher.clsp), [singleton_top_layer_v1_1.clvm](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/puzzles/singleton_top_layer_v1_1.clsp) and [did_innerpuz.clvm](https://github.com/Chia-Network/chia-blockchain/blob/76ac3a8d2b0b7ad115be88a5ad718c29d7901760/chia/wallet/did_wallet/puzzles/did_innerpuz.clsp).

Note that the source code linked from this section may be changed in the future, so long as it continues to conform with the specification laid out in this document.

Expand All @@ -744,4 +744,4 @@ This CHIP was reviewed for consistency and obvious bugs.
* Portions of this document were derived from the [W3C DID specification](https://www.w3.org/TR/did-core/)

## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).