Server — HCS‑5 Client
- TypeScript
- Go
- Python
import 'dotenv/config';
import { HCS5Client } from '@hashgraphonline/standards-sdk';
const hcs5 = new HCS5Client({
network: 'testnet',
operatorId: process.env.HEDERA_ACCOUNT_ID!,
operatorKey: process.env.HEDERA_PRIVATE_KEY!,
});
const res = await hcs5.createHashinal({
tokenId: '0.0.123456',
inscriptionInput: {
type: 'buffer',
buffer: Buffer.from('hello'),
fileName: 'note.txt',
mimeType: 'text/plain',
},
});
import "github.com/hashgraph-online/standards-sdk-go/pkg/hcs5"
client, err := hcs5.NewClient(hcs5.ClientConfig{
Network: "testnet",
OperatorAccountID: os.Getenv("HEDERA_ACCOUNT_ID"),
OperatorPrivateKey: os.Getenv("HEDERA_PRIVATE_KEY"),
})
if err != nil {
log.Fatal(err)
}
res, err := client.CreateHashinal(ctx, hcs5.CreateHashinalOptions{
TokenID: "0.0.123456",
FileName: "note.txt",
MimeType: "text/plain",
Data: []byte("hello"),
})
import os
from standards_sdk_py.hcs5 import Hcs5Client
client = Hcs5Client(
network="testnet",
operator_id=os.environ["HEDERA_ACCOUNT_ID"],
operator_private_key=os.environ["HEDERA_PRIVATE_KEY"],
)
res = client.create_hashinal(token_id="0.0.123456", file_name="note.txt", mime_type="text/plain", data="hello".encode())