Node — HCS‑2Client
import 'dotenv/config';
import { HCS2Client, HCS2RegistryType } from '@hashgraphonline/standards-sdk';
const client = new HCS2Client({
network: 'testnet',
operatorId: process.env.HEDERA_ACCOUNT_ID!,
operatorKey: process.env.HEDERA_PRIVATE_KEY!,
});
const reg = await client.createRegistry({ registryType: HCS2RegistryType.INDEXED, ttl: 86400 });
await client.registerEntry(reg.topicId, { key: 'example', value: { url: 'https://…' } });