getdelegatedresourceaccountindex

Tron RPC

Archive Method

Only on the full archive nodes. Complex queries might take longer and incur additional cost

How to use it

// yarn add @tatumio/tatum

import { TatumSDK, Tron, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Tron>({ network: Network.TRON })

const res = await tatum.rpc.getDelegatedResourceAccountIndex('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', {
  visible: true,
})

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

Overview

getDelegatedResourceAccountIndex is a method provided by TRON RPC allowing you to query the resource delegation by an account during stake1.0 phase. Essentially, this allows you to list all addresses that have delegated resources to a specific account.

Parameters

  • value (string): Address, default hexString.
  • options (object, optional): This optional parameter contains the following properties:
    • visible (boolean, optional) - Whether the address is in base58 format.

Return Object

  • account (string) - account address.
  • fromAccounts (string[]) - A list of account addresses which delegate resource to this account.
  • toAccounts (string[]) - A list of account addresses which receive resources delegated by this account.

HTTP Request Example

{
  "value": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
  "visible": true
}

HTTP Response Example

{
  "account": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g"
}

Please note that the addresses in fromAccounts and toAccounts will vary based on the resources delegated to and from the account.