Package 

Class Address

  • All Implemented Interfaces:

    
    public final class Address
    
                        

    A bitcoin address.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Address(String address)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Address fromScript(Script script, Network network) Construct an `Address` from an output script.
      final Payload payload() Return the Payload
      final Network network() Return the Network.
      final Script scriptPubkey() Return the ScriptPubKey.
      final String toQrUri() Creates a URI string bitcoin:address optimized to be encoded in QR codes.
      final String asString() Return the address as a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Address

        Address(String address)
        Parameters:
        address - The address in string format.
    • Method Detail

      • toQrUri

         final String toQrUri()

        Creates a URI string bitcoin:address optimized to be encoded in QR codes.

        If the address is bech32, both the schema and the address become uppercase. If the address is base58, the schema is lowercase and the address is left mixed case.

        Quoting BIP 173 "inside QR codes uppercase SHOULD be used, as those permit the use of alphanumeric mode, which is 45% more compact than the normal byte mode."