@agoric/zoe 0.26.2 → 0.26.3-calypso-dev-84eb287.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 (274) hide show
  1. package/README.md +7 -7
  2. package/bundles/bundle-contractFacet-js-meta.json +628 -314
  3. package/bundles/bundle-contractFacet.d.ts +3 -3
  4. package/bundles/bundle-contractFacet.js +1 -1
  5. package/exported.js +1 -12
  6. package/package.json +75 -59
  7. package/src/cleanProposal.d.ts +2 -2
  8. package/src/cleanProposal.d.ts.map +1 -1
  9. package/src/cleanProposal.js +15 -12
  10. package/src/contractFacet/evalContractCode.d.ts.map +1 -1
  11. package/src/contractFacet/evalContractCode.js +2 -2
  12. package/src/contractFacet/exit.d.ts.map +1 -1
  13. package/src/contractFacet/exit.js +1 -0
  14. package/src/contractFacet/internal-types.d.ts +2 -2
  15. package/src/contractFacet/internal-types.d.ts.map +1 -1
  16. package/src/contractFacet/internal-types.js +1 -1
  17. package/src/contractFacet/offerHandlerStorage.d.ts +4 -1
  18. package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -1
  19. package/src/contractFacet/offerHandlerStorage.js +11 -3
  20. package/src/contractFacet/reallocate.d.ts +3 -0
  21. package/src/contractFacet/reallocate.d.ts.map +1 -0
  22. package/src/contractFacet/reallocate.js +94 -0
  23. package/src/contractFacet/rightsConservation.d.ts.map +1 -1
  24. package/src/contractFacet/rightsConservation.js +3 -0
  25. package/src/contractFacet/typeGuards.d.ts +8 -0
  26. package/src/contractFacet/typeGuards.d.ts.map +1 -0
  27. package/src/contractFacet/typeGuards.js +25 -0
  28. package/src/contractFacet/types-ambient.d.ts +271 -0
  29. package/src/contractFacet/types-ambient.js +1 -0
  30. package/src/contractFacet/vatRoot.d.ts +3 -3
  31. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  32. package/src/contractFacet/zcfMint.d.ts +4 -2
  33. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  34. package/src/contractFacet/zcfMint.js +7 -7
  35. package/src/contractFacet/zcfSeat.d.ts +4 -2
  36. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  37. package/src/contractFacet/zcfSeat.js +130 -7
  38. package/src/contractFacet/zcfZygote.d.ts +1 -2
  39. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  40. package/src/contractFacet/zcfZygote.js +102 -48
  41. package/src/contractSupport/atomicTransfer.d.ts +0 -6
  42. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  43. package/src/contractSupport/atomicTransfer.js +5 -90
  44. package/src/contractSupport/bondingCurves.js +2 -2
  45. package/src/contractSupport/durability.d.ts +3 -3
  46. package/src/contractSupport/durability.d.ts.map +1 -1
  47. package/src/contractSupport/durability.js +5 -5
  48. package/src/contractSupport/index.d.ts +1 -0
  49. package/src/contractSupport/index.js +1 -0
  50. package/src/contractSupport/prepare-ownable.d.ts +11 -0
  51. package/src/contractSupport/prepare-ownable.d.ts.map +1 -0
  52. package/src/contractSupport/prepare-ownable.js +100 -0
  53. package/src/contractSupport/priceAuthority.d.ts +23 -15
  54. package/src/contractSupport/priceAuthority.d.ts.map +1 -1
  55. package/src/contractSupport/priceAuthority.js +33 -18
  56. package/src/contractSupport/priceAuthorityInitial.d.ts +3 -2
  57. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  58. package/src/contractSupport/priceAuthorityInitial.js +6 -3
  59. package/src/contractSupport/priceAuthorityQuoteMint.d.ts +2 -1
  60. package/src/contractSupport/priceAuthorityQuoteMint.d.ts.map +1 -1
  61. package/src/contractSupport/priceAuthorityQuoteMint.js +23 -27
  62. package/src/contractSupport/priceAuthorityTransform.d.ts +13 -11
  63. package/src/contractSupport/priceAuthorityTransform.d.ts.map +1 -1
  64. package/src/contractSupport/priceAuthorityTransform.js +10 -8
  65. package/src/contractSupport/priceQuote.d.ts +7 -5
  66. package/src/contractSupport/priceQuote.d.ts.map +1 -1
  67. package/src/contractSupport/priceQuote.js +5 -1
  68. package/src/contractSupport/ratio.d.ts +2 -2
  69. package/src/contractSupport/ratio.d.ts.map +1 -1
  70. package/src/contractSupport/ratio.js +19 -15
  71. package/src/contractSupport/recorder.d.ts +33 -119
  72. package/src/contractSupport/recorder.d.ts.map +1 -1
  73. package/src/contractSupport/recorder.js +21 -10
  74. package/src/contractSupport/safeMath.d.ts +7 -7
  75. package/src/contractSupport/safeMath.d.ts.map +1 -1
  76. package/src/contractSupport/statistics.d.ts +1 -1
  77. package/src/contractSupport/statistics.d.ts.map +1 -1
  78. package/src/contractSupport/topics.d.ts +1 -1
  79. package/src/contractSupport/topics.d.ts.map +1 -1
  80. package/src/contractSupport/{types.d.ts → types-ambient.d.ts} +4 -4
  81. package/src/contractSupport/types-ambient.d.ts.map +1 -0
  82. package/src/contractSupport/{types.js → types-ambient.js} +1 -1
  83. package/src/contractSupport/zoeHelpers.d.ts +1 -1
  84. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  85. package/src/contractSupport/zoeHelpers.js +6 -12
  86. package/src/contracts/auction/firstPriceLogic.d.ts.map +1 -1
  87. package/src/contracts/auction/firstPriceLogic.js +5 -8
  88. package/src/contracts/auction/index.d.ts +10 -10
  89. package/src/contracts/auction/index.d.ts.map +1 -1
  90. package/src/contracts/auction/index.js +3 -3
  91. package/src/contracts/auction/secondPriceLogic.d.ts.map +1 -1
  92. package/src/contracts/auction/secondPriceLogic.js +1 -4
  93. package/src/contracts/automaticRefund.d.ts +1 -1
  94. package/src/contracts/automaticRefund.d.ts.map +1 -1
  95. package/src/contracts/autoswap.d.ts.map +1 -1
  96. package/src/contracts/autoswap.js +8 -9
  97. package/src/contracts/barterExchange.d.ts +1 -1
  98. package/src/contracts/barterExchange.d.ts.map +1 -1
  99. package/src/contracts/barterExchange.js +2 -3
  100. package/src/contracts/callSpread/calculateShares.d.ts +1 -8
  101. package/src/contracts/callSpread/calculateShares.d.ts.map +1 -1
  102. package/src/contracts/callSpread/calculateShares.js +1 -1
  103. package/src/contracts/callSpread/fundedCallSpread.d.ts +4 -0
  104. package/src/contracts/callSpread/fundedCallSpread.d.ts.map +1 -1
  105. package/src/contracts/callSpread/fundedCallSpread.js +6 -4
  106. package/src/contracts/callSpread/payoffHandler.d.ts.map +1 -1
  107. package/src/contracts/callSpread/payoffHandler.js +3 -2
  108. package/src/contracts/callSpread/percent.d.ts +2 -4
  109. package/src/contracts/callSpread/percent.d.ts.map +1 -1
  110. package/src/contracts/callSpread/position.d.ts +2 -2
  111. package/src/contracts/callSpread/pricedCallSpread.d.ts +6 -5
  112. package/src/contracts/callSpread/pricedCallSpread.d.ts.map +1 -1
  113. package/src/contracts/callSpread/pricedCallSpread.js +9 -5
  114. package/src/contracts/callSpread/{types.d.ts → types-ambient.d.ts} +3 -3
  115. package/src/contracts/callSpread/types-ambient.d.ts.map +1 -0
  116. package/src/contracts/coveredCall-durable.d.ts +2 -4
  117. package/src/contracts/coveredCall-durable.d.ts.map +1 -1
  118. package/src/contracts/exported.js +3 -3
  119. package/src/contracts/loan/borrow.d.ts.map +1 -1
  120. package/src/contracts/loan/borrow.js +7 -4
  121. package/src/contracts/loan/close.d.ts.map +1 -1
  122. package/src/contracts/loan/close.js +3 -7
  123. package/src/contracts/loan/index.d.ts +5 -1
  124. package/src/contracts/loan/index.d.ts.map +1 -1
  125. package/src/contracts/loan/index.js +4 -0
  126. package/src/contracts/loan/liquidate.d.ts +1 -12
  127. package/src/contracts/loan/liquidate.d.ts.map +1 -1
  128. package/src/contracts/loan/liquidate.js +4 -2
  129. package/src/contracts/loan/scheduleLiquidation.d.ts.map +1 -1
  130. package/src/contracts/loan/scheduleLiquidation.js +2 -1
  131. package/src/contracts/loan/{types.d.ts → types-ambient.d.ts} +16 -17
  132. package/src/contracts/loan/types-ambient.d.ts.map +1 -0
  133. package/src/contracts/loan/{types.js → types-ambient.js} +11 -18
  134. package/src/contracts/loan/updateDebt.js +1 -1
  135. package/src/contracts/mintAndSellNFT.d.ts.map +1 -1
  136. package/src/contracts/mintPayments.d.ts +14 -6
  137. package/src/contracts/mintPayments.d.ts.map +1 -1
  138. package/src/contracts/mintPayments.js +1 -1
  139. package/src/contracts/oracle.d.ts +6 -2
  140. package/src/contracts/oracle.d.ts.map +1 -1
  141. package/src/contracts/oracle.js +10 -3
  142. package/src/contracts/otcDesk.d.ts +3 -3
  143. package/src/contracts/otcDesk.d.ts.map +1 -1
  144. package/src/contracts/otcDesk.js +1 -1
  145. package/src/contracts/priceAggregator.d.ts +25 -17
  146. package/src/contracts/priceAggregator.d.ts.map +1 -1
  147. package/src/contracts/priceAggregator.js +33 -32
  148. package/src/contracts/priceAggregatorTypes.d.ts +2 -2
  149. package/src/contracts/priceAggregatorTypes.d.ts.map +1 -1
  150. package/src/contracts/scaledPriceAuthority.d.ts +3 -4
  151. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  152. package/src/contracts/scaledPriceAuthority.js +6 -0
  153. package/src/contracts/sellItems.d.ts +2 -2
  154. package/src/contracts/sellItems.d.ts.map +1 -1
  155. package/src/contracts/sellItems.js +3 -4
  156. package/src/contracts/simpleExchange.d.ts +3 -3
  157. package/src/contracts/{types.d.ts → types-ambient.d.ts} +1 -1
  158. package/src/contracts/types-ambient.d.ts.map +1 -0
  159. package/src/handleWarning.d.ts.map +1 -1
  160. package/src/instanceRecordStorage.d.ts +1 -1
  161. package/src/instanceRecordStorage.d.ts.map +1 -1
  162. package/src/internal-types.d.ts +21 -32
  163. package/src/internal-types.d.ts.map +1 -1
  164. package/src/internal-types.js +19 -58
  165. package/src/issuerRecord.d.ts +1 -1
  166. package/src/issuerRecord.d.ts.map +1 -1
  167. package/src/issuerStorage.d.ts +3 -3
  168. package/src/issuerStorage.d.ts.map +1 -1
  169. package/src/issuerStorage.js +12 -28
  170. package/src/makeHandle.d.ts +2 -2
  171. package/src/makeHandle.d.ts.map +1 -1
  172. package/src/makeHandle.js +1 -1
  173. package/src/typeGuards.d.ts +114 -20
  174. package/src/typeGuards.d.ts.map +1 -1
  175. package/src/typeGuards.js +19 -20
  176. package/src/types-ambient.d.ts +41 -0
  177. package/src/types-ambient.d.ts.map +1 -0
  178. package/src/{types.js → types-ambient.js} +7 -15
  179. package/src/zoeService/escrowStorage.d.ts +1 -1
  180. package/src/zoeService/escrowStorage.d.ts.map +1 -1
  181. package/src/zoeService/escrowStorage.js +20 -27
  182. package/src/zoeService/feeMint.d.ts +9 -16
  183. package/src/zoeService/feeMint.d.ts.map +1 -1
  184. package/src/zoeService/feeMint.js +21 -15
  185. package/src/zoeService/installationStorage.d.ts +5 -20
  186. package/src/zoeService/installationStorage.d.ts.map +1 -1
  187. package/src/zoeService/installationStorage.js +11 -7
  188. package/src/zoeService/instanceAdminStorage.d.ts +22 -42
  189. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
  190. package/src/zoeService/instanceAdminStorage.js +2 -1
  191. package/src/zoeService/internal-types.d.ts +12 -12
  192. package/src/zoeService/internal-types.d.ts.map +1 -1
  193. package/src/zoeService/internal-types.js +6 -6
  194. package/src/zoeService/invitationQueries.d.ts.map +1 -1
  195. package/src/zoeService/invitationQueries.js +7 -5
  196. package/src/zoeService/makeInvitation.d.ts +3 -3
  197. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  198. package/src/zoeService/makeInvitation.js +25 -21
  199. package/src/zoeService/offer/burnInvitation.d.ts.map +1 -1
  200. package/src/zoeService/offer/offer.d.ts.map +1 -1
  201. package/src/zoeService/offer/offer.js +2 -5
  202. package/src/zoeService/originalZoeSeat.d.ts +34 -0
  203. package/src/zoeService/originalZoeSeat.d.ts.map +1 -0
  204. package/src/zoeService/originalZoeSeat.js +353 -0
  205. package/src/zoeService/startInstance.d.ts +3 -3
  206. package/src/zoeService/startInstance.d.ts.map +1 -1
  207. package/src/zoeService/startInstance.js +82 -37
  208. package/src/zoeService/{types.d.ts → types-ambient.d.ts} +23 -28
  209. package/src/zoeService/types-ambient.d.ts.map +1 -0
  210. package/src/zoeService/{types.js → types-ambient.js} +19 -32
  211. package/src/zoeService/utils.d.ts +57 -58
  212. package/src/zoeService/utils.test-d.d.ts +2 -0
  213. package/src/zoeService/utils.test-d.d.ts.map +1 -0
  214. package/src/zoeService/utils.test-d.ts +33 -0
  215. package/src/zoeService/zoe.d.ts +14 -8
  216. package/src/zoeService/zoe.d.ts.map +1 -1
  217. package/src/zoeService/zoe.js +39 -11
  218. package/src/zoeService/zoeSeat.d.ts +15 -45
  219. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  220. package/src/zoeService/zoeSeat.js +215 -115
  221. package/src/zoeService/zoeStorageManager.d.ts +13 -47
  222. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  223. package/src/zoeService/zoeStorageManager.js +13 -6
  224. package/tools/fakePriceAuthority.d.ts +9 -8
  225. package/tools/fakePriceAuthority.d.ts.map +1 -1
  226. package/tools/fakePriceAuthority.js +21 -17
  227. package/tools/fakeVatAdmin.d.ts +10 -10
  228. package/tools/manualPriceAuthority.d.ts +11 -6
  229. package/tools/manualPriceAuthority.d.ts.map +1 -1
  230. package/tools/manualPriceAuthority.js +16 -3
  231. package/tools/manualTimer.d.ts +17 -40
  232. package/tools/manualTimer.d.ts.map +1 -1
  233. package/tools/manualTimer.js +30 -16
  234. package/tools/prepare-test-env.js +1 -1
  235. package/tools/scriptedOracle.d.ts +3 -3
  236. package/tools/scriptedOracle.d.ts.map +1 -1
  237. package/tools/scriptedOracle.js +1 -1
  238. package/tools/scriptedPriceAuthority.d.ts +4 -0
  239. package/tools/scriptedPriceAuthority.d.ts.map +1 -1
  240. package/tools/scriptedPriceAuthority.js +8 -3
  241. package/tools/setup-zoe.d.ts +10 -6
  242. package/tools/setup-zoe.d.ts.map +1 -1
  243. package/tools/setup-zoe.js +16 -1
  244. package/tools/test-utils.d.ts +20 -0
  245. package/tools/test-utils.d.ts.map +1 -0
  246. package/tools/test-utils.js +26 -0
  247. package/tools/types.d.ts +21 -21
  248. package/tools/types.d.ts.map +1 -1
  249. package/tools/types.js +10 -10
  250. package/CHANGELOG.md +0 -1171
  251. package/src/contractFacet/types.d.ts +0 -191
  252. package/src/contractFacet/types.d.ts.map +0 -1
  253. package/src/contractFacet/types.js +0 -256
  254. package/src/contractSupport/types.d.ts.map +0 -1
  255. package/src/contracts/callSpread/types.d.ts.map +0 -1
  256. package/src/contracts/loan/types.d.ts.map +0 -1
  257. package/src/contracts/types.d.ts.map +0 -1
  258. package/src/objArrayConversion.d.ts +0 -5
  259. package/src/objArrayConversion.d.ts.map +0 -1
  260. package/src/objArrayConversion.js +0 -35
  261. package/src/types.d.ts +0 -45
  262. package/src/types.d.ts.map +0 -1
  263. package/src/zoeService/types.d.ts.map +0 -1
  264. package/tools/internal-types.d.ts +0 -12
  265. package/tools/internal-types.d.ts.map +0 -1
  266. package/tools/internal-types.js +0 -14
  267. package/tools/priceAuthorityRegistry.d.ts +0 -20
  268. package/tools/priceAuthorityRegistry.d.ts.map +0 -1
  269. package/tools/priceAuthorityRegistry.js +0 -209
  270. package/tools/types-ambient.d.ts +0 -142
  271. package/tools/types-ambient.d.ts.map +0 -1
  272. package/tools/types-ambient.js +0 -160
  273. /package/src/contracts/callSpread/{types.js → types-ambient.js} +0 -0
  274. /package/src/contracts/{types.js → types-ambient.js} +0 -0
