@agoric/zoe 0.26.3-dev-0705f2c.0 → 0.26.3-dev-a9680dd.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 (89) hide show
  1. package/README.md +2 -3
  2. package/bundles/bundle-contractFacet-js-meta.json +159 -159
  3. package/bundles/bundle-contractFacet.js +1 -1
  4. package/package.json +14 -14
  5. package/src/cleanProposal.js +1 -1
  6. package/src/contractFacet/allocationMath.d.ts.map +1 -1
  7. package/src/contractFacet/allocationMath.js +1 -2
  8. package/src/contractFacet/exit.d.ts.map +1 -1
  9. package/src/contractFacet/exit.js +1 -2
  10. package/src/contractFacet/offerHandlerStorage.d.ts +4 -0
  11. package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -1
  12. package/src/contractFacet/offerHandlerStorage.js +12 -0
  13. package/src/contractFacet/reallocate.d.ts.map +1 -1
  14. package/src/contractFacet/reallocate.js +1 -2
  15. package/src/contractFacet/rightsConservation.js +1 -1
  16. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  17. package/src/contractFacet/vatRoot.js +1 -2
  18. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  19. package/src/contractFacet/zcfMint.js +2 -3
  20. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  21. package/src/contractFacet/zcfSeat.js +3 -4
  22. package/src/contractFacet/zcfZygote.js +6 -6
  23. package/src/contractSupport/bondingCurves.js +1 -1
  24. package/src/contractSupport/priceAuthority.d.ts.map +1 -1
  25. package/src/contractSupport/priceAuthority.js +2 -2
  26. package/src/contractSupport/priceAuthorityTransform.js +1 -1
  27. package/src/contractSupport/priceQuote.d.ts.map +1 -1
  28. package/src/contractSupport/priceQuote.js +2 -3
  29. package/src/contractSupport/ratio.js +1 -1
  30. package/src/contractSupport/recorder.d.ts.map +1 -1
  31. package/src/contractSupport/recorder.js +1 -1
  32. package/src/contractSupport/stateMachine.js +1 -1
  33. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  34. package/src/contractSupport/zoeHelpers.js +2 -3
  35. package/src/contracts/auction/assertBidSeat.js +1 -1
  36. package/src/contracts/auction/index.d.ts.map +1 -1
  37. package/src/contracts/auction/index.js +1 -2
  38. package/src/contracts/autoswap.js +1 -1
  39. package/src/contracts/callSpread/calculateShares.js +1 -1
  40. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
  41. package/src/contracts/callSpread/pricedCallSpread.js +1 -2
  42. package/src/contracts/coveredCall-durable.d.ts.map +1 -1
  43. package/src/contracts/coveredCall-durable.js +1 -2
  44. package/src/contracts/coveredCall.d.ts.map +1 -1
  45. package/src/contracts/coveredCall.js +1 -2
  46. package/src/contracts/loan/borrow.js +1 -1
  47. package/src/contracts/loan/close.js +1 -1
  48. package/src/contracts/loan/updateDebt.js +3 -3
  49. package/src/contracts/mintAndSellNFT.js +1 -1
  50. package/src/contracts/oracle.js +1 -1
  51. package/src/contracts/otcDesk.js +1 -1
  52. package/src/contracts/priceAggregator.js +1 -1
  53. package/src/contracts/sellItems.d.ts.map +1 -1
  54. package/src/contracts/sellItems.js +1 -2
  55. package/src/instanceRecordStorage.d.ts.map +1 -1
  56. package/src/instanceRecordStorage.js +1 -2
  57. package/src/issuerRecord.js +1 -1
  58. package/src/issuerStorage.d.ts.map +1 -1
  59. package/src/issuerStorage.js +2 -3
  60. package/src/makeHandle.d.ts.map +1 -1
  61. package/src/makeHandle.js +1 -3
  62. package/src/zoeService/createZCFVat.js +1 -1
  63. package/src/zoeService/escrowStorage.js +1 -1
  64. package/src/zoeService/feeMint.d.ts.map +1 -1
  65. package/src/zoeService/feeMint.js +1 -2
  66. package/src/zoeService/installationStorage.d.ts.map +1 -1
  67. package/src/zoeService/installationStorage.js +1 -3
  68. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
  69. package/src/zoeService/instanceAdminStorage.js +1 -2
  70. package/src/zoeService/invitationQueries.js +3 -3
  71. package/src/zoeService/makeInvitation.js +1 -1
  72. package/src/zoeService/offer/burnInvitation.d.ts.map +1 -1
  73. package/src/zoeService/offer/burnInvitation.js +3 -5
  74. package/src/zoeService/offer/offer.d.ts.map +1 -1
  75. package/src/zoeService/offer/offer.js +1 -2
  76. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  77. package/src/zoeService/originalZoeSeat.js +1 -2
  78. package/src/zoeService/startInstance.d.ts.map +1 -1
  79. package/src/zoeService/startInstance.js +1 -2
  80. package/src/zoeService/zoe.d.ts +1 -0
  81. package/src/zoeService/zoe.d.ts.map +1 -1
  82. package/src/zoeService/zoe.js +1 -2
  83. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  84. package/src/zoeService/zoeSeat.js +1 -2
  85. package/tools/fakePriceAuthority.d.ts.map +1 -1
  86. package/tools/fakePriceAuthority.js +5 -4
  87. package/tools/fakeVatAdmin.js +1 -1
  88. package/tools/manualTimer.d.ts.map +1 -1
  89. package/tools/manualTimer.js +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/zoe",
