HiveXPH SDKhivexph-sdk
NPM
Developer toolkit for Hive Custom JSON and Hive Engine transactions.

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 collection

Usage

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

ParameterTypeRequiredDescription
namestringYesMax 50 characters.
symbolstringYesUppercase letters.
orgNamestringNoOptional organization name.
productNamestringNoOptional product name.
maxSupplystringNoOptional; unlimited when omitted.
websitestringNoOptional collection website.
authorizedIssuingAccountsstring[]NoOptional accounts allowed to issue.
authorizedIssuingContractsstring[]NoOptional contracts allowed to issue.