package/exported.js CHANGED
@@ -1,12 +1 @@
1
- // @jessie-check
2
-
3
- import './src/contractFacet/types.js';
4
- import './src/zoeService/types.js';
5
- import './src/contractSupport/types.js';
6
- import './src/contracts/exported.js';
7
- import './src/types.js';
8
- import './tools/types-ambient.js';
9
- import '@agoric/notifier/exported.js';
10
- import '@agoric/ertp/exported.js';
11
- import '@agoric/store/exported.js';
12
- import '@agoric/swingset-vat/exported.js';
1
+ // Dummy file for .d.ts twin to declare ambients
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "@agoric/zoe",
3
- "version": "0.26.2",
3
+ "version": "0.26.3-calypso-dev-84eb287.0+84eb287",
4
4
  "description": "Zoe: the Smart Contract Framework for Offer Enforcement",
5
5
  "type": "module",
6
6
  "main": "./src/zoeService/zoe.js",
7
7
  "engines": {
8
- "node": ">=14.15.0"
8
+ "node": "^18.12 || ^20.9"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "yarn build:bundles",
12
12
  "build:bundles": "node scripts/build-bundles.js",
13
- "prepack": "echo \"export {}; \" | cat - tools/types-ambient.js > tools/types.js && tsc --build jsconfig.build.json",
13
+ "prepack": "tsc --build tsconfig.build.json",
14
14
  "postpack": "git clean -f '*.d.ts*'",
15
15
  "test": "ava --verbose",
16
16
  "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
17
- "test:unit": "ava 'test/unitTests/**/test-*.js' -T 1m --verbose",
18
- "test:swingset": "ava 'test/swingsetTests/**/test-*.js' -T 10m --verbose",
17
+ "test:unit": "ava 'test/unitTests' -T 1m --verbose",
18
+ "test:swingset": "ava 'test/swingsetTests' -T 10m --verbose",
19
19
  "test:xs": "yarn test:xs-unit",
20
20
  "test:xs-unit": "ava-xs --verbose",
21
- "test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 'test/swingsetTests/**/test-*.js'",
21
+ "test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 'test/swingsetTests'",
22
22
  "build-zcfBundle": "yarn build:bundles",
23
23
  "lint-fix": "yarn lint:eslint --fix",
24
24
  "lint": "run-s --continue-on-error lint:*",
25
25
  "lint:eslint": "eslint .",
26
- "lint:types": "tsc -p jsconfig.json"
26
+ "lint:types": "tsc"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",
@@ -43,30 +43,38 @@
43
43
  },
