Skip to content

Commit 652ee88

Browse files
committed
Update docs
1 parent ee96fc0 commit 652ee88

File tree

5 files changed

+150
-71
lines changed

5 files changed

+150
-71
lines changed

README.md

Lines changed: 87 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -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
810
docker 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

7781
If the `-i` option is given in various commands, responses from the API (especially "action" states in client-managed secret mode) have
7882
to 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)

docs/did-btcr2.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# godiddy-cli - did:btcr2 examples
2+
3+
```shell
4+
# Create a DID
5+
godiddy-cli create -c -m btcr2 -n mutinynet
6+
```
7+
8+
```shell
9+
# Resolve a DID
10+
godiddy-cli resolve did:btcr2:k1q5pua0p3syhn3p3kpvuqkx7sxd9ndv6uffwvuv008n4nq6fdwv22x5q4qfp5h
11+
```
12+
13+
```shell
14+
# Resolve a DID with sidecar data
15+
godiddy-cli resolve -p '{"sidecarData":{"did":"did:btcr2:k1q5pua0p3syhn3p3kpvuqkx7sxd9ndv6uffwvuv008n4nq6fdwv22x5q4qfp5h","signalsMetadata":{"2910c61eff717307e13f2f150156f566bacb96dccbad5f8959874c4d7ac94faf":{"didUpdate":{"@context":["https://w3id.org/security/v2","https://w3id.org/zcap/v1","https://w3id.org/json-ld-patch/v1"],"patch":[{"op":"add","path":"/service/3","value":{"type":"SingletonBeacon","id":"did:btcr2:k1q5pua0p3syhn3p3kpvuqkx7sxd9ndv6uffwvuv008n4nq6fdwv22x5q4qfp5h#initialP2PKH","serviceEndpoint":"bitcoin:mx1d72m2yzbJiTCdjrJKJNDtANURL3BGDD"}}],"targetHash":"2Lj51vMAcfaXWF6Hfm8gTac4PPUzT1m45AadqLeVbF5W","targetVersionId":2,"sourceHash":"34LDxujTRru6QRHZFEnN1i9sFvPiCexFSdCucVauEyFH","proof":{"cryptosuite":"bip340-jcs-2025","type":"DataIntegrityProof","verificationMethod":"did:btcr2:k1q5pua0p3syhn3p3kpvuqkx7sxd9ndv6uffwvuv008n4nq6fdwv22x5q4qfp5h#initialKey","proofPurpose":"capabilityInvocation","capability":"urn:zcap:root:did%3Abtcr2%3Ak1q5pua0p3syhn3p3kpvuqkx7sxd9ndv6uffwvuv008n4nq6fdwv22x5q4qfp5h","capabilityAction":"Write","@context":["https://w3id.org/security/v2","https://w3id.org/zcap/v1","https://w3id.org/json-ld-patch/v1"],"proofValue":"z5BPFwuLAjnJmY7h2nPNFCneXHzxyusufNSfmw7a8SiwbiHxUyXVXaJyV5fL6ZPd397uuAVVF8f7F9syX2aYyXsQR"}}}}}}' did:btcr2:k1q5pua0p3syhn3p3kpvuqkx7sxd9ndv6uffwvuv008n4nq6fdwv22x5q4qfp5h
16+
```

docs/did-cheqd.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# godiddy-cli - did:cheqd examples
2+
3+
```shell
4+
# Create a DID
5+
godiddy-cli create -c -m cheqd -n testnet
6+
```
7+
8+
```shell
9+
# Create a DID URL resource
10+
godiddy-cli resource create -d <..did..> -u /resources/<..uuid..> -o name=myname -o type=mytype --content="SGVsbG8gaG93IGFyZSB5b3UK" -c
11+
```

docs/did-ebsi.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# godiddy-cli - did:ebsi examples
2+
3+
Also see https://docs.godiddy.com/apis/universal-registrar/ebsi-execute
4+
5+
```shell
6+
# USing an existing EBSI Trusted Accreditation Organization (TAO), issue a VerifiableAuthorisationToOnboard
7+
godiddy-cli execute -d did:ebsi:zjUnExsyyweQ9p4cy3nvrVc --op issueOnboardingVC
8+
```
9+
10+
```shell
11+
# Using the VerifiableAuthorisationToOnboard, create a new DID
12+
godiddy-cli create -c -m ebsi -n pilot -c -s VerifiableAuthorisationToOnboard=<..data..>
13+
```
14+
15+
```shell
16+
# Using an existing EBSI Trusted Accreditation Organization (TAO), issue a VerifiableAccreditationToAttest
17+
godiddy-cli execute -c -d did:ebsi:zjUnExsyyweQ9p4cy3nvrVc --op inviteForTrustRole --opdata trustRoleDid=<..did..> --opdata trustRoleType=TI
18+
```
19+
20+
```shell
21+
# Using the VerifiableAccreditationToAttest, add the "Trusted Issuer" role to the new DID
22+
godiddy-cli execute -c -d <..did..> --op acceptTrustRole -c -s VerifiableAccreditationToAttest=
23+
```

docs/did-web.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# godiddy-cli - did:web examples
2+
3+
Also see https://docs.godiddy.com/apis/universal-registrar/additional-key-generation
4+
5+
```shell
6+
# Create a DID with an additional key
7+
godiddy-cli create -c -m web -rvmi '#key-1' -rvmt 'Ed25519VerificationKey2020' -rvmp '["authentication", "assertionMethod"]'
8+
```
9+
10+
```shell
11+
# Update a DID with an additional key
12+
godiddy-cli update -c -d did:example:123 --diddocop 'addToDidDocument' -rvmi '#key-3' -rvmt 'Ed25519VerificationKey2020' -rvmp '["authentication", "assertionMethod"]'
13+
```

0 commit comments

Comments
 (0)