Skip to main content

Transactions — HCS‑16 Builders

HCS‑16 centralizes all transaction construction in builders to keep payloads canonical across Node, browser, and Go.

Sources

Create Flora TopicDirect link to Create Flora Topic

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

const tx = buildHcs16CreateFloraTopicTx({
floraAccountId: '0.0.500',
topicType: 0, // 0=communication, 1=transaction, 2=state
adminKey: true,
submitKey: true,
});

Create Flora AccountDirect link to Create Flora Account

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

const tx = buildHcs16CreateAccountTx({
keyList,
initialBalanceHbar: 5,
maxAutomaticTokenAssociations: -1,
});

Generic Flora MessageDirect link to Generic Flora Message

import { FloraOperation, buildHcs16MessageTx } from '@hashgraphonline/standards-sdk';

const tx = buildHcs16MessageTx({
topicId: '0.0.600',
operatorId: '0.0.123',
op: FloraOperation.TRANSACTION,
body: { schedule_id: '0.0.12345' },
});

Flora CreatedDirect link to Flora Created

buildHcs16FloraCreatedTx({ topicId, operatorId, floraAccountId, topics });

State UpdateDirect link to State Update

buildHcs16StateUpdateTx({ topicId, operatorId, hash, epoch, accountId, topics, memo });

Join Request / Vote / AcceptedDirect link to Join Request / Vote / Accepted

buildHcs16FloraJoinRequestTx({ topicId, operatorId, accountId, connectionRequestId, connectionTopicId, connectionSeq });
buildHcs16FloraJoinVoteTx({ topicId, operatorId, accountId, approve, connectionRequestId, connectionSeq });
buildHcs16FloraJoinAcceptedTx({ topicId, operatorId, members, epoch });