Skip to main content

confluxGetAddress

Use requirement

  • Firmware version required
    • UKey Lite 24 / UKey Lite 25: 2.4.0
    • UKey Core 26: 1.1.0

Conflux: get address

Display requested address derived by given BIP32 path on device and returns it to caller. User is presented with a description of the requested key and asked to confirm the export on Ukey Wallet.

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

Params

Optional common params

Exporting single address

  • path - required string | Array<number> minimum length is 5. more information
  • showOnUKey - optional boolean determines if address will be displayed on device. Default is set to true
  • chainId - optional number of the id of the chain, default is 1029 .

Exporting bundle of addresses

  • bundle - Array of Objects with path and showOnUKey fields

Example

Display address of first conflux account:

HardwareSDK.confluxGetAddress({
path: "m/44'/503'/0'/0/0",
chainId: 1029,
});

Return a bundle of conflux addresses without displaying them on device:

HardwareSDK.confluxGetAddress(connectId, deviceId, {
bundle: [
{ path: "m/44'/503'/0'/0/0", chainId: 1029, showOnUKey: false }, // account 1
{ path: "m/44'/503'/1'/0/0", chainId: 1029, showOnUKey: false }, // account 2
{ path: "m/44'/503'/2'/0/0", chainId: 1029, showOnUKey: false }, // account 3
],
});

Result

Result with only one address

{
success: true,
payload: {
address: string, // displayed address
path: Array<number> // hardended path
}
}

Result with bundle of addresses sorted by FIFO

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

Error

{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}