Comparing Ledger Offsets

Is it possible to compare two ledger offsets to determine which came first? I’m trying to do this in java. I guess this may not be possible as the offset format is opaque.

As mentioned on the Ledger API reference documentation, offsets are opaque in the sense that “no client-side transformation of an offset is guaranteed to return a meaningful offset.” However the Ledger API server “ensures internally that offsets are lexicographically comparable”.

1 Like