@agoric/vats 0.15.2-dev-b5a2ed1.0 → 0.15.2-dev-3da32ff.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.
package/exported.js CHANGED
@@ -1 +1 @@
1
- import './src/core/types.js';
1
+ import './src/core/types-ambient.js';
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  // Ambient types
3
3
  import '@agoric/zoe/exported.js';
4
- import './src/core/types.js';
4
+ import './src/core/types-ambient.js';
5
5
 
6
6
  // eslint-disable-next-line import/export -- no named exports
7
7
  export * from './src/types.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/vats",
3
- "version": "0.15.2-dev-b5a2ed1.0+b5a2ed1",
3
+ "version": "0.15.2-dev-3da32ff.0+3da32ff",
4
4
  "description": "Agoric's Vat library",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -22,18 +22,18 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/assert": "0.6.1-dev-b5a2ed1.0+b5a2ed1",
26
- "@agoric/ertp": "0.16.3-dev-b5a2ed1.0+b5a2ed1",
27
- "@agoric/governance": "0.10.4-dev-b5a2ed1.0+b5a2ed1",
28
- "@agoric/internal": "0.3.3-dev-b5a2ed1.0+b5a2ed1",
29
- "@agoric/network": "0.1.1-dev-b5a2ed1.0+b5a2ed1",
30
- "@agoric/notifier": "0.6.3-dev-b5a2ed1.0+b5a2ed1",
31
- "@agoric/store": "0.9.3-dev-b5a2ed1.0+b5a2ed1",
32
- "@agoric/swingset-vat": "0.32.3-dev-b5a2ed1.0+b5a2ed1",
33
- "@agoric/time": "0.3.3-dev-b5a2ed1.0+b5a2ed1",
34
- "@agoric/vat-data": "0.5.3-dev-b5a2ed1.0+b5a2ed1",
35
- "@agoric/zoe": "0.26.3-dev-b5a2ed1.0+b5a2ed1",
36
- "@agoric/zone": "0.2.3-dev-b5a2ed1.0+b5a2ed1",
25
+ "@agoric/assert": "0.6.1-dev-3da32ff.0+3da32ff",
26
+ "@agoric/ertp": "0.16.3-dev-3da32ff.0+3da32ff",
27
+ "@agoric/governance": "0.10.4-dev-3da32ff.0+3da32ff",
28
+ "@agoric/internal": "0.3.3-dev-3da32ff.0+3da32ff",
29
+ "@agoric/network": "0.1.1-dev-3da32ff.0+3da32ff",
30
+ "@agoric/notifier": "0.6.3-dev-3da32ff.0+3da32ff",
31
+ "@agoric/store": "0.9.3-dev-3da32ff.0+3da32ff",
32
+ "@agoric/swingset-vat": "0.32.3-dev-3da32ff.0+3da32ff",
33
+ "@agoric/time": "0.3.3-dev-3da32ff.0+3da32ff",
34
+ "@agoric/vat-data": "0.5.3-dev-3da32ff.0+3da32ff",
35
+ "@agoric/zoe": "0.26.3-dev-3da32ff.0+3da32ff",
36
+ "@agoric/zone": "0.2.3-dev-3da32ff.0+3da32ff",
37
37
  "@endo/far": "^0.2.21",
38
38
  "@endo/import-bundle": "^0.4.1",
39
39
  "@endo/marshal": "^0.8.8",
@@ -44,7 +44,7 @@
44
44
  "jessie.js": "^0.3.2"
45
45
  },
46
46
  "devDependencies": {
47
- "@agoric/swingset-liveslots": "0.10.3-dev-b5a2ed1.0+b5a2ed1",
47
+ "@agoric/swingset-liveslots": "0.10.3-dev-3da32ff.0+3da32ff",
48
48
  "@endo/bundle-source": "^2.7.0",
49
49
  "@endo/init": "^0.5.59",
50
50
  "ava": "^5.3.0",
@@ -75,5 +75,5 @@
75
75
  "timeout": "20m",
76
76
  "workerThreads": false
77
77
  },
78
- "gitHead": "b5a2ed18430b717a67e97ffea8a2bb457e3b3516"
78
+ "gitHead": "3da32ffbdd6b0a3d6c930bbacee21eae163a715a"
79
79
  }
package/src/bridge.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { M } from '@agoric/store';
4
4
  import '@agoric/store/exported.js';
