Appearance
DID-CLI Command-Line Interface
Besides the web frontend and an HTTP REST API, Godiddy.com also has a Command-Line Interface (CLI) called "DID-CLI".
Since the Godiddy.com APIs are based on open standards, the CLI also works with other implementations of DID resolver and DID registrar services.
Install the DID-CLI
See this Github repository for installation and configuration instructions:
Verify installation
bash
did-cli --version
did-cli --help1
2
2
Setup
shell
# Set API endpoint to Godiddy (default)
did-cli config endpoint godiddy
# Set your API key
did-cli config apikey b082c420-df67-4b06-899c-b7c51d75fba01
2
3
4
5
2
3
4
5
To use local Universal Resolver or Universal Registrar:
shell
# Set API endpoint to local Universal Resolver
did-cli config endpoint -r http://localhost:8080/1.0/1
2
2
shell
# Set API endpoint to local Universal Registrar
did-cli config endpoint -r http://localhost:9080/1.0/1
2
2
Simple examples
shell
# Simple resolution
did-cli resolve did:ebsi:z24ipYA2KhjNLmuD52evuCh2
# Simple create
did-cli create -m key
# Create with an option
did-cli create -m key -o keyType=P-256
# Create with client-managed secret mode
did-cli create -c -m key -o keyType=P-256
# Create with client-managed secret mode and interactive
did-cli create -c -i -m key -o keyType=P-2561
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
Interactive
If the -i option is given in various commands, responses from the API (especially "action" states in client-managed secret mode) have to be processed "manually" using additional commands.
shell
# Process current local state
did-cli state process
# Continue with ongoing job (interactive)
did-cli continue -i1
2
3
4
5
2
3
4
5
Key Management (KMS)
By default, internal secret mode is used, e.g. the Godiddy Wallet Service.
If the -c option is given in various commands, client-managed secret mode is used. The -c option is equivalent to -o clientSecretMode=true.
shell
# Configure KMS (local wallet)
did-cli config kms local
# Configure KMS (Wallet Service)
did-cli config kms wallet_service
did-cli config walletservice base http://localhost:12080/wallet-service/1.0.0
# Configure KMS (Hashicorp Vault)
did-cli config kms hashicorp_vault
did-cli config vaultendpoint http://172.17.0.1:8200/
did-cli config vaulttoken hvs.<..token..>
# Show DIDs in the KMS
did-cli kms controllers
# Show keys in the KMS
did-cli kms keys
# Delete DIDs and keys in the KMS (be careful!)
did-cli kms delete1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Also see https://docs.godiddy.com/apis/universal-registrar/registrar-configuration.
Additional key generation
The -rvmi, -rvmt, -rvmp options can be used to add additional keys to a DID document, i.e. keys that are not required by the DID method itself.
shell
# Create a DID with an additional key
did-cli create -m web -rvmi '#key-1' -rvmt 'Ed25519VerificationKey2020' -rvmp '["authentication", "assertionMethod"]'1
2
2
shell
# Update a DID with an additional key
did-cli update -d did:example:123 --diddocop 'addToDidDocument' -rvmi '#key-3' -rvmt 'Ed25519VerificationKey2020' -rvmp '["authentication", "assertionMethod"]'1
2
2
Also see https://docs.godiddy.com/apis/universal-registrar/additional-key-generation.
More configuration options
shell
# Set formatting of requests and responses
did-cli config formatting interpreted # Human-readable, interpreted
did-cli config formatting pretty # Pretty JSON
did-cli config formatting flat # Flat JSON1
2
3
4
2
3
4
shell
# Set printing of HTTP headers
did-cli config headers on # Headers on
did-cli config headers off # Headers off1
2
3
2
3
shell
# Set log level
did-cli config loglevel standard # Loglevel standard
did-cli config loglevel warn # Loglevel warn
did-cli config loglevel info # Loglevel info
did-cli config loglevel debug # Loglevel debug1
2
3
4
5
2
3
4
5