HCS-27: Transparency Log Checkpoints
HCS-27 anchors append-only transparency logs to Hedera by publishing periodic checkpoint commitments (tree_size, root_hash, and batch range metadata).
What HCS-27 DoesDirect link to What HCS-27 Does
- Creates checkpoint topics with standard HCS-27 memo conventions.
- Publishes checkpoint messages with root commitments and optional overflow metadata pointers.
- Validates checkpoint message payloads and metadata digests.
- Resolves and verifies checkpoint streams from mirror-node data.
InstallationDirect link to Installation
- TypeScript
- Go
- Python
npm install @hashgraphonline/standards-sdk
TypeScript HCS-27 support is not yet available in @hashgraphonline/standards-sdk.
go get github.com/hashgraph-online/standards-sdk-go@latest
pip install standards-sdk-py
QuickstartDirect link to Quickstart
- TypeScript
- Go
- Python
// HCS-27 TypeScript client is not yet implemented in standards-sdk.
import (
"context"
"log"
"github.com/hashgraph-online/standards-sdk-go/pkg/hcs27"
)
client, err := hcs27.NewClient(hcs27.ClientConfig{
OperatorAccountID: "0.0.123456",
OperatorPrivateKey: "<private-key>",
Network: "testnet",
})
if err != nil {
log.Fatal(err)
}
topicID, _, err := client.CreateCheckpointTopic(context.Background(), hcs27.CreateTopicOptions{
TTLSeconds: 300,
UseOperatorAsAdmin: true,
UseOperatorAsSubmit: true,
})
if err != nil {
log.Fatal(err)
}
metadata := hcs27.CheckpointMetadata{
Type: "ans-checkpoint-v1",
Stream: hcs27.StreamID{Registry: "ans", LogID: "default"},
Root: hcs27.RootCommitment{
TreeSize: 671,
RootHashB64: "8zVIY3QJBOdTYR8dnLOzedEfym4Jl7f1xy8pciLEMew",
},
BatchRange: hcs27.BatchRange{Start: 661, End: 671},
}
_, err = client.PublishCheckpoint(context.Background(), topicID, metadata, "go-sdk checkpoint publish", "")
if err != nil {
log.Fatal(err)
}
import os
from standards_sdk_py.hcs27 import Hcs27Client
client = Hcs27Client(
operator_id="0.0.123456",
operator_private_key="<private-key>",
network="testnet",
)
client.create_checkpoint_topic(ttl_seconds=300, use_operator_as_admin=True, use_operator_as_submit=True)
metadata = hcs27.CheckpointMetadata{
# Type: "ans-checkpoint-v1",
# Stream: {"registry": "ans", "log_id": "default"},
# Root: hcs27.RootCommitment{
# TreeSize: 671,
# RootHashB64: "8zVIY3QJBOdTYR8dnLOzedEfym4Jl7f1xy8pciLEMew",
# BatchRange: {"start": 661, "end": 671},
client.publish_checkpoint(topicID, metadata, "go-sdk checkpoint publish")