@veramo/message-handler 7.0.1 → 7.0.2
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/abstract-message-handler.d.ts.map +1 -1
- package/build/message-handler.d.ts +176 -176
- package/build/message-handler.d.ts.map +1 -1
- package/build/message-handler.js.map +1 -1
- package/build/message.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/default.test.ts +6 -4
- package/src/message-handler.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-message-handler.d.ts","sourceRoot":"","sources":["../src/abstract-message-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAItC,eAAO,MAAM,2BAA2B,OAAwC,CAAA;AAEhF;;;GAGG;AACH,8BAAsB,sBAAsB;IACnC,kBAAkB,CAAC,EAAE,sBAAsB,CAAA;IAE3C,OAAO,CAAC,cAAc,EAAE,sBAAsB,GAAG,sBAAsB;
|
|
1
|
+
{"version":3,"file":"abstract-message-handler.d.ts","sourceRoot":"","sources":["../src/abstract-message-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAItC,eAAO,MAAM,2BAA2B,OAAwC,CAAA;AAEhF;;;GAGG;AACH,8BAAsB,sBAAsB;IACnC,kBAAkB,CAAC,EAAE,sBAAsB,CAAA;IAE3C,OAAO,CAAC,cAAc,EAAE,sBAAsB,GAAG,sBAAsB,CAG7E;IAEY,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAIlF;CACF"}
|
|
@@ -29,69 +29,103 @@ export declare class MessageHandler implements IAgentPlugin {
|
|
|
29
29
|
components: {
|
|
30
30
|
schemas: {
|
|
31
31
|
IHandleMessageArgs: {
|
|
32
|
-
|
|
32
|
+
description: string;
|
|
33
33
|
properties: {
|
|
34
|
-
raw: {
|
|
35
|
-
type: string;
|
|
36
|
-
description: string;
|
|
37
|
-
};
|
|
38
34
|
metaData: {
|
|
39
|
-
|
|
35
|
+
description: string;
|
|
40
36
|
items: {
|
|
41
37
|
$ref: string;
|
|
42
38
|
};
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
raw: {
|
|
43
42
|
description: string;
|
|
43
|
+
type: string;
|
|
44
44
|
};
|
|
45
45
|
save: {
|
|
46
|
-
type: string;
|
|
47
|
-
description: string;
|
|
48
46
|
deprecated: string;
|
|
47
|
+
description: string;
|
|
48
|
+
type: string;
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
required: string[];
|
|
52
|
-
|
|
52
|
+
type: string;
|
|
53
53
|
};
|
|
54
54
|
IMetaData: {
|
|
55
|
-
|
|
55
|
+
description: string;
|
|
56
56
|
properties: {
|
|
57
57
|
type: {
|
|
58
|
-
type: string;
|
|
59
58
|
description: string;
|
|
59
|
+
type: string;
|
|
60
60
|
};
|
|
61
61
|
value: {
|
|
62
|
-
type: string;
|
|
63
62
|
description: string;
|
|
63
|
+
type: string;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
required: string[];
|
|
67
|
-
|
|
67
|
+
type: string;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
CompactJWT: {
|
|
70
|
+
description: string;
|
|
70
71
|
type: string;
|
|
72
|
+
};
|
|
73
|
+
ContextType: {
|
|
74
|
+
anyOf: ({
|
|
75
|
+
items?: undefined;
|
|
76
|
+
type: string;
|
|
77
|
+
} | {
|
|
78
|
+
items: {
|
|
79
|
+
anyOf: {
|
|
80
|
+
type: string;
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
83
|
+
type: string;
|
|
84
|
+
})[];
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
CredentialStatusReference: {
|
|
88
|
+
description: string;
|
|
71
89
|
properties: {
|
|
72
90
|
id: {
|
|
73
91
|
type: string;
|
|
74
|
-
description: string;
|
|
75
92
|
};
|
|
76
93
|
type: {
|
|
77
94
|
type: string;
|
|
78
|
-
description: string;
|
|
79
95
|
};
|
|
80
|
-
|
|
96
|
+
};
|
|
97
|
+
required: string[];
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
CredentialSubject: {
|
|
101
|
+
description: string;
|
|
102
|
+
properties: {
|
|
103
|
+
id: {
|
|
81
104
|
type: string;
|
|
82
|
-
description: string;
|
|
83
105
|
};
|
|
84
|
-
|
|
85
|
-
|
|
106
|
+
};
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
IMessage: {
|
|
110
|
+
description: string;
|
|
111
|
+
properties: {
|
|
112
|
+
attachments: {
|
|
86
113
|
description: string;
|
|
87
|
-
|
|
88
|
-
|
|
114
|
+
items: {
|
|
115
|
+
$ref: string;
|
|
116
|
+
};
|
|
89
117
|
type: string;
|
|
90
|
-
description: string;
|
|
91
118
|
};
|
|
92
|
-
|
|
119
|
+
createdAt: {
|
|
120
|
+
description: string;
|
|
93
121
|
type: string;
|
|
122
|
+
};
|
|
123
|
+
credentials: {
|
|
94
124
|
description: string;
|
|
125
|
+
items: {
|
|
126
|
+
$ref: string;
|
|
127
|
+
};
|
|
128
|
+
type: string;
|
|
95
129
|
};
|
|
96
130
|
data: {
|
|
97
131
|
anyOf: {
|
|
@@ -99,279 +133,245 @@ export declare class MessageHandler implements IAgentPlugin {
|
|
|
99
133
|
}[];
|
|
100
134
|
description: string;
|
|
101
135
|
};
|
|
102
|
-
|
|
103
|
-
type: string;
|
|
104
|
-
items: {
|
|
105
|
-
type: string;
|
|
106
|
-
};
|
|
136
|
+
expiresAt: {
|
|
107
137
|
description: string;
|
|
108
|
-
};
|
|
109
|
-
replyUrl: {
|
|
110
138
|
type: string;
|
|
111
|
-
description: string;
|
|
112
139
|
};
|
|
113
140
|
from: {
|
|
114
|
-
type: string;
|
|
115
141
|
description: string;
|
|
116
|
-
};
|
|
117
|
-
to: {
|
|
118
142
|
type: string;
|
|
143
|
+
};
|
|
144
|
+
id: {
|
|
119
145
|
description: string;
|
|
146
|
+
type: string;
|
|
120
147
|
};
|
|
121
148
|
metaData: {
|
|
122
149
|
anyOf: ({
|
|
123
|
-
type: string;
|
|
124
150
|
items: {
|
|
125
151
|
$ref: string;
|
|
126
152
|
};
|
|
127
|
-
} | {
|
|
128
153
|
type: string;
|
|
154
|
+
} | {
|
|
129
155
|
items?: undefined;
|
|
156
|
+
type: string;
|
|
130
157
|
})[];
|
|
131
158
|
description: string;
|
|
132
159
|
};
|
|
133
|
-
|
|
134
|
-
|
|
160
|
+
presentations: {
|
|
161
|
+
description: string;
|
|
135
162
|
items: {
|
|
136
163
|
$ref: string;
|
|
137
164
|
};
|
|
138
|
-
|
|
165
|
+
type: string;
|
|
139
166
|
};
|
|
140
|
-
|
|
167
|
+
raw: {
|
|
168
|
+
description: string;
|
|
141
169
|
type: string;
|
|
170
|
+
};
|
|
171
|
+
replyTo: {
|
|
172
|
+
description: string;
|
|
142
173
|
items: {
|
|
143
|
-
|
|
174
|
+
type: string;
|
|
144
175
|
};
|
|
176
|
+
type: string;
|
|
177
|
+
};
|
|
178
|
+
replyUrl: {
|
|
145
179
|
description: string;
|
|
180
|
+
type: string;
|
|
146
181
|
};
|
|
147
|
-
|
|
182
|
+
returnRoute: {
|
|
183
|
+
description: string;
|
|
148
184
|
type: string;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
};
|
|
185
|
+
};
|
|
186
|
+
threadId: {
|
|
152
187
|
description: string;
|
|
188
|
+
type: string;
|
|
153
189
|
};
|
|
154
|
-
|
|
190
|
+
to: {
|
|
191
|
+
description: string;
|
|
155
192
|
type: string;
|
|
193
|
+
};
|
|
194
|
+
type: {
|
|
156
195
|
description: string;
|
|
196
|
+
type: string;
|
|
157
197
|
};
|
|
158
198
|
};
|
|
159
199
|
required: string[];
|
|
160
|
-
description: string;
|
|
161
|
-
};
|
|
162
|
-
VerifiableCredential: {
|
|
163
200
|
type: string;
|
|
201
|
+
};
|
|
202
|
+
IMessageAttachment: {
|
|
203
|
+
description: string;
|
|
164
204
|
properties: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
};
|
|
168
|
-
issuer: {
|
|
169
|
-
$ref: string;
|
|
205
|
+
byte_count: {
|
|
206
|
+
type: string;
|
|
170
207
|
};
|
|
171
|
-
|
|
208
|
+
data: {
|
|
172
209
|
$ref: string;
|
|
173
210
|
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
type: string;
|
|
177
|
-
items: {
|
|
178
|
-
type: string;
|
|
179
|
-
};
|
|
180
|
-
} | {
|
|
181
|
-
type: string;
|
|
182
|
-
items?: undefined;
|
|
183
|
-
})[];
|
|
211
|
+
description: {
|
|
212
|
+
type: string;
|
|
184
213
|
};
|
|
185
|
-
|
|
186
|
-
|
|
214
|
+
filename: {
|
|
215
|
+
type: string;
|
|
187
216
|
};
|
|
188
|
-
|
|
217
|
+
format: {
|
|
189
218
|
type: string;
|
|
190
219
|
};
|
|
191
|
-
|
|
220
|
+
id: {
|
|
192
221
|
type: string;
|
|
193
222
|
};
|
|
194
|
-
|
|
195
|
-
|
|
223
|
+
lastmod_time: {
|
|
224
|
+
type: string;
|
|
196
225
|
};
|
|
197
|
-
|
|
226
|
+
media_type: {
|
|
198
227
|
type: string;
|
|
199
228
|
};
|
|
200
229
|
};
|
|
201
230
|
required: string[];
|
|
202
|
-
description: string;
|
|
203
|
-
};
|
|
204
|
-
ProofType: {
|
|
205
231
|
type: string;
|
|
232
|
+
};
|
|
233
|
+
IMessageAttachmentData: {
|
|
234
|
+
description: string;
|
|
206
235
|
properties: {
|
|
207
|
-
|
|
236
|
+
base64: {
|
|
208
237
|
type: string;
|
|
209
238
|
};
|
|
210
|
-
|
|
239
|
+
hash: {
|
|
240
|
+
type: string;
|
|
241
|
+
};
|
|
242
|
+
json: {};
|
|
243
|
+
jws: {};
|
|
244
|
+
links: {
|
|
245
|
+
items: {
|
|
246
|
+
type: string;
|
|
247
|
+
};
|
|
211
248
|
type: string;
|
|
212
249
|
};
|
|
213
250
|
};
|
|
214
|
-
|
|
251
|
+
type: string;
|
|
215
252
|
};
|
|
216
253
|
IssuerType: {
|
|
217
254
|
anyOf: ({
|
|
218
|
-
type: string;
|
|
219
255
|
properties: {
|
|
220
256
|
id: {
|
|
221
257
|
type: string;
|
|
222
258
|
};
|
|
223
259
|
};
|
|
224
260
|
required: string[];
|
|
225
|
-
} | {
|
|
226
261
|
type: string;
|
|
262
|
+
} | {
|
|
227
263
|
properties?: undefined;
|
|
228
264
|
required?: undefined;
|
|
229
|
-
})[];
|
|
230
|
-
description: string;
|
|
231
|
-
};
|
|
232
|
-
CredentialSubject: {
|
|
233
|
-
type: string;
|
|
234
|
-
properties: {
|
|
235
|
-
id: {
|
|
236
|
-
type: string;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
description: string;
|
|
240
|
-
};
|
|
241
|
-
ContextType: {
|
|
242
|
-
anyOf: ({
|
|
243
265
|
type: string;
|
|
244
|
-
items?: undefined;
|
|
245
|
-
} | {
|
|
246
|
-
type: string;
|
|
247
|
-
items: {
|
|
248
|
-
anyOf: {
|
|
249
|
-
type: string;
|
|
250
|
-
}[];
|
|
251
|
-
};
|
|
252
266
|
})[];
|
|
253
267
|
description: string;
|
|
254
268
|
};
|
|
255
|
-
|
|
256
|
-
|
|
269
|
+
ProofType: {
|
|
270
|
+
description: string;
|
|
257
271
|
properties: {
|
|
258
|
-
|
|
272
|
+
proofValue: {
|
|
259
273
|
type: string;
|
|
260
274
|
};
|
|
261
275
|
type: {
|
|
262
276
|
type: string;
|
|
263
277
|
};
|
|
264
278
|
};
|
|
265
|
-
required: string[];
|
|
266
|
-
description: string;
|
|
267
|
-
};
|
|
268
|
-
VerifiablePresentation: {
|
|
269
279
|
type: string;
|
|
280
|
+
};
|
|
281
|
+
VerifiableCredential: {
|
|
282
|
+
description: string;
|
|
270
283
|
properties: {
|
|
271
|
-
|
|
284
|
+
"@context": {
|
|
272
285
|
$ref: string;
|
|
273
286
|
};
|
|
274
|
-
|
|
287
|
+
credentialStatus: {
|
|
288
|
+
$ref: string;
|
|
289
|
+
};
|
|
290
|
+
credentialSubject: {
|
|
291
|
+
$ref: string;
|
|
292
|
+
};
|
|
293
|
+
expirationDate: {
|
|
275
294
|
type: string;
|
|
276
295
|
};
|
|
277
|
-
|
|
296
|
+
id: {
|
|
278
297
|
type: string;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
298
|
+
};
|
|
299
|
+
issuanceDate: {
|
|
300
|
+
type: string;
|
|
301
|
+
};
|
|
302
|
+
issuer: {
|
|
303
|
+
$ref: string;
|
|
304
|
+
};
|
|
305
|
+
proof: {
|
|
306
|
+
$ref: string;
|
|
282
307
|
};
|
|
283
308
|
type: {
|
|
284
309
|
anyOf: ({
|
|
285
|
-
type: string;
|
|
286
310
|
items: {
|
|
287
311
|
type: string;
|
|
288
312
|
};
|
|
289
|
-
} | {
|
|
290
313
|
type: string;
|
|
314
|
+
} | {
|
|
291
315
|
items?: undefined;
|
|
292
|
-
})[];
|
|
293
|
-
};
|
|
294
|
-
"@context": {
|
|
295
|
-
$ref: string;
|
|
296
|
-
};
|
|
297
|
-
verifier: {
|
|
298
|
-
type: string;
|
|
299
|
-
items: {
|
|
300
316
|
type: string;
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
issuanceDate: {
|
|
304
|
-
type: string;
|
|
305
|
-
};
|
|
306
|
-
expirationDate: {
|
|
307
|
-
type: string;
|
|
308
|
-
};
|
|
309
|
-
id: {
|
|
310
|
-
type: string;
|
|
317
|
+
})[];
|
|
311
318
|
};
|
|
312
319
|
};
|
|
313
320
|
required: string[];
|
|
314
|
-
description: string;
|
|
315
|
-
};
|
|
316
|
-
W3CVerifiableCredential: {
|
|
317
|
-
anyOf: {
|
|
318
|
-
$ref: string;
|
|
319
|
-
}[];
|
|
320
|
-
description: string;
|
|
321
|
-
};
|
|
322
|
-
CompactJWT: {
|
|
323
321
|
type: string;
|
|
324
|
-
description: string;
|
|
325
322
|
};
|
|
326
|
-
|
|
327
|
-
|
|
323
|
+
VerifiablePresentation: {
|
|
324
|
+
description: string;
|
|
328
325
|
properties: {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
};
|
|
332
|
-
description: {
|
|
333
|
-
type: string;
|
|
334
|
-
};
|
|
335
|
-
filename: {
|
|
336
|
-
type: string;
|
|
326
|
+
"@context": {
|
|
327
|
+
$ref: string;
|
|
337
328
|
};
|
|
338
|
-
|
|
329
|
+
expirationDate: {
|
|
339
330
|
type: string;
|
|
340
331
|
};
|
|
341
|
-
|
|
332
|
+
holder: {
|
|
342
333
|
type: string;
|
|
343
334
|
};
|
|
344
|
-
|
|
335
|
+
id: {
|
|
345
336
|
type: string;
|
|
346
337
|
};
|
|
347
|
-
|
|
338
|
+
issuanceDate: {
|
|
348
339
|
type: string;
|
|
349
340
|
};
|
|
350
|
-
|
|
341
|
+
proof: {
|
|
351
342
|
$ref: string;
|
|
352
343
|
};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
344
|
+
type: {
|
|
345
|
+
anyOf: ({
|
|
346
|
+
items: {
|
|
347
|
+
type: string;
|
|
348
|
+
};
|
|
349
|
+
type: string;
|
|
350
|
+
} | {
|
|
351
|
+
items?: undefined;
|
|
352
|
+
type: string;
|
|
353
|
+
})[];
|
|
363
354
|
};
|
|
364
|
-
|
|
355
|
+
verifiableCredential: {
|
|
356
|
+
items: {
|
|
357
|
+
$ref: string;
|
|
358
|
+
};
|
|
365
359
|
type: string;
|
|
360
|
+
};
|
|
361
|
+
verifier: {
|
|
366
362
|
items: {
|
|
367
363
|
type: string;
|
|
368
364
|
};
|
|
369
|
-
};
|
|
370
|
-
base64: {
|
|
371
365
|
type: string;
|
|
372
366
|
};
|
|
373
|
-
json: {};
|
|
374
367
|
};
|
|
368
|
+
required: string[];
|
|
369
|
+
type: string;
|
|
370
|
+
};
|
|
371
|
+
W3CVerifiableCredential: {
|
|
372
|
+
anyOf: {
|
|
373
|
+
$ref: string;
|
|
374
|
+
}[];
|
|
375
375
|
description: string;
|
|
376
376
|
};
|
|
377
377
|
};
|
|
@@ -388,7 +388,7 @@ export declare class MessageHandler implements IAgentPlugin {
|
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
|
-
private messageHandler?;
|
|
391
|
+
private readonly messageHandler?;
|
|
392
392
|
constructor(options: {
|
|
393
393
|
messageHandlers: AbstractMessageHandler[];
|
|
394
394
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-handler.d.ts","sourceRoot":"","sources":["../src/message-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAElB,QAAQ,EACT,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAMtE,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"message-handler.d.ts","sourceRoot":"","sources":["../src/message-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EAElB,QAAQ,EACT,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAMtE,eAAO,MAAM,UAAU;IACrB,gBAAgB;IAChB,YAAY;IACZ,KAAK;CACN,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,YAAW,YAAY;IACjD;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,Q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,KAAK,CAAC,CAAA;YACrB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;YAC3C,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC9B,CAAC;IACH,CAAC;CACF"}
|
package/build/message.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,qBAAa,OAAQ,YAAW,QAAQ;
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,qBAAa,OAAQ,YAAW,QAAQ;IACtC,YAAY,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAA;KAAE,EAOzD;IAGD,EAAE,EAAE,MAAM,CAAA;IAEV,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAGjB,IAAI,EAAE,MAAM,CAAA;IAEZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,GAAG,CAAA;IAEV,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAElB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAA;IAEtB,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACxC,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACpC,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAElC,WAAW,CAAC,IAAI,EAAE,SAAS,QAM1B;IAED,eAAe,IAAI,SAAS,GAAG,IAAI,CAMlC;IAED,OAAO,YAQN;CACF"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veramo/message-handler",
|
|
3
3
|
"description": "Message Handler plugin for Veramo",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.2",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"exports": "./build/index.js",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"@veramo/core-types": "^7.0.2",
|
|
10
|
+
"debug": "^4.3.4"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/debug": "4.1.8",
|
|
14
|
-
"typescript": "
|
|
14
|
+
"typescript": "7.0.2"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"build/**/*",
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
|
|
3
|
+
import { IAgentContext, IMessageHandler } from '../../../core-types/src/index.js'
|
|
4
|
+
import { createAgent } from '../../../core/src/index.js'
|
|
3
5
|
import { MessageHandler } from '../message-handler.js'
|
|
4
|
-
|
|
6
|
+
|
|
5
7
|
import { AbstractMessageHandler } from "../abstract-message-handler.js";
|
|
6
8
|
import { Message } from "../message.js";
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
class DummyHandler extends AbstractMessageHandler {
|
|
11
13
|
async handle(message: Message, context: IAgentContext<{}>): Promise<Message> {
|
package/src/message-handler.ts
CHANGED
|
@@ -42,7 +42,7 @@ export class MessageHandler implements IAgentPlugin {
|
|
|
42
42
|
*/
|
|
43
43
|
readonly methods: IMessageHandler
|
|
44
44
|
readonly schema = schema.IMessageHandler
|
|
45
|
-
private messageHandler?: AbstractMessageHandler
|
|
45
|
+
private readonly messageHandler?: AbstractMessageHandler
|
|
46
46
|
|
|
47
47
|
constructor(options: { messageHandlers: AbstractMessageHandler[] }) {
|
|
48
48
|
for (const messageHandler of options.messageHandlers) {
|