@agoric/wallet-backend 0.13.5 → 0.13.6-dev-d32a66a.0

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.
@@ -6,18 +6,10 @@ import {
6
6
  makeExportContext,
7
7
  makeImportContext,
8
8
  makeLoggingPresence,
9
- } from '../src/marshal-contexts.js';
9
+ } from '@agoric/smart-wallet/src/marshal-contexts.js';
10
10
 
11
11
  const capData1 = {
12
- body: JSON.stringify([
13
- [
14
- 'applyMethod',
15
- { '@qclass': 'slot', iface: 'Alleged: purse.actions', index: 0 },
16
- 'deposit',
17
- [{ '@qclass': 'slot', iface: 'Alleged: payment', index: 1 }],
18
- ],
19
- ['applyFunction', { '@qclass': 'slot', index: 0 }, [1, 'thing']],
20
- ]),
12
+ body: '#[["applyMethod","$0.Alleged: purse.actions","deposit",["$1.Alleged: payment"]],["applyFunction","$0",[1,"thing"]]]',
21
13
  slots: ['purse:1', 'payment:1'],
22
14
  };
23
15
 
@@ -40,7 +32,7 @@ test('makeLoggingPresence logs calls on purse/payment actions', async t => {
40
32
  const ctx = makeExportContext();
41
33
  ctx.savePurseActions(purse.actions);
42
34
  ctx.savePaymentActions(myPayment);
43
- const capData = ctx.serialize(harden([...msgs]));
35
+ const capData = ctx.toCapData(harden([...msgs]));
44
36
  t.deepEqual(capData, capData1);
45
37
  });
46
38
 
@@ -51,20 +43,20 @@ test('makeImportContext in wallet UI can unserialize messages', async t => {
51
43
 
52
44
  const ctx = makeImportContext(mkp);
53
45
 
54
- const stuff = ctx.fromMyWallet.unserialize(capData1);
46
+ const stuff = ctx.fromMyWallet.fromCapData(capData1);
55
47
  t.is(stuff.length, 2);
56
48
  const [[_tag, purse, method, _args]] = stuff;
57
49
  t.is(method, 'deposit');
58
50
  await E(purse).transfer(1);
59
51
 
60
52
  // unserialization is consistent
61
- const stuff2 = ctx.fromMyWallet.unserialize(capData1);
53
+ const stuff2 = ctx.fromMyWallet.fromCapData(capData1);
62
54
  t.deepEqual(stuff, stuff2);
63
55
 
64
- const capData = ctx.fromMyWallet.serialize(harden([...msgs]));
56
+ const capData = ctx.fromMyWallet.toCapData(harden([...msgs]));
65
57
 
66
58
  t.deepEqual(capData, {
67
- body: '[["applyMethod",{"@qclass":"slot","iface":"Alleged: purse.actions","index":0},"transfer",[1]]]',
59
+ body: '#[["applyMethod","$0.Alleged: purse.actions","transfer",[1]]]',
68
60
  slots: ['purse:1'],
69
61
  });
70
62
  });
