@agoric/inter-protocol 0.16.2-other-dev-3eb1a1d.0 → 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 +36 -35
- package/src/auction/auctionBook.d.ts +9 -7
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/auctionBook.js +58 -32
- package/src/auction/auctionMath.d.ts +1 -1
- package/src/auction/auctionMath.d.ts.map +1 -1
- package/src/auction/auctioneer.d.ts +19 -13
- package/src/auction/auctioneer.d.ts.map +1 -1
- package/src/auction/auctioneer.js +25 -12
- package/src/auction/offerBook.d.ts +3 -2
- package/src/auction/offerBook.d.ts.map +1 -1
- package/src/auction/offerBook.js +5 -1
- package/src/auction/params.d.ts +16 -7
- package/src/auction/params.d.ts.map +1 -1
- package/src/auction/params.js +12 -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 +9 -4
- package/src/auction/scheduler.d.ts.map +1 -1
- package/src/auction/scheduler.js +14 -6
- package/src/auction/util.d.ts +2 -1
- package/src/auction/util.d.ts.map +1 -1
- package/src/auction/util.js +4 -1
- package/src/clientSupport.d.ts +29 -73
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +29 -128
- package/src/contractSupport.d.ts +2 -2
- package/src/contractSupport.d.ts.map +1 -1
- package/src/econCommitteeCharter.d.ts +15 -8
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +14 -8
- package/src/feeDistributor.d.ts +43 -49
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +7 -3
- package/src/index.js +1 -1
- package/src/interest-math.d.ts +1 -0
- package/src/interest-math.d.ts.map +1 -1
- package/src/interest-math.js +5 -1
- package/src/interest.d.ts +3 -1
- package/src/interest.d.ts.map +1 -1
- package/src/interest.js +2 -5
- package/src/price/README.md +1 -1
- package/src/price/fluxAggregatorContract.d.ts +20 -11
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +17 -9
- package/src/price/fluxAggregatorKit.d.ts +15 -9
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +15 -9
- package/src/price/priceOracleKit.d.ts +4 -2
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.js +7 -2
- package/src/price/roundsManager.d.ts +8 -6
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +5 -2
- package/src/proposals/add-auction.js +38 -4
- package/src/proposals/addAssetToVault.js +8 -4
- package/src/proposals/committee-proposal.js +10 -5
- package/src/proposals/core-proposal.js +9 -3
- package/src/proposals/deploy-price-feeds.js +35 -7
- package/src/proposals/econ-behaviors.js +33 -12
- package/src/proposals/price-feed-proposal.js +10 -3
- package/src/proposals/replace-fee-distributor.js +12 -6
- package/src/proposals/replaceElectorate.js +105 -16
- package/src/proposals/startEconCommittee.js +5 -1
- package/src/proposals/startPSM.js +7 -4
- package/src/proposals/upgrade-vaults.js +15 -5
- package/src/proposals/utils.d.ts +8 -4
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +32 -9
- package/src/proposals/withdraw-reserve-proposal.js +63 -0
- package/src/provisionPool.d.ts +34 -120
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +43 -21
- package/src/provisionPoolKit.d.ts +43 -328
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +210 -120
- package/src/psm/psm.d.ts +20 -13
- package/src/psm/psm.d.ts.map +1 -1
- package/src/psm/psm.js +18 -12
- package/src/reserve/assetReserve.d.ts +18 -6
- package/src/reserve/assetReserve.d.ts.map +1 -1
- package/src/reserve/assetReserve.js +26 -23
- package/src/reserve/assetReserveKit.d.ts +38 -6
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +117 -7
- package/src/reserve/params.d.ts +9 -3
- package/src/reserve/params.d.ts.map +1 -1
- package/src/reserve/params.js +8 -2
- package/src/vaultFactory/burn.d.ts +1 -1
- package/src/vaultFactory/burn.d.ts.map +1 -1
- package/src/vaultFactory/burn.js +1 -1
- package/src/vaultFactory/liquidation.d.ts +7 -3
- package/src/vaultFactory/liquidation.d.ts.map +1 -1
- package/src/vaultFactory/liquidation.js +14 -12
- package/src/vaultFactory/math.d.ts +1 -1
- package/src/vaultFactory/math.d.ts.map +1 -1
- package/src/vaultFactory/math.js +1 -1
- package/src/vaultFactory/orderedVaultStore.d.ts +21 -20
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -1
- package/src/vaultFactory/orderedVaultStore.js +4 -2
- package/src/vaultFactory/params.d.ts +25 -9
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +29 -11
- package/src/vaultFactory/prioritizedVaults.d.ts +70 -69
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -1
- package/src/vaultFactory/prioritizedVaults.js +5 -2
- package/src/vaultFactory/storeUtils.d.ts +2 -2
- package/src/vaultFactory/storeUtils.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.d.ts +2 -2
- package/src/vaultFactory/types-ambient.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.js +6 -2
- package/src/vaultFactory/vault.d.ts +34 -30
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +19 -15
- package/src/vaultFactory/vaultDirector.d.ts +81 -63
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +38 -24
- package/src/vaultFactory/vaultFactory.d.ts +35 -22
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +27 -17
- package/src/vaultFactory/vaultHolder.d.ts +77 -29
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +12 -4
- package/src/vaultFactory/vaultKit.d.ts +12 -8
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +12 -5
- package/src/vaultFactory/vaultManager.d.ts +102 -88
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +86 -53
- package/src/proposals/add-auction.d.ts +0 -109
- package/src/proposals/add-auction.d.ts.map +0 -1
- package/src/proposals/addAssetToVault.d.ts +0 -173
- package/src/proposals/addAssetToVault.d.ts.map +0 -1
- package/src/proposals/committee-proposal.d.ts +0 -113
- package/src/proposals/committee-proposal.d.ts.map +0 -1
- package/src/proposals/core-proposal.d.ts +0 -149
- package/src/proposals/core-proposal.d.ts.map +0 -1
- package/src/proposals/deploy-price-feeds.d.ts +0 -76
- package/src/proposals/deploy-price-feeds.d.ts.map +0 -1
- package/src/proposals/econ-behaviors.d.ts +0 -541
- package/src/proposals/econ-behaviors.d.ts.map +0 -1
- package/src/proposals/price-feed-proposal.d.ts +0 -84
- package/src/proposals/price-feed-proposal.d.ts.map +0 -1
- package/src/proposals/replace-fee-distributor.d.ts +0 -48
- package/src/proposals/replace-fee-distributor.d.ts.map +0 -1
- package/src/proposals/replace-scaledPriceAuthorities.d.ts +0 -30
- package/src/proposals/replace-scaledPriceAuthorities.d.ts.map +0 -1
- package/src/proposals/replaceElectorate.d.ts +0 -55
- package/src/proposals/replaceElectorate.d.ts.map +0 -1
- package/src/proposals/startEconCommittee.d.ts +0 -34
- package/src/proposals/startEconCommittee.d.ts.map +0 -1
- package/src/proposals/startPSM.d.ts +0 -59
- package/src/proposals/startPSM.d.ts.map +0 -1
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +0 -24
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +0 -1
- package/src/proposals/upgrade-vaults.d.ts +0 -41
- package/src/proposals/upgrade-vaults.d.ts.map +0 -1
|
@@ -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,12 +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
|
-
managerParams: Record<string,
|
|
16
|
+
storageNode: Remote<StorageNode>;
|
|
17
|
+
marshaller: Remote<Marshaller>;
|
|
18
|
+
auctioneerInstance: Instance<typeof auctioneerStart>;
|
|
19
|
+
managerParams: Record<string, VaultManagerParamOverrides>;
|
|
20
20
|
directorParamOverrides: [object];
|
|
21
|
-
}, baggage:
|
|
21
|
+
}, baggage: Baggage): Promise<{
|
|
22
22
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
23
23
|
getParamMgrRetriever: () => {
|
|
24
24
|
get: (paramPath?: VaultFactoryParamPath) => import("./vaultDirector.js").VaultDirectorParamManager | import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
@@ -29,7 +29,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
29
29
|
LiquidationPenalty: "ratio";
|
|
30
30
|
MintFee: "ratio";
|
|
31
31
|
}>;
|
|
32
|
-
} &
|
|
32
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
33
33
|
get: (paramPath?: VaultFactoryParamPath) => import("./vaultDirector.js").VaultDirectorParamManager | import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
34
34
|
DebtLimit: "amount";
|
|
35
35
|
InterestRate: "ratio";
|
|
@@ -39,7 +39,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
39
39
|
MintFee: "ratio";
|
|
40
40
|
}>;
|
|
41
41
|
}>;
|
|
42
|
-
getInvitation(name: string): Promise<Invitation
|
|
42
|
+
getInvitation(name: string): Promise<Invitation>;
|
|
43
43
|
getLimitedCreatorFacet(): import("@endo/exo").Guarded<{
|
|
44
44
|
addVaultType(collateralIssuer: Issuer<"nat">, collateralKeyword: Keyword, initialParamValues: VaultManagerParamValues): Promise<import("@endo/exo").Guarded<{
|
|
45
45
|
getGovernedParams(): import("./vaultManager.js").GovernedParamGetters;
|
|
@@ -54,7 +54,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
54
54
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
55
55
|
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
56
56
|
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
57
|
-
TransferVault(): Promise<Invitation
|
|
57
|
+
TransferVault(): Promise<Invitation</*elided*/ any>>;
|
|
58
58
|
}>;
|
|
59
59
|
vault: import("@endo/exo").Guarded<{
|
|
60
60
|
getPublicTopics(): {
|
|
@@ -66,7 +66,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
66
66
|
};
|
|
67
67
|
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
68
68
|
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
69
|
-
makeTransferInvitation(): Promise<Invitation
|
|
69
|
+
makeTransferInvitation(): Promise<Invitation</*elided*/ any>>;
|
|
70
70
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
71
71
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
72
72
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
@@ -86,7 +86,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
86
86
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
87
87
|
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
88
88
|
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
89
|
-
TransferVault(): Promise<Invitation
|
|
89
|
+
TransferVault(): Promise<Invitation</*elided*/ any>>;
|
|
90
90
|
}>;
|
|
91
91
|
vault: import("@endo/exo").Guarded<{
|
|
92
92
|
getPublicTopics(): {
|
|
@@ -98,7 +98,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
98
98
|
};
|
|
99
99
|
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
100
100
|
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
101
|
-
makeTransferInvitation(): Promise<Invitation
|
|
101
|
+
makeTransferInvitation(): Promise<Invitation</*elided*/ any>>;
|
|
102
102
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
103
103
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
104
104
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
@@ -115,21 +115,21 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
115
115
|
lockOraclePrices(): PriceQuote;
|
|
116
116
|
liquidateVaults(auctionPF: ERef<AuctioneerPublicFacet>): Promise<void>;
|
|
117
117
|
}>>;
|
|
118
|
-
makeCollectFeesInvitation(): Promise<Invitation<string
|
|
118
|
+
makeCollectFeesInvitation(): Promise<Invitation<string>>;
|
|
119
119
|
getRewardAllocation(): Allocation;
|
|
120
120
|
makeLiquidationWaker(): {
|
|
121
121
|
wake: (timestamp: any) => any;
|
|
122
|
-
} &
|
|
122
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
123
123
|
wake: (timestamp: any) => any;
|
|
124
124
|
}>;
|
|
125
125
|
makeReschedulerWaker(): {
|
|
126
126
|
wake: (timestamp: any) => any;
|
|
127
|
-
} &
|
|
127
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
128
128
|
wake: (timestamp: any) => any;
|
|
129
129
|
}>;
|
|
130
130
|
makePriceLockWaker(): {
|
|
131
131
|
wake: (timestamp: any) => any;
|
|
132
|
-
} &
|
|
132
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
133
133
|
wake: (timestamp: any) => any;
|
|
134
134
|
}>;
|
|
135
135
|
setShortfallReporter(newInvitation: any): Promise<void>;
|
|
@@ -151,7 +151,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
151
151
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
152
152
|
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
153
153
|
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
154
|
-
TransferVault(): Promise<Invitation
|
|
154
|
+
TransferVault(): Promise<Invitation</*elided*/ any>>;
|
|
155
155
|
}>;
|
|
156
156
|
vault: import("@endo/exo").Guarded<{
|
|
157
157
|
getPublicTopics(): {
|
|
@@ -163,7 +163,7 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
163
163
|
};
|
|
164
164
|
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
165
165
|
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
166
|
-
makeTransferInvitation(): Promise<Invitation
|
|
166
|
+
makeTransferInvitation(): Promise<Invitation</*elided*/ any>>;
|
|
167
167
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
168
168
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
169
169
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
@@ -188,15 +188,28 @@ export function start(zcf: VaultFactoryZCF, privateArgs: {
|
|
|
188
188
|
getGovernedParams({ collateralBrand }: {
|
|
189
189
|
collateralBrand: Brand;
|
|
190
190
|
}): globalThis.ERef<globalThis.ParamStateRecord>;
|
|
191
|
-
|
|
191
|
+
getDirectorGovernedParams(): globalThis.ERef<globalThis.ParamStateRecord>;
|
|
192
|
+
getInvitationAmount(name: string): import("@agoric/ertp").SetAmount<import("@agoric/zoe").InvitationDetails>;
|
|
192
193
|
}>;
|
|
193
194
|
}>;
|
|
194
|
-
export type VaultFactoryZCF = ZCF<GovernanceTerms<
|
|
195
|
+
export type VaultFactoryZCF = ZCF<GovernanceTerms<VaultDirectorParams> & {
|
|
195
196
|
priceAuthority: ERef<PriceAuthority>;
|
|
196
197
|
reservePublicFacet: AssetReservePublicFacet;
|
|
197
|
-
timerService:
|
|
198
|
+
timerService: TimerService;
|
|
198
199
|
}>;
|
|
199
200
|
export type VaultFactoryContract = ContractOf<typeof start>;
|
|
201
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
202
|
+
import type { FeeMintAccess } from '@agoric/zoe';
|
|
203
|
+
import type { Invitation } from '@agoric/zoe';
|
|
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';
|
|
208
|
+
import type { ZCFSeat } from '@agoric/zoe';
|
|
200
209
|
import type { PriceQuote } from '@agoric/zoe/tools/types.js';
|
|
210
|
+
import type { VaultDirectorParams } from './params.js';
|
|
201
211
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
212
|
+
import type { TimerService } from '@agoric/time';
|
|
213
|
+
import type { ZCF } from '@agoric/zoe';
|
|
214
|
+
import type { ContractOf } from '@agoric/zoe/src/zoeService/utils.js';
|
|
202
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';
|
|
@@ -29,16 +30,26 @@ import { InvitationShape } from '../auction/params.js';
|
|
|
29
30
|
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';
|
|
35
|
+
* @import {ContractMeta, FeeMintAccess, HandleOffer, Invitation, OfferHandler, TransferPart, ZCF, ZCFMint, ZCFSeat} from '@agoric/zoe';
|
|
36
|
+
* @import {ContractOf} from '@agoric/zoe/src/zoeService/utils.js';
|
|
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';
|
|
43
|
+
*/
|
|
33
44
|
|
|
34
45
|
const trace = makeTracer('VF', true);
|
|
35
46
|
|
|
36
47
|
/**
|
|
37
48
|
* @typedef {ZCF<
|
|
38
|
-
* GovernanceTerms<
|
|
49
|
+
* GovernanceTerms<VaultDirectorParams> & {
|
|
39
50
|
* priceAuthority: ERef<PriceAuthority>;
|
|
40
51
|
* reservePublicFacet: AssetReservePublicFacet;
|
|
41
|
-
* timerService:
|
|
52
|
+
* timerService: TimerService;
|
|
42
53
|
* }
|
|
43
54
|
* >} VaultFactoryZCF
|
|
44
55
|
*/
|
|
@@ -67,29 +78,28 @@ harden(meta);
|
|
|
67
78
|
* feeMintAccess: FeeMintAccess;
|
|
68
79
|
* initialPoserInvitation: Invitation;
|
|
69
80
|
* initialShortfallInvitation: Invitation;
|
|
70
|
-
* storageNode:
|
|
71
|
-
* marshaller:
|
|
72
|
-
* auctioneerInstance: Instance
|
|
73
|
-
* managerParams: Record<
|
|
74
|
-
* string,
|
|
75
|
-
* import('./params.js').VaultManagerParamOverrides
|
|
76
|
-
* >;
|
|
81
|
+
* storageNode: Remote<StorageNode>;
|
|
82
|
+
* marshaller: Remote<Marshaller>;
|
|
83
|
+
* auctioneerInstance: Instance<typeof auctioneerStart>;
|
|
84
|
+
* managerParams: Record<string, VaultManagerParamOverrides>;
|
|
77
85
|
* directorParamOverrides: [object];
|
|
78
86
|
* }} privateArgs
|
|
79
|
-
* @param {
|
|
87
|
+
* @param {Baggage} baggage
|
|
80
88
|
*/
|
|
81
89
|
export const start = async (zcf, privateArgs, baggage) => {
|
|
82
90
|
trace('prepare start', privateArgs, [...baggage.keys()]);
|
|
83
91
|
const {
|
|
84
92
|
initialPoserInvitation,
|
|
85
93
|
initialShortfallInvitation,
|
|
86
|
-
marshaller,
|
|
94
|
+
marshaller: remoteMarshaller,
|
|
87
95
|
storageNode,
|
|
88
96
|
auctioneerInstance,
|
|
89
97
|
managerParams,
|
|
90
98
|
directorParamOverrides,
|
|
91
99
|
} = privateArgs;
|
|
92
100
|
|
|
101
|
+
const cachingMarshaller = wrapRemoteMarshaller(remoteMarshaller);
|
|
102
|
+
|
|
93
103
|
trace('awaiting debtMint');
|
|
94
104
|
const { debtMint } = await provideAll(baggage, {
|
|
95
105
|
debtMint: () => zcf.registerFeeMint('Minted', privateArgs.feeMintAccess),
|
|
@@ -106,7 +116,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
106
116
|
|
|
107
117
|
const { makeRecorderKit, makeERecorderKit } = prepareRecorderKitMakers(
|
|
108
118
|
baggage,
|
|
109
|
-
|
|
119
|
+
cachingMarshaller,
|
|
110
120
|
);
|
|
111
121
|
|
|
112
122
|
trace('making non-durable publishers');
|
|
@@ -116,7 +126,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
116
126
|
const governanceSubscriber = makeStoredSubscription(
|
|
117
127
|
governanceSubscriptionKit.subscription,
|
|
118
128
|
governanceNode,
|
|
119
|
-
|
|
129
|
+
cachingMarshaller,
|
|
120
130
|
);
|
|
121
131
|
/** a powerful object; can modify the invitation */
|
|
122
132
|
const vaultDirectorParamManager = await makeParamManagerFromTerms(
|
|
@@ -142,7 +152,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
142
152
|
auctioneerPublicFacet,
|
|
143
153
|
storageNode,
|
|
144
154
|
// XXX remove Recorder makers; remove once we excise deprecated kits for governance
|
|
145
|
-
|
|
155
|
+
cachingMarshaller,
|
|
146
156
|
makeRecorderKit,
|
|
147
157
|
makeERecorderKit,
|
|
148
158
|
managerParams,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function prepareVaultHolder(baggage:
|
|
2
|
-
getVaultSeat(): ZCFSeat;
|
|
3
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
1
|
+
export function prepareVaultHolder(baggage: Baggage, makeRecorderKit: MakeRecorderKit): (vault: import("@endo/exo").Guarded<{
|
|
2
|
+
getVaultSeat(): globalThis.ZCFSeat;
|
|
3
|
+
initVaultKit(seat: ZCFSeat, storageNode: Remote<StorageNode>): Promise<{
|
|
4
4
|
publicSubscribers: {
|
|
5
5
|
vault: {
|
|
6
6
|
description: string;
|
|
@@ -9,9 +9,9 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
12
|
-
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
13
|
-
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
14
|
-
TransferVault(): Promise<Invitation
|
|
12
|
+
AdjustBalances(): Promise<globalThis.Invitation<string, undefined>>;
|
|
13
|
+
CloseVault(): Promise<globalThis.Invitation<string, undefined>>;
|
|
14
|
+
TransferVault(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
15
15
|
}>;
|
|
16
16
|
vault: import("@endo/exo").Guarded<{
|
|
17
17
|
getPublicTopics(): {
|
|
@@ -21,13 +21,13 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
21
21
|
storagePath: Promise<string>;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
25
|
-
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
24
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
25
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
26
26
|
/**
|
|
27
27
|
* Starting a transfer revokes the vault holder. The associated updater
|
|
28
28
|
* will get a special notification that the vault is being transferred.
|
|
29
29
|
*/
|
|
30
|
-
makeTransferInvitation(): Promise<Invitation
|
|
30
|
+
makeTransferInvitation(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
31
31
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
32
32
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
33
33
|
getNormalizedDebt(): import("./storeUtils").NormalizedDebt;
|
|
@@ -37,18 +37,18 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
37
37
|
liquidating(): void;
|
|
38
38
|
liquidated(): void;
|
|
39
39
|
abortLiquidation(): string;
|
|
40
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
41
|
-
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
40
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
41
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
42
42
|
makeTransferInvitation(): Promise<Invitation<VaultKit>>;
|
|
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
|
-
getVaultSeat(): ZCFSeat;
|
|
51
|
-
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
50
|
+
getVaultSeat(): globalThis.ZCFSeat;
|
|
51
|
+
initVaultKit(seat: ZCFSeat, storageNode: Remote<StorageNode>): Promise<{
|
|
52
52
|
publicSubscribers: {
|
|
53
53
|
vault: {
|
|
54
54
|
description: string;
|
|
@@ -57,9 +57,9 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
59
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
60
|
-
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
61
|
-
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
62
|
-
TransferVault(): Promise<Invitation
|
|
60
|
+
AdjustBalances(): Promise<globalThis.Invitation<string, undefined>>;
|
|
61
|
+
CloseVault(): Promise<globalThis.Invitation<string, undefined>>;
|
|
62
|
+
TransferVault(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
63
63
|
}>;
|
|
64
64
|
vault: import("@endo/exo").Guarded<{
|
|
65
65
|
getPublicTopics(): {
|
|
@@ -69,13 +69,13 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
69
69
|
storagePath: Promise<string>;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
73
|
-
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
72
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
73
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
74
74
|
/**
|
|
75
75
|
* Starting a transfer revokes the vault holder. The associated updater
|
|
76
76
|
* will get a special notification that the vault is being transferred.
|
|
77
77
|
*/
|
|
78
|
-
makeTransferInvitation(): Promise<Invitation
|
|
78
|
+
makeTransferInvitation(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
79
79
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
80
80
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
81
81
|
getNormalizedDebt(): import("./storeUtils").NormalizedDebt;
|
|
@@ -85,8 +85,8 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
85
85
|
liquidating(): void;
|
|
86
86
|
liquidated(): void;
|
|
87
87
|
abortLiquidation(): string;
|
|
88
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
89
|
-
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
88
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
89
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
90
90
|
makeTransferInvitation(): Promise<Invitation<VaultKit>>;
|
|
91
91
|
getCollateralAmount(): Amount<"nat">;
|
|
92
92
|
getCurrentDebt(): Amount<"nat">;
|
|
@@ -95,9 +95,38 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
95
95
|
getUpdater(): import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
96
96
|
};
|
|
97
97
|
invitationMakers: {
|
|
98
|
-
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
99
|
-
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
100
|
-
TransferVault(): Promise<Invitation<
|
|
98
|
+
AdjustBalances(): Promise<globalThis.Invitation<string, undefined>>;
|
|
99
|
+
CloseVault(): Promise<globalThis.Invitation<string, undefined>>;
|
|
100
|
+
TransferVault(): Promise<globalThis.Invitation<{
|
|
101
|
+
publicSubscribers: {
|
|
102
|
+
vault: {
|
|
103
|
+
description: string;
|
|
104
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
105
|
+
storagePath: Promise<string>;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
invitationMakers: import("@endo/exo").Guarded</*elided*/ any>;
|
|
109
|
+
vault: import("@endo/exo").Guarded<{
|
|
110
|
+
getPublicTopics(): {
|
|
111
|
+
vault: {
|
|
112
|
+
description: string;
|
|
113
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
114
|
+
storagePath: Promise<string>;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
118
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
119
|
+
/**
|
|
120
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
121
|
+
* will get a special notification that the vault is being transferred.
|
|
122
|
+
*/
|
|
123
|
+
makeTransferInvitation(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
124
|
+
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
125
|
+
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
126
|
+
getNormalizedDebt(): import("./storeUtils").NormalizedDebt;
|
|
127
|
+
}>;
|
|
128
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
129
|
+
}>>;
|
|
101
130
|
};
|
|
102
131
|
holder: {
|
|
103
132
|
getPublicTopics(): {
|
|
@@ -107,20 +136,39 @@ export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots")
|
|
|
107
136
|
storagePath: Promise<string>;
|
|
108
137
|
};
|
|
109
138
|
};
|
|
110
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
111
|
-
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
139
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
140
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
112
141
|
/**
|
|
113
142
|
* Starting a transfer revokes the vault holder. The associated updater
|
|
114
143
|
* will get a special notification that the vault is being transferred.
|
|
115
144
|
*/
|
|
116
|
-
makeTransferInvitation(): Promise<Invitation<
|
|
145
|
+
makeTransferInvitation(): Promise<globalThis.Invitation<{
|
|
146
|
+
publicSubscribers: {
|
|
147
|
+
vault: {
|
|
148
|
+
description: string;
|
|
149
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
150
|
+
storagePath: Promise<string>;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
154
|
+
AdjustBalances(): Promise<globalThis.Invitation<string, undefined>>;
|
|
155
|
+
CloseVault(): Promise<globalThis.Invitation<string, undefined>>;
|
|
156
|
+
TransferVault(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
157
|
+
}>;
|
|
158
|
+
vault: import("@endo/exo").Guarded</*elided*/ any>;
|
|
159
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
160
|
+
}>>;
|
|
117
161
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
118
162
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
119
163
|
getNormalizedDebt(): import("./storeUtils").NormalizedDebt;
|
|
120
164
|
};
|
|
121
165
|
}>;
|
|
122
166
|
export type State = {
|
|
123
|
-
topicKit:
|
|
167
|
+
topicKit: RecorderKit<VaultNotification>;
|
|
124
168
|
vault: Vault | null;
|
|
125
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';
|
|
126
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"}
|
|
@@ -5,9 +5,17 @@ import { M, prepareExoClassKit } from '@agoric/vat-data';
|
|
|
5
5
|
import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
|
|
6
6
|
import { UnguardedHelperI } from '@agoric/internal/src/typeGuards.js';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @import {Remote} from '@agoric/internal';
|
|
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';
|
|
14
|
+
*/
|
|
15
|
+
|
|
8
16
|
/**
|
|
9
17
|
* @typedef {{
|
|
10
|
-
* topicKit:
|
|
18
|
+
* topicKit: RecorderKit<VaultNotification>;
|
|
11
19
|
* vault: Vault | null;
|
|
12
20
|
* }} State
|
|
13
21
|
*/
|
|
@@ -28,8 +36,8 @@ const PUBLIC_TOPICS = {
|
|
|
28
36
|
};
|
|
29
37
|
|
|
30
38
|
/**
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
39
|
+
* @param {Baggage} baggage
|
|
40
|
+
* @param {MakeRecorderKit} makeRecorderKit
|
|
33
41
|
*/
|
|
34
42
|
export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
35
43
|
const makeVaultHolderKit = prepareExoClassKit(
|
|
@@ -46,7 +54,7 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
|
46
54
|
},
|
|
47
55
|
/**
|
|
48
56
|
* @param {Vault} vault
|
|
49
|
-
* @param {StorageNode} storageNode
|
|
57
|
+
* @param {Remote<StorageNode>} storageNode
|
|
50
58
|
* @returns {State}
|
|
51
59
|
*/
|
|
52
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;
|
|
@@ -7,9 +7,9 @@ export function prepareVaultKit(baggage: import("@agoric/swingset-liveslots").Ba
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
invitationMakers: import("@endo/exo").Guarded<{
|
|
10
|
-
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
11
|
-
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
12
|
-
TransferVault(): Promise<Invitation
|
|
10
|
+
AdjustBalances(): Promise<globalThis.Invitation<string, undefined>>;
|
|
11
|
+
CloseVault(): Promise<globalThis.Invitation<string, undefined>>;
|
|
12
|
+
TransferVault(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
13
13
|
}>;
|
|
14
14
|
vault: import("@endo/exo").Guarded<{
|
|
15
15
|
getPublicTopics(): {
|
|
@@ -19,14 +19,18 @@ export function prepareVaultKit(baggage: import("@agoric/swingset-liveslots").Ba
|
|
|
19
19
|
storagePath: Promise<string>;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
23
|
-
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
24
|
-
makeTransferInvitation(): Promise<Invitation
|
|
22
|
+
makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
23
|
+
makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
|
|
24
|
+
makeTransferInvitation(): Promise<globalThis.Invitation</*elided*/ any>>;
|
|
25
25
|
getCollateralAmount(): import("@agoric/ertp").NatAmount;
|
|
26
26
|
getCurrentDebt(): import("@agoric/ertp").NatAmount;
|
|
27
27
|
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
28
28
|
}>;
|
|
29
29
|
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
30
30
|
};
|
|
31
|
-
export type VaultKit =
|
|
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';
|
|
35
|
+
import type { EReturn } from '@endo/far';
|
|
32
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,18 +1,25 @@
|
|
|
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';
|
|
7
7
|
|
|
8
8
|
const trace = makeTracer('VK', true);
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import {Remote} from '@agoric/internal';
|
|
12
|
+
* @import {EReturn} from '@endo/far';
|
|
13
|
+
* @import {Baggage} from '@agoric/swingset-liveslots';
|
|
14
|
+
* @import {MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
15
|
+
*/
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
* Wrap the VaultHolder duration object in a record suitable for the result of
|
|
12
19
|
* an invitation.
|
|
13
20
|
*
|
|
14
|
-
* @param {
|
|
15
|
-
* @param {
|
|
21
|
+
* @param {Baggage} baggage
|
|
22
|
+
* @param {MakeRecorderKit} makeRecorderKit
|
|
16
23
|
*/
|
|
17
24
|
export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
18
25
|
trace('prepareVaultKit', [...baggage.keys()]);
|
|
@@ -22,7 +29,7 @@ export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
|
22
29
|
* Create a kit of utilities for use of the vault.
|
|
23
30
|
*
|
|
24
31
|
* @param {Vault} vault
|
|
25
|
-
* @param {StorageNode} storageNode
|
|
32
|
+
* @param {Remote<StorageNode>} storageNode
|
|
26
33
|
*/
|
|
27
34
|
const makeVaultKit = (vault, storageNode) => {
|
|
28
35
|
trace('prepareVaultKit makeVaultKit');
|
|
@@ -44,4 +51,4 @@ export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
|
44
51
|
return makeVaultKit;
|
|
45
52
|
};
|
|
46
53
|
|
|
47
|
-
/** @typedef {
|
|
54
|
+
/** @typedef {EReturn<EReturn<typeof prepareVaultKit>>} VaultKit */
|