@agoric/zoe 0.27.0-upgrade-19-devnet-dev-5428c4d.0 → 0.27.0-upgrade-21-dev-16519b2.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 (170) hide show
  1. package/bundles/bundle-contractFacet-js-meta.json +305 -305
  2. package/bundles/bundle-contractFacet.js +1 -1
  3. package/package.json +36 -35
  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 +9 -3
  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.d.ts +3 -1
  22. package/src/contractFacet/zcfSeat.d.ts.map +1 -1
  23. package/src/contractFacet/zcfSeat.js +6 -4
  24. package/src/contractFacet/zcfZygote.d.ts +8 -1
  25. package/src/contractFacet/zcfZygote.d.ts.map +1 -1
  26. package/src/contractFacet/zcfZygote.js +20 -8
  27. package/src/contractSupport/atomicTransfer.d.ts +6 -0
  28. package/src/contractSupport/atomicTransfer.d.ts.map +1 -1
  29. package/src/contractSupport/atomicTransfer.js +4 -0
  30. package/src/contractSupport/bondingCurves.js +1 -1
  31. package/src/contractSupport/index.d.ts +2 -2
  32. package/src/contractSupport/index.js +2 -19
  33. package/src/contractSupport/prepare-ownable.d.ts +1 -1
  34. package/src/contractSupport/prepare-ownable.d.ts.map +1 -1
  35. package/src/contractSupport/prepare-ownable.js +5 -1
  36. package/src/contractSupport/priceAuthorityInitial.d.ts +2 -0
  37. package/src/contractSupport/priceAuthorityInitial.d.ts.map +1 -1
  38. package/src/contractSupport/priceAuthorityInitial.js +3 -1
  39. package/src/contractSupport/types-ambient.d.ts.map +1 -1
  40. package/src/contractSupport/types-ambient.js +1 -0
  41. package/src/contractSupport/zoeHelpers.d.ts +6 -1
  42. package/src/contractSupport/zoeHelpers.d.ts.map +1 -1
  43. package/src/contractSupport/zoeHelpers.js +1 -0
  44. package/src/contracts/atomicSwap.d.ts +1 -1
  45. package/src/contracts/auction/index.d.ts +5 -5
  46. package/src/contracts/automaticRefund.d.ts +4 -4
  47. package/src/contracts/autoswap.d.ts +4 -0
  48. package/src/contracts/autoswap.d.ts.map +1 -1
  49. package/src/contracts/autoswap.js +4 -0
  50. package/src/contracts/barterExchange.d.ts +3 -3
  51. package/src/contracts/callSpread/fundedCallSpread.d.ts +1 -1
  52. package/src/contracts/callSpread/pricedCallSpread.d.ts +5 -5
  53. package/src/contracts/coveredCall-durable.d.ts +1 -1
  54. package/src/contracts/coveredCall.d.ts +1 -1
  55. package/src/contracts/loan/index.d.ts +1 -1
  56. package/src/contracts/loan/liquidate.d.ts.map +1 -1
  57. package/src/contracts/loan/liquidate.js +5 -1
  58. package/src/contracts/loan/types-ambient.d.ts +13 -13
  59. package/src/contracts/loan/types-ambient.d.ts.map +1 -1
  60. package/src/contracts/loan/types-ambient.js +17 -17
  61. package/src/contracts/mintPayments.d.ts +4 -4
  62. package/src/contracts/oracle.d.ts +5 -2
  63. package/src/contracts/oracle.d.ts.map +1 -1
  64. package/src/contracts/oracle.js +1 -0
  65. package/src/contracts/otcDesk.d.ts +1 -1
  66. package/src/contracts/priceAggregator.d.ts +4 -2
  67. package/src/contracts/priceAggregator.d.ts.map +1 -1
  68. package/src/contracts/priceAggregator.js +10 -8
  69. package/src/contracts/scaledPriceAuthority.d.ts +1 -0
  70. package/src/contracts/scaledPriceAuthority.d.ts.map +1 -1
  71. package/src/contracts/scaledPriceAuthority.js +1 -0
  72. package/src/contracts/sellItems.d.ts +1 -1
  73. package/src/contracts/simpleExchange.d.ts +6 -1
  74. package/src/contracts/simpleExchange.d.ts.map +1 -1
  75. package/src/contracts/simpleExchange.js +4 -0
  76. package/src/contracts/types-ambient.d.ts +7 -7
  77. package/src/contracts/types-ambient.d.ts.map +1 -1
  78. package/src/contracts/types-ambient.js +7 -7
  79. package/src/contracts/valueVow.contract.d.ts +5 -2
  80. package/src/contracts/valueVow.contract.d.ts.map +1 -1
  81. package/src/contracts/valueVow.contract.js +1 -0
  82. package/src/instanceRecordStorage.d.ts +3 -1
  83. package/src/instanceRecordStorage.d.ts.map +1 -1
  84. package/src/instanceRecordStorage.js +9 -2
  85. package/src/internal-types.d.ts +25 -10
  86. package/src/internal-types.d.ts.map +1 -1
  87. package/src/internal-types.js +21 -11
  88. package/src/issuerRecord.d.ts +3 -2
  89. package/src/issuerRecord.d.ts.map +1 -1
  90. package/src/issuerRecord.js +6 -2
  91. package/src/issuerStorage.d.ts +3 -2
  92. package/src/issuerStorage.d.ts.map +1 -1
  93. package/src/issuerStorage.js +6 -5
  94. package/src/typeGuards.d.ts +10 -6
  95. package/src/typeGuards.d.ts.map +1 -1
  96. package/src/typeGuards.js +7 -5
  97. package/src/types-ambient.d.ts +0 -40
  98. package/src/types-ambient.d.ts.map +1 -1
  99. package/src/types-ambient.js +4 -42
  100. package/src/types-index.d.ts +4 -0
  101. package/src/types-index.js +2 -0
  102. package/src/types.d.ts +29 -0
  103. package/src/types.d.ts.map +1 -0
  104. package/src/types.ts +37 -0
  105. package/src/zoeService/escrowStorage.d.ts.map +1 -1
  106. package/src/zoeService/escrowStorage.js +1 -2
  107. package/src/zoeService/feeMint.d.ts +6 -3
  108. package/src/zoeService/feeMint.d.ts.map +1 -1
  109. package/src/zoeService/feeMint.js +8 -2
  110. package/src/zoeService/installationStorage.d.ts +3 -2
  111. package/src/zoeService/installationStorage.d.ts.map +1 -1
  112. package/src/zoeService/installationStorage.js +3 -7
  113. package/src/zoeService/internal-types.d.ts +11 -3
  114. package/src/zoeService/internal-types.d.ts.map +1 -1
  115. package/src/zoeService/internal-types.js +9 -3
  116. package/src/zoeService/invitationQueries.d.ts +3 -3
  117. package/src/zoeService/invitationQueries.js +3 -3
  118. package/src/zoeService/makeInvitation.d.ts +4 -1
  119. package/src/zoeService/makeInvitation.d.ts.map +1 -1
  120. package/src/zoeService/makeInvitation.js +8 -2
  121. package/src/zoeService/offer/offer.d.ts +1 -0
  122. package/src/zoeService/offer/offer.d.ts.map +1 -1
  123. package/src/zoeService/offer/offer.js +3 -1
  124. package/src/zoeService/originalZoeSeat.d.ts.map +1 -1
  125. package/src/zoeService/originalZoeSeat.js +0 -2
  126. package/src/zoeService/startInstance.d.ts.map +1 -1
  127. package/src/zoeService/startInstance.js +2 -4
  128. package/src/zoeService/types-ambient.d.ts +0 -226
  129. package/src/zoeService/types-ambient.d.ts.map +1 -1
  130. package/src/zoeService/types-ambient.js +4 -327
  131. package/src/zoeService/types.d.ts +238 -0
  132. package/src/zoeService/types.d.ts.map +1 -0
  133. package/src/zoeService/types.ts +307 -0
  134. package/src/zoeService/utils.d.ts +13 -5
  135. package/src/zoeService/utils.test-d.ts +1 -0
  136. package/src/zoeService/zoe.d.ts +18 -7
  137. package/src/zoeService/zoe.d.ts.map +1 -1
  138. package/src/zoeService/zoe.js +12 -5
  139. package/src/zoeService/zoeSeat.d.ts.map +1 -1
  140. package/src/zoeService/zoeSeat.js +1 -2
  141. package/src/zoeService/zoeStorageManager.d.ts +6 -6
  142. package/src/zoeService/zoeStorageManager.d.ts.map +1 -1
  143. package/src/zoeService/zoeStorageManager.js +13 -4
  144. package/tools/fakeVatAdmin.d.ts +15 -8
  145. package/tools/fakeVatAdmin.d.ts.map +1 -1
  146. package/tools/fakeVatAdmin.js +18 -10
  147. package/tools/manualPriceAuthority.d.ts +4 -1
  148. package/tools/manualPriceAuthority.d.ts.map +1 -1
  149. package/tools/manualPriceAuthority.js +1 -0
  150. package/tools/scriptedOracle.d.ts +7 -3
  151. package/tools/scriptedOracle.d.ts.map +1 -1
  152. package/tools/scriptedOracle.js +4 -0
  153. package/tools/setup-zoe.d.ts +13 -7
  154. package/tools/setup-zoe.d.ts.map +1 -1
  155. package/tools/setup-zoe.js +38 -5
  156. package/tools/test-utils.d.ts +1 -1
  157. package/tools/test-utils.js +1 -1
  158. package/tools/types.d.ts +1 -0
  159. package/tools/types.d.ts.map +1 -1
  160. package/tools/types.js +1 -0
  161. package/src/contractFacet/internal-types.d.ts +0 -8
  162. package/src/contractFacet/internal-types.d.ts.map +0 -1
  163. package/src/contractFacet/internal-types.js +0 -15
  164. package/src/contractFacet/types-ambient.js +0 -1
  165. package/src/contractSupport/ratio.d.ts +0 -37
  166. package/src/contractSupport/ratio.d.ts.map +0 -1
  167. package/src/contractSupport/ratio.js +0 -419
  168. package/src/contractSupport/safeMath.d.ts +0 -11
  169. package/src/contractSupport/safeMath.d.ts.map +0 -1
  170. package/src/contractSupport/safeMath.js +0 -49