@@ -1,490 +0,0 @@
1
- {
2
- "bundleFileName": "bundle-wallet.js",
3
- "bundleTime": "2023-02-17T01:23:59.651Z",
4
- "moduleSource": {
5
- "relative": "../../src/wallet.js",
6
- "absolute": "/Users/jim/release/agoric-sdk/packages/wallet/api/src/wallet.js"
7
- },
8
- "contents": [
9
- {
10
- "relativePath": "",
11
- "mtime": "2023-02-16T23:25:05.544Z"
12
- },
13
- {
14
- "relativePath": "../bigintStringify.js",
15
- "mtime": "2023-02-16T23:24:35.055Z"
16
- },
17
- {
18
- "relativePath": "../date-now.js",
19
- "mtime": "2023-02-16T23:24:35.056Z"
20
- },
21
- {
22
- "relativePath": "../internal-types.js",
23
- "mtime": "2023-02-16T23:25:05.541Z"
24
- },
25
- {
26
- "relativePath": "../lib-wallet.js",
27
- "mtime": "2023-02-16T23:25:05.542Z"
28
- },
29
- {
30
- "relativePath": "../pubsub.js",
31
- "mtime": "2023-02-16T23:24:35.058Z"
32
- },
33
- {
34
- "relativePath": "../../../../notifier/src/index.js",
35
- "mtime": "2023-02-16T23:25:05.431Z"
36
- },
37
- {
38
- "relativePath": "../../../../../node_modules/@endo/eventual-send/src/no-shim.js",
39
- "mtime": "2022-10-17T22:46:58.346Z"
40
- },
41
- {
42
- "relativePath": "../../../../../node_modules/@endo/marshal/index.js",
43
- "mtime": "2022-10-17T22:46:57.989Z"
44
- },
45
- {
46
- "relativePath": "../../../../notifier/src/asyncIterableAdaptor.js",
47
- "mtime": "2023-02-16T23:25:05.430Z"
48
- },
49
- {
50
- "relativePath": "../../../../notifier/src/notifier.js",
51
- "mtime": "2023-02-16T23:25:05.431Z"
52
- },
53
- {
54
- "relativePath": "../../../../notifier/src/publish-kit.js",
55
- "mtime": "2023-02-16T23:25:05.432Z"
56
- },
57
- {
58
- "relativePath": "../../../../notifier/src/storesub.js",
59
- "mtime": "2023-02-16T23:25:05.432Z"
60
- },
61
- {
62
- "relativePath": "../../../../notifier/src/subscriber.js",
63
- "mtime": "2023-02-16T23:25:05.433Z"
64
- },
65
- {
66
- "relativePath": "../actions.js",
67
- "mtime": "2023-02-16T23:24:35.055Z"
68
- },
69
- {
70
- "relativePath": "../findOrMakeInvitation.js",
71
- "mtime": "2023-02-16T23:25:05.540Z"
72
- },
73
- {
74
- "relativePath": "../issuerTable.js",
75
- "mtime": "2023-02-16T23:25:05.541Z"
76
- },
77
- {
78
- "relativePath": "../lib-dehydrate.js",
79
- "mtime": "2023-02-16T23:25:05.541Z"
80
- },
81
- {
82
- "relativePath": "../marshal-contexts.js",
83
- "mtime": "2023-02-16T23:25:05.543Z"
84
- },
85
- {
86
- "relativePath": "../types.js",
87
- "mtime": "2023-02-16T23:25:05.543Z"
88
- },
89
- {
90
- "relativePath": "../../../../assert/src/assert.js",
91
- "mtime": "2023-02-16T23:25:05.303Z"
92
- },
93
- {
94
- "relativePath": "../../../../cache/src/main.js",
95
- "mtime": "2023-02-16T23:24:34.706Z"
96
- },
97
- {
98
- "relativePath": "../../../../ERTP/src/index.js",
99
- "mtime": "2023-02-16T23:25:05.180Z"
100
- },
101
- {
102
- "relativePath": "../../../../inter-protocol/exported.js",
103
- "mtime": "2023-02-16T23:24:34.810Z"
104
- },
105
- {
106
- "relativePath": "../../../../internal/src/index.js",
107
- "mtime": "2023-02-16T23:25:05.428Z"
108
- },
109
- {
110
- "relativePath": "../../../../../node_modules/@agoric/nat/dist/nat.esm.js",
111
- "mtime": "2021-07-23T00:44:31.073Z"
112
- },
113
- {
114
- "relativePath": "../../../../store/src/index.js",
115
- "mtime": "2023-02-16T23:25:05.464Z"
116
- },
117
- {
118
- "relativePath": "../../../../store/exported.js",
119
- "mtime": "2023-02-16T23:24:34.951Z"
120
- },
121
- {
122
- "relativePath": "../../../../vat-data/src/index.js",
123
- "mtime": "2023-02-16T23:25:05.517Z"
124
- },
125
- {
126
- "relativePath": "../../../../zoe/exported.js",
127
- "mtime": "2023-02-16T23:25:05.602Z"
128
- },
129
- {
130
- "relativePath": "../../../../../node_modules/@endo/promise-kit/index.js",
131
- "mtime": "2022-10-17T22:46:57.999Z"
132
- },
133
- {
134
- "relativePath": "../../../../../node_modules/@endo/eventual-send/src/E.js",
135
- "mtime": "2022-10-17T22:46:58.346Z"
136
- },
137
- {
138
- "relativePath": "../../../../../node_modules/@endo/marshal/src/deeplyFulfilled.js",
139
- "mtime": "2022-10-17T22:46:57.989Z"
140
- },
141
- {
142
- "relativePath": "../../../../../node_modules/@endo/marshal/src/encodeToCapData.js",
143
- "mtime": "2022-10-17T22:46:57.989Z"
144
- },
145
- {
146
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/error.js",
147
- "mtime": "2022-10-17T22:46:57.989Z"
148
- },
149
- {
150
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/iter-helpers.js",
151
- "mtime": "2022-10-17T22:46:57.989Z"
152
- },
153
- {
154
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/passStyle-helpers.js",
155
- "mtime": "2022-10-17T22:46:57.989Z"
156
- },
157
- {
158
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/remotable.js",
159
- "mtime": "2022-10-17T22:46:57.989Z"
160
- },
161
- {
162
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/symbol.js",
163
- "mtime": "2022-10-17T22:46:57.989Z"
164
- },
165
- {
166
- "relativePath": "../../../../../node_modules/@endo/marshal/src/make-far.js",
167
- "mtime": "2022-10-17T22:46:57.989Z"
168
- },
169
- {
170
- "relativePath": "../../../../../node_modules/@endo/marshal/src/makeTagged.js",
171
- "mtime": "2022-10-17T22:46:57.989Z"
172
- },
173
- {
174
- "relativePath": "../../../../../node_modules/@endo/marshal/src/marshal-justin.js",
175
- "mtime": "2022-10-17T22:46:57.989Z"
176
- },
177
- {
178
- "relativePath": "../../../../../node_modules/@endo/marshal/src/marshal-stringify.js",
179
- "mtime": "2022-10-17T22:46:57.989Z"
180
- },
181
- {
182
- "relativePath": "../../../../../node_modules/@endo/marshal/src/marshal.js",
183
- "mtime": "2022-10-17T22:46:57.989Z"
184
- },
185
- {
186
- "relativePath": "../../../../../node_modules/@endo/marshal/src/passStyleOf.js",
187
- "mtime": "2022-10-17T22:46:57.989Z"
188
- },
189
- {
190
- "relativePath": "../../../../../node_modules/@endo/marshal/src/typeGuards.js",
191
- "mtime": "2022-10-17T22:46:57.989Z"
192
- },
193
- {
194
- "relativePath": "../../../../../node_modules/@endo/marshal/src/types.js",
195
- "mtime": "2022-10-17T22:46:57.989Z"
196
- },
197
- {
198
- "relativePath": "../../../../notifier/src/types.js",
199
- "mtime": "2023-02-16T23:25:05.433Z"
200
- },
201
- {
202
- "relativePath": "../../exported.js",
203
- "mtime": "2023-02-16T23:24:35.054Z"
204
- },
205
- {
206
- "relativePath": "../../../../assert/src/types.js",
207
- "mtime": "2023-02-16T23:25:05.303Z"
208
- },
209
- {
210
- "relativePath": "../../../../ERTP/src/amountMath.js",
211
- "mtime": "2023-02-16T23:25:05.179Z"
212
- },
213
- {
214
- "relativePath": "../../../../ERTP/src/typeGuards.js",
215
- "mtime": "2023-02-16T23:25:05.183Z"
216
- },
217
- {
218
- "relativePath": "../../../../ERTP/src/issuerKit.js",
219
- "mtime": "2023-02-16T23:25:05.180Z"
220
- },
221
- {
222
- "relativePath": "../../../../internal/src/config.js",
223
- "mtime": "2023-02-16T23:25:05.428Z"
224
- },
225
- {
226
- "relativePath": "../../../../internal/src/utils.js",
227
- "mtime": "2023-02-16T23:25:05.429Z"
228
- },
229
- {
230
- "relativePath": "../../../../cache/src/cache.js",
231
- "mtime": "2023-02-16T23:25:05.305Z"
232
- },
233
- {
234
- "relativePath": "../../../../cache/src/state.js",
235
- "mtime": "2023-02-16T23:25:05.305Z"
236
- },
237
- {
238
- "relativePath": "../../../../cache/src/store.js",
239
- "mtime": "2023-02-16T23:25:05.306Z"
240
- },
241
- {
242
- "relativePath": "../../../../cache/src/types.js",
243
- "mtime": "2023-02-16T23:25:05.306Z"
244
- },
245
- {
246
- "relativePath": "../../../../store/src/keys/checkKey.js",
247
- "mtime": "2023-02-16T23:25:05.464Z"
248
- },
249
- {
250
- "relativePath": "../../../../store/src/keys/compareKeys.js",
251
- "mtime": "2023-02-16T23:25:05.465Z"
252
- },
253
- {
254
- "relativePath": "../../../../store/src/keys/copyBag.js",
255
- "mtime": "2023-02-16T23:25:05.466Z"
256
- },
257
- {
258
- "relativePath": "../../../../store/src/keys/copySet.js",
259
- "mtime": "2023-02-16T23:25:05.466Z"
260
- },
261
- {
262
- "relativePath": "../../../../store/src/keys/merge-bag-operators.js",
263
- "mtime": "2023-02-16T23:25:05.467Z"
264
- },
265
- {
266
- "relativePath": "../../../../store/src/keys/merge-set-operators.js",
267
- "mtime": "2023-02-16T23:25:05.468Z"
268
- },
269
- {
270
- "relativePath": "../../../../store/src/legacy/legacyMap.js",
271
- "mtime": "2023-02-16T23:25:05.468Z"
272
- },
273
- {
274
- "relativePath": "../../../../store/src/legacy/legacyWeakMap.js",
275
- "mtime": "2023-02-16T23:25:05.469Z"
276
- },
277
- {
278
- "relativePath": "../../../../store/src/patterns/encodePassable.js",
279
- "mtime": "2023-02-16T23:25:05.469Z"
280
- },
281
- {
282
- "relativePath": "../../../../store/src/patterns/interface-tools.js",
283
- "mtime": "2023-02-16T23:25:05.469Z"
284
- },
285
- {
286
- "relativePath": "../../../../store/src/patterns/patternMatchers.js",
287
- "mtime": "2023-02-16T23:25:05.471Z"
288
- },
289
- {
290
- "relativePath": "../../../../store/src/patterns/rankOrder.js",
291
- "mtime": "2023-02-16T23:25:05.471Z"
292
- },
293
- {
294
- "relativePath": "../../../../store/src/stores/scalarMapStore.js",
295
- "mtime": "2023-02-16T23:25:05.471Z"
296
- },
297
- {
298
- "relativePath": "../../../../store/src/stores/scalarSetStore.js",
299
- "mtime": "2023-02-16T23:25:05.472Z"
300
- },
301
- {
302
- "relativePath": "../../../../store/src/stores/scalarWeakMapStore.js",
303
- "mtime": "2023-02-16T23:25:05.472Z"
304
- },
305
- {
306
- "relativePath": "../../../../store/src/stores/scalarWeakSetStore.js",
307
- "mtime": "2023-02-16T23:25:05.472Z"
308
- },
309
- {
310
- "relativePath": "../../../../store/src/stores/store-utils.js",
311
- "mtime": "2023-02-16T23:25:05.472Z"
312
- },
313
- {
314
- "relativePath": "../../../../vat-data/src/far-class-utils.js",
315
- "mtime": "2023-02-16T23:25:05.516Z"
316
- },
317
- {
318
- "relativePath": "../../../../vat-data/src/kind-utils.js",
319
- "mtime": "2023-02-16T23:25:05.517Z"
320
- },
321
- {
322
- "relativePath": "../../../../vat-data/src/vat-data-bindings.js",
323
- "mtime": "2023-02-16T23:25:05.518Z"
324
- },
325
- {
326
- "relativePath": "../../../../../node_modules/@endo/promise-kit/src/is-promise.js",
327
- "mtime": "2022-10-17T22:46:57.999Z"
328
- },
329
- {
330
- "relativePath": "../../../../../node_modules/@endo/promise-kit/src/memo-race.js",
331
- "mtime": "2022-10-17T22:46:57.999Z"
332
- },
333
- {
334
- "relativePath": "../../../../../node_modules/@endo/promise-kit/src/promise-executor-kit.js",
335
- "mtime": "2022-10-17T22:46:57.999Z"
336
- },
337
- {
338
- "relativePath": "../../../../../node_modules/@endo/promise-kit/src/types.js",
339
- "mtime": "2022-10-17T22:46:57.999Z"
340
- },
341
- {
342
- "relativePath": "../../../../zoe/src/contractFacet/types.js",
343
- "mtime": "2023-02-16T23:25:05.607Z"
344
- },
345
- {
346
- "relativePath": "../../../../zoe/src/contractSupport/types.js",
347
- "mtime": "2023-02-16T23:25:05.612Z"
348
- },
349
- {
350
- "relativePath": "../../../../zoe/src/contracts/exported.js",
351
- "mtime": "2023-02-16T23:25:05.617Z"
352
- },
353
- {
354
- "relativePath": "../../../../zoe/src/types.js",
355
- "mtime": "2023-02-16T23:25:05.625Z"
356
- },
357
- {
358
- "relativePath": "../../../../zoe/src/zoeService/types.js",
359
- "mtime": "2023-02-16T23:25:05.628Z"
360
- },
361
- {
362
- "relativePath": "../../../../zoe/tools/types.js",
363
- "mtime": "2023-02-16T23:25:05.673Z"
364
- },
365
- {
366
- "relativePath": "../../../../ERTP/exported.js",
367
- "mtime": "2023-02-16T23:25:05.178Z"
368
- },
369
- {
370
- "relativePath": "../../../../notifier/exported.js",
371
- "mtime": "2023-02-16T23:25:05.429Z"
372
- },
373
- {
374
- "relativePath": "../../../../SwingSet/exported.js",
375
- "mtime": "2023-02-16T23:25:05.194Z"
376
- },
377
- {
378
- "relativePath": "../../../../../node_modules/@endo/eventual-send/src/track-turns.js",
379
- "mtime": "2022-10-17T22:46:58.346Z"
380
- },
381
- {
382
- "relativePath": "../../../../../node_modules/@endo/nat/src/index.js",
383
- "mtime": "2022-10-17T22:46:58.366Z"
384
- },
385
- {
386
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/copyArray.js",
387
- "mtime": "2022-10-17T22:46:57.989Z"
388
- },
389
- {
390
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/copyRecord.js",
391
- "mtime": "2022-10-17T22:46:57.989Z"
392
- },
393
- {
394
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/safe-promise.js",
395
- "mtime": "2022-10-17T22:46:57.989Z"
396
- },
397
- {
398
- "relativePath": "../../../../../node_modules/@endo/marshal/src/helpers/tagged.js",
399
- "mtime": "2022-10-17T22:46:57.989Z"
400
- },
401
- {
402
- "relativePath": "../../../../../node_modules/@endo/marshal/src/encodeToSmallcaps.js",
403
- "mtime": "2022-10-17T22:46:57.989Z"
404
- },
405
- {
406
- "relativePath": "../../../../inter-protocol/src/psm/types.js",
407
- "mtime": "2023-02-16T23:24:34.825Z"
408
- },
409
- {
410
- "relativePath": "../../../../inter-protocol/src/stakeFactory/types.js",
411
- "mtime": "2023-02-16T23:25:05.387Z"
412
- },
413
- {
414
- "relativePath": "../../../../inter-protocol/src/vaultFactory/types.js",
415
- "mtime": "2023-02-16T23:25:05.391Z"
416
- },
417
- {
418
- "relativePath": "../../../../inter-protocol/src/vpool-xyk-amm/types.js",
419
- "mtime": "2023-02-16T23:25:05.409Z"
420
- },
421
- {
422
- "relativePath": "../../../../store/src/patterns/internal-types.js",
423
- "mtime": "2023-02-16T23:25:05.470Z"
424
- },
425
- {
426
- "relativePath": "../../../../store/src/types.js",
427
- "mtime": "2023-02-16T23:25:05.473Z"
428
- },
429
- {
430
- "relativePath": "../../../../ERTP/src/mathHelpers/copyBagMathHelpers.js",
431
- "mtime": "2023-02-16T23:25:05.181Z"
432
- },
433
- {
434
- "relativePath": "../../../../ERTP/src/mathHelpers/copySetMathHelpers.js",
435
- "mtime": "2023-02-16T23:25:05.181Z"
436
- },
437
- {
438
- "relativePath": "../../../../ERTP/src/mathHelpers/natMathHelpers.js",
439
- "mtime": "2023-02-16T23:25:05.181Z"
440
- },
441
- {
442
- "relativePath": "../../../../ERTP/src/mathHelpers/setMathHelpers.js",
443
- "mtime": "2023-02-16T23:25:05.182Z"
444
- },
445
- {
446
- "relativePath": "../../../../ERTP/src/types.js",
447
- "mtime": "2023-02-16T23:25:05.184Z"
448
- },
449
- {
450
- "relativePath": "../../../../ERTP/src/displayInfo.js",
451
- "mtime": "2023-02-16T23:25:05.180Z"
452
- },
453
- {
454
- "relativePath": "../../../../ERTP/src/paymentLedger.js",
455
- "mtime": "2023-02-16T23:25:05.182Z"
456
- },
457
- {
458
- "relativePath": "../../../../../node_modules/@endo/far/src/index.js",
459
- "mtime": "2022-10-17T22:46:57.954Z"
460
- },
461
- {
462
- "relativePath": "../../../../zoe/src/contracts/callSpread/types.js",
463
- "mtime": "2023-02-16T23:25:05.616Z"
464
- },
465
- {
466
- "relativePath": "../../../../zoe/src/contracts/loan/types.js",
467
- "mtime": "2023-02-16T23:25:05.619Z"
468
- },
469
- {
470
- "relativePath": "../../../../zoe/src/contracts/priceAggregatorTypes.js",
471
- "mtime": "2023-02-16T23:25:05.622Z"
472
- },
473
- {
474
- "relativePath": "../../../../zoe/src/contracts/types.js",
475
- "mtime": "2023-02-16T23:24:35.100Z"
476
- },
477
- {
478
- "relativePath": "../../../../ERTP/src/payment.js",
479
- "mtime": "2023-02-16T23:25:05.182Z"
480
- },
481
- {
482
- "relativePath": "../../../../ERTP/src/purse.js",
483
- "mtime": "2023-02-16T23:25:05.183Z"
484
- },
485
- {
486
- "relativePath": "../../../../ERTP/src/transientNotifier.js",
487
- "mtime": "2023-02-16T23:25:05.183Z"
488
- }
489
- ]
490
- }