@agoric/zoe 0.26.3-dev-ecf2d8e.0 → 0.26.3-other-dev-70beeb7.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 (164) hide show
  1. package/CHANGELOG.md +1179 -0
  2. package/README.md +7 -7
  3. package/bundles/bundle-contractFacet-js-meta.json +319 -543
  4. package/bundles/bundle-contractFacet.d.ts +3 -3
  5. package/bundles/bundle-contractFacet.js +1 -1
  6. package/exported.js +1 -1
  7. package/package.json +23 -30
  8. package/src/cleanProposal.js +2 -2
  9. package/src/contractFacet/internal-types.d.ts +2 -2
  10. package/src/contractFacet/internal-types.d.ts.map +1 -1
  11. package/src/contractFacet/internal-types.js +1 -1
  12. package/src/contractFacet/types.d.ts +191 -0
  13. package/src/contractFacet/types.d.ts.map +1 -0
  14. package/src/contractFacet/types.js +256 -0
  15. package/src/contractFacet/vatRoot.d.ts +1 -1
  16. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  17. package/src/contractFacet/zcfMint.d.ts +1 -1
  18. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  19. package/src/contractFacet/zcfMint.js +1 -2
  20. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  21. package/src/contractFacet/zcfSeat.js +3 -105
  22. package/src/contractFacet/zcfZygote.d.ts +1 -1
  23. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  24. package/src/contractFacet/zcfZygote.js +33 -78
  25. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  26. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  27. package/src/contractSupport/atomicTransfer.js +90 -5
  28. package/src/contractSupport/bondingCurves.js +2 -2
  29. package/src/contractSupport/durability.d.ts +2 -2
  30. package/src/contractSupport/durability.d.ts.map +1 -1
  31. package/src/contractSupport/durability.js +3 -3
  32. package/src/contractSupport/priceAuthority.d.ts +1 -16
  33. package/src/contractSupport/priceAuthority.d.ts.map +1 -1
  34. package/src/contractSupport/priceAuthority.js +1 -3
  35. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  36. package/src/contractSupport/priceAuthorityInitial.js +0 -1
  37. package/src/contractSupport/priceAuthorityQuoteMint.d.ts +1 -1
  38. package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
  39. package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
  40. package/src/contractSupport/priceAuthorityTransform.js +3 -2
  41. package/src/contractSupport/recorder.d.ts +4 -4
  42. package/src/contractSupport/recorder.d.ts.map +1 -1
  43. package/src/contractSupport/safeMath.d.ts +7 -7
  44. package/src/contractSupport/safeMath.d.ts.map +1 -1
  45. package/src/contractSupport/topics.d.ts +1 -1
  46. package/src/contractSupport/topics.d.ts.map +1 -1
  47. package/src/contractSupport/zoeHelpers.d.ts +1 -1
  48. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  49. package/src/contractSupport/zoeHelpers.js +11 -5
  50. package/src/contracts/atomicSwap.d.ts +1 -1
  51. package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -1
  52. package/src/contracts/auction/firstPriceLogic.js +7 -5
  53. package/src/contracts/auction/index.d.ts +23 -1
  54. package/src/contracts/auction/index.d.ts.map +1 -1
  55. package/src/contracts/auction/index.js +0 -1
  56. package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -1
  57. package/src/contracts/auction/secondPriceLogic.js +3 -1
  58. package/src/contracts/automaticRefund.d.ts +3 -3
  59. package/src/contracts/autoswap.d.ts.map +1 -1
  60. package/src/contracts/autoswap.js +7 -4
  61. package/src/contracts/barterExchange.d.ts +2 -2
  62. package/src/contracts/barterExchange.d.ts.map +1 -1
  63. package/src/contracts/barterExchange.js +3 -2
  64. package/src/contracts/callSpread/calculateShares.d.ts +7 -0
  65. package/src/contracts/callSpread/calculateShares.d.ts.map +1 -1
  66. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  67. package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -1
  68. package/src/contracts/callSpread/fundedCallSpread.js +3 -1
  69. package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -1
  70. package/src/contracts/callSpread/payoffHandler.js +0 -1
  71. package/src/contracts/callSpread/percent.d.ts +2 -0
  72. package/src/contracts/callSpread/percent.d.ts.map +1 -1
  73. package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
  74. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
  75. package/src/contracts/callSpread/pricedCallSpread.js +3 -2
  76. package/src/contracts/coveredCall-durable.d.ts +3 -3
  77. package/src/contracts/coveredCall.d.ts +1 -1
  78. package/src/contracts/loan/borrow.d.ts.map +1 -1
  79. package/src/contracts/loan/borrow.js +3 -1
  80. package/src/contracts/loan/close.d.ts.map +1 -1
  81. package/src/contracts/loan/close.js +6 -2
  82. package/src/contracts/loan/index.d.ts +1 -1
  83. package/src/contracts/loan/liquidate.d.ts +12 -1
  84. package/src/contracts/loan/liquidate.d.ts.map +1 -1
  85. package/src/contracts/loan/liquidate.js +1 -3
  86. package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -1
  87. package/src/contracts/loan/scheduleLiquidation.js +0 -1
  88. package/src/contracts/loan/types.d.ts +1 -0
  89. package/src/contracts/loan/types.d.ts.map +1 -1
  90. package/src/contracts/loan/types.js +7 -0
  91. package/src/contracts/mintPayments.d.ts +6 -14
  92. package/src/contracts/mintPayments.d.ts.map +1 -1
  93. package/src/contracts/mintPayments.js +1 -1
  94. package/src/contracts/oracle.d.ts +2 -2
  95. package/src/contracts/oracle.d.ts.map +1 -1
  96. package/src/contracts/oracle.js +0 -3
  97. package/src/contracts/priceAggregator.d.ts +12 -2
  98. package/src/contracts/priceAggregator.d.ts.map +1 -1
  99. package/src/contracts/priceAggregator.js +2 -3
  100. package/src/contracts/scaledPriceAuthority.d.ts +1 -1
  101. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  102. package/src/contracts/scaledPriceAuthority.js +0 -2
  103. package/src/contracts/sellItems.d.ts +1 -1
  104. package/src/contracts/sellItems.d.ts.map +1 -1
  105. package/src/contracts/sellItems.js +3 -2
  106. package/src/contracts/simpleExchange.d.ts +2 -2
  107. package/src/instanceRecordStorage.d.ts +1 -1
  108. package/src/instanceRecordStorage.d.ts.map +1 -1
  109. package/src/internal-types.d.ts +3 -3
  110. package/src/internal-types.d.ts.map +1 -1
  111. package/src/internal-types.js +1 -1
  112. package/src/issuerStorage.d.ts +1 -1
  113. package/src/makeHandle.d.ts +1 -1
  114. package/src/makeHandle.d.ts.map +1 -1
  115. package/src/typeGuards.d.ts +20 -118
  116. package/src/typeGuards.d.ts.map +1 -1
  117. package/src/typeGuards.js +1 -7
  118. package/src/zoeService/escrowStorage.d.ts +1 -1
  119. package/src/zoeService/feeMint.d.ts +5 -5
  120. package/src/zoeService/feeMint.d.ts.map +1 -1
  121. package/src/zoeService/installationStorage.d.ts +1 -1
  122. package/src/zoeService/instanceAdminStorage.d.ts +2 -2
  123. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
  124. package/src/zoeService/instanceAdminStorage.js +0 -1
  125. package/src/zoeService/internal-types.d.ts +2 -2
  126. package/src/zoeService/internal-types.d.ts.map +1 -1
  127. package/src/zoeService/internal-types.js +1 -1
  128. package/src/zoeService/makeInvitation.d.ts +1 -1
  129. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  130. package/src/zoeService/offer/offer.d.ts.map +1 -1
  131. package/src/zoeService/offer/offer.js +3 -2
  132. package/src/zoeService/startInstance.d.ts +1 -1
  133. package/src/zoeService/startInstance.d.ts.map +1 -1
  134. package/src/zoeService/startInstance.js +23 -20
  135. package/src/zoeService/types.d.ts +1 -1
  136. package/src/zoeService/types.d.ts.map +1 -1
  137. package/src/zoeService/utils.d.ts +2 -2
  138. package/src/zoeService/zoe.d.ts +1 -11
  139. package/src/zoeService/zoe.d.ts.map +1 -1
  140. package/src/zoeService/zoe.js +1 -24
  141. package/src/zoeService/zoeSeat.d.ts +1 -1
  142. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  143. package/src/zoeService/zoeSeat.js +0 -1
  144. package/src/zoeService/zoeStorageManager.d.ts +1 -1
  145. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  146. package/src/zoeService/zoeStorageManager.js +2 -7
  147. package/tools/fakePriceAuthority.d.ts.map +1 -1
  148. package/tools/fakePriceAuthority.js +2 -0
  149. package/tools/manualPriceAuthority.d.ts.map +1 -1
  150. package/tools/manualPriceAuthority.js +0 -1
  151. package/tools/manualTimer.js +1 -1
  152. package/tools/prepare-test-env.js +1 -1
  153. package/tools/priceAuthorityRegistry.d.ts +1 -1
  154. package/tools/priceAuthorityRegistry.d.ts.map +1 -1
  155. package/tools/scriptedOracle.d.ts +2 -2
  156. package/tools/scriptedPriceAuthority.d.ts.map +1 -1
  157. package/tools/scriptedPriceAuthority.js +0 -1
  158. package/tools/setup-zoe.d.ts +0 -5
  159. package/tools/setup-zoe.d.ts.map +1 -1
  160. package/src/contractFacet/reallocate.d.ts +0 -3
  161. package/src/contractFacet/reallocate.d.ts.map +0 -1
  162. package/src/contractFacet/reallocate.js +0 -94
  163. package/src/contractFacet/types-ambient.d.ts +0 -247
  164. package/src/contractFacet/types-ambient.js +0 -1
