Skip to content

Latest commit

 

History

History
747 lines (544 loc) · 46.1 KB

chip-0004.md

File metadata and controls

747 lines (544 loc) · 46.1 KB
CHIP Number 0004
Title DID1 Standard
Description A standard for implementing decentralized identifiers (DIDs) on Chia's blockchain
Author Dan Perry
Editor Will Riches
Comments-URI Chia-Network#18
Status Final
Category Standards Track
Sub-Category Chialisp
Created 2022-06-05
Requires 0005, Singleton Standard
Replaces None
Superseded-By None

Abstract

Decentralized Identifiers (DIDs) are a new type of identifier that enables verifiable, decentralized digital identity. The owner of a Chia DID can be any entity, such as a person, a company, an electronic device, etc. Chia DIDs can be associated with the owner's wallet, an NFT marketplace or any other aspect of Chia's ecosystem. They are stored on Chia's decentralized blockchain. They are also programmable, customizable, rekeyable, and discoverable. Anyone using Chia's blockchain may create a Chia DID to represent themselves or their organization.

Definitions

Throughout this document, we'll use the following terms:

  • Must, required, shall – These words indicate an absolute requirement of the specification
  • Must not, shall not – These phrases indicate an absolute prohibition of the specification
  • Should, recommended – These words indicate something that is not a requirement of the specification, but the implications of not following it should be carefully considered beforehand
  • Should not, not recommended – These phrases indicate something that is not a prohibition of the specification, but the implications of following it should be carefully considered beforehand
  • May - This word indicates something that is optional. Interoperability between implementations must not be broken because of the choice to implement, or not to implement, this feature
  • Recovery - A process by which one or more keys are retrieved, typically after having been lost
  • Rekey - A process by which all of the existing keys pertaining to a wallet (specifically a DID wallet for this document) are replaced with new keys, typically after having been either lost or sniffed/copied. The number of new keys does not need to be equal to the number of old keys, although this is typically the case. Note that the processes used for recovery and rekey are almost the same

Motivation

Humans, organizations and even devices should have total control over their personal information. This includes ownership of data, as well as the ability to decide which aspects of their identities are shared, and with whom. Unfortunately, we live in a world where personal information is routinely shared without the owner's knowledge or consent. Chia DIDs are a stepping stone to help solve this.

Most people and organizations possess multiple forms of identification. Examples include passports, national ID cards, company registration numbers, social security numbers, email addresses, phone numbers and barcodes. These identifiers are globally unique -- they cannot be reused by anyone else. They are also issued by a central authority, such as a government or a company; the data contained within is controlled using opaque, closed-source algorithms.

Because of their centralized issuance and control, the identifiers listed above come with many downsides, such as:

  • Their owners have little control over the private or sensitive information they contain. This information could be shared without the owner's consent, such as when a credit bureau sells a customer's information
  • Their owners are often denied access to their own data, creating an asymmetry of information
  • They can be revoked against their owner's will
  • They might cease to exist if their issuing entity fails
  • They are limited in scope
    • A national ID card has little value outside of the country from which it was issued
  • They are not interoperable
    • Alice cannot log into two competing social networks using the same identifier. Even if she uses the same email address, username and password for both networks, the underlying identifiers will be different. Each network will store a different history and reputation for Alice

Some identifiers, such as usernames on accounts, can be reused, even by different people. They also exist in walled gardens. For example, identities are not typically transferable between competing social networks.

All of these downsides are solved by Chia DIDs:

  • They are globally unique identifiers that are not issued by central authorities, nor are any aspects of Chia DIDs controlled by anyone but their owner
  • Their owners have total control over all information contained within, including any private or sensitive details. This information may not be shared without their owner's consent
  • They cannot be revoked against their owner's will
  • They cannot be destroyed, as long as Chia's blockchain is operational
  • They can have a large amount of scope
  • They can be made interoperable
    • Different companies or entities could accept Chia DIDs, even if they were competitors

