suiGetAddress
Sui: get address
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 Ukey Wallet.
const response = await HardwareSDK.suiGetAddress(connectId, deviceId, params);
Params
Exporting single address
path- requiredstring | Array<number>minimum length is 5. more informationshowOnUKey- optionalbooleandetermines if address will be displayed on device. Default is set totrue
Exporting bundle of addresses
bundle-Arrayof Objects withpathandshowOnUKeyfields
Example
Display the address of the second Sui account:
HardwareSDK.suiGetAddress(connectId, deviceId, {
path: "m/44'/784'/1'/0'/0",
});
Return a bundle of Sui addresses without displaying them on the device:
HardwareSDK.suiGetAddress(connectId, deviceId, {
bundle: [
{ path: "m/44'/784'/3'/0'/0", showOnUKey: false }, // fourth derivation path
{ path: "m/44'/784'/4'/0'/0", showOnUKey: false }, // fifth derivation path
{ path: "m/44'/784'/5'/0'/0", showOnUKey: false }, // sixth derivation path
],
});
Result
Result with only one address
{
success: true,
payload: {
address: string, // displayed address
path: Array<number>, // hardended path
publicKey?: string, // optional - public key
}
}
Result with bundle of addresses sorted by FIFO
{
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
}
}