@verana-labs/vs-agent-client 2.0.0-dev.70 → 2.0.0-dev.72

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 (89) hide show
  1. package/README.md +60 -110
  2. package/build/ApiClient.d.ts +12 -31
  3. package/build/ApiClient.js +13 -30
  4. package/build/ApiClient.js.map +1 -1
  5. package/build/api/AgentApi.d.ts +9 -0
  6. package/build/api/AgentApi.js +19 -0
  7. package/build/api/AgentApi.js.map +1 -0
  8. package/build/api/AnoncredsApi.d.ts +15 -0
  9. package/build/api/AnoncredsApi.js +37 -0
  10. package/build/api/AnoncredsApi.js.map +1 -0
  11. package/build/api/AuthApi.d.ts +8 -0
  12. package/build/api/AuthApi.js +16 -0
  13. package/build/api/AuthApi.js.map +1 -0
  14. package/build/api/DidcommApi.d.ts +40 -0
  15. package/build/api/DidcommApi.js +112 -0
  16. package/build/api/DidcommApi.js.map +1 -0
  17. package/build/api/VtApi.d.ts +17 -0
  18. package/build/api/VtApi.js +51 -0
  19. package/build/api/VtApi.js.map +1 -0
  20. package/build/events.d.ts +7 -0
  21. package/build/events.js +51 -0
  22. package/build/events.js.map +1 -0
  23. package/build/http.d.ts +19 -0
  24. package/build/http.js +61 -0
  25. package/build/http.js.map +1 -0
  26. package/build/index.d.ts +7 -3
  27. package/build/index.js +7 -3
  28. package/build/index.js.map +1 -1
  29. package/build/types/agent.d.ts +10 -0
  30. package/build/types/agent.js +3 -0
  31. package/build/types/agent.js.map +1 -0
  32. package/build/types/anoncreds.d.ts +48 -0
  33. package/build/types/anoncreds.js +3 -0
  34. package/build/types/anoncreds.js.map +1 -0
  35. package/build/types/auth.d.ts +17 -0
  36. package/build/types/auth.js +3 -0
  37. package/build/types/auth.js.map +1 -0
  38. package/build/types/common.d.ts +33 -0
  39. package/build/types/common.js +3 -0
  40. package/build/types/common.js.map +1 -0
  41. package/build/types/didcomm.d.ts +246 -0
  42. package/build/types/didcomm.js +3 -0
  43. package/build/types/didcomm.js.map +1 -0
  44. package/build/types/events.d.ts +189 -0
  45. package/build/types/events.js +3 -0
  46. package/build/types/events.js.map +1 -0
  47. package/build/types/index.d.ts +7 -1
  48. package/build/types/index.js +7 -1
  49. package/build/types/index.js.map +1 -1
  50. package/build/types/vt.d.ts +116 -0
  51. package/build/types/vt.js +3 -0
  52. package/build/types/vt.js.map +1 -0
  53. package/package.json +3 -15
  54. package/build/handlers/ExpressEventHandler.d.ts +0 -53
  55. package/build/handlers/ExpressEventHandler.js +0 -75
  56. package/build/handlers/ExpressEventHandler.js.map +0 -1
  57. package/build/handlers/index.d.ts +0 -1
  58. package/build/handlers/index.js +0 -18
  59. package/build/handlers/index.js.map +0 -1
  60. package/build/services/CredentialTypeService.d.ts +0 -19
  61. package/build/services/CredentialTypeService.js +0 -66
  62. package/build/services/CredentialTypeService.js.map +0 -1
  63. package/build/services/DidcommInvitationsService.d.ts +0 -10
  64. package/build/services/DidcommInvitationsService.js +0 -31
  65. package/build/services/DidcommInvitationsService.js.map +0 -1
  66. package/build/services/InvitationService.d.ts +0 -16
  67. package/build/services/InvitationService.js +0 -56
  68. package/build/services/InvitationService.js.map +0 -1
  69. package/build/services/MessageService.d.ts +0 -18
  70. package/build/services/MessageService.js +0 -57
  71. package/build/services/MessageService.js.map +0 -1
  72. package/build/services/RevocationRegistryService.d.ts +0 -18
  73. package/build/services/RevocationRegistryService.js +0 -58
  74. package/build/services/RevocationRegistryService.js.map +0 -1
  75. package/build/services/TrustCredentialService.d.ts +0 -33
  76. package/build/services/TrustCredentialService.js +0 -75
  77. package/build/services/TrustCredentialService.js.map +0 -1
  78. package/build/services/index.d.ts +0 -6
  79. package/build/services/index.js +0 -23
  80. package/build/services/index.js.map +0 -1
  81. package/build/types/enums.d.ts +0 -3
  82. package/build/types/enums.js +0 -9
  83. package/build/types/enums.js.map +0 -1
  84. package/build/utils/HttpUtils.d.ts +0 -4
  85. package/build/utils/HttpUtils.js +0 -18
  86. package/build/utils/HttpUtils.js.map +0 -1
  87. package/build/utils/index.d.ts +0 -1
  88. package/build/utils/index.js +0 -18
  89. package/build/utils/index.js.map +0 -1
package/README.md CHANGED
@@ -1,131 +1,81 @@
1
1
  `@verana-labs/vs-agent-client`
2
2
 
