SeedList class
List of seeds that user added into application. This list allows iterating over seeds and add/remove seeds.
This instance is immutable and it can't change its state. To listen SeedList changes, use NekotonRepository.seedListStream
- Annotations
Constructors
-
SeedList.new({required List<
KeyStoreEntry> allKeys, required Map<PublicKey, AccountList> mappedAccounts, required Map<PublicKey, SeedMetadata> seedMeta})
Properties
-
allPublicKeys
→ List<
PublicKey> -
Get all public keys from all seeds
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
seeds
→ List<
Seed> -
List of seeds that user added into application.
Every seed is a group of masterKey and its subKeys.
no setter
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited
Methods
-
addSeed(
{required List< String> phrase, required String password, MnemonicType? mnemonicType, String? name}) → Future<PublicKey> - Add new seed to application. Returns publicKey of masterKey of added seed.
-
checkKeyPassword(
{required PublicKey publicKey, required String password, required int? signatureId}) → Future< bool> -
Check if password of
publicKey
equals topassword
.signatureId
is Transport.getSignatureId. -
decrypt(
{required EncryptedData data, required PublicKey publicKey, required String password}) → Future< String> -
Decrypt data from external usages.
If there is no key for
publicKey
, exception will be thrown. -
encrypt(
{required String data, required List< PublicKey> publicKeys, required EncryptionAlgorithm algorithm, required PublicKey publicKey, required String password}) → Future<List< EncryptedData> > -
Encrypt data for external usages.
publicKey
is key that must be used for signing. If there is no key forpublicKey
, exception will be thrown. -
findAccountByAddress(
Address accountAddress) → KeyAccount? - Get account instance by it's address. This is a heavy operation and must not be called during build. This method can be helpful in browser.
-
findSeed(
PublicKey masterKey) → Seed? - Get seed by masterKey if it's in list.
-
findSeedByAnyPublicKey(
PublicKey publicKey) → Seed? - Get seed from list by public key of master key or of sub key.
-
findSeedKey(
PublicKey publicKey) → SeedKey? - Get SeedKey instance by it's publicKey. This is a heavy operation and must not be called during build. This method can be helpful in browser.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
{required String data, required PublicKey publicKey, required String password, required int? signatureId}) → Future< String> -
Sign
data
message withpublicKey
If there is no key forpublicKey
, exception will be thrown.signatureId
is Transport.getSignatureId. -
signData(
{required String data, required PublicKey publicKey, required String password, required int? signatureId}) → Future< SignedData> -
Sign
data
message withpublicKey
If there is no key forpublicKey
, exception will be thrown.signatureId
is Transport.getSignatureId. -
signRawData(
{required String data, required PublicKey publicKey, required String password, required int? signatureId}) → Future< SignedDataRaw> -
Sign raw
data
message withpublicKey
If there is no key forpublicKey
, exception will be thrown.signatureId
is Transport.getSignatureId. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited