Marketplace & Listings
The MarketplaceSDK and ListingSDK manage the Akita NFT marketplace. Sellers list NFTs at a set price, and buyers purchase them through the marketplace contract.
Concepts
Section titled “Concepts”Marketplace
Section titled “Marketplace”The marketplace is a factory contract that creates individual listing contracts for each NFT sale. It enforces:
- Double-sided fees — Both the platform facilitating the listing and the platform facilitating the purchase can take fees, enabling cross-platform commerce where NFTs listed on one marketplace can be purchased through another
- Royalties — Decentralized royalties via MetaMerkles, verified on-chain through merkle proofs
- Composable listings — Multiple assets can be bundled in a single listing
Listings
Section titled “Listings”Each listing is its own contract instance containing the NFT and sale terms.
Initialization
Section titled “Initialization”import { MarketplaceSDK, ListingSDK } from '@akta/sdk/marketplace'
const marketplace = new MarketplaceSDK({ algorand })
// Interact with a specific listingconst listing = new ListingSDK({ algorand, factoryParams: { appId: listingAppId },})Listing an NFT
Section titled “Listing an NFT”const listing = await marketplace.list({ asset: nftAssetId, amount: 1n, name: 'My NFT', proof: merkleProof, price: 10_000_000n, // 10 ALGO paymentAsset: 0n, // Accept ALGO expiration: 0n, // No expiry reservedFor: ALGORAND_ZERO_ADDRESS_STRING, // Open to anyone gateId: 0n, // No gate marketplace: marketplaceAddr,})Purchasing
Section titled “Purchasing”Buyers send payment to the listing contract, which distributes funds to the seller, royalty recipients, the listing platform, the purchasing platform, and the DAO treasury.
Delisting
Section titled “Delisting”Sellers can delist their NFTs at any time, returning the asset to their wallet.
Marketplace operations through a wallet use the MarketplacePlugin. See Wallet Plugins.