跳到正文
TakoAPI
返回技能列表

hedera-tx-builder

由 harleyscodes 提供

AI & LLMs
464下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Build and sign Hedera transactions.

描述

该技能的功能

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.

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

何时使用

  • 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

示例工作流

输入

User asks: transfer 100 HBAR from account 0.0.111 to 0.0.222

智能体
  1. 1

    Import TransferTransaction and Hbar from @hashgraph/sdk

  2. 2

    Initialize client for mainnet or testnet

  3. 3

    Build TransferTransaction with addHbarTransfer for sender (negative) and receiver (positive)

  4. 4

    Sign the transaction with the operator private key

  5. 5

    Execute the signed transaction and return the receipt

输出

Transaction submitted to Hedera network, receipt confirms successful HBAR transfer

前置要求

  • Hedera account ID (format: shard.realm.num, e.g. 0.0.12345)
  • Hedera operator private key for signing transactions

安装

clawhub install harleyscodes/hedera-tx-builder

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接