AccountRepository class abstract

Repository that can be used in data-classes related to Accounts. This repository can be used as

Implementers

Constructors

AccountRepository.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAccount(AccountToAdd account) Future<Address>
Add account to storage.
addAccounts(List<AccountToAdd> accounts) Future<List<Address>>
Add list of accounts to storage. Same as addAccount but for multiple accounts.
addExternalAccount({required Address address, PublicKey? publicKey, String? name}) Future<void>
Add external account with address. If publicKey is not specified, then all public keys will be checked. Throws an exception if no external accounts were added. name is optional. This method calls addAccount inside.
addTokenWallet({required Address address, required Address rootTokenContract}) Future<void>
Add token to address with rootTokenContract.
addTokenWallets({required Address address, required List<Address> rootTokenContracts}) Future<void>
Add list of tokens to address with rootTokenContracts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAccounts(List<KeyAccount> accounts) Future<void>
This is a helper function, that calls removeLocalAccounts or removeExternalAccounts based on every account status.
removeExternalAccounts(List<KeyAccount> accounts) Future<void>
Remove only external accounts from storage. Account is external if KeyAccount.isExternal is true
removeLocalAccounts(List<KeyAccount> accounts) Future<void>
Remove only local accounts from storage. Account is local if KeyAccount.isExternal is false
removeTokenWallet({required Address address, required Address rootTokenContract}) Future<void>
Remove token with rootTokenContract from address.
removeTokenWallets({required Address address, required List<Address> rootTokenContracts}) Future<void>
Remove list of tokens with rootTokenContracts from address.
renameAccount(Address address, String newName) Future<void>
Change name of account with address to newName.
toString() String
A string representation of this object.
inherited

Operators

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