Wallet class abstract
Extend ReadOnlyWallet with signing and transactional capabilities. Signing (private), key, verify (public) key and address generation is handled by the HdWallet instance.
This is currently a prototype wallet and only supports sending simple ADA transactions.
- Inheritance
-
- Object
- ReadOnlyWallet
- Wallet
- Implementers
Constructors
- Wallet()
Properties
- accountIndex → int
-
Account index of wallet, defaults to 0.
no setter
-
addresses
→ List<
ShelleyAddress> -
no setterinherited
- addressKeyPair → Bip32KeyPair
-
Base address key pair used for signing transactions
no setter
-
assets
→ Map<
AssetId, CurrencyAsset> -
assets present in this wallet indexed by assetId
no setterinherited
- balance → Coin
-
balance of wallet in lovelace
no setterinherited
- blockchainAdapter → BlockchainAdapter
-
access to the bockchain
no setterinherited
- calculatedBalance → Coin
-
calculate balance from transactions and rewards
no setterinherited
-
currencies
→ Map<
AssetId, Coin> -
balances of native tokens indexed by assetId
no setterinherited
- firstUnusedChangeAddress → ShelleyAddress
-
Returns first unused change address, used to return unspent change to this wallet.
no setter
- firstUnusedReceiveAddress → ShelleyAddress
-
Returns first unused receive address, used by others to send money to this account.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hdWallet → HdWallet
-
Hierarchical deterministic wallet
no setter
- loadingTime → Duration
-
Duration since update was called. Set to zero when update completes.
no setterinherited
- networkId → NetworkId
-
networkId is either mainnet or nestnet
no setterinherited
- readOnly → bool
-
return true if this is read-only wallet that can't sign transactions and send funds.
no setterinherited
- rootKeyPair → Bip32KeyPair
-
Root private and public key
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stakeAccounts
→ List<
StakeAccount> -
optional stake pool details
no setterinherited
- stakeAddress → ShelleyAddress
-
staking address
no setterinherited
-
transactions
→ List<
WalletTransaction> -
no setterinherited
-
unspentTransactions
→ List<
WalletTransaction> -
no setterinherited
- walletId → WalletId
-
Return walletId. ID is public staking address for Shelley wallets.
no setterinherited
- walletName → String
-
name of wallet
no setterinherited
Methods
-
buildSpendTransaction(
{required ShelleyAddress toAddress, required int lovelace, int ttl = 0, int fee = 0}) → Future< Result< ShelleyTransaction, String> > - Build a simple spend transaction.
-
filterTransactions(
{required AssetId assetId}) → List< WalletTransaction> -
inherited
-
findAssetByTicker(
String ticker) → CurrencyAsset? -
inherited
-
findAssetWhere(
bool matcher(CurrencyAsset asset)) → CurrencyAsset? -
inherited
-
findKeyPairForChangeAddress(
{required ShelleyAddress address, int account = defaultAccountIndex, int index = defaultAddressIndex}) → Bip32KeyPair? - Find signing key for spend or change address.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
{required int balance, required List< RawTransaction> transactions, required List<ShelleyAddress> usedAddresses, required Map<String, CurrencyAsset> assets, required List<StakeAccount> stakeAccounts}) → bool -
inherited
-
sendAda(
{required ShelleyAddress toAddress, required Coin lovelace, int ttl = 0, int fee = 0, bool logTxHex = false, bool logTx = false}) → Future< Result< ShelleyTransaction, String> > - Send ADA to another address.
-
submitTransaction(
{required ShelleyTransaction tx}) → Future< Result< ShelleyTransaction, String> > - Send a transaction.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
) → Future< Result< bool, String> > -
Update or sync wallet transactions with blockchain. Return true if data changed.
Is ignored if loadingTime is not zero.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited