Skip to content

Commit

Permalink
Merge branch 'release/1.13.0-beta-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
algobarb committed Mar 17, 2022
2 parents a44b312 + eae8fa7 commit 5458e92
Show file tree
Hide file tree
Showing 28 changed files with 1,309 additions and 38 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.13.0-beta-1
- Unlimited assets regenerated code. (#302)

# 1.12.0
- Add new key reg txn field (#266)
- C2C Feature and Testing (#290)
Expand Down Expand Up @@ -103,14 +106,14 @@
# 1.2.0
# Added
- Added support for Algorand Standardized Assets (ASA)
- Added support for Algorand Smart Contracts (ASC)
- Added support for Hashed Time Lock Contract (HTLC)
- Added support for Algorand Smart Contracts (ASC)
- Added support for Hashed Time Lock Contract (HTLC)
- Added support for Split contract
- Added support for Group Transactions
- Added support for leases
# 1.1.6
## Changed
- 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.
- 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.
# 1.1.5
## Added
- signing and verifying signatures for arbitrary bytes
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
unit:
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"
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"

integration:
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"
Expand Down
4 changes: 2 additions & 2 deletions 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.12.0</version>
<version>1.13.0-beta-1</version>
</dependency>
```

Expand Down Expand Up @@ -170,7 +170,7 @@ public class Main {

# Documentation

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

# Cryptography
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.12.0</version>
<version>1.13.0-beta-1</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package com.algorand.algosdk.v2.client.algod;

import com.algorand.algosdk.crypto.Address;
import com.algorand.algosdk.v2.client.common.Client;
import com.algorand.algosdk.v2.client.common.HttpMethod;
import com.algorand.algosdk.v2.client.common.Query;
import com.algorand.algosdk.v2.client.common.QueryData;
import com.algorand.algosdk.v2.client.common.Response;
import com.algorand.algosdk.v2.client.model.AccountApplicationResponse;


/**
* Given a specific account public key and application ID, this call returns the
* account's application local state and global state (AppLocalState and AppParams,
* if either exists). Global state will only be returned if the provided address is
* the application's creator.
* /v2/accounts/{address}/applications/{application-id}
*/
public class AccountApplicationInformation extends Query {

private Address address;
private Long applicationId;

/**
* @param address An account public key
* @param applicationId An application identifier
*/
public AccountApplicationInformation(Client client, Address address, Long applicationId) {
super(client, new HttpMethod("get"));
this.address = address;
this.applicationId = applicationId;
}

/**
* Execute the query.
* @return the query response object.
* @throws Exception
*/
@Override
public Response<AccountApplicationResponse> execute() throws Exception {
Response<AccountApplicationResponse> resp = baseExecute();
resp.setValueType(AccountApplicationResponse.class);
return resp;
}

/**
* Execute the query with custom headers, there must be an equal number of keys and values
* or else an error will be generated.
* @param headers an array of header keys
* @param values an array of header values
* @return the query response object.
* @throws Exception
*/
@Override
public Response<AccountApplicationResponse> execute(String[] headers, String[] values) throws Exception {
Response<AccountApplicationResponse> resp = baseExecute(headers, values);
resp.setValueType(AccountApplicationResponse.class);
return resp;
}

protected QueryData getRequestString() {
if (this.address == null) {
throw new RuntimeException("address is not set. It is a required parameter.");
}
if (this.applicationId == null) {
throw new RuntimeException("application-id is not set. It is a required parameter.");
}
addPathSegment(String.valueOf("v2"));
addPathSegment(String.valueOf("accounts"));
addPathSegment(String.valueOf(address));
addPathSegment(String.valueOf("applications"));
addPathSegment(String.valueOf(applicationId));

return qd;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package com.algorand.algosdk.v2.client.algod;

import com.algorand.algosdk.crypto.Address;
import com.algorand.algosdk.v2.client.common.Client;
import com.algorand.algosdk.v2.client.common.HttpMethod;
import com.algorand.algosdk.v2.client.common.Query;
import com.algorand.algosdk.v2.client.common.QueryData;
import com.algorand.algosdk.v2.client.common.Response;
import com.algorand.algosdk.v2.client.model.AccountAssetResponse;


/**
* Given a specific account public key and asset ID, this call returns the
* account's asset holding and asset parameters (if either exist). Asset parameters
* will only be returned if the provided address is the asset's creator.
* /v2/accounts/{address}/assets/{asset-id}
*/
public class AccountAssetInformation extends Query {

private Address address;
private Long assetId;

/**
* @param address An account public key
* @param assetId An asset identifier
*/
public AccountAssetInformation(Client client, Address address, Long assetId) {
super(client, new HttpMethod("get"));
this.address = address;
this.assetId = assetId;
}

/**
* Execute the query.
* @return the query response object.
* @throws Exception
*/
@Override
public Response<AccountAssetResponse> execute() throws Exception {
Response<AccountAssetResponse> resp = baseExecute();
resp.setValueType(AccountAssetResponse.class);
return resp;
}

/**
* Execute the query with custom headers, there must be an equal number of keys and values
* or else an error will be generated.
* @param headers an array of header keys
* @param values an array of header values
* @return the query response object.
* @throws Exception
*/
@Override
public Response<AccountAssetResponse> execute(String[] headers, String[] values) throws Exception {
Response<AccountAssetResponse> resp = baseExecute(headers, values);
resp.setValueType(AccountAssetResponse.class);
return resp;
}

protected QueryData getRequestString() {
if (this.address == null) {
throw new RuntimeException("address is not set. It is a required parameter.");
}
if (this.assetId == null) {
throw new RuntimeException("asset-id is not set. It is a required parameter.");
}
addPathSegment(String.valueOf("v2"));
addPathSegment(String.valueOf("accounts"));
addPathSegment(String.valueOf(address));
addPathSegment(String.valueOf("assets"));
addPathSegment(String.valueOf(assetId));

return qd;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.algorand.algosdk.v2.client.common.QueryData;
import com.algorand.algosdk.v2.client.common.Response;
import com.algorand.algosdk.v2.client.model.Account;
import com.algorand.algosdk.v2.client.model.Enums;


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

/**
* When set to `all` will exclude asset holdings, application local state, created
* asset parameters, any created application parameters. Defaults to `none`.
*/
public AccountInformation exclude(Enums.Exclude exclude) {
addQuery("exclude", String.valueOf(exclude));
return this;
}

/**
* Execute the query.
* @return the query response object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.algorand.algosdk.v2.client.algod.SwaggerJSON;
import com.algorand.algosdk.v2.client.algod.GetVersion;
import com.algorand.algosdk.v2.client.algod.AccountInformation;
import com.algorand.algosdk.v2.client.algod.AccountAssetInformation;
import com.algorand.algosdk.v2.client.algod.AccountApplicationInformation;
import com.algorand.algosdk.v2.client.algod.GetPendingTransactionsByAddress;
import com.algorand.algosdk.v2.client.algod.GetBlock;
import com.algorand.algosdk.v2.client.algod.GetProof;
Expand Down Expand Up @@ -95,6 +97,29 @@ public AccountInformation AccountInformation(Address address) {
return new AccountInformation((Client) this, address);
}

/**
* Given a specific account public key and asset ID, this call returns the
* account's asset holding and asset parameters (if either exist). Asset parameters
* will only be returned if the provided address is the asset's creator.
* /v2/accounts/{address}/assets/{asset-id}
*/
public AccountAssetInformation AccountAssetInformation(Address address,
Long assetId) {
return new AccountAssetInformation((Client) this, address, assetId);
}

/**
* Given a specific account public key and application ID, this call returns the
* account's application local state and global state (AppLocalState and AppParams,
* if either exists). Global state will only be returned if the provided address is
* the application's creator.
* /v2/accounts/{address}/applications/{application-id}
*/
public AccountApplicationInformation AccountApplicationInformation(Address address,
Long applicationId) {
return new AccountApplicationInformation((Client) this, address, applicationId);
}

/**
* Get the list of pending transactions by address, sorted by priority, in
* decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import com.algorand.algosdk.v2.client.indexer.MakeHealthCheck;
import com.algorand.algosdk.v2.client.indexer.SearchForAccounts;
import com.algorand.algosdk.v2.client.indexer.LookupAccountByID;
import com.algorand.algosdk.v2.client.indexer.LookupAccountAssets;
import com.algorand.algosdk.v2.client.indexer.LookupAccountCreatedAssets;
import com.algorand.algosdk.v2.client.indexer.LookupAccountAppLocalStates;
import com.algorand.algosdk.v2.client.indexer.LookupAccountCreatedApplications;
import com.algorand.algosdk.v2.client.indexer.LookupAccountTransactions;
import com.algorand.algosdk.v2.client.indexer.SearchForApplications;
import com.algorand.algosdk.v2.client.indexer.LookupApplicationByID;
Expand Down Expand Up @@ -72,6 +76,39 @@ public LookupAccountByID lookupAccountByID(Address accountId) {
return new LookupAccountByID((Client) this, accountId);
}

/**
* Lookup an account's asset holdings, optionally for a specific ID.
* /v2/accounts/{account-id}/assets
*/
public LookupAccountAssets lookupAccountAssets(Address accountId) {
return new LookupAccountAssets((Client) this, accountId);
}

/**
* Lookup an account's created asset parameters, optionally for a specific ID.
* /v2/accounts/{account-id}/created-assets
*/
public LookupAccountCreatedAssets lookupAccountCreatedAssets(Address accountId) {
return new LookupAccountCreatedAssets((Client) this, accountId);
}

/**
* Lookup an account's asset holdings, optionally for a specific ID.
* /v2/accounts/{account-id}/apps-local-state
*/
public LookupAccountAppLocalStates lookupAccountAppLocalStates(Address accountId) {
return new LookupAccountAppLocalStates((Client) this, accountId);
}

/**
* Lookup an account's created application parameters, optionally for a specific
* ID.
* /v2/accounts/{account-id}/created-applications
*/
public LookupAccountCreatedApplications lookupAccountCreatedApplications(Address accountId) {
return new LookupAccountCreatedApplications((Client) this, accountId);
}

/**
* Lookup account transactions.
* /v2/accounts/{account-id}/transactions
Expand Down
Loading

0 comments on commit 5458e92

Please sign in to comment.