Sign#

Sign Legacy Input#

defichain.transactions.rawtransactions.sign.sign_legacy_input(privateKey: str, data: bytes, sigHash: bytes) str#

Signs the given data with a given private key in a deterministic way

Parameters:
  • privateKey (str) – (required) private key to sign the input

  • data (bytes) – (required) data that has to be signed

  • sigHash (bytes) – (required) sigHash to be signed with

Returns:

“hex” - signature of data

Sign Segwit Input#

defichain.transactions.rawtransactions.sign.sign_segwit_input(privateKey: str, data: bytes) str#

Signs the given data with a given private key in a deterministic way

Parameters:
  • privateKey (str) – (required) private key to sign the input

  • data (bytes) – (required) data that has to be signed

Returns:

“hex” - signature of data