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.

Constructors

Properties

client: SuiClient
network: Network
packageIds?: BaseRulePackageIds

Methods

  • Parameters

    Returns void

  • Fetches the kiosk contents.

    Parameters

    Returns Promise<KioskData>

  • Fetch the extension data (if any) for a kiosk, by type

    Parameters

    • __namedParameters: {
          kioskId: string;
          type: string;
      }
      • kioskId: string
      • type: string

    Returns Promise<null | KioskExtension>

  • Get an addresses's owned kiosks.

    Parameters

    Returns Promise<OwnedKiosks>

    An Object containing all the kioskOwnerCap objects as well as the kioskIds.

  • Query all the owned transfer policies for an address. Returns TransferPolicyCap which uncludes policyId, policyCapId, type.

    Parameters

    • address: {
          address: string;
      }

      The address we're searching the owned transfer policies for.

      • address: string

    Returns Promise<undefined | TransferPolicyCap[]>

  • Query the Transfer Policy Cap for type T, owned by address

    Parameters

    • __namedParameters: {
          address: string;
          type: string;
      }
      • address: string
      • type: string

    Returns Promise<TransferPolicyCap[]>

  • A convenient helper to get the packageIds for our supported ruleset, based on kioskClient configuration.

    Parameters

    • rule:
          | "royaltyRulePackageId"
          | "kioskLockRulePackageId"
          | "personalKioskRulePackageId"
          | "floorPriceRulePackageId"

    Returns string

  • Query the Transfer Policy(ies) for type T.

    Parameters

    • type: {
          type: string;
      }

      The Type we're querying for (E.g 0xMyAddress::hero::Hero)

      • type: string

    Returns Promise<TransferPolicy[]>