Interface Address

    • Method Detail

      • getParameters

        @Deprecated
        default NetworkParameters getParameters()
        Deprecated.
        Returns:
        network this data is valid for
      • getHash

        byte[] getHash()
        Get either the public key hash or script hash that is encoded in the address.
        Returns:
        hash that is encoded in the address
      • getOutputScriptType

        ScriptType getOutputScriptType()
        Get the type of output script that will be used for sending to the address.
        Returns:
        type of output script
      • compareTo

        int compareTo​(Address o)
        Comparison field order for addresses is:
        1. Network.id()
        2. Legacy vs. Segwit
        3. (Legacy only) Version byte
        4. remaining bytes

        Implementations use PARTIAL_ADDRESS_COMPARATOR for tests 1 and 2.

        Specified by:
        compareTo in interface java.lang.Comparable<Address>
        Parameters:
        o - other Address object
        Returns:
        comparison result
      • network

        Network network()
        Get the network this address works on. Use of BitcoinNetwork is preferred to use of NetworkParameters when you need to know what network an address is for.
        Returns:
        the Network.