Represents a Massa blockchain address.

Hierarchy

  • Address

Implements

  • Serializable

Constructors

  • Creates a new Address;

    Parameters

    • _value: string = ''

      A byte string that represents the address data.

    Returns Address

Methods

  • Deserialize the address.

    TODO: explain why we need this method

    Remarks

    This method deserializes a byte array into an Address object. Caller can test if the deserialization is successful by checking the Result wrapping the offset value. This offset can be used to identify where the next element starts in the byte array, if any.

    Returns

    The offset of the next serialized object in the byte array wrapped in a Result.

    Parameters

    • data: StaticArray<number>

      The byte string to deserialize.

    • offset: number = 0

      The offset of the current serialized address object in the byte array.

    Returns Result<number>

  • Tests if two addresses are identical.

    Remarks

    This method compares the string representation of the current Address object to another Address object to determine if they are identical.

    Returns

    true if the addresses are identical, false otherwise.

    Parameters

    • address: Address

      The address object to compare.

    Returns boolean

  • Tests if two addresses are different.

    Remarks

    This method compares the string representation of the current Address object to another Address object to determine if they are different.

    Returns

    true if the addresses are different, false otherwise.

    Parameters

    • address: Address

      The address object to compare.

    Returns boolean

  • Serialize the address.

    Remarks

    This method is used to serialize an Address object into a byte array, which can be passed as an argument to another smart contract's method, or stored in persistent storage.

    Returns

    The serialized byte string of the address.

    Returns StaticArray<number>

  • Convert the address to a string.

    Returns

    A string representation of the address.

    Returns string

Generated using TypeDoc