Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexkravets/credentials
CLI for managed credentials service to manage issuers and verifiable credentials.
https://github.com/alexkravets/credentials
cli credentials ssi
Last synced: 20 days ago
JSON representation
CLI for managed credentials service to manage issuers and verifiable credentials.
- Host: GitHub
- URL: https://github.com/alexkravets/credentials
- Owner: alexkravets
- Created: 2021-01-11T10:41:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-09T17:00:01.000Z (over 3 years ago)
- Last Synced: 2024-10-06T04:02:59.994Z (3 months ago)
- Topics: cli, credentials, ssi
- Language: JavaScript
- Homepage: https://api.dev.credentials.kra.vc/v1/
- Size: 259 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @kravc/credentials
CLI for [Credentials](https://api.credentials.kra.vc/v1/) service to manage
issuers and verifiable credentials.## Quick Start
Install npm package as development dependency:
```sh
npm i --save-dev @kravc/credentials
```### Register an Issuer
Create `./issuer.json` file with issuer metadata, icon and credential
types, e.g:```json
{
"iconPath": "icon.png",
"metadata": {
"url": "https://apple.co/394ouT8",
"title": "Mines - Classic Bomb Puzzle",
"subtitle": "Minesweeper logic board game",
"category": "Games"
},
"credentialTypes": [
{
"name": "Score",
"version": 1,
"schemas": [
{
"name": "Player",
"fields": [
{ "name": "id", "$type": "string" },
{ "name": "hasVideoGameScore", "$type": "ref", "$ref": "VideoGameScore" }
]
},
{
"name": "VideoGameScore",
"fields": [
{ "name": "videoGame", "$type": "ref", "$ref": "VideoGame" },
{ "name": "wins", "$type": "integer" },
{ "name": "rounds", "$type": "integer" },
{ "name": "winRate", "$type": "integer" },
{ "name": "topScore", "$type": "integer" },
{ "name": "topScoreJson", "$type": "string" },
{ "name": "bestStreak", "$type": "integer" },
{ "name": "bestStreakJson", "$type": "string" },
{ "name": "enduranceMs", "$type": "integer" },
{ "name": "bestRoundMs", "$type": "integer" },
{ "name": "bestRoundJson", "$type": "string" },
{ "name": "averageRoundMs", "$type": "integer" },
{ "name": "dateStarted", "$type": "dateTime" }
]
},
{
"url": "https://schema.org/",
"name": "VideoGame",
"fields": [
{ "name": "url", "$type": "string" },
{ "name": "name", "$type": "string" },
{ "name": "version", "$type": "string" }
]
}
]
}
]
}
```Registers a new issuer:
```sh
npx credentials issuer.json
```If the script runs for the first time it generates key pair (DID) for the
administrator and stores it in the local keychain. This behavior could be
overriden by using `.portal.json` file.To pre-configure administrators identity, generate private key seed via:
```sh
npx credentials seed
```Create `.portal.json` file replacing `DEFAULT_SEED` with the value generated
via seed command:```json
{
"default": "DEFAULT_SEED"
}
```Make sure the file is added to the `.gitignore` and is not committed.
Check out full set of files at [example/](/example) folder.---
Author: [Alexander Kravets](mailto:[email protected])
Revision: June 23, 2021