Function numberToBinInt32TwosCompliment

  • Encode an integer as a 4-byte, little-endian Uint8Array using the number's two's compliment representation (the format used by JavaScript's bitwise operators).

    Parameters

    • value: number

      the number to encode

    Returns Uint8Array

    Remarks

    The C++ bitcoin implementations sometimes represent short vectors using signed 32-bit integers (e.g. sighashType). This method can be used to test compatibility with those implementations.

Generated using TypeDoc