skip to Main Content

Flutter – how do I convert mnemonic to AsymmetricKeyPair using secp256k1 in dart

I have generated mnemonic using bip39.generateMnemonic();. I need to convert this mnemonic to AsymmetricKeyPair with secp256k1. AsymmetricKeyPair<PublicKey, PrivateKey> secp256k1KeyPair() { var keyParams = ECKeyGeneratorParameters(ECCurve_secp256k1()); var mnemonic = getMnemonic(); var seed = bip39.mnemonicToSeed(mnemonic); print('mnemonicToSeed=========$seed'); var random = FortunaRandom(); random.seed(KeyParameter(seed)); var generator…

VIEW QUESTION

Dart/Flutter Generics: type '(SearchFilterItemModel<DateTime>) => String' is not a subtype of type '(SearchFilterItemModel<dynamic>) => String'

I have defined models for my search filter items like below: typedef OnFilterButtonPressed<T> = String Function(SearchFilterItemModel<T> searchFilterItem); class SearchFilterItemModel<T> { final String id, name; final OnFilterButtonPressed<T> onPressed; SearchFilterItemModel({ required this.id, required this.name, required this.onPressed, }); } Then I've defined a…

VIEW QUESTION
Back To Top
Search