import type { PaginatedObjectsResponse, IotaObjectData, IotaObjectDataOptions } from '@iota/iota-sdk/client'; import type { TransactionArgument } from '@iota/iota-sdk/transactions'; import type { ObjectArgument } from './index.js'; /** The Kiosk module. */ export declare const KIOSK_MODULE = "0x2::kiosk"; /** The Kiosk type. */ export declare const KIOSK_TYPE = "0x2::kiosk::Kiosk"; /** The Kiosk Owner Cap Type */ export declare const KIOSK_OWNER_CAP = "0x2::kiosk::KioskOwnerCap"; /** The Kiosk Item Type */ export declare const KIOSK_ITEM = "0x2::kiosk::Item"; /** The Kiosk Listing Type */ export declare const KIOSK_LISTING = "0x2::kiosk::Listing"; /** The Kiosk Lock Type */ export declare const KIOSK_LOCK = "0x2::kiosk::Lock"; /** The Kiosk PurchaseCap type */ export declare const KIOSK_PURCHASE_CAP = "0x2::kiosk::PurchaseCap"; /** * The Kiosk object fields (for BCS queries). */ export type Kiosk = { id: string; profits: string; owner: string; itemCount: number; }; /** * PurchaseCap object fields (for BCS queries). */ export 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. */ export 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. */ export 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. */ export 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; }; /** * A dynamic field `Item { ID }` attached to the Kiosk. * Holds an Item `T`. The type of the item is known upfront. */ export 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 Kiosk Data */ data?: IotaObjectData; }; /** The overview type returned from `getKiosk` */ export type KioskExtensionOverview = { /** The ID of the extension's DF */ objectId: string; /** The inner type of the Extension */ type: string; }; /** * Hold the KioskExtension data */ export 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. */ export type KioskData = { items: KioskItem[]; itemIds: string[]; listingIds: string[]; kiosk?: Kiosk; extensions: KioskExtensionOverview[]; }; export type PagedKioskData = { data: KioskData; nextCursor: string | null | undefined; hasNextPage: boolean; }; export 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. Defaults to `display` only. */ withObjects?: boolean; /** Pass the data options for the objects, when fetching, in case you want to query other details. */ objectOptions?: IotaObjectDataOptions; }; export type OwnedKiosks = { kioskOwnerCaps: KioskOwnerCap[]; kioskIds: string[]; } & Omit; export type KioskOwnerCap = { isPersonal?: boolean; objectId: string; kioskId: string; digest: string; version: string; }; export type PurchaseOptions = { extraArgs?: Record; }; export type ItemId = { itemType: string; itemId: string; }; export type ItemReference = { itemType: string; item: ObjectArgument; }; export type ItemValue = { itemType: string; item: TransactionArgument; }; export type Price = { price: string | bigint; };