@@ -4,128 +4,144 @@ A command-line interface for [Godiddy](https://godiddy.com/), and any standards-
44
55## Run using Docker
66
7+ Download Docker image:
8+
79``` shell
810docker compose pull
9- docker compose run --rm godiddy-cli
1011```
1112
12- ## Examples
13-
14- ### Set endpoint and API key
13+ Verify if installation was successful:
1514
15+ ``` shell
16+ docker compose run --rm godiddy-cli --version
17+ docker compose run --rm godiddy-cli --help
1618```
17- # Set either "godiddy" or "godiddy-dev" API endpoint
18- docker compose run --rm godiddy-cli config endpoint godiddy
1919
20- # Set your API key
21- docker compose run --rm godiddy-cli config apikey b082c420-df67-4b06-899c-b7c51d75fba0
22- ```
20+ ## Run on Ubuntu/Debian
2321
24- ### Simple examples
22+ Visit the [ Releases page] ( https://github.com/danubetech/godiddy-cli/releases ) and download the
23+ ` .deb ` file for the latest version, or use the command line:
2524
25+ ``` bash
26+ VERSION=$( curl -s https://api.github.com/repos/danubetech/godiddy-cli/releases/latest | grep " tag_name" | cut -d ' "' -f 4)
27+ curl -LO " https://github.com/danubetech/godiddy-cli/releases/download/${VERSION} /godiddy-cli_${VERSION} _amd64.deb"
28+ sudo dpkg -i godiddy-cli_${VERSION} _amd64.deb
2629```
27- # Simple resolution
28- docker compose run --rm godiddy-cli resolve did:ebsi:z24ipYA2KhjNLmuD52evuCh2
2930
30- # Simple create
31- docker compose run --rm godiddy-cli create -m key
31+ Verify if installation was successful:
3232
33- # Create with an option
34- docker compose run --rm godiddy-cli create -m key -o keyType=P-256
33+ ``` bash
34+ godiddy-cli --version
35+ godiddy-cli --help
36+ ```
3537
36- # Create with client-managed secret mode
37- docker compose run --rm godiddy-cli create -m key -c
38+ ## Setup
3839
39- # Create with client-managed secret mode and interactive
40- docker compose run --rm godiddy-cli create -m key -c -i
41- ```
40+ ``` shell
41+ # Set API endpoint to Godiddy (default)
42+ godiddy-cli config endpoint godiddy
4243
43- ### Key Management (KMS)
44+ # Set your API key
45+ godiddy-cli config apikey b082c420-df67-4b06-899c-b7c51d75fba0
46+ ```
4447
45- By default, internal secret mode is used, i.e. the Godiddy wallet service.
48+ To use local Universal Resolver or Universal Registrar:
4649
47- If the ` -c ` option is given in various commands, client-managed secret mode is used. The ` -c ` option is equivalent to ` -o clientSecretMode=true ` .
50+ ``` shell
51+ # Set API endpoint to local Universal Resolver
52+ godiddy-cli config endpoint http://localhost:8080/1.0/
53+ ```
4854
55+ ``` shell
56+ # Set API endpoint to local Universal Registrar
57+ godiddy-cli config endpoint http://localhost:9080/1.0/
4958```
50- # Comfingure KMS (wallet or local)
51- docker compose run --rm godiddy-cli config kms wallet
52- docker compose run --rm godiddy-cli config kms local
5359
54- # Show controllers in the KMS
55- docker compose run --rm godiddy-cli kms controllers
60+ ### Simple examples
5661
57- # Show keys in the wallet service
58- docker compose run --rm godiddy-cli kms keys
59- ```
62+ ``` shell
63+ # Simple resolution
64+ godiddy-cli resolve did:ebsi:z24ipYA2KhjNLmuD52evuCh2
6065
61- ### Additional key generation
66+ # Simple create
67+ godiddy-cli create -m key
6268
63- 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.
69+ # Create with an option
70+ godiddy-cli create -m key -o keyType=P-256
6471
65- ```
66- # Create a DID with an additional key
67- docker compose run --rm godiddy-cli create -m web -rvmi '#key-1' -rvmt 'Ed25519VerificationKey2020' -rvmp '["authentication", "assertionMethod"]'
68- ```
72+ # Create with client-managed secret mode
73+ godiddy-cli create -c -m key -o keyType=P-256
6974
70- ```
71- # Update a DID with an additional key
72- docker compose run --rm godiddy-cli update -d did:example:123 --diddocop 'addToDidDocument' -rvmi '#key-3' -rvmt 'Ed25519VerificationKey2020' -rvmp '["authentication", "assertionMethod"]'
75+ # Create with client-managed secret mode and interactive
76+ godiddy-cli create -c -i -m key -o keyType=P-256
7377```
7478
7579### Interactive
7680
7781If the ` -i ` option is given in various commands, responses from the API (especially "action" states in client-managed secret mode) have
7882to be processed "manually" using additional commands.
7983
80- ```
84+ ``` shell
8185# Process current local state
82- docker compose run --rm godiddy-cli state process
86+ godiddy-cli state process
8387
8488# Continue with ongoing job (interactive)
85- docker compose run --rm godiddy-cli continue -i
89+ godiddy-cli continue -i
8690```
8791
88- ### did: ebsi examples
89-
90- Also see https://docs.godiddy.com/apis/universal-registrar/ebsi-execute
92+ ### Key Management (KMS)
9193
92- ```
93- docker compose run --rm godiddy-cli execute -d did:ebsi:zjUnExsyyweQ9p4cy3nvrVc --op issueOnboardingVC
94+ By default, internal secret mode is used, i.e. the Godiddy Wallet Service.
9495
95- docker compose run --rm godiddy-cli create -m ebsi -n pilot -c -s VerifiableAuthorisationToOnboard=
96+ If the ` -c ` option is given in various commands, client-managed secret mode is used.
97+ The ` -c ` option is equivalent to ` -o clientSecretMode=true ` .
9698
97- docker compose run --rm godiddy-cli execute -d did:ebsi:zjUnExsyyweQ9p4cy3nvrVc --op inviteForTrustRole --opdata trustRoleDid=did:ebsi:zaFsXXoQ4ZrmiEsrtGyMvwJ --opdata trustRoleType=TI
99+ ``` shell
100+ # Configure KMS (local wallet)
101+ godiddy-cli config kms local
98102
99- docker compose run --rm godiddy-cli execute -d did:ebsi:zaFsXXoQ4ZrmiEsrtGyMvwJ --op acceptTrustRole -c -s VerifiableAccreditationToAttest=
100- ```
103+ # Configure KMS (Wallet Service)
104+ godiddy-cli config kms wallet_service
105+ godiddy-cli config walletservice base http://localhost:12080/wallet-service/1.0.0
101106
102- ## Install on Ubuntu/Debian
107+ # Configure KMS (Hashicorp Vault)
108+ godiddy-cli config kms hashicorp_vault
109+ godiddy-cli config vaultendpoint http://172.17.0.1:8200/
110+ godiddy-cli config vaulttoken hvs.< ..token..>
103111
104- ** Download the latest ` .deb ` package**
112+ # Show DIDs in the KMS
113+ godiddy-cli kms controllers
105114
106- Visit the [ Releases page] ( https://github.com/danubetech/godiddy-cli/releases ) and download the ` .deb ` file for the latest version, or use the command line:
115+ # Show keys in the KMS
116+ godiddy-cli kms keys
107117
108- ``` bash
109- VERSION=$( curl -s https://api.github.com/repos/danubetech/godiddy-cli/releases/latest | grep " tag_name" | cut -d ' "' -f 4)
110- curl -LO " https://github.com/danubetech/godiddy-cli/releases/download/${VERSION} /godiddy-cli_${VERSION} _amd64.deb"
118+ # Delete DIDs and keys in the KMS (be careful!)
119+ godiddy-cli kms delete
111120```
112121
113- ** Install the package **
122+ Also see https://docs.godiddy.com/apis/universal-registrar/registrar-configuration .
114123
115- ``` bash
116- sudo dpkg -i godiddy-cli_${VERSION} _amd64.deb
117- ```
124+ ### Additional key generation
118125
119- ** Fix missing dependencies if needed **
126+ 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.
120127
121- If you see any dependency issues:
128+ ``` shell
129+ # Create a DID with an additional key
130+ godiddy-cli create -m web -rvmi ' #key-1' -rvmt ' Ed25519VerificationKey2020' -rvmp ' ["authentication", "assertionMethod"]'
131+ ```
122132
123- ``` bash
124- sudo apt-get install -f
133+ ``` shell
134+ # Update a DID with an additional key
135+ godiddy-cli update -d did:example:123 --diddocop ' addToDidDocument' -rvmi ' #key-3' -rvmt ' Ed25519VerificationKey2020' -rvmp ' ["authentication", "assertionMethod"]'
125136```
126137
127- ** Verify installation **
138+ Also see https://docs.godiddy.com/apis/universal-registrar/additional-key-generation .
128139
129- ``` bash
130- godiddy-cli --version
131- ```
140+ ## More examples
141+
142+ See here for more examples:
143+
144+ - did: web examples - [ ./docs/did-web.md] ( ./docs/did-web.md )
145+ - did: cheqd examples - [ ./docs/did-cheqd.md] ( ./docs/did-cheqd.md )
146+ - did: btcr2 examples - [ ./docs/did-btcr2.md] ( ./docs/did-btcr2.md )
147+ - did: ebsi examples - [ ./docs/did-ebsi.md] ( ./docs/did-ebsi.md )
0 commit comments