Verifiable Credentials
This document is a comprehensive listing of CLI commands for interacting with Chia VCs.
Reference
add_proof_reveal
Functionality: Add a series of proofs that will combine to a single proof hash
Usage: chia wallet vcs add_proof_reveal [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 |
-p | --proof | TEXT | True* | A flag to add as a proof |
-r | --root-only | None | False | If this flag is set, do not add the proofs to the DB, just output the root from the specified proofs [Default: not set] |
-h | --help | None | False | Show a help message and exit |
Example 1
Add two proofs:
chia wallet vcs add_proof_reveal -f 2108245669 --proof test_proof1 --proof test_proof2
Response:
Proofs added to DB successfully!
Example 2
Get the root hash of the tree created from adding two proofs:
chia wallet vcs add_proof_reveal -f 2108245669 --proof test_proof1 --proof test_proof2 --root-only
Response:
Proof Hash: f063e22557705b14425b8fca60018796b4364eb6354f45d0b99431a71d3043e5
get
Functionality: Get a list of existing VCs
Usage: chia wallet vcs get [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 |
-s | --start | INTEGER | False | The index to start the list at [default: 0] |
-c | --count | INTEGER | False | How many results to return [default: 50] |
-h | --help | None | False | Show a help message and exit |
Example
chia wallet vcs get -f 2108245669
Response:
Proofs:
Launcher ID: 89a4ff17372dd3a8814712c0988b87b508a04cd7fa61d0228ce54b74111e7160
Coin ID: 72e522fecc64b539f8979b89e4cf2ffbcf8ba985faf4b701bcc882c6aec9e040
Inner Address: txch1at35qwx6djmadnh9v77a72z8vcaxsle36ke3dj26gcpt2fnh654qsqecnj
get_proofs_for_root
Functionality: Get the stored proof flags for a given proof hash
Usage: chia wallet vcs get_proofs_for_root [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 |
-r | --proof-hash | TEXT | True | The root to search for |
-h | --help | None | False | Show a help message and exit |
Note that if the root is not currently stored in the VC, the command will fail.
Example
Search for a hash currently stored in the VC:
chia wallet vcs get_proofs_for_root -f 2108245669 --proof-hash f063e22557705b14425b8fca60018796b4364eb6354f45d0b99431a71d3043e5