Is the offset returned by getLedgerEnd guaranteed to be absolute?
- cocreatureOP
The docs for the
GetLedgerEndResponsesuggest that the offset is absolute. However, for some reason the type is not just a string which is used to represent absolute offset in other places in the ledger API but aLedgerOffsetwhich can also beLedgerBegin. Am I guaranteed to never get that?If not and the comment is off, what would the active contracts service return when queried at ledger begin? That really does only use a string so it seems like it couldn’t even represent ledger begin.
- nmarton-da1
The API documentation is correct, it will be an absolute offset all the time, therefore it is safe to assume that in client code.
You are right in your intuition that this could be also a plain string.