Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b41855d
Resolve linting issues
pranalidhanavade Mar 6, 2025
4201556
chore: Update Dockerfile (#254)
KambleSahil3 Mar 13, 2025
884264b
fix: resolved prettier errors
pranalidhanavade Mar 6, 2025
99fb113
chore: Update Dockerfile (#256)
KambleSahil3 Mar 17, 2025
72bbc53
fix: resolved prettier errors in compass.yml file
pranalidhanavade Mar 6, 2025
0db0c91
feat: push docker image (#257)
KambleSahil3 Mar 27, 2025
9383784
feat/push-docker-image (#258)
KambleSahil3 Mar 27, 2025
08a04a4
feat:w3c-revocation
tipusinghaw Mar 31, 2025
628296c
refactor: removed revocation code
tipusinghaw Mar 31, 2025
ee9b63d
refactore: removed constant and enum
tipusinghaw Mar 31, 2025
d54d66e
Merge pull request #261 from credebl/refactor/w3c-revocation-v1
tipusinghaw Mar 31, 2025
ea58a19
w3c revocation changes
tipusinghaw Apr 3, 2025
2d26e62
refactor: get index method
tipusinghaw Apr 8, 2025
b518e46
refactor: solved sonar cloud issue
tipusinghaw Apr 8, 2025
d3dfc46
refactor: changes randomness logic to get unused index
tipusinghaw Apr 8, 2025
d640319
fix: revocation issue
tipusinghaw Apr 8, 2025
0af677f
refactor: resolved comments
tipusinghaw Apr 13, 2025
647fb60
refactor: add validation code in helper file
tipusinghaw Apr 13, 2025
46e3396
refactor: resolved comments
tipusinghaw Apr 14, 2025
f6491e3
refactor: removed logs
tipusinghaw Apr 14, 2025
f47325c
refactor: resolved comments
tipusinghaw Apr 17, 2025
217e738
chore:updated patch version
tipusinghaw Apr 17, 2025
8cd194e
added logs to debug the issue
tipusinghaw Apr 17, 2025
8e6b463
chore: Update Dockerfile (#254)
KambleSahil3 Mar 13, 2025
91137e7
chore: Update Dockerfile (#256)
KambleSahil3 Mar 17, 2025
57737ff
feat: push docker image (#257)
KambleSahil3 Mar 27, 2025
9fca65e
feat/push-docker-image (#258)
KambleSahil3 Mar 27, 2025
e03573d
feat:w3c-revocation
tipusinghaw Mar 31, 2025
7b978c9
refactor: removed revocation code
tipusinghaw Mar 31, 2025
30e6667
refactore: removed constant and enum
tipusinghaw Mar 31, 2025
5556b5b
chore: Update Dockerfile (#256) (#266)
bhavanakarwade Apr 25, 2025
f7bfa98
chore: remove unwanted package (#268)
GHkrishna Apr 29, 2025
560f746
refactor: updated validation for create-bslc
tipusinghaw May 27, 2025
97328dc
bump: v0.5.3 to v0.5.15
tipusinghaw May 28, 2025
7728d0e
bump: updated CI file
tipusinghaw May 28, 2025
2d1e087
bump: updated ubuntu version and project name
tipusinghaw May 28, 2025
9861b1b
refactor: formatted code and updated eslint config
tipusinghaw May 28, 2025
c9c508c
refactor: updated tsconfig and CI file
tipusinghaw May 28, 2025
7a509f0
fix: prettier formatting issue
tipusinghaw May 28, 2025
f6c31c9
fix: logger issue
tipusinghaw May 30, 2025
2c061cb
fixed: linting issues
tipusinghaw May 30, 2025
e814332
Merge branch 'bump/credo-0.5.3-to-0.5.13' of https://github.com/crede…
tipusinghaw May 30, 2025
6a68180
feat: patch and tgz issue
tipusinghaw Jun 2, 2025
7255fee
fix: linting issue
tipusinghaw Jun 5, 2025
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
45 changes: 45 additions & 0 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Continous Delivery

on:
push:
tags:
- 'v*'

env:
REGISTRY: ghcr.io
SERVICE: credo-controller

jobs:
build-and-push:
name: Push Docker image to GitHub
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Extract Git Tag
id: get_tag
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image ${{ env.SERVICE }}
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:${{ env.TAG }}
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:latest

48 changes: 2 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,3 @@
# FROM ubuntu:20.04

# ENV DEBIAN_FRONTEND noninteractive

# RUN apt-get update -y && apt-get install -y \
# software-properties-common \
# apt-transport-https \
# curl \
# # Only needed to build indy-sdk
# build-essential

# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -

# # yarn
# RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
# echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# # install depdencies
# RUN apt-get update -y && apt-get install -y --allow-unauthenticated \
# nodejs

# # install depdencies
# RUN apt-get update -y && apt-get install -y --allow-unauthenticated \
# nodejs

# # Install yarn seperately due to `no-install-recommends` to skip nodejs install
# RUN apt-get install -y --no-install-recommends yarn

# RUN yarn global add patch-package
# # AFJ specifc setup
# WORKDIR /www

# COPY bin ./bin
# COPY package.json ./package.json
# COPY patches ./patches

# RUN yarn install --production

# COPY build ./build
# # COPY libindy_vdr.so /usr/lib/
# # COPY libindy_vdr.so /usr/local/lib/

# ENTRYPOINT [ "./bin/afj-rest.js", "start" ]


# Stage 1: Builder stage
FROM node:18.19.0 AS builder

Expand All @@ -55,6 +10,7 @@ COPY package.json yarn.lock ./
COPY . .

# Install dependencies
RUN rm -rf node_modules
RUN yarn install --frozen-lockfile

RUN yarn global add patch-package
Expand All @@ -75,4 +31,4 @@ COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/patches ./patches

# Set entry point
ENTRYPOINT ["node", "./bin/afj-rest.js", "start"]
ENTRYPOINT ["node", "./bin/afj-rest.js", "start"]
2 changes: 1 addition & 1 deletion compass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ labels:
- language:typescript
- self-sovereign-identity
- source:github
customFields: null
customFields: null
4 changes: 4 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"port": 4001,
"schemaFileServerURL": "https://schema.credebl.id/schemas/"
}
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ const config: Config.InitialOptions = {
testTimeout: 120000,
}

export default config
export default config
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@types/node-fetch": "^2.6.4",
"@types/ref-struct-di": "^1.1.9",
"@types/ws": "^8.5.4",
"@types/uuid": "^8.3.3",
"axios": "^1.4.0",
"body-parser": "^1.20.0",
"cors": "^2.8.5",
Expand All @@ -64,14 +65,17 @@
"joi": "^17.12.3",
"jsonwebtoken": "^9.0.2",
"node-fetch": "^2.6.7",
"pako": "^2.1.0",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"reflect-metadata": "^0.1.13",
"swagger-ui-express": "^4.4.0",
"tslog": "^3.3.3",
"tsoa": "^6.0.1",
"tsyringe": "^4.8.0",
"yargs": "^17.3.1"
"uuidv4": "^6.2.13",
"yargs": "^17.3.1",
"zlib": "^1.0.5"
},
"devDependencies": {
"@types/body-parser": "^1.19.2",
Expand All @@ -82,11 +86,11 @@
"@types/jsonwebtoken": "^9.0.5",
"@types/multer": "^1.4.7",
"@types/node": "^18.18.8",
"@types/pako": "^2.0.3",
"@types/ref-array-di": "^1.2.8",
"@types/ref-struct-di": "^1.1.9",
"@types/supertest": "^2.0.12",
"@types/swagger-ui-express": "^4.1.3",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"eslint": "^7.32.0",
Expand Down
21 changes: 21 additions & 0 deletions patches/@credo-ts+core+0.5.3+007+sign-bitstring-credentials.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/node_modules/@credo-ts/core/build/modules/vc/W3cCredentialServiceOptions.d.ts b/node_modules/@credo-ts/core/build/modules/vc/W3cCredentialServiceOptions.d.ts
index 43f5d7b..6e5cbbc 100644
--- a/node_modules/@credo-ts/core/build/modules/vc/W3cCredentialServiceOptions.d.ts
+++ b/node_modules/@credo-ts/core/build/modules/vc/W3cCredentialServiceOptions.d.ts
@@ -7,6 +7,7 @@ import type { W3cCredential } from './models/credential/W3cCredential';
import type { W3cPresentation } from './models/presentation/W3cPresentation';
import type { JwaSignatureAlgorithm } from '../../crypto/jose/jwa';
import type { SingleOrArray } from '../../utils/type';
+import { Credential } from '@hyperledger/anoncreds-nodejs';
Comment thread
tipusinghaw marked this conversation as resolved.
export type W3cSignCredentialOptions<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc | undefined = undefined> = Format extends ClaimFormat.JwtVc ? W3cJwtSignCredentialOptions : Format extends ClaimFormat.LdpVc ? W3cJsonLdSignCredentialOptions : W3cJwtSignCredentialOptions | W3cJsonLdSignCredentialOptions;
export type W3cVerifyCredentialOptions<Format extends ClaimFormat.JwtVc | ClaimFormat.LdpVc | undefined = undefined> = Format extends ClaimFormat.JwtVc ? W3cJwtVerifyCredentialOptions : Format extends ClaimFormat.LdpVc ? W3cJsonLdVerifyCredentialOptions : W3cJwtVerifyCredentialOptions | W3cJsonLdVerifyCredentialOptions;
export type W3cSignPresentationOptions<Format extends ClaimFormat.JwtVp | ClaimFormat.LdpVp | undefined = undefined> = Format extends ClaimFormat.JwtVp ? W3cJwtSignPresentationOptions : Format extends ClaimFormat.LdpVp ? W3cJsonLdSignPresentationOptions : W3cJwtSignPresentationOptions | W3cJsonLdSignPresentationOptions;
@@ -21,7 +22,7 @@ interface W3cSignCredentialOptionsBase {
/**
* The credential to be signed.
*/
- credential: W3cCredential;
+ credential: any;
/**
* URI of the verificationMethod to be used for signing the credential.
*
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/node_modules/@digitalcredentials/jsonld/lib/context.js b/node_modules/@digitalcredentials/jsonld/lib/context.js
index 5f0de78..1315061 100644
--- a/node_modules/@digitalcredentials/jsonld/lib/context.js
+++ b/node_modules/@digitalcredentials/jsonld/lib/context.js
@@ -920,6 +920,11 @@ api.createTermDefinition = ({
if(!_deepCompare(previousMapping, mapping)) {
const protectedMode = (options && options.protectedMode) || 'error';
if(protectedMode === 'error') {
+ if (term === 'VerifiableCredential' || term === 'VerifiablePresentation') {
+ console.warn("Term is 'VerifiableCredential'. Logging a warning instead of throwing an error.");
+ console.warn('WARNING: protected term redefinition', { term });
+ return;
+ }
throw new JsonLdError(
`Invalid JSON-LD syntax; tried to redefine "${term}" which is a ` +
'protected term.',
2 changes: 1 addition & 1 deletion samples/cliConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"rpcUrl": "https://rpc-amoy.polygon.technology",
"fileServerUrl": "https://schema.credebl.id",
"fileServerToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6ImNhZDI3ZjhjLTMyNWYtNDRmZC04ZmZkLWExNGNhZTY3NTMyMSJ9.I3IR7abjWbfStnxzn1BhxhV0OEzt1x3mULjDdUcgWHk"
}
}
115 changes: 54 additions & 61 deletions scripts/taskdef/credo-ecs-taskdef.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,59 @@
{
"family": "${FAMILY}",
"containerDefinitions": [
"family": "${FAMILY}",
"containerDefinitions": [
{
"name": "Platform-admin",
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%",
"cpu": 154,
"memory": 307,
"portMappings": [
{
"name": "Platform-admin",
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%",
"cpu": 154,
"memory": 307,
"portMappings": [
{
"containerPort": 8001,
"hostPort": 8001,
"protocol": "tcp"
},
{
"containerPort": 9001,
"hostPort": 9001,
"protocol": "tcp"
}
],
"essential": true,
"command": [
"--auto-accept-connections",
"--config",
"/config.json"
],
"environment": [
{
"name": "AFJ_REST_LOG_LEVEL",
"value": "1"
}
],
"environmentFiles": [
{
"value": "${S3_ARN}",
"type": "s3"
}
],
"mountPoints": [
{
"sourceVolume": "config",
"containerPath": "/config.json",
"readOnly": true
}
],
"volumesFrom": [],
"ulimits": []
"containerPort": 8001,
"hostPort": 8001,
"protocol": "tcp"
},
{
"containerPort": 9001,
"hostPort": 9001,
"protocol": "tcp"
}
],
"essential": true,
"command": ["--auto-accept-connections", "--config", "/config.json"],
"environment": [
{
"name": "AFJ_REST_LOG_LEVEL",
"value": "1"
}
],
"environmentFiles": [
{
"value": "${S3_ARN}",
"type": "s3"
}

],
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole",
"placementConstraints": [],
"requiresCompatibilities": [
"EC2"
],
"cpu": "154",
"memory": "307",
"volumes": [
],
"mountPoints": [
{
"name": "config",
"host": {
"sourcePath": "${SourcePath}"
}
"sourceVolume": "config",
"containerPath": "/config.json",
"readOnly": true
}
]
}
],
"volumesFrom": [],
"ulimits": []
}
],
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole",
"placementConstraints": [],
"requiresCompatibilities": ["EC2"],
"cpu": "154",
"memory": "307",
"volumes": [
{
"name": "config",
"host": {
"sourcePath": "${SourcePath}"
}
}
]
}
Loading