@agoric/zoe 0.27.0-upgrade-19-dev-5428c4d.0 → 0.27.0-upgrade-20-dev-ef71cfd.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 (159) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +270 -275
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +29 -29
  4. package/src/cleanProposal.d.ts +2 -0
  5. package/src/cleanProposal.d.ts.map +1 -1
  6. package/src/cleanProposal.js +4 -2
  7. package/src/contractFacet/exit.d.ts +1 -1
  8. package/src/contractFacet/exit.d.ts.map +1 -1
  9. package/src/contractFacet/offerHandlerStorage.d.ts +1 -1
  10. package/src/contractFacet/rightsConservation.d.ts.map +1 -1
  11. package/src/contractFacet/rightsConservation.js +0 -1
  12. package/src/contractFacet/types.d.ts +184 -0
  13. package/src/contractFacet/types.d.ts.map +1 -0
  14. package/src/contractFacet/{types-ambient.d.ts → types.ts} +66 -29
  15. package/src/contractFacet/vatRoot.d.ts +8 -2
  16. package/src/contractFacet/vatRoot.d.ts.map +1 -1
  17. package/src/contractFacet/vatRoot.js +5 -4
  18. package/src/contractFacet/zcfMint.d.ts +3 -2
  19. package/src/contractFacet/zcfMint.d.ts.map +1 -1
  20. package/src/contractFacet/zcfMint.js +7 -7
  21. package/src/contractFacet/zcfSeat.js +2 -2
  22. package/src/contractFacet/zcfZygote.d.ts +9 -1
  23. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  24. package/src/contractFacet/zcfZygote.js +17 -5
  25. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  26. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  27. package/src/contractSupport/atomicTransfer.js +4 -0
  28. package/src/contractSupport/bondingCurves.js +1 -1
  29. package/src/contractSupport/index.d.ts +2 -2
  30. package/src/contractSupport/index.js +2 -19
  31. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  32. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  33. package/src/contractSupport/priceAuthorityInitial.js +3 -1
  34. package/src/contractSupport/types-ambient.d.ts.map +1 -1
  35. package/src/contractSupport/types-ambient.js +1 -0
  36. package/src/contractSupport/zoeHelpers.d.ts +6 -1
  37. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  38. package/src/contractSupport/zoeHelpers.js +1 -0
  39. package/src/contracts/atomicSwap.d.ts +1 -1
  40. package/src/contracts/auction/index.d.ts +3 -3
  41. package/src/contracts/automaticRefund.d.ts +3 -3
  42. package/src/contracts/autoswap.d.ts +4 -0
  43. package/src/contracts/autoswap.d.ts.map +1 -1
  44. package/src/contracts/autoswap.js +4 -0
  45. package/src/contracts/barterExchange.d.ts +2 -2
  46. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  47. package/src/contracts/callSpread/pricedCallSpread.d.ts +4 -4
  48. package/src/contracts/coveredCall-durable.d.ts +1 -1
  49. package/src/contracts/coveredCall.d.ts +1 -1
  50. package/src/contracts/loan/index.d.ts +1 -1
  51. package/src/contracts/loan/types-ambient.d.ts +13 -13
  52. package/src/contracts/loan/types-ambient.d.ts.map +1 -1
  53. package/src/contracts/loan/types-ambient.js +17 -17
  54. package/src/contracts/mintPayments.d.ts +2 -2
  55. package/src/contracts/oracle.d.ts +3 -0
  56. package/src/contracts/oracle.d.ts.map +1 -1
  57. package/src/contracts/oracle.js +1 -0
  58. package/src/contracts/priceAggregator.d.ts +2 -0
  59. package/src/contracts/priceAggregator.d.ts.map +1 -1
  60. package/src/contracts/priceAggregator.js +10 -8
  61. package/src/contracts/scaledPriceAuthority.d.ts +1 -0
  62. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  63. package/src/contracts/scaledPriceAuthority.js +1 -0
  64. package/src/contracts/sellItems.d.ts +1 -1
  65. package/src/contracts/simpleExchange.d.ts +5 -0
  66. package/src/contracts/simpleExchange.d.ts.map +1 -1
  67. package/src/contracts/simpleExchange.js +4 -0
  68. package/src/contracts/types-ambient.d.ts +7 -7
  69. package/src/contracts/types-ambient.d.ts.map +1 -1
  70. package/src/contracts/types-ambient.js +7 -7
  71. package/src/contracts/valueVow.contract.d.ts +5 -2
  72. package/src/contracts/valueVow.contract.d.ts.map +1 -1
  73. package/src/contracts/valueVow.contract.js +1 -0
  74. package/src/instanceRecordStorage.d.ts.map +1 -1
  75. package/src/instanceRecordStorage.js +3 -1
  76. package/src/internal-types.d.ts +15 -5
  77. package/src/internal-types.d.ts.map +1 -1
  78. package/src/internal-types.js +9 -4
  79. package/src/issuerRecord.d.ts +3 -2
  80. package/src/issuerRecord.d.ts.map +1 -1
  81. package/src/issuerRecord.js +6 -2
  82. package/src/issuerStorage.d.ts +3 -2
  83. package/src/issuerStorage.d.ts.map +1 -1
  84. package/src/issuerStorage.js +6 -5
  85. package/src/typeGuards.d.ts +10 -6
  86. package/src/typeGuards.d.ts.map +1 -1
  87. package/src/typeGuards.js +7 -5
  88. package/src/types-ambient.d.ts +0 -40
  89. package/src/types-ambient.d.ts.map +1 -1
  90. package/src/types-ambient.js +4 -42
  91. package/src/types-index.d.ts +4 -0
  92. package/src/types-index.js +2 -0
  93. package/src/types.d.ts +29 -0
  94. package/src/types.d.ts.map +1 -0
  95. package/src/types.ts +44 -0
  96. package/src/zoeService/feeMint.d.ts +1 -0
  97. package/src/zoeService/feeMint.d.ts.map +1 -1
  98. package/src/zoeService/feeMint.js +4 -0
  99. package/src/zoeService/installationStorage.d.ts +3 -2
  100. package/src/zoeService/installationStorage.d.ts.map +1 -1
  101. package/src/zoeService/installationStorage.js +2 -5
  102. package/src/zoeService/internal-types.d.ts +11 -3
  103. package/src/zoeService/internal-types.d.ts.map +1 -1
  104. package/src/zoeService/internal-types.js +9 -3
  105. package/src/zoeService/invitationQueries.d.ts +3 -3
  106. package/src/zoeService/invitationQueries.js +3 -3
  107. package/src/zoeService/makeInvitation.d.ts +1 -0
  108. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  109. package/src/zoeService/makeInvitation.js +3 -0
  110. package/src/zoeService/offer/offer.d.ts +1 -0
  111. package/src/zoeService/offer/offer.d.ts.map +1 -1
  112. package/src/zoeService/offer/offer.js +3 -1
  113. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  114. package/src/zoeService/originalZoeSeat.js +0 -1
  115. package/src/zoeService/startInstance.d.ts.map +1 -1
  116. package/src/zoeService/startInstance.js +0 -2
  117. package/src/zoeService/types-ambient.d.ts +0 -226
  118. package/src/zoeService/types-ambient.d.ts.map +1 -1
  119. package/src/zoeService/types-ambient.js +4 -327
  120. package/src/zoeService/types.d.ts +238 -0
  121. package/src/zoeService/types.d.ts.map +1 -0
  122. package/src/zoeService/types.ts +307 -0
  123. package/src/zoeService/utils.d.ts +13 -5
  124. package/src/zoeService/utils.test-d.ts +1 -0
  125. package/src/zoeService/zoe.d.ts +11 -1
  126. package/src/zoeService/zoe.d.ts.map +1 -1
  127. package/src/zoeService/zoe.js +8 -1
  128. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  129. package/src/zoeService/zoeSeat.js +1 -2
  130. package/src/zoeService/zoeStorageManager.d.ts +5 -5
  131. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  132. package/src/zoeService/zoeStorageManager.js +4 -3
  133. package/tools/fakeVatAdmin.d.ts +9 -2
  134. package/tools/fakeVatAdmin.d.ts.map +1 -1
  135. package/tools/fakeVatAdmin.js +18 -10
  136. package/tools/manualPriceAuthority.d.ts +4 -1
  137. package/tools/manualPriceAuthority.d.ts.map +1 -1
  138. package/tools/manualPriceAuthority.js +1 -0
  139. package/tools/scriptedOracle.d.ts +6 -2
  140. package/tools/scriptedOracle.d.ts.map +1 -1
  141. package/tools/scriptedOracle.js +4 -0
  142. package/tools/setup-zoe.d.ts +12 -6
  143. package/tools/setup-zoe.d.ts.map +1 -1
  144. package/tools/setup-zoe.js +38 -5
  145. package/tools/test-utils.d.ts +1 -1
  146. package/tools/test-utils.js +1 -1
  147. package/tools/types.d.ts +1 -0
  148. package/tools/types.d.ts.map +1 -1
  149. package/tools/types.js +1 -0
  150. package/src/contractFacet/internal-types.d.ts +0 -8
  151. package/src/contractFacet/internal-types.d.ts.map +0 -1
  152. package/src/contractFacet/internal-types.js +0 -15
  153. package/src/contractFacet/types-ambient.js +0 -1
  154. package/src/contractSupport/ratio.d.ts +0 -37
  155. package/src/contractSupport/ratio.d.ts.map +0 -1
  156. package/src/contractSupport/ratio.js +0 -419
  157. package/src/contractSupport/safeMath.d.ts +0 -11
  158. package/src/contractSupport/safeMath.d.ts.map +0 -1
  159. package/src/contractSupport/safeMath.js +0 -49
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,7 +135,7 @@ export const isAfterDeadlineExitRule = exit => {
133
135
  };
