getPrincipal method
Get the principal represented by this identity. Normally should be a
Principal.selfAuthenticating()
.
Implementation
@override
Principal getPrincipal() {
_principal ??= Principal.selfAuthenticating(getPublicKey().toDer());
return _principal!;
}