@agoric/zoe 0.27.0-u19.2 → 0.27.0-u20.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 (159) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +322 -327
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +29 -29
  4. package/src/cleanProposal.d.ts +2 -0
  5. package/src/cleanProposal.d.ts.map +1 -1
  6. package/src/cleanProposal.js +4 -2
  7. package/src/contractFacet/exit.d.ts +1 -1
  8. package/src/contractFacet/exit.d.ts.map +1 -1
  9. package/src/contractFacet/offerHandlerStorage.d.ts +1 -1
  10. package/src/contractFacet/rightsConservation.d.ts.map +1 -1
  11. package/src/contractFacet/rightsConservation.js +0 -1
  12. package/src/contractFacet/types.d.ts +184 -0
  13. package/src/contractFacet/types.d.ts.map +1 -0
  14. package/src/contractFacet/{types-ambient.d.ts → types.ts} +66 -29
  15. package/src/contractFacet/vatRoot.d.ts +8 -2
  16. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  17. package/src/contractFacet/vatRoot.js +5 -4
  18. package/src/contractFacet/zcfMint.d.ts +3 -2
  19. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  20. package/src/contractFacet/zcfMint.js +7 -7
  21. package/src/contractFacet/zcfSeat.js +2 -2
  22. package/src/contractFacet/zcfZygote.d.ts +9 -1
  23. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  24. package/src/contractFacet/zcfZygote.js +17 -5
  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 +4 -0
  28. package/src/contractSupport/bondingCurves.js +1 -1
  29. package/src/contractSupport/index.d.ts +2 -2
  30. package/src/contractSupport/index.js +2 -19
  31. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  32. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  33. package/src/contractSupport/priceAuthorityInitial.js +3 -1
  34. package/src/contractSupport/types-ambient.d.ts.map +1 -1
  35. package/src/contractSupport/types-ambient.js +1 -0
  36. package/src/contractSupport/zoeHelpers.d.ts +6 -1
  37. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  38. package/src/contractSupport/zoeHelpers.js +1 -0
  39. package/src/contracts/atomicSwap.d.ts +1 -1
  40. package/src/contracts/auction/index.d.ts +3 -3
  41. package/src/contracts/automaticRefund.d.ts +3 -3
  42. package/src/contracts/autoswap.d.ts +4 -0
  43. package/src/contracts/autoswap.d.ts.map +1 -1
  44. package/src/contracts/autoswap.js +4 -0
  45. package/src/contracts/barterExchange.d.ts +2 -2
  46. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  47. package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
  48. package/src/contracts/coveredCall-durable.d.ts +1 -1
  49. package/src/contracts/coveredCall.d.ts +1 -1
  50. package/src/contracts/loan/index.d.ts +1 -1
  51. package/src/contracts/loan/types-ambient.d.ts +13 -13
  52. package/src/contracts/loan/types-ambient.d.ts.map +1 -1
  53. package/src/contracts/loan/types-ambient.js +17 -17
  54. package/src/contracts/mintPayments.d.ts +2 -2
  55. package/src/contracts/oracle.d.ts +3 -0
  56. package/src/contracts/oracle.d.ts.map +1 -1
  57. package/src/contracts/oracle.js +1 -0
  58. package/src/contracts/priceAggregator.d.ts +2 -0
  59. package/src/contracts/priceAggregator.d.ts.map +1 -1
  60. package/src/contracts/priceAggregator.js +10 -8
  61. package/src/contracts/scaledPriceAuthority.d.ts +1 -0
  62. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  63. package/src/contracts/scaledPriceAuthority.js +1 -0
  64. package/src/contracts/sellItems.d.ts +1 -1
  65. package/src/contracts/simpleExchange.d.ts +5 -0
  66. package/src/contracts/simpleExchange.d.ts.map +1 -1
  67. package/src/contracts/simpleExchange.js +4 -0
  68. package/src/contracts/types-ambient.d.ts +7 -7
  69. package/src/contracts/types-ambient.d.ts.map +1 -1
  70. package/src/contracts/types-ambient.js +7 -7
  71. package/src/contracts/valueVow.contract.d.ts +5 -2
  72. package/src/contracts/valueVow.contract.d.ts.map +1 -1
  73. package/src/contracts/valueVow.contract.js +1 -0
  74. package/src/instanceRecordStorage.d.ts.map +1 -1
  75. package/src/instanceRecordStorage.js +3 -1
  76. package/src/internal-types.d.ts +15 -5
  77. package/src/internal-types.d.ts.map +1 -1
  78. package/src/internal-types.js +9 -4
  79. package/src/issuerRecord.d.ts +3 -2
  80. package/src/issuerRecord.d.ts.map +1 -1
  81. package/src/issuerRecord.js +6 -2
  82. package/src/issuerStorage.d.ts +3 -2
  83. package/src/issuerStorage.d.ts.map +1 -1
  84. package/src/issuerStorage.js +6 -5
  85. package/src/typeGuards.d.ts +10 -6
  86. package/src/typeGuards.d.ts.map +1 -1
  87. package/src/typeGuards.js +7 -5
  88. package/src/types-ambient.d.ts +0 -40
  89. package/src/types-ambient.d.ts.map +1 -1
  90. package/src/types-ambient.js +4 -42
  91. package/src/types-index.d.ts +4 -0
  92. package/src/types-index.js +2 -0
  93. package/src/types.d.ts +29 -0
  94. package/src/types.d.ts.map +1 -0
  95. package/src/types.ts +44 -0
  96. package/src/zoeService/feeMint.d.ts +1 -0
  97. package/src/zoeService/feeMint.d.ts.map +1 -1
  98. package/src/zoeService/feeMint.js +4 -0
  99. package/src/zoeService/installationStorage.d.ts +3 -2
  100. package/src/zoeService/installationStorage.d.ts.map +1 -1
  101. package/src/zoeService/installationStorage.js +2 -5
  102. package/src/zoeService/internal-types.d.ts +11 -3
  103. package/src/zoeService/internal-types.d.ts.map +1 -1
  104. package/src/zoeService/internal-types.js +9 -3
  105. package/src/zoeService/invitationQueries.d.ts +3 -3
  106. package/src/zoeService/invitationQueries.js +3 -3
  107. package/src/zoeService/makeInvitation.d.ts +1 -0
  108. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  109. package/src/zoeService/makeInvitation.js +3 -0
  110. package/src/zoeService/offer/offer.d.ts +1 -0
  111. package/src/zoeService/offer/offer.d.ts.map +1 -1
  112. package/src/zoeService/offer/offer.js +3 -1
  113. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  114. package/src/zoeService/originalZoeSeat.js +0 -1
  115. package/src/zoeService/startInstance.d.ts.map +1 -1
  116. package/src/zoeService/startInstance.js +0 -2
  117. package/src/zoeService/types-ambient.d.ts +0 -226
  118. package/src/zoeService/types-ambient.d.ts.map +1 -1
  119. package/src/zoeService/types-ambient.js +4 -327
  120. package/src/zoeService/types.d.ts +238 -0
  121. package/src/zoeService/types.d.ts.map +1 -0
  122. package/src/zoeService/types.ts +307 -0
  123. package/src/zoeService/utils.d.ts +13 -5
  124. package/src/zoeService/utils.test-d.ts +1 -0
  125. package/src/zoeService/zoe.d.ts +11 -1
  126. package/src/zoeService/zoe.d.ts.map +1 -1
  127. package/src/zoeService/zoe.js +8 -1
  128. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  129. package/src/zoeService/zoeSeat.js +1 -2
  130. package/src/zoeService/zoeStorageManager.d.ts +5 -5
  131. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  132. package/src/zoeService/zoeStorageManager.js +4 -3
  133. package/tools/fakeVatAdmin.d.ts +9 -2
  134. package/tools/fakeVatAdmin.d.ts.map +1 -1
  135. package/tools/fakeVatAdmin.js +18 -10
  136. package/tools/manualPriceAuthority.d.ts +4 -1
  137. package/tools/manualPriceAuthority.d.ts.map +1 -1
  138. package/tools/manualPriceAuthority.js +1 -0
  139. package/tools/scriptedOracle.d.ts +6 -2
  140. package/tools/scriptedOracle.d.ts.map +1 -1
  141. package/tools/scriptedOracle.js +4 -0
  142. package/tools/setup-zoe.d.ts +12 -6
  143. package/tools/setup-zoe.d.ts.map +1 -1
  144. package/tools/setup-zoe.js +38 -5
  145. package/tools/test-utils.d.ts +1 -1
  146. package/tools/test-utils.js +1 -1
  147. package/tools/types.d.ts +1 -0
  148. package/tools/types.d.ts.map +1 -1
  149. package/tools/types.js +1 -0
  150. package/src/contractFacet/internal-types.d.ts +0 -8
  151. package/src/contractFacet/internal-types.d.ts.map +0 -1
  152. package/src/contractFacet/internal-types.js +0 -15
  153. package/src/contractFacet/types-ambient.js +0 -1
  154. package/src/contractSupport/ratio.d.ts +0 -37
  155. package/src/contractSupport/ratio.d.ts.map +0 -1
  156. package/src/contractSupport/ratio.js +0 -419
  157. package/src/contractSupport/safeMath.d.ts +0 -11
  158. package/src/contractSupport/safeMath.d.ts.map +0 -1
  159. package/src/contractSupport/safeMath.js +0 -49