3
- "version": "0.26.3-dev-0705f2c.0+0705f2c",
3
+ "version": "0.26.3-dev-a9680dd.0+a9680dd",
4
4
  "description": "Zoe: the Smart Contract Framework for Offer Enforcement",
5
5
  "type": "module",
6
6
  "main": "./src/zoeService/zoe.js",
@@ -43,20 +43,20 @@
43
43
  },
44
44
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
45
45
  "dependencies": {
46
- "@agoric/assert": "0.6.1-dev-0705f2c.0+0705f2c",
47
- "@agoric/base-zone": "0.1.1-dev-0705f2c.0+0705f2c",
48
- "@agoric/ertp": "0.16.3-dev-0705f2c.0+0705f2c",
49
- "@agoric/internal": "0.3.3-dev-0705f2c.0+0705f2c",
50
- "@agoric/notifier": "0.6.3-dev-0705f2c.0+0705f2c",
51
- "@agoric/store": "0.9.3-dev-0705f2c.0+0705f2c",
52
- "@agoric/swingset-liveslots": "0.10.3-dev-0705f2c.0+0705f2c",
53
- "@agoric/swingset-vat": "0.32.3-dev-0705f2c.0+0705f2c",
54
- "@agoric/time": "0.3.3-dev-0705f2c.0+0705f2c",
55
- "@agoric/vat-data": "0.5.3-dev-0705f2c.0+0705f2c",
56
- "@agoric/zone": "0.2.3-dev-0705f2c.0+0705f2c",
46
+ "@agoric/base-zone": "0.1.1-dev-a9680dd.0+a9680dd",
47
+ "@agoric/ertp": "0.16.3-dev-a9680dd.0+a9680dd",
48
+ "@agoric/internal": "0.3.3-dev-a9680dd.0+a9680dd",
49
+ "@agoric/notifier": "0.6.3-dev-a9680dd.0+a9680dd",
50
+ "@agoric/store": "0.9.3-dev-a9680dd.0+a9680dd",
51
+ "@agoric/swingset-liveslots": "0.10.3-dev-a9680dd.0+a9680dd",
52
+ "@agoric/swingset-vat": "0.32.3-dev-a9680dd.0+a9680dd",
53
+ "@agoric/time": "0.3.3-dev-a9680dd.0+a9680dd",
54
+ "@agoric/vat-data": "0.5.3-dev-a9680dd.0+a9680dd",
55
+ "@agoric/zone": "0.2.3-dev-a9680dd.0+a9680dd",
57
56
  "@endo/bundle-source": "^3.2.3",
58
57
  "@endo/captp": "^4.2.0",
59
58
  "@endo/common": "^1.2.2",
59
+ "@endo/errors": "^1.2.2",
60
60
  "@endo/eventual-send": "^1.2.2",
61
61
  "@endo/exo": "^1.5.0",
62
62
  "@endo/far": "^1.1.2",
@@ -69,7 +69,7 @@
69
69
  "yargs-parser": "^21.1.1"
70
70
  },
71
71
  "devDependencies": {
72
- "@agoric/kmarshal": "0.1.1-dev-0705f2c.0+0705f2c",
72
+ "@agoric/kmarshal": "0.1.1-dev-a9680dd.0+a9680dd",
73
73
  "@endo/init": "^1.1.2",
74
74
  "ava": "^5.3.0",
75
75
  "c8": "^9.1.0",
@@ -142,5 +142,5 @@
142
142
  "typeCoverage": {
143
143
  "atLeast": 84.92
144
144
  },
145
- "gitHead": "0705f2c34da9a89c2b3441b47f8e5bfca53a9590"
145
+ "gitHead": "a9680dd04485e4a63c4fcd588ec38d2558243877"
146
146
  }
@@ -1,4 +1,4 @@
1
- import { assert, q, Fail } from '@agoric/assert';
1
+ import { assert, q, Fail } from '@endo/errors';
2
2
  import { AmountMath, getAssetKind } from '@agoric/ertp';
3
3
  import { objectMap } from '@agoric/internal';
4
4
  import { assertRecord } from '@endo/marshal';
@@ -1 +1 @@
1
- {"version":3,"file":"allocationMath.d.ts","sourceRoot":"","sources":["allocationMath.js"],"names":[],"mappings":"AAkFO,4CAJI,UAAU,uBACV,mBAAmB,GACjB,mBAAmB,CAI/B;AAOM,mDAJI,UAAU,uBACV,mBAAmB,GACjB,mBAAmB,CAI/B;;;;iCApFU,MAAM,GAAG,SAAS,QAClB,MAAM,GAAG,SAAS,WAClB,OAAO,KACL,MAAM"}
1
+ {"version":3,"file":"allocationMath.d.ts","sourceRoot":"","sources":["allocationMath.js"],"names":[],"mappings":"AAiFO,4CAJI,UAAU,uBACV,mBAAmB,GACjB,mBAAmB,CAI/B;AAOM,mDAJI,UAAU,uBACV,mBAAmB,GACjB,mBAAmB,CAI/B;;;;iCApFU,MAAM,GAAG,SAAS,QAClB,MAAM,GAAG,SAAS,WAClB,OAAO,KACL,MAAM"}
@@ -1,7 +1,6 @@
1
+ import { Fail, q } from '@endo/errors';
1
2
  import { AmountMath } from '@agoric/ertp';
2
3
 
