Skip to main content

Transactions — HCS‑5

Note

  • These flows are typically orchestrated via higher‑level SDK helpers.
  • Direct transaction construction is common only when integrating with custom minting pipelines.

Sources

Mint Hashinal — HTS TokenMintDirect link to Mint Hashinal — HTS TokenMint

HCS‑5 uses HTS mint and sets serial metadata to an HCS‑1 HRL.

import { TokenMintTransaction, TokenId } from '@hashgraph/sdk';
import { buildHcs1Hrl } from '@hashgraphonline/standards-sdk';

const metadata = buildHcs1Hrl('0.0.700001');
const tx = new TokenMintTransaction()
.setTokenId(TokenId.fromString('0.0.123456'))
.setMetadata([Buffer.from(metadata)]);
await (await tx.execute(client)).getReceipt(client);

Helper — BuildHCS1HRLDirect link to Helper — BuildHCS1HRL

import { buildHcs1Hrl } from '@hashgraphonline/standards-sdk';

const hrl = buildHcs1Hrl('0.0.700001');
// => "hcs://1/0.0.700001"