Skip to content

v0.25.2

Choose a tag to compare

@github-actions github-actions released this 19 Mar 02:34
· 46 commits to master since this release
adde9a9

🔖 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, LedgerSigner implementations (#260)
  • DecodeContractData — decode transaction parameters into human-readable structs with base58 addresses and TRX amounts (#259)
  • ABI plain-value inference — LoadFromJSONWithMethod infers parameter types from method signature (#258)
  • TriggerContractWithData — accept pre-packed []byte ABI data directly (#249)
  • TriggerConstantContract with callValue — variadic WithCallValue() 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 zeroKey bug — SignTx no 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 — HexStringToBytes strips only leading 0x, not internal occurrences (#265)
  • BIP44 m/ prefix — NewParamsFromPath now accepts standard m/44'/195'/0'/0/0 format (#248)

📖 Documentation

  • Comprehensive Go doc comments across all pkg/ packages (#261)

Full Changelog: v0.25.1...v0.25.2