Transactions — HCS‑10 Transact
Note
- High-level HCS‑10 clients orchestrate these builders; use them directly for custom pipelines, migration tooling, or multi-sig workflows.
- TTL values flow into topic memos for lifecycle tracking.
Sources
Create Inbound TopicDirect link to Create Inbound Topic
- TypeScript
- Go
import { buildHcs10CreateInboundTopicTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10CreateInboundTopicTx({
accountId: '0.0.1204',
ttl: 90,
});
await (await tx.execute(client)).getReceipt(client);
import "github.com/hashgraph-online/standards-sdk-go/pkg/hcs10"
tx, err := hcs10.BuildCreateTopicTx(hcs10.CreateTopicTxParams{
TopicType: hcs10.TopicTypeInbound,
AccountID: "0.0.1204",
TTL: 90,
})
if err != nil {
log.Fatal(err)
}
response, err := tx.Execute(hederaClient)
receipt, err := response.GetReceipt(hederaClient)
Create Outbound TopicDirect link to Create Outbound Topic
- TypeScript
- Go
import { buildHcs10CreateOutboundTopicTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10CreateOutboundTopicTx({ ttl: 90 });
await (await tx.execute(client)).getReceipt(client);
tx, err := hcs10.BuildCreateTopicTx(hcs10.CreateTopicTxParams{
TopicType: hcs10.TopicTypeOutbound,
TTL: 90,
})
Create Connection TopicDirect link to Create Connection Topic
- TypeScript
- Go
import { buildHcs10CreateConnectionTopicTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10CreateConnectionTopicTx({
ttl: 30,
inboundTopicId: '0.0.5001',
connectionId: 42,
});
await (await tx.execute(client)).getReceipt(client);
tx, err := hcs10.BuildCreateTopicTx(hcs10.CreateTopicTxParams{
TopicType: hcs10.TopicTypeConnection,
TTL: 30,
InboundTopicID: "0.0.5001",
ConnectionID: 42,
})
Create Registry TopicDirect link to Create Registry Topic
- TypeScript
- Go
import { buildHcs10CreateRegistryTopicTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10CreateRegistryTopicTx({
ttl: 365,
metadataTopicId: '0.0.6001',
});
await (await tx.execute(client)).getReceipt(client);
tx, err := hcs10.BuildCreateTopicTx(hcs10.CreateTopicTxParams{
TopicType: hcs10.TopicTypeRegistry,
TTL: 365,
MetadataTopicID: "0.0.6001",
})
Submit Connection RequestDirect link to Submit Connection Request
- TypeScript
- Go
import { buildHcs10SubmitConnectionRequestTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10SubmitConnectionRequestTx({
inboundTopicId: '0.0.5001',
operatorId: '0.0.5001@0.0.1204',
memo: 'Request outbound agent link',
});
await (await tx.execute(client)).getReceipt(client);
msg := hcs10.BuildConnectionRequestMessage("0.0.5001@0.0.1204", "Request outbound agent link")
tx, err := hcs10.BuildSubmitMessageTx("0.0.5001", msg, "")
if err != nil {
log.Fatal(err)
}
response, err := tx.Execute(hederaClient)
Send Connection MessageDirect link to Send Connection Message
- TypeScript
- Go
import { buildHcs10SendMessageTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10SendMessageTx({
connectionTopicId: '0.0.7001',
operatorId: '0.0.5001@0.0.1204',
data: JSON.stringify({ subject: 'hello', body: 'invite' }),
});
await (await tx.execute(client)).getReceipt(client);
msg := hcs10.BuildMessagePayload(
"0.0.5001@0.0.1204",
`{"subject":"hello","body":"invite"}`,
"",
)
tx, err := hcs10.BuildSubmitMessageTx("0.0.7001", msg, "")
Register AccountDirect link to Register Account
- TypeScript
- Go
import { buildHcs10RegistryRegisterTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10RegistryRegisterTx({
registryTopicId: '0.0.9601',
accountId: '0.0.1204',
});
await (await tx.execute(client)).getReceipt(client);
msg := hcs10.BuildRegistryRegisterMessage("0.0.1204", "0.0.5001", "")
tx, err := hcs10.BuildSubmitMessageTx("0.0.9601", msg, "")
Delete Registry EntryDirect link to Delete Registry Entry
- TypeScript
- Go
import { buildHcs10RegistryDeleteTx } from '@hashgraphonline/standards-sdk';
const tx = buildHcs10RegistryDeleteTx({
registryTopicId: '0.0.9601',
uid: 'connection:42',
});
await (await tx.execute(client)).getReceipt(client);
msg := hcs10.BuildRegistryDeleteMessage("connection:42", "")
tx, err := hcs10.BuildSubmitMessageTx("0.0.9601", msg, "")
See alsoDirect link to See also
- Examples: /docs/libraries/standards-sdk/hcs-10/examples
- Server SDK: /docs/libraries/standards-sdk/hcs-10/server
- Base client: /docs/libraries/standards-sdk/hcs-10/base-client