-
Notifications
You must be signed in to change notification settings - Fork 55
Protocol 14 support #274
Comments
Hi! We just made available a Horizon standalone network running protocol 14 which you can use to test your changes.
To get test lumens, generate a new keypair here And then replace the account query parameter in the following URL https://friend14.herokuapp.com/?account=G... with the public account ID generated in the laboratory. The protocol 14 standalone test network will be available until 9/30/2020 and then it will go offline. |
We noticed some effects were missing and should be incorporated (they are not included in the 1.19.0 Horizon release candidate). You can find extra context at stellar/go#3060 Extra new effects in protocol 14
Pre-existing effects (before protocol 14) which were already being emitted by Horizon but may not be covered by the SDKs (and should be)THIS PART IS ALREADY IN THE SDK THERE IS NO NEED TO DO IT
Updates to future friend-botWe added a new end-point to the future friend-bot which returns a sponsored account and a sponsored data entry in that account: https://friend14.herokuapp.com/new-account |
Hey guys, when you plan to release this fix? |
Hi there! Just a quick heads up that we'll be changing the keys on the JSON response for claim predicates in the next release. We introduced a couple of keys with camelCase, but we use snake_case in Horizon. For consistency we decided to add this change in the next release and although it is a "breaking change", we'll be doing a patch release (1.10.0) - mostly because:
The change renames the field Something like this:
Will become
The following PR implements the changes listed above in the JS-SDK stellar/js-stellar-sdk#575 |
We updated to version |
This issue lists the changes to the Horizon API introduced by CAP-23 and CAP-33. These two CAPs comprise the public-facing changes in Stellar Protocol 14. The first Horizon version with the updated API is Horizon 1.9.0-RC, to be released 2020-09-21 (monorepo release page).
This protocol upgrade is purely additive. We expect a protocol 14 compliant SDK to be able to run successfully against a protocol 13 network.
We are aiming for the following timeline:
In what follows, "canonical form" means
code:address
ornative
(for the XLM asset).New objects
id
- balance ID,paging_token
- paging token,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed (string, like all amounts),sponsor
- sponsoring account ID (can benull
),last_modified_ledger
- sequence number of the ledger when the balance was last modified,claimants
- list of objects:destination
- destination account ID,predicate
- predicate required to claim a balance (see below).Modified objects
sponsor
field (account ID, can benull
).num_sponsoring
field - number of reserves sponsored by this account,num_sponsored
field - number of reserves sponsored for this account.sponsor
field (account ID) in Account > Balance object (only for non-native assets, can benull
).sponsor
field (account ID) in Account > Signers object (can benull
).sponsor
field (account ID) in Account's Data object (can benull
).sponsor
field (account ID) in Offer object (can benull
).New endpoints
/claimable_balances
- the list of Claimable Balance objects with the following parameters (only one param per request allowed):asset
- find all claimable balances with the given asset (in canonical form),claimant
- find all claimable balances with the given claimant account ID,sponsor
- find all claimable balances sponsored by a given sponsor account ID./claimable_balances/{id}
- a single Claimable Balance object.Modified endpoints
/accounts
can now by filtered bysponsor
(new GET param)./offers
can now by filtered bysponsor
(new GET param).New operations
create_claimable_balance
with the following fields:asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed,claimants
- list of claimants with predicates (see below):destination
- destination account ID,predicate
- predicate required to claim a balance (see below).claim_claimable_balance
with the following fields:balance_id
- unique ID of balance to be claimed,claimant
- account ID of a claimant.begin_sponsoring_future_reserves
with the following fields:sponsored_id
- account ID for which future reserves will be sponsored.end_sponsoring_future_reserves
with the following fields:begin_sponsor
- account sponsoring reserves.revoke_sponsorship
with the following fields:account_id
- if account sponsorship was revoked,claimable_balance_id
- if claimable balance sponsorship was revoked,data_account_id
- if account data sponsorship was revoked,data_name
- if account data sponsorship was revoked,offer_id
- if offer sponsorship was revoked,trustline_account_id
- if trustline sponsorship was revoked,trustline_asset
- if trustline sponsorship was revoked,signer_account_id
- if signer sponsorship was revoked,signer_key
- if signer sponsorship was revoked.New effects
claimable_balance_created
with the following fields:balance_id
- unique ID of claimable balance,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed.claimable_balance_claimant_created
with the following fields:balance_id
- unique ID of a claimable balance,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed,predicate
- predicate required to claim a balance (see below).claimable_balance_claimed
with the following fields:balance_id
- unique ID of a claimable balance,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed,account_sponsorship_created
with the following fields:sponsor
- sponsor of an account.account_sponsorship_updated
with the following fields:new_sponsor
- new sponsor of an account,former_sponsor
- former sponsor of an account.account_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of an account.trustline_sponsorship_created
with the following fields:sponsor
- sponsor of a trustline.trustline_sponsorship_updated
with the following fields:new_sponsor
- new sponsor of a trustline,former_sponsor
- former sponsor of a trustline.trustline_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of a trustline.claimable_balance_sponsorship_created
with the following fields:sponsor
- sponsor of a claimable balance.claimable_balance_sponsorship_updated
with the following fields:new_sponsor
- new sponsor of a claimable balance,former_sponsor
- former sponsor of a claimable balance.claimable_balance_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of a claimable balance.signer_sponsorship_created
with the following fields:signer
- signer being sponsored.sponsor
- signer sponsor.signer_sponsorship_updated
with the following fields:signer
- signer being sponsored.former_sponsor
- the former sponsor of the signer.new_sponsor
- the new sponsor of the signer.signer_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of a signer.predicate
fieldpredicate
field is a JSON representation ofxdr.ClaimPredicate
as defined in CAP-23 and is a requirement that needs to be satisfied to claim the balance. It is a recursive structure that can be represented in JSON using for example the following Golang struct:Please refer to the Golang implementation for details.
The following issue shows how the Golang SDK will handle predicate creation: stellar/go#3000
RevokeSponsorshipOp
The
RevokeSponsorshipOp
requires users to buildLedgerKey
or astruct
for signers sponsorship. Ideally SDKs should expose helpers that build a valid operation for users without require them to pass an XDR LedgerKey. See the following issue for more information stellar/go#3001 .The text was updated successfully, but these errors were encountered: