@agoric/inter-protocol 0.18.0-u23.0 → 0.18.0-u23.1
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 +13 -13
- package/src/auction/util.d.ts +33 -0
- package/src/auction/util.d.ts.map +1 -0
- package/src/clientSupport.d.ts +124 -0
- package/src/clientSupport.d.ts.map +1 -0
- package/src/collectFees.d.ts +6 -0
- package/src/collectFees.d.ts.map +1 -0
- package/src/contractSupport.d.ts +36 -0
- package/src/contractSupport.d.ts.map +1 -0
- package/src/econCommitteeCharter.d.ts +54 -0
- package/src/econCommitteeCharter.d.ts.map +1 -0
- package/src/feeDistributor.d.ts +228 -0
- package/src/feeDistributor.d.ts.map +1 -0
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/interest-math.d.ts +5 -0
- package/src/interest-math.d.ts.map +1 -0
- package/src/interest.d.ts +42 -0
- package/src/interest.d.ts.map +1 -0
- package/src/price/fluxAggregatorContract.d.ts +95 -0
- package/src/price/fluxAggregatorContract.d.ts.map +1 -0
- package/src/price/fluxAggregatorKit.d.ts +114 -0
- package/src/price/fluxAggregatorKit.d.ts.map +1 -0
- package/src/price/priceOracleKit.d.ts +41 -0
- package/src/price/priceOracleKit.d.ts.map +1 -0
- package/src/price/roundsManager.d.ts +211 -0
- package/src/price/roundsManager.d.ts.map +1 -0
- package/src/proposals/utils.d.ts +27 -0
- package/src/proposals/utils.d.ts.map +1 -0
- package/src/provisionPool.d.ts +87 -0
- package/src/provisionPool.d.ts.map +1 -0
- package/src/provisionPoolKit.d.ts +81 -0
- package/src/provisionPoolKit.d.ts.map +1 -0
- package/src/psm/psm.d.ts +145 -0
- package/src/psm/psm.d.ts.map +1 -0
- package/src/reserve/assetReserve.d.ts +68 -0
- package/src/reserve/assetReserve.d.ts.map +1 -0
- package/src/reserve/assetReserveKit.d.ts +106 -0
- package/src/reserve/assetReserveKit.d.ts.map +1 -0
- package/src/reserve/params.d.ts +16 -0
- package/src/reserve/params.d.ts.map +1 -0
- package/src/tokens.d.ts +3 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/vaultFactory/burn.d.ts +5 -0
- package/src/vaultFactory/burn.d.ts.map +1 -0
- package/src/vaultFactory/math.d.ts +13 -0
- package/src/vaultFactory/math.d.ts.map +1 -0
- package/src/vaultFactory/orderedVaultStore.d.ts +94 -0
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
- package/src/vaultFactory/params.d.ts +170 -0
- package/src/vaultFactory/params.d.ts.map +1 -0
- package/src/vaultFactory/prioritizedVaults.d.ts +283 -0
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
- package/src/vaultFactory/storeUtils.d.ts +30 -0
- package/src/vaultFactory/storeUtils.d.ts.map +1 -0
- package/src/vaultFactory/types.d.ts +137 -0
- package/src/vaultFactory/types.d.ts.map +1 -0
- package/src/vaultFactory/vault.d.ts +360 -0
- package/src/vaultFactory/vault.d.ts.map +1 -0
- package/src/vaultFactory/vaultDirector.d.ts +337 -0
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
- package/src/vaultFactory/vaultFactory.d.ts +202 -0
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
- package/src/vaultFactory/vaultHolder.d.ts +177 -0
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
- package/src/vaultFactory/vaultKit.d.ts +38 -0
- package/src/vaultFactory/vaultKit.d.ts.map +1 -0
- package/src/vaultFactory/vaultManager.d.ts +526 -0
- package/src/vaultFactory/vaultManager.d.ts.map +1 -0
- package/src/c.log +0 -1
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
export function watchQuoteNotifier<T, A extends any[] = unknown[]>(notifierP: ERef<LatestTopic<T>>, watcher: PromiseWatcher<T, A>, ...args: A): Promise<void>;
|
|
2
|
+
export function prepareVaultManagerKit(baggage: Baggage, { zcf, marshaller, makeRecorderKit, factoryPowers }: {
|
|
3
|
+
zcf: VaultFactoryZCF;
|
|
4
|
+
marshaller: ERemote<EMarshaller>;
|
|
5
|
+
makeRecorderKit: MakeRecorderKit;
|
|
6
|
+
makeERecorderKit: MakeERecorderKit;
|
|
7
|
+
factoryPowers: FactoryPowersFacet;
|
|
8
|
+
}): (externalParams: Omit<Parameters<(params: Readonly<{
|
|
9
|
+
debtMint: ZCFMint<"nat">;
|
|
10
|
+
collateralBrand: Brand<"nat">;
|
|
11
|
+
collateralUnit: Amount<"nat">;
|
|
12
|
+
descriptionScope: string;
|
|
13
|
+
startTimeStamp: Timestamp;
|
|
14
|
+
storageNode: Remote<StorageNode>;
|
|
15
|
+
}> & {
|
|
16
|
+
metricsStorageNode: Remote<StorageNode>;
|
|
17
|
+
}) => import("@endo/exo").GuardedKit<{
|
|
18
|
+
collateral: {
|
|
19
|
+
makeVaultInvitation(): Promise<import("@agoric/zoe").Invitation<{
|
|
20
|
+
publicSubscribers: {
|
|
21
|
+
vault: {
|
|
22
|
+
description: string;
|
|
23
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
24
|
+
storagePath: Promise<string>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
28
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
29
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
30
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
31
|
+
}>;
|
|
32
|
+
vault: import("@endo/exo").Guarded<{
|
|
33
|
+
getPublicTopics(): {
|
|
34
|
+
vault: {
|
|
35
|
+
description: string;
|
|
36
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
37
|
+
storagePath: Promise<string>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
41
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
42
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
43
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
44
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
45
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
46
|
+
}>;
|
|
47
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
48
|
+
}, undefined>>;
|
|
49
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
50
|
+
getCompoundedInterest(): Ratio;
|
|
51
|
+
getPublicTopics(): {
|
|
52
|
+
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
53
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
helper: {
|
|
57
|
+
/** Start non-durable processes (or restart if needed after vat restart) */
|
|
58
|
+
start(): void;
|
|
59
|
+
ensureQuoteNotifierWatched(): void;
|
|
60
|
+
/** @param {Timestamp} updateTime */
|
|
61
|
+
chargeAllVaults(updateTime: Timestamp): Promise<void>;
|
|
62
|
+
assetNotify(): Promise<void>;
|
|
63
|
+
burnToCoverDebt(debt: any, proceeds: any, seat: any): void;
|
|
64
|
+
sendToReserve(penalty: any, seat: any, seatKeyword?: string): void;
|
|
65
|
+
markLiquidating(debt: any, collateral: any): void;
|
|
66
|
+
/**
|
|
67
|
+
* @param {Amount<'nat'>} debt
|
|
68
|
+
* @param {Amount<'nat'>} collateral
|
|
69
|
+
* @param {Amount<'nat'>} overage
|
|
70
|
+
* @param {Amount<'nat'>} shortfall
|
|
71
|
+
*/
|
|
72
|
+
markDoneLiquidating(debt: Amount<"nat">, collateral: Amount<"nat">, overage: Amount<"nat">, shortfall: Amount<"nat">): void;
|
|
73
|
+
writeMetrics(): Promise<void>;
|
|
74
|
+
};
|
|
75
|
+
manager: {
|
|
76
|
+
getGovernedParams(): GovernedParamGetters;
|
|
77
|
+
/**
|
|
78
|
+
* Look up the most recent price authority price to determine the max
|
|
79
|
+
* debt this manager config will allow for the collateral.
|
|
80
|
+
*
|
|
81
|
+
* @param {Amount<'nat'>} collateralAmount
|
|
82
|
+
*/
|
|
83
|
+
maxDebtFor(collateralAmount: Amount<"nat">): import("@agoric/ertp").NatAmount;
|
|
84
|
+
mintAndTransfer(mintReceiver: ZCFSeat, toMint: Amount<"nat">, fee: Amount<"nat">, transfers: import("@agoric/zoe").TransferPart[]): void;
|
|
85
|
+
/**
|
|
86
|
+
* @param {Amount<'nat'>} toBurn
|
|
87
|
+
* @param {ZCFSeat} seat
|
|
88
|
+
*/
|
|
89
|
+
burn(toBurn: Amount<"nat">, seat: ZCFSeat): void;
|
|
90
|
+
getAssetSubscriber(): import("@agoric/notifier").Subscriber<AssetState>;
|
|
91
|
+
getCollateralBrand(): Brand<"nat">;
|
|
92
|
+
getDebtBrand(): Brand<"nat">;
|
|
93
|
+
/**
|
|
94
|
+
* Prepend with an identifier of this vault manager
|
|
95
|
+
*
|
|
96
|
+
* @param {string} base
|
|
97
|
+
*/
|
|
98
|
+
scopeDescription(base: string): string;
|
|
99
|
+
/** coefficient on existing debt to calculate new debt */
|
|
100
|
+
getCompoundedInterest(): Ratio;
|
|
101
|
+
/**
|
|
102
|
+
* Called by a vault when its balances change.
|
|
103
|
+
*
|
|
104
|
+
* @param {NormalizedDebt} oldDebtNormalized
|
|
105
|
+
* @param {Amount<'nat'>} oldCollateral
|
|
106
|
+
* @param {VaultId} vaultId
|
|
107
|
+
* @param {VaultPhase} vaultPhase at the end of whatever change updated
|
|
108
|
+
* balances
|
|
109
|
+
* @param {Vault} vault
|
|
110
|
+
* @returns {void}
|
|
111
|
+
*/
|
|
112
|
+
handleBalanceChange(oldDebtNormalized: NormalizedDebt, oldCollateral: Amount<"nat">, vaultId: VaultId, vaultPhase: VaultPhase, vault: Vault): void;
|
|
113
|
+
};
|
|
114
|
+
self: {
|
|
115
|
+
getGovernedParams(): GovernedParamGetters;
|
|
116
|
+
/** @param {ZCFSeat} seat */
|
|
117
|
+
makeVaultKit(seat: ZCFSeat): Promise<{
|
|
118
|
+
publicSubscribers: {
|
|
119
|
+
vault: {
|
|
120
|
+
description: string;
|
|
121
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
122
|
+
storagePath: Promise<string>;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
126
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
127
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
128
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
129
|
+
}>;
|
|
130
|
+
vault: import("@endo/exo").Guarded<{
|
|
131
|
+
getPublicTopics(): {
|
|
132
|
+
vault: {
|
|
133
|
+
description: string;
|
|
134
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
135
|
+
storagePath: Promise<string>;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
139
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
140
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
141
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
142
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
143
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
144
|
+
}>;
|
|
145
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
146
|
+
}>;
|
|
147
|
+
getCollateralQuote(): PriceQuote;
|
|
148
|
+
getPublicFacet(): import("@endo/exo").Guarded<{
|
|
149
|
+
makeVaultInvitation(): Promise<import("@agoric/zoe").Invitation<{
|
|
150
|
+
publicSubscribers: {
|
|
151
|
+
vault: {
|
|
152
|
+
description: string;
|
|
153
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
154
|
+
storagePath: Promise<string>;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
158
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
159
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
160
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
161
|
+
}>;
|
|
162
|
+
vault: import("@endo/exo").Guarded<{
|
|
163
|
+
getPublicTopics(): {
|
|
164
|
+
vault: {
|
|
165
|
+
description: string;
|
|
166
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
167
|
+
storagePath: Promise<string>;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
171
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
172
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
173
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
174
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
175
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
176
|
+
}>;
|
|
177
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
178
|
+
}, undefined>>;
|
|
179
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
180
|
+
getCompoundedInterest(): Ratio;
|
|
181
|
+
getPublicTopics(): {
|
|
182
|
+
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
183
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
184
|
+
};
|
|
185
|
+
}>;
|
|
186
|
+
lockOraclePrices(): PriceQuote;
|
|
187
|
+
};
|
|
188
|
+
}>>[0], "metricsStorageNode">) => Promise<import("@endo/exo").GuardedKit<{
|
|
189
|
+
collateral: {
|
|
190
|
+
makeVaultInvitation(): Promise<import("@agoric/zoe").Invitation<{
|
|
191
|
+
publicSubscribers: {
|
|
192
|
+
vault: {
|
|
193
|
+
description: string;
|
|
194
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
195
|
+
storagePath: Promise<string>;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
199
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
200
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
201
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
202
|
+
}>;
|
|
203
|
+
vault: import("@endo/exo").Guarded<{
|
|
204
|
+
getPublicTopics(): {
|
|
205
|
+
vault: {
|
|
206
|
+
description: string;
|
|
207
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
208
|
+
storagePath: Promise<string>;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
212
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
213
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
214
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
215
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
216
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
217
|
+
}>;
|
|
218
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
219
|
+
}, undefined>>;
|
|
220
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
221
|
+
getCompoundedInterest(): Ratio;
|
|
222
|
+
getPublicTopics(): {
|
|
223
|
+
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
224
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
helper: {
|
|
228
|
+
/** Start non-durable processes (or restart if needed after vat restart) */
|
|
229
|
+
start(): void;
|
|
230
|
+
ensureQuoteNotifierWatched(): void;
|
|
231
|
+
/** @param {Timestamp} updateTime */
|
|
232
|
+
chargeAllVaults(updateTime: Timestamp): Promise<void>;
|
|
233
|
+
assetNotify(): Promise<void>;
|
|
234
|
+
burnToCoverDebt(debt: any, proceeds: any, seat: any): void;
|
|
235
|
+
sendToReserve(penalty: any, seat: any, seatKeyword?: string): void;
|
|
236
|
+
markLiquidating(debt: any, collateral: any): void;
|
|
237
|
+
/**
|
|
238
|
+
* @param {Amount<'nat'>} debt
|
|
239
|
+
* @param {Amount<'nat'>} collateral
|
|
240
|
+
* @param {Amount<'nat'>} overage
|
|
241
|
+
* @param {Amount<'nat'>} shortfall
|
|
242
|
+
*/
|
|
243
|
+
markDoneLiquidating(debt: Amount<"nat">, collateral: Amount<"nat">, overage: Amount<"nat">, shortfall: Amount<"nat">): void;
|
|
244
|
+
writeMetrics(): Promise<void>;
|
|
245
|
+
};
|
|
246
|
+
manager: {
|
|
247
|
+
getGovernedParams(): GovernedParamGetters;
|
|
248
|
+
/**
|
|
249
|
+
* Look up the most recent price authority price to determine the max
|
|
250
|
+
* debt this manager config will allow for the collateral.
|
|
251
|
+
*
|
|
252
|
+
* @param {Amount<'nat'>} collateralAmount
|
|
253
|
+
*/
|
|
254
|
+
maxDebtFor(collateralAmount: Amount<"nat">): import("@agoric/ertp").NatAmount;
|
|
255
|
+
mintAndTransfer(mintReceiver: ZCFSeat, toMint: Amount<"nat">, fee: Amount<"nat">, transfers: import("@agoric/zoe").TransferPart[]): void;
|
|
256
|
+
/**
|
|
257
|
+
* @param {Amount<'nat'>} toBurn
|
|
258
|
+
* @param {ZCFSeat} seat
|
|
259
|
+
*/
|
|
260
|
+
burn(toBurn: Amount<"nat">, seat: ZCFSeat): void;
|
|
261
|
+
getAssetSubscriber(): import("@agoric/notifier").Subscriber<AssetState>;
|
|
262
|
+
getCollateralBrand(): Brand<"nat">;
|
|
263
|
+
getDebtBrand(): Brand<"nat">;
|
|
264
|
+
/**
|
|
265
|
+
* Prepend with an identifier of this vault manager
|
|
266
|
+
*
|
|
267
|
+
* @param {string} base
|
|
268
|
+
*/
|
|
269
|
+
scopeDescription(base: string): string;
|
|
270
|
+
/** coefficient on existing debt to calculate new debt */
|
|
271
|
+
getCompoundedInterest(): Ratio;
|
|
272
|
+
/**
|
|
273
|
+
* Called by a vault when its balances change.
|
|
274
|
+
*
|
|
275
|
+
* @param {NormalizedDebt} oldDebtNormalized
|
|
276
|
+
* @param {Amount<'nat'>} oldCollateral
|
|
277
|
+
* @param {VaultId} vaultId
|
|
278
|
+
* @param {VaultPhase} vaultPhase at the end of whatever change updated
|
|
279
|
+
* balances
|
|
280
|
+
* @param {Vault} vault
|
|
281
|
+
* @returns {void}
|
|
282
|
+
*/
|
|
283
|
+
handleBalanceChange(oldDebtNormalized: NormalizedDebt, oldCollateral: Amount<"nat">, vaultId: VaultId, vaultPhase: VaultPhase, vault: Vault): void;
|
|
284
|
+
};
|
|
285
|
+
self: {
|
|
286
|
+
getGovernedParams(): GovernedParamGetters;
|
|
287
|
+
/** @param {ZCFSeat} seat */
|
|
288
|
+
makeVaultKit(seat: ZCFSeat): Promise<{
|
|
289
|
+
publicSubscribers: {
|
|
290
|
+
vault: {
|
|
291
|
+
description: string;
|
|
292
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
293
|
+
storagePath: Promise<string>;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
297
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
298
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
299
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
300
|
+
}>;
|
|
301
|
+
vault: import("@endo/exo").Guarded<{
|
|
302
|
+
getPublicTopics(): {
|
|
303
|
+
vault: {
|
|
304
|
+
description: string;
|
|
305
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
306
|
+
storagePath: Promise<string>;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
310
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
311
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
312
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
313
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
314
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
315
|
+
}>;
|
|
316
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
317
|
+
}>;
|
|
318
|
+
getCollateralQuote(): PriceQuote;
|
|
319
|
+
getPublicFacet(): import("@endo/exo").Guarded<{
|
|
320
|
+
makeVaultInvitation(): Promise<import("@agoric/zoe").Invitation<{
|
|
321
|
+
publicSubscribers: {
|
|
322
|
+
vault: {
|
|
323
|
+
description: string;
|
|
324
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
325
|
+
storagePath: Promise<string>;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
329
|
+
AdjustBalances(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
330
|
+
CloseVault(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
331
|
+
TransferVault(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
332
|
+
}>;
|
|
333
|
+
vault: import("@endo/exo").Guarded<{
|
|
334
|
+
getPublicTopics(): {
|
|
335
|
+
vault: {
|
|
336
|
+
description: string;
|
|
337
|
+
subscriber: import("@agoric/notifier").Subscriber<import("./vault.js").VaultNotification>;
|
|
338
|
+
storagePath: Promise<string>;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
makeAdjustBalancesInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
342
|
+
makeCloseInvitation(): Promise<import("@agoric/zoe").Invitation<string, undefined>>;
|
|
343
|
+
makeTransferInvitation(): Promise<import("@agoric/zoe").Invitation</*elided*/ any>>;
|
|
344
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
345
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
346
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
347
|
+
}>;
|
|
348
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
349
|
+
}, undefined>>;
|
|
350
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
351
|
+
getCompoundedInterest(): Ratio;
|
|
352
|
+
getPublicTopics(): {
|
|
353
|
+
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
354
|
+
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
355
|
+
};
|
|
356
|
+
}>;
|
|
357
|
+
lockOraclePrices(): PriceQuote;
|
|
358
|
+
};
|
|
359
|
+
}>>;
|
|
360
|
+
export function provideAndStartVaultManagerKits(baggage: Baggage): {
|
|
361
|
+
/** @type {(kit: VaultManagerKit) => void} */
|
|
362
|
+
add: (kit: VaultManagerKit) => void;
|
|
363
|
+
/** @type {(index: number) => VaultManagerKit} */
|
|
364
|
+
get: (index: number) => VaultManagerKit;
|
|
365
|
+
length: () => any;
|
|
366
|
+
};
|
|
367
|
+
export type MetricsNotification = {
|
|
368
|
+
/**
|
|
369
|
+
* priceQuote that will be used for
|
|
370
|
+
* liquidation. Non-null from priceLock time until liquidation has taken
|
|
371
|
+
* place.
|
|
372
|
+
*/
|
|
373
|
+
lockedQuote: Ratio | null;
|
|
374
|
+
/**
|
|
375
|
+
* present count of vaults
|
|
376
|
+
*/
|
|
377
|
+
numActiveVaults: number;
|
|
378
|
+
/**
|
|
379
|
+
* present count of liquidating vaults
|
|
380
|
+
*/
|
|
381
|
+
numLiquidatingVaults: number;
|
|
382
|
+
/**
|
|
383
|
+
* present sum of collateral across
|
|
384
|
+
* all vaults
|
|
385
|
+
*/
|
|
386
|
+
totalCollateral: Amount<"nat">;
|
|
387
|
+
/**
|
|
388
|
+
* present sum of debt across all vaults
|
|
389
|
+
*/
|
|
390
|
+
totalDebt: Amount<"nat">;
|
|
391
|
+
/**
|
|
392
|
+
* collateral held as a result of
|
|
393
|
+
* not returning excess refunds to owners of vaults liquidated with
|
|
394
|
+
* shortfalls
|
|
395
|
+
*/
|
|
396
|
+
retainedCollateral: Amount<"nat">;
|
|
397
|
+
/**
|
|
398
|
+
* present sum of collateral in
|
|
399
|
+
* vaults sent for liquidation
|
|
400
|
+
*/
|
|
401
|
+
liquidatingCollateral: Amount<"nat">;
|
|
402
|
+
/**
|
|
403
|
+
* present sum of debt in vaults sent
|
|
404
|
+
* for liquidation
|
|
405
|
+
*/
|
|
406
|
+
liquidatingDebt: Amount<"nat">;
|
|
407
|
+
/**
|
|
408
|
+
* running sum of collateral sold
|
|
409
|
+
* in liquidation
|
|
410
|
+
*/
|
|
411
|
+
totalCollateralSold: Amount<"nat">;
|
|
412
|
+
/**
|
|
413
|
+
* running sum of overages,
|
|
414
|
+
* central received greater than debt
|
|
415
|
+
*/
|
|
416
|
+
totalOverageReceived: Amount<"nat">;
|
|
417
|
+
/**
|
|
418
|
+
* running sum of minted
|
|
419
|
+
* received from liquidation
|
|
420
|
+
*/
|
|
421
|
+
totalProceedsReceived: Amount<"nat">;
|
|
422
|
+
/**
|
|
423
|
+
* running sum of shortfalls,
|
|
424
|
+
* minted received less than debt
|
|
425
|
+
*/
|
|
426
|
+
totalShortfallReceived: Amount<"nat">;
|
|
427
|
+
/**
|
|
428
|
+
* running count of liquidated
|
|
429
|
+
* vaults
|
|
430
|
+
*/
|
|
431
|
+
numLiquidationsCompleted: number;
|
|
432
|
+
/**
|
|
433
|
+
* running count of vault liquidations
|
|
434
|
+
* that were reverted.
|
|
435
|
+
*/
|
|
436
|
+
numLiquidationsAborted: number;
|
|
437
|
+
};
|
|
438
|
+
export type AssetState = {
|
|
439
|
+
compoundedInterest: Ratio;
|
|
440
|
+
interestRate: Ratio;
|
|
441
|
+
latestInterestUpdate: Timestamp;
|
|
442
|
+
};
|
|
443
|
+
export type GovernedParamGetters = {
|
|
444
|
+
getChargingPeriod: () => RelativeTime;
|
|
445
|
+
getRecordingPeriod: () => RelativeTime;
|
|
446
|
+
getDebtLimit: () => Amount<"nat">;
|
|
447
|
+
getInterestRate: () => Ratio;
|
|
448
|
+
getLiquidationPadding: () => Ratio;
|
|
449
|
+
getLiquidationMargin: () => Ratio;
|
|
450
|
+
getLiquidationPenalty: () => Ratio;
|
|
451
|
+
getMintFee: () => Ratio;
|
|
452
|
+
getMinInitialDebt: () => Amount<"nat">;
|
|
453
|
+
};
|
|
454
|
+
export type HeldParams = Readonly<{
|
|
455
|
+
debtMint: ZCFMint<"nat">;
|
|
456
|
+
collateralBrand: Brand<"nat">;
|
|
457
|
+
collateralUnit: Amount<"nat">;
|
|
458
|
+
descriptionScope: string;
|
|
459
|
+
startTimeStamp: Timestamp;
|
|
460
|
+
storageNode: Remote<StorageNode>;
|
|
461
|
+
}>;
|
|
462
|
+
export type ImmutableState = {
|
|
463
|
+
assetTopicKit: RecorderKit<AssetState>;
|
|
464
|
+
debtBrand: Brand<"nat">;
|
|
465
|
+
liquidatingVaults: SetStore<Vault>;
|
|
466
|
+
metricsTopicKit: RecorderKit<MetricsNotification>;
|
|
467
|
+
poolIncrementSeat: ZCFSeat;
|
|
468
|
+
retainedCollateralSeat: ZCFSeat;
|
|
469
|
+
unsettledVaults: MapStore<string, Vault>;
|
|
470
|
+
};
|
|
471
|
+
export type MutableState = {
|
|
472
|
+
compoundedInterest: Ratio;
|
|
473
|
+
latestInterestUpdate: Timestamp;
|
|
474
|
+
numLiquidationsCompleted: number;
|
|
475
|
+
numLiquidationsAborted: number;
|
|
476
|
+
totalCollateral: Amount<"nat">;
|
|
477
|
+
totalCollateralSold: Amount<"nat">;
|
|
478
|
+
totalDebt: Amount<"nat">;
|
|
479
|
+
liquidatingCollateral: Amount<"nat">;
|
|
480
|
+
liquidatingDebt: Amount<"nat">;
|
|
481
|
+
totalOverageReceived: Amount<"nat">;
|
|
482
|
+
totalProceedsReceived: Amount<"nat">;
|
|
483
|
+
totalShortfallReceived: Amount<"nat">;
|
|
484
|
+
vaultCounter: number;
|
|
485
|
+
lockedQuote: PriceQuote | undefined;
|
|
486
|
+
};
|
|
487
|
+
export type VaultManagerKit = EReturn<EReturn<typeof prepareVaultManagerKit>>;
|
|
488
|
+
/**
|
|
489
|
+
* Each VaultManager manages a
|
|
490
|
+
* single collateral type.
|
|
491
|
+
*
|
|
492
|
+
* It manages some number of outstanding debt positions, each called a Vault,
|
|
493
|
+
* for which the collateral is provided in exchange for borrowed Minted.
|
|
494
|
+
*/
|
|
495
|
+
export type VaultManager = VaultManagerKit["self"];
|
|
496
|
+
export type CollateralManager = VaultManagerKit["collateral"];
|
|
497
|
+
import type { LatestTopic } from '@agoric/notifier';
|
|
498
|
+
import type { ERef } from '@agoric/vow';
|
|
499
|
+
import type { PromiseWatcher } from '@agoric/swingset-liveslots';
|
|
500
|
+
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
501
|
+
import type { VaultFactoryZCF } from './vaultFactory.js';
|
|
502
|
+
import type { EMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
503
|
+
import type { ERemote } from '@agoric/internal';
|
|
504
|
+
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
505
|
+
import type { MakeERecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
506
|
+
import type { FactoryPowersFacet } from './vaultDirector.js';
|
|
507
|
+
import type { ZCFMint } from '@agoric/zoe';
|
|
508
|
+
import type { Brand } from '@agoric/ertp';
|
|
509
|
+
import type { Amount } from '@agoric/ertp';
|
|
510
|
+
import type { Timestamp } from '@agoric/time';
|
|
511
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
512
|
+
import type { Remote } from '@agoric/internal';
|
|
513
|
+
import type { NormalizedDebt } from './storeUtils.js';
|
|
514
|
+
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
515
|
+
import type { StoredNotifier } from '@agoric/notifier';
|
|
516
|
+
import type { Ratio } from '@agoric/ertp';
|
|
517
|
+
import type { ZCFSeat } from '@agoric/zoe';
|
|
518
|
+
import type { VaultId } from './types.js';
|
|
519
|
+
import type { VaultPhase } from './vault.js';
|
|
520
|
+
import type { Vault } from './vault.js';
|
|
521
|
+
import type { RelativeTime } from '@agoric/time';
|
|
522
|
+
import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
523
|
+
import type { SetStore } from '@agoric/store';
|
|
524
|
+
import type { MapStore } from '@agoric/store';
|
|
525
|
+
import type { EReturn } from '@endo/far';
|
|
526
|
+
//# sourceMappingURL=vaultManager.d.ts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