@@ -1,4 +1,4 @@
1
- export function prepareRecorder(baggage: MapStore<string, any>, marshaller: ERef<Marshaller>): (publisher: Publisher<unknown>, storageNode: StorageNode, valueShape?: TypedMatcher<unknown> | undefined) => {
1
+ export function prepareRecorder(baggage: MapStore<string, unknown>, marshaller: ERef<Marshaller>): (publisher: Publisher<unknown>, storageNode: StorageNode, valueShape?: TypedMatcher<unknown> | undefined) => {
2
2
  getStorageNode(): StorageNode;
3
3
  /**
4
4
  * Memoizes the remote call to the storage node
@@ -51,8 +51,8 @@ export function defineERecorderKit({ makeRecorder, makeDurablePublishKit }: {
51
51
  makeRecorder: MakeRecorder;
52
52
  makeDurablePublishKit: ReturnType<typeof prepareDurablePublishKit>;
53
53
  }): <T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedMatcher<T> | undefined) => EventualRecorderKit<T>;
54
- export function prepareRecorderKit(baggage: MapStore<string, any>, marshaller: ERef<Marshaller>): <T>(storageNode: StorageNode, valueShape?: TypedMatcher<T> | undefined) => RecorderKit<T>;
55
- export function prepareRecorderKitMakers(baggage: MapStore<string, any>, marshaller: ERef<Marshaller>): {
54
+ export function prepareRecorderKit(baggage: MapStore<string, unknown>, marshaller: ERef<Marshaller>): <T>(storageNode: StorageNode, valueShape?: TypedMatcher<T> | undefined) => RecorderKit<T>;
55
+ export function prepareRecorderKitMakers(baggage: MapStore<string, unknown>, marshaller: ERef<Marshaller>): {
56
56
  makeDurablePublishKit: (options?: {
57
57
  valueDurability?: "mandatory" | undefined;
58
58
  } | undefined) => {
@@ -225,5 +225,5 @@ export type TypedMatcher<T> = {
225
225
  validatedType?: T;
226
226
  };
227
227
  export type MatchedType<TM extends TypedMatcher<any>> = TM extends TypedMatcher<infer T> ? T : never;
228
- import { prepareDurablePublishKit } from '@agoric/notifier';
228
+ import { prepareDurablePublishKit } from "@agoric/notifier";
229
229
  //# sourceMappingURL=recorder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["recorder.js"],"names":[],"mappings":"AA4CO,4EAFI,KAAK,UAAU,CAAC;;IAmCrB;;;;OAIG;sBADU,QAAQ,MAAM,CAAC;IAa5B;;;;;OAKG;iBAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;IAa1B;;;;;OAKG;sBAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;;;IArC1B;;;;OAIG;sBADU,QAAQ,MAAM,CAAC;IAa5B;;;;;OAKG;iBAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;IAa1B;;;;;OAKG;sBAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;GAkB/B;AAWM,2EAFI;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,qBAAqB,EAAE,WAAW,+BAA+B,CAAC,CAAA;CAAC,oBAK9F,WA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let floorDivide: NatOp;
6
- let ceilDivide: NatOp;
7
- let bankersDivide: NatOp;
8
- let isGTE: (x: number | bigint, y: number | bigint) => boolean;
2
+ const add: NatOp;
3
+ const subtract: NatOp;
4
+ const multiply: NatOp;
5
+ const floorDivide: NatOp;
6
+ const ceilDivide: NatOp;
7
+ const bankersDivide: NatOp;
8
+ const isGTE: (x: number | bigint, y: number | bigint) => boolean;
9
9
  }
10
10
  export type NatOp = (x: number | bigint, y: number | bigint) => NatValue;
11
11
  //# sourceMappingURL=safeMath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"safeMath.d.ts","sourceRoot":"","sources":["safeMath.js"],"names":[],"mappings":";aAYa,KAAK;kBAGL,KAAK;kBAEL,KAAK;qBAEL,KAAK;oBAEL,KAAK;uBAQN,KAAK;;;wBA3BC,MAAM,GAAG,MAAM,KAAK,MAAM,GAAG,MAAM,KAAK,QAAQ"}
1
+ {"version":3,"file":"safeMath.d.ts","sourceRoot":"","sources":["safeMath.js"],"names":[],"mappings":";eAYa,KAAK;oBAGL,KAAK;oBAEL,KAAK;uBAEL,KAAK;sBAEL,KAAK;yBAQN,KAAK;;;wBA3BC,MAAM,GAAG,MAAM,KAAK,MAAM,GAAG,MAAM,KAAK,QAAQ"}
@@ -18,5 +18,5 @@ export type PublicTopic<T extends unknown> = {
18
18
  export type TopicsRecord = {
19
19
  [topicName: string]: PublicTopic<unknown>;
20
20
  };
21
- import { SubscriberShape } from '@agoric/notifier';
21
+ import { SubscriberShape } from "@agoric/notifier";
22
22
  //# sourceMappingURL=topics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAMA,gEAME;AAEF;;;;;;;GAOG;AAEH,iEAA0E;AAcnE,kDAJI,MAAM,wHAYhB;6CA7BY;IACZ,WAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAc,EAAE,WAAW,CAAC,CAAC,CAAC;IAC9B,WAAe,EAAE,KAAK,MAAM,CAAC,CAAC;CAC3B;;;;gCApB4B,kBAAkB"}
1
+ {"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAMA,gEAME;AAEF;;;;;;;GAOG;AAEH,iEAA0E;AAcnE,kDAJI,MAAM,wHAYhB;6CA7BY;IACZ,WAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAc,EAAE,WAAW,CAAC,CAAC,CAAC;IAC9B,WAAe,EAAE,KAAK,MAAM,CAAC,CAAC;CAC3B"}
@@ -14,7 +14,7 @@ export function withdrawFromSeat(zcf: ZCF, seat: ZCFSeat, amounts: AmountKeyword
14
14
  export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(IssuerRecord<any> | undefined)[]>;
15
15
  /** @type {MapKeywords} */
16
16
  export const mapKeywords: MapKeywords;
17
- export function offerTo<Args extends unknown, Result extends unknown>(zcf: ZCF, invitation: ERef<Invitation<R, A>>, keywordMapping: KeywordKeywordRecord | undefined, proposal: Proposal, fromSeat: ZCFSeat, toSeat?: ZCFSeat | undefined, offerArgs?: Args | undefined): Promise<{
17
+ export function offerTo<Args extends unknown, Result extends unknown>(zcf: ZCF, invitation: ERef<Invitation<Result, Args>>, keywordMapping: KeywordKeywordRecord | undefined, proposal: Proposal, fromSeat: ZCFSeat, toSeat?: ZCFSeat | undefined, offerArgs?: Args | undefined): Promise<{
18
18
  userSeatPromise: Promise<UserSeat<Result>>;
19
19
  deposited: Promise<AmountKeywordRecord>;
20
20
  }>;
@@ -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,uCAH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G;;iBA3Va,MAAM,cAAc;0BACpB,MAAM,UAAU"}
@@ -1,11 +1,15 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import { mustMatch, keyEQ } from '@agoric/store';
3
2
  import { E } from '@endo/eventual-send';
4
3
  import { makePromiseKit } from '@endo/promise-kit';
5
4
  import { AssetKind } from '@agoric/ertp';
6
5
  import { fromUniqueEntries } from '@agoric/internal';
7
6
  import { satisfiesWant } from '../contractFacet/offerSafety.js';
8
- import { atomicTransfer, fromOnly, toOnly } from './atomicTransfer.js';
7
+ import {
8
+ atomicRearrange,
9
+ atomicTransfer,
10
+ fromOnly,
11
+ toOnly,
12
+ } from './atomicTransfer.js';
9
13
 
10
14
  export const defaultAcceptanceMsg = `The offer has been accepted. Once the contract has been completed, please check your payout`;
11
15
 
@@ -53,7 +57,8 @@ export const satisfies = (zcf, seat, update) => {
53
57
  /** @type {Swap} */
54
58
  export const swap = (zcf, leftSeat, rightSeat) => {
55
59
  try {
56
- zcf.atomicRearrange(
60
+ atomicRearrange(
61
+ zcf,
57
62
  harden([
58
63
  [rightSeat, leftSeat, leftSeat.getProposal().want],
59
64
  [leftSeat, rightSeat, rightSeat.getProposal().want],
@@ -73,7 +78,8 @@ export const swap = (zcf, leftSeat, rightSeat) => {
73
78
  /** @type {SwapExact} */
74
79
  export const swapExact = (zcf, leftSeat, rightSeat) => {
75
80
  try {
76
- zcf.atomicRearrange(
81
+ atomicRearrange(
82
+ zcf,
77
83
  harden([
78
84
  fromOnly(rightSeat, rightSeat.getProposal().give),
79
85
  fromOnly(leftSeat, leftSeat.getProposal().give),
@@ -299,7 +305,7 @@ const reverse = (keywordRecord = {}) => {
299
305
  * @param {ZCFSeat} fromSeat
300
306
  * The seat in contractA to take the offer payments from.
301
307
  *
302
- * @param {ZCFSeat} [toSeat]
308
+ * @param {ZCFSeat} [toSeat=fromSeat]
303
309
  * The seat in contractA to deposit the payout of the offer to.
304
310
  * If `toSeat` is not provided, this defaults to the `fromSeat`.
305
311
  *
@@ -11,6 +11,6 @@
11
11
  * @param {ZCF} zcf
12
12
  */
13
13
  export function start(zcf: ZCF): {
14
- creatorInvitation: Promise<Invitation<R, A>>;
14
+ creatorInvitation: Promise<Invitation<unknown, never>>;
15
15
  };
16
16
  //# sourceMappingURL=atomicSwap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"firstPriceLogic.d.ts","sourceRoot":"","sources":["firstPriceLogic.js"],"names":[],"mappings":"AAOO,wCAJI,GAAG,YACH,OAAO,YACP,MAAM,OAAO,CAAC,QAoDxB"}
1
+ {"version":3,"file":"firstPriceLogic.d.ts","sourceRoot":"","sources":["firstPriceLogic.js"],"names":[],"mappings":"AAQO,wCAJI,GAAG,YACH,OAAO,YACP,MAAM,OAAO,CAAC,QAqDxB"}
@@ -1,4 +1,5 @@
1
1
  import { AmountMath } from '@agoric/ertp';
2
+ import { atomicRearrange } from '../../contractSupport/index.js';
2
3
 
3
4
  /**
4
5
  * @param {ZCF} zcf
@@ -19,7 +20,7 @@ export const calcWinnerAndClose = (zcf, sellSeat, bidSeats) => {
19
20
  let highestBidSeat = bidSeats[0];
20
21
  let activeBidsCount = 0n;
21
22
 
22
- for (const bidSeat of bidSeats) {
23
+ bidSeats.forEach(bidSeat => {
23
24
  if (!bidSeat.hasExited()) {
24
25
  activeBidsCount += 1n;
25
26
  /** @type {Amount<'nat'>} */
@@ -34,14 +35,15 @@ export const calcWinnerAndClose = (zcf, sellSeat, bidSeats) => {
34
35
  highestBidSeat = bidSeat;
35
36
  }
36
37
  }
37
- }
38
+ });
38
39
 
39
40
  if (activeBidsCount === 0n) {
40
41
  throw sellSeat.fail(Error(`Could not close auction. No bids were active`));
41
42
  }
42
43
 
43
44
  // Everyone else gets a refund so their values remain the same.
44
- zcf.atomicRearrange(
45
+ atomicRearrange(
46
+ zcf,
45
47
  harden([
46
48
  [highestBidSeat, sellSeat, { Bid: highestBid }, { Ask: highestBid }],
47
49
  [sellSeat, highestBidSeat, { Asset: assetAmount }],
@@ -49,10 +51,10 @@ export const calcWinnerAndClose = (zcf, sellSeat, bidSeats) => {
49
51
  );
50
52
 
51
53
  sellSeat.exit();
52
- for (const bidSeat of bidSeats) {
54
+ bidSeats.forEach(bidSeat => {
53
55
  if (!bidSeat.hasExited()) {
54
56
  bidSeat.exit();
55
57
  }
56
- }
58
+ });
57
59
  zcf.shutdown('Auction closed.');
58
60
  };
@@ -26,7 +26,29 @@ export function start(zcf: ZCF<{
26
26
  winnerPriceOption?: "first-price" | "second-price" | undefined;
27
27
  bidDuration: bigint;
28
28
  }>): {
29
- creatorInvitation: Promise<Invitation<R, A>>;
29
+ creatorInvitation: Promise<Invitation<{
30
+ makeBidInvitation: () => Promise<Invitation<unknown, never>>;
31
+ getSessionDetails: () => {
32
+ auctionedAssets: any;
33
+ minimumBid: any;
34
+ winnerPriceOption: string;
35
+ closesAfter: any;
36
+ bidDuration: bigint;
37
+ timeAuthority: import("@agoric/time/src/types").TimerService;
38
+ bids: string | any[];
39
+ };
40
+ } & import("@endo/eventual-send").RemotableBrand<{}, {
41
+ makeBidInvitation: () => Promise<Invitation<unknown, never>>;
42
+ getSessionDetails: () => {
43
+ auctionedAssets: any;
44
+ minimumBid: any;
45
+ winnerPriceOption: string;
46
+ closesAfter: any;
47
+ bidDuration: bigint;
48
+ timeAuthority: import("@agoric/time/src/types").TimerService;
49
+ bids: string | any[];
50
+ };
51
+ }>, never>>;
30
52
  publicFacet: {
31
53
  getCurrentBids: () => any[] | "Bids are hidden for \"second price\" auctions";
32
54
  getSessionDetails: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;mBALkB,OAAO,wBAAwB,EAAE,YAAY;;iBAE/C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EA2HrB;AAlJD,wCAAkC;AAClC,0CAAoC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;mBALkB,OAAO,wBAAwB,EAAE,YAAY;;iBAE/C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2HrB;AAlJD,wCAAkC;AAClC,0CAAoC"}
@@ -1,4 +1,3 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import { E } from '@endo/eventual-send';
3
2
  import { mustMatch } from '@endo/patterns';
4
3
  import { Far } from '@endo/marshal';
@@ -1 +1 @@
1
- {"version":3,"file":"secondPriceLogic.d.ts","sourceRoot":"","sources":["secondPriceLogic.js"],"names":[],"mappings":"AAOO,wCAJI,GAAG,YACH,OAAO,YACP,MAAM,OAAO,CAAC,QA+DxB"}
1
+ {"version":3,"file":"secondPriceLogic.d.ts","sourceRoot":"","sources":["secondPriceLogic.js"],"names":[],"mappings":"AAQO,wCAJI,GAAG,YACH,OAAO,YACP,MAAM,OAAO,CAAC,QAgExB"}
@@ -1,4 +1,5 @@
1
1
  import { AmountMath } from '@agoric/ertp';
2
+ import { atomicRearrange } from '../../contractSupport/index.js';
2
3
 
3
4
  /**
4
5
  * @param {ZCF} zcf
@@ -47,7 +48,8 @@ export const calcWinnerAndClose = (zcf, sellSeat, bidSeats) => {
47
48
  }
48
49
 
49
50
  // Everyone else gets a refund so their values remain the same.
50
- zcf.atomicRearrange(
51
+ atomicRearrange(
52
+ zcf,
51
53
  harden([
52
54
  [
53
55
  highestBidSeat,
@@ -13,13 +13,13 @@
13
13
  * @param {ZCF<{}>} zcf
14
14
  */
15
15
  export function start(zcf: ZCF<{}>): {
16
- creatorInvitation: Promise<Invitation<R, A>>;
16
+ creatorInvitation: Promise<Invitation<unknown, never>>;
17
17
  publicFacet: {
18
18
  getOffersCount: () => bigint;
19
- makeInvitation: () => Promise<Invitation<R, A>>;
19
+ makeInvitation: () => Promise<Invitation<unknown, never>>;
20
20
  } & import("@endo/eventual-send").RemotableBrand<{}, {
21
21
  getOffersCount: () => bigint;
22
- makeInvitation: () => Promise<Invitation<R, A>>;
22
+ makeInvitation: () => Promise<Invitation<unknown, never>>;
23
23
  }>;
24
24
  };
25
25
  //# sourceMappingURL=automaticRefund.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAoVb"}
1
+ {"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAsVb"}
@@ -11,6 +11,7 @@ import {
11
11
  assertProposalShape,
12
12
  assertNatAssetKind,
13
13
  calcSecondaryRequired,
14
+ atomicRearrange,
14
15
  } from '../contractSupport/index.js';
15
16
 
16
17
  /**
@@ -87,7 +88,8 @@ const start = async zcf => {
87
88
  };
88
89
 
89
90
  function consummate(tradeAmountIn, tradeAmountOut, swapSeat) {
90
- zcf.atomicRearrange(
91
+ atomicRearrange(
92
+ zcf,
91
93
  harden([
92
94
  [
93
95
  swapSeat,
@@ -165,7 +167,6 @@ const start = async zcf => {
165
167
  } = swapSeat.getProposal();
166
168
 
167
169
  assert(isNatValue(wantedAmountOut.value));
168
- assert.typeof(amountIn.value, 'bigint');
169
170
 
170
171
  const tradePrice = getOutputPrice(
171
172
  wantedAmountOut.value,
@@ -203,7 +204,8 @@ const start = async zcf => {
203
204
  Central: AmountMath.make(brands.Central, centralIn),
204
205
  Secondary: secondaryAmount,
205
206
  };
206
- zcf.atomicRearrange(
207
+ atomicRearrange(
208
+ zcf,
207
209
  harden([
208
210
  [seat, poolSeat, liquidityDeposited],
209
211
  [poolSeat, seat, { Liquidity: liquidityAmountOut }],
@@ -305,7 +307,8 @@ const start = async zcf => {
305
307
  Secondary: newUserSecondaryAmount,
306
308
  };
307
309
 
308
- zcf.atomicRearrange(
310
+ atomicRearrange(
311
+ zcf,
309
312
  harden([
310
313
  [removeLiqSeat, poolSeat, { Liquidity: userAllocation.Liquidity }],
311
314
  [poolSeat, removeLiqSeat, liquidityRemoved],
@@ -14,9 +14,9 @@
14
14
  */
15
15
  export function start(zcf: ZCF): {
16
16
  publicFacet: {
17
- makeInvitation: () => Promise<Invitation<R, A>>;
17
+ makeInvitation: () => Promise<Invitation<unknown, never>>;
18
18
  } & import("@endo/eventual-send").RemotableBrand<{}, {
19
- makeInvitation: () => Promise<Invitation<R, A>>;
19
+ makeInvitation: () => Promise<Invitation<unknown, never>>;
20
20
  }>;
21
21
  };
22
22
  //# sourceMappingURL=barterExchange.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"barterExchange.d.ts","sourceRoot":"","sources":["barterExchange.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,2BAFW,GAAG;;;;;;EA+Gb"}
1
+ {"version":3,"file":"barterExchange.d.ts","sourceRoot":"","sources":["barterExchange.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,2BAFW,GAAG;;;;;;EAgHb"}
@@ -1,7 +1,7 @@
1
1
  import { Far } from '@endo/marshal';
2
2
  import { makeLegacyMap } from '@agoric/store';
3
3
  // Eventually will be importable from '@agoric/zoe-contract-support'
4
- import { satisfies } from '../contractSupport/index.js';
4
+ import { satisfies, atomicRearrange } from '../contractSupport/index.js';
5
5
 
6
6
  /**
7
7
  * This Barter Exchange accepts offers to trade arbitrary goods for other
@@ -63,7 +63,8 @@ const start = zcf => {
63
63
  const matchingTrade = findMatchingTrade(offerDetails, orders);
64
64
  if (matchingTrade) {
65
65
  // reallocate by giving each side what it wants
66
- zcf.atomicRearrange(
66
+ atomicRearrange(
67
+ zcf,
67
68
  harden([
68
69
  [
69
70
  offerDetails.seat,
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Calculate the portion (as a Ratio) of the collateral that should be
3
+ * allocated to the long side of a call spread contract. price gives the value
4
+ * of the underlying asset at closing that determines the payouts to the parties
5
+ *
6
+ * @type {CalculateShares}
7
+ */
1
8
  export function calculateShares(collateralBrand: Brand<AssetKind>, price: Amount<"nat">, strikePrice1: Amount<"nat">, strikePrice2: Amount<"nat">): CalculateSharesReturn;
2
9
  //# sourceMappingURL=calculateShares.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calculateShares.d.ts","sourceRoot":"","sources":["calculateShares.js"],"names":[],"mappings":"AAeqB,0KAyBN"}
1
+ {"version":3,"file":"calculateShares.d.ts","sourceRoot":"","sources":["calculateShares.js"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,0KAuBC"}
@@ -55,6 +55,6 @@ export function start(zcf: ZCF<{
55
55
  expiration: bigint;
56
56
  underlyingAmount: Amount;
57
57
  }>): Promise<{
58
- creatorInvitation: Promise<Invitation<R, A>>;
58
+ creatorInvitation: Promise<Invitation<unknown, never>>;
59
59
  }>;
60
60
  //# sourceMappingURL=fundedCallSpread.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fundedCallSpread.d.ts","sourceRoot":"","sources":["fundedCallSpread.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;GASG;AACH;kBARiB,MAAM;kBACN,MAAM;sBACF,MAAM;oBACR,cAAc;gBAClB,MAAM;sBACA,MAAM;;;GA8E1B"}
1
+ {"version":3,"file":"fundedCallSpread.d.ts","sourceRoot":"","sources":["fundedCallSpread.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;GASG;AACH;kBARiB,MAAM;kBACN,MAAM;sBACF,MAAM;oBACR,cAAc;gBAClB,MAAM;sBACA,MAAM;;;GA+E1B"}
@@ -7,6 +7,7 @@ import {
7
7
  assertProposalShape,
8
8
  depositToSeat,
9
9
  assertNatAssetKind,
10
+ atomicRearrange,
10
11
  } from '../../contractSupport/index.js';
11
12
  import { makePayoffHandler } from './payoffHandler.js';
12
13
  import { Position } from './position.js';
@@ -111,7 +112,8 @@ const start = async zcf => {
111
112
  give: { Collateral: null },
112
113
  want: { LongOption: null, ShortOption: null },
113
114
  });
114
- zcf.atomicRearrange(
115
+ atomicRearrange(
116
+ zcf,
115
117
  harden([
116
118
  [creatorSeat, collateralSeat, { Collateral: settlementAmount }],
117
119
  [
@@ -1 +1 @@
1
- {"version":3,"file":"payoffHandler.d.ts","sourceRoot":"","sources":["payoffHandler.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,uCALW,IAAI,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC,mBACxB,OAAO,YAAY,EAAC,cAAc,OAAO,CAAC,CAAC,kBAC3C,OAAO,GACL,aAAa,CAgEzB"}
1
+ {"version":3,"file":"payoffHandler.d.ts","sourceRoot":"","sources":["payoffHandler.js"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AACH,uCALW,IAAI,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC,mBACxB,OAAO,YAAY,EAAC,cAAc,OAAO,CAAC,CAAC,kBAC3C,OAAO,GACL,aAAa,CAgEzB"}
@@ -1,4 +1,3 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import './types.js';
3
2
 
4
3
  import { E } from '@endo/eventual-send';
@@ -1,3 +1,5 @@
1
+ /** @type {Make100Percent} */
1
2
  export function make100Percent(brand: Brand<AssetKind>): Ratio;
3
+ /** @type {Make0Percent} */
2
4
  export function make0Percent(brand: Brand<AssetKind>): Ratio;
3
5
  //# sourceMappingURL=percent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["percent.js"],"names":[],"mappings":"AAe+9B,+DAAsE;AAAW,6DAAoE"}
1
+ {"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["percent.js"],"names":[],"mappings":"AAMA,6BAA6B;AAC7B,+DAEC;AAED,2BAA2B;AAC3B,6DAEC"}
@@ -53,13 +53,13 @@ export function start(zcf: ZCF<{
53
53
  }>): {
54
54
  creatorFacet: {
55
55
  makeInvitationPair: (longCollateralShare: any) => {
56
- longInvitation: Promise<Invitation<R, A>>;
57
- shortInvitation: Promise<Invitation<R, A>>;
56
+ longInvitation: Promise<Invitation<unknown, never>>;
57
+ shortInvitation: Promise<Invitation<unknown, never>>;
58
58
  };
59
59
  } & import("@endo/eventual-send").RemotableBrand<{}, {
60
60
  makeInvitationPair: (longCollateralShare: any) => {
61
- longInvitation: Promise<Invitation<R, A>>;
62
- shortInvitation: Promise<Invitation<R, A>>;
61
+ longInvitation: Promise<Invitation<unknown, never>>;
62
+ shortInvitation: Promise<Invitation<unknown, never>>;
63
63
  };
64
64
  }>;
65
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH;kBARiB,OAAO,KAAK,CAAC;kBACb,OAAO,KAAK,CAAC;sBACT,OAAO,KAAK,CAAC;oBACf,cAAc;gBAClB,MAAM;sBACA,OAAO,KAAK,CAAC;;;;;;;;;;;;;EA0GjC"}
1
+ {"version":3,"file":"pricedCallSpread.d.ts","sourceRoot":"","sources":["pricedCallSpread.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH;kBARiB,OAAO,KAAK,CAAC;kBACb,OAAO,KAAK,CAAC;sBACT,OAAO,KAAK,CAAC;oBACf,cAAc;gBAClB,MAAM;sBACA,OAAO,KAAK,CAAC;;;;;;;;;;;;;EA2GjC"}
@@ -1,4 +1,3 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import './types.js';
3
2
 
4
3
  import { makePromiseKit } from '@endo/promise-kit';
@@ -11,6 +10,7 @@ import {
11
10
  assertNatAssetKind,
12
11
  makeRatio,
13
12
  ceilMultiplyBy,
13
+ atomicRearrange,
14
14
  } from '../../contractSupport/index.js';
15
15
  import { makePayoffHandler } from './payoffHandler.js';
16
16
  import { Position } from './position.js';
@@ -132,7 +132,8 @@ const start = zcf => {
132
132
  'wanted option not a match',
133
133
  );
134
134
 
135
- zcf.atomicRearrange(
135
+ atomicRearrange(
136
+ zcf,
136
137
  harden([
137
138
  [collateralSeat, depositSeat, spreadAmount],
138
139
  [depositSeat, collateralSeat, { Collateral: newCollateral }],
@@ -13,11 +13,11 @@
13
13
  * @param {unknown} _privateArgs
14
14
  * @param {import('@agoric/vat-data').Baggage} instanceBaggage
15
15
  */
16
- export function start(zcf: ZCF, _privateArgs: unknown, instanceBaggage: MapStore<string, any>): Promise<{
16
+ export function start(zcf: ZCF, _privateArgs: unknown, instanceBaggage: MapStore<string, unknown>): Promise<{
17
17
  creatorFacet: {
18
- makeInvitation(): Promise<Invitation<R, A>>;
18
+ makeInvitation(): Promise<Invitation<unknown, never>>;
19
19
  } & import("@endo/eventual-send").RemotableBrand<{}, {
20
- makeInvitation(): Promise<Invitation<R, A>>;
20
+ makeInvitation(): Promise<Invitation<unknown, never>>;
21
21
  }>;
22
22
  }>;
23
23
  //# sourceMappingURL=coveredCall-durable.d.ts.map
@@ -59,6 +59,6 @@
59
59
  * @param {ZCF} zcf
60
60
  */
61
61
  export function start(zcf: ZCF): {
62
- creatorInvitation: Promise<Invitation<R, A>>;
62
+ creatorInvitation: Promise<Invitation<unknown, never>>;
63
63
  };
64
64
  //# sourceMappingURL=coveredCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["borrow.js"],"names":[],"mappings":"AAkBA,mCAAmC;AACnC,mCADW,oBAAoB,CAiI7B"}
1
+ {"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["borrow.js"],"names":[],"mappings":"AAmBA,mCAAmC;AACnC,mCADW,oBAAoB,CAkI7B"}
@@ -9,6 +9,7 @@ import {
9
9
  getAmountOut,
10
10
  ceilMultiplyBy,
11
11
  getTimestamp,
12
+ atomicRearrange,
12
13
  } from '../../contractSupport/index.js';
13
14
 
14
15
  import { scheduleLiquidation } from './scheduleLiquidation.js';
@@ -71,7 +72,8 @@ export const makeBorrowInvitation = (zcf, config) => {
71
72
 
72
73
  const { zcfSeat: collateralSeat } = zcf.makeEmptySeatKit();
73
74
 
74
- zcf.atomicRearrange(
75
+ atomicRearrange(
76
+ zcf,
75
77
  harden([
76
78
  // Transfer the wanted Loan amount to the borrower
77
79
  [lenderSeat, borrowerSeat, { Loan: loanWanted }],
@@ -1 +1 @@
1
- {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["close.js"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,sCADW,uBAAuB,CAiDhC"}
1
+ {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["close.js"],"names":[],"mappings":"AAeA,sCAAsC;AACtC,sCADW,uBAAuB,CAkDhC"}
@@ -3,7 +3,10 @@ import './types.js';
3
3
  import { Fail } from '@agoric/assert';
4
4
  import { AmountMath } from '@agoric/ertp';
5
5
 
6
- import { assertProposalShape } from '../../contractSupport/index.js';
6
+ import {
7
+ assertProposalShape,
8
+ atomicRearrange,
9
+ } from '../../contractSupport/index.js';
7
10
 
8
11
  // The debt, the amount which must be repaid, is just the amount
9
12
  // loaned plus interest (aka stability fee). All debt must be repaid
@@ -41,7 +44,8 @@ export const makeCloseLoanInvitation = (zcf, config) => {
41
44
  'Collateral',
42
45
  collateralBrand,
43
46
  );
44
- zcf.atomicRearrange(
47
+ atomicRearrange(
48
+ zcf,
45
49
  harden([
46
50
  [collateralSeat, repaySeat, { Collateral: collateralAmount }],
47
51
  [repaySeat, lenderSeat, { Loan: debt }],
@@ -59,6 +59,6 @@ export function start(zcf: ZCF<{
59
59
  interestRate: Ratio;
60
60
  interestPeriod: bigint;
61
61
  }>): Promise<{
62
- creatorInvitation: Promise<Invitation<R, A>>;
62
+ creatorInvitation: Promise<Invitation<unknown, never>>;
63
63
  }>;
64
64
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,14 @@
1
1
  export function doLiquidation(zcf: any, collateralSeat: any, autoswapPublicFacetP: any, lenderSeat: any, loanBrand: any): Promise<void>;
2
- export function liquidate(zcf: ZCF, config: LoanConfigWithBorrower): Promise<void>;
2
+ /**
3
+ * This function is triggered by the priceAuthority when the value of the
4
+ * collateral is below the mmr. The function performs the
5
+ * liquidation and then shuts down the contract. Note that if a
6
+ * liquidation occurs, the borrower gets nothing and they can take no
7
+ * further action.
8
+ *
9
+ * For simplicity, we will sell all collateral.
10
+ *
11
+ * @type {Liquidate}
12
+ */
13
+ export const liquidate: Liquidate;
3
14
  //# sourceMappingURL=liquidate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"liquidate.d.ts","sourceRoot":"","sources":["liquidate.js"],"names":[],"mappings":"AAKO,wIA6CN;AAeM,+BAJI,GAAG,UACH,sBAAsB,GACpB,QAAQ,IAAI,CAAC,CAiBzB"}
1
+ {"version":3,"file":"liquidate.d.ts","sourceRoot":"","sources":["liquidate.js"],"names":[],"mappings":"AAKO,wIA6CN;AAED;;;;;;;;;;GAUG;AACH,wBAFU,SAAS,CAiBjB"}
@@ -59,9 +59,7 @@ export const doLiquidation = async (
59
59
  *
60
60
  * For simplicity, we will sell all collateral.
61
61
  *
62
- * @param {ZCF} zcf
63
- * @param {LoanConfigWithBorrower} config
64
- * @returns {Promise<void>}
62
+ * @type {Liquidate}
65
63
  */
66
64
  export const liquidate = async (zcf, config) => {
67
65
  const { collateralSeat, autoswapInstance, lenderSeat, loanBrand } = config;
@@ -1 +1 @@
1
- {"version":3,"file":"scheduleLiquidation.d.ts","sourceRoot":"","sources":["scheduleLiquidation.js"],"names":[],"mappings":"AAWA,kCAAkC;AAClC,kCADW,mBAAmB,CAsD5B"}
1
+ {"version":3,"file":"scheduleLiquidation.d.ts","sourceRoot":"","sources":["scheduleLiquidation.js"],"names":[],"mappings":"AAUA,kCAAkC;AAClC,kCADW,mBAAmB,CAsD5B"}
@@ -1,4 +1,3 @@
1
- /* eslint @typescript-eslint/no-floating-promises: "warn" */
2
1
  import { E } from '@endo/eventual-send';
3
2
  import { AmountMath } from '@agoric/ertp';
4
3