Skip to Content
Hardware
On this page

tronGetAddress

TRON: get address

Derives and returns the address at the specified path. When showOnOneKey is true, the user must confirm the address on the device.

const response = await HardwareSDK.tronGetAddress(connectId, deviceId, params)

Params

Optional common params

Single address

  • path - required string | Array<number> SDK minimum length is 3. more information
  • showOnOneKey - optional boolean Whether to display the address on the device. Defaults to true.

Multiple addresses

  • bundle - array of objects with path and showOnOneKey fields

Example

Display the address for the first tron account:

HardwareSDK.tronGetAddress(connectId, deviceId, { path: "m/44'/195'/0'/0/0" });

Return a bundle of tron addresses without displaying them on the device:

HardwareSDK.tronGetAddress(connectId, deviceId, { bundle: [ { path: "m/44'/195'/0'/0/0", showOnOneKey: false }, // account 1 { path: "m/44'/195'/1'/0/0", showOnOneKey: false }, // account 2 { path: "m/44'/195'/2'/0/0", showOnOneKey: false } // account 3 ] });

Result

Single-address response

{ success: true, payload: { address: string, // displayed address path: string // serialized BIP32 path } }

Batch response, in the same order as the request

{ success: true, payload: [ { address: string, path: string }, // account 1 { address: string, path: string }, // account 2 { address: string, path: string } // account 3 ] }

Error

{ success: false, payload: { error: string, // error message code?: string | number // error code } }
Last updated on