@agoric/zoe 0.26.3-dev-fa844b5.0 → 0.26.3-dev-a477bee.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 (216) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +84 -84
  2. package/bundles/bundle-contractFacet.d.ts +7 -0
  3. package/bundles/bundle-contractFacet.d.ts.map +1 -0
  4. package/package.json +15 -15
  5. package/src/cleanProposal.d.ts +9 -0
  6. package/src/cleanProposal.d.ts.map +1 -0
  7. package/src/contractFacet/allocationMath.d.ts +7 -0
  8. package/src/contractFacet/allocationMath.d.ts.map +1 -0
  9. package/src/contractFacet/evalContractCode.d.ts +2 -0
  10. package/src/contractFacet/evalContractCode.d.ts.map +1 -0
  11. package/src/contractFacet/exit.d.ts +2 -0
  12. package/src/contractFacet/exit.d.ts.map +1 -0
  13. package/src/contractFacet/internal-types.d.ts +8 -0
  14. package/src/contractFacet/internal-types.d.ts.map +1 -0
  15. package/src/contractFacet/offerHandlerStorage.d.ts +5 -0
  16. package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -0
  17. package/src/contractFacet/offerSafety.d.ts +34 -0
  18. package/src/contractFacet/offerSafety.d.ts.map +1 -0
  19. package/src/contractFacet/reallocate.d.ts +3 -0
  20. package/src/contractFacet/reallocate.d.ts.map +1 -0
  21. package/src/contractFacet/rightsConservation.d.ts +12 -0
  22. package/src/contractFacet/rightsConservation.d.ts.map +1 -0
  23. package/src/contractFacet/vatRoot.d.ts +14 -0
  24. package/src/contractFacet/vatRoot.d.ts.map +1 -0
  25. package/src/contractFacet/zcfMint.d.ts +8 -0
  26. package/src/contractFacet/zcfMint.d.ts.map +1 -0
  27. package/src/contractFacet/zcfSeat.d.ts +3 -0
  28. package/src/contractFacet/zcfSeat.d.ts.map +1 -0
  29. package/src/contractFacet/zcfZygote.d.ts +2 -0
  30. package/src/contractFacet/zcfZygote.d.ts.map +1 -0
  31. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  32. package/src/contractSupport/atomicTransfer.d.ts.map +1 -0
  33. package/src/contractSupport/bondingCurves.d.ts +6 -0
  34. package/src/contractSupport/bondingCurves.d.ts.map +1 -0
  35. package/src/contractSupport/durability.d.ts +5 -0
  36. package/src/contractSupport/durability.d.ts.map +1 -0
  37. package/src/contractSupport/index.d.ts +14 -0
  38. package/src/contractSupport/index.d.ts.map +1 -0
  39. package/src/contractSupport/prepare-ownable.d.ts +11 -0
  40. package/src/contractSupport/prepare-ownable.d.ts.map +1 -0
  41. package/src/contractSupport/priceAuthority.d.ts +27 -0
  42. package/src/contractSupport/priceAuthority.d.ts.map +1 -0
  43. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  44. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -0
  45. package/src/contractSupport/priceAuthorityQuoteMint.d.ts +2 -0
  46. package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -0
  47. package/src/contractSupport/priceAuthorityTransform.d.ts +14 -0
  48. package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -0
  49. package/src/contractSupport/priceQuote.d.ts +7 -0
  50. package/src/contractSupport/priceQuote.d.ts.map +1 -0
  51. package/src/contractSupport/ratio.d.ts +28 -0
  52. package/src/contractSupport/ratio.d.ts.map +1 -0
  53. package/src/contractSupport/recorder.d.ts +143 -0
  54. package/src/contractSupport/recorder.d.ts.map +1 -0
  55. package/src/contractSupport/safeMath.d.ts +11 -0
  56. package/src/contractSupport/safeMath.d.ts.map +1 -0
  57. package/src/contractSupport/stateMachine.d.ts +6 -0
  58. package/src/contractSupport/stateMachine.d.ts.map +1 -0
  59. package/src/contractSupport/statistics.d.ts +7 -0
  60. package/src/contractSupport/statistics.d.ts.map +1 -0
  61. package/src/contractSupport/topics.d.ts +22 -0
  62. package/src/contractSupport/topics.d.ts.map +1 -0
  63. package/src/contractSupport/types.d.ts +63 -0
  64. package/src/contractSupport/types.d.ts.map +1 -0
  65. package/src/contractSupport/zoeHelpers.d.ts +30 -0
  66. package/src/contractSupport/zoeHelpers.d.ts.map +1 -0
  67. package/src/contracts/atomicSwap.d.ts +16 -0
  68. package/src/contracts/atomicSwap.d.ts.map +1 -0
  69. package/src/contracts/auction/assertBidSeat.d.ts +2 -0
  70. package/src/contracts/auction/assertBidSeat.d.ts.map +1 -0
  71. package/src/contracts/auction/firstPriceLogic.d.ts +2 -0
  72. package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -0
  73. package/src/contracts/auction/index.d.ts +78 -0
  74. package/src/contracts/auction/index.d.ts.map +1 -0
  75. package/src/contracts/auction/secondPriceLogic.d.ts +2 -0
  76. package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -0
  77. package/src/contracts/automaticRefund.d.ts +25 -0
  78. package/src/contracts/automaticRefund.d.ts.map +1 -0
  79. package/src/contracts/autoswap.d.ts +43 -0
  80. package/src/contracts/autoswap.d.ts.map +1 -0
  81. package/src/contracts/barterExchange.d.ts +22 -0
  82. package/src/contracts/barterExchange.d.ts.map +1 -0
  83. package/src/contracts/callSpread/calculateShares.d.ts +2 -0
  84. package/src/contracts/callSpread/calculateShares.d.ts.map +1 -0
  85. package/src/contracts/callSpread/fundedCallSpread.d.ts +60 -0
  86. package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -0
  87. package/src/contracts/callSpread/payoffHandler.d.ts +11 -0
  88. package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -0
  89. package/src/contracts/callSpread/percent.d.ts +3 -0
  90. package/src/contracts/callSpread/percent.d.ts.map +1 -0
  91. package/src/contracts/callSpread/position.d.ts +10 -0
  92. package/src/contracts/callSpread/position.d.ts.map +1 -0
  93. package/src/contracts/callSpread/pricedCallSpread.d.ts +66 -0
  94. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -0
  95. package/src/contracts/callSpread/types.d.ts +30 -0
  96. package/src/contracts/callSpread/types.d.ts.map +1 -0
  97. package/src/contracts/coveredCall-durable.d.ts +21 -0
  98. package/src/contracts/coveredCall-durable.d.ts.map +1 -0
  99. package/src/contracts/coveredCall.d.ts +64 -0
  100. package/src/contracts/coveredCall.d.ts.map +1 -0
  101. package/src/contracts/exported.d.ts +2 -0
  102. package/src/contracts/exported.d.ts.map +1 -0
  103. package/src/contracts/loan/addCollateral.d.ts +3 -0
  104. package/src/contracts/loan/addCollateral.d.ts.map +1 -0
  105. package/src/contracts/loan/borrow.d.ts +3 -0
  106. package/src/contracts/loan/borrow.d.ts.map +1 -0
  107. package/src/contracts/loan/close.d.ts +3 -0
  108. package/src/contracts/loan/close.d.ts.map +1 -0
  109. package/src/contracts/loan/index.d.ts +64 -0
  110. package/src/contracts/loan/index.d.ts.map +1 -0
  111. package/src/contracts/loan/lend.d.ts +3 -0
  112. package/src/contracts/loan/lend.d.ts.map +1 -0
  113. package/src/contracts/loan/liquidate.d.ts +3 -0
  114. package/src/contracts/loan/liquidate.d.ts.map +1 -0
  115. package/src/contracts/loan/scheduleLiquidation.d.ts +3 -0
  116. package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -0
  117. package/src/contracts/loan/types.d.ts +161 -0
  118. package/src/contracts/loan/types.d.ts.map +1 -0
  119. package/src/contracts/loan/updateDebt.d.ts +11 -0
  120. package/src/contracts/loan/updateDebt.d.ts.map +1 -0
  121. package/src/contracts/mintAndSellNFT.d.ts +28 -0
  122. package/src/contracts/mintAndSellNFT.d.ts.map +1 -0
  123. package/src/contracts/mintPayments.d.ts +30 -0
  124. package/src/contracts/mintPayments.d.ts.map +1 -0
  125. package/src/contracts/oracle.d.ts +26 -0
  126. package/src/contracts/oracle.d.ts.map +1 -0
  127. package/src/contracts/otcDesk.d.ts +79 -0
  128. package/src/contracts/otcDesk.d.ts.map +1 -0
  129. package/src/contracts/priceAggregator.d.ts +107 -0
  130. package/src/contracts/priceAggregator.d.ts.map +1 -0
  131. package/src/contracts/priceAggregator.js +0 -1
  132. package/src/contracts/priceAggregatorTypes.d.ts +77 -0
  133. package/src/contracts/priceAggregatorTypes.d.ts.map +1 -0
  134. package/src/contracts/scaledPriceAuthority.d.ts +21 -0
  135. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -0
  136. package/src/contracts/sellItems.d.ts +30 -0
  137. package/src/contracts/sellItems.d.ts.map +1 -0
  138. package/src/contracts/simpleExchange.d.ts +37 -0
  139. package/src/contracts/simpleExchange.d.ts.map +1 -0
  140. package/src/contracts/types.d.ts +80 -0
  141. package/src/contracts/types.d.ts.map +1 -0
  142. package/src/handleWarning.d.ts +3 -0
  143. package/src/handleWarning.d.ts.map +1 -0
  144. package/src/instanceRecordStorage.d.ts +2 -0
  145. package/src/instanceRecordStorage.d.ts.map +1 -0
  146. package/src/internal-types.d.ts +179 -0
  147. package/src/internal-types.d.ts.map +1 -0
  148. package/src/issuerRecord.d.ts +3 -0
  149. package/src/issuerRecord.d.ts.map +1 -0
  150. package/src/issuerStorage.d.ts +14 -0
  151. package/src/issuerStorage.d.ts.map +1 -0
  152. package/src/makeHandle.d.ts +4 -0
  153. package/src/makeHandle.d.ts.map +1 -0
  154. package/src/typeGuards.d.ts +169 -0
  155. package/src/typeGuards.d.ts.map +1 -0
  156. package/src/types.d.ts +46 -0
  157. package/src/types.d.ts.map +1 -0
  158. package/src/zoeService/createZCFVat.d.ts +2 -0
  159. package/src/zoeService/createZCFVat.d.ts.map +1 -0
  160. package/src/zoeService/escrowStorage.d.ts +7 -0
  161. package/src/zoeService/escrowStorage.d.ts.map +1 -0
  162. package/src/zoeService/feeMint.d.ts +23 -0
  163. package/src/zoeService/feeMint.d.ts.map +1 -0
  164. package/src/zoeService/installationStorage.d.ts +20 -0
  165. package/src/zoeService/installationStorage.d.ts.map +1 -0
  166. package/src/zoeService/instanceAdminStorage.d.ts +103 -0
  167. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -0
  168. package/src/zoeService/internal-types.d.ts +90 -0
  169. package/src/zoeService/internal-types.d.ts.map +1 -0
  170. package/src/zoeService/invitationQueries.d.ts +6 -0
  171. package/src/zoeService/invitationQueries.d.ts.map +1 -0
  172. package/src/zoeService/makeInvitation.d.ts +5 -0
  173. package/src/zoeService/makeInvitation.d.ts.map +1 -0
  174. package/src/zoeService/offer/burnInvitation.d.ts +5 -0
  175. package/src/zoeService/offer/burnInvitation.d.ts.map +1 -0
  176. package/src/zoeService/offer/offer.d.ts +2 -0
  177. package/src/zoeService/offer/offer.d.ts.map +1 -0
  178. package/src/zoeService/originalZoeSeat.d.ts +34 -0
  179. package/src/zoeService/originalZoeSeat.d.ts.map +1 -0
  180. package/src/zoeService/startInstance.d.ts +4 -0
  181. package/src/zoeService/startInstance.d.ts.map +1 -0
  182. package/src/zoeService/types.d.ts +224 -0
  183. package/src/zoeService/types.d.ts.map +1 -0
  184. package/src/zoeService/utils.test-d.d.ts +2 -0
  185. package/src/zoeService/utils.test-d.d.ts.map +1 -0
  186. package/src/zoeService/zoe.d.ts +57 -0
  187. package/src/zoeService/zoe.d.ts.map +1 -0
  188. package/src/zoeService/zoe.js +0 -2
  189. package/src/zoeService/zoeSeat.d.ts +26 -0
  190. package/src/zoeService/zoeSeat.d.ts.map +1 -0
  191. package/src/zoeService/zoeStorageManager.d.ts +41 -0
  192. package/src/zoeService/zoeStorageManager.d.ts.map +1 -0
  193. package/tools/fakePriceAuthority.d.ts +30 -0
  194. package/tools/fakePriceAuthority.d.ts.map +1 -0
  195. package/tools/fakeVatAdmin.d.ts +103 -0
  196. package/tools/fakeVatAdmin.d.ts.map +1 -0
  197. package/tools/internal-types.d.ts +12 -0
  198. package/tools/internal-types.d.ts.map +1 -0
  199. package/tools/manualPriceAuthority.d.ts +21 -0
  200. package/tools/manualPriceAuthority.d.ts.map +1 -0
  201. package/tools/manualTimer.d.ts +44 -0
  202. package/tools/manualTimer.d.ts.map +1 -0
  203. package/tools/prepare-test-env-ava.d.ts +2 -0
  204. package/tools/prepare-test-env-ava.d.ts.map +1 -0
  205. package/tools/prepare-test-env.d.ts +2 -0
  206. package/tools/prepare-test-env.d.ts.map +1 -0
  207. package/tools/scriptedOracle.d.ts +27 -0
  208. package/tools/scriptedOracle.d.ts.map +1 -0
  209. package/tools/scriptedPriceAuthority.d.ts +2 -0
  210. package/tools/scriptedPriceAuthority.d.ts.map +1 -0
  211. package/tools/setup-zoe.d.ts +33 -0
  212. package/tools/setup-zoe.d.ts.map +1 -0
  213. package/tools/types-ambient.d.ts +142 -0
  214. package/tools/types-ambient.d.ts.map +1 -0
  215. package/tools/types.d.ts +142 -0
  216. package/tools/types.d.ts.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evalContractCode.d.ts","sourceRoot":"","sources":["evalContractCode.js"],"names":[],"mappings":"AASA,yFA0BC"}
