@agoric/zoe 0.28.0-u23.0 → 0.28.0-u23.1

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 (307) hide show
  1. package/package.json +10 -10
  2. package/source-spec-registry.d.ts +25 -0
  3. package/source-spec-registry.d.ts.map +1 -0
  4. package/src/cleanProposal.d.ts +13 -0
  5. package/src/cleanProposal.d.ts.map +1 -0
  6. package/src/contractFacet/allocationMath.d.ts +11 -0
  7. package/src/contractFacet/allocationMath.d.ts.map +1 -0
  8. package/src/contractFacet/evalContractCode.d.ts +2 -0
  9. package/src/contractFacet/evalContractCode.d.ts.map +1 -0
  10. package/src/contractFacet/exit.d.ts +2 -0
  11. package/src/contractFacet/exit.d.ts.map +1 -0
  12. package/src/contractFacet/offerHandlerStorage.d.ts +14 -0
  13. package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -0
  14. package/src/contractFacet/offerSafety.d.ts +36 -0
  15. package/src/contractFacet/offerSafety.d.ts.map +1 -0
  16. package/src/contractFacet/reallocate.d.ts +6 -0
  17. package/src/contractFacet/reallocate.d.ts.map +1 -0
  18. package/src/contractFacet/rightsConservation.d.ts +13 -0
  19. package/src/contractFacet/rightsConservation.d.ts.map +1 -0
  20. package/src/contractFacet/typeGuards.d.ts +8 -0
  21. package/src/contractFacet/typeGuards.d.ts.map +1 -0
  22. package/src/contractFacet/types.d.ts +182 -0
  23. package/src/contractFacet/types.d.ts.map +1 -0
  24. package/src/contractFacet/vatRoot.d.ts +30 -0
  25. package/src/contractFacet/vatRoot.d.ts.map +1 -0
  26. package/src/contractFacet/zcfMint.d.ts +18 -0
  27. package/src/contractFacet/zcfMint.d.ts.map +1 -0
  28. package/src/contractFacet/zcfSeat.d.ts +12 -0
  29. package/src/contractFacet/zcfSeat.d.ts.map +1 -0
  30. package/src/contractFacet/zcfZygote.d.ts +19 -0
  31. package/src/contractFacet/zcfZygote.d.ts.map +1 -0
  32. package/src/contractSupport/atomicTransfer.d.ts +13 -0
  33. package/src/contractSupport/atomicTransfer.d.ts.map +1 -0
  34. package/src/contractSupport/bondingCurves.d.ts +7 -0
  35. package/src/contractSupport/bondingCurves.d.ts.map +1 -0
  36. package/src/contractSupport/durability.d.ts +10 -0
  37. package/src/contractSupport/durability.d.ts.map +1 -0
  38. package/src/contractSupport/index.d.ts +14 -0
  39. package/src/contractSupport/index.d.ts.map +1 -0
  40. package/src/contractSupport/prepare-ownable.d.ts +14 -0
  41. package/src/contractSupport/prepare-ownable.d.ts.map +1 -0
  42. package/src/contractSupport/priceAuthority.d.ts +36 -0
  43. package/src/contractSupport/priceAuthority.d.ts.map +1 -0
  44. package/src/contractSupport/priceAuthorityInitial.d.ts +8 -0
  45. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -0
  46. package/src/contractSupport/priceAuthorityQuoteMint.d.ts +6 -0
  47. package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -0
  48. package/src/contractSupport/priceAuthorityTransform.d.ts +23 -0
  49. package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -0
  50. package/src/contractSupport/priceQuote.d.ts +13 -0
  51. package/src/contractSupport/priceQuote.d.ts.map +1 -0
  52. package/src/contractSupport/recorder.d.ts +91 -0
  53. package/src/contractSupport/recorder.d.ts.map +1 -0
  54. package/src/contractSupport/stateMachine.d.ts +6 -0
  55. package/src/contractSupport/stateMachine.d.ts.map +1 -0
  56. package/src/contractSupport/statistics.d.ts +7 -0
  57. package/src/contractSupport/statistics.d.ts.map +1 -0
  58. package/src/contractSupport/testJigHelpers.d.ts +7 -0
  59. package/src/contractSupport/testJigHelpers.d.ts.map +1 -0
  60. package/src/contractSupport/topics.d.ts +52 -0
  61. package/src/contractSupport/topics.d.ts.map +1 -0
  62. package/src/contractSupport/types.d.ts +70 -0
  63. package/src/contractSupport/types.d.ts.map +1 -0
  64. package/src/contractSupport/zoeHelpers.d.ts +53 -0
  65. package/src/contractSupport/zoeHelpers.d.ts.map +1 -0
  66. package/src/contracts/atomicSwap.d.ts +20 -0
  67. package/src/contracts/atomicSwap.d.ts.map +1 -0
  68. package/src/contracts/auction/assertBidSeat.d.ts +2 -0
  69. package/src/contracts/auction/assertBidSeat.d.ts.map +1 -0
  70. package/src/contracts/auction/firstPriceLogic.d.ts +4 -0
  71. package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -0
  72. package/src/contracts/auction/index.d.ts +84 -0
  73. package/src/contracts/auction/index.d.ts.map +1 -0
  74. package/src/contracts/auction/secondPriceLogic.d.ts +4 -0
  75. package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -0
  76. package/src/contracts/automaticRefund.d.ts +29 -0
  77. package/src/contracts/automaticRefund.d.ts.map +1 -0
  78. package/src/contracts/autoswap.d.ts +51 -0
  79. package/src/contracts/autoswap.d.ts.map +1 -0
  80. package/src/contracts/barterExchange.d.ts +26 -0
  81. package/src/contracts/barterExchange.d.ts.map +1 -0
  82. package/src/contracts/callSpread/calculateShares.d.ts +2 -0
  83. package/src/contracts/callSpread/calculateShares.d.ts.map +1 -0
  84. package/src/contracts/callSpread/fundedCallSpread.d.ts +71 -0
  85. package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -0
  86. package/src/contracts/callSpread/payoffHandler.d.ts +23 -0
  87. package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -0
  88. package/src/contracts/callSpread/percent.d.ts +3 -0
  89. package/src/contracts/callSpread/percent.d.ts.map +1 -0
  90. package/src/contracts/callSpread/position.d.ts +10 -0
  91. package/src/contracts/callSpread/position.d.ts.map +1 -0
  92. package/src/contracts/callSpread/pricedCallSpread.d.ts +69 -0
  93. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -0
  94. package/src/contracts/callSpread/types.d.ts +34 -0
  95. package/src/contracts/callSpread/types.d.ts.map +1 -0
  96. package/src/contracts/coveredCall-durable.d.ts +23 -0
  97. package/src/contracts/coveredCall-durable.d.ts.map +1 -0
  98. package/src/contracts/coveredCall.d.ts +68 -0
  99. package/src/contracts/coveredCall.d.ts.map +1 -0
  100. package/src/contracts/loan/addCollateral.d.ts +8 -0
  101. package/src/contracts/loan/addCollateral.d.ts.map +1 -0
  102. package/src/contracts/loan/borrow.d.ts +12 -0
  103. package/src/contracts/loan/borrow.d.ts.map +1 -0
  104. package/src/contracts/loan/close.d.ts +8 -0
  105. package/src/contracts/loan/close.d.ts.map +1 -0
  106. package/src/contracts/loan/index.d.ts +75 -0
  107. package/src/contracts/loan/index.d.ts.map +1 -0
  108. package/src/contracts/loan/lend.d.ts +8 -0
  109. package/src/contracts/loan/lend.d.ts.map +1 -0
  110. package/src/contracts/loan/liquidate.d.ts +5 -0
  111. package/src/contracts/loan/liquidate.d.ts.map +1 -0
  112. package/src/contracts/loan/scheduleLiquidation.d.ts +7 -0
  113. package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -0
  114. package/src/contracts/loan/types.d.ts +176 -0
  115. package/src/contracts/loan/types.d.ts.map +1 -0
  116. package/src/contracts/loan/updateDebt.d.ts +17 -0
  117. package/src/contracts/loan/updateDebt.d.ts.map +1 -0
  118. package/src/contracts/mintAndSellNFT.d.ts +35 -0
  119. package/src/contracts/mintAndSellNFT.d.ts.map +1 -0
  120. package/src/contracts/mintPayments.d.ts +34 -0
  121. package/src/contracts/mintPayments.d.ts.map +1 -0
  122. package/src/contracts/oracle.d.ts +38 -0
  123. package/src/contracts/oracle.d.ts.map +1 -0
  124. package/src/contracts/otcDesk.d.ts +90 -0
  125. package/src/contracts/otcDesk.d.ts.map +1 -0
  126. package/src/contracts/priceAggregator.d.ts +125 -0
  127. package/src/contracts/priceAggregator.d.ts.map +1 -0
  128. package/src/contracts/priceAggregatorTypes.d.ts +83 -0
  129. package/src/contracts/priceAggregatorTypes.d.ts.map +1 -0
  130. package/src/contracts/scaledPriceAuthority.d.ts +26 -0
  131. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -0
  132. package/src/contracts/sellItems.d.ts +40 -0
  133. package/src/contracts/sellItems.d.ts.map +1 -0
  134. package/src/contracts/simpleExchange.d.ts +42 -0
  135. package/src/contracts/simpleExchange.d.ts.map +1 -0
  136. package/src/contracts/types.d.ts +87 -0
  137. package/src/contracts/types.d.ts.map +1 -0
  138. package/src/contracts/valueVow.contract.d.ts +20 -0
  139. package/src/contracts/valueVow.contract.d.ts.map +1 -0
  140. package/src/handleWarning.d.ts +4 -0
  141. package/src/handleWarning.d.ts.map +1 -0
  142. package/src/instanceRecordStorage.d.ts +5 -0
  143. package/src/instanceRecordStorage.d.ts.map +1 -0
  144. package/src/internal-types.d.ts +196 -0
  145. package/src/internal-types.d.ts.map +1 -0
  146. package/src/issuerRecord.d.ts +9 -0
  147. package/src/issuerRecord.d.ts.map +1 -0
  148. package/src/issuerStorage.d.ts +24 -0
  149. package/src/issuerStorage.d.ts.map +1 -0
  150. package/src/makeHandle.d.ts +6 -0
  151. package/src/makeHandle.d.ts.map +1 -0
  152. package/src/typeGuards.d.ts +185 -0
  153. package/src/typeGuards.d.ts.map +1 -0
  154. package/src/types.d.ts +29 -0
  155. package/src/types.d.ts.map +1 -0
  156. package/src/zoeService/createZCFVat.d.ts +2 -0
  157. package/src/zoeService/createZCFVat.d.ts.map +1 -0
  158. package/src/zoeService/escrowStorage.d.ts +12 -0
  159. package/src/zoeService/escrowStorage.d.ts.map +1 -0
  160. package/src/zoeService/feeMint.d.ts +27 -0
  161. package/src/zoeService/feeMint.d.ts.map +1 -0
  162. package/src/zoeService/installationStorage.d.ts +21 -0
  163. package/src/zoeService/installationStorage.d.ts.map +1 -0
  164. package/src/zoeService/instanceAdminStorage.d.ts +107 -0
  165. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -0
  166. package/src/zoeService/internal-types.d.ts +125 -0
  167. package/src/zoeService/internal-types.d.ts.map +1 -0
  168. package/src/zoeService/invitationQueries.d.ts +9 -0
  169. package/src/zoeService/invitationQueries.d.ts.map +1 -0
  170. package/src/zoeService/makeInvitation.d.ts +9 -0
  171. package/src/zoeService/makeInvitation.d.ts.map +1 -0
  172. package/src/zoeService/offer/burnInvitation.d.ts +11 -0
  173. package/src/zoeService/offer/burnInvitation.d.ts.map +1 -0
  174. package/src/zoeService/offer/offer.d.ts +3 -0
  175. package/src/zoeService/offer/offer.d.ts.map +1 -0
  176. package/src/zoeService/originalZoeSeat.d.ts +36 -0
  177. package/src/zoeService/originalZoeSeat.d.ts.map +1 -0
  178. package/src/zoeService/startInstance.d.ts +7 -0
  179. package/src/zoeService/startInstance.d.ts.map +1 -0
  180. package/src/zoeService/types.d.ts +238 -0
  181. package/src/zoeService/types.d.ts.map +1 -0
  182. package/src/zoeService/zoe.d.ts +70 -0
  183. package/src/zoeService/zoe.d.ts.map +1 -0
  184. package/src/zoeService/zoeSeat.d.ts +31 -0
  185. package/src/zoeService/zoeSeat.d.ts.map +1 -0
  186. package/src/zoeService/zoeStorageManager.d.ts +47 -0
  187. package/src/zoeService/zoeStorageManager.d.ts.map +1 -0
  188. package/tools/fakePriceAuthority.d.ts +37 -0
  189. package/tools/fakePriceAuthority.d.ts.map +1 -0
  190. package/tools/fakeVatAdmin.d.ts +118 -0
  191. package/tools/fakeVatAdmin.d.ts.map +1 -0
  192. package/tools/manualPriceAuthority.d.ts +33 -0
  193. package/tools/manualPriceAuthority.d.ts.map +1 -0
  194. package/tools/manualTimer.d.ts +23 -0
  195. package/tools/manualTimer.d.ts.map +1 -0
  196. package/tools/prepare-test-env-ava.d.ts +2 -0
  197. package/tools/prepare-test-env-ava.d.ts.map +1 -0
  198. package/tools/prepare-test-env.d.ts +2 -0
  199. package/tools/prepare-test-env.d.ts.map +1 -0
  200. package/tools/scriptedOracle.d.ts +39 -0
  201. package/tools/scriptedOracle.d.ts.map +1 -0
  202. package/tools/scriptedPriceAuthority.d.ts +37 -0
  203. package/tools/scriptedPriceAuthority.d.ts.map +1 -0
  204. package/tools/setup-zoe.d.ts +43 -0
  205. package/tools/setup-zoe.d.ts.map +1 -0
  206. package/tools/test-utils.d.ts +24 -0
  207. package/tools/test-utils.d.ts.map +1 -0
  208. package/tools/types.d.ts +152 -0
  209. package/tools/types.d.ts.map +1 -0
  210. package/bundles/bundle-contractFacet-js-meta.json +0 -1075
  211. package/bundles/bundle-contractFacet.d.ts +0 -7
  212. package/bundles/bundle-contractFacet.d.ts.map +0 -1
  213. package/bundles/bundle-contractFacet.js +0 -1
  214. package/bundles/bundle-valueVow.contract-esbuild.js +0 -1
  215. package/bundles/bundle-valueVow.contract-js-meta.json +0 -560
  216. package/bundles/bundle-valueVow.contract.js +0 -1
  217. package/bundles/esbuild-bundle-20251113T203237.423Z.js +0 -1
  218. package/bundles/esbuild-bundle-20251113T203238.037Z.js +0 -1
  219. package/bundles/esbuild-bundle-20251113T203238.695Z.js +0 -1
  220. package/bundles/esbuild-bundle-20251113T203327.010Z.js +0 -1
  221. package/bundles/esbuild-bundle-20251113T203330.583Z.js +0 -1
  222. package/bundles/esbuild-bundle-20251113T232226.026Z.js +0 -1
  223. package/bundles/esbuild-bundle-20251113T232229.459Z.js +0 -1
  224. package/bundles/esbuild-bundle-20251114T162409.358Z.js +0 -1
  225. package/bundles/esbuild-bundle-20251114T162409.367Z.js +0 -1
  226. package/bundles/esbuild-bundle-20251114T162417.875Z.js +0 -1
  227. package/bundles/esbuild-bundle-20251114T162419.685Z.js +0 -1
  228. package/bundles/esbuild-bundle-20251114T162420.279Z.js +0 -1
  229. package/bundles/esbuild-bundle-20251114T162421.865Z.js +0 -1
  230. package/bundles/esbuild-bundle-20251114T162422.353Z.js +0 -1
  231. package/bundles/esbuild-bundle-20251114T162423.173Z.js +0 -1
  232. package/bundles/esbuild-bundle-20251114T162427.670Z.js +0 -1
  233. package/bundles/esbuild-bundle-20251114T162429.725Z.js +0 -1
  234. package/bundles/esbuild-bundle-20251114T162429.727Z.js +0 -1
  235. package/bundles/esbuild-bundle-20251114T162430.603Z.js +0 -1
  236. package/bundles/esbuild-bundle-20251114T162431.414Z.js +0 -1
  237. package/bundles/esbuild-bundle-20251114T162433.433Z.js +0 -1
  238. package/bundles/esbuild-bundle-20251114T162435.370Z.js +0 -1
  239. package/bundles/esbuild-bundle-20251114T162437.257Z.js +0 -1
  240. package/bundles/esbuild-bundle-20251114T162438.372Z.js +0 -1
  241. package/bundles/esbuild-bundle-20251114T162438.596Z.js +0 -1
  242. package/bundles/esbuild-bundle-20251114T162439.399Z.js +0 -1
  243. package/bundles/esbuild-bundle-20251114T162439.647Z.js +0 -1
  244. package/bundles/esbuild-bundle-20251114T162441.758Z.js +0 -1
  245. package/bundles/esbuild-bundle-20251114T162441.816Z.js +0 -1
  246. package/bundles/esbuild-bundle-20251114T162442.916Z.js +0 -1
  247. package/bundles/esbuild-bundle-20251114T162443.223Z.js +0 -1
  248. package/bundles/esbuild-bundle-20251114T162443.627Z.js +0 -1
  249. package/bundles/esbuild-bundle-20251114T162444.919Z.js +0 -1
  250. package/bundles/esbuild-bundle-20251114T162445.277Z.js +0 -1
  251. package/bundles/esbuild-bundle-20251114T162446.456Z.js +0 -1
  252. package/bundles/esbuild-bundle-20251114T162446.985Z.js +0 -1
  253. package/bundles/esbuild-bundle-20251114T162447.123Z.js +0 -1
  254. package/bundles/esbuild-bundle-20251114T162448.243Z.js +0 -1
  255. package/bundles/esbuild-bundle-20251114T162448.612Z.js +0 -1
  256. package/bundles/esbuild-bundle-20251114T162448.908Z.js +0 -1
  257. package/bundles/esbuild-bundle-20251114T162449.945Z.js +0 -1
  258. package/bundles/esbuild-bundle-20251114T162450.616Z.js +0 -1
  259. package/bundles/esbuild-bundle-20251114T162451.429Z.js +0 -1
  260. package/bundles/esbuild-bundle-20251114T162451.929Z.js +0 -1
  261. package/bundles/esbuild-bundle-20251114T162452.191Z.js +0 -1
  262. package/bundles/esbuild-bundle-20251114T162452.687Z.js +0 -1
  263. package/bundles/esbuild-bundle-20251114T162453.614Z.js +0 -1
  264. package/bundles/esbuild-bundle-20251114T162454.028Z.js +0 -1
  265. package/bundles/esbuild-bundle-20251114T162454.171Z.js +0 -1
  266. package/bundles/esbuild-bundle-20251114T162455.073Z.js +0 -1
  267. package/bundles/esbuild-bundle-20251114T162455.907Z.js +0 -1
  268. package/bundles/esbuild-bundle-20251114T162500.300Z.js +0 -1
  269. package/bundles/esbuild-bundle-20251114T162501.073Z.js +0 -1
  270. package/bundles/esbuild-bundle-20251114T162502.359Z.js +0 -1
  271. package/bundles/esbuild-bundle-20251114T162502.366Z.js +0 -1
  272. package/bundles/esbuild-bundle-20251114T162503.345Z.js +0 -1
  273. package/bundles/esbuild-bundle-20251114T162503.433Z.js +0 -1
  274. package/bundles/esbuild-bundle-20251114T162504.445Z.js +0 -1
  275. package/bundles/esbuild-bundle-20251114T162505.137Z.js +0 -1
  276. package/bundles/esbuild-bundle-20251114T162505.167Z.js +0 -1
  277. package/bundles/esbuild-bundle-20251114T162505.419Z.js +0 -1
  278. package/bundles/esbuild-bundle-20251114T162515.878Z.js +0 -1
  279. package/bundles/esbuild-bundle-20251114T162516.428Z.js +0 -1
  280. package/bundles/esbuild-bundle-20251114T162518.796Z.js +0 -1
  281. package/bundles/esbuild-bundle-20251114T162521.136Z.js +0 -1
  282. package/bundles/esbuild-bundle-20251114T162521.391Z.js +0 -1
  283. package/bundles/esbuild-bundle-20251114T162522.786Z.js +0 -1
  284. package/bundles/esbuild-bundle-20251114T162523.313Z.js +0 -1
  285. package/bundles/esbuild-bundle-20251114T162524.174Z.js +0 -1
  286. package/bundles/esbuild-bundle-20251114T162526.066Z.js +0 -1
  287. package/bundles/esbuild-bundle-20251114T162527.972Z.js +0 -1
  288. package/bundles/esbuild-bundle-20251114T162533.153Z.js +0 -1
  289. package/bundles/esbuild-bundle-20251114T162537.633Z.js +0 -1
  290. package/bundles/esbuild-bundle-20251114T162603.943Z.js +0 -1
  291. package/bundles/esbuild-bundle-20251114T162604.799Z.js +0 -1
  292. package/bundles/esbuild-bundle-20251114T162605.605Z.js +0 -1
  293. package/bundles/esbuild-bundle-20251114T162606.399Z.js +0 -1
  294. package/bundles/esbuild-bundle-20251114T162607.115Z.js +0 -1
  295. package/bundles/esbuild-bundle-20251114T162607.943Z.js +0 -1
  296. package/bundles/esbuild-bundle-20251114T162608.705Z.js +0 -1
  297. package/bundles/esbuild-bundle-20251114T162609.486Z.js +0 -1
  298. package/bundles/esbuild-bundle-20251114T162610.269Z.js +0 -1
  299. package/bundles/esbuild-bundle-20251114T162611.045Z.js +0 -1
  300. package/bundles/esbuild-bundle-20251114T162611.814Z.js +0 -1
  301. package/bundles/esbuild-bundle-20251114T162612.650Z.js +0 -1
  302. package/bundles/esbuild-bundle-20251114T162613.429Z.js +0 -1
  303. package/bundles/esbuild-bundle-20251114T162614.233Z.js +0 -1
  304. package/bundles/esbuild-bundle-20251114T162640.495Z.js +0 -1
  305. package/bundles/esbuild-bundle-20251114T162950.705Z.js +0 -1
  306. package/bundles/zcf.b64 +0 -1
  307. package/bundles/zcf.zip +0 -0
@@ -0,0 +1,7 @@
1
+ export function makeStartInstance(startInstanceAccess: Pick<ZoeStorageManager, "makeZoeInstanceStorageManager" | "unwrapInstallation">, getZcfBundleCapP: () => ERef<BundleCap>, getBundleCapByIdNow: (id: string) => BundleCap, zoeBaggage: Baggage): StartInstance;
2
+ import type { ZoeStorageManager } from './internal-types.js';
3
+ import type { BundleCap } from '@agoric/swingset-vat';
4
+ import type { ERef } from '@agoric/vow';
5
+ import type { Baggage } from '@agoric/vat-data';
6
+ import type { StartInstance } from './utils.js';
7
+ //# sourceMappingURL=startInstance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AA8CO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,KAAK,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,aAAa,CAqWzB;uCAjX8D,qBAAqB;+BARxD,sBAAsB;0BAY3B,aAAa;6BAdV,kBAAkB;mCAIZ,YAAY"}
@@ -0,0 +1,238 @@
1
+ import type { AnyAmount, AssetKind, DisplayInfo, Issuer, NatValue, Payment } from '@agoric/ertp';
2
+ import type { Subscriber } from '@agoric/notifier';
3
+ import type { ERef, EReturn } from '@endo/eventual-send';
4
+ import type { Bundle, BundleID } from '@agoric/swingset-vat';
5
+ import type { ContractStartFunction, StartParams } from './utils.js';
6
+ import type { Keyword, InvitationHandle, BrandKeywordRecord, Handle, IssuerKeywordRecord } from '../types.js';
7
+ import type { Allocation } from '../types-index.js';
8
+ /**
9
+ * @see {@link https://github.com/sindresorhus/type-fest/blob/main/source/is-any.d.ts}
10
+ */
11
+ type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
12
+ /**
13
+ * Zoe provides a framework for deploying and working with smart
14
+ * contracts. It is accessed as a long-lived and well-trusted service
15
+ * that enforces offer safety for the contracts that use it. Zoe has a
16
+ * single `invitationIssuer` for the entirety of its lifetime. By
17
+ * having a reference to Zoe, a user can get the `invitationIssuer`
18
+ * and thus validate any `invitation` they receive from someone else.
19
+ *
20
+ * Zoe has two different facets: the public Zoe service and the
21
+ * contract facet (ZCF). Each contract instance has a copy of ZCF
22
+ * within its vat. The contract and ZCF never have direct access to
23
+ * the users' payments or the Zoe purses.
24
+ */
25
+ export type ZoeService = {
26
+ /**
27
+ * Zoe has a single `invitationIssuer` for the entirety of its
28
+ * lifetime. By having a reference to Zoe, a user can get the
29
+ * `invitationIssuer` and thus validate any `invitation` they receive
30
+ * from someone else. The mint associated with the invitationIssuer
31
+ * creates the ERTP payments that represent the right to interact with
32
+ * a smart contract in particular ways.
33
+ */
34
+ getInvitationIssuer: GetInvitationIssuer;
35
+ install: InstallBundle;
36
+ installBundleID: InstallBundleID;
37
+ startInstance: import('./utils.js').StartInstance;
38
+ offer: Offer;
39
+ getPublicFacet: <I extends Instance>(instance: ERef<I>) => Promise<IsAny<I> extends true ? any : I extends import('./utils.js').Instance<infer SF extends ContractStartFunction> ? IsAny<SF> extends true ? unknown : EReturn<SF>['publicFacet'] : never>;
40
+ getIssuers: GetIssuers;
41
+ getBrands: GetBrands;
42
+ getTerms: <I extends ERef<Instance>>(instance: I) => IsAny<I> extends true ? Promise<any> : I extends ERef<import('./utils.js').Instance<infer SF extends ContractStartFunction>> ? IsAny<SF> extends true ? Promise<unknown> : Promise<StartParams<SF>['terms']> : never;
43
+ getOfferFilter: (instance: ERef<Instance>) => Promise<string[]>;
44
+ getInstallationForInstance: GetInstallationForInstance;
45
+ getInstance: GetInstance;
46
+ getInstallation: GetInstallation;
47
+ /**
48
+ * Return an object with the instance, installation, description, invitation
49
+ * handle, and any custom properties specific to the contract.
50
+ */
51
+ getInvitationDetails: GetInvitationDetails;
52
+ getFeeIssuer: GetFeeIssuer;
53
+ getConfiguration: GetConfiguration;
54
+ getBundleIDFromInstallation: GetBundleIDFromInstallation;
55
+ /**
56
+ * Return the pattern (if any) associated with the invitationHandle that a
57
+ * proposal is required to match to be accepted by zoe.offer().
58
+ */
59
+ getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => import('@endo/patterns').Pattern | undefined;
60
+ };
61
+ type GetInvitationIssuer = () => Promise<Issuer<'set', InvitationDetails>>;
62
+ type GetFeeIssuer = () => Promise<Issuer<'nat'>>;
63
+ type GetConfiguration = () => {
64
+ feeIssuerConfig: FeeIssuerConfig;
65
+ };
66
+ export type GetIssuers = (instance: import('./utils.js').Instance<any>) => Promise<IssuerKeywordRecord>;
67
+ export type GetBrands = (instance: import('./utils.js').Instance<any>) => Promise<BrandKeywordRecord>;
68
+ type GetInstallationForInstance = (instance: import('./utils.js').Instance<any>) => Promise<Installation>;
69
+ export type GetInstance = (invitation: ERef<import('../types-index.js').Invitation>) => Promise<import('./utils.js').Instance<any>>;
70
+ export type GetInstallation = (invitation: ERef<import('../types-index.js').Invitation>) => Promise<Installation>;
71
+ export type GetInvitationDetails = (invitation: ERef<import('../types-index.js').Invitation<any, any>>) => Promise<InvitationDetails>;
72
+ /**
73
+ * Create an installation by safely evaluating the code and
74
+ * registering it with Zoe. Returns an installation.
75
+ */
76
+ export type InstallBundle = (bundle: Bundle | SourceBundle, bundleLabel?: string | undefined) => Promise<Installation>;
77
+ /**
78
+ * Create an installation from a Bundle ID. Returns an installation.
79
+ */
80
+ export type InstallBundleID = (bundleID: BundleID, bundleLabel?: string | undefined) => Promise<Installation>;
81
+ /**
82
+ * Verify that an alleged Installation is real, and return the Bundle ID it
83
+ * will use for contract code.
84
+ */
85
+ export type GetBundleIDFromInstallation = (allegedInstallation: ERef<Installation>) => Promise<string>;
86
+ /**
87
+ * To redeem an invitation, the user normally provides a proposal (their
88
+ * rules for the offer) as well as payments to be escrowed by Zoe. If
89
+ * either the proposal or payments would be empty, indicate this by
90
+ * omitting that argument or passing undefined, rather than passing an
91
+ * empty record.
92
+ *
93
+ * The proposal has three parts: `want` and `give` are used by Zoe to
94
+ * enforce offer safety, and `exit` is used to specify the particular
95
+ * payout-liveness policy that Zoe can guarantee. `want` and `give`
96
+ * are objects with keywords as keys and amounts as values.
97
+ * `paymentKeywordRecord` is a record with keywords as keys, and the
98
+ * values are the actual payments to be escrowed. A payment is
99
+ * expected for every rule under `give`.
100
+ */
101
+ export type Offer = <Result, Args = undefined>(invitation: ERef<import('../types-index.js').Invitation<Result, Args>>, proposal?: Proposal, paymentKeywordRecord?: PaymentPKeywordRecord, offerArgs?: Args) => Promise<UserSeat<Result>>;
102
+ /**
103
+ * Zoe uses seats to access or manipulate offers. They let contracts and users
104
+ * interact with them. Zoe has two kinds of seats. ZCFSeats are used within
105
+ * contracts and with zcf methods. UserSeats represent offers external to Zoe
106
+ * and the contract. The party who exercises an invitation and sends the offer()
107
+ * message to Zoe gets a UserSeat that can check payouts' status or retrieve the
108
+ * result of processing the offer in the contract. This varies, but examples are
109
+ * a string and an invitation for another seat.
110
+ *
111
+ * Also, a UserSeat can be handed to an agent outside Zoe and the contract,
112
+ * letting them query or monitor the current state, access the payouts and
113
+ * result, and, if it's allowed for this seat, call tryExit().
114
+ *
115
+ * Since anyone can attempt to exit the seat if they have a reference to it, you
116
+ * should only share a UserSeat with trusted parties.
117
+ *
118
+ * UserSeat includes queries for the associated offer's current state and an
119
+ * operation to request that the offer exit, as follows:
120
+ */
121
+ export type UserSeat<OR = unknown> = {
122
+ getProposal: () => Promise<ProposalRecord>;
123
+ /**
124
+ * returns a promise for a KeywordPaymentRecord containing all the payouts from
125
+ * this seat. The promise will resolve after the seat has exited.
126
+ */
127
+ getPayouts: () => Promise<PaymentPKeywordRecord>;
128
+ /**
129
+ * returns a promise for the Payment corresponding to the indicated keyword.
130
+ * The promise will resolve after the seat has exited. If there is no payment
131
+ * corresponding to the keyword, an error will be thrown. (It used to return
132
+ * undefined.)
133
+ */
134
+ getPayout: (keyword: Keyword) => Promise<Payment<any, any>>;
135
+ getOfferResult: () => Promise<OR>;
136
+ /**
137
+ * Note: Only works if the seat's `proposal` has an `OnDemand` `exit` clause. Zoe's
138
+ * offer-safety guarantee applies no matter how a seat's interaction with a
139
+ * contract ends. Under normal circumstances, the participant might be able to
140
+ * call `tryExit()`, or the contract might do something explicitly. On exiting,
141
+ * the seat holder gets its current `allocation` and the `seat` can no longer
142
+ * interact with the contract.
143
+ */
144
+ tryExit?: (() => void) | undefined;
145
+ /**
146
+ * Returns true if the seat has exited, false if it is still active.
147
+ */
148
+ hasExited: () => Promise<boolean>;
149
+ /**
150
+ * returns 1 if the proposal's
151
+ * want clause was satisfied by the final allocation, otherwise 0. This is
152
+ * numeric to support a planned enhancement called "multiples" which will allow
153
+ * the return value to be any non-negative number. The promise will resolve
154
+ * after the seat has exited.
155
+ */
156
+ numWantsSatisfied: () => Promise<0 | 1>;
157
+ /**
158
+ * return a promise for the final allocation. The promise will resolve after the
159
+ * seat has exited.
160
+ */
161
+ getFinalAllocation: () => Promise<Allocation>;
162
+ /**
163
+ * returns a subscriber that
164
+ * will be notified when the seat has exited or failed.
165
+ */
166
+ getExitSubscriber: () => Subscriber<import('../types-index.js').Completion>;
167
+ };
168
+ export type Proposal = Partial<ProposalRecord>;
169
+ export type ProposalRecord = {
170
+ give: AmountKeywordRecord;
171
+ want: AmountKeywordRecord;
172
+ exit: ExitRule;
173
+ };
174
+ /**
175
+ * The keys are keywords, and the values are amounts. For example:
176
+ * { Asset: AmountMath.make(assetBrand, 5n), Price:
177
+ * AmountMath.make(priceBrand, 9n) }
178
+ */
179
+ export type AmountKeywordRecord = Record<Keyword, AnyAmount>;
180
+ export type Waker = {
181
+ wake: () => void;
182
+ };
183
+ export type OnDemandExitRule = {
184
+ onDemand: null;
185
+ };
186
+ export type WaivedExitRule = {
187
+ waived: null;
188
+ };
189
+ export type AfterDeadlineExitRule = {
190
+ afterDeadline: {
191
+ timer: import('@agoric/time').TimerService;
192
+ deadline: import('@agoric/time').Timestamp;
193
+ };
194
+ };
195
+ /**
196
+ * The possible keys are 'waived', 'onDemand', and 'afterDeadline'.
197
+ * `timer` and `deadline` only are used for the `afterDeadline` key.
198
+ * The possible records are:
199
+ * `{ waived: null }`
200
+ * `{ onDemand: null }`
201
+ * `{ afterDeadline: { timer :Timer<Deadline>, deadline :Deadline } }`
202
+ */
203
+ export type ExitRule = OnDemandExitRule | WaivedExitRule | AfterDeadlineExitRule;
204
+ export type Instance<SF = any> = import('./utils.js').Instance<SF>;
205
+ export type ZCFSpec = {
206
+ bundleCap: import('@agoric/swingset-vat').BundleCap;
207
+ } | {
208
+ name: string;
209
+ } | {
210
+ /** Bundle ID */
211
+ id: string;
212
+ };
213
+ /**
214
+ * Opaque type for a JSONable source bundle
215
+ */
216
+ export type SourceBundle = Record<string, any>;
217
+ export type PaymentPKeywordRecord = Record<Keyword, ERef<Payment<any>>>;
218
+ export type PaymentKeywordRecord = Record<Keyword, Payment<any>>;
219
+ export type InvitationDetails = {
220
+ installation: Installation;
221
+ instance: import('./utils.js').Instance<any>;
222
+ handle: InvitationHandle;
223
+ description: string;
224
+ customDetails?: Record<string, any> | undefined;
225
+ };
226
+ export type Installation<SF = any> = import('./utils.js').Installation<SF>;
227
+ export type InstallationStart<I extends Installation> = import('./utils.js').InstallationStart<I>;
228
+ export type FeeIssuerConfig = {
229
+ name: string;
230
+ assetKind: AssetKind;
231
+ displayInfo: DisplayInfo;
232
+ };
233
+ export type ZoeFeesConfig = {
234
+ getPublicFacetFee: NatValue;
235
+ };
236
+ export type FeeMintAccess = Handle<'feeMintAccess'>;
237
+ export {};
238
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,EACR,OAAO,EACR,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,EACN,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;;OAOG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC;IACvB,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,OAAO,YAAY,EAAE,aAAa,CAAC;IAClD,KAAK,EAAE,KAAK,CAAC;IACb,c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Type<typeof makeDurableZoeKit>;
3
+ /**
4
+ * @import {VatAdminSvc, ShutdownWithFailure, BundleCap} from '@agoric/swingset-vat';
5
+ * @import {Baggage} from '@agoric/vat-data';
6
+ * @import {FeeIssuerConfig, FeeMintAccess, ZCFSpec, ZoeService} from './types.js';
7
+ * @import {GetBundleCapForID} from './internal-types.js';
8
+ */
9
+ /**
10
+ * Create a durable instance of Zoe.
11
+ *
12
+ * @param {object} options
13
+ * @param {Baggage} options.zoeBaggage - the baggage for Zoe durability. Must be provided by caller
14
+ * @param {Promise<VatAdminSvc> | VatAdminSvc} [options.vatAdminSvc] - The vatAdmin Service, which carries the
15
+ * power to create a new vat. If it's not available when makeZoe() is called, it
16
+ * must be provided later using setVatAdminService().
17
+ * @param {ShutdownWithFailure} [options.shutdownZoeVat] - a function to
18
+ * shutdown the Zoe Vat. This function needs to use the vatPowers
19
+ * available to a vat.
20
+ * @param {FeeIssuerConfig} [options.feeIssuerConfig]
21
+ * @param {ZCFSpec} [options.zcfSpec] - Pointer to the contract facet bundle.
22
+ */
23
+ export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, feeIssuerConfig, zcfSpec, }: {
24
+ zoeBaggage: Baggage;
25
+ vatAdminSvc?: VatAdminSvc | Promise<VatAdminSvc> | undefined;
26
+ shutdownZoeVat?: ShutdownWithFailure | undefined;
27
+ feeIssuerConfig?: FeeIssuerConfig | undefined;
28
+ zcfSpec?: ZCFSpec | undefined;
29
+ }): {
30
+ zoeService: import("@endo/exo").Guarded<ZoeService>;
31
+ zoeConfigFacet: import("@endo/exo").Guarded<{
32
+ updateZcfBundleId(bundleId: any): void;
33
+ }>;
34
+ /** @type {FeeMintAccess} */
35
+ feeMintAccess: FeeMintAccess;
36
+ setVatAdminService: ((lateVatAdminSvc: any) => void) & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
37
+ };
38
+ /**
39
+ * @deprecated
40
+ * Create an instance of Zoe.
41
+ *
42
+ * This will fail upgrades and should only be used in tests through the helper
43
+ * `makeZoeKitForTest`.
44
+ *
45
+ * @param {Promise<VatAdminSvc> | VatAdminSvc} [vatAdminSvc] - The vatAdmin Service, which carries the
46
+ * power to create a new vat. If it's not available when makeZoe() is called, it
47
+ * must be provided later using setVatAdminService().
48
+ * @param {ShutdownWithFailure} [shutdownZoeVat] - a function to
49
+ * shutdown the Zoe Vat. This function needs to use the vatPowers
50
+ * available to a vat.
51
+ * @param {FeeIssuerConfig} [feeIssuerConfig]
52
+ * @param {ZCFSpec} [zcfSpec] - Pointer to the contract facet bundle.
53
+ */
54
+ export function makeZoeKit(vatAdminSvc?: Promise<VatAdminSvc> | VatAdminSvc, shutdownZoeVat?: ShutdownWithFailure, feeIssuerConfig?: FeeIssuerConfig, zcfSpec?: ZCFSpec): {
55
+ zoeService: import("@endo/exo").Guarded<ZoeService>;
56
+ zoeConfigFacet: import("@endo/exo").Guarded<{
57
+ updateZcfBundleId(bundleId: any): void;
58
+ }>;
59
+ /** @type {FeeMintAccess} */
60
+ feeMintAccess: FeeMintAccess;
61
+ setVatAdminService: ((lateVatAdminSvc: any) => void) & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
62
+ };
63
+ import type { Baggage } from '@agoric/vat-data';
64
+ import type { VatAdminSvc } from '@agoric/swingset-vat';
65
+ import type { ShutdownWithFailure } from '@agoric/swingset-vat';
66
+ import type { FeeIssuerConfig } from './types.js';
67
+ import type { ZCFSpec } from './types.js';
68
+ import type { ZoeService } from './types.js';
69
+ import type { FeeMintAccess } from './types.js';
70
+ //# sourceMappingURL=zoe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoe.d.ts","sourceRoot":"","sources":["zoe.js"],"names":[],"mappings":";qBAkSa,UAAU,CAAC,OAAO,iBAAiB,CAAC;AAxQjD;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,0GAVG;IAAyB,UAAU,EAA3B,OAAO;IACsC,WAAW;IAG1B,cAAc;IAGlB,eAAe;IACvB,OAAO;CACnC;;;;;IAgNG,4BAA4B;mBAAjB,aAAa;;EAK3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,yCATW,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,mBAGlC,mBAAmB,oBAGnB,eAAe,YACf,OAAO;;;;;IArBd,4BAA4B;mBAAjB,aAAa;;EA8BxB;6BAhQsB,kBAAkB;iCADkB,sBAAsB;yCAAtB,sBAAsB;qCAEd,YAAY;6BAAZ,YAAY;gCAAZ,YAAY;mCAAZ,YAAY"}
@@ -0,0 +1,31 @@
1
+ export function makeZoeSeatAdminFactory(baggage: Baggage): (initialAllocation: Allocation, proposal: ProposalRecord, instanceAdminHelper: InstanceAdminHelper, withdrawFacet: WithdrawFacet, exitObj?: ERef<ExitObj>, offerResultIsUndefined?: boolean) => {
2
+ userSeat: import("@endo/exo").Guarded<{
3
+ getProposal(): Promise<any>;
4
+ getPayouts(): Promise<any>;
5
+ getPayout(keyword: any): Promise<any>;
6
+ getOfferResult(): Promise<any>;
7
+ hasExited(): Promise<any>;
8
+ tryExit(): Promise<any>;
9
+ numWantsSatisfied(): Promise<any>;
10
+ getExitSubscriber(): any;
11
+ getFinalAllocation(): any;
12
+ }>;
13
+ zoeSeatAdmin: import("@endo/exo").Guarded<{
14
+ replaceAllocation(replacementAllocation: any): void;
15
+ exit(completion: any): void;
16
+ fail(reason: any): void;
17
+ /** @param {HandleOfferResult} result */
18
+ resolveExitAndResult({ offerResultPromise, exitObj }: HandleOfferResult): void;
19
+ getExitSubscriber(): import("@agoric/notifier").Subscriber<any>;
20
+ finalPayouts(payments: any): Promise<void>;
21
+ }>;
22
+ };
23
+ import type { Baggage } from '@agoric/vat-data';
24
+ import type { Allocation } from './zoe.js';
25
+ import type { ProposalRecord } from '@agoric/zoe';
26
+ import type { InstanceAdminHelper } from '../internal-types.js';
27
+ import type { WithdrawFacet } from '../internal-types.js';
28
+ import type { ExitObj } from '../internal-types.js';
29
+ import type { ERef } from '@agoric/vow';
30
+ import type { HandleOfferResult } from '../internal-types.js';
31
+ //# sourceMappingURL=zoeSeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"AA8DO,iDAFI,OAAO,uBA0WL,UAAU,YACV,cAAc,uBACd,mBAAmB,iBACnB,aAAa,YACb,KAAK,OAAO,CAAC,2BACb,OAAO;;;;;;;;;;;;;;;;QA3IZ,wCAAwC;8DAA5B,iBAAiB;;;;EAoKpC;6BAlbyB,kBAAkB;gCAMf,UAAU;oCACG,aAAa;yCANjB,sBAAsB;mCAC5B,sBAAsB;6BAE5B,sBAAsB;0BAIzB,aAAa;uCALA,sBAAsB"}
@@ -0,0 +1,47 @@
1
+ export function makeZoeStorageManager(createZCFVat: CreateZCFVat, getBundleCapForID: GetBundleCapForID, shutdownZoeVat: ShutdownWithFailure, feeMint: {
2
+ getFeeIssuerKit: GetFeeIssuerKit;
3
+ getFeeIssuer: () => Issuer;
4
+ getFeeBrand: () => Brand;
5
+ }, zoeBaggage: Baggage): import("@endo/exo").GuardedKit<{
6
+ zoeServiceDataAccess: {
7
+ getInvitationIssuer: () => Issuer<"set", import("@agoric/zoe").InvitationDetails>;
8
+ getBundleIDFromInstallation(allegedInstallation: any): Promise<string | undefined>;
9
+ getPublicFacet(instance: any): any;
10
+ getBrands(instance: any): any;
11
+ getIssuers(instance: any): any;
12
+ getOfferFilter(instance: any): any;
13
+ getTerms(instance: any): any;
14
+ getInstallation(instance: any): any;
15
+ getProposalShapeForInvitation: (invitationHandle: any) => any;
16
+ installBundle: (allegedBundle: any, bundleLabel: any) => Promise<import("@agoric/zoe").Installation<any>>;
17
+ installBundleID(bundleID: any, bundleLabel: any): Promise<import("@agoric/zoe").Installation<unknown>>;
18
+ };
19
+ makeOfferAccess: {
20
+ getAssetKindByBrand: import("../internal-types.js").GetAssetKindByBrand;
21
+ getInstanceAdmin(instance: any): any;
22
+ getProposalShapeForInvitation: (invitationHandle: any) => any;
23
+ getInvitationIssuer: () => Issuer<"set", import("@agoric/zoe").InvitationDetails>;
24
+ depositPayments(proposal: any, payments: any): Promise<import("@agoric/zoe").Allocation>;
25
+ };
26
+ startInstanceAccess: {
27
+ makeZoeInstanceStorageManager: MakeZoeInstanceStorageManager;
28
+ unwrapInstallation(installationP: import("@endo/far").ERef<import("@agoric/zoe").Installation>): import("@endo/far").ERef<{
29
+ bundle?: import("@agoric/zoe").SourceBundle;
30
+ bundleCap?: import("@agoric/swingset-vat").BundleCap;
31
+ bundleID?: import("@agoric/swingset-vat/src/controller/bundle-handler.js").BundleID;
32
+ installation: import("@agoric/zoe").Installation;
33
+ }>;
34
+ };
35
+ invitationIssuerAccess: {
36
+ getInvitationIssuer: () => Issuer<"set", import("@agoric/zoe").InvitationDetails>;
37
+ };
38
+ }>;
39
+ import type { CreateZCFVat } from './internal-types.js';
40
+ import type { GetBundleCapForID } from './internal-types.js';
41
+ import type { ShutdownWithFailure } from '@agoric/swingset-vat';
42
+ import type { GetFeeIssuerKit } from './internal-types.js';
43
+ import type { Issuer } from '@agoric/ertp';
44
+ import type { Brand } from '@agoric/ertp';
45
+ import type { Baggage } from '@agoric/vat-data';
46
+ import type { MakeZoeInstanceStorageManager } from './internal-types.js';
47
+ //# sourceMappingURL=zoeStorageManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AA0EO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;kBAHZ,CAAC;qBACD,CAAF;oBAA0B,CAAC;;;;;;;GA6a9B;kCA3c8B,qBAAqB;uCAChB,qBAAqB;yCACnB,sBAAsB;qCAC1B,qBAAqB;4BAI9B,cAAc;2BACf,cAAc;6BAVZ,kBAAkB;mDAOI,qBAAqB"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @typedef {object} FakePriceAuthorityOptions
3
+ * @property {Brand<'nat'>} actualBrandIn
4
+ * @property {Brand<'nat'>} actualBrandOut
5
+ * @property {Array<number>} [priceList]
6
+ * @property {Array<[number, number]>} [tradeList]
7
+ * @property {TimerService} timer
8
+ * @property {RelativeTime} [quoteInterval]
9
+ * @property {ERef<Mint<'set', PriceDescription>>} [quoteMint]
10
+ * @property {Amount<'nat'>} [unitAmountIn]
11
+ */
12
+ /**
13
+ * TODO: multiple price Schedules for different goods, or for moving the price
14
+ * in different directions?
15
+ *
16
+ * @param {FakePriceAuthorityOptions} options
17
+ * @returns {Promise<PriceAuthority>}
18
+ */
19
+ export function makeFakePriceAuthority(options: FakePriceAuthorityOptions): Promise<PriceAuthority>;
20
+ export type FakePriceAuthorityOptions = {
21
+ actualBrandIn: Brand<"nat">;
22
+ actualBrandOut: Brand<"nat">;
23
+ priceList?: number[] | undefined;
24
+ tradeList?: [number, number][] | undefined;
25
+ timer: TimerService;
26
+ quoteInterval?: RelativeTime | undefined;
27
+ quoteMint?: ERef<Mint<"set", PriceDescription>> | undefined;
28
+ unitAmountIn?: import("@agoric/ertp").NatAmount | undefined;
29
+ };
30
+ import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
31
+ import type { Brand } from '@agoric/ertp';
32
+ import type { TimerService } from '@agoric/time';
33
+ import type { RelativeTime } from '@agoric/time';
34
+ import type { PriceDescription } from '@agoric/zoe/tools/types.js';
35
+ import type { Mint } from '@agoric/ertp';
36
+ import type { ERef } from '@agoric/vow';
37
+ //# sourceMappingURL=fakePriceAuthority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fakePriceAuthority.d.ts","sourceRoot":"","sources":["fakePriceAuthority.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,gDAHW,yBAAyB,GACvB,OAAO,CAAC,cAAc,CAAC,CAwSnC;;mBAvTa,MAAM,KAAK,CAAC;oBACZ,MAAM,KAAK,CAAC;;;WAGZ,YAAY;;;;;oCAxBmE,4BAA4B;2BAMjG,cAAc;kCAJP,cAAc;kCACd,cAAc;sCAHgD,4BAA4B;0BAOlG,cAAc;0BACd,aAAa"}
@@ -0,0 +1,118 @@
1
+ export const zcfBundleCap: any;
2
+ export default fakeVatAdmin;
3
+ declare const fakeVatAdmin: {
4
+ getBundleCap: (bundleID: any) => Promise<any>;
5
+ waitForBundleCap: (bundleID: any) => Promise<any>;
6
+ getNamedBundleCap: (name: any) => Promise<any>;
7
+ getBundleIDByName: (name: any) => Promise<string>;
8
+ createVat: (bundleCap: any, { vatParameters }?: {
9
+ vatParameters?: {} | undefined;
10
+ }) => Promise<{
11
+ root: unknown;
12
+ adminNode: {
13
+ done: () => Promise<any>;
14
+ terminateWithFailure: () => void;
15
+ upgrade: (_bundleCap: any, _options: any) => never;
16
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
17
+ done: () => Promise<any>;
18
+ terminateWithFailure: () => void;
19
+ upgrade: (_bundleCap: any, _options: any) => never;
20
+ }>;
21
+ }>;
22
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
23
+ getBundleCap: (bundleID: any) => Promise<any>;
24
+ waitForBundleCap: (bundleID: any) => Promise<any>;
25
+ getNamedBundleCap: (name: any) => Promise<any>;
26
+ getBundleIDByName: (name: any) => Promise<string>;
27
+ createVat: (bundleCap: any, { vatParameters }?: {
28
+ vatParameters?: {} | undefined;
29
+ }) => Promise<{
30
+ root: unknown;
31
+ adminNode: {
32
+ done: () => Promise<any>;
33
+ terminateWithFailure: () => void;
34
+ upgrade: (_bundleCap: any, _options: any) => never;
35
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
36
+ done: () => Promise<any>;
37
+ terminateWithFailure: () => void;
38
+ upgrade: (_bundleCap: any, _options: any) => never;
39
+ }>;
40
+ }>;
41
+ }>;
42
+ /**
43
+ * @param {(...args) => unknown} [testContextSetter]
44
+ * @param {(x: unknown) => unknown} [makeRemote]
45
+ */
46
+ export function makeFakeVatAdmin(testContextSetter?: (...args: any) => unknown, makeRemote?: (x: unknown) => unknown): {
47
+ admin: {
48
+ getBundleCap: (bundleID: any) => Promise<any>;
49
+ waitForBundleCap: (bundleID: any) => Promise<any>;
50
+ getNamedBundleCap: (name: any) => Promise<any>;
51
+ getBundleIDByName: (name: any) => Promise<string>;
52
+ createVat: (bundleCap: any, { vatParameters }?: {
53
+ vatParameters?: {} | undefined;
54
+ }) => Promise<{
55
+ root: unknown;
56
+ adminNode: {
57
+ done: () => Promise<any>;
58
+ terminateWithFailure: () => void;
59
+ upgrade: (_bundleCap: any, _options: any) => never;
60
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
61
+ done: () => Promise<any>;
62
+ terminateWithFailure: () => void;
63
+ upgrade: (_bundleCap: any, _options: any) => never;
64
+ }>;
65
+ }>;
66
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
67
+ getBundleCap: (bundleID: any) => Promise<any>;
68
+ waitForBundleCap: (bundleID: any) => Promise<any>;
69
+ getNamedBundleCap: (name: any) => Promise<any>;
70
+ getBundleIDByName: (name: any) => Promise<string>;
71
+ createVat: (bundleCap: any, { vatParameters }?: {
72
+ vatParameters?: {} | undefined;
73
+ }) => Promise<{
74
+ root: unknown;
75
+ adminNode: {
76
+ done: () => Promise<any>;
77
+ terminateWithFailure: () => void;
78
+ upgrade: (_bundleCap: any, _options: any) => never;
79
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
80
+ done: () => Promise<any>;
81
+ terminateWithFailure: () => void;
82
+ upgrade: (_bundleCap: any, _options: any) => never;
83
+ }>;
84
+ }>;
85
+ }>;
86
+ vatAdminState: {
87
+ getExitMessage: () => any;
88
+ getHasExited: () => boolean;
89
+ getExitWithFailure: () => any;
90
+ /**
91
+ * @param {string} base
92
+ * @param {EndoZipBase64Bundle | TestBundle} bundle
93
+ */
94
+ getBundleID: (base: string, bundle: EndoZipBase64Bundle | TestBundle) => string;
95
+ /**
96
+ * @param {string} base
97
+ * @param {EndoZipBase64Bundle | TestBundle} bundle
98
+ */
99
+ registerBundle: (base: string, bundle: EndoZipBase64Bundle | TestBundle) => string;
100
+ /**
101
+ * @param {string} id
102
+ * @param {EndoZipBase64Bundle | TestBundle} bundle
103
+ */
104
+ installBundle: (id: string, bundle: EndoZipBase64Bundle | TestBundle) => any;
105
+ installNamedBundle: (name: any, id: any, bundle: any) => any;
106
+ getCriticalVatKey: () => {};
107
+ getVatPowers: () => {
108
+ D: (bcap: any) => {
109
+ getBundle: () => EndoZipBase64Bundle | {
110
+ moduleFormat: "test";
111
+ } | undefined;
112
+ };
113
+ };
114
+ };
115
+ };
116
+ import type { EndoZipBase64Bundle } from '@agoric/swingset-vat';
117
+ import type { TestBundle } from '@agoric/swingset-vat';
118
+ //# sourceMappingURL=fakeVatAdmin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fakeVatAdmin.d.ts","sourceRoot":"","sources":["fakeVatAdmin.js"],"names":[],"mappings":"AA2BA,+BAA4C;;AAqL5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA8C;AAnL9C;;;GAGG;AACH,qDAHW,CAAC,GAAG,IAAI,KAAA,KAAK,OAAO,eACpB,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgH9B;;;WAGG;4BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;QAW3C;;;WAGG;+BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;QAO3C;;;WAGG;4BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;;;;;;kCA9HkB,MAAM;;;;;EAgKtE;yCAxLsE,sBAAsB;gCAAtB,sBAAsB"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @import {Amount, Brand, Issuer, IssuerKit, Payment, Purse} from '@agoric/ertp';
3
+ * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
4
+ * @import {TimerService} from '@agoric/time';
5
+ * @import {Ratio} from '@agoric/ertp';
6
+ */
7
+ /**
8
+ * @param {object} options
9
+ * @param {Brand<'nat'>} options.actualBrandIn
10
+ * @param {Brand<'nat'>} options.actualBrandOut
11
+ * @param {Ratio} options.initialPrice
12
+ * @param {TimerService} options.timer
13
+ * @param {IssuerKit<'set', PriceDescription>} [options.quoteIssuerKit]
14
+ * @returns {PriceAuthority & { setPrice: (Ratio) => void; disable: () => void }}
15
+ */
16
+ export function makeManualPriceAuthority(options: {
17
+ actualBrandIn: Brand<"nat">;
18
+ actualBrandOut: Brand<"nat">;
19
+ initialPrice: Ratio;
20
+ timer: TimerService;
21
+ quoteIssuerKit?: IssuerKit<"set", PriceDescription> | undefined;
22
+ }): PriceAuthority & {
23
+ setPrice: (Ratio: any) => void;
24
+ disable: () => void;
25
+ };
26
+ export type ManualPriceAuthority = ReturnType<typeof makeManualPriceAuthority>;
27
+ import type { Brand } from '@agoric/ertp';
28
+ import type { Ratio } from '@agoric/ertp';
29
+ import type { TimerService } from '@agoric/time';
30
+ import type { PriceDescription } from '@agoric/zoe/tools/types.js';
31
+ import type { IssuerKit } from '@agoric/ertp';
32
+ import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
33
+ //# sourceMappingURL=manualPriceAuthority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manualPriceAuthority.d.ts","sourceRoot":"","sources":["manualPriceAuthority.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,kDAPG;IAA8B,aAAa,EAAnC,MAAM,KAAK,CAAC;IACU,cAAc,EAApC,MAAM,KAAK,CAAC;IACG,YAAY,EAA3B,KAAK;IACiB,KAAK,EAA3B,YAAY;IACiC,cAAc;CACnE,GAAU,cAAc,GAAG;IAAE,QAAQ,EAAE,CAAC,KAAK,KAAA,KAAK,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CA8E/E;mCACa,UAAU,CAAC,OAAO,wBAAwB,CAAC;2BA5FU,cAAc;2BAGzD,cAAc;kCADP,cAAc;sCADgD,4BAA4B;+BADtD,cAAc;oCACY,4BAA4B"}