@@ -0,0 +1,307 @@
1
+ import type {
2
+ AnyAmount,
3
+ AssetKind,
4
+ DisplayInfo,
5
+ Issuer,
6
+ NatValue,
7
+ Payment,
8
+ } from '@agoric/ertp';
9
+ import type { Subscriber } from '@agoric/notifier';
10
+ import type { ERef, EReturn } from '@endo/eventual-send';
11
+ import type { Bundle, BundleID } from '@agoric/swingset-vat';
12
+ import type { ContractStartFunction, StartParams } from './utils.js';
13
+ import type {
14
+ Keyword,
15
+ InvitationHandle,
16
+ BrandKeywordRecord,
17
+ Handle,
18
+ IssuerKeywordRecord,
19
+ } from '../types.js';
20
+ import type { Allocation } from '../types-index.js';
21
+
22
+ /**
23
+ * @see {@link https://github.com/sindresorhus/type-fest/blob/main/source/is-any.d.ts}
24
+ */
25
+ type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
26
+
27
+ /**
28
+ * Zoe provides a framework for deploying and working with smart
29
+ * contracts. It is accessed as a long-lived and well-trusted service
30
+ * that enforces offer safety for the contracts that use it. Zoe has a
31
+ * single `invitationIssuer` for the entirety of its lifetime. By
32
+ * having a reference to Zoe, a user can get the `invitationIssuer`
33
+ * and thus validate any `invitation` they receive from someone else.
34
+ *
35
+ * Zoe has two different facets: the public Zoe service and the
36
+ * contract facet (ZCF). Each contract instance has a copy of ZCF
37
+ * within its vat. The contract and ZCF never have direct access to
38
+ * the users' payments or the Zoe purses.
39
+ */
40
+ export type ZoeService = {
41
+ /**
42
+ * Zoe has a single `invitationIssuer` for the entirety of its
43
+ * lifetime. By having a reference to Zoe, a user can get the
44
+ * `invitationIssuer` and thus validate any `invitation` they receive
45
+ * from someone else. The mint associated with the invitationIssuer
46
+ * creates the ERTP payments that represent the right to interact with
47
+ * a smart contract in particular ways.
48
+ */
49
+ getInvitationIssuer: GetInvitationIssuer;
50
+ install: InstallBundle;
51
+ installBundleID: InstallBundleID;
52
+ startInstance: import('./utils.js').StartInstance;
53
+ offer: Offer;
54
+ getPublicFacet: <I extends Instance>(
55
+ instance: ERef<I>,
56
+ ) => Promise<
57
+ IsAny<I> extends true
58
+ ? any
59
+ : I extends import('./utils.js').Instance<
60
+ infer SF extends ContractStartFunction
61
+ >
62
+ ? IsAny<SF> extends true
63
+ ? unknown
64
+ : EReturn<SF>['publicFacet']
65
+ : never
66
+ >;
67
+ getIssuers: GetIssuers;
68
+ getBrands: GetBrands;
69
+ getTerms: <I extends ERef<Instance>>(
70
+ instance: I,
71
+ ) => IsAny<I> extends true
72
+ ? Promise<any>
73
+ : I extends ERef<
74
+ import('./utils.js').Instance<infer SF extends ContractStartFunction>
75
+ >
76
+ ? IsAny<SF> extends true
77
+ ? Promise<unknown>
78
+ : Promise<StartParams<SF>['terms']>
79
+ : never;
80
+ getOfferFilter: (instance: ERef<Instance>) => Promise<string[]>;
81
+ getInstallationForInstance: GetInstallationForInstance;
82
+ getInstance: GetInstance;
83
+ getInstallation: GetInstallation;
84
+ /**
85
+ * Return an object with the instance, installation, description, invitation
86
+ * handle, and any custom properties specific to the contract.
87
+ */
88
+ getInvitationDetails: GetInvitationDetails;
89
+ getFeeIssuer: GetFeeIssuer;
90
+ getConfiguration: GetConfiguration;
91
+ getBundleIDFromInstallation: GetBundleIDFromInstallation;
92
+ /**
93
+ * Return the pattern (if any) associated with the invitationHandle that a
94
+ * proposal is required to match to be accepted by zoe.offer().
95
+ */
96
+ getProposalShapeForInvitation: (
97
+ invitationHandle: InvitationHandle,
98
+ ) => import('@endo/patterns').Pattern | undefined;
99
+ };
100
+ type GetInvitationIssuer = () => Promise<Issuer<'set', InvitationDetails>>;
101
+ type GetFeeIssuer = () => Promise<Issuer<'nat'>>;
102
+ type GetConfiguration = () => {
103
+ feeIssuerConfig: FeeIssuerConfig;
104
+ };
105
+ export type GetIssuers = (
106
+ instance: import('./utils.js').Instance<any>,
107
+ ) => Promise<IssuerKeywordRecord>;
108
+ export type GetBrands = (
109
+ instance: import('./utils.js').Instance<any>,
110
+ ) => Promise<BrandKeywordRecord>;
111
+ type GetInstallationForInstance = (
112
+ instance: import('./utils.js').Instance<any>,
113
+ ) => Promise<Installation>;
114
+ export type GetInstance = (
115
+ invitation: ERef<import('../types-index.js').Invitation>,
116
+ ) => Promise<import('./utils.js').Instance<any>>;
117
+ export type GetInstallation = (
118
+ invitation: ERef<import('../types-index.js').Invitation>,
119
+ ) => Promise<Installation>;
120
+ export type GetInvitationDetails = (
121
+ invitation: ERef<import('../types-index.js').Invitation<any, any>>,
122
+ ) => Promise<InvitationDetails>;
123
+ /**
124
+ * Create an installation by safely evaluating the code and
125
+ * registering it with Zoe. Returns an installation.
126
+ */
127
+ export type InstallBundle = (
128
+ bundle: Bundle | SourceBundle,
129
+ bundleLabel?: string | undefined,
130
+ ) => Promise<Installation>;
131
+ /**
132
+ * Create an installation from a Bundle ID. Returns an installation.
133
+ */
134
+ export type InstallBundleID = (
135
+ bundleID: BundleID,
136
+ bundleLabel?: string | undefined,
137
+ ) => Promise<Installation>;
138
+ /**
139
+ * Verify that an alleged Installation is real, and return the Bundle ID it
140
+ * will use for contract code.
141
+ */
142
+ export type GetBundleIDFromInstallation = (
143
+ allegedInstallation: ERef<Installation>,
144
+ ) => Promise<string>;
145
+ /**
146
+ * To redeem an invitation, the user normally provides a proposal (their
147
+ * rules for the offer) as well as payments to be escrowed by Zoe. If
148
+ * either the proposal or payments would be empty, indicate this by
149
+ * omitting that argument or passing undefined, rather than passing an
150
+ * empty record.
151
+ *
152
+ * The proposal has three parts: `want` and `give` are used by Zoe to
153
+ * enforce offer safety, and `exit` is used to specify the particular
154
+ * payout-liveness policy that Zoe can guarantee. `want` and `give`
155
+ * are objects with keywords as keys and amounts as values.
156
+ * `paymentKeywordRecord` is a record with keywords as keys, and the
157
+ * values are the actual payments to be escrowed. A payment is
158
+ * expected for every rule under `give`.
159
+ */
160
+ export type Offer = <Result, Args = undefined>(
161
+ invitation: ERef<import('../types-index.js').Invitation<Result, Args>>,
162
+ proposal?: Proposal,
163
+ paymentKeywordRecord?: PaymentPKeywordRecord,
164
+ offerArgs?: Args,
165
+ ) => Promise<UserSeat<Result>>;
166
+ /**
167
+ * Zoe uses seats to access or manipulate offers. They let contracts and users
168
+ * interact with them. Zoe has two kinds of seats. ZCFSeats are used within
169
+ * contracts and with zcf methods. UserSeats represent offers external to Zoe
170
+ * and the contract. The party who exercises an invitation and sends the offer()
171
+ * message to Zoe gets a UserSeat that can check payouts' status or retrieve the
172
+ * result of processing the offer in the contract. This varies, but examples are
173
+ * a string and an invitation for another seat.
174
+ *
175
+ * Also, a UserSeat can be handed to an agent outside Zoe and the contract,
176
+ * letting them query or monitor the current state, access the payouts and
177
+ * result, and, if it's allowed for this seat, call tryExit().
178
+ *
179
+ * Since anyone can attempt to exit the seat if they have a reference to it, you
180
+ * should only share a UserSeat with trusted parties.
181
+ *
182
+ * UserSeat includes queries for the associated offer's current state and an
183
+ * operation to request that the offer exit, as follows:
184
+ */
185
+ export type UserSeat<OR = unknown> = {
186
+ getProposal: () => Promise<ProposalRecord>;
187
+ /**
188
+ * returns a promise for a KeywordPaymentRecord containing all the payouts from
189
+ * this seat. The promise will resolve after the seat has exited.
190
+ */
191
+ getPayouts: () => Promise<PaymentPKeywordRecord>;
192
+ /**
193
+ * returns a promise for the Payment corresponding to the indicated keyword.
194
+ * The promise will resolve after the seat has exited. If there is no payment
195
+ * corresponding to the keyword, an error will be thrown. (It used to return
196
+ * undefined.)
197
+ */
198
+ getPayout: (keyword: Keyword) => Promise<Payment<any, any>>;
199
+ getOfferResult: () => Promise<OR>;
200
+ /**
201
+ * Note: Only works if the seat's `proposal` has an `OnDemand` `exit` clause. Zoe's
202
+ * offer-safety guarantee applies no matter how a seat's interaction with a
203
+ * contract ends. Under normal circumstances, the participant might be able to
204
+ * call `tryExit()`, or the contract might do something explicitly. On exiting,
205
+ * the seat holder gets its current `allocation` and the `seat` can no longer
206
+ * interact with the contract.
207
+ */
208
+ tryExit?: (() => void) | undefined;
209
+ /**
210
+ * Returns true if the seat has exited, false if it is still active.
211
+ */
212
+ hasExited: () => Promise<boolean>;
213
+ /**
214
+ * returns 1 if the proposal's
215
+ * want clause was satisfied by the final allocation, otherwise 0. This is
216
+ * numeric to support a planned enhancement called "multiples" which will allow
217
+ * the return value to be any non-negative number. The promise will resolve
218
+ * after the seat has exited.
219
+ */
220
+ numWantsSatisfied: () => Promise<0 | 1>;
221
+ /**
222
+ * return a promise for the final allocation. The promise will resolve after the
223
+ * seat has exited.
224
+ */
225
+ getFinalAllocation: () => Promise<Allocation>;
226
+ /**
227
+ * returns a subscriber that
228
+ * will be notified when the seat has exited or failed.
229
+ */
230
+ getExitSubscriber: () => Subscriber<import('../types-index.js').Completion>;
231
+ };
232
+ export type Proposal = Partial<ProposalRecord>;
233
+ export type ProposalRecord = {
234
+ give: AmountKeywordRecord;
235
+ want: AmountKeywordRecord;
236
+ exit: ExitRule;
237
+ };
238
+ /**
239
+ * The keys are keywords, and the values are amounts. For example:
240
+ * { Asset: AmountMath.make(assetBrand, 5n), Price:
241
+ * AmountMath.make(priceBrand, 9n) }
242
+ */
243
+ export type AmountKeywordRecord = Record<Keyword, AnyAmount>;
244
+ export type Waker = {
245
+ wake: () => void;
246
+ };
247
+ export type OnDemandExitRule = {
248
+ onDemand: null;
249
+ };
250
+ export type WaivedExitRule = {
251
+ waived: null;
252
+ };
253
+ export type AfterDeadlineExitRule = {
254
+ afterDeadline: {
255
+ timer: import('@agoric/time').TimerService;
256
+ deadline: import('@agoric/time').Timestamp;
257
+ };
258
+ };
259
+ /**
260
+ * The possible keys are 'waived', 'onDemand', and 'afterDeadline'.
261
+ * `timer` and `deadline` only are used for the `afterDeadline` key.
262
+ * The possible records are:
263
+ * `{ waived: null }`
264
+ * `{ onDemand: null }`
265
+ * `{ afterDeadline: { timer :Timer<Deadline>, deadline :Deadline } }`
266
+ */
267
+ export type ExitRule =
268
+ | OnDemandExitRule
269
+ | WaivedExitRule
270
+ | AfterDeadlineExitRule;
271
+ export type Instance<SF = any> = import('./utils.js').Instance<SF>;
272
+ export type ZCFSpec =
273
+ | {
274
+ bundleCap: import('@agoric/swingset-vat').BundleCap;
275
+ }
276
+ | {
277
+ name: string;
278
+ }
279
+ | {
280
+ /** Bundle ID */
281
+ id: string;
282
+ };
283
+ /**
284
+ * Opaque type for a JSONable source bundle
285
+ */
286
+ export type SourceBundle = Record<string, any>;
287
+ export type PaymentPKeywordRecord = Record<Keyword, ERef<Payment<any>>>;
288
+ export type PaymentKeywordRecord = Record<Keyword, Payment<any>>;
289
+ export type InvitationDetails = {
290
+ installation: Installation;
291
+ instance: import('./utils.js').Instance<any>;
292
+ handle: InvitationHandle;
293
+ description: string;
294
+ customDetails?: Record<string, any> | undefined;
295
+ };
296
+ export type Installation<SF = any> = import('./utils.js').Installation<SF>;
297
+ export type InstallationStart<I extends Installation> =
298
+ import('./utils.js').InstallationStart<I>;
299
+ export type FeeIssuerConfig = {
300
+ name: string;
301
+ assetKind: AssetKind;
302
+ displayInfo: DisplayInfo;
303
+ };
304
+ export type ZoeFeesConfig = {
305
+ getPublicFacetFee: NatValue;
306
+ };
307
+ export type FeeMintAccess = Handle<'feeMintAccess'>;
@@ -1,13 +1,10 @@
1
- // Ambient types
2
- import '../types-ambient.js';
3
- import '../contractFacet/types-ambient.js';
4
-
5
1
  import type { Issuer } from '@agoric/ertp/src/types.js';
