export function makeOfferSpecShape(bidBrand: Brand<"nat">, collateralBrand: Brand<"nat">): import("@endo/patterns").Matcher; export function prepareAuctionBook(baggage: Baggage, zcf: ZCF, makeRecorderKit: import("@agoric/zoe/src/contractSupport/recorder.js").MakeRecorderKit): (bidBrand: globalThis.Brand<"nat">, collateralBrand: globalThis.Brand<"nat">, pAuthority: PriceAuthority, node: globalThis.StorageNode) => ReturnType<(bidBrand: globalThis.Brand<"nat">, collateralBrand: globalThis.Brand<"nat">, pAuthority: PriceAuthority, node: globalThis.StorageNode) => import("@endo/exo").GuardedKit<{ helper: { /** * remove the key from the appropriate book, indicated by whether the * price is defined. * * @param {string} key * @param {Ratio | undefined} price */ removeFromItsBook(key: string, price: Ratio | undefined): void; /** * Update the entry in the appropriate book, indicated by whether the * price is defined. * * @param {string} key * @param {Amount} collateralSold * @param {Ratio | undefined} price */ updateItsBook(key: string, collateralSold: Amount, price: Ratio | undefined): void; /** * Settle with seat. The caller is responsible for updating the book, if * any. * * @param {ZCFSeat} seat * @param {Amount<'nat'>} collateralWanted */ settle(seat: ZCFSeat, collateralWanted: Amount<"nat">): import("@agoric/ertp").NatAmount; /** * Accept an offer expressed as a price. If the auction is active, * attempt to buy collateral. If any of the offer remains add it to the * book. * * @param {ZCFSeat} seat * @param {Ratio} price * @param {Amount<'nat'>} maxBuy * @param {object} opts * @param {boolean} opts.trySettle * @param {boolean} [opts.exitAfterBuy] */ acceptPriceOffer(seat: ZCFSeat, price: Ratio, maxBuy: Amount<"nat">, { trySettle, exitAfterBuy }: { trySettle: boolean; exitAfterBuy?: boolean | undefined; }): void; /** * Accept an offer expressed as a discount (or markup). If the auction * is active, attempt to buy collateral. If any of the offer remains add * it to the book. * * @param {ZCFSeat} seat * @param {Ratio} bidScaling * @param {Amount<'nat'>} maxBuy * @param {object} opts * @param {boolean} opts.trySettle * @param {boolean} [opts.exitAfterBuy] */ acceptScaledBidOffer(seat: ZCFSeat, bidScaling: Ratio, maxBuy: Amount<"nat">, { trySettle, exitAfterBuy }: { trySettle: boolean; exitAfterBuy?: boolean | undefined; }): void; publishBookData(): Promise; ensureQuoteNotifierObserved(): void; }; self: { /** * @param {Amount<'nat'>} assetAmount * @param {ZCFSeat} sourceSeat * @param {Amount<'nat'>} [proceedsGoal] an amount that the depositor * would like to raise. The auction is requested to not sell more * collateral than required to raise that much. The auctioneer might * sell more if there is more than one supplier of collateral, and * they request inconsistent limits. */ addAssets(assetAmount: Amount<"nat">, sourceSeat: ZCFSeat, proceedsGoal?: Amount<"nat">): void; settleAtNewRate(reduction: Ratio): void; getCurrentPrice(): Ratio | null; hasOrders(): boolean; captureOraclePriceForRound(): void; setStartingRate(rate: any): void; /** * @param {OfferSpec} offerSpec * @param {ZCFSeat} seat * @param {boolean} trySettle */ addOffer(offerSpec: OfferSpec, seat: ZCFSeat, trySettle: boolean): void; getSeats(): { collateralSeat: globalThis.ZCFSeat; bidHoldingSeat: globalThis.ZCFSeat; }; exitAllSeats(): void; endAuction(): void; getDataUpdates(): globalThis.Subscriber; getPublicTopics(): { bookData: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic; }; }; }>>["self"]; export type OfferSpec = { maxBuy: Amount<"nat">; } & { exitAfterBuy?: boolean; } & ({ offerPrice: Ratio; } | { offerBidScaling: Ratio; }); export type BookDataNotification = { /** * identifies the priceAuthority and price */ startPrice: Ratio | null; /** * the price at the current auction * tier */ currentPriceLevel: Ratio | null; /** * The proceeds the sellers * were targeting to raise */ startProceedsGoal: Amount<"nat"> | null; /** * The remainder of the * proceeds the sellers were targeting to raise */ remainingProceedsGoal: Amount<"nat"> | null; /** * The proceeds raised so * far in the auction */ proceedsRaised: Amount<"nat"> | undefined; /** * How much collateral was available * for sale at the start. (If more is deposited later, it'll be added in.) */ startCollateral: Amount<"nat">; /** * The amount of collateral * remaining */ collateralAvailable: Amount<"nat"> | null; }; export type AuctionBook = EReturn>; import type { Baggage } from '@agoric/vat-data'; import type { PriceAuthority } from '@agoric/zoe/tools/types.js'; import type { EReturn } from '@endo/far'; //# sourceMappingURL=auctionBook.d.ts.map