Retrieve a range of historical states containing the state written at the given indices.

If this is not currently available, this function returns null and begins fetching the ledger entry asynchronously. This will generally be true for the first call for a given seqno, and it may take some time to completely fetch and validate. The call should be repeated later with the same arguments to retrieve the requested entries. This state is kept until it is deleted for one of the following reasons:

  • A call to dropCachedStates
  • seconds_until_expiry seconds elapse without calling this function
  • This handle is used to request a different seqno or range

The range is inclusive of both start_seqno and end_seqno. If a non-empty array is returned, it will always contain the full requested range; the array will be of length (end_seqno - start_seqno + 1).

If the requested range failed to be retrieved then null is returned. This may happen if the range is not known to the node (see also getStatusForTxId) or not available for other reasons (for example, the node is missing ledger files on disk).

  • Retrieve a range of historical states containing the state written at the given indices.

    If this is not currently available, this function returns null and begins fetching the ledger entry asynchronously. This will generally be true for the first call for a given seqno, and it may take some time to completely fetch and validate. The call should be repeated later with the same arguments to retrieve the requested entries. This state is kept until it is deleted for one of the following reasons:

    • A call to dropCachedStates
    • seconds_until_expiry seconds elapse without calling this function
    • This handle is used to request a different seqno or range

    The range is inclusive of both start_seqno and end_seqno. If a non-empty array is returned, it will always contain the full requested range; the array will be of length (end_seqno - start_seqno + 1).

    If the requested range failed to be retrieved then null is returned. This may happen if the range is not known to the node (see also getStatusForTxId) or not available for other reasons (for example, the node is missing ledger files on disk).

    Parameters

    • handle: number
    • startSeqno: number
    • endSeqno: number
    • secondsUntilExpiry: number

    Returns null | HistoricalState[]