Documentation

    Class KioskTransaction

    A helper for building transactions that involve kiosk.

    Index

    Constructors

    Properties

    kioskClient: KioskClient
    transaction: Transaction

    Methods

    • A function to borrow an item from a kiosk & execute any function with it. Example: You could borrow a Fren out of a kiosk, attach an accessory (or mix), and return it.

      Parameters

      Returns void

    • Converts a kiosk to a Personal (Soulbound) Kiosk. Requires initialization by either calling ktxb.create() or ktxb.setCap().

      Parameters

      • Optionalborrow: boolean

      Returns KioskTransaction

    • Creates a kiosk and saves kiosk and kioskOwnerCap in state. Helpful if we want to chain some actions before sharing + transferring the cap to the specified address.

      Returns KioskTransaction

    • Single function way to create a kiosk, share it and transfer the cap to the specified address.

      Parameters

      • address: string

      Returns void

    • Creates a personal kiosk & shares it. The PersonalKioskCap is transferred to the signer.

      Parameters

      • Optionalborrow: boolean

        If true, the kioskOwnerCap is borrowed from the PersonalKioskCap to be used in next transactions.

      Returns KioskTransaction

    • A function that ends up the kiosk building tx & returns the kioskOwnerCap back to the PersonalKioskCap, in case we are operating on a personal kiosk. It will also share the kiosk if it's not shared, and finalize the transfer of the personal cap if it's pending.

      Returns void

    • A function to list an item in the kiosk.

      Parameters

      • __namedParameters: ItemId & { price: string | bigint }

      Returns KioskTransaction

    • A function to setup the client using an existing ownerCap, as return from the kioskClient.getOwnedKiosks function.

      Parameters

      • cap: KioskOwnerCap

        KioskOwnerCap object as returned from getOwnedKiosks SDK call.

      Returns undefined | KioskTransaction

    • Shares the kiosk.

      Returns void

    • Should be called only after create is called. It shares the kiosk & transfers the cap to the specified address.

      Parameters

      • address: string

      Returns void

    • Transfer a non-locked/non-listed item to an address.

      Parameters

      • __namedParameters: ItemId & { address: string }

      Returns KioskTransaction

    • A function to withdraw from kiosk

      Parameters

      • address: string

        Where to trasnfer the coin.

      • Optionalamount: string | number | bigint

        The amount we aim to withdraw.

      Returns KioskTransaction

    MMNEPVFCICPMFPCPTTAAATR