kehto AuthHooks over the applesauce AccountManager.
getSigner returns null while nobody is signed in and for read-only accounts,
so the runtime refuses writes instead of failing inside a signer that throws.
When kehto names the requesting window, the signer it gets back puts every
signEvent through consent first, so a destructive write an applet asks
for is shown to the user and signed only on yes (kehto's runtime signs
applet publishes here and asks nobody). Without a window the shell is
signing for itself and the plain signer is returned.
constauth = createAuthHooks(accounts, consent); auth.getUserPubkey(); // hex pubkey or null awaitauth.getSigner('applet-1')?.signEvent?.(profileTemplate); // asks the user first
kehto
AuthHooksover the applesauceAccountManager.getSignerreturns null while nobody is signed in and for read-only accounts, so the runtime refuses writes instead of failing inside a signer that throws. When kehto names the requesting window, the signer it gets back puts everysignEventthroughconsentfirst, so a destructive write an applet asks for is shown to the user and signed only on yes (kehto's runtime signs applet publishes here and asks nobody). Without a window the shell is signing for itself and the plain signer is returned.