Our content
Follow us
Contact us
Your bitcoin & nostr companion / from 🐝 with 🧡
Last updated 1 year ago
This method specifically allows you to listen for a particular event such as "accountChanged" and execute a callback function when this event occurs.
function on(eventName: "accountChanged", listener: () => void): void;
if (!nostr.on) { alert('not supported'); } nostr.on("accountChanged", accountChangedHandler); // callback is executed once account is changed in provided with multiple accounts function accountChangedHandler() { console.log("Account Changed!"); }