@verana-labs/vs-agent-model 2.0.0-dev.6 → 2.0.0-dev.61
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/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/types.d.ts +0 -10
- package/build/utils/ecs.d.ts +19 -0
- package/build/utils/ecs.js +64 -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
|
@@ -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"}
|
package/build/types.d.ts
CHANGED
|
@@ -133,14 +133,4 @@ export interface ReceiveInvitationResult {
|
|
|
133
133
|
outOfBandId: string;
|
|
134
134
|
connectionId?: string;
|
|
135
135
|
}
|
|
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
136
|
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,13 @@ 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>;
|
|
18
37
|
type W3CCred = {
|
|
19
38
|
credentialSubject?: {
|
|
20
39
|
jsonSchema?: {
|
package/build/utils/ecs.js
CHANGED
|
@@ -12,9 +12,11 @@ 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;
|
|
18
20
|
exports.resolveVTCType = resolveVTCType;
|
|
19
21
|
exports.resolveJSCType = resolveJSCType;
|
|
20
22
|
var ECS;
|
|
@@ -25,14 +27,40 @@ var ECS;
|
|
|
25
27
|
ECS["USER_AGENT"] = "ecs-user-agent";
|
|
26
28
|
ECS["BADGE"] = "ecs-badge";
|
|
27
29
|
})(ECS || (exports.ECS = ECS = {}));
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const DEFAULT_CHAIN_INDEXERS = {
|
|
31
|
+
'vna-testnet-1': 'https://idx.testnet.verana.network',
|
|
32
|
+
'vna-devnet-1': 'https://idx.devnet.verana.network',
|
|
33
|
+
};
|
|
34
|
+
const indexerByChain = new Map(Object.entries(DEFAULT_CHAIN_INDEXERS));
|
|
35
|
+
/**
|
|
36
|
+
* Registers the indexer base URL that serves schema references for a given chain id.
|
|
37
|
+
* Entries override the built-in defaults, so an agent connected to any chain can
|
|
38
|
+
* dereference `vpr:verana:<chain>:cs:<id>` references through its own indexer.
|
|
39
|
+
*/
|
|
40
|
+
function configureChainIndexers(entries) {
|
|
41
|
+
for (const [chainId, baseUrl] of Object.entries(entries)) {
|
|
42
|
+
if (!chainId || !baseUrl)
|
|
43
|
+
continue;
|
|
44
|
+
indexerByChain.set(chainId, baseUrl.replace(/\/+$/, ''));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resolves a schema reference to a fetchable URL. VPR URIs are mapped to the indexer
|
|
49
|
+
* registered for their chain; any other input (e.g. an HTTPS URL) is returned as is.
|
|
50
|
+
*
|
|
51
|
+
* @throws Error if the input is a VPR URI that cannot be mapped to an indexer URL.
|
|
52
|
+
*/
|
|
32
53
|
function mapToEcosystem(input) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
if (!input.startsWith('vpr:verana:'))
|
|
55
|
+
return input;
|
|
56
|
+
const ref = input.match(/^vpr:verana:([^:/]+):cs:(\d+)$/);
|
|
57
|
+
if (!ref)
|
|
58
|
+
throw new Error(`Malformed VPR schema reference "${input}"`);
|
|
59
|
+
const base = indexerByChain.get(ref[1]);
|
|
60
|
+
if (!base) {
|
|
61
|
+
throw new Error(`No indexer configured for chain "${ref[1]}" needed to resolve "${input}"`);
|
|
62
|
+
}
|
|
63
|
+
return `${base}/v4/credential-schema/js/${ref[2]}`;
|
|
36
64
|
}
|
|
37
65
|
// v4 spec [ECS-EC] reference digests
|
|
38
66
|
exports.ECS_SCHEMA_DIGESTS = {
|
|
@@ -82,6 +110,35 @@ async function identifySchema(schemaObj) {
|
|
|
82
110
|
}
|
|
83
111
|
return null;
|
|
84
112
|
}
|
|
113
|
+
// Devnet and testnet ecosystems publish schemas that drift from the canonical ECS ones, so a
|
|
114
|
+
// digest miss falls back to the schema title before giving up.
|
|
115
|
+
const ECS_TITLE_BY_TYPE = {
|
|
116
|
+
ServiceCredential: ECS.SERVICE,
|
|
117
|
+
OrganizationCredential: ECS.ORG,
|
|
118
|
+
PersonaCredential: ECS.PERSONA,
|
|
119
|
+
UserAgentCredential: ECS.USER_AGENT,
|
|
120
|
+
BadgeCredential: ECS.BADGE,
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Identifies the ECS type of a raw JSON schema string, as stored in a VPR `CredentialSchema`
|
|
124
|
+
* entry, by digest and then by title.
|
|
125
|
+
*
|
|
126
|
+
* @returns The matching ECS type, or null when the string is not parseable or matches nothing.
|
|
127
|
+
*/
|
|
128
|
+
async function classifyEcsSchema(jsonSchema) {
|
|
129
|
+
var _a;
|
|
130
|
+
try {
|
|
131
|
+
const parsed = JSON.parse(jsonSchema);
|
|
132
|
+
const byDigest = await identifySchema(parsed);
|
|
133
|
+
if (byDigest)
|
|
134
|
+
return byDigest;
|
|
135
|
+
const title = typeof parsed.title === 'string' ? parsed.title : '';
|
|
136
|
+
return (_a = ECS_TITLE_BY_TYPE[title]) !== null && _a !== void 0 ? _a : null;
|
|
137
|
+
}
|
|
138
|
+
catch (_b) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
85
142
|
async function resolveBySubjectRef(subjectRef) {
|
|
86
143
|
var _a;
|
|
87
144
|
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;AAmBD,wCAcC;AAED,wCAOC;AApKD,IAAY,GAMX;AAND,WAAY,GAAG;IACb,8BAAuB,CAAA;IACvB,sBAAe,CAAA;IACf,8BAAuB,CAAA;IACvB,oCAA6B,CAAA;IAC7B,0BAAmB,CAAA;AACrB,CAAC,EANW,GAAG,mBAAH,GAAG,QAMd;AAED,MAAM,sBAAsB,GAA2B;IACrD,eAAe,EAAE,oCAAoC;IACrD,cAAc,EAAE,mCAAmC;CACpD,CAAA;AAED,MAAM,cAAc,GAAG,IAAI,GAAG,CAAiB,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAA;AAEtF;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,OAA2C;IAChF,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACzD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO;YAAE,SAAQ;QAClC,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,KAAa;IAC1C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC;QAAE,OAAO,KAAK,CAAA;IAElD,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACzD,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,KAAK,GAAG,CAA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AAO,CAAA;IACxB,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAA;AACjC,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,IAEpC;;IACC,IAAI,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.61",
|
|
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"}
|