# Signature

Represents a blockchain signature (66 bytes)

# Constructor

  • constructor()
    Creates an empty signature, data is added through unpack function.

# Fields

  • var data: u8[] | null;

    Data bytes of signature, null by default

# Instance Methods

  • static function pack(): u8[]

    Returns serialized data bytes in the signature

  • static function unpack(data: u8[]): usize

    Sets first 66 bytes of data array as the signature data. Returns the position of the decoder

  • static function toString(): string

    Prints the hex representation of the bytes in the signature

# Static Equality methods

  • static function eq(a: Signature, b: Signature): bool

    Checks that the two signature bytes are equal

  • static function neq(a: Signature, b: Signature): bool

    Checks that the signature bytes are not equal