@@ -0,0 +1,2 @@
1
+ export function makeMakeExiter(baggage: any): (proposal: ProposalRecord, zcfSeat: ZCFSeat) => ExitObj;
2
+ //# sourceMappingURL=exit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAyBO,sGAwGN"}
@@ -0,0 +1,8 @@
1
+ type TestJigSetter = ({ zcf }: {
2
+ zcf: ZCF;
3
+ }) => void;
4
+ type ZCFZygote = {
5
+ startContract: (instanceAdminFromZoe: ERef<ZoeInstanceAdmin>, instanceRecordFromZoe: InstanceRecord, issuerStorageFromZoe: IssuerRecords, privateArgs?: object) => Promise<ExecuteContractResult>;
6
+ restartContract: (privateArgs?: object) => void;
7
+ };
8
+ //# sourceMappingURL=internal-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":"qBAGa,CAAE,EAAC,GAAG,EAAC,EAAE;IAAC,GAAG,EAAE,GAAG,CAAA;CAAC,KAAM,IAAI;;yFAMZ,cAAc,qDAEvB,MAAM,KACnB,QAAQ,qBAAqB,CAAC;qBACxB,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI"}
@@ -0,0 +1,5 @@
1
+ export function makeOfferHandlerStorage(zcfBaggage: any): {
2
+ storeOfferHandler: (offerHandler: OfferHandler) => InvitationHandle;
3
+ takeOfferHandler: (invitationHandle: InvitationHandle, details?: Details) => OfferHandler;
4
+ };
5
+ //# sourceMappingURL=offerHandlerStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offerHandlerStorage.d.ts","sourceRoot":"","sources":["offerHandlerStorage.js"],"names":[],"mappings":"AAQO;sCAkBqB,YAAY,KAAK,gBAAgB;yCAe9B,gBAAgB,YAAY,OAAO,KAAK,YAAY;EAsBlF"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * `isOfferSafe` checks offer safety for a single offer.
3
+ *
4
+ * Note: This implementation checks whether we fully satisfy
5
+ * `proposal.give` (giving a refund) or whether we fully satisfy
6
+ * `proposal.want`. Both can be fully satisfied.
7
+ *
8
+ * @param {ProposalRecord} proposal - the rules that accompanied the
9
+ * escrow of payments that dictate what the user expected to get back
10
+ * from Zoe. A proposal is a record with keys `give`, `want`, and
11
+ * `exit`. `give` and `want` are records with keywords as keys and
12
+ * amounts as values. The proposal is a user's understanding of the
13
+ * contract that they are entering when they make an offer.
14
+ * @param {AmountKeywordRecord} allocation - a record with keywords
15
+ * as keys and amounts as values. These amounts are the reallocation
16
+ * to be given to a user.
17
+ */
18
+ export function isOfferSafe(proposal: ProposalRecord, allocation: AmountKeywordRecord): boolean;
19
+ /**
20
+ * For this allocation to satisfy what the user wanted, their
21
+ * allocated amounts must be greater than or equal to proposal.want.
22
+ *
23
+ * @param {ProposalRecord} proposal - the rules that accompanied the
24
+ * escrow of payments that dictate what the user expected to get back
25
+ * from Zoe. A proposal is a record with keys `give`, `want`, and
26
+ * `exit`. `give` and `want` are records with keywords as keys and
27
+ * amounts as values. The proposal is a user's understanding of the
28
+ * contract that they are entering when they make an offer.
29
+ * @param {AmountKeywordRecord} allocation - a record with keywords
30
+ * as keys and amounts as values. These amounts are the reallocation
31
+ * to be given to a user.
32
+ */
33
+ export function satisfiesWant(proposal: ProposalRecord, allocation: AmountKeywordRecord): 0 | 1;
34
+ //# sourceMappingURL=offerSafety.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offerSafety.d.ts","sourceRoot":"","sources":["offerSafety.js"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;GAgBG;AACH,sCAVY,cAAc,cAMd,mBAAmB,WAS9B;AAzDD;;;;;;;;;;;;;GAaG;AACH,wCAVW,cAAc,cAMd,mBAAmB,SAKgB"}
@@ -0,0 +1,3 @@
1
+ export function makeAllocationMap(transfers: Array<TransferPart>): [ZCFSeat, AmountKeywordRecord][];
2
+ export type TransactionList = Array<AmountKeywordRecord>;
3
+ //# sourceMappingURL=reallocate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reallocate.d.ts","sourceRoot":"","sources":["reallocate.js"],"names":[],"mappings":"AAiBO,6CAHI,mBAAmB,GACjB,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,CA8E5C;8BAtFa,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `assertRightsConserved` checks that the total amount per brand is
3
+ * equal to the total amount per brand in the proposed reallocation
4
+ *
5
+ * @param {Amount[]} previousAmounts - an array of the amounts before the
6
+ * proposed reallocation
7
+ * @param {Amount[]} newAmounts - an array of the amounts in the
8
+ * proposed reallocation
9
+ * @returns {void}
10
+ */
11
+ export function assertRightsConserved(previousAmounts: Amount[], newAmounts: Amount[]): void;
12
+ //# sourceMappingURL=rightsConservation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rightsConservation.d.ts","sourceRoot":"","sources":["rightsConservation.js"],"names":[],"mappings":"AAqFA;;;;;;;;;GASG;AACH,uDANW,MAAM,EAAE,cAER,MAAM,EAAE,GAEN,IAAI,CAMhB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param {VatPowers & { testJigSetter: TestJigSetter }} powers
3
+ * @param {{contractBundleCap: BundleCap, zoeService: ZoeService, invitationIssuer: Issuer<'set'>, privateArgs?: any}} vatParameters
4
+ * @param {import('@agoric/vat-data').Baggage} baggage
5
+ */
6
+ export function buildRootObject(powers: * TerminationVatPowers & {
7
+ testJigSetter: TestJigSetter;
8
+ }, vatParameters: {
9
+ contractBundleCap: any;
10
+ zoeService: ZoeService;
11
+ invitationIssuer: Issuer<'set'>;
12
+ privateArgs?: any;
13
+ }, baggage: import('@agoric/vat-data').Baggage): Promise<import("@endo/eventual-send").RemotableBrand<{}, {}>>;
14
+ //# sourceMappingURL=vatRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vatRoot.d.ts","sourceRoot":"","sources":["vatRoot.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH;mBAJwC,aAAa;;;gBACC,UAAU;sBAAoB,OAAO,KAAK,CAAC;kBAAgB,GAAG;YACzG,OAAO,kBAAkB,EAAE,OAAO,iEA+D5C"}
@@ -0,0 +1,8 @@
1
+ export function sumAmountKeywordRecord<K extends globalThis.AssetKind>(amr: AmountKeywordRecord, issuerRecord: IssuerRecord<K>): globalThis.Amount<K>;
2
+ export function prepareZcMint(zcfBaggage: import('@agoric/vat-data').Baggage, recordIssuer: {
3
+ (keyword: string, issuerRecord: IssuerRecord): void;
4
+ }, getAssetKindByBrand: GetAssetKindByBrand, makeEmptySeatKit: (exit?: undefined) => {
5
+ zcfSeat: any;
6
+ userSeat: Promise<UserSeat>;
7
+ }, reallocator: ZcfMintReallocator): <K extends globalThis.AssetKind>(keyword: string, zoeMintP: ERef<ZoeMint<K>>) => Promise<ZCFMint<K>>;
8
+ //# sourceMappingURL=zcfMint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zcfMint.d.ts","sourceRoot":"","sources":["zcfMint.js"],"names":[],"mappings":"AAsBO,4EAJI,mBAAmB,uDAc7B;AASM,0CANI,OAAO,kBAAkB,EAAE,OAAO,gBAClC;IAAE,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,uBACvD,mBAAmB,oBACnB,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,QAAQ,QAAQ,CAAC,CAAA;CAAE,eACnE,kBAAkB,6CAkHhB,MAAM,qDAalB"}
@@ -0,0 +1,3 @@
1
+ /** @type {CreateSeatManager} */
2
+ export const createSeatManager: CreateSeatManager;
3
+ //# sourceMappingURL=zcfSeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zcfSeat.d.ts","sourceRoot":"","sources":["zcfSeat.js"],"names":[],"mappings":"AA2BA,gCAAgC;AAChC,gCADW,iBAAiB,CAke1B"}
@@ -0,0 +1,2 @@
1
+ export function makeZCFZygote(powers: * TerminationVatPowers, zoeService: ERef<ZoeService>, invitationIssuer: Issuer<'set'>, testJigSetter: TestJigSetter, contractBundleCap: any, zcfBaggage?: import('@agoric/vat-data').Baggage): Promise<ZCFZygote>;
2
+ //# sourceMappingURL=zcfZygote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zcfZygote.d.ts","sourceRoot":"","sources":["zcfZygote.js"],"names":[],"mappings":"AAiDO,8GANI,OAAO,KAAK,CAAC,iBACb,aAAa,uCAEb,OAAO,kBAAkB,EAAE,OAAO,GAChC,QAAQ,SAAS,CAAC,CAkd9B"}
@@ -0,0 +1,6 @@
1
+ export const TransferPartShape: import("@endo/patterns").Matcher;
2
+ export function atomicRearrange(zcf: ZCF, transfers: TransferPart[]): void;
3
+ export function fromOnly(fromSeat: ZCFSeat, fromAmounts: AmountKeywordRecord): TransferPart;
4
+ export function toOnly(toSeat: ZCFSeat, toAmounts: AmountKeywordRecord): TransferPart;
5
+ export function atomicTransfer(zcf: ZCF, fromSeat?: ZCFSeat | undefined, toSeat?: ZCFSeat | undefined, fromAmounts?: AmountKeywordRecord | undefined, toAmounts?: AmountKeywordRecord | undefined): void;
6
+ //# sourceMappingURL=atomicTransfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicTransfer.d.ts","sourceRoot":"","sources":["atomicTransfer.js"],"names":[],"mappings":"AAGA,iEAGE;AAyCK,qCAHI,GAAG,aACH,cAAc,QAIxB;AAcM,mCAJI,OAAO,eACP,mBAAmB,gBAIc;AAcrC,+BAJI,OAAO,aACP,mBAAmB,gBAIqB;AAW5C,oCANI,GAAG,kKAYgE"}
@@ -0,0 +1,6 @@
1
+ export function getInputPrice(inputValue: any, inputReserve: any, outputReserve: any, feeBasisPoints?: bigint | undefined): NatValue;
2
+ export function getOutputPrice(outputValue: any, inputReserve: any, outputReserve: any, feeBasisPoints?: bigint | undefined): NatValue;
3
+ export function calcLiqValueToMint(liqTokenSupply: bigint, inputValue: bigint, inputReserve: bigint): NatValue;
4
+ export function calcSecondaryRequired(centralIn: any, centralPool: any, secondaryPool: any, secondaryIn: any): NatValue;
5
+ export function calcValueToRemove(liqTokenSupply: any, poolValue: any, liquidityValueIn: any): bigint;
6
+ //# sourceMappingURL=bondingCurves.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bondingCurves.d.ts","sourceRoot":"","sources":["bondingCurves.js"],"names":[],"mappings":"AAkCO,0CAXI,GAAG,gBAEH,GAAG,iBAEH,GAAG,wCAKD,QAAQ,CAoBpB;AAqBM,4CAXI,GAAG,gBAEH,GAAG,iBAEH,GAAG,wCAKD,QAAQ,CAwBpB;AAcM,mDALI,MAAM,cACN,MAAM,gBACN,MAAM,GACJ,QAAQ,CAepB;AAcM,iDAPI,GAAG,eACH,GAAG,iBACH,GAAG,eACH,GAAG,GAED,QAAQ,CA4BpB;AAIM,sGAUN"}
@@ -0,0 +1,5 @@
1
+ export function makeEphemeraProvider<E extends {}, K extends {} = any>(init: (key: K) => E): (key: K) => E;
2
+ export function provideEmptySeat(zcf: ZCF, baggage: MapStore<string, any>, name: string): ZCFSeat;
3
+ export function provideAll<T extends Record<string, () => any>>(baggage: MapStore<string, any>, thunks: T): Promise<{ [K in keyof T]: Awaited<ReturnType<T[K]>>; }>;
4
+ export function provideSingleton<T extends () => any>(mapStore: import('@agoric/vat-data').Baggage, key: string, makeValue: T, withValue?: ((value: Awaited<ReturnType<T>>) => void) | undefined): Promise<Awaited<ReturnType<T>>>;
5
+ //# sourceMappingURL=durability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durability.d.ts","sourceRoot":"","sources":["durability.js"],"names":[],"mappings":"AAaO,2GAkBN;AAWM,sCALI,GAAG,wCAEH,MAAM,GACJ,OAAO,CAInB;AAiCM,yEAJI,SAAS,MAAM,EAAE,GAAG,CAAC,sEAyB/B;AAgBM,gEANI,OAAO,kBAAkB,EAAE,OAAO,OAClC,MAAM,gEAE6B,IAAI,gDAejD"}
@@ -0,0 +1,14 @@
1
+ export { natSafeMath } from "./safeMath.js";
2
+ export { makeStateMachine } from "./stateMachine.js";
3
+ export * from "./durability.js";
4
+ export * from "./prepare-ownable.js";
5
+ export * from "./priceAuthority.js";
6
+ export * from "./priceQuote.js";
7
+ export * from "./statistics.js";
8
+ export * from "./recorder.js";
9
+ export * from "./topics.js";
10
+ export { getInputPrice, getOutputPrice, calcLiqValueToMint, calcValueToRemove, calcSecondaryRequired } from "./bondingCurves.js";
11
+ export { atomicRearrange, atomicTransfer, fromOnly, toOnly } from "./atomicTransfer.js";
12
+ 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
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export function prepareOwnable<MN extends (string | symbol)[]>(zone: import('@agoric/base-zone').Zone, makeInvitation: ZCF['makeInvitation'], uKindName: string, uMethodNames: MN, options?: OwnableOptions | undefined): <U>(underlying: U) => Pick<U, MN[number]> & {
2
+ makeTransferInvitation: () => Invitation<U, undefined>;
3
+ };
4
+ export type OwnableOptions = {
5
+ /**
6
+ * The `interfaceName` of the underlying interface guard.
7
+ * Defaults to the `uKindName`.
8
+ */
9
+ uInterfaceName?: string | undefined;
10
+ };
11
+ //# sourceMappingURL=prepare-ownable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare-ownable.d.ts","sourceRoot":"","sources":["prepare-ownable.js"],"names":[],"mappings":"AAsCO,qEAjBI,OAAO,mBAAmB,EAAE,IAAI,kBAChC,GAAG,CAAC,gBAAgB,CAAC,aAQrB,MAAM;;EAgEhB"}
@@ -0,0 +1,27 @@
1
+ export const PriceAuthorityI: import("@endo/patterns").InterfaceGuard<{
2
+ getQuoteIssuer: import("@endo/patterns").MethodGuard;
3
+ getTimerService: import("@endo/patterns").MethodGuard;
4
+ quoteGiven: import("@endo/patterns").MethodGuard;
5
+ quoteWanted: import("@endo/patterns").MethodGuard;
6
+ makeQuoteNotifier: import("@endo/patterns").MethodGuard;
7
+ quoteAtTime: import("@endo/patterns").MethodGuard;
8
+ quoteWhenLT: import("@endo/patterns").MethodGuard;
9
+ quoteWhenLTE: import("@endo/patterns").MethodGuard;
10
+ quoteWhenGTE: import("@endo/patterns").MethodGuard;
11
+ quoteWhenGT: import("@endo/patterns").MethodGuard;
12
+ mutableQuoteWhenLT: import("@endo/patterns").MethodGuard;
13
+ mutableQuoteWhenLTE: import("@endo/patterns").MethodGuard;
14
+ mutableQuoteWhenGTE: import("@endo/patterns").MethodGuard;
15
+ mutableQuoteWhenGT: import("@endo/patterns").MethodGuard;
16
+ }>;
17
+ export function makeOnewayPriceAuthorityKit(opts: {
18
+ quoteIssuer: Issuer<'set'>;
19
+ notifier: ERef<Notifier<unknown>>;
20
+ timer: ERef<import("@agoric/time").TimerService>;
21
+ createQuote: PriceQuoteCreate;
22
+ actualBrandIn: Brand<'nat'>;
23
+ actualBrandOut: Brand<'nat'>;
24
+ }): PriceAuthorityKit;
25
+ export type CompareAmount = (amount: Amount, amountLimit: Amount) => boolean;
26
+ export type Trigger = (createInstantQuote: PriceQuoteCreate) => Promise<void>;
27
+ //# sourceMappingURL=priceAuthority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priceAuthority.d.ts","sourceRoot":"","sources":["priceAuthority.js"],"names":[],"mappings":"AA0CA;;;;;;;;;;;;;;;GAiBG;AAYI;iBARI,OAAO,KAAK,CAAC;;;iBAGb,gBAAgB;mBAChB,MAAM,KAAK,CAAC;oBACZ,MAAM,KAAK,CAAC;IACV,iBAAiB,CAwT7B;qCA7WU,MAAM,eACN,MAAM,KACJ,OAAO;2CAiBT,gBAAgB,KACd,QAAQ,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export function makeInitialTransform(priceOutPerIn: Ratio, priceAuthority: PriceAuthority, quoteMint: ERef<globalThis.Mint<"set">>, brandIn: Brand<'nat'>, brandOut: Brand<'nat'>): PriceAuthority;
2
+ //# sourceMappingURL=priceAuthorityInitial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priceAuthorityInitial.d.ts","sourceRoot":"","sources":["priceAuthorityInitial.js"],"names":[],"mappings":"AA0BO,oDAPI,KAAK,kBACL,cAAc,oDAEd,MAAM,KAAK,CAAC,YACZ,MAAM,KAAK,CAAC,GACV,cAAc,CAyF1B"}
@@ -0,0 +1,2 @@
1
+ export function provideQuoteMint(baggage: import('@agoric/vat-data').Baggage): ERef<globalThis.Mint<"set">>;
2
+ //# sourceMappingURL=priceAuthorityQuoteMint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priceAuthorityQuoteMint.d.ts","sourceRoot":"","sources":["priceAuthorityQuoteMint.js"],"names":[],"mappings":"AAQO,0CAHI,OAAO,kBAAkB,EAAE,OAAO,gCAiB5C"}
@@ -0,0 +1,14 @@
1
+ export function mintQuote(quoteBrand: Brand<'set'>, amountIn: Amount<'nat'>, amountOut: Amount<'nat'>, timer: ERef<import("@agoric/time").TimerService>, timestamp: import('@agoric/time').Timestamp, quoteMint: ERef<globalThis.Mint<"set">>): Promise<PriceQuote>;
2
+ export function makePriceAuthorityTransform({ quoteMint, sourcePriceAuthority, sourceBrandIn, sourceBrandOut, actualBrandIn, actualBrandOut, makeSourceAmountIn, makeSourceAmountOut, transformSourceAmountIn, transformSourceAmountOut, }: {
3
+ quoteMint: ERef<globalThis.Mint<"set">>;
4
+ sourcePriceAuthority: ERef<PriceAuthority>;
5
+ sourceBrandIn: Brand<'nat'>;
6
+ sourceBrandOut: Brand<'nat'>;
7
+ actualBrandIn?: globalThis.Brand<"nat"> | undefined;
8
+ actualBrandOut?: globalThis.Brand<"nat"> | undefined;
9
+ makeSourceAmountIn?: ((amountIn: Amount<'nat'>) => Amount<'nat'>) | undefined;
10
+ makeSourceAmountOut?: ((amountOut: Amount<'nat'>) => Amount<'nat'>) | undefined;
11
+ transformSourceAmountIn?: ((sourceAmountIn: Amount<'nat'>) => Amount<'nat'>) | undefined;
12
+ transformSourceAmountOut?: ((sourceAmountOut: Amount<'nat'>) => Amount<'nat'>) | undefined;
13
+ }): Promise<PriceAuthority>;
14
+ //# sourceMappingURL=priceAuthorityTransform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priceAuthorityTransform.d.ts","sourceRoot":"","sources":["priceAuthorityTransform.js"],"names":[],"mappings":"AAiBO,sCARI,MAAM,KAAK,CAAC,YACZ,OAAO,KAAK,CAAC,aACb,OAAO,KAAK,CAAC,+DAEb,OAAO,cAAc,EAAE,SAAS,4CAE9B,QAAQ,UAAU,CAAC,CAmB/B;AAeM;;;mBATI,MAAM,KAAK,CAAC;oBACZ,MAAM,KAAK,CAAC;;;qCAGD,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;uCAC9B,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;gDAC1B,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;kDAC9B,OAAO,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC;4BA4N3D"}
@@ -0,0 +1,7 @@
1
+ export function getPriceDescription(quote: PriceQuote): PriceDescription;
2
+ export function getAmountIn(quote: PriceQuote): globalThis.Amount<"nat">;
3
+ export function getAmountOut(quote: PriceQuote): globalThis.Amount<"nat">;
4
+ /** @type {(quote: PriceQuote) => import('@agoric/time').Timestamp} */
5
+ export const getTimestamp: (quote: PriceQuote) => import('@agoric/time').Timestamp;
6
+ export function unitAmount(brand: Brand<'nat'>): Promise<globalThis.Amount<"nat">>;
7
+ //# sourceMappingURL=priceQuote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priceQuote.d.ts","sourceRoot":"","sources":["priceQuote.js"],"names":[],"mappings":"AAiBO,2CAHI,UAAU,GACR,gBAAgB,CAM5B;AAGM,mCADK,UAAU,4BACiD;AAEhE,oCADK,UAAU,4BACmD;AACzE,sEAAsE;AACtE,2BADW,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,cAAc,EAAE,SAAS,CACQ;AAGnE,kCADK,MAAM,KAAK,CAAC,qCAMvB"}
@@ -0,0 +1,28 @@
1
+ export function assertIsRatio(ratio: any): void;
2
+ export function makeRatio(numerator: bigint, numeratorBrand: Brand, denominator?: bigint | undefined, denominatorBrand?: globalThis.Brand | undefined): Ratio;
3
+ export function makeRatioFromAmounts(numeratorAmount: Amount, denominatorAmount: Amount): Ratio;
4
+ /** @type {ScaleAmount} */
5
+ export const floorMultiplyBy: ScaleAmount;
6
+ /** @type {ScaleAmount} */
7
+ export const ceilMultiplyBy: ScaleAmount;
8
+ /** @type {ScaleAmount} */
9
+ export const multiplyBy: ScaleAmount;
10
+ /** @type {ScaleAmount} */
11
+ export const floorDivideBy: ScaleAmount;
12
+ /** @type {ScaleAmount} */
13
+ export const ceilDivideBy: ScaleAmount;
14
+ /** @type {ScaleAmount} */
15
+ export const divideBy: ScaleAmount;
16
+ export function invertRatio(ratio: Ratio): Ratio;
17
+ export function addRatios(left: Ratio, right: Ratio): Ratio;
18
+ export function subtractRatios(left: Ratio, right: Ratio): Ratio;
19
+ export function multiplyRatios(left: Ratio, right: Ratio): Ratio;
20
+ export function oneMinus(ratio: Ratio): Ratio;
21
+ export function ratioGTE(left: Ratio, right: Ratio): boolean;
22
+ export function ratiosSame(left: Ratio, right: Ratio): boolean;
23
+ export function quantize(ratio: Ratio, newDen: bigint): Ratio;
24
+ export function parseRatio(numeric: ParsableNumber, numeratorBrand: Brand, denominatorBrand?: globalThis.Brand | undefined): Ratio;
25
+ export function assertParsableNumber(specimen: unknown): asserts specimen is ParsableNumber;
26
+ export function ratioToNumber(ratio: Ratio): number;
27
+ export type ParsableNumber = bigint | number | string;
28
+ //# sourceMappingURL=ratio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ratio.d.ts","sourceRoot":"","sources":["ratio.js"],"names":[],"mappings":"AAwCO,gDAcN;AASM,qCANI,MAAM,kBACN,KAAK,sFAGH,KAAK,CAgBjB;AAOM,sDAJI,MAAM,qBACN,MAAM,GACJ,KAAK,CAYjB;AAwBD,0BAA0B;AAC1B,8BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,6BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,yBADW,WAAW,CAGpB;AAwBF,0BAA0B;AAC1B,4BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,2BADW,WAAW,CAGpB;AAEF,0BAA0B;AAC1B,uBADW,WAAW,CAGpB;AAMK,mCAHI,KAAK,GACH,KAAK,CAWjB;AAOM,gCAJI,KAAK,SACL,KAAK,GACH,KAAK,CAwBjB;AAOM,qCAJI,KAAK,SACL,KAAK,GACH,KAAK,CAmBjB;AAOM,qCAJI,KAAK,SACL,KAAK,GACH,KAAK,CA8BjB;AAQM,gCAHI,KAAK,GACH,KAAK,CAcjB;AAOM,+BAJI,KAAK,SACL,KAAK,GACH,OAAO,CAkBnB;AASM,iCAJI,KAAK,SACL,KAAK,GACH,OAAO,CAOnB;AASM,gCAJI,KAAK,UACL,MAAM,GACJ,KAAK,CAajB;AAaM,oCALI,cAAc,kBACd,KAAK,oDAEH,KAAK,CAmBjB;AAMM,+CAHI,OAAO,sCAMjB;AAQM,qCAHI,KAAK,GACH,MAAM,CAMlB;6BAhDa,MAAM,GAAG,MAAM,GAAG,MAAM"}
@@ -0,0 +1,143 @@
1
+ export function prepareRecorder(baggage: import('@agoric/vat-data').Baggage, marshaller: ERef<Marshaller<unknown>>): (publisher: Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>, valueShape?: TypedMatcher<unknown> | undefined) => import("@endo/exo").Guarded<{
2
+ getStorageNode(): import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>;
3
+ /**
4
+ * Memoizes the remote call to the storage node
5
+ *
6
+ * @returns {Promise<string>}
7
+ */
8
+ getStoragePath(): Promise<string>;
9
+ /**
10
+ * Marshalls before writing to storage or publisher to help ensure the two streams match.
11
+ *
12
+ * @param {unknown} value
13
+ * @returns {Promise<void>}
14
+ */
15
+ write(value: unknown): Promise<void>;
16
+ /**
17
+ * Like `write` but prevents future writes and terminates the publisher.
18
+ *
19
+ * @param {unknown} value
20
+ * @returns {Promise<void>}
21
+ */
22
+ writeFinal(value: unknown): Promise<void>;
23
+ }>;
24
+ export function defineRecorderKit({ makeRecorder, makeDurablePublishKit }: {
25
+ makeRecorder: MakeRecorder;
26
+ makeDurablePublishKit: ReturnType<typeof prepareDurablePublishKit>;
27
+ }): <T>(storageNode: StorageNode | Awaited<import('@endo/far').FarRef<StorageNode>>, valueShape?: TypedMatcher<T> | undefined) => RecorderKit<T>;
28
+ export function defineERecorderKit({ makeRecorder, makeDurablePublishKit }: {
29
+ makeRecorder: MakeRecorder;
30
+ makeDurablePublishKit: ReturnType<typeof prepareDurablePublishKit>;
31
+ }): <T>(storageNodeP: ERef<StorageNode>, valueShape?: TypedMatcher<T> | undefined) => EventualRecorderKit<T>;
32
+ export function prepareRecorderKit(baggage: import('@agoric/vat-data').Baggage, marshaller: ERef<Marshaller<unknown>>): <T>(storageNode: StorageNode | Awaited<import('@endo/far').FarRef<StorageNode>>, valueShape?: TypedMatcher<T> | undefined) => RecorderKit<T>;
33
+ export function prepareRecorderKitMakers(baggage: import('@agoric/vat-data').Baggage, marshaller: ERef<Marshaller<unknown>>): {
34
+ makeDurablePublishKit: (options?: {
35
+ valueDurability?: "mandatory" | undefined;
36
+ } | undefined) => import("@endo/exo").GuardedKit<{
37
+ publisher: {
38
+ publish(value: any): void;
39
+ finish(finalValue: any): void;
40
+ fail(reason: any): void;
41
+ };
42
+ subscriber: {
43
+ subscribeAfter(publishCount?: bigint): Promise<any>;
44
+ getUpdateSince(updateCount: any): any;
45
+ };
46
+ }>;
47
+ makeRecorder: (publisher: Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>, valueShape?: TypedMatcher<unknown> | undefined) => import("@endo/exo").Guarded<{
48
+ getStorageNode(): import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>;
49
+ /**
50
+ * Memoizes the remote call to the storage node
51
+ *
52
+ * @returns {Promise<string>}
53
+ */
54
+ getStoragePath(): Promise<string>;
55
+ /**
56
+ * Marshalls before writing to storage or publisher to help ensure the two streams match.
57
+ *
58
+ * @param {unknown} value
59
+ * @returns {Promise<void>}
60
+ */
61
+ write(value: unknown): Promise<void>;
62
+ /**
63
+ * Like `write` but prevents future writes and terminates the publisher.
64
+ *
65
+ * @param {unknown} value
66
+ * @returns {Promise<void>}
67
+ */
68
+ writeFinal(value: unknown): Promise<void>;
69
+ }>;
70
+ makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import('@endo/far').FarRef<StorageNode>>, valueShape?: TypedMatcher<T> | undefined) => RecorderKit<T>;
71
+ makeERecorderKit: <T_1>(storageNodeP: ERef<StorageNode>, valueShape?: TypedMatcher<T_1> | undefined) => EventualRecorderKit<T_1>;
72
+ };
73
+ export function prepareMockRecorderKitMakers(): {
74
+ storageNode: StorageNode & {
75
+ countSetValueCalls: () => number;
76
+ };
77
+ makeDurablePublishKit: (options?: {
78
+ valueDurability?: "mandatory" | undefined;
79
+ } | undefined) => import("@endo/exo").GuardedKit<{
80
+ publisher: {
81
+ publish(value: any): void;
82
+ finish(finalValue: any): void;
83
+ fail(reason: any): void;
84
+ };
85
+ subscriber: {
86
+ subscribeAfter(publishCount?: bigint): Promise<any>;
87
+ getUpdateSince(updateCount: any): any;
88
+ };
89
+ }>;
90
+ makeRecorder: (publisher: Publisher<unknown>, storageNode: import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>, valueShape?: TypedMatcher<unknown> | undefined) => import("@endo/exo").Guarded<{
91
+ getStorageNode(): import("@endo/eventual-send").DataOnly<StorageNode> & import("@endo/eventual-send").RemotableBrand<import("@endo/eventual-send").DataOnly<StorageNode>, StorageNode>;
92
+ /**
93
+ * Memoizes the remote call to the storage node
94
+ *
95
+ * @returns {Promise<string>}
96
+ */
97
+ getStoragePath(): Promise<string>;
98
+ /**
99
+ * Marshalls before writing to storage or publisher to help ensure the two streams match.
100
+ *
101
+ * @param {unknown} value
102
+ * @returns {Promise<void>}
103
+ */
104
+ write(value: unknown): Promise<void>;
105
+ /**
106
+ * Like `write` but prevents future writes and terminates the publisher.
107
+ *
108
+ * @param {unknown} value
109
+ * @returns {Promise<void>}
110
+ */
111
+ writeFinal(value: unknown): Promise<void>;
112
+ }>;
113
+ makeRecorderKit: <T>(storageNode: StorageNode | Awaited<import('@endo/far').FarRef<StorageNode>>, valueShape?: TypedMatcher<T> | undefined) => RecorderKit<T>;
114
+ makeERecorderKit: <T_1>(storageNodeP: ERef<StorageNode>, valueShape?: TypedMatcher<T_1> | undefined) => EventualRecorderKit<T_1>;
115
+ };
116
+ export type Recorder<T> = {
117
+ getStorageNode(): Awaited<import('@endo/far').FarRef<StorageNode>>;
118
+ getStoragePath(): Promise<string>;
119
+ write(value: T): Promise<void>;
120
+ writeFinal(value: T): Promise<void>;
121
+ };
122
+ export type RecorderKit<T> = Pick<PublishKit<T>, 'subscriber'> & {
123
+ recorder: Recorder<T>;
124
+ };
125
+ export type EventualRecorderKit<T> = Pick<PublishKit<T>, "subscriber"> & {
126
+ recorderP: ERef<Recorder<T>>;
127
+ };
128
+ export type MakeRecorder = ReturnType<typeof prepareRecorder>;
129
+ export type MakeRecorderKit = ReturnType<typeof defineRecorderKit>;
130
+ export type MakeERecorderKit = ReturnType<typeof defineERecorderKit>;
131
+ /**
132
+ * Stop-gap until https://github.com/Agoric/agoric-sdk/issues/6160
133
+ * explictly specify the type that the Pattern will verify through a match.
134
+ *
135
+ * This is a Pattern but since that's `any`, including in the typedef turns the
136
+ * whole thing to `any`.
137
+ */
138
+ export type TypedMatcher<T> = {
139
+ validatedType?: T;
140
+ };
141
+ export type MatchedType<TM extends TypedMatcher<any>> = TM extends TypedMatcher<infer T> ? T : never;
142
+ import { prepareDurablePublishKit } from '@agoric/notifier';
143
+ //# sourceMappingURL=recorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["recorder.js"],"names":[],"mappings":"AA4CO,yCAHI,OAAO,kBAAkB,EAAE,OAAO;;IAoCvC;;;;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,WAAW,GAAG,QAAQ,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,8DAgB1E;AAUM,4EAFI;IAAC,YAAY,EAAE,YAAY,CAAC;IAAC,qBAAqB,EAAE,WAAW,+BAA+B,CAAC,CAAA;CAAC,4GAsB1G;AAaM,4CAHI,OAAO,kBAAkB,EAAE,OAAO,2DAxDhC,WAAW,GAAG,QAAQ,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,8DAkE1E;AAaM,kDAHI,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;;;QAjJvC;;;;WAIG;0BADU,QAAQ,MAAM,CAAC;QAa5B;;;;;WAKG;qBAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;QAa1B;;;;;WAKG;0BAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;;sCAgCnB,WAAW,GAAG,QAAQ,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;;EAqG1E;AAKM;;;;;;;;;;;;;;;;;;;QA/KD;;;;WAIG;0BADU,QAAQ,MAAM,CAAC;QAa5B;;;;;WAKG;qBAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;QAa1B;;;;;WAKG;0BAFQ,OAAO,GACL,QAAQ,IAAI,CAAC;;sCAgCnB,WAAW,GAAG,QAAQ,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;;EAiH1E;0BA1OY;IAAE,cAAc,IAAI,QAAQ,OAAO,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAAC,cAAc,IAAI,QAAQ,MAAM,CAAC,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,QAAQ,IAAI,CAAC,CAAC;IAAC,UAAU,CAAC,KAAK,EAAE,CAAC,GAAG,QAAQ,IAAI,CAAC,CAAA;CAAE;6BAK9K,KAAK,WAAW,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;CAAE;;;;2BAwG5D,WAAW,sBAAsB,CAAC;8BA6BlC,WAAW,wBAAwB,CAAC;+BA+BpC,WAAW,yBAAyB,CAAC;;;;;;;;8BA2EtC;IAAE,aAAa,CAAC,EAAE,CAAC,CAAA;CAAE;;yCA3QO,kBAAkB"}
@@ -0,0 +1,11 @@
1
+ export namespace natSafeMath {
2
+ let add: NatOp;
3
+ let subtract: NatOp;
4
+ let multiply: NatOp;
5
+ let floorDivide: NatOp;
6
+ let ceilDivide: NatOp;
7
+ let bankersDivide: NatOp;
8
+ let isGTE: (x: number | bigint, y: number | bigint) => boolean;
9
+ }
10
+ export type NatOp = (x: number | bigint, y: number | bigint) => NatValue;
11
+ //# sourceMappingURL=safeMath.d.ts.map
@@ -0,0 +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;eAiBJ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO;;oBA5ClD,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,QAAQ"}
@@ -0,0 +1,6 @@
1
+ export function makeStateMachine(initialState: any, allowedTransitionsArray: any): {
2
+ canTransitionTo: (nextState: any) => any;
3
+ transitionTo: (nextState: any) => void;
4
+ getStatus: (_: any) => any;
5
+ };
6
+ //# sourceMappingURL=stateMachine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stateMachine.d.ts","sourceRoot":"","sources":["stateMachine.js"],"names":[],"mappings":"AAUA;;;;EAYC"}
@@ -0,0 +1,7 @@
1
+ export function calculateMedian<T>(samples: T[], math: TypedMath<T>): T | undefined;
2
+ export type TypedMath<T> = {
3
+ add: (a: T, b: T) => T;
4
+ divide: (a: T, b: bigint) => T;
5
+ isGTE: (a: T, b: T) => boolean;
6
+ };
7
+ //# sourceMappingURL=statistics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["statistics.js"],"names":[],"mappings":"AAgBO,oFAwBN;;SArCa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;YACjB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;WACtB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO"}
@@ -0,0 +1,22 @@
1
+ export { SubscriberShape };
2
+ export const PublicTopicShape: import("@endo/patterns").Matcher;
3
+ /**
4
+ * @template {object} T topic value
5
+ * @typedef {{
6
+ * description?: string,
7
+ * subscriber: Subscriber<T>,
8
+ * storagePath: ERef<string>,
9
+ * }} PublicTopic
10
+ */
11
+ export const TopicsRecordShape: import("@endo/patterns").Matcher;
12
+ export function makeRecorderTopic<T>(description: string, recorderKit: import("./recorder.js").RecorderKit<T> | import("./recorder.js").EventualRecorderKit<T>): PublicTopic<T>;
13
+ export type PublicTopic<T extends unknown> = {
14
+ description?: string | undefined;
15
+ subscriber: Subscriber<T>;
16
+ storagePath: ERef<string>;
17
+ };
18
+ export type TopicsRecord = {
19
+ [topicName: string]: PublicTopic<unknown>;
20
+ };
21
+ import { SubscriberShape } from '@agoric/notifier';
22
+ //# sourceMappingURL=topics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topics.d.ts","sourceRoot":"","sources":["topics.js"],"names":[],"mappings":";AAMA,gEAME;AAEF;;;;;;;GAOG;AAEH,iEAA0E;AAcnE,kDAJI,MAAM,wHAYhB;;;gBA3BgB,WAAW,CAAC,CAAC;;;2BAQjB;IACZ,CAAK,SAAS,EAAE,MAAM,GAAG,YAAY,OAAO,CAAC,CAAC;CAC3C;gCA5B4B,kBAAkB"}