Skip to main content

API — HCS‑10

This page summarizes the primary HCS‑10 SDK APIs. See the linked source files for complete method signatures and inline docs.

Node Client — HCS10ClientDirect link to Node Client — HCS10Client

  • Purpose: End‑to‑end creation of agents (inbound/outbound topics), connection handling, profile inscription, and messaging.
  • Source: GitHub

Key methods

  • createAccount(initialBalance?)
  • createInboundTopic(accountId, topicType, ttl?, feeConfigBuilder?)
  • createOutboundTopic(ttl?)
  • handleConnectionRequest(inboundTopicId, requestingAccountId, connectionRequestId)
  • waitForConnectionConfirmation(inboundTopicId, connectionRequestId, timeoutMs?)
  • sendMessage(connectionTopicId, data, memo?)
  • Profile helpers: storeHCS11Profile, createAgent, createMCPServer, etc.

Base Client — HCS10BaseClientDirect link to Base Client — HCS10BaseClient

  • Purpose: Shared memo generation, mirror‑node queries, parsing utilities.
  • Source: GitHub

Highlights

  • getTopicTypeFromMemo, getOperatorFromMemo, getTopicIdFromMemo
  • Memo helpers: inbound/outbound/connection/registry
  • Mirror read helpers for messages and confirmations

Browser Client — HCS10BrowserClientDirect link to Browser Client — HCS10BrowserClient

  • Purpose: Wallet‑based flows using a DApp signer (WalletConnect). Mirrors the Node client with signer execution.
  • Source: GitHub

Highlights

  • createInboundTopic, createOutboundTopic
  • requestConnection, confirmConnection, sendMessage
  • Signer‑first transaction handling (freezeWithSigner, executeWithSigner)

ConnectionsManagerDirect link to ConnectionsManager

  • Purpose: Stream/process connection lifecycle across inbound/outbound topics; track confirmations and messages.
  • Source: GitHub

Highlights

  • Stream utilities: subscribe to inbound/outbound/connection topics
  • Message normalization and filtering
  • Callbacks for request/confirm/message events

Transactions (Builders)Direct link to Transactions (Builders)

  • Purpose: Canonical construction of topic create + message submit transactions for all HCS‑10 operations.
  • Source: GitHub

Includes

  • Topic builders: buildHcs10CreateInboundTopicTx, buildHcs10CreateOutboundTopicTx, buildHcs10CreateConnectionTopicTx, buildHcs10CreateRegistryTopicTx
  • Connection messages: buildHcs10SubmitConnectionRequestTx, buildHcs10ConfirmConnectionTx, outbound audit records
  • Messaging: buildHcs10SendMessageTx
  • Registry: buildHcs10RegistryRegisterTx, buildHcs10RegistryDeleteTx, buildHcs10RegistryMigrateTx

Types and ErrorsDirect link to Types and Errors