Skip to main content

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

Optional common params

Exporting single address

  • path - required string | Array<number> minimum length is 5. more information
  • 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 fields

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
}
}