tronweb

📁 hairyf/blockchain-master 📅 1 day ago
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/hairyf/blockchain-master --skill tronweb

Agent 安装分布

mcpjam 1
claude-code 1
replit 1
junie 1
windsurf 1
zencoder 1

Skill 文档

Skill is based on TronWeb v6.2.0, generated at 2026-02-25.

TronWeb is the official JavaScript/TypeScript SDK for the TRON network. It wraps the TRON HTTP API and provides a consistent API for accounts, blocks, transactions, smart contracts, and events. Use it in Node.js or the browser to build DApps, sign and broadcast transactions, and call contracts.

Core References

Topic Description Reference
Instance setup fullHost, nodes, headers, privateKey, setPrivateKey/setAddress core-instance-setup
Address, units, encoding hex/base58/checksum, toSun/fromSun, fromUtf8/toUtf8, sha3 core-address-units
Trx Blocks, transactions, accounts, bandwidth, sign, broadcast, getCurrentRefBlockParams, signTypedData, ecRecover core-trx
Utils ABI, transaction, deserializeTx, accounts, address, validations core-utils
Providers HttpProvider, request, isConnected, timeout, headers, setStatusPage core-providers
Constants ADDRESS_PREFIX, SUN/TRX, default feeLimit, BIP44 path core-constants

Features

Transactions and contracts

Topic Description Reference
TransactionBuilder sendTrx, sendToken, freeze/unfreeze, triggerSmartContract, createSmartContract, deployConstantContract features-transaction-builder
Contract contract(abi, address), methods.call/send, decodeInput, new(), at() features-contract
Events getEventsByContractAddress, getEventsByTransactionID, getEventsByBlockNumber, setServer features-events
Plugin register(PluginClass), pluginInterface (requires, components, fullClass) features-plugin
Message and typed data signMessage/verifyMessage, signTypedData/verifyTypedData, EIP-712 TypedDataEncoder features-message-typed-data
Connection and version isConnected(), fullnodeSatisfies(version), getFullnodeVersion() features-connection-version
Trx tokens and chain getTokenFromID, getTokensIssuedByAddress, getAccountResources, getChainParameters features-trx-tokens-resources

Best practices

Topic Description Reference
Errors and typing Error instances (e.message), ABI as const for contract inference best-practices-errors-typing
Param validation Validator, notValid(params), param types (address, integer, resource, url, hex, etc.) best-practices-param-validation
Multi-signature getSignWeight, getApprovedList, multiSign, permissionId best-practices-multisig
Transaction lifecycle Sign → broadcast → getTransactionInfo, handling receipt and FAILED best-practices-transaction-lifecycle