Prize Boxes
The PrizeBoxSDK and PrizeBoxFactorySDK manage prize boxes — escrow accounts that make it easy to bundle and sell groups of assets in a single transaction.
Concepts
Section titled “Concepts”Prize Boxes
Section titled “Prize Boxes”A prize box is an escrow account loaded with multiple NFTs or assets. Buyers pay a set price and receive the entire bundle. This simplifies selling asset collections, starter packs, or curated bundles without requiring individual listings for each item.
Initialization
Section titled “Initialization”import { PrizeBoxSDK, PrizeBoxFactorySDK } from '@akta/sdk/prize-box'
const prizeBoxFactory = new PrizeBoxFactorySDK({ algorand })
// Interact with an existing prize boxconst prizeBox = new PrizeBoxSDK({ algorand, factoryParams: { appId: prizeBoxAppId },})Minting a Prize Box
Section titled “Minting a Prize Box”const prizeBox = await prizeBoxFactory.mint({ owner: ownerAddress,})Key Features
Section titled “Key Features”- Asset bundling — Load a box with multiple NFTs/assets and sell them as a single unit
- Set pricing — Configure the cost to purchase the bundle
- Escrow-based — Assets are held in an on-chain escrow until purchased
- Factory pattern — Create and manage multiple prize boxes