TarifsGitHubTableau de bord

TRON

wallet/undelegateresource15 crédits

Builds an unsigned transaction that reclaims delegated resources (Stake 2.0).

Réseau: tron

Paramètres

NomTypeDescription
owner_addressstringTransaction initiator address (base58 or hex).
receiver_addressstringAccount the resource was delegated to (base58 or hex).
balancenumberAmount of staked TRX to reclaim, in sun.
resourcestringBANDWIDTH or ENERGY.
Permission_idnumberPermission ID for multi-signature accounts; defaults to the owner permission (0). (facultatif)
visiblebooleantrue = base58 addresses (in the request and the response); false (default) = hex addresses. (facultatif)

Valeur renvoyée

Type

Object

Unsigned transaction object (txID, raw_data, raw_data_hex, visible). It is only built, not signed or broadcast; sign it and send it with wallet/broadcasttransaction. On failure an object with an Error string (still HTTP 200).

Exemples de code

curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/undelegateresource' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "owner_address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
  "receiver_address": "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb",
  "balance": 1000000,
  "resource": "ENERGY",
  "visible": true
}'