3
- const { Fail, quote: q } = assert;
4
-
5
4
  /**
6
5
  * @callback Operation
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAyBO,sGAwGN"}
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAwBO,sGAwGN"}
@@ -1,3 +1,4 @@
1
+ import { Fail, q } from '@endo/errors';
1
2
  import { E } from '@endo/eventual-send';
2
3
  import { prepareExoClass, provideDurableSetStore } from '@agoric/vat-data';
3
4
  import { M, initEmpty } from '@agoric/store';
@@ -9,8 +10,6 @@ import {
9
10
  isWaivedExitRule,
10
11
  } from '../typeGuards.js';
11
12
 
12
- const { Fail, quote: q } = assert;
13
-
14
13
  const ExitObjectI = M.interface('ExitObject', { exit: M.call().returns() });
15
14
  const WakerI = M.interface('Waker', {
16
15
  wake: M.call(TimestampShape).returns(),
@@ -2,6 +2,10 @@ export function makeOfferHandlerStorage(zcfBaggage: any): {
2
2
  storeOfferHandler: (offerHandler: any) => Handle<"Invitation">;
3
3
  takeOfferHandler: (invitationHandle: InvitationHandle, details?: Details) => OfferHandler;
4
4
  };
5
+ /**
6
+ * The following should work. But for some reason,
7
+ */
8
+ export type Details = string | {};
5
9
  export type PassableOfferHandler = RemotableBrand<any, any> & RemotableObject & OfferHandler;
6
10
  import type { RemotableBrand } from '@endo/eventual-send';
7
11
  import type { RemotableObject } from '@endo/pass-style';
@@ -1 +1 @@
1
- {"version":3,"file":"offerHandlerStorage.d.ts","sourceRoot":"","sources":["offerHandlerStorage.js"],"names":[],"mappings":"AAiBO;;yCAgCwB,gBAAgB,YAAY,OAAO,KAAK,YAAY;EAsBlF;mCAzDY,2BAAiB,eAAe,GAAG,YAAY;oCAL3B,qBAAqB;qCACpB,kBAAkB"}
1
+ {"version":3,"file":"offerHandlerStorage.d.ts","sourceRoot":"","sources":["offerHandlerStorage.js"],"names":[],"mappings":"AA6BO;;yCAgCwB,gBAAgB,YAAY,OAAO,KAAK,YAAY;EAsBlF;;;;sBAlEY,MAAM,GAAG,EAAE;mCASX,2BAAiB,eAAe,GAAG,YAAY;oCAL3B,qBAAqB;qCACpB,kBAAkB"}
@@ -6,6 +6,18 @@ import { canBeDurable, provideDurableWeakMapStore } from '@agoric/vat-data';
6
6
 
7
7
  import { defineDurableHandle } from '../makeHandle.js';
8
8
 
9
+ /**
10
+ * The following should work. But for some reason, @endo/errors does
11
+ * not export the type `Details`.
12
+ * See https://github.com/endojs/endo/issues/2339
13
+ *
14
+ * at-import {Details} from '@endo/errors'
15
+ *
16
+ * In the meantime...
17
+ *
18
+ * @typedef {string | {}} Details
19
+ */
20
+
9
21
  /**
10
22
  * @import {RemotableBrand} from '@endo/eventual-send';
11
23
  * @import {RemotableObject} from '@endo/pass-style';
@@ -1 +1 @@
1
- {"version":3,"file":"reallocate.d.ts","sourceRoot":"","sources":["reallocate.js"],"names":[],"mappings":"AAiBO,6CAHI,KAAK,CAAC,YAAY,CAAC,GACjB,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,CA8E5C;8BAtFa,KAAK,CAAC,mBAAmB,CAAC"}
1
+ {"version":3,"file":"reallocate.d.ts","sourceRoot":"","sources":["reallocate.js"],"names":[],"mappings":"AAgBO,6CAHI,KAAK,CAAC,YAAY,CAAC,GACjB,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,CA8E5C;8BAtFa,KAAK,CAAC,mBAAmB,CAAC"}
@@ -1,10 +1,9 @@
1
+ import { Fail } from '@endo/errors';
1
2
  import { makeScalarMapStore } from '@agoric/vat-data';
2
3
 
3
4
  import { assertRightsConserved } from './rightsConservation.js';
4
5
  import { addToAllocation, subtractFromAllocation } from './allocationMath.js';
5
6
 
6
- const { Fail } = assert;
7
-
8
7
  /** @typedef {Array<AmountKeywordRecord>} TransactionList */
9
8
 
