@verana-labs/vs-agent-model 2.0.0-dev.9 → 2.0.0-dev.90
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 +9 -79
- package/build/events/EventType.d.ts +7 -6
- package/build/events/EventType.js +7 -6
- package/build/events/EventType.js.map +1 -1
- package/build/events/IndexerNotification.d.ts +19 -10
- package/build/events/IndexerNotification.js +12 -17
- package/build/events/IndexerNotification.js.map +1 -1
- package/build/events/VtFlowStateUpdated.d.ts +1 -27
- package/build/events/VtFlowStateUpdated.js +2 -88
- package/build/events/VtFlowStateUpdated.js.map +1 -1
- package/build/events/index.d.ts +0 -1
- package/build/events/index.js +0 -1
- package/build/events/index.js.map +1 -1
- package/build/messages/InvitationMessage.d.ts +3 -0
- package/build/messages/InvitationMessage.js +3 -0
- package/build/messages/InvitationMessage.js.map +1 -1
- package/build/types.d.ts +33 -11
- package/build/utils/ecs.d.ts +20 -0
- package/build/utils/ecs.js +69 -7
- package/build/utils/ecs.js.map +1 -1
- package/package.json +4 -4
- package/build/events/MessageStateUpdated.d.ts +0 -17
- package/build/events/MessageStateUpdated.js +0 -48
- package/build/events/MessageStateUpdated.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,93 +1,23 @@
|
|
|
1
1
|
`@verana-labs/vs-agent-model`
|
|
2
|
-
# VS Agent Model
|
|
3
|
-
|
|
4
|
-
This package provides the data models used by **VS Agent** and its related services and libraries within the `@verana-labs` ecosystem. These models are essential for chatbot development and facilitate integration with the broader system.
|
|
5
|
-
|
|
6
|
-
## Packages Using This Library
|
|
7
|
-
|
|
8
|
-
The models in this package are used by the following services and libraries:
|
|
9
|
-
|
|
10
|
-
- **[@verana-labs/vs-agent](../../apps/vs-agent/README.md)** – VS Agent.
|
|
11
|
-
- **[@verana-labs/vs-agent-nestjs-client](../nestjs-client/README.md)** – A NestJS client for interacting with VS Agent.
|
|
12
|
-
- **[@verana-labs/vs-agent-client](../client/README.md)** – A general-purpose API client for VS Agent.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
This package defines essential models that support structured communication and event handling within the VS Agent ecosystem. It is designed to be used by chatbot services and other integrations that rely on a standardized message format.
|
|
18
|
-
|
|
19
|
-
## How to work
|
|
20
|
-
```mermaid
|
|
21
|
-
classDiagram
|
|
22
|
-
class VsAgent {
|
|
23
|
-
+ Handles DIDComm communication
|
|
24
|
-
+ Manages agent wallet and credentials
|
|
25
|
-
+ Exposes API for client interactions
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
class NestJSClient {
|
|
29
|
-
+ Plug-and-play integration
|
|
30
|
-
+ Selectable modules for various services
|
|
31
|
-
+ Modules:
|
|
32
|
-
-- MessageEventOptions: Configures message event handling
|
|
33
|
-
-- ConnectionEventOptions: Configures connection event handling
|
|
34
|
-
-- CredentialOptions: Configures credential management
|
|
35
|
-
-- StatsOptions: Configures stats management
|
|
36
|
-
}
|
|
37
2
|
|
|
38
|
-
|
|
39
|
-
+ Directly manages requests to SA
|
|
40
|
-
+ Facilitates reception of requests from modules
|
|
41
|
-
+ Provides an abstraction for service communication
|
|
42
|
-
+ Interfaces:
|
|
43
|
-
-- messages
|
|
44
|
-
-- credentialTypes
|
|
45
|
-
-- revocationRegistries
|
|
46
|
-
-- invitations
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
class ModelLibrary {
|
|
50
|
-
+ Defines required data models
|
|
51
|
-
+ Ensures type safety across services
|
|
52
|
-
}
|
|
3
|
+
# VS Agent Model
|
|
53
4
|
|
|
54
|
-
|
|
55
|
-
NestJSClient --> VsAgent : Uses
|
|
56
|
-
Client --> VsAgent : Sends requests
|
|
57
|
-
Client --> VsAgent : Receives requests
|
|
58
|
-
Client --> ModelLibrary : Uses models
|
|
59
|
-
ModelLibrary --> VsAgent : Provides data models
|
|
60
|
-
NestJSClient --> ModelLibrary : Uses models
|
|
5
|
+
Shared types for [VS Agent](../../apps/vs-agent/README.md), the SDK and the DIDComm plugins: the legacy message classes and event payloads the agent emits in process, plus `StatEnum` and `StatEvent` used by the [NestJS client](../nestjs-client/README.md) stats producer. The [API client](../client/README.md) does not depend on this package.
|
|
61
6
|
|
|
62
|
-
|
|
63
|
-
style ModelLibrary stroke:#333,stroke-width:4px
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Installation
|
|
7
|
+
## Installation
|
|
67
8
|
|
|
68
|
-
```sh
|
|
69
|
-
npm install @verana-labs/vs-agent-model
|
|
70
|
-
```
|
|
71
|
-
or
|
|
72
|
-
```sh
|
|
73
|
-
yarn add @verana-labs/vs-agent-model
|
|
74
|
-
or
|
|
75
9
|
```sh
|
|
76
10
|
pnpm add @verana-labs/vs-agent-model
|
|
77
11
|
```
|
|
78
12
|
|
|
79
13
|
## Example
|
|
80
14
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```typescript
|
|
84
|
-
import { CallOfferRequestMessage } from '@verana-labs/vs-agent-model';
|
|
15
|
+
```ts
|
|
16
|
+
import { CallOfferRequestMessage } from '@verana-labs/vs-agent-model'
|
|
85
17
|
|
|
86
18
|
const callOffer = new CallOfferRequestMessage({
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
console.log(callOffer);
|
|
19
|
+
connectionId: 'connectionId',
|
|
20
|
+
description: 'Start call',
|
|
21
|
+
parameters: { wsUrl, roomId, peerId },
|
|
22
|
+
})
|
|
93
23
|
```
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare enum EventType {
|
|
2
|
-
ConnectionStateUpdated = "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
PresentationStateUpdated = "
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
ConnectionStateUpdated = "didcomm.connections.state-updated",
|
|
3
|
+
MessageReceived = "didcomm.basic-messages.message-received",
|
|
4
|
+
ReceiptsMessageReceived = "didcomm.receipts.message-receipts-received",
|
|
5
|
+
PresentationStateUpdated = "didcomm.presentations.state-updated",
|
|
6
|
+
CredentialExchangeStateUpdated = "didcomm.credential-exchanges.state-updated",
|
|
7
|
+
VtFlowStateUpdated = "vt.flows.state-updated",
|
|
8
|
+
IndexerNotification = "vpr.notification"
|
|
8
9
|
}
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EventType = void 0;
|
|
4
4
|
var EventType;
|
|
5
5
|
(function (EventType) {
|
|
6
|
-
EventType["ConnectionStateUpdated"] = "
|
|
7
|
-
EventType["
|
|
8
|
-
EventType["
|
|
9
|
-
EventType["PresentationStateUpdated"] = "
|
|
10
|
-
EventType["
|
|
11
|
-
EventType["
|
|
6
|
+
EventType["ConnectionStateUpdated"] = "didcomm.connections.state-updated";
|
|
7
|
+
EventType["MessageReceived"] = "didcomm.basic-messages.message-received";
|
|
8
|
+
EventType["ReceiptsMessageReceived"] = "didcomm.receipts.message-receipts-received";
|
|
9
|
+
EventType["PresentationStateUpdated"] = "didcomm.presentations.state-updated";
|
|
10
|
+
EventType["CredentialExchangeStateUpdated"] = "didcomm.credential-exchanges.state-updated";
|
|
11
|
+
EventType["VtFlowStateUpdated"] = "vt.flows.state-updated";
|
|
12
|
+
EventType["IndexerNotification"] = "vpr.notification";
|
|
12
13
|
})(EventType || (exports.EventType = EventType = {}));
|
|
13
14
|
//# sourceMappingURL=EventType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventType.js","sourceRoot":"","sources":["../../src/events/EventType.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"EventType.js","sourceRoot":"","sources":["../../src/events/EventType.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,yEAA4D,CAAA;IAC5D,wEAA2D,CAAA;IAC3D,mFAAsE,CAAA;IACtE,6EAAgE,CAAA;IAChE,0FAA6E,CAAA;IAC7E,0DAA6C,CAAA;IAC7C,qDAAwC,CAAA;AAC1C,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB"}
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { Event } from './Event';
|
|
2
2
|
import { EventType } from './EventType';
|
|
3
|
+
export interface IndexerNotificationPayload {
|
|
4
|
+
module: string;
|
|
5
|
+
action: string;
|
|
6
|
+
messageType: string;
|
|
7
|
+
txIndex: number;
|
|
8
|
+
messageIndex: number;
|
|
9
|
+
sender: string;
|
|
10
|
+
relatedDids: string[];
|
|
11
|
+
entityType?: string;
|
|
12
|
+
entityId?: string;
|
|
13
|
+
}
|
|
3
14
|
export interface IndexerNotificationOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
entityId: string;
|
|
7
|
-
changes: Record<string, unknown>;
|
|
15
|
+
eventType: string;
|
|
16
|
+
did: string;
|
|
8
17
|
blockHeight: number;
|
|
9
18
|
txHash: string;
|
|
10
|
-
|
|
19
|
+
payload: IndexerNotificationPayload;
|
|
20
|
+
changes?: Record<string, unknown>;
|
|
11
21
|
timestamp?: Date;
|
|
12
22
|
}
|
|
13
23
|
export declare class IndexerNotification extends Event {
|
|
14
24
|
constructor(options: IndexerNotificationOptions);
|
|
15
25
|
readonly type = EventType.IndexerNotification;
|
|
16
26
|
static readonly type = EventType.IndexerNotification;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
entityId: string;
|
|
20
|
-
changes: Record<string, unknown>;
|
|
27
|
+
eventType: string;
|
|
28
|
+
did: string;
|
|
21
29
|
blockHeight: number;
|
|
22
30
|
txHash: string;
|
|
23
|
-
|
|
31
|
+
payload: IndexerNotificationPayload;
|
|
32
|
+
changes?: Record<string, unknown>;
|
|
24
33
|
}
|
|
@@ -19,14 +19,13 @@ class IndexerNotification extends Event_1.Event {
|
|
|
19
19
|
super();
|
|
20
20
|
this.type = IndexerNotification.type;
|
|
21
21
|
if (options) {
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.entityId = options.entityId;
|
|
25
|
-
this.changes = options.changes;
|
|
22
|
+
this.eventType = options.eventType;
|
|
23
|
+
this.did = options.did;
|
|
26
24
|
this.blockHeight = options.blockHeight;
|
|
27
25
|
this.txHash = options.txHash;
|
|
28
|
-
this.operatorAddress = options.operatorAddress;
|
|
29
26
|
this.timestamp = (_a = options.timestamp) !== null && _a !== void 0 ? _a : new Date();
|
|
27
|
+
this.payload = options.payload;
|
|
28
|
+
this.changes = options.changes;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
}
|
|
@@ -35,19 +34,11 @@ IndexerNotification.type = EventType_1.EventType.IndexerNotification;
|
|
|
35
34
|
__decorate([
|
|
36
35
|
(0, class_transformer_1.Expose)(),
|
|
37
36
|
__metadata("design:type", String)
|
|
38
|
-
], IndexerNotification.prototype, "
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, class_transformer_1.Expose)(),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], IndexerNotification.prototype, "entityType", void 0);
|
|
37
|
+
], IndexerNotification.prototype, "eventType", void 0);
|
|
43
38
|
__decorate([
|
|
44
39
|
(0, class_transformer_1.Expose)(),
|
|
45
40
|
__metadata("design:type", String)
|
|
46
|
-
], IndexerNotification.prototype, "
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_transformer_1.Expose)(),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], IndexerNotification.prototype, "changes", void 0);
|
|
41
|
+
], IndexerNotification.prototype, "did", void 0);
|
|
51
42
|
__decorate([
|
|
52
43
|
(0, class_transformer_1.Expose)(),
|
|
53
44
|
__metadata("design:type", Number)
|
|
@@ -58,6 +49,10 @@ __decorate([
|
|
|
58
49
|
], IndexerNotification.prototype, "txHash", void 0);
|
|
59
50
|
__decorate([
|
|
60
51
|
(0, class_transformer_1.Expose)(),
|
|
61
|
-
__metadata("design:type",
|
|
62
|
-
], IndexerNotification.prototype, "
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], IndexerNotification.prototype, "payload", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], IndexerNotification.prototype, "changes", void 0);
|
|
63
58
|
//# sourceMappingURL=IndexerNotification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexerNotification.js","sourceRoot":"","sources":["../../src/events/IndexerNotification.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA0C;AAE1C,mCAA+B;AAC/B,2CAAuC;
|
|
1
|
+
{"version":3,"file":"IndexerNotification.js","sourceRoot":"","sources":["../../src/events/IndexerNotification.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA0C;AAE1C,mCAA+B;AAC/B,2CAAuC;AAwBvC,MAAa,mBAAoB,SAAQ,aAAK;IAC5C,YAAmB,OAAmC;;QACpD,KAAK,EAAE,CAAA;QAaO,SAAI,GAAG,mBAAmB,CAAC,IAAI,CAAA;QAX7C,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;YAClC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;YACtB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;YACtC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;YAC5B,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAA;YAChD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAChC,CAAC;IACH,CAAC;;AAbH,kDAmCC;AAnBwB,wBAAI,GAAG,qBAAS,CAAC,mBAAmB,AAAhC,CAAgC;AAGpD;IADN,IAAA,0BAAM,GAAE;;sDACgB;AAGlB;IADN,IAAA,0BAAM,GAAE;;gDACU;AAGZ;IADN,IAAA,0BAAM,GAAE;;wDACkB;AAGpB;IADN,IAAA,0BAAM,GAAE;;mDACa;AAGf;IADN,IAAA,0BAAM,GAAE;;oDACkC;AAGpC;IADN,IAAA,0BAAM,GAAE;;oDAC+B"}
|
|
@@ -2,21 +2,8 @@ import { Event } from './Event';
|
|
|
2
2
|
import { EventType } from './EventType';
|
|
3
3
|
export interface VtFlowStateUpdatedOptions {
|
|
4
4
|
vtFlowRecordId: string;
|
|
5
|
-
threadId: string;
|
|
6
|
-
participantSessionId: string;
|
|
7
|
-
connectionId: string;
|
|
8
|
-
role: string;
|
|
9
|
-
variant: string;
|
|
10
5
|
state: string;
|
|
11
6
|
previousState?: string | null;
|
|
12
|
-
participantId?: string;
|
|
13
|
-
schemaId?: string;
|
|
14
|
-
claims?: Record<string, unknown>;
|
|
15
|
-
credentialExchangeRecordId?: string;
|
|
16
|
-
errorMessage?: string;
|
|
17
|
-
subprotocolThid?: string;
|
|
18
|
-
agentParticipantId?: string;
|
|
19
|
-
walletAgentParticipantId?: string;
|
|
20
7
|
timestamp?: Date;
|
|
21
8
|
}
|
|
22
9
|
export declare class VtFlowStateUpdated extends Event {
|
|
@@ -24,19 +11,6 @@ export declare class VtFlowStateUpdated extends Event {
|
|
|
24
11
|
readonly type = EventType.VtFlowStateUpdated;
|
|
25
12
|
static readonly type = EventType.VtFlowStateUpdated;
|
|
26
13
|
vtFlowRecordId: string;
|
|
27
|
-
threadId: string;
|
|
28
|
-
participantSessionId: string;
|
|
29
|
-
connectionId: string;
|
|
30
|
-
role: string;
|
|
31
|
-
variant: string;
|
|
32
14
|
state: string;
|
|
33
|
-
previousState
|
|
34
|
-
participantId?: string;
|
|
35
|
-
schemaId?: string;
|
|
36
|
-
claims?: Record<string, unknown>;
|
|
37
|
-
credentialExchangeRecordId?: string;
|
|
38
|
-
errorMessage?: string;
|
|
39
|
-
subprotocolThid?: string;
|
|
40
|
-
agentParticipantId?: string;
|
|
41
|
-
walletAgentParticipantId?: string;
|
|
15
|
+
previousState: string | null;
|
|
42
16
|
}
|
|
@@ -21,21 +21,8 @@ class VtFlowStateUpdated extends Event_1.Event {
|
|
|
21
21
|
this.type = VtFlowStateUpdated.type;
|
|
22
22
|
if (options) {
|
|
23
23
|
this.vtFlowRecordId = options.vtFlowRecordId;
|
|
24
|
-
this.threadId = options.threadId;
|
|
25
|
-
this.participantSessionId = options.participantSessionId;
|
|
26
|
-
this.connectionId = options.connectionId;
|
|
27
|
-
this.role = options.role;
|
|
28
|
-
this.variant = options.variant;
|
|
29
24
|
this.state = options.state;
|
|
30
|
-
this.previousState = (_a = options.previousState) !== null && _a !== void 0 ? _a :
|
|
31
|
-
this.participantId = options.participantId;
|
|
32
|
-
this.schemaId = options.schemaId;
|
|
33
|
-
this.claims = options.claims;
|
|
34
|
-
this.credentialExchangeRecordId = options.credentialExchangeRecordId;
|
|
35
|
-
this.errorMessage = options.errorMessage;
|
|
36
|
-
this.subprotocolThid = options.subprotocolThid;
|
|
37
|
-
this.agentParticipantId = options.agentParticipantId;
|
|
38
|
-
this.walletAgentParticipantId = options.walletAgentParticipantId;
|
|
25
|
+
this.previousState = (_a = options.previousState) !== null && _a !== void 0 ? _a : null;
|
|
39
26
|
this.timestamp = (_b = options.timestamp) !== null && _b !== void 0 ? _b : new Date();
|
|
40
27
|
}
|
|
41
28
|
}
|
|
@@ -47,31 +34,6 @@ __decorate([
|
|
|
47
34
|
(0, class_validator_1.IsString)(),
|
|
48
35
|
__metadata("design:type", String)
|
|
49
36
|
], VtFlowStateUpdated.prototype, "vtFlowRecordId", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_transformer_1.Expose)(),
|
|
52
|
-
(0, class_validator_1.IsString)(),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], VtFlowStateUpdated.prototype, "threadId", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, class_transformer_1.Expose)(),
|
|
57
|
-
(0, class_validator_1.IsString)(),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], VtFlowStateUpdated.prototype, "participantSessionId", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, class_transformer_1.Expose)(),
|
|
62
|
-
(0, class_validator_1.IsString)(),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], VtFlowStateUpdated.prototype, "connectionId", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, class_transformer_1.Expose)(),
|
|
67
|
-
(0, class_validator_1.IsString)(),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], VtFlowStateUpdated.prototype, "role", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, class_transformer_1.Expose)(),
|
|
72
|
-
(0, class_validator_1.IsString)(),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], VtFlowStateUpdated.prototype, "variant", void 0);
|
|
75
37
|
__decorate([
|
|
76
38
|
(0, class_transformer_1.Expose)(),
|
|
77
39
|
(0, class_validator_1.IsString)(),
|
|
@@ -81,54 +43,6 @@ __decorate([
|
|
|
81
43
|
(0, class_transformer_1.Expose)(),
|
|
82
44
|
(0, class_validator_1.IsOptional)(),
|
|
83
45
|
(0, class_validator_1.IsString)(),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], VtFlowStateUpdated.prototype, "previousState", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, class_transformer_1.Expose)(),
|
|
88
|
-
(0, class_validator_1.IsOptional)(),
|
|
89
|
-
(0, class_validator_1.IsString)(),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], VtFlowStateUpdated.prototype, "participantId", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, class_transformer_1.Expose)(),
|
|
94
|
-
(0, class_validator_1.IsOptional)(),
|
|
95
|
-
(0, class_validator_1.IsString)(),
|
|
96
|
-
__metadata("design:type", String)
|
|
97
|
-
], VtFlowStateUpdated.prototype, "schemaId", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, class_transformer_1.Expose)(),
|
|
100
|
-
(0, class_validator_1.IsOptional)(),
|
|
101
|
-
(0, class_validator_1.IsObject)(),
|
|
102
46
|
__metadata("design:type", Object)
|
|
103
|
-
], VtFlowStateUpdated.prototype, "
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, class_transformer_1.Expose)(),
|
|
106
|
-
(0, class_validator_1.IsOptional)(),
|
|
107
|
-
(0, class_validator_1.IsString)(),
|
|
108
|
-
__metadata("design:type", String)
|
|
109
|
-
], VtFlowStateUpdated.prototype, "credentialExchangeRecordId", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, class_transformer_1.Expose)(),
|
|
112
|
-
(0, class_validator_1.IsOptional)(),
|
|
113
|
-
(0, class_validator_1.IsString)(),
|
|
114
|
-
__metadata("design:type", String)
|
|
115
|
-
], VtFlowStateUpdated.prototype, "errorMessage", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, class_transformer_1.Expose)(),
|
|
118
|
-
(0, class_validator_1.IsOptional)(),
|
|
119
|
-
(0, class_validator_1.IsString)(),
|
|
120
|
-
__metadata("design:type", String)
|
|
121
|
-
], VtFlowStateUpdated.prototype, "subprotocolThid", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, class_transformer_1.Expose)(),
|
|
124
|
-
(0, class_validator_1.IsOptional)(),
|
|
125
|
-
(0, class_validator_1.IsString)(),
|
|
126
|
-
__metadata("design:type", String)
|
|
127
|
-
], VtFlowStateUpdated.prototype, "agentParticipantId", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, class_transformer_1.Expose)(),
|
|
130
|
-
(0, class_validator_1.IsOptional)(),
|
|
131
|
-
(0, class_validator_1.IsString)(),
|
|
132
|
-
__metadata("design:type", String)
|
|
133
|
-
], VtFlowStateUpdated.prototype, "walletAgentParticipantId", void 0);
|
|
47
|
+
], VtFlowStateUpdated.prototype, "previousState", void 0);
|
|
134
48
|
//# sourceMappingURL=VtFlowStateUpdated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowStateUpdated.js","sourceRoot":"","sources":["../../src/events/VtFlowStateUpdated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"VtFlowStateUpdated.js","sourceRoot":"","sources":["../../src/events/VtFlowStateUpdated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA0C;AAC1C,qDAAsD;AAEtD,mCAA+B;AAC/B,2CAAuC;AASvC,MAAa,kBAAmB,SAAQ,aAAK;IAC3C,YAAmB,OAAkC;;QACnD,KAAK,EAAE,CAAA;QASO,SAAI,GAAG,kBAAkB,CAAC,IAAI,CAAA;QAR5C,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;YAC5C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;YAC1B,IAAI,CAAC,aAAa,GAAG,MAAA,OAAO,CAAC,aAAa,mCAAI,IAAI,CAAA;YAClD,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAA;QAClD,CAAC;IACH,CAAC;;AATH,gDA0BC;AAdwB,uBAAI,GAAG,qBAAS,CAAC,kBAAkB,AAA/B,CAA+B;AAInD;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;0DACmB;AAIvB;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;iDACU;AAKd;IAHN,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACyB"}
|
package/build/events/index.d.ts
CHANGED
package/build/events/index.js
CHANGED
|
@@ -19,7 +19,6 @@ __exportStar(require("./Event"), exports);
|
|
|
19
19
|
__exportStar(require("./EventType"), exports);
|
|
20
20
|
__exportStar(require("./IndexerNotification"), exports);
|
|
21
21
|
__exportStar(require("./MessageReceived"), exports);
|
|
22
|
-
__exportStar(require("./MessageStateUpdated"), exports);
|
|
23
22
|
__exportStar(require("./VtFlowStateUpdated"), exports);
|
|
24
23
|
__exportStar(require("./PresentationStateUpdated"), exports);
|
|
25
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,0CAAuB;AACvB,8CAA2B;AAC3B,wDAAqC;AACrC,oDAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,0CAAuB;AACvB,8CAA2B;AAC3B,wDAAqC;AACrC,oDAAiC;AACjC,uDAAoC;AACpC,6DAA0C"}
|
|
@@ -5,6 +5,9 @@ export interface InvitationMessageOptions extends BaseMessageOptions {
|
|
|
5
5
|
imageUrl?: string;
|
|
6
6
|
did?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `POST /v2/didcomm/invitations` to send an invitation.
|
|
10
|
+
*/
|
|
8
11
|
export declare class InvitationMessage extends BaseMessage {
|
|
9
12
|
constructor(options: InvitationMessageOptions);
|
|
10
13
|
readonly type = MessageType.InvitationMessage;
|
|
@@ -13,6 +13,9 @@ exports.InvitationMessage = void 0;
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const BaseMessage_1 = require("./BaseMessage");
|
|
15
15
|
const MessageType_1 = require("./MessageType");
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `POST /v2/didcomm/invitations` to send an invitation.
|
|
18
|
+
*/
|
|
16
19
|
class InvitationMessage extends BaseMessage_1.BaseMessage {
|
|
17
20
|
constructor(options) {
|
|
18
21
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationMessage.js","sourceRoot":"","sources":["../../src/messages/InvitationMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsD;AAEtD,+CAA+D;AAC/D,+CAA2C;AAQ3C,MAAa,iBAAkB,SAAQ,yBAAW;IAChD,YAAmB,OAAiC;;QAClD,KAAK,EAAE,CAAA;QAaO,SAAI,GAAG,iBAAiB,CAAC,IAAI,CAAA;QAX3C,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAA;YAChD,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;YACxC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;YAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;QACxB,CAAC;IACH,CAAC;;AAbH,8CA6BC;AAbwB,sBAAI,GAAG,yBAAW,CAAC,iBAAiB,AAAhC,CAAgC;AAIpD;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACQ;AAId;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACW;AAIjB;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACM"}
|
|
1
|
+
{"version":3,"file":"InvitationMessage.js","sourceRoot":"","sources":["../../src/messages/InvitationMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsD;AAEtD,+CAA+D;AAC/D,+CAA2C;AAQ3C;;GAEG;AACH,MAAa,iBAAkB,SAAQ,yBAAW;IAChD,YAAmB,OAAiC;;QAClD,KAAK,EAAE,CAAA;QAaO,SAAI,GAAG,iBAAiB,CAAC,IAAI,CAAA;QAX3C,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAA;YAChD,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;YACxC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;YAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;QACxB,CAAC;IACH,CAAC;;AAbH,8CA6BC;AAbwB,sBAAI,GAAG,yBAAW,CAAC,iBAAiB,AAAhC,CAAgC;AAIpD;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gDACQ;AAId;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACW;AAIjB;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACM"}
|
package/build/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonObject } from '@credo-ts/core';
|
|
2
|
-
import { DidCommHandshakeProtocol, DidCommProofState, OutOfBandDidCommService, ReceiveOutOfBandInvitationConfig } from '@credo-ts/didcomm';
|
|
2
|
+
import { DidCommDidExchangeRole, DidCommDidExchangeState, DidCommHandshakeProtocol, DidCommProofState, DidCommVersion, OutOfBandDidCommService, ReceiveOutOfBandInvitationConfig } from '@credo-ts/didcomm';
|
|
3
3
|
import { Claim, ClaimOptions } from './messages/CredentialIssuanceMessage';
|
|
4
4
|
export interface VsAgentInfo {
|
|
5
5
|
label: string;
|
|
@@ -85,6 +85,38 @@ export interface CreatePresentationRequestResult {
|
|
|
85
85
|
export interface CreateInvitationResult {
|
|
86
86
|
url: string;
|
|
87
87
|
}
|
|
88
|
+
export interface SendInvitationOptions {
|
|
89
|
+
connectionId: string;
|
|
90
|
+
did?: string;
|
|
91
|
+
label?: string;
|
|
92
|
+
imageUrl?: string;
|
|
93
|
+
goal?: string;
|
|
94
|
+
goalCode?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface SendInvitationResult {
|
|
97
|
+
id: string;
|
|
98
|
+
outOfBandId?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface ConnectionRecord {
|
|
101
|
+
id: string;
|
|
102
|
+
state: DidCommDidExchangeState;
|
|
103
|
+
role: DidCommDidExchangeRole;
|
|
104
|
+
did?: string;
|
|
105
|
+
theirDid?: string;
|
|
106
|
+
theirLabel?: string;
|
|
107
|
+
alias?: string;
|
|
108
|
+
threadId?: string;
|
|
109
|
+
imageUrl?: string;
|
|
110
|
+
outOfBandId: string | null;
|
|
111
|
+
parentConnectionId: string | null;
|
|
112
|
+
invitationDid?: string;
|
|
113
|
+
didcommVersion?: DidCommVersion;
|
|
114
|
+
mediatorId?: string;
|
|
115
|
+
previousDids?: string[];
|
|
116
|
+
previousTheirDids?: string[];
|
|
117
|
+
createdAt: Date;
|
|
118
|
+
updatedAt: Date;
|
|
119
|
+
}
|
|
88
120
|
export interface PresentationData {
|
|
89
121
|
requestedCredentials: RequestedCredential[];
|
|
90
122
|
claims: Claim[];
|
|
@@ -133,14 +165,4 @@ export interface ReceiveInvitationResult {
|
|
|
133
165
|
outOfBandId: string;
|
|
134
166
|
connectionId?: string;
|
|
135
167
|
}
|
|
136
|
-
export interface ConnectionInvitationSchema {
|
|
137
|
-
id?: string;
|
|
138
|
-
'@type': string;
|
|
139
|
-
label: string;
|
|
140
|
-
did?: string;
|
|
141
|
-
recipientKeys?: string[];
|
|
142
|
-
serviceEndpoint?: string;
|
|
143
|
-
routingKeys?: string[];
|
|
144
|
-
imageUrl?: string;
|
|
145
|
-
}
|
|
146
168
|
export {};
|
package/build/utils/ecs.d.ts
CHANGED
|
@@ -5,6 +5,18 @@ export declare enum ECS {
|
|
|
5
5
|
USER_AGENT = "ecs-user-agent",
|
|
6
6
|
BADGE = "ecs-badge"
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Registers the indexer base URL that serves schema references for a given chain id.
|
|
10
|
+
* Entries override the built-in defaults, so an agent connected to any chain can
|
|
11
|
+
* dereference `vpr:verana:<chain>:cs:<id>` references through its own indexer.
|
|
12
|
+
*/
|
|
13
|
+
export declare function configureChainIndexers(entries: Record<string, string | undefined>): void;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves a schema reference to a fetchable URL. VPR URIs are mapped to the indexer
|
|
16
|
+
* registered for their chain; any other input (e.g. an HTTPS URL) is returned as is.
|
|
17
|
+
*
|
|
18
|
+
* @throws Error if the input is a VPR URI that cannot be mapped to an indexer URL.
|
|
19
|
+
*/
|
|
8
20
|
export declare function mapToEcosystem(input: string): string;
|
|
9
21
|
export declare const ECS_SCHEMA_DIGESTS: Record<ECS, string>;
|
|
10
22
|
export declare function computeSchemaDigest(schemaObj: Record<string, unknown>): Promise<string>;
|
|
@@ -15,6 +27,14 @@ export declare function computeSchemaDigest(schemaObj: Record<string, unknown>):
|
|
|
15
27
|
* @returns The matching ECS type or null if no match is found.
|
|
16
28
|
*/
|
|
17
29
|
export declare function identifySchema(schemaObj: Record<string, unknown>): Promise<ECS | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Identifies the ECS type of a raw JSON schema string, as stored in a VPR `CredentialSchema`
|
|
32
|
+
* entry, by digest and then by title.
|
|
33
|
+
*
|
|
34
|
+
* @returns The matching ECS type, or null when the string is not parseable or matches nothing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function classifyEcsSchema(jsonSchema: string): Promise<ECS | null>;
|
|
37
|
+
export declare function ecsRequiresValidUntil(ecsKey: string | null): boolean;
|
|
18
38
|
type W3CCred = {
|
|
19
39
|
credentialSubject?: {
|
|
20
40
|
jsonSchema?: {
|
package/build/utils/ecs.js
CHANGED
|
@@ -12,9 +12,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.ECS_SCHEMA_DIGESTS = exports.ECS = void 0;
|
|
15
|
+
exports.configureChainIndexers = configureChainIndexers;
|
|
15
16
|
exports.mapToEcosystem = mapToEcosystem;
|
|
16
17
|
exports.computeSchemaDigest = computeSchemaDigest;
|
|
17
18
|
exports.identifySchema = identifySchema;
|
|
19
|
+
exports.classifyEcsSchema = classifyEcsSchema;
|
|
20
|
+
exports.ecsRequiresValidUntil = ecsRequiresValidUntil;
|
|
18
21
|
exports.resolveVTCType = resolveVTCType;
|
|
19
22
|
exports.resolveJSCType = resolveJSCType;
|
|
20
23
|
var ECS;
|
|
@@ -25,14 +28,40 @@ var ECS;
|
|
|
25
28
|
ECS["USER_AGENT"] = "ecs-user-agent";
|
|
26
29
|
ECS["BADGE"] = "ecs-badge";
|
|
27
30
|
})(ECS || (exports.ECS = ECS = {}));
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const DEFAULT_CHAIN_INDEXERS = {
|
|
32
|
+
'vna-testnet-1': 'https://idx.testnet.verana.network',
|
|
33
|
+
'vna-devnet-1': 'https://idx.devnet.verana.network',
|
|
34
|
+
};
|
|
35
|
+
const indexerByChain = new Map(Object.entries(DEFAULT_CHAIN_INDEXERS));
|
|
36
|
+
/**
|
|
37
|
+
* Registers the indexer base URL that serves schema references for a given chain id.
|
|
38
|
+
* Entries override the built-in defaults, so an agent connected to any chain can
|
|
39
|
+
* dereference `vpr:verana:<chain>:cs:<id>` references through its own indexer.
|
|
40
|
+
*/
|
|
41
|
+
function configureChainIndexers(entries) {
|
|
42
|
+
for (const [chainId, baseUrl] of Object.entries(entries)) {
|
|
43
|
+
if (!chainId || !baseUrl)
|
|
44
|
+
continue;
|
|
45
|
+
indexerByChain.set(chainId, baseUrl.replace(/\/+$/, ''));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Resolves a schema reference to a fetchable URL. VPR URIs are mapped to the indexer
|
|
50
|
+
* registered for their chain; any other input (e.g. an HTTPS URL) is returned as is.
|
|
51
|
+
*
|
|
52
|
+
* @throws Error if the input is a VPR URI that cannot be mapped to an indexer URL.
|
|
53
|
+
*/
|
|
32
54
|
function mapToEcosystem(input) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
55
|
+
if (!input.startsWith('vpr:verana:'))
|
|
56
|
+
return input;
|
|
57
|
+
const ref = input.match(/^vpr:verana:([^:/]+):cs:(\d+)$/);
|
|
58
|
+
if (!ref)
|
|
59
|
+
throw new Error(`Malformed VPR schema reference "${input}"`);
|
|
60
|
+
const base = indexerByChain.get(ref[1]);
|
|
61
|
+
if (!base) {
|
|
62
|
+
throw new Error(`No indexer configured for chain "${ref[1]}" needed to resolve "${input}"`);
|
|
63
|
+
}
|
|
64
|
+
return `${base}/v4/credential-schema/js/${ref[2]}`;
|
|
36
65
|
}
|
|
37
66
|
// v4 spec [ECS-EC] reference digests
|
|
38
67
|
exports.ECS_SCHEMA_DIGESTS = {
|
|
@@ -82,6 +111,39 @@ async function identifySchema(schemaObj) {
|
|
|
82
111
|
}
|
|
83
112
|
return null;
|
|
84
113
|
}
|
|
114
|
+
// Devnet and testnet ecosystems publish schemas that drift from the canonical ECS ones, so a
|
|
115
|
+
// digest miss falls back to the schema title before giving up.
|
|
116
|
+
const ECS_TITLE_BY_TYPE = {
|
|
117
|
+
ServiceCredential: ECS.SERVICE,
|
|
118
|
+
OrganizationCredential: ECS.ORG,
|
|
119
|
+
PersonaCredential: ECS.PERSONA,
|
|
120
|
+
UserAgentCredential: ECS.USER_AGENT,
|
|
121
|
+
BadgeCredential: ECS.BADGE,
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Identifies the ECS type of a raw JSON schema string, as stored in a VPR `CredentialSchema`
|
|
125
|
+
* entry, by digest and then by title.
|
|
126
|
+
*
|
|
127
|
+
* @returns The matching ECS type, or null when the string is not parseable or matches nothing.
|
|
128
|
+
*/
|
|
129
|
+
async function classifyEcsSchema(jsonSchema) {
|
|
130
|
+
var _a;
|
|
131
|
+
try {
|
|
132
|
+
const parsed = JSON.parse(jsonSchema);
|
|
133
|
+
const byDigest = await identifySchema(parsed);
|
|
134
|
+
if (byDigest)
|
|
135
|
+
return byDigest;
|
|
136
|
+
const title = typeof parsed.title === 'string' ? parsed.title : '';
|
|
137
|
+
return (_a = ECS_TITLE_BY_TYPE[title]) !== null && _a !== void 0 ? _a : null;
|
|
138
|
+
}
|
|
139
|
+
catch (_b) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// [VT-ECS-ORG-JSON-SCHEMA-CRED-W3C] and [VT-ECS-PERSONA-JSON-SCHEMA-CRED-W3C] require validUntil
|
|
144
|
+
function ecsRequiresValidUntil(ecsKey) {
|
|
145
|
+
return ecsKey === ECS.ORG || ecsKey === ECS.PERSONA;
|
|
146
|
+
}
|
|
85
147
|
async function resolveBySubjectRef(subjectRef) {
|
|
86
148
|
var _a;
|
|
87
149
|
const schemaFetchUrl = mapToEcosystem(subjectRef);
|
package/build/utils/ecs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecs.js","sourceRoot":"","sources":["../../src/utils/ecs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ecs.js","sourceRoot":"","sources":["../../src/utils/ecs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAoBA,wDAKC;AAQD,wCAWC;AA0BD,kDAUC;AAQD,wCAMC;AAkBD,8CAUC;AAGD,sDAEC;AAmBD,wCAcC;AAED,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AAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,gBAAgB,0CAAE,EAAE,CAAA;QACvD,IAAI,CAAC,SAAS;YAAE,OAAO,OAAO,CAAA;QAE9B,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;QAC1E,IAAI,CAAC,OAAO;YAAE,OAAO,OAAO,CAAA;QAE5B,OAAO,kBAAkB,CAAC,OAAkB,CAAC,CAAA;IAC/C,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,OAAO,CAAA;IAChB,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,IAA8B;IACjE,IAAI,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO,OAAO,CAAA;QACpC,OAAO,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAC5C,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,OAAO,CAAA;IAChB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"default": "./build/utils/ecs.js"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"version": "2.0.0-dev.
|
|
17
|
+
"version": "2.0.0-dev.90",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "https://github.com/verana-labs/vs-agent"
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@2060.io/credo-ts-didcomm-reactions": "0.1.1",
|
|
31
31
|
"@2060.io/credo-ts-didcomm-receipts": "0.1.1",
|
|
32
|
-
"@credo-ts/core": "0.7.1-pr-2704-
|
|
33
|
-
"@credo-ts/didcomm": "0.7.1-pr-2704-
|
|
32
|
+
"@credo-ts/core": "0.7.1-pr-2704-20260909134930",
|
|
33
|
+
"@credo-ts/didcomm": "0.7.1-pr-2704-20260909134930",
|
|
34
34
|
"class-transformer": "0.5.1",
|
|
35
35
|
"class-validator": "0.14.1"
|
|
36
36
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"ts-node-dev": "^2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@credo-ts/core": "0.7.1-pr-2704-
|
|
41
|
+
"@credo-ts/core": "0.7.1-pr-2704-20260909134930"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "pnpm run clean && pnpm run compile",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MessageState } from '@2060.io/credo-ts-didcomm-receipts';
|
|
2
|
-
import { Event } from './Event';
|
|
3
|
-
import { EventType } from './EventType';
|
|
4
|
-
export interface MessageStateUpdatedOptions {
|
|
5
|
-
connectionId: string;
|
|
6
|
-
state: MessageState;
|
|
7
|
-
timestamp?: Date;
|
|
8
|
-
messageId: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class MessageStateUpdated extends Event {
|
|
11
|
-
constructor(options: MessageStateUpdatedOptions);
|
|
12
|
-
readonly type = EventType.MessageStateUpdated;
|
|
13
|
-
static readonly type = EventType.MessageStateUpdated;
|
|
14
|
-
connectionId: string;
|
|
15
|
-
messageId: string;
|
|
16
|
-
state: MessageState;
|
|
17
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MessageStateUpdated = void 0;
|
|
13
|
-
const credo_ts_didcomm_receipts_1 = require("@2060.io/credo-ts-didcomm-receipts");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
const Event_1 = require("./Event");
|
|
17
|
-
const EventType_1 = require("./EventType");
|
|
18
|
-
class MessageStateUpdated extends Event_1.Event {
|
|
19
|
-
constructor(options) {
|
|
20
|
-
var _a;
|
|
21
|
-
super();
|
|
22
|
-
this.type = MessageStateUpdated.type;
|
|
23
|
-
if (options) {
|
|
24
|
-
this.connectionId = options.connectionId;
|
|
25
|
-
this.state = options.state;
|
|
26
|
-
this.timestamp = (_a = options.timestamp) !== null && _a !== void 0 ? _a : new Date();
|
|
27
|
-
this.messageId = options.messageId;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.MessageStateUpdated = MessageStateUpdated;
|
|
32
|
-
MessageStateUpdated.type = EventType_1.EventType.MessageStateUpdated;
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, class_transformer_1.Expose)(),
|
|
35
|
-
(0, class_validator_1.IsString)(),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], MessageStateUpdated.prototype, "connectionId", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, class_transformer_1.Expose)(),
|
|
40
|
-
(0, class_validator_1.IsString)(),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], MessageStateUpdated.prototype, "messageId", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, class_transformer_1.Expose)(),
|
|
45
|
-
(0, class_validator_1.IsString)(),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], MessageStateUpdated.prototype, "state", void 0);
|
|
48
|
-
//# sourceMappingURL=MessageStateUpdated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageStateUpdated.js","sourceRoot":"","sources":["../../src/events/MessageStateUpdated.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kFAAiE;AACjE,yDAA0C;AAC1C,qDAA0C;AAE1C,mCAA+B;AAC/B,2CAAuC;AASvC,MAAa,mBAAoB,SAAQ,aAAK;IAC5C,YAAmB,OAAmC;;QACpD,KAAK,EAAE,CAAA;QAUO,SAAI,GAAG,mBAAmB,CAAC,IAAI,CAAA;QAR7C,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;YACxC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;YAC1B,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAA;YAChD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAA;QACpC,CAAC;IACH,CAAC;;AAVH,kDA0BC;AAbwB,wBAAI,GAAG,qBAAS,CAAC,mBAAmB,AAAhC,CAAgC;AAIpD;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;yDACiB;AAIrB;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;sDACc;AAIlB;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;kDACgB"}
|