134
136
  harden(isAfterDeadlineExitRule);
135
137
 
136
- /** @type {TypedPattern<InvitationDetails>} */
138
+ /** @type {TypedPattern<import('./types-index').InvitationDetails>} */
137
139
  export const InvitationElementShape = M.splitRecord({
138
140
  description: M.string(),
139
141
  handle: InvitationHandleShape,
@@ -278,7 +280,7 @@ export const ZoeStorageManagerIKit = {
278
280
  getBundleIDFromInstallation: M.call(InstallationShape).returns(
279
281
  M.eref(M.string()),
280
282
  ),
281
- installBundle: M.call(M.or(InstanceHandleShape, BundleShape))
283
+ installBundle: M.call(BundleShape)
282
284
  .optional(M.string())
283
285
  .returns(M.promise()),
284
286
  installBundleID: M.call(M.string())
@@ -311,7 +313,7 @@ export const ZoeStorageManagerIKit = {
311
313
  InstallationShape,
312
314
  M.any(),
313
315
  IssuerPKeywordRecordShape,
314
- M.or(InstanceHandleShape, BundleShape),
316
+ InstanceHandleShape,
315
317
  M.or(BundleCapShape, BundleShape),
316
318
  M.string(),
317
319
  ).returns(M.promise()),
@@ -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>;
@@ -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;
@@ -15,4 +15,5 @@ export function makeInstallationStorage(getBundleCapForID: GetBundleCapForID, zo
15
15
  getBundleIDFromInstallation(allegedInstallation: any): Promise<string | undefined>;
16
16
  }>;
17
17
  import type { Baggage } from '@agoric/swingset-liveslots';
18
+ import type { SourceBundle } from '@agoric/zoe';
18
19
  //# sourceMappingURL=installationStorage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAwBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA6IjB;6BArJyB,4BAA4B"}
1
+ {"version":3,"file":"installationStorage.d.ts","sourceRoot":"","sources":["installationStorage.js"],"names":[],"mappings":"AAwBO,2DAHI,iBAAiB,cACjB,OAAO;;;;;;;;;;;;;;;GA0IjB;6BAnJyB,4BAA4B;kCAIvB,aAAa"}
@@ -7,7 +7,6 @@ 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
 
@@ -16,6 +15,7 @@ import {
16
15
  * @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';
17
16
  * @import {MapStore} from '@agoric/swingset-liveslots';
18
17
  * @import {BundleID, BundleCap} from '@agoric/swingset-vat';
18
+ * @import {SourceBundle} from '@agoric/zoe';
19
19
  */
20
20
 
21
21
  /**
@@ -80,10 +80,7 @@ export const makeInstallationStorage = (getBundleCapForID, zoeBaggage) => {
80
80
 
81
81
  const InstallationStorageI = M.interface('InstallationStorage', {
82
82
  installBundle: M.call(
83
- M.or(
84
- InstanceHandleShape,
85
- M.recordOf(M.string(), M.string({ stringLengthLimit: Infinity })),
86
- ),
83
+ M.recordOf(M.string(), M.string({ stringLengthLimit: Infinity })),
87
84
  )
88
85
  .optional(M.string())
89
86
  .returns(M.promise()),
@@ -73,9 +73,9 @@ type ZoeStorageManager = {
73
73
  getBrands: GetBrands;
74
74
  getIssuers: GetIssuers;
75
75
  getTerms: import("./utils.js").GetTerms;
76
- getOfferFilter: GetOfferFilter;
77
- setOfferFilter: SetOfferFilter;
78
- 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>;
79
79
  getInstanceAdmin: GetInstanceAdmin;
80
80
  unwrapInstallation: UnwrapInstallation;
81
81
  getProposalShapeForInvitation: (invitationHandle: InvitationHandle) => import("@endo/patterns").Pattern | undefined;
@@ -86,4 +86,12 @@ type ZoeStorageManager = {
86
86
  */
87
87
  type CreateZCFVat = (contractBundleCap: BundleCap, contractLabel: string) => Promise<import("@agoric/swingset-vat").CreateVatResults>;
88
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';
89
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,CAA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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
@@ -127,9 +133,9 @@
127
133
  * @property {GetBrands} getBrands
128
134
  * @property {GetIssuers} getIssuers
129
135
  * @property {import('./utils.js').GetTerms} getTerms
130
- * @property {GetOfferFilter} getOfferFilter
131
- * @property {SetOfferFilter} setOfferFilter
132
- * @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
133
139
  * @property {GetInstanceAdmin} getInstanceAdmin
134
140
  * @property {UnwrapInstallation} unwrapInstallation
135
141
  * @property {(invitationHandle: InvitationHandle) => import('@endo/patterns').Pattern | undefined} getProposalShapeForInvitation
@@ -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;;;EA+BxE"}
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.
@@ -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":";;;;;;;;;;AA6BA;;;;;;;;;;GAGG;;;;;;;;;;;;AA+CI,oDAHI,OAAO,kBAAkB,EAAE,OAAO,yBAClC,MAAM,UAAU,CAAC,GAAG,CAAC,QAoR/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"}
@@ -7,7 +7,6 @@ import { makePromiseKit } from '@endo/promise-kit';
7
7
  import { NonNullish } from '@agoric/internal';
8
8
 
9
9
  import { satisfiesWant } from '../contractFacet/offerSafety.js';
10
- import '../types-ambient.js';
11
10
  import '../internal-types.js';
12
11
  import {
13
12
  AmountKeywordRecordShape,
@@ -1 +1 @@
1
- {"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAoCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,OAAO,YAAY,EAAE,aAAa,CAqW9C;+BA7WgD,sBAAsB;6BAF7C,kBAAkB"}
1
+ {"version":3,"file":"startInstance.d.ts","sourceRoot":"","sources":["startInstance.js"],"names":[],"mappings":"AAkCO,uDANI,IAAI,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,oBAAoB,CAAC,oBAC/E,MAAM,IAAI,CAAC,SAAS,CAAC,uBACrB,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,cACzB,OAAO,GACL,OAAO,YAAY,EAAE,aAAa,CAqW9C;+BA7WgD,sBAAsB;6BAF7C,kBAAkB"}
@@ -19,8 +19,6 @@ import {
19
19
  InstanceAdminShape,
20
20
  } from '../typeGuards.js';
21
21
 
22
- // import '../internal-types.js';
23
-
24
22
  /**
25
23
  * @import {Baggage} from '@agoric/vat-data';
26
24
  * @import {LegacyWeakMap, WeakMapStore} from '@agoric/store';