I have tried to add method from Tron FullNode HTTP API 'DelegateResource' to be able to send ENERGY and BANDWIDTH from Staking2.0 to another address (https://developers.tron.network/reference/delegateresource-1).
But Library doesn't catch it up.
Can anyone please help me (ready to pay for the help)?
Code I am trying to add to 'TransactionBuilder.php' file in 'src' directory:
I have tried to add method from Tron FullNode HTTP API 'DelegateResource' to be able to send ENERGY and BANDWIDTH from Staking2.0 to another address (https://developers.tron.network/reference/delegateresource-1). But Library doesn't catch it up.
Can anyone please help me (ready to pay for the help)?
Code I am trying to add to 'TransactionBuilder.php' file in 'src' directory:
public function DelegateEnergy(float $amount, string $resource, string $address, string $toaddress) { return $this->tron->getManager()->request('wallet/delegateresource', [ 'owner_address' => $this->tron->address2HexString($address), 'receiver_address' => $this->tron->address2HexString($toaddress), 'balance' => $this->tron->toTron($amount), 'resource' => $resource, 'lock' => false, 'visible' => true ]); }
Code I am calling the method:
ERROR I get - "Fatal error: Uncaught Error: Call to a member function DelegateEnergy() on null in".
My Method doesn't show when checking the TRON Class's method.