nextSealedIndex
nextSealedIndex(
options):Promise<{address:string;index:number; }>
Defined in: scan.ts:177
The first index, from from, whose address is sealed: unused on the chain (isUsed) and absent
from the ledger. The place a protected account sweeps to.
isUsed answers true, false, or undefined when it could not tell (the RPC is down). An
address is taken only on a plain false: on undefined the search stops with
SealedIndexError cannot-tell, because skipping the index would leave a gap and taking it
could sweep to an address the chain already knows. An error isUsed throws is passed on as it is.
Parameters
Section titled “Parameters”options
Section titled “options”addressAt
Section titled “addressAt”(index) => string | Promise<string>
string
number
isUsed
Section titled “isUsed”(address) => boolean | Promise<boolean | undefined> | undefined
Has the chain ever seen this address (a nonce, a spent or unspent output, any history)? undefined: could not tell.
ledger
Section titled “ledger”limit?
Section titled “limit?”number
How many indexes to try before giving up. Default 100.
Returns
Section titled “Returns”Promise<{ address: string; index: number; }>
Throws
Section titled “Throws”SealedIndexError cannot-tell, none-found or unsealable.