kaspaSignTransaction

Use requirement

  • Firmware version required

    • Touch: 4.3.0

    • Classic/Mini: 3.0.0

Kaspa: 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.kaspaSignTransaction(connectId, deviceId, params);

Params

Optional common params

  • version - required number transaction version.

  • inputs - required Array of KaspaSignInputParams.

  • outputs - required Array of KaspaSignOutputParams.

  • lockTime - required number

  • sigHashType - required number

    • SIGHASH_ALL = 0x01,
      SIGHASH_NONE = 0x02,
      SIGHASH_SINGLE = 0x03,
      SIGHASH_FORKID = 0x40,
      SIGHASH_ANYONECANPAY = 0x80,
  • sigOpCount - optional number

  • subNetworkID - optional string

  • prefix - optional string Address prefix. Default is set to kaspa

  • scheme - optional string Encryption algorithm mode. Default is set to schnorr

Examples

Result

Error

Last updated

Was this helpful?