@@ -21,8 +21,8 @@ import { makeAllocationMap } from './reallocate.js';
21
21
  import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
22
22
 
23
23
  /**
24
- * @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
25
- * @import {MapStore} from '@agoric/swingset-liveslots';
24
+ * @import {WeakMapStore} from '@agoric/store';
25
+ * @import {TransferPart, ZCFSeat} from '@agoric/zoe';
26
26
  */
27
27
 
28
28
  /**
@@ -1,2 +1,10 @@
1
- export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<"set">, testJigSetter: TestJigSetter, contractBundleCap: BundleCap, zcfBaggage?: import("@agoric/vat-data").Baggage): Promise<ZCFZygote>;
1
+ export function makeZCFZygote(powers: VatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<"set">, testJigSetter: ({ zcf }: {
2
+ zcf: ZCF;
3
+ }) => void, contractBundleCap: BundleCap, zcfBaggage?: import("@agoric/vat-data").Baggage): Promise<ZCFZygote>;
4
+ export type ZCFZygote = {
5
+ startContract: (instanceAdminFromZoe: ERef<ZoeInstanceAdmin>, instanceRecordFromZoe: InstanceRecord, issuerStorageFromZoe: IssuerRecords, privateArgs?: object) => Promise<ExecuteContractResult>;
6
+ restartContract: (privateArgs?: object) => void;
7
+ };
8
+ import type { ZoeService } from '@agoric/zoe';
9
+ import type { ZCF } from '@agoric/zoe';
2
10
  //# sourceMappingURL=zcfZygote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"AAiDO,sCARI,SAAS,cACT,IAAI,CAAC,UAAU,CAAC,oBAChB,MAAM,CAAC,KAAK,CAAC,iBACb,aAAa,qBACb,SAAS,eACT,OAAO,kBAAkB,EAAE,OAAO,GAChC,OAAO,CAAC,SAAS,CAAC,CAod9B"}
1
+ {"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"AA6DO,sCARI,SAAS,cACT,IAAI,CAAC,UAAU,CAAC,oBAChB,MAAM,CAAC,KAAK,CAAC,iBACb,CAAE,EAAC,GAAG,EAAC,EAAE;IAAC,GAAG,EAAE,GAAG,CAAA;CAAC,KAAM,IAAI,qBAC7B,SAAS,eACT,OAAO,kBAAkB,EAAE,OAAO,GAChC,OAAO,CAAC,SAAS,CAAC,CAod9B;;mBAvea,CAAC,oBAAoB,EAAE,IAAI,CAAC,gBAAgB,CAAC,EACpD,qBAAqB,EAAE,cAAc,EACrC,oBAAoB,EAAE,aAAa,EACnC,WAAW,CAAC,EAAE,MAAM,KACnB,OAAO,CAAC,qBAAqB,CAAC;qBACxB,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI;;gCAV8D,aAAa;yBAAb,aAAa"}
@@ -30,9 +30,21 @@ import { prepareZcMint } from './zcfMint.js';
30
30
  import { ZcfI } from './typeGuards.js';
31
31
 
32
32
  /// <reference path="../internal-types.js" />
33
- /// <reference path="./internal-types.js" />
34
33
 
35
- /** @import {IssuerOptionsRecord} from '@agoric/ertp' */
34
+ /**
35
+ * @import {IssuerOptionsRecord} from '@agoric/ertp';
36
+ * @import {ContractMeta, ContractStartFn, SetTestJig, ZCF, ZCFMint, ZCFRegisterFeeMint, ZoeService} from '@agoric/zoe';
37
+ */
38
+
39
+ /**
40
+ * @typedef ZCFZygote
41
+ * @property {(instanceAdminFromZoe: ERef<ZoeInstanceAdmin>,
42
+ * instanceRecordFromZoe: InstanceRecord,
43
+ * issuerStorageFromZoe: IssuerRecords,
44
+ * privateArgs?: object,
45
+ * ) => Promise<ExecuteContractResult>} startContract
46
+ * @property {(privateArgs?: object) => void} restartContract
47
+ */
36
48
 
37
49
  /**
38
50
  * Make the ZCF vat in zygote-usable form. First, a generic ZCF is
@@ -42,7 +54,7 @@ import { ZcfI } from './typeGuards.js';
42
54
  * @param {VatPowers} powers
43
55
  * @param {ERef<ZoeService>} zoeService
44
56
  * @param {Issuer<'set'>} invitationIssuer
45
- * @param {TestJigSetter} testJigSetter
57
+ * @param {( {zcf}: {zcf: ZCF} ) => void} testJigSetter
46
58
  * @param {BundleCap} contractBundleCap
47
59
  * @param {import('@agoric/vat-data').Baggage} zcfBaggage
48
60
  * @returns {Promise<ZCFZygote>}
@@ -92,7 +104,7 @@ export const makeZCFZygote = async (
92
104
 
93
105
  /**
94
106
  * @param {string} keyword
95
- * @param {IssuerRecord} issuerRecord
107
+ * @param {ZoeIssuerRecord} issuerRecord
96
108
  */
97
109
  const recordIssuer = (keyword, issuerRecord) => {
98
110
  getInstanceRecHolder().addIssuer(keyword, issuerRecord);
@@ -238,7 +250,7 @@ export const makeZCFZygote = async (
238
250
  } else {
239
251
  bundle = contractBundleCap;
240
252
  }
241
- return evalContractBundle(bundle);
253
+ return /** @type {any} */ (evalContractBundle(bundle));
242
254
  };
243
255
  // evaluate the contract (either the first version, or an upgrade)
244
256
  const bundleResult = await evaluateContract();
@@ -1,6 +1,12 @@
1
+ /**
2
+ * @import {TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
3
+ */
1
4
  export const TransferPartShape: import("@endo/patterns").Matcher;
2
5
  export function atomicRearrange(zcf: ZCF, transfers: TransferPart[]): void;
3
6
  export function fromOnly(fromSeat: ZCFSeat, fromAmounts: AmountKeywordRecord): TransferPart;
4
7
  export function toOnly(toSeat: ZCFSeat, toAmounts: AmountKeywordRecord): TransferPart;
5
8
  export function atomicTransfer(zcf: ZCF, fromSeat?: ZCFSeat, toSeat?: ZCFSeat, fromAmounts?: AmountKeywordRecord, toAmounts?: AmountKeywordRecord): void;
9
+ import type { ZCF } from '@agoric/zoe';
10
+ import type { TransferPart } from '@agoric/zoe';
11
+ import type { ZCFSeat } from '@agoric/zoe';
6
12
  //# sourceMappingURL=atomicTransfer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"AAGA,iEAGE;AAyCK,qCAHI,GAAG,aACH,YAAY,EAAE,QAIxB;AAcM,mCAJI,OAAO,eACP,mBAAmB,GACjB,YAAY,CAGmB;AAcrC,+BAJI,OAAO,aACP,mBAAmB,GACjB,YAAY,CAG0B;AAW5C,oCANI,GAAG,aACH,OAAO,WACP,OAAO,gBACP,mBAAmB,cACnB,mBAAmB,QAQgD"}
1
+ {"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH,iEAGE;AAyCK,qCAHI,GAAG,aACH,YAAY,EAAE,QAIxB;AAcM,mCAJI,OAAO,eACP,mBAAmB,GACjB,YAAY,CAGmB;AAcrC,+BAJI,OAAO,aACP,mBAAmB,GACjB,YAAY,CAG0B;AAW5C,oCANI,GAAG,aACH,OAAO,WACP,OAAO,gBACP,mBAAmB,cACnB,mBAAmB,QAQgD;yBAhGjC,aAAa;kCAAb,aAAa;6BAAb,aAAa"}
@@ -1,6 +1,10 @@
1
1
  import { M } from '@agoric/store';
2
2
  import { AmountKeywordRecordShape, SeatShape } from '../typeGuards.js';
3
3
 
