Address class

Bitcoin Address

A bitcoin address. Normal use cases: var address = new Address().fromPubKey(pubKey) var address = new Address().fromString(string) var string = address.toString() var script = address.toTxOutScript() var isValid = Address.isValid(string)

Can also do testnet: var address = Address.Testnet()

Note that an Address and an Addr are two completely different things. An Address is what you send bitcoin to. An Addr is an ip address and port that you connect to over the internet.

Constructors

Address({int? pubKeyHash, int? versionByteNum, int? payToScriptHash, List<int>? hashBuf})
Address.fromBuffer(List<int> buf)
factory
Address.fromPrivKey(PrivKey privKey)
factory
Address.fromPubKey(PubKey pubKey)
factory
Address.fromPubKeyHashBuf(List<int> hashBuf)
factory
Address.fromRandom()
factory
Address.fromString(String str)
factory
Address.fromTxInScript(Script script)
factory
Address.fromTxOutScript(Script script)
factory
Address.Mainnet({int? versionByteNum, List<int>? hashBuf})
factory
Address.Regtest({int? versionByteNum, List<int>? hashBuf})
factory
Address.Testnet({int? versionByteNum, List<int>? hashBuf})
factory

Properties

hashBuf List<int>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
payToScriptHash int?
getter/setter pair
pubKeyHash int?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
versionByteNum int?
getter/setter pair

Methods

fromBuffer(List<int> buf) Address
fromHex(String str) Address
fromPrivKey(PrivKey privKey) Address
fromPubKey(PubKey pubKey) Address
fromPubKeyHashBuf(List<int> hashBuf) Address
fromRandom() Address
fromString(String str) Address
fromTxInScript(Script script) Address
fromTxOutScript(Script script) Address
isValid() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBuffer() List<int>
toHex() String
toString() String
A string representation of this object.
override
toTxOutScript() Script
validate() Address

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

staticIsValid(String addrstr) bool