@agoric/zoe 0.26.3-upgrade-16-dev-0df76a7.0 → 0.26.3-upgrade-17-dev-e67cd91.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 (132) hide show
  1. package/README.md +2 -3
  2. package/bundles/bundle-contractFacet-js-meta.json +536 -507
  3. package/bundles/bundle-contractFacet.js +1 -1
  4. package/package.json +30 -28
  5. package/src/cleanProposal.d.ts.map +1 -1
  6. package/src/cleanProposal.js +4 -2
  7. package/src/contractFacet/allocationMath.d.ts.map +1 -1
  8. package/src/contractFacet/allocationMath.js +1 -2
  9. package/src/contractFacet/exit.d.ts.map +1 -1
  10. package/src/contractFacet/exit.js +1 -2
  11. package/src/contractFacet/offerHandlerStorage.d.ts +4 -0
  12. package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -1
  13. package/src/contractFacet/offerHandlerStorage.js +12 -0
  14. package/src/contractFacet/reallocate.d.ts.map +1 -1
  15. package/src/contractFacet/reallocate.js +1 -2
  16. package/src/contractFacet/rightsConservation.js +5 -5
  17. package/src/contractFacet/typeGuards.d.ts +8 -0
  18. package/src/contractFacet/typeGuards.d.ts.map +1 -0
  19. package/src/contractFacet/typeGuards.js +25 -0
  20. package/src/contractFacet/types-ambient.d.ts +4 -1
  21. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  22. package/src/contractFacet/vatRoot.js +1 -2
  23. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  24. package/src/contractFacet/zcfMint.js +3 -5
  25. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  26. package/src/contractFacet/zcfSeat.js +10 -9
  27. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  28. package/src/contractFacet/zcfZygote.js +8 -12
  29. package/src/contractSupport/bondingCurves.js +1 -1
  30. package/src/contractSupport/priceAuthority.d.ts.map +1 -1
  31. package/src/contractSupport/priceAuthority.js +2 -3
  32. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  33. package/src/contractSupport/priceAuthorityInitial.js +0 -1
  34. package/src/contractSupport/priceAuthorityTransform.js +1 -1
  35. package/src/contractSupport/priceQuote.d.ts.map +1 -1
  36. package/src/contractSupport/priceQuote.js +2 -3
  37. package/src/contractSupport/ratio.d.ts +12 -3
  38. package/src/contractSupport/ratio.d.ts.map +1 -1
  39. package/src/contractSupport/ratio.js +19 -5
  40. package/src/contractSupport/recorder.d.ts +11 -21
  41. package/src/contractSupport/recorder.d.ts.map +1 -1
  42. package/src/contractSupport/recorder.js +9 -21
  43. package/src/contractSupport/stateMachine.js +1 -1
  44. package/src/contractSupport/topics.d.ts +26 -0
  45. package/src/contractSupport/topics.d.ts.map +1 -1
  46. package/src/contractSupport/topics.js +24 -1
  47. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  48. package/src/contractSupport/zoeHelpers.js +6 -9
  49. package/src/contracts/auction/assertBidSeat.js +1 -1
  50. package/src/contracts/auction/index.d.ts.map +1 -1
  51. package/src/contracts/auction/index.js +1 -3
  52. package/src/contracts/auction/secondPriceLogic.js +4 -4
  53. package/src/contracts/autoswap.d.ts.map +1 -1
  54. package/src/contracts/autoswap.js +4 -2
  55. package/src/contracts/callSpread/calculateShares.js +1 -1
  56. package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -1
  57. package/src/contracts/callSpread/payoffHandler.js +0 -1
  58. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
  59. package/src/contracts/callSpread/pricedCallSpread.js +1 -3
  60. package/src/contracts/coveredCall-durable.d.ts.map +1 -1
  61. package/src/contracts/coveredCall-durable.js +1 -2
  62. package/src/contracts/coveredCall.d.ts.map +1 -1
  63. package/src/contracts/coveredCall.js +1 -2
  64. package/src/contracts/loan/borrow.js +1 -1
  65. package/src/contracts/loan/close.js +1 -1
  66. package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -1
  67. package/src/contracts/loan/scheduleLiquidation.js +0 -1
  68. package/src/contracts/loan/updateDebt.js +3 -3
  69. package/src/contracts/mintAndSellNFT.js +1 -1
  70. package/src/contracts/oracle.d.ts.map +1 -1
  71. package/src/contracts/oracle.js +1 -2
  72. package/src/contracts/otcDesk.js +1 -1
  73. package/src/contracts/priceAggregator.d.ts.map +1 -1
  74. package/src/contracts/priceAggregator.js +3 -4
  75. package/src/contracts/sellItems.d.ts.map +1 -1
  76. package/src/contracts/sellItems.js +1 -3
  77. package/src/contracts/valueVow.contract.d.ts +17 -0
  78. package/src/contracts/valueVow.contract.d.ts.map +1 -0
  79. package/src/contracts/valueVow.contract.js +63 -0
  80. package/src/instanceRecordStorage.d.ts.map +1 -1
  81. package/src/instanceRecordStorage.js +2 -5
  82. package/src/issuerRecord.js +1 -1
  83. package/src/issuerStorage.d.ts.map +1 -1
  84. package/src/issuerStorage.js +5 -4
  85. package/src/makeHandle.d.ts.map +1 -1
  86. package/src/makeHandle.js +1 -3
  87. package/src/typeGuards.d.ts +10 -8
  88. package/src/typeGuards.d.ts.map +1 -1
  89. package/src/typeGuards.js +7 -12
  90. package/src/zoeService/createZCFVat.js +1 -1
  91. package/src/zoeService/escrowStorage.js +3 -3
  92. package/src/zoeService/feeMint.d.ts.map +1 -1
  93. package/src/zoeService/feeMint.js +1 -2
  94. package/src/zoeService/installationStorage.d.ts.map +1 -1
  95. package/src/zoeService/installationStorage.js +1 -3
  96. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
  97. package/src/zoeService/instanceAdminStorage.js +7 -9
  98. package/src/zoeService/internal-types.d.ts +1 -1
  99. package/src/zoeService/internal-types.d.ts.map +1 -1
  100. package/src/zoeService/internal-types.js +0 -1
  101. package/src/zoeService/invitationQueries.js +3 -3
  102. package/src/zoeService/makeInvitation.js +1 -1
  103. package/src/zoeService/offer/burnInvitation.d.ts.map +1 -1
  104. package/src/zoeService/offer/burnInvitation.js +3 -5
  105. package/src/zoeService/offer/offer.d.ts.map +1 -1
  106. package/src/zoeService/offer/offer.js +1 -2
  107. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  108. package/src/zoeService/originalZoeSeat.js +1 -3
  109. package/src/zoeService/startInstance.d.ts.map +1 -1
  110. package/src/zoeService/startInstance.js +1 -9
  111. package/src/zoeService/utils.d.ts +3 -2
  112. package/src/zoeService/utils.test-d.ts +6 -5
  113. package/src/zoeService/zoe.d.ts +3 -2
  114. package/src/zoeService/zoe.d.ts.map +1 -1
  115. package/src/zoeService/zoe.js +54 -52
  116. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  117. package/src/zoeService/zoeSeat.js +1 -3
  118. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  119. package/src/zoeService/zoeStorageManager.js +0 -1
  120. package/tools/fakePriceAuthority.d.ts.map +1 -1
  121. package/tools/fakePriceAuthority.js +5 -4
  122. package/tools/fakeVatAdmin.d.ts.map +1 -1
  123. package/tools/fakeVatAdmin.js +10 -9
  124. package/tools/manualPriceAuthority.d.ts.map +1 -1
  125. package/tools/manualPriceAuthority.js +0 -1
  126. package/tools/manualTimer.d.ts.map +1 -1
  127. package/tools/manualTimer.js +1 -2
  128. package/tools/scriptedPriceAuthority.d.ts.map +1 -1
  129. package/tools/scriptedPriceAuthority.js +0 -1
  130. package/tools/setup-zoe.d.ts +3 -3
  131. package/tools/setup-zoe.d.ts.map +1 -1
  132. package/tools/setup-zoe.js +1 -0
@@ -1,5 +1,4 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
- import { Fail, q } from '@agoric/assert';
1
+ import { Fail, q } from '@endo/errors';
3
2
  import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp';
4
3
  import { assertAllDefined } from '@agoric/internal';
5
4
  import {
@@ -146,11 +145,11 @@ const start = async (zcf, privateArgs) => {
146
145
  async wake(timestamp) {
147
146
  // Run all the queriers.
148
147
  const querierPs = [];
149
- oracleRecords.forEach(({ querier }) => {
148
+ for (const { querier } of oracleRecords) {
150
149
  if (querier) {
151
150
  querierPs.push(querier(timestamp));
152
151
  }
153
- });
152
+ }
154
153
  if (!querierPs.length) {
155
154
  // Only have push results, so publish them.
156
155
  // eslint-disable-next-line no-use-before-define
@@ -1 +1 @@
1
- {"version":3,"file":"sellItems.d.ts","sourceRoot":"","sources":["sellItems.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,2BAFW,GAAG,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;CAAC,CAAC;;;;EAuH5C"}
1
+ {"version":3,"file":"sellItems.d.ts","sourceRoot":"","sources":["sellItems.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,2BAFW,GAAG,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;CAAC,CAAC;;;;EAuH5C"}
@@ -1,4 +1,4 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
1
+ import { Fail } from '@endo/errors';
2
2
  import { Far } from '@endo/marshal';
3
3
  import { Nat } from '@endo/nat';
4
4
  import { AmountMath } from '@agoric/ertp';
@@ -14,8 +14,6 @@ import {
14
14
  assertNatAssetKind,
15
15
  } from '../contractSupport/index.js';
16
16
 
17
- const { Fail } = assert;
18
-
19
17
  /**
20
18
  * Sell items in exchange for money. Items may be fungible or
21
19
  * non-fungible and multiple items may be bought at once. Money must
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @import { Baggage } from '@agoric/vat-data';
3
+ */
4
+ /** @type {ContractMeta<typeof start>} */
5
+ export const meta: ContractMeta<typeof start>;
6
+ export function start(zcf: ZCF<{}>, _privateArgs: undefined, baggage: Baggage): {
7
+ publicFacet: import("@endo/exo").Guarded<{
8
+ getValue(): import("@agoric/vow").Vow<any>;
9
+ setValue(value: any): void;
10
+ makeGetterInvitation(): Promise<Invitation<import("@agoric/vow").Vow<any>, undefined>>;
11
+ makeSetterInvitation(): Promise<Invitation<void, {
12
+ value: unknown;
13
+ }>>;
14
+ }>;
15
+ };
16
+ import type { Baggage } from '@agoric/vat-data';
17
+ //# sourceMappingURL=valueVow.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueVow.contract.d.ts","sourceRoot":"","sources":["valueVow.contract.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAGnC;AAYK,2BAJI,GAAG,CAAC,EAAE,CAAC,gBACP,SAAS,WACT,OAAO;;;;;;mBA8B4B,OAAO;;;EAWpD;6BAzD2B,kBAAkB"}
@@ -0,0 +1,63 @@
1
+ import { prepareVowTools } from '@agoric/vow';
2
+ import { makeDurableZone } from '@agoric/zone/durable.js';
3
+
4
+ /**
5
+ * @import { Baggage } from '@agoric/vat-data';
6
+ */
7
+
8
+ /** @type {ContractMeta<typeof start>} */
9
+ export const meta = {
10
+ upgradability: 'canUpgrade',
11
+ };
12
+ harden(meta);
13
+
14
+ /**
15
+ * This is a simple contract to demonstrate durable vows.
16
+ *
17
+ * It provides an invitation to get a vow for a value and another invitation to set the value.
18
+ *
19
+ * @param {ZCF<{}>} zcf
20
+ * @param {undefined} _privateArgs
21
+ * @param {Baggage} baggage
22
+ */
23
+ export const start = (zcf, _privateArgs, baggage) => {
24
+ zcf.setTestJig(() => ({
25
+ baggage,
26
+ }));
27
+
28
+ const zone = makeDurableZone(baggage);
29
+
30
+ const vowTools = prepareVowTools(zone);
31
+
32
+ const { vow, resolver } = zone.makeOnce('vowResolver', () =>
33
+ vowTools.makeVowKit(),
34
+ );
35
+
36
+ const publicFacet = zone.exo('publicFacet', undefined, {
37
+ getValue() {
38
+ return vow;
39
+ },
40
+ setValue(value) {
41
+ resolver.resolve(value);
42
+ },
43
+ makeGetterInvitation() {
44
+ return zcf.makeInvitation(seat => {
45
+ seat.exit();
46
+ return vow;
47
+ }, 'get value');
48
+ },
49
+ makeSetterInvitation() {
50
+ return zcf.makeInvitation(
51
+ /** @type {HandleOffer<void, { value: unknown }>}} */
52
+ (seat, offerArgs) => {
53
+ seat.exit();
54
+ resolver.resolve(offerArgs.value);
55
+ },
56
+ 'set value',
57
+ );
58
+ },
59
+ });
60
+
61
+ return harden({ publicFacet });
62
+ };
63
+ harden(start);
@@ -1 +1 @@
1
- {"version":3,"file":"instanceRecordStorage.d.ts","sourceRoot":"","sources":["instanceRecordStorage.js"],"names":[],"mappings":"AA8BO,mDAHI,OAAO,kBAAkB,EAAE,OAAO,GAChC,CAAC,EAAE,EAAE,cAAc,KAAK,aAAa,CAqFjD"}
1
+ {"version":3,"file":"instanceRecordStorage.d.ts","sourceRoot":"","sources":["instanceRecordStorage.js"],"names":[],"mappings":"AA6BO,mDAHI,OAAO,kBAAkB,EAAE,OAAO,GAChC,CAAC,EAAE,EAAE,cAAc,KAAK,aAAa,CAmFjD"}
@@ -1,4 +1,5 @@
1
- import { provide, prepareExoClass, M } from '@agoric/vat-data';
1
+ import { q, Fail } from '@endo/errors';
2
+ import { prepareExoClass, M } from '@agoric/vat-data';
2
3
  import { assertKeywordName } from './cleanProposal.js';
3
4
  import {
4
5
  BrandKeywordRecordShape,
@@ -12,8 +13,6 @@ import {
12
13
 
13
14
  const { ownKeys } = Reflect;
14
15
 
15
- const { quote: q, Fail } = assert;
16
-
17
16
  /**
18
17
  * The InstanceRecord stores the installation, customTerms, issuers,
19
18
  * and brands for a particular Zoe contract instance. The installation
@@ -29,8 +28,6 @@ const { quote: q, Fail } = assert;
29
28
  * @returns {(ir: InstanceRecord) => InstanceState}
30
29
  */
31
30
  export const makeInstanceRecordStorage = baggage => {
32
- provide(baggage, 'instanceRecord', () => undefined);
33
-
34
31
  const assertInstantiated = instanceRecord => {
35
32
  instanceRecord !== 'undefined' ||
36
33
  Fail`instanceRecord has not been instantiated`;
@@ -1,5 +1,5 @@
1
1
  // @jessie-check
2
- import { Fail } from '@agoric/assert';
2
+ import { Fail } from '@endo/errors';
3
3
 
4
4
  /**
5
5
  * Put together information about the issuer in a standard format that
@@ -1 +1 @@
1
- {"version":3,"file":"issuerStorage.d.ts","sourceRoot":"","sources":["issuerStorage.js"],"names":[],"mappings":"AAgBO,iDAFI,OAAO,kBAAkB,EAAE,OAAO;2DAwHhC,mBAAmB,KACjB,OAAO,CAAC;QAAE,OAAO,EAAE,mBAAmB,CAAC;QACnD,MAA4B,EAAE,kBAAkB,CAAA;KAAE,CAAC;2BAnDzC,IAAI,CAAC,MAAM,CAAC,KACV,OAAO,CAAC,YAAY,CAAC;sCAzBvB,YAAY,KACV,YAAY;;wBAyFA,CAAC,SAAZ,SAAU,UACb,MAAM,CAAC,CAAC,CAAC,KACP,KAAK,CAAC,CAAC,CAAC;wBASI,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,KACN,MAAM,CAAC,CAAC,CAAC;gCASX,MAAM,EAAE,KACN,aAAa;;EAyB3B"}
1
+ {"version":3,"file":"issuerStorage.d.ts","sourceRoot":"","sources":["issuerStorage.js"],"names":[],"mappings":"AAeO,iDAFI,OAAO,kBAAkB,EAAE,OAAO;2DAwHhC,mBAAmB,KACjB,OAAO,CAAC;QAAE,OAAO,EAAE,mBAAmB,CAAC;QACnD,MAA4B,EAAE,kBAAkB,CAAA;KAAE,CAAC;2BAnDzC,IAAI,CAAC,MAAM,CAAC,KACV,OAAO,CAAC,YAAY,CAAC;sCAzBvB,YAAY,KACV,YAAY;;wBAyFA,CAAC,SAAZ,SAAU,UACb,MAAM,CAAC,CAAC,CAAC,KACP,KAAK,CAAC,CAAC,CAAC;wBASI,CAAC,SAAZ,SAAU,SACb,KAAK,CAAC,CAAC,CAAC,KACN,MAAM,CAAC,CAAC,CAAC;gCASX,MAAM,EAAE,KACN,aAAa;;EA2B3B"}
@@ -1,12 +1,11 @@
1
+ import { Fail } from '@endo/errors';
2
+ import { E } from '@endo/eventual-send';
1
3
  import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
2
4
  import { provideDurableWeakMapStore } from '@agoric/vat-data';
3
- import { E } from '@endo/eventual-send';
4
5
 
5
6
  import { cleanKeywords } from './cleanProposal.js';
6
7
  import { makeIssuerRecord } from './issuerRecord.js';
7
8
 
8
- const { Fail } = assert;
9
-
10
9
  const STORAGE_INSTANTIATED_KEY = 'IssuerStorageInstantiated';
11
10
 
12
11
  /**
@@ -183,7 +182,9 @@ export const provideIssuerStorage = zcfBaggage => {
183
182
  if (!zcfBaggage.has(STORAGE_INSTANTIATED_KEY)) {
184
183
  zcfBaggage.init(STORAGE_INSTANTIATED_KEY, true);
185
184
  instantiated = true;
186
- issuerRecords.forEach(storeIssuerRecord);
185
+ for (const record of issuerRecords) {
186
+ storeIssuerRecord(record);
187
+ }
187
188
  }
188
189
  };
189
190
 
@@ -1 +1 @@
1
- {"version":3,"file":"makeHandle.d.ts","sourceRoot":"","sources":["makeHandle.js"],"names":[],"mappings":"AAkBO,oCALe,CAAC,SAAV,MAAQ,WACV,OAAO,cACP,CAAC,GACC,CAAC,SAAS,UAAU,GAAG,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,CAAC,CAAC,CAanE;AAUM,2BAJe,CAAC,SAAV,MAAQ,cACV,CAAC,GACC,CAAC,SAAS,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAOvD;6BAlC0B,kBAAkB"}
1
+ {"version":3,"file":"makeHandle.d.ts","sourceRoot":"","sources":["makeHandle.js"],"names":[],"mappings":"AAgBO,oCALe,CAAC,SAAV,MAAQ,WACV,OAAO,cACP,CAAC,GACC,CAAC,SAAS,UAAU,GAAG,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,CAAC,CAAC,CAanE;AAUM,2BAJe,CAAC,SAAV,MAAQ,cACV,CAAC,GACC,CAAC,SAAS,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAOvD;6BAlC0B,kBAAkB"}
package/src/makeHandle.js CHANGED
@@ -1,13 +1,11 @@
1
1
  // @jessie-check
2
2
 
3
- import { assert } from '@agoric/assert';
3
+ import { Fail } from '@endo/errors';
4
4
  import { initEmpty, makeExo } from '@agoric/store';
5
5
  import { prepareExoClass } from '@agoric/vat-data';
6
6
 
7
7
  import { HandleI } from './typeGuards.js';
8
8
 
9
- const { Fail } = assert;
10
-
11
9
  /** @import {Baggage} from '@agoric/vat-data' */
12
10
 
13
11
  /**
@@ -1,8 +1,14 @@
1
+ /**
2
+ * @import {TypedPattern} from '@agoric/internal';
3
+ */
1
4
  export const KeywordShape: import("@endo/patterns").Matcher;
2
- export const InvitationHandleShape: import("@endo/patterns").Matcher;
3
- export const InvitationShape: import("@endo/patterns").Matcher;
5
+ /** @type {TypedPattern<InvitationHandle>} */
6
+ export const InvitationHandleShape: TypedPattern<InvitationHandle>;
7
+ /** @type {TypedPattern<Invitation>} */
8
+ export const InvitationShape: TypedPattern<Invitation>;
4
9
  export const InstanceHandleShape: import("@endo/patterns").Matcher;
5
- export const InstallationShape: import("@endo/patterns").Matcher;
10
+ /** @type {TypedPattern<Installation>} */
11
+ export const InstallationShape: TypedPattern<Installation>;
6
12
  export const SeatShape: import("@endo/patterns").Matcher;
7
13
  export const AmountKeywordRecordShape: import("@endo/patterns").Matcher;
8
14
  export const AmountPatternKeywordRecordShape: import("@endo/patterns").Matcher;
@@ -45,11 +51,6 @@ export const ZoeMintI: import("@endo/patterns").InterfaceGuard<{
45
51
  mintAndEscrow: import("@endo/patterns").MethodGuard;
46
52
  withdrawAndBurn: import("@endo/patterns").MethodGuard;
47
53
  }>;
48
- export const ZcfMintI: import("@endo/patterns").InterfaceGuard<{
49
- getIssuerRecord: import("@endo/patterns").MethodGuard;
50
- mintGains: import("@endo/patterns").MethodGuard;
51
- burnLosses: import("@endo/patterns").MethodGuard;
52
- }>;
53
54
  export const FeeMintAccessShape: import("@endo/patterns").Matcher;
54
55
  export const ExitObjectI: import("@endo/patterns").InterfaceGuard<{
55
56
  exit: import("@endo/patterns").MethodGuard;
@@ -165,5 +166,6 @@ export namespace PriceQuoteShape {
165
166
  export { AmountShape as quoteAmount };
166
167
  export let quotePayment: globalThis.Pattern;
167
168
  }
169
+ import type { TypedPattern } from '@agoric/internal';
168
170
  import { AmountShape } from '@agoric/ertp';
169
171
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAgBA,4DAAuC;AAEvC,qEAAqE;AACrE,+DAAyD;AACzD,mEAAiE;AACjE,iEAA6D;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,iEAOE;;;;;;;;;;AAaF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA0BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAMM,uCAHI,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAMM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAED,sEAKG;AAEH;;GAEG;AAEH,0EAKE;AAEF,4DAAmD;AACnD;;;;GAIG;AAEH;;;;GASG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDH,8DAAuD;AACvD,2DAGE;AAEF,0EAUE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;GAIG;AAEH,6DASE;AAEF;;GAKG;;;;;4BAjYI,cAAc"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;GAEG;AAGH,4DAAuC;AAEvC,6CAA6C;AAC7C,oCADW,aAAa,gBAAgB,CAAC,CAC4B;AACrE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CACsB;AACzD,mEAAiE;AACjE,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CACwB;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,iEAOE;;;;;;;;;;AAaF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA0BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAMM,uCAHI,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAMM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAED,sEAKG;AAEH;;GAEG;AAEH,0EAKE;AAEF,4DAAmD;AACnD;;;;GAIG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDH,8DAAuD;AACvD,2DAGE;AAEF,0EAUE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;GAIG;AAEH,6DASE;AAEF;;GAKG;;;;;kCAtX4B,kBAAkB;4BAN1C,cAAc"}
package/src/typeGuards.js CHANGED
@@ -13,12 +13,19 @@ import { SubscriberShape } from '@agoric/notifier';
13
13
  import { M } from '@agoric/store';
14
14
  import { TimestampShape } from '@agoric/time';
15
15
 
16
+ /**
17
+ * @import {TypedPattern} from '@agoric/internal';
18
+ */
19
+
16
20
  // keywords have an initial cap
17
21
  export const KeywordShape = M.string();
18
22
 
23
+ /** @type {TypedPattern<InvitationHandle>} */
19
24
  export const InvitationHandleShape = M.remotable('InvitationHandle');
25
+ /** @type {TypedPattern<Invitation>} */
20
26
  export const InvitationShape = M.remotable('Invitation');
21
27
  export const InstanceHandleShape = M.remotable('InstanceHandle');
28
+ /** @type {TypedPattern<Installation>} */
22
29
  export const InstallationShape = M.remotable('Installation');
23
30
  export const SeatShape = M.remotable('Seat');
24
31
 
@@ -144,17 +151,6 @@ export const ZoeMintI = M.interface('ZoeMint', {
144
151
  withdrawAndBurn: M.call(AmountShape).returns(),
145
152
  });
146
153
 
147
- export const ZcfMintI = M.interface('ZcfMint', {
148
- getIssuerRecord: M.call().returns(IssuerRecordShape),
149
- mintGains: M.call(AmountKeywordRecordShape)
150
- .optional(M.remotable('zcfSeat'))
151
- .returns(M.remotable('zcfSeat')),
152
- burnLosses: M.call(
153
- AmountKeywordRecordShape,
154
- M.remotable('zcfSeat'),
155
- ).returns(),
156
- });
157
-
158
154
  export const FeeMintAccessShape = M.remotable('FeeMintAccess');
159
155
 
160
156
  export const ExitObjectI = M.interface('Exit Object', {
@@ -307,7 +303,6 @@ export const ZoeStorageManagerIKit = harden({
307
303
  }),
308
304
  startInstanceAccess: M.interface('ZoeStorage startInstance access', {
309
305
  makeZoeInstanceStorageManager: M.call(
310
- M.any(),
311
306
  InstallationShape,
312
307
  M.any(),
313
308
  IssuerPKeywordRecordShape,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { E } from '@endo/eventual-send';
4
4
 
5
- const { Fail, quote: q } = assert;
5
+ import { Fail, q } from '@endo/errors';
6
6
 
7
7
  export const getZcfBundleCap = (zcfSpec, vatAdminSvc) => {
8
8
  let zcfBundleCapP;
@@ -1,6 +1,6 @@
1
1
  import { AmountMath } from '@agoric/ertp';
2
2
  import { E } from '@endo/eventual-send';
3
- import { q, Fail } from '@agoric/assert';
3
+ import { q, Fail } from '@endo/errors';
4
4
  import { deeplyFulfilledObject, objectMap } from '@agoric/internal';
5
5
  import { provideDurableWeakMapStore } from '@agoric/vat-data';
6
6
 
@@ -80,14 +80,14 @@ export const provideEscrowStorage = baggage => {
80
80
  // Assert that all of the payment keywords are present in the give
81
81
  // keywords. Proposal.give keywords that do not have matching payments will
82
82
  // be caught in the deposit step.
83
- paymentKeywords.forEach(keyword => {
83
+ for (const keyword of paymentKeywords) {
84
84
  giveKeywords.includes(keyword) ||
85
85
  Fail`The ${q(
86
86
  keyword,
87
87
  )} keyword in the paymentKeywordRecord was not a keyword in proposal.give, which had keywords: ${q(
88
88
  giveKeywords,
89
89
  )}`;
90
- });
90
+ }
91
91
 
92
92
  // If any of these deposits hang or fail, then this `await` also
93
93
  // hangs or fails, the offer does not succeed, and any funds that
@@ -1 +1 @@
1
- {"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;AA4BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D"}
1
+ {"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D"}
@@ -11,10 +11,9 @@ import {
11
11
  provide,
12
12
  prepareExoClassKit,
13
13
  } from '@agoric/vat-data';
14
+ import { Fail, q } from '@endo/errors';
14
15
  import { FeeMintAccessShape } from '../typeGuards.js';
15
16
 
16
- const { Fail, quote: q } = assert;
17
-
18
17
  /** @deprecated Redundant. Just omit it. */
19
18
  const FEE_MINT_KIT = 'FeeMintKit';
20
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAuBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA+IjB;wBArJc,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;6BAC3B,kBAAkB"}
1
+ {"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAqBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA+IjB;wBArJc,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;6BAC3B,kBAAkB"}
@@ -1,4 +1,4 @@
1
- import { assert } from '@agoric/assert';
1
+ import { Fail, q } from '@endo/errors';
2
2
  import {
3
3
  M,
4
4
  prepareExo,
@@ -11,8 +11,6 @@ import {
11
11
  UnwrappedInstallationShape,
12
12
  } from '../typeGuards.js';
13
13
 
14
- const { Fail, quote: q } = assert;
15
-
16
14
  /** @typedef { import('@agoric/swingset-vat').BundleCap} BundleCap */
17
15
  /** @typedef { import('@agoric/swingset-vat').BundleID} BundleID */
18
16
  /** @import {Baggage} from '@agoric/vat-data' */
@@ -1 +1 @@
1
- {"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"AAoDO,kDADK,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;GA2D7C;AA0JM,mDAHI,OAAO,kBAAkB,EAAE,OAAO,4BAClC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwChD;6BAvDY,QAAQ,CAAC;IACrB,WAAe,EAAE,OAAO,CAAC;IACzB,eAAmB,EAAE,OAAO,CAAC;CAC1B,CAAC;2BACQ;IACZ,kBAAsB,EAAE,MAAM,EAAE,CAAC;CAC9B;oBACS,YAAY,GAAG,cAAc;4BAC7B;IACZ,KAAS,EAAE,KAAK,CAAC;CACd"}
1
+ {"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"AAkDO,kDADK,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;GA2D7C;AA0JM,mDAHI,OAAO,kBAAkB,EAAE,OAAO,4BAClC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwChD;6BAvDY,QAAQ,CAAC;IACrB,WAAe,EAAE,OAAO,CAAC;IACzB,eAAmB,EAAE,OAAO,CAAC;CAC1B,CAAC;2BACQ;IACZ,kBAAsB,EAAE,MAAM,EAAE,CAAC;CAC9B;oBACS,YAAY,GAAG,cAAc;4BAC7B;IACZ,KAAS,EAAE,KAAK,CAAC;CACd"}
@@ -1,4 +1,3 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import {
3
2
  canBeDurable,
4
3
  makeScalarBigSetStore,
@@ -9,6 +8,7 @@ import {
9
8
  provide,
10
9
  } from '@agoric/vat-data';
11
10
  import { E } from '@endo/eventual-send';
11
+ import { q, Fail } from '@endo/errors';
12
12
  import { defineDurableHandle } from '../makeHandle.js';
13
13
  import {
14
14
  BrandKeywordRecordShape,
@@ -18,8 +18,6 @@ import {
18
18
  } from '../typeGuards.js';
19
19
  import { makeZoeSeatAdminFactory } from './zoeSeat.js';
20
20
 
21
- const { quote: q, Fail } = assert;
22
-
23
21
  /**
24
22
  * @file Two objects are defined here, both called InstanceAdminSomething.
25
23
  * InstanceAdminStorage is a container for individual InstanceAdmins. Each
@@ -139,15 +137,15 @@ const makeInstanceAdminBehavior = (zoeBaggage, makeZoeSeatAdminKit) => {
139
137
  },
140
138
  exitAllSeats: ({ state }, completion) => {
141
139
  state.acceptingOffers = false;
142
- Array.from(state.zoeSeatAdmins.keys()).forEach(zoeSeatAdmin =>
143
- zoeSeatAdmin.exit(completion),
144
- );
140
+ for (const zoeSeatAdmin of state.zoeSeatAdmins.keys()) {
141
+ zoeSeatAdmin.exit(completion);
142
+ }
145
143
  },
146
144
  failAllSeats: ({ state }, reason) => {
147
145
  state.acceptingOffers = false;
148
- Array.from(state.zoeSeatAdmins.keys()).forEach(zoeSeatAdmin =>
149
- zoeSeatAdmin.fail(reason),
150
- );
146
+ for (const zoeSeatAdmin of state.zoeSeatAdmins.keys()) {
147
+ zoeSeatAdmin.fail(reason);
148
+ }
151
149
  },
152
150
  stopAcceptingOffers: ({ state }) => {
153
151
  state.acceptingOffers = false;
@@ -59,7 +59,7 @@ type ZoeInstanceStorageManager = {
59
59
  * issuerStorage and escrowStorage from Zoe, and stores the
60
60
  * instance-specific terms
61
61
  */
62
- type MakeZoeInstanceStorageManager = (instanceBaggage: import("@agoric/vat-data").Baggage, installation: Installation, customTerms: object, uncleanIssuerKeywordRecord: IssuerKeywordRecord, instance: Instance, contractBundleCap: BundleCap, instanceLabel: string) => Promise<ZoeInstanceStorageManager>;
62
+ type MakeZoeInstanceStorageManager = (installation: Installation, customTerms: object, uncleanIssuerKeywordRecord: IssuerKeywordRecord, instance: Instance, contractBundleCap: BundleCap, instanceLabel: string) => Promise<ZoeInstanceStorageManager>;
63
63
  type GetBundleCapForID = (id: BundleID) => Promise<BundleCap>;
64
64
  type GetProposalShapeForInvitation = (invitationHandle: InvitationHandle) => Pattern | undefined;
65
65
  type ZoeStorageManager = {
@@ -1 +1 @@
1
- {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAMW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACjB,MAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,SAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,YAAgB,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,OAAO,sBAAsB,EAAE,aAAa;;;;;;;;uDAUrD,OAAO,kBAAkB,EAAE,OAAO,gBAClC,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;wDAKpB,gBAAgB,KACd,OAAO,GAAG,SAAS;;mCAKlB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,OAAO,YAAY,EAAE,cAAc;eACnC,SAAS;gBACT,UAAU;cACV,OAAO,YAAY,EAAE,QAAQ;oBAC7B,cAAc;oBACd,cAAc;gCACd,0BAA0B;sBAC1B,gBAAgB;wBAChB,kBAAkB;mCAClB,6BAA6B;;;;;;wCAQhC,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAMW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACjB,MAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,SAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,YAAgB,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,OAAO,sBAAsB,EAAE,aAAa;;;;;;;;oDAUrD,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;wDAKpB,gBAAgB,KACd,OAAO,GAAG,SAAS;;mCAKlB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,OAAO,YAAY,EAAE,cAAc;eACnC,SAAS;gBACT,UAAU;cACV,OAAO,YAAY,EAAE,QAAQ;oBAC7B,cAAc;oBACd,cAAc;gCACd,0BAA0B;sBAC1B,gBAAgB;wBAChB,kBAAkB;mCAClB,6BAA6B;;;;;;wCAQhC,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC"}
@@ -99,7 +99,6 @@
99
99
  * instance-specific terms
100
100
  *
101
101
  * @callback MakeZoeInstanceStorageManager
102
- * @param {import('@agoric/vat-data').Baggage} instanceBaggage
103
102
  * @param {Installation} installation
104
103
  * @param {object} customTerms
105
104
  * @param {IssuerKeywordRecord} uncleanIssuerKeywordRecord
@@ -1,16 +1,16 @@
1
1
  // @jessie-check
2
2
 
3
- import { assert, details as X, Fail, quote as q } from '@agoric/assert';
3
+ import { X, Fail, q, makeError, annotateError } from '@endo/errors';
4
4
  import { E } from '@endo/eventual-send';
5
5
 
6
6
  export const makeInvitationQueryFns = invitationIssuer => {
7
7
  /** @type {GetInvitationDetails} */
8
8
  const getInvitationDetails = async invitationP => {
9
9
  const onRejected = reason => {
10
- const err = assert.error(
10
+ const err = makeError(
11
11
  X`A Zoe invitation is required, not ${invitationP}`,
12
12
  );
13
- assert.note(err, X`Due to ${reason}`);
13
+ annotateError(err, X`Due to ${reason}`);
14
14
  throw err;
15
15
  };
16
16
  const invAmount = await E(invitationIssuer)
@@ -1,6 +1,6 @@
1
1
  // @jessie-check
2
2
 
3
- import { Fail, q } from '@agoric/assert';
3
+ import { Fail, q } from '@endo/errors';
4
4
  import { provideDurableMapStore } from '@agoric/vat-data';
5
5
  import { AssetKind, hasIssuer, prepareIssuerKit } from '@agoric/ertp';
6
6
  import { InvitationElementShape } from '../typeGuards.js';
@@ -1 +1 @@
1
- {"version":3,"file":"burnInvitation.d.ts","sourceRoot":"","sources":["burnInvitation.js"],"names":[],"mappings":"AAgBO,iDAPI,MAAM,cACN,IAAI,CAAC,OAAO,CAAC,GACX,OAAO,CAAC;IACpB,cAAkB,EAAE,QAAQ,CAAC;IAC7B,gBAAoB,EAAE,gBAAgB,CAAC;CACpC,CAAC,CA4BJ"}
1
+ {"version":3,"file":"burnInvitation.d.ts","sourceRoot":"","sources":["burnInvitation.js"],"names":[],"mappings":"AAgBO,iDAPI,MAAM,cACN,IAAI,CAAC,OAAO,CAAC,GACX,OAAO,CAAC;IACpB,cAAkB,EAAE,QAAQ,CAAC;IAC7B,gBAAoB,EAAE,gBAAgB,CAAC;CACpC,CAAC,CA0BJ"}
@@ -1,6 +1,6 @@
1
1
  // @jessie-check
2
2
 
3
- import { Fail, assert, details as X } from '@agoric/assert';
3
+ import { Fail, assert, X, makeError, annotateError } from '@endo/errors';
4
4
  import { E } from '@endo/eventual-send';
5
5
 
6
6
  /**
@@ -16,10 +16,8 @@ import { E } from '@endo/eventual-send';
16
16
  */
17
17
  export const burnInvitation = (invitationIssuer, invitation) => {
18
18
  const handleRejected = reason => {
19
- const err = assert.error(
20
- X`A Zoe invitation is required, not ${invitation}`,
21
- );
22
- assert.note(err, X`Due to ${reason}`);
19
+ const err = makeError(X`A Zoe invitation is required, not ${invitation}`);
20
+ annotateError(err, X`Due to ${reason}`);
23
21
  throw err;
24
22
  };
25
23
  const handleFulfilled = invitationAmount => {
@@ -1 +1 @@
1
- {"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["offer.js"],"names":[],"mappings":"AAcO,6DA0DN"}
1
+ {"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["offer.js"],"names":[],"mappings":"AAaO,6DA0DN"}
@@ -1,5 +1,6 @@
1
1
  // @jessie-check
2
2
 
3
+ import { q, Fail } from '@endo/errors';
3
4
  import { passStyleOf } from '@endo/marshal';
4
5
  import { mustMatch } from '@agoric/store';
5
6
  import { E } from '@endo/eventual-send';
@@ -10,8 +11,6 @@ import { makeInvitationQueryFns } from '../invitationQueries.js';
10
11
 
11
12
  import '../internal-types.js';
12
13
 
13
- const { quote: q, Fail } = assert;
14
-
15
14
  export const makeOfferMethod = offerDataAccess => {
16
15
  /** @type {Offer} */
17
16
  const offer = async (
@@ -1 +1 @@
1
- {"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA8BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,QAkR/B"}
1
+ {"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA4BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,QAkR/B"}
@@ -1,4 +1,4 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
1
+ import { Fail } from '@endo/errors';
2
2
  import { SubscriberShape } from '@agoric/notifier';
3
3
  import { E } from '@endo/eventual-send';
4
4
  import { M, prepareExoClassKit } from '@agoric/vat-data';
@@ -15,8 +15,6 @@ import {
15
15
  PaymentPKeywordRecordShape,
16
16
  } from '../typeGuards.js';
17
17
 
18
- const { Fail } = assert;
19
-
20
18
  export const coreUserSeatMethods = harden({
21
19
  getProposal: M.call().returns(M.promise()),
22
20
  getPayouts: M.call().returns(M.promise()),
@@ -1 +1 @@
1
- {"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAoCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,OAAO,YAAY,EAAE,aAAa,CAsW9C;wBA/Wc,OAAO,sBAAsB,EAAE,SAAS;6BAD5B,kBAAkB"}
1
+ {"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAiCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,OAAO,YAAY,EAAE,aAAa,CAiW9C;wBAxWc,OAAO,sBAAsB,EAAE,SAAS;6BAD5B,kBAAkB"}
@@ -1,9 +1,7 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import { E } from '@endo/eventual-send';
3
2
  import { passStyleOf } from '@endo/marshal';
4
3
  import {
5
4
  M,
6
- makeScalarBigMapStore,
7
5
  provideDurableWeakMapStore,
8
6
  prepareExoClass,
9
7
  prepareExo,
@@ -12,6 +10,7 @@ import {
12
10
  import { initEmpty } from '@agoric/store';
13
11
  import { isUpgradeDisconnection } from '@agoric/internal/src/upgrade-api.js';
14
12
 
13
+ import { Fail, q } from '@endo/errors';
15
14
  import { defineDurableHandle } from '../makeHandle.js';
16
15
  import { makeInstanceAdminMaker } from './instanceAdminStorage.js';
17
16
  import {
@@ -25,8 +24,6 @@ import {
25
24
  /** @import {Baggage} from '@agoric/vat-data' */
26
25
  /** @typedef { import('@agoric/swingset-vat').BundleCap} BundleCap */
27
26
 
28
- const { Fail, quote: q } = assert;
29
-
30
27
  /**
31
28
  * @param {Pick<ZoeStorageManager, 'makeZoeInstanceStorageManager' | 'unwrapInstallation'>} startInstanceAccess
32
29
  * @param {() => ERef<BundleCap>} getZcfBundleCapP
@@ -302,14 +299,9 @@ export const makeStartInstance = (
302
299
 
303
300
  const instanceHandle = makeInstanceHandle();
304
301
 
305
- const instanceBaggage = makeScalarBigMapStore('instanceBaggage', {
306
- durable: true,
307
- });
308
-
309
302
  const zoeInstanceStorageManager = await E(
310
303
  startInstanceAccess,
311
304
  ).makeZoeInstanceStorageManager(
312
- instanceBaggage,
313
305
  installation,
314
306
  customTerms,
315
307
  uncleanIssuerKeywordRecord,
@@ -7,6 +7,7 @@ import type { TagContainer } from '@agoric/internal/src/tagged.js';
7
7
  import type { Baggage } from '@agoric/swingset-liveslots';
8
8
  import type { VatUpgradeResults } from '@agoric/swingset-vat';
9
9
  import type { RemotableObject } from '@endo/marshal';
10
+ import type { FarRef } from '@endo/far';
10
11
 
11
12
  // XXX https://github.com/Agoric/agoric-sdk/issues/4565
12
13
  type SourceBundle = Record<string, any>;
@@ -33,7 +34,7 @@ export type ContractStartFunction = (
33
34
  baggage?: Baggage,
34
35
  ) => ERef<{ creatorFacet?: {}; publicFacet?: {} }>;
35
36
 
36
- export type AdminFacet<SF extends ContractStartFunction> = RemotableObject & {
37
+ export type AdminFacet<SF extends ContractStartFunction> = FarRef<{
37
38
  // Completion, which is currently any
38
39
  getVatShutdownPromise: () => Promise<any>;
39
40
  upgradeContract: Parameters<SF>[1] extends undefined
@@ -45,7 +46,7 @@ export type AdminFacet<SF extends ContractStartFunction> = RemotableObject & {
45
46
  restartContract: Parameters<SF>[1] extends undefined
46
47
  ? () => Promise<VatUpgradeResults>
47
48
  : (newPrivateArgs: Parameters<SF>[1]) => Promise<VatUpgradeResults>;
48
- };
49
+ }>;
49
50
 
50
51
  export type StartParams<SF> = SF extends ContractStartFunction
51
52
  ? Parameters<SF>[1] extends undefined