Address class

Works with both legacy and cashAddr formats of the address

There is no reason to instanciate this class. All constants, functions, and methods are static. It is assumed that all necessary data to work with addresses are kept in the instance of ECPair or Transaction

Constructors

Address()

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Methods

details(dynamic addresses, [ dynamic returnAsMap = false ]) → Future
Returns details of the provided address or addresses [...]
detectFormat(String address) → int
Detects type of the address and returns formatCashAddr or formatLegacy
getUnconfirmed(dynamic addresses, [ dynamic returnAsMap = false ]) → Future
Returns list of unconfirmed transactions [...]
toBase58Check(Uint8List hash, int version) → String
Generates legacy address format
toCashAddress(String legacyAddress, [ bool includePrefix = true ]) → String
Converts legacy address to cash address
toLegacyAddress(String cashAddress) → String
Converts cashAddr format to legacy address
utxo(dynamic addresses, [ dynamic returnAsMap = false ]) → Future
Returns Utxo or a List of Utxos for the address or addresses. [...]
validateAddress(String address) → Future<Map<String, dynamic>>
Returns information about the given Bitcoin Cash address. [...]

Constants

formatCashAddr → const int
0
formatLegacy → const int
1