44
44
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
45
45
  "dependencies": {
46
- "@agoric/assert": "^0.6.0",
47
- "@agoric/ertp": "^0.16.2",
48
- "@agoric/internal": "^0.3.2",
49
- "@agoric/notifier": "^0.6.2",
50
- "@agoric/store": "^0.9.2",
51
- "@agoric/swingset-vat": "^0.32.2",
52
- "@agoric/time": "^0.3.2",
53
- "@agoric/vat-data": "^0.5.2",
54
- "@endo/bundle-source": "^2.5.1",
55
- "@endo/captp": "^3.1.1",
56
- "@endo/eventual-send": "^0.17.2",
57
- "@endo/far": "^0.2.18",
58
- "@endo/import-bundle": "^0.3.4",
59
- "@endo/marshal": "^0.8.5",
60
- "@endo/nat": "^4.1.27",
61
- "@endo/patterns": "^0.2.2",
62
- "@endo/promise-kit": "^0.2.56"
46
+ "@agoric/assert": "0.6.1-calypso-dev-84eb287.0+84eb287",
47
+ "@agoric/base-zone": "0.1.1-calypso-dev-84eb287.0+84eb287",
48
+ "@agoric/ertp": "0.16.3-calypso-dev-84eb287.0+84eb287",
49
+ "@agoric/internal": "0.3.3-calypso-dev-84eb287.0+84eb287",
50
+ "@agoric/notifier": "0.6.3-calypso-dev-84eb287.0+84eb287",
51
+ "@agoric/store": "0.9.3-calypso-dev-84eb287.0+84eb287",
52
+ "@agoric/swingset-liveslots": "0.10.3-calypso-dev-84eb287.0+84eb287",
53
+ "@agoric/swingset-vat": "0.32.3-calypso-dev-84eb287.0+84eb287",
54
+ "@agoric/time": "0.3.3-calypso-dev-84eb287.0+84eb287",
55
+ "@agoric/vat-data": "0.5.3-calypso-dev-84eb287.0+84eb287",
56
+ "@agoric/zone": "0.2.3-calypso-dev-84eb287.0+84eb287",
57
+ "@endo/bundle-source": "^3.2.3",
58
+ "@endo/captp": "^4.2.0",
59
+ "@endo/common": "^1.2.2",
60
+ "@endo/eventual-send": "^1.2.2",
61
+ "@endo/exo": "^1.5.0",
62
+ "@endo/far": "^1.1.2",
63
+ "@endo/import-bundle": "^1.1.2",
64
+ "@endo/marshal": "^1.5.0",
65
+ "@endo/nat": "^5.0.7",
66
+ "@endo/pass-style": "^1.4.0",
67
+ "@endo/patterns": "^1.4.0",
68
+ "@endo/promise-kit": "^1.1.2",
69
+ "yargs-parser": "^21.1.1"
63
70
  },
