Go: [META] CAP23 support: Two-Part Payments with ClaimableBalanceEntry

Created on 6 Jul 2020  路  2Comments  路  Source: stellar/go

CAP23 support: Two-Part Payments with ClaimableBalanceEntry

This proposal introduces new operations that separate sending a payment from receiving the payment. CAP 23 introduces a new ledger key type and a new set of operations.

This issue keeps track of related work to support CAP23 in the ingestion system, web API, and SDKs.

Ingestion

We need to extend the ingestion system to support CAP23. Depends on:

Web API

SDKs

TODO: Create sub-issue for SDK related work, depends on Web API work #2860

  • [ ] Support loading and filtering multiple claimable_balances.
  • [ ] Support loading a single claimable_balance.
  • [ ] Add support for claimable balance operations.
Protocol 14

Most helpful comment

The suggested payload format of predicates is pretty cryptic right now. Horizon usually presents more readable resources.

There's some prior work around predicate trees in a JSON format. One notable example is mongodb's query language.

I propose moving from a {"type": i, "value": x} format to a {i_str: x} format.

Example

Original

"predicate": {
  "type": 1,
  "value": [
    {
      "type": 4,
      "value": "1594066025"
    },
    {
      "type": 3,
      "value": "1594066090"
    }
  ]
}

Proposed

"predicate": {
  "and" : [
    {"after": 1594066025},
    {"before": 1594066090}
  ]
}

All 2 comments

The suggested payload format of predicates is pretty cryptic right now. Horizon usually presents more readable resources.

There's some prior work around predicate trees in a JSON format. One notable example is mongodb's query language.

I propose moving from a {"type": i, "value": x} format to a {i_str: x} format.

Example

Original

"predicate": {
  "type": 1,
  "value": [
    {
      "type": 4,
      "value": "1594066025"
    },
    {
      "type": 3,
      "value": "1594066090"
    }
  ]
}

Proposed

"predicate": {
  "and" : [
    {"after": 1594066025},
    {"before": 1594066090}
  ]
}

Horizon support for CAP23 has been completed.

Was this page helpful?
0 / 5 - 0 ratings