10
9
  /**
@@ -1,5 +1,5 @@
1
+ import { assert, Fail } from '@endo/errors';
1
2
  import { makeScalarMapStore } from '@agoric/store';
2
- import { assert, Fail } from '@agoric/assert';
3
3
  import { AmountMath } from '@agoric/ertp';
4
4
 
5
5
  import '../internal-types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"vatRoot.d.ts","sourceRoot":"","sources":["vatRoot.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,wCAJW,SAAS,GAAG;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,iBAC5C;IAAC,iBAAiB,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,WAC1G,OAAO,kBAAkB,EAAE,OAAO,iIA+D5C"}
1
+ {"version":3,"file":"vatRoot.d.ts","sourceRoot":"","sources":["vatRoot.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wCAJW,SAAS,GAAG;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,iBAC5C;IAAC,iBAAiB,EAAE,SAAS,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,WAC1G,OAAO,kBAAkB,EAAE,OAAO,iIA+D5C"}
@@ -7,6 +7,7 @@
7
7
  // time this file is edited, the bundle must be manually rebuilt with
8
8
  // `yarn build-zcfBundle`.
9
9
 
10
+ import { Fail } from '@endo/errors';
10
11
  import { Far } from '@endo/marshal';
11
12
  import { E } from '@endo/far';
12
13
 
@@ -14,8 +15,6 @@ import '../internal-types.js';
14
15
 
15
16
  import { makeZCFZygote } from './zcfZygote.js';
16
17
 
17
- const { Fail } = assert;
18
-
19
18
  /**
20
19
  * @param {VatPowers & { testJigSetter: TestJigSetter }} powers
21
20
  * @param {{contractBundleCap: BundleCap, zoeService: ZoeService, invitationIssuer: Issuer<'set'>, privateArgs?: any}} vatParameters
@@ -1 +1 @@
1
- {"version":3,"file":"zcfMint.d.ts","sourceRoot":"","sources":["zcfMint.js"],"names":[],"mappings":"AAqBO,4CAJI,mBAAmB,gBACnB,YAAY,GACV,MAAM,CAYlB;AASM,0CANI,OAAO,kBAAkB,EAAE,OAAO,gBAClC;IAAE,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,uBACvD,mBAAmB,oBACnB,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CAAE,eACnE,kBAAkB,IAiHF,CAAC,SAAZ,SAAU,WACb,MAAM,YACN,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KACd,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAWjC"}
1
+ {"version":3,"file":"zcfMint.d.ts","sourceRoot":"","sources":["zcfMint.js"],"names":[],"mappings":"AAoBO,4CAJI,mBAAmB,gBACnB,YAAY,GACV,MAAM,CAYlB;AASM,0CANI,OAAO,kBAAkB,EAAE,OAAO,gBAClC;IAAE,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,uBACvD,mBAAmB,oBACnB,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;CAAE,eACnE,kBAAkB,IAiHF,CAAC,SAAZ,SAAU,WACb,MAAM,YACN,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KACd,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAWjC"}
@@ -1,7 +1,8 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
+ import { Fail } from '@endo/errors';
3
+ import { E } from '@endo/eventual-send';
2
4
  import { AmountMath } from '@agoric/ertp';
3
5
  import { prepareExoClass } from '@agoric/vat-data';
4
- import { E } from '@endo/eventual-send';
5
6
 
6
7
  import { coerceAmountKeywordRecord } from '../cleanProposal.js';
7
8
  import { assertFullIssuerRecord, makeIssuerRecord } from '../issuerRecord.js';
@@ -12,8 +13,6 @@ import { ZcfMintI } from './typeGuards.js';
12
13
  import './internal-types.js';
13
14
  import './types-ambient.js';
14
15
 
15
- const { Fail } = assert;
16
-
17
16
  /**
18
17
  * @param {AmountKeywordRecord} amr
19
18
  * @param {IssuerRecord} issuerRecord
@@ -1 +1 @@
1
- {"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AAqCO,oDANI,IAAI,CAAC,gBAAgB,CAAC,uBACtB,mBAAmB,uBACnB,OAAO,sBAAsB,EAAE,mBAAmB,cAClD,OAAO,kBAAkB,EAAE,OAAO,GAChC;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,kBAAkB,EAAE,kBAAkB,CAAA;CAAE,CAsenF"}
1
+ {"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AAoCO,oDANI,IAAI,CAAC,gBAAgB,CAAC,uBACtB,mBAAmB,uBACnB,OAAO,sBAAsB,EAAE,mBAAmB,cAClD,OAAO,kBAAkB,EAAE,OAAO,GAChC;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,kBAAkB,EAAE,kBAAkB,CAAA;CAAE,CAsenF"}
@@ -1,4 +1,6 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
+ import { annotateError, Fail } from '@endo/errors';
3
+ import { E } from '@endo/eventual-send';
2
4
  import {
3
5
  makeScalarBigWeakMapStore,
4
6
  prepareExoClass,
@@ -7,7 +9,6 @@ import {
7
9
  provideDurableMapStore,
8
10
  provideDurableWeakMapStore,
9
11
  } from '@agoric/vat-data';
10
- import { E } from '@endo/eventual-send';
11
12
  import { AmountMath } from '@agoric/ertp';
12
13
  import { initEmpty, M } from '@agoric/store';
13
14
 
@@ -23,8 +24,6 @@ import {
23
24
  import { makeAllocationMap } from './reallocate.js';
24
25
  import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
25
26
 
26
- const { Fail } = assert;
27
-
28
27
  /**
29
28
  * The SeatManager holds the active zcfSeats and can reallocate and
30
29
  * make new zcfSeats.
@@ -181,7 +180,7 @@ export const createSeatManager = (
181
180
  const { self } = this;
182
181
  if (typeof reason === 'string') {
183
182
  reason = Error(reason);
184
- assert.note(
183
+ annotateError(
185
184
  reason,
186
185
  'ZCFSeat.fail was called with a string reason, but requires an Error argument.',
187
186
  );
@@ -1,4 +1,9 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
+ import { Fail } from '@endo/errors';
3
+ import { E } from '@endo/eventual-send';
4
+ import { passStyleOf } from '@endo/pass-style';
5
+ import { makePromiseKit } from '@endo/promise-kit';
6
+
2
7
  import { AssetKind } from '@agoric/ertp';
3
8
  import { assertPattern, mustMatch } from '@agoric/store';
4
9
  import {
@@ -9,11 +14,8 @@ import {
9
14
  prepareExoClass,
10
15
  provideDurableMapStore,
11
16
  } from '@agoric/vat-data';
12
- import { E } from '@endo/eventual-send';
13
- import { passStyleOf } from '@endo/pass-style';
14
- import { makePromiseKit } from '@endo/promise-kit';
15
-
16
17
  import { objectMap } from '@agoric/internal';
18
+
17
19
  import { cleanProposal } from '../cleanProposal.js';
18
20
  import { handlePKitWarning } from '../handleWarning.js';
19
21
  import { makeInstanceRecordStorage } from '../instanceRecordStorage.js';
@@ -33,8 +35,6 @@ import { ZcfI } from './typeGuards.js';
33
35
 
34
36
  /** @import {IssuerOptionsRecord} from '@agoric/ertp' */
