UNPKG

@agoric/zoe

Version:

Zoe: the Smart Contract Framework for Offer Enforcement

80 lines 2.77 kB
type SellItemsPublicFacet = { getItemsIssuer: () => Issuer; getAvailableItems: () => Amount; }; type SellItemsCreatorOnly = { makeBuyerInvitation: () => Promise<import("../types-index").Invitation>; }; type SellItemsCreatorFacet = SellItemsPublicFacet & SellItemsCreatorOnly; type SellItemsParameters = { customValueProperties: Record<string, any>; count: number; moneyIssuer: Issuer; sellItemsInstallation: Installation; pricePerItem: Amount; }; type SellItemsResult = { sellItemsCreatorSeat: UserSeat; sellItemsCreatorFacet: SellItemsCreatorFacet; sellItemsInstance: Instance; sellItemsPublicFacet: SellItemsPublicFacet; }; type MintAndSellNFTCreatorFacet = { sellTokens: (sellParams: SellItemsParameters) => Promise<SellItemsResult>; getIssuer: () => Issuer; }; type AutomaticRefundPublicFacet = { getOffersCount: () => bigint; makeInvitation: () => Promise<import("../types-index").Invitation>; }; type AutoswapPublicFacet = { /** * synonym for * makeSwapInInvitation */ makeSwapInvitation: () => Promise<import("../types-index").Invitation>; /** * make an invitation * that allows one to do a swap in which the In amount is specified and the Out * amount is calculated */ makeSwapInInvitation: () => Promise<import("../types-index").Invitation>; /** * make an invitation * that allows one to do a swap in which the Out amount is specified and the In * amount is calculated */ makeSwapOutInvitation: () => Promise<import("../types-index").Invitation>; /** * make an * invitation that allows one to add liquidity to the pool. */ makeAddLiquidityInvitation: () => Promise<import("../types-index").Invitation>; /** * make an * invitation that allows one to remove liquidity from the pool. */ makeRemoveLiquidityInvitation: () => Promise<import("../types-index").Invitation>; getLiquidityIssuer: () => Issuer; /** * get the current value of * liquidity held by investors. */ getLiquiditySupply: () => bigint; /** * calculate the amount of brandOut that will be returned if the amountIn is * offered using makeSwapInInvitation at the current price. */ getInputPrice: (amountIn: Amount, brandOut: Brand) => Amount; /** * calculate the amount of brandIn that is required in order to get amountOut * using makeSwapOutInvitation at the current price */ getOutputPrice: (amountOut: Amount, brandIn: Brand) => Amount; /** * get an * AmountKeywordRecord showing the current balances in the pool. */ getPoolAllocation: () => Record<string, Amount>; }; //# sourceMappingURL=types-ambient.d.ts.map