@agoric/zoe 0.26.3-upgrade-18a-dev-4ee0508.0 → 0.26.3-upgrade-20-dev-086463b.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 (191) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +288 -288
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +30 -30
  4. package/src/cleanProposal.d.ts +2 -0
  5. package/src/cleanProposal.d.ts.map +1 -1
  6. package/src/cleanProposal.js +4 -2
  7. package/src/contractFacet/exit.d.ts +1 -1
  8. package/src/contractFacet/exit.d.ts.map +1 -1
  9. package/src/contractFacet/offerHandlerStorage.d.ts +1 -1
  10. package/src/contractFacet/offerHandlerStorage.d.ts.map +1 -1
  11. package/src/contractFacet/offerHandlerStorage.js +5 -0
  12. package/src/contractFacet/reallocate.d.ts.map +1 -1
  13. package/src/contractFacet/reallocate.js +4 -0
  14. package/src/contractFacet/rightsConservation.d.ts.map +1 -1
  15. package/src/contractFacet/rightsConservation.js +0 -1
  16. package/src/contractFacet/types.d.ts +184 -0
  17. package/src/contractFacet/types.d.ts.map +1 -0
  18. package/src/contractFacet/{types-ambient.d.ts → types.ts} +66 -91
  19. package/src/contractFacet/vatRoot.d.ts +8 -2
  20. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  21. package/src/contractFacet/vatRoot.js +5 -4
  22. package/src/contractFacet/zcfMint.d.ts +4 -3
  23. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  24. package/src/contractFacet/zcfMint.js +9 -21
  25. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  26. package/src/contractFacet/zcfSeat.js +12 -188
  27. package/src/contractFacet/zcfZygote.d.ts +9 -1
  28. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  29. package/src/contractFacet/zcfZygote.js +27 -9
  30. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  31. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  32. package/src/contractSupport/atomicTransfer.js +4 -0
  33. package/src/contractSupport/bondingCurves.js +1 -1
  34. package/src/contractSupport/durability.d.ts +1 -0
  35. package/src/contractSupport/durability.d.ts.map +1 -1
  36. package/src/contractSupport/durability.js +4 -0
  37. package/src/contractSupport/index.d.ts +2 -2
  38. package/src/contractSupport/index.js +2 -19
  39. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  40. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  41. package/src/contractSupport/priceAuthorityInitial.js +3 -1
  42. package/src/contractSupport/priceQuote.d.ts +1 -0
  43. package/src/contractSupport/priceQuote.d.ts.map +1 -1
  44. package/src/contractSupport/priceQuote.js +6 -1
  45. package/src/contractSupport/recorder.d.ts +8 -24
  46. package/src/contractSupport/recorder.d.ts.map +1 -1
  47. package/src/contractSupport/recorder.js +6 -0
  48. package/src/contractSupport/types-ambient.d.ts.map +1 -1
  49. package/src/contractSupport/types-ambient.js +1 -0
  50. package/src/contractSupport/zoeHelpers.d.ts +11 -2
  51. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  52. package/src/contractSupport/zoeHelpers.js +7 -2
  53. package/src/contracts/atomicSwap.d.ts +1 -1
  54. package/src/contracts/auction/index.d.ts +3 -3
  55. package/src/contracts/automaticRefund.d.ts +3 -3
  56. package/src/contracts/autoswap.d.ts +4 -0
  57. package/src/contracts/autoswap.d.ts.map +1 -1
  58. package/src/contracts/autoswap.js +4 -0
  59. package/src/contracts/barterExchange.d.ts +2 -2
  60. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  61. package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
  62. package/src/contracts/coveredCall-durable.d.ts +1 -1
  63. package/src/contracts/coveredCall.d.ts +1 -1
  64. package/src/contracts/coveredCall.d.ts.map +1 -1
  65. package/src/contracts/coveredCall.js +1 -6
  66. package/src/contracts/loan/index.d.ts +1 -1
  67. package/src/contracts/loan/types-ambient.d.ts +13 -13
  68. package/src/contracts/loan/types-ambient.d.ts.map +1 -1
  69. package/src/contracts/loan/types-ambient.js +17 -17
  70. package/src/contracts/mintPayments.d.ts +2 -2
  71. package/src/contracts/oracle.d.ts +3 -0
  72. package/src/contracts/oracle.d.ts.map +1 -1
  73. package/src/contracts/oracle.js +1 -0
  74. package/src/contracts/priceAggregator.d.ts +2 -0
  75. package/src/contracts/priceAggregator.d.ts.map +1 -1
  76. package/src/contracts/priceAggregator.js +14 -11
  77. package/src/contracts/scaledPriceAuthority.d.ts +1 -0
  78. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  79. package/src/contracts/scaledPriceAuthority.js +1 -0
  80. package/src/contracts/sellItems.d.ts +1 -1
  81. package/src/contracts/simpleExchange.d.ts +5 -0
  82. package/src/contracts/simpleExchange.d.ts.map +1 -1
  83. package/src/contracts/simpleExchange.js +4 -0
  84. package/src/contracts/types-ambient.d.ts +7 -7
  85. package/src/contracts/types-ambient.d.ts.map +1 -1
  86. package/src/contracts/types-ambient.js +7 -7
  87. package/src/contracts/valueVow.contract.d.ts +5 -2
  88. package/src/contracts/valueVow.contract.d.ts.map +1 -1
  89. package/src/contracts/valueVow.contract.js +1 -0
  90. package/src/instanceRecordStorage.d.ts.map +1 -1
  91. package/src/instanceRecordStorage.js +3 -1
  92. package/src/internal-types.d.ts +15 -6
  93. package/src/internal-types.d.ts.map +1 -1
  94. package/src/internal-types.js +9 -5
  95. package/src/issuerRecord.d.ts +3 -2
  96. package/src/issuerRecord.d.ts.map +1 -1
  97. package/src/issuerRecord.js +6 -2
  98. package/src/issuerStorage.d.ts +3 -2
  99. package/src/issuerStorage.d.ts.map +1 -1
  100. package/src/issuerStorage.js +10 -5
  101. package/src/typeGuards.d.ts +10 -5
  102. package/src/typeGuards.d.ts.map +1 -1
  103. package/src/typeGuards.js +9 -6
  104. package/src/types-ambient.d.ts +0 -40
  105. package/src/types-ambient.d.ts.map +1 -1
  106. package/src/types-ambient.js +4 -42
  107. package/src/types-index.d.ts +4 -0
  108. package/src/types-index.js +2 -0
  109. package/src/types.d.ts +29 -0
  110. package/src/types.d.ts.map +1 -0
  111. package/src/types.ts +44 -0
  112. package/src/zoeService/escrowStorage.d.ts.map +1 -1
  113. package/src/zoeService/escrowStorage.js +4 -0
  114. package/src/zoeService/feeMint.d.ts +1 -0
  115. package/src/zoeService/feeMint.d.ts.map +1 -1
  116. package/src/zoeService/feeMint.js +4 -0
  117. package/src/zoeService/installationStorage.d.ts +4 -5
  118. package/src/zoeService/installationStorage.d.ts.map +1 -1
  119. package/src/zoeService/installationStorage.js +8 -8
  120. package/src/zoeService/instanceAdminStorage.d.ts +1 -0
  121. package/src/zoeService/instanceAdminStorage.d.ts.map +1 -1
  122. package/src/zoeService/instanceAdminStorage.js +4 -0
  123. package/src/zoeService/internal-types.d.ts +12 -5
  124. package/src/zoeService/internal-types.d.ts.map +1 -1
  125. package/src/zoeService/internal-types.js +10 -10
  126. package/src/zoeService/invitationQueries.d.ts +3 -3
  127. package/src/zoeService/invitationQueries.js +3 -3
  128. package/src/zoeService/makeInvitation.d.ts +1 -0
  129. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  130. package/src/zoeService/makeInvitation.js +3 -1
  131. package/src/zoeService/offer/burnInvitation.d.ts +1 -1
  132. package/src/zoeService/offer/burnInvitation.d.ts.map +1 -1
  133. package/src/zoeService/offer/burnInvitation.js +3 -2
  134. package/src/zoeService/offer/offer.d.ts +1 -0
  135. package/src/zoeService/offer/offer.d.ts.map +1 -1
  136. package/src/zoeService/offer/offer.js +3 -1
  137. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  138. package/src/zoeService/originalZoeSeat.js +6 -4
  139. package/src/zoeService/startInstance.d.ts +1 -1
  140. package/src/zoeService/startInstance.d.ts.map +1 -1
  141. package/src/zoeService/startInstance.js +5 -4
  142. package/src/zoeService/types-ambient.d.ts +0 -220
  143. package/src/zoeService/types-ambient.d.ts.map +1 -1
  144. package/src/zoeService/types-ambient.js +4 -323
  145. package/src/zoeService/types.d.ts +238 -0
  146. package/src/zoeService/types.d.ts.map +1 -0
  147. package/src/zoeService/types.ts +307 -0
  148. package/src/zoeService/utils.d.ts +18 -10
  149. package/src/zoeService/utils.test-d.ts +1 -0
  150. package/src/zoeService/zoe.d.ts +11 -1
  151. package/src/zoeService/zoe.d.ts.map +1 -1
  152. package/src/zoeService/zoe.js +8 -1
  153. package/src/zoeService/zoeSeat.d.ts +1 -4
  154. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  155. package/src/zoeService/zoeSeat.js +6 -4
  156. package/src/zoeService/zoeStorageManager.d.ts +5 -5
  157. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  158. package/src/zoeService/zoeStorageManager.js +4 -3
  159. package/tools/fakePriceAuthority.d.ts +3 -2
  160. package/tools/fakePriceAuthority.d.ts.map +1 -1
  161. package/tools/fakePriceAuthority.js +9 -6
  162. package/tools/fakeVatAdmin.d.ts +10 -4
  163. package/tools/fakeVatAdmin.d.ts.map +1 -1
  164. package/tools/fakeVatAdmin.js +21 -10
  165. package/tools/manualPriceAuthority.d.ts +6 -2
  166. package/tools/manualPriceAuthority.d.ts.map +1 -1
  167. package/tools/manualPriceAuthority.js +8 -6
  168. package/tools/scriptedOracle.d.ts +7 -3
  169. package/tools/scriptedOracle.d.ts.map +1 -1
  170. package/tools/scriptedOracle.js +4 -0
  171. package/tools/scriptedPriceAuthority.d.ts.map +1 -1
  172. package/tools/scriptedPriceAuthority.js +6 -5
  173. package/tools/setup-zoe.d.ts +12 -6
  174. package/tools/setup-zoe.d.ts.map +1 -1
  175. package/tools/setup-zoe.js +38 -5
  176. package/tools/test-utils.d.ts +10 -6
  177. package/tools/test-utils.d.ts.map +1 -1
  178. package/tools/test-utils.js +6 -2
  179. package/tools/types.d.ts +5 -0
  180. package/tools/types.d.ts.map +1 -1
  181. package/tools/types.js +5 -0
  182. package/src/contractFacet/internal-types.d.ts +0 -8
  183. package/src/contractFacet/internal-types.d.ts.map +0 -1
  184. package/src/contractFacet/internal-types.js +0 -15
  185. package/src/contractFacet/types-ambient.js +0 -1
  186. package/src/contractSupport/ratio.d.ts +0 -37
  187. package/src/contractSupport/ratio.d.ts.map +0 -1
  188. package/src/contractSupport/ratio.js +0 -419
  189. package/src/contractSupport/safeMath.d.ts +0 -11
  190. package/src/contractSupport/safeMath.d.ts.map +0 -1
  191. package/src/contractSupport/safeMath.js +0 -49
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;GAEG;AAGH,4DAAuC;AAEvC,6CAA6C;AAC7C,oCADW,aAAa,gBAAgB,CAAC,CAC4B;AACrE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CACsB;AACzD,mEAAiE;AACjE,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CACwB;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,iEAOE;;;;;;;;;;AAeF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA4BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAOM,uCAHI,QAAQ,GACN,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,QAAQ,GACN,IAAI,IAAI,qBAAqB,CAKzC;AAGD,sEAKG;AAEH;;GAEG;AAEH,0EAGG;AAEH,4DAAmD;AACnD;;;;GAIG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,8DAAuD;AACvD,2DAGE;AAEF,0EAQE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;GAKG;AAEH,6DASE;AAEF;;GAKG;;;;;kCA5X4B,kBAAkB;4BAN1C,cAAc"}
1
+ {"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["typeGuards.js"],"names":[],"mappings":"AAeA;;;GAGG;AAGH,4DAAuC;AAEvC,6CAA6C;AAC7C,oCADW,aAAa,gBAAgB,CAAC,CAC4B;AACrE,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CACsB;AACzD,mEAAiE;AACjE,yCAAyC;AACzC,gCADW,aAAa,YAAY,CAAC,CACwB;AAC7D,yDAA6C;AAE7C,wEAA8E;AAC9E,+EAGE;AACF,0EAGE;AACF,wEAA8E;AAC9E,yEAGE;AACF,uEAA4E;AAE5E,4CAA4C;AAC5C,gCADW,aAAa,eAAe,CAAC,CAQtC;;;;;;;;;;AAeF,kEAAiD;AAE1C,6EAA4D;AACnE,0DAAmD;;;;;;AA4BnD,2BAA2B;AAC3B,6DAAsE;AAEtE,kEAIG;AAEI,uDAGN;AAOM,uCAHI,OAAO,eAAe,EAAE,QAAQ,GAC9B,IAAI,IAAI,cAAc,CAKlC;AAOM,8CAHI,OAAO,eAAe,EAAE,QAAQ,GAC9B,IAAI,IAAI,qBAAqB,CAKzC;AAGD,sEAAsE;AACtE,qCADW,aAAa,OAAO,eAAe,EAAE,iBAAiB,CAAC,CAM/D;AAEH;;GAEG;AAEH,0EAGG;AAEH,4DAAmD;AACnD;;;;GAIG;AAEH,kEAA+D;AAE/D;;GAEG;AAEH,+DAAsD;AACtD,kEAA+D;AAC/D;;;;;;;;;;;;;;;;;GAkCG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDH,8DAAuD;AACvD,2DAGE;AAEF,0EAQE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DF;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;GAKG;AAEH,6DASE;AAEF;;GAKG;;;;;kCA/X4B,kBAAkB;qCACQ,aAAa;2CAAb,aAAa;4BAP/D,cAAc"}
package/src/typeGuards.js CHANGED
@@ -15,6 +15,7 @@ import { TimestampShape } from '@agoric/time';
15
15
 
16
16
  /**
17
17
  * @import {TypedPattern} from '@agoric/internal';
18
+ * @import {AfterDeadlineExitRule, ZoeIssuerRecord} from '@agoric/zoe';
18
19
  */
19
20
 
20
21
  // keywords have an initial cap
@@ -45,6 +46,7 @@ export const IssuerPKeywordRecordShape = M.recordOf(
45
46
  );
46
47
  export const BrandKeywordRecordShape = M.recordOf(KeywordShape, BrandShape);
47
48
 
49
+ /** @type {TypedPattern<ZoeIssuerRecord>} */
48
50
  export const IssuerRecordShape = M.splitRecord(
49
51
  {
50
52
  brand: BrandShape,
@@ -114,7 +116,7 @@ export const isOnDemandExitRule = exit => {
114
116
  harden(isOnDemandExitRule);
115
117
 
116
118
  /**
117
- * @param {ExitRule} exit
119
+ * @param {import('./types-index').ExitRule} exit
118
120
  * @returns {exit is WaivedExitRule}
119
121
  */
120
122
  export const isWaivedExitRule = exit => {
@@ -124,7 +126,7 @@ export const isWaivedExitRule = exit => {
124
126
  harden(isWaivedExitRule);
125
127
 
126
128
  /**
127
- * @param {ExitRule} exit
129
+ * @param {import('./types-index').ExitRule} exit
128
130
  * @returns {exit is AfterDeadlineExitRule}
129
131
  */
130
132
  export const isAfterDeadlineExitRule = exit => {
@@ -133,6 +135,7 @@ export const isAfterDeadlineExitRule = exit => {
133
135
  };
134
136
  harden(isAfterDeadlineExitRule);
135
137
 
138
+ /** @type {TypedPattern<import('./types-index').InvitationDetails>} */
136
139
  export const InvitationElementShape = M.splitRecord({
137
140
  description: M.string(),
138
141
  handle: InvitationHandleShape,
@@ -277,7 +280,7 @@ export const ZoeStorageManagerIKit = {
277
280
  getBundleIDFromInstallation: M.call(InstallationShape).returns(
278
281
  M.eref(M.string()),
279
282
  ),
280
- installBundle: M.call(M.or(InstanceHandleShape, BundleShape))
283
+ installBundle: M.call(BundleShape)
281
284
  .optional(M.string())
282
285
  .returns(M.promise()),
283
286
  installBundleID: M.call(M.string())
@@ -310,7 +313,7 @@ export const ZoeStorageManagerIKit = {
310
313
  InstallationShape,
311
314
  M.any(),
312
315
  IssuerPKeywordRecordShape,
313
- M.or(InstanceHandleShape, BundleShape),
316
+ InstanceHandleShape,
314
317
  M.or(BundleCapShape, BundleShape),
315
318
  M.string(),
316
319
  ).returns(M.promise()),
@@ -352,7 +355,7 @@ export const ZoeServiceI = M.interface('ZoeService', {
352
355
  getInstallationForInstance: M.callWhen(M.await(InstanceHandleShape)).returns(
353
356
  M.eref(M.remotable('Installation')),
354
357
  ),
355
- getBundleIDFromInstallation: M.call(InstallationShape).returns(
358
+ getBundleIDFromInstallation: M.callWhen(M.await(InstallationShape)).returns(
356
359
  M.eref(M.string()),
357
360
  ),
358
361
 
@@ -367,7 +370,7 @@ export const ZoeServiceI = M.interface('ZoeService', {
367
370
  }),
368
371
  getInvitationDetails: M.call(M.eref(InvitationShape)).returns(M.any()),
369
372
  getProposalShapeForInvitation: M.call(InvitationHandleShape).returns(
370
- M.opt(ProposalShape),
373
+ M.opt(M.pattern()),
371
374
  ),
372
375
  });
373
376
 
@@ -1,41 +1 @@
1
- /**
2
- * Alias for RemotableObject
3
- */
4
- type Handle<H extends string> = import("@endo/marshal").RemotableObject<H>;
5
- type Keyword = string;
6
- /**
7
- * - an opaque handle for an invitation
8
- */
9
- type InvitationHandle = Handle<"Invitation">;
10
- type IssuerKeywordRecord = Record<Keyword, Issuer<any>>;
11
- type IssuerPKeywordRecord = Record<Keyword, import("@endo/far").ERef<Issuer<any>>>;
12
- type BrandKeywordRecord = Record<Keyword, Brand<any>>;
13
- type StandardTerms = {
14
- /**
15
- * - record with
16
- * keywords keys, issuer values
17
- */
18
- issuers: IssuerKeywordRecord;
19
- /**
20
- * - record with keywords
21
- * keys, brand values
22
- */
23
- brands: BrandKeywordRecord;
24
- };
25
- type AnyTerms = StandardTerms & Record<string, any>;
26
- type InstanceRecord = {
27
- installation: import("./zoeService/utils.js").Installation<any>;
28
- instance: import("./zoeService/utils.js").Instance<any>;
29
- /**
30
- * - contract parameters
31
- */
32
- terms: AnyTerms;
33
- };
34
- type IssuerRecord<K extends AssetKind = globalThis.AssetKind, M extends import("@endo/patterns").Key = import("@endo/patterns").Key> = {
35
- brand: Brand<K>;
36
- issuer: Issuer<K, M>;
37
- assetKind: K;
38
- displayInfo?: globalThis.DisplayInfo<K> | undefined;
39
- };
40
- type Allocation = Record<Keyword, import("@agoric/ertp/src/types.js").AnyAmount>;
41
1
  //# sourceMappingURL=types-ambient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":";;;YAGsB,CAAC,SAAV,MAAQ,IACR,OAAO,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;eAI1C,MAAM;;;;wBACN,MAAM,CAAC,YAAY,CAAC;2BACpB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;4BAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;0BACtD,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;;;;;;aAK1B,mBAAmB;;;;;YAEnB,kBAAkB;;gBAGnB,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;kBAGlC,OAAO,uBAAuB,EAAE,YAAY,CAAC,GAAG,CAAC;cACjD,OAAO,uBAAuB,EAAE,QAAQ,CAAC,GAAG,CAAC;;;;WAC7C,QAAQ;;kBAII,CAAC,SAAb,SAAU,yBACqB,CAAC,SAAjC,OAAQ,gBAAgB,EAAE,GAAI;WAE7B,KAAK,CAAC,CAAC,CAAC;YACR,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;eACZ,CAAC;;;kBAKF,MAAM,CAAC,OAAO,EAAE,OAAO,2BAA2B,EAAE,SAAS,CAAC"}
1
+ {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":""}
@@ -1,43 +1,5 @@
1
- // @jessie-check
1
+ /** @file @deprecated */
2
2
 
3
- /**
4
- * @template {string} H - the name of the handle
5
- * @typedef {import('@endo/marshal').RemotableObject<H>} Handle Alias for RemotableObject
6
- */
7
-
8
- /**
9
- * @typedef {string} Keyword
10
- * @typedef {Handle<'Invitation'>} InvitationHandle - an opaque handle for an invitation
11
- * @typedef {Record<Keyword, Issuer<any>>} IssuerKeywordRecord
12
- * @typedef {Record<Keyword, import('@endo/far').ERef<Issuer<any>>>} IssuerPKeywordRecord
13
- * @typedef {Record<Keyword, Brand<any>>} BrandKeywordRecord
14
- */
15
-
16
- /**
17
- * @typedef {object} StandardTerms
18
- * @property {IssuerKeywordRecord} issuers - record with
19
- * keywords keys, issuer values
20
- * @property {BrandKeywordRecord} brands - record with keywords
21
- * keys, brand values
22
- *
23
- * @typedef {StandardTerms & Record<string, any>} AnyTerms
24
- *
25
- * @typedef {object} InstanceRecord
26
- * @property {import('./zoeService/utils.js').Installation<any>} installation
27
- * @property {import('./zoeService/utils.js').Instance<any>} instance
28
- * @property {AnyTerms} terms - contract parameters
29
- */
30
-
31
- /**
32
- * @template {AssetKind} [K=AssetKind]
33
- * @template {import('@endo/patterns').Key} [M=import('@endo/patterns').Key] member kind, for Amounts that have member values
34
- * @typedef {object} IssuerRecord
35
- * @property {Brand<K>} brand
36
- * @property {Issuer<K, M>} issuer
37
- * @property {K} assetKind
38
- * @property {DisplayInfo<K>} [displayInfo]
39
- */
40
-
41
- /**
42
- * @typedef {Record<Keyword, import('@agoric/ertp/src/types.js').AnyAmount>} Allocation
43
- */
3
+ console.error(
4
+ 'NOTICE: src/types-ambient.js no longer provides types; use explicit imports or the top level `/exported.js`',
5
+ );
@@ -0,0 +1,4 @@
1
+ // Export all the types this package provides
2
+ export type * from './contractFacet/types.js';
3
+ export type * from './zoeService/types.js';
4
+ export type * from './types.js';
@@ -0,0 +1,2 @@
1
+ // Empty JS file to correspond with its .d.ts twin
2
+ export {};
package/src/types.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import type { Issuer, Brand } from '@agoric/ertp';
2
+ import type { RemotableObject } from '@endo/pass-style';
3
+ /**
4
+ * Alias for RemotableObject
5
+ */
6
+ export type Handle<H extends string> = RemotableObject<H>;
7
+ /** Must start with a capital letter. */
8
+ export type Keyword = string;
9
+ /**
10
+ * - an opaque handle for an invitation
11
+ */
12
+ export type InvitationHandle = Handle<'Invitation'>;
13
+ export type IssuerKeywordRecord = Record<Keyword, Issuer<any>>;
14
+ export type IssuerPKeywordRecord = Record<Keyword, import('@endo/far').ERef<Issuer<any>>>;
15
+ export type BrandKeywordRecord = Record<Keyword, Brand<any>>;
16
+ export type StandardTerms = {
17
+ /**
18
+ * - record with
19
+ * keywords keys, issuer values
20
+ */
21
+ issuers: IssuerKeywordRecord;
22
+ /**
23
+ * - record with keywords
24
+ * keys, brand values
25
+ */
26
+ brands: BrandKeywordRecord;
27
+ };
28
+ export type AnyTerms = StandardTerms & Record<string, any>;
29
+ //# 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,MAAM,EACN,KAAK,EAIN,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAK1D,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,oBAAoB,GAAG,MAAM,CACvC,OAAO,EACP,OAAO,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CACtC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,OAAO,EAAE,mBAAmB,CAAC;IAC7B;;;OAGG;IACH,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
package/src/types.ts ADDED
@@ -0,0 +1,44 @@
1
+ import type {
2
+ Issuer,
3
+ Brand,
4
+ AssetKind,
5
+ DisplayInfo,
6
+ AnyAmount,
7
+ } from '@agoric/ertp';
8
+ import type { RemotableObject } from '@endo/pass-style';
9
+ import type { Key } from '@endo/patterns';
10
+
11
+ /**
12
+ * Alias for RemotableObject
13
+ */
14
+ export type Handle<H extends string> = RemotableObject<H>;
15
+
16
+ // Typing this as Capitalize<string> would be more accurate but requires
17
+ // frequent casting. Revisit once .ts syntax is more common. Even then,
18
+ // may not be worth the effort since Zoe 2 probably will not have keywords.
19
+ /** Must start with a capital letter. */
20
+ export type Keyword = string;
21
+
22
+ /**
23
+ * - an opaque handle for an invitation
24
+ */
25
+ export type InvitationHandle = Handle<'Invitation'>;
26
+ export type IssuerKeywordRecord = Record<Keyword, Issuer<any>>;
27
+ export type IssuerPKeywordRecord = Record<
28
+ Keyword,
29
+ import('@endo/far').ERef<Issuer<any>>
30
+ >;
31
+ export type BrandKeywordRecord = Record<Keyword, Brand<any>>;
32
+ export type StandardTerms = {
33
+ /**
34
+ * - record with
35
+ * keywords keys, issuer values
36
+ */
37
+ issuers: IssuerKeywordRecord;
38
+ /**
39
+ * - record with keywords
40
+ * keys, brand values
41
+ */
42
+ brands: BrandKeywordRecord;
43
+ };
44
+ export type AnyTerms = StandardTerms & Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"AAiBO,8CAFI,OAAO,kBAAkB,EAAE,OAAO;;;;;EA8G5C"}
1
+ {"version":3,"file":"escrowStorage.d.ts","sourceRoot":"","sources":["escrowStorage.js"],"names":[],"mappings":"AAqBO,8CAFI,OAAO,kBAAkB,EAAE,OAAO;;;;;EA8G5C"}
@@ -9,6 +9,10 @@ import './internal-types.js';
9
9
 
10
10
  import { cleanKeywords } from '../cleanProposal.js';
11
11
 
12
+ /**
13
+ * @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
14
+ */
15
+
12
16
  /**
13
17
  * Store the pool purses whose purpose is to escrow assets, with one
14
18
  * purse per brand.
@@ -20,4 +20,5 @@ export function prepareFeeMint(zoeBaggage: import("@agoric/vat-data").Baggage, f
20
20
  };
21
21
  feeMintAccess: {};
22
22
  }>;
23
+ import type { FeeIssuerConfig } from '@agoric/zoe';
23
24
  //# sourceMappingURL=feeMint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;AA2BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D"}
1
+ {"version":3,"file":"feeMint.d.ts","sourceRoot":"","sources":["feeMint.js"],"names":[],"mappings":";;;;;;;;;AA+BA;;;;GAIG;AACH,2CAJW,OAAO,kBAAkB,EAAE,OAAO,mBAClC,eAAe,kBACf,OAAO,sBAAsB,EAAE,mBAAmB;;;;;;;GA2D5D;qCA5E6C,aAAa"}
@@ -14,6 +14,10 @@ import {
14
14
  import { Fail, q } from '@endo/errors';
15
15
  import { FeeMintAccessShape } from '../typeGuards.js';
16
16
 
17
+ /**
18
+ * @import {FeeIssuerConfig, ZoeService} from '@agoric/zoe';
19
+ */
20
+
17
21
  /** @deprecated Redundant. Just omit it. */
18
22
  const FEE_MINT_KIT = 'FeeMintKit';
19
23
 
@@ -1,6 +1,6 @@
1
1
  export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zoeBaggage: Baggage): import("@endo/exo").Guarded<{
2
- installBundle(allegedBundle: any, bundleLabel: any): Promise<Installation<any>>;
3
- installBundleID(bundleID: any, bundleLabel?: any): Promise<Installation<unknown>>;
2
+ installBundle(allegedBundle: any, bundleLabel: any): Promise<globalThis.Installation>;
3
+ installBundleID(bundleID: any, bundleLabel?: any): Promise<globalThis.Installation<unknown>>;
4
4
  unwrapInstallation(installation: any): {
5
5
  bundleCap: any;
6
6
  bundleID: string;
@@ -14,7 +14,6 @@ export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zo
14
14
  };
15
15
  getBundleIDFromInstallation(allegedInstallation: any): Promise<string | undefined>;
16
16
  }>;
17
- export type BundleCap = import("@agoric/swingset-vat").BundleCap;
18
- export type BundleID = import("@agoric/swingset-vat").BundleID;
19
- import type { Baggage } from '@agoric/vat-data';
17
+ import type { Baggage } from '@agoric/swingset-liveslots';
18
+ import type { SourceBundle } from '@agoric/zoe';
20
19
  //# sourceMappingURL=installationStorage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAqBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA6IjB;wBAnJc,OAAO,sBAAsB,EAAE,SAAS;uBACxC,OAAO,sBAAsB,EAAE,QAAQ;6BAC3B,kBAAkB"}
1
+ {"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAwBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA0IjB;6BAnJyB,4BAA4B;kCAIvB,aAAa"}
@@ -7,13 +7,16 @@ import {
7
7
  } from '@agoric/vat-data';
8
8
  import {
9
9
  InstallationShape,
10
- InstanceHandleShape,
11
10
  UnwrappedInstallationShape,
12
11
  } from '../typeGuards.js';
13
12
 
14
- /** @typedef { import('@agoric/swingset-vat').BundleCap} BundleCap */
15
- /** @typedef { import('@agoric/swingset-vat').BundleID} BundleID */
16
- /** @import {Baggage} from '@agoric/vat-data' */
13
+ /**
14
+ * @import {Baggage} from '@agoric/swingset-liveslots';
15
+ * @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
16
+ * @import {MapStore} from '@agoric/swingset-liveslots';
17
+ * @import {BundleID, BundleCap} from '@agoric/swingset-vat';
18
+ * @import {SourceBundle} from '@agoric/zoe';
19
+ */
17
20
 
18
21
  /**
19
22
  * @param {GetBundleCapForID} getBundleCapForID
@@ -77,10 +80,7 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
77
80
 
78
81
  const InstallationStorageI = M.interface('InstallationStorage', {
79
82
  installBundle: M.call(
80
- M.or(
81
- InstanceHandleShape,
82
- M.recordOf(M.string(), M.string({ stringLengthLimit: Infinity })),
83
- ),
83
+ M.recordOf(M.string(), M.string({ stringLengthLimit: Infinity })),
84
84
  )
85
85
  .optional(M.string())
86
86
  .returns(M.promise()),
@@ -100,4 +100,5 @@ export type State = MutableState & ImmutableState;
100
100
  export type MethodContext = {
101
101
  state: State;
102
102
  };
103
+ import type { WeakMapStore } from '@agoric/store';
103
104
  //# sourceMappingURL=instanceAdminStorage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"AAkDO,kDADK,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;GA2D7C;AA0JM,mDAHI,OAAO,kBAAkB,EAAE,OAAO,4BAClC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwChD;6BAvDY,QAAQ,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;2BACQ;IACR,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;oBACS,YAAY,GAAG,cAAc;4BAC7B;IACR,KAAK,EAAE,KAAK,CAAC;CACd"}
1
+ {"version":3,"file":"instanceAdminStorage.d.ts","sourceRoot":"","sources":["instanceAdminStorage.js"],"names":[],"mappings":"AAsDO,kDADK,OAAO,kBAAkB,EAAE,OAAO;;;;;;;;;;;;;;GA2D7C;AA0JM,mDAHI,OAAO,kBAAkB,EAAE,OAAO,4BAClC,aAAa,UAAU,EAAE,YAAY,CAAC,IAgCvC,mBAAc,EAAE,8BAAyB,EAAE,cAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQ7D;6BAvDY,QAAQ,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;2BACQ;IACR,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;oBACS,YAAY,GAAG,cAAc;4BAC7B;IACR,KAAK,EAAE,KAAK,CAAC;CACd;kCA9O2B,eAAe"}
@@ -18,6 +18,10 @@ import {
18
18
  } from '../typeGuards.js';
19
19
  import { makeZoeSeatAdminFactory } from './zoeSeat.js';
20
20
 
21
+ /**
22
+ * @import {WeakMapStore} from '@agoric/store';
23
+ */
24
+
21
25
  /**
22
26
  * @file Two objects are defined here, both called InstanceAdminSomething.
23
27
  * InstanceAdminStorage is a container for individual InstanceAdmins. Each
@@ -61,7 +61,6 @@ type ZoeInstanceStorageManager = {
61
61
  */
62
62
  type MakeZoeInstanceStorageManager = (installation: Installation, customTerms: object, uncleanIssuerKeywordRecord: IssuerKeywordRecord, instance: Instance, contractBundleCap: BundleCap, instanceLabel: string) => Promise<ZoeInstanceStorageManager>;
63
63
  type GetBundleCapForID = (id: BundleID) => Promise<BundleCap>;
64
- type GetProposalShapeForInvitation = (invitationHandle: InvitationHandle) => Pattern | undefined;
65
64
  type ZoeStorageManager = {
66
65
  makeZoeInstanceStorageManager: MakeZoeInstanceStorageManager;
67
66
  getAssetKindByBrand: GetAssetKindByBrand;
@@ -74,12 +73,12 @@ type ZoeStorageManager = {
74
73
  getBrands: GetBrands;
75
74
  getIssuers: GetIssuers;
76
75
  getTerms: import("./utils.js").GetTerms;
77
- getOfferFilter: GetOfferFilter;
78
- setOfferFilter: SetOfferFilter;
79
- getInstallationForInstance: GetInstallationForInstance;
76
+ getOfferFilter: (instance: import("./utils.js").Instance<any>) => string[];
77
+ setOfferFilter: (instance: Instance, strings: string[]) => any;
78
+ getInstallationForInstance: (instance: import("./utils.js").Instance<any>) => Promise<Installation>;
80
79
  getInstanceAdmin: GetInstanceAdmin;
81
80
  unwrapInstallation: UnwrapInstallation;
82
- getProposalShapeForInvitation: GetProposalShapeForInvitation;
81
+ getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => import("@endo/patterns").Pattern | undefined;
83
82
  };
84
83
  /**
85
84
  * Use VatAdminSvc to create a new vat, but only with the code of the
@@ -87,4 +86,12 @@ type ZoeStorageManager = {
87
86
  */
88
87
  type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<import("@agoric/swingset-vat").CreateVatResults>;
89
88
  type GetFeeIssuerKit = (feeMintAccess: FeeMintAccess) => IssuerKit<"nat">;
89
+ import type { FeeMintAccess } from './types.js';
90
+ import type { GetBrands } from './types.js';
91
+ import type { GetBundleIDFromInstallation } from './types.js';
92
+ import type { GetIssuers } from './types.js';
93
+ import type { InstallBundle } from './types.js';
94
+ import type { InstallBundleID } from './types.js';
95
+ import type { SourceBundle } from './types.js';
96
+ import type { InstanceRecord } from './utils.js';
90
97
  //# sourceMappingURL=internal-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAMW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,OAAO,sBAAsB,EAAE,aAAa;;;;;;;;oDAUrD,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;wDAKpB,gBAAgB,KACd,OAAO,GAAG,SAAS;;mCAKlB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,OAAO,YAAY,EAAE,cAAc;eACnC,SAAS;gBACT,UAAU;cACV,OAAO,YAAY,EAAE,QAAQ;oBAC7B,cAAc;oBACd,cAAc;gCACd,0BAA0B;sBAC1B,gBAAgB;wBAChB,kBAAkB;mCAClB,6BAA6B;;;;;;wCAQhC,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["internal-types.js"],"names":[],"mappings":";;;4BAYW,MAAM,SACN,KAAK,KACH,IAAI,CAAC,IAAI,CAAC;;;;;;;;kCAWZ,MAAM,SACN,KAAK,KACH,KAAK;;;;;;;kCAUP,cAAc,YACd,qBAAqB,KACnB,OAAO,CAAC,UAAU,CAAC;oCAKrB,QAAQ,iBACR,aAAa,KACX,IAAI;mCAKN,QAAQ,KACN,aAAa;sCAKf,QAAQ,KACN,IAAI;;;;;0CASN,IAAI,CAAC,YAAY,CAAC,KAChB,IAAI,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAC,YAAY,CAAA;CAC1B,CAAC;8BAMQ,aAAa;;cAKZ,MAAM,QAAQ;gBACd,MAAM,mBAAmB;eACzB,MAAM,kBAAkB;gBACxB,GAAG,CAAC,YAAY,CAAC;iBACjB,WAAW;qBACX,eAAe;uBACf,MAAM,cAAc;sBACpB,gBAAgB;uBAChB,iBAAiB;yBACjB,mBAAmB;oBACnB,8BAA8B;yBAC9B,MAAM,MAAM;;;;aACZ,MAAM,MAAM;;;;kBACZ,MAAM,OAAO,sBAAsB,EAAE,aAAa;;;;;;;;oDAUrD,YAAY,eACZ,MAAM,8BACN,mBAAmB,YACnB,QAAQ,qBACR,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,yBAAyB,CAAC;8BAKpC,QAAQ,KACN,OAAO,CAAC,SAAS,CAAC;;mCAKjB,6BAA6B;yBAC7B,mBAAmB;qBACnB,eAAe;sBACf,MAAM,CAAC,KAAK,CAAC;mBACb,aAAa;qBACb,eAAe;iCACf,2BAA2B;oBAC3B,OAAO,YAAY,EAAE,cAAc;eACnC,SAAS;gBACT,UAAU;cACV,OAAO,YAAY,EAAE,QAAQ;oBAC7B,CAAC,QAAQ,EAAE,OAAO,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;oBAC1D,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG;gCAC9C,CAAC,QAAQ,EAAE,OAAO,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC;sBACvE,gBAAgB;wBAChB,kBAAkB;mCAClB,CAAC,gBAAgB,EAAE,gBAAgB,KAAK,OAAO,gBAAgB,EAAE,OAAO,GAAG,SAAS;;;;;;wCAQvF,SAAS,iBACT,MAAM,KACJ,OAAO,CAAC,OAAO,sBAAsB,EAAE,gBAAgB,CAAC;uCAK1D,aAAa,KACX,SAAS,CAAC,KAAK,CAAC;mCAxJqG,YAAY;+BAAZ,YAAY;iDAAZ,YAAY;gCAAZ,YAAY;mCAAZ,YAAY;qCAAZ,YAAY;kCAAZ,YAAY;oCAC7G,YAAY"}
@@ -1,4 +1,10 @@
1
1
  // @jessie-check
2
+ /// <reference types="@agoric/zoe/exported" />
3
+
4
+ /**
5
+ * @import {FeeMintAccess, GetBrands, GetBundleIDFromInstallation, GetIssuers, InstallBundle, InstallBundleID, SourceBundle} from './types.js';
6
+ * @import {InstanceRecord} from './utils.js';
7
+ */
2
8
 
3
9
  /**
4
10
  * Create a purse for a new issuer
@@ -114,12 +120,6 @@
114
120
  * @returns {Promise<BundleCap>}
115
121
  */
116
122
 
117
- /**
118
- * @callback GetProposalShapeForInvitation
119
- * @param {InvitationHandle} invitationHandle
120
- * @returns {Pattern | undefined}
121
- */
122
-
123
123
  /**
124
124
  * @typedef ZoeStorageManager
125
125
  * @property {MakeZoeInstanceStorageManager} makeZoeInstanceStorageManager
@@ -133,12 +133,12 @@
133
133
  * @property {GetBrands} getBrands
134
134
  * @property {GetIssuers} getIssuers
135
135
  * @property {import('./utils.js').GetTerms} getTerms
136
- * @property {GetOfferFilter} getOfferFilter
137
- * @property {SetOfferFilter} setOfferFilter
138
- * @property {GetInstallationForInstance} getInstallationForInstance
136
+ * @property {(instance: import('./utils.js').Instance<any>) => string[]} getOfferFilter
137
+ * @property {(instance: Instance, strings: string[]) => any} setOfferFilter
138
+ * @property {(instance: import('./utils.js').Instance<any>) => Promise<Installation>} getInstallationForInstance
139
139
  * @property {GetInstanceAdmin} getInstanceAdmin
140
140
  * @property {UnwrapInstallation} unwrapInstallation
141
- * @property {GetProposalShapeForInvitation} getProposalShapeForInvitation
141
+ * @property {(invitationHandle: InvitationHandle) => import('@endo/patterns').Pattern | undefined} getProposalShapeForInvitation
142
142
  */
143
143
 
144
144
  /**
@@ -1,6 +1,6 @@
1
1
  export function makeInvitationQueryFns(invitationIssuer: any): {
2
- getInstance: GetInstance;
3
- getInstallation: GetInstallation;
4
- getInvitationDetails: GetInvitationDetails;
2
+ getInstance: import("./types.ts").GetInstance;
3
+ getInstallation: import("./types.ts").GetInstallation;
4
+ getInvitationDetails: import("./types.ts").GetInvitationDetails;
5
5
  };
6
6
  //# sourceMappingURL=invitationQueries.d.ts.map
@@ -4,7 +4,7 @@ import { X, Fail, q, makeError, annotateError } from '@endo/errors';
4
4
  import { E } from '@endo/eventual-send';
5
5
 
6
6
  export const makeInvitationQueryFns = invitationIssuer => {
7
- /** @type {GetInvitationDetails} */
7
+ /** @type {import('./types.ts').GetInvitationDetails} */
8
8
  const getInvitationDetails = async invitationP => {
9
9
  const onRejected = reason => {
10
10
  const err = makeError(
@@ -21,11 +21,11 @@ export const makeInvitationQueryFns = invitationIssuer => {
21
21
  return invAmount.value[0];
22
22
  };
23
23
 
24
- /** @type {GetInstance} */
24
+ /** @type {import('./types.ts').GetInstance} */
25
25
  const getInstance = invitation =>
26
26
  E.get(getInvitationDetails(invitation)).instance;
27
27
 
28
- /** @type {GetInstallation} */
28
+ /** @type {import('./types.ts').GetInstallation} */
29
29
  const getInstallation = invitation =>
30
30
  E.get(getInvitationDetails(invitation)).installation;
31
31
 
@@ -2,4 +2,5 @@ export function prepareInvitationKit(baggage: import("@agoric/vat-data").Baggage
2
2
  invitationIssuer: globalThis.Issuer<"set", InvitationDetails>;
3
3
  invitationKit: globalThis.IssuerKit<"set", InvitationDetails>;
4
4
  };
5
+ import type { InvitationDetails } from '@agoric/zoe';
5
6
  //# sourceMappingURL=makeInvitation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAgBO,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;EAgCxE"}
1
+ {"version":3,"file":"makeInvitation.d.ts","sourceRoot":"","sources":["makeInvitation.js"],"names":[],"mappings":"AAmBO,8CAHI,OAAO,kBAAkB,EAAE,OAAO,mBAClC,OAAO,sBAAsB,EAAE,mBAAmB,GAAG,SAAS;;;EA+BxE;uCAzCoD,aAAa"}
@@ -4,6 +4,9 @@ import { Fail, q } from '@endo/errors';
4
4
  import { provideDurableMapStore } from '@agoric/vat-data';
5
5
  import { AssetKind, hasIssuer, prepareIssuerKit } from '@agoric/ertp';
6
6
  import { InvitationElementShape } from '../typeGuards.js';
7
+ /**
8
+ * @import {FeeIssuerConfig, InvitationDetails} from '@agoric/zoe';
9
+ */
7
10
 
8
11
  /**
9
12
  * Not deprecated because the first use below is still correct.
@@ -30,7 +33,6 @@ export const prepareInvitationKit = (baggage, shutdownZoeVat = undefined) => {
30
33
  }
31
34
 
32
35
  /** @type {IssuerKit<'set', InvitationDetails>} */
33
- // @ts-expect-error cast
34
36
  const invitationKit = prepareIssuerKit(
35
37
  invitationKitBaggage,
36
38
  'Zoe Invitation',
@@ -1,4 +1,4 @@
1
- export function burnInvitation(invitationIssuer: Issuer, invitation: ERef<Payment>): Promise<{
1
+ export function burnInvitation<K extends AssetKind>(invitationIssuer: Issuer<K>, invitation: ERef<Payment<K>>): Promise<{
2
2
  instanceHandle: Instance;
3
3
  invitationHandle: InvitationHandle;
4
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"burnInvitation.d.ts","sourceRoot":"","sources":["burnInvitation.js"],"names":[],"mappings":"AAgBO,iDAPI,MAAM,cACN,IAAI,CAAC,OAAO,CAAC,GACX,OAAO,CAAC;IAChB,cAAc,EAAE,QAAQ,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC,CA0BJ"}
1
+ {"version":3,"file":"burnInvitation.d.ts","sourceRoot":"","sources":["burnInvitation.js"],"names":[],"mappings":"AAiBO,+BARkB,CAAC,SAAZ,SAAU,oBACb,MAAM,CAAC,CAAC,CAAC,cACT,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GACd,OAAO,CAAC;IAChB,cAAc,EAAE,QAAQ,CAAC;IACzB,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC,CA0BJ"}
@@ -7,8 +7,9 @@ import { E } from '@endo/eventual-send';
7
7
  * Burn the invitation, assert that only one invitation was burned,
8
8
  * and extract and return the instanceHandle and invitationHandle
9
9
  *
10
- * @param {Issuer} invitationIssuer
11
- * @param {ERef<Payment>} invitation
10
+ * @template {AssetKind} K
11
+ * @param {Issuer<K>} invitationIssuer
12
+ * @param {ERef<Payment<K>>} invitation
12
13
  * @returns {Promise<{
13
14
  * instanceHandle: Instance,
14
15
  * invitationHandle: InvitationHandle,
@@ -1,2 +1,3 @@
1
1
  export function makeOfferMethod(offerDataAccess: any): Offer;
2
+ import type { Offer } from '@agoric/zoe';
2
3
  //# sourceMappingURL=offer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["offer.js"],"names":[],"mappings":"AAaO,6DA0DN"}
1
+ {"version":3,"file":"offer.d.ts","sourceRoot":"","sources":["offer.js"],"names":[],"mappings":"AAeO,6DA0DN;2BA7DuB,aAAa"}
@@ -9,7 +9,9 @@ import { cleanProposal } from '../../cleanProposal.js';
9
9
  import { burnInvitation } from './burnInvitation.js';
10
10
  import { makeInvitationQueryFns } from '../invitationQueries.js';
11
11
 
12
- import '../internal-types.js';
12
+ /**
13
+ * @import {Offer} from '@agoric/zoe';
14
+ */
13
15
 
14
16
  export const makeOfferMethod = offerDataAccess => {
15
17
  /** @type {Offer} */
@@ -1 +1 @@
1
- {"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA4BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,QAkR/B"}
1
+ {"version":3,"file":"originalZoeSeat.d.ts","sourceRoot":"","sources":["originalZoeSeat.js"],"names":[],"mappings":";;;;;;;;;;AA4BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,QAoR/B"}
@@ -4,14 +4,14 @@ import { E } from '@endo/eventual-send';
4
4
  import { M, prepareExoClassKit } from '@agoric/vat-data';
5
5
  import { deeplyFulfilled } from '@endo/marshal';
6
6
  import { makePromiseKit } from '@endo/promise-kit';
7
+ import { NonNullish } from '@agoric/internal';
7
8
 
8
9
  import { satisfiesWant } from '../contractFacet/offerSafety.js';
9
- import '../types-ambient.js';
10
10
  import '../internal-types.js';
11
11
  import {
12
12
  AmountKeywordRecordShape,
13
- KeywordShape,
14
13
  ExitObjectShape,
14
+ KeywordShape,
15
15
  PaymentPKeywordRecordShape,
16
16
  } from '../typeGuards.js';
17
17
 
@@ -289,8 +289,10 @@ export const declareOldZoeSeatAdminKind = (baggage, makeDurablePublishKit) => {
289
289
  // doExit(), which ensures that finalPayouts() has set state.payouts.
290
290
  return E.when(
291
291
  state.subscriber.subscribeAfter(),
292
- () => state.payouts[keyword],
293
- () => state.payouts[keyword],
292
+ () =>
293
+ NonNullish(state.payouts[keyword], `No payout for "${keyword}"`),
294
+ () =>
295
+ NonNullish(state.payouts[keyword], `No payout for "${keyword}"`),
294
296
  );
295
297
  },
296
298