Releases: lightsail-network/java-stellar-sdk
Releases · lightsail-network/java-stellar-sdk
2.2.2
Update
- fix: add stricter validation for Ed25519 Signed Payload. (#751)
- fix: replace assert statements with explicit null checks in
Federationclass to ensure validation is not bypassed when assertions are disabled. (#752) - fix: add overflow check in
TimeBounds.expiresAfter()to prevent integer overflow when timeout is too large. (#753) - fix: add validation for
ManageDataOperationvalue length to ensure it does not exceed 64 bytes. (#754) - fix: use
StandardCharsets.UTF_8explicitly when converting byte arrays to strings to ensure consistent behavior across different platforms. (#756) - refactor: use static initialization for
GsonSingletonto ensure thread safety. (#757) - fix: use
commons-codecfor hex encoding/decoding inUtilclass to properly validate input and throw clear exceptions for invalid hex strings. (#758) - fix: improve XDR decoding security and correctness. (#759)
- Add decoding depth limit to prevent stack overflow (default: 200)
- Add input length tracking to prevent DoS via oversized allocations
- Validate variable-length array/opaque/string sizes before allocation
- Validate variable-length types don't exceed declared max size
- Validate fixed-length opaque/array sizes match declared size
- Fix short read handling for opaque/string with proper padding
- Remove incorrect auto-padding from read(byte[], int, int)
- Reject unknown union discriminant values when no default arm
- Validate boolean/optional flags are strictly 0 or 1 per RFC 4506
- Fix EOF handling in single-byte read
- Deprecate unsafe readIntArray/readFloatArray/readDoubleArray methods
- fix: prevent DoS attacks in
Federationby limiting stellar.toml and federation response sizes to 100KB, adding proper timeouts, and handling UTF-8 BOM. (#760)
2.2.1
Update:
- fix:
KeyPair.fromPublicKeynow accepts any 32-byte public key, even if it is not a valid Ed25519 public key point (e.g., all zeros likeGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF). Such keypairs can still be used for address representation but will throwIllegalStateExceptionwhen attempting to verify signatures.
2.2.0
Update:
- feat: add
AUTH_CLAWBACK_ENABLED_FLAGtoAccountFlag. (#743) - fix: remove
diagnosticEventsXdrfromorg.stellar.sdk.responses.sorobanrpc.Events. UseGetTransactionResponse.diagnosticEventsXdrandGetTransactionsResponse.Transaction.diagnosticEventsXdrinstead. (#744) - feat: add SEP-45 (Stellar Web Authentication for Contract Accounts) support. Check
Sep45Challengeclass for more details. (#746) - chore: update outdated documentation.
2.1.0
2.0.0
This release adds support for Protocol 23.
This release contains the exact same content as 2.0.0-beta3. Below is the changelog since 1.5.1.
Update:
- 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) - feat: add
isValidSignedPayloadtoStrKeyclass, this function can be used to validate the ed25519 signed payload. (#712) - feat: add
signExtraSignersPayloadto sign extra signers payloads inTransactionclass. (#713) - refactor: add balance id validation. (#722)
- fix: fix handling of transaction metadata versioning in
AssembledTransactionclass. (#723) - refactor: add validation for asset issuer. (#725)
- refactor: add validation for liquidity pool ID length in
TrustLineAsset. (#726)
Breaking changes:
- 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: 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.
Full Changelog: 1.5.0...2.0.0
2.0.0-beta3
Update
- fix: fix muxed account handling in
Addressclass. (#733)
Full Changelog: 2.0.0-beta2...2.0.0-beta3
2.0.0-beta2
Update:
- refactor: add validation for asset issuer. (#725)
- refactor: add validation for liquidity pool ID length in
TrustLineAsset. (#726) - fix: isolate Kotlin dependency to test scope. (#731)
Full Changelog: 2.0.0-beta1...2.0.0-beta2
2.0.0-beta1
Update:
- feat: add
isValidSignedPayloadtoStrKeyclass, this function can be used to validate the ed25519 signed payload. (#712) - feat: add
signExtraSignersPayloadto sign extra signers payloads inTransactionclass. (#713) - refactor: add balance id validation. (#722)
- fix: fix handling of transaction metadata versioning in
AssembledTransactionclass. (#723)
Breaking changes:
- 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.
Full Changelog: 2.0.0-beta0...2.0.0-beta1
1.5.1
2.0.0-beta0
Update:
- 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)
Breaking changes:
- 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)