Create an instance of the NudgeListener
The environment configuration
An auth token for Salt
An ethers signer instance
if set to true the signer will automatically leave the huddle after a delay if this one does not complete
Stop listening for nudges. This will stop the listener from receiving.
This only unsubscribes from nudge events — the underlying websocket remains open. Call Salt.disconnect to close it and allow the Node.js process to exit.
Enables the nudge listener, which will automatically respond to requests to join account creations (i.e. nudges) and sign the required data... This is done automatically when the NudgeListener is constructed.
Array of accounts for which a nudge has been processed, i.e. the signer has responsded by joining the account creation process.
const accounts = nudgeListener.getAccounts();
// get the signers status on the first account
const statuses = accounts[0].getSignersStatuses();
// get one of the signer's registration status
const registered = statuses['0x1234567890123456789012345678901234567890']?.registered;
Queue of all the nudges received by the signer.
salt account id
address of the user nudging
salt organisation id
address of the user being nudged
The Nudge Listener class enables joining Salt account creation processes. Nudges are Websocket events sent from the server, triggered when an admin in the organisation creates a new account. Nudges events will be received by users on the Salt Application, robos, and API clients using this class.