Create an instance of the NudgeListener
The environment configuration
An auth token for Salt
An ethers signer instance
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.
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
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;
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.