Skip to main content

filecoinGetAddress

Use requirement

  • Firmware version required
    • UKey Lite 24 / UKey Lite 25: 2.10.0
    • UKey Core 26: 3.5.0

Filecoin: get address

Retrieves BIP32 extended public derived by given BIP32 path. User is presented with a description of the requested key and asked to confirm the export.

const result = await HardwareSDK.filecoinGetAddress(
connectId,
deviceId,
params,
);

Params

Optional common params

Exporting single public key

  • path - required string | Array<number> minimum length is 3. read more
  • showOnUKey - optional boolean determines if address will be displayed on device. Default is set to true
  • isTestnet - optional boolean Whether test net.

Exporting bundle of public keys

  • bundle - Array of Objects with path, coin fields

Example

Return public key of first ethereum account:

HardwareSDK.filecoinGetAddress(connectId, deviceId, {
path: "m/44'/461'/0'/0/0",
showOnUKey: true,
isTestnet: false,
});

Return a bundle of public keys for multiple ethereum accounts:

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

Result

Result with only one public key

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

Result with bundle of public keys

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

Error

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