@agoric/inter-protocol 0.16.2-dev-7cc5def.0 → 0.16.2-u11.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 (176) hide show
  1. package/CHANGELOG.md +1041 -0
  2. package/bundles/bundle-auctioneer-js-meta.json +722 -0
  3. package/bundles/bundle-auctioneer.js +1 -0
  4. package/bundles/bundle-econCommitteeCharter-js-meta.json +222 -242
  5. package/bundles/bundle-econCommitteeCharter.js +1 -1
  6. package/bundles/bundle-feeDistributor-js-meta.json +458 -0
  7. package/bundles/bundle-feeDistributor.js +1 -0
  8. package/bundles/bundle-fluxAggregatorKit-js-meta.json +327 -343
  9. package/bundles/bundle-fluxAggregatorKit.js +1 -1
  10. package/bundles/bundle-psm-js-meta.json +308 -328
  11. package/bundles/bundle-psm.js +1 -1
  12. package/bundles/bundle-reserve-js-meta.json +662 -0
  13. package/bundles/bundle-reserve.js +1 -0
  14. package/bundles/bundle-scaledPriceAuthority-js-meta.json +542 -0
  15. package/bundles/bundle-scaledPriceAuthority.js +1 -0
  16. package/bundles/bundle-vaultFactory-js-meta.json +790 -0
  17. package/bundles/bundle-vaultFactory.js +1 -0
  18. package/package.json +31 -31
  19. package/scripts/add-collateral-core.js +112 -0
  20. package/scripts/build-bundles.js +21 -5
  21. package/scripts/deploy-contracts.js +100 -0
  22. package/scripts/init-core.js +198 -0
  23. package/scripts/invite-committee-core.js +42 -0
  24. package/scripts/manual-price-feed.js +117 -0
  25. package/scripts/price-feed-core.js +104 -0
  26. package/scripts/start-local-chain.sh +84 -0
  27. package/src/auction/auctionBook.js +56 -68
  28. package/src/auction/auctioneer.js +44 -56
  29. package/src/auction/offerBook.js +11 -12
  30. package/src/auction/params.js +5 -3
  31. package/src/auction/scheduleMath.js +13 -13
  32. package/src/auction/scheduler.js +32 -22
  33. package/src/auction/sortedOffers.js +7 -8
  34. package/src/auction/util.js +4 -4
  35. package/src/clientSupport.js +96 -152
  36. package/src/contractSupport.js +5 -5
  37. package/src/econCommitteeCharter.js +15 -16
  38. package/src/feeDistributor.js +33 -34
  39. package/src/interest.js +14 -20
  40. package/src/price/fluxAggregatorContract.js +45 -51
  41. package/src/price/fluxAggregatorKit.js +32 -47
  42. package/src/price/priceOracleKit.js +13 -11
  43. package/src/price/roundsManager.js +64 -52
  44. package/src/proposals/addAssetToVault.js +3 -15
  45. package/src/proposals/committee-proposal.js +9 -5
  46. package/src/proposals/core-proposal.js +7 -7
  47. package/src/proposals/econ-behaviors.js +32 -57
  48. package/src/proposals/price-feed-proposal.js +26 -59
  49. package/src/proposals/startEconCommittee.js +1 -1
  50. package/src/proposals/startPSM.js +22 -32
  51. package/src/proposals/utils.js +7 -26
  52. package/src/psm/psm.js +63 -69
  53. package/src/reserve/assetReserve.js +18 -27
  54. package/src/reserve/assetReserveKit.js +22 -14
  55. package/src/typeGuards.js +13 -0
  56. package/src/vaultFactory/liquidation.js +17 -30
  57. package/src/vaultFactory/math.js +9 -8
  58. package/src/vaultFactory/orderedVaultStore.js +9 -6
  59. package/src/vaultFactory/params.js +18 -24
  60. package/src/vaultFactory/prioritizedVaults.js +2 -2
  61. package/src/vaultFactory/proceeds.js +18 -24
  62. package/src/vaultFactory/storeUtils.js +12 -8
  63. package/src/vaultFactory/types.js +28 -38
  64. package/src/vaultFactory/vault.js +89 -88
  65. package/src/vaultFactory/vaultDirector.js +41 -33
  66. package/src/vaultFactory/vaultFactory.js +26 -33
  67. package/src/vaultFactory/vaultHolder.js +13 -8
  68. package/src/vaultFactory/vaultKit.js +2 -3
  69. package/src/vaultFactory/vaultManager.js +120 -138
  70. package/src/auction/auctionBook.d.ts +0 -83
  71. package/src/auction/auctionBook.d.ts.map +0 -1
  72. package/src/auction/auctioneer.d.ts +0 -75
  73. package/src/auction/auctioneer.d.ts.map +0 -1
  74. package/src/auction/offerBook.d.ts +0 -72
  75. package/src/auction/offerBook.d.ts.map +0 -1
  76. package/src/auction/params.d.ts +0 -142
  77. package/src/auction/params.d.ts.map +0 -1
  78. package/src/auction/scheduleMath.d.ts +0 -4
  79. package/src/auction/scheduleMath.d.ts.map +0 -1
  80. package/src/auction/scheduler.d.ts +0 -49
  81. package/src/auction/scheduler.d.ts.map +0 -1
  82. package/src/auction/sortedOffers.d.ts +0 -8
  83. package/src/auction/sortedOffers.d.ts.map +0 -1
  84. package/src/auction/util.d.ts +0 -30
  85. package/src/auction/util.d.ts.map +0 -1
  86. package/src/clientSupport.d.ts +0 -167
  87. package/src/clientSupport.d.ts.map +0 -1
  88. package/src/collectFees.d.ts +0 -2
  89. package/src/collectFees.d.ts.map +0 -1
  90. package/src/contractSupport.d.ts +0 -33
  91. package/src/contractSupport.d.ts.map +0 -1
  92. package/src/econCommitteeCharter.d.ts +0 -41
  93. package/src/econCommitteeCharter.d.ts.map +0 -1
  94. package/src/feeDistributor.d.ts +0 -212
  95. package/src/feeDistributor.d.ts.map +0 -1
  96. package/src/index.d.ts +0 -2
  97. package/src/index.d.ts.map +0 -1
  98. package/src/interest-math.d.ts +0 -3
  99. package/src/interest-math.d.ts.map +0 -1
  100. package/src/interest.d.ts +0 -29
  101. package/src/interest.d.ts.map +0 -1
  102. package/src/price/fluxAggregatorContract.d.ts +0 -112
  103. package/src/price/fluxAggregatorContract.d.ts.map +0 -1
  104. package/src/price/fluxAggregatorKit.d.ts +0 -155
  105. package/src/price/fluxAggregatorKit.d.ts.map +0 -1
  106. package/src/price/priceOracleKit.d.ts +0 -52
  107. package/src/price/priceOracleKit.d.ts.map +0 -1
  108. package/src/price/roundsManager.d.ts +0 -330
  109. package/src/price/roundsManager.d.ts.map +0 -1
  110. package/src/proposals/addAssetToVault.d.ts +0 -155
  111. package/src/proposals/addAssetToVault.d.ts.map +0 -1
  112. package/src/proposals/committee-proposal.d.ts +0 -121
  113. package/src/proposals/committee-proposal.d.ts.map +0 -1
  114. package/src/proposals/core-proposal.d.ts +0 -149
  115. package/src/proposals/core-proposal.d.ts.map +0 -1
  116. package/src/proposals/econ-behaviors.d.ts +0 -201
  117. package/src/proposals/econ-behaviors.d.ts.map +0 -1
  118. package/src/proposals/price-feed-proposal.d.ts +0 -83
  119. package/src/proposals/price-feed-proposal.d.ts.map +0 -1
  120. package/src/proposals/startEconCommittee.d.ts +0 -34
  121. package/src/proposals/startEconCommittee.d.ts.map +0 -1
  122. package/src/proposals/startPSM.d.ts +0 -61
  123. package/src/proposals/startPSM.d.ts.map +0 -1
  124. package/src/proposals/utils.d.ts +0 -15
  125. package/src/proposals/utils.d.ts.map +0 -1
  126. package/src/provisionPool.d.ts +0 -165
  127. package/src/provisionPool.d.ts.map +0 -1
  128. package/src/provisionPool.js +0 -119
  129. package/src/provisionPoolKit.d.ts +0 -379
  130. package/src/provisionPoolKit.d.ts.map +0 -1
  131. package/src/provisionPoolKit.js +0 -461
  132. package/src/psm/psm.d.ts +0 -178
  133. package/src/psm/psm.d.ts.map +0 -1
  134. package/src/psm/types.d.ts +0 -2
  135. package/src/psm/types.d.ts.map +0 -1
  136. package/src/reserve/assetReserve.d.ts +0 -44
  137. package/src/reserve/assetReserve.d.ts.map +0 -1
  138. package/src/reserve/assetReserveKit.d.ts +0 -114
  139. package/src/reserve/assetReserveKit.d.ts.map +0 -1
  140. package/src/reserve/params.d.ts +0 -10
  141. package/src/reserve/params.d.ts.map +0 -1
  142. package/src/tokens.d.ts +0 -3
  143. package/src/tokens.d.ts.map +0 -1
  144. package/src/tokens.js +0 -5
  145. package/src/vaultFactory/burn.d.ts +0 -2
  146. package/src/vaultFactory/burn.d.ts.map +0 -1
  147. package/src/vaultFactory/liquidation.d.ts +0 -24
  148. package/src/vaultFactory/liquidation.d.ts.map +0 -1
  149. package/src/vaultFactory/math.d.ts +0 -10
  150. package/src/vaultFactory/math.d.ts.map +0 -1
  151. package/src/vaultFactory/orderedVaultStore.d.ts +0 -94
  152. package/src/vaultFactory/orderedVaultStore.d.ts.map +0 -1
  153. package/src/vaultFactory/params.d.ts +0 -159
  154. package/src/vaultFactory/params.d.ts.map +0 -1
  155. package/src/vaultFactory/prioritizedVaults.d.ts +0 -279
  156. package/src/vaultFactory/prioritizedVaults.d.ts.map +0 -1
  157. package/src/vaultFactory/proceeds.d.ts +0 -34
  158. package/src/vaultFactory/proceeds.d.ts.map +0 -1
  159. package/src/vaultFactory/storeUtils.d.ts +0 -25
  160. package/src/vaultFactory/storeUtils.d.ts.map +0 -1
  161. package/src/vaultFactory/type-imports.d.ts +0 -2
  162. package/src/vaultFactory/type-imports.d.ts.map +0 -1
  163. package/src/vaultFactory/types.d.ts +0 -137
  164. package/src/vaultFactory/types.d.ts.map +0 -1
  165. package/src/vaultFactory/vault.d.ts +0 -529
  166. package/src/vaultFactory/vault.d.ts.map +0 -1
  167. package/src/vaultFactory/vaultDirector.d.ts +0 -560
  168. package/src/vaultFactory/vaultDirector.d.ts.map +0 -1
  169. package/src/vaultFactory/vaultFactory.d.ts +0 -162
  170. package/src/vaultFactory/vaultFactory.d.ts.map +0 -1
  171. package/src/vaultFactory/vaultHolder.d.ts +0 -201
  172. package/src/vaultFactory/vaultHolder.d.ts.map +0 -1
  173. package/src/vaultFactory/vaultKit.d.ts +0 -32
  174. package/src/vaultFactory/vaultKit.d.ts.map +0 -1
  175. package/src/vaultFactory/vaultManager.d.ts +0 -554
  176. package/src/vaultFactory/vaultManager.d.ts.map +0 -1
