@verana-labs/vs-agent-client 1.6.0

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.
Files changed (45) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +132 -0
  3. package/build/ApiClient.d.ts +41 -0
  4. package/build/ApiClient.js +48 -0
  5. package/build/ApiClient.js.map +1 -0
  6. package/build/handlers/ExpressEventHandler.d.ts +71 -0
  7. package/build/handlers/ExpressEventHandler.js +102 -0
  8. package/build/handlers/ExpressEventHandler.js.map +1 -0
  9. package/build/handlers/index.d.ts +1 -0
  10. package/build/handlers/index.js +18 -0
  11. package/build/handlers/index.js.map +1 -0
  12. package/build/index.d.ts +5 -0
  13. package/build/index.js +22 -0
  14. package/build/index.js.map +1 -0
  15. package/build/services/CredentialTypeService.d.ts +19 -0
  16. package/build/services/CredentialTypeService.js +66 -0
  17. package/build/services/CredentialTypeService.js.map +1 -0
  18. package/build/services/InvitationService.d.ts +16 -0
  19. package/build/services/InvitationService.js +56 -0
  20. package/build/services/InvitationService.js.map +1 -0
  21. package/build/services/MessageService.d.ts +18 -0
  22. package/build/services/MessageService.js +57 -0
  23. package/build/services/MessageService.js.map +1 -0
  24. package/build/services/RevocationRegistryService.d.ts +18 -0
  25. package/build/services/RevocationRegistryService.js +58 -0
  26. package/build/services/RevocationRegistryService.js.map +1 -0
  27. package/build/services/TrustCredentialService.d.ts +33 -0
  28. package/build/services/TrustCredentialService.js +75 -0
  29. package/build/services/TrustCredentialService.js.map +1 -0
  30. package/build/services/index.d.ts +5 -0
  31. package/build/services/index.js +22 -0
  32. package/build/services/index.js.map +1 -0
  33. package/build/types/enums.d.ts +3 -0
  34. package/build/types/enums.js +9 -0
  35. package/build/types/enums.js.map +1 -0
  36. package/build/types/index.d.ts +1 -0
  37. package/build/types/index.js +18 -0
  38. package/build/types/index.js.map +1 -0
  39. package/build/utils/HttpUtils.d.ts +4 -0
  40. package/build/utils/HttpUtils.js +18 -0
  41. package/build/utils/HttpUtils.js.map +1 -0
  42. package/build/utils/index.d.ts +1 -0
  43. package/build/utils/index.js +18 -0
  44. package/build/utils/index.js.map +1 -0
  45. package/package.json +39 -0
