-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: toanNgo <[email protected]>
- Loading branch information
toanNgo
committed
Jun 20, 2023
1 parent
32be0f3
commit e43c604
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# vc-api agent router | ||
|
||
- This agent router conform to vc-api standard that to achieve interoperability's goal between various parties. | ||
|
||
## Usage | ||
|
||
- This plugin follow the `veramo` architecture , so you can configure it with `agent.yml` | ||
|
||
```jsx | ||
# API base path | ||
- - /issuer | ||
- $require: '@vckit/vc-api-issuer?t=function#AgentRouter' | ||
$args: | ||
- createCredential: createVerifiableCredential | ||
updateCredentialStatus: updateVerifiableCredentialStatus | ||
``` | ||
|
||
## Test with test-suite | ||
|
||
- Clone the test suite: https://github.com/w3c-ccg/vc-api-issuer-test-suite | ||
- Go to `node_modules/vc-api-test-suite-implementations/implementations` , create files except the index file | ||
- Create new implementation file: | ||
|
||
```jsx | ||
{ | ||
"name": "GoSource", | ||
"implementation": "GoSource Verifiable Credentials", | ||
"issuers": [{ | ||
"id": "YOUR_DID_MANAGED_BY_YOUR_KMS", | ||
"endpoint": "http://localhost:3332/agent/credentials/issue", | ||
"options": { | ||
"type": "Ed25519Signature2020" | ||
}, | ||
"tags": ["vc-api", "Ed25519Signature2020"] | ||
}] | ||
} | ||
``` | ||
|
||
- Run the test command `npm run test` |