Releases: Synesso/scala-stellar-sdk
Protocol v11
0.7.0
Breaking changes
- Renamed types
{Create|Delete|Update}OfferOperation
to{Create|Delete|Update}SellOfferOperation
. - Renamed type
CreatePassiveOfferOperation
toCreatePassiveSellOfferOperation
.
Added
- #77 Supports protocol v11.
- Renames
{Create|Delete|Update}OfferOperation
to{Create|Delete|Update}SellOfferOperation
. - Renames
CreatePassiveOfferOperation
toCreatePassiveSellOfferOperation
. - Introduces
{Create|Delete|Update}BuyOfferOperation
.
- Renames
- #78 Parse
manage_sell_offer
JSON responses to
provide compatibility with Horizon v0.18.0.
Fixed
Fix for rounding errors in EffectTrustLine{Created|Updated}
Fixed
- Avoid rounding errors in
EffectTrustLine{Created|Updated}
. Separatelimit
andasset
fields where merged into a singleIssuedAmount
.
Minor field additions and a rounding error fix.
Signer & StrKey changes
Fixed
- #65 Restructure
Signer
andStrKey
and objects to accommodate correct serialisation & deserialisation.
Fixes: SetOptions parsing & sealed traits in ADT.
- #64 Unsealed ADT traits are now sealed.
- #65 Failure to parse Set Options Operation JSON responses
when the operation set a signer other than an account. This is a partial fix to avoid parse failures.
More work is required to properly discriminate signer types. This is blocked by required changes to Horizon.
Federated Address support, Fee Stats, Network Info.
Added
-
Federation Server integration. #5 #6
- Resolve federated addresses with
KeyPair.fromAddress(address: String): Future[PublicKey]
. - Look up the account details by federated name with
FederationServer.byName
. - Perform a reverse lookup, where it is supported by the server, with
FederationServer.byAccount
.
- Resolve federated addresses with
-
Added
Network.feeStats()
method to return the fee statistics from the most recent ledger, as per thefee_stats
endpoint. #58 -
Added
Network.info()
method to return the values in the Horizon root document including Horizon & Core versions, network passphrase, protocol supported, etc. #56 -
Included client request headers
X-Client-Name
andX-Client-Version
so that Horizon instances & Federation Servers can tell when a request comes from the Scala SDK. #59
Support for Horizon v0.17.0
Fixes necessary to overcome breaking changes in Horizon v0.17.0
Changed
- Change to
LedgerResponse
fields to match updates in Horizon v0.17.0. The fieldssuccessTransactionCount
andfailureTransactionCount
were added. The fieldtransactionCount
remains as a method defined in terms of the new fields. #57
Fixed
AccountResponse
parsing. The JSON fieldpublic_key
was replaced withkey
. #57
New response flag: was sequence updated?
-
Introduction of new value on
TransactionResponses
-def sequenceUpdated: Boolean
. This indicates whether the client should consider the sequence number to have incremented as a result of the transaction posting. It's always true when the transaction was successful. But it's only sometimes true if the transaction failed as it depends upon whether the transaction passed pre-consensus validation. -
Attempts to construct a KeyPair with a bad account id will now throw
InvalidAccountId
. -
Attempts to construct a KeyPair with a bad secret seed will now throw
InvalidSecretSeed
.
XDR bulk changes
-
Restructuring of transaction submission response types.
TransactionPostResponse
(abstract)TransactionApproved
TransactionRejected
-
Complete removal of generated XDR classes in favour of domain objects handling their own XDR encoding. This means operations such as
TransactionResult.decodeXDR
will now return instances of domain objects newly created in this release which can be used in pattern matches. These classes incorporate all of the XDR encoded information in a user-friendly form and have the following hierarchy:TransactionResult
(trait)TransactionSuccess
TransactionNotSuccessful
(trait)TransactionFailure
TransactionNotAttempted
-
Most classes have changed packages to better expose the common user-facing classes.
stellar.sdk
contains commonly used classesKeyPair
,Network
and the concrete Network instancesPublicNetwork
andTestNetwork
.stellar.sdk.model
- classes used to model the request and response domain objects.stellar.sdk.model.op
- domain objects specific to operations.stellar.sdk.model.response
- objects representing Horizon responses.stellar.sdk.model.result
- domain objects specific to transaction submission results.stellar.sdk.model.xdr
- helper classes used by domain objects for XDR serialisation.
Breaking transaction post response types
Breaking changes to types associated with Horizon responses.
When calling Network.submit(SignedTransaction)
- Transactions successfully processed will return
Success[TransactionPostSuccess]
- Transactions processed, but rejected will return
Success[TransactionPostFailure]
- Failure to process the transaction will return
Failed[HorizonServerError]
When fetching historical transactions, e.g. Network.transaction(1234)
- Successful lookup will return
Success[TransactionHistoryResp]
When fetching data via Horizon, any missing data will return Failure[HorizonEntityNotFound]