Adolfo Builes
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Stellar Protocol 14 API in Horizon This doc lists the changes to the Horizon API introduced by [CAP-23](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md) and [CAP-33](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0033.md). 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](https://github.com/stellar/go/releases)). 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: - 2020-09-21 Horizon 1.9.0-RC is released with support for protocol 14 - 2020-09-30 Testnet will vote to update to protocol 14 - 2020-10-28 Pubnet will vote to update to protocol 14 In what follows, "canonical form" means `code:address` or `native` (for the XLM asset). ## New objects * Claimable Balance with the following fields: * `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 be `null`), * `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 * [Account](https://developers.stellar.org/api/resources/accounts/object/) object: * New `sponsor` field (account ID, can be `null`). * New `num_sponsoring` field - number of reserves sponsored by this account, * New `num_sponsored` field - number of reserves sponsored for this account. * New `sponsor` field (account ID) in [Account](https://developers.stellar.org/api/resources/accounts/object/) > Balance object (only for non-native assets, can be `null`). * New `sponsor` field (account ID) in [Account](https://developers.stellar.org/api/resources/accounts/object/) > Signers object (can be `null`). * New `sponsor` field (account ID) in [Account's Data](https://developers.stellar.org/api/resources/accounts/data/) object (can be `null`). * New `sponsor` field (account ID) in [Offer](https://developers.stellar.org/api/resources/offers/object/) object (can be `null`). ## 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 by `sponsor` (new GET param). * `/offers` can now by filtered by `sponsor` (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` field `predicate` field is a JSON representation of `xdr.ClaimPredicate` as defined in [CAP-23](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md) 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: ```go type claimPredicateJSON struct { And *[]claimPredicateJSON `json:"and,omitempty"` Or *[]claimPredicateJSON `json:"or,omitempty"` Not *claimPredicateJSON `json:"not,omitempty"` Unconditional bool `json:"unconditional,omitempty"` AbsBefore *time.Time `json:"absBefore,omitempty"` RelBefore *int64 `json:"relBefore,omitempty"` } ``` Please refer to the [Golang implementation](https://github.com/stellar/go/blob/073878d8fdf435a000fd56932ec00fcd04c09b99/xdr/json.go) for details. The following issue shows how the Golang SDK will handle predicate creation: https://github.com/stellar/go/issues/3000 ## `RevokeSponsorshipOp` The `RevokeSponsorshipOp` requires users to build `LedgerKey` or a `struct` 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 https://github.com/stellar/go/issues/3001

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully