TRON
wallet/freezebalanceКредиты: 15
Builds an unsigned Stake 1.0 freeze transaction (legacy; use wallet/freezebalancev2 for Stake 2.0).
Параметры
| Имя | Тип | Описание |
|---|---|---|
| owner_address | string | Transaction initiator address (base58 or hex). |
| frozen_balance | number | TRX to freeze, in sun. |
| frozen_duration | number | Freeze duration in days (3 on mainnet). |
| resource | string | Resource to obtain: BANDWIDTH or ENERGY. |
| receiver_address | string | Account that receives the resource; the owner when omitted. (необязательно) |
| Permission_id | number | Permission ID for multi-signature accounts; defaults to the owner permission (0). (необязательно) |
| visible | boolean | true = base58 addresses (in the request and the response); false (default) = hex addresses. (необязательно) |
Результат
Тип
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).
Примеры кода
curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/freezebalance' \
-X POST \
-H 'content-type: application/json' \
-d '{
"owner_address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
"frozen_balance": 1000000,
"frozen_duration": 3,
"resource": "ENERGY",
"visible": true
}'