LogoLogo
Cryptum.ioGitHub
  • 🌐Cryptum
    • What is Cryptum
    • DeFi Market
    • Ecosystem
      • Bitcoin
      • Ethereum
      • Polygon
      • Avalanche C-Chain
      • BNB Chain
      • Cardano
      • Celo
      • Hathor
      • Solana
      • Stellar
      • XRP Ledger
      • Stratus
      • Hyperledger Besu
  • 👝Products
    • Dashboard Analytics
    • Tokenization
    • Crypto Checkout
      • Overview
      • Getting started
      • Checkout Dashboard
        • Creating your Store
        • Customer Checkout screens
        • Analytics
        • Managing Wallets
        • Creating Collections and NFTs
        • Linking Products to NFTs
        • Monitoring Orders
      • Checkout API
        • Authentication
        • Store
        • Orders
          • Handling Orders
    • Wallets
    • DeFi-as-a-Service
    • On & Off Ramp (soon)
    • E-commerce Plugins
      • Wordpress NFT Plugin
        • How to install NFT Plugin
        • Connect your Credentials to NFT Plugin
      • Wordpress Checkout Plugin
        • How to install Checkout Plugin
        • Connect your Credentials to Checkout Plugin
      • Plugins Guides
        • Creating your Store
        • Manage your Wallets
        • Creating Collections and NFTs
        • Linking Products to NFTs
        • Monitoring Orders
        • Monitoring Store (Analytics)
  • 💻Community Edition
    • Overview
    • Architecture
    • Start for free
    • Getting started
    • Dashboard guide
      • 🔑Creating a Project (API Key)
      • 🛠️Start building!
      • 📊Monitoring your Project
      • 📈Monitoring Requests
    • SDK guides
      • Get test currencies
      • Chainlink
        • 📈Price Feeds
        • ⚙️Automation
        • 🎲VRF
        • 🛤️CCIP
        • 🛤️CCIP
        • Project Examples
          • Lottery
          • Send Message CCIP
      • Wallets
      • Balances
      • Prices
      • Tokens
        • EVM Tokens (ERC-20)
        • Solana Tokens (SPL)
        • Cardano Tokens
        • Stellar Tokens
        • XRP Tokens
        • Hathor Tokens
      • NFTs
        • EVM NFTs (Ethereum, Polygon and others)
        • NFTs on Solana
        • NFTs on Hathor Network
      • Queries
        • Wallet information
        • Get transaction by hash
        • Get block information
        • Get transaction receipt by hash
        • Get fees information
        • Get NFT data
        • Get NFT balance
        • Get UTXOs (Unspent transaction outputs)
      • Uniswap
      • Staking
      • Smart Contracts
        • Deploy custom Smart Contracts
        • Loot Box
    • Features and credits
      • Avalanche C Chain
      • Bitcoin
      • BNB Chain
      • Cardano
      • Celo
      • Ethereum
      • Hathor
      • Polygon
      • Solana
      • Stellar
      • XRP Ledger
      • Stratus
    • API guides
      • API Cryptum
      • API Connector
  • 📃GLOSSARY
    • Blockchain terms
    • Cryptum terms
Powered by GitBook
On this page
  • What do I need in order to mint an NFT?
  • ​Creating NFTs Programmatically with Cryptum SDK
  • Mint NFTs
  • Burn tokens
  1. Community Edition
  2. SDK guides
  3. NFTs

NFTs on Hathor Network

PreviousNFTs on SolanaNextQueries

Last updated 2 years ago

Straight to the code!

Instantiate the Cryptum SDK first:

const sdk = new CryptumSdk({
  environment: 'testnet',
  apiKey: 'YOUR-API-KEY',
})

Create NFT

Create a new NFT in Hathor blockchain.

*Obs: In Hathor, you will always spend 1% of the amount of tokens you are minting in HTR, that is, to mint 1000 tokens you need to spend 10 HTR.

sdk.nft.create(opts)

  • opts.protocol (string)(required) - blockchain protocol must be HATHOR.

  • opts.wallet (Wallet)(required) - wallet to sign the transaction with.

  • opts.name (string)(required) - token name.

  • opts.symbol (string)(required) - token symbol.

  • opts.amount (string)(required) - token amount to be first minted.

  • opts.uri (string)(required) - metadata URI string.

  • opts.mintAuthorityAddress (string)(optional) - wallet address to be the mint authority. Required if you want to mint more tokens later.

  • opts.meltAuthorityAddress (string)(optional) - wallet address to be the melt authority. Required if you want to burn tokens later.

This function returns the transaction hash which is also the token UID (token identifier).

const { hash } = await sdk.nft.create({
  protocol: 'HATHOR',
  wallet,
  symbol: 'NFT',
  name: 'NFT',
  amount: '1000000',
  uri: 'ipfs://....',
  mintAuthorityAddress: 'address...',
  meltAuthorityAddress: 'address...',
})

Transfer NFTs

Transfer NFTs in Hathor is the same as any other tokens. See how to transfer here in

