OpenClaw · Skill

Hedera Tx Builder

Provides TypeScript patterns for building, signing, and submitting transactions on the Hedera network using the official Hashgraph SDK. Covers HBAR transfers, token association, account creation, and topic messaging.

AI & LLMs
v1.0.0
VirusTotal: Suspicious

Install

Start with the primary install command. Alternate entrypoints are included below for ClawHub and OpenClaw CLI users.

Primary command

clawhub install harleyscodes/hedera-tx-builder

ClawHub installer

npx clawhub@latest install harleyscodes/hedera-tx-builder

OpenClaw CLI

openclaw skills install harleyscodes/hedera-tx-builder

Direct OpenClaw install

openclaw install harleyscodes/hedera-tx-builder

What this skill does

Provides TypeScript patterns for building, signing, and submitting transactions on the Hedera network using the official Hashgraph SDK. Covers HBAR transfers, token association, account creation, and topic messaging.

Why it matters

The Hashgraph SDK handles transaction serialization, fee calculation, and network submission so you don't have to construct raw gRPC calls manually.

Typical use cases

  • Sending HBAR between accounts programmatically
  • Associating a wallet with a new token before receiving it
  • Creating new Hedera accounts with an initial balance
  • Publishing messages to a Hedera Consensus Service topic
  • Calling smart contracts on Hedera mainnet or testnet

Source instructions

Hedera Transaction Builder

Setup

npm install @hashgraph/sdk

Client Setup

import { Client, AccountBalanceQuery, Hbar } from '@hashgraph/sdk';

const client = Client.forMainnet();
// Or for testnet:
const client = Client.forTestnet();

Transfer HBAR

import { TransferTransaction, Hbar } from '@hashgraph/sdk';

const tx = new TransferTransaction()
  .addHbarTransfer(fromAccountId, new Hbar(-100)) // send
  .addHbarTransfer(toAccountId, new Hbar(100))    // receive
  .setTransactionMemo("Payment for goods");

// Sign with hashpack or operator
const signTx = await tx.sign(operatorKey);
const result = await signTx.execute(client);

Key Transaction Types

AccountCreate

new AccountCreateTransaction()
  .setKey(publicKey)
  .setInitialBalance(new Hbar(10))
  .setAccountMemo("My account");

TokenAssociate

new TokenAssociateTransaction()
  .setAccountId(accountId)
  .setTokenIds([tokenId1, tokenId2]);

TopicMessage

new TopicMessageTransaction()
  .setTopicId(topicId)
  .setMessage("Hello Hedera!");

Network Endpoints

  • Mainnet: https://mainnet.hashio.io/api
  • Testnet: https://testnet.hashio.io/api

Important Concepts

  • Hbar: 1 HBAR = 100,000,000 tinybars
  • Account ID: Format shard.realm.num (e.g., 0.0.12345)
  • Transaction Fee: Small HBAR fee for each transaction
  • Transaction Valid Duration: 180 seconds by default

Related OpenClaw skills

Browse all →
Featured slot

Your product here

Reserve this slot to reach operators and coding-agent buyers.

Shown where builders are actively comparing tools and deployment options.

Advertise