Skip to main content

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

import { buildHcs10CreateInboundTopicTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs10CreateInboundTopicTx({
accountId: '0.0.1204',
ttl: 90,
});

await (await tx.execute(client)).getReceipt(client);

Create Outbound TopicDirect link to Create Outbound Topic

import { buildHcs10CreateOutboundTopicTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs10CreateOutboundTopicTx({ ttl: 90 });
await (await tx.execute(client)).getReceipt(client);

Create Connection TopicDirect link to Create Connection Topic

import { buildHcs10CreateConnectionTopicTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs10CreateConnectionTopicTx({
ttl: 30,
inboundTopicId: '0.0.5001',
connectionId: 42,
});
await (await tx.execute(client)).getReceipt(client);

Create Registry TopicDirect link to Create Registry Topic

import { buildHcs10CreateRegistryTopicTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs10CreateRegistryTopicTx({
ttl: 365,
metadataTopicId: '0.0.6001',
});
await (await tx.execute(client)).getReceipt(client);

Submit Connection RequestDirect link to Submit Connection Request

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);

Send Connection MessageDirect link to Send Connection Message

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);

Register AccountDirect link to Register Account

import { buildHcs10RegistryRegisterTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs10RegistryRegisterTx({
registryTopicId: '0.0.9601',
accountId: '0.0.1204',
});
await (await tx.execute(client)).getReceipt(client);

Delete Registry EntryDirect link to Delete Registry Entry

import { buildHcs10RegistryDeleteTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs10RegistryDeleteTx({
registryTopicId: '0.0.9601',
uid: 'connection:42',
});
await (await tx.execute(client)).getReceipt(client);

See alsoDirect link to See also