addressFromRawSeed method
Future<AddressIconData>
addressFromRawSeed(
- int ss58, {
- CryptoType cryptoType = CryptoType.sr25519,
- String derivePath = '',
- required String rawSeed,
get address and avatar from rawSeed.
Implementation
Future<AddressIconData> addressFromRawSeed(int ss58,
{CryptoType cryptoType = CryptoType.sr25519,
String derivePath = '',
required String rawSeed}) async {
final String crypto = cryptoType.toString().split('.')[1];
final isAvatarSupport = (await serviceRoot.webView!.evalJavascript(
'keyring.addressFromMnemonic ? {}:null',
wrapPromise: false)) !=
null;
final dynamic acc = isAvatarSupport
? (await serviceRoot.webView!.evalJavascript(
'keyring.addressFromRawSeed("$rawSeed",$ss58,"$crypto","$derivePath")'))
: {};
return AddressIconData.fromJson(Map<String, dynamic>.from(acc));
}