diff --git a/packages/inter-protocol/src/vaultFactory/types-ambient.js b/packages/inter-protocol/src/vaultFactory/types-ambient.js index 477889c717f..f7a0ebc1682 100644 --- a/packages/inter-protocol/src/vaultFactory/types-ambient.js +++ b/packages/inter-protocol/src/vaultFactory/types-ambient.js @@ -13,7 +13,38 @@ * @import {Timestamp} from '@agoric/time' * @import {TimestampRecord} from '@agoric/time' * @import {RelativeTime} from '@agoric/time' + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * @typedef {import('./liquidation.js').VaultData} VaultData + * * @typedef {import('./proceeds.js').DistributionPlan} DistributionPlan */ @@ -142,6 +173,7 @@ * vaultsInPlan: Array | undefined; * }} PostAuctionParams * + * * @typedef {{ * plan: DistributionPlan | undefined; * totalCollateral: Amount<'nat'>; @@ -151,7 +183,6 @@ */ /** - * * @typedef {object} LiquidationVisibilityWriters * @property {(vaultData: VaultData) => Promise} writePreAuction * @property {(postAuctionParams: PostAuctionParams) => Promise} writePostAuction diff --git a/packages/inter-protocol/src/vaultFactory/vaultManager.js b/packages/inter-protocol/src/vaultFactory/vaultManager.js index 093540fcd6f..37ad41dcfae 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultManager.js +++ b/packages/inter-protocol/src/vaultFactory/vaultManager.js @@ -65,7 +65,6 @@ import { calculateMinimumCollateralization, minimumPrice } from './math.js'; import { makePrioritizedVaults } from './prioritizedVaults.js'; import { Phase, prepareVault } from './vault.js'; import { calculateDistributionPlan } from './proceeds.js'; -import { AuctionPFShape } from '../auction/auctioneer.js'; /** * @import {Baggage} from '@agoric/vat-data'; @@ -175,13 +174,13 @@ export const watchQuoteNotifier = async (notifierP, watcher, ...args) => { /** * @typedef {{ - * assetTopicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit, - * debtBrand: Brand<'nat'>, - * liquidatingVaults: SetStore, - * metricsTopicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit, - * poolIncrementSeat: ZCFSeat, - * retainedCollateralSeat: ZCFSeat, - * unsettledVaults: MapStore, + * assetTopicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit; + * debtBrand: Brand<'nat'>; + * liquidatingVaults: SetStore; + * metricsTopicKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit; + * poolIncrementSeat: ZCFSeat; + * retainedCollateralSeat: ZCFSeat; + * unsettledVaults: MapStore; * }} ImmutableState */ @@ -214,7 +213,7 @@ export const watchQuoteNotifier = async (notifierP, watcher, ...args) => { /** * @typedef {{ - * error: string + * error: string; * }} DistributionError * * @typedef {( @@ -222,6 +221,7 @@ export const watchQuoteNotifier = async (notifierP, watcher, ...args) => { * | { collateralAmount: Amount<'nat'>; debtAmount: Amount<'nat'> } * )[][]} PreAuctionState * + * * @typedef {(string | { phase: string })[][]} PostAuctionState * * @typedef {{ @@ -236,10 +236,15 @@ export const watchQuoteNotifier = async (notifierP, watcher, ...args) => { * startTime?: import('@agoric/time/src/types.js').TimestampRecord | null; * }} AuctionResultState * + * * @typedef {{ * preAuctionRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit; - * postAuctionRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit; - * auctionResultRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit; + * postAuctionRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit< + * PostAuctionState | DistributionError + * >; + * auctionResultRecorderKit: import('@agoric/zoe/src/contractSupport/recorder.js').RecorderKit< + * AuctionResultState | DistributionError + * >; * }} LiquidationRecorderKits */ @@ -430,7 +435,7 @@ export const prepareVaultManagerKit = ( start() { const { state, facets } = this; trace(state.collateralBrand, 'helper.start()', state.vaultCounter); - const { collateralBrand, unsettledVaults } = state; + const { collateralBrand, unsettledVaults, storageNode } = state; const ephemera = collateralEphemera(collateralBrand); ephemera.prioritizedVaults = makePrioritizedVaults(unsettledVaults); @@ -790,7 +795,6 @@ export const prepareVaultManagerKit = ( }, /** - * * @param {LiquidationVisibilityWriters} liquidationVisibilityWriters * @returns {boolean} */