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.
See https://api.godiddy.com/#tag/Wallet-Service
This request lists all DIDs that currently have corresponding keys in the wallet:
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"
This request lists all public keys that currently exist in the wallet:
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"
This request exports a single public key that currently exists in the wallet (optionally with private key):
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"
This request imports a single public key into the wallet (optionally with private key):
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"
}
}'
This request signs the payload Hello World
using the key 386fd0bf-6bf2-4063-a1b0-42927caf1886
in the wallet:
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'
The output is binary data, i.e. the actual signature.
This request verifies the payload Hello World
using the key 386fd0bf-6bf2-4063-a1b0-42927caf1886
in the wallet:
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'
The output is a JSON object with the verification status:
{"verified":true}