Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/vc-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The table below shows which key types are available for each operation.
#### Key Import/Export

The key module allows for the import and export of key pairs.
A tutorial demonstrating this available here: [Key Export/Import Tutorial](./docs/tutorials/key-export-import-tutorial.md)
A tutorial demonstrating this available here: [Key Export/Import Tutorial](./docs/key-export-import-tutorial.md)

## Database
SQLite is used as the database engine.
Expand Down
35 changes: 12 additions & 23 deletions apps/vc-api/docs/key-export-import-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ Response body should be similar to the one below but with a different `did`.
"id": "did:key:z6MkuzZiNGDxg7vfrwpwC5LCfznA2NaJr5SNvwmN6dKv6Pom#z6MkuzZiNGDxg7vfrwpwC5LCfznA2NaJr5SNvwmN6dKv6Pom",
"type": "Ed25519VerificationKey2018",
"controller": "did:key:z6MkuzZiNGDxg7vfrwpwC5LCfznA2NaJr5SNvwmN6dKv6Pom",
"publicKeyJwk": {
"crv": "Ed25519",
"x": "5uRJcJ67oMzfaB3XXQeLNj_Bv3ew1mmV8lItQ1k52og",
"kty": "OKP",
"kid": "KizsQVRSz6l73kFnrAHJ1V6c5YQS6I0SS9zyZMNNdRs"
}
"publicKeyBase58": "GYJfn1yXLaSCkSzEWWNMpuEACoJTSCC2EvrSGMMuBB2P"
}
]
}
Expand All @@ -83,7 +78,7 @@ Response body should be similar to the one below but with a different `did`.

### 1.2 Export Key

The key can be exported by using the key id located at `verificationMethod.publicKeyJwk.kid` in the DID document from the previous step.
The key can be exported by using the key id located at `verificationMethod.publicKeyBase58` in the DID document from the previous step.

Send the request as described below.

Expand All @@ -103,18 +98,17 @@ Send the request as described below.

```json
{
"publicKeyThumbprint": "KizsQVRSz6l73kFnrAHJ1V6c5YQS6I0SS9zyZMNNdRs",
"privateKey": {
"publicKey": {
"crv": "Ed25519",
"d": "31DlEXUMXAvcAuTpBl5cPlPavrzo4I9s63WiT0ni8zg",
"x": "5uRJcJ67oMzfaB3XXQeLNj_Bv3ew1mmV8lItQ1k52og",
"kty": "OKP"
"kty": "OKP",
"kid": "GYJfn1yXLaSCkSzEWWNMpuEACoJTSCC2EvrSGMMuBB2P"
},
"publicKey": {
"privateKey": {
"crv": "Ed25519",
"d": "31DlEXUMXAvcAuTpBl5cPlPavrzo4I9s63WiT0ni8zg",
"x": "5uRJcJ67oMzfaB3XXQeLNj_Bv3ew1mmV8lItQ1k52og",
"kty": "OKP",
"kid": "KizsQVRSz6l73kFnrAHJ1V6c5YQS6I0SS9zyZMNNdRs"
"kty": "OKP"
}
}
```
Expand Down Expand Up @@ -151,7 +145,7 @@ Send the request as described below.
"crv": "Ed25519",
"x": "E5ljjWvsZZ2NYpDr7QDbit-WWKMxbzn3YgMjRa1dShQ",
"kty": "OKP",
"kid": "MW-TUkCospd6AC16JkoD1-Iun1GxGLGSv6Z-48CfSj4"
"kid": "2KWQSazdFzSmkSZJx7YW77nvPLzyrf4SDcTYWY9sApjm"
}
}
```
Expand All @@ -160,7 +154,7 @@ Send the request as described below.

```json
{
"keyId": "MW-TUkCospd6AC16JkoD1-Iun1GxGLGSv6Z-48CfSj4"
"keyId": "2KWQSazdFzSmkSZJx7YW77nvPLzyrf4SDcTYWY9sApjm"
}
```

Expand All @@ -187,7 +181,7 @@ Send the request as described below.
```json
{
"method": "key",
"keyId": "MW-TUkCospd6AC16JkoD1-Iun1GxGLGSv6Z-48CfSj4"
"keyId": "2KWQSazdFzSmkSZJx7YW77nvPLzyrf4SDcTYWY9sApjm"
}
```

Expand All @@ -203,12 +197,7 @@ The DID Document of the registered DID.
"id": "did:key:z6MkfmmT2qF4bXwErwQ1dgWLxDLvCvGqGYJnudNULp7t63X9#z6MkfmmT2qF4bXwErwQ1dgWLxDLvCvGqGYJnudNULp7t63X9",
"type": "Ed25519VerificationKey2018",
"controller": "did:key:z6MkfmmT2qF4bXwErwQ1dgWLxDLvCvGqGYJnudNULp7t63X9",
"publicKeyJwk": {
"crv": "Ed25519",
"x": "E5ljjWvsZZ2NYpDr7QDbit-WWKMxbzn3YgMjRa1dShQ",
"kty": "OKP",
"kid": "MW-TUkCospd6AC16JkoD1-Iun1GxGLGSv6Z-48CfSj4"
}
"publicKeyBase58": "2KWQSazdFzSmkSZJx7YW77nvPLzyrf4SDcTYWY9sApjm"
}
]
}
Expand Down
Loading