localVarQueryParams = new ArrayList<>();
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ localVarQueryParameterBaseName = "pageSize";
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize));
+ localVarQueryParameterBaseName = "pageCursor";
+ localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor));
+
+ if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) {
+ StringJoiner queryJoiner = new StringJoiner("&");
+ localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
+ if (localVarQueryStringJoiner.length() != 0) {
+ queryJoiner.add(localVarQueryStringJoiner.toString());
+ }
+ localVarRequestBuilder.uri(
+ URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
+ } else {
+ localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
+ }
+
+ localVarRequestBuilder.header("Accept", "application/json");
+
+ localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
+ if (memberVarReadTimeout != null) {
+ localVarRequestBuilder.timeout(memberVarReadTimeout);
+ }
+ if (memberVarInterceptor != null) {
+ memberVarInterceptor.accept(localVarRequestBuilder);
+ }
+ return localVarRequestBuilder;
+ }
+ /**
+ * List internal wallets Gets a list of internal wallets. **Note**: - BTC-based assets belonging
* to whitelisted addresses cannot be retrieved between 00:00 UTC and 00:01 UTC daily due to
- * third-party provider, Blockchair, being unavailable for this 60 second period. Please wait
- * until the next minute to retrieve BTC-based assets.
+ * third-party provider, Blockchain, being unavailable for this 60 second period.
+ * </br>Please wait until the next minute to retrieve BTC-based assets. - The list of
+ * assets returned will NOT include the balances anymore. Internal Wallets are whitelisted
+ * wallets that belong to you outside of Fireblocks. - You can see the balance of the Internal
+ * Wallet via Fireblocks - You cannot initiate transactions from Internal Wallets through
+ * Fireblocks Learn more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
*
* @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>>
* @throws ApiException if fails to make API call
@@ -576,7 +711,12 @@ private HttpRequest.Builder getInternalWalletsRequestBuilder() throws ApiExcepti
}
/**
* Set an AML/KYT customer reference ID for an internal wallet Sets an AML/KYT customer
- * reference ID for the specific internal wallet.
+ * reference ID for the specific internal wallet. Internal Wallets are whitelisted wallets that
+ * belong to you outside of Fireblocks. - You can see the balance of the Internal Wallet via
+ * Fireblocks - You cannot initiate transactions from Internal Wallets through Fireblocks Learn
+ * more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
*
* @param setCustomerRefIdRequest (required)
* @param walletId The wallet ID (required)
diff --git a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java
index 59bec1f1..1e217d1a 100644
--- a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java
+++ b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java
@@ -232,15 +232,15 @@ public ContractUploadRequest type(TypeEnum type) {
*
* @return type
*/
- @jakarta.annotation.Nullable
+ @jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
public TypeEnum getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
- @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setType(TypeEnum type) {
this.type = type;
}
diff --git a/src/main/java/com/fireblocks/sdk/model/PaginatedAssetsResponse.java b/src/main/java/com/fireblocks/sdk/model/PaginatedAssetsResponse.java
new file mode 100644
index 00000000..4a78f2ad
--- /dev/null
+++ b/src/main/java/com/fireblocks/sdk/model/PaginatedAssetsResponse.java
@@ -0,0 +1,216 @@
+/*
+ * Fireblocks API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.6.2
+ * Contact: support@fireblocks.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.fireblocks.sdk.model;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.math.BigDecimal;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.Objects;
+import java.util.StringJoiner;
+
+/** PaginatedAssetsResponse */
+@JsonPropertyOrder({
+ PaginatedAssetsResponse.JSON_PROPERTY_TOTAL,
+ PaginatedAssetsResponse.JSON_PROPERTY_DATA,
+ PaginatedAssetsResponse.JSON_PROPERTY_NEXT
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class PaginatedAssetsResponse {
+ public static final String JSON_PROPERTY_TOTAL = "total";
+ private BigDecimal total;
+
+ public static final String JSON_PROPERTY_DATA = "data";
+ private UnmanagedWallet data;
+
+ public static final String JSON_PROPERTY_NEXT = "next";
+ private String next;
+
+ public PaginatedAssetsResponse() {}
+
+ public PaginatedAssetsResponse total(BigDecimal total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * Total number of assets in the internal wallet
+ *
+ * @return total
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TOTAL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public BigDecimal getTotal() {
+ return total;
+ }
+
+ @JsonProperty(JSON_PROPERTY_TOTAL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setTotal(BigDecimal total) {
+ this.total = total;
+ }
+
+ public PaginatedAssetsResponse data(UnmanagedWallet data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UnmanagedWallet getData() {
+ return data;
+ }
+
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setData(UnmanagedWallet data) {
+ this.data = data;
+ }
+
+ public PaginatedAssetsResponse next(String next) {
+ this.next = next;
+ return this;
+ }
+
+ /**
+ * Cursor for the next page of results
+ *
+ * @return next
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_NEXT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getNext() {
+ return next;
+ }
+
+ @JsonProperty(JSON_PROPERTY_NEXT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public void setNext(String next) {
+ this.next = next;
+ }
+
+ /** Return true if this PaginatedAssetsResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PaginatedAssetsResponse paginatedAssetsResponse = (PaginatedAssetsResponse) o;
+ return Objects.equals(this.total, paginatedAssetsResponse.total)
+ && Objects.equals(this.data, paginatedAssetsResponse.data)
+ && Objects.equals(this.next, paginatedAssetsResponse.next);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(total, data, next);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class PaginatedAssetsResponse {\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" next: ").append(toIndentedString(next)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first
+ * line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Convert the instance into URL query string.
+ *
+ * @return URL query string
+ */
+ public String toUrlQueryString() {
+ return toUrlQueryString(null);
+ }
+
+ /**
+ * Convert the instance into URL query string.
+ *
+ * @param prefix prefix of the query string
+ * @return URL query string
+ */
+ public String toUrlQueryString(String prefix) {
+ String suffix = "";
+ String containerSuffix = "";
+ String containerPrefix = "";
+ if (prefix == null) {
+ // style=form, explode=true, e.g. /pet?name=cat&type=manx
+ prefix = "";
+ } else {
+ // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
+ prefix = prefix + "[";
+ suffix = "]";
+ containerSuffix = "]";
+ containerPrefix = "[";
+ }
+
+ StringJoiner joiner = new StringJoiner("&");
+
+ // add `total` to the URL query string
+ if (getTotal() != null) {
+ joiner.add(
+ String.format(
+ "%stotal%s=%s",
+ prefix,
+ suffix,
+ URLEncoder.encode(String.valueOf(getTotal()), StandardCharsets.UTF_8)
+ .replaceAll("\\+", "%20")));
+ }
+
+ // add `data` to the URL query string
+ if (getData() != null) {
+ joiner.add(getData().toUrlQueryString(prefix + "data" + suffix));
+ }
+
+ // add `next` to the URL query string
+ if (getNext() != null) {
+ joiner.add(
+ String.format(
+ "%snext%s=%s",
+ prefix,
+ suffix,
+ URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8)
+ .replaceAll("\\+", "%20")));
+ }
+
+ return joiner.toString();
+ }
+}
diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java b/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java
index d2350168..a66688e0 100644
--- a/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java
+++ b/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java
@@ -34,7 +34,10 @@
* off-chain message with no predefined format. Use it to sign any message with your private key,
* including protocols such as blockchains and custom transaction types that are not natively
* supported by Fireblocks. [Learn more about raw signing
- * transactions.](https://developers.fireblocks.com/docs/raw-message-signing)
+ * transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `APPROVE`
+ * - Enables the approve function for a smart contract or wallet to withdraw from a designated
+ * wallet. [Learn
+ * more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions).
*/
public enum TransactionOperation {
TRANSFER("TRANSFER"),
@@ -49,7 +52,9 @@ public enum TransactionOperation {
RAW("RAW"),
- TYPED_MESSAGE("TYPED_MESSAGE");
+ TYPED_MESSAGE("TYPED_MESSAGE"),
+
+ APPROVE("APPROVE");
private String value;
diff --git a/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java b/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java
index 244b33fb..590cfaaf 100644
--- a/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java
+++ b/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java
@@ -17,9 +17,11 @@
import com.fireblocks.sdk.ApiResponse;
import com.fireblocks.sdk.model.CreateInternalWalletAssetRequest;
import com.fireblocks.sdk.model.CreateWalletRequest;
+import com.fireblocks.sdk.model.PaginatedAssetsResponse;
import com.fireblocks.sdk.model.SetCustomerRefIdRequest;
import com.fireblocks.sdk.model.UnmanagedWallet;
import com.fireblocks.sdk.model.WalletAsset;
+import java.math.BigDecimal;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.junit.Ignore;
@@ -34,7 +36,10 @@ public class InternalWalletsApiTest {
/**
* Create an internal wallet
*
- * Creates a new internal wallet with the requested name.
+ *
Creates a new internal wallet with the requested name. Learn more about Whitelisted
+ * Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
*
* @throws ApiException if the Api call fails
*/
@@ -49,7 +54,12 @@ public void createInternalWalletTest() throws ApiException {
/**
* Add an asset to an internal wallet
*
- *
Adds an asset to an existing internal wallet.
+ *
Adds an asset to an existing internal wallet. Internal Wallets are whitelisted wallets
+ * that belong to you outside of Fireblocks. - You can see the balance of the Internal Wallet
+ * via Fireblocks - You cannot initiate transactions from Internal Wallets through Fireblocks
+ * Learn more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
*
* @throws ApiException if the Api call fails
*/
@@ -67,7 +77,10 @@ public void createInternalWalletAssetTest() throws ApiException {
/**
* Delete an internal wallet
*
- *
Deletes an internal wallet by ID.
+ *
Deletes an internal wallet by ID. Internal Wallets are whitelisted wallets that belong to
+ * you outside of Fireblocks. - You can see the balance of the Internal Wallet via Fireblocks -
+ * You cannot initiate transactions from Internal Wallets through Fireblocks Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
*
* @throws ApiException if the Api call fails
*/
@@ -79,9 +92,14 @@ public void deleteInternalWalletTest() throws ApiException {
}
/**
- * Delete a whitelisted address from an internal wallet
+ * Delete a whitelisted address
*
- *
Deletes a whitelisted address (for an asset) from an internal wallet.
+ *
Deletes a whitelisted address (for an asset) from an internal wallet. Internal Wallets are
+ * whitelisted wallets that belong to you outside of Fireblocks. - You can see the balance of
+ * the Internal Wallet via Fireblocks - You cannot initiate transactions from Internal Wallets
+ * through Fireblocks Learn more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
*
* @throws ApiException if the Api call fails
*/
@@ -95,9 +113,15 @@ public void deleteInternalWalletAssetTest() throws ApiException {
}
/**
- * Get assets for internal wallet
+ * Get an asset from an internal wallet
*
- *
Returns all assets in an internal wallet by ID.
+ *
Returns information for an asset in an internal wallet. This endpoint will be deprecated
+ * after 6 months. </br>As part of the depreciation process this endpoint will no longer
+ * return balances, only addresses. </br>Until it is deprecated, this endpoint will behave
+ * the same way. Internal Wallets are whitelisted wallets that belong to you outside of
+ * Fireblocks. - You can see the balance of the Internal Wallet via Fireblocks - You cannot
+ * initiate transactions from Internal Wallets through Fireblocks Endpoint Permission: Admin,
+ * Non-Signing Admin, Signer, Approver, Editor, Viewer.
*
* @throws ApiException if the Api call fails
*/
@@ -110,7 +134,12 @@ public void getInternalWalletTest() throws ApiException {
/**
* Get an asset from an internal wallet
*
- *
Returns information for an asset in an internal wallet.
+ *
Returns information for an asset in an internal wallet. Internal Wallets are whitelisted
+ * wallets that belong to you outside of Fireblocks. - You can see the balance of the Internal
+ * Wallet via Fireblocks - You cannot initiate transactions from Internal Wallets through
+ * Fireblocks Learn more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
*
* @throws ApiException if the Api call fails
*/
@@ -122,13 +151,42 @@ public void getInternalWalletAssetTest() throws ApiException {
api.getInternalWalletAsset(walletId, assetId);
}
+ /**
+ * List assets in an internal wallet (Paginated)
+ *
+ *
Returns a paginated response of assets in an internal wallet. This is a new paginated
+ * endpoint that gets all the assets from the wallet container with balances. </br>This
+ * endpoint returns a limited amount of results with a quick response time. Internal Wallets are
+ * whitelisted wallets that belong to you outside of Fireblocks. - You can see the balance of
+ * the Internal Wallet via Fireblocks - You cannot initiate transactions from Internal Wallets
+ * through Fireblocks Learn more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void getInternalWalletAssetsPaginatedTest() throws ApiException {
+ String walletId = null;
+ BigDecimal pageSize = null;
+ String pageCursor = null;
+ CompletableFuture> response =
+ api.getInternalWalletAssetsPaginated(walletId, pageSize, pageCursor);
+ }
+
/**
* List internal wallets
*
- * Gets a list of internal wallets. **Note**: BTC-based assets belonging to whitelisted
+ *
Gets a list of internal wallets. **Note**: - BTC-based assets belonging to whitelisted
* addresses cannot be retrieved between 00:00 UTC and 00:01 UTC daily due to third-party
- * provider, Blockchair, being unavailable for this 60 second period. Please wait until the next
- * minute to retrieve BTC-based assets.
+ * provider, Blockchain, being unavailable for this 60 second period. </br>Please wait
+ * until the next minute to retrieve BTC-based assets. - The list of assets returned will NOT
+ * include the balances anymore. Internal Wallets are whitelisted wallets that belong to you
+ * outside of Fireblocks. - You can see the balance of the Internal Wallet via Fireblocks - You
+ * cannot initiate transactions from Internal Wallets through Fireblocks Learn more about
+ * Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer.
*
* @throws ApiException if the Api call fails
*/
@@ -140,7 +198,12 @@ public void getInternalWalletsTest() throws ApiException {
/**
* Set an AML/KYT customer reference ID for an internal wallet
*
- *
Sets an AML/KYT customer reference ID for the specific internal wallet.
+ *
Sets an AML/KYT customer reference ID for the specific internal wallet. Internal Wallets
+ * are whitelisted wallets that belong to you outside of Fireblocks. - You can see the balance
+ * of the Internal Wallet via Fireblocks - You cannot initiate transactions from Internal
+ * Wallets through Fireblocks Learn more about Whitelisted Internal Addresses
+ * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) Endpoint
+ * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
*
* @throws ApiException if the Api call fails
*/
diff --git a/src/test/java/com/fireblocks/sdk/model/PaginatedAssetsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/PaginatedAssetsResponseTest.java
new file mode 100644
index 00000000..4f73b8a4
--- /dev/null
+++ b/src/test/java/com/fireblocks/sdk/model/PaginatedAssetsResponseTest.java
@@ -0,0 +1,45 @@
+/*
+ * Fireblocks API
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.6.2
+ * Contact: support@fireblocks.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.fireblocks.sdk.model;
+
+
+import org.junit.Test;
+
+/** Model tests for PaginatedAssetsResponse */
+public class PaginatedAssetsResponseTest {
+ private final PaginatedAssetsResponse model = new PaginatedAssetsResponse();
+
+ /** Model tests for PaginatedAssetsResponse */
+ @Test
+ public void testPaginatedAssetsResponse() {
+ // TODO: test PaginatedAssetsResponse
+ }
+
+ /** Test the property 'total' */
+ @Test
+ public void totalTest() {
+ // TODO: test total
+ }
+
+ /** Test the property 'data' */
+ @Test
+ public void dataTest() {
+ // TODO: test data
+ }
+
+ /** Test the property 'next' */
+ @Test
+ public void nextTest() {
+ // TODO: test next
+ }
+}