Use when implementing NFT marketplaces with Kiosk standard, enforcing transfer policies, managing royalties, or ensuring marketplace compatibility. Triggers on NFT commerce features, royalty enforcement, or Kiosk framework usage.
From sui-dev-agentsnpx claudepluginhub first-mover-tw/sui-dev-agents --plugin sui-dev-agentsThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Official NFT trading standard with transfer policies and royalties.
Kiosk provides:
use sui::kiosk::{Self, Kiosk, KioskOwnerCap};
public fun create_kiosk(ctx: &mut TxContext): (Kiosk, KioskOwnerCap) {
kiosk::new(ctx)
}
public fun list_nft<T: key + store>(
kiosk: &mut Kiosk,
cap: &KioskOwnerCap,
nft: T,
price: u64
) {
kiosk::place_and_list<T>(kiosk, cap, nft, price);
}
use sui::transfer_policy::{Self, TransferPolicy};
use sui::coin::Coin;
use sui::sui::SUI;
public fun purchase_nft<T: key + store>(
kiosk: &mut Kiosk,
item_id: ID,
payment: Coin<SUI>,
policy: &TransferPolicy<T>,
ctx: &mut TxContext
): T {
let (nft, request) = kiosk::purchase<T>(kiosk, item_id, payment);
// Confirm transfer policy
transfer_policy::confirm_request(policy, request);
nft
}
use sui::transfer_policy::{Self, TransferPolicy, TransferPolicyCap};
// Create policy with royalty rule
public fun create_royalty_policy<T>(
publisher: &Publisher,
royalty_bps: u64, // Basis points (e.g., 500 = 5%)
ctx: &mut TxContext
): (TransferPolicy<T>, TransferPolicyCap<T>) {
let (policy, cap) = transfer_policy::new<T>(publisher, ctx);
// Add royalty rule
royalty_rule::add<T>(
&mut policy,
&cap,
royalty_bps,
ctx
);
(policy, cap)
}
import { Transaction } from '@mysten/sui/transactions';
// List NFT for sale
async function listNFT(kioskId: string, nftId: string, price: number) {
const tx = new Transaction();
tx.moveCall({
target: '0x2::kiosk::place_and_list',
arguments: [
tx.object(kioskId),
tx.object(kioskOwnerCapId),
tx.object(nftId),
tx.pure(price)
],
typeArguments: [`${PACKAGE_ID}::nft::NFT`]
});
return await signAndExecute({ transaction: tx });
}
// Purchase NFT
async function purchaseNFT(
kioskId: string,
nftId: string,
paymentCoinId: string,
policyId: string
) {
const tx = new Transaction();
tx.moveCall({
target: '0x2::kiosk::purchase',
arguments: [
tx.object(kioskId),
tx.pure(nftId),
tx.object(paymentCoinId)
],
typeArguments: [`${PACKAGE_ID}::nft::NFT`]
});
// Confirm transfer policy
tx.moveCall({
target: '0x2::transfer_policy::confirm_request',
arguments: [
tx.object(policyId),
// ... transfer request
]
});
return await signAndExecute({ transaction: tx });
}
❌ Bypassing Kiosk transfer policies
kiosk::purchase and transfer_policy::confirm_request❌ Not checking NFT ownership before listing
kiosk::has_item before listing❌ Forgetting to delist before transfer
kiosk::delist before any transfer operation❌ Hardcoding royalty percentages
❌ Not handling zero-price listings
Query Kiosk docs:
const kioskInfo = await sui_docs_query({
type: "docs",
target: "kiosk",
query: "transfer policy and royalty implementation"
});
Standard, secure, royalty-enabled NFT trading!