@agoric/vats 0.15.2-dev-aa68d8f.0 → 0.15.2-dev-96c9ff5.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.
Files changed (57) hide show
  1. package/package.json +27 -27
  2. package/src/centralSupply.d.ts +1 -1
  3. package/src/core/basic-behaviors.d.ts +1 -34
  4. package/src/core/basic-behaviors.d.ts.map +1 -1
  5. package/src/core/basic-behaviors.js +3 -0
  6. package/src/core/boot-chain.d.ts +25 -25
  7. package/src/core/boot-chain.d.ts.map +1 -1
  8. package/src/core/boot-sim.d.ts +1 -1
  9. package/src/core/boot-solo.d.ts +1 -1
  10. package/src/core/demoIssuers.d.ts +2 -2
  11. package/src/core/lib-boot.d.ts +1 -1
  12. package/src/core/startWalletFactory.d.ts +1 -1
  13. package/src/core/startWalletFactory.d.ts.map +1 -1
  14. package/src/core/startWalletFactory.js +2 -0
  15. package/src/core/utils.d.ts +12 -45
  16. package/src/core/utils.d.ts.map +1 -1
  17. package/src/core/utils.js +1 -0
  18. package/src/ibc.d.ts +5 -25
  19. package/src/ibc.d.ts.map +1 -1
  20. package/src/ibc.js +5 -1
  21. package/src/lib-board.d.ts +12 -8
  22. package/src/lib-board.d.ts.map +1 -1
  23. package/src/lib-board.js +11 -7
  24. package/src/localchain.d.ts +2 -2
  25. package/src/mintHolder.d.ts +2 -2
  26. package/src/nameHub.js +2 -2
  27. package/src/proposals/localchain-test.js +1 -1
  28. package/src/proposals/upgrade-zoe-proposal.d.ts +12 -12
  29. package/src/proposals/upgrade-zoe-proposal.d.ts.map +1 -1
  30. package/src/proposals/zcf-proposal.d.ts +12 -12
  31. package/src/proposals/zcf-proposal.d.ts.map +1 -1
  32. package/src/repl.d.ts +3 -3
  33. package/src/types.d.ts +10 -8
  34. package/src/vat-agoricNames.d.ts +3 -3
  35. package/src/vat-bank.d.ts +33 -442
  36. package/src/vat-bank.d.ts.map +1 -1
  37. package/src/vat-bank.js +19 -7
  38. package/src/vat-board.d.ts +7 -7
  39. package/src/vat-board.d.ts.map +1 -1
  40. package/src/vat-bridge.d.ts +1 -1
  41. package/src/vat-bridge.d.ts.map +1 -1
  42. package/src/vat-ibc.d.ts +1 -1
  43. package/src/vat-localchain.d.ts +3 -3
  44. package/src/vat-mints.d.ts +15 -15
  45. package/src/vat-network.d.ts +1 -1
  46. package/src/vat-priceAuthority.d.ts +1 -1
  47. package/src/vat-provisioning.d.ts +3 -3
  48. package/src/vat-zoe.d.ts +1 -1
  49. package/src/virtual-purse.d.ts +1 -111
  50. package/src/virtual-purse.d.ts.map +1 -1
  51. package/src/virtual-purse.js +1 -0
  52. package/tools/bank-utils.js +1 -1
  53. package/tools/board-utils.d.ts +3 -3
  54. package/tools/board-utils.d.ts.map +1 -1
  55. package/tools/boot-test-utils.d.ts +4 -74
  56. package/tools/boot-test-utils.d.ts.map +1 -1
  57. package/tools/boot-test-utils.js +2 -0
package/src/vat-bank.d.ts CHANGED
@@ -8,7 +8,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
8
8
  */
9
9
  makeBankManager(bankBridgeManagerP?: ERef<import("./types.js").ScopedBridgeManager | undefined>, nameAdminP?: globalThis.ERef<{
10
10
  update: import("./types.js").NameAdmin["update"];
11
- }> | undefined): Promise<import("@endo/exo").Guarded<{
11
+ }> | undefined): Promise<Guarded<{
12
12
  /**
13
13
  * Returns assets as they are added to the bank.
14
14
  *
@@ -57,7 +57,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
57
57
  */
58
58
  getBankForAddress(address: string): Promise<Bank>;
59
59
  }>>;
