Show / Hide Table of Contents

    Class Address

    Address represents a serializable 32-byte length Algorand address.

    Inheritance
    System.Object
    Address
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Algorand
    Assembly: Algorand.dll
    Syntax
    [JsonConverter(typeof(BytesConverter))]
    public class Address

    Constructors

    | Improve this Doc View Source

    Address()

    default values for serializer to ignore

    Declaration
    public Address()
    | Improve this Doc View Source

    Address(Byte[])

    Create a new address from a byte array.

    Declaration
    [JsonConstructor]
    public Address(byte[] bytes)
    Parameters
    Type Name Description
    System.Byte[] bytes

    array of 32 bytes

    | Improve this Doc View Source

    Address(String)

    Create a new address from an encoded string(encoded by encodeAsString)

    Declaration
    public Address(string encodedAddress)
    Parameters
    Type Name Description
    System.String encodedAddress

    Encoded Address

    Fields

    | Improve this Doc View Source

    LEN_BYTES

    The length of an address. Equal to the size of a SHA256 checksum.

    Declaration
    public const int LEN_BYTES = 32
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    Bytes

    the underlying bytes

    Declaration
    public byte[] Bytes { get; }
    Property Value
    Type Description
    System.Byte[]

    Methods

    | Improve this Doc View Source

    EncodeAsString()

    EncodeAsString converts the address to a human-readable representation, with a 4-byte checksum appended at the end, using SHA256. Note that string representations of addresses generated by different SDKs may not be compatible.

    Declaration
    public string EncodeAsString()
    Returns
    Type Description
    System.String

    the encoded address string

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    IsValid(String)

    check if the address is valid

    Declaration
    public static bool IsValid(string encodedAddress)
    Parameters
    Type Name Description
    System.String encodedAddress

    Address

    Returns
    Type Description
    System.Boolean

    valid or not

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    | Improve this Doc View Source

    VerifyBytes(Byte[], Signature)

    verifyBytes verifies that the signature for the message is valid for the public key. The message should have been prepended with "MX" when signing.

    Declaration
    public bool VerifyBytes(byte[] message, Signature signature)
    Parameters
    Type Name Description
    System.Byte[] message

    the message that was signed

    Signature signature

    signature

    Returns
    Type Description
    System.Boolean

    true if the signature is valid

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX