NFTs
Create an NFT collection
Collection creation costs BEE and follows the same flow as token creation: check the balance and the symbol, then sign.
Try it: create a collectionUsage
Only the NFT name and symbol are required. Organization, product name, max supply, website and authorized issuers are optional and can be updated later in the TribalDex NFT manager.
TypeScript
await hive.keychainIssuer.nft.create({
username: "alice",
name: "Test Collection",
symbol: "TESTNFT",
orgName: "HiveXPH", // optional
productName: "Cards", // optional
maxSupply: "1000", // optional, unlimited when omitted
website: "https://example.com", // optional
authorizedIssuingAccounts: ["alice"], // optional
authorizedIssuingContracts: [], // optional
});
await hive.issuer.nft.create({
from: hive.accounts.treasury,
name: "Test Collection",
symbol: "TESTNFT",
});Preflight checks
A failing check throws INSUFFICIENT_BEE or NFT_ALREADY_EXISTS before Keychain opens or a key is resolved.
TypeScript
const check = await hive.keychainIssuer.nft.checkCreate({ username: "alice", symbol: "TESTNFT" });
// { fee: "100", balance: "8.45", hasEnoughBee: false, symbolExists: false, ok: false, issues: [...] }Important
skipChecks: true bypasses both checks — the 100 BEE fee is not refunded if the creation fails.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Max 50 characters. |
| symbol | string | Yes | Uppercase letters. |
| orgName | string | No | Optional organization name. |
| productName | string | No | Optional product name. |
| maxSupply | string | No | Optional; unlimited when omitted. |
| website | string | No | Optional collection website. |
| authorizedIssuingAccounts | string[] | No | Optional accounts allowed to issue. |
| authorizedIssuingContracts | string[] | No | Optional contracts allowed to issue. |
