Appearance
Wallet Service
The Wallet Service stores DIDs and keys created by the Universal Registrar API. This is useful, so that clients don't have to maintain their own key management system.
The Wallet Service supports basic key management operations such as importing and exporting of keys, transfer of DIDs, as well as creating and verifying signatures.
API Reference
See https://api.godiddy.com/#tag/Wallet-Service.
DID and Key Management
Get DIDs from wallet
This request lists all DIDs that currently have corresponding keys in the wallet:
bash
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X GET "https://api.godiddy.com/1.0.0/wallet-service/controllers" \
-H "Accept: application/json"
1
2
3
2
3
Get keys from wallet
This request lists all public keys that currently exist in the wallet:
bash
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X GET "https://api.godiddy.com/1.0.0/wallet-service/keys" \
-H "Accept: application/json"
1
2
3
2
3
Export key from wallet
This request exports a single public key that currently exists in the wallet (optionally with the private key):
bash
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X GET "https://api.godiddy.com/1.0.0/wallet-service/keys/386fd0bf-6bf2-4063-a1b0-42927caf1886?exportPrivate=false" \
-H "Accept: application/json"
1
2
3
2
3
Import key into wallet
This request imports a single public key into the wallet (optionally with the private key):
bash
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/1.0.0/wallet-service/keys" \
-H "Content-Type: application/json" \
-d '{
"controller": "did:example:123",
"url": "did:example:123#key-1",
"type": "secp256k1",
"purpose": [
"authentication",
"assertionMethod"
],
"key": {
"kty": "EC",
"crv": "secp256k1",
"x": "me6iaIuzMLFpfnKsb9ZvdYPrgv7nXZXExtPZWTrnyOU",
"y": "T8tqvf5EyTWhqgsgxmxYck2GdGEYeAkqA2O7e9k3OR4",
"d": "ZQjhIKQ8zZy9l0KRFqOU2VPevx5BfRZE3CAohHNh3P8"
},
"keyMetadata": {
"verificationMethodType": "JsonWebKey2020"
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Signing and Verifying
Sign with the key from wallet
This request signs the payload Hello World
using the key 386fd0bf-6bf2-4063-a1b0-42927caf1886
in the wallet:
bash
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/1.0.0/wallet-service/keys/sign?id=386fd0bf-6bf2-4063-a1b0-42927caf1886&algorithm=EdDSA" \
-H "Content-Type: application/octet-stream" \
-d 'Hello World'
1
2
3
4
2
3
4
The output is binary data, i.e. the actual signature.
Verify with the key from wallet
This request verifies the payload Hello World
using the key 386fd0bf-6bf2-4063-a1b0-42927caf1886
in the wallet:
bash
curl -H "Authorization: Bearer b082c420-df67-4b06-899c-b7c51d75fba0" \
-X POST "https://api.godiddy.com/1.0.0/wallet-service/keys/verify?id=386fd0bf-6bf2-4063-a1b0-42927caf1886&algorithm=EdDSA&signature=27F8CC0343B1397207238131F4138870E203F3D11647201605B6F5AAC2A02B5C4D207CC891280B7C552C96F70188ED70FFFB9742CBECBAE5B8FEFCDF2F112103" \
-H "Content-Type: application/octet-stream" \
-d 'Hello World'
1
2
3
4
2
3
4
The output is a JSON object with the verification status:
json
{
"verified": true
}
1
2
3
2
3