3
3
  # VS Agent Client
4
- **VS Agent Client** is a TypeScript library designed to simplify the interaction with [**VS Agent**](https://github.com/verana-labs/vs-agent). It provides an abstraction layer for communicating with the agent, handling messaging, credential management, and event handling efficiently.
5
-
6
- This package ensures that the client stays updated with the latest API versioning of the **VS Agent** to maintain compatibility with evolving endpoints.
7
-
8
- ## Features
9
- - **Simplified API interaction:** Provides an easy-to-use client to interact with VS Agent.
10
- - **Event handling:** Includes an ExpressEventHandler for quick integration into Express-based applications.
11
- - **Service-based structure:** Dedicated services for messaging, credentials, invitations, and revocation registries.
12
- - **Versioning support:** Supports API versioning to maintain compatibility with different VS Agent versions.
13
-
14
- ## Repository
15
- Find the public repository here: [VS Agent](../../README.md)
16
-
17
- ## How it works
18
- ```mermaid
19
- classDiagram
20
- class VsAgent {
21
- + Handles DIDComm communication
22
- + Manages agent wallet and credentials
23
- + Exposes API for client interactions
24
- }
25
-
26
- class NestJSClient {
27
- + Plug-and-play integration
28
- + Selectable modules for various services
29
- + Modules:
30
- -- MessageEventOptions: Configures message event handling
31
- -- ConnectionEventOptions: Configures connection event handling
32
- -- CredentialOptions: Configures credential management
33
- -- StatsOptions: Configures stats management
34
- }
35
-
36
- class Client {
37
- + Directly manages requests to SA
38
- + Facilitates reception of requests from modules
39
- + Provides an abstraction for service communication
40
- + Interfaces:
41
- -- messages
42
- -- credentialTypes
43
- -- revocationRegistries
44
- -- invitations
45
- }
46
-
47
- class ModelLibrary {
48
- + Defines required data models
49
- + Ensures type safety across services
50
- }
51
-
52
- %% Relations
53
- NestJSClient --> VsAgent : Uses
54
- Client --> VsAgent : Sends requests
55
- Client --> VsAgent : Receives requests
56
- Client --> ModelLibrary : Uses models
57
- ModelLibrary --> VsAgent : Provides data models
58
- NestJSClient --> ModelLibrary : Uses models
59
-
60
- %% Style
61
- style Client stroke:#333,stroke-width:4px
62
- ```
4
+
5
+ A typed `fetch` wrapper over the v2 [Administration API](https://github.com/verana-labs/verana-spec/blob/main/v4/vs-agent/spec.md#administration-api) of [VS Agent](https://github.com/verana-labs/vs-agent), plus an event dispatcher for the [Events API](https://github.com/verana-labs/verana-spec/blob/main/v4/vs-agent/spec.md#events-api) webhook. No runtime dependencies, Node 18 or newer.
63
6
 
64
7
  ## Installation
65
- ```sh
66
- npm install @verana-labs/vs-agent-client
67
- ```
68
- or
69
- ```sh
70
- yarn add @verana-labs/vs-agent-client
71
- ```
72
- or
8
+
73
9
  ```sh
74
10
  pnpm add @verana-labs/vs-agent-client
75
11
  ```
76
- ## `ApiClient.ts`
77
- `ApiClient` class provides a simple interface for interacting with VS Agent. It abstracts API calls and offers dedicated service methods for messaging, credential types, invitations, and revocation registries.
78
12
 
79
- ### Example Usage
13
+ ## Client
14
+
80
15
  ```ts
81
- import { ApiClient, ApiVersion } from '@verana-labs/vs-agent-client'
16
+ import { ApiClient } from '@verana-labs/vs-agent-client'
82
17
 
83
- const apiClient = new ApiClient('http://localhost:3000', ApiVersion.V1)
18
+ const client = new ApiClient('http://localhost:3000')
84
19
 
85
- // Sending a message
86
- const messageId = await apiClient.messages.send(
87
- new TextMessage({
88
- connectionId: 'connectionId',
89
- content: 'Hello, world!',
90
- })
91
- )
20
+ const { id } = await client.didcomm.sendBasicMessage({ connectionId, content: 'Hello' })
21
+ ```
22
+
23
+ `baseUrl` is the admin origin. The client appends `/v2`.
24
+
25
+ Auth. An agent in `ADMIN_API_AUTH_MODE=internal`, or a caller inside `ADMIN_API_TRUSTED_NETWORKS` in either mode, needs no token. A caller outside the trusted networks of an agent in `corporation` mode runs the ADR-036 flow with its own Cosmos signer: `client.auth.challenge({ account })`, sign `vs-agent-admin-auth:${nonce}`, `client.auth.token({ account, pubKey, signature, nonce })`, then build the client with the returned token. Tokens live 900 seconds, build a new `ApiClient` to refresh.
26
+
27
+ ```ts
28
+ const client = new ApiClient('https://agent.example.com', { token })
29
+ ```
92
30
 
93
- console.log(`Message sent with ID: ${messageId}`)
31
+ Method names, verbs, paths and field names are the spec [Method Summary](https://github.com/verana-labs/verana-spec/blob/main/v4/vs-agent/spec.md#method-summary) verbatim, grouped by scope: `client.auth`, `client.agent`, `client.didcomm`, `client.anoncreds`, `client.vt`. Path parameters are positional, bodies and queries are one object. Dates are ISO 8601 strings.
32
+
33
+ List methods return a page. Loop on `nextCursor`:
34
+
35
+ ```ts
36
+ let cursor: string | undefined
37
+ do {
38
+ const page = await client.didcomm.listConnections({ limit: 100, cursor })
39
+ for (const connection of page.items) console.log(connection.id)
40
+ cursor = page.nextCursor ?? undefined
41
+ } while (cursor)
94
42
  ```
95
43
 
96
- ### Services
97
- - `messages:` Handles message sending and receiving.
98
- - `credentialTypes:` Manages credential types.
99
- - `revocationRegistries:` Manages revocation registries.
100
- - `invitations:` Handles connection invitations.
44
+ Errors. A non-2xx response throws `ApiError` with `code` (the spec error code, for example `UNKNOWN_ID`), `status` and `message`. A response without the error envelope throws `ApiError` with code `HTTP_ERROR`. Transport failures propagate as the `fetch` rejection.
45
+
46
+ The chat and mrtd module methods (`sendReceipts`, `sendMenu`, `requestMrz` and the rest) exist only when the plugin is loaded on the agent. Without it they answer `404 UNKNOWN_ID`.
47
+
48
+ ## Events
49
+
50
+ `EventDispatcher` routes a webhook envelope to handlers registered by event type. `data` is typed per event.
101
51
 
102
- ## `ExpressEventHandler.ts`
103
- The `ExpressEventHandler` simplifies event handling for Express applications, mapping API endpoints to event handlers.
104
- ### Example Usage
105
52
  ```ts
106
- import express from 'express'
107
- import { ExpressEventHandler } from '@verana-labs/vs-agent-client'
53
+ import { EventDispatcher, EventEnvelope } from '@verana-labs/vs-agent-client'
108
54
 
109
- const app = express()
110
- const eventHandler = new ExpressEventHandler(app)
55
+ const events = new EventDispatcher()
56
+ .on('didcomm.basic-messages.message-received', async ({ connectionId, content }) => {
57
+ await client.didcomm.sendBasicMessage({ connectionId, content: `You said: ${content}` })
58
+ })
59
+ .on('didcomm.connections.state-updated', data => {
60
+ if (data.state === 'completed' && data.previousState !== 'completed') console.log('new connection', data.id)
61
+ })
111
62
 
112
- expressHandler.messageStateUpdated(async (req, res) => {
113
- const obj = req.body
114
- logger.info(`message state updated: ${JSON.stringify(obj)}`)
115
- res.json({ message: 'ok' })
63
+ app.post('/events', async (req, res) => {
64
+ await events.dispatch(req.body as EventEnvelope)
65
+ res.sendStatus(204)
116
66
  })
117
-
118
- app.listen(3000, () => console.log('Server running on port 3000'))
119
67
  ```
120
- ### Available Event Handlers
121
- - `connectionStateUpdated` (`POST /connection-state-updated`)
122
- - `messageReceived` (`POST /message-received`)
123
-
124
- ## Contributing
125
- This library evolves alongside VS Agent. Contributions are welcome!
126
- - Fork the repository.
127
- - Create a feature branch.
128
- - Commit changes.
129
- - Open a pull request.
130
-
131
- For more details, visit the [official repository](https://github.com/verana-labs/vs-agent).
68
+
69
+ Handlers run in registration order. A handler rejection propagates, so answer non-2xx and the agent logs the failed delivery ([VSA-EVT-DEL-3](https://github.com/verana-labs/verana-spec/blob/main/v4/vs-agent/spec.md#vsa-evt-del-delivery)). An event type with no handler is a no-op.
70
+
71
+ The dispatcher does not discard duplicate deliveries. [VSA-EVT-DEL-5](https://github.com/verana-labs/verana-spec/blob/main/v4/vs-agent/spec.md#vsa-evt-del-delivery) makes that the consumer's job: keep the seen `id` values and skip an envelope you already handled before calling `dispatch`.
72
+
73
+ The event set is open. `EventEnvelope` covers the types the agent emits today and `UnknownEventEnvelope` names the rest (for example `didcomm.question-answer.question-received`). Check `isEventEnvelope(envelope)` first: inside that branch a `switch` on `envelope.type` narrows `envelope.data`, in the else branch `envelope.data` is `unknown`.
74
+
75
+ ## Not available yet
76
+
77
+ The spec lists these, main does not serve them yet:
78
+
79
+ - `deleteCredentialExchange` (`DELETE /didcomm/credential-exchanges/{id}`)
80
+ - every OpenID4VC method under `/openid4vc`
81
+ - `connectionId` on `createPresentationRequest` and `createCredentialOffer`, both mint an out-of-band invitation and reject the field
@@ -1,33 +1,14 @@
1
- import { CredentialTypeService, DidcommInvitationsService, InvitationService, MessageService, RevocationRegistryService, TrustCredentialService } from './services';
2
- import { ApiVersion } from './types';
3
- /**
4
- * `ApiClient` gives access to the Admin API of a VS Agent.
5
- *
6
- * Example:
7
- *
8
- * const apiClient = new ApiClient('http://localhost', ApiVersion.V1)
9
- * await apiClient.credentialTypes.getAll()
10
- * await apiClient.messages.send(message)
11
- * await apiClient.didcomm.invitations.send({ connectionId, label })
12
- *
13
- * Services:
14
- * - `messages`: send v1 messages.
15
- * - `credentialTypes`: create, import, export and list credential types.
16
- * - `revocationRegistries`: create and list revocation registries.
17
- * - `invitations`: create invitation codes.
18
- * - `trustCredentials`: issue and revoke Verifiable Trust credentials.
19
- * - `didcomm`: v2 DIDComm modules. `didcomm.invitations` sends an invitation on a connection.
20
- */
1
+ import { AgentApi } from './api/AgentApi';
2
+ import { AnoncredsApi } from './api/AnoncredsApi';
3
+ import { AuthApi } from './api/AuthApi';
4
+ import { DidcommApi } from './api/DidcommApi';
5
+ import { VtApi } from './api/VtApi';
6
+ import { ApiClientOptions } from './http';
21
7
  export declare class ApiClient {
22
- private baseURL;
23
- private version;
24
- readonly messages: MessageService;
25
- readonly credentialTypes: CredentialTypeService;
26
- readonly revocationRegistries: RevocationRegistryService;
27
- readonly invitations: InvitationService;
28
- readonly trustCredentials: TrustCredentialService;
29
- readonly didcomm: {
30
- invitations: DidcommInvitationsService;
31
- };
32
- constructor(baseURL: string, version?: ApiVersion);
8
+ readonly auth: AuthApi;
9
+ readonly agent: AgentApi;
10
+ readonly didcomm: DidcommApi;
11
+ readonly anoncreds: AnoncredsApi;
12
+ readonly vt: VtApi;
13
+ constructor(baseUrl: string, options?: ApiClientOptions);
33
14
  }
@@ -1,37 +1,20 @@
1
1
  "use strict";
2
- // src/ApiClient.ts
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.ApiClient = void 0;
5
- const services_1 = require("./services");
6
- const types_1 = require("./types");
7
- /**
8
- * `ApiClient` gives access to the Admin API of a VS Agent.
9
- *
10
- * Example:
11
- *
12
- * const apiClient = new ApiClient('http://localhost', ApiVersion.V1)
13
- * await apiClient.credentialTypes.getAll()
14
- * await apiClient.messages.send(message)
15
- * await apiClient.didcomm.invitations.send({ connectionId, label })
16
- *
17
- * Services:
18
- * - `messages`: send v1 messages.
19
- * - `credentialTypes`: create, import, export and list credential types.
20
- * - `revocationRegistries`: create and list revocation registries.
21
- * - `invitations`: create invitation codes.
22
- * - `trustCredentials`: issue and revoke Verifiable Trust credentials.
23
- * - `didcomm`: v2 DIDComm modules. `didcomm.invitations` sends an invitation on a connection.
24
- */
4
+ const AgentApi_1 = require("./api/AgentApi");
5
+ const AnoncredsApi_1 = require("./api/AnoncredsApi");
6
+ const AuthApi_1 = require("./api/AuthApi");
7
+ const DidcommApi_1 = require("./api/DidcommApi");
8
+ const VtApi_1 = require("./api/VtApi");
9
+ const http_1 = require("./http");
25
10
  class ApiClient {
26
- constructor(baseURL, version = types_1.ApiVersion.V1) {
27
- this.baseURL = baseURL;
28
- this.version = version;
29
- this.invitations = new services_1.InvitationService(baseURL, version);
30
- this.messages = new services_1.MessageService(baseURL, version);
31
- this.credentialTypes = new services_1.CredentialTypeService(baseURL, version);
32
- this.revocationRegistries = new services_1.RevocationRegistryService(baseURL, version);
33
- this.trustCredentials = new services_1.TrustCredentialService(baseURL, version);
34
- this.didcomm = { invitations: new services_1.DidcommInvitationsService(baseURL) };
11
+ constructor(baseUrl, options = {}) {
12
+ const http = new http_1.HttpClient(baseUrl, options);
13
+ this.auth = new AuthApi_1.AuthApi(http);
14
+ this.agent = new AgentApi_1.AgentApi(http);
15
+ this.didcomm = new DidcommApi_1.DidcommApi(http);
16
+ this.anoncreds = new AnoncredsApi_1.AnoncredsApi(http);
17
+ this.vt = new VtApi_1.VtApi(http);
35
18
  }
36
19
  }
37
20
  exports.ApiClient = ApiClient;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClient.js","sourceRoot":"","sources":["../src/ApiClient.ts"],"names":[],"mappings":";AAAA,mBAAmB;;;AAEnB,yCAOmB;AACnB,mCAAoC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,SAAS;IAQpB,YACU,OAAe,EACf,UAAsB,kBAAU,CAAC,EAAE;QADnC,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAA4B;QAE3C,IAAI,CAAC,WAAW,GAAG,IAAI,4BAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC1D,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACpD,IAAI,CAAC,eAAe,GAAG,IAAI,gCAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAClE,IAAI,CAAC,oBAAoB,GAAG,IAAI,oCAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC3E,IAAI,CAAC,gBAAgB,GAAG,IAAI,iCAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACpE,IAAI,CAAC,OAAO,GAAG,EAAE,WAAW,EAAE,IAAI,oCAAyB,CAAC,OAAO,CAAC,EAAE,CAAA;IACxE,CAAC;CACF;AAnBD,8BAmBC"}
1
+ {"version":3,"file":"ApiClient.js","sourceRoot":"","sources":["../src/ApiClient.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,qDAAiD;AACjD,2CAAuC;AACvC,iDAA6C;AAC7C,uCAAmC;AACnC,iCAAqD;AAErD,MAAa,SAAS;IAOpB,YAAmB,OAAe,EAAE,UAA4B,EAAE;QAChE,MAAM,IAAI,GAAG,IAAI,iBAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC7C,IAAI,CAAC,IAAI,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,CAAA;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAQ,CAAC,IAAI,CAAC,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAU,CAAC,IAAI,CAAC,CAAA;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,CAAC,EAAE,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;CACF;AAfD,8BAeC"}
@@ -0,0 +1,9 @@
1
+ import { HttpClient } from '../http';
2
+ import { AgentInfo, Liveness, Readiness } from '../types';
3
+ export declare class AgentApi {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ getAgentInfo(): Promise<AgentInfo>;
7
+ getLiveness(): Promise<Liveness>;
8
+ getReadiness(): Promise<Readiness>;
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentApi = void 0;
4
+ class AgentApi {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ getAgentInfo() {
9
+ return this.http.request('GET', '/agent/info');
10
+ }
11
+ getLiveness() {
12
+ return this.http.request('GET', '/agent/health/live');
13
+ }
14
+ getReadiness() {
15
+ return this.http.request('GET', '/agent/health/ready');
16
+ }
17
+ }
18
+ exports.AgentApi = AgentApi;
19
+ //# sourceMappingURL=AgentApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentApi.js","sourceRoot":"","sources":["../../src/api/AgentApi.ts"],"names":[],"mappings":";;;AAGA,MAAa,QAAQ;IACnB,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,YAAY;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;IAChD,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;IACvD,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAA;IACxD,CAAC;CACF;AAdD,4BAcC"}
@@ -0,0 +1,15 @@
1
+ import { HttpClient } from '../http';
2
+ import { CreateCredentialDefinitionBody, CreateRevocationRegistryBody, CreateRevocationRegistryResponse, CredentialDefinition, CredentialDefinitionPackage, DeleteCredentialDefinitionQuery, ListRevocationRegistriesQuery, Page, PaginationQuery, RevokeCredentialBody, RevokeCredentialResponse } from '../types';
3
+ export declare class AnoncredsApi {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ listCredentialDefinitions(query?: PaginationQuery): Promise<Page<CredentialDefinition>>;
7
+ createCredentialDefinition(body: CreateCredentialDefinitionBody): Promise<CredentialDefinition>;
8
+ importCredentialDefinition(body: CredentialDefinitionPackage): Promise<CredentialDefinition>;
9
+ exportCredentialDefinition(credentialDefinitionId: string): Promise<CredentialDefinitionPackage>;
10
+ deleteCredentialDefinition(credentialDefinitionId: string, query?: DeleteCredentialDefinitionQuery): Promise<void>;
11
+ listRevocationRegistries(query?: ListRevocationRegistriesQuery): Promise<Page<string>>;
12
+ createRevocationRegistry(body: CreateRevocationRegistryBody): Promise<CreateRevocationRegistryResponse>;
13
+ deleteRevocationRegistry(revocationRegistryDefinitionId: string): Promise<void>;
14
+ revokeCredential(body: RevokeCredentialBody): Promise<RevokeCredentialResponse>;
15
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnoncredsApi = void 0;
4
+ class AnoncredsApi {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ listCredentialDefinitions(query) {
9
+ return this.http.request('GET', '/anoncreds/credential-definitions', { query });
10
+ }
11
+ createCredentialDefinition(body) {
12
+ return this.http.request('POST', '/anoncreds/credential-definitions', { body });
13
+ }
14
+ importCredentialDefinition(body) {
15
+ return this.http.request('POST', '/anoncreds/credential-definitions/import', { body });
16
+ }
17
+ exportCredentialDefinition(credentialDefinitionId) {
18
+ return this.http.request('GET', `/anoncreds/credential-definitions/${encodeURIComponent(credentialDefinitionId)}/export`);
19
+ }
20
+ deleteCredentialDefinition(credentialDefinitionId, query) {
21
+ return this.http.request('DELETE', `/anoncreds/credential-definitions/${encodeURIComponent(credentialDefinitionId)}`, { query });
22
+ }
23
+ listRevocationRegistries(query) {
24
+ return this.http.request('GET', '/anoncreds/revocation-registries', { query });
25
+ }
26
+ createRevocationRegistry(body) {
27
+ return this.http.request('POST', '/anoncreds/revocation-registries', { body });
28
+ }
29
+ deleteRevocationRegistry(revocationRegistryDefinitionId) {
30
+ return this.http.request('DELETE', `/anoncreds/revocation-registries/${encodeURIComponent(revocationRegistryDefinitionId)}`);
31
+ }
32
+ revokeCredential(body) {
33
+ return this.http.request('POST', '/anoncreds/revoke-credential', { body });
34
+ }
35
+ }
36
+ exports.AnoncredsApi = AnoncredsApi;
37
+ //# sourceMappingURL=AnoncredsApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnoncredsApi.js","sourceRoot":"","sources":["../../src/api/AnoncredsApi.ts"],"names":[],"mappings":";;;AAeA,MAAa,YAAY;IACvB,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,yBAAyB,CAAC,KAAuB;QACtD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,mCAAmC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IACjF,CAAC;IAEM,0BAA0B,CAAC,IAAoC;QACpE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,mCAAmC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IACjF,CAAC;IAEM,0BAA0B,CAAC,IAAiC;QACjE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,0CAA0C,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IACxF,CAAC;IAEM,0BAA0B,CAAC,sBAA8B;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,KAAK,EACL,qCAAqC,kBAAkB,CAAC,sBAAsB,CAAC,SAAS,CACzF,CAAA;IACH,CAAC;IAEM,0BAA0B,CAC/B,sBAA8B,EAC9B,KAAuC;QAEvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,QAAQ,EACR,qCAAqC,kBAAkB,CAAC,sBAAsB,CAAC,EAAE,EACjF,EAAE,KAAK,EAAE,CACV,CAAA;IACH,CAAC;IAEM,wBAAwB,CAAC,KAAqC;QACnE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,kCAAkC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAChF,CAAC;IAEM,wBAAwB,CAC7B,IAAkC;QAElC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,kCAAkC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAChF,CAAC;IAEM,wBAAwB,CAAC,8BAAsC;QACpE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,QAAQ,EACR,oCAAoC,kBAAkB,CAAC,8BAA8B,CAAC,EAAE,CACzF,CAAA;IACH,CAAC;IAEM,gBAAgB,CAAC,IAA0B;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,8BAA8B,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5E,CAAC;CACF;AArDD,oCAqDC"}
@@ -0,0 +1,8 @@
1
+ import { HttpClient } from '../http';
2
+ import { ChallengeRequest, ChallengeResponse, TokenRequest, TokenResponse } from '../types';
3
+ export declare class AuthApi {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ challenge(body: ChallengeRequest): Promise<ChallengeResponse>;
7
+ token(body: TokenRequest): Promise<TokenResponse>;
8
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthApi = void 0;
4
+ class AuthApi {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ challenge(body) {
9
+ return this.http.request('POST', '/auth/challenge', { body });
10
+ }
11
+ token(body) {
12
+ return this.http.request('POST', '/auth/token', { body });
13
+ }
14
+ }
15
+ exports.AuthApi = AuthApi;
16
+ //# sourceMappingURL=AuthApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthApi.js","sourceRoot":"","sources":["../../src/api/AuthApi.ts"],"names":[],"mappings":";;;AAGA,MAAa,OAAO;IAClB,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,SAAS,CAAC,IAAsB;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAC/D,CAAC;IAEM,KAAK,CAAC,IAAkB;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAC3D,CAAC;CACF;AAVD,0BAUC"}
@@ -0,0 +1,40 @@
1
+ import { HttpClient } from '../http';
2
+ import { AcceptCallBody, BasicMessageRecord, CallThreadBody, ConnectionRecord, CreateCredentialOfferBody, CreateCredentialOfferResponse, CreatePresentationRequestBody, CreatePresentationRequestResponse, CredentialExchangeRecord, DeclineExchangeBody, ListBasicMessagesQuery, ListConnectionsQuery, OfferCallBody, Page, PaginationQuery, PresentationRecord, ProtocolModule, RequestMrtdBody, RequestProfileBody, SendBasicMessageBody, SendInvitationBody, SendInvitationResponse, SendMenuBody, SendProfileBody, SendQuestionBody, SendReactionsBody, SendReceiptsBody, SentMessage, ShareMediaBody } from '../types';
3
+ export declare class DidcommApi {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ listProtocols(): Promise<ProtocolModule[]>;
7
+ listConnections(query?: ListConnectionsQuery): Promise<Page<ConnectionRecord>>;
8
+ getConnection(connectionId: string): Promise<ConnectionRecord>;
9
+ deleteConnection(connectionId: string): Promise<void>;
10
+ sendInvitation(body: SendInvitationBody): Promise<SendInvitationResponse>;
11
+ sendBasicMessage(body: SendBasicMessageBody): Promise<SentMessage>;
12
+ listBasicMessages(query?: ListBasicMessagesQuery): Promise<Page<BasicMessageRecord>>;
13
+ sendReceipts(body: SendReceiptsBody): Promise<SentMessage>;
14
+ sendReactions(body: SendReactionsBody): Promise<SentMessage>;
15
+ sendProfile(body: SendProfileBody): Promise<SentMessage>;
16
+ requestProfile(body: RequestProfileBody): Promise<SentMessage>;
17
+ shareMedia(body: ShareMediaBody): Promise<SentMessage>;
18
+ offerCall(body: OfferCallBody): Promise<SentMessage>;
19
+ acceptCall(body: AcceptCallBody): Promise<SentMessage>;
20
+ rejectCall(body: CallThreadBody): Promise<SentMessage>;
21
+ endCall(body: CallThreadBody): Promise<SentMessage>;
22
+ sendMenu(body: SendMenuBody): Promise<SentMessage>;
23
+ sendQuestion(body: SendQuestionBody): Promise<SentMessage>;
24
+ requestMrz(body: RequestMrtdBody): Promise<SentMessage>;
25
+ requestEmrtdData(body: RequestMrtdBody): Promise<SentMessage>;
26
+ createPresentationRequest(body: CreatePresentationRequestBody): Promise<CreatePresentationRequestResponse>;
27
+ acceptPresentationRequest(proofExchangeId: string): Promise<PresentationRecord>;
28
+ acceptPresentation(proofExchangeId: string): Promise<PresentationRecord>;
29
+ declinePresentationExchange(proofExchangeId: string, body?: DeclineExchangeBody): Promise<PresentationRecord>;
30
+ listPresentations(query?: PaginationQuery): Promise<Page<PresentationRecord>>;
31
+ getPresentation(proofExchangeId: string): Promise<PresentationRecord>;
32
+ deletePresentation(proofExchangeId: string): Promise<void>;
33
+ createCredentialOffer(body: CreateCredentialOfferBody): Promise<CreateCredentialOfferResponse>;
34
+ acceptCredentialOffer(credentialExchangeId: string): Promise<CredentialExchangeRecord>;
35
+ acceptCredentialRequest(credentialExchangeId: string): Promise<CredentialExchangeRecord>;
36
+ acceptCredential(credentialExchangeId: string): Promise<CredentialExchangeRecord>;
37
+ declineCredentialExchange(credentialExchangeId: string, body?: DeclineExchangeBody): Promise<CredentialExchangeRecord>;
38
+ listCredentialExchanges(query?: PaginationQuery): Promise<Page<CredentialExchangeRecord>>;
39
+ getCredentialExchange(credentialExchangeId: string): Promise<CredentialExchangeRecord>;
40
+ }
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DidcommApi = void 0;
4
+ class DidcommApi {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ listProtocols() {
9
+ return this.http.request('GET', '/didcomm/protocols');
10
+ }
11
+ listConnections(query) {
12
+ return this.http.request('GET', '/didcomm/connections', { query });
13
+ }
14
+ getConnection(connectionId) {
15
+ return this.http.request('GET', `/didcomm/connections/${encodeURIComponent(connectionId)}`);
16
+ }
17
+ deleteConnection(connectionId) {
18
+ return this.http.request('DELETE', `/didcomm/connections/${encodeURIComponent(connectionId)}`);
19
+ }
20
+ sendInvitation(body) {
21
+ return this.http.request('POST', '/didcomm/invitations', { body });
22
+ }
23
+ sendBasicMessage(body) {
24
+ return this.http.request('POST', '/didcomm/basic-messages', { body });
25
+ }
26
+ listBasicMessages(query) {
27
+ return this.http.request('GET', '/didcomm/basic-messages', { query });
28
+ }
29
+ sendReceipts(body) {
30
+ return this.http.request('POST', '/didcomm/receipts', { body });
31
+ }
32
+ sendReactions(body) {
33
+ return this.http.request('POST', '/didcomm/reactions', { body });
34
+ }
35
+ sendProfile(body) {
36
+ return this.http.request('POST', '/didcomm/user-profile/send', { body });
37
+ }
38
+ requestProfile(body) {
39
+ return this.http.request('POST', '/didcomm/user-profile/request', { body });
40
+ }
41
+ shareMedia(body) {
42
+ return this.http.request('POST', '/didcomm/media-sharing', { body });
43
+ }
44
+ offerCall(body) {
45
+ return this.http.request('POST', '/didcomm/calls', { body });
46
+ }
47
+ acceptCall(body) {
48
+ return this.http.request('POST', '/didcomm/calls/accept', { body });
49
+ }
50
+ rejectCall(body) {
51
+ return this.http.request('POST', '/didcomm/calls/reject', { body });
52
+ }
53
+ endCall(body) {
54
+ return this.http.request('POST', '/didcomm/calls/end', { body });
55
+ }
56
+ sendMenu(body) {
57
+ return this.http.request('POST', '/didcomm/action-menu', { body });
58
+ }
59
+ sendQuestion(body) {
60
+ return this.http.request('POST', '/didcomm/question-answer', { body });
61
+ }
62
+ requestMrz(body) {
63
+ return this.http.request('POST', '/didcomm/mrtd/request-mrz', { body });
64
+ }
65
+ requestEmrtdData(body) {
66
+ return this.http.request('POST', '/didcomm/mrtd/request-emrtd', { body });
67
+ }
68
+ createPresentationRequest(body) {
69
+ return this.http.request('POST', '/didcomm/presentation-request', { body });
70
+ }
71
+ acceptPresentationRequest(proofExchangeId) {
72
+ return this.http.request('POST', `/didcomm/presentations/${encodeURIComponent(proofExchangeId)}/accept-request`);
73
+ }
74
+ acceptPresentation(proofExchangeId) {
75
+ return this.http.request('POST', `/didcomm/presentations/${encodeURIComponent(proofExchangeId)}/accept-presentation`);
76
+ }
77
+ declinePresentationExchange(proofExchangeId, body) {
78
+ return this.http.request('POST', `/didcomm/presentations/${encodeURIComponent(proofExchangeId)}/decline`, { body });
79
+ }
80
+ listPresentations(query) {
81
+ return this.http.request('GET', '/didcomm/presentations', { query });
82
+ }
83
+ getPresentation(proofExchangeId) {
84
+ return this.http.request('GET', `/didcomm/presentations/${encodeURIComponent(proofExchangeId)}`);
85
+ }
86
+ deletePresentation(proofExchangeId) {
87
+ return this.http.request('DELETE', `/didcomm/presentations/${encodeURIComponent(proofExchangeId)}`);
88
+ }
89
+ createCredentialOffer(body) {
90
+ return this.http.request('POST', '/didcomm/credential-offer', { body });
91
+ }
92
+ acceptCredentialOffer(credentialExchangeId) {
93
+ return this.http.request('POST', `/didcomm/credential-exchanges/${encodeURIComponent(credentialExchangeId)}/accept-offer`);
94
+ }
95
+ acceptCredentialRequest(credentialExchangeId) {
96
+ return this.http.request('POST', `/didcomm/credential-exchanges/${encodeURIComponent(credentialExchangeId)}/accept-request`);
97
+ }
98
+ acceptCredential(credentialExchangeId) {
99
+ return this.http.request('POST', `/didcomm/credential-exchanges/${encodeURIComponent(credentialExchangeId)}/accept-credential`);
100
+ }
101
+ declineCredentialExchange(credentialExchangeId, body) {
102
+ return this.http.request('POST', `/didcomm/credential-exchanges/${encodeURIComponent(credentialExchangeId)}/decline`, { body });
103
+ }
104
+ listCredentialExchanges(query) {
105
+ return this.http.request('GET', '/didcomm/credential-exchanges', { query });
106
+ }
107
+ getCredentialExchange(credentialExchangeId) {
108
+ return this.http.request('GET', `/didcomm/credential-exchanges/${encodeURIComponent(credentialExchangeId)}`);
109
+ }
110
+ }
111
+ exports.DidcommApi = DidcommApi;
112
+ //# sourceMappingURL=DidcommApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DidcommApi.js","sourceRoot":"","sources":["../../src/api/DidcommApi.ts"],"names":[],"mappings":";;;AAiCA,MAAa,UAAU;IACrB,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,aAAa;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;IACvD,CAAC;IAEM,eAAe,CAAC,KAA4B;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IACpE,CAAC;IAEM,aAAa,CAAC,YAAoB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,wBAAwB,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IAC7F,CAAC;IAEM,gBAAgB,CAAC,YAAoB;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,wBAAwB,kBAA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AAoB,CAAC,eAAe,CACzF,CAAA;IACH,CAAC;IAEM,uBAAuB,CAAC,oBAA4B;QACzD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,MAAM,EACN,iCAAiC,kBAAkB,CAAC,oBAAoB,CAAC,iBAAiB,CAC3F,CAAA;IACH,CAAC;IAEM,gBAAgB,CAAC,oBAA4B;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,MAAM,EACN,iCAAiC,kBAAkB,CAAC,oBAAoB,CAAC,oBAAoB,CAC9F,CAAA;IACH,CAAC;IAEM,yBAAyB,CAC9B,oBAA4B,EAC5B,IAA0B;QAE1B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,MAAM,EACN,iCAAiC,kBAAkB,CAAC,oBAAoB,CAAC,UAAU,EACnF,EAAE,IAAI,EAAE,CACT,CAAA;IACH,CAAC;IAEM,uBAAuB,CAAC,KAAuB;QACpD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,+BAA+B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7E,CAAC;IAEM,qBAAqB,CAAC,oBAA4B;QACvD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,KAAK,EACL,iCAAiC,kBAAkB,CAAC,oBAAoB,CAAC,EAAE,CAC5E,CAAA;IACH,CAAC;CAGF;AA9KD,gCA8KC"}
@@ -0,0 +1,17 @@
1
+ import { HttpClient } from '../http';
2
+ import { AddServiceEndpointBody, EditClaimsBody, ListFlowsQuery, Page, PaginationQuery, RejectFlowBody, SendOobLinkBody, ServiceEndpoint, StartValidationBody, UpdateServiceEndpointBody, ValidateFlowBody, VtFlowRecord } from '../types';
3
+ export declare class VtApi {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ listFlows(query?: ListFlowsQuery): Promise<Page<VtFlowRecord>>;
7
+ getFlow(participantSessionId: string): Promise<VtFlowRecord>;
8
+ editCredentialClaims(participantSessionId: string, body: EditClaimsBody): Promise<Record<string, unknown>>;
9
+ sendOobLink(participantSessionId: string, body: SendOobLinkBody): Promise<VtFlowRecord>;
10
+ startValidation(participantSessionId: string, body?: StartValidationBody): Promise<VtFlowRecord>;
11
+ validateFlow(participantSessionId: string, body?: ValidateFlowBody): Promise<VtFlowRecord>;
12
+ rejectFlow(participantSessionId: string, body: RejectFlowBody): Promise<VtFlowRecord>;
13
+ listServiceEndpoints(query?: PaginationQuery): Promise<Page<ServiceEndpoint>>;
14
+ addServiceEndpoint(body: AddServiceEndpointBody): Promise<ServiceEndpoint>;
15
+ updateServiceEndpoint(serviceEndpointId: string, body: UpdateServiceEndpointBody): Promise<ServiceEndpoint>;
16
+ deleteServiceEndpoint(serviceEndpointId: string): Promise<ServiceEndpoint>;
17
+ }