35
37
 
36
- const { Fail } = assert;
37
-
38
38
  /**
39
39
  * Make the ZCF vat in zygote-usable form. First, a generic ZCF is
40
40
  * made, then the contract code is evaluated, then a particular
@@ -1,10 +1,10 @@
1
1
  // @jessie-check
2
2
 
3
3
  import { Nat } from '@endo/nat';
4
+ import { Fail } from '@endo/errors';
4
5
  import { natSafeMath } from './safeMath.js';
5
6
 
6
7
  const { subtract, add, multiply, floorDivide } = natSafeMath;
7
- const { Fail } = assert;
8
8
 
9
9
  const BASIS_POINTS = 10000n; // TODO change to 10_000n once tooling copes.
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"priceAuthority.d.ts","sourceRoot":"","sources":["priceAuthority.js"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;GAiBG;AAYI,kDARJ;IAA8C,WAAW,EAAjD,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACD,QAAQ,EAAtC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACyB,KAAK,EAArD,IAAI,CAAC,OAAO,cAAc,EAAE,YAAY,CAAC;IAClB,WAAW,EAAlC,gBAAgB;IACG,aAAa,EAAhC,KAAK,CAAC,KAAK,CAAC;IACO,cAAc,EAAjC,KAAK,CAAC,KAAK,CAAC;CACpB,GAAU,iBAAiB,CAwT7B;qCA7WU,MAAM,eACN,MAAM,KACJ,OAAO;2CAiBT,gBAAgB,KACd,OAAO,CAAC,IAAI,CAAC;sCA7ByI,4BAA4B;sCAA5B,4BAA4B;uCAA5B,4BAA4B"}
1
+ {"version":3,"file":"priceAuthority.d.ts","sourceRoot":"","sources":["priceAuthority.js"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;GAiBG;AAYI,kDARJ;IAA8C,WAAW,EAAjD,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACD,QAAQ,EAAtC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACyB,KAAK,EAArD,IAAI,CAAC,OAAO,cAAc,EAAE,YAAY,CAAC;IAClB,WAAW,EAAlC,gBAAgB;IACG,aAAa,EAAhC,KAAK,CAAC,KAAK,CAAC;IACO,cAAc,EAAjC,KAAK,CAAC,KAAK,CAAC;CACpB,GAAU,iBAAiB,CAwT7B;qCA7WU,MAAM,eACN,MAAM,KACJ,OAAO;2CAiBT,gBAAgB,KACd,OAAO,CAAC,IAAI,CAAC;sCA3ByI,4BAA4B;sCAA5B,4BAA4B;uCAA5B,4BAA4B"}
@@ -1,7 +1,9 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
+ import { q, Fail } from '@endo/errors';
2
3
  import { E } from '@endo/eventual-send';
3
4
  import { Far } from '@endo/marshal';
4
5
  import { makePromiseKit } from '@endo/promise-kit';
6
+
5
7
  import { AmountMath, AmountShape, BrandShape } from '@agoric/ertp';
6
8
  import { makeNotifier } from '@agoric/notifier';
7
9
  import { makeTracer } from '@agoric/internal';
@@ -12,8 +14,6 @@ import { M } from '@agoric/store';
12
14
  * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery, PriceQuoteCreate, PriceAuthorityKit, PriceQuoteTrigger, MutableQuote,} from '@agoric/zoe/tools/types.js';
13
15
  */
14
16
 
15
- const { quote: q, Fail } = assert;
16
-
17
17
  const trace = makeTracer('PA', false);
18
18
 
19
19
  /**
@@ -1,6 +1,6 @@
1
+ import { Fail, assert } from '@endo/errors';
1
2
  import { E } from '@endo/eventual-send';
2
3
  import { Far } from '@endo/marshal';
3
- import { Fail, assert } from '@agoric/assert';
4
4
  import { AmountMath } from '@agoric/ertp';
5
5
  import { makeNotifier } from '@agoric/notifier';
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"AAqBO,2CAHI,UAAU,GACR,gBAAgB,CAM5B;AAGM,mCADK,UAAU,8CACiD;AAEhE,oCADK,UAAU,8CACmD;AACzE,sEAAsE;AACtE,2BADW,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,cAAc,EAAE,SAAS,CACQ;AAGnE,kCADK,KAAK,CAAC,KAAK,CAAC,uDAMvB;gCAjC4F,4BAA4B;sCAA5B,4BAA4B"}
1
+ {"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"AAoBO,2CAHI,UAAU,GACR,gBAAgB,CAM5B;AAGM,mCADK,UAAU,8CACiD;AAEhE,oCADK,UAAU,8CACmD;AACzE,sEAAsE;AACtE,2BADW,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,cAAc,EAAE,SAAS,CACQ;AAGnE,kCADK,KAAK,CAAC,KAAK,CAAC,uDAMvB;gCA/B4F,4BAA4B;sCAA5B,4BAA4B"}
@@ -1,15 +1,14 @@
1
1
  // @jessie-check
2
2
 
3
- import { AmountMath } from '@agoric/ertp';
3
+ import { Fail } from '@endo/errors';
4
4
  import { Nat } from '@endo/nat';
5
5
  import { E } from '@endo/eventual-send';
6
+ import { AmountMath } from '@agoric/ertp';
6
7
 
7
8
  /**
8
9
  * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
9
10
  */
