Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b01457b
chore: add agent env for starting agent locally (#210)
GHkrishna Oct 24, 2024
a2ec9c4
feat:implemented form data for w3c credentials
tipusinghaw Dec 4, 2024
c991364
feat: removed disable console log linting
tipusinghaw Dec 5, 2024
44a003e
changes the routing
tipusinghaw Dec 5, 2024
0b7d89e
fix: add resource on mainnet (#225)
tipusinghaw Jan 8, 2025
16ee174
chore: update yarn lock
pranalidhanavade Jan 14, 2025
5f08bdb
chore: version upgrade (#229)
pranalidhanavade Jan 15, 2025
237f9ae
chore: added goal code in out of band record (#234)
bhavanakarwade Feb 21, 2025
a261cde
fix: added goalCode, outOfBandRecordId, credentialRequestThId in cred…
pranalidhanavade Feb 21, 2025
e499762
refactor: update DID creation response (#236)
bhavanakarwade Feb 21, 2025
352158a
fix:corrected the polygon routes
tipusinghaw Feb 24, 2025
2319ec7
fix:added proof record thread id (#243)
pallavighule Mar 4, 2025
e814aaf
added compass.yml file
pranalidhanavade Mar 6, 2025
e16a438
Resolve linting issues
pranalidhanavade Mar 6, 2025
453e17f
fix: resolved prettier errors
pranalidhanavade Mar 6, 2025
8712502
fix: resolved prettier errors
pranalidhanavade Mar 6, 2025
47a9b9f
chore: Update Dockerfile (#254)
KambleSahil3 Mar 13, 2025
2f12176
chore: Update Dockerfile (#256)
KambleSahil3 Mar 17, 2025
542eac2
chore: Update Dockerfile (#256)
KambleSahil3 Mar 17, 2025
96cac38
feat: push docker image (#257)
KambleSahil3 Mar 27, 2025
50b658f
feat/push-docker-image (#258)
KambleSahil3 Mar 27, 2025
1d45eb9
feat:w3c-revocation
tipusinghaw Mar 31, 2025
fb1f9c6
refactor: removed revocation code
tipusinghaw Mar 31, 2025
d966fb8
refactore: removed constant and enum
tipusinghaw Mar 31, 2025
618264e
chore: Update Dockerfile (#256) (#266)
bhavanakarwade Apr 25, 2025
92c0edf
chore: remove unwanted package (#268)
GHkrishna Apr 29, 2025
27502b7
feat: create yml file to push docker images (#259)
GHkrishna Mar 28, 2025
bb3f82c
fix: cd yml path (#260)
GHkrishna Mar 28, 2025
91c73d1
Create templates for Bug/feature suggestion (#263)
GHkrishna Apr 10, 2025
6ff3958
Merge branch 'main' into qa
KambleSahil3 Apr 30, 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
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@tsoa/runtime": "^6.0.0",
"@types/node-fetch": "^2.6.4",
"@types/ref-struct-di": "^1.1.9",
"@types/uuid": "^8.3.4",
"@types/ws": "^8.5.4",
"axios": "^1.4.0",
"body-parser": "^1.20.0",
Expand Down Expand Up @@ -86,7 +87,6 @@
"@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
11 changes: 10 additions & 1 deletion src/controllers/multi-tenancy/MultiTenancyController.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import type { RestAgentModules, RestMultiTenantAgentModules } from '../../cliAgent'
import type { Version } from '../examples'
import type { RecipientKeyOption, SchemaMetadata } from '../types'
Expand Down Expand Up @@ -49,7 +50,15 @@ import { QuestionAnswerRole, QuestionAnswerState } from '@credo-ts/question-answ
import axios from 'axios'
import * as fs from 'fs'

import { CredentialEnum, DidMethod, EndorserMode, Network, NetworkTypes, Role, SchemaError } from '../../enums/enum'
import {
CredentialEnum,
DidMethod,
EndorserMode,
Network,
NetworkTypes,
Role,
SchemaError,
} from '../../enums/enum'
import ErrorHandlingService from '../../errorHandlingService'
import { ENDORSER_DID_NOT_PRESENT } from '../../errorMessages'
import {
Expand Down
114 changes: 110 additions & 4 deletions src/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ const models: TsoaRoute.Models = {
"DidCreate": {
"dataType": "refObject",
"properties": {
"keyType": {"ref":"KeyType","required":true},
"keyType": {"ref":"KeyType"},
"seed": {"dataType":"string"},
"domain": {"dataType":"string"},
"method": {"dataType":"string","required":true},
Expand Down Expand Up @@ -585,6 +585,7 @@ const models: TsoaRoute.Models = {
"issuanceDate": {"dataType":"string","required":true},
"expirationDate": {"dataType":"string"},
"credentialSubject": {"ref":"SingleOrArray_JsonObject_","required":true},
"prettyVc": {"dataType":"any"},
},
"additionalProperties": {"dataType":"any"},
},
Expand Down Expand Up @@ -1128,6 +1129,31 @@ const models: TsoaRoute.Models = {
"additionalProperties": false,
},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.proposal_": {
"dataType": "refAlias",
"type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}},
},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.offer_": {
"dataType": "refAlias",
"type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}},
},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.request_": {
"dataType": "refAlias",
"type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}},
},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.credential_": {
"dataType": "refAlias",
"type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}},
},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"GetCredentialFormatDataReturn__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array_": {
"dataType": "refAlias",
"type": {"dataType":"nestedObjectLiteral","nestedProperties":{"credential":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.credential_"},"request":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.request_"},"offerAttributes":{"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}},"offer":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.offer_"},"proposal":{"ref":"CredentialFormatDataMessagePayload__40_LegacyIndyCredentialFormat-or-JsonLdCredentialFormat-or-AnonCredsCredentialFormat_41_-Array.proposal_"},"proposalAttributes":{"dataType":"array","array":{"dataType":"refObject","ref":"CredentialPreviewAttributeOptions"}}},"validators":{}},
},
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"BasicMessageRecord": {
"dataType": "refAlias",
"type": {"ref":"Record_string.unknown_","validators":{}},
Expand All @@ -1149,11 +1175,18 @@ const templateService = new ExpressTemplateService(models, {"noImplicitAdditiona

// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa




export function RegisterRoutes(app: Router) {

// ###########################################################################################################
// NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look
// Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa
// ###########################################################################################################



app.get('/proofs',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(ProofController)),
Expand Down Expand Up @@ -2468,7 +2501,7 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.post('/multi-tenancy/polygon-wc3/schema/:tenantId',
app.post('/multi-tenancy/polygon-w3c/schema/:tenantId',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController)),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController.prototype.createPolygonW3CSchema)),
Expand Down Expand Up @@ -2505,7 +2538,7 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/multi-tenancy/polygon-wc3/schema/:did/:schemaId/:tenantId',
app.get('/multi-tenancy/polygon-w3c/schema/:did/:schemaId/:tenantId',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController)),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController.prototype.getPolygonW3CSchemaById)),
Expand Down Expand Up @@ -2878,6 +2911,43 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/multi-tenancy/credentials/form-data/:tenantId/:credentialRecordId',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController)),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController.prototype.credentialFormData)),

async function MultiTenancyController_credentialFormData(request: ExRequest, response: ExResponse, next: any) {
const args: Record<string, TsoaRoute.ParameterSchema> = {
tenantId: {"in":"path","name":"tenantId","required":true,"dataType":"string"},
credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"dataType":"string"},
};

// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa

let validatedArgs: any[] = [];
try {
validatedArgs = templateService.getValidatedArgs({ args, request, response });

const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer;

const controller: any = await container.get<MultiTenancyController>(MultiTenancyController);
if (typeof controller['setStatus'] === 'function') {
controller.setStatus(undefined);
}

await templateService.apiHandler({
methodName: 'credentialFormData',
controller,
response,
next,
validatedArgs,
successStatus: undefined,
});
} catch (err) {
return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/multi-tenancy/proofs/:tenantId',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(MultiTenancyController)),
Expand Down Expand Up @@ -4234,6 +4304,42 @@ export function RegisterRoutes(app: Router) {
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/credentials/:credentialRecordId/form-data',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(CredentialController)),
...(fetchMiddlewares<RequestHandler>(CredentialController.prototype.credentialFormData)),

async function CredentialController_credentialFormData(request: ExRequest, response: ExResponse, next: any) {
const args: Record<string, TsoaRoute.ParameterSchema> = {
credentialRecordId: {"in":"path","name":"credentialRecordId","required":true,"dataType":"string"},
};

// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa

let validatedArgs: any[] = [];
try {
validatedArgs = templateService.getValidatedArgs({ args, request, response });

const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer;

const controller: any = await container.get<CredentialController>(CredentialController);
if (typeof controller['setStatus'] === 'function') {
controller.setStatus(undefined);
}

await templateService.apiHandler({
methodName: 'credentialFormData',
controller,
response,
next,
validatedArgs,
successStatus: undefined,
});
} catch (err) {
return next(err);
}
});
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
app.get('/connections',
authenticateMiddleware([{"apiKey":[]}]),
...(fetchMiddlewares<RequestHandler>(ConnectionController)),
Expand Down Expand Up @@ -4822,4 +4928,4 @@ export function RegisterRoutes(app: Router) {
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
}

// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
Loading
Loading