@@ -44,34 +44,30 @@ const trace = makeTracer('VD', true);
44
44
 
45
45
  /**
46
46
  * @typedef {{
47
- * collaterals: Brand[];
48
- * rewardPoolAllocation: AmountKeywordRecord;
47
+ * collaterals: Brand[],
48
+ * rewardPoolAllocation: AmountKeywordRecord,
49
49
  * }} MetricsNotification
50
50
  *
51
- * @typedef {Readonly<{}>} ImmutableState
51
+ * @typedef {Readonly<{
52
+ * }>} ImmutableState
52
53
  *
53
- * @typedef {{}} MutableState
54
+ * @typedef {{
55
+ * }} MutableState
54
56
  *
55
57
  * @typedef {ImmutableState & MutableState} State
56
58
  *
57
59
  * @typedef {{
58
- * burnDebt: BurnDebt;
59
- * getGovernedParams: (
60
- * collateralBrand: Brand,
61
- * ) => import('./vaultManager.js').GovernedParamGetters;
62
- * mintAndTransfer: MintAndTransfer;
63
- * getShortfallReporter: () => Promise<
64
- * import('../reserve/assetReserve.js').ShortfallReporter
65
- * >;
60
+ * burnDebt: BurnDebt,
61
+ * getGovernedParams: (collateralBrand: Brand) => import('./vaultManager.js').GovernedParamGetters,
62
+ * mintAndTransfer: MintAndTransfer,
63
+ * getShortfallReporter: () => Promise<import('../reserve/assetReserve.js').ShortfallReporter>,
66
64
  * }} FactoryPowersFacet
67
65
  *
68
66
  * @typedef {Readonly<{
69
67
  * state: State;
70
68
  * }>} MethodContext
71
69
  *
72
- * @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager').TypedParamManager<
73
- * import('./params.js').VaultDirectorParams
74
- * >} VaultDirectorParamManager
70
+ * @typedef {import('@agoric/governance/src/contractGovernance/typedParamManager').TypedParamManager<import('./params.js').VaultDirectorParams>} VaultDirectorParamManager
75
71
  */
