getPrincipalFromECPublicKey function
Implementation
String getPrincipalFromECPublicKey(Uint8List publicKey) {
final secp256k1Pub = Secp256k1PublicKey.fromRaw(publicKey).toDer();
final auth = Principal.selfAuthenticating(secp256k1Pub);
return auth.toText();
}