Skip to main content

evmGetAddress

Ethereum: 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.evmGetAddress(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 identifies the target Ethereum network and helps distinguish different chain configurations. Reference.

Exporting bundle of addresses

  • bundle - Array of Objects with path and showOnUKey fields

Example

Display an Ethereum account address on the device:

HardwareSDK.evmGetAddress({
path: "m/44'/60'/0'/0/1",
chainId: 1,
});

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

HardwareSDK.evmGetAddress({
bundle: [
{ path: "m/44'/60'/0'/0/1", chainId: 1, showOnUKey: false }, // account example 1
{ path: "m/44'/60'/0'/0/2", chainId: 1, showOnUKey: false }, // account example 2
{ path: "m/44'/60'/0'/0/3", chainId: 1, showOnUKey: false }, // account example 3
],
});

Result

Result with only one address

{
success: true,
payload: {
address: string, // returned address
path: Array<number> // derivation path
}
}

Result with bundle of addresses in the same order as the request

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

Error

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