Skip to content

Commit

Permalink
Merge pull request #29 from dhiway/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Vikastc authored Feb 12, 2024
2 parents 077b159 + cbf3c57 commit f987a73
Show file tree
Hide file tree
Showing 18 changed files with 2,526 additions and 2,504 deletions.
10 changes: 6 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
CORD_WSS_URL=wss://sparknet.cord.network

AGENT_PORT=5106
AGENT_DID_NAME="issuer.agent.0235@cord"

AUTHOR_URI=//Sparknet//1//Issuer
MNEMONIC = "stay nature loud wagon enhance squeeze hedgehog ecology output sphere mesh balance"
CORD_WSS_URL =wss://confidex-alpha1.cord.network
AUTHOR_URI =//api-testing//1

CHAIN_SPACE_ID=space:cord:c33moQ5s314vRAcSV4ZvWpEZAEF8xVC4gyYRCiLqnwXtKWfGp
CHAIN_SPACE_AUTH=auth:cord:a3bR5vbq65mmdN3SX3g1G81jL8BGpe1PrrEXieWoCiA3dEUG1
MNEMONIC=praise mansion always round memory space kind gentle huge kite draw garden this hover call shuffle fresh today mesh happy exotic cluster raise allow

TYPEORM_PORT=5432

Expand Down
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"jsxBracketSameLine": false
}
2 changes: 1 addition & 1 deletion Dockerfile.for-ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim as builder
FROM node:18.5-slim as builder

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.mac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim
FROM node:18.5-slim

WORKDIR /app

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Issuer-agent
Issuer Side of Wallet

This project showcases creating schema, issuence of verifiable document acccording to cord V3

This project showcases the issuence of credential, creating schema and registries
# Run locally using docker
- docker build . -t dhiway/issuer-agent:latest -f Dockerfile.mac

- docker compose up -d
77 changes: 77 additions & 0 deletions apis.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,52 @@
}
]
}
},

"/api/v1/cred/update": {
"put": {
"tags": ["Credential"],
"description": "Update a credential",
"operationId": "updateCred",
"requestBody": {
"description": "Update a VC of the given identifier",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "New vc issued",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CredUpdateRes"
}
}
}
},
"400": {
"description": "Invalid parameters",
"content": {
"application/json": {
"example": {
"error": "Stream not updated"
}
}
}
}
},
"security": [
{
"bearerAuth": []
}
]
}
}
},

Expand Down Expand Up @@ -507,6 +553,18 @@
}
},

"CredUpdateRes": {
"type": "object",
"properties": {
"status": {
"example": "SUCCESS"
},
"identifier": {
"example": "stream:cord:s3hB4khxYv6rKf4T47zXzeqBT4dQoaowSeiTfHYA1B8ucVKE3"
}
}
},

"GetCredRes": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -845,6 +903,25 @@
"example": "did:cord:3wCdDiKx3GdRM8p79QYL5EE7NbhdewhjsL7T2C46QMhfbwifw"
}
}
},

"UpdateRequest": {
"type": "object",
"properties": {
"schemaId": {
"type": "string",
"description": "The schemaId generated at createSchema",
"example": "s2cdb6537-dddf-44c5-859f-9083cca756c9"
},
"credId": {
"type": "string",
"description": "The registryId generated at registryCreate",
"example": "c2cdb6357-gdcv-44c5-859f-9083cca856c9"
},
"property": {
"$ref": "#/components/schemas/RecordContent"
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ services:
- MNEMONIC=${MNEMONIC}
- WALLET_URL=${WALLET_URL}
- AGENT_DID_NAME=${AGENT_DID_NAME}
- CHAIN_SPACE_ID=${CHAIN_SPACE_ID}
- CHAIN_SPACE_AUTH=${CHAIN_SPACE_AUTH}
ports:
- ${AGENT_PORT}:${AGENT_PORT}
depends_on:
Expand Down
Loading

0 comments on commit f987a73

Please sign in to comment.