filecoinSignTransaction

Use requirement

  • Firmware version required

    • Touch: 3.5.0

    • Classic/Mini: 2.10.0

Filecoin: 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 OneKey.

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

Params

Optional common params

  • path — required string | Array<number> minimum length is 3. read more

  • rawTx - required string type of serialized transaction string.

  • isTestnet - optional boolean Whether test net.

Examples

const response = await HardwareSDK.filecoinSignTransaction(
  connectId,
  deviceId,
  {
    path: "m/44'/461'/0'/0/0",
    rawTx: "4301355cc18d85809872bcbd63cb6ea5ac3c2814a1bacf2e50d8ec62367211917b79ecd1f1a98fa0d793d7cb92ebd9a479dc6aba0ae8570253aa87c0da32db5ed2bd401f3bbee52c2bc55761fd8486fae2e28f46499282f4267b8b90fc8c1cc97bb659b6cc927f2ec1701ef2928ddb84759ba5c557f549db"
  }
);

Result

{
  success: true,
  payload: {
    path: "m/44'/461'/0'/0/0",
    signature: "signed data"
  }
}

Error

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

Last updated