@agoric/vats 0.15.2-dev-857e650.0 → 0.15.2-dev-284e2db.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/package.json +20 -20
- package/src/bridge.d.ts.map +1 -1
- package/src/bridge.js +23 -11
- package/src/centralSupply.d.ts.map +1 -1
- package/src/centralSupply.js +3 -3
- package/src/core/basic-behaviors.d.ts.map +1 -1
- package/src/core/basic-behaviors.js +55 -49
- package/src/core/boot-chain.js +3 -3
- package/src/core/boot-sim.js +3 -3
- package/src/core/boot-solo.js +4 -4
- package/src/core/chain-behaviors.d.ts.map +1 -1
- package/src/core/chain-behaviors.js +28 -23
- package/src/core/client-behaviors.d.ts.map +1 -1
- package/src/core/client-behaviors.js +5 -4
- package/src/core/demoIssuers.d.ts +17 -15
- package/src/core/demoIssuers.d.ts.map +1 -1
- package/src/core/demoIssuers.js +34 -34
- package/src/core/lib-boot.d.ts +9 -8
- package/src/core/lib-boot.d.ts.map +1 -1
- package/src/core/lib-boot.js +26 -15
- package/src/core/promise-space.d.ts.map +1 -1
- package/src/core/promise-space.js +14 -14
- package/src/core/startWalletFactory.d.ts +4 -1
- package/src/core/startWalletFactory.d.ts.map +1 -1
- package/src/core/startWalletFactory.js +25 -16
- package/src/core/types.d.ts +19 -278
- package/src/core/types.d.ts.map +1 -1
- package/src/core/types.js +385 -210
- package/src/core/utils.d.ts +4 -2
- package/src/core/utils.d.ts.map +1 -1
- package/src/core/utils.js +30 -28
- package/src/crc.d.ts +2 -6
- package/src/crc.d.ts.map +1 -1
- package/src/crc.js +5 -15
- package/src/ibc.d.ts +5 -5
- package/src/ibc.d.ts.map +1 -1
- package/src/ibc.js +22 -40
- package/src/lib-board.d.ts +48 -49
- package/src/lib-board.d.ts.map +1 -1
- package/src/lib-board.js +32 -39
- package/src/mintHolder.d.ts.map +1 -1
- package/src/mintHolder.js +5 -6
- package/src/nameHub.d.ts.map +1 -1
- package/src/nameHub.js +17 -7
- package/src/proposals/network-proposal.d.ts.map +1 -1
- package/src/proposals/network-proposal.js +13 -10
- package/src/proposals/restart-vats-proposal.d.ts +1 -1
- package/src/proposals/restart-vats-proposal.d.ts.map +1 -1
- package/src/proposals/restart-vats-proposal.js +3 -3
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +9 -10
- package/src/provisionPoolKit.d.ts +14 -27
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +26 -29
- package/src/repl.js +1 -1
- package/src/types.d.ts +28 -27
- package/src/types.d.ts.map +1 -1
- package/src/types.js +49 -46
- package/src/vat-bank.d.ts +49 -48
- package/src/vat-bank.d.ts.map +1 -1
- package/src/vat-bank.js +55 -50
- package/src/vat-mints.d.ts +10 -10
- package/src/vat-mints.d.ts.map +1 -1
- package/src/vat-mints.js +6 -6
- package/src/vat-provisioning.d.ts.map +1 -1
- package/src/vat-provisioning.js +11 -6
- package/src/virtual-purse.d.ts +6 -6
- package/src/virtual-purse.d.ts.map +1 -1
- package/src/virtual-purse.js +34 -33
- package/src/walletFlags.js +1 -2
- package/tools/authorityViz.d.ts.map +1 -1
- package/tools/authorityViz.js +34 -25
- package/tools/bank-utils.d.ts +1 -1
- package/tools/bank-utils.d.ts.map +1 -1
- package/tools/bank-utils.js +12 -5
- package/tools/board-utils.d.ts +1 -1
- package/tools/board-utils.d.ts.map +1 -1
- package/tools/board-utils.js +22 -14
- package/tools/boot-test-utils.d.ts.map +1 -1
- package/tools/boot-test-utils.js +7 -9
package/src/core/types.js
CHANGED
|
@@ -12,66 +12,102 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* SwingSet types
|
|
14
14
|
*
|
|
15
|
-
* @typedef {
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @typedef {
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
15
|
+
* @typedef {Device<
|
|
16
|
+
* ReturnType<
|
|
17
|
+
* typeof import('@agoric/swingset-vat/src/devices/bridge/device-bridge.js').buildRootDeviceNode
|
|
18
|
+
* >
|
|
19
|
+
* >} BridgeDevice
|
|
20
|
+
*
|
|
21
|
+
* @typedef {Device<
|
|
22
|
+
* ReturnType<
|
|
23
|
+
* typeof import('@agoric/swingset-vat/src/devices/command/device-command.js').buildRootDeviceNode
|
|
24
|
+
* >
|
|
25
|
+
* >} CommandDevice
|
|
26
|
+
*
|
|
27
|
+
* @typedef {Device<
|
|
28
|
+
* ReturnType<
|
|
29
|
+
* typeof import('@agoric/swingset-vat/src/devices/mailbox/device-mailbox.js').buildRootDeviceNode
|
|
30
|
+
* >
|
|
31
|
+
* >} MailboxDevice
|
|
32
|
+
*
|
|
33
|
+
* @typedef {Device<
|
|
34
|
+
* ReturnType<
|
|
35
|
+
* typeof import('@agoric/swingset-vat/src/devices/plugin/device-plugin.js').buildRootDeviceNode
|
|
36
|
+
* >
|
|
37
|
+
* >} PluginDevice
|
|
38
|
+
*
|
|
39
|
+
* @typedef {Device<
|
|
40
|
+
* ReturnType<
|
|
41
|
+
* typeof import('@agoric/swingset-vat/src/devices/timer/device-timer.js').buildRootDeviceNode
|
|
42
|
+
* >
|
|
43
|
+
* >} TimerDevice
|
|
44
|
+
*
|
|
45
|
+
* @typedef {Device<
|
|
46
|
+
* import('@agoric/swingset-vat/src/devices/vat-admin/device-vat-admin.js').VatAdminRootDeviceNode
|
|
47
|
+
* >} VatAdminDevice
|
|
48
|
+
*
|
|
49
|
+
* @typedef {ERef<
|
|
50
|
+
* ReturnType<
|
|
51
|
+
* typeof import('@agoric/swingset-vat/src/vats/vattp/vat-vattp.js').buildRootObject
|
|
52
|
+
* >
|
|
53
|
+
* >} VattpVat
|
|
54
|
+
*
|
|
55
|
+
* @typedef {ERef<
|
|
56
|
+
* ReturnType<
|
|
57
|
+
* typeof import('@agoric/swingset-vat/src/vats/vat-admin/vat-vat-admin.js').buildRootObject
|
|
58
|
+
* >
|
|
59
|
+
* >} VatAdminVat
|
|
60
|
+
*
|
|
61
|
+
* @typedef {ERef<
|
|
62
|
+
* ReturnType<
|
|
63
|
+
* typeof import('@agoric/swingset-vat/src/vats/timer/vat-timer.js').buildRootObject
|
|
64
|
+
* >
|
|
65
|
+
* >} TimerVat
|
|
66
|
+
* See deliverToController in packages/SwingSet/src/vats/comms/controller.js
|
|
67
|
+
*
|
|
36
68
|
* @typedef {ERef<{
|
|
37
|
-
* addRemote: (name: string, tx: unknown, rx: unknown) => void
|
|
38
|
-
* addEgress: (addr: string, ix: number, provider: unknown) => void
|
|
39
|
-
* addIngress: (
|
|
69
|
+
* addRemote: (name: string, tx: unknown, rx: unknown) => void;
|
|
70
|
+
* addEgress: (addr: string, ix: number, provider: unknown) => void;
|
|
71
|
+
* addIngress: (
|
|
72
|
+
* remoteID: string,
|
|
73
|
+
* remoteRefID: number,
|
|
74
|
+
* label?: string,
|
|
75
|
+
* ) => Promise<any>;
|
|
40
76
|
* }>} CommsVatRoot
|
|
41
77
|
*
|
|
42
78
|
* @typedef {{
|
|
43
|
-
* comms: CommsVatRoot
|
|
44
|
-
* timer: TimerVat
|
|
45
|
-
* vatAdmin: VatAdminVat
|
|
46
|
-
* vattp: VattpVat
|
|
79
|
+
* comms: CommsVatRoot;
|
|
80
|
+
* timer: TimerVat;
|
|
81
|
+
* vatAdmin: VatAdminVat;
|
|
82
|
+
* vattp: VattpVat;
|
|
47
83
|
* }} SwingsetVats
|
|
48
84
|
*
|
|
49
85
|
* @typedef {{
|
|
50
|
-
* vatParameters: { chainStorageEntries?:
|
|
51
|
-
* }}
|
|
86
|
+
* vatParameters: { chainStorageEntries?: [k: string, v: string][] };
|
|
87
|
+
* }} ChainStorageVatParams
|
|
52
88
|
*/
|
|
53
89
|
|
|
54
90
|
/**
|
|
55
91
|
* @typedef {{
|
|
56
|
-
* vatAdmin: VatAdminDevice
|
|
57
|
-
* mailbox: MailboxDevice
|
|
58
|
-
* command: CommandDevice
|
|
59
|
-
* timer: TimerDevice
|
|
60
|
-
* plugin: PluginDevice
|
|
92
|
+
* vatAdmin: VatAdminDevice;
|
|
93
|
+
* mailbox: MailboxDevice;
|
|
94
|
+
* command: CommandDevice;
|
|
95
|
+
* timer: TimerDevice;
|
|
96
|
+
* plugin: PluginDevice;
|
|
61
97
|
* }} SoloDevices
|
|
62
98
|
*
|
|
63
99
|
* @typedef {{
|
|
64
|
-
* vatAdmin: VatAdminDevice
|
|
65
|
-
* mailbox: MailboxDevice
|
|
66
|
-
* timer: TimerDevice
|
|
67
|
-
* bridge?: BridgeDevice
|
|
100
|
+
* vatAdmin: VatAdminDevice;
|
|
101
|
+
* mailbox: MailboxDevice;
|
|
102
|
+
* timer: TimerDevice;
|
|
103
|
+
* bridge?: BridgeDevice;
|
|
68
104
|
* }} ChainDevices
|
|
69
105
|
*/
|
|
70
106
|
|
|
71
107
|
/**
|
|
72
108
|
* @typedef {{
|
|
73
|
-
* getChainBundle: () => unknown
|
|
74
|
-
* getChainConfigNotifier: () => Notifier<unknown
|
|
109
|
+
* getChainBundle: () => unknown;
|
|
110
|
+
* getChainConfigNotifier: () => Notifier<unknown>;
|
|
75
111
|
* }} ClientProvider
|
|
76
112
|
*/
|
|
77
113
|
|
|
@@ -82,9 +118,7 @@
|
|
|
82
118
|
* @property {(r: unknown) => void} reject
|
|
83
119
|
* @property {(reason?: unknown) => void} reset
|
|
84
120
|
*/
|
|
85
|
-
/**
|
|
86
|
-
* @typedef {{ bundleName?: string, bundleID?: string }} VatSourceRef
|
|
87
|
-
*/
|
|
121
|
+
/** @typedef {{ bundleName?: string; bundleID?: string }} VatSourceRef */
|
|
88
122
|
/**
|
|
89
123
|
* @template T
|
|
90
124
|
* @typedef {(name: string, sourceRef?: VatSourceRef) => T} VatLoader<T>
|
|
@@ -92,10 +126,12 @@
|
|
|
92
126
|
|
|
93
127
|
/**
|
|
94
128
|
* @typedef {{
|
|
95
|
-
* assignBundle: (ps: PropertyMaker[]) => void
|
|
96
|
-
* }} ClientManager
|
|
129
|
+
* assignBundle: (ps: PropertyMaker[]) => void;
|
|
130
|
+
* }} ClientManager
|
|
131
|
+
* tool to put properties onto the `home` object of the client
|
|
97
132
|
*
|
|
98
|
-
* @typedef {(addr: string, flags: string[]) => Record<string, unknown>} PropertyMaker
|
|
133
|
+
* @typedef {(addr: string, flags: string[]) => Record<string, unknown>} PropertyMaker
|
|
134
|
+
* callback to assign a property onto the `home` object of the client
|
|
99
135
|
*/
|
|
100
136
|
|
|
101
137
|
/**
|
|
@@ -103,8 +139,8 @@
|
|
|
103
139
|
* @template [C={}] Consume only
|
|
104
140
|
* @template [P={}] Produce only
|
|
105
141
|
* @typedef {{
|
|
106
|
-
* consume: { [K in keyof (B & C)]: Promise<(B & C)[K]> }
|
|
107
|
-
* produce: { [K in keyof (B & P)]: Producer<(B & P)[K]> }
|
|
142
|
+
* consume: { [K in keyof (B & C)]: Promise<(B & C)[K]> };
|
|
143
|
+
* produce: { [K in keyof (B & P)]: Producer<(B & P)[K]> };
|
|
108
144
|
* }} PromiseSpaceOf
|
|
109
145
|
*/
|
|
110
146
|
|
|
@@ -116,232 +152,371 @@
|
|
|
116
152
|
* @returns {Promise<Record<string, Promise<any>>>}
|
|
117
153
|
*
|
|
118
154
|
* @typedef {object} ClientFacet
|
|
119
|
-
* @property {() => ERef<Record<string, any>>} getChainBundle Required for
|
|
120
|
-
* NOTE: we use `any`
|
|
121
|
-
* `
|
|
122
|
-
*
|
|
123
|
-
*
|
|
155
|
+
* @property {() => ERef<Record<string, any>>} getChainBundle Required for
|
|
156
|
+
* ag-solo, but deprecated in favour of getConfiguration NOTE: we use `any`
|
|
157
|
+
* rather than `unknown` because each client that wants to call a method such
|
|
158
|
+
* as `E(userBundle.bank).deposit(payment)` has to cast userBundle.bank;
|
|
159
|
+
* ideally, the cast is to some useful type. But unknown can't be cast
|
|
160
|
+
* directly to some other type; it has to be cast to any first.
|
|
124
161
|
* @property {() => AsyncIterable<Configuration, Configuration>} getConfiguration
|
|
125
162
|
*
|
|
126
|
-
* @typedef {{ clientAddress: string
|
|
163
|
+
* @typedef {{ clientAddress: string; clientHome: Record<string, any> }} Configuration
|
|
127
164
|
*
|
|
128
165
|
* @typedef {object} ClientCreator
|
|
129
|
-
* @property {CreateUserBundle} createUserBundle Required for vat-provisioning,
|
|
130
|
-
*
|
|
166
|
+
* @property {CreateUserBundle} createUserBundle Required for vat-provisioning,
|
|
167
|
+
* but deprecated in favor of {@link createClient}.
|
|
168
|
+
* @property {(
|
|
169
|
+
* nickname: string,
|
|
170
|
+
* clientAddress: string,
|
|
171
|
+
* powerFlags: string[],
|
|
172
|
+
* ) => Promise<ClientFacet>} createClientFacet
|
|
131
173
|
*/
|
|
132
174
|
|
|
133
175
|
/**
|
|
134
176
|
* @typedef {import('@agoric/inter-protocol/src/tokens.js').TokenKeyword} TokenKeyword
|
|
135
177
|
*
|
|
136
178
|
* @typedef {{
|
|
137
|
-
* issuer: |
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* '
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* '
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* '
|
|
154
|
-
*
|
|
155
|
-
* '
|
|
179
|
+
* issuer: TokenKeyword | 'Invitation' | 'AUSD';
|
|
180
|
+
* installation:
|
|
181
|
+
* | 'centralSupply'
|
|
182
|
+
* | 'mintHolder'
|
|
183
|
+
* | 'walletFactory'
|
|
184
|
+
* | 'provisionPool'
|
|
185
|
+
* | 'auctioneer'
|
|
186
|
+
* | 'feeDistributor'
|
|
187
|
+
* | 'contractGovernor'
|
|
188
|
+
* | 'committee'
|
|
189
|
+
* | 'noActionElectorate'
|
|
190
|
+
* | 'binaryVoteCounter'
|
|
191
|
+
* | 'VaultFactory'
|
|
192
|
+
* | 'liquidate'
|
|
193
|
+
* | 'Pegasus'
|
|
194
|
+
* | 'reserve'
|
|
195
|
+
* | 'psm'
|
|
196
|
+
* | 'econCommitteeCharter'
|
|
197
|
+
* | 'priceAggregator';
|
|
198
|
+
* instance:
|
|
199
|
+
* | 'economicCommittee'
|
|
200
|
+
* | 'feeDistributor'
|
|
201
|
+
* | 'auctioneer'
|
|
202
|
+
* | 'VaultFactory'
|
|
203
|
+
* | 'VaultFactoryGovernor'
|
|
204
|
+
* | 'econCommitteeCharter'
|
|
205
|
+
* | 'walletFactory'
|
|
206
|
+
* | 'provisionPool'
|
|
207
|
+
* | 'reserve'
|
|
208
|
+
* | 'reserveGovernor'
|
|
209
|
+
* | 'Pegasus';
|
|
210
|
+
* oracleBrand: 'USD';
|
|
211
|
+
* uiConfig: 'VaultFactory';
|
|
156
212
|
* }} WellKnownName
|
|
157
213
|
*
|
|
158
214
|
* @typedef {{
|
|
159
215
|
* issuer: {
|
|
160
|
-
* produce: Record<WellKnownName['issuer'], Producer<Issuer
|
|
161
|
-
* consume: Record<WellKnownName['issuer'], Promise<Issuer>> & {
|
|
162
|
-
*
|
|
216
|
+
* produce: Record<WellKnownName['issuer'], Producer<Issuer>>;
|
|
217
|
+
* consume: Record<WellKnownName['issuer'], Promise<Issuer>> & {
|
|
218
|
+
* BLD: Promise<Issuer<'nat'>>;
|
|
219
|
+
* IST: Promise<Issuer<'nat'>>;
|
|
220
|
+
* };
|
|
221
|
+
* };
|
|
163
222
|
* brand: {
|
|
164
|
-
* produce: Record<WellKnownName['issuer'], Producer<Brand>> &
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
223
|
+
* produce: Record<WellKnownName['issuer'], Producer<Brand>> & {
|
|
224
|
+
* timer: Producer<import('@agoric/time').TimerBrand>;
|
|
225
|
+
* };
|
|
226
|
+
* consume: Record<WellKnownName['issuer'], Promise<Brand>> & {
|
|
227
|
+
* BLD: Promise<Brand<'nat'>>;
|
|
228
|
+
* IST: Promise<Brand<'nat'>>;
|
|
229
|
+
* timer: Producer<import('@agoric/time').TimerBrand>;
|
|
230
|
+
* };
|
|
231
|
+
* };
|
|
170
232
|
* oracleBrand: {
|
|
171
|
-
* produce: Record<WellKnownName['oracleBrand'], Producer<Brand
|
|
172
|
-
* consume: Record<WellKnownName['oracleBrand'], Promise<Brand
|
|
173
|
-
* }
|
|
174
|
-
* installation:{
|
|
175
|
-
* produce: Record<WellKnownName['installation'], Producer<Installation
|
|
176
|
-
* consume: Record<
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
233
|
+
* produce: Record<WellKnownName['oracleBrand'], Producer<Brand>>;
|
|
234
|
+
* consume: Record<WellKnownName['oracleBrand'], Promise<Brand>>;
|
|
235
|
+
* };
|
|
236
|
+
* installation: {
|
|
237
|
+
* produce: Record<WellKnownName['installation'], Producer<Installation>>;
|
|
238
|
+
* consume: Record<
|
|
239
|
+
* WellKnownName['installation'],
|
|
240
|
+
* Promise<Installation<unknown>>
|
|
241
|
+
* > & {
|
|
242
|
+
* auctioneer: Promise<
|
|
243
|
+
* Installation<
|
|
244
|
+
* import('@agoric/inter-protocol/src/auction/auctioneer.js').start
|
|
245
|
+
* >
|
|
246
|
+
* >;
|
|
247
|
+
* centralSupply: Promise<
|
|
248
|
+
* Installation<import('@agoric/vats/src/centralSupply.js').start>
|
|
249
|
+
* >;
|
|
250
|
+
* committee: Promise<
|
|
251
|
+
* Installation<
|
|
252
|
+
* import('@agoric/governance/src/committee.js')['prepare']
|
|
253
|
+
* >
|
|
254
|
+
* >;
|
|
255
|
+
* contractGovernor: Promise<
|
|
256
|
+
* Installation<
|
|
257
|
+
* import('@agoric/governance/src/contractGovernor.js')['prepare']
|
|
258
|
+
* >
|
|
259
|
+
* >;
|
|
260
|
+
* econCommitteeCharter: Promise<
|
|
261
|
+
* Installation<
|
|
262
|
+
* import('@agoric/inter-protocol/src/econCommitteeCharter.js')['prepare']
|
|
263
|
+
* >
|
|
264
|
+
* >;
|
|
265
|
+
* feeDistributor: Promise<
|
|
266
|
+
* Installation<
|
|
267
|
+
* import('@agoric/inter-protocol/src/feeDistributor.js').start
|
|
268
|
+
* >
|
|
269
|
+
* >;
|
|
270
|
+
* mintHolder: Promise<
|
|
271
|
+
* Installation<import('@agoric/vats/src/mintHolder.js').prepare>
|
|
272
|
+
* >;
|
|
273
|
+
* psm: Promise<
|
|
274
|
+
* Installation<
|
|
275
|
+
* import('@agoric/inter-protocol/src/psm/psm.js')['prepare']
|
|
276
|
+
* >
|
|
277
|
+
* >;
|
|
278
|
+
* provisionPool: Promise<
|
|
279
|
+
* Installation<import('@agoric/vats/src/provisionPool.js')['prepare']>
|
|
280
|
+
* >;
|
|
281
|
+
* reserve: Promise<
|
|
282
|
+
* Installation<
|
|
283
|
+
* import('@agoric/inter-protocol/src/reserve/assetReserve.js')['prepare']
|
|
284
|
+
* >
|
|
285
|
+
* >;
|
|
286
|
+
* VaultFactory: Promise<
|
|
287
|
+
* Installation<
|
|
288
|
+
* import('@agoric/inter-protocol/src/vaultFactory/vaultFactory.js')['prepare']
|
|
289
|
+
* >
|
|
290
|
+
* >;
|
|
291
|
+
* walletFactory: Promise<
|
|
292
|
+
* Installation<
|
|
293
|
+
* import('@agoric/smart-wallet/src/walletFactory.js').prepare
|
|
294
|
+
* >
|
|
295
|
+
* >;
|
|
296
|
+
* };
|
|
297
|
+
* };
|
|
298
|
+
* instance: {
|
|
299
|
+
* produce: Record<WellKnownName['instance'], Producer<Instance>>;
|
|
300
|
+
* consume: Record<WellKnownName['instance'], Promise<Instance>>;
|
|
301
|
+
* };
|
|
195
302
|
* uiConfig: {
|
|
196
|
-
* produce: Record<
|
|
197
|
-
*
|
|
198
|
-
*
|
|
303
|
+
* produce: Record<
|
|
304
|
+
* WellKnownName['uiConfig'],
|
|
305
|
+
* Producer<Record<string, any>>
|
|
306
|
+
* >;
|
|
307
|
+
* consume: Record<WellKnownName['uiConfig'], Promise<Record<string, any>>>;
|
|
308
|
+
* };
|
|
199
309
|
* }} WellKnownSpaces
|
|
200
310
|
*/
|
|
201
311
|
|
|
202
312
|
/**
|
|
203
313
|
* @template {GovernableStartFn} SF
|
|
204
314
|
* @typedef {{
|
|
205
|
-
* installation: ERef<Installation<SF
|
|
206
|
-
* issuerKeywordRecord?: IssuerKeywordRecord
|
|
207
|
-
* governedParams: Record<string, unknown
|
|
208
|
-
* terms: Omit<
|
|
209
|
-
*
|
|
210
|
-
*
|
|
315
|
+
* installation: ERef<Installation<SF>>;
|
|
316
|
+
* issuerKeywordRecord?: IssuerKeywordRecord;
|
|
317
|
+
* governedParams: Record<string, unknown>;
|
|
318
|
+
* terms: Omit<
|
|
319
|
+
* import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'],
|
|
320
|
+
* 'brands' | 'issuers' | 'governedParams' | 'electionManager'
|
|
321
|
+
* >;
|
|
322
|
+
* privateArgs: Omit<
|
|
323
|
+
* import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'],
|
|
324
|
+
* 'initialPoserInvitation'
|
|
325
|
+
* >;
|
|
326
|
+
* label: string;
|
|
211
327
|
* }} StartGovernedUpgradableOpts
|
|
212
|
-
*
|
|
213
328
|
*/
|
|
214
329
|
/**
|
|
215
|
-
* @typedef {<SF extends GovernableStartFn>(
|
|
216
|
-
*
|
|
330
|
+
* @typedef {<SF extends GovernableStartFn>(
|
|
331
|
+
* opts: StartGovernedUpgradableOpts<SF>,
|
|
332
|
+
* ) => Promise<GovernanceFacetKit<SF>>} startGovernedUpgradable
|
|
217
333
|
*/
|
|
218
334
|
|
|
219
335
|
/**
|
|
220
336
|
* @template {import('@agoric/zoe/src/zoeService/utils').ContractStartFunction} SF
|
|
221
337
|
* @typedef {{
|
|
222
|
-
* installation: ERef<Installation<SF
|
|
223
|
-
* issuerKeywordRecord?: IssuerKeywordRecord
|
|
224
|
-
* terms?: Omit<
|
|
225
|
-
*
|
|
226
|
-
*
|
|
338
|
+
* installation: ERef<Installation<SF>>;
|
|
339
|
+
* issuerKeywordRecord?: IssuerKeywordRecord;
|
|
340
|
+
* terms?: Omit<
|
|
341
|
+
* import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'],
|
|
342
|
+
* 'brands' | 'issuers'
|
|
343
|
+
* >;
|
|
344
|
+
* privateArgs?: import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'];
|
|
345
|
+
* label: string;
|
|
227
346
|
* }} StartUpgradableOpts
|
|
228
347
|
*/
|
|
229
348
|
/**
|
|
230
|
-
* @typedef {<
|
|
231
|
-
*
|
|
232
|
-
* import('@agoric/zoe/src/zoeService/utils').
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
349
|
+
* @typedef {<
|
|
350
|
+
* SF extends
|
|
351
|
+
* import('@agoric/zoe/src/zoeService/utils').ContractStartFunction,
|
|
352
|
+
* >(
|
|
353
|
+
* opts: StartUpgradableOpts<SF>,
|
|
354
|
+
* ) => Promise<
|
|
355
|
+
* import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<SF> & {
|
|
356
|
+
* label: string;
|
|
357
|
+
* }
|
|
358
|
+
* >} StartUpgradable
|
|
236
359
|
*/
|
|
237
360
|
|
|
238
|
-
/**
|
|
361
|
+
/**
|
|
362
|
+
* @template T @typedef
|
|
363
|
+
* {import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<T> }
|
|
364
|
+
* StartedInstanceKit
|
|
365
|
+
*/
|
|
239
366
|
|
|
240
|
-
/**
|
|
367
|
+
/**
|
|
368
|
+
* @typedef {{ label: string } & StartedInstanceKit<
|
|
369
|
+
* import('@agoric/zoe/src/zoeService/utils').ContractStartFunction
|
|
370
|
+
* >} StartedInstanceKitWithLabel
|
|
371
|
+
*/
|
|
241
372
|
|
|
242
373
|
/**
|
|
243
374
|
* @typedef {{
|
|
244
|
-
* agoricNames: NameHub
|
|
245
|
-
* agoricNamesAdmin: import('@agoric/vats').NameAdmin
|
|
246
|
-
* bankManager: BankManager
|
|
247
|
-
* bldIssuerKit: RemoteIssuerKit
|
|
248
|
-
* board: import('@agoric/vats').Board
|
|
249
|
-
* bridgeManager: import('../types.js').BridgeManager | undefined
|
|
250
|
-
* chainStorage: StorageNode | null
|
|
251
|
-
* chainTimerService: import('@agoric/time/src/types').TimerService
|
|
252
|
-
* client: ClientManager
|
|
253
|
-
* clientCreator: ClientCreator
|
|
254
|
-
* coreEvalBridgeHandler: import('../types.js').BridgeHandler
|
|
255
|
-
* diagnostics: {
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
375
|
+
* agoricNames: NameHub;
|
|
376
|
+
* agoricNamesAdmin: import('@agoric/vats').NameAdmin;
|
|
377
|
+
* bankManager: BankManager;
|
|
378
|
+
* bldIssuerKit: RemoteIssuerKit;
|
|
379
|
+
* board: import('@agoric/vats').Board;
|
|
380
|
+
* bridgeManager: import('../types.js').BridgeManager | undefined;
|
|
381
|
+
* chainStorage: StorageNode | null;
|
|
382
|
+
* chainTimerService: import('@agoric/time/src/types').TimerService;
|
|
383
|
+
* client: ClientManager;
|
|
384
|
+
* clientCreator: ClientCreator;
|
|
385
|
+
* coreEvalBridgeHandler: import('../types.js').BridgeHandler;
|
|
386
|
+
* diagnostics: {
|
|
387
|
+
* savePrivateArgs: (instance: Instance, privateArgs: unknown) => void;
|
|
388
|
+
* };
|
|
389
|
+
* feeMintAccess: FeeMintAccess;
|
|
390
|
+
* highPrioritySendersManager: import('@agoric/internal/src/priority-senders.js').PrioritySendersManager?;
|
|
391
|
+
* initialSupply: Payment<'nat'>;
|
|
392
|
+
* instancePrivateArgs: Map<Instance, unknown>;
|
|
393
|
+
* namesByAddress: NameHub;
|
|
394
|
+
* namesByAddressAdmin: import('../types').NamesByAddressAdmin;
|
|
395
|
+
* pegasusConnections: import('@agoric/vats').NameHubKit;
|
|
396
|
+
* pegasusConnectionsAdmin: import('@agoric/vats').NameAdmin;
|
|
397
|
+
* priceAuthorityVat: Awaited<PriceAuthorityVat>;
|
|
398
|
+
* priceAuthority: PriceAuthority;
|
|
399
|
+
* priceAuthorityAdmin: PriceAuthorityRegistryAdmin;
|
|
400
|
+
* provisioning: Awaited<ProvisioningVat> | undefined;
|
|
401
|
+
* provisionBridgeManager:
|
|
402
|
+
* | import('../types.js').ScopedBridgeManager
|
|
403
|
+
* | undefined;
|
|
404
|
+
* provisionWalletBridgeManager:
|
|
405
|
+
* | import('../types.js').ScopedBridgeManager
|
|
406
|
+
* | undefined;
|
|
407
|
+
* storageBridgeManager: import('../types.js').ScopedBridgeManager?;
|
|
408
|
+
* contractKits: MapStore<Instance, StartedInstanceKitWithLabel>;
|
|
409
|
+
* startUpgradable: StartUpgradable;
|
|
410
|
+
* governedContractKits: MapStore<
|
|
411
|
+
* Instance,
|
|
412
|
+
* GovernanceFacetKit<any> & { label: string }
|
|
413
|
+
* >;
|
|
414
|
+
* startGovernedUpgradable: startGovernedUpgradable;
|
|
415
|
+
* testFirstAnchorKit: import('../vat-bank.js').AssetIssuerKit<'nat'>;
|
|
416
|
+
* walletBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
|
|
417
|
+
* walletFactoryStartResult: import('./startWalletFactory').WalletFactoryStartResult;
|
|
418
|
+
* provisionPoolStartResult: unknown;
|
|
419
|
+
* vatStore: import('./utils.js').VatStore;
|
|
420
|
+
* zoe: ZoeService;
|
|
281
421
|
* }} ChainBootstrapSpaceT
|
|
422
|
+
*
|
|
282
423
|
* @typedef {PromiseSpaceOf<ChainBootstrapSpaceT>} ChainBootstrapSpace
|
|
283
424
|
*
|
|
284
|
-
* @typedef {import('@agoric/vats').NameHub} NameHub
|
|
285
|
-
*
|
|
425
|
+
* @typedef {import('@agoric/vats').NameHub} NameHub IDEA/TODO: make types of
|
|
426
|
+
* demo stuff invisible in production behaviors
|
|
427
|
+
*
|
|
286
428
|
* @typedef {{
|
|
287
429
|
* argv: {
|
|
288
|
-
* hardcodedClientAddresses?: string[]
|
|
289
|
-
* FIXME_GCI: string
|
|
290
|
-
* PROVISIONER_INDEX?: number
|
|
291
|
-
* }
|
|
430
|
+
* hardcodedClientAddresses?: string[];
|
|
431
|
+
* FIXME_GCI: string;
|
|
432
|
+
* PROVISIONER_INDEX?: number;
|
|
433
|
+
* };
|
|
292
434
|
* }} BootstrapVatParams
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
435
|
+
*
|
|
436
|
+
* @typedef {BootstrapSpace & {
|
|
437
|
+
* zone: import('@agoric/zone').Zone;
|
|
438
|
+
* devices: SoloDevices | ChainDevices;
|
|
439
|
+
* vats: SwingsetVats;
|
|
440
|
+
* vatPowers: { [prop: string]: any; D: DProxy };
|
|
441
|
+
* vatParameters: BootstrapVatParams;
|
|
442
|
+
* runBehaviors: (manifest: unknown) => Promise<unknown>;
|
|
443
|
+
* modules: Record<string, Record<string, any>>;
|
|
301
444
|
* }} BootstrapPowers
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
445
|
+
*
|
|
446
|
+
* @typedef {WellKnownSpaces &
|
|
447
|
+
* PromiseSpaceOf<
|
|
448
|
+
* ChainBootstrapSpaceT & {
|
|
449
|
+
* vatAdminSvc: VatAdminSvc;
|
|
450
|
+
* },
|
|
451
|
+
* {},
|
|
452
|
+
* {
|
|
453
|
+
* loadVat: VatLoader<unknown>;
|
|
454
|
+
* loadCriticalVat: VatLoader<unknown>;
|
|
455
|
+
* }
|
|
456
|
+
* >} BootstrapSpace
|
|
457
|
+
*
|
|
458
|
+
* @typedef {{ mint: ERef<Mint>; issuer: ERef<Issuer>; brand: Brand }} RemoteIssuerKit
|
|
459
|
+
*
|
|
310
460
|
* @typedef {Awaited<ReturnType<Awaited<BankVat>['makeBankManager']>>} BankManager
|
|
461
|
+
*
|
|
311
462
|
* @typedef {ERef<ReturnType<import('../vat-agoricNames').buildRootObject>>} AgoricNamesVat
|
|
463
|
+
*
|
|
312
464
|
* @typedef {ERef<ReturnType<import('../vat-bank.js').buildRootObject>>} BankVat
|
|
465
|
+
*
|
|
313
466
|
* @typedef {ERef<ReturnType<import('../vat-board.js').buildRootObject>>} BoardVat
|
|
467
|
+
*
|
|
314
468
|
* @typedef {ERef<ReturnType<import('../vat-bridge.js').buildRootObject>>} ChainStorageVat
|
|
315
|
-
*
|
|
469
|
+
*
|
|
470
|
+
* @typedef {ERef<
|
|
471
|
+
* ReturnType<import('../vat-provisioning.js').buildRootObject>
|
|
472
|
+
* >} ProvisioningVat
|
|
473
|
+
*
|
|
316
474
|
* @typedef {ERef<ReturnType<import('../vat-mints.js').buildRootObject>>} MintsVat
|
|
317
|
-
*
|
|
475
|
+
*
|
|
476
|
+
* @typedef {ERef<
|
|
477
|
+
* ReturnType<import('../vat-priceAuthority.js').buildRootObject>
|
|
478
|
+
* >} PriceAuthorityVat
|
|
479
|
+
*
|
|
318
480
|
* @typedef {ERef<ReturnType<import('../vat-network.js').buildRootObject>>} NetworkVat
|
|
481
|
+
*
|
|
319
482
|
* @typedef {ERef<ReturnType<import('../vat-ibc.js').buildRootObject>>} IBCVat
|
|
320
|
-
* @typedef { import('@agoric/zoe/tools/priceAuthorityRegistry').PriceAuthorityRegistryAdmin } PriceAuthorityRegistryAdmin
|
|
321
483
|
*
|
|
322
|
-
* @typedef {
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
484
|
+
* @typedef {import('@agoric/zoe/tools/priceAuthorityRegistry').PriceAuthorityRegistryAdmin} PriceAuthorityRegistryAdmin
|
|
485
|
+
*
|
|
486
|
+
* @typedef {{
|
|
487
|
+
* namedVat: PromiseSpaceOf<{
|
|
488
|
+
* agoricNames: Awaited<AgoricNamesVat>;
|
|
489
|
+
* board: Awaited<BoardVat>;
|
|
490
|
+
* }>;
|
|
491
|
+
* }} NamedVatPowers
|
|
326
492
|
*/
|
|
327
493
|
|
|
328
494
|
/**
|
|
329
495
|
* @typedef {PromiseSpaceOf<{
|
|
330
|
-
* mints: MintsVat
|
|
496
|
+
* mints: MintsVat;
|
|
331
497
|
* }>} DemoFaucetPowers
|
|
332
498
|
*/
|
|
333
499
|
|
|
334
500
|
/**
|
|
335
501
|
* @typedef {{
|
|
336
|
-
* spawner: SpawnerVat
|
|
337
|
-
* http: HttpVat
|
|
338
|
-
* network: NetworkVat
|
|
339
|
-
* uploads: UploadsVat
|
|
340
|
-
* bootstrap: unknown
|
|
502
|
+
* spawner: SpawnerVat;
|
|
503
|
+
* http: HttpVat;
|
|
504
|
+
* network: NetworkVat;
|
|
505
|
+
* uploads: UploadsVat;
|
|
506
|
+
* bootstrap: unknown;
|
|
341
507
|
* }} SoloVats
|
|
342
|
-
*
|
|
343
|
-
* @typedef {ERef<
|
|
344
|
-
*
|
|
508
|
+
*
|
|
509
|
+
* @typedef {ERef<
|
|
510
|
+
* ReturnType<import('@agoric/solo/src/vat-spawner.js').buildRootObject>
|
|
511
|
+
* >} SpawnerVat
|
|
512
|
+
*
|
|
513
|
+
* @typedef {ERef<
|
|
514
|
+
* ReturnType<import('@agoric/solo/src/vat-http.js').buildRootObject>
|
|
515
|
+
* >} HttpVat
|
|
516
|
+
*
|
|
517
|
+
* @typedef {ERef<
|
|
518
|
+
* ReturnType<import('@agoric/solo/src/vat-uploads.js').buildRootObject>
|
|
519
|
+
* >} UploadsVat
|
|
345
520
|
*/
|
|
346
521
|
|
|
347
|
-
/** @template T @typedef
|
|
522
|
+
/** @template T @typedef {{vatPowers: { D: DProxy }, devices: T}} BootDevices<T> */
|