ReadOnlyWalletImpl class

Given a stakingAddress, generate a read-only wallet with balances of all native assets, transaction history, staking and reward history.

Implemented types
Implementers

Constructors

ReadOnlyWalletImpl({required BlockchainAdapter blockchainAdapter, required ShelleyAddress stakeAddress, required String walletName})

Properties

addresses List<ShelleyAddress>
no setteroverride
assets Map<String, CurrencyAsset>
assets present in this wallet indexed by assetId
no setteroverride
balance Coin
balance of wallet in lovelace
no setteroverride
blockchainAdapter BlockchainAdapter
access to the bockchain
final
calculatedBalance Coin
calculate balance from transactions and rewards
no setteroverride
currencies Map<String, Coin>
balances of native tokens indexed by assetId
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
loadingTime Duration
Duration since update was called. Set to zero when update completes.
no setteroverride
networkId NetworkId
networkId is either mainnet or nestnet
final
readOnly bool
return true if this is read-only wallet that can't sign transactions and send funds.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stakeAccounts List<StakeAccount>
optional stake pool details
no setteroverride
stakeAddress ShelleyAddress
staking address
final
transactions List<WalletTransaction>
no setteroverride
unspentTransactions List<WalletTransaction>
no setteroverride
updateTimeout Duration
Timeout on update call. Hard-coded to 2 minutes
no setter
walletId WalletId
Return walletId. ID is public staking address for Shelley wallets.
no setteroverride
walletName String
name of wallet
final

Methods

filterTransactions({required String assetId}) List<WalletTransaction>
override
findAssetByTicker(String ticker) CurrencyAsset?
override
findAssetWhere(bool matcher(CurrencyAsset asset)) CurrencyAsset?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh({required Coin balance, required List<ShelleyAddress> usedAddresses, required List<RawTransaction> transactions, required Map<String, CurrencyAsset> assets, required List<StakeAccount> stakeAccounts}) bool
override
toString() String
A string representation of this object.
override
update() Future<Result<bool, String>>
Update or sync wallet transactions with blockchain. Return true if data changed. Is ignored if loadingTime is not zero.
override

Operators

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