@agoric/zoe 0.27.0-u19.2 → 0.27.0-u21.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 (170) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +281 -281
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +36 -35
  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 +9 -3
  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.d.ts +3 -1
  22. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  23. package/src/contractFacet/zcfSeat.js +6 -4
  24. package/src/contractFacet/zcfZygote.d.ts +8 -1
  25. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  26. package/src/contractFacet/zcfZygote.js +20 -8
  27. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  28. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  29. package/src/contractSupport/atomicTransfer.js +4 -0
  30. package/src/contractSupport/bondingCurves.js +1 -1
  31. package/src/contractSupport/index.d.ts +2 -2
  32. package/src/contractSupport/index.js +2 -19
  33. package/src/contractSupport/prepare-ownable.d.ts +1 -1
  34. package/src/contractSupport/prepare-ownable.d.ts.map +1 -1
  35. package/src/contractSupport/prepare-ownable.js +5 -1
  36. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  37. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  38. package/src/contractSupport/priceAuthorityInitial.js +3 -1
  39. package/src/contractSupport/types-ambient.d.ts.map +1 -1
  40. package/src/contractSupport/types-ambient.js +1 -0
  41. package/src/contractSupport/zoeHelpers.d.ts +6 -1
  42. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  43. package/src/contractSupport/zoeHelpers.js +1 -0
  44. package/src/contracts/atomicSwap.d.ts +1 -1
  45. package/src/contracts/auction/index.d.ts +5 -5
  46. package/src/contracts/automaticRefund.d.ts +4 -4
  47. package/src/contracts/autoswap.d.ts +4 -0
  48. package/src/contracts/autoswap.d.ts.map +1 -1
  49. package/src/contracts/autoswap.js +4 -0
  50. package/src/contracts/barterExchange.d.ts +3 -3
  51. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  52. package/src/contracts/callSpread/pricedCallSpread.d.ts +5 -5
  53. package/src/contracts/coveredCall-durable.d.ts +1 -1
  54. package/src/contracts/coveredCall.d.ts +1 -1
  55. package/src/contracts/loan/index.d.ts +1 -1
  56. package/src/contracts/loan/liquidate.d.ts.map +1 -1
  57. package/src/contracts/loan/liquidate.js +5 -1
  58. package/src/contracts/loan/types-ambient.d.ts +13 -13
  59. package/src/contracts/loan/types-ambient.d.ts.map +1 -1
  60. package/src/contracts/loan/types-ambient.js +17 -17
  61. package/src/contracts/mintPayments.d.ts +4 -4
  62. package/src/contracts/oracle.d.ts +5 -2
  63. package/src/contracts/oracle.d.ts.map +1 -1
  64. package/src/contracts/oracle.js +1 -0
  65. package/src/contracts/otcDesk.d.ts +1 -1
  66. package/src/contracts/priceAggregator.d.ts +4 -2
  67. package/src/contracts/priceAggregator.d.ts.map +1 -1
  68. package/src/contracts/priceAggregator.js +10 -8
  69. package/src/contracts/scaledPriceAuthority.d.ts +1 -0
  70. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  71. package/src/contracts/scaledPriceAuthority.js +1 -0
  72. package/src/contracts/sellItems.d.ts +1 -1
  73. package/src/contracts/simpleExchange.d.ts +6 -1
  74. package/src/contracts/simpleExchange.d.ts.map +1 -1
  75. package/src/contracts/simpleExchange.js +4 -0
  76. package/src/contracts/types-ambient.d.ts +7 -7
  77. package/src/contracts/types-ambient.d.ts.map +1 -1
  78. package/src/contracts/types-ambient.js +7 -7
  79. package/src/contracts/valueVow.contract.d.ts +5 -2
  80. package/src/contracts/valueVow.contract.d.ts.map +1 -1
  81. package/src/contracts/valueVow.contract.js +1 -0
  82. package/src/instanceRecordStorage.d.ts +3 -1
  83. package/src/instanceRecordStorage.d.ts.map +1 -1
  84. package/src/instanceRecordStorage.js +9 -2
  85. package/src/internal-types.d.ts +25 -10
  86. package/src/internal-types.d.ts.map +1 -1
  87. package/src/internal-types.js +21 -11
  88. package/src/issuerRecord.d.ts +3 -2
  89. package/src/issuerRecord.d.ts.map +1 -1
  90. package/src/issuerRecord.js +6 -2
  91. package/src/issuerStorage.d.ts +3 -2
  92. package/src/issuerStorage.d.ts.map +1 -1
  93. package/src/issuerStorage.js +6 -5
  94. package/src/typeGuards.d.ts +10 -6
  95. package/src/typeGuards.d.ts.map +1 -1
  96. package/src/typeGuards.js +7 -5
  97. package/src/types-ambient.d.ts +0 -40
  98. package/src/types-ambient.d.ts.map +1 -1
  99. package/src/types-ambient.js +4 -42
  100. package/src/types-index.d.ts +4 -0
  101. package/src/types-index.js +2 -0
  102. package/src/types.d.ts +29 -0
  103. package/src/types.d.ts.map +1 -0
  104. package/src/types.ts +37 -0
  105. package/src/zoeService/escrowStorage.d.ts.map +1 -1
  106. package/src/zoeService/escrowStorage.js +1 -2
  107. package/src/zoeService/feeMint.d.ts +6 -3
  108. package/src/zoeService/feeMint.d.ts.map +1 -1
  109. package/src/zoeService/feeMint.js +8 -2
  110. package/src/zoeService/installationStorage.d.ts +3 -2
  111. package/src/zoeService/installationStorage.d.ts.map +1 -1
  112. package/src/zoeService/installationStorage.js +3 -7
  113. package/src/zoeService/internal-types.d.ts +11 -3
  114. package/src/zoeService/internal-types.d.ts.map +1 -1
  115. package/src/zoeService/internal-types.js +9 -3
  116. package/src/zoeService/invitationQueries.d.ts +3 -3
  117. package/src/zoeService/invitationQueries.js +3 -3
  118. package/src/zoeService/makeInvitation.d.ts +4 -1
  119. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  120. package/src/zoeService/makeInvitation.js +8 -2
  121. package/src/zoeService/offer/offer.d.ts +1 -0
  122. package/src/zoeService/offer/offer.d.ts.map +1 -1
  123. package/src/zoeService/offer/offer.js +3 -1
  124. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  125. package/src/zoeService/originalZoeSeat.js +0 -2
  126. package/src/zoeService/startInstance.d.ts.map +1 -1
  127. package/src/zoeService/startInstance.js +2 -4
  128. package/src/zoeService/types-ambient.d.ts +0 -226
  129. package/src/zoeService/types-ambient.d.ts.map +1 -1
  130. package/src/zoeService/types-ambient.js +4 -327
  131. package/src/zoeService/types.d.ts +238 -0
  132. package/src/zoeService/types.d.ts.map +1 -0
  133. package/src/zoeService/types.ts +307 -0
  134. package/src/zoeService/utils.d.ts +13 -5
  135. package/src/zoeService/utils.test-d.ts +1 -0
  136. package/src/zoeService/zoe.d.ts +18 -7
  137. package/src/zoeService/zoe.d.ts.map +1 -1
  138. package/src/zoeService/zoe.js +12 -5
  139. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  140. package/src/zoeService/zoeSeat.js +1 -2
  141. package/src/zoeService/zoeStorageManager.d.ts +6 -6
  142. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  143. package/src/zoeService/zoeStorageManager.js +13 -4
  144. package/tools/fakeVatAdmin.d.ts +15 -8
  145. package/tools/fakeVatAdmin.d.ts.map +1 -1
  146. package/tools/fakeVatAdmin.js +18 -10
  147. package/tools/manualPriceAuthority.d.ts +4 -1
  148. package/tools/manualPriceAuthority.d.ts.map +1 -1
  149. package/tools/manualPriceAuthority.js +1 -0
  150. package/tools/scriptedOracle.d.ts +7 -3
  151. package/tools/scriptedOracle.d.ts.map +1 -1
  152. package/tools/scriptedOracle.js +4 -0
  153. package/tools/setup-zoe.d.ts +13 -7
  154. package/tools/setup-zoe.d.ts.map +1 -1
  155. package/tools/setup-zoe.js +38 -5
  156. package/tools/test-utils.d.ts +1 -1
  157. package/tools/test-utils.js +1 -1
  158. package/tools/types.d.ts +1 -0
  159. package/tools/types.d.ts.map +1 -1
  160. package/tools/types.js +1 -0
  161. package/src/contractFacet/internal-types.d.ts +0 -8
  162. package/src/contractFacet/internal-types.d.ts.map +0 -1
  163. package/src/contractFacet/internal-types.js +0 -15
  164. package/src/contractFacet/types-ambient.js +0 -1
  165. package/src/contractSupport/ratio.d.ts +0 -37
  166. package/src/contractSupport/ratio.d.ts.map +0 -1
  167. package/src/contractSupport/ratio.js +0 -419
  168. package/src/contractSupport/safeMath.d.ts +0 -11
  169. package/src/contractSupport/safeMath.d.ts.map +0 -1
  170. package/src/contractSupport/safeMath.js +0 -49
