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

feat: added CLI commands to generate a minimal DID Document #352

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

arnabghose997
Copy link
Contributor

@arnabghose997 arnabghose997 commented Mar 24, 2023

The PR aims to introduce CLI commands to generate a minimal DID document, and extend the current create-did capability to refer to the generated DID Document, without the need of explicitly specifying the DID Document JSON.

  1. Generation of a DID Document using an alias:
hid-noded ssi-tools generate-did --from <name or address of account> --keyring-backend <test is the only supported keyring backend> --did-alias <name of the DID Document alias> --did-namespace <Optional Flag to specify the DID Namespace>

Example:
hid-noded ssi-tools generate-did --from node1 --keyring-backend test --did-alias production1
hid-noded ssi-tools generate-did --from node1 --keyring-backend test --did-alias production1 --did-namespace devnet
  1. List all the DID aliases generated:
hid-noded ssi-tools list-did-aliases
  1. Show the DID Document of a particular DID alias
hid-noded ssi-tools show-did-by-alias [alias-name]

Example:
hid-noded ssi-tools show-did-by-alias production1
  1. Register the DID Alias on-chain
hid-noded tx ssi create-did --did-alias <name of the DID Document alias>

Example:
hid-noded tx ssi create-did --did-alias production1 --from node1 --keyring-backend test --broadcast-mode block --chain-id hidnode

Note: If the author of the CreateDID Transaction is not the author of the referred DID Alias, the transaction will fail.

@arnabghose997 arnabghose997 added enhancement New feature or request hid-node labels Mar 24, 2023
@arnabghose997 arnabghose997 self-assigned this Mar 24, 2023
@arnabghose997 arnabghose997 merged commit 910890c into develop Mar 30, 2023
@arnabghose997 arnabghose997 deleted the cli-diddoc-gen branch May 3, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hid-node
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants