Skip to content

Commit 5458e92

Browse files
committed
Merge branch 'release/1.13.0-beta-1'
2 parents a44b312 + eae8fa7 commit 5458e92

28 files changed

+1309
-38
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.13.0-beta-1
2+
- Unlimited assets regenerated code. (#302)
3+
14
# 1.12.0
25
- Add new key reg txn field (#266)
36
- C2C Feature and Testing (#290)
@@ -103,14 +106,14 @@
103106
# 1.2.0
104107
# Added
105108
- Added support for Algorand Standardized Assets (ASA)
106-
- Added support for Algorand Smart Contracts (ASC)
107-
- Added support for Hashed Time Lock Contract (HTLC)
109+
- Added support for Algorand Smart Contracts (ASC)
110+
- Added support for Hashed Time Lock Contract (HTLC)
108111
- Added support for Split contract
109112
- Added support for Group Transactions
110113
- Added support for leases
111114
# 1.1.6
112115
## Changed
113-
- IMPORTANT - This version modifies one of the mnemonic words. Please let your users to know that if they have the word "setupIfNeeded" in their mmnemonic, they should change it to "setup". Everything else remains the same.
116+
- IMPORTANT - This version modifies one of the mnemonic words. Please let your users to know that if they have the word "setupIfNeeded" in their mmnemonic, they should change it to "setup". Everything else remains the same.
114117
# 1.1.5
115118
## Added
116119
- signing and verifying signatures for arbitrary bytes

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
unit:
2-
mvn test -Dcucumber.filter.tags="@unit.offline or @unit.algod or @unit.indexer or @unit.rekey or @unit.indexer.rekey or @unit.transactions or @unit.transactions.keyreg or @unit.responses or @unit.applications or @unit.dryrun or @unit.tealsign or @unit.responses.messagepack or @unit.responses.231 or @unit.responses.messagepack.231 or @unit.feetest or @unit.indexer.logs or @unit.abijson or @unit.atomic_transaction_composer or @unit.transactions.payment"
2+
mvn test -Dcucumber.filter.tags="@unit.offline or @unit.algod or @unit.indexer or @unit.rekey or @unit.indexer.rekey or @unit.transactions or @unit.transactions.keyreg or @unit.responses or @unit.applications or @unit.dryrun or @unit.tealsign or @unit.responses.messagepack or @unit.responses.231 or @unit.responses.messagepack.231 or @unit.feetest or @unit.indexer.logs or @unit.abijson or @unit.atomic_transaction_composer or @unit.transactions.payment or @unit.responses.unlimited_assets or @unit.algod.ledger_refactoring or @unit.indexer.ledger_refactoring"
33

44
integration:
55
mvn test -Dcucumber.filter.tags="@algod or @assets or @auction or @kmd or @send or @send.keyregtxn or @indexer or @rekey or @applications.verified or @applications or @compile or @dryrun or @indexer.applications or @indexer.231 or @abi or @c2c"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Maven:
1919
<dependency>
2020
<groupId>com.algorand</groupId>
2121
<artifactId>algosdk</artifactId>
22-
<version>1.12.0</version>
22+
<version>1.13.0-beta-1</version>
2323
</dependency>
2424
```
2525

@@ -170,7 +170,7 @@ public class Main {
170170

171171
# Documentation
172172

173-
Javadoc can be found at [https://algorand.github.io/java-algorand-sdk](https://algorand.github.io/java-algorand-sdk). <br />
173+
Javadoc can be found at [https://algorand.github.io/java-algorand-sdk](https://algorand.github.io/java-algorand-sdk). <br />
174174
Additional resources and code samples are located at [https://developer.algorand.org](https://developer.algorand.org).
175175

176176
# Cryptography

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.algorand</groupId>
66
<artifactId>algosdk</artifactId>
7-
<version>1.12.0</version>
7+
<version>1.13.0-beta-1</version>
88
<packaging>jar</packaging>
99

1010
<name>${project.groupId}:${project.artifactId}</name>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
package com.algorand.algosdk.v2.client.algod;
2+
3+
import com.algorand.algosdk.crypto.Address;
4+
import com.algorand.algosdk.v2.client.common.Client;
5+
import com.algorand.algosdk.v2.client.common.HttpMethod;
6+
import com.algorand.algosdk.v2.client.common.Query;
7+
import com.algorand.algosdk.v2.client.common.QueryData;
8+
import com.algorand.algosdk.v2.client.common.Response;
9+
import com.algorand.algosdk.v2.client.model.AccountApplicationResponse;
10+
11+
12+
/**
13+
* Given a specific account public key and application ID, this call returns the
14+
* account's application local state and global state (AppLocalState and AppParams,
15+
* if either exists). Global state will only be returned if the provided address is
16+
* the application's creator.
17+
* /v2/accounts/{address}/applications/{application-id}
18+
*/
19+
public class AccountApplicationInformation extends Query {
20+
21+
private Address address;
22+
private Long applicationId;
23+
24+
/**
25+
* @param address An account public key
26+
* @param applicationId An application identifier
27+
*/
28+
public AccountApplicationInformation(Client client, Address address, Long applicationId) {
29+
super(client, new HttpMethod("get"));
30+
this.address = address;
31+
this.applicationId = applicationId;
32+
}
33+
34+
/**
35+
* Execute the query.
36+
* @return the query response object.
37+
* @throws Exception
38+
*/
39+
@Override
40+
public Response<AccountApplicationResponse> execute() throws Exception {
41+
Response<AccountApplicationResponse> resp = baseExecute();
42+
resp.setValueType(AccountApplicationResponse.class);
43+
return resp;
44+
}
45+
46+
/**
47+
* Execute the query with custom headers, there must be an equal number of keys and values
48+
* or else an error will be generated.
49+
* @param headers an array of header keys
50+
* @param values an array of header values
51+
* @return the query response object.
52+
* @throws Exception
53+
*/
54+
@Override
55+
public Response<AccountApplicationResponse> execute(String[] headers, String[] values) throws Exception {
56+
Response<AccountApplicationResponse> resp = baseExecute(headers, values);
57+
resp.setValueType(AccountApplicationResponse.class);
58+
return resp;
59+
}
60+
61+
protected QueryData getRequestString() {
62+
if (this.address == null) {
63+
throw new RuntimeException("address is not set. It is a required parameter.");
64+
}
65+
if (this.applicationId == null) {
66+
throw new RuntimeException("application-id is not set. It is a required parameter.");
67+
}
68+
addPathSegment(String.valueOf("v2"));
69+
addPathSegment(String.valueOf("accounts"));
70+
addPathSegment(String.valueOf(address));
71+
addPathSegment(String.valueOf("applications"));
72+
addPathSegment(String.valueOf(applicationId));
73+
74+
return qd;
75+
}
76+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package com.algorand.algosdk.v2.client.algod;
2+
3+
import com.algorand.algosdk.crypto.Address;
4+
import com.algorand.algosdk.v2.client.common.Client;
5+
import com.algorand.algosdk.v2.client.common.HttpMethod;
6+
import com.algorand.algosdk.v2.client.common.Query;
7+
import com.algorand.algosdk.v2.client.common.QueryData;
8+
import com.algorand.algosdk.v2.client.common.Response;
9+
import com.algorand.algosdk.v2.client.model.AccountAssetResponse;
10+
11+
12+
/**
13+
* Given a specific account public key and asset ID, this call returns the
14+
* account's asset holding and asset parameters (if either exist). Asset parameters
15+
* will only be returned if the provided address is the asset's creator.
16+
* /v2/accounts/{address}/assets/{asset-id}
17+
*/
18+
public class AccountAssetInformation extends Query {
19+
20+
private Address address;
21+
private Long assetId;
22+
23+
/**
24+
* @param address An account public key
25+
* @param assetId An asset identifier
26+
*/
27+
public AccountAssetInformation(Client client, Address address, Long assetId) {
28+
super(client, new HttpMethod("get"));
29+
this.address = address;
30+
this.assetId = assetId;
31+
}
32+
33+
/**
34+
* Execute the query.
35+
* @return the query response object.
36+
* @throws Exception
37+
*/
38+
@Override
39+
public Response<AccountAssetResponse> execute() throws Exception {
40+
Response<AccountAssetResponse> resp = baseExecute();
41+
resp.setValueType(AccountAssetResponse.class);
42+
return resp;
43+
}
44+
45+
/**
46+
* Execute the query with custom headers, there must be an equal number of keys and values
47+
* or else an error will be generated.
48+
* @param headers an array of header keys
49+
* @param values an array of header values
50+
* @return the query response object.
51+
* @throws Exception
52+
*/
53+
@Override
54+
public Response<AccountAssetResponse> execute(String[] headers, String[] values) throws Exception {
55+
Response<AccountAssetResponse> resp = baseExecute(headers, values);
56+
resp.setValueType(AccountAssetResponse.class);
57+
return resp;
58+
}
59+
60+
protected QueryData getRequestString() {
61+
if (this.address == null) {
62+
throw new RuntimeException("address is not set. It is a required parameter.");
63+
}
64+
if (this.assetId == null) {
65+
throw new RuntimeException("asset-id is not set. It is a required parameter.");
66+
}
67+
addPathSegment(String.valueOf("v2"));
68+
addPathSegment(String.valueOf("accounts"));
69+
addPathSegment(String.valueOf(address));
70+
addPathSegment(String.valueOf("assets"));
71+
addPathSegment(String.valueOf(assetId));
72+
73+
return qd;
74+
}
75+
}

src/main/java/com/algorand/algosdk/v2/client/algod/AccountInformation.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.algorand.algosdk.v2.client.common.QueryData;
88
import com.algorand.algosdk.v2.client.common.Response;
99
import com.algorand.algosdk.v2.client.model.Account;
10+
import com.algorand.algosdk.v2.client.model.Enums;
1011

1112

1213
/**
@@ -26,6 +27,15 @@ public AccountInformation(Client client, Address address) {
2627
this.address = address;
2728
}
2829

30+
/**
31+
* When set to `all` will exclude asset holdings, application local state, created
32+
* asset parameters, any created application parameters. Defaults to `none`.
33+
*/
34+
public AccountInformation exclude(Enums.Exclude exclude) {
35+
addQuery("exclude", String.valueOf(exclude));
36+
return this;
37+
}
38+
2939
/**
3040
* Execute the query.
3141
* @return the query response object.

src/main/java/com/algorand/algosdk/v2/client/common/AlgodClient.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import com.algorand.algosdk.v2.client.algod.SwaggerJSON;
77
import com.algorand.algosdk.v2.client.algod.GetVersion;
88
import com.algorand.algosdk.v2.client.algod.AccountInformation;
9+
import com.algorand.algosdk.v2.client.algod.AccountAssetInformation;
10+
import com.algorand.algosdk.v2.client.algod.AccountApplicationInformation;
911
import com.algorand.algosdk.v2.client.algod.GetPendingTransactionsByAddress;
1012
import com.algorand.algosdk.v2.client.algod.GetBlock;
1113
import com.algorand.algosdk.v2.client.algod.GetProof;
@@ -95,6 +97,29 @@ public AccountInformation AccountInformation(Address address) {
9597
return new AccountInformation((Client) this, address);
9698
}
9799

100+
/**
101+
* Given a specific account public key and asset ID, this call returns the
102+
* account's asset holding and asset parameters (if either exist). Asset parameters
103+
* will only be returned if the provided address is the asset's creator.
104+
* /v2/accounts/{address}/assets/{asset-id}
105+
*/
106+
public AccountAssetInformation AccountAssetInformation(Address address,
107+
Long assetId) {
108+
return new AccountAssetInformation((Client) this, address, assetId);
109+
}
110+
111+
/**
112+
* Given a specific account public key and application ID, this call returns the
113+
* account's application local state and global state (AppLocalState and AppParams,
114+
* if either exists). Global state will only be returned if the provided address is
115+
* the application's creator.
116+
* /v2/accounts/{address}/applications/{application-id}
117+
*/
118+
public AccountApplicationInformation AccountApplicationInformation(Address address,
119+
Long applicationId) {
120+
return new AccountApplicationInformation((Client) this, address, applicationId);
121+
}
122+
98123
/**
99124
* Get the list of pending transactions by address, sorted by priority, in
100125
* decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending

src/main/java/com/algorand/algosdk/v2/client/common/IndexerClient.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
import com.algorand.algosdk.v2.client.indexer.MakeHealthCheck;
44
import com.algorand.algosdk.v2.client.indexer.SearchForAccounts;
55
import com.algorand.algosdk.v2.client.indexer.LookupAccountByID;
6+
import com.algorand.algosdk.v2.client.indexer.LookupAccountAssets;
7+
import com.algorand.algosdk.v2.client.indexer.LookupAccountCreatedAssets;
8+
import com.algorand.algosdk.v2.client.indexer.LookupAccountAppLocalStates;
9+
import com.algorand.algosdk.v2.client.indexer.LookupAccountCreatedApplications;
610
import com.algorand.algosdk.v2.client.indexer.LookupAccountTransactions;
711
import com.algorand.algosdk.v2.client.indexer.SearchForApplications;
812
import com.algorand.algosdk.v2.client.indexer.LookupApplicationByID;
@@ -72,6 +76,39 @@ public LookupAccountByID lookupAccountByID(Address accountId) {
7276
return new LookupAccountByID((Client) this, accountId);
7377
}
7478

79+
/**
80+
* Lookup an account's asset holdings, optionally for a specific ID.
81+
* /v2/accounts/{account-id}/assets
82+
*/
83+
public LookupAccountAssets lookupAccountAssets(Address accountId) {
84+
return new LookupAccountAssets((Client) this, accountId);
85+
}
86+
87+
/**
88+
* Lookup an account's created asset parameters, optionally for a specific ID.
89+
* /v2/accounts/{account-id}/created-assets
90+
*/
91+
public LookupAccountCreatedAssets lookupAccountCreatedAssets(Address accountId) {
92+
return new LookupAccountCreatedAssets((Client) this, accountId);
93+
}
94+
95+
/**
96+
* Lookup an account's asset holdings, optionally for a specific ID.
97+
* /v2/accounts/{account-id}/apps-local-state
98+
*/
99+
public LookupAccountAppLocalStates lookupAccountAppLocalStates(Address accountId) {
100+
return new LookupAccountAppLocalStates((Client) this, accountId);
101+
}
102+
103+
/**
104+
* Lookup an account's created application parameters, optionally for a specific
105+
* ID.
106+
* /v2/accounts/{account-id}/created-applications
107+
*/
108+
public LookupAccountCreatedApplications lookupAccountCreatedApplications(Address accountId) {
109+
return new LookupAccountCreatedApplications((Client) this, accountId);
110+
}
111+
75112
/**
76113
* Lookup account transactions.
77114
* /v2/accounts/{account-id}/transactions

0 commit comments

Comments
 (0)