@ayni.org/vs-agent-plugin-ayni-flow 0.0.0-stage → 0.1.2
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/LICENSE +201 -0
- package/README.md +52 -2
- package/build/events/ayniFlowEvents.d.ts +20 -0
- package/build/events/ayniFlowEvents.js +58 -0
- package/build/events/ayniFlowEvents.js.map +1 -0
- package/build/index.d.ts +10 -0
- package/build/index.js +8 -0
- package/build/index.js.map +1 -0
- package/build/nestjs/AyniFlowPlugin.d.ts +21 -0
- package/build/nestjs/AyniFlowPlugin.js +69 -0
- package/build/nestjs/AyniFlowPlugin.js.map +1 -0
- package/build/nestjs/V2DidcommAyniFlowController.d.ts +13 -0
- package/build/nestjs/V2DidcommAyniFlowController.js +134 -0
- package/build/nestjs/V2DidcommAyniFlowController.js.map +1 -0
- package/build/nestjs/V2DidcommCarrierControllers.d.ts +80 -0
- package/build/nestjs/V2DidcommCarrierControllers.js +447 -0
- package/build/nestjs/V2DidcommCarrierControllers.js.map +1 -0
- package/build/nestjs/didcommModules.d.ts +3 -0
- package/build/nestjs/didcommModules.js +12 -0
- package/build/nestjs/didcommModules.js.map +1 -0
- package/build/nestjs/dto/ayni-flow.dto.d.ts +62 -0
- package/build/nestjs/dto/ayni-flow.dto.js +279 -0
- package/build/nestjs/dto/ayni-flow.dto.js.map +1 -0
- package/build/nestjs/dto/carriers.dto.d.ts +154 -0
- package/build/nestjs/dto/carriers.dto.js +587 -0
- package/build/nestjs/dto/carriers.dto.js.map +1 -0
- package/build/nestjs/dto/common.dto.d.ts +39 -0
- package/build/nestjs/dto/common.dto.js +107 -0
- package/build/nestjs/dto/common.dto.js.map +1 -0
- package/build/nestjs/dto/index.d.ts +3 -0
- package/build/nestjs/dto/index.js +4 -0
- package/build/nestjs/dto/index.js.map +1 -0
- package/build/sdk/setupAyniFlowProtocols.d.ts +10 -0
- package/build/sdk/setupAyniFlowProtocols.js +36 -0
- package/build/sdk/setupAyniFlowProtocols.js.map +1 -0
- package/build/types.d.ts +33 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/package.json +58 -3
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
11
|
+
import { IsISO8601, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
12
|
+
export class SentMessageDto {
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
ApiProperty({ description: 'Identifier of the sent message', example: 'a1b2c3d4-5678-90ab-cdef-1234567890ab' }),
|
|
16
|
+
__metadata("design:type", String)
|
|
17
|
+
], SentMessageDto.prototype, "id", void 0);
|
|
18
|
+
/** Fields every carrier `request` body shares. */
|
|
19
|
+
export class CarrierRequestBaseDto {
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
ApiProperty({ description: 'Connection to send the request on', example: 'conn-1234-5678' }),
|
|
23
|
+
IsString(),
|
|
24
|
+
IsNotEmpty(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CarrierRequestBaseDto.prototype, "connectionId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
ApiPropertyOptional({
|
|
29
|
+
description: 'The flow the request runs inside (the id of the ayni-flow open), set as ~thread.pthid',
|
|
30
|
+
example: 'f1ow-7c2e',
|
|
31
|
+
}),
|
|
32
|
+
IsOptional(),
|
|
33
|
+
IsString(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CarrierRequestBaseDto.prototype, "flowId", void 0);
|
|
36
|
+
export class AttestationDto {
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
ApiProperty({ enum: ['biometric', 'passcode', 'none'] }),
|
|
40
|
+
IsString(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AttestationDto.prototype, "method", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
ApiProperty({ description: 'When the person authenticated, ISO 8601', example: '2026-10-24T15:21:03Z' }),
|
|
45
|
+
IsISO8601(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AttestationDto.prototype, "at", void 0);
|
|
48
|
+
/** One carrier exchange as the Admin API returns it and as the webhook events carry it. */
|
|
49
|
+
export class CarrierExchangeDto {
|
|
50
|
+
}
|
|
51
|
+
__decorate([
|
|
52
|
+
ApiProperty({ description: 'The request id, thread of the exchange' }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], CarrierExchangeDto.prototype, "threadId", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
ApiPropertyOptional({ description: 'The flow id when the exchange runs inside an ayni-flow' }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CarrierExchangeDto.prototype, "flowId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
ApiProperty(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], CarrierExchangeDto.prototype, "connectionId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
ApiProperty({ description: 'The role this agent plays in the exchange' }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CarrierExchangeDto.prototype, "role", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
ApiProperty({
|
|
69
|
+
description: 'request-sent | request-received | response-sent | response-received | answered | failed',
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], CarrierExchangeDto.prototype, "state", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
ApiProperty({ description: 'The request body as sent or received' }),
|
|
75
|
+
__metadata("design:type", Object)
|
|
76
|
+
], CarrierExchangeDto.prototype, "request", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
ApiPropertyOptional({ description: 'The response body as sent or received' }),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], CarrierExchangeDto.prototype, "response", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
ApiPropertyOptional({ description: 'With state failed: why (malformed, declined, ...)' }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], CarrierExchangeDto.prototype, "errorCode", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
ApiPropertyOptional(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], CarrierExchangeDto.prototype, "errorDescription", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
ApiProperty(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], CarrierExchangeDto.prototype, "createdAt", void 0);
|
|
93
|
+
export function toCarrierExchangeDto(record) {
|
|
94
|
+
return {
|
|
95
|
+
threadId: record.threadId,
|
|
96
|
+
flowId: record.parentThreadId,
|
|
97
|
+
connectionId: record.connectionId,
|
|
98
|
+
role: record.role,
|
|
99
|
+
state: record.state,
|
|
100
|
+
request: record.request,
|
|
101
|
+
response: record.response,
|
|
102
|
+
errorCode: record.errorCode,
|
|
103
|
+
errorDescription: record.errorDescription,
|
|
104
|
+
createdAt: record.createdAt.toISOString(),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=common.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.dto.js","sourceRoot":"","sources":["../../../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;QACX,WAAW,EAAE,yFAAyF;KACvG,CAAC;;iDACY;AAGd;IADC,WAAW,CAAC,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;;mDACpC;AAGjC;IADC,mBAAmB,CAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;;oDAC5C;AAGlC;IADC,mBAAmB,CAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;;qDACxE;AAGlB;IADC,mBAAmB,EAAE;;4DACG;AAGzB;IADC,WAAW,EAAE;;qDACI;AAgBpB,MAAM,UAAU,oBAAoB,CAAC,MAAyB;IAC5D,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,MAAM,CAAC,cAAc;QAC7B,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,OAAO,EAAE,MAAM,CAAC,OAAkC;QAClD,QAAQ,EAAE,MAAM,CAAC,QAA+C;QAChE,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE;KAC1C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nestjs/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AyniFlowModules, AyniFlowPluginOptions } from '../types.js';
|
|
2
|
+
export interface AyniFlowSdkPlugin {
|
|
3
|
+
modules: AyniFlowModules;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The Credo modules of the Ayni Flow Profile 1.0 with the roles of its §3 for one side: a service discloses
|
|
7
|
+
* `requester` (authorize, confirm, sign-tx), `agent` (link-session, session-grant), `sender` (notify), `issuer`
|
|
8
|
+
* (reissue) and `service` (ayni-flow); a holder the opposite roles. Must be used together with `setupBaseDidComm()`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function setupAyniFlowProtocols(options?: AyniFlowPluginOptions): AyniFlowSdkPlugin;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AuthorizeModule, AuthorizeRole } from '@ayni.org/credo-ts-didcomm-authorize';
|
|
2
|
+
import { AyniFlowModule, AyniFlowRole } from '@ayni.org/credo-ts-didcomm-ayni-flow';
|
|
3
|
+
import { ConfirmModule, ConfirmRole } from '@ayni.org/credo-ts-didcomm-confirm';
|
|
4
|
+
import { LinkSessionModule, LinkSessionRole } from '@ayni.org/credo-ts-didcomm-link-session';
|
|
5
|
+
import { NotifyModule, NotifyRole } from '@ayni.org/credo-ts-didcomm-notify';
|
|
6
|
+
import { ReissueModule, ReissueRole } from '@ayni.org/credo-ts-didcomm-reissue';
|
|
7
|
+
import { SessionGrantModule, SessionGrantRole } from '@ayni.org/credo-ts-didcomm-session-grant';
|
|
8
|
+
import { SignTxModule, SignTxRole } from '@ayni.org/credo-ts-didcomm-sign-tx';
|
|
9
|
+
/**
|
|
10
|
+
* The Credo modules of the Ayni Flow Profile 1.0 with the roles of its §3 for one side: a service discloses
|
|
11
|
+
* `requester` (authorize, confirm, sign-tx), `agent` (link-session, session-grant), `sender` (notify), `issuer`
|
|
12
|
+
* (reissue) and `service` (ayni-flow); a holder the opposite roles. Must be used together with `setupBaseDidComm()`.
|
|
13
|
+
*/
|
|
14
|
+
export function setupAyniFlowProtocols(options = {}) {
|
|
15
|
+
const service = (options.side ?? 'service') === 'service';
|
|
16
|
+
return {
|
|
17
|
+
modules: {
|
|
18
|
+
ayniFlow: new AyniFlowModule({
|
|
19
|
+
role: service ? AyniFlowRole.Service : AyniFlowRole.Holder,
|
|
20
|
+
supportedKinds: options.supportedKinds,
|
|
21
|
+
maxPendingFlows: options.maxPendingFlows,
|
|
22
|
+
expiryCheckIntervalMs: options.expiryCheckIntervalMs ?? (service ? 60000 : 0),
|
|
23
|
+
}),
|
|
24
|
+
authorize: new AuthorizeModule({ roles: [service ? AuthorizeRole.Requester : AuthorizeRole.Approver] }),
|
|
25
|
+
confirm: new ConfirmModule({ roles: [service ? ConfirmRole.Requester : ConfirmRole.Confirmer] }),
|
|
26
|
+
linkSession: new LinkSessionModule({ roles: [service ? LinkSessionRole.Agent : LinkSessionRole.Holder] }),
|
|
27
|
+
sessionGrant: new SessionGrantModule({
|
|
28
|
+
roles: [service ? SessionGrantRole.Agent : SessionGrantRole.Requester],
|
|
29
|
+
}),
|
|
30
|
+
signTx: new SignTxModule({ roles: [service ? SignTxRole.Requester : SignTxRole.Signer] }),
|
|
31
|
+
notify: new NotifyModule({ roles: [service ? NotifyRole.Sender : NotifyRole.Receiver] }),
|
|
32
|
+
reissue: new ReissueModule({ roles: [service ? ReissueRole.Issuer : ReissueRole.Requester] }),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=setupAyniFlowProtocols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupAyniFlowProtocols.js","sourceRoot":"","sources":["../../src/sdk/setupAyniFlowProtocols.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC5F,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO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gBAAgB,CAAC,SAAS,CAAC;aACvE,CAAC;YACF,MAAM,EAAE,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACzF,MAAM,EAAE,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxF,OAAO,EAAE,IAAI,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;SAC9F;KACF,CAAA;AACH,CAAC"}
|
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AuthorizeModule } from '@ayni.org/credo-ts-didcomm-authorize';
|
|
2
|
+
import type { AyniFlowModule } from '@ayni.org/credo-ts-didcomm-ayni-flow';
|
|
3
|
+
import type { ConfirmModule } from '@ayni.org/credo-ts-didcomm-confirm';
|
|
4
|
+
import type { LinkSessionModule } from '@ayni.org/credo-ts-didcomm-link-session';
|
|
5
|
+
import type { NotifyModule } from '@ayni.org/credo-ts-didcomm-notify';
|
|
6
|
+
import type { ReissueModule } from '@ayni.org/credo-ts-didcomm-reissue';
|
|
7
|
+
import type { SessionGrantModule } from '@ayni.org/credo-ts-didcomm-session-grant';
|
|
8
|
+
import type { SignTxModule } from '@ayni.org/credo-ts-didcomm-sign-tx';
|
|
9
|
+
import type { BaseAgentModules } from '@verana-labs/vs-agent-sdk';
|
|
10
|
+
/** The Credo modules this plugin adds to a VS Agent, by the names the Admin API controllers resolve them under. */
|
|
11
|
+
export type AyniFlowModules = {
|
|
12
|
+
ayniFlow: AyniFlowModule;
|
|
13
|
+
authorize: AuthorizeModule;
|
|
14
|
+
confirm: ConfirmModule;
|
|
15
|
+
linkSession: LinkSessionModule;
|
|
16
|
+
sessionGrant: SessionGrantModule;
|
|
17
|
+
signTx: SignTxModule;
|
|
18
|
+
notify: NotifyModule;
|
|
19
|
+
reissue: ReissueModule;
|
|
20
|
+
};
|
|
21
|
+
export type AyniFlowAgentModules = BaseAgentModules & AyniFlowModules;
|
|
22
|
+
/** The side of the flow profile this VS Agent plays (§1): a Verifiable Service, or a holder for tests and tooling. */
|
|
23
|
+
export type AyniFlowSide = 'service' | 'holder';
|
|
24
|
+
export interface AyniFlowPluginOptions {
|
|
25
|
+
/** Defaults to `service`: a Verifiable Service that opens flows for the Ayni app. */
|
|
26
|
+
side?: AyniFlowSide;
|
|
27
|
+
/** Kinds this agent accepts in an `open`; defaults per side (see `AyniFlowModuleConfigOptions.supportedKinds`). */
|
|
28
|
+
supportedKinds?: string[];
|
|
29
|
+
/** Pending flows per connection beyond which an `open` is refused; defaults per side. */
|
|
30
|
+
maxPendingFlows?: number;
|
|
31
|
+
/** Interval of the local expiry sweep in milliseconds; defaults to 60 000 on a service, 0 (off) on a holder. */
|
|
32
|
+
expiryCheckIntervalMs?: number;
|
|
33
|
+
}
|
package/build/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayni.org/vs-agent-plugin-ayni-flow",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"types": "./build/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./build/index.d.ts",
|
|
10
|
+
"default": "./build/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"build"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
|
+
"description": "VS Agent plugin for the Ayni Flow Profile 1.0: the ayni-flow envelope and its seven carrier protocols as Credo modules, Admin API v2 routes and webhook events (CC-VSA-005, CC-VSA-007, CC-VSA-010)",
|
|
21
|
+
"homepage": "https://github.com/2060-io/credo-ts-ayni-flow/tree/main/packages/vs-agent-plugin",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/2060-io/credo-ts-ayni-flow",
|
|
25
|
+
"directory": "packages/vs-agent-plugin"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@ayni.org/credo-ts-didcomm-authorize": "^0.1.2",
|
|
29
|
+
"@ayni.org/credo-ts-didcomm-ayni-flow": "^0.1.2",
|
|
30
|
+
"@ayni.org/credo-ts-didcomm-confirm": "^0.1.2",
|
|
31
|
+
"@ayni.org/credo-ts-didcomm-link-session": "^0.1.2",
|
|
32
|
+
"@ayni.org/credo-ts-didcomm-notify": "^0.1.2",
|
|
33
|
+
"@ayni.org/credo-ts-didcomm-reissue": "^0.1.2",
|
|
34
|
+
"@ayni.org/credo-ts-didcomm-session-grant": "^0.1.2",
|
|
35
|
+
"@ayni.org/credo-ts-didcomm-sign-tx": "^0.1.2"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@credo-ts/core": ">=0.8.0-pr-2704-20261026000000 <0.9.0",
|
|
39
|
+
"@credo-ts/didcomm": ">=0.8.0-pr-2704-20261026000000 <0.9.0",
|
|
40
|
+
"@nestjs/common": "^10.0.0",
|
|
41
|
+
"@nestjs/swagger": "^8.0.0",
|
|
42
|
+
"@verana-labs/vs-agent-sdk": ">=2.0.0-dev.100",
|
|
43
|
+
"class-transformer": "^0.5.1",
|
|
44
|
+
"class-validator": "^0.14.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@credo-ts/core": "0.8.0-pr-2704-20261029165313",
|
|
48
|
+
"@credo-ts/didcomm": "0.8.0-pr-2704-20261029165313",
|
|
49
|
+
"@nestjs/common": "^10.4.0",
|
|
50
|
+
"@nestjs/swagger": "^8.1.0",
|
|
51
|
+
"@verana-labs/vs-agent-sdk": "2.0.0-dev.102",
|
|
52
|
+
"reflect-metadata": "^0.2.2",
|
|
53
|
+
"class-transformer": "0.5.1",
|
|
54
|
+
"class-validator": "^0.14.3"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "rimraf ./build && tsc -p tsconfig.build.json",
|
|
58
|
+
"clean": "rimraf ./build",
|
|
59
|
+
"compile": "tsc -p tsconfig.build.json"
|
|
60
|
+
}
|
|
6
61
|
}
|