# Everpocket JS Client Documentation ## Classes
ClusterContext

Manages the operations and states of the cluster.

EvernodeContext

Handles operations related to node acquisition, host selection, transaction submission, and state management.

HotPocketContext

The HotPocketContext class manages interactions with the HotPocket framework, including client connections, contract configurations, and peer management. It provides methods to connect to nodes, send messages, and update contract and peer data.

NomadContext

The NomadContext class manages the lifecycle of nodes in a Nomad cluster.

VoteContext

The VoteContext class handles voting operations and manages elections.

XrplContext

Handles operations related to XRPL transactions.

MultiSigner

Manages signing operations for Xahau transactions using a signer key.

AllVoteElector

Evaluates votes in an election based on the desired vote count and timeout.

## ClusterContext Manages the operations and states of the cluster. **Kind**: global class * [ClusterContext](#ClusterContext) * [new ClusterContext(evernodeContext, [options])](#new_ClusterContext_new) * [.init()](#ClusterContext+init) * [.deinit()](#ClusterContext+deinit) * [.addNodeQueueCount()](#ClusterContext+addNodeQueueCount) ⇒ * [.getClusterUnlNodes()](#ClusterContext+getClusterUnlNodes) ⇒ * [.getClusterNodes()](#ClusterContext+getClusterNodes) ⇒ * [.getPendingNodes()](#ClusterContext+getPendingNodes) ⇒ * [.totalCount()](#ClusterContext+totalCount) ⇒ * [.feedUserMessage(user, msg)](#ClusterContext+feedUserMessage) ⇒ * [.addNewClusterNode([maxLifeMoments], [lifeMoments], [options=])](#ClusterContext+addNewClusterNode) * [.addToCluster(node)](#ClusterContext+addToCluster) * [.addToUnl(pubkey)](#ClusterContext+addToUnl) * [.extendNode(pubkey, lifeMoments)](#ClusterContext+extendNode) * [.removeNode(pubkey, [force])](#ClusterContext+removeNode) ### new ClusterContext(evernodeContext, [options]) Creates an instance of `ClusterContext` | Param | Type | Default | Description | | --- | --- | --- | --- | | evernodeContext | [EvernodeContext](#EvernodeContext) | | The context associated with Evernode for interacting with its environment. | | [options] | ClusterOptions | {} | Optional parameters for configuring the cluster thresholds. | ### clusterContext.init() Initiates the operations regarding the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) ### clusterContext.deinit() Deinitiates the operations regarding the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) ### clusterContext.addNodeQueueCount() ⇒ Get the queued add node operations. **Kind**: instance method of [ClusterContext](#ClusterContext) **Returns**: Total number of cluster nodes. ### clusterContext.getClusterUnlNodes() ⇒ Get all Unl nodes in the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) **Returns**: List of nodes in the cluster which are in Unl. ### clusterContext.getClusterNodes() ⇒ Get all nodes in the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) **Returns**: List of nodes in the cluster. ### clusterContext.getPendingNodes() ⇒ Get all pending nodes. **Kind**: instance method of [ClusterContext](#ClusterContext) **Returns**: List of pending nodes. ### clusterContext.totalCount() ⇒ Get the pending + cluster node count in the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) **Returns**: Total number of cluster nodes. ### clusterContext.feedUserMessage(user, msg) ⇒ Feed user message to the cluster context. **Kind**: instance method of [ClusterContext](#ClusterContext) **Returns**: Response for the cluster message with status. | Param | Description | | --- | --- | | user | Contract client user. | | msg | Message sent by the user. | ### clusterContext.addNewClusterNode([maxLifeMoments], [lifeMoments], [options=]) Acquire and add new node to the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) | Param | Default | Description | | --- | --- | --- | | [maxLifeMoments] | 0 | Amount of maximum life moments for the instance. 0 means there's no max life limit for the node. | | [lifeMoments] | 1 | Amount of life moments for the instance. | | [options=] | | Acquire instance options. | ### clusterContext.addToCluster(node) Add a node to cluster and mark as UNL. **Kind**: instance method of [ClusterContext](#ClusterContext) | Param | Description | | --- | --- | | node | Cluster node to be added. | ### clusterContext.addToUnl(pubkey) Mark existing node as a UNL node. **Kind**: instance method of [ClusterContext](#ClusterContext) | Param | Description | | --- | --- | | pubkey | Public key of the node. | ### clusterContext.extendNode(pubkey, lifeMoments) Record a provided node for extend. **Kind**: instance method of [ClusterContext](#ClusterContext) | Param | Description | | --- | --- | | pubkey | Public key of the node to be extended. | | lifeMoments | Number of moments to be extended. | ### clusterContext.removeNode(pubkey, [force]) Removes a provided a node from the cluster. **Kind**: instance method of [ClusterContext](#ClusterContext) | Param | Default | Description | | --- | --- | --- | | pubkey | | Public key of the node to be removed. | | [force] | false | Force remove. (This might cause to fail some pending operations). | ## EvernodeContext Handles operations related to node acquisition, host selection, transaction submission, and state management. **Kind**: global class * [EvernodeContext](#EvernodeContext) * [new EvernodeContext(xrplContext)](#new_EvernodeContext_new) * [.init()](#EvernodeContext+init) * [.deinit()](#EvernodeContext+deinit) * [.acquireNode(options)](#EvernodeContext+acquireNode) ⇒ * [.getIfAcquired(acquireRefId)](#EvernodeContext+getIfAcquired) ⇒ * [.getIfPending(acquireRefId)](#EvernodeContext+getIfPending) ⇒ * [.decideLeaseOffer(hostAddress)](#EvernodeContext+decideLeaseOffer) ⇒ * [.decideHost([preferredHosts])](#EvernodeContext+decideHost) ⇒ * [.decideMessageKey([options=])](#EvernodeContext+decideMessageKey) ⇒ * [.getEvernodeConfig()](#EvernodeContext+getEvernodeConfig) ⇒ * [.getCurMoment([options=])](#EvernodeContext+getCurMoment) ⇒ * [.acquireSubmit(hostAddress, leaseOffer, messageKey, options)](#EvernodeContext+acquireSubmit) ⇒ * [.extendSubmit(hostAddress, extension, tokenID, options)](#EvernodeContext+extendSubmit) ⇒ * [.getHosts()](#EvernodeContext+getHosts) ⇒ * [.getAcquiredNodes()](#EvernodeContext+getAcquiredNodes) ⇒ * [.getPendingAcquires()](#EvernodeContext+getPendingAcquires) ⇒ * [.decodeLeaseTokenUri(uri)](#EvernodeContext+decodeLeaseTokenUri) ⇒ ### new EvernodeContext(xrplContext) Creates an instance of EvernodeContext. | Param | Type | Description | | --- | --- | --- | | xrplContext | [XrplContext](#XrplContext) | The XRPL context object that handles communication with the XRPL network. | ### evernodeContext.init() Initialize the context. **Kind**: instance method of [EvernodeContext](#EvernodeContext) ### evernodeContext.deinit() Deinitialize the context. **Kind**: instance method of [EvernodeContext](#EvernodeContext) ### evernodeContext.acquireNode(options) ⇒ Acquires a node based on the provided options. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: Acquire data. | Param | Description | | --- | --- | | options | Options related to a particular acquire operation. | ### evernodeContext.getIfAcquired(acquireRefId) ⇒ Get the acquire info if acquired. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: Acquired node. | Param | Description | | --- | --- | | acquireRefId | Acquire reference. | ### evernodeContext.getIfPending(acquireRefId) ⇒ Get the acquire info if pending. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: Pending node. | Param | Description | | --- | --- | | acquireRefId | Acquire reference. | ### evernodeContext.decideLeaseOffer(hostAddress) ⇒ Decides a lease offer collectively. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: URIToken related to the lease offer. | Param | Description | | --- | --- | | hostAddress | Host that should be used to take lease offers. | ### evernodeContext.decideHost([preferredHosts]) ⇒ Decides a host collectively. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: Decided host address. | Param | Default | Description | | --- | --- | --- | | [preferredHosts] | | List of proffered host addresses. | ### evernodeContext.decideMessageKey([options=]) ⇒ Decide a encryption key pair collectively **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: Public key of the decided key pair. | Param | Description | | --- | --- | | [options=] | Vote options for message key decision. | ### evernodeContext.getEvernodeConfig() ⇒ Get evernode configuration. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: The evernode configuration. ### evernodeContext.getCurMoment([options=]) ⇒ Get the current evernode moment. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: The current moment value | Param | Description | | --- | --- | | [options=] | Vote options to collect the current moment value. | ### evernodeContext.acquireSubmit(hostAddress, leaseOffer, messageKey, options) ⇒ Submits the acquire transaction **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: Result of the submitted transaction. | Param | Description | | --- | --- | | hostAddress | Relevant host address | | leaseOffer | Relevant URIToken of the lease offer | | messageKey | Encryption key of the tenant. | | options | | ### evernodeContext.extendSubmit(hostAddress, extension, tokenID, options) ⇒ This function is called by a tenant client to submit the extend lease transaction in certain host. This function will be called directly in test. This function can take four parameters as follows. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: The transaction result. | Param | Type | Description | | --- | --- | --- | | hostAddress | string | XRPL account address of the host. | | extension | number | Moments to extend. | | tokenID | string | Tenant received instance name. this name can be retrieve by performing acquire Lease. | | options | object | This is an optional field and contains necessary details for the transactions. | ### evernodeContext.getHosts() ⇒ Fetches registered hosts **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: An array of hosts that are having vacant leases. ### evernodeContext.getAcquiredNodes() ⇒ Fetches details of successful acquires. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: an array of instance acquisitions that are completed. ### evernodeContext.getPendingAcquires() ⇒ Fetches details of pending acquires. **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: an array of instance acquisitions that are in progress. ### evernodeContext.decodeLeaseTokenUri(uri) ⇒ Decode the URI of the lease URIToken **Kind**: instance method of [EvernodeContext](#EvernodeContext) **Returns**: decoded content of the URI | Param | Description | | --- | --- | | uri | URI of the URIToken | ## HotPocketContext The HotPocketContext class manages interactions with the HotPocket framework, including client connections, contract configurations, and peer management. It provides methods to connect to nodes, send messages, and update contract and peer data. **Kind**: global class * [HotPocketContext](#HotPocketContext) * [new HotPocketContext(contractContext, [options])](#new_HotPocketContext_new) * [.checkLiveness(node)](#HotPocketContext+checkLiveness) ⇒ * [.sendMessage(message, nodes)](#HotPocketContext+sendMessage) ⇒ * [.getContractConfig()](#HotPocketContext+getContractConfig) ⇒ * [.updateContractConfig()](#HotPocketContext+updateContractConfig) ⇒ * [.getContractUnl()](#HotPocketContext+getContractUnl) ⇒ * [.updatePeers(toAdd, [toRemove])](#HotPocketContext+updatePeers) ### new HotPocketContext(contractContext, [options]) Creates an instance of HotPocketContext. | Param | Type | Default | Description | | --- | --- | --- | --- | | contractContext | any | | The contract context containing the necessary contract and sequence details. | | [options] | HotPocketOptions | {} | Optional configuration options. | ### hotPocketContext.checkLiveness(node) ⇒ Checks the liveliness of a node. **Kind**: instance method of [HotPocketContext](#HotPocketContext) **Returns**: the liveliness as a boolean figure. | Param | Description | | --- | --- | | node | Node to check the connection. | ### hotPocketContext.sendMessage(message, nodes) ⇒ Sends a message to a cluster node. **Kind**: instance method of [HotPocketContext](#HotPocketContext) **Returns**: the state of the message sending as a boolean figure. | Param | Description | | --- | --- | | message | Message to be sent. | | nodes | Nodes to send the message. | ### hotPocketContext.getContractConfig() ⇒ Get the contract config. **Kind**: instance method of [HotPocketContext](#HotPocketContext) **Returns**: The contract config. ### hotPocketContext.updateContractConfig() ⇒ Update the contract config. **Kind**: instance method of [HotPocketContext](#HotPocketContext) **Returns**: The contract config. ### hotPocketContext.getContractUnl() ⇒ Get the contract unl. **Kind**: instance method of [HotPocketContext](#HotPocketContext) **Returns**: The contract unl. ### hotPocketContext.updatePeers(toAdd, [toRemove]) Update the HotPocket peer list. **Kind**: instance method of [HotPocketContext](#HotPocketContext) | Param | Default | Description | | --- | --- | --- | | toAdd | | Peer list to add. | | [toRemove] | [] | Peer list to remove. | ## NomadContext The NomadContext class manages the lifecycle of nodes in a Nomad cluster. **Kind**: global class * [NomadContext](#NomadContext) * [new NomadContext(clusterContext, contract)](#new_NomadContext_new) * [.init()](#NomadContext+init) * [.deinit()](#NomadContext+deinit) * [.grow()](#NomadContext+grow) * [.extend()](#NomadContext+extend) * [.prune()](#NomadContext+prune) ### new NomadContext(clusterContext, contract) Creates an instance of NomadContext. | Param | Type | Description | | --- | --- | --- | | clusterContext | [ClusterContext](#ClusterContext) | The cluster context for managing the cluster. | | contract | NomadOptions | Configuration options for the Nomad contract. | ### nomadContext.init() Initialize the nomad context. **Kind**: instance method of [NomadContext](#NomadContext) ### nomadContext.deinit() Deinitialize the nomad contract. **Kind**: instance method of [NomadContext](#NomadContext) ### nomadContext.grow() Grow the cluster upto target one by one. **Kind**: instance method of [NomadContext](#NomadContext) ### nomadContext.extend() Check for expiring nodes and send for extend. **Kind**: instance method of [NomadContext](#NomadContext) ### nomadContext.prune() Prune the nodes which fulfils the prune conditions. **Kind**: instance method of [NomadContext](#NomadContext) ## VoteContext The VoteContext class handles voting operations and manages elections. **Kind**: global class * [VoteContext](#VoteContext) * [new VoteContext(contractContext, [options=])](#new_VoteContext_new) * [.getUniqueNumber()](#VoteContext+getUniqueNumber) ⇒ * [.feedUnlMessage(sender, msg)](#VoteContext+feedUnlMessage) * [.vote(electionName, votes, elector)](#VoteContext+vote) ⇒ * [.subscribe(electionName, votes, elector)](#VoteContext+subscribe) ⇒ * [.resolveVotes(electionName)](#VoteContext+resolveVotes) ⇒ ### new VoteContext(contractContext, [options=]) Creates an instance of VoteContext. | Param | Description | | --- | --- | | contractContext | The contract context to use. | | [options=] | Options for vote context, including voteSerializer. | ### voteContext.getUniqueNumber() ⇒ Gives an unique number every time this method is called. **Kind**: instance method of [VoteContext](#VoteContext) **Returns**: An unique number. ### voteContext.feedUnlMessage(sender, msg) Deserialize UNL message and feed to the listeners. **Kind**: instance method of [VoteContext](#VoteContext) | Param | Description | | --- | --- | | sender | UNLNode which has sent the message. | | msg | Message received from UNL. | ### voteContext.vote(electionName, votes, elector) ⇒ Send the votes to a election. **Kind**: instance method of [VoteContext](#VoteContext) **Returns**: Evaluated votes as a promise. | Param | Description | | --- | --- | | electionName | Election identifier to vote for. | | votes | Votes for the election. | | elector | Elector which evaluates the votes. | ### voteContext.subscribe(electionName, votes, elector) ⇒ Send the votes to a election. **Kind**: instance method of [VoteContext](#VoteContext) **Returns**: Evaluated votes as a promise. | Param | Description | | --- | --- | | electionName | Election identifier to vote for. | | votes | Votes for the election. | | elector | Elector which evaluates the votes. | ### voteContext.resolveVotes(electionName) ⇒ Resolve all the collected votes. **Kind**: instance method of [VoteContext](#VoteContext) **Returns**: The vote collection. | Param | Description | | --- | --- | | electionName | Name of the election to resolve. | ## XrplContext Handles operations related to XRPL transactions. **Kind**: global class * [XrplContext](#XrplContext) * [new XrplContext(hpContext, address, [secret], [options])](#new_XrplContext_new) * [.init()](#XrplContext+init) * [.deinit()](#XrplContext+deinit) * [.getPendingTransactions()](#XrplContext+getPendingTransactions) ⇒ * [.getValidatedTransactions()](#XrplContext+getValidatedTransactions) ⇒ * [.getValidatedTransaction(hash)](#XrplContext+getValidatedTransaction) ⇒ * [.loadSignerList()](#XrplContext+loadSignerList) * [.getSequence()](#XrplContext+getSequence) ⇒ * [.getTransactions(ledgerIndex)](#XrplContext+getTransactions) ⇒ * [.getMaxLedgerSequence()](#XrplContext+getMaxLedgerSequence) ⇒ * [.getTransactionSubmissionInfo([options=], [decisionOptions])](#XrplContext+getTransactionSubmissionInfo) ⇒ * [.submitMultisignedTx(tx)](#XrplContext+submitMultisignedTx) ⇒ * [.multiSignAndSubmitTransaction(transaction, [options=])](#XrplContext+multiSignAndSubmitTransaction) * [.generateNewSignerList([options=])](#XrplContext+generateNewSignerList) ⇒ * [.setSignerList(signerListInfo, [options=])](#XrplContext+setSignerList) * [.renewSignerList([options=])](#XrplContext+renewSignerList) * [.addXrplSigner(pubkey, weight, [options=])](#XrplContext+addXrplSigner) ⇒ * [.removeXrplSigner(pubkey, [options=])](#XrplContext+removeXrplSigner) * [.replaceSignerList(oldSignerAddress, newSignerAddress, [options=])](#XrplContext+replaceSignerList) ⇒ * [.getSignerList()](#XrplContext+getSignerList) ⇒ Object \| null * [.isSigner()](#XrplContext+isSigner) ⇒ ### new XrplContext(hpContext, address, [secret], [options]) Creates an instance of XrplContext. | Param | Type | Default | Description | | --- | --- | --- | --- | | hpContext | [HotPocketContext](#HotPocketContext) | | The HotPocket context to use. | | address | string | | The XRPL account address. | | [secret] | string \| null | null | The XRPL account secret. | | [options] | XrplOptions | {} | Options for XRPL context. | ### xrplContext.init() Initialize the xrpl context. **Kind**: instance method of [XrplContext](#XrplContext) ### xrplContext.deinit() Deinitialize the xrpl context. **Kind**: instance method of [XrplContext](#XrplContext) ### xrplContext.getPendingTransactions() ⇒ Fetches details of submitted non validated transactions. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: an array of transactions that are not validated. ### xrplContext.getValidatedTransactions() ⇒ Fetches details of submitted validated transactions. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: an array of transactions that are validated. ### xrplContext.getValidatedTransaction(hash) ⇒ Get the transaction of the hash if validated. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: The transaction if validated. | Param | Description | | --- | --- | | hash | Transaction hash. | ### xrplContext.loadSignerList() Load signer list of the account **Kind**: instance method of [XrplContext](#XrplContext) ### xrplContext.getSequence() ⇒ Get current sequence value of the master account. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: Current sequence number. ### xrplContext.getTransactions(ledgerIndex) ⇒ Get transaction list of the master account starting from a ledger. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: LIst of transactions | Param | Description | | --- | --- | | ledgerIndex | Starting ledger index. | ### xrplContext.getMaxLedgerSequence() ⇒ Get a maximum ledger number to validate a transaction. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: The maximum ledger number. ### xrplContext.getTransactionSubmissionInfo([options=], [decisionOptions]) ⇒ Decide a transaction submission info for a transaction. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: Transaction submission info. | Param | Default | Description | | --- | --- | --- | | [options=] | | Vote options to decide the transaction submission info. | | [decisionOptions] | | Any other options that needed to be decided. | ### xrplContext.submitMultisignedTx(tx) ⇒ Submit a multisigned transaction. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: The transaction response. | Param | Description | | --- | --- | | tx | Multi-signed transaction | ### xrplContext.multiSignAndSubmitTransaction(transaction, [options=]) Multi sign and submit a given transaction. **Kind**: instance method of [XrplContext](#XrplContext) | Param | Description | | --- | --- | | transaction | Transaction to submit. | | [options=] | Multisigner options. | ### xrplContext.generateNewSignerList([options=]) ⇒ Generate new signer list. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: The new signer list. | Param | Description | | --- | --- | | [options=] | Multisigner options. | ### xrplContext.setSignerList(signerListInfo, [options=]) Set a provided signer list to the master account. **Kind**: instance method of [XrplContext](#XrplContext) | Param | Description | | --- | --- | | signerListInfo | Signer list info. | | [options=] | Multisigner options to set. | ### xrplContext.renewSignerList([options=]) Renew the current signer list. **Kind**: instance method of [XrplContext](#XrplContext) | Param | Description | | --- | --- | | [options=] | Multisigner options to override. | ### xrplContext.addXrplSigner(pubkey, weight, [options=]) ⇒ Add new signer node to the signer list. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: New signer address. | Param | Description | | --- | --- | | pubkey | Public key of the node to add. | | weight | Signer weight for the new signer. | | [options=] | Multisigner options to override. | ### xrplContext.removeXrplSigner(pubkey, [options=]) Remove a signer node from the signer list. **Kind**: instance method of [XrplContext](#XrplContext) | Param | Description | | --- | --- | | pubkey | Public key of the signer node to remove. | | [options=] | Multisigner options to override. | ### xrplContext.replaceSignerList(oldSignerAddress, newSignerAddress, [options=]) ⇒ Replaces a signer node from a new node. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: New signer address. | Param | Description | | --- | --- | | oldSignerAddress | Signer address of old node. | | newSignerAddress | New address to add as signer. | | [options=] | Multisigner options to override. | ### xrplContext.getSignerList() ⇒ Object \| null Returns the signer list of the account **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: Object \| null - An object in the form of {signerQuorum: <1> , signerList: [{account: "rawweeeere3e3", weight: 1}, {}, ...]} || null ### xrplContext.isSigner() ⇒ Check wether this node is a signer. **Kind**: instance method of [XrplContext](#XrplContext) **Returns**: true or false if signer or not. ## MultiSigner Manages signing operations for Xahau transactions using a signer key. **Kind**: global class * [MultiSigner](#MultiSigner) * [new MultiSigner(masterAcc)](#new_MultiSigner_new) * [.getSigner()](#MultiSigner+getSigner) ⇒ * [.setSigner(signer)](#MultiSigner+setSigner) * [.removeSigner()](#MultiSigner+removeSigner) * [.generateSigner()](#MultiSigner+generateSigner) ⇒ * [.sign(tx)](#MultiSigner+sign) ⇒ * [.isSignerNode()](#MultiSigner+isSignerNode) ⇒ ### new MultiSigner(masterAcc) Creates an instance of MultiSigner. | Param | Type | Description | | --- | --- | --- | | masterAcc | any | The master account containing XRPL API and address information. | ### multiSigner.getSigner() ⇒ Get the signer. **Kind**: instance method of [MultiSigner](#MultiSigner) **Returns**: Signer info. ### multiSigner.setSigner(signer) Set the signer. **Kind**: instance method of [MultiSigner](#MultiSigner) | Param | Description | | --- | --- | | signer | Signer to set. | ### multiSigner.removeSigner() Remove the signer. **Kind**: instance method of [MultiSigner](#MultiSigner) ### multiSigner.generateSigner() ⇒ Generate a key for the node and save the node key in a file named by (../\.key). **Kind**: instance method of [MultiSigner](#MultiSigner) **Returns**: Generated signer info. ### multiSigner.sign(tx) ⇒ **Kind**: instance method of [MultiSigner](#MultiSigner) **Returns**: The signed transaction blob. | Param | Description | | --- | --- | | tx | Transaction in json. | ### multiSigner.isSignerNode() ⇒ Check wether this is a signer. **Kind**: instance method of [MultiSigner](#MultiSigner) **Returns**: true or false based on signer or not. ## AllVoteElector Evaluates votes in an election based on the desired vote count and timeout. **Kind**: global class * [AllVoteElector](#AllVoteElector) * [new AllVoteElector(desiredVoteCount, timeout)](#new_AllVoteElector_new) * [.election(electionName, voteEmitter, context)](#AllVoteElector+election) ⇒ ### new AllVoteElector(desiredVoteCount, timeout) Creates an instance of AllVoteElector. | Param | Type | Description | | --- | --- | --- | | desiredVoteCount | number | The number of votes needed to complete the election. | | timeout | number | The timeout period in milliseconds for the election. | ### allVoteElector.election(electionName, voteEmitter, context) ⇒ Evaluate the election. **Kind**: instance method of [AllVoteElector](#AllVoteElector) **Returns**: Evaluated votes as a promise. | Param | Description | | --- | --- | | electionName | Election identifier. | | voteEmitter | Event emitter which the votes are fed into, | | context | Vote context for the election. |