@@ -0,0 +1,19 @@
1
+ import { CredentialTypeInfo, CredentialTypeResult, ImportCredentialTypeOptions } from '@verana-labs/vs-agent-model';
2
+ import { ApiVersion } from '../types/enums';
3
+ /**
4
+ * `CredentialTypeService` class for managing credential types and interacting with
5
+ * the available endpoints related to credential types in the Agent Service.
6
+ *
7
+ * This class provides methods for querying, creating, and managing credential types.
8
+ * For a list of available endpoints and functionality, refer to the methods within this class.
9
+ */
10
+ export declare class CredentialTypeService {
11
+ private baseURL;
12
+ private version;
13
+ private url;
14
+ constructor(baseURL: string, version: ApiVersion);
15
+ import(importData: ImportCredentialTypeOptions): Promise<CredentialTypeInfo>;
16
+ export(credentialTypeId: string): Promise<unknown>;
17
+ create(credentialType: CredentialTypeInfo): Promise<CredentialTypeInfo>;
18
+ getAll(): Promise<CredentialTypeResult[]>;
19
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // src/services/CredentialTypeService.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CredentialTypeService = void 0;
5
+ const tslog_1 = require("tslog");
6
+ const logger = new tslog_1.Logger({
7
+ name: 'CredentialTypeService',
8
+ type: 'pretty',
9
+ prettyLogTemplate: '{{logLevelName}} [{{name}}]: ',
10
+ });
11
+ /**
12
+ * `CredentialTypeService` class for managing credential types and interacting with
13
+ * the available endpoints related to credential types in the Agent Service.
14
+ *
15
+ * This class provides methods for querying, creating, and managing credential types.
16
+ * For a list of available endpoints and functionality, refer to the methods within this class.
17
+ */
18
+ class CredentialTypeService {
19
+ constructor(baseURL, version) {
20
+ this.baseURL = baseURL;
21
+ this.version = version;
22
+ this.url = `${this.baseURL.replace(/\/$/, '')}/${this.version}/credential-types`;
23
+ }
24
+ async import(importData) {
25
+ logger.info(`Importing credential type ${importData.id}`);
26
+ const response = await fetch(`${this.url}/import`, {
27
+ method: 'POST',
28
+ body: JSON.stringify(importData),
29
+ headers: { accept: 'application/json', 'Content-Type': 'application/json' },
30
+ });
31
+ if (!response.ok)
32
+ throw new Error(`Cannot import credential type: status ${response.status}`);
33
+ return (await response.json());
34
+ }
35
+ async export(credentialTypeId) {
36
+ logger.info(`Exporting credential type ${credentialTypeId}`);
37
+ const response = await fetch(`${this.url}/export/${encodeURIComponent(credentialTypeId)}`, {
38
+ method: 'GET',
39
+ headers: { accept: 'application/json' },
40
+ });
41
+ if (!response.ok)
42
+ throw new Error(`Cannot export credential type: status ${response.status}}`);
43
+ return await response.json();
44
+ }
45
+ async create(credentialType) {
46
+ const response = await fetch(`${this.url}`, {
47
+ method: 'POST',
48
+ headers: { 'Content-Type': 'application/json' },
49
+ body: JSON.stringify(credentialType),
50
+ });
51
+ return (await response.json());
52
+ }
53
+ async getAll() {
54
+ const response = await fetch(this.url, {
55
+ method: 'GET',
56
+ headers: { accept: 'application/json', 'Content-Type': 'application/json' },
57
+ });
58
+ const types = await response.json();
59
+ if (!Array.isArray(types)) {
60
+ throw new Error('Invalid response from VS Agent');
61
+ }
62
+ return types.map(value => value);
63
+ }
64
+ }
65
+ exports.CredentialTypeService = CredentialTypeService;
66
+ //# sourceMappingURL=CredentialTypeService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialTypeService.js","sourceRoot":"","sources":["../../src/services/CredentialTypeService.ts"],"names":[],"mappings":";AAAA,wCAAwC;;;AAOxC,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAa,qBAAqB;IAGhC,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,mBAAmB,CAAA;IAClF,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,UAAuC;QACzD,MAAM,CAAC,IAAI,CAAC,6BAA6B,UAAU,CAAC,EAAE,EAAE,CAAC,CAAA;QACzD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,EAAE;YACjD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;YAChC,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAC5E,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAE7F,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAuB,CAAA;IACtD,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,gBAAwB;QAC1C,MAAM,CAAC,IAAI,CAAC,6BAA6B,gBAAgB,EAAE,CAAC,CAAA;QAC5D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,WAAW,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,EAAE;YACzF,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;SACxC,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAA;QAE9F,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC9B,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,cAAkC;QACpD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE;YAC1C,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;SACrC,CAAC,CAAA;QACF,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAuB,CAAA;IACtD,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACrC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAC5E,CAAC,CAAA;QAEF,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QAEnC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACnD,CAAC;QAED,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAA6B,CAAC,CAAA;IAC1D,CAAC;CACF;AAxDD,sDAwDC"}
@@ -0,0 +1,16 @@
1
+ import { CreateCredentialOfferOptions, CreateCredentialOfferResult, CreateInvitationResult, CreatePresentationRequestOptions, CreatePresentationRequestResult } from '@verana-labs/vs-agent-model';
2
+ import { ApiVersion } from '../types/enums';
3
+ /**
4
+ * `InvitationService` class for interacting with the available endpoints related to invitations.
5
+ *
6
+ * For a list of available endpoints and functionality, refer to the methods within this class.
7
+ */
8
+ export declare class InvitationService {
9
+ private baseURL;
10
+ private version;
11
+ private url;
12
+ constructor(baseURL: string, version: ApiVersion);
13
+ create(): Promise<CreateInvitationResult>;
14
+ createPresentationRequest(options: CreatePresentationRequestOptions): Promise<CreatePresentationRequestResult>;
15
+ createCredentialOffer(options: CreateCredentialOfferOptions): Promise<CreateCredentialOfferResult>;
16
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ // src/services/CredentialTypeService.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.InvitationService = void 0;
5
+ const tslog_1 = require("tslog");
6
+ const logger = new tslog_1.Logger({
7
+ name: 'InvitationService',
8
+ type: 'pretty',
9
+ prettyLogTemplate: '{{logLevelName}} [{{name}}]: ',
10
+ });
11
+ /**
12
+ * `InvitationService` class for interacting with the available endpoints related to invitations.
13
+ *
14
+ * For a list of available endpoints and functionality, refer to the methods within this class.
15
+ */
16
+ class InvitationService {
17
+ constructor(baseURL, version) {
18
+ this.baseURL = baseURL;
19
+ this.version = version;
20
+ this.url = `${this.baseURL.replace(/\/$/, '')}/${this.version}/invitation`;
21
+ }
22
+ async create() {
23
+ logger.debug('create()');
24
+ const response = await fetch(`${this.url}`, {
25
+ method: 'GET',
26
+ headers: { accept: 'application/json', 'Content-Type': 'application/json' },
27
+ });
28
+ if (!response.ok)
29
+ throw new Error(`Cannot create credential offer: status ${response.status}`);
30
+ return (await response.json());
31
+ }
32
+ async createPresentationRequest(options) {
33
+ logger.info(`createPresentationRequest(): ${JSON.stringify(options)}`);
34
+ const response = await fetch(`${this.url}/presentation-request`, {
35
+ method: 'POST',
36
+ body: JSON.stringify(options),
37
+ headers: { accept: 'application/json', 'Content-Type': 'application/json' },
38
+ });
39
+ if (!response.ok)
40
+ throw new Error(`Cannot create presentation request: status ${response.status}`);
41
+ return (await response.json());
42
+ }
43
+ async createCredentialOffer(options) {
44
+ logger.info(`createCredentialOffer(): ${JSON.stringify(options)}`);
45
+ const response = await fetch(`${this.url}/credential-offer`, {
46
+ method: 'POST',
47
+ body: JSON.stringify(options),
48
+ headers: { accept: 'application/json', 'Content-Type': 'application/json' },
49
+ });
50
+ if (!response.ok)
51
+ throw new Error(`Cannot create credential offer: status ${response.status}`);
52
+ return (await response.json());
53
+ }
54
+ }
55
+ exports.InvitationService = InvitationService;
56
+ //# sourceMappingURL=InvitationService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvitationService.js","sourceRoot":"","sources":["../../src/services/InvitationService.ts"],"names":[],"mappings":";AAAA,wCAAwC;;;AASxC,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;GAIG;AACH,MAAa,iBAAiB;IAG5B,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,aAAa,CAAA;IAC5E,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QACxB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE;YAC1C,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAC5E,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAE9F,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA2B,CAAA;IAC1D,CAAC;IAEM,KAAK,CAAC,yBAAyB,CACpC,OAAyC;QAEzC,MAAM,CAAC,IAAI,CAAC,gCAAgC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;QAEtE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,uBAAuB,EAAE;YAC/D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC7B,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAC5E,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAElG,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoC,CAAA;IACnE,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAChC,OAAqC;QAErC,MAAM,CAAC,IAAI,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;QAElE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,mBAAmB,EAAE;YAC3D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC7B,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAC5E,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QAE9F,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAgC,CAAA;IAC/D,CAAC;CACF;AAlDD,8CAkDC"}
@@ -0,0 +1,18 @@
1
+ import { BaseMessage } from '@verana-labs/vs-agent-model';
2
+ import { ApiVersion } from '../types/enums';
3
+ /**
4
+ * `MessageService` class for handling message-related endpoints in the Agent Service.
5
+ * This class is based on the `BaseMessage` from the `@verana-labs/vs-agent-model` library.
6
+ *
7
+ * The methods in this class allow for sending messages and managing related tasks.
8
+ * For more details on the `BaseMessage` structure and usage, refer to the `@verana-labs/vs-agent-model` library.
9
+ */
10
+ export declare class MessageService {
11
+ private baseURL;
12
+ private version;
13
+ private url;
14
+ constructor(baseURL: string, version: ApiVersion);
15
+ send(message: BaseMessage): Promise<{
16
+ id: string;
17
+ }>;
18
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ // src/services/MessageService.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MessageService = void 0;
5
+ const tslog_1 = require("tslog");
6
+ const logger = new tslog_1.Logger({
7
+ name: 'MessageService',
8
+ type: 'pretty',
9
+ prettyLogTemplate: '{{logLevelName}} [{{name}}]: ',
10
+ });
11
+ /**
12
+ * `MessageService` class for handling message-related endpoints in the Agent Service.
13
+ * This class is based on the `BaseMessage` from the `@verana-labs/vs-agent-model` library.
14
+ *
15
+ * The methods in this class allow for sending messages and managing related tasks.
16
+ * For more details on the `BaseMessage` structure and usage, refer to the `@verana-labs/vs-agent-model` library.
17
+ */
18
+ class MessageService {
19
+ constructor(baseURL, version) {
20
+ this.baseURL = baseURL;
21
+ this.version = version;
22
+ this.url = `${this.baseURL}/${this.version}/message`;
23
+ }
24
+ async send(message) {
25
+ try {
26
+ // Log the message content before sending
27
+ logger.info(`submitMessage: ${JSON.stringify(message)}`);
28
+ // Send the message via POST request
29
+ const response = await fetch(this.url, {
30
+ method: 'POST',
31
+ headers: { 'Content-Type': 'application/json' },
32
+ body: JSON.stringify(message),
33
+ });
34
+ // Log the full response text
35
+ const responseText = await response.text();
36
+ logger.info(`response: ${responseText}`);
37
+ let jsonResponse;
38
+ try {
39
+ jsonResponse = JSON.parse(responseText);
40
+ }
41
+ catch (e) {
42
+ throw new Error('Invalid JSON response');
43
+ }
44
+ if (!jsonResponse || typeof jsonResponse.id !== 'string') {
45
+ throw new Error('Invalid response structure: Missing or invalid "id"');
46
+ }
47
+ // Parse and return the JSON response as expected
48
+ return jsonResponse;
49
+ }
50
+ catch (error) {
51
+ logger.error(`Failed to send message: ${error}`);
52
+ throw new Error('Failed to send message');
53
+ }
54
+ }
55
+ }
56
+ exports.MessageService = MessageService;
57
+ //# sourceMappingURL=MessageService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageService.js","sourceRoot":"","sources":["../../src/services/MessageService.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;AAGjC,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAa,cAAc;IAGzB,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,UAAU,CAAA;IACtD,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,OAAoB;QACpC,IAAI,CAAC;YACH,yCAAyC;YACzC,MAAM,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YAExD,oCAAoC;YACpC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;gBACrC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;gBAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;aAC9B,CAAC,CAAA;YAEF,6BAA6B;YAC7B,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YAC1C,MAAM,CAAC,IAAI,CAAC,aAAa,YAAY,EAAE,CAAC,CAAA;YAExC,IAAI,YAAY,CAAA;YAChB,IAAI,CAAC;gBACH,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;YACzC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAA;YAC1C,CAAC;YAED,IAAI,CAAC,YAAY,IAAI,OAAO,YAAY,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;gBACzD,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;YACxE,CAAC;YAED,iDAAiD;YACjD,OAAO,YAA8B,CAAA;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAAA;YAChD,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC;CACF;AA5CD,wCA4CC"}
@@ -0,0 +1,18 @@
1
+ import { RevocationRegistryInfo } from '@verana-labs/vs-agent-model';
2
+ import { ApiVersion } from '../types/enums';
3
+ /**
4
+ * `RevocationRegistryService` class for managing credential types and interacting with
5
+ * the available endpoints related to credential types in the Agent Service.
6
+ *
7
+ * This class provides methods for querying, creating, and managing revocation registry on credential types.
8
+ * For a list of available endpoints and functionality, refer to the methods within this class.
9
+ */
10
+ export declare class RevocationRegistryService {
11
+ private baseURL;
12
+ private version;
13
+ private url;
14
+ constructor(baseURL: string, version: ApiVersion);
15
+ create(options: RevocationRegistryInfo): Promise<string | undefined>;
16
+ get(credentialDefinitionId: string): Promise<string[]>;
17
+ getAll(): Promise<string[]>;
18
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ // src/services/RevocationRegistryService.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RevocationRegistryService = void 0;
5
+ const tslog_1 = require("tslog");
6
+ const logger = new tslog_1.Logger({
7
+ name: 'RevocationRegistryService',
8
+ type: 'pretty',
9
+ prettyLogTemplate: '{{logLevelName}} [{{name}}]: ',
10
+ });
11
+ /**
12
+ * `RevocationRegistryService` class for managing credential types and interacting with
13
+ * the available endpoints related to credential types in the Agent Service.
14
+ *
15
+ * This class provides methods for querying, creating, and managing revocation registry on credential types.
16
+ * For a list of available endpoints and functionality, refer to the methods within this class.
17
+ */
18
+ class RevocationRegistryService {
19
+ constructor(baseURL, version) {
20
+ this.baseURL = baseURL;
21
+ this.version = version;
22
+ this.url = `${this.baseURL.replace(/\/$/, '')}/${this.version}/credential-types`;
23
+ }
24
+ async create(options) {
25
+ const response = await fetch(`${this.url}/revocationRegistry`, {
26
+ method: 'POST',
27
+ headers: { 'Content-Type': 'application/json' },
28
+ body: JSON.stringify(options),
29
+ });
30
+ if (!response.ok) {
31
+ logger.error(`Failed to create revocation registry`);
32
+ return undefined;
33
+ }
34
+ return await response.text();
35
+ }
36
+ async get(credentialDefinitionId) {
37
+ const response = await fetch(`${this.url}/revocationRegistry?credentialDefinitionId=${encodeURIComponent(credentialDefinitionId)}`, {
38
+ method: 'GET',
39
+ headers: { 'Content-Type': 'application/json' },
40
+ });
41
+ if (!response.ok) {
42
+ throw new Error(`Failed to fetch revocation definitions: ${response.statusText}`);
43
+ }
44
+ return (await response.json());
45
+ }
46
+ async getAll() {
47
+ const response = await fetch(`${this.url}/revocationRegistry`, {
48
+ method: 'GET',
49
+ headers: { 'Content-Type': 'application/json' },
50
+ });
51
+ if (!response.ok) {
52
+ throw new Error(`Failed to fetch revocation registries: ${response.statusText}`);
53
+ }
54
+ return (await response.json());
55
+ }
56
+ }
57
+ exports.RevocationRegistryService = RevocationRegistryService;
58
+ //# sourceMappingURL=RevocationRegistryService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RevocationRegistryService.js","sourceRoot":"","sources":["../../src/services/RevocationRegistryService.ts"],"names":[],"mappings":";AAAA,4CAA4C;;;AAG5C,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAa,yBAAyB;IAGpC,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,mBAAmB,CAAA;IAClF,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,OAA+B;QACjD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,qBAAqB,EAAE;YAC7D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAC9B,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAA;YACpD,OAAO,SAAS,CAAA;QAClB,CAAC;QAED,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC9B,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,sBAA8B;QAC7C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,IAAI,CAAC,GAAG,8CAA8C,kBAAkB,CAAC,sBAAsB,CAAC,EAAE,EACrG;YACE,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAChD,CACF,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,2CAA2C,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAA;QACnF,CAAC;QAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAa,CAAA;IAC5C,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,qBAAqB,EAAE;YAC7D,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAChD,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,0CAA0C,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAA;QAClF,CAAC;QAED,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAa,CAAA;IAC5C,CAAC;CACF;AArDD,8DAqDC"}
@@ -0,0 +1,33 @@
1
+ import { CredentialIssuanceRequest, CredentialIssuanceResponse } from '@verana-labs/vs-agent-model';
2
+ import { ApiVersion } from '../types/enums';
3
+ /**
4
+ * Service responsible for managing verifiable credential issuance and revocation
5
+ * through the Trust Credential API.
6
+ *
7
+ * This service interacts with the Verifiable Trust (VT) endpoint of the agent API
8
+ * to issue credentials based on a given JSON schema and claim values.
9
+ */
10
+ export declare class TrustCredentialService {
11
+ private baseURL;
12
+ private version;
13
+ private url;
14
+ constructor(baseURL: string, version: ApiVersion);
15
+ /**
16
+ * Issues a verifiable credential (either W3C JSON-LD or Anoncreds) by sending
17
+ * a POST request to the `/issue-credential` endpoint of the Trust Credential API.
18
+ *
19
+ * This method supports both `jsonld` and `anoncreds` credential formats.
20
+ * It requires a JSON Schema credential definition and a set of claims,
21
+ * optionally linked to a DID.
22
+ *
23
+ * @param type - The credential format. Accepted values: `'jsonld' | 'anoncreds'`.
24
+ * @param jsonSchemaCredentialId - The URL of the credential JSON schema definition.
25
+ * @param claims - A JSON object containing the credential claims.
26
+ * @param did - (Optional) A decentralized identifier (DID) associated with the holder.
27
+ *
28
+ * @returns A `CredentialIssuanceResponse` containing either the DIDComm invitation URL
29
+ * or the issued verifiable credential, depending on the credential type.
30
+ */
31
+ issuance({ format, jsonSchemaCredentialId, claims, did, }: CredentialIssuanceRequest): Promise<CredentialIssuanceResponse>;
32
+ revoke(): Promise<void>;
33
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ // src/services/TrustCredentialService.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TrustCredentialService = void 0;
5
+ const tslog_1 = require("tslog");
6
+ const logger = new tslog_1.Logger({
7
+ name: 'CredentialTypeService',
8
+ type: 'pretty',
9
+ prettyLogTemplate: '{{logLevelName}} [{{name}}]: ',
10
+ });
11
+ /**
12
+ * Service responsible for managing verifiable credential issuance and revocation
13
+ * through the Trust Credential API.
14
+ *
15
+ * This service interacts with the Verifiable Trust (VT) endpoint of the agent API
16
+ * to issue credentials based on a given JSON schema and claim values.
17
+ */
18
+ class TrustCredentialService {
19
+ constructor(baseURL, version) {
20
+ this.baseURL = baseURL;
21
+ this.version = version;
22
+ this.url = `${this.baseURL.replace(/\/$/, '')}/${this.version}/vt`;
23
+ }
24
+ /**
25
+ * Issues a verifiable credential (either W3C JSON-LD or Anoncreds) by sending
26
+ * a POST request to the `/issue-credential` endpoint of the Trust Credential API.
27
+ *
28
+ * This method supports both `jsonld` and `anoncreds` credential formats.
29
+ * It requires a JSON Schema credential definition and a set of claims,
30
+ * optionally linked to a DID.
31
+ *
32
+ * @param type - The credential format. Accepted values: `'jsonld' | 'anoncreds'`.
33
+ * @param jsonSchemaCredentialId - The URL of the credential JSON schema definition.
34
+ * @param claims - A JSON object containing the credential claims.
35
+ * @param did - (Optional) A decentralized identifier (DID) associated with the holder.
36
+ *
37
+ * @returns A `CredentialIssuanceResponse` containing either the DIDComm invitation URL
38
+ * or the issued verifiable credential, depending on the credential type.
39
+ */
40
+ async issuance({ format, jsonSchemaCredentialId, claims, did, }) {
41
+ try {
42
+ logger.info(`issue credential with schema: ${jsonSchemaCredentialId}`);
43
+ const response = await fetch(`${this.url}/issue-credential`, {
44
+ method: 'POST',
45
+ headers: { 'Content-Type': 'application/json' },
46
+ body: JSON.stringify({
47
+ format,
48
+ jsonSchemaCredentialId,
49
+ claims,
50
+ did,
51
+ }),
52
+ });
53
+ if (!response.ok) {
54
+ const responseText = await response.text();
55
+ throw new Error(`Failed to issue credential.\n` +
56
+ `Status: ${response.status} ${response.statusText}\n` +
57
+ `Response body: ${responseText || 'No response body returned'}`);
58
+ }
59
+ const data = (await response.json());
60
+ logger.info('Credential issued successfully.');
61
+ return data;
62
+ }
63
+ catch (error) {
64
+ logger.error(`Failed to send message: ${error}`);
65
+ throw new Error('Failed to send message');
66
+ }
67
+ }
68
+ // TODO: Implement revocation when the revocation method is supported.
69
+ // Update the NestJS client once the backend endpoint is available.
70
+ async revoke() {
71
+ throw new Error('This method is not implemented yet');
72
+ }
73
+ }
74
+ exports.TrustCredentialService = TrustCredentialService;
75
+ //# sourceMappingURL=TrustCredentialService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrustCredentialService.js","sourceRoot":"","sources":["../../src/services/TrustCredentialService.ts"],"names":[],"mappings":";AAAA,yCAAyC;;;AAGzC,iCAA8B;AAI9B,MAAM,MAAM,GAAG,IAAI,cAAM,CAAC;IACxB,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+BAA+B;CACnD,CAAC,CAAA;AAEF;;;;;;GAMG;AACH,MAAa,sBAAsB;IAGjC,YACU,OAAe,EACf,OAAmB;QADnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAY;QAE3B,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,KAAK,CAAA;IACpE,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,QAAQ,CAAC,EACpB,MAAM,EACN,sBAAsB,EACtB,MAAM,EACN,GAAG,GACuB;QAC1B,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,iCAAiC,sBAAsB,EAAE,CAAC,CAAA;YACtE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,mBAAmB,EAAE;gBAC3D,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;gBAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,MAAM;oBACN,sBAAsB;oBACtB,MAAM;oBACN,GAAG;iBACJ,CAAC;aACH,CAAC,CAAA;YAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;gBAC1C,MAAM,IAAI,KAAK,CACb,+BAA+B;oBAC7B,WAAW,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,IAAI;oBACrD,kBAAkB,YAAY,IAAI,2BAA2B,EAAE,CAClE,CAAA;YACH,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA+B,CAAA;YAClE,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAA;YAC9C,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,2BAA2B,KAAK,EAAE,CAAC,CAAA;YAChD,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC;IAED,sEAAsE;IACtE,yEAAyE;IAClE,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA;IACvD,CAAC;CACF;AApED,wDAoEC"}
@@ -0,0 +1,5 @@
1
+ export * from './CredentialTypeService';
2
+ export * from './InvitationService';
3
+ export * from './MessageService';
4
+ export * from './RevocationRegistryService';
5
+ export * from './TrustCredentialService';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./CredentialTypeService"), exports);
18
+ __exportStar(require("./InvitationService"), exports);
19
+ __exportStar(require("./MessageService"), exports);
20
+ __exportStar(require("./RevocationRegistryService"), exports);
21
+ __exportStar(require("./TrustCredentialService"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,sDAAmC;AACnC,mDAAgC;AAChC,8DAA2C;AAC3C,2DAAwC"}
@@ -0,0 +1,3 @@
1
+ export declare enum ApiVersion {
2
+ V1 = "v1"
3
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiVersion = void 0;
4
+ // src/types/enums.ts
5
+ var ApiVersion;
6
+ (function (ApiVersion) {
7
+ ApiVersion["V1"] = "v1";
8
+ })(ApiVersion || (exports.ApiVersion = ApiVersion = {}));
9
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":";;;AAAA,qBAAqB;AACrB,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,uBAAS,CAAA;AACX,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}
@@ -0,0 +1 @@
1
+ export * from './enums';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./enums"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB"}
@@ -0,0 +1,4 @@
1
+ import { Logger } from '@nestjs/common';
2
+ export declare class HttpUtils {
3
+ static handleException(logger: Logger, error: any, defaultMessage?: string): never;
4
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpUtils = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ class HttpUtils {
6
+ static handleException(logger, error, defaultMessage = 'Internal server error') {
7
+ var _a, _b;
8
+ logger.error(`Error: ${error.stack}`);
9
+ throw new common_1.HttpException({
10
+ statusCode: (_a = error.statusCode) !== null && _a !== void 0 ? _a : common_1.HttpStatus.INTERNAL_SERVER_ERROR,
11
+ error: (_b = error.message) !== null && _b !== void 0 ? _b : defaultMessage,
12
+ }, common_1.HttpStatus.INTERNAL_SERVER_ERROR, {
13
+ cause: error,
14
+ });
15
+ }
16
+ }
17
+ exports.HttpUtils = HttpUtils;
18
+ //# sourceMappingURL=HttpUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpUtils.js","sourceRoot":"","sources":["../../src/utils/HttpUtils.ts"],"names":[],"mappings":";;;AAAA,2CAAkE;AAElE,MAAa,SAAS;IACpB,MAAM,CAAC,eAAe,CACpB,MAAc,EACd,KAAU,EACV,iBAAyB,uBAAuB;;QAEhD,MAAM,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,KAAK,EAAE,CAAC,CAAA;QAErC,MAAM,IAAI,sBAAa,CACrB;YACE,UAAU,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,mBAAU,CAAC,qBAAqB;YAChE,KAAK,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,cAAc;SACvC,EACD,mBAAU,CAAC,qBAAqB,EAChC;YACE,KAAK,EAAE,KAAK;SACb,CACF,CAAA;IACH,CAAC;CACF;AAnBD,8BAmBC"}
@@ -0,0 +1 @@
1
+ export * from './HttpUtils';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./HttpUtils"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@verana-labs/vs-agent-client",
3
+ "main": "build/index",
4
+ "types": "build/index",
5
+ "version": "1.6.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/2060-io/vs-agent"
9
+ },
10
+ "files": [
11
+ "build"
12
+ ],
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "license": "Apache-2.0",
17
+ "dependencies": {
18
+ "class-transformer": "0.5.1",
19
+ "class-validator": "0.14.1",
20
+ "express": "^4.18.1",
21
+ "tslog": "^4.8.2",
22
+ "@verana-labs/vs-agent-model": "1.6.0"
23
+ },
24
+ "devDependencies": {
25
+ "@nestjs/common": "^10.0.0",
26
+ "@types/express": "^4.17.13",
27
+ "ts-node-dev": "^2.0.0"
28
+ },
29
+ "peerDependencies": {
30
+ "@credo-ts/core": "0.5.18-alpha-20250930143725"
31
+ },
32
+ "scripts": {
33
+ "build": "pnpm run clean && pnpm run compile",
34
+ "clean": "rimraf -rf ./build",
35
+ "compile": "tsc -p tsconfig.build.json",
36
+ "version": "pnpm version",
37
+ "test": "vitest"
38
+ }
39
+ }