76
72
 
77
73
  const shortfallInvitationKey = 'shortfallInvitation';
@@ -80,7 +76,7 @@ const shortfallInvitationKey = 'shortfallInvitation';
80
76
  * @param {import('@agoric/ertp').Baggage} baggage
81
77
  * @param {import('./vaultFactory.js').VaultFactoryZCF} zcf
82
78
  * @param {VaultDirectorParamManager} directorParamManager
83
- * @param {ZCFMint<'nat'>} debtMint
79
+ * @param {ZCFMint<"nat">} debtMint
84
80
  * @param {ERef<import('@agoric/time/src/types').TimerService>} timer
85
81
  * @param {ERef<import('../auction/auctioneer.js').AuctioneerPublicFacet>} auctioneer
86
82
  * @param {ERef<StorageNode>} storageNode
@@ -130,7 +126,9 @@ const prepareVaultDirector = (
130
126
 
131
127
  const managersNode = E(storageNode).makeChildNode('managers');
132
128
 
133
- /** @returns {MetricsNotification} */
129
+ /**
130
+ * @returns {MetricsNotification}
131
+ */
134
132
  const sampleMetrics = () => {
135
133
  return harden({
136
134
  collaterals: Array.from(collateralManagers.keys()),
@@ -190,15 +188,15 @@ const prepareVaultDirector = (
190
188
  },
191
189
 
192
190
  /**
193
- * Let the manager add rewards to the rewardPoolSeat without exposing the
194
- * rewardPoolSeat to them.
191
+ * Let the manager add rewards to the rewardPoolSeat without
192
+ * exposing the rewardPoolSeat to them.
195
193
  *
196
194
  * @type {MintAndTransfer}
197
195
  */
198
196
  mintAndTransfer: (mintReceiver, toMint, fee, nonMintTransfers) => {
199
197
  const kept = AmountMath.subtract(toMint, fee);
200
198
  debtMint.mintGains(harden({ Minted: toMint }), mintSeat);
201
- /** @type {TransferPart[]} */
199
+ /** @type {import('@agoric/zoe/src/contractSupport/atomicTransfer.js').TransferPart[]} */
202
200
  const transfers = [
203
201
  ...nonMintTransfers,
204
202
  [mintSeat, rewardPoolSeat, { Minted: fee }],
@@ -252,7 +250,6 @@ const prepareVaultDirector = (
252
250
  metrics: makeRecorderTopic('Vault Factory metrics', metricsKit),
253
251
  });
254
252
 
255
- /** @param {(vm: VaultManager) => void} fn */
256
253
  const allManagersDo = fn => {
257
254
  for (const managerIndex of collateralManagers.values()) {
258
255
  const vm = vaultManagers.get(managerIndex).self;
@@ -266,7 +263,9 @@ const prepareVaultDirector = (
266
263
  });
267
264
  };
268
265
 
269
- /** @returns {State} */
266
+ /**
267
+ * @returns {State}
268
+ */
270
269
  const initState = () => {
271
270
  return {};
272
271
  };
@@ -276,7 +275,7 @@ const prepareVaultDirector = (
276
275
  *
277
276
  * @param {import('./vaultFactory.js').VaultFactoryZCF} zcf
278
277
  * @param {VaultDirectorParamManager} directorParamManager
279
- * @param {ZCFMint<'nat'>} debtMint
278
+ * @param {ZCFMint<"nat">} debtMint
280
279
  */
281
280
  const makeVaultDirector = prepareExoClassKit(
282
281
  baggage,
@@ -331,7 +330,9 @@ const prepareVaultDirector = (
331
330
  }
332
331
  },
333
332
  }),
334
- /** @param {string} name */
333
+ /**
334
+ * @param {string} name
335
+ */
335
336
  getInvitation(name) {
336
337
  return directorParamManager.getInternalParamValue(name);
337
338
  },
@@ -423,7 +424,6 @@ const prepareVaultDirector = (
423
424
 
424
425
  makeLiquidationWaker() {
425
426
  return makeWaker('liquidationWaker', _timestamp => {
426
- // XXX floating promise
427
427
  allManagersDo(vm => vm.liquidateVaults(auctioneer));
428
428
  });
429
429
  },
@@ -440,7 +440,9 @@ const prepareVaultDirector = (
440
440
  },
441
441
  },
442
442
  public: {
443
- /** @param {Brand} brandIn */
443
+ /**
444
+ * @param {Brand} brandIn
445
+ */
444
446
  getCollateralManager(brandIn) {
445
447
  collateralManagers.has(brandIn) ||
446
448
  Fail`Not a supported collateral type ${brandIn}`;
@@ -461,16 +463,22 @@ const prepareVaultDirector = (
461
463
  getPublicTopics() {
462
464
  return topics;
463
465
  },
464
- /** subscription for the paramManager for the vaultFactory's electorate */
466
+ /**
467
+ * subscription for the paramManager for the vaultFactory's electorate
468
+ */
465
469
  getElectorateSubscription() {
466
470
  return directorParamManager.getSubscription();
467
471
  },
468
- /** @param {{ collateralBrand: Brand }} selector */
472
+ /**
473
+ * @param {{ collateralBrand: Brand }} selector
474
+ */
469
475
  getGovernedParams({ collateralBrand }) {
470
476
  // TODO use named getters of TypedParamManager
471
477
  return vaultParamManagers.get(collateralBrand).getParams();
472
478
  },
473
- /** @param {string} name */
479
+ /**
480
+ * @param {string} name
481
+ */
474
482
  getInvitationAmount(name) {
475
483
  return directorParamManager.getInvitationAmount(name);
476
484
  },
@@ -490,7 +498,9 @@ const prepareVaultDirector = (
490
498
  rescheduleWaker,
491
499
  );
492
500
  },
493
- /** Start non-durable processes (or restart if needed after vat restart) */
501
+ /**
502
+ * Start non-durable processes (or restart if needed after vat restart)
503
+ */
494
504
  async start() {
495
505
  const { helper, machine } = this.facets;
496
506
 
@@ -515,9 +525,7 @@ harden(prepareVaultDirector);
515
525
  /**
516
526
  * Prepare the VaultDirector kind, get or make the singleton
517
527
  *
518
- * @type {(
519
- * ...pvdArgs: Parameters<typeof prepareVaultDirector>
520
- * ) => ReturnType<ReturnType<typeof prepareVaultDirector>>}
528
+ * @type {(...pvdArgs: Parameters<typeof prepareVaultDirector>) => ReturnType<ReturnType<typeof prepareVaultDirector>>}
521
529
  */
522
530
  export const provideDirector = (...args) => {
523
531
  const makeVaultDirector = prepareVaultDirector(...args);
@@ -34,46 +34,40 @@ import { provideDirector } from './vaultDirector.js';
34
34
  const trace = makeTracer('VF', true);
35
35
 
36
36
  /**
37
- * @typedef {ZCF<
38
- * GovernanceTerms<import('./params').VaultDirectorParams> & {
39
- * auctioneerPublicFacet: import('../auction/auctioneer.js').AuctioneerPublicFacet;
40
- * priceAuthority: ERef<PriceAuthority>;
41
- * reservePublicFacet: AssetReservePublicFacet;
42
- * timerService: import('@agoric/time/src/types').TimerService;
43
- * }
44
- * >} VaultFactoryZCF
37
+ * @typedef {ZCF<GovernanceTerms<import('./params').VaultDirectorParams> & {
38
+ * auctioneerPublicFacet: import('../auction/auctioneer.js').AuctioneerPublicFacet,
39
+ * priceAuthority: ERef<PriceAuthority>,
40
+ * reservePublicFacet: AssetReservePublicFacet,
41
+ * timerService: import('@agoric/time/src/types').TimerService,
42
+ * }>} VaultFactoryZCF
45
43
  */
46
44
 
47
- /** @type {ContractMeta} */
48
- export const meta = {
49
- privateArgsShape: M.splitRecord(
50
- {
51
- marshaller: M.remotable('Marshaller'),
52
- storageNode: StorageNodeShape,
53
- },
54
- {
55
- // only necessary on first invocation, not subsequent
56
- feeMintAccess: FeeMintAccessShape,
57
- initialPoserInvitation: InvitationShape,
58
- initialShortfallInvitation: InvitationShape,
59
- },
60
- ),
61
- upgradability: 'canUpgrade',
62
- };
63
- harden(meta);
45
+ export const privateArgsShape = M.splitRecord(
46
+ harden({
47
+ marshaller: M.remotable('Marshaller'),
48
+ storageNode: StorageNodeShape,
49
+ }),
50
+ harden({
51
+ // only necessary on first invocation, not subsequent
52
+ feeMintAccess: FeeMintAccessShape,
53
+ initialPoserInvitation: InvitationShape,
54
+ initialShortfallInvitation: InvitationShape,
55
+ }),
56
+ );
57
+ harden(privateArgsShape);
64
58
 
65
59
  /**
66
60
  * @param {VaultFactoryZCF} zcf
67
61
  * @param {{
68
- * feeMintAccess: FeeMintAccess;
69
- * initialPoserInvitation: Invitation;
70
- * initialShortfallInvitation: Invitation;
71
- * storageNode: ERef<StorageNode>;
72
- * marshaller: ERef<Marshaller>;
62
+ * feeMintAccess: FeeMintAccess,
63
+ * initialPoserInvitation: Invitation,
64
+ * initialShortfallInvitation: Invitation,
65
+ * storageNode: ERef<StorageNode>,
66
+ * marshaller: ERef<Marshaller>,
73
67
  * }} privateArgs
74
68
  * @param {import('@agoric/ertp').Baggage} baggage
75
69
  */
76
- export const start = async (zcf, privateArgs, baggage) => {
70
+ export const prepare = async (zcf, privateArgs, baggage) => {
77
71
  trace('prepare start', privateArgs, [...baggage.keys()]);
78
72
  const {
79
73
  initialPoserInvitation,
@@ -151,6 +145,5 @@ export const start = async (zcf, privateArgs, baggage) => {
151
145
  publicFacet: director.public,
152
146
  });
153
147
  };
154
- harden(start);
155
148
 
156
- /** @typedef {ContractOf<typeof start>} VaultFactoryContract */
149
+ /** @typedef {ContractOf<typeof prepare>} VaultFactoryContract */
@@ -1,15 +1,17 @@
1
- /** @file Use-object for the owner of a vault */
1
+ /**
2
+ * @file Use-object for the owner of a vault
3
+ */
2
4
  import { AmountShape } from '@agoric/ertp';
3
5
  import { M, prepareExoClassKit } from '@agoric/vat-data';
4
6
  import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
5
- import { UnguardedHelperI } from '@agoric/internal/src/typeGuards.js';
7
+ import { UnguardedHelperI } from '../typeGuards.js';
6
8
 
7
9
  const { Fail } = assert;
8
10
 
9
11
  /**
10
12
  * @typedef {{
11
- * topicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<VaultNotification>;
12
- * vault: Vault | null;
13
+ * topicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<VaultNotification>,
14
+ * vault: Vault | null,
13
15
  * }} State
14
16
  */
15
17
 
@@ -23,7 +25,7 @@ const HolderI = M.interface('holder', {
23
25
  makeTransferInvitation: M.call().returns(M.promise()),
24
26
  });
25
27
 
26
- /** @type {{ [name: string]: [description: string, valueShape: Pattern] }} */
28
+ /** @type {{ [name: string]: [ description: string, valueShape: Pattern ] }} */
27
29
  const PUBLIC_TOPICS = {
28
30
  vault: ['Vault holder status', M.any()],
29
31
  };
@@ -46,6 +48,7 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
46
48
  }),
47
49
  },
48
50
  /**
51
+ *
49
52
  * @param {Vault} vault
50
53
  * @param {StorageNode} storageNode
51
54
  * @returns {State}
@@ -58,7 +61,9 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
58
61
  },
59
62
  {
60
63
  helper: {
61
- /** @throws if this holder no longer owns the vault */
64
+ /**
65
+ * @throws if this holder no longer owns the vault
66
+ */
62
67
  owned() {
63
68
  const { vault } = this.state;
64
69
  if (!vault) {
@@ -99,8 +104,8 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
99
104
  return this.facets.helper.owned().makeCloseInvitation();
100
105
  },
101
106
  /**
102
- * Starting a transfer revokes the vault holder. The associated updater
103
- * will get a special notification that the vault is being transferred.
107
+ * Starting a transfer revokes the vault holder. The associated updater will
108
+ * get a special notification that the vault is being transferred.
104
109
  */
105
110
  makeTransferInvitation() {
106
111
  const vault = this.facets.helper.owned();
@@ -8,8 +8,7 @@ import { prepareVaultHolder } from './vaultHolder.js';
8
8
  const trace = makeTracer('VK', true);
9
9
 
10
10
  /**
11
- * Wrap the VaultHolder duration object in a record suitable for the result of
12
- * an invitation.
11
+ * Wrap the VaultHolder duration object in a record suitable for the result of an invitation.
13
12
  *
14
13
  * @param {import('@agoric/ertp').Baggage} baggage
15
14
  * @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit} makeRecorderKit
@@ -44,4 +43,4 @@ export const prepareVaultKit = (baggage, makeRecorderKit) => {
44
43
  return makeVaultKit;
45
44
  };
46
45
 
47
- /** @typedef {ReturnType<ReturnType<typeof prepareVaultKit>>} VaultKit */
46
+ /** @typedef {(ReturnType<ReturnType<typeof prepareVaultKit>>)} VaultKit */