forEachTxByDate

abstract fun forEachTxByDate(doit: (TransactionHistory) -> Boolean)

Wallet history iterator, sorted by newest first.

Parameters

doit

return true to stop iterating, false to continue.


abstract fun forEachTxByDate(startingDate: Long, count: Long = Long.MAX_VALUE, doit: (TransactionHistory) -> Boolean)

Wallet history iterator, sorted by newest first, starting at @startingDate, and moving backwards. This is the most efficient chunked history access. Approximately count records are made available; however every record of a given date is provided meaning that the actual number of available records can exceed the passed count. This ensures that no records are missed if you chunk requests, process all the records in each chunk, and ask for the date of the last record - 1. Providing starting dates is much more efficient than an index because the system does not know the index of a record, so must process every prior record to count them.

Parameters

startingDate

Start at this date in epoch seconds.

count

Retrieve approximately this many records. However, you will always get all records of a particular date, and you may get multiple dates, so the actual amount may exceed this count.

doit

Your handler for a particular record. Return true to finish now.