ApiKeyring class

Keyring API manages keyPairs for through polkadot-js/keyring

Constructors

ApiKeyring(PolkawalletApi apiRoot, ServiceKeyring? service)

Properties

apiRoot PolkawalletApi
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
service ServiceKeyring?
final

Methods

addAccount(Keyring keyring, {required KeyType keyType, required Map acc, required String password}) Future<KeyPairData>
Add account to local storage.
addContact(Keyring keyring, Map acc) Future<KeyPairData>
Add a contact.
addressFromKeyStore(int ss58, {required Map keyStore}) Future<AddressIconData>
get address and avatar from KeyStore.
addressFromMnemonic(int ss58, {CryptoType cryptoType = CryptoType.sr25519, String derivePath = '', required String mnemonic}) Future<AddressIconData>
get address and avatar from mnemonic.
addressFromRawSeed(int ss58, {CryptoType cryptoType = CryptoType.sr25519, String derivePath = '', required String rawSeed}) Future<AddressIconData>
get address and avatar from rawSeed.
changeName(Keyring keyring, String name) Future<KeyPairData>
change name of account
changePassword(Keyring keyring, String passOld, dynamic passNew) Future<KeyPairData?>
change password of account
checkDerivePath(String seed, dynamic path, CryptoType cryptoType) Future<String?>
Check if derive path is valid, return null if valid, and return error message if invalid.
checkMnemonicValid(String mnemonic) Future<bool>
check mnemonic valid.
checkPassword(KeyPairData account, String pass) Future<bool>
check password of account
deleteAccount(Keyring keyring, KeyPairData account) Future<void>
delete account from storage
generateMnemonic(int ss58, {CryptoType cryptoType = CryptoType.sr25519, String derivePath = '', String key = ''}) Future<AddressIconDataWithMnemonic>
Generate a set of new mnemonic.
getDecryptedSeed(Keyring keyring, dynamic password) Future<SeedBackupData?>
Decrypt and get the backup of seed.
importAccount(Keyring keyring, {required KeyType keyType, required String key, required String name, required String password, CryptoType cryptoType = CryptoType.sr25519, String derivePath = ''}) Future<Map?>
Import account from mnemonic/rawSeed/keystore and we get a JSON object. param cryptoType can be sr25519(default) or ed25519. 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
signAsExtension(String password, SignAsExtensionParam param) Future<ExtensionSignResult?>
Open a new webView for a DApp, sign extrinsic or msg for the DApp.
signatureVerify(String message, dynamic signature, dynamic address) Future<VerifyResult?>
toString() String
A string representation of this object.
inherited
updateIndicesMap(Keyring keyring, [List? addresses]) Future<void>
This method query account indices and set data to Keyring.store so we can get index info of an account from Keyring instance.
updatePubKeyAddressMap(Keyring keyring) Future<void>
Every time we change the keyPairs, we need to update the pubKey-address map.
updatePubKeyIconsMap(Keyring keyring, [List? pubKeys]) Future<void>
This method query account icons and set icons to Keyring.store so we can get icon of an account from Keyring instance.

Operators

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