64
71
  "devDependencies": {
65
- "@endo/init": "^0.5.56",
66
- "ava": "^5.2.0",
67
- "c8": "^7.13.0",
72
+ "@agoric/kmarshal": "0.1.1-calypso-dev-84eb287.0+84eb287",
73
+ "@endo/init": "^1.1.2",
74
+ "ava": "^5.3.0",
75
+ "c8": "^9.1.0",
68
76
  "import-meta-resolve": "^2.2.1",
69
- "tsd": "^0.28.1"
77
+ "tsd": "^0.30.7"
70
78
  },
71
79
  "files": [
72
80
  "bundles/",
@@ -80,51 +88,59 @@
80
88
  "exclude": [
81
89
  "# path/url/import.meta stuff",
82
90
  "unitTests/contracts/",
83
- "test/swingsetTests/privateArgs/test-privateArgs.js",
84
- "test/swingsetTests/brokenContracts/test-crashingContract.js",
85
- "test/swingsetTests/offerArgs/test-offerArgs.js",
86
- "test/swingsetTests/makeKind/test-makeKind.js",
87
- "test/swingsetTests/zoe/test-zoe.js",
88
- "test/swingsetTests/runMint/test-runMint.js",
89
- "test/unitTests/test-zoe.js",
90
- "test/unitTests/test-scriptedOracle.js",
91
- "test/unitTests/test-makeKind.js",
92
- "test/unitTests/test-instanceStorage.js",
93
- "test/unitTests/contractSupport/test-depositTo.js",
94
- "test/unitTests/contractSupport/test-withdrawFrom.js",
95
- "test/unitTests/contractSupport/test-offerTo.js",
96
- "test/unitTests/zcf/test-zcfSeat.js",
97
- "test/unitTests/zcf/test-zcfSeat-exit.js",
91
+ "test/swingsetTests/privateArgs/privateArgs.test.js",
92
+ "test/swingsetTests/brokenContracts/crashingContract.test.js",
93
+ "test/swingsetTests/offerArgs/offerArgs.test.js",
94
+ "test/swingsetTests/makeKind/makeKind.test.js",
95
+ "test/swingsetTests/zoe/zoe.test.js",
96
+ "test/swingsetTests/runMint/runMint.test.js",
97
+ "test/unitTests/zoe.test.js",
98
+ "test/unitTests/scriptedOracle.test.js",
99
+ "test/unitTests/makeKind.test.js",
100
+ "test/unitTests/instanceStorage.test.js",
101
+ "test/unitTests/contractSupport/depositTo.test.js",
102
+ "test/unitTests/contractSupport/withdrawFrom.test.js",
103
+ "test/unitTests/contractSupport/offerTo.test.js",
104
+ "test/unitTests/zcf/zcfSeat.test.js",
105
+ "test/unitTests/zcf/zcfSeat-exit.test.js",
98
106
  "test/unitTests/zcf/setupZcfTest.js",
99
- "test/unitTests/zcf/test-feeMintAccess.js",
107
+ "test/unitTests/zcf/feeMintAccess.test.js",
100
108
  "# import.meta.url by way of setupZcfTest",
101
- "test/unitTests/test-zoe.js",
102
- "test/unitTests/test-blockedOffers.js",
103
- "test/unitTests/zcf/test-reallocate-empty.js",
104
- "test/unitTests/zcf/test-zoeHelpersWZcf.js",
105
- "test/unitTests/zcf/test-reallocateForZCFMint.js",
106
- "test/unitTests/zcf/test-zcf.js",
107
- "test/unitTests/zcf/test-allStagedSeatsUsed.js",
109
+ "test/unitTests/zoe.test.js",
110
+ "test/unitTests/zoe-startInstance.test.js",
111
+ "test/unitTests/blockedOffers.test.js",
112
+ "test/unitTests/zcf/reallocate-empty.test.js",
113
+ "test/unitTests/zcf/zoeHelpersWZcf.test.js",
114
+ "test/unitTests/zcf/reallocateForZCFMint.test.js",
115
+ "test/unitTests/zcf/atomicRearrange.test.js",
116
+ "test/unitTests/zcf/zcf.test.js",
117
+ "test/unitTests/zcf/allStagedSeatsUsed.test.js",
108
118
  "# ManualTimer.setWakeup: no function",
109
- "test/unitTests/test-fakePriceAuthority.js",
110
- "test/unitTests/test-manualTimer.js",
119
+ "test/unitTests/fakePriceAuthority.test.js",
120
+ "test/unitTests/manualTimer.test.js",
111
121
  "# hangs",
112
- "test-makeKind.js",
113
- "test/unitTests/test-scriptedOracle.js",
114
- "test/unitTests/test-zoe.js",
115
- "test/unitTests/zcf/test-allStagedSeatsUsed.js",
122
+ "makeKind.test.js",
123
+ "test/unitTests/scriptedOracle.test.js",
124
+ "test/unitTests/zoe.test.js",
125
+ "test/unitTests/zcf/allStagedSeatsUsed.test.js",
116
126
  "# We use SWINGSET_WORKER_TYPE=xs ava to run these...",
117
127
  "swingsetTests"
118
128
  ]
119
129
  },
