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
Exporting single address
path- requiredstring | Array<number>minimum length is 3group- optionalnumber | undefined | nullshowOnUKey- optionalbooleandetermines if address will be displayed on device. Default is set totrue
Exporting bundle of addresses
bundle-Arrayof Objects withpathandshowOnUKeyandgroupfields
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
}
}