Skip to main content

suiSignTransaction

Sui: Sign transaction

Asks device to sign given transaction using the private key derived by given BIP32 path. User is asked to confirm all transaction details on Ukey Wallet.

const result = await HardwareSDK.suiSignTransaction(
connectId,
deviceId,
params,
);

Params

Optional common params

  • path - required string | Array<number> minimum array length is 3. read more
  • rawTx - required string type of serialized transaction string.

rawTx Size limit

  • When UKey Lite 24, UKey Lite 25, or UKey Core 26 firmware is less than 1.1.0, the data size limit is 4KB.
  • When firmware is greater than or equal to 1.1.0, the data size limit is 6KB.

Examples

const rawTx =
"5472616e73616374696f6e446174613a3a0007013eb4b557544a31b5b3a501945821686ce054742e1300000000000000318b8c6a54db5c0b3381440b8d7eec563d80808b29a8402169c5bd18b25e33f1b6029dc25b8b42932aa3b1009f42fa98819da7f483b71251531f10000000000d79422d819a29c37fb96c5efe97a88cb092197983eb4b557544a31b5b3a501945821686ce054742e1300000000000000318b8c6a54db5c0b3381440b8d7eec563d80808b29a8402169c5bd18b25e33f1b602000000000000008b00000000000000";

const response = await HardwareSDK.suiSignTransaction(connectId, deviceId, {
path: "m/44'/784'/1'/0'/0'",
rawTx: rawTx,
});

Result

{
success: true,
payload: {
path: "m/44'/784'/1'/0'/0'",
public_key: string,
signature: string
}
}

Error

{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}