5
5
  import { E } from '@endo/far';
6
- import './core/types.js';
6
+ import './core/types-ambient.js';
7
7
 
8
8
  const { Fail, details: X } = assert;
9
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"chain-behaviors.d.ts","sourceRoot":"","sources":["chain-behaviors.js"],"names":[],"mappings":"AA8BO,0CAFI,eAAe,iBAqFzB;AAQM,qIAJI,eAAe,GAAG;IAC5B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAUH;AAIM,6DADK,eAAe,iBAG1B;AAIM,gMADK,eAAe,iBAuD1B;AAcM,2FAHI,cAAc,kBACd;IAAE,QAAQ,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,iBAqFhD;AAIM,sMADK,eAAe,iBAc1B;AASM,kNALI,YAAY,YAAY,CAAC,GACnC,cAAkB,GAAG;IACrB,OAAa,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAgCL;AAQM,2LAJI,cAAc,GAAG;IAC3B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBA2BH;AAOM,qLAJI,cAAc,GAAG;IAC3B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAqCH;AAGM,kJADK,eAAe,GAAG,cAAc,iBAkB3C;AAaM,kGATI,eAAe;;;;;;kBAyCzB;AAOM,4DAFI,eAAe,iBAMzB;AAGD,qDAAqD;AACrD,8CADW,OAAO,YAAY,EAAE,iBAAiB,CA2E/C;AAGF,wDAAwD;AACxD,uCADW,OAAO,eAAe,EAAE,iBAAiB,CASjD"}
1
+ {"version":3,"file":"chain-behaviors.d.ts","sourceRoot":"","sources":["chain-behaviors.js"],"names":[],"mappings":"AA8BO,0CAFI,eAAe,iBAqFzB;AAQM,qIAJI,eAAe,GAAG;IAC5B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAUH;AAIM,6DADK,eAAe,iBAG1B;AAIM,gMADK,eAAe,iBAuD1B;AAcM,2FAHI,cAAc,kBACd;IAAE,QAAQ,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,iBAqFhD;AAIM,sMADK,eAAe,iBAc1B;AASM,kNALI,YAAY,YAAY,CAAC,GACnC,cAAkB,GAAG;IACrB,OAAa,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAgCL;AAQM,2LAJI,cAAc,GAAG;IAC3B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBA4BH;AAOM,qLAJI,cAAc,GAAG;IAC3B,OAAW,EAAE;QAAE,eAAe,EAAE,KAAK,UAAU,eAAe,CAAC,CAAC,CAAA;KAAE,CAAC;CAChE,iBAqCH;AAGM,kJADK,eAAe,GAAG,cAAc,iBAkB3C;AAaM,kGATI,eAAe;;;;;;kBAyCzB;AAOM,4DAFI,eAAe,iBAMzB;AAGD,qDAAqD;AACrD,8CADW,OAAO,YAAY,EAAE,iBAAiB,CA2E/C;AAGF,wDAAwD;AACxD,uCADW,OAAO,eAAe,EAAE,iBAAiB,CASjD"}
@@ -363,6 +363,7 @@ export const makeChainStorage = async ({
363
363
  if (!bridgeManager) {
364
364
  console.warn('Cannot support chainStorage without an actual chain.');
365
365
  chainStorageP.resolve(null);
366
+ // @ts-expect-error expects value or undefined
366
367
  storageBridgeManagerP.resolve(null);
367
368
  return;
368
369
  }
@@ -9,7 +9,7 @@ export function startWalletFactory({ vatParameters: { chainStorageEntries }, con
9
9
  vats: SwingsetVats;
10
10
  vatPowers: {
11
11
  [prop: string]: any;
12
- D: DProxy;
12
+ D: DProxy<any>;
13
13
  };
14
14
  vatParameters: BootstrapVatParams;
15
15
  runBehaviors: (manifest: unknown) => Promise<unknown>;
@@ -0,0 +1,475 @@
1
+ /* eslint-disable no-use-before-define */
2
+
3
+ // Ambient type defs. Cannot use top-level import() because that would turn it into a module.
4
+
5
+ /** This type conflicts with packages/SwingSet/src/vats/plugin-manager.js */
6
+ type Device<T> = 'Device' & { __deviceType__: T };
7
+
8
+ /** (approximately) */
9
+ type DProxy<T = any> = (target: Device<T>) => T;
10
+
11
+ type BootDevices<T> = { vatPowers: { D: DProxy }; devices: T };
12
+
13
+ type BridgeDevice = Device<
14
+ ReturnType<
15
+ typeof import('@agoric/swingset-vat/src/devices/bridge/device-bridge.js').buildRootDeviceNode
16
+ >
17
+ >;
18
+
19
+ type CommandDevice = Device<
20
+ ReturnType<
21
+ typeof import('@agoric/swingset-vat/src/devices/command/device-command.js').buildRootDeviceNode
22
+ >
23
+ >;
24
+
25
+ type MailboxDevice = Device<
26
+ ReturnType<
27
+ typeof import('@agoric/swingset-vat/src/devices/mailbox/device-mailbox.js').buildRootDeviceNode
28
+ >
29
+ >;
30
+
31
+ type PluginDevice = Device<
32
+ ReturnType<
33
+ typeof import('@agoric/swingset-vat/src/devices/plugin/device-plugin.js').buildRootDeviceNode
34
+ >
35
+ >;
36
+
37
+ type TimerDevice = Device<
38
+ ReturnType<
39
+ typeof import('@agoric/swingset-vat/src/devices/timer/device-timer.js').buildRootDeviceNode
40
+ >
41
+ >;
42
+
43
+ type VatAdminDevice = Device<
44
+ import('@agoric/swingset-vat/src/devices/vat-admin/device-vat-admin.js').VatAdminRootDeviceNode
45
+ >;
46
+
47
+ type VattpVat = ERef<
48
+ ReturnType<
49
+ typeof import('@agoric/swingset-vat/src/vats/vattp/vat-vattp.js').buildRootObject
50
+ >
51
+ >;
52
+
53
+ type VatAdminVat = ERef<
54
+ ReturnType<
55
+ typeof import('@agoric/swingset-vat/src/vats/vat-admin/vat-vat-admin.js').buildRootObject
56
+ >
57
+ >;
58
+
59
+ /** @see deliverToController in packages/SwingSet/src/vats/comms/controller.js */
60
+ type TimerVat = ERef<
61
+ ReturnType<
62
+ typeof import('@agoric/swingset-vat/src/vats/timer/vat-timer.js').buildRootObject
63
+ >
64
+ >;
65
+
66
+ type CommsVatRoot = ERef<{
67
+ addRemote: (name: string, tx: unknown, rx: unknown) => void;
68
+ addEgress: (addr: string, ix: number, provider: unknown) => void;
69
+ addIngress: (
70
+ remoteID: string,
71
+ remoteRefID: number,
72
+ label?: string,
73
+ ) => Promise<any>;
74
+ }>;
75
+
76
+ type SwingsetVats = {
77
+ comms: CommsVatRoot;
78
+ timer: TimerVat;
79
+ vatAdmin: VatAdminVat;
80
+ vattp: VattpVat;
81
+ };
82
+
83
+ type ChainStorageVatParams = {
84
+ vatParameters: { chainStorageEntries?: [k: string, v: string][] };
85
+ };
86
+
87
+ type SoloDevices = {
88
+ vatAdmin: VatAdminDevice;
89
+ mailbox: MailboxDevice;
90
+ command: CommandDevice;
91
+ timer: TimerDevice;
92
+ plugin: PluginDevice;
93
+ };
94
+
95
+ type ChainDevices = {
96
+ vatAdmin: VatAdminDevice;
97
+ mailbox: MailboxDevice;
98
+ timer: TimerDevice;
99
+ bridge?: BridgeDevice;
100
+ };
101
+
102
+ type ClientProvider = {
103
+ getChainBundle: () => unknown;
104
+ getChainConfigNotifier: () => Notifier<unknown>;
105
+ };
106
+
107
+ type Producer<T> = {
108
+ resolve: (v: ERef<T>) => void;
109
+ reject: (r: unknown) => void;
110
+ reset: (reason?: unknown) => void;
111
+ };
112
+
113
+ type VatSourceRef = { bundleName?: string; bundleID?: string };
114
+ type VatLoader<T> = (name: string, sourceRef?: VatSourceRef) => T;
115
+
116
+ /** callback to assign a property onto the `home` object of the client */
117
+ type PropertyMaker = (addr: string, flags: string[]) => Record<string, unknown>;
118
+
119
+ /** tool to put properties onto the `home` object of the client */
120
+ type ClientManager = {
121
+ assignBundle: (ps: PropertyMaker[]) => void;
122
+ };
123
+ /**
124
+ * @template B - Bidirectional
125
+ * @template C - Consume only
126
+ * @template P - Produce only
127
+ */
128
+ type PromiseSpaceOf<B, C = {}, P = {}> = {
129
+ consume: { [K in keyof (B & C)]: Promise<(B & C)[K]> };
130
+ produce: { [K in keyof (B & P)]: Producer<(B & P)[K]> };
131
+ };
132
+
133
+ type CreateUserBundle = (
134
+ nickname: string,
135
+ clientAddress: string,
136
+ powerFlags: string[],
137
+ ) => Promise<Record<string, Promise<any>>>;
138
+
139
+ type ClientFacet = {
140
+ /**
141
+ * Required for ag-solo, but deprecated in favour of getConfiguration NOTE: we
142
+ * use `any` rather than `unknown` because each client that wants to call a
143
+ * method such as `E(userBundle.bank).deposit(payment)` has to cast
144
+ * userBundle.bank; ideally, the cast is to some useful type. But unknown
145
+ * can't be cast directly to some other type; it has to be cast to any first.
146
+ */
147
+ getChainBundle(): ERef<Record<string, any>>;
148
+ getConfiguration(): AsyncIterable<{
149
+ clientAddress: string;
150
+ clientHome: Record<string, any>;
151
+ }>;
152
+ };
153
+ type ClientCreator = {
154
+ createClientFacet(
155
+ nickname: string,
156
+ clientAddress: string,
157
+ powerFlags: string[],
158
+ ): Promise<ClientFacet>;
159
+ createUserBundle: CreateUserBundle;
160
+ };
161
+
162
+ type WellKnownName = {
163
+ issuer:
164
+ | import('@agoric/internal/src/tokens.js').TokenKeyword
165
+ | 'Invitation'
166
+ | 'AUSD';
167
+ installation:
168
+ | 'centralSupply'
169
+ | 'mintHolder'
170
+ | 'walletFactory'
171
+ | 'provisionPool'
172
+ | 'auctioneer'
173
+ | 'feeDistributor'
174
+ | 'contractGovernor'
175
+ | 'committee'
176
+ | 'noActionElectorate'
177
+ | 'binaryVoteCounter'
178
+ | 'VaultFactory'
179
+ | 'liquidate'
180
+ | 'Pegasus'
181
+ | 'reserve'
182
+ | 'psm'
183
+ | 'econCommitteeCharter'
184
+ | 'priceAggregator';
185
+ instance:
186
+ | 'economicCommittee'
187
+ | 'feeDistributor'
188
+ | 'auctioneer'
189
+ | 'VaultFactory'
190
+ | 'VaultFactoryGovernor'
191
+ | 'econCommitteeCharter'
192
+ | 'walletFactory'
193
+ | 'provisionPool'
194
+ | 'reserve'
195
+ | 'reserveGovernor'
196
+ | 'Pegasus';
197
+ oracleBrand: 'USD';
198
+ uiConfig: 'VaultFactory';
199
+ };
200
+
201
+ type ContractInstallationPromises<StartFns> = {
202
+ [Property in keyof StartFns]: Promise<Installation<StartFns[Property]>>;
203
+ };
204
+
205
+ type WellKnownSpaces = {
206
+ issuer: {
207
+ produce: Record<WellKnownName['issuer'], Producer<Issuer>>;
208
+ consume: Record<WellKnownName['issuer'], Promise<Issuer>> & {
209
+ BLD: Promise<Issuer<'nat'>>;
210
+ IST: Promise<Issuer<'nat'>>;
211
+ };
212
+ };
213
+ brand: {
214
+ produce: Record<WellKnownName['issuer'], Producer<Brand>> & {
215
+ timer: Producer<import('@agoric/time').TimerBrand>;
216
+ };
217
+ consume: Record<WellKnownName['issuer'], Promise<Brand>> & {
218
+ BLD: Promise<Brand<'nat'>>;
219
+ IST: Promise<Brand<'nat'>>;
220
+ timer: Producer<import('@agoric/time').TimerBrand>;
221
+ };
222
+ };
223
+ oracleBrand: {
224
+ produce: Record<WellKnownName['oracleBrand'], Producer<Brand>>;
225
+ consume: Record<WellKnownName['oracleBrand'], Promise<Brand>>;
226
+ };
227
+ installation: {
228
+ produce: Record<WellKnownName['installation'], Producer<Installation>>;
229
+ consume: Record<
230
+ WellKnownName['installation'],
231
+ Promise<Installation<unknown>>
232
+ > &
233
+ ContractInstallationPromises<{
234
+ auctioneer: typeof import('@agoric/inter-protocol/src/auction/auctioneer.js').start;
235
+ centralSupply: typeof import('@agoric/vats/src/centralSupply.js').start;
236
+ committee: typeof import('@agoric/governance/src/committee.js').start;
237
+ contractGovernor: typeof import('@agoric/governance/src/contractGovernor.js').start;
238
+ econCommitteeCharter: typeof import('@agoric/inter-protocol/src/econCommitteeCharter.js').start;
239
+ feeDistributor: typeof import('@agoric/inter-protocol/src/feeDistributor.js').start;
240
+ mintHolder: typeof import('@agoric/vats/src/mintHolder.js').start;
241
+ psm: typeof import('@agoric/inter-protocol/src/psm/psm.js').start;
242
+ provisionPool: typeof import('@agoric/inter-protocol/src/provisionPool.js').start;
243
+ reserve: typeof import('@agoric/inter-protocol/src/reserve/assetReserve.js').start;
244
+ VaultFactory: typeof import('@agoric/inter-protocol/src/vaultFactory/vaultFactory.js').start;
245
+ // no typeof because walletFactory is exporting `start` as a type
246
+ walletFactory: import('@agoric/smart-wallet/src/walletFactory.js').start;
247
+ }>;
248
+ };
249
+ instance: {
250
+ produce: Record<WellKnownName['instance'], Producer<Instance>>;
251
+ consume: Record<WellKnownName['instance'], Promise<Instance>>;
252
+ };
253
+ uiConfig: {
254
+ produce: Record<WellKnownName['uiConfig'], Producer<Record<string, any>>>;
255
+ consume: Record<WellKnownName['uiConfig'], Promise<Record<string, any>>>;
256
+ };
257
+ };
258
+
259
+ type StartGovernedUpgradableOpts<SF extends GovernableStartFn> = {
260
+ installation: ERef<Installation<SF>>;
261
+ issuerKeywordRecord?: IssuerKeywordRecord;
262
+ governedParams: Record<string, unknown>;
263
+ terms: Omit<
264
+ import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'],
265
+ 'brands' | 'issuers' | 'governedParams' | 'electionManager'
266
+ >;
267
+ privateArgs: Omit<
268
+ import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'],
269
+ 'initialPoserInvitation'
270
+ >;
271
+ label: string;
272
+ };
273
+
274
+ type StartGovernedUpgradable = <SF extends GovernableStartFn>(
275
+ opts: StartGovernedUpgradableOpts<SF>,
276
+ ) => Promise<GovernanceFacetKit<SF>>;
277
+
278
+ type StartUpgradableOpts<
279
+ SF extends import('@agoric/zoe/src/zoeService/utils').ContractStartFunction,
280
+ > = {
281
+ installation: ERef<Installation<SF>>;
282
+ issuerKeywordRecord?: IssuerKeywordRecord;
283
+ terms?: Omit<
284
+ import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'],
285
+ 'brands' | 'issuers'
286
+ >;
287
+ privateArgs?: import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'];
288
+ label: string;
289
+ };
290
+
291
+ type StartUpgradable = <
292
+ SF extends import('@agoric/zoe/src/zoeService/utils').ContractStartFunction,
293
+ >(
294
+ opts: StartUpgradableOpts<SF>,
295
+ ) => Promise<
296
+ import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<SF> & {
297
+ label: string;
298
+ }
299
+ >;
300
+
301
+ type StartedInstanceKit<T> =
302
+ import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<T>;
303
+
304
+ type StartedInstanceKitWithLabel = {
305
+ label: string;
306
+ } & StartedInstanceKit<
307
+ import('@agoric/zoe/src/zoeService/utils').ContractStartFunction
308
+ >;
309
+
310
+ type ChainBootstrapSpaceT = {
311
+ agoricNames: import('../types.js').NameHub;
312
+ agoricNamesAdmin: import('@agoric/vats').NameAdmin;
313
+ bankManager: BankManager;
314
+ bldIssuerKit: RemoteIssuerKit;
315
+ board: import('@agoric/vats').Board;
316
+ bridgeManager: import('../types.js').BridgeManager | undefined;
317
+ chainStorage: StorageNode | null;
318
+ chainTimerService: import('@agoric/time/src/types').TimerService;
319
+ client: ClientManager;
320
+ clientCreator: any;
321
+ coreEvalBridgeHandler: import('../types.js').BridgeHandler;
322
+ /** Utilities to support debugging */
323
+ diagnostics: {
324
+ /**
325
+ * Intended to save arguments in durable storage for disaster recovery.
326
+ *
327
+ * Powerful. Can overwrite privateArgs storage for any instance.
328
+ */
329
+ savePrivateArgs: (instance: Instance, privateArgs: unknown) => void;
330
+ };
331
+ /** Super powerful ability to mint IST. ("License to print money") */
332
+ feeMintAccess: FeeMintAccess;
333
+ highPrioritySendersManager:
334
+ | import('@agoric/internal/src/priority-senders.js').PrioritySendersManager
335
+ | undefined
336
+ | null;
337
+ initialSupply: Payment<'nat'>;
338
+ /**
339
+ * Very powerful. Has the private args for critical contract instances such as
340
+ * Vault Factory. ONLY FOR DISASTER RECOVERY
341
+ */
342
+ instancePrivateArgs: Map<Instance, unknown>;
343
+ namesByAddress: import('../types.js').NameHub;
344
+ namesByAddressAdmin: import('../types.js').NamesByAddressAdmin;
345
+ pegasusConnections: import('@agoric/vats').NameHubKit;
346
+ pegasusConnectionsAdmin: import('@agoric/vats').NameAdmin;
347
+ priceAuthorityVat: Awaited<PriceAuthorityVat>;
348
+ priceAuthority: PriceAuthority;
349
+ priceAuthorityAdmin: import('@agoric/zoe/tools/priceAuthorityRegistry').PriceAuthorityRegistryAdmin;
350
+ provisioning: Awaited<ProvisioningVat> | undefined;
351
+ provisionBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
352
+ provisionWalletBridgeManager:
353
+ | import('../types.js').ScopedBridgeManager
354
+ | undefined;
355
+ storageBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
356
+ /**
357
+ * Convienence function for starting a contract (ungoverned) and saving its
358
+ * facets (including adminFacet)
359
+ */
360
+ startUpgradable: StartUpgradable;
361
+ /** kits stored by startUpgradable */
362
+ contractKits: MapStore<Instance, StartedInstanceKitWithLabel>;
363
+ /** Convience function for starting contracts governed by the Econ Committee */
364
+ startGovernedUpgradable: StartGovernedUpgradable;
365
+ /** kits stored by startGovernedUpgradable */
366
+ governedContractKits: MapStore<
367
+ Instance,
368
+ GovernanceFacetKit<any> & { label: string }
369
+ >;
370
+ /** Used only for testing. Should not appear in any production proposals. */
371
+ testFirstAnchorKit: import('../vat-bank.js').AssetIssuerKit<'nat'>;
372
+ walletBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
373
+ walletFactoryStartResult: import('./startWalletFactory.js').WalletFactoryStartResult;
374
+ provisionPoolStartResult: unknown;
375
+ vatStore: import('./utils.js').VatStore;
376
+ zoe: ZoeService;
377
+ };
378
+
379
+ type ChainBootstrapSpace = PromiseSpaceOf<ChainBootstrapSpaceT>;
380
+
381
+ type BootstrapVatParams = {
382
+ argv: {
383
+ hardcodedClientAddresses?: string[];
384
+ FIXME_GCI: string;
385
+ PROVISIONER_INDEX?: number;
386
+ };
387
+ };
388
+
389
+ type BootstrapPowers = BootstrapSpace & {
390
+ zone: import('@agoric/zone').Zone;
391
+ devices: SoloDevices | ChainDevices;
392
+ vats: SwingsetVats;
393
+ vatPowers: { [prop: string]: any; D: DProxy };
394
+ vatParameters: BootstrapVatParams;
395
+ runBehaviors: (manifest: unknown) => Promise<unknown>;
396
+ modules: Record<string, Record<string, any>>;
397
+ };
398
+
399
+ type BootstrapSpace = WellKnownSpaces &
400
+ PromiseSpaceOf<
401
+ ChainBootstrapSpaceT & {
402
+ vatAdminSvc: VatAdminSvc;
403
+ },
404
+ {},
405
+ {
406
+ loadVat: VatLoader<unknown>;
407
+ loadCriticalVat: VatLoader<unknown>;
408
+ }
409
+ >;
410
+
411
+ type ProvisioningVat = ERef<
412
+ ReturnType<typeof import('../vat-provisioning.js').buildRootObject>
413
+ >;
414
+
415
+ type MintsVat = ERef<
416
+ ReturnType<typeof import('../vat-mints.js').buildRootObject>
417
+ >;
418
+
419
+ type PriceAuthorityVat = ERef<
420
+ ReturnType<typeof import('../vat-priceAuthority.js').buildRootObject>
421
+ >;
422
+
423
+ type NetworkVat = ERef<
424
+ ReturnType<typeof import('../vat-network.js').buildRootObject>
425
+ >;
426
+ type IBCVat = ERef<ReturnType<typeof import('../vat-ibc.js').buildRootObject>>;
427
+ type NamedVatPowers = {
428
+ namedVat: PromiseSpaceOf<{
429
+ agoricNames: Awaited<AgoricNamesVat>;
430
+ board: Awaited<BoardVat>;
431
+ }>;
432
+ };
433
+
434
+ type RemoteIssuerKit = {
435
+ mint: ERef<Mint>;
436
+ issuer: ERef<Issuer>;
437
+ brand: Brand;
438
+ };
439
+ type AgoricNamesVat = ERef<
440
+ ReturnType<typeof import('../vat-agoricNames.js').buildRootObject>
441
+ >;
442
+ type BankVat = ERef<
443
+ ReturnType<typeof import('../vat-bank.js').buildRootObject>
444
+ >;
445
+ type BoardVat = ERef<
446
+ ReturnType<typeof import('../vat-board.js').buildRootObject>
447
+ >;
448
+ type ChainStorageVat = ERef<
449
+ ReturnType<typeof import('../vat-bridge.js').buildRootObject>
450
+ >;
451
+ type BankManager = Awaited<ReturnType<Awaited<BankVat>['makeBankManager']>>;
452
+
453
+ type DemoFaucetPowers = PromiseSpaceOf<{
454
+ mints: MintsVat;
455
+ }>;
456
+
457
+ type SoloVats = {
458
+ spawner: SpawnerVat;
459
+ http: HttpVat;
460
+ network: NetworkVat;
461
+ uploads: UploadsVat;
462
+ bootstrap: unknown;
463
+ };
464
+
465
+ type SpawnerVat = ERef<
466
+ ReturnType<typeof import('@agoric/solo/src/vat-spawner.js').buildRootObject>
467
+ >;
468
+
469
+ type HttpVat = ERef<
470
+ ReturnType<typeof import('@agoric/solo/src/vat-http.js').buildRootObject>
471
+ >;
472
+
473
+ type UploadsVat = ERef<
474
+ ReturnType<typeof import('@agoric/solo/src/vat-uploads.js').buildRootObject>
475
+ >;
@@ -0,0 +1 @@
1
+ // Dummy file for .d.ts twin to declare ambients
package/src/nameHub.js CHANGED
@@ -111,7 +111,7 @@ const provideWeak = (store, key, make) => {
111
111
 
112
112
  /**
113
113
  * @param {import('./types.js').NameHubUpdateHandler | undefined} updateCallback
114
- * @param {NameHub} hub
114
+ * @param {import('./types.js').NameHub} hub
115
115
  * @param {unknown} [_newValue]
116
116
  */
117
117
  const updated = (updateCallback, hub, _newValue = undefined) => {
@@ -216,7 +216,7 @@ export const prepareNameHubKit = zone => {
216
216
  const { keyToAdmin, keyToValue } = this.state;
217
217
  if (keyToAdmin.has(key)) {
218
218
  const childAdmin = keyToAdmin.get(key);
219
- /** @type {NameHub} */
219
+ /** @type {import('./types.js').NameHub} */
220
220
  // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
221
221
  // @ts-ignore if an admin is present, it should be a namehub
222
222
  const childHub = keyToValue.get(key);