An Address, as an immutable object.

Constructors

  • Creates an address object, given a raw string (whether a hex pubkey or a Bech32 address), a sequence of bytes, or another Address object.

    Parameters

    • value: string | Uint8Array | Buffer | Address

    Returns Address

Properties

valueHex: string = ""

Methods

  • Compares the address to another address

    Parameters

    Returns boolean

  • Returns the human-readable-part of the bech32 addresses. The HRP is currently hardcoded to "erd".

    Returns string

  • Returns the pubkey as raw bytes (buffer)

    Returns Buffer

  • Returns whether the address is empty.

    Returns boolean

  • Returns whether the address is a smart contract address.

    Returns boolean

  • Returns the bech32 representation of the address

    Returns string

  • Returns the hex representation of the address (pubkey)

    Returns string

  • Converts the address to a pretty, plain JavaScript object.

    Returns object

  • Returns the bech32 representation of the address

    Returns string

  • Creates the Zero address (the one that should be used when deploying smart contracts). Generally speaking, this should not be used by client code (internal use only).

    Returns Address

  • Creates an empty address object. Generally speaking, this should not be used by client code (internal use only).

    Returns Address

  • Performs address validation without throwing errors

    Parameters

    • value: string

    Returns boolean

  • Parameters

    • value: string

    Returns boolean