Skip to main content

alephiumGetAddress

Use requirement

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

Alephium: get address

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

const result = await HardwareSDK.alephiumGetAddress(connectId, deviceId, {
path: "m/44'/1234'/0'/0/0",
showOnUKey: false,
group: 0,
includePublicKey: true,
});

Params

Optional common params

Exporting single address

  • path - required string | Array<number> minimum length is 3
  • group - optional number | undefined | null
  • showOnUKey - optional boolean determines if address will be displayed on device. Default is set to true

Exporting bundle of addresses

  • bundle - Array of Objects with path and showOnUKey and group fields

Example

// Get single address
const response = await HardwareSDK.alephiumGetAddress(connectId, deviceId, {
path: "m/44'/1234'/0'/0/0",
showOnUKey: true,
});

// Get multiple addresses
const batchResponse = await HardwareSDK.alephiumGetAddress(
connectId,
deviceId,
{
bundle: [
{
path: "m/44'/1234'/0'/0/0",
showOnUKey: false,
},
{
path: "m/44'/1234'/1'/0/0",
showOnUKey: false,
},
],
},
);

Result

Result with only one address

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

Result with bundle of addresses sorted by FIFO

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

Error

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