Use cases for Chia DIDs include, but are not limited to:

  • Cryptographically proving identity online
  • Enabling marketplaces that are not walled gardens
  • Enabling self-custody of digital assets
  • Enabling the designation of trusted entities for M-of-N wallet recovery in cases where the owner loses their original credentials (this does not protect against theft of the owner's credentials, however)
  • Grouping multiple assets together into collections
  • Enabling identifiers that any blockchain can reference, thus allowing for interoperability between networks
  • Supporting rate-limited wallets, as well as claw backs
  • Tracing provenance of NFTs and other digital assets

Chia DIDs require singletons, which have already been implemented and are documented on chialisp.com.

Backwards Compatibility

DID1 does not introduce any breaking changes to Chia.

Rationale

Chia's blockchain is public and open source. It features strong privacy controls, as well as the sandboxing of data. These features make Chia's blockchain a natural platform on which to implement DIDs.

This section will discuss alternative designs for DIDs and why they were not chosen. It will also discuss the influence for the structure of Chia DIDs, as well as the design decisions that were made.

Alternative designs

It is common to deploy existing DIDs on private blockchains. These implementations defeat the purpose of DIDs:

  • By definition, private blockchains are under the control of a central authority
  • A private blockchain's controlling authority has the power to terminate the chain, and any data contained within, including DIDs
  • If a private blockchain's controlling authority either goes bankrupt or is sold, their blockchain can also be terminated
  • A DID on a private blockchain could be censored, even for mundane reasons. For example, if a DID's owner opens an account on a competing blockchain, the DID could be revoked
  • Existing DID implementations only provide authentication and authorization. Certain desirable features of DIDs, such as rate-limited wallets and claw backs, are not congruent with a private blockchain

Chia's blockchain does not suffer any of the centralization issues outlined above. The blockchain is public and decentralized; no single entity has control over it.

Design influence

Several aspects of Chia's blockchain and programming environment influenced our design decisions for Chia DIDs:

  • The coin set model: Most blockchains with a strong on-chain programming environment use an account model, which implements a centralized design pattern: Multiple users interact with a fixed smart contract on the blockchain

    Chia's coin set model is decentralized by design -- each user can only spend their own smart coins. Coins can only interact with other coins by using announcements. These design patterns create strong sandboxing, while maintaining each of the central tenets of DIDs.

  • Chialisp: Chialisp is Chia's Turing-complete on-chain programming language. Like all Lisp variants, Chialisp can be represented as a binary tree. This design allows for an arbitrary amount of data to be used with each program, contained in a single tree hash. A DID's owner can therefore choose whatever information they want to be included in their DID. Chialisp also enables strong composability and interoperability between coins, creating the potential for nearly limitless customizable features

  • BLS signatures: Chia uses BLS signatures, which have built-in capability for M of N multisig. This will allow Chia DIDs to be shared between multiple parties, and only allow transactions to occur if a threshold of signatures has been reached. BLS signatures also enable recovery of a lost key with M of N trusted signatures

  • Offers: Requests for credentials could be incorporated into offers, which are partially signed transactions with no central intermediary required for completion

Design decisions

  • Each DID that follows the DID1 standard is required to be implemented as a singleton
  • For recovery, each DID should contain a hash of a list of trusted DIDs. If recovery is not a desired feature, then a placeholder may be used instead
  • The number of possible entries in the trusted DID list is bounded by the blockchain's limitations, which are determined by CLVM cost
  • DIDs must support transaction fees upon invoking a rekey operation
  • A DID's on-chain metadata should not contain any personally identifiable information
  • DID metadata must comply with the JSON-LD format

Specification

Key Features

  • Usability

    • A DID may contain the owner’s public key
    • A DID owner may create more than one DID using the same public/private key pair
    • A DID shall not have exclusive control over a public/private key pair
    • DIDs may own multiple singletons
    • The DID ID may be shared as a means to verify identity
    • The DID ID must be made discoverable by blockchain explorers
    • It must be possible to discover all assets owned by a DID
    • DID owners may provide their DIDs to issuers to be signed as Verifiable Credentials (VCs), thus allowing VCs to be issued to those DIDs
    • DID owners must be able to view and copy their DID ID
    • A DID singleton must be able to contain customizable metadata
    • DID owners must be able to view the metadata associated with their DIDs
    • DID owners must be able to view all DIDs owned by their root key
    • DIDs can be arbitrarily custodied. This includes the ability to recover and transfer a DID
  • Wallets

    • Wallets that access Chia's blockchain may implement DID1
    • Wallets that implement DID1 must allow users to create DIDs
    • Wallets that implement DID1 must be able to display DID IDs for users to view, copy and share
    • DID owners must be able to add their DID(s) to any wallets that implement DID1
    • DID owners should be able to customize the names of their DIDs to be shown by the wallet UI. These custom names are not stored on chain
    • DIDs must be made discoverable by wallets that implement DID1
    • Wallets that implement DID1 are recommended to support fees for transactions made with DIDs
    • Wallets that implement DID1 are recommended to support showing a list of all assets owned by the DID to the DID’s owner
  • Offers

    • DID owners may include their DID identifier when acting as the Maker in an offer of XCH, Chia Asset Tokens (CATs), Non-Fungible Tokens (NFTs) or any other Chia asset
  • Rekey

    • A DID's owner must be able to rekey their DID to another public key
    • Assets owned by a DID may be made rekeyable
    • Upon rekeying a DID, all assets owned by that DID must also be rekeyed. However, the rekey of assets merely associated with that DID is optional
  • Upgradeability

    • DIDs using the DID1 specification must be upgradeable to include features of future DID specifications
  • Third-party custody

    • Third parties may custody DIDs on their owners' behalf
    • Third parties must obtain permission from a DID's owner before custody is transferred
    • Depending on the inner puzzle, a requirement that the asset be returned to the original owner upon request may or may not be enabled. If this requirement is disabled, the owner must trust the third party to return the DID upon request

Inner Puzzle

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.

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 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, 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:

  • mode: The type of spend. Choose from
    • 0 = Recovery
    • 1 = Run INNER_PUZZLE with p2_solution. The inner puzzle may implement any desired functionality
  • my_amount_or_inner_solution:
    • In mode 0, this is an amount. Recover this coin and assert its amount
    • In mode 1, this is the solution to the inner p2 puzzle
  • new_inner_puzhash: In recovery mode, this will be the new wallet DID puzzle hash
  • parent_innerpuzhash_amounts_for_recovery_ids: A list of DIDs, each of which contains a complete list of arguments, to be used for recovery
  • pubkey: The new public key used for a recovery
  • recovery_list_reveal: This is the list of DIDs that had previously been approved for recovery. The hash of this list must equal RECOVERY_DID_LIST_HASH
  • my_id: This coin's coin_id

RPCs

Wallets that implement DID1 may optionally include the following RPCs in their implementation. For more information on using these RPCs, see Chia Network Inc's documentation.

did_set_wallet_name

Functionality: Set the name of a DID wallet

Usage: chia rpc wallet [OPTIONS] did_set_wallet_name [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet on which to set the name
name True The new name of the DID wallet

Example request:

chia rpc wallet did_set_wallet_name '{"wallet_id": 3, "name": "My DID Wallet"}'

Response:

{
    "success": true,
    "wallet_id": 3
}

did_get_wallet_name

Functionality: Given a DID wallet's ID, retrieve the name of that wallet

Usage: chia rpc wallet [OPTIONS] did_get_wallet_name [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet on which to get the name

Example request:

chia rpc wallet did_get_wallet_name '{"wallet_id": 3}'

Response:

{
    "name": "My DID Wallet",
    "success": true,
    "wallet_id": 3
}

did_update_recovery_ids

Functionality: Append one or more IDs to be used for recovery of a DID wallet. The current list can be obtained with the did_get_recovery_list endpoint

Usage: chia rpc wallet [OPTIONS] did_update_recovery_ids [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet for which to update the recovery IDs
new_list True The new recovery ID list. Each item from this list will be appended to the existing list
num_verifications_required False Optionally set the number of IDs required for wallet recovery. If not set, then the entire updated list will be required by default
fee False An optional blockchain fee, in mojos

Example request:

chia rpc wallet did_update_recovery_ids '{"wallet_id": 3, "new_list": ["did:chia:1d2x5wnm4sl4j2ena8ka3fyv8x7tzc9v520gstd3zfdu4pf6c2yksk8th4u", "did:chia:1gsarjll9lrd4kwxdglh28cjn3ln6u7ldfzsask9gw4tprzce20vsywwsqs"]}'

Response:

{
    "success": true
}

did_update_metadata

Functionality: Update the metadata for a DID wallet. The current metadata can be obtained with the did_get_metadata endpoint

Usage: chia rpc wallet [OPTIONS] did_update_metadata [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet for which to update the metadata
metadata True The updated metadata
fee False An optional blockchain fee, in mojos

Example request:

chia rpc wallet did_update_metadata '{"wallet_id": 3, "metadata": {"foo": "bar", "something": 5}}'

Response:

{
    "success": true
}

did_get_did

Functionality: Fetch the my_did and coin_id (if applicable) settings for a given wallet

Usage: chia rpc wallet [OPTIONS] did_get_did [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet for which to get the DID info

Example request:

chia rpc wallet did_get_did '{"wallet_id": 3}'

Response:

{
    "coin_id": "0xce323237c656693fc2f633f911a589b42fe142f18c70883fbe70f7718538cf66",
    "my_did": "did:chia:17sfqnlhawfu5k5nzp36v67u85qythp7aummt8f4sj2t3rdag2yvskjyqal",
    "success": true,
    "wallet_id": 3
}

did_get_recovery_list

Functionality: For a given wallet, fetch the recovery list, as well as the number of IDs required for recovery

Usage: chia rpc wallet [OPTIONS] did_get_recovery_list [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet for which to get the recovery list

Example request:

chia rpc wallet did_get_recovery_list '{"wallet_id": 3}'

Response:

{
    "num_required": 2,
    "recovery_list": [
        "did:chia:1d2x5wnm4sl4j2ena8ka3fyv8x7tzc9v520gstd3zfdu4pf6c2yksk8th4u",
        "did:chia:1gsarjll9lrd4kwxdglh28cjn3ln6u7ldfzsask9gw4tprzce20vsywwsqs"
    ],
    "success": true,
    "wallet_id": 3
}

did_get_metadata

Functionality: Fetch the metadata for a given wallet

Usage: chia rpc wallet [OPTIONS] did_get_metadata [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet for which to get the metadata list

Example request:

chia rpc wallet did_get_metadata '{"wallet_id": 3}'

Response:

{
    "metadata": {
        "foo": "bar",
        "something": 5
    },
    "success": true,
    "wallet_id": 3
}

did_recovery_spend

Functionality: Recover a DID to a new DID by using an attest file

Usage: chia rpc wallet [OPTIONS] did_recovery_spend [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet to recover
attest_data True A list of attest files to be used for recovery
pubkey False The public key of the wallet to recover. If this is not provided, a temporary public key will be used instead
puzhash False The puzzle hash of the wallet to recover. If this is not provided, a temporary puzzle hash will be used instead
fee False An optional blockchain fee, in mojos

did_get_pubkey

Functionality: Get the public key for a DID

Usage: chia rpc wallet [OPTIONS] did_get_pubkey [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet from which to obtain the public key

Example Request:

$ chia rpc wallet did_get_pubkey '{"wallet_id": 2}'

Response:

{
    "pubkey": "886826068778f285c442cfd08a45c7b55ecc9ef870b9b18810e81457c56df9764793686c1756e48a91586839a4abd290",
    "success": true
}

did_create_attest

Functionality: Create an attest for a DID, to be used for recovery. This command will output the attest data, which can then be added or redirected to a file

Usage: chia rpc wallet [OPTIONS] did_create_attest [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID for which to create the attest
coin_name True The coin to use for the attest
pubkey True The public key to use for the attest
puzhash True The puzzle hash to use for the attest
fee False An optional blockchain fee, in mojos

did_get_information_needed_for_recovery

Functionality: Display all relevant information needed to recover a given DID. This RPC must be called on a DID wallet that was created with "did_type":"recovery".

Usage: chia rpc wallet [OPTIONS] did_get_information_needed_for_recovery [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet from which to obtain the recovery information

Example Request:

chia rpc wallet did_get_information_needed_for_recovery '{"wallet_id": 2}'

Response:

{
    "backup_dids": [
        "0x0fc4d8aea5b66cac7c29d93d9eee37b6c0bd9ffcd6b8e38e2c8810de5199c4d3"
    ],
    "coin_name": "025b4ed9eafab653a6e80c1c1603272cfec0e5c5591bb45a7025dadedba63e23",
    "my_did": "did:chia:19z0ladugc29x36580yejgp0s6czq0axt4tq0w7kr9uk4042asusqvxldga",
    "newpuzhash": "0x3929e3a268d3d04b8a40f226b66f0ab4f00b5c12fd628bc18f8ce573e76b291f",
    "pubkey": "0xa1b184cf85e9804ba1df27acd2efd4622366315293f2c2e06eae7d9776cd3ef474edd4d0f10323e8a7a817b5a42317de",
    "success": true,
    "wallet_id": 2
}

did_get_current_coin_info

Functionality: Get the current coin info (parent coin, puzzle hash, amount) for a DID wallet

Usage: chia rpc wallet [OPTIONS] did_get_current_coin_info [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet from which to obtain the coin info

Example Request:

chia rpc wallet did_get_current_coin_info '{"wallet_id": 3}'

Response:

{
    "did_amount": 1,
    "did_innerpuz": "0x02067ee5d738b59436477a13c6d1450916d46b45e5f39062cdfb5973776be836",
    "did_parent": "0x0a0ea8551568817765ef05c3c198f96d7376b19250bdb5ffaab24378f5593d09",
    "my_did": "did:chia:17sfqnlhawfu5k5nzp36v67u85qythp7aummt8f4sj2t3rdag2yvskjyqal",
    "success": true,
    "wallet_id": 3
}

did_create_backup_file

Functionality: Output the backup data of a DID wallet's metadata. This output can then be saved or redirected to a file

Usage: chia rpc wallet [OPTIONS] did_create_backup_file [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet from which to obtain the coin info

did_transfer_did

Functionality: Transfer a DID

Usage: chia rpc wallet [OPTIONS] did_transfer_did [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file TEXT False Instead of REQUEST, provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Parameter Required Description
wallet_id True The Wallet ID of the DID wallet to transfer
inner_address True The address of the inner puzzle to which to transfer the DID
fee False An optional blockchain fee, in mojos

did_message_spend

Functionality: Generate a spend bundle for a DID wallet to send a message (this RPC does not modify the blockchain)

Usage: chia rpc wallet [OPTIONS] did_message_spend [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file FILENAME False Optionally instead of REQUEST you can provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Flag Type Required Description
wallet_id NUMBER True The Wallet ID of the DID wallet from which to spend the message

Example Request:

chia rpc wallet did_message_spend '{"wallet_id": 5}'

Response:

{
    "spend_bundle": {
        "aggregated_signature": "0xad0d726ae7935978129b1c9c558b75c2b629aef893c89c3ec989c347a9eb71ddbaa83dadfe923599e7f14276eaeb84d9063d02b9b91fa561d09689716f177c0304aebb701f9c0f04eba9120b561f482e538a72ece30c086ffd942624b0962c83",
        "coin_solutions": [
            {
                "coin": {
                    "amount": 1,
                    "parent_coin_info": "0x0b51251268ff8c71c0d2a74495b8dce93d2a86591501e71e71d8349112ca8051",
                    "puzzle_hash": "0x50f90b0ff7cdd672953ccfe8b90c2543673bc8aa56981dd7ccee1c41746f6e72"
                },
                "puzzle_reveal": "0xff02ffff01ff02ffff01ff02ffff03ffff18ff2fff3480ffff01ff04ffff04ff20ffff04ff2fff808080ffff04ffff02ff3effff04ff02ffff04ff05ffff04ffff02ff2affff04ff02ffff04ff27ffff04ffff02ffff03ff77ffff01ff02ff36ffff04ff02ffff04ff09ffff04ff57ffff04ffff02ff2effff04ff02ffff04ff05ff80808080ff808080808080ffff011d80ff0180ffff04ffff02ffff03ff77ffff0181b7ffff015780ff0180ff808080808080ffff04ff77ff808080808080ffff02ff3affff04ff02ffff04ff05ffff04ffff02ff0bff5f80ffff01ff8080808080808080ffff01ff088080ff0180ffff04ffff01ffffffff4947ff0233ffff0401ff0102ffffff20ff02ffff03ff05ffff01ff02ff32ffff04ff02ffff04ff0dffff04ffff0bff3cffff0bff34ff2480ffff0bff3cffff0bff3cffff0bff34ff2c80ff0980ffff0bff3cff0bffff0bff34ff8080808080ff8080808080ffff010b80ff0180ffff02ffff03ffff22ffff09ffff0dff0580ff2280ffff09ffff0dff0b80ff2280ffff15ff17ffff0181ff8080ffff01ff0bff05ff0bff1780ffff01ff088080ff0180ff02ffff03ff0bffff01ff02ffff03ffff02ff26ffff04ff02ffff04ff13ff80808080ffff01ff02ffff03ffff20ff1780ffff01ff02ffff03ffff09ff81b3ffff01818f80ffff01ff02ff3affff04ff02ffff04ff05ffff04ff1bffff04ff34ff808080808080ffff01ff04ffff04ff23ffff04ffff02ff36ffff04ff02ffff04ff09ffff04ff53ffff04ffff02ff2effff04ff02ffff04ff05ff80808080ff808080808080ff738080ffff02ff3affff04ff02ffff04ff05ffff04ff1bffff04ff34ff8080808080808080ff0180ffff01ff088080ff0180ffff01ff04ff13ffff02ff3affff04ff02ffff04ff05ffff04ff1bffff04ff17ff8080808080808080ff0180ffff01ff02ffff03ff17ff80ffff01ff088080ff018080ff0180ffffff02ffff03ffff09ff09ff3880ffff01ff02ffff03ffff18ff2dffff010180ffff01ff0101ff8080ff0180ff8080ff0180ff0bff3cffff0bff34ff2880ffff0bff3cffff0bff3cffff0bff34ff2c80ff0580ffff0bff3cffff02ff32ffff04ff02ffff04ff07ffff04ffff0bff34ff3480ff8080808080ffff0bff34ff8080808080ffff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff2effff04ff02ffff04ff09ff80808080ffff02ff2effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff02ffff03ffff21ff17ffff09ff0bff158080ffff01ff04ff30ffff04ff0bff808080ffff01ff088080ff0180ff018080ffff04ffff01ffa07faa3253bfddd1e0decb0906b2dc6247bbc4cf608f58345d173adb63e8b47c9fffa04776fa38a6bb7157e96f8bbc50c17eb8ef08e88ef3f3647aed819886c3cf8d83a0eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9ffff04ffff01ff02ffff01ff02ffff01ff02ffff03ff81bfffff01ff02ff05ff82017f80ffff01ff02ffff03ffff22ffff09ffff02ff7effff04ff02ffff04ff8217ffff80808080ff0b80ffff15ff17ff808080ffff01ff04ffff04ff28ffff04ff82017fff808080ffff04ffff04ff34ffff04ff8202ffffff04ff82017fffff04ffff04ff8202ffff8080ff8080808080ffff04ffff04ff38ffff04ff822fffff808080ffff02ff26ffff04ff02ffff04ff2fffff04ff17ffff04ff8217ffffff04ff822fffffff04ff8202ffffff04ff8205ffffff04ff820bffffff01ff8080808080808080808080808080ffff01ff088080ff018080ff0180ffff04ffff01ffffffff313dff4946ffff0233ff3c04ffffff0101ff02ff02ffff03ff05ffff01ff02ff3affff04ff02ffff04ff0dffff04ffff0bff2affff0bff22ff3c80ffff0bff2affff0bff2affff0bff22ff3280ff0980ffff0bff2aff0bffff0bff22ff8080808080ff8080808080ffff010b80ff0180ffffff02ffff03ff17ffff01ff02ffff03ff82013fffff01ff04ffff04ff30ffff04ffff0bffff0bffff02ff36ffff04ff02ffff04ff05ffff04ff27ffff04ff82023fffff04ff82053fffff04ff820b3fff8080808080808080ffff02ff7effff04ff02ffff04ffff02ff2effff04ff02ffff04ff2fffff04ff5fffff04ff82017fff808080808080ff8080808080ff2f80ff808080ffff02ff26ffff04ff02ffff04ff05ffff04ff0bffff04ff37ffff04ff2fffff04ff5fffff04ff8201bfffff04ff82017fffff04ffff10ff8202ffffff010180ff808080808080808080808080ffff01ff02ff26ffff04ff02ffff04ff05ffff04ff37ffff04ff2fffff04ff5fffff04ff8201bfffff04ff82017fffff04ff8202ffff8080808080808080808080ff0180ffff01ff02ffff03ffff15ff8202ffffff11ff0bffff01018080ffff01ff04ffff04ff20ffff04ff82017fffff04ff5fff80808080ff8080ffff01ff088080ff018080ff0180ff0bff17ffff02ff5effff04ff02ffff04ff09ffff04ff2fffff04ffff02ff7effff04ff02ffff04ffff04ff09ffff04ff0bff1d8080ff80808080ff808080808080ff5f80ffff04ffff0101ffff04ffff04ff2cffff04ff05ff808080ffff04ffff04ff20ffff04ff17ffff04ff0bff80808080ff80808080ffff0bff2affff0bff22ff2480ffff0bff2affff0bff2affff0bff22ff3280ff0580ffff0bff2affff02ff3affff04ff02ffff04ff07ffff04ffff0bff22ff2280ff8080808080ffff0bff22ff8080808080ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff7effff04ff02ffff04ff09ff80808080ffff02ff7effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01ff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0a03bd712b40b706102ffb9a70612bfbb7ce3aa30c81a988e3993e1cdfcc652f43d454904f483151b73abcc996fa7c02eff018080ffff04ffff01a04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459affff04ffff0180ffff04ffff01ffa07faa3253bfddd1e0decb0906b2dc6247bbc4cf608f58345d173adb63e8b47c9fffa04776fa38a6bb7157e96f8bbc50c17eb8ef08e88ef3f3647aed819886c3cf8d83a0eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9ffff04ffff0180ff01808080808080ff01808080",
                "solution": "0xffffa04c534c738148865f4cdb2aaef734810df68dac6cab738544630991ae46a980dfffa056e33fc1fe1a970cbdedb90559097186587fdd4d484b4fef2d96bd4f3afe8082ff0180ff01ffff01ffff80ffff01ffff33ffa056e33fc1fe1a970cbdedb90559097186587fdd4d484b4fef2d96bd4f3afe8082ff01ffffa0f2a5e7790267b0737c32e1e4a064c63b7d304b2b54454099661bdc7277231ac6808080ff80808080"
            }
        ]
    },
    "success": true
}

did_get_info

Functionality: Obtain info from a DID wallet

Usage: chia rpc wallet [OPTIONS] did_get_info [REQUEST]

Options:

Short Command Long Command Type Required Description
-j --json-file FILENAME False Optionally instead of REQUEST you can provide a json file containing the request data
-h --help None False Show a help message and exit

Request Parameters:

Flag Type Required Description
wallet_id NUMBER True The Wallet ID of the DID wallet for which to get the DID info

Example Request:

chia rpc wallet did_get_info '{"coin_id": "0x618a2eee48b111517cbd4f8d11889dc78396c9bcbad11c135dcbedb12f60b58b"}'

Response:

{
    "full_puzzle": "0xff02ffff01ff02ffff01ff02ffff03ffff18ff2fff3480ffff01ff04ffff04ff20ffff04ff2fff808080ffff04ffff02ff3effff04ff02ffff04ff05ffff04ffff02ff2affff04ff02ffff04ff27ffff04ffff02ffff03ff77ffff01ff02ff36ffff04ff02ffff04ff09ffff04ff57ffff04ffff02ff2effff04ff02ffff04ff05ff80808080ff808080808080ffff011d80ff0180ffff04ffff02ffff03ff77ffff0181b7ffff015780ff0180ff808080808080ffff04ff77ff808080808080ffff02ff3affff04ff02ffff04ff05ffff04ffff02ff0bff5f80ffff01ff8080808080808080ffff01ff088080ff0180ffff04ffff01ffffffff4947ff0233ffff0401ff0102ffffff20ff02ffff03ff05ffff01ff02ff32ffff04ff02ffff04ff0dffff04ffff0bff3cffff0bff34ff2480ffff0bff3cffff0bff3cffff0bff34ff2c80ff0980ffff0bff3cff0bffff0bff34ff8080808080ff8080808080ffff010b80ff0180ffff02ffff03ffff22ffff09ffff0dff0580ff2280ffff09ffff0dff0b80ff2280ffff15ff17ffff0181ff8080ffff01ff0bff05ff0bff1780ffff01ff088080ff0180ff02ffff03ff0bffff01ff02ffff03ffff02ff26ffff04ff02ffff04ff13ff80808080ffff01ff02ffff03ffff20ff1780ffff01ff02ffff03ffff09ff81b3ffff01818f80ffff01ff02ff3affff04ff02ffff04ff05ffff04ff1bffff04ff34ff808080808080ffff01ff04ffff04ff23ffff04ffff02ff36ffff04ff02ffff04ff09ffff04ff53ffff04ffff02ff2effff04ff02ffff04ff05ff80808080ff808080808080ff738080ffff02ff3affff04ff02ffff04ff05ffff04ff1bffff04ff34ff8080808080808080ff0180ffff01ff088080ff0180ffff01ff04ff13ffff02ff3affff04ff02ffff04ff05ffff04ff1bffff04ff17ff8080808080808080ff0180ffff01ff02ffff03ff17ff80ffff01ff088080ff018080ff0180ffffff02ffff03ffff09ff09ff3880ffff01ff02ffff03ffff18ff2dffff010180ffff01ff0101ff8080ff0180ff8080ff0180ff0bff3cffff0bff34ff2880ffff0bff3cffff0bff3cffff0bff34ff2c80ff0580ffff0bff3cffff02ff32ffff04ff02ffff04ff07ffff04ffff0bff34ff3480ff8080808080ffff0bff34ff8080808080ffff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff2effff04ff02ffff04ff09ff80808080ffff02ff2effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff02ffff03ffff21ff17ffff09ff0bff158080ffff01ff04ff30ffff04ff0bff808080ffff01ff088080ff0180ff018080ffff04ffff01ffa07faa3253bfddd1e0decb0906b2dc6247bbc4cf608f58345d173adb63e8b47c9fffa04776fa38a6bb7157e96f8bbc50c17eb8ef08e88ef3f3647aed819886c3cf8d83a0eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9ffff04ffff01ff02ffff01ff02ffff01ff02ffff03ff81bfffff01ff02ff05ff82017f80ffff01ff02ffff03ffff22ffff09ffff02ff7effff04ff02ffff04ff8217ffff80808080ff0b80ffff15ff17ff808080ffff01ff04ffff04ff28ffff04ff82017fff808080ffff04ffff04ff34ffff04ff8202ffffff04ff82017fffff04ffff04ff8202ffff8080ff8080808080ffff04ffff04ff38ffff04ff822fffff808080ffff02ff26ffff04ff02ffff04ff2fffff04ff17ffff04ff8217ffffff04ff822fffffff04ff8202ffffff04ff8205ffffff04ff820bffffff01ff8080808080808080808080808080ffff01ff088080ff018080ff0180ffff04ffff01ffffffff313dff4946ffff0233ff3c04ffffff0101ff02ff02ffff03ff05ffff01ff02ff3affff04ff02ffff04ff0dffff04ffff0bff2affff0bff22ff3c80ffff0bff2affff0bff2affff0bff22ff3280ff0980ffff0bff2aff0bffff0bff22ff8080808080ff8080808080ffff010b80ff0180ffffff02ffff03ff17ffff01ff02ffff03ff82013fffff01ff04ffff04ff30ffff04ffff0bffff0bffff02ff36ffff04ff02ffff04ff05ffff04ff27ffff04ff82023fffff04ff82053fffff04ff820b3fff8080808080808080ffff02ff7effff04ff02ffff04ffff02ff2effff04ff02ffff04ff2fffff04ff5fffff04ff82017fff808080808080ff8080808080ff2f80ff808080ffff02ff26ffff04ff02ffff04ff05ffff04ff0bffff04ff37ffff04ff2fffff04ff5fffff04ff8201bfffff04ff82017fffff04ffff10ff8202ffffff010180ff808080808080808080808080ffff01ff02ff26ffff04ff02ffff04ff05ffff04ff37ffff04ff2fffff04ff5fffff04ff8201bfffff04ff82017fffff04ff8202ffff8080808080808080808080ff0180ffff01ff02ffff03ffff15ff8202ffffff11ff0bffff01018080ffff01ff04ffff04ff20ffff04ff82017fffff04ff5fff80808080ff8080ffff01ff088080ff018080ff0180ff0bff17ffff02ff5effff04ff02ffff04ff09ffff04ff2fffff04ffff02ff7effff04ff02ffff04ffff04ff09ffff04ff0bff1d8080ff80808080ff808080808080ff5f80ffff04ffff0101ffff04ffff04ff2cffff04ff05ff808080ffff04ffff04ff20ffff04ff17ffff04ff0bff80808080ff80808080ffff0bff2affff0bff22ff2480ffff0bff2affff0bff2affff0bff22ff3280ff0580ffff0bff2affff02ff3affff04ff02ffff04ff07ffff04ffff0bff22ff2280ff8080808080ffff0bff22ff8080808080ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff7effff04ff02ffff04ff09ff80808080ffff02ff7effff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01ff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b0a03bd712b40b706102ffb9a70612bfbb7ce3aa30c81a988e3993e1cdfcc652f43d454904f483151b73abcc996fa7c02eff018080ffff04ffff01a04bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459affff04ffff0180ffff04ffff01ffa07faa3253bfddd1e0decb0906b2dc6247bbc4cf608f58345d173adb63e8b47c9fffa04776fa38a6bb7157e96f8bbc50c17eb8ef08e88ef3f3647aed819886c3cf8d83a0eff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9ffff04ffff0180ff01808080808080ff01808080",
    "hints": [
        "f2a5e7790267b0737c32e1e4a064c63b7d304b2b54454099661bdc7277231ac6"
    ],
    "latest_coin": "618a2eee48b111517cbd4f8d11889dc78396c9bcbad11c135dcbedb12f60b58b",
    "launcher_id": "4776fa38a6bb7157e96f8bbc50c17eb8ef08e88ef3f3647aed819886c3cf8d83",
    "metadata": {},
    "num_verification": 0,
    "p2_address": "xch172j7w7gzv7c8xlpju8j2qexx8d7nqjet23z5pxtxr0w8yaerrtrq0tuwae",
    "public_key": "a03bd712b40b706102ffb9a70612bfbb7ce3aa30c81a988e3993e1cdfcc652f43d454904f483151b73abcc996fa7c02e",
    "recovery_list_hash": "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a",
    "success": true
}

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:

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.

DIDs currently require the use of singleton_launcher.clvm, singleton_top_layer_v1_1.clvm and did_innerpuz.clvm.

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.

Security

This CHIP was reviewed for consistency and obvious bugs.

Additional Assets

Copyright

Copyright and related rights waived via CC0.