docker compose up [--build]Visit localhost:3000
GET /info
POST /create-key
{
"alg": "rsa" | "secp256k1"
}
{
"jwk": {
...
}
}
POST /create-did
{
"method": "key" | "ebsi",
"publicJwk": {
...
}
}
{
"did": <DID>,
}
POST /resolve-did
{
"did": ...
}
200
{
"didDocument": {
...
}
}
POST /issue-vc
{
"issuer": {
"did": ...,
"kid": ...,
"jwk": {
...
}
},
"subject": {
"did": ...
},
"claims": {
...
}
}
200
{
"token": ...
}
POST /verify-vc
{
"token": ...
}
200
{
"vcDocument": {
...
}
}
400
{
"error": {
"message": ...,
"name": ...
}
}
POST /issue-vp
{
"signer": {
"did": ...,
"kid": ...,
"jwk": {
...
}
},
"holder": {
"did": ...
},
"audience": {
"did": ...
},
credentials: [
...
]
}
200
{
"token": ...
}
POST /verify-vp
{
"token": ...
"audience": {
"did": ...
}
}
200
{
"vpDocument": {
...
}
}
400
{
"error": {
"message": ...,
"name": ...
}
}
python -m venv .envsource .env/bin/activate
pip install -r requirements-client.txtAssuming that the virtual environment is activated:
python api-client.py --helppython api-client.py fetch infopython api-client.py create key --alg secp256k1 --out issuer.jwkpython api-client.py create did --key issuer.jwk --method ebsi --out issuer.didpython api-client.py resolve did:ebsi:ziDnioxYYLW1a3qUbqTFz4Wpython api-client.py issue vc \
--key issuer.jwk \
--kid foo \
--issuer $(cat .storage/issuer.did) \
--subject $(cat .storage/holder.did) \
--claims-json ".storage/claims-sample.json" \
--claims "gender=unspecified" \
--out vc-1.jwtpython api-client.py verify vc vc-sample.jwt --out vc-sample.jsonpython3 api-client.py issue vp \
--key signer.jwk \
--kid bar \
--signer $(cat .storage/signer.did) \
--holder $(cat .storage/holder.did) \
--audience $(cat .storage/audience.did) \
--credentials vc-1.jwt vc-2.jwt \
--out vp.jwtpython3 api-client.py verify vp vp-sample.jwt --out vp-sample.jsonnpm run test[:reload]