@agoric/vats 0.15.2-dev-ecf2d8e.0 → 0.15.2-other-dev-70beeb7.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/CHANGELOG.md +9 -0
- package/decentral-core-config.json +66 -0
- package/decentral-demo-config.json +155 -0
- package/decentral-devnet-config.json +216 -0
- package/decentral-itest-vaults-config.json +210 -0
- package/decentral-main-vaults-config.json +229 -0
- package/decentral-test-vaults-config.json +195 -0
- package/demo-proposals.json +5 -0
- package/exported.js +1 -1
- package/jsconfig.build.json +12 -0
- package/{tsconfig.json → jsconfig.json} +0 -3
- package/package.json +42 -32
- package/scripts/build-bundles.d.ts +3 -0
- package/scripts/build-bundles.d.ts.map +1 -0
- package/scripts/build-bundles.js +3 -8
- package/scripts/build-game1-start.d.ts +5 -0
- package/scripts/build-game1-start.d.ts.map +1 -0
- package/scripts/build-game1-start.js +34 -0
- package/scripts/build-walletFactory-upgrade.d.ts +5 -0
- package/scripts/build-walletFactory-upgrade.d.ts.map +1 -0
- package/scripts/build-walletFactory-upgrade.js +35 -0
- package/scripts/init-core.d.ts +5 -0
- package/scripts/init-core.d.ts.map +1 -0
- package/scripts/init-core.js +31 -0
- package/scripts/init-network.d.ts +5 -0
- package/scripts/init-network.d.ts.map +1 -0
- package/scripts/init-network.js +19 -0
- package/scripts/restart-vats.d.ts +5 -0
- package/scripts/restart-vats.d.ts.map +1 -0
- package/scripts/restart-vats.js +23 -0
- package/scripts/set-core-proposal-env.d.ts +3 -0
- package/scripts/set-core-proposal-env.d.ts.map +1 -0
- package/scripts/set-core-proposal-env.js +37 -0
- package/src/bridge.d.ts +3 -12
- package/src/bridge.d.ts.map +1 -1
- package/src/bridge.js +12 -24
- package/src/centralSupply.d.ts.map +1 -1
- package/src/centralSupply.js +3 -3
- package/src/core/basic-behaviors.d.ts +7 -7
- package/src/core/basic-behaviors.d.ts.map +1 -1
- package/src/core/basic-behaviors.js +50 -56
- package/src/core/boot-chain.d.ts +1 -1
- 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 +23 -29
- package/src/core/client-behaviors.d.ts.map +1 -1
- package/src/core/client-behaviors.js +4 -5
- package/src/core/demoIssuers.d.ts +15 -17
- package/src/core/demoIssuers.d.ts.map +1 -1
- package/src/core/demoIssuers.js +36 -36
- package/src/core/lib-boot.d.ts +9 -11
- package/src/core/lib-boot.d.ts.map +1 -1
- package/src/core/lib-boot.js +22 -32
- package/src/core/promise-space.d.ts.map +1 -1
- package/src/core/promise-space.js +14 -14
- package/src/core/sim-behaviors.d.ts +1 -1
- package/src/core/sim-behaviors.d.ts.map +1 -1
- package/src/core/startWalletFactory.d.ts +62 -9
- package/src/core/startWalletFactory.d.ts.map +1 -1
- package/src/core/startWalletFactory.js +17 -26
- package/src/core/types.d.ts +820 -0
- package/src/core/types.d.ts.map +1 -0
- package/src/core/types.js +347 -0
- package/src/core/utils.d.ts +16 -18
- package/src/core/utils.d.ts.map +1 -1
- package/src/core/utils.js +30 -32
- package/src/crc.d.ts +6 -2
- package/src/crc.d.ts.map +1 -1
- package/src/crc.js +15 -5
- package/src/ibc.d.ts +5 -5
- package/src/ibc.d.ts.map +1 -1
- package/src/ibc.js +47 -27
- package/src/lib-board.d.ts +50 -49
- package/src/lib-board.d.ts.map +1 -1
- package/src/lib-board.js +39 -32
- package/src/mintHolder.d.ts +1 -3
- package/src/mintHolder.d.ts.map +1 -1
- package/src/mintHolder.js +8 -13
- package/src/nameHub.d.ts +2 -18
- package/src/nameHub.d.ts.map +1 -1
- package/src/nameHub.js +17 -26
- package/src/proposals/network-proposal.d.ts.map +1 -1
- package/src/proposals/network-proposal.js +12 -15
- 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 +5 -3
- package/src/provisionPool.d.ts +164 -0
- package/src/provisionPool.d.ts.map +1 -0
- package/src/provisionPool.js +113 -0
- package/src/provisionPoolKit.d.ts +408 -0
- package/src/provisionPoolKit.d.ts.map +1 -0
- package/src/provisionPoolKit.js +464 -0
- package/src/repl.js +1 -1
- package/src/tokens.d.ts +36 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/tokens.js +37 -0
- package/src/types.d.ts +103 -84
- package/src/types.d.ts.map +1 -0
- package/src/types.js +97 -1
- package/src/vat-agoricNames.d.ts +1 -1
- package/src/vat-agoricNames.d.ts.map +1 -1
- package/src/vat-agoricNames.js +3 -2
- package/src/vat-bank.d.ts +58 -62
- package/src/vat-bank.d.ts.map +1 -1
- package/src/vat-bank.js +54 -62
- package/src/vat-board.d.ts +1 -1
- package/src/vat-bridge.d.ts +30 -2
- package/src/vat-bridge.d.ts.map +1 -1
- package/src/vat-mints.d.ts +12 -12
- package/src/vat-mints.d.ts.map +1 -1
- package/src/vat-mints.js +6 -6
- package/src/vat-network.d.ts +1 -1
- package/src/vat-network.d.ts.map +1 -1
- package/src/vat-network.js +1 -1
- package/src/vat-priceAuthority.d.ts +1 -1
- package/src/vat-provisioning.d.ts +1 -1
- package/src/vat-provisioning.d.ts.map +1 -1
- package/src/vat-provisioning.js +7 -11
- package/src/vat-sharing.d.ts +54 -0
- package/src/vat-sharing.d.ts.map +1 -0
- package/src/vat-sharing.js +14 -0
- package/src/vat-zoe.d.ts +0 -2
- package/src/vat-zoe.d.ts.map +1 -1
- package/src/vat-zoe.js +2 -8
- package/src/virtual-purse.d.ts +12 -37
- package/src/virtual-purse.d.ts.map +1 -1
- package/src/virtual-purse.js +36 -38
- package/src/walletFlags.d.ts +2 -2
- package/src/walletFlags.js +2 -1
- package/tools/authorityViz.d.ts +27 -0
- package/tools/authorityViz.d.ts.map +1 -0
- package/tools/authorityViz.js +272 -0
- package/tools/bank-utils.d.ts +1 -1
- package/tools/bank-utils.d.ts.map +1 -1
- package/tools/bank-utils.js +5 -12
- package/tools/board-utils.d.ts +19 -5
- package/tools/board-utils.d.ts.map +1 -1
- package/tools/board-utils.js +81 -29
- package/tools/boot-test-utils.d.ts +10 -9
- package/tools/boot-test-utils.d.ts.map +1 -1
- package/tools/boot-test-utils.js +16 -6
- package/tools/viz.mk +17 -0
- package/index.js +0 -11
- package/src/core/types-ambient.d.ts +0 -475
- package/src/core/types-ambient.js +0 -1
- package/src/proposals/zcf-proposal.d.ts +0 -30
- package/src/proposals/zcf-proposal.d.ts.map +0 -1
- package/src/proposals/zcf-proposal.js +0 -45
- package/tsconfig.build.json +0 -6
|
@@ -0,0 +1,820 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This type conflicts with packages/SwingSet/src/vats/plugin-manager.js
|
|
3
|
+
*/
|
|
4
|
+
type Device<T> = 'Device' & {
|
|
5
|
+
__deviceType__: T;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* (approximately)
|
|
9
|
+
*/
|
|
10
|
+
type DProxy = <T>(target: Device<T>) => T;
|
|
11
|
+
/**
|
|
12
|
+
* SwingSet types
|
|
13
|
+
*/
|
|
14
|
+
type BridgeDevice = Device<ReturnType<typeof import('@agoric/swingset-vat/src/devices/bridge/device-bridge.js').buildRootDeviceNode>>;
|
|
15
|
+
/**
|
|
16
|
+
* SwingSet types
|
|
17
|
+
*/
|
|
18
|
+
type CommandDevice = Device<ReturnType<typeof import('@agoric/swingset-vat/src/devices/command/device-command.js').buildRootDeviceNode>>;
|
|
19
|
+
/**
|
|
20
|
+
* SwingSet types
|
|
21
|
+
*/
|
|
22
|
+
type MailboxDevice = Device<ReturnType<typeof import('@agoric/swingset-vat/src/devices/mailbox/device-mailbox.js').buildRootDeviceNode>>;
|
|
23
|
+
/**
|
|
24
|
+
* SwingSet types
|
|
25
|
+
*/
|
|
26
|
+
type PluginDevice = Device<ReturnType<typeof import('@agoric/swingset-vat/src/devices/plugin/device-plugin.js').buildRootDeviceNode>>;
|
|
27
|
+
/**
|
|
28
|
+
* SwingSet types
|
|
29
|
+
*/
|
|
30
|
+
type TimerDevice = Device<ReturnType<typeof import('@agoric/swingset-vat/src/devices/timer/device-timer.js').buildRootDeviceNode>>;
|
|
31
|
+
/**
|
|
32
|
+
* SwingSet types
|
|
33
|
+
*/
|
|
34
|
+
type VatAdminDevice = Device<import('@agoric/swingset-vat/src/devices/vat-admin/device-vat-admin.js').VatAdminRootDeviceNode>;
|
|
35
|
+
/**
|
|
36
|
+
* SwingSet types
|
|
37
|
+
*/
|
|
38
|
+
type VattpVat = ERef<ReturnType<typeof import('@agoric/swingset-vat/src/vats/vattp/vat-vattp.js').buildRootObject>>;
|
|
39
|
+
/**
|
|
40
|
+
* SwingSet types
|
|
41
|
+
*/
|
|
42
|
+
type VatAdminVat = ERef<ReturnType<typeof import('@agoric/swingset-vat/src/vats/vat-admin/vat-vat-admin.js').buildRootObject>>;
|
|
43
|
+
/**
|
|
44
|
+
* See deliverToController in packages/SwingSet/src/vats/comms/controller.js
|
|
45
|
+
*/
|
|
46
|
+
type TimerVat = ERef<ReturnType<typeof import('@agoric/swingset-vat/src/vats/timer/vat-timer.js').buildRootObject>>;
|
|
47
|
+
/**
|
|
48
|
+
* SwingSet types
|
|
49
|
+
*/
|
|
50
|
+
type CommsVatRoot = {
|
|
51
|
+
addRemote: (name: string, tx: unknown, rx: unknown) => void;
|
|
52
|
+
addEgress: (addr: string, ix: number, provider: unknown) => void;
|
|
53
|
+
addIngress: (remoteID: string, remoteRefID: number, label?: string) => Promise<any>;
|
|
54
|
+
} | PromiseLike<{
|
|
55
|
+
addRemote: (name: string, tx: unknown, rx: unknown) => void;
|
|
56
|
+
addEgress: (addr: string, ix: number, provider: unknown) => void;
|
|
57
|
+
addIngress: (remoteID: string, remoteRefID: number, label?: string) => Promise<any>;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* SwingSet types
|
|
61
|
+
*/
|
|
62
|
+
type SwingsetVats = {
|
|
63
|
+
comms: CommsVatRoot;
|
|
64
|
+
timer: TimerVat;
|
|
65
|
+
vatAdmin: VatAdminVat;
|
|
66
|
+
vattp: VattpVat;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* SwingSet types
|
|
70
|
+
*/
|
|
71
|
+
type ChainStorageVatParams = {
|
|
72
|
+
vatParameters: {
|
|
73
|
+
chainStorageEntries?: Array<[k: string, v: string]>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
type SoloDevices = {
|
|
77
|
+
vatAdmin: VatAdminDevice;
|
|
78
|
+
mailbox: MailboxDevice;
|
|
79
|
+
command: CommandDevice;
|
|
80
|
+
timer: TimerDevice;
|
|
81
|
+
plugin: PluginDevice;
|
|
82
|
+
};
|
|
83
|
+
type ChainDevices = {
|
|
84
|
+
vatAdmin: VatAdminDevice;
|
|
85
|
+
mailbox: MailboxDevice;
|
|
86
|
+
timer: TimerDevice;
|
|
87
|
+
bridge?: BridgeDevice;
|
|
88
|
+
};
|
|
89
|
+
type ClientProvider = {
|
|
90
|
+
getChainBundle: () => unknown;
|
|
91
|
+
getChainConfigNotifier: () => Notifier<unknown>;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* <T>
|
|
95
|
+
*/
|
|
96
|
+
type Producer<T> = {
|
|
97
|
+
resolve: (v: ERef<T>) => void;
|
|
98
|
+
reject: (r: unknown) => void;
|
|
99
|
+
reset: (reason?: unknown) => void;
|
|
100
|
+
};
|
|
101
|
+
type VatSourceRef = {
|
|
102
|
+
bundleName?: string;
|
|
103
|
+
bundleID?: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* <T>
|
|
107
|
+
*/
|
|
108
|
+
type VatLoader<T> = (name: string, sourceRef?: VatSourceRef) => T;
|
|
109
|
+
/**
|
|
110
|
+
* tool to put properties onto the `home` object of the client
|
|
111
|
+
*/
|
|
112
|
+
type ClientManager = {
|
|
113
|
+
assignBundle: (ps: PropertyMaker[]) => void;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* callback to assign a property onto the `home` object of the client
|
|
117
|
+
*/
|
|
118
|
+
type PropertyMaker = (addr: string, flags: string[]) => Record<string, unknown>;
|
|
119
|
+
type PromiseSpaceOf<B, C = {}, P = {}> = {
|
|
120
|
+
consume: B & C extends infer T ? { [K in keyof T]: Promise<(B & C)[K]>; } : never;
|
|
121
|
+
produce: B & P extends infer T_1 ? { [K_1 in keyof T_1]: Producer<(B & P)[K_1]>; } : never;
|
|
122
|
+
};
|
|
123
|
+
type CreateUserBundle = (nickname: string, clientAddress: string, powerFlags: string[]) => Promise<Record<string, Promise<any>>>;
|
|
124
|
+
type ClientFacet = {
|
|
125
|
+
/**
|
|
126
|
+
* Required for ag-solo, but deprecated in favour of getConfiguration
|
|
127
|
+
* NOTE: we use `any` rather than `unknown` because each client that wants to call a method such as
|
|
128
|
+
* `E(userBundle.bank).deposit(payment)` has to cast userBundle.bank;
|
|
129
|
+
* ideally, the cast is to some useful type. But unknown can't be cast directly to some other type;
|
|
130
|
+
* it has to be cast to any first.
|
|
131
|
+
*/
|
|
132
|
+
getChainBundle: () => ERef<Record<string, any>>;
|
|
133
|
+
getConfiguration: () => AsyncIterable<Configuration, Configuration>;
|
|
134
|
+
};
|
|
135
|
+
type Configuration = {
|
|
136
|
+
clientAddress: string;
|
|
137
|
+
clientHome: Record<string, any>;
|
|
138
|
+
};
|
|
139
|
+
type ClientCreator = {
|
|
140
|
+
/**
|
|
141
|
+
* Required for vat-provisioning, but deprecated in favor of {@link createClient }.
|
|
142
|
+
*/
|
|
143
|
+
createUserBundle: CreateUserBundle;
|
|
144
|
+
createClientFacet: (nickname: string, clientAddress: string, powerFlags: string[]) => Promise<ClientFacet>;
|
|
145
|
+
};
|
|
146
|
+
type TokenKeyword = import('../tokens.js').TokenKeyword;
|
|
147
|
+
type WellKnownName = {
|
|
148
|
+
issuer: TokenKeyword | 'Invitation' | 'AUSD';
|
|
149
|
+
installation: 'centralSupply' | 'mintHolder' | 'walletFactory' | 'provisionPool' | 'auctioneer' | 'feeDistributor' | 'contractGovernor' | 'committee' | 'noActionElectorate' | 'binaryVoteCounter' | 'VaultFactory' | 'liquidate' | 'Pegasus' | 'reserve' | 'psm' | 'econCommitteeCharter' | 'priceAggregator';
|
|
150
|
+
instance: 'economicCommittee' | 'feeDistributor' | 'auctioneer' | 'VaultFactory' | 'VaultFactoryGovernor' | 'econCommitteeCharter' | 'walletFactory' | 'provisionPool' | 'reserve' | 'reserveGovernor' | 'Pegasus';
|
|
151
|
+
oracleBrand: 'USD';
|
|
152
|
+
uiConfig: 'VaultFactory';
|
|
153
|
+
};
|
|
154
|
+
type WellKnownSpaces = {
|
|
155
|
+
issuer: {
|
|
156
|
+
produce: Record<WellKnownName['issuer'], Producer<Issuer>>;
|
|
157
|
+
consume: Record<WellKnownName['issuer'], Promise<Issuer>> & {
|
|
158
|
+
BLD: Promise<Issuer<'nat'>>;
|
|
159
|
+
IST: Promise<Issuer<'nat'>>;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
brand: {
|
|
163
|
+
produce: Record<WellKnownName['issuer'], Producer<Brand>> & {
|
|
164
|
+
timer: Producer<import('@agoric/time').TimerBrand>;
|
|
165
|
+
};
|
|
166
|
+
consume: Record<WellKnownName['issuer'], Promise<Brand>> & {
|
|
167
|
+
BLD: Promise<Brand<'nat'>>;
|
|
168
|
+
IST: Promise<Brand<'nat'>>;
|
|
169
|
+
timer: Producer<import('@agoric/time').TimerBrand>;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
oracleBrand: {
|
|
173
|
+
produce: Record<WellKnownName['oracleBrand'], Producer<Brand>>;
|
|
174
|
+
consume: Record<WellKnownName['oracleBrand'], Promise<Brand>>;
|
|
175
|
+
};
|
|
176
|
+
installation: {
|
|
177
|
+
produce: Record<WellKnownName['installation'], Producer<Installation>>;
|
|
178
|
+
consume: Record<WellKnownName['installation'], Promise<Installation<unknown>>> & {
|
|
179
|
+
auctioneer: Promise<Installation<(zcf: ZCF<GovernanceTerms<{
|
|
180
|
+
Electorate: "invitation";
|
|
181
|
+
StartFrequency: "relativeTime";
|
|
182
|
+
ClockStep: "relativeTime";
|
|
183
|
+
StartingRate: "nat";
|
|
184
|
+
LowestRate: "nat";
|
|
185
|
+
DiscountStep: "nat";
|
|
186
|
+
AuctionStartDelay: "relativeTime";
|
|
187
|
+
/**
|
|
188
|
+
* @typedef {{
|
|
189
|
+
* getChainBundle: () => unknown,
|
|
190
|
+
* getChainConfigNotifier: () => Notifier<unknown>,
|
|
191
|
+
* }} ClientProvider
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* @typedef {object} Producer<T>
|
|
195
|
+
* @property {(v: ERef<T>) => void} resolve
|
|
196
|
+
* @property {(r: unknown) => void} reject
|
|
197
|
+
* @property {(reason?: unknown) => void} reset
|
|
198
|
+
* @template T
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* @typedef {{ bundleName?: string, bundleID?: string }} VatSourceRef
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* @typedef {(name: string, sourceRef?: VatSourceRef) => T} VatLoader<T>
|
|
205
|
+
* @template T
|
|
206
|
+
*/
|
|
207
|
+
/**
|
|
208
|
+
* @typedef {{
|
|
209
|
+
* assignBundle: (ps: PropertyMaker[]) => void
|
|
210
|
+
* }} ClientManager tool to put properties onto the `home` object of the client
|
|
211
|
+
*
|
|
212
|
+
* @typedef {(addr: string, flags: string[]) => Record<string, unknown>} PropertyMaker callback to assign a property onto the `home` object of the client
|
|
213
|
+
*/
|
|
214
|
+
/**
|
|
215
|
+
* @template B Bidirectional
|
|
216
|
+
* @template [C={}] Consume only
|
|
217
|
+
* @template [P={}] Produce only
|
|
218
|
+
* @typedef {{
|
|
219
|
+
* consume: { [K in keyof (B & C)]: Promise<(B & C)[K]> },
|
|
220
|
+
* produce: { [K in keyof (B & P)]: Producer<(B & P)[K]> },
|
|
221
|
+
* }} PromiseSpaceOf
|
|
222
|
+
*/
|
|
223
|
+
/**
|
|
224
|
+
* @callback CreateUserBundle
|
|
225
|
+
* @param {string} nickname
|
|
226
|
+
* @param {string} clientAddress
|
|
227
|
+
* @param {string[]} powerFlags
|
|
228
|
+
* @returns {Promise<Record<string, Promise<any>>>}
|
|
229
|
+
*
|
|
230
|
+
* @typedef {object} ClientFacet
|
|
231
|
+
* @property {() => ERef<Record<string, any>>} getChainBundle Required for ag-solo, but deprecated in favour of getConfiguration
|
|
232
|
+
* NOTE: we use `any` rather than `unknown` because each client that wants to call a method such as
|
|
233
|
+
* `E(userBundle.bank).deposit(payment)` has to cast userBundle.bank;
|
|
234
|
+
* ideally, the cast is to some useful type. But unknown can't be cast directly to some other type;
|
|
235
|
+
* it has to be cast to any first.
|
|
236
|
+
* @property {() => AsyncIterable<Configuration, Configuration>} getConfiguration
|
|
237
|
+
*
|
|
238
|
+
* @typedef {{ clientAddress: string, clientHome: Record<string, any>}} Configuration
|
|
239
|
+
*
|
|
240
|
+
* @typedef {object} ClientCreator
|
|
241
|
+
* @property {CreateUserBundle} createUserBundle Required for vat-provisioning, but deprecated in favor of {@link createClient}.
|
|
242
|
+
* @property {(nickname: string, clientAddress: string, powerFlags: string[]) => Promise<ClientFacet>} createClientFacet
|
|
243
|
+
*/
|
|
244
|
+
/**
|
|
245
|
+
* @typedef {import('../tokens.js').TokenKeyword} TokenKeyword
|
|
246
|
+
*
|
|
247
|
+
* @typedef {{
|
|
248
|
+
* issuer: |
|
|
249
|
+
* TokenKeyword | 'Invitation' | 'AUSD',
|
|
250
|
+
* installation: |
|
|
251
|
+
* 'centralSupply' | 'mintHolder' |
|
|
252
|
+
* 'walletFactory' | 'provisionPool' | 'auctioneer' |
|
|
253
|
+
* 'feeDistributor' |
|
|
254
|
+
* 'contractGovernor' | 'committee' | 'noActionElectorate' | 'binaryVoteCounter' |
|
|
255
|
+
* 'VaultFactory' | 'liquidate' |
|
|
256
|
+
* 'Pegasus' | 'reserve' | 'psm' | 'econCommitteeCharter' | 'priceAggregator',
|
|
257
|
+
* instance: |
|
|
258
|
+
* 'economicCommittee' | 'feeDistributor' | 'auctioneer' |
|
|
259
|
+
* 'VaultFactory' | 'VaultFactoryGovernor' |
|
|
260
|
+
* 'econCommitteeCharter' |
|
|
261
|
+
* 'walletFactory' | 'provisionPool' |
|
|
262
|
+
* 'reserve' | 'reserveGovernor' | 'Pegasus',
|
|
263
|
+
* oracleBrand:
|
|
264
|
+
* 'USD',
|
|
265
|
+
* uiConfig: |
|
|
266
|
+
* 'VaultFactory'
|
|
267
|
+
* }} WellKnownName
|
|
268
|
+
*
|
|
269
|
+
* @typedef {{
|
|
270
|
+
* issuer: {
|
|
271
|
+
* produce: Record<WellKnownName['issuer'], Producer<Issuer>>,
|
|
272
|
+
* consume: Record<WellKnownName['issuer'], Promise<Issuer>> & { BLD: Promise<Issuer<'nat'>>, IST: Promise<Issuer<'nat'>> },
|
|
273
|
+
* },
|
|
274
|
+
* brand: {
|
|
275
|
+
* produce: Record<WellKnownName['issuer'], Producer<Brand>> &
|
|
276
|
+
* { timer: Producer<import('@agoric/time').TimerBrand> },
|
|
277
|
+
* consume: Record<WellKnownName['issuer'], Promise<Brand>> &
|
|
278
|
+
* { BLD: Promise<Brand<'nat'>>, IST: Promise<Brand<'nat'>>,
|
|
279
|
+
* timer: Producer<import('@agoric/time').TimerBrand> },
|
|
280
|
+
* },
|
|
281
|
+
* oracleBrand: {
|
|
282
|
+
* produce: Record<WellKnownName['oracleBrand'], Producer<Brand>>,
|
|
283
|
+
* consume: Record<WellKnownName['oracleBrand'], Promise<Brand>>,
|
|
284
|
+
* },
|
|
285
|
+
* installation:{
|
|
286
|
+
* produce: Record<WellKnownName['installation'], Producer<Installation>>,
|
|
287
|
+
* consume: Record<WellKnownName['installation'], Promise<Installation<unknown>>> & {
|
|
288
|
+
* auctioneer: Promise<Installation<import('@agoric/inter-protocol/src/auction/auctioneer.js').start>>,
|
|
289
|
+
* centralSupply: Promise<Installation<import('@agoric/vats/src/centralSupply.js').start>>,
|
|
290
|
+
* committee: Promise<Installation<import('@agoric/governance/src/committee.js')['prepare']>>,
|
|
291
|
+
* contractGovernor: Promise<Installation<import('@agoric/governance/src/contractGovernor.js')['prepare']>>,
|
|
292
|
+
* econCommitteeCharter: Promise<Installation<import('@agoric/inter-protocol/src/econCommitteeCharter.js')['prepare']>>,
|
|
293
|
+
* feeDistributor: Promise<Installation<import('@agoric/inter-protocol/src/feeDistributor.js').start>>,
|
|
294
|
+
* mintHolder: Promise<Installation<import('@agoric/vats/src/mintHolder.js').prepare>>,
|
|
295
|
+
* psm: Promise<Installation<import('@agoric/inter-protocol/src/psm/psm.js')['prepare']>>,
|
|
296
|
+
* provisionPool: Promise<Installation<import('@agoric/vats/src/provisionPool.js')['prepare']>>,
|
|
297
|
+
* reserve: Promise<Installation<import('@agoric/inter-protocol/src/reserve/assetReserve.js')['prepare']>>,
|
|
298
|
+
* VaultFactory: Promise<Installation<import('@agoric/inter-protocol/src/vaultFactory/vaultFactory.js')['prepare']>>,
|
|
299
|
+
* walletFactory: Promise<Installation<import('@agoric/smart-wallet/src/walletFactory.js').prepare>>,
|
|
300
|
+
* },
|
|
301
|
+
* },
|
|
302
|
+
* instance:{
|
|
303
|
+
* produce: Record<WellKnownName['instance'], Producer<Instance>>,
|
|
304
|
+
* consume: Record<WellKnownName['instance'], Promise<Instance>>,
|
|
305
|
+
* },
|
|
306
|
+
* uiConfig: {
|
|
307
|
+
* produce: Record<WellKnownName['uiConfig'], Producer<Record<string, any>>>,
|
|
308
|
+
* consume: Record<WellKnownName['uiConfig'], Promise<Record<string, any>>>,
|
|
309
|
+
* },
|
|
310
|
+
* }} WellKnownSpaces
|
|
311
|
+
*/
|
|
312
|
+
/**
|
|
313
|
+
* @template {GovernableStartFn} SF
|
|
314
|
+
* @typedef {{
|
|
315
|
+
* installation: ERef<Installation<SF>>,
|
|
316
|
+
* issuerKeywordRecord?: IssuerKeywordRecord,
|
|
317
|
+
* governedParams: Record<string, unknown>,
|
|
318
|
+
* terms: Omit<import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'], 'brands' | 'issuers' | 'governedParams' | 'electionManager'>,
|
|
319
|
+
* privateArgs: Omit<import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'], 'initialPoserInvitation'>,
|
|
320
|
+
* label: string,
|
|
321
|
+
* }} StartGovernedUpgradableOpts
|
|
322
|
+
*
|
|
323
|
+
*/
|
|
324
|
+
/**
|
|
325
|
+
* @typedef {<SF extends GovernableStartFn>(opts: StartGovernedUpgradableOpts<SF>) => Promise<GovernanceFacetKit<SF>>
|
|
326
|
+
* } startGovernedUpgradable
|
|
327
|
+
*/
|
|
328
|
+
/**
|
|
329
|
+
* @template {import('@agoric/zoe/src/zoeService/utils').ContractStartFunction} SF
|
|
330
|
+
* @typedef {{
|
|
331
|
+
* installation: ERef<Installation<SF>>,
|
|
332
|
+
* issuerKeywordRecord?: IssuerKeywordRecord,
|
|
333
|
+
* terms?: Omit<import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'], 'brands' | 'issuers'>,
|
|
334
|
+
* privateArgs?: import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'],
|
|
335
|
+
* label: string,
|
|
336
|
+
* }} StartUpgradableOpts
|
|
337
|
+
*/
|
|
338
|
+
/**
|
|
339
|
+
* @typedef {<SF extends import('@agoric/zoe/src/zoeService/utils').ContractStartFunction>(opts: StartUpgradableOpts<SF>)
|
|
340
|
+
* => Promise<
|
|
341
|
+
* import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<SF> &
|
|
342
|
+
* { label: string }
|
|
343
|
+
* >
|
|
344
|
+
* } StartUpgradable
|
|
345
|
+
*/
|
|
346
|
+
/** @template T @typedef {import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<T> } StartedInstanceKit */
|
|
347
|
+
/** @typedef {{label: string} & StartedInstanceKit<import('@agoric/zoe/src/zoeService/utils').ContractStartFunction>} StartedInstanceKitWithLabel */
|
|
348
|
+
/**
|
|
349
|
+
* @typedef {{
|
|
350
|
+
* agoricNames: NameHub,
|
|
351
|
+
* agoricNamesAdmin: import('@agoric/vats').NameAdmin,
|
|
352
|
+
* bankManager: BankManager,
|
|
353
|
+
* bldIssuerKit: RemoteIssuerKit,
|
|
354
|
+
* board: import('@agoric/vats').Board,
|
|
355
|
+
* bridgeManager: import('../types.js').BridgeManager | undefined,
|
|
356
|
+
* chainStorage: StorageNode | null,
|
|
357
|
+
* chainTimerService: import('@agoric/time/src/types').TimerService,
|
|
358
|
+
* client: ClientManager,
|
|
359
|
+
* clientCreator: ClientCreator,
|
|
360
|
+
* coreEvalBridgeHandler: import('../types.js').BridgeHandler,
|
|
361
|
+
* diagnostics: { savePrivateArgs: (instance: Instance, privateArgs: unknown) => void },
|
|
362
|
+
* feeMintAccess: FeeMintAccess,
|
|
363
|
+
* highPrioritySendersManager: import('@agoric/internal/src/priority-senders.js').PrioritySendersManager?,
|
|
364
|
+
* initialSupply: Payment<'nat'>,
|
|
365
|
+
* instancePrivateArgs: Map<Instance, unknown>,
|
|
366
|
+
* namesByAddress: NameHub,
|
|
367
|
+
* namesByAddressAdmin: import('../types').NamesByAddressAdmin,
|
|
368
|
+
* pegasusConnections: import('@agoric/vats').NameHubKit,
|
|
369
|
+
* pegasusConnectionsAdmin: import('@agoric/vats').NameAdmin,
|
|
370
|
+
* priceAuthorityVat: Awaited<PriceAuthorityVat>,
|
|
371
|
+
* priceAuthority: PriceAuthority,
|
|
372
|
+
* priceAuthorityAdmin: PriceAuthorityRegistryAdmin,
|
|
373
|
+
* provisioning: Awaited<ProvisioningVat> | undefined,
|
|
374
|
+
* provisionBridgeManager: import('../types.js').ScopedBridgeManager | undefined,
|
|
375
|
+
* provisionWalletBridgeManager: import('../types.js').ScopedBridgeManager | undefined,
|
|
376
|
+
* storageBridgeManager: import('../types.js').ScopedBridgeManager?,
|
|
377
|
+
* contractKits: MapStore<Instance, StartedInstanceKitWithLabel>,
|
|
378
|
+
* startUpgradable: StartUpgradable,
|
|
379
|
+
* governedContractKits: MapStore<Instance, GovernanceFacetKit<any> & {label: string}>,
|
|
380
|
+
* startGovernedUpgradable: startGovernedUpgradable,
|
|
381
|
+
* testFirstAnchorKit: import('../vat-bank.js').AssetIssuerKit<'nat'>,
|
|
382
|
+
* walletBridgeManager: import('../types.js').ScopedBridgeManager | undefined,
|
|
383
|
+
* walletFactoryStartResult: import('./startWalletFactory').WalletFactoryStartResult,
|
|
384
|
+
* provisionPoolStartResult: unknown,
|
|
385
|
+
* vatStore: import('./utils.js').VatStore,
|
|
386
|
+
* zoe: ZoeService,
|
|
387
|
+
* }} ChainBootstrapSpaceT
|
|
388
|
+
* @typedef {PromiseSpaceOf<ChainBootstrapSpaceT>} ChainBootstrapSpace
|
|
389
|
+
*
|
|
390
|
+
* @typedef {import('@agoric/vats').NameHub} NameHub
|
|
391
|
+
* IDEA/TODO: make types of demo stuff invisible in production behaviors
|
|
392
|
+
* @typedef {{
|
|
393
|
+
* argv: {
|
|
394
|
+
* hardcodedClientAddresses?: string[],
|
|
395
|
+
* FIXME_GCI: string,
|
|
396
|
+
* PROVISIONER_INDEX?: number,
|
|
397
|
+
* },
|
|
398
|
+
* }} BootstrapVatParams
|
|
399
|
+
* @typedef { BootstrapSpace & {
|
|
400
|
+
* zone: import('@agoric/zone').Zone,
|
|
401
|
+
* devices: SoloDevices | ChainDevices,
|
|
402
|
+
* vats: SwingsetVats,
|
|
403
|
+
* vatPowers: { [prop: string]: any, D: DProxy },
|
|
404
|
+
* vatParameters: BootstrapVatParams,
|
|
405
|
+
* runBehaviors: (manifest: unknown) => Promise<unknown>,
|
|
406
|
+
* modules: Record<string, Record<string, any>>,
|
|
407
|
+
* }} BootstrapPowers
|
|
408
|
+
* @typedef { WellKnownSpaces & PromiseSpaceOf<ChainBootstrapSpaceT & {
|
|
409
|
+
* vatAdminSvc: VatAdminSvc,
|
|
410
|
+
* }, {}, {
|
|
411
|
+
* loadVat: VatLoader<unknown>,
|
|
412
|
+
* loadCriticalVat: VatLoader<unknown>,
|
|
413
|
+
* }>
|
|
414
|
+
* } BootstrapSpace
|
|
415
|
+
* @typedef {{ mint: ERef<Mint>, issuer: ERef<Issuer>, brand: Brand }} RemoteIssuerKit
|
|
416
|
+
* @typedef {Awaited<ReturnType<Awaited<BankVat>['makeBankManager']>>} BankManager
|
|
417
|
+
* @typedef {ERef<ReturnType<import('../vat-agoricNames').buildRootObject>>} AgoricNamesVat
|
|
418
|
+
* @typedef {ERef<ReturnType<import('../vat-bank.js').buildRootObject>>} BankVat
|
|
419
|
+
* @typedef {ERef<ReturnType<import('../vat-board.js').buildRootObject>>} BoardVat
|
|
420
|
+
* @typedef {ERef<ReturnType<import('../vat-bridge.js').buildRootObject>>} ChainStorageVat
|
|
421
|
+
* @typedef {ERef<ReturnType<import('../vat-provisioning.js').buildRootObject>>} ProvisioningVat
|
|
422
|
+
* @typedef {ERef<ReturnType<import('../vat-mints.js').buildRootObject>>} MintsVat
|
|
423
|
+
* @typedef {ERef<ReturnType<import('../vat-priceAuthority.js').buildRootObject>>} PriceAuthorityVat
|
|
424
|
+
* @typedef {ERef<ReturnType<import('../vat-network.js').buildRootObject>>} NetworkVat
|
|
425
|
+
* @typedef {ERef<ReturnType<import('../vat-ibc.js').buildRootObject>>} IBCVat
|
|
426
|
+
* @typedef { import('@agoric/zoe/tools/priceAuthorityRegistry').PriceAuthorityRegistryAdmin } PriceAuthorityRegistryAdmin
|
|
427
|
+
*
|
|
428
|
+
* @typedef {{ namedVat: PromiseSpaceOf<{
|
|
429
|
+
* agoricNames: Awaited<AgoricNamesVat>,
|
|
430
|
+
* board: Awaited<BoardVat>,
|
|
431
|
+
* }> }} NamedVatPowers
|
|
432
|
+
*/
|
|
433
|
+
/**
|
|
434
|
+
* @typedef {PromiseSpaceOf<{
|
|
435
|
+
* mints: MintsVat
|
|
436
|
+
* }>} DemoFaucetPowers
|
|
437
|
+
*/
|
|
438
|
+
/**
|
|
439
|
+
* @typedef {{
|
|
440
|
+
* spawner: SpawnerVat,
|
|
441
|
+
* http: HttpVat,
|
|
442
|
+
* network: NetworkVat,
|
|
443
|
+
* uploads: UploadsVat,
|
|
444
|
+
* bootstrap: unknown
|
|
445
|
+
* }} SoloVats
|
|
446
|
+
* @typedef {ERef<ReturnType<import('@agoric/solo/src/vat-spawner.js').buildRootObject>>} SpawnerVat
|
|
447
|
+
* @typedef {ERef<ReturnType<import('@agoric/solo/src/vat-http.js').buildRootObject>>} HttpVat
|
|
448
|
+
* @typedef {ERef<ReturnType<import('@agoric/solo/src/vat-uploads.js').buildRootObject>>} UploadsVat
|
|
449
|
+
*/
|
|
450
|
+
/** @template T @typedef {{vatPowers: { D: DProxy }, devices: T}} BootDevices<T> */
|
|
451
|
+
PriceLockPeriod: "relativeTime";
|
|
452
|
+
}> & {
|
|
453
|
+
timerService: import("@agoric/time/src/types").TimerService;
|
|
454
|
+
reservePublicFacet: GovernedPublicFacet<{
|
|
455
|
+
makeAddCollateralInvitation(): Promise<Invitation<string, never>>;
|
|
456
|
+
getPublicTopics(): {
|
|
457
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("@agoric/inter-protocol/src/reserve/assetReserveKit.js").MetricsNotification>;
|
|
458
|
+
};
|
|
459
|
+
}>;
|
|
460
|
+
priceAuthority: PriceAuthority;
|
|
461
|
+
}>, privateArgs: {
|
|
462
|
+
initialPoserInvitation: Invitation<unknown, never>;
|
|
463
|
+
storageNode: StorageNode;
|
|
464
|
+
marshaller: Marshaller<unknown>;
|
|
465
|
+
}, baggage: MapStore<string, unknown>) => Promise<{
|
|
466
|
+
publicFacet: GovernedPublicFacet<{
|
|
467
|
+
getElectorate: () => Amount<"set">;
|
|
468
|
+
getStartFrequency: () => import("@agoric/time/src/types").RelativeTime;
|
|
469
|
+
getClockStep: () => import("@agoric/time/src/types").RelativeTime;
|
|
470
|
+
getStartingRate: () => bigint;
|
|
471
|
+
getLowestRate: () => bigint;
|
|
472
|
+
getDiscountStep: () => bigint;
|
|
473
|
+
getAuctionStartDelay: () => import("@agoric/time/src/types").RelativeTime;
|
|
474
|
+
getPriceLockPeriod: () => import("@agoric/time/src/types").RelativeTime;
|
|
475
|
+
makeBidInvitation(collateralBrand: Brand<"nat">): Promise<Invitation<string, never>>;
|
|
476
|
+
getSchedules(): {
|
|
477
|
+
liveAuctionSchedule: import("@agoric/inter-protocol/src/auction/scheduler.js").Schedule | null;
|
|
478
|
+
nextAuctionSchedule: import("@agoric/inter-protocol/src/auction/scheduler.js").Schedule | null;
|
|
479
|
+
};
|
|
480
|
+
getScheduleUpdates(): Subscriber<import("@agoric/inter-protocol/src/auction/scheduler.js").ScheduleNotification>;
|
|
481
|
+
getBookDataUpdates(brand: any): Subscriber<import("@agoric/inter-protocol/src/auction/auctionBook.js").BookDataNotification>;
|
|
482
|
+
getPublicTopics(brand: any): {
|
|
483
|
+
bookData: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("@agoric/inter-protocol/src/auction/auctionBook.js").BookDataNotification>;
|
|
484
|
+
} | {
|
|
485
|
+
schedule: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("@agoric/inter-protocol/src/auction/scheduler.js").ScheduleNotification>;
|
|
486
|
+
};
|
|
487
|
+
makeDepositInvitation: () => Promise<Invitation<string, never>>;
|
|
488
|
+
}>;
|
|
489
|
+
creatorFacet: GovernedCreatorFacet<{
|
|
490
|
+
addBrand(issuer: Issuer<AssetKind>, kwd: string): Promise<void>;
|
|
491
|
+
getSchedule(): Promise<import("@agoric/inter-protocol/src/auction/scheduler.js").FullSchedule>;
|
|
492
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
493
|
+
addBrand(issuer: Issuer<AssetKind>, kwd: string): Promise<void>;
|
|
494
|
+
getSchedule(): Promise<import("@agoric/inter-protocol/src/auction/scheduler.js").FullSchedule>;
|
|
495
|
+
}>>;
|
|
496
|
+
}>>>;
|
|
497
|
+
centralSupply: Promise<Installation<(zcf: ZCF<{
|
|
498
|
+
bootstrapPaymentValue: bigint;
|
|
499
|
+
}>, { feeMintAccess }: {
|
|
500
|
+
feeMintAccess: FeeMintAccess;
|
|
501
|
+
}) => Promise<{
|
|
502
|
+
creatorFacet: {
|
|
503
|
+
getBootstrapPayment: () => Payment<any>;
|
|
504
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
505
|
+
getBootstrapPayment: () => Payment<any>;
|
|
506
|
+
}>;
|
|
507
|
+
}>>>;
|
|
508
|
+
committee: Promise<Installation<typeof import("@agoric/governance/src/committee.js")['prepare']>>;
|
|
509
|
+
contractGovernor: Promise<Installation<typeof import("@agoric/governance/src/contractGovernor.js")['prepare']>>;
|
|
510
|
+
econCommitteeCharter: Promise<Installation<typeof import("@agoric/inter-protocol/src/econCommitteeCharter.js")['prepare']>>;
|
|
511
|
+
feeDistributor: Promise<Installation<(zcf: ZCF<{
|
|
512
|
+
keywordShares: Record<string, bigint>;
|
|
513
|
+
timerService: ERef<import("@agoric/time/src/types").TimerService>;
|
|
514
|
+
collectionInterval: import("@agoric/time/src/types").RelativeTime;
|
|
515
|
+
}>) => Promise<{
|
|
516
|
+
creatorFacet: {
|
|
517
|
+
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<import("@agoric/inter-protocol/src/feeDistributor.js").CollectibleContractFacet>) => {
|
|
518
|
+
collectFees: () => Promise<Payment<any>>;
|
|
519
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
520
|
+
collectFees: () => Promise<Payment<any>>;
|
|
521
|
+
}>;
|
|
522
|
+
startPeriodicCollection: (debugName: string, collectorP: ERef<import("@agoric/inter-protocol/src/feeDistributor.js").FeeCollector>) => Promise<import("@agoric/inter-protocol/src/feeDistributor.js").PeriodicFeeCollector>;
|
|
523
|
+
makeDepositFacetDestination: (depositFacet: import("@endo/eventual-send").ERef<{
|
|
524
|
+
/**
|
|
525
|
+
* Deposit all the contents of payment into the purse that made this facet,
|
|
526
|
+
* returning the amount. If the optional argument `optAmount` does not equal the
|
|
527
|
+
* amount of digital assets in the payment, throw an error.
|
|
528
|
+
*
|
|
529
|
+
* If payment is a promise, throw an error.
|
|
530
|
+
*/
|
|
531
|
+
receive: (args_0: Payment<AssetKind>, args_1?: any) => import("@endo/eventual-send").ERef<Amount<AssetKind>>;
|
|
532
|
+
}>) => {
|
|
533
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
534
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
535
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
536
|
+
}>;
|
|
537
|
+
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
|
|
538
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
539
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
540
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
541
|
+
}>;
|
|
542
|
+
setDestinations: (newDestinations: Record<string, ERef<import("@agoric/inter-protocol/src/feeDistributor.js").FeeDestination>>) => Promise<void>;
|
|
543
|
+
setKeywordShares: (newShares: Record<string, bigint>) => void;
|
|
544
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
545
|
+
makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<import("@agoric/inter-protocol/src/feeDistributor.js").CollectibleContractFacet>) => {
|
|
546
|
+
collectFees: () => Promise<Payment<any>>;
|
|
547
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
548
|
+
collectFees: () => Promise<Payment<any>>;
|
|
549
|
+
}>;
|
|
550
|
+
startPeriodicCollection: (debugName: string, collectorP: ERef<import("@agoric/inter-protocol/src/feeDistributor.js").FeeCollector>) => Promise<import("@agoric/inter-protocol/src/feeDistributor.js").PeriodicFeeCollector>;
|
|
551
|
+
makeDepositFacetDestination: (depositFacet: import("@endo/eventual-send").ERef<{
|
|
552
|
+
/**
|
|
553
|
+
* Deposit all the contents of payment into the purse that made this facet,
|
|
554
|
+
* returning the amount. If the optional argument `optAmount` does not equal the
|
|
555
|
+
* amount of digital assets in the payment, throw an error.
|
|
556
|
+
*
|
|
557
|
+
* If payment is a promise, throw an error.
|
|
558
|
+
*/
|
|
559
|
+
receive: (args_0: Payment<AssetKind>, args_1?: any) => import("@endo/eventual-send").ERef<Amount<AssetKind>>;
|
|
560
|
+
}>) => {
|
|
561
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
562
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
563
|
+
pushPayment: (payment: any, _issuer: any) => Promise<Amount<AssetKind>>;
|
|
564
|
+
}>;
|
|
565
|
+
makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
|
|
566
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
567
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
568
|
+
pushPayment: (payment: any, issuer: any) => Promise<any>;
|
|
569
|
+
}>;
|
|
570
|
+
setDestinations: (newDestinations: Record<string, ERef<import("@agoric/inter-protocol/src/feeDistributor.js").FeeDestination>>) => Promise<void>;
|
|
571
|
+
setKeywordShares: (newShares: Record<string, bigint>) => void;
|
|
572
|
+
}>;
|
|
573
|
+
publicFacet: {
|
|
574
|
+
distributeFees: (payment: Payment<"nat">) => Promise<void>;
|
|
575
|
+
getKeywordShares: () => Record<string, bigint>;
|
|
576
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
577
|
+
distributeFees: (payment: Payment<"nat">) => Promise<void>;
|
|
578
|
+
getKeywordShares: () => Record<string, bigint>;
|
|
579
|
+
}>;
|
|
580
|
+
}>>>;
|
|
581
|
+
mintHolder: Promise<Installation<(<K extends AssetKind>(zcf: ZCF<import("@agoric/vats/src/mintHolder.js").IssuerInfo<K>>, _privateArgs: undefined, instanceBaggage: MapStore<string, unknown>) => {
|
|
582
|
+
publicFacet: Issuer<AssetKind>;
|
|
583
|
+
creatorFacet: Mint<AssetKind>;
|
|
584
|
+
})>>;
|
|
585
|
+
psm: Promise<Installation<typeof import("@agoric/inter-protocol/src/psm/psm.js")['prepare']>>;
|
|
586
|
+
provisionPool: Promise<Installation<typeof import("@agoric/vats/src/provisionPool.js")['prepare']>>;
|
|
587
|
+
reserve: Promise<Installation<typeof import("@agoric/inter-protocol/src/reserve/assetReserve.js")['prepare']>>;
|
|
588
|
+
VaultFactory: Promise<Installation<typeof import("@agoric/inter-protocol/src/vaultFactory/vaultFactory.js")['prepare']>>;
|
|
589
|
+
walletFactory: Promise<Installation<(zcf: ZCF<import("@agoric/smart-wallet/src/walletFactory.js").SmartWalletContractTerms>, privateArgs: {
|
|
590
|
+
storageNode: ERef<StorageNode>;
|
|
591
|
+
walletBridgeManager?: ERef<import("@agoric/vats").ScopedBridgeManager> | undefined;
|
|
592
|
+
walletReviver?: ERef<import("@agoric/smart-wallet/src/walletFactory.js").WalletReviver> | undefined;
|
|
593
|
+
}, baggage: MapStore<string, unknown>) => Promise<{
|
|
594
|
+
creatorFacet: {
|
|
595
|
+
provideSmartWallet(address: string, bank: ERef<import("../vat-bank.js").Bank>, namesByAddressAdmin: ERef<import("@agoric/vats").NameAdmin>): Promise<[wallet: {
|
|
596
|
+
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string>, canSpend?: boolean | undefined): Promise<void>;
|
|
597
|
+
getDepositFacet(): {
|
|
598
|
+
receive(payment: Payment<AssetKind>): Promise<Amount<AssetKind>>;
|
|
599
|
+
};
|
|
600
|
+
getOffersFacet(): {
|
|
601
|
+
executeOffer(offerSpec: import("@agoric/smart-wallet/src/offers.js").OfferSpec): Promise<void>;
|
|
602
|
+
tryExitOffer(offerId: import("@agoric/smart-wallet/src/offers.js").OfferId): Promise<void>;
|
|
603
|
+
};
|
|
604
|
+
getCurrentSubscriber(): Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").CurrentWalletRecord>;
|
|
605
|
+
getUpdatesSubscriber(): Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").UpdateRecord>;
|
|
606
|
+
getPublicTopics(): {
|
|
607
|
+
current: {
|
|
608
|
+
description: string;
|
|
609
|
+
subscriber: Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").CurrentWalletRecord>;
|
|
610
|
+
storagePath: Promise<string>;
|
|
611
|
+
};
|
|
612
|
+
updates: {
|
|
613
|
+
description: string;
|
|
614
|
+
subscriber: Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").UpdateRecord>;
|
|
615
|
+
storagePath: Promise<string>;
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
}, isNew: boolean]>;
|
|
619
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
620
|
+
provideSmartWallet(address: string, bank: ERef<import("../vat-bank.js").Bank>, namesByAddressAdmin: ERef<import("@agoric/vats").NameAdmin>): Promise<[wallet: {
|
|
621
|
+
handleBridgeAction(actionCapData: import("@endo/marshal").CapData<string>, canSpend?: boolean | undefined): Promise<void>;
|
|
622
|
+
getDepositFacet(): {
|
|
623
|
+
receive(payment: Payment<AssetKind>): Promise<Amount<AssetKind>>;
|
|
624
|
+
};
|
|
625
|
+
getOffersFacet(): {
|
|
626
|
+
executeOffer(offerSpec: import("@agoric/smart-wallet/src/offers.js").OfferSpec): Promise<void>;
|
|
627
|
+
tryExitOffer(offerId: import("@agoric/smart-wallet/src/offers.js").OfferId): Promise<void>;
|
|
628
|
+
};
|
|
629
|
+
getCurrentSubscriber(): Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").CurrentWalletRecord>;
|
|
630
|
+
getUpdatesSubscriber(): Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").UpdateRecord>;
|
|
631
|
+
getPublicTopics(): {
|
|
632
|
+
current: {
|
|
633
|
+
description: string;
|
|
634
|
+
subscriber: Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").CurrentWalletRecord>;
|
|
635
|
+
storagePath: Promise<string>;
|
|
636
|
+
};
|
|
637
|
+
updates: {
|
|
638
|
+
description: string;
|
|
639
|
+
subscriber: Subscriber<import("@agoric/smart-wallet/src/smartWallet.js").UpdateRecord>;
|
|
640
|
+
storagePath: Promise<string>;
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
}, isNew: boolean]>;
|
|
644
|
+
}>;
|
|
645
|
+
}>>>;
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
instance: {
|
|
649
|
+
produce: Record<WellKnownName['instance'], Producer<Instance>>;
|
|
650
|
+
consume: Record<WellKnownName['instance'], Promise<Instance>>;
|
|
651
|
+
};
|
|
652
|
+
uiConfig: {
|
|
653
|
+
produce: Record<WellKnownName['uiConfig'], Producer<Record<string, any>>>;
|
|
654
|
+
consume: Record<WellKnownName['uiConfig'], Promise<Record<string, any>>>;
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
type StartGovernedUpgradableOpts<SF extends GovernableStartFn> = {
|
|
658
|
+
installation: ERef<Installation<SF>>;
|
|
659
|
+
issuerKeywordRecord?: IssuerKeywordRecord;
|
|
660
|
+
governedParams: Record<string, unknown>;
|
|
661
|
+
terms: Omit<import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'], 'brands' | 'issuers' | 'governedParams' | 'electionManager'>;
|
|
662
|
+
privateArgs: Omit<import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'], 'initialPoserInvitation'>;
|
|
663
|
+
label: string;
|
|
664
|
+
};
|
|
665
|
+
type startGovernedUpgradable = <SF extends GovernableStartFn>(opts: StartGovernedUpgradableOpts<SF>) => Promise<GovernanceFacetKit<SF>>;
|
|
666
|
+
type StartUpgradableOpts<SF extends import("@agoric/zoe/src/zoeService/utils").ContractStartFunction> = {
|
|
667
|
+
installation: ERef<Installation<SF>>;
|
|
668
|
+
issuerKeywordRecord?: IssuerKeywordRecord;
|
|
669
|
+
terms?: Omit<import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['terms'], 'brands' | 'issuers'>;
|
|
670
|
+
privateArgs?: import('@agoric/zoe/src/zoeService/utils').StartParams<SF>['privateArgs'];
|
|
671
|
+
label: string;
|
|
672
|
+
};
|
|
673
|
+
type StartUpgradable = <SF extends import("@agoric/zoe/src/zoeService/utils").ContractStartFunction>(opts: StartUpgradableOpts<SF>) => Promise<{
|
|
674
|
+
instance: import("@agoric/zoe/src/zoeService/utils").Instance<SF>;
|
|
675
|
+
adminFacet: import("@agoric/zoe/src/zoeService/utils").AdminFacet;
|
|
676
|
+
creatorFacet: {};
|
|
677
|
+
publicFacet: {};
|
|
678
|
+
} & (SF extends import("@agoric/zoe/src/zoeService/utils").ContractStartFunction ? Awaited<ReturnType<SF>> : {
|
|
679
|
+
creatorFacet: any;
|
|
680
|
+
publicFacet: any;
|
|
681
|
+
}) & {
|
|
682
|
+
label: string;
|
|
683
|
+
}>;
|
|
684
|
+
type StartedInstanceKit<T> = import('@agoric/zoe/src/zoeService/utils').StartedInstanceKit<T>;
|
|
685
|
+
type StartedInstanceKitWithLabel = {
|
|
686
|
+
label: string;
|
|
687
|
+
} & StartedInstanceKit<import('@agoric/zoe/src/zoeService/utils').ContractStartFunction>;
|
|
688
|
+
type ChainBootstrapSpaceT = {
|
|
689
|
+
agoricNames: NameHub;
|
|
690
|
+
agoricNamesAdmin: import('@agoric/vats').NameAdmin;
|
|
691
|
+
bankManager: BankManager;
|
|
692
|
+
bldIssuerKit: RemoteIssuerKit;
|
|
693
|
+
board: import('@agoric/vats').Board;
|
|
694
|
+
bridgeManager: import('../types.js').BridgeManager | undefined;
|
|
695
|
+
chainStorage: StorageNode | null;
|
|
696
|
+
chainTimerService: import('@agoric/time/src/types').TimerService;
|
|
697
|
+
client: ClientManager;
|
|
698
|
+
clientCreator: ClientCreator;
|
|
699
|
+
coreEvalBridgeHandler: import('../types.js').BridgeHandler;
|
|
700
|
+
diagnostics: {
|
|
701
|
+
savePrivateArgs: (instance: Instance, privateArgs: unknown) => void;
|
|
702
|
+
};
|
|
703
|
+
feeMintAccess: FeeMintAccess;
|
|
704
|
+
highPrioritySendersManager: import('@agoric/internal/src/priority-senders.js').PrioritySendersManager | null;
|
|
705
|
+
initialSupply: Payment<'nat'>;
|
|
706
|
+
instancePrivateArgs: Map<Instance, unknown>;
|
|
707
|
+
namesByAddress: NameHub;
|
|
708
|
+
namesByAddressAdmin: import('../types').NamesByAddressAdmin;
|
|
709
|
+
pegasusConnections: import('@agoric/vats').NameHubKit;
|
|
710
|
+
pegasusConnectionsAdmin: import('@agoric/vats').NameAdmin;
|
|
711
|
+
priceAuthorityVat: Awaited<PriceAuthorityVat>;
|
|
712
|
+
priceAuthority: PriceAuthority;
|
|
713
|
+
priceAuthorityAdmin: PriceAuthorityRegistryAdmin;
|
|
714
|
+
provisioning: Awaited<ProvisioningVat> | undefined;
|
|
715
|
+
provisionBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
|
|
716
|
+
provisionWalletBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
|
|
717
|
+
storageBridgeManager: import('../types.js').ScopedBridgeManager | null;
|
|
718
|
+
contractKits: MapStore<Instance, StartedInstanceKitWithLabel>;
|
|
719
|
+
startUpgradable: StartUpgradable;
|
|
720
|
+
governedContractKits: MapStore<Instance, GovernanceFacetKit<any> & {
|
|
721
|
+
label: string;
|
|
722
|
+
}>;
|
|
723
|
+
startGovernedUpgradable: startGovernedUpgradable;
|
|
724
|
+
testFirstAnchorKit: import('../vat-bank.js').AssetIssuerKit<'nat'>;
|
|
725
|
+
walletBridgeManager: import('../types.js').ScopedBridgeManager | undefined;
|
|
726
|
+
walletFactoryStartResult: import('./startWalletFactory').WalletFactoryStartResult;
|
|
727
|
+
provisionPoolStartResult: unknown;
|
|
728
|
+
vatStore: import('./utils.js').VatStore;
|
|
729
|
+
zoe: ZoeService;
|
|
730
|
+
};
|
|
731
|
+
type ChainBootstrapSpace = PromiseSpaceOf<ChainBootstrapSpaceT>;
|
|
732
|
+
/**
|
|
733
|
+
* IDEA/TODO: make types of demo stuff invisible in production behaviors
|
|
734
|
+
*/
|
|
735
|
+
type NameHub = import('@agoric/vats').NameHub;
|
|
736
|
+
type BootstrapVatParams = {
|
|
737
|
+
argv: {
|
|
738
|
+
hardcodedClientAddresses?: string[];
|
|
739
|
+
FIXME_GCI: string;
|
|
740
|
+
PROVISIONER_INDEX?: number;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
type BootstrapPowers = WellKnownSpaces & PromiseSpaceOf<ChainBootstrapSpaceT & {
|
|
744
|
+
vatAdminSvc: import("@agoric/swingset-vat").VatAdminSvc;
|
|
745
|
+
}, {}, {
|
|
746
|
+
loadVat: VatLoader<unknown>;
|
|
747
|
+
loadCriticalVat: VatLoader<unknown>;
|
|
748
|
+
}> & {
|
|
749
|
+
zone: import('@agoric/zone').Zone;
|
|
750
|
+
devices: SoloDevices | ChainDevices;
|
|
751
|
+
vats: SwingsetVats;
|
|
752
|
+
vatPowers: {
|
|
753
|
+
[prop: string]: any;
|
|
754
|
+
D: DProxy;
|
|
755
|
+
};
|
|
756
|
+
vatParameters: BootstrapVatParams;
|
|
757
|
+
runBehaviors: (manifest: unknown) => Promise<unknown>;
|
|
758
|
+
modules: Record<string, Record<string, any>>;
|
|
759
|
+
};
|
|
760
|
+
type BootstrapSpace = WellKnownSpaces & PromiseSpaceOf<ChainBootstrapSpaceT & {
|
|
761
|
+
vatAdminSvc: VatAdminSvc;
|
|
762
|
+
}, {}, {
|
|
763
|
+
loadVat: VatLoader<unknown>;
|
|
764
|
+
loadCriticalVat: VatLoader<unknown>;
|
|
765
|
+
}>;
|
|
766
|
+
type RemoteIssuerKit = {
|
|
767
|
+
mint: ERef<Mint>;
|
|
768
|
+
issuer: ERef<Issuer>;
|
|
769
|
+
brand: Brand;
|
|
770
|
+
};
|
|
771
|
+
type BankManager = Awaited<ReturnType<Awaited<BankVat>['makeBankManager']>>;
|
|
772
|
+
type AgoricNamesVat = ERef<ReturnType<(_vatPowers: unknown, _vatParameters: unknown, baggage: MapStore<string, unknown>) => {
|
|
773
|
+
getNameHub: () => import("@agoric/vats").NameHub;
|
|
774
|
+
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
775
|
+
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
776
|
+
provideInertBrand: (keyword: string, displayInfo: DisplayInfo<AssetKind>) => any;
|
|
777
|
+
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
778
|
+
getNameHub: () => import("@agoric/vats").NameHub;
|
|
779
|
+
getNameHubKit: () => import("@agoric/vats").NameHubKit;
|
|
780
|
+
publishNameHubs: (nameStorage: ERef<StorageNode>, vatBoard: ERef<BoardVat>, kinds: string[]) => Promise<void>;
|
|
781
|
+
provideInertBrand: (keyword: string, displayInfo: DisplayInfo<AssetKind>) => any;
|
|
782
|
+
}>>>;
|
|
783
|
+
type BankVat = ERef<ReturnType<typeof import("../vat-bank.js").buildRootObject>>;
|
|
784
|
+
type BoardVat = ERef<ReturnType<typeof import("../vat-board.js").buildRootObject>>;
|
|
785
|
+
type ChainStorageVat = ERef<ReturnType<typeof import("../vat-bridge.js").buildRootObject>>;
|
|
786
|
+
type ProvisioningVat = ERef<ReturnType<typeof import("../vat-provisioning.js").buildRootObject>>;
|
|
787
|
+
type MintsVat = ERef<ReturnType<typeof import("../vat-mints.js").buildRootObject>>;
|
|
788
|
+
type PriceAuthorityVat = ERef<ReturnType<typeof import("../vat-priceAuthority.js").buildRootObject>>;
|
|
789
|
+
type NetworkVat = ERef<ReturnType<typeof import("../vat-network.js").buildRootObject>>;
|
|
790
|
+
type IBCVat = ERef<ReturnType<typeof import("../vat-ibc.js").buildRootObject>>;
|
|
791
|
+
type PriceAuthorityRegistryAdmin = import('@agoric/zoe/tools/priceAuthorityRegistry').PriceAuthorityRegistryAdmin;
|
|
792
|
+
type NamedVatPowers = {
|
|
793
|
+
namedVat: PromiseSpaceOf<{
|
|
794
|
+
agoricNames: Awaited<AgoricNamesVat>;
|
|
795
|
+
board: Awaited<BoardVat>;
|
|
796
|
+
}>;
|
|
797
|
+
};
|
|
798
|
+
type DemoFaucetPowers = PromiseSpaceOf<{
|
|
799
|
+
mints: MintsVat;
|
|
800
|
+
}>;
|
|
801
|
+
type SoloVats = {
|
|
802
|
+
spawner: SpawnerVat;
|
|
803
|
+
http: HttpVat;
|
|
804
|
+
network: NetworkVat;
|
|
805
|
+
uploads: UploadsVat;
|
|
806
|
+
bootstrap: unknown;
|
|
807
|
+
};
|
|
808
|
+
type SpawnerVat = ERef<ReturnType<typeof import("@agoric/solo/src/vat-spawner.js").buildRootObject>>;
|
|
809
|
+
type HttpVat = ERef<ReturnType<typeof import("@agoric/solo/src/vat-http.js").buildRootObject>>;
|
|
810
|
+
type UploadsVat = ERef<ReturnType<typeof import("@agoric/solo/src/vat-uploads.js").buildRootObject>>;
|
|
811
|
+
/**
|
|
812
|
+
* <T>
|
|
813
|
+
*/
|
|
814
|
+
type BootDevices<T> = {
|
|
815
|
+
vatPowers: {
|
|
816
|
+
D: DProxy;
|
|
817
|
+
};
|
|
818
|
+
devices: T;
|
|
819
|
+
};
|
|
820
|
+
//# sourceMappingURL=types.d.ts.map
|