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 OneKey.
const response = await HardwareSDK.solGetAddress(connectId, deviceId, params)
Exporting single address
path
— requiredstring | Array<number>
length is4
, Here's a special chain. more informationshowOnOneKey
— optionalboolean
determines if address will be displayed on device. Default is set totrue
Exporting bundle of addresses
bundle
-Array
of Objects withpath
andshowOnOneKey
fields
Display address of first sol account:
HardwareSDK.solGetAddress(connectId, deviceId, {
path: "m/44'/501'/0'/0'"
});
Return a bundle of sol addresses without displaying them on device:
HardwareSDK.aptosGetAddress(connectId, deviceId, {
bundle: [
{ path: "m/44'/501'/0'/0'", showOnOneKey: false }, // account 1
{ path: "m/44'/501'/1'/0'", showOnOneKey: false }, // account 2
{ path: "m/44'/501'/2'/0'", showOnOneKey: false } // account 3
]
});
Result with only one address
{
success: true,
payload: {
address: string, // displayed address
path: Array<number> // hardended path
}
}
Result with bundle of addresses sorted by FIFO
{
success: true,
payload: [
{ address: string, path: Array<number> }, // account 1
{ address: string, path: Array<number> }, // account 2
{ address: string, path: Array<number> } // account 3
]
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}