@agoric/inter-protocol 0.16.2-upgrade-14-dev-0169c7e.0 → 0.16.2-upgrade-16-dev-8879538.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 +41 -34
- package/scripts/build-bundles.js +5 -21
- package/src/auction/auctionBook.d.ts +84 -0
- package/src/auction/auctionBook.d.ts.map +1 -0
- package/src/auction/auctionBook.js +135 -103
- package/src/auction/auctioneer.d.ts +83 -0
- package/src/auction/auctioneer.d.ts.map +1 -0
- package/src/auction/auctioneer.js +63 -49
- package/src/auction/offerBook.d.ts +45 -0
- package/src/auction/offerBook.d.ts.map +1 -0
- package/src/auction/offerBook.js +13 -12
- package/src/auction/params.d.ts +149 -0
- package/src/auction/params.d.ts.map +1 -0
- package/src/auction/params.js +10 -9
- package/src/auction/scheduleMath.d.ts +5 -0
- package/src/auction/scheduleMath.d.ts.map +1 -0
- package/src/auction/scheduleMath.js +17 -15
- package/src/auction/scheduler.d.ts +49 -0
- package/src/auction/scheduler.d.ts.map +1 -0
- package/src/auction/scheduler.js +51 -43
- package/src/auction/sortedOffers.d.ts +8 -0
- package/src/auction/sortedOffers.d.ts.map +1 -0
- package/src/auction/sortedOffers.js +9 -7
- package/src/auction/util.d.ts +32 -0
- package/src/auction/util.d.ts.map +1 -0
- package/src/auction/util.js +6 -4
- package/src/clientSupport.d.ts +167 -0
- package/src/clientSupport.d.ts.map +1 -0
- package/src/clientSupport.js +97 -40
- package/src/collectFees.d.ts +2 -0
- package/src/collectFees.d.ts.map +1 -0
- package/src/contractSupport.d.ts +28 -0
- package/src/contractSupport.d.ts.map +1 -0
- package/src/contractSupport.js +14 -12
- package/src/econCommitteeCharter.d.ts +39 -0
- package/src/econCommitteeCharter.d.ts.map +1 -0
- package/src/econCommitteeCharter.js +21 -20
- package/src/feeDistributor.d.ts +224 -0
- package/src/feeDistributor.d.ts.map +1 -0
- package/src/feeDistributor.js +37 -33
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +1 -0
- package/src/interest-math.d.ts +3 -0
- package/src/interest-math.d.ts.map +1 -0
- package/src/interest.d.ts +28 -0
- package/src/interest.d.ts.map +1 -0
- package/src/interest.js +21 -16
- package/src/price/README.md +13 -0
- package/src/price/fluxAggregatorContract.d.ts +70 -0
- package/src/price/fluxAggregatorContract.d.ts.map +1 -0
- package/src/price/fluxAggregatorContract.js +62 -55
- package/src/price/fluxAggregatorKit.d.ts +103 -0
- package/src/price/fluxAggregatorKit.d.ts.map +1 -0
- package/src/price/fluxAggregatorKit.js +50 -37
- package/src/price/priceOracleKit.d.ts +38 -0
- package/src/price/priceOracleKit.d.ts.map +1 -0
- package/src/price/priceOracleKit.js +11 -13
- package/src/price/roundsManager.d.ts +238 -0
- package/src/price/roundsManager.d.ts.map +1 -0
- package/src/price/roundsManager.js +77 -82
- package/src/proposals/README.md +2 -3
- package/src/proposals/add-auction.d.ts +69 -0
- package/src/proposals/add-auction.d.ts.map +1 -0
- package/src/proposals/add-auction.js +181 -0
- package/src/proposals/addAssetToVault.d.ts +160 -0
- package/src/proposals/addAssetToVault.d.ts.map +1 -0
- package/src/proposals/addAssetToVault.js +172 -38
- package/src/proposals/committee-proposal.d.ts +113 -0
- package/src/proposals/committee-proposal.d.ts.map +1 -0
- package/src/proposals/committee-proposal.js +25 -31
- package/src/proposals/core-proposal.d.ts +149 -0
- package/src/proposals/core-proposal.d.ts.map +1 -0
- package/src/proposals/core-proposal.js +9 -11
- package/src/proposals/econ-behaviors.d.ts +1169 -0
- package/src/proposals/econ-behaviors.d.ts.map +1 -0
- package/src/proposals/econ-behaviors.js +66 -45
- package/src/proposals/price-feed-proposal.d.ts +84 -0
- package/src/proposals/price-feed-proposal.d.ts.map +1 -0
- package/src/proposals/price-feed-proposal.js +108 -51
- package/src/proposals/startEconCommittee.d.ts +34 -0
- package/src/proposals/startEconCommittee.d.ts.map +1 -0
- package/src/proposals/startEconCommittee.js +2 -2
- package/src/proposals/startPSM.d.ts +59 -0
- package/src/proposals/startPSM.d.ts.map +1 -0
- package/src/proposals/startPSM.js +38 -27
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +24 -0
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +1 -0
- package/src/proposals/upgrade-scaledPriceAuthorities.js +78 -0
- package/src/proposals/upgrade-vaults.d.ts +35 -0
- package/src/proposals/upgrade-vaults.d.ts.map +1 -0
- package/src/proposals/upgrade-vaults.js +202 -0
- package/src/proposals/utils.d.ts +17 -0
- package/src/proposals/utils.d.ts.map +1 -0
- package/src/proposals/utils.js +34 -7
- package/src/provisionPool.d.ts +167 -0
- package/src/provisionPool.d.ts.map +1 -0
- package/src/provisionPool.js +122 -0
- package/src/provisionPoolKit.d.ts +770 -0
- package/src/provisionPoolKit.d.ts.map +1 -0
- package/src/provisionPoolKit.js +463 -0
- package/src/psm/psm.d.ts +122 -0
- package/src/psm/psm.d.ts.map +1 -0
- package/src/psm/psm.js +73 -69
- package/src/psm/types-ambient.d.ts +2 -0
- package/src/psm/types-ambient.d.ts.map +1 -0
- package/src/psm/types-ambient.js +3 -0
- package/src/reserve/assetReserve.d.ts +47 -0
- package/src/reserve/assetReserve.d.ts.map +1 -0
- package/src/reserve/assetReserve.js +28 -19
- package/src/reserve/assetReserveKit.d.ts +74 -0
- package/src/reserve/assetReserveKit.d.ts.map +1 -0
- package/src/reserve/assetReserveKit.js +18 -24
- package/src/reserve/params.d.ts +10 -0
- package/src/reserve/params.d.ts.map +1 -0
- package/src/tokens.d.ts +3 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/tokens.js +5 -0
- package/src/vaultFactory/burn.d.ts +2 -0
- package/src/vaultFactory/burn.d.ts.map +1 -0
- package/src/vaultFactory/burn.js +1 -1
- package/src/vaultFactory/liquidation.d.ts +163 -0
- package/src/vaultFactory/liquidation.d.ts.map +1 -0
- package/src/vaultFactory/liquidation.js +36 -22
- package/src/vaultFactory/math.d.ts +11 -0
- package/src/vaultFactory/math.d.ts.map +1 -0
- package/src/vaultFactory/math.js +10 -9
- package/src/vaultFactory/orderedVaultStore.d.ts +360 -0
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
- package/src/vaultFactory/orderedVaultStore.js +8 -11
- package/src/vaultFactory/params.d.ts +145 -0
- package/src/vaultFactory/params.d.ts.map +1 -0
- package/src/vaultFactory/params.js +52 -24
- package/src/vaultFactory/prioritizedVaults.d.ts +992 -0
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
- package/src/vaultFactory/prioritizedVaults.js +4 -4
- package/src/vaultFactory/proceeds.d.ts +35 -0
- package/src/vaultFactory/proceeds.d.ts.map +1 -0
- package/src/vaultFactory/proceeds.js +26 -18
- package/src/vaultFactory/storeUtils.d.ts +25 -0
- package/src/vaultFactory/storeUtils.d.ts.map +1 -0
- package/src/vaultFactory/storeUtils.js +10 -12
- package/src/vaultFactory/types-ambient.d.ts +234 -0
- package/src/vaultFactory/types-ambient.d.ts.map +1 -0
- package/src/vaultFactory/{types.js → types-ambient.js} +42 -42
- package/src/vaultFactory/vault.d.ts +402 -0
- package/src/vaultFactory/vault.d.ts.map +1 -0
- package/src/vaultFactory/vault.js +99 -93
- package/src/vaultFactory/vaultDirector.d.ts +388 -0
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
- package/src/vaultFactory/vaultDirector.js +61 -50
- package/src/vaultFactory/vaultFactory.d.ts +277 -0
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
- package/src/vaultFactory/vaultFactory.js +49 -32
- package/src/vaultFactory/vaultHolder.d.ts +270 -0
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
- package/src/vaultFactory/vaultHolder.js +10 -14
- package/src/vaultFactory/vaultKit.d.ts +102 -0
- package/src/vaultFactory/vaultKit.d.ts.map +1 -0
- package/src/vaultFactory/vaultKit.js +5 -4
- package/src/vaultFactory/vaultManager.d.ts +819 -0
- package/src/vaultFactory/vaultManager.d.ts.map +1 -0
- package/src/vaultFactory/vaultManager.js +248 -151
- package/CHANGELOG.md +0 -1066
- package/exported.js +0 -2
- package/scripts/add-collateral-core.js +0 -113
- package/scripts/deploy-contracts.js +0 -100
- package/scripts/init-core.js +0 -200
- package/scripts/invite-committee-core.js +0 -42
- package/scripts/manual-price-feed.js +0 -117
- package/scripts/price-feed-core.js +0 -104
- package/scripts/start-local-chain.sh +0 -84
- package/src/psm/types.js +0 -3
- package/src/typeGuards.js +0 -13
- package/src/vaultFactory/type-imports.js +0 -4
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import '@agoric/zoe/exported.js';
|
|
5
|
-
import '@agoric/zoe/src/contracts/exported.js';
|
|
2
|
+
/// <reference types="@agoric/governance/exported" />
|
|
3
|
+
/// <reference types="@agoric/zoe/exported" />
|
|
6
4
|
|
|
7
5
|
// The vaultFactory owns a number of VaultManagers and a mint for Minted.
|
|
8
6
|
//
|
|
@@ -31,49 +29,63 @@ import { InvitationShape } from '../auction/params.js';
|
|
|
31
29
|
import { SHORTFALL_INVITATION_KEY, vaultDirectorParamTypes } from './params.js';
|
|
32
30
|
import { provideDirector } from './vaultDirector.js';
|
|
33
31
|
|
|
32
|
+
/** @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js'; */
|
|
33
|
+
|
|
34
34
|
const trace = makeTracer('VF', true);
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @typedef {ZCF<
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
37
|
+
* @typedef {ZCF<
|
|
38
|
+
* GovernanceTerms<import('./params').VaultDirectorParams> & {
|
|
39
|
+
* priceAuthority: ERef<PriceAuthority>;
|
|
40
|
+
* reservePublicFacet: AssetReservePublicFacet;
|
|
41
|
+
* timerService: import('@agoric/time').TimerService;
|
|
42
|
+
* }
|
|
43
|
+
* >} VaultFactoryZCF
|
|
43
44
|
*/
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
/** @type {ContractMeta} */
|
|
47
|
+
export const meta = {
|
|
48
|
+
privateArgsShape: M.splitRecord(
|
|
49
|
+
{
|
|
50
|
+
marshaller: M.remotable('Marshaller'),
|
|
51
|
+
storageNode: StorageNodeShape,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
// only necessary on first invocation, not subsequent
|
|
55
|
+
feeMintAccess: FeeMintAccessShape,
|
|
56
|
+
initialPoserInvitation: InvitationShape,
|
|
57
|
+
initialShortfallInvitation: InvitationShape,
|
|
58
|
+
},
|
|
59
|
+
),
|
|
60
|
+
upgradability: 'canUpgrade',
|
|
61
|
+
};
|
|
62
|
+
harden(meta);
|
|
58
63
|
|
|
59
64
|
/**
|
|
60
65
|
* @param {VaultFactoryZCF} zcf
|
|
61
66
|
* @param {{
|
|
62
|
-
* feeMintAccess: FeeMintAccess
|
|
63
|
-
* initialPoserInvitation: Invitation
|
|
64
|
-
* initialShortfallInvitation: Invitation
|
|
65
|
-
* storageNode: ERef<StorageNode
|
|
66
|
-
* marshaller: ERef<Marshaller
|
|
67
|
+
* feeMintAccess: FeeMintAccess;
|
|
68
|
+
* initialPoserInvitation: Invitation;
|
|
69
|
+
* initialShortfallInvitation: Invitation;
|
|
70
|
+
* storageNode: ERef<StorageNode>;
|
|
71
|
+
* marshaller: ERef<Marshaller>;
|
|
72
|
+
* auctioneerInstance: Instance;
|
|
73
|
+
* managerParams: Record<
|
|
74
|
+
* string,
|
|
75
|
+
* import('./params.js').VaultManagerParamOverrides
|
|
76
|
+
* >;
|
|
67
77
|
* }} privateArgs
|
|
68
|
-
* @param {import('@agoric/
|
|
78
|
+
* @param {import('@agoric/swingset-liveslots').Baggage} baggage
|
|
69
79
|
*/
|
|
70
|
-
export const
|
|
80
|
+
export const start = async (zcf, privateArgs, baggage) => {
|
|
71
81
|
trace('prepare start', privateArgs, [...baggage.keys()]);
|
|
72
82
|
const {
|
|
73
83
|
initialPoserInvitation,
|
|
74
84
|
initialShortfallInvitation,
|
|
75
85
|
marshaller,
|
|
76
86
|
storageNode,
|
|
87
|
+
auctioneerInstance,
|
|
88
|
+
managerParams,
|
|
77
89
|
} = privateArgs;
|
|
78
90
|
|
|
79
91
|
trace('awaiting debtMint');
|
|
@@ -85,7 +97,10 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
85
97
|
mintedIssuerRecord: debtMint.getIssuerRecord(),
|
|
86
98
|
}));
|
|
87
99
|
|
|
88
|
-
const { timerService
|
|
100
|
+
const { timerService } = zcf.getTerms();
|
|
101
|
+
|
|
102
|
+
const zoe = zcf.getZoeService();
|
|
103
|
+
const auctioneerPublicFacet = E(zoe).getPublicFacet(auctioneerInstance);
|
|
89
104
|
|
|
90
105
|
const { makeRecorderKit, makeERecorderKit } = prepareRecorderKitMakers(
|
|
91
106
|
baggage,
|
|
@@ -128,6 +143,7 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
128
143
|
marshaller,
|
|
129
144
|
makeRecorderKit,
|
|
130
145
|
makeERecorderKit,
|
|
146
|
+
managerParams,
|
|
131
147
|
);
|
|
132
148
|
|
|
133
149
|
// cannot await because it would make remote calls during vat restart
|
|
@@ -145,5 +161,6 @@ export const prepare = async (zcf, privateArgs, baggage) => {
|
|
|
145
161
|
publicFacet: director.public,
|
|
146
162
|
});
|
|
147
163
|
};
|
|
164
|
+
harden(start);
|
|
148
165
|
|
|
149
|
-
/** @typedef {ContractOf<typeof
|
|
166
|
+
/** @typedef {ContractOf<typeof start>} VaultFactoryContract */
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
export function prepareVaultHolder(baggage: import("@agoric/swingset-liveslots").Baggage, makeRecorderKit: import("@agoric/zoe/src/contractSupport/recorder.js").MakeRecorderKit): (vault: import("@endo/exo").Guarded<{
|
|
2
|
+
getVaultSeat(): ZCFSeat;
|
|
3
|
+
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
4
|
+
publicSubscribers: {
|
|
5
|
+
vault: {
|
|
6
|
+
description: string;
|
|
7
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
8
|
+
storagePath: Promise<string>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
12
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
13
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
14
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
15
|
+
}>;
|
|
16
|
+
vault: import("@endo/exo").Guarded<{
|
|
17
|
+
getPublicTopics(): {
|
|
18
|
+
vault: {
|
|
19
|
+
description: string;
|
|
20
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
21
|
+
storagePath: Promise<string>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
25
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
26
|
+
/**
|
|
27
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
28
|
+
* will get a special notification that the vault is being transferred.
|
|
29
|
+
*/
|
|
30
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
31
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
32
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
33
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
34
|
+
}>;
|
|
35
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
36
|
+
}>;
|
|
37
|
+
liquidating(): void;
|
|
38
|
+
liquidated(): void;
|
|
39
|
+
abortLiquidation(): string;
|
|
40
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
41
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
42
|
+
makeTransferInvitation(): Promise<Invitation<{
|
|
43
|
+
publicSubscribers: {
|
|
44
|
+
vault: {
|
|
45
|
+
description: string;
|
|
46
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
47
|
+
storagePath: Promise<string>;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
51
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
52
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
53
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
54
|
+
}>;
|
|
55
|
+
vault: import("@endo/exo").Guarded<{
|
|
56
|
+
getPublicTopics(): {
|
|
57
|
+
vault: {
|
|
58
|
+
description: string;
|
|
59
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
60
|
+
storagePath: Promise<string>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
64
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
65
|
+
/**
|
|
66
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
67
|
+
* will get a special notification that the vault is being transferred.
|
|
68
|
+
*/
|
|
69
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
70
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
71
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
72
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
73
|
+
}>;
|
|
74
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
75
|
+
}, undefined>>;
|
|
76
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
77
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
78
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
79
|
+
}>, storageNode: globalThis.StorageNode) => import("@endo/exo").GuardedKit<{
|
|
80
|
+
helper: {
|
|
81
|
+
/** @throws if this holder no longer owns the vault */
|
|
82
|
+
owned(): import("@endo/exo").Guarded<{
|
|
83
|
+
getVaultSeat(): ZCFSeat;
|
|
84
|
+
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
85
|
+
publicSubscribers: {
|
|
86
|
+
vault: {
|
|
87
|
+
description: string;
|
|
88
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
89
|
+
storagePath: Promise<string>;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
93
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
94
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
95
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
96
|
+
}>;
|
|
97
|
+
vault: import("@endo/exo").Guarded<{
|
|
98
|
+
getPublicTopics(): {
|
|
99
|
+
vault: {
|
|
100
|
+
description: string;
|
|
101
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
102
|
+
storagePath: Promise<string>;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
106
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
107
|
+
/**
|
|
108
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
109
|
+
* will get a special notification that the vault is being transferred.
|
|
110
|
+
*/
|
|
111
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
112
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
113
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
114
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
115
|
+
}>;
|
|
116
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
117
|
+
}>;
|
|
118
|
+
liquidating(): void;
|
|
119
|
+
liquidated(): void;
|
|
120
|
+
abortLiquidation(): string;
|
|
121
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
122
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
123
|
+
makeTransferInvitation(): Promise<Invitation<{
|
|
124
|
+
publicSubscribers: {
|
|
125
|
+
vault: {
|
|
126
|
+
description: string;
|
|
127
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
128
|
+
storagePath: Promise<string>;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
132
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
133
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
134
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
135
|
+
}>;
|
|
136
|
+
vault: import("@endo/exo").Guarded<{
|
|
137
|
+
getPublicTopics(): {
|
|
138
|
+
vault: {
|
|
139
|
+
description: string;
|
|
140
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
141
|
+
storagePath: Promise<string>;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
145
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
146
|
+
/**
|
|
147
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
148
|
+
* will get a special notification that the vault is being transferred.
|
|
149
|
+
*/
|
|
150
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
151
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
152
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
153
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
154
|
+
}>;
|
|
155
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
156
|
+
}, undefined>>;
|
|
157
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
158
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
159
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
160
|
+
}>;
|
|
161
|
+
getUpdater(): import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
162
|
+
};
|
|
163
|
+
invitationMakers: {
|
|
164
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
165
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
166
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
167
|
+
};
|
|
168
|
+
holder: {
|
|
169
|
+
getPublicTopics(): {
|
|
170
|
+
vault: {
|
|
171
|
+
description: string;
|
|
172
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
173
|
+
storagePath: Promise<string>;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
177
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
178
|
+
/**
|
|
179
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
180
|
+
* will get a special notification that the vault is being transferred.
|
|
181
|
+
*/
|
|
182
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
183
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
184
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
185
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
186
|
+
};
|
|
187
|
+
}>;
|
|
188
|
+
export type State = {
|
|
189
|
+
topicKit: import("@agoric/zoe/src/contractSupport/recorder.js").RecorderKit<VaultNotification>;
|
|
190
|
+
vault: import("@endo/exo").Guarded<{
|
|
191
|
+
getVaultSeat(): ZCFSeat;
|
|
192
|
+
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
193
|
+
publicSubscribers: {
|
|
194
|
+
vault: {
|
|
195
|
+
description: string;
|
|
196
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
197
|
+
storagePath: Promise<string>;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
201
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
202
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
203
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
204
|
+
}>;
|
|
205
|
+
vault: import("@endo/exo").Guarded<{
|
|
206
|
+
getPublicTopics(): {
|
|
207
|
+
vault: {
|
|
208
|
+
description: string;
|
|
209
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
210
|
+
storagePath: Promise<string>;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
214
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
215
|
+
/**
|
|
216
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
217
|
+
* will get a special notification that the vault is being transferred.
|
|
218
|
+
*/
|
|
219
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
220
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
221
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
222
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
223
|
+
}>;
|
|
224
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
225
|
+
}>;
|
|
226
|
+
liquidating(): void;
|
|
227
|
+
liquidated(): void;
|
|
228
|
+
abortLiquidation(): string;
|
|
229
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
230
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
231
|
+
makeTransferInvitation(): Promise<Invitation<{
|
|
232
|
+
publicSubscribers: {
|
|
233
|
+
vault: {
|
|
234
|
+
description: string;
|
|
235
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
236
|
+
storagePath: Promise<string>;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
240
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
241
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
242
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
243
|
+
}>;
|
|
244
|
+
vault: import("@endo/exo").Guarded<{
|
|
245
|
+
getPublicTopics(): {
|
|
246
|
+
vault: {
|
|
247
|
+
description: string;
|
|
248
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
249
|
+
storagePath: Promise<string>;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
253
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
254
|
+
/**
|
|
255
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
256
|
+
* will get a special notification that the vault is being transferred.
|
|
257
|
+
*/
|
|
258
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
259
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
260
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
261
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
262
|
+
}>;
|
|
263
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
264
|
+
}, undefined>>;
|
|
265
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
266
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
267
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
268
|
+
}> | null;
|
|
269
|
+
};
|
|
270
|
+
//# sourceMappingURL=vaultHolder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaultHolder.d.ts","sourceRoot":"","sources":["vaultHolder.js"],"names":[],"mappings":"AAkCO,4CAHI,OAAO,4BAA4B,EAAE,OAAO,mBAC5C,OAAO,6CAA6C,EAAE,eAAe;;uBA6F88f,OAAO,eAA0B,WAAW;;;;;;;;;;;;;;;;;;;;;;;YAxBlkgB;;;eAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAHH;;;eAGG;;;;;;;;;;;;;QA3CH,sDAAsD;;;+BAgEg+f,OAAO,eAA0B,WAAW;;;;;;;;;;;;;;;;;;;;;;;oBAxBlkgB;;;uBAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAHH;;;uBAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAHH;;;WAGG;;;;;;GAoBV;;;;;2BAC6hgB,OAAO,eAA0B,WAAW;;;;;;;;;;;;;;;;;;;;;;;gBAxBlkgB;;;mBAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAHH;;;mBAGG"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Use-object for the owner of a vault
|
|
3
|
-
*/
|
|
1
|
+
/** @file Use-object for the owner of a vault */
|
|
4
2
|
import { AmountShape } from '@agoric/ertp';
|
|
5
3
|
import { M, prepareExoClassKit } from '@agoric/vat-data';
|
|
6
4
|
import { TopicsRecordShape } from '@agoric/zoe/src/contractSupport/index.js';
|
|
7
|
-
import { UnguardedHelperI } from '
|
|
5
|
+
import { UnguardedHelperI } from '@agoric/internal/src/typeGuards.js';
|
|
8
6
|
|
|
9
7
|
const { Fail } = assert;
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
* @typedef {{
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* topicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit<VaultNotification>;
|
|
12
|
+
* vault: Vault | null;
|
|
15
13
|
* }} State
|
|
16
14
|
*/
|
|
17
15
|
|
|
@@ -25,13 +23,13 @@ const HolderI = M.interface('holder', {
|
|
|
25
23
|
makeTransferInvitation: M.call().returns(M.promise()),
|
|
26
24
|
});
|
|
27
25
|
|
|
28
|
-
/** @type {{ [name: string]: [
|
|
26
|
+
/** @type {{ [name: string]: [description: string, valueShape: Pattern] }} */
|
|
29
27
|
const PUBLIC_TOPICS = {
|
|
30
28
|
vault: ['Vault holder status', M.any()],
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
/**
|
|
34
|
-
* @param {import('@agoric/
|
|
32
|
+
* @param {import('@agoric/swingset-liveslots').Baggage} baggage
|
|
35
33
|
* @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit} makeRecorderKit
|
|
36
34
|
*/
|
|
37
35
|
export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
@@ -48,22 +46,20 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
|
48
46
|
}),
|
|
49
47
|
},
|
|
50
48
|
/**
|
|
51
|
-
*
|
|
52
49
|
* @param {Vault} vault
|
|
53
50
|
* @param {StorageNode} storageNode
|
|
54
51
|
* @returns {State}
|
|
55
52
|
*/
|
|
56
53
|
(vault, storageNode) => {
|
|
57
54
|
// must be the fully synchronous maker because the kit is held in durable state
|
|
55
|
+
// @ts-expect-error XXX Patterns
|
|
58
56
|
const topicKit = makeRecorderKit(storageNode, PUBLIC_TOPICS.vault[1]);
|
|
59
57
|
|
|
60
58
|
return { topicKit, vault };
|
|
61
59
|
},
|
|
62
60
|
{
|
|
63
61
|
helper: {
|
|
64
|
-
/**
|
|
65
|
-
* @throws if this holder no longer owns the vault
|
|
66
|
-
*/
|
|
62
|
+
/** @throws if this holder no longer owns the vault */
|
|
67
63
|
owned() {
|
|
68
64
|
const { vault } = this.state;
|
|
69
65
|
if (!vault) {
|
|
@@ -104,8 +100,8 @@ export const prepareVaultHolder = (baggage, makeRecorderKit) => {
|
|
|
104
100
|
return this.facets.helper.owned().makeCloseInvitation();
|
|
105
101
|
},
|
|
106
102
|
/**
|
|
107
|
-
* Starting a transfer revokes the vault holder. The associated updater
|
|
108
|
-
* get a special notification that the vault is being transferred.
|
|
103
|
+
* Starting a transfer revokes the vault holder. The associated updater
|
|
104
|
+
* will get a special notification that the vault is being transferred.
|
|
109
105
|
*/
|
|
110
106
|
makeTransferInvitation() {
|
|
111
107
|
const vault = this.facets.helper.owned();
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export function prepareVaultKit(baggage: import("@agoric/swingset-liveslots").Baggage, makeRecorderKit: import("@agoric/zoe/src/contractSupport/recorder.js").MakeRecorderKit): (vault: import("@endo/exo").Guarded<{
|
|
2
|
+
getVaultSeat(): ZCFSeat;
|
|
3
|
+
initVaultKit(seat: ZCFSeat, storageNode: StorageNode): Promise<{
|
|
4
|
+
publicSubscribers: {
|
|
5
|
+
vault: {
|
|
6
|
+
description: string;
|
|
7
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
8
|
+
storagePath: Promise<string>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
12
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
13
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
14
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
15
|
+
}>;
|
|
16
|
+
vault: import("@endo/exo").Guarded<{
|
|
17
|
+
getPublicTopics(): {
|
|
18
|
+
vault: {
|
|
19
|
+
description: string;
|
|
20
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
21
|
+
storagePath: Promise<string>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
25
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
26
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
27
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
28
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
29
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
30
|
+
}>;
|
|
31
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
32
|
+
}>;
|
|
33
|
+
liquidating(): void;
|
|
34
|
+
liquidated(): void;
|
|
35
|
+
abortLiquidation(): string;
|
|
36
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
37
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
38
|
+
makeTransferInvitation(): Promise<Invitation<{
|
|
39
|
+
publicSubscribers: {
|
|
40
|
+
vault: {
|
|
41
|
+
description: string;
|
|
42
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
43
|
+
storagePath: Promise<string>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
47
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
48
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
49
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
50
|
+
}>;
|
|
51
|
+
vault: import("@endo/exo").Guarded<{
|
|
52
|
+
getPublicTopics(): {
|
|
53
|
+
vault: {
|
|
54
|
+
description: string;
|
|
55
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
56
|
+
storagePath: Promise<string>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
60
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
61
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
62
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
63
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
64
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
65
|
+
}>;
|
|
66
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
67
|
+
}, undefined>>;
|
|
68
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
69
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
70
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
71
|
+
}>, storageNode: StorageNode) => {
|
|
72
|
+
publicSubscribers: {
|
|
73
|
+
vault: {
|
|
74
|
+
description: string;
|
|
75
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
76
|
+
storagePath: Promise<string>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
invitationMakers: import("@endo/exo").Guarded<{
|
|
80
|
+
AdjustBalances(): Promise<Invitation<string, undefined>>;
|
|
81
|
+
CloseVault(): Promise<Invitation<string, undefined>>;
|
|
82
|
+
TransferVault(): Promise<Invitation<any, undefined>>;
|
|
83
|
+
}>;
|
|
84
|
+
vault: import("@endo/exo").Guarded<{
|
|
85
|
+
getPublicTopics(): {
|
|
86
|
+
vault: {
|
|
87
|
+
description: string;
|
|
88
|
+
subscriber: globalThis.Subscriber<VaultNotification>;
|
|
89
|
+
storagePath: Promise<string>;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
makeAdjustBalancesInvitation(): Promise<Invitation<string, undefined>>;
|
|
93
|
+
makeCloseInvitation(): Promise<Invitation<string, undefined>>;
|
|
94
|
+
makeTransferInvitation(): Promise<Invitation<any, undefined>>;
|
|
95
|
+
getCollateralAmount(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
96
|
+
getCurrentDebt(): import("@agoric/ertp/src/types.js").NatAmount;
|
|
97
|
+
getNormalizedDebt(): import("./storeUtils.js").NormalizedDebt;
|
|
98
|
+
}>;
|
|
99
|
+
vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
|
|
100
|
+
};
|
|
101
|
+
export type VaultKit = ReturnType<ReturnType<typeof prepareVaultKit>>;
|
|
102
|
+
//# sourceMappingURL=vaultKit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaultKit.d.ts","sourceRoot":"","sources":["vaultKit.js"],"names":[],"mappings":"AAgBO,yCAHI,OAAO,4BAA4B,EAAE,OAAO,mBAC5C,OAAO,6CAA6C,EAAE,eAAe;;uBAiC4nlB,OAAO,eAA0B,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAvB3ulB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBvB;uBAEa,UAAU,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/// <reference types="@agoric/zoe/exported" />
|
|
4
4
|
|
|
5
5
|
import { makeTracer } from '@agoric/internal';
|
|
6
6
|
import { prepareVaultHolder } from './vaultHolder.js';
|
|
@@ -8,9 +8,10 @@ import { prepareVaultHolder } from './vaultHolder.js';
|
|
|
8
8
|
const trace = makeTracer('VK', true);
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Wrap the VaultHolder duration object in a record suitable for the result of
|
|
11
|
+
* Wrap the VaultHolder duration object in a record suitable for the result of
|
|
12
|
+
* an invitation.
|
|
12
13
|
*
|
|
13
|
-
* @param {import('@agoric/
|
|
14
|
+
* @param {import('@agoric/swingset-liveslots').Baggage} baggage
|
|
14
15
|
* @param {import('@agoric/zoe/src/contractSupport/recorder.js').MakeRecorderKit} makeRecorderKit
|
|
15
16
|
*/
|
|
16
17
|
export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
@@ -43,4 +44,4 @@ export const prepareVaultKit = (baggage, makeRecorderKit) => {
|
|
|
43
44
|
return makeVaultKit;
|
|
44
45
|
};
|
|
45
46
|
|
|
46
|
-
/** @typedef {
|
|
47
|
+
/** @typedef {ReturnType<ReturnType<typeof prepareVaultKit>>} VaultKit */
|