solGetAddress
Solana: get address
Display the requested address derived from the given BIP32 path on the device and return it to the caller. The user is asked to confirm the export on Ukey Wallet.
const response = await HardwareSDK.solGetAddress(connectId, deviceId, params);
Params
Exporting single address
path- requiredstring | Array<number>length is4for this special chain. more informationshowOnUKey- optionalbooleandetermines whether the address will be displayed on the device. Default istrue.
Exporting bundle of addresses
bundle-Arrayof objects withpathandshowOnUKeyfields
Example
Display the address of the first Solana account:
HardwareSDK.solGetAddress(connectId, deviceId, {
path: "m/44'/501'/0'/0'",
});
Return a bundle of Solana addresses without displaying them on the device:
HardwareSDK.solGetAddress(connectId, deviceId, {
bundle: [
{ path: "m/44'/501'/3'/0'", showOnUKey: false }, // fourth derivation path
{ path: "m/44'/501'/4'/0'", showOnUKey: false }, // fifth derivation path
{ path: "m/44'/501'/5'/0'", showOnUKey: false }, // sixth derivation path
],
});
Result
Result with only one address
{
success: true,
payload: {
address: string, // displayed address
path: Array<number> // derived path
}
}
Result with a bundle of addresses in the same order as the request
{
success: true,
payload: [
{ address: string, path: Array<number> }, // fourth derivation path
{ address: string, path: Array<number> }, // fifth derivation path
{ address: string, path: Array<number> } // sixth derivation path
]
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}