Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TxUtility

TxUtility provides transaction processing functions to be used by other modules.

class

TxUtility

Hierarchy

Index

Methods

getBytesNoHashAndSig

  • getBytesNoHashAndSig(tx: Transaction): Buffer
  • Returns the byte equivalent of a given transaction but does not include the transaction hash and sig fields

    memberof

    TxUtility

    Parameters

    • tx: Transaction

      The transaction

    Returns Buffer

hash

  • hash(tx: Transaction, prefix?: string): string
  • Compute and return the hash of a transaction

    memberof

    TxUtility

    Parameters

    • tx: Transaction

      The transaction

    • Default value prefix: string = "0x"

    Returns string

sign

  • sign(tx: Transaction, sk: PrivateKey, prefix?: string): string
  • Sign and return a signature of the transaction.

    memberof

    TxUtility

    Parameters

    • tx: Transaction

      The transaction

    • sk: PrivateKey

      The private key to use for signing

    • Default value prefix: string = "0x"

    Returns string

    An hex string