10
11
 
11
- const { Fail } = assert;
12
-
13
12
  // PriceAuthorities return quotes as a pair of an amount and a payment, both
14
13
  // with the same value. The underlying amount wraps amountIn, amountOut, timer
15
14
  // and timestamp. The payment is issued by the quoteIssuer to support veracity
@@ -1,5 +1,5 @@
1
1
  /// <reference path="./types-ambient.js" />
2
- import { q, Fail } from '@agoric/assert';
2
+ import { q, Fail } from '@endo/errors';
3
3
  import { AmountMath } from '@agoric/ertp';
4
4
  import { assertRecord } from '@endo/marshal';
5
5
  import { isNat } from '@endo/nat';
@@ -1 +1 @@
1
- {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["recorder.js"],"names":[],"mappings":"AA4CO,yCAHI,OAAO,kBAAkB,EAAE,OAAO,cAClC,IAAI,CAAC,UAAU,CAAC,4TA2ItB,WAAW;;IAxGV;;;;OAIG;sBADU,OAAO,CAAC,MAAM,CAAC;IAa5B;;;;;OAKG;iBAFQ,GAAG,GACD,OAAO,CAAC,IAAI,CAAC;IAa1B;;;;;OAKG;sBAFQ,GAAG,GACD,OAAO,CAAC,IAAI,CAAC;GAkB/B;AAWM,2EAFI;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,qBAAqB,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;CAAC,IAI5F,CAAC,eACH,WAAW,GAAG,OAAO,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,+CAE5D,WAAW,CAAC,CAAC,CAAC,CAc5B;AAUM,4EAFI;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,qBAAqB,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;CAAC,IAI5F,CAAC,gBACH,IAAI,CAAC,WAAW,CAAC,+CAEf,mBAAmB,CAAC,CAAC,CAAC,CAepC;AAaM,4CA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yCAhRhB,kBAAkB"}
@@ -1,4 +1,4 @@
1
- import { Fail } from '@agoric/assert';
1
+ import { Fail } from '@endo/errors';
2
2
  import { StorageNodeShape } from '@agoric/internal';
3
3
  import { prepareDurablePublishKit } from '@agoric/notifier';
