Server — HCS‑6 Client
- TypeScript
- Go
- Python
import 'dotenv/config';
import { HCS6Client } from '@hashgraphonline/standards-sdk';
const client = new HCS6Client({
network: 'testnet',
operatorId: process.env.HEDERA_ACCOUNT_ID!,
operatorKey: process.env.HEDERA_PRIVATE_KEY!,
});
const reg = await client.createDynamicRegistry({ ttl: 86400 });
await client.upsert(reg.topicId, { key: 'latest', value: { version: 1 } });
import "github.com/hashgraph-online/standards-sdk-go/pkg/hcs6"
client, err := hcs6.NewClient(hcs6.ClientConfig{
Network: "testnet",
OperatorAccountID: os.Getenv("HEDERA_ACCOUNT_ID"),
OperatorPrivateKey: os.Getenv("HEDERA_PRIVATE_KEY"),
})
if err != nil {
log.Fatal(err)
}
reg, err := client.CreateDynamicRegistry(ctx, hcs6.CreateDynamicRegistryOptions{
TTL: 86400,
})
import os
from standards_sdk_py.hcs6 import Hcs6Client
client = Hcs6Client(
network="testnet",
operator_id=os.environ["HEDERA_ACCOUNT_ID"],
operator_private_key=os.environ["HEDERA_PRIVATE_KEY"],
)
reg = client.create_dynamic_registry(ttl=86400)