Releases: tronprotocol/tronweb
v6.3.0
New Features
-
Added
trx.getContractInfoAdded
trx.getContractInfo(contractAddress)method that retrieves detailed contract information via thewallet/getcontractinfonode API endpoint. -
Extended
deserializeTxwith full contract type coverageAdded deserialization support for all remaining
TransactionBuildercontract types viaraw_data_hex:- Account:
AccountCreateContract,AccountUpdateContract,SetAccountIdContract,AccountPermissionUpdateContract - Stake / Vote:
FreezeBalanceContract,UnfreezeBalanceContract,VoteWitnessContract - Proposal:
ProposalCreateContract,ProposalApproveContract,ProposalDeleteContract - Smart contract:
CreateSmartContract,UpdateSettingContract,UpdateEnergyLimitContract,ClearABIContract - DEX:
ExchangeCreateContract,ExchangeInjectContract,ExchangeWithdrawContract,ExchangeTransactionContract UpdateBrokerageContract
- Account:
Improvements
-
Plugin restrictions
- Added
PROTECTED_MODULESto prevent plugins from overriding 2 modules:transactionBuilder,plugin. - Added
PROTECTED_METHODSto block plugins from overriding critical signing/key methods:sign,signMessage,signMessageV2,signTransaction,signTypedData,multiSign,setPrivateKey,ecRecover. ⚠️ Note: Plugin support will be removed in the next major version.
- Added
-
Bug fix
- Corrected the return type of the
getDelegatedResourceV2intrx.tsto consistently return an array.
- Corrected the return type of the
Changes
- Remove dev dependency @eslint/eslintrc.
- Bump serialize-javascript from 7.0.3 to 7.0.5.
v6.2.2
New Features
-
Added
getCreate2Address-
Added support for
utils.address.getCreate2Addressutility method. -
Enables deterministic contract address computation using CREATE2.
-
Useful for advanced contract deployment workflows and meta-deployment scenarios.
-
Improvements
-
Improvement in
decodeParams-
Replaced {} with Object.create(null) in decodeParams.
-
Prevents prototype pollution.
-
-
Robust argument encoding in
encodeArgs-
Prevents valid falsy values from being incorrectly ignored.
-
Improves reliability of contract parameter encoding.
-
-
Strict contract type validation in
contractJsonToProtobuf-
Now throws an explicit error when encountering unsupported contract.type.
-
Prevents silent failures during contract conversion.
-
Improves developer debugging experience.
-
v6.2.1
Changes
- Bump axios from v1.12.2 to v1.13.5
- Bump webpack from v5.98.0 to v5.105.2
v6.2.0
New Features
-
trx.getNowWitnessList
Added a new method to retrieve the witness list with real-time vote counts. This feature is available for JAVA-TRON v4.8.1 and above. -
New deserialization support
Added support for deserializing the following transaction types fromraw_data_hex:TransferAssetContractParticipateAssetIssueContractAssetIssueContractUpdateAssetContract
v6.1.1
Changes
- Remove dependency jsonwebtoken.
- Bump validator from v13.15.20 to v13.15.23.
- Address other audit issues.
v6.1.0
New Features
-
New deserialization support
Added support for deserializing the following transaction types fromraw_data_hex:TransferContractWithdrawBalanceContractWitnessCreateContract
-
trx.getCurrentRefBlockParams
Provides a method to retrieve the parameters required for transaction building. Users can pass these parameters to transaction constructors and customize the header information, making transaction creation more convenient. -
trx.signTypedDataalias
Addedtrx.signTypedDataas an alias pointing to the legacytrx._signTypedDatamethod.
Changes
-
Removed
getHeaderInfofrom thetransactionBuilderhelper library. Usetrx.getCurrentRefBlockParamsinstead. -
Moved the
deserializeTransactionfunction fromutils/transactiontoutils/deserializeTxfor better scalability and maintainability of future modules. -
Dependency updates:
axiosupgraded from 1.11.0 to 1.12.2puppeteerupgraded from 24.4.0 to 24.23.0
v6.0.4
New Features
- Improve type inference in
Contractmodule when using typescript.- The
Contractnow infers method signatures based on the provided ABI. - To enable accurate inference, the ABI should be defined using the
as constassertion or passed directly into tronWeb.contract().
- The
Change
- Change the return behavior of the
contract.new()method.- Previously, this method mutated the current instance and used the ABI stored on the Tron blockchain, which proved to be unreliable. It now returns a new instance that uses the ABI provided in the options parameter.
- Export
GetEventResultOptionsandEventResponse. - Allow using length as the value of the name field in the ABI, but you cannot use
result['length']to read its value. - Bump
axiosfrom 1.8.3 to 1.11.0, bumpeslintfrom 9.22.0 to 9.31.0.
Bug Fixes
- Fix the issue where
addUpdateDatatreats numeric strings as numbers.#629- Starting from TronWeb v6.0.4,
addUpdateDatawill useTronWeb.fromUtf8to convert the provided data string—unless it starts with '0x'. - If the resulting data string has an odd length, a '0' will be prepended to ensure even length.
- Starting from TronWeb v6.0.4,
v6.0.3
- Add support for deserializing 6 more transactions.
- Fix npm audit issues.
- Fix the error in the abi variable within transactionBuilder.createSmartContract.
- Export Method class.
- Add missing fields in internal_transactions.
v5.3.4
- Fix CSP problem in the TransactionBuilder.vote function.
v5.3.3
- Update dependencies to address audit problems.