6
2
  import type { TagContainer } from '@agoric/internal/src/tagged.js';
7
3
  import type { Baggage } from '@agoric/swingset-liveslots';
8
4
  import type { VatUpgradeResults } from '@agoric/swingset-vat';
9
5
  import type { RemotableObject } from '@endo/marshal';
10
6
  import type { FarRef } from '@endo/far';
7
+ import type { AnyTerms, Handle, Keyword, ZCF } from '../types-index.js';
11
8
 
12
9
  // XXX https://github.com/Agoric/agoric-sdk/issues/4565
13
10
  type SourceBundle = Record<string, any>;
@@ -29,7 +26,7 @@ export type InstallationStart<I> =
29
26
  I extends Installation<infer SF> ? SF : never;
30
27
 
31
28
  export type ContractStartFunction = (
32
- zcf?: ZCF,
29
+ zcf?: ZCF<any>,
33
30
  privateArgs?: object,
34
31
  baggage?: Baggage,
35
32
  ) => ERef<{ creatorFacet?: object; publicFacet?: object }>;
@@ -66,6 +63,8 @@ type ZcfOf<SF extends ContractStartFunction> = Parameters<SF>[0] extends ZCF
66
63
  : ZCF<any>;
67
64
 
68
65
  /**
66
+ * @deprecated use the SF to pass the type
67
+ *
69
68
  * Convenience record for contract start function, merging its result with params.
70
69
  */
