import { ObjectArgument } from "./index.mjs"; import { TransactionArgument } from "@mysten/sui/transactions"; import { SuiClientTypes } from "@mysten/sui/client"; //#region src/types/kiosk.d.ts /** The Kiosk module. */ declare const KIOSK_MODULE = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk"; /** The Kiosk type. */ declare const KIOSK_TYPE = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk::Kiosk"; /** The Kiosk Owner Cap Type */ declare const KIOSK_OWNER_CAP = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk::KioskOwnerCap"; /** The Kiosk Item Type */ declare const KIOSK_ITEM = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk::Item"; /** The Kiosk Listing Type */ declare const KIOSK_LISTING = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk::Listing"; /** The Kiosk Lock Type */ declare const KIOSK_LOCK = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk::Lock"; /** The Kiosk PurchaseCap type */ declare const KIOSK_PURCHASE_CAP = "0x0000000000000000000000000000000000000000000000000000000000000002::kiosk::PurchaseCap"; /** * The Kiosk object fields (for BCS queries). */ type Kiosk = { id: string; profits: string; owner: string; itemCount: number; allowExtensions: boolean; }; /** * PurchaseCap object fields (for BCS queries). */ type PurchaseCap = { id: string; kioskId: string; itemId: string; minPrice: string; }; /** * The response type of a successful purchase flow. * Returns the item, and a `canTransfer` param. */ type PurchaseAndResolvePoliciesResponse = { item: TransactionArgument; canTransfer: boolean; }; /** * Optional parameters for `purchaseAndResolvePolicies` flow. * This gives us the chance to extend the function in further releases * without introducing more breaking changes. */ type PurchaseOptionalParams = { ownedKiosk?: ObjectArgument; ownedKioskCap?: ObjectArgument; }; /** * A dynamic field `Listing { ID, isExclusive }` attached to the Kiosk. * Holds a `u64` value - the price of the item. */ type KioskListing = { /** The ID of the Item */objectId: string; /** * Whether or not there's a `PurchaseCap` issued. `true` means that * the listing is controlled by some logic and can't be purchased directly. * * TODO: consider renaming the field for better indication. */ isExclusive: boolean; /** The ID of the listing */ listingId: string; price?: string; }; type KioskDisplay = { data: Record | null; error: string | null; }; type ObjectWithDisplay = Omit, 'display'> & { display?: KioskDisplay; }; /** * A dynamic field `Item { ID }` attached to the Kiosk. * Holds an Item `T`. The type of the item is known upfront. */ type KioskItem = { /** The ID of the Item */objectId: string; /** The type of the Item */ type: string; /** Whether the item is Locked (there must be a `Lock` Dynamic Field) */ isLocked: boolean; /** Optional listing */ listing?: KioskListing; /** The ID of the kiosk the item is placed in */ kioskId: string; /** Optional object data with display metadata */ data?: ObjectWithDisplay; }; /** The overview type returned from `getKiosk` */ type KioskExtensionOverview = { /** The ID of the extension's DF */objectId: string; /** The inner type of the Extension */ type: string; }; /** * Hold the KioskExtension data */ type KioskExtension = KioskExtensionOverview & { /** These fields are only there if we have `withExtensions` flag */isEnabled: boolean; permissions: string; storageId: string; storageSize: number; }; /** * Aggregated data from the Kiosk. */ type KioskData = { items: KioskItem[]; itemIds: string[]; listingIds: string[]; kiosk?: Kiosk; extensions: KioskExtensionOverview[]; }; type PagedKioskData = { data: KioskData; nextCursor: string | null | undefined; hasNextPage: boolean; }; type FetchKioskOptions = { /** Include the base kiosk object, which includes the profits, the owner and the base fields. */withKioskFields?: boolean; /** Include the listing prices. */ withListingPrices?: boolean; /** Include the objects for the Items in the kiosk. */ withObjects?: boolean; }; type OwnedKiosks = { kioskOwnerCaps: KioskOwnerCap[]; kioskIds: string[]; nextCursor: string | null; hasNextPage: boolean; }; type KioskOwnerCap = { isPersonal?: boolean; objectId: string; kioskId: string; digest: string; version: string; }; type PurchaseOptions = { extraArgs?: Record; }; type ItemId = { itemType: string; itemId: string; }; type ItemReference = { itemType: string; item: ObjectArgument; }; type ItemValue = { itemType: string; item: TransactionArgument; }; type Price = { price: string | bigint; }; //#endregion export { FetchKioskOptions, ItemId, ItemReference, ItemValue, KIOSK_ITEM, KIOSK_LISTING, KIOSK_LOCK, KIOSK_MODULE, KIOSK_OWNER_CAP, KIOSK_PURCHASE_CAP, KIOSK_TYPE, Kiosk, KioskData, KioskDisplay, KioskExtension, KioskExtensionOverview, KioskItem, KioskListing, KioskOwnerCap, ObjectWithDisplay, OwnedKiosks, PagedKioskData, Price, PurchaseAndResolvePoliciesResponse, PurchaseCap, PurchaseOptionalParams, PurchaseOptions }; //# sourceMappingURL=kiosk.d.mts.map