Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 1.19.0

### Enhancements
* Deprecation: Add deprecation tags to v1 `algod` API by @algochoi in https://github.com/algorand/java-algorand-sdk/pull/388
### Other
* Regenerate code with the latest specification file (b243e19e) by @github-actions in https://github.com/algorand/java-algorand-sdk/pull/387

## New Contributors
* @github-actions made their first contribution in https://github.com/algorand/java-algorand-sdk/pull/387

**Full Changelog**: https://github.com/algorand/java-algorand-sdk/compare/1.18.0...1.19.0

# 1.18.0

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Maven:
<dependency>
<groupId>com.algorand</groupId>
<artifactId>algosdk</artifactId>
<version>1.18.0</version>
<version>1.19.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.algorand</groupId>
<artifactId>algosdk</artifactId>
<version>1.18.0</version>
<version>1.19.0</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/algorand/algosdk/abi/Contract.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.algorand.algosdk.abi;

import com.algorand.algosdk.algod.client.StringUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/algorand/algosdk/abi/Interface.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.algorand.algosdk.abi;

import com.algorand.algosdk.algod.client.StringUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/com/algorand/algosdk/abi/Method.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.algorand.algosdk.abi;

import com.algorand.algosdk.algod.client.StringUtil;
import com.algorand.algosdk.transaction.Transaction;
import com.algorand.algosdk.util.CryptoProvider;
import com.fasterxml.jackson.annotation.JsonCreator;
Expand All @@ -20,6 +19,8 @@
import java.util.List;
import java.util.Objects;

