NonceTracker

NonceTracker

new NonceTracker(opts)

Source:
Parameters:
Name Type Description
opts Object
Properties
Name Type Description
provider Object

a ethereum provider

getPendingTransactions function

a function that returns an array of txMeta whosee status is submitted

getConfirmedTransactions function

a function that returns an array of txMeta whose status is confirmed

Methods

_getHighestContinuousFrom(txList, startPoint) → {highestContinuousFrom}

Source:
Parameters:
Name Type Description
txList array

list of txMeta's

startPoint number

the highest known locally confirmed nonce

Returns:
Type
highestContinuousFrom

(async) getGlobalLock() → {Promise.<Object>}

Source:
Returns:

with the key releaseLock (the gloabl mutex)

Type
Promise.<Object>

(async) getNonceLock(address) → {Promise.<NonceDetails>}

Source:

this will return an object with the nextNonce nonceDetails of type NonceDetails, and the releaseLock Note: releaseLock must be called after adding a signed tx to pending transactions (or discarding).

Parameters:
Name Type Description
address string

the hex string for the address whose nonce we are calculating

Returns:
Type
Promise.<NonceDetails>