Currency class

Interface Wallet interacts with, potentially supports multiple cryptos

Implementers

Constructors

Currency()
const
Currency.fromJson(String x)
Called by Wallet.fromFile to load a wallet for an arbitrary Currency
factory

Properties

bip44CoinType int
Coin ID for HD wallets. e.g. 831. Reference: https://github.com/satoshilabs/slips/blob/master/slip-0044.md
read-only
coinbaseMaturity int
Number of blocks until mining rewards are spendable.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
nullAddress PublicAddress
Address with the value of zero.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
ticker String
Name of the currency. e.g. CRUZ.
read-only

Methods

createNetwork([VoidCallback peerChanged, VoidCallback tipChanged]) PeerNetwork
Create a PeerNetwork instance for this currency.
deriveAddress(Uint8List seed, String path, [StringCallback debugPrint]) Address
Derives the Address specified by Wallet.seed and path.
format(num v) String
Format Currency denominated value v. e.g. For v = 1000000 (Satoshis) return '.01' (BTC).
fromAddressJson(Map<String, dynamic> json) Address
Unmarshals a JSON-encoded string to Address.
fromBlockIdJson(String text, [bool pad = false]) BlockId
Unmarshals a JSON-encoded string to BlockId.
fromPrivateKey(PrivateKey key) Address
Creates a non-HD Address specified by key.
fromPrivateKeyJson(String text) PrivateKey
Unmarshals a JSON-encoded string to PrivateKey.
fromPublicAddressJson(String text) PublicAddress
Unmarshals a JSON-encoded string to PublicAddress.
fromPublicKey(PublicAddress key) Address
Creates a watch-only Address specified by key.
fromTransactionIdJson(String text, [bool pad = false]) TransactionId
Unmarshals a JSON-encoded string to TransactionId.
fromTransactionJson(Map<String, dynamic> json) Transaction
Unmarshals a JSON-encoded string to Transaction.
genesisBlock() Block
The Block with Block.height equal zero.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
parse(String v) num
Parse Ticker value v into discerete Currency units. e.g. For v = '.01' (BTC) return 1000000 (Satoshis).
parseTime(int time) DateTime
Returns DateTime for BlockHeader.time and Transaction.time.
signedTransaction(Address from, PublicAddress to, num amount, num fee, String memo, int height, {int matures, int expires}) Transaction
Create signed Transcation using the Address.privateKey for from. Transfers amount to to once if transmitted to the PeerNetwork.
suggestedFee(Transaction transaction) String
Suggests a fee for transaction.
supply(int height) int
Returns number of coins issued at height.
toJson() String
Marshals Currency as a JSON-encoded string.
toString() String
Returns a string representation of this object.
inherited

Operators

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