71
70
  export type ContractOf<S extends (...args: any) => any> = StartParams<S> &
@@ -125,3 +124,12 @@ export type GetTerms = <SF>(instance: Instance<SF>) => Promise<
125
124
  : // XXX returning `any` in this case
126
125
  any
127
126
  >;
127
+
128
+ export type InstanceRecord = {
129
+ installation: Installation<any>;
130
+ instance: Instance<any>;
131
+ /**
132
+ * - contract parameters
133
+ */
134
+ terms: AnyTerms;
135
+ };
@@ -1,5 +1,6 @@
1
1
  import { E } from '@endo/far';
2
2
  import type { StartedInstanceKit } from './utils.js';
3
+ import type { ZCF } from '../types-index.js';
3
4
 
4
5
  const someContractStartFn = (
5
6
  zcf: ZCF,
@@ -1,5 +1,10 @@
1
+ export * from "../types-index.js";
1
2
  export type ZoeKit = ReturnType<typeof makeDurableZoeKit>;
2
- /** @import {Baggage} from '@agoric/vat-data' */
3
+ /**
4
+ * @import {VatAdminSvc, ShutdownWithFailure} from '@agoric/swingset-vat';
5
+ * @import {Baggage} from '@agoric/vat-data';
6
+ * @import {FeeIssuerConfig, FeeMintAccess, ZCFSpec, ZoeService} from './types.js';
7
+ */
3
8
  /**
4
9
  * Create a durable instance of Zoe.
5
10
  *
@@ -8,7 +13,7 @@ export type ZoeKit = ReturnType<typeof makeDurableZoeKit>;
8
13
  * @param {Promise<VatAdminSvc> | VatAdminSvc} [options.vatAdminSvc] - The vatAdmin Service, which carries the
9
14
  * power to create a new vat. If it's not available when makeZoe() is called, it
10
15
  * must be provided later using setVatAdminService().
11
- * @param {import('@agoric/swingset-vat').ShutdownWithFailure} [options.shutdownZoeVat] - a function to
16
+ * @param {ShutdownWithFailure} [options.shutdownZoeVat] - a function to
12
17
  * shutdown the Zoe Vat. This function needs to use the vatPowers
13
18
  * available to a vat.
14
19
  * @param {FeeIssuerConfig} [options.feeIssuerConfig]
@@ -17,7 +22,7 @@ export type ZoeKit = ReturnType<typeof makeDurableZoeKit>;
17
22
  export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, feeIssuerConfig, zcfSpec, }: {
18
23
  zoeBaggage: Baggage;
19
24
  vatAdminSvc?: VatAdminSvc | Promise<VatAdminSvc> | undefined;
20
- shutdownZoeVat?: import("@agoric/swingset-vat").ShutdownWithFailure | undefined;
25
+ shutdownZoeVat?: ShutdownWithFailure | undefined;
21
26
  feeIssuerConfig?: FeeIssuerConfig | undefined;
22
27
  zcfSpec?: ZCFSpec | undefined;
23
28
  }): {
@@ -27,7 +32,7 @@ export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, fee
27
32
  }>;
28
33
  /** @type {FeeMintAccess} */
29
34
  feeMintAccess: FeeMintAccess;
30
- setVatAdminService: ((lateVatAdminSvc: any) => void) & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
35
+ setVatAdminService: ((lateVatAdminSvc: any) => void) & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
31
36
  };