120
130
  "ava": {
121
131
  "files": [
122
- "test/**/test-*.js"
132
+ "test/**/*.test.*"
133
+ ],
134
+ "require": [
135
+ "@endo/init/debug.js"
123
136
  ],
124
137
  "timeout": "20m"
125
138
  },
126
139
  "publishConfig": {
127
140
  "access": "public"
128
141
  },
129
- "gitHead": "b66bf7c881ae462fcb617cd6e8d41b5c40ec58ef"
142
+ "typeCoverage": {
143
+ "atLeast": 84.92
144
+ },
145
+ "gitHead": "84eb287915c8255d68e845a9b6e10c790f0d54cb"
130
146
  }
@@ -3,7 +3,7 @@ export function assertKeywordName(keyword: any): void;
3
3
  export function cleanKeywords(uncleanKeywordRecord: {
4
4
  [name: string]: any;
5
5
  }): string[];
6
- export function coerceAmountPatternKeywordRecord(allegedAmountKeywordRecord: any, getAssetKindByBrand: any): Record<string, any>;
7
- export function coerceAmountKeywordRecord(allegedAmountKeywordRecord: any, getAssetKindByBrand: any): Record<string, any>;
6
+ export function coerceAmountPatternKeywordRecord(allegedAmountKeywordRecord: any, getAssetKindByBrand: any): Record<string | number | symbol, any>;
7
+ export function coerceAmountKeywordRecord(allegedAmountKeywordRecord: unknown, getAssetKindByBrand: any): AmountKeywordRecord;
8
8
  export function cleanProposal(proposal: Proposal, getAssetKindByBrand: GetAssetKindByBrand): ProposalRecord;
