Listing Stream Items Using Transaction as Offset

+1 vote

When listing items in a stream, the offset parameter is expected to be an integer. For example:

multichain-cli MyBlockChain liststreamitems MyStream false 10 100

This will give me 10 items from the stream, starting at item 100. But what if I want to list items that come after a specific transaction? Is there a way to use a transaction as an offset?

asked Jan 30, 2018 by KermodeBear

1 Answer

+1 vote

No, I'm afraid you cannot currently provide a transaction ID as a starting point for these listing APIs. It's an interesting idea for future development. In the meantime you can get close by identifying the blocktime of this transaction ID, and then doing a time-based search using liststreamblockitems. But this will not give you exactly the same as liststreamitems because the timestamps of blocks are not necessarily monotonically increasing in all cases.

answered Jan 31, 2018 by MultiChain
Perfect, complete answer. Thank you very much!