@iota/kiosk
Classes
| Class | Description |
|---|---|
| KioskClient | A Client that allows you to interact with kiosk. Offers utilities to query kiosk, craft transactions to edit your own kiosk, purchase, manage transfer policies, create new kiosks etc. If you pass packageIds, all functionality will be managed using these packages. |
| KioskTransaction | A helper for building transactions that involve kiosk. |
| TransferPolicyTransaction | - |
Type Aliases
| Type Alias | Description |
|---|---|
| KioskTransactionParams | - |
| TransferPolicyBaseParams | - |
| TransferPolicyTransactionParams | - |
| BaseRulePackageIds | The base rule package ids that can be extended |
| TransferPolicyRule | The Transfer Policy rule. |
| ObjectArgument | A valid argument for any of the Kiosk functions. |
| KioskClientOptions | The Client Options for Both KioskClient & TransferPolicyManager. |
| Kiosk | The Kiosk object fields (for BCS queries). |
| PurchaseCap | PurchaseCap object fields (for BCS queries). |
| PurchaseAndResolvePoliciesResponse | The response type of a successful purchase flow. Returns the item, and a canTransfer param. |
| PurchaseOptionalParams | Optional parameters for purchaseAndResolvePolicies flow. This gives us the chance to extend the function in further releases without introducing more breaking changes. |
| KioskListing | A dynamic field Listing { ID, isExclusive } attached to the Kiosk. Holds a u64 value - the price of the item. |
| KioskItem | A dynamic field Item { ID } attached to the Kiosk. Holds an Item T. The type of the item is known upfront. |
| KioskExtensionOverview | The overview type returned from getKiosk |
| KioskExtension | Hold the KioskExtension data |
| KioskData | Aggregated data from the Kiosk. |
| PagedKioskData | - |
| FetchKioskOptions | - |
| OwnedKiosks | - |
| KioskOwnerCap | - |
| PurchaseOptions | - |
| ItemId | - |
| ItemReference | - |
| ItemValue | - |
| Price | - |
| TransferPolicyCap | The Transfer Policy Cap in a consumable way. |
| TransferPolicy | The TransferPolicy object |
| TransferPolicyCreated | Event emitted when a TransferPolicy is created. |
| RuleResolvingParams | - |
Variables
| Variable | Description |
|---|---|
| rules | - |
| KIOSK_MODULE | The Kiosk module. |
| KIOSK_TYPE | The Kiosk type. |
| KIOSK_OWNER_CAP | The Kiosk Owner Cap Type |
| KIOSK_ITEM | The Kiosk Item Type |
| KIOSK_LISTING | The Kiosk Listing Type |
| KIOSK_LOCK | The Kiosk Lock Type |
| KIOSK_PURCHASE_CAP | The Kiosk PurchaseCap type |
| TRANSFER_POLICY_MODULE | The Transfer Policy module. |
| TRANSFER_POLICY_CREATED_EVENT | Name of the event emitted when a TransferPolicy for T is created. |
| TRANSFER_POLICY_TYPE | The Transfer Policy Type |
| TRANSFER_POLICY_CAP_TYPE | The Transfer Policy Cap Type |
| KIOSK_LOCK_RULE | The Kiosk Lock Rule |
| ROYALTY_RULE | The Royalty rule |
Functions
| Function | Description |
|---|---|
| getBaseRules | Constructs a list of rule resolvers based on the params. |
| getKioskObject | - |
| extractKioskData | - |
| attachListingsAndPrices | A helper that attaches the listing prices to kiosk listings. |
| attachObjects | A helper that attaches the listing prices to kiosk listings. |
| attachLockedItems | A Helper to attach locked state to items in Kiosk Data. |
| getAllDynamicFields | A helper to fetch all DF pages. We need that to fetch the kiosk DFs consistently, until we have RPC calls that allow filtering of Type / batch fetching of spec |
| getAllObjects | A helper to fetch all objects that works with pagination. It will fetch all objects in the array, and limit it to 50/request. Requests are sent using Promise.all. |
| getAllOwnedObjects | A helper to return all owned objects, with an optional filter. It parses all the pages and returns the data. |
| percentageToBasisPoints | Converts a number to basis points. Supports up to 2 decimal points. E.g 9.95 -> 995 |
| parseTransferPolicyCapObject | A helper to parse a transfer policy Cap into a usable object. |
| getNormalizedRuleType | - |