Skip to content
Back to skills

Hedera Tx Builder

ASecurity

"Build and sign Hedera transactions. Use for: (1) Creating HBAR

  • 21 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 7, 2026
businesstypescriptgobashapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill hedera-tx-builder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hedera Tx Builder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hedera Tx Builder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-hedera-tx-builder/badge)](https://www.skillsdirectory.com/skills/modbender-hedera-tx-builder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hedera-tx-builder
description: "Build and sign Hedera transactions. Use for: (1) Creating HBAR
  transfers, (2) Token operations, (3) Smart contract calls, (4) Submitting to
  Hedera network."
---


# Hedera Transaction Builder

## Setup

```bash
npm install @hashgraph/sdk
```

## Client Setup

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

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

## Transfer HBAR

```typescript
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
```typescript
new AccountCreateTransaction()
  .setKey(publicKey)
  .setInitialBalance(new Hbar(10))
  .setAccountMemo("My account");
```

### TokenAssociate
```typescript
new TokenAssociateTransaction()
  .setAccountId(accountId)
  .setTokenIds([tokenId1, tokenId2]);
```

### TopicMessage
```typescript
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.