-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protocol 19 SDK Support #42
Comments
Hello @Shaptic, thank you for providing this issue. We will update the sdk for protocol 19 support |
@christian-rogobete Do you have an ETA on this? FYI: the Testnet upgrade is May 9 (next week!), and the public network upgrade vote is June 8. |
Hey @rice2000, I will finish the implementation until Friday, test it as soon as the testnet is upgraded and then release a new version. |
done in release 1.3.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Protocol 19 SDK Support
Once voted in, the release of Protocol 19 will introduce two new CAPs:
API Changes
Horizon will return new fields for both accounts and transactions:
Accounts
Account records can now contain two new, optional fields:
The absence of these fields indicates that the account hasn't taken any actions since prior to the Protocol 19 release. Note that they'll either be both present or both absent.
Transactions
Each transaction record can now contain the following optional object:
All of the top-level fields within this object are also optional. However, the
"ledgerbounds"
object will always have its inner values set.Note that the existing
"valid_before_time"
and"valid_after_time"
fields on the top-level object will be identical to the"preconditions.timebounds.min_time"
and"preconditions.timebounds.min_time"
fields, respectively, if those exist. The"valid_before_time"
and"valid_after_time"
fields are now considered deprecated and will be removed in Horizon v3.0.0.StrKey Changes
The specification for CAP-40's new signed payload signers is outlined in this SEP-23 change: stellar/stellar-protocol#0943c19e. In summary, it should be prefixed with a
P
, then encode the signer address followed by the payload in typical XDR fashion.Keypair Changes
It should be possible to create decorated signature hints from signed payloads as described in CAP-40.
Transaction Builder Changes
SDKs should allow transactions to be built with the new preconditions:
Refer to CAP-21 for the details on their intended functionality.
For handling timebounds, we recommend the following pattern:
PRECOND_TIME
XDR structurePRECOND_V2
XDR structureThis provides both backwards compatibility and future efficiency. Note that SDKs typically require that timebounds be set on a transaction. Omitting timebounds must be done explicitly, e.g. by doing
.setTimeout(TIMEOUT_INFINITE)
in the JavaScript SDK.Signers should be represented as their human-readable StrKey strings, but should decode to (and encode from)
SignerKey
XDR instances.Reference Implementations
There are three reference implementations authored by SDF:
You can follow each respective issue to its implementation PRs.
The text was updated successfully, but these errors were encountered: