loginPublicKey method
adds a new read-only Account and sets the logged pubkey
Implementation
void loginPublicKey({required String pubkey}) {
if (accounts.containsKey(pubkey)) {
throw Exception("Cannot login, pubkey already logged in");
}
addAccount(
pubkey: pubkey,
type: AccountType.publicKey,
signer: Bip340EventSigner(privateKey: null, publicKey: pubkey));
_loggedPubkey = pubkey;
_notifyAuthStateChange();
}