parseMultiAccounts function
Implementation
Map<String, dynamic> parseMultiAccounts(UR ur) {
if (ur.type != ExtendedRegistryType.CRYPTO_MULTI_ACCOUNTS.type) {
throw Exception('type not match');
}
final accounts = CryptoMultiAccounts.fromCBOR(ur.cbor);
final masterFingerprint = toHex(accounts.masterFingerprint);
return {
'device': accounts.device,
'masterFingerprint': masterFingerprint,
'keys': accounts.keys.map((hdKey) =>parseCryptoHDKey(hdKey)).toList(),
'deviceId': accounts.deviceId,
'version': accounts.version,
'nickName': accounts.nickName,
};
}