9
9
  //# sourceMappingURL=cleanProposal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanProposal.d.ts","sourceRoot":"","sources":["cleanProposal.js"],"names":[],"mappings":"AAWA,qCAAsC;AAa/B,sDAYN;AAMM;;IAFM,MAAM,EAAE,CAYpB;AAEM,iIA0BN;AAEM,0HAUN;AA4CM,wCAJI,QAAQ,uBACR,mBAAmB,GACjB,cAAc,CA6B1B"}
1
+ {"version":3,"file":"cleanProposal.d.ts","sourceRoot":"","sources":["cleanProposal.js"],"names":[],"mappings":"AAWA,qCAAsC;AAa/B,sDAYN;AAMM,oDAHI;IAAC,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,GACnB,MAAM,EAAE,CAYpB;AAEM,mJAsBN;AAQM,sEAJI,OAAO,uBACP,GAAC,GACC,mBAAmB,CAa/B;AA4CM,wCAJI,QAAQ,uBACR,mBAAmB,GACjB,cAAc,CA6B1B"}
@@ -1,9 +1,9 @@
1
1
  import { assert, q, Fail } from '@agoric/assert';
2
2
  import { AmountMath, getAssetKind } from '@agoric/ertp';
3
+ import { objectMap } from '@agoric/internal';
3
4
  import { assertRecord } from '@endo/marshal';
4
5
  import { assertKey, assertPattern, mustMatch, isKey } from '@agoric/store';
5
6
  import { FullProposalShape } from './typeGuards.js';
6
- import { arrayToObj } from './objArrayConversion.js';
7
7
 
8
8
  import './internal-types.js';
9
9
 