4
+ /**
5
+ * @import {TransferPart, ZCF, ZCFSeat} from '@agoric/zoe';
6
+ */
7
+
4
8
  export const TransferPartShape = M.splitArray(
5
9
  harden([M.opt(SeatShape), M.opt(SeatShape), M.opt(AmountKeywordRecordShape)]),
6
10
  harden([M.opt(AmountKeywordRecordShape)]),
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { Nat } from '@endo/nat';
4
4
  import { Fail } from '@endo/errors';
5
- import { natSafeMath } from './safeMath.js';
5
+ import { natSafeMath } from '@agoric/ertp/src/safeMath.js';
6
6
 
7
7
  const { subtract, add, multiply, floorDivide } = natSafeMath;
8
8
 
@@ -1,5 +1,6 @@
1
- export { natSafeMath } from "./safeMath.js";
1
+ export { natSafeMath } from "@agoric/ertp/src/safeMath.js";
2
2
  export { makeStateMachine } from "./stateMachine.js";
3
+ export * from "@agoric/ertp/src/ratio.js";
3
4
  export * from "./durability.js";
4
5
  export * from "./prepare-ownable.js";
5
6
  export * from "./priceAuthority.js";
@@ -10,5 +11,4 @@ export * from "./topics.js";
10
11
  export { getInputPrice, getOutputPrice, calcLiqValueToMint, calcValueToRemove, calcSecondaryRequired } from "./bondingCurves.js";
11
12
  export { atomicRearrange, atomicTransfer, fromOnly, toOnly } from "./atomicTransfer.js";
12
13
  export { defaultAcceptanceMsg, swap, fitProposalShape, assertProposalShape, assertIssuerKeywords, satisfies, assertNatAssetKind, swapExact, depositToSeat, withdrawFromSeat, saveAllIssuers, offerTo } from "./zoeHelpers.js";
13
- export { makeRatio, makeRatioFromAmounts, floorMultiplyBy, floorDivideBy, ceilMultiplyBy, ceilDivideBy, assertIsRatio, invertRatio, oneMinus, addRatios, multiplyRatios, ratiosSame, quantize, ratioGTE, subtractRatios, ratioToNumber } from "./ratio.js";
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -8,7 +8,7 @@ export {
8
8
  calcSecondaryRequired,
9
9
  } from './bondingCurves.js';
10
10
 
11
- export { natSafeMath } from './safeMath.js';
11
+ export { natSafeMath } from '@agoric/ertp/src/safeMath.js';
12
12
 
13
13
  export { makeStateMachine } from './stateMachine.js';
14
14
 
@@ -34,24 +34,7 @@ export {
34
34
  offerTo,
35
35
  } from './zoeHelpers.js';
36
36
 
37
- export {
38
- makeRatio,
39
- makeRatioFromAmounts,
40
- floorMultiplyBy,
41
- floorDivideBy,
42
- ceilMultiplyBy,
43
- ceilDivideBy,
44
- assertIsRatio,
45
- invertRatio,
46
- oneMinus,
47
- addRatios,
48
- multiplyRatios,
49
- ratiosSame,
50
- quantize,
51
- ratioGTE,
52
- subtractRatios,
53
- ratioToNumber,
54
- } from './ratio.js';
37
+ export * from '@agoric/ertp/src/ratio.js';
55
38
 
56
39
  export * from './durability.js';
57
40
  export * from './prepare-ownable.js';
@@ -1,4 +1,6 @@
1
1
  export function makeInitialTransform(priceOutPerIn: Ratio, priceAuthority: PriceAuthority, quoteMint: ERef<Mint<"set", PriceDescription>>, brandIn: Brand<"nat">, brandOut: Brand<"nat">): PriceAuthority;
2
2
  import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
3
3
  import type { PriceDescription } from '@agoric/zoe/tools/types.js';
4
+ import type { Mint } from '@agoric/ertp';
5
+ import type { Brand } from '@agoric/ertp';
4
6
  //# sourceMappingURL=priceAuthorityInitial.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA6BO,oDAPI,KAAK,kBACL,cAAc,aACd,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,WACnC,KAAK,CAAC,KAAK,CAAC,YACZ,KAAK,CAAC,KAAK,CAAC,GACV,cAAc,CAyF1B;oCAvG4F,4BAA4B;sCAA5B,4BAA4B"}
1
+ {"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA+BO,oDAPI,KAAK,kBACL,cAAc,aACd,IAAI,CAAC,KAAK,KAAK,EAAE,gBAAgB,CAAC,CAAC,WACnC,MAAM,KAAK,CAAC,YACZ,MAAM,KAAK,CAAC,GACV,cAAc,CAyF1B;oCAvG4F,4BAA4B;sCAA5B,4BAA4B;0BAFnF,cAAc;2BAAd,cAAc"}
@@ -7,10 +7,12 @@ import { Far } from '@endo/marshal';
7
7
  import { makeNotifier } from '@agoric/notifier';
8
8
  import { AmountMath } from '@agoric/ertp';
9
9
 
10
- import { multiplyBy } from './ratio.js';
10
+ import { multiplyBy } from '@agoric/ertp/src/ratio.js';
11
11
  import { mintQuote } from './priceAuthorityTransform.js';
12
12
 
13
13
  /**
14
+ * @import {Amount, Brand, Mint} from '@agoric/ertp';
15
+ * @import {Notifier} from '@agoric/notifier';
14
16
  * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
15
17
  */
16
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";UAMc,OAAO;;;;;WACP,mBAAmB;;;;;;;;YAEnB,mBAAmB;;;;;;;;;;;;;;;kBAqBtB,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;;;;;;;uBAcR,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;4BAIN,MAAM,CAAC,OAAO,EAAC,OAAO,CAAC;;;;;;qEAYvB,oBAAoB;;;;;;;mCAWtB,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,SAAS,kBAC7E,oBAAoB;;eAKjB,MAAM,CAAC,KAAK,CAAC;iBACb,MAAM,CAAC,KAAK,CAAC;;4BAKhB,MAAM,CAAC,KAAK,CAAC,SACb,KAAK,KACH,MAAM,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";UAOc,OAAO;;;;;WACP,mBAAmB;;;;;;;;YAEnB,mBAAmB;;;;;;;;;;;;;;;kBAqBtB,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;;;;;;;uBAcR,GAAG,YACH,OAAO,aACP,OAAO,KACL,MAAM;;;;4BAIN,MAAM,CAAC,OAAO,EAAC,OAAO,CAAC;;;;;;qEAYvB,oBAAoB;;;;;;;mCAWtB,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,SAAS,kBAC7E,oBAAoB;;eAKjB,MAAM,CAAC,KAAK,CAAC;iBACb,MAAM,CAAC,KAAK,CAAC;;4BAKhB,MAAM,CAAC,KAAK,CAAC,SACb,KAAK,KACH,MAAM,CAAC,KAAK,CAAC"}
@@ -1,6 +1,7 @@
1
1
  // @jessie-check
2
2
 
3
3
  /// <reference types="ses" />
4
+ /// <reference types="@agoric/zoe/exported" />
4
5
 
5
6
  /**
6
7
  * @typedef {object} SeatGainsLossesRecord
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * @import {Pattern} from '@endo/patterns';
3
+ * @import {ContractMeta, Invitation, Proposal, ZCF, ZCFSeat} from '@agoric/zoe';
3
4
  */
4
5
  export const defaultAcceptanceMsg: "The offer has been accepted. Once the contract has been completed, please check your payout";
5
6
  export function assertIssuerKeywords(zcf: any, expected: any): void;
@@ -14,7 +15,7 @@ export function assertNatAssetKind(zcf: any, brand: any): void;
14
15
  export const depositToSeatSuccessMsg: "Deposit and reallocation successful.";
15
16
  export function depositToSeat(zcf: ZCF, recipientSeat: ZCFSeat, amounts: AmountKeywordRecord, payments: PaymentPKeywordRecord): Promise<string>;
16
17
  export function withdrawFromSeat(zcf: ZCF, seat: ZCFSeat, amounts: AmountKeywordRecord): Promise<PaymentPKeywordRecord>;
17
- export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(IssuerRecord<any, import("@endo/patterns").Key> | undefined)[]>;
18
+ export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(ZoeIssuerRecord<any, import("@endo/patterns").Key> | undefined)[]>;
18
19
  /** @type {MapKeywords} */
19
20
  export const mapKeywords: MapKeywords;
20
21
  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, offerArgs?: Args): Promise<{
@@ -30,5 +31,9 @@ export type ExpectedRecord = {
30
31
  give?: Record<string, null> | undefined;
31
32
  exit?: Partial<Record<never, null>> | undefined;
32
33
  };
34
+ import type { ZCFSeat } from '@agoric/zoe';
33
35
  import type { Pattern } from '@endo/patterns';
36
+ import type { ZCF } from '@agoric/zoe';
37
+ import type { Invitation } from '@agoric/zoe';
38
+ import type { Proposal } from '@agoric/zoe';
34
39
  //# sourceMappingURL=zoeHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA;;GAEG;AAEH,iIAAkI;AAI3H,oEAON;AAuBM,oCALI,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,QA8BxB;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,WAGP,OAAO,cAIP,IAAI,GAGF,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAAC,SAA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9,7 @@ import { atomicTransfer, fromOnly, toOnly } from './atomicTransfer.js';
9
9
 
10
10
  /**
11
11
  * @import {Pattern} from '@endo/patterns';
12
+ * @import {ContractMeta, Invitation, Proposal, ZCF, ZCFSeat} from '@agoric/zoe';
12
13
  */
13
14
 
14
15
  export const defaultAcceptanceMsg = `The offer has been accepted. Once the contract has been completed, please check your payout`;
@@ -11,6 +11,6 @@
11
11
  * @param {ZCF} zcf
12
12
  */
13
13
  export function start(zcf: ZCF): {
14
- creatorInvitation: Promise<Invitation<unknown, never>>;
14
+ creatorInvitation: Promise<globalThis.Invitation<unknown, never>>;
15
15
  };
16
16
  //# sourceMappingURL=atomicSwap.d.ts.map
@@ -26,8 +26,8 @@ export function start(zcf: ZCF<{
26
26
  winnerPriceOption?: "first-price" | "second-price";
27
27
  bidDuration: bigint;
28
28
  }>): {
29
- creatorInvitation: Promise<Invitation<{
30
- makeBidInvitation: () => Promise<Invitation<unknown, never>>;
29
+ creatorInvitation: Promise<globalThis.Invitation<{
30
+ makeBidInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
31
31
  getSessionDetails: () => {
32
32
  auctionedAssets: any;
33
33
  minimumBid: any;
@@ -38,7 +38,7 @@ export function start(zcf: ZCF<{
38
38
  bids: string | any[];
39
39
  };
40
40
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
41
- makeBidInvitation: () => Promise<Invitation<unknown, never>>;
41
+ makeBidInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
42
42
  getSessionDetails: () => {
43
43
  auctionedAssets: any;
44
44
  minimumBid: any;
@@ -13,13 +13,13 @@
13
13
  * @param {ZCF<{}>} zcf
14
14
  */
15
15
  export function start(zcf: ZCF<{}>): {
16
- creatorInvitation: Promise<Invitation<unknown, never>>;
16
+ creatorInvitation: Promise<globalThis.Invitation<unknown, never>>;
17
17
  publicFacet: {
18
18
  getOffersCount: () => bigint;
19
- makeInvitation: () => Promise<Invitation<unknown, never>>;
19
+ makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
20
20
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
21
21
  getOffersCount: () => bigint;
22
- makeInvitation: () => Promise<Invitation<unknown, never>>;
22
+ makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
23
23
  }>;
24
24
  };
25
25
  //# sourceMappingURL=automaticRefund.d.ts.map
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @import {OfferHandler, ZCF} from '@agoric/zoe';
3
+ */
1
4
  /**
2
5
  * Autoswap is a rewrite of Uniswap. Please see the documentation for
3
6
  * more https://agoric.com/documentation/zoe/guide/contracts/autoswap.html
@@ -40,4 +43,5 @@
40
43
  export function start(zcf: ZCF): Promise<{
41
44
  publicFacet: AutoswapPublicFacet;
42
45
  }>;
46
+ import type { ZCF } from '@agoric/zoe';
43
47
  //# sourceMappingURL=autoswap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAwVb"}
1
+ {"version":3,"file":"autoswap.d.ts","sourceRoot":"","sources":["autoswap.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,2BAFW,GAAG;;GAwVb;yBAhYmC,aAAa"}
@@ -13,6 +13,10 @@ import {
13
13
  calcSecondaryRequired,
14
14
  } from '../contractSupport/index.js';
15
15
 
16
+ /**
17
+ * @import {OfferHandler, ZCF} from '@agoric/zoe';
18
+ */
19
+
16
20
  /**
17
21
  * Autoswap is a rewrite of Uniswap. Please see the documentation for
18
22
  * more https://agoric.com/documentation/zoe/guide/contracts/autoswap.html
@@ -14,9 +14,9 @@
14
14
  */
15
15
  export function start(zcf: ZCF): {
16
16
  publicFacet: {
17
- makeInvitation: () => Promise<Invitation<unknown, never>>;
17
+ makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
18
18
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
19
- makeInvitation: () => Promise<Invitation<unknown, never>>;
19
+ makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
20
20
  }>;
21
21
  };
22
22
  //# sourceMappingURL=barterExchange.d.ts.map
@@ -58,7 +58,7 @@ export function start(zcf: ZCF<{
58
58
  expiration: bigint;
59
59
  underlyingAmount: Amount;
60
60
  }>): Promise<{
61
- creatorInvitation: Promise<Invitation<unknown, never>>;
61
+ creatorInvitation: Promise<globalThis.Invitation<unknown, never>>;
62
62
  }>;
63
63
  import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
64
64
  //# sourceMappingURL=fundedCallSpread.d.ts.map
@@ -53,13 +53,13 @@ export function start(zcf: ZCF<{
53
53
  }>): {
54
54
  creatorFacet: {
55
55
  makeInvitationPair: (longCollateralShare: any) => {
56
- longInvitation: Promise<Invitation<unknown, never>>;
57
- shortInvitation: Promise<Invitation<unknown, never>>;
56
+ longInvitation: Promise<globalThis.Invitation<unknown, never>>;
57
+ shortInvitation: Promise<globalThis.Invitation<unknown, never>>;
58
58
  };
59
59
  } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
60
60
  makeInvitationPair: (longCollateralShare: any) => {
61
- longInvitation: Promise<Invitation<unknown, never>>;
62
- shortInvitation: Promise<Invitation<unknown, never>>;
61
+ longInvitation: Promise<globalThis.Invitation<unknown, never>>;
62
+ shortInvitation: Promise<globalThis.Invitation<unknown, never>>;
63
63
  };
64
64
  }>;
65
65
  };
@@ -15,7 +15,7 @@
15
15
  */
16
16
  export function start(zcf: ZCF, _privateArgs: unknown, instanceBaggage: import("@agoric/vat-data").Baggage): Promise<{
17
17
  creatorFacet: import("@endo/exo").Guarded<{
18
- makeInvitation(): Promise<Invitation<unknown, never>>;
18
+ makeInvitation(): Promise<globalThis.Invitation<unknown, never>>;
19
19
  }>;
20
20
  }>;
21
21
  //# 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<unknown, never>>;
62
+ creatorInvitation: Promise<globalThis.Invitation<unknown, never>>;
63
63
  };
64
64
  //# sourceMappingURL=coveredCall.d.ts.map
@@ -62,7 +62,7 @@ export function start(zcf: ZCF<{
62
62
  interestRate: Ratio;
63
63
  interestPeriod: bigint;
64
64
  }>): Promise<{
65
- creatorInvitation: Promise<Invitation<unknown, undefined>>;
65
+ creatorInvitation: Promise<globalThis.Invitation<unknown, undefined>>;
66
66
  }>;
67
67
  import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
68
68
  //# sourceMappingURL=index.d.ts.map
@@ -39,7 +39,7 @@ type LenderSeatProperty = {
39
39
  /**
40
40
  * The ZCFSeat representing the lender's position in the contract.
41
41
  */
42
- lenderSeat: ZCFSeat;
42
+ lenderSeat: import("../../types-index").ZCFSeat;
43
43
  };
44
44
  /**
45
45
  * The loan now has a lenderSeat, which is added to the config.
@@ -50,7 +50,7 @@ type BorrowerConfigProperties = {
50
50
  * The ZCFSeat holding the collateral in escrow after the borrower
51
51
  * escrows it
52
52
  */
53
- collateralSeat: ZCFSeat;
53
+ collateralSeat: import("../../types-index").ZCFSeat;
54
54
  /**
55
55
  * A function to get the current debt
56
56
  */
@@ -66,7 +66,7 @@ type BorrowerConfigPropertiesMinusDebt = {
66
66
  * The ZCFSeat holding the collateral in escrow after the borrower
67
67
  * escrows it
68
68
  */
69
- collateralSeat: ZCFSeat;
69
+ collateralSeat: import("../../types-index").ZCFSeat;
70
70
  /**
71
71
  * PromiseKit that includes a promise that resolves to a PriceQuote
72
72
  * when liquidation is triggered
@@ -78,15 +78,15 @@ type BorrowerConfigPropertiesMinusDebt = {
78
78
  */
79
79
  type LoanConfigWithBorrower = LoanConfigWithLender & BorrowerConfigProperties;
80
80
  type LoanConfigWithBorrowerMinusDebt = LoanConfigWithLender & BorrowerConfigPropertiesMinusDebt;
81
- type ScheduleLiquidation = (zcf: ZCF, config: LoanConfigWithBorrower) => any;
82
- type MakeLendInvitation = (zcf: ZCF, config: LoanTerms) => Promise<Invitation>;
83
- type MakeBorrowInvitation = (zcf: ZCF, config: LoanConfigWithLender) => Promise<Invitation>;
84
- type MakeCloseLoanInvitation = (zcf: ZCF, config: LoanConfigWithBorrower) => Promise<Invitation>;
81
+ type ScheduleLiquidation = (zcf: import("../../types-index").ZCF, config: LoanConfigWithBorrower) => any;
82
+ type MakeLendInvitation = (zcf: import("../../types-index").ZCF, config: LoanTerms) => Promise<import("../../types-index").Invitation>;
83
+ type MakeBorrowInvitation = (zcf: import("../../types-index").ZCF, config: LoanConfigWithLender) => Promise<import("../../types-index").Invitation>;
84
+ type MakeCloseLoanInvitation = (zcf: import("../../types-index").ZCF, config: LoanConfigWithBorrower) => Promise<import("../../types-index").Invitation>;
85
85
  /**
86
86
  * Allows holder to add collateral to the contract. Exits the seat
87
87
  * after adding.
88
88
  */
89
- type MakeAddCollateralInvitation = (zcf: ZCF, config: LoanConfigWithBorrower) => Promise<Invitation>;
89
+ type MakeAddCollateralInvitation = (zcf: import("../../types-index").ZCF, config: LoanConfigWithBorrower) => Promise<import("../../types-index").Invitation>;
90
90
  type MakeDebtCalculator = (debtCalculatorConfig: DebtCalculatorConfig) => any;
91
91
  type CalcInterestFn = (oldDebt: Amount<"nat">, interestRate: Ratio) => Amount<"nat">;
92
92
  type DebtCalculatorConfig = {
@@ -108,7 +108,7 @@ type DebtCalculatorConfig = {
108
108
  * the period at which the outstanding debt increases by the interestRate
109
109
  */
110
110
  interestPeriod: import("@agoric/time").RelativeTime;
111
- zcf: ZCF;
111
+ zcf: import("../../types-index").ZCF;
112
112
  configMinusGetDebt: LoanConfigWithBorrowerMinusDebt;
113
113
  /**
114
114
  * The starting point from which to calculate
@@ -117,7 +117,7 @@ type DebtCalculatorConfig = {
117
117
  basetime: import("@agoric/time").Timestamp;
118
118
  };
119
119
  type ConfigMinusGetDebt = {
120
- collateralSeat: ZCFSeat;
120
+ collateralSeat: import("../../types-index").ZCFSeat;
121
121
  liquidationPromiseKit: PromiseRecord<any>;
122
122
  mmr?: bigint | undefined;
123
123
  autoswapInstance: Handle<"Instance">;
@@ -125,18 +125,18 @@ type ConfigMinusGetDebt = {
125
125
  periodNotifier: PeriodNotifier;
126
126
  interestRate: bigint;
127
127
  interestPeriod: import("@agoric/time").RelativeTime;
128
- lenderSeat: ZCFSeat;
128
+ lenderSeat: import("../../types-index").ZCFSeat;
129
129
  };
130
130
  type BorrowFacet = {
131
131
  /**
132
132
  * Make an invitation to close the loan by repaying the debt
133
133
  * (including interest).
134
134
  */
135
- makeCloseLoanInvitation: () => Promise<Invitation>;
135
+ makeCloseLoanInvitation: () => Promise<import("../../types-index").Invitation>;
136
136
  /**
137
137
  * Make an invitation to add collateral to protect against liquidation
138
138
  */
139
- makeAddCollateralInvitation: () => Promise<Invitation>;
139
+ makeAddCollateralInvitation: () => Promise<import("../../types-index").Invitation>;
140
140
  /**
141
141
  * Get a promise for a priceQuote that will resolve if liquidation
142
142
  * occurs. The priceQuote is for the value of the collateral that
@@ -1 +1 @@
1
- {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;;;;;sBACa,QAAQ,CAAC,OAAO,cAAc,EAAE,eAAe,CAAC;;;;;;;wBAUhD,QAAQ;;;;;;SAUP,KAAK;sBAGL,gBAAgB;;;;;oBAEhB,OAAO,yBAAyB,EAAE,cAAc;oBAKhD,cAAc;;;;;kBAEd,KAAK;oBAIL,OAAO,cAAc,EAAE,YAAY;eAEnC,KAAK;qBACL,KAAK;;;;;;gBAKL,OAAO;;;;;4BAMR,SAAS,GAAG,kBAAkB;;;;;;oBAQ7B,O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;;;;oBAKZ,cAAc;;;;kBAKd,MAAM,CAAC,KAAK,CAAC;;;;oBAIb,cAAc;kBAId,KAAK;;;;oBACL,OAAO,cAAc,EAAE,YAAY;SAInC,OAAO,mBAAmB,EAAE,GAAG;wBAE/B,+BAA+B;;;;;cAC/B,OAAO,cAAc,EAAE,SAAS;;;oBAMhC,OAAO,mBAAmB,EAAE,OAAO;2BACnC,aAAa,CAAC,GAAG,CAAC;;sBAElB,MAAM,CAAC,UAAU,CAAC;oBAClB,OAAO,yBAAyB,EAAE,cAAc;oBAChD,cAAc;kBACd,MAAM;oBACN,OAAO,cAAc,EAAE,YAAY;gBACnC,OAAO,mBAAmB,EAAE,OAAO;;;;;;;6BAMnC,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;iCAKrD,MAAM,OAAO,CAAC,OAAO,mBAAmB,EAAE,UAAU,CAAC;;;;;;;2BAIrD,MAAM,OAAO,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC;;;;iCAO3D,MAAM,OAAO,cAAc,EAAE,SAAS;;;;;qBAItC,MAAM,QAAQ,CAAC,MAAM,CAAC;;;;+BAKtB,MAAM,MAAM"}
@@ -43,7 +43,7 @@
43
43
 
44
44
  /**
45
45
  * @typedef LenderSeatProperty
46
- * @property {ZCFSeat} lenderSeat
46
+ * @property {import('../../types-index').ZCFSeat} lenderSeat
47
47
  *
48
48
  * The ZCFSeat representing the lender's position in the contract.
49
49
  */
@@ -57,7 +57,7 @@
57
57
  /**
58
58
  * @typedef BorrowerConfigProperties
59
59
  *
60
- * @property {ZCFSeat} collateralSeat
60
+ * @property {import('../../types-index').ZCFSeat} collateralSeat
61
61
  *
62
62
  * The ZCFSeat holding the collateral in escrow after the borrower
63
63
  * escrows it
@@ -75,7 +75,7 @@
75
75
  /**
76
76
  * @typedef BorrowerConfigPropertiesMinusDebt
77
77
  *
78
- * @property {ZCFSeat} collateralSeat
78
+ * @property {import('../../types-index').ZCFSeat} collateralSeat
79
79
  *
80
80
  * The ZCFSeat holding the collateral in escrow after the borrower
81
81
  * escrows it
@@ -99,29 +99,29 @@
99
99
 
100
100
  /**
101
101
  * @callback ScheduleLiquidation
102
- * @param {ZCF} zcf
102
+ * @param {import('../../types-index').ZCF} zcf
103
103
  * @param {LoanConfigWithBorrower} config
104
104
  */
105
105
 
106
106
  /**
107
107
  * @callback MakeLendInvitation
108
- * @param {ZCF} zcf
108
+ * @param {import('../../types-index').ZCF} zcf
109
109
  * @param {LoanTerms} config
110
- * @returns {Promise<Invitation>} lendInvitation
110
+ * @returns {Promise<import('../../types-index').Invitation>} lendInvitation
111
111
  */
112
112
 
113
113
  /**
114
114
  * @callback MakeBorrowInvitation
115
- * @param {ZCF} zcf
115
+ * @param {import('../../types-index').ZCF} zcf
116
116
  * @param {LoanConfigWithLender} config
117
- * @returns {Promise<Invitation>} borrowInvitation
117
+ * @returns {Promise<import('../../types-index').Invitation>} borrowInvitation
118
118
  */
119
119
 
120
120
  /**
121
121
  * @callback MakeCloseLoanInvitation
122
- * @param {ZCF} zcf
122
+ * @param {import('../../types-index').ZCF} zcf
123
123
  * @param {LoanConfigWithBorrower} config
124
- * @returns {Promise<Invitation>} closeLoanInvitation
124
+ * @returns {Promise<import('../../types-index').Invitation>} closeLoanInvitation
125
125
  */
126
126
 
127
127
  /**
@@ -129,9 +129,9 @@
129
129
  * after adding.
130
130
  *
131
131
  * @callback MakeAddCollateralInvitation
132
- * @param {ZCF} zcf
132
+ * @param {import('../../types-index').ZCF} zcf
133
133
  * @param {LoanConfigWithBorrower} config
134
- * @returns {Promise<Invitation>} addCollateralInvitation
134
+ * @returns {Promise<import('../../types-index').Invitation>} addCollateralInvitation
135
135
  */
136
136
 
137
137
  /**
@@ -166,7 +166,7 @@
166
166
  *
167
167
  * the period at which the outstanding debt increases by the interestRate
168
168
  *
169
- * @property {ZCF} zcf
169
+ * @property {import('../../types-index').ZCF} zcf
170
170
  *
171
171
  * @property {LoanConfigWithBorrowerMinusDebt} configMinusGetDebt
172
172
  * @property {import('@agoric/time').Timestamp} basetime The starting point from which to calculate
@@ -175,7 +175,7 @@
175
175
 
176
176
  /**
177
177
  * @typedef {object} ConfigMinusGetDebt
178
- * @property {ZCFSeat} collateralSeat
178
+ * @property {import('../../types-index').ZCFSeat} collateralSeat
179
179
  * @property {PromiseRecord<any>} liquidationPromiseKit
180
180
  * @property {bigint} [mmr]
181
181
  * @property {Handle<'Instance'>} autoswapInstance
@@ -183,18 +183,18 @@
183
183
  * @property {PeriodNotifier} periodNotifier
184
184
  * @property {bigint} interestRate
185
185
  * @property {import('@agoric/time').RelativeTime} interestPeriod
186
- * @property {ZCFSeat} lenderSeat
186
+ * @property {import('../../types-index').ZCFSeat} lenderSeat
187
187
  */
188
188
 
189
189
  /**
190
190
  * @typedef {object} BorrowFacet
191
191
  *
192
- * @property {() => Promise<Invitation>} makeCloseLoanInvitation
192
+ * @property {() => Promise<import('../../types-index').Invitation>} makeCloseLoanInvitation
193
193
  *
194
194
  * Make an invitation to close the loan by repaying the debt
195
195
  * (including interest).
196
196
  *
197
- * @property {() => Promise<Invitation>} makeAddCollateralInvitation
197
+ * @property {() => Promise<import('../../types-index').Invitation>} makeAddCollateralInvitation
198
198
  *
199
199
  * Make an invitation to add collateral to protect against liquidation
200
200
  *