@@ -6,15 +6,15 @@ import { prepareExoClass } from '@agoric/vat-data';
6
6
  import { coerceAmountKeywordRecord } from '../cleanProposal.js';
7
7
  import { assertFullIssuerRecord, makeIssuerRecord } from '../issuerRecord.js';
8
8
  import { addToAllocation, subtractFromAllocation } from './allocationMath.js';
9
-
10
- import '../internal-types.js';
11
9
  import { ZcfMintI } from './typeGuards.js';
12
- import './internal-types.js';
13
- import './types-ambient.js';
10
+
11
+ /**
12
+ * @import {ZCFMint, ZCFSeat} from '@agoric/zoe';
13
+ */
14
14
 
15
15
  /**
16
16
  * @param {AmountKeywordRecord} amr
17
- * @param {IssuerRecord} issuerRecord
17
+ * @param {ZoeIssuerRecord} issuerRecord
18
18
  * @returns {Amount}
19
19
  */
20
20
  export const sumAmountKeywordRecord = (amr, issuerRecord) => {
@@ -31,7 +31,7 @@ export const sumAmountKeywordRecord = (amr, issuerRecord) => {
31
31
 
32
32
  /**
33
33
  * @param {import('@agoric/vat-data').Baggage} zcfBaggage
34
- * @param {{ (keyword: string, issuerRecord: IssuerRecord): void }} recordIssuer
34
+ * @param {{ (keyword: string, issuerRecord: ZoeIssuerRecord): void }} recordIssuer
35
35
  * @param {GetAssetKindByBrand} getAssetKindByBrand
36
36
  * @param {(exit?: undefined) => { zcfSeat: any; userSeat: Promise<UserSeat> }} makeEmptySeatKit
37
37
  * @param {ZcfMintReallocator} reallocator
@@ -51,7 +51,7 @@ export const prepareZcMint = (
51
51
  * @template {AssetKind} [K=AssetKind]
52
52
  * @param {string} keyword
53
53
  * @param {ZoeMint<K>} zoeMint
54
- * @param {Required<IssuerRecord<K>>} issuerRecord
54
+ * @param {Required<ZoeIssuerRecord<K>>} issuerRecord
55
55
  */
56
56
  (keyword, zoeMint, issuerRecord) => {
57
57
  const {
@@ -1,5 +1,7 @@
1
- export function createSeatManager(zoeInstanceAdmin: ERef<ZoeInstanceAdmin>, getAssetKindByBrand: GetAssetKindByBrand, shutdownWithFailure: import("@agoric/swingset-vat").ShutdownWithFailure, zcfBaggage: import("@agoric/vat-data").Baggage): {
1
+ export function createSeatManager(zoeInstanceAdmin: ERef<ZoeInstanceAdmin>, getAssetKindByBrand: GetAssetKindByBrand, shutdownWithFailure: ShutdownWithFailure, zcfBaggage: Baggage): {
2
2
  seatManager: ZcfSeatManager;
3
3
  zcfMintReallocator: ZcfMintReallocator;
4
4
  };
5
+ import type { ShutdownWithFailure } from '@agoric/swingset-vat';
6
+ import type { Baggage } from '@agoric/vat-data';
5
7
  //# sourceMappingURL=zcfSeat.d.ts.map
@@ -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,CAuTnF"}
1
+ {"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AAuCO,oDANI,IAAI,CAAC,gBAAgB,CAAC,uBACtB,mBAAmB,uBACnB,mBAAmB,cACnB,OAAO,GACL;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,kBAAkB,EAAE,kBAAkB,CAAA;CAAE,CAuTnF;yCApUqC,sBAAsB;6BAClC,kBAAkB"}
@@ -21,8 +21,10 @@ 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 {ShutdownWithFailure} from '@agoric/swingset-vat';
26
+ * @import {Baggage} from '@agoric/vat-data';
27
+ * @import {Allocation} from './types.js';
26
28
  */
27
29
 
28
30
  /**
@@ -31,8 +33,8 @@ import { TransferPartShape } from '../contractSupport/atomicTransfer.js';
31
33
  *
32
34
  * @param {ERef<ZoeInstanceAdmin>} zoeInstanceAdmin
33
35
  * @param {GetAssetKindByBrand} getAssetKindByBrand
34
- * @param {import('@agoric/swingset-vat').ShutdownWithFailure} shutdownWithFailure
35
- * @param {import('@agoric/vat-data').Baggage} zcfBaggage
36
+ * @param {ShutdownWithFailure} shutdownWithFailure
37
+ * @param {Baggage} zcfBaggage
36
38
  * @returns {{ seatManager: ZcfSeatManager, zcfMintReallocator: ZcfMintReallocator }}
37
39
  */
38
40
  export const createSeatManager = (
@@ -1,2 +1,9 @@
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?: 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 { Baggage } from '@agoric/vat-data';
2
9
  //# 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,GACL,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;;6BAZlB,kBAAkB"}
@@ -29,10 +29,22 @@ import { HandleOfferI, InvitationHandleShape } from '../typeGuards.js';
29
29
  import { prepareZcMint } from './zcfMint.js';
30
30
  import { ZcfI } from './typeGuards.js';
31
31
 
32
- /// <reference path="../internal-types.js" />
33
- /// <reference path="./internal-types.js" />
32
+ /**
33
+ * @import {ShutdownWithFailure} from '@agoric/swingset-vat';
34
+ * @import {Baggage} from '@agoric/vat-data';
35
+ * @import {IssuerOptionsRecord} from '@agoric/ertp';
36
+ * @import {ZoeIssuerRecord, ZCFRegisterFeeMint, ContractStartFn, SetTestJig} from './types.js';
37
+ */
34
38
 
35
- /** @import {IssuerOptionsRecord} from '@agoric/ertp' */
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,9 +54,9 @@ 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
- * @param {import('@agoric/vat-data').Baggage} zcfBaggage
59
+ * @param {Baggage} zcfBaggage
48
60
  * @returns {Promise<ZCFZygote>}
49
61
  */
50
62
  export const makeZCFZygote = async (
@@ -76,7 +88,7 @@ export const makeZCFZygote = async (
76
88
  instantiate: instantiateIssuerStorage,
77
89
  } = provideIssuerStorage(zcfBaggage);
78
90
 
79
- /** @type {import('@agoric/swingset-vat').ShutdownWithFailure} */
91
+ /** @type {ShutdownWithFailure} */
80
92
  const shutdownWithFailure = reason => {
81
93
  void E(zoeInstanceAdmin).failAllSeats(reason);
82
94
  seatManager.dropAllReferences();
@@ -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,4 @@
1
- export function prepareOwnable<MN extends (string | symbol)[]>(zone: import("@agoric/base-zone").Zone, makeInvitation: ZCF["makeInvitation"], uKindName: string, uMethodNames: MN, options?: OwnableOptions): <U>(underlying: U) => Pick<U, MN[number]> & {
1
+ export function prepareOwnable<MN extends (string | symbol)[]>(zone: import("@agoric/base-zone").Zone, makeInvitation: ZCF["makeInvitation"], uKindName: string, uMethodNames: MN, options?: OwnableOptions): <U>(underlying: U) => Partial<U> & {
2
2
  makeTransferInvitation: () => Invitation<U>;
3
3
  };
4
4
  export type OwnableOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-ownable.d.ts","sourceRoot":"","sources":["prepare-ownable.js"],"names":[],"mappings":"AA0CO,+BAlB4B,EAAE,SAAvB,CAAC,MAAM,GAAG,MAAM,CAAC,EAAG,QACvB,OAAO,mBAAmB,EAAE,IAAI,kBAChC,GAAG,CAAC,gBAAgB,CAAC,aAQrB,MAAM,gBAEN,EAAE,YAGF,cAAc,GACZ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG;IAAC,sBAAsB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,CAAA;CAAC,CAyDrG"}
1
+ {"version":3,"file":"prepare-ownable.d.ts","sourceRoot":"","sources":["prepare-ownable.js"],"names":[],"mappings":"AA0CO,+BAlB4B,EAAE,SAAvB,CAAC,MAAM,GAAG,MAAM,CAAC,EAAG,QACvB,OAAO,mBAAmB,EAAE,IAAI,kBAChC,GAAG,CAAC,gBAAgB,CAAC,aAQrB,MAAM,gBAEN,EAAE,YAGF,cAAc,GACZ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG;IAAC,sBAAsB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,CAAA;CAAC,CA6D5F"}
@@ -38,7 +38,7 @@ const TransferProposalShape = M.splitRecord({
38
38
  * The method names of the underlying exo class that should be represented
39
39
  * by transparently-forwarding methods of the wrapping ownable object.
40
40
  * @param {OwnableOptions} [options]
41
- * @returns {<U>(underlying: U) => Pick<U, MN[number]> & {makeTransferInvitation: () => Invitation<U>}}
41
+ * @returns {<U>(underlying: U) => Partial<U> & {makeTransferInvitation: () => Invitation<U>}}
42
42
  */
43
43
  export const prepareOwnable = (
44
44
  zone,
@@ -94,6 +94,10 @@ export const prepareOwnable = (
94
94
  );
95
95
 
96
96
  const makeOwnable = underlying => makeRevocable(underlying);
97
+ // Using at-ts-ignore rather than at-ts-expect-error because the vscode
98
+ // ts server says it is an error but `yarn lint` says it is not.
99
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
100
+ // @ts-ignore Return type is more precise than revocable supports
97
101
  return harden(makeOwnable);
98
102
  };
99
103
  harden(prepareOwnable);
@@ -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,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAC,CAAC,CA+D1G;;iBAxVa,MAAM,cAAc;0BACpB,MAAM,UAAU;;;;;;;6BAnBJ,gBAAgB"}
1
+ {"version":3,"file":"zoeHelpers.d.ts","sourceRoot":"","sources":["zoeHelpers.js"],"names":[],"mappings":"AASA;;;GAGG;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,+EAgB7B;AAED,0BAA0B;AAC1B,0BADW,WAAW,CAYpB;AAiDK,wBAHe,IAAI,kBACJ,MAAM,uBA/BjB,GAAG,cAGH,IAAI,CAAC,WAAW,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,SAAS,MAAM,CAAC,CAAC,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAAC,CAAC,CA+D1G;;iBAxVa,MAAM,cAAc;0BACpB,MAAM,UAAU;;;;;;;6BAnBqC,aAAa;6BADtD,gBAAgB;yBACyB,aAAa;gCAAb,aAAa;8BAAb,aAAa"}
@@ -9,6 +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;
@@ -37,8 +37,8 @@ export function start(zcf: ZCF<{
37
37
  timeAuthority: import("@agoric/time").TimerService;
38
38
  bids: string | any[];
39
39
  };
40
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
41
- makeBidInvitation: () => Promise<Invitation<unknown, never>>;
40
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
41
+ makeBidInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
42
42
  getSessionDetails: () => {
43
43
  auctionedAssets: any;
44
44
  minimumBid: any;
@@ -60,7 +60,7 @@ export function start(zcf: ZCF<{
60
60
  timeAuthority: import("@agoric/time").TimerService;
61
61
  bids: string | any[];
62
62
  };
63
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
63
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
64
64
  getCurrentBids: () => any[] | "Bids are hidden for \"second price\" auctions";
65
65
  getSessionDetails: () => {
66
66
  auctionedAssets: 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>>;
20
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
19
+ makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
20
+ } & 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>>;
18
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
19
- makeInvitation: () => Promise<Invitation<unknown, never>>;
17
+ makeInvitation: () => Promise<globalThis.Invitation<unknown, never>>;
18
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
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
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
59
+ } & 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
@@ -1 +1 @@
1
- {"version":3,"file":"liquidate.d.ts","sourceRoot":"","sources":["liquidate.js"],"names":[],"mappings":"AAKO,wIA6CN;AAeM,+BAJI,GAAG,UACH,sBAAsB,GACpB,OAAO,CAAC,IAAI,CAAC,CAiBzB"}
1
+ {"version":3,"file":"liquidate.d.ts","sourceRoot":"","sources":["liquidate.js"],"names":[],"mappings":"AASO,wIA6CN;AAeM,+BAJI,GAAG,UACH,sBAAsB,GACpB,OAAO,CAAC,IAAI,CAAC,CAiBzB"}
@@ -3,6 +3,10 @@ import { AmountMath } from '@agoric/ertp';
3
3
 
4
4
  import { offerTo } from '../../contractSupport/zoeHelpers.js';
5
5
 
6
+ /**
7
+ * @import {ShutdownWithFailure} from '@agoric/swingset-vat';
8
+ */
9
+
6
10
  export const doLiquidation = async (
7
11
  zcf,
8
12
  collateralSeat,
@@ -37,7 +41,7 @@ export const doLiquidation = async (
37
41
  zcf.shutdown('your loan had to be liquidated');
38
42
  };
39
43
 
40
- /** @type {import('@agoric/swingset-vat').ShutdownWithFailure} */
44
+ /** @type {ShutdownWithFailure} */
41
45
  const closeWithFailure = err => {
42
46
  lenderSeat.fail(err);
43
47
  collateralSeat.fail(err);