verifiablesoftware / vsw

Core project of VerifiableSoftware
Apache License 2.0
1 stars 0 forks source link

vsw setup more consistent subcommands #82

Closed wenjing closed 3 years ago

wenjing commented 3 years ago

We need several steps in the vsw setup process: (1) create a new wallet and a new DID (which implicitly also sets the wallet as the current wallet in use and the DID as default DID in use) (2) set a DID to be an ENDORSER (See issue #81 ) (3) use a DID as the current DID (or change to a new DID) (4) create a new DID in the current wallet (5) set to use a particular wallet as the current wallet

All of these are implemented using the setup command. Some consistency of subcommands would be helpful. The model: In each machine, there a single user, who can have X number of wallets but only one wallet in use, and each wallet can have Y number of DIDs, and only 1 DID in use to represent this user. (only 1 active DID, passive DIDs are not limited) Each DID can be either ENDORSER or none (null role).

Let's come up with a consistent scheme to make these steps a little clearer to a user. e.g. %vsw setup ... {/open to other suggestions!/} So here are the equivalent steps in the new format corresponding to the 5 steps above: %vsw setup newwallet wallet1 --key X %vsw setup endorser --did X --verkey Y %vsw setup did X %vsw setup newdid %vsw setup wallet wallet2 --key X

I also find the distinction between vsw setup and vsw init difficult to understand. We thought we had a good reason for it before and now it seems not very useful. Maybe we could merge the init command as subcommands in setup. vsw init has 2:

(6) vsw init -c :this step creates a connection if one does not already exist, so maybe: % vsw setup connection

(7) vsw init -s: this step creates a credential definition, so maybe: % vsw setup creddef --schema

felixchen1023 commented 3 years ago

What's the usage for the following commands? %vsw setup did X %vsw setup newdid

wenjing commented 3 years ago

See also #91 Raise priority to HIGH

What's the usage for the following commands? %vsw setup did X Use X as the DID for issuing credentials.

%vsw setup newdid Create a new DID.

However, as discussed, these two are not necessary as we always create DIDs implicitly as a part of other commands. So, let's remove these two.

wenjing commented 3 years ago

Fixed in 0.0.14