- feat: add
isValidSignedPayloadtoStrKeyclass, this function can be used to validate the ed25519 signed payload. (#712)
- feat: add
org.stellar.sdk.SignerKeyfor enhanced signer key handling. (#712)org.stellar.sdk.Signerandorg.stellar.sdk.SignedPayloadSignerhas been removed, useorg.stellar.sdk.SignerKeyinstead.- The
StrKey#encodeSignedPayload(SignedPayloadSigner)andStrKey#decodeSignedPayload(String)methods now operate on rawbyte[]instead of theSignedPayloadSignerobject to provide more flexibility. KeyPair#fromXdrSignerKey()andKeyPair#getXdrSignerKey()have been removed, useorg.stellar.sdk.SignerKeyinstead.- The type of
TransactionPreconditions#extraSignershas been changed fromList<org.stellar.sdk.xdr.SignerKey>toList<org.stellar.sdk.SignerKey>. - The type of
SetOptionsOperation#signerhas been changed fromorg.stellar.sdk.xdr.SignerKeytoorg.stellar.sdk.SignerKey. - The type of
RevokeSignerSponsorshipOperation#signerhas been changed fromorg.stellar.sdk.xdr.SignerKeytoorg.stellar.sdk.SignerKey.
- feat: add
pollTransactionmethod toSorobanServerto poll transaction status with retry strategy. (#696) - feat: implement message signing and verification according to SEP-53, check
KeyPair.signMessageandKeyPair.verifyMessagefor more details. (#698) - feat: add
isValidEd25519SecretSeed,isValidPreAuthTxandisValidSha256HashtoStrKeyclass, these functions can be used to validate the corresponding strkey. (#702) - feat: add med25519 public key support to
StrKey. (#702) - feat: add liquidity pool and claimable balance support to
StrKey. (#701) - feat: add muxed account, liquidity pool and claimable balance support to
Addressclass. (#703) - feat(SorobanServer): add
destinationMuxedIdtoInvokeHostFunctionOperationResponse.AssetContractBalanceChange. (#710 and (#705)) - feat(SorobanServer): add
eventsfield toGetTransactionsResponse.TransactionandGetTransactionResponse. (#707) - feat(SorobanServer): add
oldestLedger,latestLedgerCloseTimeandoldestLedgerCloseTimefields toGetEventsResponse, and addtransactionIndexandoperationIndexfields toGetEventsResponse.EventInfo, check Stellar RPC release log for more information. - feat(SorobanServer): add support for non-root authorization in
SorobanServer#simulateTransaction. (#708)
- chore: upgrade generated XDR definitions to Protocol 23. (#699)
- refactor!: the following functions in
StrKeyare marked as deprecated, they will be removed in the next major release; please refer to the documentation for each function to see the corresponding replacement functions: (#702)StrKey#encodeEd25519PublicKey(AccountID)StrKey#encodeMuxedAccount(MuxedAccount)StrKey#decodeMuxedAccount(String)StrKey#encodeToXDRAccountId(String)StrKey#encodeToXDRMuxedAccount(String)
- refactor!: rename
readBytestodiskReadBytesand update related methods in SorobanDataBuilder. (#700) - refactor(HorizonServer)!: remove
numArchivedContractsandarchivedContractsAmountfromAssetResponse. (#704) - refactor(SorobanServer)!:
GetTransactionsResponse.Transaction#getDiagnosticEventsXdr()andGetTransactionsResponse.Transaction#parseDiagnosticEventsXdr()has been marked as deprecated, they will be removed in Stellar RPC soon, useGetTransactionsResponse.Transaction#getEvents()instead. (#706) - refactor(SorobanServer)!: remove deprecated
pagingTokenfield fromGetEventsResponse.EventInfo. (#707) - refactor(SorobanServer)!:
inSuccessfulContractCallinGetEventsResponse.EventInfohas been marked as deprecated, it will be removed in the next release. (#707)
- feat: change
XdrElementinterface to public. (#694)
- feat: Add
getSACBalancetoSorobanServer. (#691)
- fix: fix the issue where sending assets using
TransactionBuilder.buildPaymentToContractTransactionfails when the sender's account is the same as the asset issuer's account. (#685)
- feat: add support for SEP-35. (#683)
- fix: remove
@NonNullannotation fromstartLedgerin request classes. (#680)
- feat: add functions to send assets to contract address without relying on Stellar RPC. (#677)
In this release, we have significantly simplified the process of using the Java SDK to interact with Soroban contracts. You can now use stellar-contract-bindings to generate Java bindings for contracts and invoke them. Please visit the GitHub repository of stellar-contract-bindings for more information.
- feat: add
ContractClientto simplify contract calls. (#675)
We are excited to announce the release of version 1.0.0 of the Java Stellar SDK! This marks a significant milestone in the project's development, representing the culmination of extensive work and valuable community feedback since the alpha and beta releases.
This version is identical in functionality to 1.0.0-rc0. If you are upgrading from an older version, please make sure to review the change logs of all previous versions in our CHANGELOG.md, as there have been significant changes throughout the 1.0.0 development cycle. We would like to express our sincere gratitude to everyone who provided feedback, reported issues, and contributed to making this release possible. Your involvement has been instrumental in shaping and improving the SDK.
This release marks our official adoption of semantic versioning, providing more predictability for future updates. Breaking changes will now only be introduced in major version updates.
There are two PRs here that demonstrate how to upgrade to the latest version; you can check them out if needed:
Please continue to share your experiences and report any issues you encounter. Your feedback remains vital for the continued improvement of the SDK.
The following are the changes since version 1.0.0-beta1. If you are upgrading from an older version, please also refer to the change logs of previous versions, especially 1.0.0-alpha0.
In addition, there are two PRs here that demonstrate how to upgrade to the latest version; you can check them out if needed:
- feat: add support for Soroban PRC's
getLedgersAPI interface. (#660) - fix: fix the data validation of
StrKeyclass. (#664)
- refactor!: change the type of
AbstractTransaction.MIN_BASE_FEEfrominttolong. (#657) - refactor!: rename
TransactionPreconditions.isValidtoTransactionPreconditions.validate. (#666) - refactor!: if seed is not present, calling
Keypair.signthrows IllegalStateException. (#662) - refactor!:
StrKeyExceptionhas been removed, useIllegalArgumentExceptioninstead. When you call functions likeKeypair.fromAccountId, this exception will also be thrown if invalid data is passed in. (#663) - refactor!:
AssetCodeLengthInvalidExceptionhas been removed, useIllegalArgumentExceptioninstead. (#667) - refactor!:
MalformedAddressExceptionhas been removed, useIllegalArgumentExceptioninstead. (#668)
The following are the changes since version 1.0.0-beta0. If you are upgrading from an older version, please also refer to the change logs of previous versions, especially 1.0.0-alpha0.
- refactor: refactor
SSEStream, make it more reliable. (#652) - refactor: add
pagingTokenback toGetEventsResponse.EventInfo. This is to ensure compatibility with older versions of Soroban-RPC. We still recommend using theGetEventsResponse.cursorfield after upgrading Soroban-RPC. (#655)
This is the first release that supports Protocol 22. While the network has not upgraded yet, you can start integrating the new features into your codebase if you want a head start.
The following are the changes since version 1.0.0-alpha0. If you are upgrading from an older version, please also refer to the change logs of previous versions, especially 1.0.0-alpha0.
- feat: support constructors in contract creation via
InvokeHostFunctionOperation.createContractOperationBuilder. - feat: add support for Soroban PRC's
getVersionInfoAPI. - feat: add
txHashtoGetTransactionResponseandGetTransactionsResponse.Transaction.
- refactor!: remove the constructor from
KeyPair, useKeyPair.fromSecretSeedorKeyPair.fromAccountIdinstead. - fix!: fix bug with signing auth entries in multi-sig scenarios.
- feat!: support constructors in contract creation via
InvokeHostFunctionOperation.createContractOperationBuilder, the signature of the function has been changed. - refactor!: remove
amountandnumAccountsfromAssetResponse. - refactor!: remove
costfromSimulateTransactionResponse, the correct resource costs can now be retrieved from thetransactionData. - refactor!: remove
pagingTokenfromGetEventsResponse.EventInfo, useGetEventsResponse.cursorinstead. - refactor!: The
protocolVersionin the response is now represented as anInteger.
We are thrilled to announce the release of version 1.0.0-beta0 for java-stellar-sdk, which has been in development for nearly a decade. This release marks a significant milestone in our journey, as we have made substantial changes and improvements to enhance the functionality and usability of our software.
Please be aware that this release introduces breaking changes. We understand that this may cause inconvenience, but we believe these changes are necessary to rectify past design decisions and lay a solid foundation for the project's future. We have been cautious about introducing breaking changes in previous releases, but we feel this is the right time to make these important adjustments.
If you encounter any issues or have questions regarding the changes, please don't hesitate to submit an issue on our GitHub repository. Alternatively, you can reach out to me directly on the Stellar Dev Discord server. We value your feedback and are committed to addressing any concerns you may have.
Moving forward, we will be adopting semantic versioning starting from the official release of this version. This means that breaking changes will only be introduced in major version updates, providing more stability and predictability for our users.
It's important to note that this is an alpha release and should not be used in production environments. The purpose of this release is to gather feedback, identify and address any remaining issues, and ensure the stability and reliability of the software before the official release.
We appreciate your understanding and support as we work towards delivering a more robust and efficient solution. Thank you for being a part of our community, and we look forward to your continued engagement as we shape the future of this project together.
- feat: add support for Soroban PRC's
getTransactionsandgetFeeStatsAPI. - feat: add support for Horizon's
transaction_asyncAPI. - feat: optimize
RequestTimeoutException, when a timeout occurs, if the server returns some information, you can read them. - feat: add
Asset.createNonNativeAsset(String, String)andAsset.createNativeAsset(). - feat: add
MuxedAccountclass to represent a multiplexed account on Stellar's network. - feat: Add
Server.loadAccountto load theAccountobject used for building transactions, supportingMuxedAccount. - feat: Add support for
MuxedAccounttoSorobanServer.getAccount. - feat:
FeeBumpTransactionsupports transactions that include Soroban operations. - feat: added a series of functions to parse xdr in the response.
- fix: When calling
TransactionBuilder.build(), the Soroban resource fee will be included in thefeeof the built transaction. - fix: fix the issue where invoking
SorobanServer.prepareTransactionfor transactions that have already setSorobanDatacould result in unexpected high fees. - chore: Display the original definition in the XDR class documentation.
- chore: add some examples, you can find them in the
examplesdirectory. - chore: bump dependencies.
- refactor!: Refactored the handling of exceptions.
- Moved the Exception classes to the
org.stellar.sdk.exceptionandorg.stellar.sdk.federation.exceptionpackages. - Most of the exceptions inherit from
SdkException, andSdkExceptioninherits fromRuntimeException. Please refer to the following link to understand why we use unchecked exceptions: Why unchecked exceptions? - Renamed
SorobanRpcErrorResponsetoSorobanRpcException. FormatExceptionhas been renamed toStrKeyException. When encode or decode strkey fails,StrKeyFormatExceptionwill be thrown.- Detailed the possible exceptions that may be thrown in the documentation.
- In the previous code, there were instances where
RuntimeExceptionwas directly thrown. We have now replaced these with more appropriate exceptions such asIllegalArgumentException.
- Moved the Exception classes to the
- refactor!: removed the check for network passphrase in
Server, which means we will no longer verify if the network passphrase of transactions matches that of theServer,NetworkMismatchExceptionhas been removed. - refactor!: moved the Operation classes to the
org.stellar.sdk.operationspackage. - refactor!:
KeyPair.getSecretSeedreturnsnullif the keypair does not contain a secret key. - refactor!: due to the lack of maintenance for
net.i2p.crypto:eddsa, we have migrated toorg.bouncycastle:bcprov-jdk18on. The constructor ofKeyPairhas changed, but you generally won't be affected by this change. - refactor!: refactor asset classes.
LiquidityPoolParameters,LiquidityPoolConstantProductParameters,AssetTypePoolShare,LiquidityPoolShareChangeTrustAssetandLiquidityPoolShareTrustLineAssethave been removed. UseChangeTrustAssetandTrustLineAssetinstead. - refactor!:
Server.submitTransactionXdrandServer.submitTransactionnow returnTransactionResponseinstead ofSubmitTransactionResponse. An exception will be thrown when the transaction submission fails. Please refer to the documentation for more information. - refactor!:
Server.root()now returnsRootRequestBuilder. - refactor!: In
AllowTrustOperation,authorizeToMaintainLiabilitieshas been removed and the type ofauthorizehas been changed toTrustLineEntryFlag. Please refer to the documentation for details. - refactor!: Previously, operations could be constructed through many methods; now, we have standardized them. Here is an example, please refer to the documentation for more details:
ClawbackClaimableBalanceOperation op = ClawbackClaimableBalanceOperation.builder() .balanceId(balanceId) .sourceAccount(source) .build();
- refactor!:
TransactionBuilder.IncrementedSequenceNumberFunchas been removed. - refactor!:
Transaction.Builderhas been removed, useTransactionBuilderinstead. - refactor!:
Asset.getType()returnsorg.stellar.sdk.xdr.AssetTypeinstead ofString. - refactor!:
FeeBumpTransaction.Builderhas been removed, useFeeBumpTransaction#createWithBaseFee(String, long, Transaction)orFeeBumpTransaction#createWithFee(String, long, Transaction)instead. - refactor!:
FeeBumpTransaction.getFeeAccounthas been removed, useFeeBumpTransaction.getFeeSourceinstead. - refactor!: remove
AccountConverter, this means that we no longer support disabling support for MuxedAccount. - refactor!: refactor the way of constructing
Predicate.OrandPredicate.And. Theinnerinside has been removed, and in its place areleftandright, used to represent two predicates. - refactor!: Refactored response classes.
- Utilized wrapper classes, such as replacing
intwithInteger,longwithLong,booleanwithBoolean, etc. - If a field is a list, we now use
Listinstead ofarrays. - The types of some fields have been modified.
- Removed some methods.
- Some field names have been changed to maintain consistency with the Horizon API.
- Removed all functions that return
Optionalvalue.
- Utilized wrapper classes, such as replacing
- refactor!: remove
rateLimitLimit,rateLimitRemaining, andrateLimitResetfrom theResponse. Horizon does not return these fields. - refactor!:
TransactionBuilder#TransactionBuilder(Transaction)has been removed, because the TransactionBuilder constructed from the transaction may be inconsistent with what the user expects. - refactor!: remove
LiquidityPoolID. UseStringto represent the liquidity pool ID. - refactor!:
LiquidityPoolWithdrawOperation#LiquidityPoolWithdrawOperation(AssetAmount, AssetAmount, String)has been removed. UseLiquidityPoolWithdrawOperation#LiquidityPoolWithdrawOperation(Asset, BigDecimal, Asset, BigDecimal, BigDecimal)instead. - refactor!:
LiquidityPoolDepositOperation#LiquidityPoolDepositOperation(AssetAmount, AssetAmount, Price, Price)has been removed. UseLiquidityPoolDepositOperation#LiquidityPoolDepositOperation(Asset, BigDecimal, Asset, BigDecimal, Price, Price)instead. - refactor!: the type of the following field has been changed from
StringtoBigDecimal.ChangeTrustOperation.limitClawbackOperation.amountCreateAccountOperation.startingBalanceCreateClaimableBalanceOperation.amountCreatePassiveSellOfferOperation.amountLiquidityPoolDepositOperation.maxAmountAandLiquidityPoolDepositOperation.maxAmountBLiquidityPoolWithdrawOperation.amount,LiquidityPoolWithdrawOperation.minAmountA, andLiquidityPoolWithdrawOperation.minAmountBManageBuyOfferOperation.amountManageSellOfferOperation.amountPathPaymentStrictReceiveOperation.sendMaxandPathPaymentStrictReceiveOperation.destAmountPathPaymentStrictSendOperation.sendAmountandPathPaymentStrictSendOperation.destMinPaymentOperation.amount
- refactor!:
TransactionPreconditions#TransactionPreconditions(LedgerBounds, Long, BigInteger, long, List, TimeBounds)has been removed, useTransactionPreconditions#TransactionPreconditions(TimeBounds, LedgerBounds, Long, BigInteger, long, List)instead. - refactor!: The
Federationhas been refactored, please useFederation#resolveAddress(String)andFederation#resolveAccountId(String, String)now. - refactor!: Set the default value of
TransactionPreconditions.extraSignerstonew ArrayList<>(), it is not nullable.
- fix: fix
SSEStreamunpredictably throws unwantedIOException("Canceled"). (#650)
- The generated XDR has been upgraded to match the upcoming Protocol 21, namely stellar/stellar-xdr@v21.1. (#590)
- Migrate the project from
stellar/java-stellar-sdktolightsail-network/stellar-stellar-sdk. - Update
org.stellar.sdk.responses, add missing fields. (#570) - Add
Asset.getContractId()for calculating the id of the asset contract. (#574) - Publish the publication to Maven Central. (#580)
- Build the project with JDK 21. (#580)
- Optimize the way of parsing memo in
TransactionResponse. (#582)
- Support resource leeway parameter when simulating Soroban transactions. (#561)
- Support for the new, optional
diagnosticEventsXdrfield on theSorobanServer.sendTransactionmethod. (#564) - Remove deprecated classes and methods. (#565)
- Fix the
hashCodeandequalsmethods inTransactionandFeeBumpTransaction. (#566) - Add
TransactionBuilder#TransactionBuilder(Transaction)constructor. (#567) - Add
toString,hashCode, andequalsmethods to most classes. (#562) - Bump dependencies. (#569)
- Fix the
hashCodeandequalsmethods inTransactionandFeeBumpTransaction, now they will compare based on thesignatureBase(). (#566) - The types of the following fields have changed. (#560)
field before now GetEventsRequest.startLedger String Long GetEventsResponse.EventInfo.ledger Integer Long GetLatestLedgerResponse.protocolVersion Integer Long - The following classes and methods have been marked as deprecated in previous releases, and now they have been removed. (#565)
AccountResponse.Signer#getAccountId()has been removed, useAccountResponse.Signer#getKey()instead.OffersRequestBuilder#forAccount(String)has been removed, useOffersRequestBuilder#forSeller(String)instead.RootResponse#getProtocolVersion()has been removed, useRootResponse#getCurrentProtocolVersion()instead.SetOptionsOperationResponse#getSigner()has been removed, useSetOptionsOperationResponse#getSignerKey()instead.Transaction.Builderhas been removed, useTransactionBuilderinstead.TransactionBuilder#buildTimeBounds(long, long)has been removed, useTimeBounds#TimeBounds(long, long)instead.TransactionBuilder#addTimeBounds(TimeBounds)has been removed, useTransactionBuilder#addPreconditions(TransactionPreconditions)instead.
- Make
StrKeypublic, this allows users to conveniently encode and decode Stellar keys to/from strings. (#548) - Add support for muxed accounts in
PaymentOperationResponse. (#550) - Improve the reliability of
SSEStream. Now, it will restart when necessary. (#555) - Add the response code and body to
SubmitTransactionUnknownResponseException. (#556)
- Update
LedgerResponseandAccountResponse, remove outdated fields, and add missing fields. (#549) - Use
Priceinstead ofStringto represent prices. Change the type ofCreatePassiveSellOfferOperation.price,ManageBuyOfferOperation.price, andManageBuyOfferOperation.pricefromStringtoPrice, this fixes the issue of incorrect operations parsed in certain specific scenarios. (#554) - Update the SDK to the stable Protocol 20 release: #553
- The
BumpFootprintExpirationOperationis nowExtendFootprintTTLOperationand itsledgersToExpirefield is now namedextendTo, but it serves the same purpose. - The
InvokeHostFunctionOperation.createTokenContractOperationBuilderis nowInvokeHostFunctionOperation.createStellarAssetContractOperationBuilder. SorobanDataBuilder.setRefundableFeeis nowsetResourceFee.- The RPC endpoint structure has changed, check #552 for more details.
- The
- Add
org.stellar.sdk.spi.SdkProvider, users can implement this interface to provide their own implementation of the SDK. We provide an Android specific implementation, if you are integrating this SDK into an Android project, be sure to check it out. (#543) - Fix issues where the validity of the encoded strkey is not verified in certain scenarios. (#541)
- Fix the issue of javadocJar not including documentation. (#539)
- Publish sourcesJar to the GitHub Release page. (#539)
- Add support for Soroban Preview 11. (#530)
- New effects have been added to support Protocol 20 (Soroban) (#535):
ContractCreditedoccurs when a Stellar asset moves into its corresponding Stellar Asset Contract instanceContractDebitedoccurs when a Stellar asset moves out of its corresponding Stellar Asset Contract instance
- Add helper functions to sign authorization entries. (#537)
-
Bump dependencies & Remove unnecessary dependencies like guava. (#523)
-
No longer provide a shadow jar that contains embedded, relocated third-party dependencies. (#528) Instead the default
stellar-sdk.jarand thecom.github.stellar:java-stellar-sdk:{version}dependency are now packaged as 'thin library' jar, having no embedded dependencies.-
if your project used
stellar-sdk.jardirectly on classpath loader, will need to obtain the.jarfor each dependency version listed inbuild.gradle.ktsand include all in your project classpath, or consider downloading the 'uber' jar from the published artifacts on repohttps://jitpack.io/com/github/stellar/java-stellar-sdk/{version}/java-stellar-sdk-{version}-uber.jar -
if your project utilizes dependency management for build such as gradle/maven, then you can choose from the following artifacts using the dependency classifier:
implementation("com.github.stellar:java-stellar-sdk:{version}") // thin jar implementation("com.github.stellar:java-stellar-sdk:{version}:uber") // uber jar implementation("com.github.stellar:java-stellar-sdk:{version}:javadoc") // javadoc jar implementation("com.github.stellar:java-stellar-sdk:{version}:sources") // sources jar
-
When using the 'thin' jar in dependency management, it will automatically fetch dependencies transitively. If your project declares dependencies that are also declared here, then your project will override the preferences of this project and may cause runtime conflict.
-
When using the 'uber' jar in dependency management or as
.jarin classpath , be aware that it does not relocate the dependent packages.
-
-
Utils.claimableBalanceIdToXDRandUtils.xdrToClaimableBalanceIdhave been removed. (#503) -
The types of the following fields have changed. (#498)
field before now LedgerBounds.minLedger int long LedgerBounds.maxLedger int long MemoId.id long BigInteger TimeBounds.minTime long BigInteger TimeBounds.maxTime long BigInteger TransactionBuilder.baseFee int long TransactionPreconditions.TIMEOUT_INFINITE long BigInteger TransactionPreconditions.minSeqAge Long BigInteger TransactionPreconditions.minSeqLedgerGap int long
- Fix the bug in Transaction.isSorobanTransaction to accommodate BumpFootprintExpirationOperation. (#518)
- Add support for Soroban Preview 10. (#490)
- Correct the data type of certain fields to store the expected design values. (#497)
- Add source account comparison to
ClawbackClaimableBalanceOperation,LiquidityPoolWithdrawOperation, andLiquidityPoolDepositOperationfor equality check. (#484) - Add basic implementation of
liquidity_pools?account(#426)
- Fix the issue of unable to parse liquidity_pool_revoked effect properly. (#521)
- Define cursor, order and limit in AssetsRequestBuilder object. (#522)
- Add basic implementation of liquidity_pools?account (#426)
- Add source account comparison to
ClawbackClaimableBalanceOperation,LiquidityPoolWithdrawOperation, andLiquidityPoolDepositOperationfor equality check. (#484)
- Add strkey support for contract ids (#471)
- Fix NPE in
KeyPair.equals()method (#474) - Avoid to have unexpected exception on status code 429 TooManyRequests (#433)
- Add SubmitTransactionResponse.ResultCodes.innerTransactionResultCode (#466)
- Fix android crashing related to okhttp3 (#457)
- Fix the deployment CI that uploads the jar to the GitHub release [2]. (#453)
- Fix the deployment CI that uploads the jar to the GitHub release. (#452)
- Fix missing
auth_clawback_enabledfield in AccountResponse class. (#449)
- Fix bug in
KeyPair.fromSecretSeed(char[] seed). (#447) - Shade kotlin dependencies to prevent 'Duplicate class' errors. (#448)
- Update JDK compatibility version from Java 1.6 to Java 1.8 and bump the version of few libraries (#444):
- com.squareup.okhttp3 from
v3.11.0tov4.10.0. - commons-io:commons-io from
v2.6tov2.11.0. - junit:junit from
v4.12tov4.13.2. - org.threeten:threetenbp from
v1.4.4tov1.6.0. - org.mockito:mockito-core from
v2.21.0tov4.6.1. - javax.xml.bind:jaxb-api from
v2.3.0tov2.3.1.
- com.squareup.okhttp3 from
- Bump gson version from
v2.8.5tov2.9.0. (#443)
- Fix the
Sep10Challenge.verifyTransactionSignaturesmethod to handle/ignore signers that are not ed25519 compliant. (#440)
- Add memo to
Sep10Challenge.newChallenge()andSep10Challenge.readChallengeTransaction. (#435)
- Update TransactionResponse to include new Protocol 19 Preconditions (#428).
- Fix asset compare to when asset code are equals (#424).
- LiquidityPoolIDDeserializer is missing from the PageDeserializer. (#422)
- Update XDR definitions and auto-generated classes to support upcoming protocol 19 release (#416).
- Extend StrKey implementation to handle CAP 40 Payload Signer.
- Extended Transaction submission settings, additional new Preconditions can be added now, refer to CAP 21 Transaction Preconditions.
- org.stellar.sdk.Transaction.Builder
- deprecated
addTimeBounds()useaddPreconditions()instead - deprecated
setTimeout()useaddPreconditions()instead - deprecated
Transaction.Builderuse TransactionBuilder instead
- deprecated
- org.stellar.sdk.Transaction
getSignatures()returns an ImmutableList of signatures, do NOT add signatures to the collection returned. useaddSignature(DecoratedSignature signature)instead.
- Fixed NPE on TrustlineCreatedEffectResponse.getAsset() for liquidity pool asset type. Consolidated Asset factory creation pattern, made consistent for all asset types including native, alpha4, alpha12, liquidity pool shares. (#398).
- org.stellar.sdk.Asset.createNonNativeAsset() is now private. (#398).
- org.stellar.sdk.responses.effects.TrustlineCUDResponse, removed non-default public constructor, it wasn't needed. (#398).
- Muxed accounts are now supported by default. Previously we added opt in support for muxed accounts. But now we are changing the default behavior so that muxed accounts are rendered using their 'M' address encoding (#399).
- Fix missing Liquidity Pool ID in AccountResponse Balance (#379).
- Fix null pointer when calling ChangeTrustOperationResponse.getAsset() for LiquidityPool trust line (#378).
- Changed the access modifiers of the inner static classes of
AccountResponseto public (#390). - Use the new ClaimableBalance Predicate AbsBeforeEpoch field to avoid parsing errors on potential large dates in AbsBefore (#394).
- Changed offer ids to be represented in requests and response models as long data type. (#386).
- Changed all MuxedId attributes to be of data type
java.math.BigIntegerin request and response models (#388).
- Fixed bug in parsing liquidity pool operation and effect responses (#373).
- Added support for 'client_domain' ManageData operations in SEP 10 challenges (#368).
- Add 5 minute grace period to SEP-10 challenge parsing function (#366).
- Add opt-in support for SEP23 M-strkeys for
MuxedAccounts - Add
getClaimableBalanceId()method toTransactionclass which returns the claimable balance id for a given operation. - Add support for additional _muxed and _muxed_id optional fields in Horizon's JSON responses (available since Horizon 2.4, following what's described in SEP 23).
- Added TransactionsRequestBuilder.forClaimableBalance(), and OperationsRequestBuilder.forClaimableBalance().
- Added support for new
accounts,balances,claimable_balances_amount, andnum_claimable_balancesfields on Assets.
-
Operation
allow_trustis deprecated in favor ofset_trust_line_flags(although it will still be supported by the network) -
Effects
trustline_authorized,trustline_authorized_to_maintain_liabilitiesandtrustline_deauthorizedare deprecated in favor oftrustline_flags_updated. Note how we intentionally didn't add a newtrustline_authorized_clawback_enabledeffect.
For uniformity, the allow_trust operation will start producing trustline_flags_updated from this release.
For now trustline_authorized, trustline_authorized_to_maintain_liabilities and trustline_deauthorized will continue to be emitted as a result of the allow_trust operation but in the future we may stop doing so.
| Deprecated | New class |
|---|---|
org.stellar.sdk.AllowTrustOperation |
org.stellar.sdk.SetTrustlineFlagsOperation |
org.stellar.sdk.responses.operations.AllowTrustOperationResponse |
org.stellar.sdk.responses.operations.SetTrustLineFlagsOperationResponse |
org.stellar.sdk.responses.effects.TrustlineAuthorizedEffectResponse |
org.stellar.sdk.responses.effects.TrustlineFlagsUpdatedEffectResponse |
org.stellar.sdk.responses.effects.TrustlineAuthorizedToMaintainLiabilitiesEffectResponse |
org.stellar.sdk.responses.effects.TrustlineFlagsUpdatedEffectResponse |
org.stellar.sdk.responses.effects.TrustlineDeauthorizedEffectResponse |
org.stellar.sdk.responses.effects.TrustlineFlagsUpdatedEffectResponse |
-
clawbackimplemented inorg.stellar.sdk.ClawbackOperationclaws back a trustline from a given asset holder. -
clawback_claimable_balanceimplemented inorg.stellar.sdk.ClawbackClaimableBalanceOperationclaws back a claimable balance. -
set_trust_line_flagsimplemented inorg.stellar.sdk.SetTrustlineFlagsOperationmodifies a trustline's flags. This operation should be used instead oforg.stellar.sdk.AllowTrustOperation.
-
trustline_flags_updatedimplemented inorg.stellar.sdk.responses.effects.TrustlineFlagsUpdatedEffectResponse, with the following fields:- Asset fields (like explained in the operations above):
asset_typeasset_codeasset_issuer
trustor- account whose trustline the effect refers toauthorized_flag- true to indicate the flag is set, field ommited if not setauthorized_to_maintain_liabilites- true to indicate the flag is set, field ommited if not setclawback_enabled_flag- true to indicate that the flag is set, field ommitted if not set
- Asset fields (like explained in the operations above):
-
claimable_balance_clawed_backimplemented inorg.stellar.sdk.responses.effects.ClaimableBalanceClawedBackEffectResponse, with the following fields:balance_id- claimable balance identifer of the claimable balance clawed back
- Updates the SEP-10 utility function parameters to support SEP-10 v3.1 (#319)
- A new required
webAuthDomainparameter was added to the following functionsSep10Challenge#newChallenge(KeyPair, Network, String, String, String, TimeBounds)Sep10Challenge#readChallengeTransaction(String, String, Network, String, String)Sep10Challenge#readChallengeTransaction(String, String, Network, String[], String)Sep10Challenge#verifyChallengeTransactionSigners(String, String, Network, String, String, Set)Sep10Challenge#verifyChallengeTransactionSigners(String, String, Network, String[], String, Set)Sep10Challenge#verifyChallengeTransactionThreshold(String, String, Network, String[], String, int, Set)Sep10Challenge#verifyChallengeTransactionThreshold(String, String, Network, String, String, int, Set)
- The
webAuthDomainparameter is expected to match the value of the Manage Data operation with the 'web_auth_domain' key, if present.
- A new required
- Fix several bugs in revoke operations. (#317)
-
The XDR classes have been regenerated using the latest version of xdrgen which provides the following two features:
- Builder static inner classes to unions and structs
- Constructors for typedefs
- Update challenge transaction helpers for SEP-0010 v3.0.0. (#308)
- Fix the decoding of
balanceIdinorg.stellar.sdk.ClaimClaimableBalanceOperation. (#310)
- Fix NullPointerException in
org.stellar.sdk.responses.operations.RevokeSponsorshipOperationResponseaccessor methods.
-
Change the type of
offerIdfrom java.lang.Integer to java.lang.Long to align with the 64-bit size of offer IDs. (#303).This change affects the following fields:
- org.stellar.sdk.responses.operations.CreatePassiveSellOfferOperationResponse.offerId
- org.stellar.sdk.responses.operations.ManageBuyOfferOperationResponse.offerId
- org.stellar.sdk.responses.operations.ManageSellOfferOperationResponse.offerId
- Update challenge transaction helpers for SEP-0010 v2.1.0. (#300).
- Remove verification of domain name.
- Allow additional manage data operations that have the source account set as the server key.
- Add support for claimable balances (#295). Extend server class to allow loading claimable balances from Horizon. The following functions are available:
server.claimableBalances();
server.claimableBalances().forClaimant(claimant);
server.claimableBalances().forSponsor(sponsorId);
server.claimableBalances().forAsset(asset);
server.claimableBalances().claimableBalance(balanceId);
-
Add the following attributes to
AccountResponse(#295):Optional<String> getSponsor()Integer getNumSponsoring()Integer getNumSponsored()
-
Add the optional attribute
Optional<String> getSponsor()toAccountResponse.Signer,AccountResponse.Balance,ClaimableBalanceResponse, andOfferResponse(#295). -
Add
sponsorfiltering support foroffersandaccounts(#295).server.offers().forSponsor(accountID)server.accounts().forSponsor(accountID)
-
Extend operation responses to support new operations (#295).
create_claimable_balancewith 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_balancewith the following fields:balance_id- unique ID of balance to be claimed,claimant- account ID of a claimant.
begin_sponsoring_future_reserveswith the following fields:sponsored_id- account ID for which future reserves will be sponsored.
end_sponsoring_future_reserveswith the following fields:begin_sponsor- account sponsoring reserves.
revoke_sponsorshipwith 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.
-
Extend effect responses to support new effects (#295).
claimable_balance_createdwith 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_createdwith 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_claimedwith 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_createdwith the following fields:sponsor- sponsor of an account.
account_sponsorship_updatedwith the following fields:new_sponsor- new sponsor of an account,former_sponsor- former sponsor of an account.
account_sponsorship_removedwith the following fields:former_sponsor- former sponsor of an account.
trustline_sponsorship_createdwith the following fields:sponsor- sponsor of a trustline.
trustline_sponsorship_updatedwith the following fields:new_sponsor- new sponsor of a trustline,former_sponsor- former sponsor of a trustline.
trustline_sponsorship_removedwith the following fields:former_sponsor- former sponsor of a trustline.
claimable_balance_sponsorship_createdwith the following fields:sponsor- sponsor of a claimable balance.
claimable_balance_sponsorship_updatedwith the following fields:new_sponsor- new sponsor of a claimable balance,former_sponsor- former sponsor of a claimable balance.
claimable_balance_sponsorship_removedwith the following fields:former_sponsor- former sponsor of a claimable balance.
signer_sponsorship_createdwith the following fields:signer- signer being sponsored.sponsor- signer sponsor.
signer_sponsorship_updatedwith 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_removedwith the following fields:former_sponsor- former sponsor of a signer.
- Replace
Sep10Challenge.newChallenge()'sString anchorNameparameter withString domainName - Add
String domainNameparameter toSep10Challenge.readChallengeTransaction(),Sep10Challenge.verifyChallengeTransactionSigners(), andSep10Challenge.verifyChallengeTransactionThreshold()
SEP-10 now requires clients to verify the SIGNING_KEY included in the TOML file of the service requiring authentication is used to sign the challenge and that the challenge's Manage Data operation key includes the requested service's home domain. These checks ensure the challenge cannot be used in a relay attack.
The breaking changes described above support the added SEP-10 2.0 requirements for both servers and clients.
- Generate V1 transaction envelopes when constructing new Transaction instances (#285).
- Allow FeeBumpTransaction instances to wrap V0 transactions (#285).
- Rollback support for SEP23 (Muxed Account StrKey) (#282).
- Update XDR definitions and auto-generated classes to support upcoming protocol 13 release (#276).
- Extend StrKey implementation to handle CAP 27 Muxed Accounts (#276).
- Update
TransactionResponseto include new fields which are relevant to CAP 15 Fee-Bump Transactions (#275). - Update
AccountResponse.Balance,AllowTrustOperationResponse, and createTrustlineAuthorizedToMaintainLiabilitiesEffectResponseto support CAP 18 Fine-Grained Control of Authorization (#274). - Add
FeeBumpTransactionandFeeBumpTransaction.Builderfor parsing and creating CAP 15 Fee-Bump Transactions (#278). - Add methods to
Serverfor submitting CAP 15 Fee-Bump Transactions (#278). - Update SEP 10 implementation to reject fee-bump transactions and transactions with multiplexed addresses ([#278] (#278)).
- Update SEP 29 implementation to handle bump transactions (#278).
-
Add SEP0029 (memo required) support. (#272)
Extends
Server.submitTransactionto always run a memo required check before sending the transaction. If any of the destinations require a memo and the transaction doesn't include one, then anAccountRequiresMemoErrorwill be thrown.You can skip this check by passing a true
skipMemoRequiredCheckvalue toServer.submitTransaction:server.submitTransaction(tx, true)The check runs for each operation of type:
paymentpathPaymentStrictReceivepathPaymentStrictSendmergeAccount
If the transaction includes a memo, then memo required checking is skipped.
See SEP0029 for more information about memo required check.
- Update challenge transaction helpers for SEP-10 v1.3.0 (#263).
- Add support for /accounts end-point with ?signer and ?asset filters (#261).
- Add support for /offers end-point with query parameters (#261).
- Regenerate the XDR definitions to include MetaV2 support (#261).
- Horizon v0.24.0 added a
fee_chargedandmax_feeobject with information about max bid and actual fee paid for each transaction. - We are removing ``*_all_accepted_fee` fields in favor of the new keys, making it easier for people to understand the meaning the fields.
- Represent memo text contents as bytes because a memo text may not be valid UTF-8 string (#257).
- Validate name length when constructing org.stellar.sdk.ManageDataOperation instances.
- Validate home domain length when constructing org.stellar.sdk.SetOptionsOperation instances.
- Fix bug in
org.stellar.sdk.requests.OperationsRequestBuilder.operation(long operationId). The method submitted an HTTP request to Horizon with the following path, /operation/ , but the correct path is /operations/ - Rename
org.stellar.sdk.requests.PathsRequestBuildertoorg.stellar.sdk.requests.StrictReceivePathsRequestBuilder - Add
sourceAssets()toorg.stellar.sdk.requests.StrictReceivePathsRequestBuilderwhich allows a list of assets to be provided instead of a source account - Add
org.stellar.sdk.requests.StrictSendPathsRequestBuilderwhich is the request builder for the /paths/strict-send endpoint - Removed deprecated classes:
org.stellar.sdk.PathPaymentOperationandorg.stellar.sdk.responses.operations.PathPaymentOperationResponse - The
fee_paidfield in the Horizon transaction response will be removed when Horizon 0.25 is released. Thefee_paidfield has been replaced bymax_fee, which defines the maximum fee the source account is willing to pay, andfee_charged, which defines the fee that was actually paid for a transaction. Consequently,getFeePaid()has been removed fromorg.stellar.sdk.responses.Transactionand has been replaced withgetMaxFee()andgetFeeCharged().
The following methods are deprecated and will be removed in 0.11.0. Please switch to new methods and classes.
| Deprecated | New method/class |
|---|---|
org.stellar.sdk.PathPaymentOperation |
org.stellar.sdk.PathPaymentStrictReceiveOperation |
org.stellar.sdk.responses.operations.PathPaymentOperationResponse |
org.stellar.sdk.responses.operations.PathPaymentStrictReceiveOperationResponse |
- Add helper method to generate SEP 10 challenge
- Stellar Protocol 12 compatibility.
- Include
pathproperty in path payment operation responses. - Provide
includeTransactions()method for constructing operations requests which include transaction data in the operations response. - Provide
includeTransactions()method for constructing payments requests which include transaction data in the payments response.
- Use strings to represent account ids instead of KeyPair instances because account ids will not necessarily be valid public keys. If you try to parse an invalid public key into a KeyPair you will encounter an exception. To prevent exceptions when parsing horizon responses it is better to represent account ids as strings
- Removed deprecated methods and classes listed in the 0.7.0 changelog entry
- Configure network at the transaction and server level rather than using a singleton to determine which network to use globally.
- Implement hashCode() and equals() on Stellar classes and XDR generated classes
- Add streaming for account Offers
- Add callback to handle SSE failures
The following methods are deprecated and will be removed in 0.8.0. Please switch to new methods and classes.
| Deprecated | New method/class |
|---|---|
org.stellar.sdk.Server#operationFeeStats |
org.stellar.sdk.Server#feeStats |
org.stellar.sdk.requests.OperationFeeStatsRequestBuilder |
org.stellar.sdk.requests.FeeStatsRequestBuilder |
org.stellar.sdk.responses.OperationFeeStatsResponse |
org.stellar.sdk.responses.FeeStatsResponse |
org.stellar.sdk.responses.operations.CreatePassiveOfferOperationResponse |
org.stellar.sdk.responses.operations.CreatePassiveSellOfferOperationResponse |
org.stellar.sdk.responses.operations.ManageOfferOperationResponse |
org.stellar.sdk.responses.operations.ManageOfferSellOperationResponse |
org.stellar.sdk.CreatePassiveOfferOperation |
org.stellar.sdk.CreatePassiveSellOfferOperation |
org.stellar.sdk.ManageOfferOperation |
org.stellar.sdk.ManageSellOfferOperation |
- Stellar Protocol 11 compatibility (#199).
- Compatibility with Horizon API updates (#205).
- Add Support for
InflationOperationinOperation.fromXdr(#194). - Fixed exception thrown from
ManageOfferOperation.fromXDRfor some offers (#188). - Send Horizon client fingerprint (#190).
Servernow implementsCloseableinterface (#182).- Fixed
/order_bookendpoint streaming.
- Horizon 0.17.0 features (#180)
- Enable setting custom base fee (#177)
- Horizon 0.16.0 features (#172)
- Allow no signatures in Transaction.toEnvelopeXdr (#164)
- Fix dependencies shadowing (#173)
- Fixed streaming issues.
- Breaking change
Transaction.BuilderrequiressetTimeoutmethod to be called. - Added Horizon 0.15.0 features.
- Improved streaming code and dependencies (thanks @jillesvangurp!).
- SEP-0005 derivation (thanks @westonal!).
- Non
ed25519keys are now supported in all responses (fixes #126):SetOptionsOperationResponse.getSigneris deprecated. Please useSetOptionsOperationResponse.getSignerKey.AccountResponse.Signer.getAccountIdis deprecated. Please useAccountResponse.Signer.getKey.
- Fixed
PathPaymentOperationResponse.getSourceAssetmethod (#125).
- Fixed condition check in
TimeBoundswhenmaxTimeis equal0.
- Protocol V10 updates:
Transactionnow has methods to create it from previously builtTransactionEnvelope.- Improved
Server.submitTransactionmethod, now throws exception for timeouts.
- Fixed
MemoReturnHash#toXdr()method. - Patch for Horizon Timeout responses (
SubmitTransactionResponse.getEnvelopeXdr()andSubmitTransactionResponse.getResultXdr()).
- Full compatibility with Horizon 0.13.0 API.
- Fixed
Page.getNextPage#66.
- Java SDK now works in Android!
Priceconstructor is now public.- Added support for new endpoints and fields added in Horizon v0.12.0.
- Fixed
pad()method inXdrInputStream. - Added utf8 string support for
XdrDataInputStreamandXdrDataOutputStream. - Fixed
AllowTrustOperation.BuilderforASSET_TYPE_CREDIT_ALPHANUM12assets.
KeyPair.signnow throwsRuntimeExceptionwhenKeyPairobject does not contain a secret key.SubmitTransactionResponse.getOfferIdFromResultif offer was taken andtx_resultdoes not contain offer ID.
- Regenerated XDR classes:
XdrDataOutputStreamclass is now padding opaque data.XdrDataInputStreamclass is now throwing an IOException when padding bytes are not zeros.- Made methods that shouldn't be used outside of
XdrDataOutputStreamandXdrDataInputStreamclasses private. - Removed unused imports and variables.
- Added ability to set TimeBounds using Transaction.Builder
- Implemented
/order_bookand/order_book/tradesrequests.
- Fixed a bug in
AssetDeserializer. - Fixed a bug in
TransactionResponse.
- Support for new signer types:
sha256Hash,preAuthTx. - Breaking change
Networkmust be explicitly selected. Previously testnet was a default network.
- New location of
stellar.tomlfile
- Fixed a bug in
OffersRequestBuilder.execute(URI uri)(799f0df).
- Update and fix XDR (0b404d9).
- Added ResultCodes to SubmitTransactionResponse (79e2260).
Transaction.Builder.addOperationis now thread safe (248a4a1).- Added
hashCodemethod forAssetclasses (ab822e5). FederationResponseconstructor is now public. (c4c5a4d).- Updates to javadoc.
- Breaking change Merged java-stellar-base and java-stellar-sdk. More info in #19.