diff --git a/tronpy/async_tron.py b/tronpy/async_tron.py index 2d0c6cb..27a3165 100644 --- a/tronpy/async_tron.py +++ b/tronpy/async_tron.py @@ -457,6 +457,11 @@ def vote_witness(self, owner: TAddress, *votes: Tuple[TAddress, int]) -> "AsyncT payload = {"owner_address": keys.to_hex_address(owner), "votes": votes} return self._build_transaction("VoteWitnessContract", payload) + def withdraw_rewards(self, owner: TAddress) -> "AsyncTransactionBuilder": + """Withdraw voting rewards.""" + payload = {"owner_address": keys.to_hex_address(owner)} + return self._build_transaction("WithdrawBalanceContract", payload) + # Contract def deploy_contract(self, owner: TAddress, contract: AsyncContract) -> "AsyncTransactionBuilder": diff --git a/tronpy/tron.py b/tronpy/tron.py index 32999d3..eabad2a 100644 --- a/tronpy/tron.py +++ b/tronpy/tron.py @@ -442,6 +442,11 @@ def vote_witness(self, owner: TAddress, *votes: Tuple[TAddress, int]) -> "Transa payload = {"owner_address": keys.to_hex_address(owner), "votes": votes} return self._build_transaction("VoteWitnessContract", payload) + def withdraw_rewards(self, owner: TAddress) -> "TransactionBuilder": + """Withdraw voting rewards.""" + payload = {"owner_address": keys.to_hex_address(owner)} + return self._build_transaction("WithdrawBalanceContract", payload) + # Contract def deploy_contract(self, owner: TAddress, contract: Contract) -> "TransactionBuilder":