SDK Functions

Get Chain Parameters

tronStationSDK.getChainParameters();

Returns chain data from the blockchain.

Get Resource

tronStationSDK.getResource('TGzz8gjYiYRqpfmDwnLxfgPuLVNmpCswVp');

Returns resources from account.

ValueDescription
AddressAddress of account

Calculate Frozen Energy

tronStationSDK.calculateFrozenEnergy(10000);

Returns the amount of energy generated by freezing TRX.

ValueDescription
Amount (sun)Amount of TRX in sun

Calculate Burn Energy

tronStationSDK.calculateBurnEnergy(10000);

Returns the amount of energy generated by burning TRX.

ValueDescription
Amount (sun)Amount of TRX in sun

Calculate Max Energy Limit

tronStationSDK.calculateMaxEnergyLimit('TGzz8gjYiYRqpfmDwnLxfgPuLVNmpCswVp', 10000);

Returns max energy limit data to deploy/trigger contract.

ValueDescription
AddressAddress of account
Amount (sun)Amount of TRX in sun

Calculate Frozen Bandwidth

tronStationSDK.calculateFrozenBandwidth(10000);

Returns the amount of bandwidth generated by freezing TRX.

ValueDescription
Amount (sun)Amount of TRX in sun

Get Account Bandwidth

tronStationSDK.getAccountBandwidth('TGzz8gjYiYRqpfmDwnLxfgPuLVNmpCswVp');

Returns bandwidth data from account.

ValueDescription
AddressAddress of account

Get SR Vote Reward List

tronStationSDK.getSrVoteRewardList();

Returns vote reward list of SR/Candidates ordered by rank.

Calculate SR Reward

tronStationSDK.calculateSrReward(10000, 'TGzz8gjYiYRqpfmDwnLxfgPuLVNmpCswVp');

Returns vote reward calculation for SR/Candidate.

ValueDescription
VotesAmount of votes to be added in vote reward calculation
Address (optional)Address of account