60
- } & import("@endo/eventual-send").RemotableBrand<{}, {
60
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
61
61
  /**
62
62
  * @param {ERef<import('./types.js').ScopedBridgeManager | undefined>} [bankBridgeManagerP]
63
63
  * a bridge manager for the "remote" bank (such as on cosmos-sdk). If not
@@ -67,7 +67,7 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
67
67
  */
68
68
  makeBankManager(bankBridgeManagerP?: ERef<import("./types.js").ScopedBridgeManager | undefined>, nameAdminP?: globalThis.ERef<{
69
69
  update: import("./types.js").NameAdmin["update"];
70
- }> | undefined): Promise<import("@endo/exo").Guarded<{
70
+ }> | undefined): Promise<Guarded<{
71
71
  /**
72
72
  * Returns assets as they are added to the bank.
73
73
  *
@@ -117,11 +117,16 @@ export function buildRootObject(_vatPowers: any, _args: any, baggage: any): {
117
117
  getBankForAddress(address: string): Promise<Bank>;
118
118
  }>>;
119
119
  }>;
120
- /** @typedef {AssetIssuerKit & { denom: string; escrowPurse?: ERef<Purse> }} AssetRecord */
120
+ /**
121
+ * @typedef {AssetIssuerKit & {
122
+ * denom: string;
123
+ * escrowPurse?: RemotableObject & ERef<Purse>;
124
+ * }} AssetRecord
125
+ */
121
126
  /**
122
127
  * @typedef {object} AssetDescriptor
123
128
  * @property {Brand} brand
124
- * @property {ERef<Issuer>} issuer
129
+ * @property {RemotableObject & ERef<Issuer>} issuer
125
130
  * @property {string} issuerName
126
131
  * @property {string} denom
127
132
  * @property {string} proposedName
@@ -146,20 +151,26 @@ export const BankI: import("@endo/patterns").InterfaceGuard<{
146
151
  export type VirtualPurse = Awaited<ReturnType<ReturnType<typeof prepareVirtualPurse>>>;
147
152
  export type BalanceUpdater = {
148
153
  update: (value: string, nonce?: string) => void;
149
- };
154
+ } & import("../../../node_modules/@endo/exo/src/get-interface.js").GetInterfaceGuard<{
155
+ update: (value: string, nonce?: string) => void;
156
+ }> & import("@endo/eventual-send").RemotableBrand<{}, {
157
+ update: (value: string, nonce?: string) => void;
158
+ } & import("../../../node_modules/@endo/exo/src/get-interface.js").GetInterfaceGuard<{
159
+ update: (value: string, nonce?: string) => void;
160
+ }>> & RemotableObject;
150
161
  export type BridgeChannel = Pick<import("./types.js").ScopedBridgeManager, "fromBridge" | "toBridge">;
151
162
  export type AssetIssuerKit<K extends globalThis.AssetKind = globalThis.AssetKind> = {
152
- mint?: globalThis.ERef<globalThis.Mint<K>> | undefined;
153
- issuer: ERef<Issuer<K>>;
163
+ mint?: globalThis.Mint<K> | undefined;
164
+ issuer: Issuer<K>;
154
165
  brand: Brand<K>;
155
166
  };
156
- export type AssetRecord = AssetIssuerKit & {
167
+ export type AssetRecord = AssetIssuerKit<globalThis.AssetKind> & {
157
168
  denom: string;
158
- escrowPurse?: ERef<Purse>;
169
+ escrowPurse?: (RemotableObject & globalThis.ERef<globalThis.Purse>) | undefined;
159
170
  };
160
171
  export type AssetDescriptor = {
161
172
  brand: Brand;
162
- issuer: ERef<Issuer>;
173
+ issuer: RemotableObject & globalThis.ERef<globalThis.Issuer>;
163
174
  issuerName: string;
164
175
  denom: string;
165
176
  proposedName: string;
@@ -180,6 +191,8 @@ export type Bank = {
180
191
  getPurse: (brand: Brand) => Promise<VirtualPurse>;
181
192
  };
182
193
  export type BankManager = ReturnType<ReturnType<typeof prepareBankManager>>;
194
+ import type { Guarded } from '@endo/exo';
195
+ import type { RemotableObject } from '@endo/pass-style';
183
196
  import { prepareVirtualPurse } from './virtual-purse.js';
184
197
  /**
185
198
  * @param {import('@agoric/zone').Zone} zone
@@ -191,12 +204,12 @@ import { prepareVirtualPurse } from './virtual-purse.js';
191
204
  * @param {ReturnType<prepareVirtualPurse>} makers.makeVirtualPurse
192
205
  */
193
206
  declare function prepareBankManager(zone: import("@agoric/zone").Zone, { provideAssetSubscription, makeBank, makePublishKit, makeRewardPurseController, makeVirtualPurse, }: {
194
- provideAssetSubscription: ReturnType<(zone: import("@agoric/zone").Zone) => (brandToAssetDescriptor?: any, assetSubscriber?: any) => import("@endo/exo").Guarded<{
207
+ provideAssetSubscription: ReturnType<(zone: import("@agoric/zone").Zone) => (brandToAssetDescriptor?: any, assetSubscriber?: any) => Guarded<{
195
208
  subscribeAfter(publishCount?: bigint): any;
196
209
  [Symbol.asyncIterator](): import("@agoric/notifier").ForkableAsyncIterableIterator<any, any>;
197
210
  }>>;
198
211
  makeBank: ReturnType<(zone: import("@agoric/zone").Zone, { provideAssetSubscription, makePublishKit, makeVirtualPurse }: {
199
- provideAssetSubscription: ReturnType<(zone: import("@agoric/zone").Zone) => (brandToAssetDescriptor?: any, assetSubscriber?: any) => import("@endo/exo").Guarded<{
212
+ provideAssetSubscription: ReturnType<(zone: import("@agoric/zone").Zone) => (brandToAssetDescriptor?: any, assetSubscriber?: any) => Guarded<{
200
213
  subscribeAfter(publishCount?: bigint): any;
201
214
  [Symbol.asyncIterator](): import("@agoric/notifier").ForkableAsyncIterableIterator<any, any>;
202
215
  }>>;
@@ -218,117 +231,7 @@ declare function prepareBankManager(zone: import("@agoric/zone").Zone, { provide
218
231
  brand: Brand;
219
232
  mint?: ERef<Mint>;
220
233
  escrowPurse?: ERef<Purse>;
221
- }) => Promise<{
222
- /**
223
- * Get the alleged Brand for this
224
- * Purse
225
- */
226
- getAllegedBrand: () => globalThis.ERef<{
227
- /**
228
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
229
- */
230
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
231
- getAllegedName: () => globalThis.ERef<string>;
232
- /**
233
- * Give information to UI on how
234
- * to display the amount.
235
- */
236
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
237
- getAmountShape: () => any;
238
- }>;
239
- /**
240
- * Get the amount contained in this
241
- * purse.
242
- */
243
- getCurrentAmount: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
244
- /**
245
- * Get a lossy
246
- * notifier for changes to this purse's balance.
247
- */
248
- getCurrentAmountNotifier: () => globalThis.ERef<{
249
- /**
250
- * Returns a promise for an update record as of an update count.
251
- * If the `updateCount` argument is omitted or differs from the current update count,
252
- * the promise promptly resolves to the current record.
253
- * Otherwise, after the next state change, the promise resolves to the resulting record.
254
- * This is an attenuated form of `subscribeAfter` whose return value stands alone and
255
- * does not allow consumers to pin a chain of historical PublicationRecords.
256
- * Used to make lossy ("latest") iterators.
257
- * NOTE: Use of `number` as an `updateCount` is deprecated.
258
- */
259
- getUpdateSince: (updateCount?: number | bigint | undefined) => globalThis.ERef<globalThis.UpdateRecord<globalThis.Amount<globalThis.AssetKind>>>;
260
- }>;
261
- /**
262
- * Deposit all the contents of payment into
263
- * this purse, returning the amount. If the optional argument `optAmount` does
264
- * not equal the amount of digital assets in the payment, throw an error.
265
- *
266
- * If payment is a promise, throw an error.
267
- */
268
- deposit: (args_0: globalThis.Payment<globalThis.AssetKind>, args_1?: any) => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
269
- /**
270
- * Return an object whose
271
- * `receive` method deposits to the current Purse.
272
- */
273
- getDepositFacet: () => globalThis.ERef<{
274
- /**
275
- * Deposit all the contents of payment
276
- * into the purse that made this facet, returning the amount. If the optional
277
- * argument `optAmount` does not equal the amount of digital assets in the
278
- * payment, throw an error.
279
- *
280
- * If payment is a promise, throw an error.
281
- */
282
- receive: (args_0: globalThis.Payment, args_1?: any) => globalThis.ERef<globalThis.Amount>;
283
- }>;
284
- /**
285
- * Withdraw amount from
286
- * this purse into a new Payment.
287
- */
288
- withdraw: (amount: globalThis.Amount<globalThis.AssetKind>) => globalThis.ERef<{
289
- /**
290
- * Get the allegedBrand, indicating
291
- * the type of digital asset this payment purports to be, and which issuer to
292
- * use. Because payments are not trusted, any method calls on payments should
293
- * be treated with suspicion and verified elsewhere.
294
- */
295
- getAllegedBrand: () => globalThis.ERef<{
296
- /**
297
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
298
- */
299
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
300
- getAllegedName: () => globalThis.ERef<string>;
301
- /**
302
- * Give information to UI on how
303
- * to display the amount.
304
- */
305
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
306
- getAmountShape: () => any;
307
- }>;
308
- }>;
309
- /**
310
- * The set of payments
311
- * withdrawn from this purse that are still live. These are the payments that
312
- * can still be recovered in emergencies by, for example, depositing into this
313
- * purse. Such a deposit action is like canceling an outstanding check because
314
- * you're tired of waiting for it. Once your cancellation is acknowledged, you
315
- * can spend the assets at stake on other things. Afterwards, if the recipient
316
- * of the original check finally gets around to depositing it, their deposit
317
- * fails.
318
- *
319
- * Returns an empty set if this issuer does not support recovery sets.
320
- */
321
- getRecoverySet: () => globalThis.ERef<import("@endo/patterns").CopySet<globalThis.Payment<globalThis.AssetKind>>>;
322
- /**
323
- * For use in emergencies, such as coming
324
- * back from a traumatic crash and upgrade. This deposits all the payments in
325
- * this purse's recovery set into the purse itself, returning the total amount
326
- * of assets recovered.
327
- *
328
- * Returns an empty amount if this issuer does not support recovery sets.
329
- */
330
- recoverAll: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
331
- }>>;
234
+ }) => Promise<globalThis.Purse>>;
332
235
  }) => (args_0: {
333
236
  address: string;
334
237
  assetSubscriber: EachTopic<AssetDescriptor>;
@@ -337,130 +240,13 @@ declare function prepareBankManager(zone: import("@agoric/zone").Zone, { provide
337
240
  brandToAssetRecord: MapStore<Brand, AssetRecord>;
338
241
  brandToVPurse: MapStore<Brand, VirtualPurse>;
339
242
  denomToAddressUpdater: MapStore<string, MapStore<string, BalanceUpdater>>;
340
- }) => import("@endo/exo").Guarded<{
341
- getAssetSubscription(): import("@endo/exo").Guarded<{
243
+ }) => Guarded<{
244
+ getAssetSubscription(): Guarded<{
342
245
  subscribeAfter(publishCount?: bigint): any;
343
246
  [Symbol.asyncIterator](): import("@agoric/notifier").ForkableAsyncIterableIterator<any, any>;
344
247
  }>;
345
248
  /** @param {Brand} brand */
346
- getPurse(brand: Brand): Promise<{
347
- /**
348
- * Get the alleged Brand for this
349
- * Purse
350
- */
351
- getAllegedBrand: () => globalThis.ERef<{
352
- /**
353
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
354
- */
355
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
356
- getAllegedName: () => globalThis.ERef<string>;
357
- /**
358
- * Give information to UI on how
359
- * to display the amount.
360
- */
361
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
362
- getAmountShape: () => any;
363
- }>;
364
- /**
365
- * Get the amount contained in this
366
- * purse.
367
- */
368
- getCurrentAmount: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
369
- /**
370
- * Get a lossy
371
- * notifier for changes to this purse's balance.
372
- */
373
- getCurrentAmountNotifier: () => globalThis.ERef<{
374
- /**
375
- * Returns a promise for an update record as of an update count.
376
- * If the `updateCount` argument is omitted or differs from the current update count,
377
- * the promise promptly resolves to the current record.
378
- * Otherwise, after the next state change, the promise resolves to the resulting record.
379
- * This is an attenuated form of `subscribeAfter` whose return value stands alone and
380
- * does not allow consumers to pin a chain of historical PublicationRecords.
381
- * Used to make lossy ("latest") iterators.
382
- * NOTE: Use of `number` as an `updateCount` is deprecated.
383
- */
384
- getUpdateSince: (updateCount?: number | bigint | undefined) => globalThis.ERef<globalThis.UpdateRecord<globalThis.Amount<globalThis.AssetKind>>>;
385
- }>;
386
- /**
387
- * Deposit all the contents of payment into
388
- * this purse, returning the amount. If the optional argument `optAmount` does
389
- * not equal the amount of digital assets in the payment, throw an error.
390
- *
391
- * If payment is a promise, throw an error.
392
- */
393
- deposit: (args_0: globalThis.Payment<globalThis.AssetKind>, args_1?: any) => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
394
- /**
395
- * Return an object whose
396
- * `receive` method deposits to the current Purse.
397
- */
398
- getDepositFacet: () => globalThis.ERef<{
399
- /**
400
- * Deposit all the contents of payment
401
- * into the purse that made this facet, returning the amount. If the optional
402
- * argument `optAmount` does not equal the amount of digital assets in the
403
- * payment, throw an error.
404
- *
405
- * If payment is a promise, throw an error.
406
- */
407
- receive: (args_0: globalThis.Payment, args_1?: any) => globalThis.ERef<globalThis.Amount>;
408
- }>;
409
- /**
410
- * Withdraw amount from
411
- * this purse into a new Payment.
412
- */
413
- withdraw: (amount: globalThis.Amount<globalThis.AssetKind>) => globalThis.ERef<{
414
- /**
415
- * Get the allegedBrand, indicating
416
- * the type of digital asset this payment purports to be, and which issuer to
417
- * use. Because payments are not trusted, any method calls on payments should
418
- * be treated with suspicion and verified elsewhere.
419
- */
420
- getAllegedBrand: () => globalThis.ERef<{
421
- /**
422
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
423
- */
424
- /**
425
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
426
- */
427
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
428
- getAllegedName: () => globalThis.ERef<string>;
429
- /**
430
- * Give information to UI on how
431
- * to display the amount.
432
- */
433
- /**
434
- * Give information to UI on how
435
- * to display the amount.
436
- */
437
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
438
- getAmountShape: () => any;
439
- }>;
440
- }>;
441
- /**
442
- * The set of payments
443
- * withdrawn from this purse that are still live. These are the payments that
444
- * can still be recovered in emergencies by, for example, depositing into this
445
- * purse. Such a deposit action is like canceling an outstanding check because
446
- * you're tired of waiting for it. Once your cancellation is acknowledged, you
447
- * can spend the assets at stake on other things. Afterwards, if the recipient
448
- * of the original check finally gets around to depositing it, their deposit
449
- * fails.
450
- *
451
- * Returns an empty set if this issuer does not support recovery sets.
452
- */
453
- getRecoverySet: () => globalThis.ERef<import("@endo/patterns").CopySet<globalThis.Payment<globalThis.AssetKind>>>;
454
- /**
455
- * For use in emergencies, such as coming
456
- * back from a traumatic crash and upgrade. This deposits all the payments in
457
- * this purse's recovery set into the purse itself, returning the total amount
458
- * of assets recovered.
459
- *
460
- * Returns an empty amount if this issuer does not support recovery sets.
461
- */
462
- recoverAll: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
463
- }>;
249
+ getPurse(brand: Brand): Promise<RemotableObject & import("@agoric/ertp/exported.js").PurseMethods<globalThis.AssetKind, import("@endo/patterns").Key>>;
464
250
  }>>;
465
251
  makePublishKit: ReturnType<(baggage: import("@agoric/swingset-liveslots").Baggage, kindName: string) => (options?: {
466
252
  valueDurability?: "mandatory" | undefined;
@@ -475,7 +261,7 @@ declare function prepareBankManager(zone: import("@agoric/zone").Zone, { provide
475
261
  getUpdateSince(updateCount: any): any;
476
262
  };
477
263
  }>>;
478
- makeRewardPurseController: ReturnType<(zone: import("@agoric/zone").Zone) => (bankChannel: BridgeChannel, denom: string, brand: globalThis.Brand) => import("@endo/exo").Guarded<{
264
+ makeRewardPurseController: ReturnType<(zone: import("@agoric/zone").Zone) => (bankChannel: BridgeChannel, denom: string, brand: globalThis.Brand) => Guarded<{
479
265
  getBalances(b: any): globalThis.Notifier<any>;
480
266
  pullAmount(_amount: any): Promise<never>;
481
267
  pushAmount(amount: any): Promise<void>;
@@ -485,207 +271,12 @@ declare function prepareBankManager(zone: import("@agoric/zone").Zone, { provide
485
271
  brand: Brand;
486
272
  mint?: ERef<Mint>;
487
273
  escrowPurse?: ERef<Purse>;
488
- }) => Promise<{
489
- /**
490
- * Get the alleged Brand for this
491
- * Purse
492
- */
493
- /**
494
- * Get the alleged Brand for this
495
- * Purse
496
- */
497
- getAllegedBrand: () => globalThis.ERef<{
498
- /**
499
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
500
- */
501
- /**
502
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
503
- */
504
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
505
- getAllegedName: () => globalThis.ERef<string>;
506
- /**
507
- * Give information to UI on how
508
- * to display the amount.
509
- */
510
- /**
511
- * Give information to UI on how
512
- * to display the amount.
513
- */
514
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
515
- getAmountShape: () => any;
516
- }>;
517
- /**
518
- * Get the amount contained in this
519
- * purse.
520
- */
521
- /**
522
- * Get the amount contained in this
523
- * purse.
524
- */
525
- getCurrentAmount: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
526
- /**
527
- * Get a lossy
528
- * notifier for changes to this purse's balance.
529
- */
530
- /**
531
- * Get a lossy
532
- * notifier for changes to this purse's balance.
533
- */
534
- getCurrentAmountNotifier: () => globalThis.ERef<{
535
- /**
536
- * Returns a promise for an update record as of an update count.
537
- * If the `updateCount` argument is omitted or differs from the current update count,
538
- * the promise promptly resolves to the current record.
539
- * Otherwise, after the next state change, the promise resolves to the resulting record.
540
- * This is an attenuated form of `subscribeAfter` whose return value stands alone and
541
- * does not allow consumers to pin a chain of historical PublicationRecords.
542
- * Used to make lossy ("latest") iterators.
543
- * NOTE: Use of `number` as an `updateCount` is deprecated.
544
- */
545
- /**
546
- * Returns a promise for an update record as of an update count.
547
- * If the `updateCount` argument is omitted or differs from the current update count,
548
- * the promise promptly resolves to the current record.
549
- * Otherwise, after the next state change, the promise resolves to the resulting record.
550
- * This is an attenuated form of `subscribeAfter` whose return value stands alone and
551
- * does not allow consumers to pin a chain of historical PublicationRecords.
552
- * Used to make lossy ("latest") iterators.
553
- * NOTE: Use of `number` as an `updateCount` is deprecated.
554
- */
555
- getUpdateSince: (updateCount?: number | bigint | undefined) => globalThis.ERef<globalThis.UpdateRecord<globalThis.Amount<globalThis.AssetKind>>>;
556
- }>;
557
- /**
558
- * Deposit all the contents of payment into
559
- * this purse, returning the amount. If the optional argument `optAmount` does
560
- * not equal the amount of digital assets in the payment, throw an error.
561
- *
562
- * If payment is a promise, throw an error.
563
- */
564
- /**
565
- * Deposit all the contents of payment into
566
- * this purse, returning the amount. If the optional argument `optAmount` does
567
- * not equal the amount of digital assets in the payment, throw an error.
568
- *
569
- * If payment is a promise, throw an error.
570
- */
571
- deposit: (args_0: globalThis.Payment<globalThis.AssetKind>, args_1?: any) => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
572
- /**
573
- * Return an object whose
574
- * `receive` method deposits to the current Purse.
575
- */
576
- /**
577
- * Return an object whose
578
- * `receive` method deposits to the current Purse.
579
- */
580
- getDepositFacet: () => globalThis.ERef<{
581
- /**
582
- * Deposit all the contents of payment
583
- * into the purse that made this facet, returning the amount. If the optional
584
- * argument `optAmount` does not equal the amount of digital assets in the
585
- * payment, throw an error.
586
- *
587
- * If payment is a promise, throw an error.
588
- */
589
- /**
590
- * Deposit all the contents of payment
591
- * into the purse that made this facet, returning the amount. If the optional
592
- * argument `optAmount` does not equal the amount of digital assets in the
593
- * payment, throw an error.
594
- *
595
- * If payment is a promise, throw an error.
596
- */
597
- receive: (args_0: globalThis.Payment, args_1?: any) => globalThis.ERef<globalThis.Amount>;
598
- }>;
599
- /**
600
- * Withdraw amount from
601
- * this purse into a new Payment.
602
- */
603
- /**
604
- * Withdraw amount from
605
- * this purse into a new Payment.
606
- */
607
- withdraw: (amount: globalThis.Amount<globalThis.AssetKind>) => globalThis.ERef<{
608
- /**
609
- * Get the allegedBrand, indicating
610
- * the type of digital asset this payment purports to be, and which issuer to
611
- * use. Because payments are not trusted, any method calls on payments should
612
- * be treated with suspicion and verified elsewhere.
613
- */
614
- /**
615
- * Get the allegedBrand, indicating
616
- * the type of digital asset this payment purports to be, and which issuer to
617
- * use. Because payments are not trusted, any method calls on payments should
618
- * be treated with suspicion and verified elsewhere.
619
- */
620
- getAllegedBrand: () => globalThis.ERef<{
621
- /**
622
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
623
- */
624
- /**
625
- * Should be used with `issuer.getBrand` to ensure an issuer and brand match.
626
- */
627
- isMyIssuer: (allegedIssuer: globalThis.ERef<globalThis.Issuer>) => globalThis.ERef<boolean>;
628
- getAllegedName: () => globalThis.ERef<string>;
629
- /**
630
- * Give information to UI on how
631
- * to display the amount.
632
- */
633
- /**
634
- * Give information to UI on how
635
- * to display the amount.
636
- */
637
- getDisplayInfo: () => globalThis.ERef<globalThis.DisplayInfo<globalThis.AssetKind>>;
638
- getAmountShape: () => any;
639
- }>;
640
- }>;
641
- /**
642
- * The set of payments
643
- * withdrawn from this purse that are still live. These are the payments that
644
- * can still be recovered in emergencies by, for example, depositing into this
645
- * purse. Such a deposit action is like canceling an outstanding check because
646
- * you're tired of waiting for it. Once your cancellation is acknowledged, you
647
- * can spend the assets at stake on other things. Afterwards, if the recipient
648
- * of the original check finally gets around to depositing it, their deposit
649
- * fails.
650
- *
651
- * Returns an empty set if this issuer does not support recovery sets.
652
- */
653
- /**
654
- * The set of payments
655
- * withdrawn from this purse that are still live. These are the payments that
656
- * can still be recovered in emergencies by, for example, depositing into this
657
- * purse. Such a deposit action is like canceling an outstanding check because
658
- * you're tired of waiting for it. Once your cancellation is acknowledged, you
659
- * can spend the assets at stake on other things. Afterwards, if the recipient
660
- * of the original check finally gets around to depositing it, their deposit
661
- * fails.
662
- *
663
- * Returns an empty set if this issuer does not support recovery sets.
664
- */
665
- getRecoverySet: () => globalThis.ERef<import("@endo/patterns").CopySet<globalThis.Payment<globalThis.AssetKind>>>;
666
- /**
667
- * For use in emergencies, such as coming
668
- * back from a traumatic crash and upgrade. This deposits all the payments in
669
- * this purse's recovery set into the purse itself, returning the total amount
670
- * of assets recovered.
671
- *
672
- * Returns an empty amount if this issuer does not support recovery sets.
673
- */
674
- /**
675
- * For use in emergencies, such as coming
676
- * back from a traumatic crash and upgrade. This deposits all the payments in
677
- * this purse's recovery set into the purse itself, returning the total amount
678
- * of assets recovered.
679
- *
680
- * Returns an empty amount if this issuer does not support recovery sets.
681
- */
682
- recoverAll: () => globalThis.ERef<globalThis.Amount<globalThis.AssetKind>>;
683
- }>>;
274
+ }) => Promise<globalThis.Purse>>;
684
275
  }): (args_0: {
685
276
  bankChannel?: BridgeChannel | undefined;
686
277
  denomToAddressUpdater: MapStore<string, MapStore<string, BalanceUpdater>>;
687
278
  nameAdmin?: Pick<import("./types.js").NameAdmin, "update"> | undefined;
688
- }) => import("@endo/exo").Guarded<{
279
+ }) => Guarded<{
689
280
  /**
690
281
  * Returns assets as they are added to the bank.
691
282
  *
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hC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;uBAC5B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;+BAC7B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;;;;;;QA4B3D,2BAA2B;wBAAf,KAAK;OAyFW;IACsB,cAAc,EAA3D,UAAU,gDA5JhB,OAAO;;;;;;;;;;;;OA4JmC;IACa,yBAAyB,EAA1E,UAAU,QA9ZT,OAAO,cAAc,EAAE,IAAI;;;;OA8ZY;IACA,gBAAgB,EAAxD,UAAU,+BAlPP,IAAJ;;;YAOgD,CAAC;mBAG5C,CAAA;oCAwO2B;;;2BAoB3B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;;;IAwC3D;;;;OAIG;4BADU,iBAAiB,CAAC,eAAe,CAAC;IAS/C;;;;;;;;OAQG;4CAPQ,MAAM,UACN,cAAc,GACZ,IAAI,CAChB,OAAW,WAAW,EAAE,KAAK,CAC7B,OAAa,0BAA0B,EAAE,YAAY,CAChD,CACF;IAkBJ;;;;;;OAMG;wCAHQ,MAAM,GACJ,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAenC;;;;;;;;;;;;OAYG;oBALQ,MAAM,cACN,MAAM,gBACN,MAAM,OACN,cAAc,GAAG;QAAE,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;KAAE;IA2EvD;;;;;OAKG;+BAFQ,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC;GAiC/B;4CA1vBwC,oBAAoB"}
package/src/vat-bank.js CHANGED
@@ -21,6 +21,11 @@ import {
21
21
 
22
22
  import '@agoric/notifier/exported.js';
23
23
 
24
+ /**
25
+ * @import {Guarded} from '@endo/exo')
26
+ * @import {Passable, RemotableObject} from '@endo/pass-style')
27
+ */
28
+
24
29
  const { Fail } = assert;
25
30
 
26
31
  const { VirtualPurseControllerI } = makeVirtualPurseKitIKit();
@@ -38,8 +43,9 @@ const BridgeChannelI = M.interface('BridgeChannel', {
38
43
  */
39
44
 
40
45
  /**
41
- * @typedef {object} BalanceUpdater
42
- * @property {(value: string, nonce?: string) => void} update
46
+ * @typedef {Guarded<{
47
+ * update: (value: string, nonce?: string) => void;
48
+ * }>} BalanceUpdater
43
49
  */
44
50
 
45
51
  const BalanceUpdaterI = M.interface('BalanceUpdater', {
@@ -348,8 +354,8 @@ const prepareAssetSubscription = zone => {
348
354
  /**
349
355
  * @template {AssetKind} [K=AssetKind]
350
356
  * @typedef {object} AssetIssuerKit
351
- * @property {ERef<Mint<K>>} [mint]
352
- * @property {ERef<Issuer<K>>} issuer
357
+ * @property {Mint<K>} [mint]
358
+ * @property {Issuer<K>} issuer
353
359
  * @property {Brand<K>} brand
354
360
  */
355
361
 
@@ -362,12 +368,17 @@ const AssetIssuerKitShape = M.splitRecord(BaseIssuerKitShape, {
362
368
  mint: M.remotable('Mint'),
363
369
  });
364
370
 
365
- /** @typedef {AssetIssuerKit & { denom: string; escrowPurse?: ERef<Purse> }} AssetRecord */
371
+ /**
372
+ * @typedef {AssetIssuerKit & {
373
+ * denom: string;
374
+ * escrowPurse?: RemotableObject & ERef<Purse>;
375
+ * }} AssetRecord
376
+ */
366
377
 
367
378
  /**
368
379
  * @typedef {object} AssetDescriptor
369
380
  * @property {Brand} brand
370
- * @property {ERef<Issuer>} issuer
381
+ * @property {RemotableObject & ERef<Issuer>} issuer
371
382
  * @property {string} issuerName
372
383
  * @property {string} denom
373
384
  * @property {string} proposedName
@@ -411,6 +422,7 @@ const prepareBank = (
411
422
  // (which we emulate, since we know both address and denom are JSONable). If
412
423
  // we decide to partition the provider and use `brandToVPurse` directly, we'd
413
424
  // need ephemera for each `makeBank` call.
425
+ /** @type {MapStore<string, VirtualPurse>} */
414
426
  const addressDenomToPurse = zone.mapStore('addressDenomToPurse');
415
427
  /**
416
428
  * @type {import('@agoric/store/src/stores/store-utils.js').AtomicProvider<
@@ -584,7 +596,7 @@ const prepareBankManager = (
584
596
  /**
585
597
  * @type {MapStore<
586
598
  * string,
587
- * { bank: Bank; brandToVPurse: MapStore<Brand, VirtualPurse> }
599
+ * { bank: Guarded<Bank>; brandToVPurse: MapStore<Brand, VirtualPurse> }
588
600
  * >}
589
601
  */
590
602
  const addressToBank = detachedZone.mapStore('addressToBank');