@verana-labs/vs-agent-client 2.0.0-dev.8 → 2.0.0-dev.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -111
- package/build/ApiClient.d.ts +12 -39
- package/build/ApiClient.js +13 -40
- package/build/ApiClient.js.map +1 -1
- package/build/api/AgentApi.d.ts +9 -0
- package/build/api/AgentApi.js +19 -0
- package/build/api/AgentApi.js.map +1 -0
- package/build/api/AnoncredsApi.d.ts +15 -0
- package/build/api/AnoncredsApi.js +37 -0
- package/build/api/AnoncredsApi.js.map +1 -0
- package/build/api/AuthApi.d.ts +8 -0
- package/build/api/AuthApi.js +16 -0
- package/build/api/AuthApi.js.map +1 -0
- package/build/api/DidcommApi.d.ts +40 -0
- package/build/api/DidcommApi.js +112 -0
- package/build/api/DidcommApi.js.map +1 -0
- package/build/api/VtApi.d.ts +17 -0
- package/build/api/VtApi.js +51 -0
- package/build/api/VtApi.js.map +1 -0
- package/build/events.d.ts +7 -0
- package/build/events.js +51 -0
- package/build/events.js.map +1 -0
- package/build/http.d.ts +19 -0
- package/build/http.js +61 -0
- package/build/http.js.map +1 -0
- package/build/index.d.ts +7 -3
- package/build/index.js +7 -3
- package/build/index.js.map +1 -1
- package/build/types/agent.d.ts +10 -0
- package/build/types/agent.js +3 -0
- package/build/types/agent.js.map +1 -0
- package/build/types/anoncreds.d.ts +48 -0
- package/build/types/anoncreds.js +3 -0
- package/build/types/anoncreds.js.map +1 -0
- package/build/types/auth.d.ts +17 -0
- package/build/types/auth.js +3 -0
- package/build/types/auth.js.map +1 -0
- package/build/types/common.d.ts +33 -0
- package/build/types/common.js +3 -0
- package/build/types/common.js.map +1 -0
- package/build/types/didcomm.d.ts +258 -0
- package/build/types/didcomm.js +3 -0
- package/build/types/didcomm.js.map +1 -0
- package/build/types/events.d.ts +189 -0
- package/build/types/events.js +3 -0
- package/build/types/events.js.map +1 -0
- package/build/types/index.d.ts +7 -1
- package/build/types/index.js +7 -1
- package/build/types/index.js.map +1 -1
- package/build/types/vt.d.ts +116 -0
- package/build/types/vt.js +3 -0
- package/build/types/vt.js.map +1 -0
- package/package.json +3 -15
- package/build/handlers/ExpressEventHandler.d.ts +0 -71
- package/build/handlers/ExpressEventHandler.js +0 -102
- package/build/handlers/ExpressEventHandler.js.map +0 -1
- package/build/handlers/index.d.ts +0 -1
- package/build/handlers/index.js +0 -18
- package/build/handlers/index.js.map +0 -1
- package/build/services/CredentialTypeService.d.ts +0 -19
- package/build/services/CredentialTypeService.js +0 -66
- package/build/services/CredentialTypeService.js.map +0 -1
- package/build/services/InvitationService.d.ts +0 -16
- package/build/services/InvitationService.js +0 -56
- package/build/services/InvitationService.js.map +0 -1
- package/build/services/MessageService.d.ts +0 -18
- package/build/services/MessageService.js +0 -57
- package/build/services/MessageService.js.map +0 -1
- package/build/services/RevocationRegistryService.d.ts +0 -18
- package/build/services/RevocationRegistryService.js +0 -58
- package/build/services/RevocationRegistryService.js.map +0 -1
- package/build/services/TrustCredentialService.d.ts +0 -33
- package/build/services/TrustCredentialService.js +0 -75
- package/build/services/TrustCredentialService.js.map +0 -1
- package/build/services/index.d.ts +0 -5
- package/build/services/index.js +0 -22
- package/build/services/index.js.map +0 -1
- package/build/types/enums.d.ts +0 -3
- package/build/types/enums.js +0 -9
- package/build/types/enums.js.map +0 -1
- package/build/utils/HttpUtils.d.ts +0 -4
- package/build/utils/HttpUtils.js +0 -18
- package/build/utils/HttpUtils.js.map +0 -1
- package/build/utils/index.d.ts +0 -1
- package/build/utils/index.js +0 -18
- package/build/utils/index.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VtApi = void 0;
|
|
4
|
+
class VtApi {
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
listFlows(query) {
|
|
9
|
+
return this.http.request('GET', '/vt/flows', { query });
|
|
10
|
+
}
|
|
11
|
+
getFlow(participantSessionId) {
|
|
12
|
+
return this.http.request('GET', `/vt/flows/${encodeURIComponent(participantSessionId)}`);
|
|
13
|
+
}
|
|
14
|
+
editCredentialClaims(participantSessionId, body) {
|
|
15
|
+
return this.http.request('PUT', `/vt/flows/${encodeURIComponent(participantSessionId)}/claims`, { body });
|
|
16
|
+
}
|
|
17
|
+
sendOobLink(participantSessionId, body) {
|
|
18
|
+
return this.http.request('POST', `/vt/flows/${encodeURIComponent(participantSessionId)}/oob-link`, {
|
|
19
|
+
body,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
startValidation(participantSessionId, body) {
|
|
23
|
+
return this.http.request('POST', `/vt/flows/${encodeURIComponent(participantSessionId)}/start-validation`, { body });
|
|
24
|
+
}
|
|
25
|
+
validateFlow(participantSessionId, body) {
|
|
26
|
+
return this.http.request('POST', `/vt/flows/${encodeURIComponent(participantSessionId)}/validate`, {
|
|
27
|
+
body,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
rejectFlow(participantSessionId, body) {
|
|
31
|
+
return this.http.request('POST', `/vt/flows/${encodeURIComponent(participantSessionId)}/reject`, {
|
|
32
|
+
body,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
listServiceEndpoints(query) {
|
|
36
|
+
return this.http.request('GET', '/vt/service-endpoints', { query });
|
|
37
|
+
}
|
|
38
|
+
addServiceEndpoint(body) {
|
|
39
|
+
return this.http.request('POST', '/vt/service-endpoints', { body });
|
|
40
|
+
}
|
|
41
|
+
updateServiceEndpoint(serviceEndpointId, body) {
|
|
42
|
+
return this.http.request('PATCH', `/vt/service-endpoints/${encodeURIComponent(serviceEndpointId)}`, {
|
|
43
|
+
body,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
deleteServiceEndpoint(serviceEndpointId) {
|
|
47
|
+
return this.http.request('DELETE', `/vt/service-endpoints/${encodeURIComponent(serviceEndpointId)}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.VtApi = VtApi;
|
|
51
|
+
//# sourceMappingURL=VtApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VtApi.js","sourceRoot":"","sources":["../../src/api/VtApi.ts"],"names":[],"mappings":";;;AAgBA,MAAa,KAAK;IAChB,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,SAAS,CAAC,KAAsB;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IACzD,CAAC;IAEM,OAAO,CAAC,oBAA4B;QACzC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,kBAAkB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAA;IAC1F,CAAC;IAEM,oBAAoB,CACzB,oBAA4B,EAC5B,IAAoB;QAEpB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,kBAAkB,CAAC,oBAAoB,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAC3G,CAAC;IAEM,WAAW,CAAC,oBAA4B,EAAE,IAAqB;QACpE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,kBAAkB,CAAC,oBAAoB,CAAC,WAAW,EAAE;YACjG,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;IAEM,eAAe,CAAC,oBAA4B,EAAE,IAA0B;QAC7E,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,MAAM,EACN,aAAa,kBAAkB,CAAC,oBAAoB,CAAC,mBAAmB,EACxE,EAAE,IAAI,EAAE,CACT,CAAA;IACH,CAAC;IAEM,YAAY,CAAC,oBAA4B,EAAE,IAAuB;QACvE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,kBAAkB,CAAC,oBAAoB,CAAC,WAAW,EAAE;YACjG,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;IAEM,UAAU,CAAC,oBAA4B,EAAE,IAAoB;QAClE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,kBAAkB,CAAC,oBAAoB,CAAC,SAAS,EAAE;YAC/F,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;IAEM,oBAAoB,CAAC,KAAuB;QACjD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,uBAAuB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IACrE,CAAC;IAEM,kBAAkB,CAAC,IAA4B;QACpD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IACrE,CAAC;IAEM,qBAAqB,CAC1B,iBAAyB,EACzB,IAA+B;QAE/B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,yBAAyB,kBAAkB,CAAC,iBAAiB,CAAC,EAAE,EAAE;YAClG,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;IAEM,qBAAqB,CAAC,iBAAyB;QACpD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,yBAAyB,kBAAkB,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAA;IACtG,CAAC;CACF;AAhED,sBAgEC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventEnvelope, EventHandlerFn, EventType, UnknownEventEnvelope } from './types';
|
|
2
|
+
export declare function isEventEnvelope(envelope: EventEnvelope | UnknownEventEnvelope): envelope is EventEnvelope;
|
|
3
|
+
export declare class EventDispatcher {
|
|
4
|
+
private readonly handlers;
|
|
5
|
+
on<T extends EventType>(type: T, handler: EventHandlerFn<T>): this;
|
|
6
|
+
dispatch(envelope: EventEnvelope | UnknownEventEnvelope): Promise<void>;
|
|
7
|
+
}
|
package/build/events.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventDispatcher = void 0;
|
|
4
|
+
exports.isEventEnvelope = isEventEnvelope;
|
|
5
|
+
const EVENT_TYPES = {
|
|
6
|
+
'didcomm.connections.state-updated': true,
|
|
7
|
+
'didcomm.basic-messages.message-received': true,
|
|
8
|
+
'didcomm.receipts.message-receipts-received': true,
|
|
9
|
+
'didcomm.reactions.message-reactions-received': true,
|
|
10
|
+
'didcomm.user-profile.profile-received': true,
|
|
11
|
+
'didcomm.user-profile.request-profile-received': true,
|
|
12
|
+
'didcomm.media-sharing.share-media-received': true,
|
|
13
|
+
'didcomm.media-sharing.request-media-received': true,
|
|
14
|
+
'didcomm.calls.call-offer-received': true,
|
|
15
|
+
'didcomm.calls.call-accept-received': true,
|
|
16
|
+
'didcomm.calls.call-reject-received': true,
|
|
17
|
+
'didcomm.calls.call-end-received': true,
|
|
18
|
+
'didcomm.action-menu.menu-request-received': true,
|
|
19
|
+
'didcomm.action-menu.perform-received': true,
|
|
20
|
+
'didcomm.question-answer.answer-received': true,
|
|
21
|
+
'didcomm.mrtd.mrz-data-received': true,
|
|
22
|
+
'didcomm.mrtd.emrtd-data-received': true,
|
|
23
|
+
'didcomm.mrtd.problem-report-received': true,
|
|
24
|
+
'didcomm.presentations.state-updated': true,
|
|
25
|
+
'didcomm.credential-exchanges.state-updated': true,
|
|
26
|
+
'vt.flows.state-updated': true,
|
|
27
|
+
'vpr.notification': true,
|
|
28
|
+
};
|
|
29
|
+
function isEventEnvelope(envelope) {
|
|
30
|
+
return envelope.type in EVENT_TYPES;
|
|
31
|
+
}
|
|
32
|
+
class EventDispatcher {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.handlers = new Map();
|
|
35
|
+
}
|
|
36
|
+
on(type, handler) {
|
|
37
|
+
var _a;
|
|
38
|
+
const list = (_a = this.handlers.get(type)) !== null && _a !== void 0 ? _a : [];
|
|
39
|
+
list.push(handler);
|
|
40
|
+
this.handlers.set(type, list);
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
async dispatch(envelope) {
|
|
44
|
+
var _a;
|
|
45
|
+
for (const handler of (_a = this.handlers.get(envelope.type)) !== null && _a !== void 0 ? _a : []) {
|
|
46
|
+
await handler(envelope.data, envelope);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.EventDispatcher = EventDispatcher;
|
|
51
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":";;;AA6BA,0CAEC;AA3BD,MAAM,WAAW,GAA4B;IAC3C,mCAAmC,EAAE,IAAI;IACzC,yCAAyC,EAAE,IAAI;IAC/C,4CAA4C,EAAE,IAAI;IAClD,8CAA8C,EAAE,IAAI;IACpD,uCAAuC,EAAE,IAAI;IAC7C,+CAA+C,EAAE,IAAI;IACrD,4CAA4C,EAAE,IAAI;IAClD,8CAA8C,EAAE,IAAI;IACpD,mCAAmC,EAAE,IAAI;IACzC,oCAAoC,EAAE,IAAI;IAC1C,oCAAoC,EAAE,IAAI;IAC1C,iCAAiC,EAAE,IAAI;IACvC,2CAA2C,EAAE,IAAI;IACjD,sCAAsC,EAAE,IAAI;IAC5C,yCAAyC,EAAE,IAAI;IAC/C,gCAAgC,EAAE,IAAI;IACtC,kCAAkC,EAAE,IAAI;IACxC,sCAAsC,EAAE,IAAI;IAC5C,qCAAqC,EAAE,IAAI;IAC3C,4CAA4C,EAAE,IAAI;IAClD,wBAAwB,EAAE,IAAI;IAC9B,kBAAkB,EAAE,IAAI;CACzB,CAAA;AAED,SAAgB,eAAe,CAAC,QAA8C;IAC5E,OAAO,QAAQ,CAAC,IAAI,IAAI,WAAW,CAAA;AACrC,CAAC;AAED,MAAa,eAAe;IAA5B;QACmB,aAAQ,GAAG,IAAI,GAAG,EAAwB,CAAA;IAc7D,CAAC;IAZQ,EAAE,CAAsB,IAAO,EAAE,OAA0B;;QAChE,MAAM,IAAI,GAAG,MAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAA;QAC1C,IAAI,CAAC,IAAI,CAAC,OAAqB,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC7B,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,QAA8C;;QAClE,KAAK,MAAM,OAAO,IAAI,MAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,mCAAI,EAAE,EAAE,CAAC;YAC7D,MAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;CACF;AAfD,0CAeC"}
|
package/build/http.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ApiClientOptions {
|
|
2
|
+
token?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class ApiError extends Error {
|
|
5
|
+
readonly code: string;
|
|
6
|
+
readonly status: number;
|
|
7
|
+
constructor(code: string, status: number, message: string);
|
|
8
|
+
}
|
|
9
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
10
|
+
export interface RequestOptions {
|
|
11
|
+
query?: object;
|
|
12
|
+
body?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare class HttpClient {
|
|
15
|
+
private readonly baseUrl;
|
|
16
|
+
private readonly token?;
|
|
17
|
+
constructor(baseUrl: string, options: ApiClientOptions);
|
|
18
|
+
request<T>(method: HttpMethod, path: string, options?: RequestOptions): Promise<T>;
|
|
19
|
+
}
|
package/build/http.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpClient = exports.ApiError = void 0;
|
|
4
|
+
class ApiError extends Error {
|
|
5
|
+
constructor(code, status, message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.code = code;
|
|
8
|
+
this.status = status;
|
|
9
|
+
this.name = 'ApiError';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ApiError = ApiError;
|
|
13
|
+
class HttpClient {
|
|
14
|
+
constructor(baseUrl, options) {
|
|
15
|
+
this.baseUrl = `${baseUrl.replace(/\/+$/, '')}/v2`;
|
|
16
|
+
this.token = options.token;
|
|
17
|
+
}
|
|
18
|
+
async request(method, path, options = {}) {
|
|
19
|
+
const headers = { Accept: 'application/json' };
|
|
20
|
+
if (options.body !== undefined)
|
|
21
|
+
headers['Content-Type'] = 'application/json';
|
|
22
|
+
if (this.token)
|
|
23
|
+
headers.Authorization = `Bearer ${this.token}`;
|
|
24
|
+
const response = await fetch(`${this.baseUrl}${path}${toQueryString(options.query)}`, {
|
|
25
|
+
method,
|
|
26
|
+
headers,
|
|
27
|
+
body: options.body === undefined ? undefined : JSON.stringify(options.body),
|
|
28
|
+
});
|
|
29
|
+
const text = await response.text();
|
|
30
|
+
if (response.ok)
|
|
31
|
+
return (text === '' ? undefined : JSON.parse(text));
|
|
32
|
+
const error = parseErrorEnvelope(text);
|
|
33
|
+
throw error
|
|
34
|
+
? new ApiError(error.code, response.status, error.message)
|
|
35
|
+
: new ApiError('HTTP_ERROR', response.status, response.statusText);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.HttpClient = HttpClient;
|
|
39
|
+
function toQueryString(query) {
|
|
40
|
+
if (!query)
|
|
41
|
+
return '';
|
|
42
|
+
const params = new URLSearchParams();
|
|
43
|
+
for (const [key, value] of Object.entries(query)) {
|
|
44
|
+
if (value !== undefined)
|
|
45
|
+
params.set(key, String(value));
|
|
46
|
+
}
|
|
47
|
+
const encoded = params.toString();
|
|
48
|
+
return encoded === '' ? '' : `?${encoded}`;
|
|
49
|
+
}
|
|
50
|
+
function parseErrorEnvelope(text) {
|
|
51
|
+
try {
|
|
52
|
+
const { error } = JSON.parse(text);
|
|
53
|
+
return typeof (error === null || error === void 0 ? void 0 : error.code) === 'string' && typeof error.message === 'string'
|
|
54
|
+
? { code: error.code, message: error.message }
|
|
55
|
+
: undefined;
|
|
56
|
+
}
|
|
57
|
+
catch (_a) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"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"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export * from './ApiClient';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './api/AgentApi';
|
|
3
|
+
export * from './api/AnoncredsApi';
|
|
4
|
+
export * from './api/AuthApi';
|
|
5
|
+
export * from './api/DidcommApi';
|
|
6
|
+
export * from './api/VtApi';
|
|
7
|
+
export * from './events';
|
|
8
|
+
export * from './http';
|
|
4
9
|
export * from './types';
|
|
5
|
-
export * from './utils';
|
package/build/index.js
CHANGED
|
@@ -15,8 +15,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ApiClient"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./api/AgentApi"), exports);
|
|
19
|
+
__exportStar(require("./api/AnoncredsApi"), exports);
|
|
20
|
+
__exportStar(require("./api/AuthApi"), exports);
|
|
21
|
+
__exportStar(require("./api/DidcommApi"), exports);
|
|
22
|
+
__exportStar(require("./api/VtApi"), exports);
|
|
23
|
+
__exportStar(require("./events"), exports);
|
|
24
|
+
__exportStar(require("./http"), exports);
|
|
20
25
|
__exportStar(require("./types"), exports);
|
|
21
|
-
__exportStar(require("./utils"), exports);
|
|
22
26
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,iDAA8B;AAC9B,qDAAkC;AAClC,gDAA6B;AAC7B,mDAAgC;AAChC,8CAA2B;AAC3B,2CAAwB;AACxB,yCAAsB;AACtB,0CAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/types/agent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PaginationQuery } from './common';
|
|
2
|
+
export interface CredentialDefinition {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
attributes: string[];
|
|
7
|
+
supportRevocation: boolean;
|
|
8
|
+
relatedJsonSchemaCredentialId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CreateCredentialDefinitionBody {
|
|
11
|
+
relatedJsonSchemaCredentialId: string;
|
|
12
|
+
supportRevocation?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CredentialDefinitionPackageData {
|
|
15
|
+
name?: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
relatedJsonSchemaCredentialId?: string;
|
|
18
|
+
credentialDefinition?: unknown;
|
|
19
|
+
credentialDefinitionPrivate?: Record<string, unknown>;
|
|
20
|
+
keyCorrectnessProof?: Record<string, unknown>;
|
|
21
|
+
schema?: unknown;
|
|
22
|
+
}
|
|
23
|
+
export interface CredentialDefinitionPackage {
|
|
24
|
+
id: string;
|
|
25
|
+
data: CredentialDefinitionPackageData;
|
|
26
|
+
}
|
|
27
|
+
export interface DeleteCredentialDefinitionQuery {
|
|
28
|
+
deleteAssociatedRevocationRegistries?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface ListRevocationRegistriesQuery extends PaginationQuery {
|
|
31
|
+
credentialDefinitionId?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CreateRevocationRegistryBody {
|
|
34
|
+
credentialDefinitionId: string;
|
|
35
|
+
maximumCredentialNumber?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface CreateRevocationRegistryResponse {
|
|
38
|
+
revocationRegistryDefinitionId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface RevokeCredentialBody {
|
|
41
|
+
revocationRegistryDefinitionId: string;
|
|
42
|
+
revocationRegistryIndex: number;
|
|
43
|
+
}
|
|
44
|
+
export interface RevokeCredentialResponse {
|
|
45
|
+
revocationRegistryDefinitionId: string;
|
|
46
|
+
revocationRegistryIndex: number;
|
|
47
|
+
revokedAt: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anoncreds.js","sourceRoot":"","sources":["../../src/types/anoncreds.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ChallengeRequest {
|
|
2
|
+
account: string;
|
|
3
|
+
}
|
|
4
|
+
export interface ChallengeResponse {
|
|
5
|
+
nonce: string;
|
|
6
|
+
expiresAt: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TokenRequest {
|
|
9
|
+
account: string;
|
|
10
|
+
pubKey: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
nonce: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TokenResponse {
|
|
15
|
+
token: string;
|
|
16
|
+
expiresAt: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface PaginationQuery {
|
|
2
|
+
limit?: number;
|
|
3
|
+
cursor?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Page<T> {
|
|
6
|
+
items: T[];
|
|
7
|
+
nextCursor: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface SentMessage {
|
|
10
|
+
id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Claim {
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RequestedCredential {
|
|
18
|
+
credentialDefinitionId?: string;
|
|
19
|
+
jsonSchemaCredentialId?: string;
|
|
20
|
+
attributes?: string[];
|
|
21
|
+
}
|
|
22
|
+
export type DidExchangeState = 'start' | 'invitation-sent' | 'invitation-received' | 'request-sent' | 'request-received' | 'response-sent' | 'response-received' | 'abandoned' | 'completed';
|
|
23
|
+
export type DidExchangeRole = 'requester' | 'responder';
|
|
24
|
+
export type BasicMessageRole = 'sender' | 'receiver';
|
|
25
|
+
export type ProofState = 'proposal-sent' | 'proposal-received' | 'request-sent' | 'request-received' | 'presentation-sent' | 'presentation-received' | 'declined' | 'abandoned' | 'done';
|
|
26
|
+
export type ProofRole = 'verifier' | 'prover';
|
|
27
|
+
export type CredentialState = 'proposal-sent' | 'proposal-received' | 'offer-sent' | 'offer-received' | 'declined' | 'request-sent' | 'request-received' | 'credential-issued' | 'credential-received' | 'done' | 'abandoned';
|
|
28
|
+
export type CredentialRole = 'issuer' | 'holder';
|
|
29
|
+
export type DidCommVersion = 'v1' | 'v2';
|
|
30
|
+
export type VtFlowRole = 'applicant' | 'validator';
|
|
31
|
+
export type VtFlowVariant = 'onboarding-process' | 'direct-issuance';
|
|
32
|
+
export type VtFlowState = 'AWAITING_OP' | 'OR_SENT' | 'AWAITING_OR' | 'IR_SENT' | 'AWAITING_IR' | 'OOB_PENDING' | 'VALIDATING' | 'AWAITING_VALIDATION_TX' | 'VALIDATION_TX_SUBMITTED' | 'VALIDATION_TX_FAILED' | 'VALIDATED' | 'VALIDATED_PENDING_CLAIMS' | 'CRED_OFFERED' | 'COMPLETED' | 'CRED_REVOKED' | 'TERMINATED_BY_VALIDATOR' | 'TERMINATED_BY_APPLICANT' | 'ERROR' | 'PARTICIPANT_REVOKED' | 'PARTICIPANT_SLASHED';
|
|
33
|
+
export type VtConnectionState = 'NOT_CONNECTED' | 'ESTABLISHED' | 'TERMINATED';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { BasicMessageRole, Claim, CredentialRole, CredentialState, DidCommVersion, DidExchangeRole, DidExchangeState, PaginationQuery, ProofRole, ProofState, RequestedCredential } from './common';
|
|
2
|
+
export interface ProtocolModule {
|
|
3
|
+
module: string;
|
|
4
|
+
protocols: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ConnectionRecord {
|
|
7
|
+
id: string;
|
|
8
|
+
state: DidExchangeState;
|
|
9
|
+
role: DidExchangeRole;
|
|
10
|
+
did?: string;
|
|
11
|
+
theirDid?: string;
|
|
12
|
+
theirLabel?: string;
|
|
13
|
+
alias?: string;
|
|
14
|
+
threadId?: string;
|
|
15
|
+
imageUrl?: string;
|
|
16
|
+
outOfBandId: string | null;
|
|
17
|
+
parentConnectionId: string | null;
|
|
18
|
+
invitationDid?: string;
|
|
19
|
+
didcommVersion?: DidCommVersion;
|
|
20
|
+
mediatorId?: string;
|
|
21
|
+
previousDids?: string[];
|
|
22
|
+
previousTheirDids?: string[];
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ListConnectionsQuery extends PaginationQuery {
|
|
27
|
+
outOfBandId?: string;
|
|
28
|
+
parentConnectionId?: string;
|
|
29
|
+
state?: DidExchangeState;
|
|
30
|
+
role?: DidExchangeRole;
|
|
31
|
+
did?: string;
|
|
32
|
+
theirDid?: string;
|
|
33
|
+
threadId?: string;
|
|
34
|
+
invitationDid?: string;
|
|
35
|
+
didcommVersion?: DidCommVersion;
|
|
36
|
+
mediatorId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface SendInvitationBody {
|
|
39
|
+
connectionId: string;
|
|
40
|
+
did?: string;
|
|
41
|
+
label?: string;
|
|
42
|
+
imageUrl?: string;
|
|
43
|
+
goal?: string;
|
|
44
|
+
goalCode?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface SendInvitationResponse {
|
|
47
|
+
id: string;
|
|
48
|
+
outOfBandId?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface SendBasicMessageBody {
|
|
51
|
+
connectionId: string;
|
|
52
|
+
content: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ListBasicMessagesQuery extends PaginationQuery {
|
|
55
|
+
connectionId?: string;
|
|
56
|
+
role?: BasicMessageRole;
|
|
57
|
+
}
|
|
58
|
+
export interface BasicMessageRecord {
|
|
59
|
+
id: string;
|
|
60
|
+
connectionId: string;
|
|
61
|
+
role: BasicMessageRole;
|
|
62
|
+
content: string;
|
|
63
|
+
sentTime: string;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
}
|
|
66
|
+
export type MessageState = 'created' | 'submitted' | 'received' | 'viewed' | 'deleted';
|
|
67
|
+
export interface MessageReceipt {
|
|
68
|
+
messageId: string;
|
|
69
|
+
state: MessageState;
|
|
70
|
+
timestamp?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface SendReceiptsBody {
|
|
73
|
+
connectionId: string;
|
|
74
|
+
receipts: MessageReceipt[];
|
|
75
|
+
}
|
|
76
|
+
export type MessageReactionAction = 'react' | 'unreact';
|
|
77
|
+
export interface MessageReaction {
|
|
78
|
+
messageId: string;
|
|
79
|
+
emoji: string;
|
|
80
|
+
action: MessageReactionAction;
|
|
81
|
+
timestamp?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface SendReactionsBody {
|
|
84
|
+
connectionId: string;
|
|
85
|
+
reactions: MessageReaction[];
|
|
86
|
+
}
|
|
87
|
+
export interface ProfilePicture {
|
|
88
|
+
mimeType?: string;
|
|
89
|
+
links?: string[];
|
|
90
|
+
base64?: string;
|
|
91
|
+
}
|
|
92
|
+
export interface UserProfile {
|
|
93
|
+
displayName?: string;
|
|
94
|
+
displayPicture?: ProfilePicture;
|
|
95
|
+
displayIcon?: ProfilePicture;
|
|
96
|
+
description?: string;
|
|
97
|
+
preferredLanguage?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface SendProfileBody {
|
|
100
|
+
connectionId: string;
|
|
101
|
+
profile?: UserProfile;
|
|
102
|
+
sendBackYours?: boolean;
|
|
103
|
+
threadId?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface RequestProfileBody {
|
|
106
|
+
connectionId: string;
|
|
107
|
+
query?: string[];
|
|
108
|
+
}
|
|
109
|
+
export interface MediaCiphering {
|
|
110
|
+
algorithm: string;
|
|
111
|
+
parameters: Record<string, unknown>;
|
|
112
|
+
}
|
|
113
|
+
export interface SharedMediaItem {
|
|
114
|
+
id?: string;
|
|
115
|
+
uri: string;
|
|
116
|
+
mimeType: string;
|
|
117
|
+
fileName?: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
byteCount?: number;
|
|
120
|
+
ciphering?: MediaCiphering;
|
|
121
|
+
metadata?: Record<string, unknown>;
|
|
122
|
+
}
|
|
123
|
+
export interface ShareMediaBody {
|
|
124
|
+
connectionId: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
threadId?: string;
|
|
127
|
+
items: SharedMediaItem[];
|
|
128
|
+
}
|
|
129
|
+
export type CallType = 'audio' | 'video' | 'service';
|
|
130
|
+
export interface OfferCallBody {
|
|
131
|
+
connectionId: string;
|
|
132
|
+
callType: CallType;
|
|
133
|
+
parameters: Record<string, unknown>;
|
|
134
|
+
description?: string;
|
|
135
|
+
offerStartTime?: string;
|
|
136
|
+
offerExpirationTime?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface CallThreadBody {
|
|
139
|
+
connectionId: string;
|
|
140
|
+
threadId: string;
|
|
141
|
+
}
|
|
142
|
+
export interface AcceptCallBody extends CallThreadBody {
|
|
143
|
+
parameters: Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
export type ActionMenuFormInputType = 'text';
|
|
146
|
+
export interface ActionMenuFormParameter {
|
|
147
|
+
name: string;
|
|
148
|
+
title: string;
|
|
149
|
+
description: string;
|
|
150
|
+
default?: string;
|
|
151
|
+
required?: boolean;
|
|
152
|
+
type?: ActionMenuFormInputType;
|
|
153
|
+
}
|
|
154
|
+
export interface ActionMenuForm {
|
|
155
|
+
description: string;
|
|
156
|
+
submitLabel: string;
|
|
157
|
+
params: ActionMenuFormParameter[];
|
|
158
|
+
}
|
|
159
|
+
export interface ActionMenuOption {
|
|
160
|
+
name: string;
|
|
161
|
+
title: string;
|
|
162
|
+
description: string;
|
|
163
|
+
disabled?: boolean;
|
|
164
|
+
form?: ActionMenuForm;
|
|
165
|
+
}
|
|
166
|
+
export interface ActionMenu {
|
|
167
|
+
title: string;
|
|
168
|
+
description: string;
|
|
169
|
+
options: ActionMenuOption[];
|
|
170
|
+
}
|
|
171
|
+
export interface SendMenuBody {
|
|
172
|
+
connectionId: string;
|
|
173
|
+
menu: ActionMenu;
|
|
174
|
+
}
|
|
175
|
+
export interface ValidResponse {
|
|
176
|
+
text: string;
|
|
177
|
+
}
|
|
178
|
+
export interface SendQuestionBody {
|
|
179
|
+
connectionId: string;
|
|
180
|
+
question: string;
|
|
181
|
+
validResponses: ValidResponse[];
|
|
182
|
+
detail?: string;
|
|
183
|
+
}
|
|
184
|
+
export interface RequestMrtdBody {
|
|
185
|
+
connectionId: string;
|
|
186
|
+
}
|
|
187
|
+
export interface PresentationRecord {
|
|
188
|
+
proofExchangeId: string;
|
|
189
|
+
state: ProofState;
|
|
190
|
+
role: ProofRole;
|
|
191
|
+
connectionId?: string;
|
|
192
|
+
requestedCredentials: RequestedCredential[];
|
|
193
|
+
claims: Claim[];
|
|
194
|
+
verified: boolean;
|
|
195
|
+
threadId?: string;
|
|
196
|
+
errorMessage?: string;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
}
|
|
200
|
+
export interface RequestedCredentialInput {
|
|
201
|
+
credentialDefinitionId?: string;
|
|
202
|
+
jsonSchemaCredentialId?: string;
|
|
203
|
+
attributes?: string[];
|
|
204
|
+
}
|
|
205
|
+
export interface CreatePresentationRequestBody {
|
|
206
|
+
requestedCredentials: RequestedCredentialInput[];
|
|
207
|
+
/** An established connection to send the request on, in place of an invitation. */
|
|
208
|
+
connectionId?: string;
|
|
209
|
+
requireNonRevocation?: boolean;
|
|
210
|
+
autoAccept?: boolean;
|
|
211
|
+
/** The agent ignores it when `connectionId` is present. */
|
|
212
|
+
useLegacyDid?: boolean;
|
|
213
|
+
/** The agent ignores it when `connectionId` is present. */
|
|
214
|
+
didcommVersion?: DidCommVersion;
|
|
215
|
+
}
|
|
216
|
+
export interface CreatePresentationRequestResponse {
|
|
217
|
+
proofExchangeId: string;
|
|
218
|
+
/** Absent when the request named a `connectionId`. */
|
|
219
|
+
invitation?: Record<string, unknown>;
|
|
220
|
+
/** Absent when the request named a `connectionId`. */
|
|
221
|
+
shortUrl?: string;
|
|
222
|
+
}
|
|
223
|
+
export interface DeclineExchangeBody {
|
|
224
|
+
reason?: string;
|
|
225
|
+
}
|
|
226
|
+
export interface CredentialExchangeRecord {
|
|
227
|
+
credentialExchangeId: string;
|
|
228
|
+
state: CredentialState;
|
|
229
|
+
role: CredentialRole;
|
|
230
|
+
threadId: string;
|
|
231
|
+
connectionId?: string;
|
|
232
|
+
credentialDefinitionId?: string;
|
|
233
|
+
schemaId?: string;
|
|
234
|
+
claims: Claim[];
|
|
235
|
+
errorMessage?: string;
|
|
236
|
+
createdAt: string;
|
|
237
|
+
updatedAt: string;
|
|
238
|
+
}
|
|
239
|
+
export interface CreateCredentialOfferBody {
|
|
240
|
+
credentialDefinitionId: string;
|
|
241
|
+
claims: Claim[];
|
|
242
|
+
/** An established connection to send the offer on, in place of an invitation. */
|
|
243
|
+
connectionId?: string;
|
|
244
|
+
revocationRegistryDefinitionId?: string;
|
|
245
|
+
revocationRegistryIndex?: number;
|
|
246
|
+
autoAccept?: boolean;
|
|
247
|
+
/** The agent ignores it when `connectionId` is present. */
|
|
248
|
+
useLegacyDid?: boolean;
|
|
249
|
+
/** The agent ignores it when `connectionId` is present. */
|
|
250
|
+
didcommVersion?: DidCommVersion;
|
|
251
|
+
}
|
|
252
|
+
export interface CreateCredentialOfferResponse {
|
|
253
|
+
credentialExchangeId: string;
|
|
254
|
+
/** Absent when the request named a `connectionId`. */
|
|
255
|
+
invitation?: Record<string, unknown>;
|
|
256
|
+
/** Absent when the request named a `connectionId`. */
|
|
257
|
+
shortUrl?: string;
|
|
258
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"didcomm.js","sourceRoot":"","sources":["../../src/types/didcomm.ts"],"names":[],"mappings":""}
|