Repository navigation
v0.25.2
🔖 Release: v0.25.2 — Transaction Builder, Contract Builder & Security Fixes
Major feature release introducing the fluent transaction/contract builder pattern, new SDK methods, and critical security fixes.
✨ Features
- Transaction builder — fluent API for native TRON operations:
Transfer,FreezeV2,VoteWitness, etc. with.Build(),.Send(),.EstimateEnergy()terminals (#260) - Contract call builder — generic smart contract interaction with
.Method(),.Params(),.WithABI(),.WithData()and the same multi-terminal pattern (#260) - TRC20 standard extension —
trc20.New(client, addr)with typed methods and rich return types (#260) - Signer interface — decoupled signing with
PrivateKeySigner,KeystoreSigner,LedgerSignerimplementations (#260) DecodeContractData— decode transaction parameters into human-readable structs with base58 addresses and TRX amounts (#259)- ABI plain-value inference —
LoadFromJSONWithMethodinfers parameter types from method signature (#258) TriggerContractWithData— accept pre-packed[]byteABI data directly (#249)TriggerConstantContractwith callValue — variadicWithCallValue()option for simulating payable functions (#254)- TRC20
WithEstimate()— estimate energy for TRC20 operations without executing (#255) BytesToAddress/EthAddressToAddress— address conversion utilities (#252)- Pending pool methods —
GetTransactionFromPending,GetTransactionListFromPending,GetPendingSize(#251) tronctl upgrade— self-update command that downloads the latest release (#250)
🐛 Bug Fixes
- Keystore
zeroKeybug —SignTxno longer zeroes the unlocked key after signing, fixing silent multi-sign failures (#253) - Ledger signing — return proper error and signature from
SignTx(#267) - Mnemonic generation —
Generate()now returns errors instead of silently discarding them (#266) - Hex prefix stripping —
HexStringToBytesstrips only leading0x, not internal occurrences (#265) - BIP44
m/prefix —NewParamsFromPathnow accepts standardm/44'/195'/0'/0/0format (#248)
📖 Documentation
- Comprehensive Go doc comments across all
pkg/packages (#261)
Full Changelog: v0.25.1...v0.25.2