Borrows an item from the kiosk. This will fail if the item is listed for sale.
Requires calling return
.
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.
Converts a kiosk to a Personal (Soulbound) Kiosk.
Requires initialization by either calling ktxb.create()
or ktxb.setCap()
.
Optional
borrow: booleanCreates 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.
Creates a personal kiosk & shares it.
The PersonalKioskCap
is transferred to the signer.
Optional
borrow: booleanIf true, the kioskOwnerCap
is borrowed from the PersonalKioskCap
to be used in next transactions.
A function to delist an item from the kiosk.
A function to list an item in the kiosk.
A function to take lock an item in the kiosk.
A function to place an item in the kiosk.
A function to place an item in the kiosk and list it for sale in one transaction.
Purchase an item from a seller's kiosk.
Returns [item, transferRequest]
Can be called like: const [item, transferRequest] = kioskTx.purchase({...})
A function to purchase and resolve a transfer policy.
If the transfer policy has the lock
rule, the item is locked in the kiosk.
Otherwise, the item is placed in the kiosk.
Returns the item back to the kiosk.
Accepts the parameters returned from the borrow
function.
A function to setup the client using an existing ownerCap
,
as return from the kioskClient.getOwnedKiosks
function.
KioskOwnerCap
object as returned from getOwnedKiosks
SDK call.
A function to take an item from the kiosk. The transaction won't succeed if the item is listed or locked.
Transfer a non-locked/non-listed item to an address.
A function to withdraw from kiosk
Where to trasnfer the coin.
Optional
amount: string | number | bigintThe amount we aim to withdraw.
A helper for building transactions that involve kiosk.