ApiEthers class
KeyringEVM API manages EVM keyPairs
Constructors
- ApiEthers(SubstrateService? service)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- service → SubstrateService?
-
final
Methods
-
addAccount(
KeyringEVM keyring, {required EVMKeyType keyType, required Map< String, dynamic> acc, required String password}) → Future<EthWalletData> - Add account to local storage.
-
addContact(
KeyringEVM keyring, Map acc) → Future< EthWalletData> - Add a contact.
-
addressFromMnemonic(
String mnemonic, {String derivePath = ''}) → Future< AddressIconData> - get address and avatar from mnemonic.
-
addressFromRawSeed(
String privateKey, {String derivePath = ''}) → Future< AddressIconData> - get address and avatar from privateKey.
-
changeName(
KeyringEVM keyring, String name) → Future< KeyPairData> - change name of account
-
changePassword(
KeyringEVM keyring, String passOld, dynamic passNew) → Future< EthWalletData?> - change password of account
-
checkEncryptedSeedExist(
KeyringEVM keyring, EthWalletData acc, EVMKeyType keyType) → Future< bool> - Decrypt and get the backup of seed.
-
checkMnemonicValid(
String mnemonic) → Future< bool> - check mnemonic valid.
-
checkPassword(
EthWalletData account, String pass) → Future< bool> - check password of account
-
deleteAccount(
KeyringEVM keyring, EthWalletData account) → Future< void> - delete account from storage
-
generateMnemonic(
{String derivePath = '', String key = ''}) → Future< AddressIconDataWithMnemonic> - Generate a set of new mnemonic.
-
getDecryptedSeed(
KeyringEVM keyring, String password) → Future< SeedBackupData?> - Decrypt and get the backup of seed.
-
importAccount(
{required EVMKeyType keyType, required String key, required String name, required String password, String derivePath = ''}) → Future< Map< String, dynamic> > -
Import account from mnemonic/rawSeed/keystore and we get a JSON object.
param
cryptoType
can besr25519
(default) ored25519
. throw error if import failed. return null if keystore password check failed. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateIconsMap(
KeyringEVM keyring, [List? addresses]) → Future< void> - This method query account icons and set icons to KeyringEVM.store so we can get icon of an account from KeyringEVM instance.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited