DID CLI
This document is a comprehensive listing of CLI commands for interacting with Chia DIDs.
Reference
create
Functionality: Create a DID wallet
Usage: chia wallet did create [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
-n | --name | TEXT | False | Set the DID wallet name [default: None] |
-a | --amount | INTEGER | False | Set the DID amount in mojos. Value must be an odd number. [default: 1] |
-m | --fee | TEXT | False | Set the fees per transaction, in XCH. [default: 0] |
-h | --help | None | False | Show a help message and exit. |
Example
Create a new DID:
chia wallet did create -n My_DID
Response:
Successfully created a DID wallet with name My_DID and id 2 on key 4288332900
Successfully created a DID did:chia:17jvhl9z8zj6jma2uxk4mqj22p90hfpf29svlvlyalu8ksyefsvpql7f403 in the newly created DID wallet
View your wallet and DID:
chia wallet show
Response:
Wallet height: 1117451
Sync status: Synced
Balances, fingerprint: 4288332900
Chia Wallet:
-Total Balance: 0.999989999992 txch (999989999992 mojo)
-Pending Total Balance: 0.999989999991 txch (999989999991 mojo)
-Spendable: 0.0 txch (0 mojo)
-Type: STANDARD_WALLET
-Wallet ID: 1
My_DID:
-Total Balance: 0.0
-Pending Total Balance: 1.0
-Spendable: 0.0
-Type: DECENTRALIZED_ID
-DID ID: did:chia:17jvhl9z8zj6jma2uxk4mqj22p90hfpf29svlvlyalu8ksyefsvpql7f403
-Wallet ID: 2
find_lost
Functionality: Find the did you should own and recover the DID wallet
Usage: chia wallet did find_lost [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-f | --fingerprint | INTEGER | False | Set the fingerprint to specify which key to use |
-id | --coin_id | TEXT | True | The DID ID, launcher ID, or latest coin ID of the DID you want to recover. The most time-efficient of these is the latest coin ID |
-m | --metadata | TEXT | False | The new whole metadata in json format |
-r | --recovery_list_hash | TEXT | False | Override the recovery list hash of the DID. Only set this if your last DID spend updated the recovery list |
-n | --num_verification | INTEGER | False | Override the required verification number of the DID. Only set this if your last DID spend updated the required verification number |
-h | --help | None | False | Show a help message and exit. |
Example
Locate a DID owned by the local wallet:
chia wallet did find_lost -id did:chia:1gam05w9xhdc406t03w79pst7hrhs36yw70ekg7hdsxvgds703kpskr64tz