From 117ce7dd1df0f207992dbdf86b72e0cea61ca3a5 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Mon, 14 Oct 2024 14:34:02 +0800 Subject: [PATCH] refactor!: The `protocolVersion` in the response is now represented as an `Integer`. (#647) --- CHANGELOG.md | 22 ++++++++++++++----- .../stellar/sdk/responses/RootResponse.java | 2 +- .../sorobanrpc/GetLatestLedgerResponse.java | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba69137c6..e072ec95a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,27 @@ ## Pending +## 1.0.0-beta0 + +**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**. + ### Update +- feat: support constructors in contract creation via `InvokeHostFunctionOperation.createContractOperationBuilder`. +- feat: add support for Soroban PRC's `getVersionInfo` API. +- feat: add `txHash` to `GetTransactionResponse` and `GetTransactionsResponse.Transaction`. + +### Breaking changes - refactor!: remove the constructor from `KeyPair`, use `KeyPair.fromSecretSeed` or `KeyPair.fromAccountId` instead. - 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 `amount` and `numAccounts` from `AssetResponse`. +- refactor!: remove `cost` from `SimulateTransactionResponse`, the correct resource costs can now be retrieved from the `transactionData`. +- refactor!: remove `pagingToken` from `GetEventsResponse.EventInfo`, use `GetEventsResponse.cursor` instead. +- refactor!: The `protocolVersion` in the response is now represented as an `Integer`. ## 1.0.0-alpha0 We are thrilled to announce the release of version 1.0.0-alpha0 for java-stellar-sdk, @@ -50,11 +67,6 @@ continued engagement as we shape the future of this project together. - chore: Display the original definition in the XDR class documentation. - chore: add some examples, you can find them in the `examples` directory. - chore: bump dependencies. -- feat: add support for Soroban PRC's `getVersionInfo` API. -- refactor!: remove `amount` and `numAccounts` from `AssetResponse`. -- refactor!: remove `cost` from `SimulateTransactionResponse`, the correct resource costs can now be retrieved from the `transactionData`. -- refactor!: remove `pagingToken` from `GetEventsResponse.EventInfo`, use `GetEventsResponse.cursor` instead. -- feat: add `txHash` to `GetTransactionResponse` and `GetTransactionsResponse.Transaction`. ### Breaking changes - refactor!: Refactored the handling of exceptions. diff --git a/src/main/java/org/stellar/sdk/responses/RootResponse.java b/src/main/java/org/stellar/sdk/responses/RootResponse.java index a90922630..78a355c14 100644 --- a/src/main/java/org/stellar/sdk/responses/RootResponse.java +++ b/src/main/java/org/stellar/sdk/responses/RootResponse.java @@ -40,7 +40,7 @@ public class RootResponse extends Response { Integer currentProtocolVersion; @SerializedName("supported_protocol_version") - Long supportedProtocolVersion; + Integer supportedProtocolVersion; @SerializedName("core_supported_protocol_version") Integer coreSupportedProtocolVersion; diff --git a/src/main/java/org/stellar/sdk/responses/sorobanrpc/GetLatestLedgerResponse.java b/src/main/java/org/stellar/sdk/responses/sorobanrpc/GetLatestLedgerResponse.java index ff10cfa82..6e27485ce 100644 --- a/src/main/java/org/stellar/sdk/responses/sorobanrpc/GetLatestLedgerResponse.java +++ b/src/main/java/org/stellar/sdk/responses/sorobanrpc/GetLatestLedgerResponse.java @@ -12,7 +12,7 @@ public class GetLatestLedgerResponse { String id; - Long protocolVersion; + Integer protocolVersion; Integer sequence; }