getAccountId method

Uint8List getAccountId()

Implementation

Uint8List getAccountId() {
  final der = getPublicKey().toDer();
  final hash = SHA224();
  hash.update(('\x0Aaccount-id').plainToU8a());
  hash.update(Principal.selfAuthenticating(der).toBlob());
  hash.update(Uint8List(32));
  final data = hash.digest();
  // without checksum?
  return Uint8List.fromList(data);
}