@@ -56,12 +56,11 @@ export const coerceAmountPatternKeywordRecord = (
56
56
  allegedAmountKeywordRecord,
57
57
  getAssetKindByBrand,
58
58
  ) => {
59
- const keywords = cleanKeywords(allegedAmountKeywordRecord);
60
-
61
- const amounts = Object.values(allegedAmountKeywordRecord);
62
- // Check that each value can be coerced using the AmountMath
63
- // indicated by brand. `AmountMath.coerce` throws if coercion fails.
64
- const coercedAmounts = amounts.map(amount => {
59
+ cleanKeywords(allegedAmountKeywordRecord);
60
+ // FIXME objectMap should constrain the mapping function by the record's type
61
+ return objectMap(allegedAmountKeywordRecord, amount => {
62
+ // Check that each value can be coerced using the AmountMath
63
+ // indicated by brand. `AmountMath.coerce` throws if coercion fails.
65
64
  if (isKey(amount)) {
66
65
  const brandAssetKind = getAssetKindByBrand(amount.brand);
67
66
  const assetKind = getAssetKind(amount);
@@ -75,11 +74,14 @@ export const coerceAmountPatternKeywordRecord = (
75
74
  return amount;
76
75
  }
77
76
  });
78
-
79
- // Recreate the amountKeywordRecord with coercedAmounts.
80
- return harden(arrayToObj(coercedAmounts, keywords));
81
77
  };
82
78
 
79
+ /**
80
+ *
81
+ * @param {unknown} allegedAmountKeywordRecord
82
+ * @param {*} getAssetKindByBrand
83
+ * @returns {AmountKeywordRecord}
84
+ */
83
85
  export const coerceAmountKeywordRecord = (
84
86
  allegedAmountKeywordRecord,
85
87
  getAssetKindByBrand,
@@ -89,6 +91,7 @@ export const coerceAmountKeywordRecord = (
89
91
  getAssetKindByBrand,
90
92
  );
91
93
  assertKey(result);
94
+ // @ts-expect-error checked cast
92
95
  return result;
93
96
  };
94
97
 
@@ -112,10 +115,10 @@ const assertKeywordNotInBoth = (want, give) => {
112
115
  const wantKeywordSet = new Set(ownKeys(want));
113
116
  const giveKeywords = ownKeys(give);
114
117
 
115
- giveKeywords.forEach(keyword => {
118
+ for (const keyword of giveKeywords) {
116
119
  !wantKeywordSet.has(keyword) ||
117
120
  Fail`a keyword cannot be in both 'want' and 'give'`;
118
- });
121
+ }
119
122
  };
120
123
 
121
124
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"evalContractCode.d.ts","sourceRoot":"","sources":["evalContractCode.js"],"names":[],"mappings":"AASA,yFA0BC"}
1
+ {"version":3,"file":"evalContractCode.d.ts","sourceRoot":"","sources":["evalContractCode.js"],"names":[],"mappings":"AAQA,yFA2BC"}
@@ -4,7 +4,6 @@
4
4
  /* global globalThis */
5
5
 
6
6
  import { importBundle } from '@endo/import-bundle';
7
- import { assert } from '@agoric/assert';
8
7
  import { handlePWarning } from '../handleWarning.js';
9
8
 
10
9
  const evalContractBundle = (bundle, additionalEndowments = {}) => {
@@ -16,7 +15,8 @@ const evalContractBundle = (bundle, additionalEndowments = {}) => {
16
15
 
17
16
  const defaultEndowments = {
18
17
  console: louderConsole,
19
- assert,
18
+ // See https://github.com/Agoric/agoric-sdk/issues/9515
19
+ assert: globalThis.assert,
20
20
  VatData: globalThis.VatData,
21
21
  };
22
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAyBO,sGAuGN"}
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["exit.js"],"names":[],"mappings":"AAyBO,sGAwGN"}
@@ -35,6 +35,7 @@ export const makeMakeExiter = baggage => {
35
35
  exit() {
36
36
  const { state } = this;
37
37
  state.zcfSeat.exit();
38
+ state.zcfSeat = undefined;
38
39
  },
39
40
  },
40
41
  {
@@ -1,5 +1,5 @@
1
- type TestJigSetter = ({ zcf: ZCF }: {
2
- zcf: any;
1
+ type TestJigSetter = ({ zcf }: {
2
+ zcf: ZCF;
3
3
  }) => void;
4
4
  type ZCFZygote = {
5
5
  startContract: (instanceAdminFromZoe: ERef<ZoeInstanceAdmin>, instanceRecordFromZoe: InstanceRecord, issuerStorageFromZoe: IssuerRecords, privateArgs?: object) => Promise<ExecuteContractResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;MAG+B,IAAI;;0CAKE,KAAK,gBAAgB,CAAC,yBAC7B,cAAc,qDAEvB,MAAM,KACnB,QAAQ,qBAAqB,CAAC;oCACT,MAAM,KAAK,IAAI"}
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;;mBAK5B,CAAC,oBAAoB,EAAE,IAAI,CAAC,gBAAgB,CAAC,EAC1D,qBAA2B,EAAE,cAAc,EAC3C,oBAA0B,EAAE,aAAa,EACzC,WAAiB,CAAC,EAAE,MAAM,KACnB,OAAO,CAAC,qBAAqB,CAAC;qBACxB,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI"}
@@ -1,7 +1,7 @@
1
1
  // @jessie-check
2
2
 
3
3
  /**
4
- * @typedef {( {zcf: ZCF} ) => void} TestJigSetter
4
+ * @typedef {( {zcf}: {zcf: ZCF} ) => void} TestJigSetter
5
5
  */
6
6
 
7
7
  /**
@@ -1,5 +1,8 @@
1
1
  export function makeOfferHandlerStorage(zcfBaggage: any): {
2
- storeOfferHandler: (offerHandler: OfferHandler) => InvitationHandle;
2
+ storeOfferHandler: (offerHandler: any) => Handle<"Invitation">;
3
3
  takeOfferHandler: (invitationHandle: InvitationHandle, details?: Details) => OfferHandler;
4
4
  };
5
+ export type PassableOfferHandler = RemotableBrand<any, any> & RemotableObject & OfferHandler;
6
+ import type { RemotableBrand } from '@endo/eventual-send';
7
+ import type { RemotableObject } from '@endo/pass-style';
5
8
  //# sourceMappingURL=offerHandlerStorage.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"offerHandlerStorage.d.ts","sourceRoot":"","sources":["offerHandlerStorage.js"],"names":[],"mappings":"AAiBO;;yCAgCwB,gBAAgB,YAAY,OAAO,KAAK,YAAY;EAsBlF;mCAzDY,2BAAiB,eAAe,GAAG,YAAY;oCAL3B,qBAAqB;qCACpB,kBAAkB"}
@@ -6,9 +6,18 @@ import { canBeDurable, provideDurableWeakMapStore } from '@agoric/vat-data';
6
6
 
7
7
  import { defineDurableHandle } from '../makeHandle.js';
8
8
 
9
+ /**
10
+ * @import {RemotableBrand} from '@endo/eventual-send';
11
+ * @import {RemotableObject} from '@endo/pass-style';
12
+ */
13
+
14
+ /**
15
+ * @typedef {RemotableBrand & RemotableObject & OfferHandler} PassableOfferHandler
16
+ */
17
+
9
18
  export const makeOfferHandlerStorage = zcfBaggage => {
10
19
  const makeInvitationHandle = defineDurableHandle(zcfBaggage, 'Invitation');
11
- /** @type {WeakMapStore<InvitationHandle, OfferHandler>} */
20
+ /** @type {WeakMapStore<InvitationHandle, PassableOfferHandler>} */
12
21
 
13
22
  // ZCF needs to ephemerally hold on to ephemeral handlers, and durably hold
14
23
  // onto handlers that are intended to be durable. We keep two stores and store
@@ -18,13 +27,12 @@ export const makeOfferHandlerStorage = zcfBaggage => {
18
27
  const invitationHandleToEphemeralHandler = makeScalarWeakMapStore(
19
28
  'invitationHandleToEphemeralHandler',
20
29
  );
21
- /** @type {WeakMapStore<InvitationHandle, OfferHandler>} */
30
+ /** @type {WeakMapStore<InvitationHandle, PassableOfferHandler>} */
22
31
  const invitationHandleToDurableHandler = provideDurableWeakMapStore(
23
32
  zcfBaggage,
24
33
  'invitationHandleToDurableHandler',
25
34
  );
26
35
 
27
- /** @type {(offerHandler: OfferHandler) => InvitationHandle} */
28
36
  const storeOfferHandler = offerHandler => {
29
37
  if (typeof offerHandler === 'function') {
30
38
  offerHandler = ToFarFunction('offerHandler', offerHandler);
@@ -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,KAAK,CAAC,YAAY,CAAC,GACjB,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,CA8E5C;8BAtFa,KAAK,CAAC,mBAAmB,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { makeScalarMapStore } from '@agoric/vat-data';
2
+
3
+ import { assertRightsConserved } from './rightsConservation.js';
4
+ import { addToAllocation, subtractFromAllocation } from './allocationMath.js';
5
+
6
+ const { Fail } = assert;
7
+
8
+ /** @typedef {Array<AmountKeywordRecord>} TransactionList */
9
+
10
+ /**
11
+ * Convert from a list of transfer descriptions ([fromSeat, toSeat, fromAmount,
12
+ * toAmount], with many parts optional) to a list of resulting allocations for
13
+ * each of the seats mentioned.
14
+ *
15
+ * @param {Array<TransferPart>} transfers
16
+ * @returns {[ZCFSeat, AmountKeywordRecord][]}
17
+ */
18
+ export const makeAllocationMap = transfers => {
19
+ /** @type {MapStore<ZCFSeat, [TransactionList, TransactionList]>} */
20
+ const allocations = makeScalarMapStore();
21
+
22
+ const getAllocations = seat => {
23
+ if (allocations.has(seat)) {
24
+ return allocations.get(seat);
25
+ }
26
+
27
+ /** @type {[TransactionList, TransactionList]} */
28
+ const pair = [[], []];
29
+ allocations.init(seat, pair);
30
+ return pair;
31
+ };
32
+
33
+ const decrementAllocation = (seat, decrement) => {
34
+ const [incr, decr] = getAllocations(seat);
35
+
36
+ const newDecr = [...decr, decrement];
37
+ allocations.set(seat, [incr, newDecr]);
38
+ };
39
+
40
+ const incrementAllocation = (seat, increment) => {
41
+ const [incr, decr] = getAllocations(seat);
42
+
43
+ const newIncr = [...incr, increment];
44
+ allocations.set(seat, [newIncr, decr]);
45
+ };
46
+
47
+ for (const [fromSeat, toSeat, fromAmounts, toAmounts] of transfers) {
48
+ if (fromSeat) {
49
+ if (!fromAmounts) {
50
+ throw Fail`Transfer from ${fromSeat} must say how much`;
51
+ }
52
+ decrementAllocation(fromSeat, fromAmounts);
53
+ if (toSeat) {
54
+ // Conserved transfer between seats
55
+ if (toAmounts) {
56
+ // distinct amounts, so we check conservation.
57
+ assertRightsConserved(
58
+ Object.values(fromAmounts),
59
+ Object.values(toAmounts),
60
+ );
61
+ incrementAllocation(toSeat, toAmounts);
62
+ } else {
63
+ // fromAmounts will be used for toAmounts as well
64
+ incrementAllocation(toSeat, fromAmounts);
65
+ }
66
+ } else {
67
+ // Transfer only from fromSeat
68
+ !toAmounts ||
69
+ Fail`Transfer without toSeat cannot have toAmounts ${toAmounts}`;
70
+ }
71
+ } else {
72
+ toSeat || Fail`Transfer must have at least one of fromSeat or toSeat`;
73
+ // Transfer only to toSeat
74
+ !fromAmounts ||
75
+ Fail`Transfer without fromSeat cannot have fromAmounts ${fromAmounts}`;
76
+ toAmounts || Fail`Transfer to ${toSeat} must say how much`;
77
+ incrementAllocation(toSeat, toAmounts);
78
+ }
79
+ }
80
+
81
+ /** @type {[ZCFSeat,AmountKeywordRecord][]} */
82
+ const resultingAllocations = [];
83
+ for (const [seat, [incrList, decrList]] of allocations.entries()) {
84
+ let newAlloc = seat.getCurrentAllocation();
85
+ for (const incr of incrList) {
86
+ newAlloc = addToAllocation(newAlloc, incr);
87
+ }
88
+ for (const decr of decrList) {
89
+ newAlloc = subtractFromAllocation(newAlloc, decr);
90
+ }
91
+ resultingAllocations.push([seat, newAlloc]);
92
+ }
93
+ return resultingAllocations;
94
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"rightsConservation.d.ts","sourceRoot":"","sources":["rightsConservation.js"],"names":[],"mappings":"AAkFA;;;;;;;;;GASG;AACH,uDANW,MAAM,EAAE,cAER,MAAM,EAAE,GAEN,IAAI,CAMhB"}
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"}
@@ -3,6 +3,9 @@ import { assert, Fail } from '@agoric/assert';
3
3
  import { AmountMath } from '@agoric/ertp';
4
4
 
5
5
  import '../internal-types.js';
6
+ /**
7
+ * @import {MapStore} from '@agoric/store';
8
+ */
6
9
 
7
10
  /**
8
11
  * Iterate over the amounts and sum, storing the sums in a
@@ -0,0 +1,8 @@
1
+ export const ZcfSeatShape: import("@endo/patterns").Matcher;
2
+ export const ZcfMintI: import("@endo/patterns").InterfaceGuard<{
3
+ getIssuerRecord: import("@endo/patterns").MethodGuard;
4
+ mintGains: import("@endo/patterns").MethodGuard;
5
+ burnLosses: import("@endo/patterns").MethodGuard;
6
+ }>;
7
+ export const ZcfI: import("@endo/patterns").InterfaceGuard<any>;
8
+ //# sourceMappingURL=typeGuards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAGA,4DAAmD;AAEnD;;;;GAMG;AAEH,gEAWE"}
@@ -0,0 +1,25 @@
1
+ import { M } from '@endo/patterns';
2
+ import { AmountKeywordRecordShape, IssuerRecordShape } from '../typeGuards.js';
3
+
4
+ export const ZcfSeatShape = M.remotable('zcfSeat');
5
+
6
+ export const ZcfMintI = M.interface('ZcfMint', {
7
+ getIssuerRecord: M.call().returns(IssuerRecordShape),
8
+ mintGains: M.call(AmountKeywordRecordShape)
9
+ .optional(ZcfSeatShape)
10
+ .returns(ZcfSeatShape),
11
+ burnLosses: M.call(AmountKeywordRecordShape, ZcfSeatShape).returns(),
12
+ });
13
+
14
+ export const ZcfI = M.interface(
15
+ 'ZCF',
16
+ {
17
+ makeInvitation: M.call(M.raw(), M.string())
18
+ .optional(M.record(), M.pattern())
19
+ .returns(M.promise()),
20
+ setTestJig: M.call().optional(M.raw()).returns(),
21
+ },
22
+ {
23
+ defaultGuards: 'passable',
24
+ },
25
+ );