@agoric/inter-protocol 0.16.2-other-dev-fbe72e7.0.fbe72e7 → 0.16.2-other-dev-d15096d.0.d15096d
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 +17 -17
- package/src/auction/auctionBook.d.ts +3 -1
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/auctionBook.js +7 -6
- package/src/auction/auctioneer.d.ts +15 -10
- package/src/auction/auctioneer.d.ts.map +1 -1
- package/src/auction/auctioneer.js +23 -12
- package/src/auction/params.d.ts +14 -6
- package/src/auction/params.d.ts.map +1 -1
- package/src/auction/params.js +11 -4
- package/src/auction/scheduleMath.d.ts +5 -3
- package/src/auction/scheduleMath.d.ts.map +1 -1
- package/src/auction/scheduleMath.js +11 -7
- package/src/auction/scheduler.d.ts +8 -3
- package/src/auction/scheduler.d.ts.map +1 -1
- package/src/auction/scheduler.js +14 -6
- package/src/clientSupport.d.ts +28 -73
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +24 -128
- package/src/econCommitteeCharter.d.ts +9 -5
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +10 -8
- package/src/feeDistributor.d.ts +10 -16
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +3 -3
- package/src/index.js +1 -1
- package/src/price/fluxAggregatorContract.d.ts +14 -5
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +17 -9
- package/src/price/fluxAggregatorKit.d.ts +11 -6
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +12 -7
- package/src/price/priceOracleKit.d.ts +2 -1
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.js +2 -1
- package/src/price/roundsManager.d.ts +6 -4
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +4 -2
- package/src/proposals/add-auction.js +7 -2
- package/src/proposals/addAssetToVault.js +7 -3
- package/src/proposals/committee-proposal.js +10 -5
- package/src/proposals/core-proposal.js +9 -3
- package/src/proposals/deploy-price-feeds.js +7 -4
- package/src/proposals/econ-behaviors.js +14 -9
- package/src/proposals/price-feed-proposal.js +10 -3
- package/src/proposals/replace-fee-distributor.js +7 -4
- package/src/proposals/startEconCommittee.js +5 -1
- package/src/proposals/startPSM.js +7 -4
- package/src/proposals/upgrade-vaults.js +9 -4
- package/src/proposals/utils.d.ts +6 -4
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +8 -8
- package/src/proposals/withdraw-reserve-proposal.js +1 -1
- package/src/provisionPool.d.ts +16 -8
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +15 -9
- package/src/provisionPoolKit.d.ts +19 -74
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +26 -22
- package/src/psm/psm.d.ts +5 -6
- package/src/psm/psm.d.ts.map +1 -1
- package/src/psm/psm.js +12 -11
- package/src/reserve/assetReserve.d.ts +3 -2
- package/src/reserve/assetReserve.d.ts.map +1 -1
- package/src/reserve/assetReserve.js +10 -6
- package/src/reserve/assetReserveKit.d.ts +6 -3
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +7 -5
- package/src/vaultFactory/burn.js +1 -1
- package/src/vaultFactory/liquidation.d.ts +5 -3
- package/src/vaultFactory/liquidation.d.ts.map +1 -1
- package/src/vaultFactory/liquidation.js +9 -7
- package/src/vaultFactory/orderedVaultStore.d.ts +2 -2
- package/src/vaultFactory/params.d.ts +20 -7
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +24 -9
- package/src/vaultFactory/prioritizedVaults.d.ts +12 -12
- package/src/vaultFactory/types-ambient.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.js +1 -0
- package/src/vaultFactory/vault.d.ts +23 -20
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +17 -14
- package/src/vaultFactory/vaultDirector.d.ts +28 -16
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +28 -22
- package/src/vaultFactory/vaultFactory.d.ts +17 -52
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +22 -16
- package/src/vaultFactory/vaultHolder.d.ts +9 -5
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +8 -4
- package/src/vaultFactory/vaultKit.d.ts +4 -1
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +7 -4
- package/src/vaultFactory/vaultManager.d.ts +37 -25
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +28 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="@agoric/governance/exported" />
|
|
2
|
-
/// <reference types="@agoric/zoe/exported" />
|
|
1
|
+
/// <reference types="@agoric/governance/exported.js" />
|
|
2
|
+
/// <reference types="@agoric/zoe/exported.js" />
|
|
3
3
|
|
|
4
4
|
import { Fail, q } from '@endo/errors';
|
|
5
5
|
import { E } from '@endo/eventual-send';
|
|
@@ -43,7 +43,18 @@ import {
|
|
|
43
43
|
* @import {MapStore} from '@agoric/store';
|
|
44
44
|
* @import {TransferPart, ZCF, ZCFMint, ZCFSeat} from '@agoric/zoe';
|
|
45
45
|
* @import {EReturn} from '@endo/far';
|
|
46
|
-
* @import {TypedPattern} from '@agoric/internal';
|
|
46
|
+
* @import {TypedPattern, ERemote, Remote} from '@agoric/internal';
|
|
47
|
+
* @import {EMarshaller} from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
48
|
+
* @import {GovernedParamGetters} from './vaultManager.js';
|
|
49
|
+
* @import {ShortfallReporter} from '../reserve/assetReserve.js';
|
|
50
|
+
* @import {TypedParamManager} from '@agoric/governance/src/contractGovernance/typedParamManager.js';
|
|
51
|
+
* @import {VaultDirectorParams} from './params.js';
|
|
52
|
+
* @import {Baggage} from '@agoric/swingset-liveslots';
|
|
53
|
+
* @import {VaultFactoryZCF} from './vaultFactory.js';
|
|
54
|
+
* @import {TimerService} from '@agoric/time';
|
|
55
|
+
* @import {AuctioneerPublicFacet} from '../auction/auctioneer.js';
|
|
56
|
+
* @import {MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
57
|
+
* @import {MakeERecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
47
58
|
*/
|
|
48
59
|
|
|
49
60
|
const trace = makeTracer('VD', true);
|
|
@@ -63,13 +74,9 @@ const trace = makeTracer('VD', true);
|
|
|
63
74
|
*
|
|
64
75
|
* @typedef {{
|
|
65
76
|
* burnDebt: BurnDebt;
|
|
66
|
-
* getGovernedParams: (
|
|
67
|
-
* collateralBrand: Brand,
|
|
68
|
-
* ) => import('./vaultManager.js').GovernedParamGetters;
|
|
77
|
+
* getGovernedParams: (collateralBrand: Brand) => GovernedParamGetters;
|
|
69
78
|
* mintAndTransfer: MintAndTransfer;
|
|
70
|
-
* getShortfallReporter: () => Promise<
|
|
71
|
-
* import('../reserve/assetReserve.js').ShortfallReporter
|
|
72
|
-
* >;
|
|
79
|
+
* getShortfallReporter: () => Promise<ShortfallReporter>;
|
|
73
80
|
* }} FactoryPowersFacet
|
|
74
81
|
*
|
|
75
82
|
*
|
|
@@ -77,9 +84,7 @@ const trace = makeTracer('VD', true);
|
|
|
77
84
|
* state: State;
|
|
78
85
|
* }>} MethodContext
|
|
79
86
|
*
|
|
80
|
-
* @typedef {
|
|
81
|
-
* import('./params.js').VaultDirectorParams
|
|
82
|
-
* >} VaultDirectorParamManager
|
|
87
|
+
* @typedef {TypedParamManager<VaultDirectorParams>} VaultDirectorParamManager
|
|
83
88
|
*/
|
|
84
89
|
|
|
85
90
|
const shortfallInvitationKey = 'shortfallInvitation';
|
|
@@ -100,16 +105,16 @@ export const makeAllManagersDo = (collateralManagers, vaultManagers) => {
|
|
|
100
105
|
};
|
|
101
106
|
|
|
102
107
|
/**
|
|
103
|
-
* @param {
|
|
104
|
-
* @param {
|
|
108
|
+
* @param {Baggage} baggage
|
|
109
|
+
* @param {VaultFactoryZCF} zcf
|
|
105
110
|
* @param {VaultDirectorParamManager} directorParamManager
|
|
106
111
|
* @param {ZCFMint<'nat'>} debtMint
|
|
107
|
-
* @param {ERef<
|
|
108
|
-
* @param {ERef<
|
|
109
|
-
* @param {
|
|
110
|
-
* @param {
|
|
111
|
-
* @param {
|
|
112
|
-
* @param {
|
|
112
|
+
* @param {ERef<TimerService>} timer
|
|
113
|
+
* @param {ERef<AuctioneerPublicFacet>} auctioneer
|
|
114
|
+
* @param {ERemote<StorageNode>} storageNode
|
|
115
|
+
* @param {ERemote<EMarshaller>} marshaller
|
|
116
|
+
* @param {MakeRecorderKit} makeRecorderKit
|
|
117
|
+
* @param {MakeERecorderKit} makeERecorderKit
|
|
113
118
|
* @param {Record<string, import('./params.js').VaultManagerParamOverrides>} managerParams
|
|
114
119
|
*/
|
|
115
120
|
const prepareVaultDirector = (
|
|
@@ -125,7 +130,7 @@ const prepareVaultDirector = (
|
|
|
125
130
|
makeERecorderKit,
|
|
126
131
|
managerParams,
|
|
127
132
|
) => {
|
|
128
|
-
/** @type {
|
|
133
|
+
/** @type {ShortfallReporter} */
|
|
129
134
|
let shortfallReporter;
|
|
130
135
|
|
|
131
136
|
/** For holding newly minted tokens until transferred */
|
|
@@ -296,7 +301,7 @@ const prepareVaultDirector = (
|
|
|
296
301
|
/**
|
|
297
302
|
* "Director" of the vault factory, overseeing "vault managers".
|
|
298
303
|
*
|
|
299
|
-
* @param {
|
|
304
|
+
* @param {VaultFactoryZCF} zcf
|
|
300
305
|
* @param {VaultDirectorParamManager} directorParamManager
|
|
301
306
|
* @param {ZCFMint<'nat'>} debtMint
|
|
302
307
|
*/
|
|
@@ -401,6 +406,7 @@ const prepareVaultDirector = (
|
|
|
401
406
|
// zero-based index of the manager being made
|
|
402
407
|
const managerIndex = vaultManagers.length();
|
|
403
408
|
const managerId = `manager${managerIndex}`;
|
|
409
|
+
/** @type {Remote<StorageNode>} */
|
|
404
410
|
const managerStorageNode =
|
|
405
411
|
await E(managersNode).makeChildNode(managerId);
|
|
406
412
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {ZCF<
|
|
3
|
-
* GovernanceTerms<
|
|
3
|
+
* GovernanceTerms<VaultDirectorParams> & {
|
|
4
4
|
* priceAuthority: ERef<PriceAuthority>;
|
|
5
5
|
* reservePublicFacet: AssetReservePublicFacet;
|
|
6
|
-
* timerService:
|
|
6
|
+
* timerService: TimerService;
|
|
7
7
|
* }
|
|
8
8
|
* >} VaultFactoryZCF
|
|
9
9
|
*/
|
|
@@ -13,53 +13,12 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
13
13
|
feeMintAccess: FeeMintAccess;
|
|
14
14
|
initialPoserInvitation: Invitation;
|
|
15
15
|
initialShortfallInvitation: Invitation;
|
|
16
|
-
storageNode:
|
|
17
|
-
marshaller:
|
|
18
|
-
auctioneerInstance: Instance<
|
|
19
|
-
|
|
20
|
-
reservePublicFacet: AssetReservePublicFacet;
|
|
21
|
-
priceAuthority: PriceAuthority;
|
|
22
|
-
}>, privateArgs: {
|
|
23
|
-
initialPoserInvitation: Invitation;
|
|
24
|
-
storageNode: StorageNode;
|
|
25
|
-
marshaller: Marshaller;
|
|
26
|
-
}, baggage: Baggage) => Promise<{
|
|
27
|
-
publicFacet: globalThis.GovernedPublicFacet<{
|
|
28
|
-
getElectorate: () => import("@agoric/ertp").SetAmount<import("@endo/patterns").Key>;
|
|
29
|
-
getStartFrequency: () => RelativeTime;
|
|
30
|
-
getClockStep: () => RelativeTime;
|
|
31
|
-
getStartingRate: () => bigint;
|
|
32
|
-
getLowestRate: () => bigint;
|
|
33
|
-
getDiscountStep: () => bigint;
|
|
34
|
-
getAuctionStartDelay: () => RelativeTime;
|
|
35
|
-
getPriceLockPeriod: () => RelativeTime;
|
|
36
|
-
makeBidInvitation(collateralBrand: Brand<"nat">): Promise<Invitation<string, import("../auction/auctionBook.js").OfferSpec>>;
|
|
37
|
-
getSchedules(): {
|
|
38
|
-
liveAuctionSchedule: import("../auction/scheduler.js").Schedule | null;
|
|
39
|
-
nextAuctionSchedule: import("../auction/scheduler.js").Schedule | null;
|
|
40
|
-
};
|
|
41
|
-
getScheduleUpdates(): globalThis.Subscriber<import("../auction/scheduler.js").ScheduleNotification>;
|
|
42
|
-
getBookDataUpdates(brand: any): globalThis.Subscriber<import("../auction/auctionBook.js").BookDataNotification>;
|
|
43
|
-
getPublicTopics(brand: any): {
|
|
44
|
-
bookData: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("../auction/auctionBook.js").BookDataNotification>;
|
|
45
|
-
} | {
|
|
46
|
-
schedule: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("../auction/scheduler.js").ScheduleNotification>;
|
|
47
|
-
};
|
|
48
|
-
makeDepositInvitation: () => Promise<Invitation<string, {
|
|
49
|
-
goal: Amount<"nat">;
|
|
50
|
-
}>>;
|
|
51
|
-
}>;
|
|
52
|
-
creatorFacet: globalThis.GovernedCreatorFacet<{
|
|
53
|
-
addBrand(issuer: Issuer<"nat">, kwd: Keyword): Promise<void>;
|
|
54
|
-
getSchedule(): Promise<import("../auction/scheduler.js").FullSchedule>;
|
|
55
|
-
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
56
|
-
addBrand(issuer: Issuer<"nat">, kwd: Keyword): Promise<void>;
|
|
57
|
-
getSchedule(): Promise<import("../auction/scheduler.js").FullSchedule>;
|
|
58
|
-
}>>;
|
|
59
|
-
}>>;
|
|
60
|
-
managerParams: Record<string, import("./params.js").VaultManagerParamOverrides>;
|
|
16
|
+
storageNode: Remote<StorageNode>;
|
|
17
|
+
marshaller: Remote<Marshaller>;
|
|
18
|
+
auctioneerInstance: Instance<typeof auctioneerStart>;
|
|
19
|
+
managerParams: Record<string, VaultManagerParamOverrides>;
|
|
61
20
|
directorParamOverrides: [object];
|
|
62
|
-
}, baggage:
|
|
21
|
+
}, baggage: Baggage): Promise<{
|
|
63
22
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
64
23
|
getParamMgrRetriever: () => {
|
|
65
24
|
get: (paramPath?: VaultFactoryParamPath) => import("./vaultDirector.js").VaultDirectorParamManager | import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
@@ -233,18 +192,24 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
233
192
|
getInvitationAmount(name: string): import("@agoric/ertp").SetAmount<import("@agoric/zoe").InvitationDetails>;
|
|
234
193
|
}>;
|
|
235
194
|
}>;
|
|
236
|
-
export type VaultFactoryZCF = ZCF<GovernanceTerms<
|
|
195
|
+
export type VaultFactoryZCF = ZCF<GovernanceTerms<VaultDirectorParams> & {
|
|
237
196
|
priceAuthority: ERef<PriceAuthority>;
|
|
238
197
|
reservePublicFacet: AssetReservePublicFacet;
|
|
239
|
-
timerService:
|
|
198
|
+
timerService: TimerService;
|
|
240
199
|
}>;
|
|
241
200
|
export type VaultFactoryContract = ContractOf<typeof start>;
|
|
242
201
|
import type { ContractMeta } from '@agoric/zoe';
|
|
243
202
|
import type { FeeMintAccess } from '@agoric/zoe';
|
|
244
203
|
import type { Invitation } from '@agoric/zoe';
|
|
245
|
-
import type {
|
|
246
|
-
import type {
|
|
204
|
+
import type { Remote } from '@agoric/internal';
|
|
205
|
+
import type { start as auctioneerStart } from '../auction/auctioneer.js';
|
|
206
|
+
import type { VaultManagerParamOverrides } from './params.js';
|
|
207
|
+
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
247
208
|
import type { ZCFSeat } from '@agoric/zoe';
|
|
248
209
|
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
210
|
+
import type { VaultDirectorParams } from './params.js';
|
|
211
|
+
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
212
|
+
import type { TimerService } from '@agoric/time';
|
|
213
|
+
import type { ZCF } from '@agoric/zoe';
|
|
249
214
|
import type { ContractOf } from '@agoric/zoe/src/zoeService/utils.js';
|
|
250
215
|
//# sourceMappingURL=vaultFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaultFactory.d.ts","sourceRoot":"","sources":["vaultFactory.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vaultFactory.d.ts","sourceRoot":"","sources":["vaultFactory.js"],"names":[],"mappings":"AA8CA;;;;;;;;GAQG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAerB;AAiBK,2BAbI,eAAe,eACf;IACN,aAAa,EAAE,aAAa,CAAC;IAC7B,sBAAsB,EAAE,UAAU,CAAC;IACnC,0BAA0B,EAAE,UAAU,CAAC;IACvC,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,kBAAkB,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC;IACrD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IAC1D,sBAAsB,EAAE,CAAC,MAAM,CAAC,CAAC;CAClC,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFjB;8BA/HY,IACR,eAAe,CAAC,mBAAmB,CAAC,GAAG;IACrC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IACrC,kBAAkB,EAAE,uBAAuB,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;CAC5B,CACF;mCA4HU,WAAW,OAAO,KAAK,CAAC;kCA/IoF,aAAa;mCAAb,aAAa;gCAAb,aAAa;4BAD9G,kBAAkB;8CAMA,0BAA0B;gDACxB,aAAa;6BAChC,4BAA4B;6BAPoE,aAAa;gCAE1C,4BAA4B;yCACnF,aAAa;oCAD0C,4BAA4B;kCAE1F,cAAc;yBAJ6E,aAAa;gCAC1G,qCAAqC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
|
-
/// <reference types="@agoric/governance/exported" />
|
|
3
|
-
/// <reference types="@agoric/zoe/exported" />
|
|
2
|
+
/// <reference types="@agoric/governance/exported.js" />
|
|
3
|
+
/// <reference types="@agoric/zoe/exported.js" />
|
|
4
4
|
|
|
5
5
|
// The vaultFactory owns a number of VaultManagers and a mint for Minted.
|
|
6
6
|
//
|
|
@@ -19,6 +19,7 @@ import { CONTRACT_ELECTORATE } from '@agoric/governance';
|
|
|
19
19
|
import { makeParamManagerFromTerms } from '@agoric/governance/src/contractGovernance/typedParamManager.js';
|
|
20
20
|
import { validateElectorate } from '@agoric/governance/src/contractHelper.js';
|
|
21
21
|
import { makeTracer, StorageNodeShape } from '@agoric/internal';
|
|
22
|
+
import { wrapRemoteMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
22
23
|
import { makeStoredSubscription, makeSubscriptionKit } from '@agoric/notifier';
|
|
23
24
|
import { M } from '@agoric/store';
|
|
24
25
|
import { provideAll } from '@agoric/zoe/src/contractSupport/durability.js';
|
|
@@ -30,19 +31,25 @@ import { SHORTFALL_INVITATION_KEY, vaultDirectorParamTypes } from './params.js';
|
|
|
30
31
|
import { provideDirector } from './vaultDirector.js';
|
|
31
32
|
|
|
32
33
|
/**
|
|
34
|
+
* @import {Remote} from '@agoric/internal';
|
|
33
35
|
* @import {ContractMeta, FeeMintAccess, HandleOffer, Invitation, OfferHandler, TransferPart, ZCF, ZCFMint, ZCFSeat} from '@agoric/zoe';
|
|
34
36
|
* @import {ContractOf} from '@agoric/zoe/src/zoeService/utils.js';
|
|
35
37
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
38
|
+
* @import {VaultDirectorParams} from './params.js';
|
|
39
|
+
* @import {TimerService} from '@agoric/time';
|
|
40
|
+
* @import {start as auctioneerStart} from '../auction/auctioneer.js';
|
|
41
|
+
* @import {VaultManagerParamOverrides} from './params.js';
|
|
42
|
+
* @import {Baggage} from '@agoric/swingset-liveslots';
|
|
36
43
|
*/
|
|
37
44
|
|
|
38
45
|
const trace = makeTracer('VF', true);
|
|
39
46
|
|
|
40
47
|
/**
|
|
41
48
|
* @typedef {ZCF<
|
|
42
|
-
* GovernanceTerms<
|
|
49
|
+
* GovernanceTerms<VaultDirectorParams> & {
|
|
43
50
|
* priceAuthority: ERef<PriceAuthority>;
|
|
44
51
|
* reservePublicFacet: AssetReservePublicFacet;
|
|
45
|
-
* timerService:
|
|
52
|
+
* timerService: TimerService;
|
|
46
53
|
* }
|
|
47
54
|
* >} VaultFactoryZCF
|
|
48
55
|
*/
|
|
@@ -71,29 +78,28 @@ harden(meta);
|
|
|
71
78
|
* feeMintAccess: FeeMintAccess;
|
|
72
79
|
* initialPoserInvitation: Invitation;
|
|
73
80
|
* initialShortfallInvitation: Invitation;
|
|
74
|
-
* storageNode:
|
|
75
|
-
* marshaller:
|
|
76
|
-
* auctioneerInstance: Instance<
|
|
77
|
-
* managerParams: Record<
|
|
78
|
-
* string,
|
|
79
|
-
* import('./params.js').VaultManagerParamOverrides
|
|
80
|
-
* >;
|
|
81
|
+
* storageNode: Remote<StorageNode>;
|
|
82
|
+
* marshaller: Remote<Marshaller>;
|
|
83
|
+
* auctioneerInstance: Instance<typeof auctioneerStart>;
|
|
84
|
+
* managerParams: Record<string, VaultManagerParamOverrides>;
|
|
81
85
|
* directorParamOverrides: [object];
|
|
82
86
|
* }} privateArgs
|
|
83
|
-
* @param {
|
|
87
|
+
* @param {Baggage} baggage
|
|
84
88
|
*/
|
|
85
89
|
export const start = async (zcf, privateArgs, baggage) => {
|
|
86
90
|
trace('prepare start', privateArgs, [...baggage.keys()]);
|
|
87
91
|
const {
|
|
88
92
|
initialPoserInvitation,
|
|
89
93
|
initialShortfallInvitation,
|
|
90
|
-
marshaller,
|
|
94
|
+
marshaller: remoteMarshaller,
|
|
91
95
|
storageNode,
|
|
92
96
|
auctioneerInstance,
|
|
93
97
|
managerParams,
|
|
94
98
|
directorParamOverrides,
|
|
95
99
|
} = privateArgs;
|
|
96
100
|
|
|
101
|
+
const cachingMarshaller = wrapRemoteMarshaller(remoteMarshaller);
|
|
102
|
+
|
|
97
103
|
trace('awaiting debtMint');
|
|
98
104
|
const { debtMint } = await provideAll(baggage, {
|
|
99
105
|
debtMint: () => zcf.registerFeeMint('Minted', privateArgs.feeMintAccess),
|
|
@@ -110,7 +116,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
110
116
|
|
|
111
117
|
const { makeRecorderKit, makeERecorderKit } = prepareRecorderKitMakers(
|
|
112
118
|
baggage,
|
|
113
|
-
|
|
119
|
+
cachingMarshaller,
|
|
114
120
|
);
|
|
115
121
|
|
|
116
122
|
trace('making non-durable publishers');
|
|
@@ -120,7 +126,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
120
126
|
const governanceSubscriber = makeStoredSubscription(
|
|
121
127
|
governanceSubscriptionKit.subscription,
|
|
122
128
|
governanceNode,
|
|
123
|
-
|
|
129
|
+
cachingMarshaller,
|
|
124
130
|
);
|
|
125
131
|
/** a powerful object; can modify the invitation */
|
|
126
132
|
const vaultDirectorParamManager = await makeParamManagerFromTerms(
|
|
@@ -146,7 +152,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
146
152
|
auctioneerPublicFacet,
|
|
147
153
|
storageNode,
|
|
148
154
|
// XXX remove Recorder makers; remove once we excise deprecated kits for governance
|
|
149
|
-
|
|
155
|
+
cachingMarshaller,
|
|
150
156
|
makeRecorderKit,
|
|
151
157
|
makeERecorderKit,
|
|
152
158
|
managerParams,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function prepareVaultHolder(baggage:
|
|
1
|
+
export function prepareVaultHolder(baggage: Baggage, makeRecorderKit: MakeRecorderKit): (vault: import("@endo/exo").Guarded<{
|
|
2
2
|
getVaultSeat(): globalThis.ZCFSeat;
|
|
3
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
3
|
+
initVaultKit(seat: ZCFSeat, storageNode: Remote<StorageNode>): Promise<{
|
|
4
4
|
publicSubscribers: {
|
|
5
5
|
vault: {
|
|
6
6
|
description: string;
|
|
@@ -43,12 +43,12 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
43
43
|
getCollateralAmount(): Amount<"nat">;
|
|
44
44
|
getCurrentDebt(): Amount<"nat">;
|
|
45
45
|
getNormalizedDebt(): import("./storeUtils").NormalizedDebt;
|
|
46
|
-
}>, storageNode: globalThis.StorageNode) => import("@endo/exo").GuardedKit<{
|
|
46
|
+
}>, storageNode: Remote<globalThis.StorageNode>) => import("@endo/exo").GuardedKit<{
|
|
47
47
|
helper: {
|
|
48
48
|
/** @throws if this holder no longer owns the vault */
|
|
49
49
|
owned(): import("@endo/exo").Guarded<{
|
|
50
50
|
getVaultSeat(): globalThis.ZCFSeat;
|
|
51
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
51
|
+
initVaultKit(seat: ZCFSeat, storageNode: Remote<StorageNode>): Promise<{
|
|
52
52
|
publicSubscribers: {
|
|
53
53
|
vault: {
|
|
54
54
|
description: string;
|
|
@@ -164,7 +164,11 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
164
164
|
};
|
|
165
165
|
}>;
|
|
166
166
|
export type State = {
|
|
167
|
-
topicKit:
|
|
167
|
+
topicKit: RecorderKit<VaultNotification>;
|
|
168
168
|
vault: Vault | null;
|
|
169
169
|
};
|
|
170
|
+
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
171
|
+
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
172
|
+
import type { Remote } from '@agoric/internal';
|
|
173
|
+
import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
170
174
|
//# sourceMappingURL=vaultHolder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaultHolder.d.ts","sourceRoot":"","sources":["vaultHolder.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vaultHolder.d.ts","sourceRoot":"","sources":["vaultHolder.js"],"names":[],"mappings":"AAyCO,4CAHI,OAAO,mBACP,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;YAqElB;;;eAGG;;;;;;;;;;;;;;;;;;;QA3CH,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;oBAwCtD;;;uBAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAHH;;;mBAGG;;;;;;;;;;;;;;;;;;;QAHH;;;WAGG;;;;;;;;;;;;;;;;;;;;;GAoBV;oBAnHY;IACR,QAAQ,EAAE,YAAY,iBAAiB,CAAC,CAAC;IACzC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;6BARsB,4BAA4B;qCACpB,6CAA6C;4BAJtD,kBAAkB;iCAEb,6CAA6C"}
|
|
@@ -6,12 +6,16 @@ import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
|
|
|
6
6
|
import { UnguardedHelperI } from '@agoric/internal/src/typeGuards.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
+
* @import {Remote} from '@agoric/internal';
|
|
9
10
|
* @import {Key, Pattern} from '@endo/patterns';
|
|
11
|
+
* @import {RecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
12
|
+
* @import {Baggage} from '@agoric/swingset-liveslots';
|
|
13
|
+
* @import {MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
10
14
|
*/
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* @typedef {{
|
|
14
|
-
* topicKit:
|
|
18
|
+
* topicKit: RecorderKit<VaultNotification>;
|
|
15
19
|
* vault: Vault | null;
|
|
16
20
|
* }} State
|
|
17
21
|
*/
|
|
@@ -32,8 +36,8 @@ const PUBLIC_TOPICS = {
|
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
/**
|
|
35
|
-
* @param {
|
|
36
|
-
* @param {
|
|
39
|
+
* @param {Baggage} baggage
|
|
40
|
+
* @param {MakeRecorderKit} makeRecorderKit
|
|
37
41
|
*/
|
|
38
42
|
export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
39
43
|
const makeVaultHolderKit = prepareExoClassKit(
|
|
@@ -50,7 +54,7 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
|
50
54
|
},
|
|
51
55
|
/**
|
|
52
56
|
* @param {Vault} vault
|
|
53
|
-
* @param {StorageNode} storageNode
|
|
57
|
+
* @param {Remote<StorageNode>} storageNode
|
|
54
58
|
* @returns {State}
|
|
55
59
|
*/
|
|
56
60
|
(vault, storageNode) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function prepareVaultKit(baggage:
|
|
1
|
+
export function prepareVaultKit(baggage: Baggage, makeRecorderKit: MakeRecorderKit): (vault: Vault, storageNode: Remote<StorageNode>) => {
|
|
2
2
|
publicSubscribers: {
|
|
3
3
|
vault: {
|
|
4
4
|
description: string;
|
|
@@ -29,5 +29,8 @@ export function prepareVaultKit(baggage: import("@agoric/swingset-liveslots").Ba
|
|
|
29
29
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
30
30
|
};
|
|
31
31
|
export type VaultKit = EReturn<EReturn<typeof prepareVaultKit>>;
|
|
32
|
+
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
33
|
+
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
34
|
+
import type { Remote } from '@agoric/internal';
|
|
32
35
|
import type { EReturn } from '@endo/far';
|
|
33
36
|
//# sourceMappingURL=vaultKit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaultKit.d.ts","sourceRoot":"","sources":["vaultKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vaultKit.d.ts","sourceRoot":"","sources":["vaultKit.js"],"names":[],"mappings":"AAuBO,yCAHI,OAAO,mBACP,eAAe,WASb,KAAK,eACL,OAAO,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB/B;uBAEa,QAAQ,QAAQ,OAAO,eAAe,CAAC,CAAC;6BAzC5B,4BAA4B;qCACpB,6CAA6C;4BAHtD,kBAAkB;6BACjB,WAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
|
-
/// <reference types="@agoric/zoe/exported" />
|
|
3
|
+
/// <reference types="@agoric/zoe/exported.js" />
|
|
4
4
|
|
|
5
5
|
import { makeTracer } from '@agoric/internal';
|
|
6
6
|
import { prepareVaultHolder } from './vaultHolder.js';
|
|
@@ -8,15 +8,18 @@ import { prepareVaultHolder } from './vaultHolder.js';
|
|
|
8
8
|
const trace = makeTracer('VK', true);
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
+
* @import {Remote} from '@agoric/internal';
|
|
11
12
|
* @import {EReturn} from '@endo/far';
|
|
13
|
+
* @import {Baggage} from '@agoric/swingset-liveslots';
|
|
14
|
+
* @import {MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
12
15
|
*/
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Wrap the VaultHolder duration object in a record suitable for the result of
|
|
16
19
|
* an invitation.
|
|
17
20
|
*
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {
|
|
21
|
+
* @param {Baggage} baggage
|
|
22
|
+
* @param {MakeRecorderKit} makeRecorderKit
|
|
20
23
|
*/
|
|
21
24
|
export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
22
25
|
trace('prepareVaultKit', [...baggage.keys()]);
|
|
@@ -26,7 +29,7 @@ export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
|
26
29
|
* Create a kit of utilities for use of the vault.
|
|
27
30
|
*
|
|
28
31
|
* @param {Vault} vault
|
|
29
|
-
* @param {StorageNode} storageNode
|
|
32
|
+
* @param {Remote<StorageNode>} storageNode
|
|
30
33
|
*/
|
|
31
34
|
const makeVaultKit = (vault, storageNode) => {
|
|
32
35
|
trace('prepareVaultKit makeVaultKit');
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export function watchQuoteNotifier<T, A extends any[] = unknown[]>(notifierP: ERef<LatestTopic<T>>, watcher:
|
|
2
|
-
export function prepareVaultManagerKit(baggage:
|
|
3
|
-
zcf:
|
|
4
|
-
marshaller:
|
|
5
|
-
makeRecorderKit:
|
|
6
|
-
makeERecorderKit:
|
|
7
|
-
factoryPowers:
|
|
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
8
|
}): (externalParams: Omit<Parameters<(params: Readonly<{
|
|
9
9
|
debtMint: ZCFMint<"nat">;
|
|
10
10
|
collateralBrand: Brand<"nat">;
|
|
11
11
|
collateralUnit: Amount<"nat">;
|
|
12
12
|
descriptionScope: string;
|
|
13
13
|
startTimeStamp: Timestamp;
|
|
14
|
-
storageNode: StorageNode
|
|
14
|
+
storageNode: Remote<StorageNode>;
|
|
15
15
|
}> & {
|
|
16
|
-
metricsStorageNode: StorageNode
|
|
16
|
+
metricsStorageNode: Remote<StorageNode>;
|
|
17
17
|
}) => import("@endo/exo").GuardedKit<{
|
|
18
18
|
collateral: {
|
|
19
19
|
makeVaultInvitation(): Promise<globalThis.Invitation<{
|
|
@@ -46,7 +46,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
46
46
|
}>;
|
|
47
47
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
48
48
|
}, undefined>>;
|
|
49
|
-
getQuotes():
|
|
49
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
50
50
|
getCompoundedInterest(): Ratio;
|
|
51
51
|
getPublicTopics(): {
|
|
52
52
|
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
@@ -90,10 +90,10 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
90
90
|
collateralAmount: Amount<"nat">;
|
|
91
91
|
debtAmount: Amount<"nat">;
|
|
92
92
|
}>, totalCollateral: Amount<"nat">): {
|
|
93
|
-
plan:
|
|
93
|
+
plan: DistributionPlan;
|
|
94
94
|
vaultsInPlan: import("@endo/exo").Guarded<{
|
|
95
95
|
getVaultSeat(): globalThis.ZCFSeat;
|
|
96
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
96
|
+
initVaultKit(seat: ZCFSeat, storageNode: Remote<StorageNode>): Promise<{
|
|
97
97
|
publicSubscribers: {
|
|
98
98
|
vault: {
|
|
99
99
|
description: string;
|
|
@@ -131,7 +131,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
131
131
|
makeTransferInvitation(): Promise<Invitation<VaultKit>>;
|
|
132
132
|
getCollateralAmount(): Amount<"nat">;
|
|
133
133
|
getCurrentDebt(): Amount<"nat">;
|
|
134
|
-
getNormalizedDebt():
|
|
134
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
135
135
|
}>[];
|
|
136
136
|
};
|
|
137
137
|
/**
|
|
@@ -141,7 +141,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
141
141
|
* manually in dev and verified this function recovers as expected.
|
|
142
142
|
*
|
|
143
143
|
* @param {object} obj
|
|
144
|
-
* @param {
|
|
144
|
+
* @param {DistributionPlan} obj.plan
|
|
145
145
|
* @param {Vault[]} obj.vaultsInPlan
|
|
146
146
|
* @param {ZCFSeat} obj.liqSeat
|
|
147
147
|
* @param {Amount<'nat'>} obj.totalCollateral
|
|
@@ -149,7 +149,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
149
149
|
* @returns {void}
|
|
150
150
|
*/
|
|
151
151
|
distributeProceeds({ plan, vaultsInPlan, liqSeat, totalCollateral, totalDebt, }: {
|
|
152
|
-
plan:
|
|
152
|
+
plan: DistributionPlan;
|
|
153
153
|
vaultsInPlan: Vault[];
|
|
154
154
|
liqSeat: ZCFSeat;
|
|
155
155
|
totalCollateral: Amount<"nat">;
|
|
@@ -260,7 +260,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
260
260
|
}>;
|
|
261
261
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
262
262
|
}, undefined>>;
|
|
263
|
-
getQuotes():
|
|
263
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
264
264
|
getCompoundedInterest(): Ratio;
|
|
265
265
|
getPublicTopics(): {
|
|
266
266
|
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
@@ -303,7 +303,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
303
303
|
}>;
|
|
304
304
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
305
305
|
}, undefined>>;
|
|
306
|
-
getQuotes():
|
|
306
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
307
307
|
getCompoundedInterest(): Ratio;
|
|
308
308
|
getPublicTopics(): {
|
|
309
309
|
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
@@ -347,10 +347,10 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
347
347
|
collateralAmount: Amount<"nat">;
|
|
348
348
|
debtAmount: Amount<"nat">;
|
|
349
349
|
}>, totalCollateral: Amount<"nat">): {
|
|
350
|
-
plan:
|
|
350
|
+
plan: DistributionPlan;
|
|
351
351
|
vaultsInPlan: import("@endo/exo").Guarded<{
|
|
352
352
|
getVaultSeat(): globalThis.ZCFSeat;
|
|
353
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
353
|
+
initVaultKit(seat: ZCFSeat, storageNode: Remote<StorageNode>): Promise<{
|
|
354
354
|
publicSubscribers: {
|
|
355
355
|
vault: {
|
|
356
356
|
description: string;
|
|
@@ -388,7 +388,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
388
388
|
makeTransferInvitation(): Promise<Invitation<VaultKit>>;
|
|
389
389
|
getCollateralAmount(): Amount<"nat">;
|
|
390
390
|
getCurrentDebt(): Amount<"nat">;
|
|
391
|
-
getNormalizedDebt():
|
|
391
|
+
getNormalizedDebt(): NormalizedDebt;
|
|
392
392
|
}>[];
|
|
393
393
|
};
|
|
394
394
|
/**
|
|
@@ -398,7 +398,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
398
398
|
* manually in dev and verified this function recovers as expected.
|
|
399
399
|
*
|
|
400
400
|
* @param {object} obj
|
|
401
|
-
* @param {
|
|
401
|
+
* @param {DistributionPlan} obj.plan
|
|
402
402
|
* @param {Vault[]} obj.vaultsInPlan
|
|
403
403
|
* @param {ZCFSeat} obj.liqSeat
|
|
404
404
|
* @param {Amount<'nat'>} obj.totalCollateral
|
|
@@ -406,7 +406,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
406
406
|
* @returns {void}
|
|
407
407
|
*/
|
|
408
408
|
distributeProceeds({ plan, vaultsInPlan, liqSeat, totalCollateral, totalDebt, }: {
|
|
409
|
-
plan:
|
|
409
|
+
plan: DistributionPlan;
|
|
410
410
|
vaultsInPlan: Vault[];
|
|
411
411
|
liqSeat: ZCFSeat;
|
|
412
412
|
totalCollateral: Amount<"nat">;
|
|
@@ -517,7 +517,7 @@ export function prepareVaultManagerKit(baggage: import("@agoric/swingset-liveslo
|
|
|
517
517
|
}>;
|
|
518
518
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
519
519
|
}, undefined>>;
|
|
520
|
-
getQuotes():
|
|
520
|
+
getQuotes(): StoredNotifier<PriceQuote>;
|
|
521
521
|
getCompoundedInterest(): Ratio;
|
|
522
522
|
getPublicTopics(): {
|
|
523
523
|
asset: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<AssetState>;
|
|
@@ -629,10 +629,10 @@ export type HeldParams = Readonly<{
|
|
|
629
629
|
collateralUnit: Amount<"nat">;
|
|
630
630
|
descriptionScope: string;
|
|
631
631
|
startTimeStamp: Timestamp;
|
|
632
|
-
storageNode: StorageNode
|
|
632
|
+
storageNode: Remote<StorageNode>;
|
|
633
633
|
}>;
|
|
634
634
|
export type ImmutableState = {
|
|
635
|
-
assetTopicKit:
|
|
635
|
+
assetTopicKit: RecorderKit<AssetState>;
|
|
636
636
|
debtBrand: Brand<"nat">;
|
|
637
637
|
liquidatingVaults: SetStore<Vault>;
|
|
638
638
|
metricsTopicKit: import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<MetricsNotification>;
|
|
@@ -666,11 +666,23 @@ export type VaultManagerKit = EReturn<EReturn<typeof prepareVaultManagerKit>>;
|
|
|
666
666
|
*/
|
|
667
667
|
export type VaultManager = VaultManagerKit["self"];
|
|
668
668
|
export type CollateralManager = VaultManagerKit["collateral"];
|
|
669
|
+
import type { PromiseWatcher } from '@agoric/swingset-liveslots';
|
|
670
|
+
import type { Baggage } from '@agoric/swingset-liveslots';
|
|
671
|
+
import type { VaultFactoryZCF } from './vaultFactory.js';
|
|
672
|
+
import type { EMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
673
|
+
import type { ERemote } from '@agoric/internal';
|
|
674
|
+
import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
675
|
+
import type { MakeERecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
676
|
+
import type { FactoryPowersFacet } from './vaultDirector.js';
|
|
669
677
|
import type { ZCFMint } from '@agoric/zoe';
|
|
678
|
+
import type { Remote } from '@agoric/internal';
|
|
670
679
|
import type { NormalizedDebt } from './storeUtils.js';
|
|
671
680
|
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
681
|
+
import type { StoredNotifier } from '@agoric/notifier';
|
|
672
682
|
import type { MapStore } from '@agoric/store';
|
|
683
|
+
import type { DistributionPlan } from './proceeds.js';
|
|
673
684
|
import type { RelativeTime } from '@agoric/time';
|
|
685
|
+
import type { RecorderKit } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
674
686
|
import type { SetStore } from '@agoric/store';
|
|
675
687
|
import type { EReturn } from '@endo/far';
|
|
676
688
|
//# sourceMappingURL=vaultManager.d.ts.map
|