services/horizon: Support new CAP-21 transaction conditions #4276
Labels
horizon
horizon-api
Issues or features related to the Horizon API
Protocol 19
Support cap-21, cap-40 and sep-23 in Horizon & SDKs
Breakdown and Rollout: Horizon & Protocol 19. See #4261 for the master issue.
Background
CAP-21 adds a new set of transaction preconditions:
timeBounds
): as before, you can define a min/max time rangeledgerBounds
): a min/max ledger rangeminSeqNum
): a min sequence number, meaning the transaction is only valid if the source account’s sequence number is >= than thisminSeqAge
): a ledger time delta, meaning the transaction is only valid if a certain amount of time has passed since account’s last sequence number change (expanded upon later)minSeqLedgerGap
): a ledger number delta past the account’s last sequence number change (similar tominSeqAge
but a ledger count)Relevant XDR:
Affected Endpoints
GET /transactions
GET /transactions/:id
GET [any endpoint]/transactions
API Changes
Behavior
The new
Preconditions
object always exists if the transaction has preconditions, regardless of whether or not they are CAP-21 preconditions. This means theValidAfter/Before
andPreconditions.Timebounds.MinTime/MaxTime
fields match, for backwards compatibility.The text was updated successfully, but these errors were encountered: