@agoric/inter-protocol 0.16.2-dev-4f72580.0 → 0.16.2-dev-bef63e5.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 +16 -16
- package/src/auction/auctionBook.d.ts +2 -2
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/offerBook.d.ts +2 -29
- package/src/auction/offerBook.d.ts.map +1 -1
- package/src/auction/params.d.ts +2 -2
- package/src/econCommitteeCharter.d.ts +1 -9
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.d.ts +5 -50
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.d.ts +2 -176
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.d.ts +1 -15
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/roundsManager.d.ts +1 -129
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +20 -16
- package/src/proposals/econ-behaviors.d.ts +10 -10
- package/src/provisionPool.d.ts +60 -64
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPoolKit.d.ts +131 -156
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/psm/psm.d.ts +3 -60
- package/src/psm/psm.d.ts.map +1 -1
- package/src/reserve/assetReserve.d.ts +4 -4
- package/src/reserve/assetReserveKit.d.ts +1 -46
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/vaultFactory/orderedVaultStore.d.ts +12 -12
- package/src/vaultFactory/params.d.ts +2 -2
- package/src/vaultFactory/prioritizedVaults.d.ts +36 -36
- package/src/vaultFactory/vault.d.ts +5 -210
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.d.ts +20 -269
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.d.ts +16 -16
- package/src/vaultFactory/vaultHolder.d.ts +12 -87
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.d.ts +4 -4
- package/src/vaultFactory/vaultManager.d.ts +12 -211
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
|
@@ -61,12 +61,12 @@ export function makeGovernedTerms({ auctioneerPublicFacet, bootstrapPaymentValue
|
|
|
61
61
|
makeDepositInvitation: () => Promise<Invitation<R, A>>;
|
|
62
62
|
}>>;
|
|
63
63
|
priceAuthority: ERef<PriceAuthority>;
|
|
64
|
-
reservePublicFacet: GovernedPublicFacet<{
|
|
64
|
+
reservePublicFacet: GovernedPublicFacet<import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
65
65
|
makeAddCollateralInvitation(): Promise<Invitation<R, A>>;
|
|
66
66
|
getPublicTopics(): {
|
|
67
67
|
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("../reserve/assetReserveKit.js").MetricsNotification>;
|
|
68
68
|
};
|
|
69
|
-
}
|
|
69
|
+
}>>;
|
|
70
70
|
timerService: ERef<import("@agoric/time").TimerService>;
|
|
71
71
|
governedParams: {
|
|
72
72
|
Electorate: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function currentDebtToCollateral(vault: Vault): Ratio;
|
|
2
2
|
export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
3
3
|
addVault: (vaultId: VaultId, vault: Vault) => string;
|
|
4
|
-
entries: (keyPatt?: any, valuePatt?: any) => Iterable<[string, {
|
|
4
|
+
entries: (keyPatt?: any, valuePatt?: any) => Iterable<[string, import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
5
5
|
getVaultSeat(): ZCFSeat;
|
|
6
6
|
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
7
7
|
publicSubscribers: {
|
|
@@ -11,12 +11,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
11
11
|
storagePath: Promise<string>;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
invitationMakers: {
|
|
14
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
15
15
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
16
16
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
17
17
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
18
|
-
}
|
|
19
|
-
vault: {
|
|
18
|
+
}>;
|
|
19
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
20
20
|
getPublicTopics(): {
|
|
21
21
|
vault: {
|
|
22
22
|
description: string;
|
|
@@ -30,7 +30,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
30
30
|
getCollateralAmount(): Amount<"nat">;
|
|
31
31
|
getCurrentDebt(): Amount<"nat">;
|
|
32
32
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
33
|
-
}
|
|
33
|
+
}>;
|
|
34
34
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
35
35
|
}>;
|
|
36
36
|
liquidating(): void;
|
|
@@ -42,12 +42,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
42
42
|
getCollateralAmount(): Amount<"nat">;
|
|
43
43
|
getCurrentDebt(): Amount<"nat">;
|
|
44
44
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
45
|
-
}]>;
|
|
45
|
+
}>]>;
|
|
46
46
|
getCount: (keyPatt?: any, valuePatt?: any) => number;
|
|
47
47
|
hasVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<'nat'>, vaultId: string) => boolean;
|
|
48
48
|
highestRatio: () => Ratio | undefined;
|
|
49
49
|
removeVault: (key: string) => Vault;
|
|
50
|
-
removeVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<'nat'>, vaultId: string) => {
|
|
50
|
+
removeVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<'nat'>, vaultId: string) => import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
51
51
|
getVaultSeat(): ZCFSeat;
|
|
52
52
|
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
53
53
|
publicSubscribers: {
|
|
@@ -57,12 +57,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
57
57
|
storagePath: Promise<string>;
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
invitationMakers: {
|
|
60
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
61
61
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
62
62
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
63
63
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
64
|
-
}
|
|
65
|
-
vault: {
|
|
64
|
+
}>;
|
|
65
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
66
66
|
getPublicTopics(): {
|
|
67
67
|
vault: {
|
|
68
68
|
description: string;
|
|
@@ -76,7 +76,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
76
76
|
getCollateralAmount(): Amount<"nat">;
|
|
77
77
|
getCurrentDebt(): Amount<"nat">;
|
|
78
78
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
79
|
-
}
|
|
79
|
+
}>;
|
|
80
80
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
81
81
|
}>;
|
|
82
82
|
liquidating(): void;
|
|
@@ -88,12 +88,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
88
88
|
getCollateralAmount(): Amount<"nat">;
|
|
89
89
|
getCurrentDebt(): Amount<"nat">;
|
|
90
90
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
91
|
-
}
|
|
91
|
+
}>;
|
|
92
92
|
removeVaultsBelow: ({ margin, quote, interest }: {
|
|
93
93
|
margin: any;
|
|
94
94
|
quote: any;
|
|
95
95
|
interest: any;
|
|
96
|
-
}) => MapStore<string, {
|
|
96
|
+
}) => MapStore<string, import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
97
97
|
getVaultSeat(): ZCFSeat;
|
|
98
98
|
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
99
99
|
publicSubscribers: {
|
|
@@ -103,12 +103,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
103
103
|
storagePath: Promise<string>;
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
invitationMakers: {
|
|
106
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
107
107
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
108
108
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
109
109
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
110
|
-
}
|
|
111
|
-
vault: {
|
|
110
|
+
}>;
|
|
111
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
112
112
|
getPublicTopics(): {
|
|
113
113
|
vault: {
|
|
114
114
|
description: string;
|
|
@@ -122,7 +122,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
122
122
|
getCollateralAmount(): Amount<"nat">;
|
|
123
123
|
getCurrentDebt(): Amount<"nat">;
|
|
124
124
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
125
|
-
}
|
|
125
|
+
}>;
|
|
126
126
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
127
127
|
}>;
|
|
128
128
|
liquidating(): void;
|
|
@@ -134,11 +134,11 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
134
134
|
getCollateralAmount(): Amount<"nat">;
|
|
135
135
|
getCurrentDebt(): Amount<"nat">;
|
|
136
136
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
137
|
-
}
|
|
137
|
+
}>>;
|
|
138
138
|
countVaultsBelow: (crKey: any) => number;
|
|
139
139
|
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
140
140
|
addVault: (vaultId: VaultId, vault: Vault) => string;
|
|
141
|
-
entries: (keyPatt?: any, valuePatt?: any) => Iterable<[string, {
|
|
141
|
+
entries: (keyPatt?: any, valuePatt?: any) => Iterable<[string, import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
142
142
|
getVaultSeat(): ZCFSeat;
|
|
143
143
|
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
144
144
|
publicSubscribers: {
|
|
@@ -148,12 +148,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
148
148
|
storagePath: Promise<string>;
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
|
-
invitationMakers: {
|
|
151
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
152
152
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
153
153
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
154
154
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
155
|
-
}
|
|
156
|
-
vault: {
|
|
155
|
+
}>;
|
|
156
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
157
157
|
getPublicTopics(): {
|
|
158
158
|
vault: {
|
|
159
159
|
description: string;
|
|
@@ -167,7 +167,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
167
167
|
getCollateralAmount(): Amount<"nat">;
|
|
168
168
|
getCurrentDebt(): Amount<"nat">;
|
|
169
169
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
170
|
-
}
|
|
170
|
+
}>;
|
|
171
171
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
172
172
|
}>;
|
|
173
173
|
liquidating(): void;
|
|
@@ -179,12 +179,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
179
179
|
getCollateralAmount(): Amount<"nat">;
|
|
180
180
|
getCurrentDebt(): Amount<"nat">;
|
|
181
181
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
182
|
-
}]>;
|
|
182
|
+
}>]>;
|
|
183
183
|
getCount: (keyPatt?: any, valuePatt?: any) => number;
|
|
184
184
|
hasVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<'nat'>, vaultId: string) => boolean;
|
|
185
185
|
highestRatio: () => Ratio | undefined;
|
|
186
186
|
removeVault: (key: string) => Vault;
|
|
187
|
-
removeVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<'nat'>, vaultId: string) => {
|
|
187
|
+
removeVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<'nat'>, vaultId: string) => import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
188
188
|
getVaultSeat(): ZCFSeat;
|
|
189
189
|
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
190
190
|
publicSubscribers: {
|
|
@@ -194,12 +194,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
194
194
|
storagePath: Promise<string>;
|
|
195
195
|
};
|
|
196
196
|
};
|
|
197
|
-
invitationMakers: {
|
|
197
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
198
198
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
199
199
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
200
200
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
201
|
-
}
|
|
202
|
-
vault: {
|
|
201
|
+
}>;
|
|
202
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
203
203
|
getPublicTopics(): {
|
|
204
204
|
vault: {
|
|
205
205
|
description: string;
|
|
@@ -213,7 +213,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
213
213
|
getCollateralAmount(): Amount<"nat">;
|
|
214
214
|
getCurrentDebt(): Amount<"nat">;
|
|
215
215
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
216
|
-
}
|
|
216
|
+
}>;
|
|
217
217
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
218
218
|
}>;
|
|
219
219
|
liquidating(): void;
|
|
@@ -225,12 +225,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
225
225
|
getCollateralAmount(): Amount<"nat">;
|
|
226
226
|
getCurrentDebt(): Amount<"nat">;
|
|
227
227
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
228
|
-
}
|
|
228
|
+
}>;
|
|
229
229
|
removeVaultsBelow: ({ margin, quote, interest }: {
|
|
230
230
|
margin: any;
|
|
231
231
|
quote: any;
|
|
232
232
|
interest: any;
|
|
233
|
-
}) => MapStore<string, {
|
|
233
|
+
}) => MapStore<string, import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
234
234
|
getVaultSeat(): ZCFSeat;
|
|
235
235
|
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
236
236
|
publicSubscribers: {
|
|
@@ -240,12 +240,12 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
240
240
|
storagePath: Promise<string>;
|
|
241
241
|
};
|
|
242
242
|
};
|
|
243
|
-
invitationMakers: {
|
|
243
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
244
244
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
245
245
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
246
246
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
247
|
-
}
|
|
248
|
-
vault: {
|
|
247
|
+
}>;
|
|
248
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
249
249
|
getPublicTopics(): {
|
|
250
250
|
vault: {
|
|
251
251
|
description: string;
|
|
@@ -259,7 +259,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
259
259
|
getCollateralAmount(): Amount<"nat">;
|
|
260
260
|
getCurrentDebt(): Amount<"nat">;
|
|
261
261
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
262
|
-
}
|
|
262
|
+
}>;
|
|
263
263
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
|
|
264
264
|
}>;
|
|
265
265
|
liquidating(): void;
|
|
@@ -271,7 +271,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
|
|
|
271
271
|
getCollateralAmount(): Amount<"nat">;
|
|
272
272
|
getCurrentDebt(): Amount<"nat">;
|
|
273
273
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
274
|
-
}
|
|
274
|
+
}>>;
|
|
275
275
|
countVaultsBelow: (crKey: any) => number;
|
|
276
276
|
}>;
|
|
277
277
|
export type Vault = import('./vault.js').Vault;
|
|
@@ -55,7 +55,7 @@ export namespace Phase {
|
|
|
55
55
|
* }} MutableState
|
|
56
56
|
*/
|
|
57
57
|
export const VaultI: any;
|
|
58
|
-
export function prepareVault(baggage: import('@agoric/ertp').Baggage, makeRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit, zcf: ZCF): (manager: VaultManager, idInManager: string, storageNode: StorageNode) => {
|
|
58
|
+
export function prepareVault(baggage: import('@agoric/ertp').Baggage, makeRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit, zcf: ZCF): (manager: VaultManager, idInManager: string, storageNode: StorageNode) => import("@endo/exo/src/exo-makers.js").GuardedKit<{
|
|
59
59
|
helper: {
|
|
60
60
|
collateralBrand(): Brand<AssetKind>;
|
|
61
61
|
debtBrand(): Brand<"nat">;
|
|
@@ -191,217 +191,12 @@ export function prepareVault(baggage: import('@agoric/ertp').Baggage, makeRecord
|
|
|
191
191
|
storagePath: Promise<string>;
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
|
-
invitationMakers: {
|
|
194
|
+
invitationMakers: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
195
195
|
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
196
196
|
CloseVault(): Promise<Invitation<R, A>>;
|
|
197
197
|
TransferVault(): Promise<Invitation<R, A>>;
|
|
198
|
-
}
|
|
199
|
-
vault: {
|
|
200
|
-
getPublicTopics(): {
|
|
201
|
-
vault: {
|
|
202
|
-
description: string;
|
|
203
|
-
subscriber: Subscriber<VaultNotification>;
|
|
204
|
-
storagePath: Promise<string>;
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<R, A>>;
|
|
208
|
-
makeCloseInvitation(): Promise<Invitation<R, A>>;
|
|
209
|
-
makeTransferInvitation(): Promise<Invitation<R, A>>;
|
|
210
|
-
getCollateralAmount(): Amount<"nat">;
|
|
211
|
-
getCurrentDebt(): Amount<"nat">;
|
|
212
|
-
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
213
|
-
};
|
|
214
|
-
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
215
|
-
}>;
|
|
216
|
-
/** Called by manager at start of liquidation. */
|
|
217
|
-
liquidating(): void;
|
|
218
|
-
/**
|
|
219
|
-
* Called by manager at end of liquidation, at which point all debts
|
|
220
|
-
* have been covered.
|
|
221
|
-
*/
|
|
222
|
-
liquidated(): void;
|
|
223
|
-
/**
|
|
224
|
-
* Called by vaultManager when the auction wasn't able to sell the
|
|
225
|
-
* collateral. The liquidation fee was charged against the collateral,
|
|
226
|
-
* but the debt will be restored and the vault will be active again.
|
|
227
|
-
* Liquidation.md has details on the liquidation approach.
|
|
228
|
-
*/
|
|
229
|
-
abortLiquidation(): string;
|
|
230
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<R, A>>;
|
|
231
|
-
makeCloseInvitation(): Promise<Invitation<R, A>>;
|
|
232
|
-
/** @returns {Promise<Invitation>} */
|
|
233
|
-
makeTransferInvitation(): Promise<Invitation>;
|
|
234
|
-
/** @returns {Amount<'nat'>} */
|
|
235
|
-
getCollateralAmount(): Amount<'nat'>;
|
|
236
|
-
/**
|
|
237
|
-
* The actual current debt, including accrued interest.
|
|
238
|
-
*
|
|
239
|
-
* This looks like a simple getter but it does a lot of the heavy
|
|
240
|
-
* lifting for interest accrual. Rather than updating all records when
|
|
241
|
-
* interest accrues, the vault manager updates just its rolling
|
|
242
|
-
* compounded interest. Here we calculate what the current debt is given
|
|
243
|
-
* what's recorded in this vault and what interest has compounded since
|
|
244
|
-
* this vault record was written.
|
|
245
|
-
*
|
|
246
|
-
* @returns {Amount<'nat'>}
|
|
247
|
-
* @see getNormalizedDebt
|
|
248
|
-
*/
|
|
249
|
-
getCurrentDebt(): Amount<'nat'>;
|
|
250
|
-
/**
|
|
251
|
-
* The normalization puts all debts on a common time-independent scale
|
|
252
|
-
* since the launch of this vault manager. This allows the manager to
|
|
253
|
-
* order vaults by their debt-to-collateral ratios without having to
|
|
254
|
-
* mutate the debts as the interest accrues.
|
|
255
|
-
*
|
|
256
|
-
* @returns {import('./storeUtils.js').NormalizedDebt} as if the vault
|
|
257
|
-
* was open at the launch of this manager, before any interest
|
|
258
|
-
* accrued
|
|
259
|
-
* @see getActualDebAmount
|
|
260
|
-
*/
|
|
261
|
-
getNormalizedDebt(): import('./storeUtils.js').NormalizedDebt;
|
|
262
|
-
};
|
|
263
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
264
|
-
helper: {
|
|
265
|
-
collateralBrand(): Brand<AssetKind>;
|
|
266
|
-
debtBrand(): Brand<"nat">;
|
|
267
|
-
emptyCollateral(): Amount<"nat">;
|
|
268
|
-
emptyDebt(): Amount<"nat">;
|
|
269
|
-
/**
|
|
270
|
-
* @typedef {{
|
|
271
|
-
* give: { Collateral: Amount<'nat'>; Minted: Amount<'nat'> };
|
|
272
|
-
* want: { Collateral: Amount<'nat'>; Minted: Amount<'nat'> };
|
|
273
|
-
* }} FullProposal
|
|
274
|
-
*/
|
|
275
|
-
/**
|
|
276
|
-
* @param {ProposalRecord} partial
|
|
277
|
-
* @returns {FullProposal}
|
|
278
|
-
*/
|
|
279
|
-
fullProposal(partial: ProposalRecord): {
|
|
280
|
-
give: {
|
|
281
|
-
Collateral: Amount<'nat'>;
|
|
282
|
-
Minted: Amount<'nat'>;
|
|
283
|
-
};
|
|
284
|
-
want: {
|
|
285
|
-
Collateral: Amount<'nat'>;
|
|
286
|
-
Minted: Amount<'nat'>;
|
|
287
|
-
};
|
|
288
|
-
};
|
|
289
|
-
/** @param {VaultPhase} newPhase */
|
|
290
|
-
assignPhase(newPhase: VaultPhase): void;
|
|
291
|
-
assertActive(): void;
|
|
292
|
-
assertCloseable(): void;
|
|
293
|
-
/**
|
|
294
|
-
* Called whenever the debt is paid or created through a transaction,
|
|
295
|
-
* but not for interest accrual.
|
|
296
|
-
*
|
|
297
|
-
* @param {Amount<'nat'>} newDebt - principal and all accrued interest
|
|
298
|
-
*/
|
|
299
|
-
updateDebtSnapshot(newDebt: Amount<'nat'>): void;
|
|
300
|
-
/**
|
|
301
|
-
* Update the debt balance and propagate upwards to maintain aggregate
|
|
302
|
-
* debt and liquidation order.
|
|
303
|
-
*
|
|
304
|
-
* @param {NormalizedDebt} oldDebtNormalized - prior principal and all
|
|
305
|
-
* accrued interest, normalized to the launch of the vaultManager
|
|
306
|
-
* @param {Amount<'nat'>} oldCollateral - actual collateral
|
|
307
|
-
* @param {Amount<'nat'>} newDebtActual - actual principal and all
|
|
308
|
-
* accrued interest
|
|
309
|
-
*/
|
|
310
|
-
updateDebtAccounting(oldDebtNormalized: NormalizedDebt, oldCollateral: Amount<'nat'>, newDebtActual: Amount<'nat'>): void;
|
|
311
|
-
/** @param {ZCFSeat} seat */
|
|
312
|
-
getCollateralAllocated(seat: ZCFSeat): Amount<any>;
|
|
313
|
-
getMintedAllocated(seat: any): any;
|
|
314
|
-
assertVaultHoldsNoMinted(): void;
|
|
315
|
-
/**
|
|
316
|
-
* @param {Amount<'nat'>} collateralAmount
|
|
317
|
-
* @param {Amount<'nat'>} proposedDebt
|
|
318
|
-
*/
|
|
319
|
-
assertSufficientCollateral(collateralAmount: Amount<'nat'>, proposedDebt: Amount<'nat'>): void;
|
|
320
|
-
/** @param {HolderPhase} newPhase */
|
|
321
|
-
getStateSnapshot(newPhase: HolderPhase): {
|
|
322
|
-
debtSnapshot: {
|
|
323
|
-
debt: Amount<"nat">;
|
|
324
|
-
interest: Ratio;
|
|
325
|
-
};
|
|
326
|
-
locked: Amount<"nat">;
|
|
327
|
-
vaultState: HolderPhase;
|
|
328
|
-
};
|
|
329
|
-
/** call this whenever anything changes! */
|
|
330
|
-
updateUiState(): void;
|
|
331
|
-
/** @param {ZCFSeat} seat */
|
|
332
|
-
closeHook(seat: ZCFSeat): Promise<string>;
|
|
333
|
-
/**
|
|
334
|
-
* Calculate the fee, the amount to mint and the resulting debt. The
|
|
335
|
-
* give and the want together reflect a delta, where typically one is
|
|
336
|
-
* zero because they come from the gave/want of an offer proposal. If
|
|
337
|
-
* the `want` is zero, the `fee` will also be zero, so the simple math
|
|
338
|
-
* works.
|
|
339
|
-
*
|
|
340
|
-
* @param {Amount<'nat'>} currentDebt
|
|
341
|
-
* @param {Amount<'nat'>} giveAmount
|
|
342
|
-
* @param {Amount<'nat'>} wantAmount
|
|
343
|
-
*/
|
|
344
|
-
debtFee(currentDebt: Amount<'nat'>, giveAmount: Amount<'nat'>, wantAmount: Amount<'nat'>): {
|
|
345
|
-
newDebt: Amount<"nat">;
|
|
346
|
-
toMint: Amount<"nat">;
|
|
347
|
-
fee: Amount<"nat">;
|
|
348
|
-
surplus: Amount<"nat">;
|
|
349
|
-
};
|
|
350
|
-
/**
|
|
351
|
-
* Adjust principal and collateral (atomically for offer safety)
|
|
352
|
-
*
|
|
353
|
-
* @param {ZCFSeat} clientSeat
|
|
354
|
-
* @returns {string} success message
|
|
355
|
-
*/
|
|
356
|
-
adjustBalancesHook(clientSeat: ZCFSeat): string;
|
|
357
|
-
/**
|
|
358
|
-
* @param {ZCFSeat} clientSeat
|
|
359
|
-
* @param {FullProposal} fp
|
|
360
|
-
* @param {ReturnType<typeof calculateDebtCosts>} costs
|
|
361
|
-
* @param {object} accounting
|
|
362
|
-
* @param {NormalizedDebt} accounting.normalizedDebtPre
|
|
363
|
-
* @param {Amount<'nat'>} accounting.collateralPre
|
|
364
|
-
* @returns {string} success message
|
|
365
|
-
*/
|
|
366
|
-
commitBalanceAdjustment(clientSeat: ZCFSeat, fp: {
|
|
367
|
-
give: {
|
|
368
|
-
Collateral: Amount<'nat'>;
|
|
369
|
-
Minted: Amount<'nat'>;
|
|
370
|
-
};
|
|
371
|
-
want: {
|
|
372
|
-
Collateral: Amount<'nat'>;
|
|
373
|
-
Minted: Amount<'nat'>;
|
|
374
|
-
};
|
|
375
|
-
}, { newDebt, fee, surplus, toMint }: ReturnType<typeof calculateDebtCosts>, { normalizedDebtPre, collateralPre }: {
|
|
376
|
-
normalizedDebtPre: NormalizedDebt;
|
|
377
|
-
collateralPre: Amount<'nat'>;
|
|
378
|
-
}): string;
|
|
379
|
-
/**
|
|
380
|
-
* @param {ZCFSeat} seat
|
|
381
|
-
* @returns {VaultKit}
|
|
382
|
-
*/
|
|
383
|
-
makeTransferInvitationHook(seat: ZCFSeat): VaultKit;
|
|
384
|
-
};
|
|
385
|
-
self: {
|
|
386
|
-
getVaultSeat(): ZCFSeat;
|
|
387
|
-
/**
|
|
388
|
-
* @param {ZCFSeat} seat
|
|
389
|
-
* @param {StorageNode} storageNode
|
|
390
|
-
*/
|
|
391
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
392
|
-
publicSubscribers: {
|
|
393
|
-
vault: {
|
|
394
|
-
description: string;
|
|
395
|
-
subscriber: Subscriber<VaultNotification>;
|
|
396
|
-
storagePath: Promise<string>;
|
|
397
|
-
};
|
|
398
|
-
};
|
|
399
|
-
invitationMakers: {
|
|
400
|
-
AdjustBalances(): Promise<Invitation<R, A>>;
|
|
401
|
-
CloseVault(): Promise<Invitation<R, A>>;
|
|
402
|
-
TransferVault(): Promise<Invitation<R, A>>;
|
|
403
|
-
};
|
|
404
|
-
vault: {
|
|
198
|
+
}>;
|
|
199
|
+
vault: import("@endo/exo/src/exo-makers.js").Guarded<{
|
|
405
200
|
getPublicTopics(): {
|
|
406
201
|
vault: {
|
|
407
202
|
description: string;
|
|
@@ -415,7 +210,7 @@ export function prepareVault(baggage: import('@agoric/ertp').Baggage, makeRecord
|
|
|
415
210
|
getCollateralAmount(): Amount<"nat">;
|
|
416
211
|
getCurrentDebt(): Amount<"nat">;
|
|
417
212
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
418
|
-
}
|
|
213
|
+
}>;
|
|
419
214
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
420
215
|
}>;
|
|
421
216
|
/** Called by manager at start of liquidation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["vault.js"],"names":[],"mappings":";;;;;;;AA0EA;;;;;;;;GAQG;AAGH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;GAYG;AAEH,yBAYG;AAkBI,sCAJI,OAAO,cAAc,EAAE,OAAO,mBAC9B,OAAO,6CAA6C,EAAE,eAAe,OACrE,GAAG;;;;;;QAuDN;;;;;WAKG;QACH;;;WAGG;8BAFQ,cAAc;kBALd;gBAAE,UAAU,EAAE,OAAO,KAAK,CAAC,CAAC;gBAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA;aAAE;kBACpD;gBAAE,UAAU,EAAE,OAAO,KAAK,CAAC,CAAC;gBAAC,MAAM,EAAE,OAAO,KAAK,CAAC,CAAA;aAAE;;QA0B/D,mCAA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