credo-ts-indy-vdr-proxy-server 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +20 -49
- package/build/agent.d.ts +0 -21
- package/build/agent.js +0 -44
- package/build/agent.js.map +0 -1
- package/build/agent.service.d.ts +0 -6
- package/build/agent.service.js +0 -34
- package/build/agent.service.js.map +0 -1
- package/build/app.module.d.ts +0 -5
- package/build/app.module.js +0 -44
- package/build/app.module.js.map +0 -1
- package/build/creddef.controller.d.ts +0 -11
- package/build/creddef.controller.js +0 -40
- package/build/creddef.controller.js.map +0 -1
- package/build/did.controller.d.ts +0 -11
- package/build/did.controller.js +0 -42
- package/build/did.controller.js.map +0 -1
- package/build/index.d.ts +0 -2
- package/build/index.js +0 -8
- package/build/index.js.map +0 -1
- package/build/main.d.ts +0 -1
- package/build/main.js +0 -25
- package/build/main.js.map +0 -1
- package/build/revregdef.controller.d.ts +0 -11
- package/build/revregdef.controller.js +0 -40
- package/build/revregdef.controller.js.map +0 -1
- package/build/revstatuslist.controller.d.ts +0 -12
- package/build/revstatuslist.controller.js +0 -40
- package/build/revstatuslist.controller.js.map +0 -1
- package/build/schema.controller.d.ts +0 -11
- package/build/schema.controller.js +0 -40
- package/build/schema.controller.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,26 +9,26 @@ Although it can be used as a general gateway to multiple Indy networks (much in
|
|
|
9
9
|
In order to run the server in standalone mode, you just need to install all dependencies by doing:
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
|
|
12
|
+
pnpm install
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
and then go to server directory and execute:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
cd packages/server
|
|
19
|
-
|
|
19
|
+
pnpm start
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
By default, Indy VDR Proxy Server runs at port 3000 and supports only [BCovrin Test network](http://test.bcovrin.vonx.io/). This can be overriden by either updating the configuration file located at `res/app.config.json` or providing your own by setting the environment variable `INDY_VDR_PROXY_CONFIG_PATH`. E.g.:
|
|
23
23
|
|
|
24
24
|
```
|
|
25
|
-
INDY_VDR_PROXY_CONFIG_PATH=/my-directory/my-config.file.json
|
|
25
|
+
INDY_VDR_PROXY_CONFIG_PATH=/my-directory/my-config.file.json pnpm start
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
If you want to integrate Indy VDR Proxy in your own NestJS-based project, you can by importing `IndyVdrProxyServerModule`. You'll need to call `register` method passing an `IndyVdrProxyAgent` instance (which could be your own Credo-based Agent as long as it contains all required modules):
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { setupAgent } from
|
|
31
|
+
import { setupAgent } from 'credo-ts-indy-vdr-proxy-server'
|
|
32
32
|
|
|
33
33
|
IndyVdrProxyModule.register(setupAgent({ networks }))
|
|
34
34
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "credo-ts-indy-vdr-proxy-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Indy VDR Proxy server based on credo-ts",
|
|
5
5
|
"author": "2060.io",
|
|
6
6
|
"homepage": "https://github.com/2060-io/credo-ts-indy-vdr-proxy",
|
|
@@ -11,13 +11,10 @@
|
|
|
11
11
|
"build"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
|
-
"build": "
|
|
14
|
+
"build": "pnpm run clean && pnpm run compile",
|
|
15
15
|
"clean": "rimraf -rf ./build",
|
|
16
16
|
"compile": "tsc -p tsconfig.build.json",
|
|
17
|
-
"prepublishOnly": "
|
|
18
|
-
"check-types": "tsc --noEmit -p tsconfig.build.json",
|
|
19
|
-
"check-format": "yarn prettier --check",
|
|
20
|
-
"prettier": "prettier --ignore-path .gitignore '**/*.+(js|json|ts|md|yml|yaml)'",
|
|
17
|
+
"prepublishOnly": "pnpm run build",
|
|
21
18
|
"start": "nest start"
|
|
22
19
|
},
|
|
23
20
|
"repository": {
|
|
@@ -32,62 +29,36 @@
|
|
|
32
29
|
"access": "public"
|
|
33
30
|
},
|
|
34
31
|
"dependencies": {
|
|
35
|
-
"@credo-ts/anoncreds": "0.
|
|
36
|
-
"@credo-ts/askar": "0.
|
|
37
|
-
"@credo-ts/core": "0.
|
|
38
|
-
"@credo-ts/indy-vdr": "0.
|
|
39
|
-
"@credo-ts/node": "0.
|
|
40
|
-
"@hyperledger/anoncreds-nodejs": "0.2.4",
|
|
41
|
-
"@hyperledger/anoncreds-shared": "0.2.4",
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@hyperledger/indy-vdr-
|
|
45
|
-
"@
|
|
46
|
-
"@nestjs/
|
|
32
|
+
"@credo-ts/anoncreds": "^0.6.1",
|
|
33
|
+
"@credo-ts/askar": "^0.6.1",
|
|
34
|
+
"@credo-ts/core": "^0.6.1",
|
|
35
|
+
"@credo-ts/indy-vdr": "^0.6.1",
|
|
36
|
+
"@credo-ts/node": "^0.6.1",
|
|
37
|
+
"@hyperledger/anoncreds-nodejs": "^0.2.4",
|
|
38
|
+
"@hyperledger/anoncreds-shared": "^0.2.4",
|
|
39
|
+
"@openwallet-foundation/askar-nodejs": "^0.4.3",
|
|
40
|
+
"@openwallet-foundation/askar-shared": "^0.4.3",
|
|
41
|
+
"@hyperledger/indy-vdr-shared": "^0.2.3",
|
|
42
|
+
"@hyperledger/indy-vdr-nodejs": "^0.2.3",
|
|
43
|
+
"@nestjs/common": "^11.1.9",
|
|
44
|
+
"@nestjs/core": "^11.1.9",
|
|
47
45
|
"@nestjs/platform-express": "^9.0.0",
|
|
48
46
|
"reflect-metadata": "^0.1.13",
|
|
49
47
|
"rxjs": "^7.2.0"
|
|
50
48
|
},
|
|
51
49
|
"devDependencies": {
|
|
52
|
-
"@nestjs/cli": "^
|
|
53
|
-
"@nestjs/schematics": "^
|
|
54
|
-
"@nestjs/testing": "^
|
|
50
|
+
"@nestjs/cli": "^11.0.14",
|
|
51
|
+
"@nestjs/schematics": "^11.0.0",
|
|
52
|
+
"@nestjs/testing": "^11.1.9",
|
|
55
53
|
"@types/express": "^4.17.13",
|
|
56
|
-
"@types/jest": "29.5.11",
|
|
57
54
|
"@types/node": "18.11.18",
|
|
58
55
|
"@types/ref-struct-di": "^1.1.8",
|
|
59
|
-
"@types/supertest": "^2.0.11",
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
61
|
-
"@typescript-eslint/parser": "^5.0.0",
|
|
62
|
-
"eslint": "^8.0.1",
|
|
63
|
-
"eslint-config-prettier": "^8.3.0",
|
|
64
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
65
|
-
"jest": "29.7.0",
|
|
66
|
-
"prettier": "^2.3.2",
|
|
67
56
|
"rimraf": "^6.0.1",
|
|
68
57
|
"source-map-support": "^0.5.20",
|
|
69
58
|
"supertest": "^6.1.3",
|
|
70
|
-
"ts-jest": "29.0.3",
|
|
71
59
|
"ts-loader": "^9.2.3",
|
|
72
60
|
"ts-node": "^10.0.0",
|
|
73
61
|
"tsconfig-paths": "4.1.1",
|
|
74
|
-
"typescript": "
|
|
75
|
-
},
|
|
76
|
-
"jest": {
|
|
77
|
-
"moduleFileExtensions": [
|
|
78
|
-
"js",
|
|
79
|
-
"json",
|
|
80
|
-
"ts"
|
|
81
|
-
],
|
|
82
|
-
"rootDir": "src",
|
|
83
|
-
"testRegex": ".*\\.spec\\.ts$",
|
|
84
|
-
"transform": {
|
|
85
|
-
"^.+\\.(t|j)s$": "ts-jest"
|
|
86
|
-
},
|
|
87
|
-
"collectCoverageFrom": [
|
|
88
|
-
"**/*.(t|j)s"
|
|
89
|
-
],
|
|
90
|
-
"coverageDirectory": "../coverage",
|
|
91
|
-
"testEnvironment": "node"
|
|
62
|
+
"typescript": "~5.9.3"
|
|
92
63
|
}
|
|
93
64
|
}
|
package/build/agent.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Agent, DidsModule, Logger } from "@credo-ts/core";
|
|
2
|
-
import { AskarModule } from "@credo-ts/askar";
|
|
3
|
-
import { AnonCredsModule } from "@credo-ts/anoncreds";
|
|
4
|
-
import { IndyVdrModule, IndyVdrPoolConfig } from "@credo-ts/indy-vdr";
|
|
5
|
-
export type IndyVdrProxyAgent = Agent<ReturnType<typeof getIndyVdrProxyAgentModules>>;
|
|
6
|
-
export declare function setupAgent(options: {
|
|
7
|
-
networks: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]];
|
|
8
|
-
logger?: Logger;
|
|
9
|
-
}): Agent<{
|
|
10
|
-
readonly askar: AskarModule;
|
|
11
|
-
readonly anoncreds: AnonCredsModule;
|
|
12
|
-
readonly dids: DidsModule;
|
|
13
|
-
readonly indyVdr: IndyVdrModule;
|
|
14
|
-
}>;
|
|
15
|
-
declare const getIndyVdrProxyAgentModules: (networks: [IndyVdrPoolConfig, ...IndyVdrPoolConfig[]]) => {
|
|
16
|
-
readonly askar: AskarModule;
|
|
17
|
-
readonly anoncreds: AnonCredsModule;
|
|
18
|
-
readonly dids: DidsModule;
|
|
19
|
-
readonly indyVdr: IndyVdrModule;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
package/build/agent.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupAgent = void 0;
|
|
4
|
-
const core_1 = require("@credo-ts/core");
|
|
5
|
-
const node_1 = require("@credo-ts/node");
|
|
6
|
-
const askar_1 = require("@credo-ts/askar");
|
|
7
|
-
const anoncreds_1 = require("@credo-ts/anoncreds");
|
|
8
|
-
const indy_vdr_1 = require("@credo-ts/indy-vdr");
|
|
9
|
-
const anoncreds_nodejs_1 = require("@hyperledger/anoncreds-nodejs");
|
|
10
|
-
const aries_askar_nodejs_1 = require("@hyperledger/aries-askar-nodejs");
|
|
11
|
-
const indy_vdr_nodejs_1 = require("@hyperledger/indy-vdr-nodejs");
|
|
12
|
-
function setupAgent(options) {
|
|
13
|
-
var _a;
|
|
14
|
-
return new core_1.Agent({
|
|
15
|
-
config: {
|
|
16
|
-
label: "Indy VDR Proxy",
|
|
17
|
-
walletConfig: {
|
|
18
|
-
id: "indy-vdr-proxy",
|
|
19
|
-
key: "indy-vdr-proxy",
|
|
20
|
-
},
|
|
21
|
-
autoUpdateStorageOnStartup: true,
|
|
22
|
-
backupBeforeStorageUpdate: false,
|
|
23
|
-
logger: (_a = options.logger) !== null && _a !== void 0 ? _a : new core_1.ConsoleLogger(core_1.LogLevel.off),
|
|
24
|
-
},
|
|
25
|
-
dependencies: node_1.agentDependencies,
|
|
26
|
-
modules: getIndyVdrProxyAgentModules(options.networks),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
exports.setupAgent = setupAgent;
|
|
30
|
-
const getIndyVdrProxyAgentModules = (networks) => {
|
|
31
|
-
return {
|
|
32
|
-
askar: new askar_1.AskarModule({ ariesAskar: aries_askar_nodejs_1.ariesAskar }),
|
|
33
|
-
anoncreds: new anoncreds_1.AnonCredsModule({
|
|
34
|
-
registries: [new indy_vdr_1.IndyVdrAnonCredsRegistry()],
|
|
35
|
-
anoncreds: anoncreds_nodejs_1.anoncreds,
|
|
36
|
-
}),
|
|
37
|
-
dids: new core_1.DidsModule({ resolvers: [new indy_vdr_1.IndyVdrSovDidResolver(), new indy_vdr_1.IndyVdrIndyDidResolver()] }),
|
|
38
|
-
indyVdr: new indy_vdr_1.IndyVdrModule({
|
|
39
|
-
indyVdr: indy_vdr_nodejs_1.indyVdr,
|
|
40
|
-
networks,
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=agent.js.map
|
package/build/agent.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;AAAA,yCAAmF;AACnF,yCAAkD;AAClD,2CAA6C;AAC7C,mDAAqD;AACrD,iDAM2B;AAC3B,oEAAyD;AACzD,wEAA4D;AAC5D,kEAAsD;AAItD,SAAgB,UAAU,CAAC,OAAmF;;IAC5G,OAAO,IAAI,YAAK,CAAC;QACf,MAAM,EAAE;YACN,KAAK,EAAE,gBAAgB;YACvB,YAAY,EAAE;gBACZ,EAAE,EAAE,gBAAgB;gBACpB,GAAG,EAAE,gBAAgB;aACtB;YACD,0BAA0B,EAAE,IAAI;YAChC,yBAAyB,EAAE,KAAK;YAChC,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAI,oBAAa,CAAC,eAAQ,CAAC,GAAG,CAAC;SAC1D;QACD,YAAY,EAAE,wBAAiB;QAC/B,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,QAAQ,CAAC;KACvD,CAAC,CAAA;AACJ,CAAC;AAfD,gCAeC;AAED,MAAM,2BAA2B,GAAG,CAAC,QAAqD,EAAE,EAAE;IAC5F,OAAO;QACL,KAAK,EAAE,IAAI,mBAAW,CAAC,EAAE,UAAU,EAAV,+BAAU,EAAE,CAAC;QACtC,SAAS,EAAE,IAAI,2BAAe,CAAC;YAC7B,UAAU,EAAE,CAAC,IAAI,mCAAwB,EAAE,CAAC;YAC5C,SAAS,EAAT,4BAAS;SACV,CAAC;QACF,IAAI,EAAE,IAAI,iBAAU,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,gCAAqB,EAAE,EAAE,IAAI,iCAAsB,EAAE,CAAC,EAAE,CAAC;QAChG,OAAO,EAAE,IAAI,wBAAa,CAAC;YACzB,OAAO,EAAP,yBAAO;YACP,QAAQ;SACT,CAAC;KACM,CAAA;AACZ,CAAC,CAAA"}
|
package/build/agent.service.d.ts
DELETED
package/build/agent.service.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AgentService = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
let AgentService = class AgentService {
|
|
18
|
-
constructor(agent) {
|
|
19
|
-
this.agent = agent;
|
|
20
|
-
}
|
|
21
|
-
async getAgent() {
|
|
22
|
-
if (!this.agent.isInitialized) {
|
|
23
|
-
await this.agent.initialize();
|
|
24
|
-
}
|
|
25
|
-
return this.agent;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
AgentService = __decorate([
|
|
29
|
-
(0, common_1.Injectable)(),
|
|
30
|
-
__param(0, (0, common_1.Inject)("AGENT")),
|
|
31
|
-
__metadata("design:paramtypes", [Object])
|
|
32
|
-
], AgentService);
|
|
33
|
-
exports.AgentService = AgentService;
|
|
34
|
-
//# sourceMappingURL=agent.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.service.js","sourceRoot":"","sources":["../src/agent.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAmD;AAI5C,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAAqC,KAAwB;QAAxB,UAAK,GAAL,KAAK,CAAmB;IAAG,CAAC;IAEjE,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YAC7B,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAA;SAC9B;QAED,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;CACF,CAAA;AAVY,YAAY;IADxB,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,eAAM,EAAC,OAAO,CAAC,CAAA;;GADjB,YAAY,CAUxB;AAVY,oCAAY"}
|
package/build/app.module.d.ts
DELETED
package/build/app.module.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var IndyVdrProxyModule_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.IndyVdrProxyModule = void 0;
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
const agent_service_1 = require("./agent.service");
|
|
13
|
-
const creddef_controller_1 = require("./creddef.controller");
|
|
14
|
-
const did_controller_1 = require("./did.controller");
|
|
15
|
-
const revregdef_controller_1 = require("./revregdef.controller");
|
|
16
|
-
const revstatuslist_controller_1 = require("./revstatuslist.controller");
|
|
17
|
-
const schema_controller_1 = require("./schema.controller");
|
|
18
|
-
let IndyVdrProxyModule = IndyVdrProxyModule_1 = class IndyVdrProxyModule {
|
|
19
|
-
static register(agent) {
|
|
20
|
-
return {
|
|
21
|
-
module: IndyVdrProxyModule_1,
|
|
22
|
-
controllers: [
|
|
23
|
-
did_controller_1.DidController,
|
|
24
|
-
schema_controller_1.SchemaController,
|
|
25
|
-
creddef_controller_1.CredentialDefinitionController,
|
|
26
|
-
revregdef_controller_1.RevocationRegistryDefinitionController,
|
|
27
|
-
revstatuslist_controller_1.RevocationStatusListController,
|
|
28
|
-
],
|
|
29
|
-
providers: [
|
|
30
|
-
{
|
|
31
|
-
provide: "AGENT",
|
|
32
|
-
useValue: agent,
|
|
33
|
-
},
|
|
34
|
-
agent_service_1.AgentService,
|
|
35
|
-
],
|
|
36
|
-
exports: [agent_service_1.AgentService],
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
IndyVdrProxyModule = IndyVdrProxyModule_1 = __decorate([
|
|
41
|
-
(0, common_1.Module)({})
|
|
42
|
-
], IndyVdrProxyModule);
|
|
43
|
-
exports.IndyVdrProxyModule = IndyVdrProxyModule;
|
|
44
|
-
//# sourceMappingURL=app.module.js.map
|
package/build/app.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAsD;AAEtD,mDAA8C;AAC9C,6DAAqE;AACrE,qDAAgD;AAChD,iEAA+E;AAC/E,yEAA2E;AAC3E,2DAAsD;AAG/C,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAC7B,MAAM,CAAC,QAAQ,CAAC,KAAwB;QACtC,OAAO;YACL,MAAM,EAAE,oBAAkB;YAC1B,WAAW,EAAE;gBACX,8BAAa;gBACb,oCAAgB;gBAChB,mDAA8B;gBAC9B,6DAAsC;gBACtC,yDAA8B;aAC/B;YACD,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,KAAK;iBAChB;gBACD,4BAAY;aACb;YACD,OAAO,EAAE,CAAC,4BAAY,CAAC;SACxB,CAAA;IACH,CAAC;CACF,CAAA;AArBY,kBAAkB;IAD9B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,kBAAkB,CAqB9B;AArBY,gDAAkB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AgentService } from "./agent.service";
|
|
2
|
-
import { GetCredentialDefinitionReturn } from "@credo-ts/anoncreds/build/services/registry";
|
|
3
|
-
interface GetCredentialDefinitionParams {
|
|
4
|
-
credentialDefinitionId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class CredentialDefinitionController {
|
|
7
|
-
private readonly agentService;
|
|
8
|
-
constructor(agentService: AgentService);
|
|
9
|
-
getCredentialDefinition(params: GetCredentialDefinitionParams): Promise<GetCredentialDefinitionReturn>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CredentialDefinitionController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const agent_service_1 = require("./agent.service");
|
|
18
|
-
let CredentialDefinitionController = class CredentialDefinitionController {
|
|
19
|
-
constructor(agentService) {
|
|
20
|
-
this.agentService = agentService;
|
|
21
|
-
}
|
|
22
|
-
async getCredentialDefinition(params) {
|
|
23
|
-
const agent = await this.agentService.getAgent();
|
|
24
|
-
const getCredentialDefinitionReturn = await agent.modules.anoncreds.getCredentialDefinition(params.credentialDefinitionId);
|
|
25
|
-
return getCredentialDefinitionReturn;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, common_1.Get)("/:credentialDefinitionId"),
|
|
30
|
-
__param(0, (0, common_1.Param)()),
|
|
31
|
-
__metadata("design:type", Function),
|
|
32
|
-
__metadata("design:paramtypes", [Object]),
|
|
33
|
-
__metadata("design:returntype", Promise)
|
|
34
|
-
], CredentialDefinitionController.prototype, "getCredentialDefinition", null);
|
|
35
|
-
CredentialDefinitionController = __decorate([
|
|
36
|
-
(0, common_1.Controller)("credential-definition"),
|
|
37
|
-
__metadata("design:paramtypes", [agent_service_1.AgentService])
|
|
38
|
-
], CredentialDefinitionController);
|
|
39
|
-
exports.CredentialDefinitionController = CredentialDefinitionController;
|
|
40
|
-
//# sourceMappingURL=creddef.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"creddef.controller.js","sourceRoot":"","sources":["../src/creddef.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuD;AACvD,mDAA8C;AAQvC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACzC,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG9C,AAAN,KAAK,CAAC,uBAAuB,CACzB,MAAqC;QAE9C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;QAEhD,MAAM,6BAA6B,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,uBAAuB,CACzF,MAAM,CAAC,sBAAsB,CAC9B,CAAA;QACD,OAAO,6BAA6B,CAAA;IACtC,CAAC;CACF,CAAA;AAVc;IADZ,IAAA,YAAG,EAAC,0BAA0B,CAAC;IAE7B,WAAA,IAAA,cAAK,GAAE,CAAA;;;;6EAQT;AAbU,8BAA8B;IAD1C,IAAA,mBAAU,EAAC,uBAAuB,CAAC;qCAES,4BAAY;GAD5C,8BAA8B,CAc1C;AAdY,wEAA8B"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DidResolutionResult } from "@credo-ts/core";
|
|
2
|
-
import { AgentService } from "./agent.service";
|
|
3
|
-
interface GetDidParams {
|
|
4
|
-
did: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class DidController {
|
|
7
|
-
private readonly agentService;
|
|
8
|
-
constructor(agentService: AgentService);
|
|
9
|
-
getDid(params: GetDidParams): Promise<DidResolutionResult>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
package/build/did.controller.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.DidController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const agent_service_1 = require("./agent.service");
|
|
18
|
-
const legacyIndyDidRegex = /^[a-zA-Z0-9]{21,22}$/;
|
|
19
|
-
let DidController = class DidController {
|
|
20
|
-
constructor(agentService) {
|
|
21
|
-
this.agentService = agentService;
|
|
22
|
-
}
|
|
23
|
-
async getDid(params) {
|
|
24
|
-
const agent = await this.agentService.getAgent();
|
|
25
|
-
const did = params.did.match(legacyIndyDidRegex) ? `did:sov:${params.did}` : params.did;
|
|
26
|
-
const didResolutionResult = await agent.dids.resolve(did);
|
|
27
|
-
return didResolutionResult;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, common_1.Get)("/:did"),
|
|
32
|
-
__param(0, (0, common_1.Param)()),
|
|
33
|
-
__metadata("design:type", Function),
|
|
34
|
-
__metadata("design:paramtypes", [Object]),
|
|
35
|
-
__metadata("design:returntype", Promise)
|
|
36
|
-
], DidController.prototype, "getDid", null);
|
|
37
|
-
DidController = __decorate([
|
|
38
|
-
(0, common_1.Controller)("did"),
|
|
39
|
-
__metadata("design:paramtypes", [agent_service_1.AgentService])
|
|
40
|
-
], DidController);
|
|
41
|
-
exports.DidController = DidController;
|
|
42
|
-
//# sourceMappingURL=did.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"did.controller.js","sourceRoot":"","sources":["../src/did.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAuD;AACvD,mDAA8C;AAM9C,MAAM,kBAAkB,GAAG,sBAAsB,CAAA;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG9C,AAAN,KAAK,CAAC,MAAM,CAAU,MAAoB;QAC/C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;QAEhD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAA;QACvF,MAAM,mBAAmB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QACzD,OAAO,mBAAmB,CAAA;IAC5B,CAAC;CACF,CAAA;AAPc;IADZ,IAAA,YAAG,EAAC,OAAO,CAAC;IACQ,WAAA,IAAA,cAAK,GAAE,CAAA;;;;2CAM3B;AAVU,aAAa;IADzB,IAAA,mBAAU,EAAC,KAAK,CAAC;qCAE2B,4BAAY;GAD5C,aAAa,CAWzB;AAXY,sCAAa"}
|
package/build/index.d.ts
DELETED
package/build/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupAgent = exports.IndyVdrProxyModule = void 0;
|
|
4
|
-
var app_module_1 = require("./app.module");
|
|
5
|
-
Object.defineProperty(exports, "IndyVdrProxyModule", { enumerable: true, get: function () { return app_module_1.IndyVdrProxyModule; } });
|
|
6
|
-
var agent_1 = require("./agent");
|
|
7
|
-
Object.defineProperty(exports, "setupAgent", { enumerable: true, get: function () { return agent_1.setupAgent; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAAxC,gHAAA,kBAAkB,OAAA;AAC3B,iCAAuD;AAA3B,mGAAA,UAAU,OAAA"}
|
package/build/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/build/main.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("@nestjs/core");
|
|
4
|
-
const agent_1 = require("./agent");
|
|
5
|
-
const app_module_1 = require("./app.module");
|
|
6
|
-
const fs_1 = require("fs");
|
|
7
|
-
const common_1 = require("@nestjs/common");
|
|
8
|
-
const core_2 = require("@credo-ts/core");
|
|
9
|
-
async function bootstrap() {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const configPath = (_a = process.env.INDY_VDR_PROXY_CONFIG_PATH) !== null && _a !== void 0 ? _a : "./res/app.config.json";
|
|
12
|
-
const config = JSON.parse((0, fs_1.readFileSync)(configPath, { encoding: "utf-8" }));
|
|
13
|
-
const logger = new core_2.ConsoleLogger(config.logLevel);
|
|
14
|
-
logger.info(`Bootstrapping Indy VDR Proxy Server with config file ${configPath}`);
|
|
15
|
-
const networks = config.networks;
|
|
16
|
-
const agent = (0, agent_1.setupAgent)({ networks, logger });
|
|
17
|
-
await agent.initialize();
|
|
18
|
-
logger.info("Agent initialized");
|
|
19
|
-
const app = await core_1.NestFactory.create(app_module_1.IndyVdrProxyModule.register(agent));
|
|
20
|
-
await app.listen((_b = config.port) !== null && _b !== void 0 ? _b : 3000);
|
|
21
|
-
}
|
|
22
|
-
bootstrap().catch((e) => {
|
|
23
|
-
common_1.Logger.error("Error initializing server", e);
|
|
24
|
-
});
|
|
25
|
-
//# sourceMappingURL=main.js.map
|
package/build/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AACA,uCAA0C;AAC1C,mCAAoC;AACpC,6CAAiD;AAEjD,2BAAiC;AACjC,2CAAuC;AACvC,yCAA8C;AAE9C,KAAK,UAAU,SAAS;;IACtB,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,0BAA0B,mCAAI,uBAAuB,CAAA;IACpF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;IAC1E,MAAM,MAAM,GAAG,IAAI,oBAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IACjD,MAAM,CAAC,IAAI,CAAC,wDAAwD,UAAU,EAAE,CAAC,CAAA;IACjF,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAuD,CAAA;IAE/E,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAA;IAC9C,MAAM,KAAK,CAAC,UAAU,EAAE,CAAA;IACxB,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IAEhC,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,+BAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;IACxE,MAAM,GAAG,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,IAAI,mCAAI,IAAI,CAAC,CAAA;AACvC,CAAC;AACD,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IACtB,eAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,CAAC,CAAC,CAAA;AAC9C,CAAC,CAAC,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AgentService } from "./agent.service";
|
|
2
|
-
import { GetRevocationRegistryDefinitionReturn } from "@credo-ts/anoncreds/build/services/registry";
|
|
3
|
-
interface GetRevocationRegistryDefinitionParams {
|
|
4
|
-
revocationRegistryDefinition: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class RevocationRegistryDefinitionController {
|
|
7
|
-
private readonly agentService;
|
|
8
|
-
constructor(agentService: AgentService);
|
|
9
|
-
getRevocationRegistryDefinition(params: GetRevocationRegistryDefinitionParams): Promise<GetRevocationRegistryDefinitionReturn>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RevocationRegistryDefinitionController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const agent_service_1 = require("./agent.service");
|
|
18
|
-
let RevocationRegistryDefinitionController = class RevocationRegistryDefinitionController {
|
|
19
|
-
constructor(agentService) {
|
|
20
|
-
this.agentService = agentService;
|
|
21
|
-
}
|
|
22
|
-
async getRevocationRegistryDefinition(params) {
|
|
23
|
-
const agent = await this.agentService.getAgent();
|
|
24
|
-
const getRevocationRegistryDefinitionReturn = await agent.modules.anoncreds.getRevocationRegistryDefinition(params.revocationRegistryDefinition);
|
|
25
|
-
return getRevocationRegistryDefinitionReturn;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, common_1.Get)("/:revocationRegistryDefinition"),
|
|
30
|
-
__param(0, (0, common_1.Param)()),
|
|
31
|
-
__metadata("design:type", Function),
|
|
32
|
-
__metadata("design:paramtypes", [Object]),
|
|
33
|
-
__metadata("design:returntype", Promise)
|
|
34
|
-
], RevocationRegistryDefinitionController.prototype, "getRevocationRegistryDefinition", null);
|
|
35
|
-
RevocationRegistryDefinitionController = __decorate([
|
|
36
|
-
(0, common_1.Controller)("revocation-registry-definition"),
|
|
37
|
-
__metadata("design:paramtypes", [agent_service_1.AgentService])
|
|
38
|
-
], RevocationRegistryDefinitionController);
|
|
39
|
-
exports.RevocationRegistryDefinitionController = RevocationRegistryDefinitionController;
|
|
40
|
-
//# sourceMappingURL=revregdef.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revregdef.controller.js","sourceRoot":"","sources":["../src/revregdef.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuD;AACvD,mDAA8C;AAQvC,IAAM,sCAAsC,GAA5C,MAAM,sCAAsC;IACjD,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG9C,AAAN,KAAK,CAAC,+BAA+B,CACjC,MAA6C;QAEtD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;QAChD,MAAM,qCAAqC,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,+BAA+B,CACzG,MAAM,CAAC,4BAA4B,CACpC,CAAA;QACD,OAAO,qCAAqC,CAAA;IAC9C,CAAC;CACF,CAAA;AATc;IADZ,IAAA,YAAG,EAAC,gCAAgC,CAAC;IAEnC,WAAA,IAAA,cAAK,GAAE,CAAA;;;;6FAOT;AAZU,sCAAsC;IADlD,IAAA,mBAAU,EAAC,gCAAgC,CAAC;qCAEA,4BAAY;GAD5C,sCAAsC,CAalD;AAbY,wFAAsC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AgentService } from "./agent.service";
|
|
2
|
-
import { GetRevocationStatusListReturn } from "@credo-ts/anoncreds/build/services/registry";
|
|
3
|
-
interface GetRevocationStatusListParams {
|
|
4
|
-
revocationRegistryDefinition: string;
|
|
5
|
-
timestamp: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class RevocationStatusListController {
|
|
8
|
-
private readonly agentService;
|
|
9
|
-
constructor(agentService: AgentService);
|
|
10
|
-
getRevocationRegistryDefinition(params: GetRevocationStatusListParams): Promise<GetRevocationStatusListReturn>;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RevocationStatusListController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const agent_service_1 = require("./agent.service");
|
|
18
|
-
let RevocationStatusListController = class RevocationStatusListController {
|
|
19
|
-
constructor(agentService) {
|
|
20
|
-
this.agentService = agentService;
|
|
21
|
-
}
|
|
22
|
-
async getRevocationRegistryDefinition(params) {
|
|
23
|
-
const agent = await this.agentService.getAgent();
|
|
24
|
-
const getRevocationStatusListReturn = await agent.modules.anoncreds.getRevocationStatusList(params.revocationRegistryDefinition, params.timestamp);
|
|
25
|
-
return getRevocationStatusListReturn;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, common_1.Get)("/:revocationRegistryDefinition/:timestamp"),
|
|
30
|
-
__param(0, (0, common_1.Param)()),
|
|
31
|
-
__metadata("design:type", Function),
|
|
32
|
-
__metadata("design:paramtypes", [Object]),
|
|
33
|
-
__metadata("design:returntype", Promise)
|
|
34
|
-
], RevocationStatusListController.prototype, "getRevocationRegistryDefinition", null);
|
|
35
|
-
RevocationStatusListController = __decorate([
|
|
36
|
-
(0, common_1.Controller)("revocation-status-list"),
|
|
37
|
-
__metadata("design:paramtypes", [agent_service_1.AgentService])
|
|
38
|
-
], RevocationStatusListController);
|
|
39
|
-
exports.RevocationStatusListController = RevocationStatusListController;
|
|
40
|
-
//# sourceMappingURL=revstatuslist.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revstatuslist.controller.js","sourceRoot":"","sources":["../src/revstatuslist.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuD;AACvD,mDAA8C;AASvC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACzC,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG9C,AAAN,KAAK,CAAC,+BAA+B,CACjC,MAAqC;QAE9C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;QAEhD,MAAM,6BAA6B,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,uBAAuB,CACzF,MAAM,CAAC,4BAA4B,EACnC,MAAM,CAAC,SAAS,CACjB,CAAA;QACD,OAAO,6BAA6B,CAAA;IACtC,CAAC;CACF,CAAA;AAXc;IADZ,IAAA,YAAG,EAAC,2CAA2C,CAAC;IAE9C,WAAA,IAAA,cAAK,GAAE,CAAA;;;;qFAST;AAdU,8BAA8B;IAD1C,IAAA,mBAAU,EAAC,wBAAwB,CAAC;qCAEQ,4BAAY;GAD5C,8BAA8B,CAe1C;AAfY,wEAA8B"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AgentService } from "./agent.service";
|
|
2
|
-
import { GetSchemaReturn } from "@credo-ts/anoncreds/build/services/registry";
|
|
3
|
-
interface GetSchemaParams {
|
|
4
|
-
schemaId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class SchemaController {
|
|
7
|
-
private readonly agentService;
|
|
8
|
-
constructor(agentService: AgentService);
|
|
9
|
-
getSchema(params: GetSchemaParams): Promise<GetSchemaReturn>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.SchemaController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const agent_service_1 = require("./agent.service");
|
|
18
|
-
let SchemaController = class SchemaController {
|
|
19
|
-
constructor(agentService) {
|
|
20
|
-
this.agentService = agentService;
|
|
21
|
-
}
|
|
22
|
-
async getSchema(params) {
|
|
23
|
-
const agent = await this.agentService.getAgent();
|
|
24
|
-
const getSchemaReturn = await agent.modules.anoncreds.getSchema(params.schemaId);
|
|
25
|
-
return getSchemaReturn;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, common_1.Get)("/:schemaId"),
|
|
30
|
-
__param(0, (0, common_1.Param)()),
|
|
31
|
-
__metadata("design:type", Function),
|
|
32
|
-
__metadata("design:paramtypes", [Object]),
|
|
33
|
-
__metadata("design:returntype", Promise)
|
|
34
|
-
], SchemaController.prototype, "getSchema", null);
|
|
35
|
-
SchemaController = __decorate([
|
|
36
|
-
(0, common_1.Controller)("schema"),
|
|
37
|
-
__metadata("design:paramtypes", [agent_service_1.AgentService])
|
|
38
|
-
], SchemaController);
|
|
39
|
-
exports.SchemaController = SchemaController;
|
|
40
|
-
//# sourceMappingURL=schema.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.controller.js","sourceRoot":"","sources":["../src/schema.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuD;AACvD,mDAA8C;AAQvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAG9C,AAAN,KAAK,CAAC,SAAS,CAAU,MAAuB;QACrD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAA;QAEhD,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QAChF,OAAO,eAAe,CAAA;IACxB,CAAC;CACF,CAAA;AANc;IADZ,IAAA,YAAG,EAAC,YAAY,CAAC;IACM,WAAA,IAAA,cAAK,GAAE,CAAA;;;;iDAK9B;AATU,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,QAAQ,CAAC;qCAEwB,4BAAY;GAD5C,gBAAgB,CAU5B;AAVY,4CAAgB"}
|