derivationPath) {
this.derivationPath = derivationPath;
}
@@ -103,7 +139,7 @@ public PublicKeyInformation publicKey(String publicKey) {
}
/**
- * Get publicKey
+ * Compressed/Uncompressed public key value in hex representation
*
* @return publicKey
*/
@@ -209,21 +245,19 @@ public String toUrlQueryString(String prefix) {
// add `derivationPath` to the URL query string
if (getDerivationPath() != null) {
for (int i = 0; i < getDerivationPath().size(); i++) {
- if (getDerivationPath().get(i) != null) {
- joiner.add(
- String.format(
- "%sderivationPath%s%s=%s",
- prefix,
- suffix,
- "".equals(suffix)
- ? ""
- : String.format(
- "%s%d%s", containerPrefix, i, containerSuffix),
- URLEncoder.encode(
- String.valueOf(getDerivationPath().get(i)),
- StandardCharsets.UTF_8)
- .replaceAll("\\+", "%20")));
- }
+ joiner.add(
+ String.format(
+ "%sderivationPath%s%s=%s",
+ prefix,
+ suffix,
+ "".equals(suffix)
+ ? ""
+ : String.format(
+ "%s%d%s", containerPrefix, i, containerSuffix),
+ URLEncoder.encode(
+ String.valueOf(getDerivationPath().get(i)),
+ StandardCharsets.UTF_8)
+ .replaceAll("\\+", "%20")));
}
}
diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java
index d20cfb1a..b49b8e69 100644
--- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java
+++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java
@@ -453,6 +453,14 @@ public void testGetDeployedContractsApi() {
Assert.assertSame(deployedContracts, fireblocks.deployedContracts());
}
+ @Test
+ public void testGetEmbeddedWalletsApi() {
+ setupFireblocks(true, null, null);
+ EmbeddedWalletsApi embeddedWallets = fireblocks.embeddedWallets();
+ Assert.assertNotNull(embeddedWallets);
+ Assert.assertSame(embeddedWallets, fireblocks.embeddedWallets());
+ }
+
@Test
public void testGetExchangeAccountsApi() {
setupFireblocks(true, null, null);
diff --git a/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java b/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java
new file mode 100644
index 00000000..5af6b7b8
--- /dev/null
+++ b/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.api;
+
+
+import com.fireblocks.sdk.ApiException;
+import com.fireblocks.sdk.ApiResponse;
+import com.fireblocks.sdk.model.PublicKeyInformation;
+import java.math.BigDecimal;
+import java.util.concurrent.CompletableFuture;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/** API tests for EmbeddedWalletsApi */
+@Ignore
+public class EmbeddedWalletsApiTest {
+
+ private final EmbeddedWalletsApi api = new EmbeddedWalletsApi();
+
+ /**
+ * Get the public key of an asset
+ *
+ * Gets the public key of an asset associated with a specific account within a Non-Custodial
+ * Wallet
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void getPublicKeyInfoForAddressNcwTest() throws ApiException {
+ String walletId = null;
+ String accountId = null;
+ String assetId = null;
+ BigDecimal change = null;
+ BigDecimal addressIndex = null;
+ Boolean compressed = null;
+ CompletableFuture> response =
+ api.getPublicKeyInfoForAddressNcw(
+ walletId, accountId, assetId, change, addressIndex, compressed);
+ }
+
+ /**
+ * Get the public key for a derivation path
+ *
+ * Gets the public key information based on derivation path and signing algorithm within a
+ * Non-Custodial Wallet
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void getPublicKeyInfoNcwTest() throws ApiException {
+ String walletId = null;
+ String derivationPath = null;
+ String algorithm = null;
+ Boolean compressed = null;
+ CompletableFuture> response =
+ api.getPublicKeyInfoNcw(walletId, derivationPath, algorithm, compressed);
+ }
+}