4
4
  import {
@@ -1,4 +1,4 @@
1
- import { assert } from '@agoric/assert';
1
+ import { assert } from '@endo/errors';
2
2
 
3
3
  /* allowedTransitions is an array of arrays which gets turned into a
4
4
  * map. The map maps string states to an array of potential next
@@ -1 +1 @@
1
- {"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA,iIAAkI;AAM3H,oEAON;AAuBM,+BALI,GAAG,QACH,cAAc,UACd,mBAAmB,GACjB,CAAC,GAAC,CAAC,CAOf;AAED,mBAAmB;AACnB,mBADW,IAAI,CAkBb;AAEF,wBAAwB;AACxB,wBADW,SAAS,CAqBlB;AAiBK,uCAHI,OAAO,iBACP,OAAO,QAIgD;AAsB3D,0CAHI,OAAO,YACP,cAAc,QA+BxB;AAGM,+DAGN;AAED,6EAA8E;AAavE,mCANI,GAAG,iBACH,OAAO,WACP,mBAAmB,YACnB,qBAAqB,GACnB,OAAO,CAAC,MAAM,CAAC,CA8B3B;AAYM,sCALI,GAAG,QACH,OAAO,WACP,mBAAmB,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAQ1C;AAWM,oCAJI,GAAG,wBACH,mBAAmB,4EAgB7B;AAED,0BAA0B;AAC1B,0BADW,WAAW,CAYpB;AAiDK,wBAHe,IAAI,kBACJ,MAAM,uBA/BjB,GAAG,cAGH,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,kBAG9B,oBAAoB,GAAG,SAAS,YAKhC,QAAQ,YAGR,OAAO,+DAUL,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAC,CAAC,CA+D1G;;iBAzVa,MAAM,cAAc;0BACpB,MAAM,UAAU"}
1
+ {"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AAUA,iIAAkI;AAI3H,oEAON;AAuBM,+BALI,GAAG,QACH,cAAc,UACd,mBAAmB,GACjB,CAAC,GAAC,CAAC,CAOf;AAED,mBAAmB;AACnB,mBADW,IAAI,CAkBb;AAEF,wBAAwB;AACxB,wBADW,SAAS,CAqBlB;AAiBK,uCAHI,OAAO,iBACP,OAAO,QAIgD;AAsB3D,0CAHI,OAAO,YACP,cAAc,QA+BxB;AAGM,+DAGN;AAED,6EAA8E;AAavE,mCANI,GAAG,iBACH,OAAO,WACP,mBAAmB,YACnB,qBAAqB,GACnB,OAAO,CAAC,MAAM,CAAC,CA8B3B;AAYM,sCALI,GAAG,QACH,OAAO,WACP,mBAAmB,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAQ1C;AAWM,oCAJI,GAAG,wBACH,mBAAmB,4EAgB7B;AAED,0BAA0B;AAC1B,0BADW,WAAW,CAYpB;AAiDK,wBAHe,IAAI,kBACJ,MAAM,uBA/BjB,GAAG,cAGH,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,kBAG9B,oBAAoB,GAAG,SAAS,YAKhC,QAAQ,YAGR,OAAO,+DAUL,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAC,CAAC,CA+D1G;;iBAzVa,MAAM,cAAc;0BACpB,MAAM,UAAU"}
@@ -1,7 +1,8 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
- import { mustMatch, keyEQ } from '@agoric/store';
2
+ import { Fail } from '@endo/errors';
3
3
  import { E } from '@endo/eventual-send';
4
4
  import { makePromiseKit } from '@endo/promise-kit';
5
+ import { mustMatch, keyEQ } from '@agoric/store';
5
6
  import { AssetKind } from '@agoric/ertp';
6
7
  import { fromUniqueEntries } from '@agoric/internal';
7
8
  import { satisfiesWant } from '../contractFacet/offerSafety.js';
@@ -9,8 +10,6 @@ import { atomicTransfer, fromOnly, toOnly } from './atomicTransfer.js';
9
10
 
10
11
  export const defaultAcceptanceMsg = `The offer has been accepted. Once the contract has been completed, please check your payout`;
11
12
 
12
- const { Fail } = assert;
13
-
14
13
  const getKeysSorted = obj => harden(Reflect.ownKeys(obj || {}).sort());
15
14
 
16
15
  export const assertIssuerKeywords = (zcf, expected) => {
@@ -1,4 +1,4 @@
1
- import { Fail } from '@agoric/assert';
1
+ import { Fail } from '@endo/errors';
2
2
  import { AmountMath } from '@agoric/ertp';
3
3
 
4
4
  export const assertBidSeat = (zcf, sellSeat, bidSeat) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,2BANW,GAAG,CAAC;IACd,aAAe,EAAE,OAAO,cAAc,EAAE,YAAY,CAAC;IACrD,iBAAmB,CAAC,EAAE,8BAA0B,CAAC;IACjD,WAAa,EAAE,MAAM,CAAC;CACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyHJ;AAjJD,wCAAkC;AAClC,0CAAoC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,2BANW,GAAG,CAAC;IACd,aAAe,EAAE,OAAO,cAAc,EAAE,YAAY,CAAC;IACrD,iBAAmB,CAAC,EAAE,8BAA0B,CAAC;IACjD,WAAa,EAAE,MAAM,CAAC;CACnB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyHJ;AAjJD,wCAAkC;AAClC,0CAAoC"}
@@ -1,4 +1,5 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
+ import { Fail } from '@endo/errors';
2
3
  import { E } from '@endo/eventual-send';
3
4
  import { mustMatch } from '@endo/patterns';
4
5
  import { Far } from '@endo/marshal';
@@ -14,8 +15,6 @@ import * as secondPriceLogic from './secondPriceLogic.js';
14
15
  import * as firstPriceLogic from './firstPriceLogic.js';
15
16
  import { assertBidSeat } from './assertBidSeat.js';
16
17
 
17
- const { Fail } = assert;
18
-
19
18
  const FIRST_PRICE = 'first-price';
20
19
  const SECOND_PRICE = 'second-price';
21
20
 
@@ -1,5 +1,5 @@
1
+ import { assert } from '@endo/errors';
1
2
  import { Far } from '@endo/marshal';
2
- import { assert } from '@agoric/assert';
3
3
  import { AmountMath, isNatValue } from '@agoric/ertp';
4
4
 
5
5
  // Eventually will be importable from '@agoric/zoe-contract-support'
@@ -1,7 +1,7 @@
1
1
  /// <reference path="./types-ambient.js" />
2
2
 
3
+ import { assert } from '@endo/errors';
3
4
  import { AmountMath, isNatValue } from '@agoric/ertp';
4
- import { assert } from '@agoric/assert';
5
5
  import { makeRatio, oneMinus } from '../../contractSupport/index.js';
6
6
  import { make100Percent, make0Percent } from './percent.js';
7
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,2BATW,GAAG,CAAC;IACd,YAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,YAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,gBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,cAAgB,EAAE,cAAc,CAAC;IACjC,UAAY,EAAE,MAAM,CAAC;IACrB,gBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC/B,CAAC;;;;;;;;;;;;EA0GJ;oCA7J4F,4BAA4B"}
1
+ {"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,2BATW,GAAG,CAAC;IACd,YAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,YAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,gBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,cAAgB,EAAE,cAAc,CAAC;IACjC,UAAY,EAAE,MAAM,CAAC;IACrB,gBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC/B,CAAC;;;;;;;;;;;;EA0GJ;oCA3J4F,4BAA4B"}
@@ -1,6 +1,7 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
2
  /// <reference path="./types-ambient.js" />
3
3
 
4
+ import { Fail } from '@endo/errors';
4
5
  import { makePromiseKit } from '@endo/promise-kit';
5
6
  import { E } from '@endo/eventual-send';
6
7
  import { Far } from '@endo/marshal';
@@ -19,8 +20,6 @@ import { Position } from './position.js';
19
20
  * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
20
21
  */
21
22
 
22
- const { Fail } = assert;
23
-
24
23
  const PERCENT_BASE = 100n;
25
24
  const BASIS_POINTS = 10000n;
26
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"coveredCall-durable.d.ts","sourceRoot":"","sources":["coveredCall-durable.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;GAcG;AACH,2BAJW,GAAG,gBACH,OAAO,mBACP,OAAO,kBAAkB,EAAE,OAAO;;;;GA6E5C"}
1
+ {"version":3,"file":"coveredCall-durable.d.ts","sourceRoot":"","sources":["coveredCall-durable.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,2BAJW,GAAG,gBACH,OAAO,mBACP,OAAO,kBAAkB,EAAE,OAAO;;;;GA6E5C"}
@@ -1,10 +1,9 @@
1
+ import { Fail } from '@endo/errors';
1
2
  import { mustMatch, M } from '@agoric/store';
2
3
  import { prepareExo, prepareExoClass } from '@agoric/vat-data';
3
4
  import { swapExact } from '../contractSupport/index.js';
4
5
  import { isAfterDeadlineExitRule, OfferHandlerI } from '../typeGuards.js';
5
6
 
6
- const { Fail } = assert;
7
-
8
7
  const sellSeatExpiredMsg = 'The covered call option is expired.';
9
8
 
10
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"coveredCall.d.ts","sourceRoot":"","sources":["coveredCall.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,2BAFW,GAAG;;EA6Cb"}
1
+ {"version":3,"file":"coveredCall.d.ts","sourceRoot":"","sources":["coveredCall.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,2BAFW,GAAG;;EA6Cb"}
@@ -1,10 +1,9 @@
1
+ import { Fail, q } from '@endo/errors';
1
2
  import { M, mustMatch } from '@agoric/store';
2
3
  // Eventually will be importable from '@agoric/zoe-contract-support'
3
4
  import { swapExact } from '../contractSupport/index.js';
4
5
  import { isAfterDeadlineExitRule } from '../typeGuards.js';
5
6
 
6
- const { Fail, quote: q } = assert;
7
-
8
7
  /**
9
8
  * A call option is the right (but not the obligation) to buy digital
10
9
  * assets at a pre-determined price, called the strike price. This
@@ -1,4 +1,4 @@
1
- import { assert, Fail } from '@agoric/assert';
1
+ import { assert, Fail } from '@endo/errors';
2
2
  import { E } from '@endo/eventual-send';
3
3
  import { Far } from '@endo/marshal';
4
4
  import { makePromiseKit } from '@endo/promise-kit';
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./types-ambient.js" />
2
2
 
3
- import { Fail } from '@agoric/assert';
3
+ import { Fail } from '@endo/errors';
4
4
  import { AmountMath } from '@agoric/ertp';
5
5
 
6
6
  import { assertProposalShape } from '../../contractSupport/index.js';
@@ -1,6 +1,6 @@
1
+ import { annotateError, X } from '@endo/errors';
1
2
  import { Far } from '@endo/marshal';
2
3
  import { makeNotifierKit, observeNotifier } from '@agoric/notifier';
3
- import { assert, details as X } from '@agoric/assert';
4
4
  import { AmountMath } from '@agoric/ertp';
5
5
  import { TimeMath } from '@agoric/time';
6
6
 
@@ -70,7 +70,7 @@ export const makeDebtCalculator = debtCalculatorConfig => {
70
70
  }
71
71
  },
72
72
  fail: reason => {
73
- assert.note(
73
+ annotateError(
74
74
  reason,
75
75
  X`Period problem: ${originalDebt}, started: ${basetime}, debt: ${debt}`,
76
76
  );
@@ -79,7 +79,7 @@ export const makeDebtCalculator = debtCalculatorConfig => {
79
79
  });
80
80
 
81
81
  observeNotifier(periodNotifier, periodObserver).catch(reason => {
82
- assert.note(
82
+ annotateError(
83
83
  reason,
84
84
  X`Unable to updateDebt originally: ${originalDebt}, started: ${basetime}, debt: ${debt}`,
85
85
  );
@@ -1,8 +1,8 @@
1
+ import { assert } from '@endo/errors';
1
2
  import { makeIssuerKit, AssetKind, AmountMath } from '@agoric/ertp';
2
3
  import { E } from '@endo/eventual-send';
3
4
  import { Far } from '@endo/marshal';
4
5
 
5
- import { assert } from '@agoric/assert';
6
6
  import { notForProductionUse } from '@agoric/internal/src/magic-cookie-test-only.js';
7
7
 
8
8
  /**
@@ -1,5 +1,5 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
- import { assert, Fail } from '@agoric/assert';
2
+ import { assert, Fail } from '@endo/errors';
3
3
  import { Far } from '@endo/marshal';
4
4
  import { AmountMath } from '@agoric/ertp';
5
5
 
@@ -1,5 +1,5 @@
1
+ import { assert } from '@endo/errors';
1
2
  import { E } from '@endo/eventual-send';
2
- import { assert } from '@agoric/assert';
3
3
  import { Far } from '@endo/marshal';
4
4
  import {
5
5
  offerTo,
@@ -1,5 +1,5 @@
1
1
  /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
- import { Fail, q } from '@agoric/assert';
2
+ import { Fail, q } from '@endo/errors';
3
3
  import { AmountMath, AssetKind, makeIssuerKit } from '@agoric/ertp';
4
4
  import { assertAllDefined } from '@agoric/internal';
5
5
  import {
@@ -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":"AAiBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,2BAFW,GAAG,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;CAAC,CAAC;;;;EAuH5C"}