Mint NFTs

Mint more NFTs.

*Obs: In Hathor, you will always spend 1% of the amount of tokens you are minting in HTR, that is, to mint 1000 tokens you need to spend 10 HTR.

sdk.nft.mint(opts)

  • opts.protocol (string)(required) - blockchain must be HATHOR.

  • opts.wallet (Wallet)(required) - wallet minting tokens.

  • opts.tokenUid (string)(required) - token identifier to be minted.

  • opts.amount (string)(required) - token amount to be minted.

  • opts.destination (string)(required) - destination wallet address to receive the minted tokens.

  • opts.mintAuthorityAddress (string)(optional) - wallet address to be the mint authority. Required if you want to mint more tokens later.

This function returns the hash of this minting transaction from the blockchain.

// Mint 100 NFTs
const { hash } = await sdk.nft.mint({
  protocol: 'HATHOR',
  wallet,
  token: '00000...',
  destination: 'WmpvgigZ4pNVLRPW2...sbK8pyV45WtP',
  amount: '100',
  mintAuthorityAddress: 'address...',
})

Melt NFTs

Melt (burn) NFTs in Hathor blockchain.

sdk.nft.burn(opts)

  • opts.protocol (string)(required) - blockchain must be HATHOR.

  • opts.wallet (Wallet)(required) - wallet to sign the transaction with.

  • opts.tokenUid (string)(required) - token identifier to be burnt.

  • opts.amount (string)(required) - token amount to be burnt.

  • opts.meltAuthorityAddress (string)(optional) - wallet address to be the melt authority. Required if you want to melt more tokens later.

This function returns hash of the burning transaction from the blockchain.

// burn 5 NFTs
const { hash } = await sdk.nft.burn({
  protocol: 'HATHOR',
  wallet,
  token: '000000...',
  amount: '5',
  meltAuthorityAddress: 'address...',
})

What do I need in order to mint an NFT?

A Cryptum API key is the only requirement to create your brand new NFT for Hathor. However, you probably want to add images, titles, symbols, attributes, etc. to your token. This information should be hosted in a service like or , and not on the token itself.

​Creating NFTs Programmatically with Cryptum SDK

Step 1

The first prerequisite you will need is the creation of an account and a Project (API Key) on Cryptum Dashboard.

PS: Our dashboard is almost ready! To generate an API Key, contact

Step 2

With a valid Cryptum API Key, you can then instantiate the SDK as follows:

const sdk = new CryptumSdk({
  environment: 'development',
  apiKey: "YOUR-API-KEY-HERE",
})

Step 3

Then you must instantiate the wallet that will be used to create the NFTs:

const wallet = await sdk.getWalletController().generateWallet({
    protocol: 'HATHOR',
    mnemonic: 'lorem ipsum dolor sit amet consectetur adipiscing ....',
    derivation: { account: 0, address: 0 }
  })

Make sure the wallet has sufficient funds to pay for the transactions.

Step 4

Create the new NFT by calling the function below:

const { hash } = await sdk.nft.create({
  protocol: 'HATHOR',
  wallet,
  symbol: 'NFT',
  name: 'NFT',
  amount: '1000000',
  uri: 'ipfs://....',
  mintAuthorityAddress: 'address...', // optional
  meltAuthorityAddress: 'address...', // optional
})

wallet will receive the newly minted tokens; name is the token name; symbol is the token symbol; amount is the amount to be first minted; uri is the metadata URI; mintAuthorityAddress is a wallet address that has the power to mint more NFTs. If it's null then this NFT can no longer be minted; meltAuthorityAddress is a wallet address that has the power to burn NFTs. If it's null then this NFT can no longer be minted;

The hash is the transaction hash which is also the NFT address.

Mint NFTs

Mint an existing NFTs in Hathor blockchain.

Keep in mind that you need enough HTR tokens to pay for this transaction depending on the minting amount, as already explained above.

Only the minting authority can mint more tokens. It is required to pass the minting authority every time this function is called to keep on minting more tokens.

const { hash } = await sdk.nft.mint({
    protocol: 'HATHOR',
    wallet,
    token: 'TOKEN_ADDRESS',
    destination: 'WmpvgigZ4p.....pyV45WtP',
    amount: '100',
    mintAuthorityAddress: 'ADDRESS'
})

Burn tokens

Burn (melt) existing tokens in Hathor blockchain.

Only the melt authority can burn more tokens. It is required to pass the melt authority every time this function is called to keep on burning more tokens.

// burn 5 NFTs
const { hash } = await sdk.nft.burn({
  protocol: 'HATHOR',
  wallet,
  token: '000000...',
  amount: '5',
  meltAuthorityAddress: 'address...',
})

If you want to check the full Hathor Network NFTs doc, go to:

💻
token transfers
Pinata
arweave
hello@blockforce.in
https://github.com/blockforce-official/cryptum-sdk/blob/maste/docs/nfts/hathor.md#create-nftgithub.com