32
37
  /**
33
38
  * @deprecated
@@ -39,20 +44,26 @@ export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, fee
39
44
  * @param {Promise<VatAdminSvc> | VatAdminSvc} [vatAdminSvc] - The vatAdmin Service, which carries the
40
45
  * power to create a new vat. If it's not available when makeZoe() is called, it
41
46
  * must be provided later using setVatAdminService().
42
- * @param {import('@agoric/swingset-vat').ShutdownWithFailure} [shutdownZoeVat] - a function to
47
+ * @param {ShutdownWithFailure} [shutdownZoeVat] - a function to
43
48
  * shutdown the Zoe Vat. This function needs to use the vatPowers
44
49
  * available to a vat.
45
50
  * @param {FeeIssuerConfig} [feeIssuerConfig]
46
51
  * @param {ZCFSpec} [zcfSpec] - Pointer to the contract facet bundle.
47
52
  */
48
- export function makeZoeKit(vatAdminSvc?: Promise<VatAdminSvc> | VatAdminSvc, shutdownZoeVat?: import("@agoric/swingset-vat").ShutdownWithFailure, feeIssuerConfig?: FeeIssuerConfig, zcfSpec?: ZCFSpec): {
53
+ export function makeZoeKit(vatAdminSvc?: Promise<VatAdminSvc> | VatAdminSvc, shutdownZoeVat?: ShutdownWithFailure, feeIssuerConfig?: FeeIssuerConfig, zcfSpec?: ZCFSpec): {
49
54
  zoeService: import("@endo/exo").Guarded<ZoeService>;
50
55
  zoeConfigFacet: import("@endo/exo").Guarded<{
51
56
  updateZcfBundleId(bundleId: any): void;
52
57
  }>;
53
58
  /** @type {FeeMintAccess} */
54
59
  feeMintAccess: FeeMintAccess;
55
- setVatAdminService: ((lateVatAdminSvc: any) => void) & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
60
+ setVatAdminService: ((lateVatAdminSvc: any) => void) & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>;
56
61
  };
57
62
  import type { Baggage } from '@agoric/vat-data';
63
+ import type { VatAdminSvc } from '@agoric/swingset-vat';
64
+ import type { ShutdownWithFailure } from '@agoric/swingset-vat';
65
+ import type { FeeIssuerConfig } from './types.js';
66
+ import type { ZCFSpec } from './types.js';
67
+ import type { ZoeService } from './types.js';
68
+ import type { FeeMintAccess } from './types.js';
58
69
  //# sourceMappingURL=zoe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zoe.d.ts","sourceRoot":"","sources":["zoe.js"],"names":[],"mappings":"qBAiSa,UAAU,CAAC,OAAO,iBAAiB,CAAC;AAnQjD,gDAAgD;AAEhD;;;;;;;;;;;;;GAaG;AACH,0GAVG;IAAyB,UAAU,EAA3B,OAAO;IACsC,WAAW;IAGK,cAAc;IAGjD,eAAe;IACvB,OAAO;CACnC;;;;;IAgNG,4BAA4B;mBAAjB,aAAa;;EAK3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,yCATW,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,mBAGlC,OAAO,sBAAsB,EAAE,mBAAmB,oBAGlD,eAAe,YACf,OAAO;;;;;IArBd,4BAA4B;mBAAjB,aAAa;;EA8BxB;6BA7PuB,kBAAkB"}
1
+ {"version":3,"file":"zoe.d.ts","sourceRoot":"","sources":["zoe.js"],"names":[],"mappings":";qBAqSa,UAAU,CAAC,OAAO,iBAAiB,CAAC;AAvQjD;;;;GAIG;AAEH;;;;;;;;;;;;;GAaG;AACH,0GAVG;IAAyB,UAAU,EAA3B,OAAO;IACsC,WAAW;IAG1B,cAAc;IAGlB,eAAe;IACvB,OAAO;CACnC;;;;;IAgNG,4BAA4B;mBAAjB,aAAa;;EAK3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,yCATW,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,mBAGlC,mBAAmB,oBAGnB,eAAe,YACf,OAAO;;;;;IArBd,4BAA4B;mBAAjB,aAAa;;EA8BxB;6BA/PsB,kBAAkB;iCADO,sBAAsB;yCAAtB,sBAAsB;qCAEH,YAAY;6BAAZ,YAAY;gCAAZ,YAAY;mCAAZ,YAAY"}
@@ -14,12 +14,12 @@
14
14
  /// <reference types="@agoric/notifier/exported.js" />
15
15
  /// <reference path="../internal-types.js" />
16
16
 
17
+ import { Fail } from '@endo/errors';
17
18
  import { E } from '@endo/eventual-send';
18
19
  import { Far } from '@endo/marshal';
20
+ import { M } from '@endo/patterns';
19
21
  import { makeScalarBigMapStore, prepareExo } from '@agoric/vat-data';
20
- import { M } from '@agoric/store';
21
22
 
22
- import { Fail } from '@endo/errors';
23
23
  import { makeZoeStorageManager } from './zoeStorageManager.js';
24
24
  import { makeStartInstance } from './startInstance.js';
25
25
  import { makeOfferMethod } from './offer/offer.js';
@@ -28,7 +28,11 @@ import { getZcfBundleCap } from './createZCFVat.js';
28
28
  import { defaultFeeIssuerConfig, prepareFeeMint } from './feeMint.js';
29
29
  import { ZoeServiceI } from '../typeGuards.js';
30
30
 
31
- /** @import {Baggage} from '@agoric/vat-data' */
31
+ /**
32
+ * @import {VatAdminSvc, ShutdownWithFailure} from '@agoric/swingset-vat';
33
+ * @import {Baggage} from '@agoric/vat-data';
34
+ * @import {FeeIssuerConfig, FeeMintAccess, ZCFSpec, ZoeService} from './types.js';
35
+ */
32
36
 
33
37
  /**
34
38
  * Create a durable instance of Zoe.
@@ -38,7 +42,7 @@ import { ZoeServiceI } from '../typeGuards.js';
38
42
  * @param {Promise<VatAdminSvc> | VatAdminSvc} [options.vatAdminSvc] - The vatAdmin Service, which carries the
39
43
  * power to create a new vat. If it's not available when makeZoe() is called, it
40
44
  * must be provided later using setVatAdminService().
41
- * @param {import('@agoric/swingset-vat').ShutdownWithFailure} [options.shutdownZoeVat] - a function to
45
+ * @param {ShutdownWithFailure} [options.shutdownZoeVat] - a function to
42
46
  * shutdown the Zoe Vat. This function needs to use the vatPowers
43
47
  * available to a vat.
44
48
  * @param {FeeIssuerConfig} [options.feeIssuerConfig]
@@ -268,7 +272,7 @@ const makeDurableZoeKit = ({
268
272
  * @param {Promise<VatAdminSvc> | VatAdminSvc} [vatAdminSvc] - The vatAdmin Service, which carries the
269
273
  * power to create a new vat. If it's not available when makeZoe() is called, it
270
274
  * must be provided later using setVatAdminService().
271
- * @param {import('@agoric/swingset-vat').ShutdownWithFailure} [shutdownZoeVat] - a function to
275
+ * @param {ShutdownWithFailure} [shutdownZoeVat] - a function to
272
276
  * shutdown the Zoe Vat. This function needs to use the vatPowers
273
277
  * available to a vat.
274
278
  * @param {FeeIssuerConfig} [feeIssuerConfig]
@@ -289,3 +293,6 @@ export { makeDurableZoeKit, makeZoeKit };
289
293
  /**
290
294
  * @typedef {ReturnType<typeof makeDurableZoeKit>} ZoeKit
291
295
  */
296
+
297
+ // eslint-disable-next-line import/export -- no named value exports; only types
298
+ export * from '../types-index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"AAmDO,iDAFI,OAAO,kBAAkB,EAAE,OAAO,uBA0WhC,UAAU,YACV,cAAc,uBACd,mBAAmB,iBACnB,aAAa,YACb,IAAI,CAAC,OAAO,CAAC,2BACb,OAAO;;;;;;;;;;;;;;;;QA3IZ,wCAAwC;8DAA5B,iBAAiB;;;;EAoKpC"}
1
+ {"version":3,"file":"zoeSeat.d.ts","sourceRoot":"","sources":["zoeSeat.js"],"names":[],"mappings":"AAkDO,iDAFI,OAAO,kBAAkB,EAAE,OAAO,uBA0WhC,UAAU,YACV,cAAc,uBACd,mBAAmB,iBACnB,aAAa,YACb,IAAI,CAAC,OAAO,CAAC,2BACb,OAAO;;;;;;;;;;;;;;;;QA3IZ,wCAAwC;8DAA5B,iBAAiB;;;;EAoKpC"}
@@ -7,8 +7,7 @@ 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
- import '../internal-types.js';
10
+
12
11
  import {
13
12
  declareOldZoeSeatAdminKind,
14
13
  OriginalZoeSeatIKit,
@@ -1,10 +1,10 @@
1
- export function makeZoeStorageManager(createZCFVat: CreateZCFVat, getBundleCapForID: GetBundleCapForID, shutdownZoeVat: import("@agoric/swingset-vat").ShutdownWithFailure, feeMint: {
1
+ export function makeZoeStorageManager(createZCFVat: CreateZCFVat, getBundleCapForID: GetBundleCapForID, shutdownZoeVat: ShutdownWithFailure, feeMint: {
2
2
  getFeeIssuerKit: GetFeeIssuerKit;
3
3
  getFeeIssuer: () => Issuer;
4
4
  getFeeBrand: () => Brand;
5
5
  }, zoeBaggage: Baggage): import("@endo/exo").GuardedKit<{
6
6
  zoeServiceDataAccess: {
7
- getInvitationIssuer: () => globalThis.Issuer<"set", InvitationDetails>;
7
+ getInvitationIssuer: () => globalThis.Issuer<"set", import("@agoric/zoe").InvitationDetails>;
8
8
  getBundleIDFromInstallation(allegedInstallation: any): Promise<string | undefined>;
9
9
  getPublicFacet(instance: any): any;
10
10
  getBrands(instance: any): any;
@@ -13,14 +13,14 @@ export function makeZoeStorageManager(createZCFVat: CreateZCFVat, getBundleCapFo
13
13
  getTerms(instance: any): any;
14
14
  getInstallation(instance: any): any;
15
15
  getProposalShapeForInvitation: (invitationHandle: any) => any;
16
- installBundle: (allegedBundle: any, bundleLabel: any) => Promise<Installation<any>>;
17
- installBundleID(bundleID: any, bundleLabel: any): Promise<Installation<unknown>>;
16
+ installBundle: (allegedBundle: any, bundleLabel: any) => Promise<globalThis.Installation>;
17
+ installBundleID(bundleID: any, bundleLabel: any): Promise<globalThis.Installation<unknown>>;
18
18
  };
19
19
  makeOfferAccess: {
20
20
  getAssetKindByBrand: GetAssetKindByBrand;
21
21
  getInstanceAdmin(instance: any): any;
22
22
  getProposalShapeForInvitation: (invitationHandle: any) => any;
23
- getInvitationIssuer: () => globalThis.Issuer<"set", InvitationDetails>;
23
+ getInvitationIssuer: () => globalThis.Issuer<"set", import("@agoric/zoe").InvitationDetails>;
24
24
  depositPayments(proposal: any, payments: any): Promise<Allocation>;
25
25
  };
26
26
  startInstanceAccess: {
@@ -33,7 +33,7 @@ export function makeZoeStorageManager(createZCFVat: CreateZCFVat, getBundleCapFo
33
33
  }>;
34
34
  };
35
35
  invitationIssuerAccess: {
36
- getInvitationIssuer: () => globalThis.Issuer<"set", InvitationDetails>;
36
+ getInvitationIssuer: () => globalThis.Issuer<"set", import("@agoric/zoe").InvitationDetails>;
37
37
  };
38
38
  }>;
39
39
  import type { Baggage } from '@agoric/vat-data';
@@ -1 +1 @@
1
- {"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AAwDO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,OAAO,sBAAsB,EAAE,mBAAmB,WAClD;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;kBAZkC,CAAC;qBAC3B,CAAC;oBAA0B,CAAC;;;;;;;GAsbrD;6BAlc0B,kBAAkB"}
1
+ {"version":3,"file":"zoeStorageManager.d.ts","sourceRoot":"","sources":["zoeStorageManager.js"],"names":[],"mappings":"AAiEO,oDAXI,YAAY,qBAEZ,iBAAiB,kBACjB,mBAAmB,WACnB;IACL,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,KAAK,CAAC;CAC3B,cACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;kBAdyB,CAAC;qBACtC,CAAC;oBAA0B,CAAC;;;;;;;GAwbjC;6BApcyB,kBAAkB"}
@@ -21,15 +21,24 @@ import { prepareInvitationKit } from './makeInvitation.js';
21
21
  import { makeInstanceAdminStorage } from './instanceAdminStorage.js';
22
22
  import { makeInstallationStorage } from './installationStorage.js';
23
23
 
24
- /// <reference path="./types.js" />
25
- import './internal-types.js';
26
24
  import {
27
25
  InstanceStorageManagerIKit,
28
26
  ZoeMintI,
29
27
  ZoeStorageManagerIKit,
30
28
  } from '../typeGuards.js';
31
29
 
32
- /** @import {Baggage} from '@agoric/vat-data' */
30
+ // Deleting this imperative-looking import does not break `yarn lint` in the
31
+ // zoe package. However, clients of zoe such as governance then claim that
32
+ // the `../zoe` package has many "Cannot find name <type>" errors for other
33
+ // types in the zoe package.
34
+ // See https://github.com/Agoric/agoric-sdk/pull/11243#discussion_r2059200058
35
+ // TODO investigate and hopefully fix.
36
+ import './internal-types.js';
37
+
38
+ /**
39
+ * @import {Baggage} from '@agoric/vat-data';
40
+ * @import {InvitationAmount} from '@agoric/zoe';
41
+ */
33
42
 
34
43
  const { ownKeys } = Reflect;
35
44
 
@@ -46,7 +55,7 @@ const { ownKeys } = Reflect;
46
55
  * @param {CreateZCFVat} createZCFVat - the ability to create a new
47
56
  * ZCF Vat
48
57
  * @param {GetBundleCapForID} getBundleCapForID
49
- * @param {import('@agoric/swingset-vat').ShutdownWithFailure} shutdownZoeVat
58
+ * @param {ShutdownWithFailure} shutdownZoeVat
50
59
  * @param {{
51
60
  * getFeeIssuerKit: GetFeeIssuerKit,
52
61
  * getFeeIssuer: () => Issuer,
@@ -14,13 +14,13 @@ declare const fakeVatAdmin: {
14
14
  done: () => Promise<any>;
15
15
  terminateWithFailure: () => void;
16
16
  upgrade: (_bundleCap: any, _options: any) => never;
17
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
17
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
18
18
  done: () => Promise<any>;
19
19
  terminateWithFailure: () => void;
20
20
  upgrade: (_bundleCap: any, _options: any) => never;
21
21
  }>;
22
22
  }>;
23
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
23
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
24
24
  getBundleCap: (bundleID: any) => Promise<any>;
25
25
  waitForBundleCap: (bundleID: any) => Promise<any>;
26
26
  getNamedBundleCap: (name: any) => Promise<any>;
@@ -33,7 +33,7 @@ declare const fakeVatAdmin: {
33
33
  done: () => Promise<any>;
34
34
  terminateWithFailure: () => void;
35
35
  upgrade: (_bundleCap: any, _options: any) => never;
36
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
36
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
37
37
  done: () => Promise<any>;
38
38
  terminateWithFailure: () => void;
39
39
  upgrade: (_bundleCap: any, _options: any) => never;
@@ -58,13 +58,13 @@ export function makeFakeVatAdmin(testContextSetter?: (...args: any) => unknown,
58
58
  done: () => Promise<any>;
59
59
  terminateWithFailure: () => void;
60
60
  upgrade: (_bundleCap: any, _options: any) => never;
61
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
61
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
62
62
  done: () => Promise<any>;
63
63
  terminateWithFailure: () => void;
64
64
  upgrade: (_bundleCap: any, _options: any) => never;
65
65
  }>;
66
66
  }>;
67
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
67
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
68
68
  getBundleCap: (bundleID: any) => Promise<any>;
69
69
  waitForBundleCap: (bundleID: any) => Promise<any>;
70
70
  getNamedBundleCap: (name: any) => Promise<any>;
@@ -77,7 +77,7 @@ export function makeFakeVatAdmin(testContextSetter?: (...args: any) => unknown,
77
77
  done: () => Promise<any>;
78
78
  terminateWithFailure: () => void;
79
79
  upgrade: (_bundleCap: any, _options: any) => never;
80
- } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
80
+ } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
81
81
  done: () => Promise<any>;
82
82
  terminateWithFailure: () => void;
83
83
  upgrade: (_bundleCap: any, _options: any) => never;
@@ -88,15 +88,22 @@ export function makeFakeVatAdmin(testContextSetter?: (...args: any) => unknown,
88
88
  getExitMessage: () => any;
89
89
  getHasExited: () => boolean;
90
90
  getExitWithFailure: () => any;
91
- installBundle: (id: any, bundle: any) => any;
91
+ /**
92
+ * @param {string} id
93
+ * @param {EndoZipBase64Bundle | TestBundle} bundle
94
+ */
95
+ installBundle: (id: string, bundle: EndoZipBase64Bundle | TestBundle) => any;
92
96
  installNamedBundle: (name: any, id: any, bundle: any) => any;
93
97
  getCriticalVatKey: () => {};
94
98
  getVatPowers: () => {
95
99
  D: (bcap: any) => {
96
- getBundle: () => EndoZipBase64Bundle;
100
+ getBundle: () => EndoZipBase64Bundle | {
101
+ moduleFormat: "test";
102
+ } | undefined;
97
103
  };
98
104
  };
99
105
  };
100
106
  };
101
107
  import type { EndoZipBase64Bundle } from '@agoric/swingset-vat';
108
+ import type { TestBundle } from '@agoric/swingset-vat';
102
109
  //# sourceMappingURL=fakeVatAdmin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fakeVatAdmin.d.ts","sourceRoot":"","sources":["fakeVatAdmin.js"],"names":[],"mappings":"AAyBA,+BAA4C;;wBAJ7B,OAAO,sBAAsB,EAAE,SAAS;AAoJvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA8C;AA9I9C;;;GAGG;AACH,qDAHW,CAAC,GAAG,IAAI,KAAA,KAAK,OAAO,eACpB,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqIjC;yCAjJ+C,sBAAsB"}
1
+ {"version":3,"file":"fakeVatAdmin.d.ts","sourceRoot":"","sources":["fakeVatAdmin.js"],"names":[],"mappings":"AAyBA,+BAA4C;;wBAJ7B,OAAO,sBAAsB,EAAE,SAAS;AA4JvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA8C;AAtJ9C;;;GAGG;AACH,qDAHW,CAAC,GAAG,IAAI,KAAA,KAAK,OAAO,eACpB,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgH9B;;;WAGG;4BAFQ,MAAM,UACN,mBAAmB,GAAG,UAAU;;;;;;kCAxGkB,MAAM;;;;;EAmItE;yCAzJ2D,sBAAsB;gCAAtB,sBAAsB"}