Alby Developer Guide
Alby Browser Extension APIs
Ask or search…


This particular method enables you to cancel your subscription to an event that was initially set up using the liquid.on() function. This allows you to stop receiving notifications or triggers when a specific event occurs.


function off(eventName: "accountChanged", listener: () => void): void;

Code Example

if (!liquid.on) { alert('not supported'); }
await liquid.enable();
// subscribe to the accountChanged event
liquid.on("accountChanged", accountChangedHandler); // callback is executed once account is changed in provided with multiple accounts
// use .off() to unsubscribe from the event."accountChanged", accountChangedHandler);
function accountChangedHandler() {
console.log("Account Changed!");
Last modified 4mo ago