import org.apache.commons.lang3.StringUtils;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class Method {
@JsonIgnore
Expand Down Expand Up @@ -150,7 +151,7 @@ else if (method.charAt(i) == ')') {
public String getSignature() {
List<String> argStringList = new ArrayList<>();
for (Arg value : this.args) argStringList.add(value.type);
return this.name + "(" + StringUtil.join(argStringList.toArray(new String[0]), ",") + ")" + this.returns.type;
return this.name + "(" + StringUtils.join(argStringList.toArray(new String[0]), ",") + ")" + this.returns.type;
}

@JsonIgnore
Expand Down Expand Up @@ -195,7 +196,7 @@ public static Method getMethodByName(List<Method> methods, String name) {
for(int idx=0;idx<filteredMethods.size();idx++){
sigs[idx] = filteredMethods.get(idx).getSignature();
}
String found = StringUtil.join(sigs, ",");
String found = StringUtils.join(sigs, ",");
throw new IllegalArgumentException(String.format("found %d methods with the same name: %s", filteredMethods.size(), found));
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/algorand/algosdk/abi/TypeTuple.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.algorand.algosdk.abi;

import com.algorand.algosdk.algod.client.StringUtil;
import com.algorand.algosdk.util.Encoder;
import com.algorand.algosdk.util.GenericObjToArray;

Expand All @@ -11,6 +10,8 @@
import java.util.List;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;

public class TypeTuple extends ABIType {
public final List<ABIType> childTypes;

Expand All @@ -23,7 +24,7 @@ public String toString() {
List<String> childStrs = new ArrayList<>();
for (ABIType t : this.childTypes)
childStrs.add(t.toString());
return "(" + StringUtil.join(childStrs.toArray(new String[0]), ",") + ")";
return "(" + StringUtils.join(childStrs.toArray(new String[0]), ",") + ")";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.algorand.algosdk.algod.client;

@Deprecated
public class AlgodClient extends ApiClient {
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
* Callback for asynchronous API call.
*
* @param <T> The return type
* @deprecated Use the equivalent in v2 algod client
*/
@Deprecated
public interface ApiCallback<T> {
/**
* This is called when the API call fails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;


@Deprecated
public class ApiClient {

private String basePath = "http://localhost";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Map;
import java.util.List;


@Deprecated
public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
* API response returned by API call.
*
* @param <T> The type of data that is deserialized from response body
* @deprecated Use the equivalent in v2 algod client
*/
@Deprecated
public class ApiResponse<T> {
final private int statusCode;
final private Map<String, List<String>> headers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package com.algorand.algosdk.algod.client;


@Deprecated
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*
* Taken from https://github.com/square/okhttp/issues/350
*/
@Deprecated
class GzipRequestInterceptor implements Interceptor {
@Override public Response intercept(Chain chain) throws IOException {
Request originalRequest = chain.request();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/algorand/algosdk/algod/client/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.Date;
import java.util.Map;

@Deprecated
public class JSON {
private Gson gson;
private boolean isLenientOnJson = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import okio.Okio;
import okio.Sink;

@Deprecated
public class ProgressRequestBody extends RequestBody {

public interface ProgressRequestListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import okio.Okio;
import okio.Source;

@Deprecated
public class ProgressResponseBody extends ResponseBody {

public interface ProgressListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package com.algorand.algosdk.algod.client;


@Deprecated
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
import com.algorand.algosdk.algod.client.ApiClient;
import com.algorand.algosdk.algod.client.Configuration;

/**
* @deprecated Use the equivalent in v2 algod client
*/
@Deprecated
public class AlgodApi extends DefaultApi {

public AlgodApi() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
import java.util.List;
import java.util.Map;

/**
* @deprecated Use the equivalent in v2 algod client
*/
@Deprecated
public class DefaultApi {
private ApiClient apiClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.List;
import java.util.Map;


@Deprecated
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.List;
import java.util.Map;

@Deprecated
public interface Authentication {
/**
* Apply authentication settings to header and query params.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.List;
import java.util.Map;

@Deprecated
public class HttpBasicAuth implements Authentication {
private String username;
private String password;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.List;
import java.util.Map;


@Deprecated
public class OAuth implements Authentication {
private String accessToken;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package com.algorand.algosdk.algod.client.auth;

@Deprecated
public enum OAuthFlow {
accessCode, implicit, password, application
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package com.algorand.algosdk.algod.client.lib;


@Deprecated
public class Pair {
private String name = "";
private String value = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/
@ApiModel(description = "Account Description")

@Deprecated
public class Account {
@SerializedName("address")
private String address = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io.swagger.annotations.ApiModelProperty;

@ApiModel(description = "AssetParams specifies the holdings of a particular asset.")
@Deprecated
public class AssetHolding {
@SerializedName("creator")
private String creator = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

@ApiModel(description = "AssetParams specifies the parameters for an asset")
@Deprecated
public class AssetParams {
@SerializedName("assetname")
private String assetname = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Block contains a block information
*/
@ApiModel(description = "Block contains a block information")

@Deprecated
public class Block {
@SerializedName("currentProtocol")
private String currentProtocol = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* NodeStatus contains the information about a node status
*/
@ApiModel(description = "NodeStatus contains the information about a node status")

@Deprecated
public class NodeStatus {
@SerializedName("catchupTime")
private java.math.BigInteger catchupTime = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Participation Description
*/
@ApiModel(description = "Participation Description")

@Deprecated
public class Participation {
@SerializedName("partpkb64")
private byte[] partpkb64 = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* PaymentTransactionType contains the additional fields for a payment Transaction
*/
@ApiModel(description = "PaymentTransactionType contains the additional fields for a payment Transaction")

@Deprecated
public class PaymentTransactionType {
@SerializedName("amount")
private java.math.BigInteger amount = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* PendingTransactions represents a potentially truncated list of transactions currently in the node&#39;s transaction pool.
*/
@ApiModel(description = "PendingTransactions represents a potentially truncated list of transactions currently in the node's transaction pool.")

@Deprecated
public class PendingTransactions {
@SerializedName("totalTxns")
private java.math.BigInteger totalTxns = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Supply represents the current supply of MicroAlgos in the system
*/
@ApiModel(description = "Supply represents the current supply of MicroAlgos in the system")

@Deprecated
public class Supply {
@SerializedName("onlineMoney")
private java.math.BigInteger onlineMoney = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Transaction contains all fields common to all transactions and serves as an envelope to all transactions type
*/
@ApiModel(description = "Transaction contains all fields common to all transactions and serves as an envelope to all transactions type")

@Deprecated
public class Transaction {
@SerializedName("fee")
private java.math.BigInteger fee = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* TransactionFee contains the suggested fee
*/
@ApiModel(description = "TransactionFee contains the suggested fee")

@Deprecated
public class TransactionFee {
@SerializedName("fee")
private java.math.BigInteger fee = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* TransactionID Description
*/
@ApiModel(description = "TransactionID Description")

@Deprecated
public class TransactionID {
@SerializedName("txId")
private String txId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* TransactionList contains a list of transactions
*/
@ApiModel(description = "TransactionList contains a list of transactions")

@Deprecated
public class TransactionList {
@SerializedName("transactions")
private List<Transaction> transactions = new ArrayList<Transaction>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* TransactionParams contains the parameters that help a client construct a new transaction.
*/
@ApiModel(description = "TransactionParams contains the parameters that help a client construct a new transaction.")

@Deprecated
public class TransactionParams {
@SerializedName("consensusVersion")
private String consensusVersion = null;
Expand Down
Loading