diff --git a/README.md b/README.md index 43cbc94..ef6d8e3 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 1.0.1 + 1.1.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:1.0.1" +compile "com.fireblocks.sdk:fireblocks-sdk:1.1.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-1.0.1.jar` +- `target/fireblocks-sdk-1.1.0.jar` - `target/lib/*.jar` @@ -166,6 +166,11 @@ Class | Method | HTTP request | Description *ContractsApi* | [**getContract**](docs/ContractsApi.md#getContract) | **GET** /contracts/{contractId} | Find a specific contract *ContractsApi* | [**getContractAsset**](docs/ContractsApi.md#getContractAsset) | **GET** /contracts/{contractId}/{assetId} | Find a contract asset *ContractsApi* | [**getContracts**](docs/ContractsApi.md#getContracts) | **GET** /contracts | List contracts +*CosignersBetaApi* | [**getApiKey**](docs/CosignersBetaApi.md#getApiKey) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Get API key +*CosignersBetaApi* | [**getApiKeys**](docs/CosignersBetaApi.md#getApiKeys) | **GET** /cosigners/{cosignerId}/api_keys | Get all API keys +*CosignersBetaApi* | [**getCosigner**](docs/CosignersBetaApi.md#getCosigner) | **GET** /cosigners/{cosignerId} | Get cosigner +*CosignersBetaApi* | [**getCosigners**](docs/CosignersBetaApi.md#getCosigners) | **GET** /cosigners | Get all cosigners +*CosignersBetaApi* | [**renameCosigner**](docs/CosignersBetaApi.md#renameCosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner *ExchangeAccountsApi* | [**convertAssets**](docs/ExchangeAccountsApi.md#convertAssets) | **POST** /exchange_accounts/{exchangeAccountId}/convert | Convert exchange account funds from the source asset to the destination asset. *ExchangeAccountsApi* | [**getExchangeAccount**](docs/ExchangeAccountsApi.md#getExchangeAccount) | **GET** /exchange_accounts/{exchangeAccountId} | Find a specific exchange account *ExchangeAccountsApi* | [**getExchangeAccountAsset**](docs/ExchangeAccountsApi.md#getExchangeAccountAsset) | **GET** /exchange_accounts/{exchangeAccountId}/{assetId} | Find an asset for an exchange account @@ -344,6 +349,8 @@ Class | Method | HTTP request | Description - [AmountAggregationTimePeriodMethod](docs/AmountAggregationTimePeriodMethod.md) - [AmountAndChainDescriptor](docs/AmountAndChainDescriptor.md) - [AmountInfo](docs/AmountInfo.md) + - [ApiKey](docs/ApiKey.md) + - [ApiKeysPaginatedResponse](docs/ApiKeysPaginatedResponse.md) - [AssetAmount](docs/AssetAmount.md) - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) @@ -384,6 +391,8 @@ Class | Method | HTTP request | Description - [ConversionValidationFailure](docs/ConversionValidationFailure.md) - [ConvertAssetsRequest](docs/ConvertAssetsRequest.md) - [ConvertAssetsResponse](docs/ConvertAssetsResponse.md) + - [Cosigner](docs/Cosigner.md) + - [CosignersPaginatedResponse](docs/CosignersPaginatedResponse.md) - [CreateAPIUser](docs/CreateAPIUser.md) - [CreateAddressRequest](docs/CreateAddressRequest.md) - [CreateAddressResponse](docs/CreateAddressResponse.md) @@ -551,6 +560,7 @@ Class | Method | HTTP request | Description - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - [RelatedTransactionDto](docs/RelatedTransactionDto.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) + - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) - [ResendTransactionWebhooksRequest](docs/ResendTransactionWebhooksRequest.md) - [ResendWebhooksByTransactionIdResponse](docs/ResendWebhooksByTransactionIdResponse.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8e97804..9240b8a 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -128,6 +128,13 @@ paths: code: "const vaultAccount = await fireblocks.createVaultAccount(name, hiddenOnUI,\ \ customerRefId, autoFueling);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.createVaultAccount(vaultsApiCreateVaultAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().createVaultAccount(createVaultAccountRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/bulk: @@ -178,6 +185,15 @@ paths: summary: Bulk creation of new vault accounts tags: - Vaults + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.vaults.createMultipleAccounts(vaultsApiCreateMultipleAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().createMultipleAccounts(createMultipleAccountsRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts_paged: @@ -273,6 +289,15 @@ paths: - language: javascript code: const vaultAccounts = await fireblocks.getVaultAccountsWithPageInfo(filters); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getPagedVaultAccounts(vaultsApiGetPagedVaultAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().getPagedVaultAccounts(namePrefix, nameSuffix,\ + \ minAmountThreshold, assetId, orderBy, before, after, limit);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}: get: @@ -319,6 +344,12 @@ paths: - language: javascript code: const vaultAccount = await fireblocks.getVaultAccount(vault_account_id); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.getVaultAccount(vaultsApiGetVaultAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.vaults().getVaultAccount(vaultAccountId); + name: Fireblocks SDK Java example x-accepts: application/json put: description: Renames the requested vault account. @@ -383,6 +414,15 @@ paths: code: "const vaultAccount = await fireblocks.updateVaultAccount(vautlAccountId,\ \ name);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.updateVaultAccount(vaultsApiUpdateVaultAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().updateVaultAccount(updateVaultAccountRequest,\ + \ vaultAccountId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/asset_wallets: @@ -472,6 +512,15 @@ paths: - language: javascript code: const vaultAccounts = await fireblocks.getAssetWallets(filters); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getAssetWallets(vaultsApiGetAssetWalletsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().getAssetWallets(totalAmountLargerThan, assetId,\ + \ orderBy, before, after, limit);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/hide: post: @@ -529,6 +578,14 @@ paths: - language: javascript code: const vaultAsset = await fireblocks.hideVaultAccount(vaultAccountId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.vaults.hideVaultAccount(vaultsApiHideVaultAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().hideVaultAccount(vaultAccountId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/unhide: post: @@ -586,6 +643,14 @@ paths: - language: javascript code: const vaultAsset = await fireblocks.unhideVaultAccount(vaultAccountId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.vaults.unhideVaultAccount(vaultsApiUnhideVaultAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().unhideVaultAccount(vaultAccountId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/activate: post: @@ -645,6 +710,17 @@ paths: summary: Activate a wallet in a vault account tags: - Vaults + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.activateAssetForVaultAccount(vaultsApiActivateAssetForVaultAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().activateAssetForVaultAccount(vaultAccountId, assetId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/set_customer_ref_id: post: @@ -710,6 +786,14 @@ paths: code: "const vaultAsset = await fireblocks.setCustomerRefIdForVaultAccount(vaultAccountId,\ \ customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.vaults.setVaultAccountCustomerRefId(vaultsApiSetVaultAccountCustomerRefIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().setVaultAccountCustomerRefId(setCustomerRefIdRequest,\ + \ vaultAccountId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/{vaultAccountId}/set_auto_fuel: @@ -767,6 +851,16 @@ paths: summary: Turn autofueling on or off tags: - Vaults + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.vaults.setVaultAccountAutoFuel(vaultsApiSetVaultAccountAutoFuelRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().setVaultAccountAutoFuel(setAutoFuelRequest,\ + \ vaultAccountId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}: @@ -822,6 +916,13 @@ paths: code: "const vaultAsset = await fireblocks.getVaultAccountAsset(vaultAccountId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.getVaultAccountAsset(vaultsApiGetVaultAccountAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().getVaultAccountAsset(vaultAccountId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json post: description: Creates a wallet for a specific asset in a vault account. @@ -895,6 +996,15 @@ paths: code: "const vaultAsset = await fireblocks.createVaultAsset(vaultAccountId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.createVaultAccountAsset(vaultsApiCreateVaultAccountAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().createVaultAccountAsset(vaultAccountId, assetId,\ + \ createAssetsRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/balance: @@ -964,6 +1074,13 @@ paths: code: "const vaultAsset = await fireblocks.refreshVaultAssetBalance(vaultAccountId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.updateVaultAccountAssetBalance(vaultsApiUpdateVaultAccountAssetBalanceRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().updateVaultAccountAssetBalance(vaultAccountId,\ + \ assetId, idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/addresses: get: @@ -1103,6 +1220,15 @@ paths: code: "const address = await fireblocks.generateNewAddress(vaultAccountId,\ \ assetId, description, customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.createVaultAccountAssetAddress(vaultsApiCreateVaultAccountAssetAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.vaults().createVaultAccountAssetAddress(vaultAccountId, assetId,\ + \ createAddressRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/addresses_paginated: @@ -1183,6 +1309,15 @@ paths: code: "const addresses = await fireblocks.getPaginatedAddresses(\"0\",\"\ ETH_TEST3\");" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getVaultAccountAssetAddressesPaginated(vaultsApiGetVaultAccountAssetAddressesPaginatedRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().getVaultAccountAssetAddressesPaginated(vaultAccountId,\ + \ assetId, limit, before, after);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount: get: @@ -1254,6 +1389,15 @@ paths: code: "const address = await fireblocks.setAddressDescription(vaultAccountId,\ \ assetId, address, tag, description);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getMaxSpendableAmount(vaultsApiGetMaxSpendableAmountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.vaults().getMaxSpendableAmount(vaultAccountId, assetId,\ + \ manualSignging);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}: put: @@ -1338,6 +1482,14 @@ paths: code: "const address = await fireblocks.setAddressDescription(vaultAccountId,\ \ assetId, address, tag, description);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.vaults.updateVaultAccountAssetAddress(vaultsApiUpdateVaultAccountAssetAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().updateVaultAccountAssetAddress(vaultAccountId,\ + \ assetId, addressId, updateVaultAccountAssetAddressRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/set_customer_ref_id: @@ -1422,6 +1574,14 @@ paths: code: "const vaultAsset = await fireblocks.setCustomerRefIdForAddress(vaultAccountId,\ \ assetId, addressId, customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.vaults.setCustomerRefIdForAddress(vaultsApiSetCustomerRefIdForAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().setCustomerRefIdForAddress(setCustomerRefIdForAddressRequest,\ + \ vaultAccountId, assetId, addressId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/create_legacy: @@ -1489,6 +1649,17 @@ paths: summary: Convert a segwit address to legacy format tags: - Vaults + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.createLegacyAddress(vaultsApiCreateLegacyAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.vaults().createLegacyAddress(vaultAccountId, assetId, addressId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/unspent_inputs: get: @@ -1547,6 +1718,13 @@ paths: code: "const vaultAsset = await fireblocks.getUnspentInputs(vaultAccountId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.getUnspentInputs(vaultsApiGetUnspentInputsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().getUnspentInputs(vaultAccountId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/public_key_info: get: @@ -1607,6 +1785,14 @@ paths: code: | const PublicKeyInfoArgs = { algorithm: 'MPC_ECDSA_SECP256K1', derivationPath: '[44,0,0,0,0]' } const pubKey = await fireblocks.getPublicKeyInfo(PublicKeyInfoArgs); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getPublicKeyInfo(vaultsApiGetPublicKeyInfoRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().getPublicKeyInfo(derivationPath,\ + \ algorithm, compressed);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/accounts/{vaultAccountId}/{assetId}/{change}/{addressIndex}/public_key_info: get: @@ -1683,6 +1869,14 @@ paths: code: | const PublicKeyInfoArgs = { assetId: 'ETH', vaultAccountId: 0, change: 0, addressIndex: 0, compressed: true } const pubKey = await fireblocks.getPublicKeyInfoForVaultAccount(PublicKeyInfoArgs); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getPublicKeyInfoForAddress(vaultsApiGetPublicKeyInfoForAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().getPublicKeyInfoForAddress(vaultAccountId,\ + \ assetId, change, addressIndex, compressed);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/assets: get: @@ -1737,6 +1931,13 @@ paths: code: "const assetsBalance = await fireblocks.getVaultAssetsBalance(accountNamePrefix,\ \ accountNameSuffix);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.getVaultAssets(vaultsApiGetVaultAssetsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().getVaultAssets(accountNamePrefix,\ + \ accountNameSuffix);" + name: Fireblocks SDK Java example x-accepts: application/json /vault/assets/bulk: post: @@ -1787,6 +1988,15 @@ paths: summary: Bulk creation of wallets tags: - Assets + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.assets.createAssetsBulk(assetsApiCreateAssetsBulkRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.assets().createAssetsBulk(createAssetsBulkRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /vault/assets/{assetId}: @@ -1832,6 +2042,12 @@ paths: - language: javascript code: const assetsBalance = await fireblocks.getVaultBalanceByAsset(assetId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.vaults.getVaultBalanceByAsset(vaultsApiGetVaultBalanceByAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.vaults().getVaultBalanceByAsset(assetId); + name: Fireblocks SDK Java example x-accepts: application/json /workspace/freeze: post: @@ -1975,6 +2191,13 @@ paths: - language: python code: exchangeAccounts = fireblocks.get_exchange_accounts_paged() name: Fireblocks SDK Python example + - language: typescript + code: "const response: Promise> = fireblocks.exchangeAccounts.getPagedExchangeAccounts(exchangeAccountsApiGetPagedExchangeAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.exchangeAccounts().getPagedExchangeAccounts(limit,\ + \ before, after);" + name: Fireblocks SDK Java example x-accepts: application/json /exchange_accounts/{exchangeAccountId}: get: @@ -2019,6 +2242,12 @@ paths: - language: javascript code: const exchnageAccount = await fireblocks.get_exchange_account(exchangeAccountId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.exchangeAccounts.getExchangeAccount(exchangeAccountsApiGetExchangeAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.exchangeAccounts().getExchangeAccount(exchangeAccountId); + name: Fireblocks SDK Java example x-accepts: application/json /exchange_accounts/{exchangeAccountId}/internal_transfer: post: @@ -2072,6 +2301,17 @@ paths: summary: Internal transfer for exchange accounts tags: - Exchange accounts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.exchangeAccounts.internalTransfer(exchangeAccountsApiInternalTransferRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.exchangeAccounts().internalTransfer(exchangeAccountId,\ + \ createInternalTransferRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /exchange_accounts/{exchangeAccountId}/convert: @@ -2129,6 +2369,17 @@ paths: asset. tags: - Exchange accounts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.exchangeAccounts.convertAssets(exchangeAccountsApiConvertAssetsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.exchangeAccounts().convertAssets(exchangeAccountId, convertAssetsRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /exchange_accounts/{exchangeAccountId}/{assetId}: @@ -2184,6 +2435,13 @@ paths: code: "const exchangeAsset = await fireblocks.getExchangeAsset(exchangeAccountId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.exchangeAccounts.getExchangeAccountAsset(exchangeAccountsApiGetExchangeAccountAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.exchangeAccounts().getExchangeAccountAsset(exchangeAccountId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json /fiat_accounts: get: @@ -2221,6 +2479,12 @@ paths: - language: javascript code: const transactions = await fireblocks.getFiatAccounts(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.fiatAccounts.getFiatAccounts();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.fiatAccounts().getFiatAccounts(); + name: Fireblocks SDK Java example x-accepts: application/json /fiat_accounts/{accountId}: get: @@ -2265,6 +2529,12 @@ paths: - language: javascript code: const transactions = await fireblocks.getFiatAccountById(accountId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.fiatAccounts.getFiatAccount(fiatAccountsApiGetFiatAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.fiatAccounts().getFiatAccount(accountId); + name: Fireblocks SDK Java example x-accepts: application/json /fiat_accounts/{accountId}/redeem_to_linked_dda: post: @@ -2326,6 +2596,15 @@ paths: code: "const transactions = await fireblocks.redeemToLinkedDDA(accountId,\ \ amount);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.fiatAccounts.redeemFundsToLinkedDDA(fiatAccountsApiRedeemFundsToLinkedDDARequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.fiatAccounts().redeemFundsToLinkedDDA(accountId, funds,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /fiat_accounts/{accountId}/deposit_from_linked_dda: @@ -2388,6 +2667,15 @@ paths: code: "const transactions = await fireblocks.depositFromLinkedDDA(accountId,\ \ amount);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.fiatAccounts.depositFundsFromLinkedDDA(fiatAccountsApiDepositFundsFromLinkedDDARequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.fiatAccounts().depositFundsFromLinkedDDA(accountId,\ + \ funds, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /network_connections: @@ -2443,6 +2731,12 @@ paths: - language: javascript code: const networkConnections = await fireblocks.getNetworkConnections(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.networkConnections.getNetworkConnections();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.networkConnections().getNetworkConnections(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: | @@ -2462,6 +2756,8 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** + Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: createNetworkConnection parameters: @@ -2503,6 +2799,17 @@ paths: summary: Creates a new network connection tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.createNetworkConnection(networkConnectionsApiCreateNetworkConnectionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.networkConnections().createNetworkConnection(networkConnection,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /network_connections/{connectionId}/set_routing_policy: @@ -2524,6 +2831,8 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** + Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: setRoutingPolicy parameters: @@ -2562,6 +2871,15 @@ paths: summary: Update network connection routing policy. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.networkConnections.setRoutingPolicy(networkConnectionsApiSetRoutingPolicyRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.networkConnections().setRoutingPolicy(connectionId,\ + \ setRoutingPolicyRequest);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /network_connections/{connectionId}/is_third_party_routing/{assetType}: @@ -2610,6 +2928,16 @@ paths: summary: Retrieve third-party network routing validation by asset type. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.networkConnections.checkThirdPartyRouting(networkConnectionsApiCheckThirdPartyRoutingRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.networkConnections().checkThirdPartyRouting(connectionId,\ + \ assetType);" + name: Fireblocks SDK Java example x-accepts: application/json /network_connections/{connectionId}: delete: @@ -2663,6 +2991,14 @@ paths: summary: Deletes a network connection by ID tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.networkConnections.deleteNetworkConnection(networkConnectionsApiDeleteNetworkConnectionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.networkConnections().deleteNetworkConnection(connectionId); + name: Fireblocks SDK Java example x-accepts: application/json get: description: | @@ -2723,6 +3059,14 @@ paths: - language: javascript code: const network_connection = await fireblocks.getNetworkConnection(connectionId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.getNetwork(networkConnectionsApiGetNetworkRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.networkConnections().getNetwork(connectionId); + name: Fireblocks SDK Java example x-accepts: application/json /network_ids: get: @@ -2770,6 +3114,14 @@ paths: summary: "Returns all network IDs, both local IDs and discoverable remote IDs" tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.networkConnections.getNetworkIds();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.networkConnections().getNetworkIds(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: | @@ -2789,6 +3141,8 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** + Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: createNetworkId parameters: @@ -2830,8 +3184,49 @@ paths: summary: Creates a new Network ID tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.networkConnections.createNetworkId(networkConnectionsApiCreateNetworkIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.networkConnections().createNetworkId(createNetworkIdRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json + /enabled_routing_policy_asset_groups: + get: + description: | + Retrieves a list of all enabled routing policy asset groups. + Your routing policy defines how your transactions are routed. + You can use one or more enabled routing policy asset groups to describe connection or network id routing policy. + operationId: getEnabledRoutingPolicyAssetGroups + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetEnabledRoutingPolicyAssetGroupsResponse' + description: A list of enabled routing policy asset groups + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Returns all enabled routing policy asset groups + tags: + - Network connections + x-internal: true + x-accepts: application/json /network_ids/{networkId}: delete: description: | @@ -2881,6 +3276,14 @@ paths: summary: Deletes specific network ID. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.networkConnections.deleteNetworkId(networkConnectionsApiDeleteNetworkIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.networkConnections().deleteNetworkId(networkId); + name: Fireblocks SDK Java example x-accepts: application/json get: description: | @@ -2933,6 +3336,15 @@ paths: summary: Returns specific network ID. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.networkConnections.getNetworkId(networkConnectionsApiGetNetworkIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.networkConnections().getNetworkId(networkId); + name: Fireblocks SDK Java example x-accepts: application/json /network_ids/{networkId}/set_routing_policy: patch: @@ -2953,6 +3365,8 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** + Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: setNetworkIdRoutingPolicy parameters: @@ -2991,6 +3405,16 @@ paths: summary: Update network id routing policy. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.setNetworkIdRoutingPolicy(networkConnectionsApiSetNetworkIdRoutingPolicyRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.networkConnections().setNetworkIdRoutingPolicy(networkId,\ + \ setNetworkIdRoutingPolicyRequest);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /network_ids/{networkId}/set_discoverability: @@ -3051,6 +3475,16 @@ paths: summary: Update network ID's discoverability. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.setNetworkIdDiscoverability(networkConnectionsApiSetNetworkIdDiscoverabilityRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.networkConnections().setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest,\ + \ networkId);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /network_ids/{networkId}/set_name: @@ -3111,6 +3545,16 @@ paths: summary: Update network ID's name. tags: - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.setNetworkIdName(networkConnectionsApiSetNetworkIdNameRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.networkConnections().setNetworkIdName(setNetworkIdNameRequest,\ + \ networkId);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /internal_wallets: @@ -3144,6 +3588,14 @@ paths: summary: List internal wallets tags: - Internal wallets + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.getInternalWallets();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.internalWallets().getInternalWallets(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: Creates a new internal wallet with the requested name. @@ -3196,6 +3648,13 @@ paths: code: "const internalWallet = await fireblocks.createInternalWallet(name,\ \ customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.createInternalWallet(internalWalletsApiCreateInternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.internalWallets().createInternalWallet(createWalletRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /internal_wallets/{walletId}: @@ -3237,6 +3696,12 @@ paths: - language: javascript code: const result = await fireblocks.deleteInternalWallet(walletId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.deleteInternalWallet(internalWalletsApiDeleteInternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.internalWallets().deleteInternalWallet(walletId); + name: Fireblocks SDK Java example x-accepts: application/json get: description: Returns all assets in an internal wallet by ID. @@ -3280,6 +3745,12 @@ paths: - language: javascript code: const result = await fireblocks.getInternalWallet(walletId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.getInternalWallet(internalWalletsApiGetInternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.internalWallets().getInternalWallet(walletId); + name: Fireblocks SDK Java example x-accepts: application/json /internal_wallets/{walletId}/set_customer_ref_id: post: @@ -3340,6 +3811,13 @@ paths: code: "const result = await fireblocks.setCustomerRefIdForInternalWallet(walletId,\ \ customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.setCustomerRefIdForInternalWallet(internalWalletsApiSetCustomerRefIdForInternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.internalWallets().setCustomerRefIdForInternalWallet(setCustomerRefIdRequest,\ + \ walletId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /internal_wallets/{walletId}/{assetId}: @@ -3391,6 +3869,13 @@ paths: code: "const result = await fireblocks.deleteInternalWalletAsset(walletId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.deleteInternalWalletAsset(internalWalletsApiDeleteInternalWalletAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.internalWallets().deleteInternalWalletAsset(walletId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json get: description: Returns information for an asset in an internal wallet. @@ -3445,6 +3930,13 @@ paths: code: "const internalWalletAsset = fireblocks.getInternalWalletAsset(walletId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.getInternalWalletAsset(internalWalletsApiGetInternalWalletAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.internalWallets().getInternalWalletAsset(walletId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json post: description: Adds an asset to an existing internal wallet. @@ -3515,6 +4007,13 @@ paths: code: "const internalWalletAsset = await fireblocks.createInternalWalletAsset(walletContainerId,\ \ assetId, address, tag);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.internalWallets.createInternalWalletAsset(internalWalletsApiCreateInternalWalletAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.internalWallets().createInternalWalletAsset(walletId,\ + \ assetId, createInternalWalletAssetRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /external_wallets: @@ -3553,6 +4052,12 @@ paths: - language: javascript code: const externalWallets = await fireblocks.getExternalWallets(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.externalWallets.getExternalWallets();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.externalWallets().getExternalWallets(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: Creates a new external wallet with the requested name. @@ -3605,6 +4110,13 @@ paths: code: "const externalWallet = await fireblocks.createExternalWallet(name,\ \ customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.externalWallets.createExternalWallet(externalWalletsApiCreateExternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.externalWallets().createExternalWallet(createWalletRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /external_wallets/{walletId}: @@ -3646,6 +4158,12 @@ paths: - language: javascript code: const result = await fireblocks.deleteExternalWallet(walletId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.externalWallets.deleteExternalWallet(externalWalletsApiDeleteExternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.externalWallets().deleteExternalWallet(walletId); + name: Fireblocks SDK Java example x-accepts: application/json get: description: Returns an external wallet by ID. @@ -3689,6 +4207,12 @@ paths: - language: javascript code: const externalWallet = await fireblocks.getExternalWallet(walletId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.externalWallets.getExternalWallet(externalWalletsApiGetExternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.externalWallets().getExternalWallet(walletId); + name: Fireblocks SDK Java example x-accepts: application/json /external_wallets/{walletId}/set_customer_ref_id: post: @@ -3749,6 +4273,13 @@ paths: code: "const result = await fireblocks.setCustomerRefIdForExternalWallet(walletId,\ \ customerRefId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.externalWallets.setExternalWalletCustomerRefId(externalWalletsApiSetExternalWalletCustomerRefIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.externalWallets().setExternalWalletCustomerRefId(setCustomerRefIdRequest,\ + \ walletId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /external_wallets/{walletId}/{assetId}: @@ -3800,6 +4331,13 @@ paths: code: "const result = await fireblocks.deleteExternalWalletAsset(walletId,\ \ assetId);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.externalWallets.removeAssetFromExternalWallet(externalWalletsApiRemoveAssetFromExternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.externalWallets().removeAssetFromExternalWallet(walletId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json get: description: Returns an external wallet by wallet ID and asset ID. @@ -3854,6 +4392,14 @@ paths: code: "const externalWalletAsset = fireblocks.getExternalWalletAsset(walletId,\ \ assetId)" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.externalWallets.getExternalWalletAsset(externalWalletsApiGetExternalWalletAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.externalWallets().getExternalWalletAsset(walletId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json post: description: Adds an asset to an existing external wallet. @@ -3924,6 +4470,14 @@ paths: code: "const externalWalletAsset = await fireblocks.createExternalWalletAsset(walletContainerId,\ \ assetId, address, tag);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.externalWallets.addAssetToExternalWallet(externalWalletsApiAddAssetToExternalWalletRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.externalWallets().addAssetToExternalWallet(walletId,\ + \ assetId, addAssetToExternalWalletRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /contracts: @@ -3954,6 +4508,14 @@ paths: summary: List contracts tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.contracts.getContracts();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.contracts().getContracts(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: Creates a new contract. @@ -3997,6 +4559,15 @@ paths: summary: Create a contract tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.contracts.createContract(contractsApiCreateContractRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.contracts().createContract(createContractRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /contracts/{contractId}: @@ -4030,6 +4601,14 @@ paths: summary: Delete a contract tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.contracts.deleteContract(contractsApiDeleteContractRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.contracts().deleteContract(contractId); + name: Fireblocks SDK Java example x-accepts: application/json get: description: Returns a contract by ID. @@ -4065,6 +4644,14 @@ paths: summary: Find a specific contract tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.contracts.getContract(contractsApiGetContractRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.contracts().getContract(contractId); + name: Fireblocks SDK Java example x-accepts: application/json /contracts/{contractId}/{assetId}: delete: @@ -4106,6 +4693,15 @@ paths: summary: Delete a contract asset tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.contracts.deleteContractAsset(contractsApiDeleteContractAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.contracts().deleteContractAsset(contractId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json get: description: Returns a contract asset by ID. @@ -4150,6 +4746,16 @@ paths: summary: Find a contract asset tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.contracts.getContractAsset(contractsApiGetContractAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.contracts().getContractAsset(contractId,\ + \ assetId);" + name: Fireblocks SDK Java example x-accepts: application/json post: description: Adds an asset to an existing contract. @@ -4210,6 +4816,16 @@ paths: summary: Add an asset to a contract tags: - Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.contracts.addContractAsset(contractsApiAddContractAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.contracts().addContractAsset(contractId,\ + \ assetId, addContractAssetRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /supported_assets: @@ -4248,6 +4864,12 @@ paths: - language: javascript code: const supportedAssets = await fireblocks.getSupportedAssets(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.blockchainsAssets.getSupportedAssets();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.blockchainsAssets().getSupportedAssets(); + name: Fireblocks SDK Java example x-accepts: application/json /assets: post: @@ -4322,6 +4944,13 @@ paths: code: "const supportedAssets = await fireblocks.registerNewAsset(blockchainId,\ \ address, symbol);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.blockchainsAssets.registerNewAsset(blockchainsAssetsApiRegisterNewAssetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.blockchainsAssets().registerNewAsset(registerNewAssetRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /transactions: @@ -4519,6 +5148,14 @@ paths: status: args.status, after: from }); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.transactions.getTransactions(transactionsApiGetTransactionsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.transactions().getTransactions(before,\ + \ after, status, orderBy, sort, limit, sourceType, sourceId, destType,\ + \ destId, assets, txHash, sourceWalletId, destWalletId);" + name: Fireblocks SDK Java example x-accepts: application/json post: description: Creates a new transaction. @@ -4582,6 +5219,15 @@ paths: code: | const payload: TransactionArguments = { assetId: asset, source: { type: sourceType, id: sourceId || 0 }, destination: { type: destinationType, id: String(destinationId) }, amount: String(amount), fee: String(fee), note: "Created by fireblocks SDK" }; const result = await fireblocks.createTransaction(payload); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.createTransaction(transactionsApiCreateTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().createTransaction(transactionRequest, xEndUserWalletId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /transactions/estimate_fee: @@ -4639,6 +5285,15 @@ paths: code: | const payload: TransactionArguments = { assetId: asset, source: { type: sourceType, id: sourceId || 0 }, destination: { type: destinationType, id: String(destinationId) }, amount: Number(amount) }; const estimatedFee = await fireblocks.estimateFeeForTransaction(payload); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.estimateTransactionFee(transactionsApiEstimateTransactionFeeRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().estimateTransactionFee(transactionRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /transactions/{txId}: @@ -4694,6 +5349,13 @@ paths: - language: javascript code: const tx = await fireblocks.getTransactionById(txId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.getTransaction(transactionsApiGetTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.transactions().getTransaction(txId); + name: Fireblocks SDK Java example x-accepts: application/json /transactions/external_tx_id/{externalTxId}: get: @@ -4739,6 +5401,13 @@ paths: - language: javascript code: const tx = await fireblocks.getTransactionByExternalTxId(externalTxId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.getTransactionByExternalId(transactionsApiGetTransactionByExternalIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.transactions().getTransactionByExternalId(externalTxId); + name: Fireblocks SDK Java example x-accepts: application/json /transactions/{txId}/set_confirmation_threshold: post: @@ -4800,6 +5469,15 @@ paths: - language: javascript code: const setConfThreshold = await fireblocks.setConfirmationThresholdByTxId(body); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.setTransactionConfirmationThreshold(transactionsApiSetTransactionConfirmationThresholdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.transactions().setTransactionConfirmationThreshold(txId,\ + \ setConfirmationsThresholdRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /transactions/{txId}/drop: @@ -4871,6 +5549,15 @@ paths: - language: javascript code: "const result = await fireblocks.dropTransaction(txId, feeLevel);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.dropTransaction(transactionsApiDropTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().dropTransaction(txId, dropTransactionRequest,\ + \ xEndUserWalletId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /transactions/{txId}/cancel: @@ -4937,6 +5624,15 @@ paths: - language: javascript code: const result = await fireblocks.cancelTransactionById(txId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.cancelTransaction(transactionsApiCancelTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().cancelTransaction(txId, xEndUserWalletId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /transactions/{txId}/freeze: post: @@ -4993,6 +5689,15 @@ paths: - language: javascript code: const result = await fireblocks.freezeTransactionById(txId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.freezeTransaction(transactionsApiFreezeTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().freezeTransaction(txId, xEndUserWalletId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /transactions/{txId}/unfreeze: post: @@ -5050,6 +5755,15 @@ paths: - language: javascript code: const result = await fireblocks.unfreezeTransactionById(txId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.unfreezeTransaction(transactionsApiUnfreezeTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().unfreezeTransaction(txId, xEndUserWalletId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /transactions/validate_address/{assetId}/{address}: get: @@ -5103,6 +5817,14 @@ paths: - language: javascript code: "const result = await fireblocks.(assetId, address);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.validateAddress(transactionsApiValidateAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.transactions().validateAddress(assetId, address);" + name: Fireblocks SDK Java example x-accepts: application/json /txHash/{txHash}/set_confirmation_threshold: post: @@ -5164,6 +5886,15 @@ paths: - language: javascript code: const setConfThreshold = await fireblocks.setConfirmationThresholdByTxHash(body); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.setConfirmationThresholdByTransactionHash(transactionsApiSetConfirmationThresholdByTransactionHashRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.transactions().setConfirmationThresholdByTransactionHash(txHash,\ + \ setConfirmationsThresholdRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /estimate_network_fee: @@ -5212,6 +5943,14 @@ paths: - language: javascript code: const feeResult = await fireblocks.getFeeForAsset(assetId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.estimateNetworkFee(transactionsApiEstimateNetworkFeeRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.transactions().estimateNetworkFee(assetId); + name: Fireblocks SDK Java example x-accepts: application/json /payments/payout: post: @@ -5322,6 +6061,15 @@ paths: summary: Create a payout instruction set tags: - Payments - Payout + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.paymentsPayout.createPayout(paymentsPayoutApiCreatePayoutRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.paymentsPayout().createPayout(createPayoutRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /payments/payout/{payoutId}/actions/execute: @@ -5389,6 +6137,16 @@ paths: summary: Execute a payout instruction set tags: - Payments - Payout + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.paymentsPayout.executePayoutAction(paymentsPayoutApiExecutePayoutActionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.paymentsPayout().executePayoutAction(payoutId, idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /payments/payout/{payoutId}: get: @@ -5476,6 +6234,14 @@ paths: summary: Get the status of a payout instruction set tags: - Payments - Payout + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.paymentsPayout.getPayout(paymentsPayoutApiGetPayoutRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.paymentsPayout().getPayout(payoutId); + name: Fireblocks SDK Java example x-accepts: application/json /payments/workflow_config: post: @@ -5522,8 +6288,6 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Not found - security: - - bearerAuth: [] summary: Create payment flow configuration tags: - Payments - Flows @@ -5599,8 +6363,6 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Not found - security: - - bearerAuth: [] summary: Retrieve workflow configuration tags: - Payments - Flows @@ -5654,8 +6416,6 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Not found - security: - - bearerAuth: [] summary: Create workflow execution tags: - Payments - Flows @@ -5695,8 +6455,6 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Not found - security: - - bearerAuth: [] summary: Get workflow execution details tags: - Payments - Flows @@ -5749,8 +6507,6 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Not found - security: - - bearerAuth: [] summary: Execute the payments workflow tags: - Payments - Flows @@ -5790,6 +6546,14 @@ paths: - language: javascript code: const gasStationInfo = await fireblocks.gasStationInfo(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.gasStations.getGasStationInfo();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.gasStations().getGasStationInfo(); + name: Fireblocks SDK Java example x-accepts: application/json /gas_station/{assetId}: get: @@ -5835,6 +6599,14 @@ paths: - language: javascript code: const gasStationInfo = await fireblocks.gasStationInfo(assetId); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.gasStations.getGasStationByAssetId(gasStationsApiGetGasStationByAssetIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.gasStations().getGasStationByAssetId(assetId); + name: Fireblocks SDK Java example x-accepts: application/json /gas_station/configuration: put: @@ -5890,6 +6662,15 @@ paths: code: "const gasStation = await fireblocks.setGasStationConfiguration(gasThreshold,\ \ gasCap, maxGasPrice)" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.gasStations.updateGasStationConfiguration(gasStationsApiUpdateGasStationConfigurationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.gasStations().updateGasStationConfiguration(gasStationConfiguration,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /gas_station/configuration/{assetId}: @@ -5945,6 +6726,17 @@ paths: summary: Edit gas station settings for an asset tags: - Gas stations + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.gasStations.updateGasStationConfigurationByAssetId(gasStationsApiUpdateGasStationConfigurationByAssetIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.gasStations().updateGasStationConfigurationByAssetId(gasStationConfiguration,\ + \ assetId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /management/user_groups: @@ -5978,6 +6770,15 @@ paths: summary: List user groups tags: - User groups (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.userGroupsBeta.getUserGroups();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.userGroupsBeta().getUserGroups(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: | @@ -6027,6 +6828,17 @@ paths: summary: Create user group tags: - User groups (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.userGroupsBeta.createUserGroup(userGroupsBetaApiCreateUserGroupRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.userGroupsBeta().createUserGroup(userGroupCreateRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /management/user_groups/{groupId}: @@ -6065,6 +6877,14 @@ paths: summary: Delete user group tags: - User groups (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.userGroupsBeta.deleteUserGroup(userGroupsBetaApiDeleteUserGroupRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.userGroupsBeta().deleteUserGroup(groupId); + name: Fireblocks SDK Java example x-accepts: application/json get: description: | @@ -6105,6 +6925,15 @@ paths: summary: Get user group tags: - User groups (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.userGroupsBeta.getUserGroup(userGroupsBetaApiGetUserGroupRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.userGroupsBeta().getUserGroup(groupId); + name: Fireblocks SDK Java example x-accepts: application/json put: description: | @@ -6162,6 +6991,17 @@ paths: summary: Update user group tags: - User groups (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.userGroupsBeta.updateUserGroup(userGroupsBetaApiUpdateUserGroupRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.userGroupsBeta().updateUserGroup(userGroupUpdateRequest,\ + \ groupId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /users: @@ -6201,6 +7041,12 @@ paths: - language: javascript code: const users = await fireblocks.getUsers(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.users.getUsers();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.users().getUsers(); + name: Fireblocks SDK Java example x-accepts: application/json /audits: get: @@ -6240,6 +7086,16 @@ paths: summary: Get audit logs tags: - Audit Logs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.auditLogs.getAudits(auditLogsApiGetAuditsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.auditLogs().getAudits(timePeriod); + name: Fireblocks SDK Java example x-accepts: application/json /management/audit_logs: get: @@ -6287,6 +7143,16 @@ paths: summary: Get audit logs tags: - Audit Logs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.auditLogs.getAuditLogs(auditLogsApiGetAuditLogsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.auditLogs().getAuditLogs(timePeriod,\ + \ cursor);" + name: Fireblocks SDK Java example x-accepts: application/json /off_exchange/add: post: @@ -6328,6 +7194,17 @@ paths: summary: add collateral tags: - Off exchanges + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.offExchanges.addOffExchange(offExchangesApiAddOffExchangeRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.offExchanges().addOffExchange(addCollateralRequestBody,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /off_exchange/remove: @@ -6370,6 +7247,17 @@ paths: summary: remove collateral tags: - Off exchanges + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.offExchanges.removeOffExchange(offExchangesApiRemoveOffExchangeRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.offExchanges().removeOffExchange(removeCollateralRequestBody,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /off_exchange/settlements/trader: @@ -6412,6 +7300,16 @@ paths: summary: create settlement for a trader tags: - Off exchanges + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.offExchanges.settleOffExchangeTrades(offExchangesApiSettleOffExchangeTradesRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.offExchanges().settleOffExchangeTrades(settlementRequestBody,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /off_exchange/settlements/transactions: @@ -6445,6 +7343,15 @@ paths: summary: get settlements transactions from exchange tags: - Off exchanges + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.offExchanges.getOffExchangeSettlementTransactions(offExchangesApiGetOffExchangeSettlementTransactionsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.offExchanges().getOffExchangeSettlementTransactions(mainExchangeAccountId); + name: Fireblocks SDK Java example x-accepts: application/json /off_exchange/collateral_accounts/{mainExchangeAccountId}: get: @@ -6482,6 +7389,14 @@ paths: summary: Find a specific collateral exchange account tags: - Off exchanges + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.offExchanges.getOffExchangeCollateralAccounts(offExchangesApiGetOffExchangeCollateralAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.offExchanges().getOffExchangeCollateralAccounts(mainExchangeAccountId); + name: Fireblocks SDK Java example x-accepts: application/json /webhooks/resend: post: @@ -6529,6 +7444,14 @@ paths: - language: javascript code: const result = await fireblocks.resendWebhooks(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooks.resendWebhooks(webhooksApiResendWebhooksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.webhooks().resendWebhooks(idempotencyKey); + name: Fireblocks SDK Java example x-accepts: application/json /webhooks/resend/{txId}: post: @@ -6592,6 +7515,15 @@ paths: code: "const result = await fireblocks.resendTransactionWebhooksById(txId,\ \ resendCreated, resendStatusUpdated);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooks.resendTransactionWebhooks(webhooksApiResendTransactionWebhooksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.webhooks().resendTransactionWebhooks(resendTransactionWebhooksRequest,\ + \ txId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /staking/chains: @@ -6614,6 +7546,14 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.stakingBeta.getChains();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getChains(); + name: Fireblocks SDK Java example x-accepts: application/json /staking/chains/{chainDescriptor}/chainInfo: get: @@ -6644,6 +7584,15 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getChainInfo(stakingBetaApiGetChainInfoRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); + name: Fireblocks SDK Java example x-accepts: application/json /staking/chains/{chainDescriptor}/{actionId}: post: @@ -6734,6 +7683,17 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.executeAction(stakingBetaApiExecuteActionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor,\ + \ actionId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /staking/positions: @@ -6764,6 +7724,14 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.stakingBeta.getAllDelegations(stakingBetaApiGetAllDelegationsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); + name: Fireblocks SDK Java example x-accepts: application/json /staking/positions/summary: get: @@ -6802,6 +7770,15 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getSummary();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getSummary(); + name: Fireblocks SDK Java example x-accepts: application/json /staking/positions/summary/vaults: get: @@ -6856,6 +7833,14 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.stakingBeta.getSummaryByVault();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getSummaryByVault(); + name: Fireblocks SDK Java example x-accepts: application/json /staking/positions/{id}: get: @@ -6881,6 +7866,14 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.stakingBeta.getDelegationById(stakingBetaApiGetDelegationByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); + name: Fireblocks SDK Java example x-accepts: application/json /staking/providers: get: @@ -6899,6 +7892,14 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.stakingBeta.getProviders();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.stakingBeta().getProviders(); + name: Fireblocks SDK Java example x-accepts: application/json /staking/providers/{providerId}/approveTermsOfService: post: @@ -6940,6 +7941,16 @@ paths: summary: "" tags: - Staking (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.approveTermsOfServiceByProviderId(stakingBetaApiApproveTermsOfServiceByProviderIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /admin_quorum: put: @@ -7172,6 +8183,16 @@ paths: summary: List all owned tokens (paginated) tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.getOwnershipTokens(nFTsApiGetOwnershipTokensRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().getOwnershipTokens(blockchainDescriptor,\ + \ vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds,\ + \ pageCursor, pageSize, sort, order, status, search, spam);" + name: Fireblocks SDK Java example x-accepts: application/json put: description: | @@ -7221,6 +8242,15 @@ paths: summary: Refresh vault account tokens tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.updateOwnershipTokens(nFTsApiUpdateOwnershipTokensRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().updateOwnershipTokens(blockchainDescriptor,\ + \ vaultAccountId, idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /nfts/ownership/assets: get: @@ -7338,6 +8368,15 @@ paths: summary: List all distinct owned tokens (paginated) tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.listOwnedTokens(nFTsApiListOwnedTokensRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().listOwnedTokens(ncwId,\ + \ walletType, pageCursor, pageSize, sort, order, status, search, spam);" + name: Fireblocks SDK Java example x-accepts: application/json /nfts/ownership/collections: get: @@ -7444,6 +8483,15 @@ paths: summary: List owned collections (paginated) tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.listOwnedCollections(nFTsApiListOwnedCollectionsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().listOwnedCollections(ncwId,\ + \ walletType, search, pageCursor, pageSize, sort, order, status);" + name: Fireblocks SDK Java example x-accepts: application/json /nfts/tokens/{id}: get: @@ -7473,6 +8521,14 @@ paths: summary: List token data by ID tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.getNFT(nFTsApiGetNFTRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.nFTs().getNFT(id); + name: Fireblocks SDK Java example x-accepts: application/json put: description: | @@ -7508,6 +8564,15 @@ paths: summary: Refresh token metadata tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.refreshNFTMetadata(nFTsApiRefreshNFTMetadataRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().refreshNFTMetadata(id,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /nfts/tokens: get: @@ -7583,6 +8648,15 @@ paths: summary: List tokens by IDs tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.getNFTs(nFTsApiGetNFTsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().getNFTs(ids,\ + \ pageCursor, pageSize, sort, order);" + name: Fireblocks SDK Java example x-accepts: application/json /nfts/ownership/tokens/{id}/status: put: @@ -7625,6 +8699,15 @@ paths: summary: Update token ownership status tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.updateTokenOwnershipStatus(nFTsApiUpdateTokenOwnershipStatusRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().updateTokenOwnershipStatus(updateTokenOwnershipStatusDto,\ + \ id, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /nfts/ownership/tokens/status: @@ -7670,6 +8753,15 @@ paths: summary: Update tokens ownership status tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.updateTokensOwnershipStatus(nFTsApiUpdateTokensOwnershipStatusRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().updateTokensOwnershipStatus(updateTokensOwnershipStatusRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /nfts/ownership/tokens/spam: @@ -7716,6 +8808,15 @@ paths: summary: Update tokens ownership spam property tags: - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.updateTokensOwnershipSpam(nFTsApiUpdateTokensOwnershipSpamRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().updateTokensOwnershipSpam(updateTokensOwnershipSpamRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /connections: @@ -7820,6 +8921,16 @@ paths: summary: List all open Web3 connections. tags: - Web3 connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.web3Connections.get(web3ConnectionsApiGetRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.web3Connections().get(order, filter, sort, pageSize, next);" + name: Fireblocks SDK Java example x-accepts: application/json /connections/wc: post: @@ -7869,6 +8980,16 @@ paths: summary: Create a new Web3 connection. tags: - Web3 connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.web3Connections.create(web3ConnectionsApiCreateRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.web3Connections().create(createRequest, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /connections/wc/{id}: @@ -7903,6 +9024,14 @@ paths: summary: Remove an existing Web3 connection. tags: - Web3 connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.web3Connections.remove(web3ConnectionsApiRemoveRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.web3Connections().remove(id); + name: Fireblocks SDK Java example x-accepts: application/json put: description: |- @@ -7961,6 +9090,15 @@ paths: summary: Respond to a pending Web3 connection request. tags: - Web3 connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.web3Connections.submit(web3ConnectionsApiSubmitRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.web3Connections().submit(respondToConnectionRequest,\ + \ id, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /screening/travel_rule/transaction/validate: @@ -8006,6 +9144,17 @@ paths: summary: Validate Travel Rule Transaction tags: - Travel Rule (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.validateTravelRuleTransaction(travelRuleBetaApiValidateTravelRuleTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.travelRuleBeta().validateTravelRuleTransaction(travelRuleValidateTransactionRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /screening/travel_rule/transaction/validate/full: @@ -8051,6 +9200,17 @@ paths: summary: Validate Full Travel Rule Transaction tags: - Travel Rule (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.validateFullTravelRuleTransaction(travelRuleBetaApiValidateFullTravelRuleTransactionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.travelRuleBeta().validateFullTravelRuleTransaction(travelRuleValidateFullTransactionRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /screening/travel_rule/vasp/{did}: @@ -8095,6 +9255,15 @@ paths: summary: Get VASP details tags: - Travel Rule (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.travelRuleBeta.getVASPByDID(travelRuleBetaApiGetVASPByDIDRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.travelRuleBeta().getVASPByDID(did,\ + \ fields);" + name: Fireblocks SDK Java example x-accepts: application/json /screening/travel_rule/vasp: get: @@ -8151,6 +9320,16 @@ paths: summary: Get All VASPs tags: - Travel Rule (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.getVASPs(travelRuleBetaApiGetVASPsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.travelRuleBeta().getVASPs(order, perPage, page, fields);" + name: Fireblocks SDK Java example x-accepts: application/json /screening/travel_rule/vasp/update: put: @@ -8195,6 +9374,17 @@ paths: summary: Add jsonDidKey to VASP details tags: - Travel Rule (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.updateVasp(travelRuleBetaApiUpdateVaspRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.travelRuleBeta().updateVasp(travelRuleUpdateVASPDetails,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /screening/travel_rule/post_screening_policy: @@ -8212,6 +9402,16 @@ paths: summary: Travel Rule - View Post-Screening Policy tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getPostScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.compliance().getPostScreeningPolicy(); + name: Fireblocks SDK Java example x-accepts: application/json /screening/travel_rule/screening_policy: get: @@ -8228,6 +9428,16 @@ paths: summary: Travel Rule - View Screening Policy tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.compliance().getScreeningPolicy(); + name: Fireblocks SDK Java example x-accepts: application/json /screening/travel_rule/policy_configuration: get: @@ -8244,6 +9454,16 @@ paths: summary: Get Travel Rule Screening Policy Configuration tags: - Compliance Screening Configuration + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.complianceScreeningConfiguration.getScreeningConfiguration();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.complianceScreeningConfiguration().getScreeningConfiguration(); + name: Fireblocks SDK Java example x-accepts: application/json put: description: "Updates bypass screening, inbound delay, or outbound delay configurations\ @@ -8271,6 +9491,16 @@ paths: summary: Update Travel Rule Configuration tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.updateTravelRuleConfig(complianceApiUpdateTravelRuleConfigRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.compliance().updateTravelRuleConfig(idempotencyKey); + name: Fireblocks SDK Java example x-accepts: application/json /screening/aml/policy_configuration: get: @@ -8287,6 +9517,16 @@ paths: summary: Get AML Screening Policy Configuration tags: - Compliance Screening Configuration + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.complianceScreeningConfiguration.getAmlScreeningConfiguration();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.complianceScreeningConfiguration().getAmlScreeningConfiguration(); + name: Fireblocks SDK Java example x-accepts: application/json put: description: "Updates bypass screening, inbound delay, or outbound delay configurations\ @@ -8314,6 +9554,16 @@ paths: summary: Update AML Configuration tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.updateAmlScreeningConfiguration(complianceApiUpdateAmlScreeningConfigurationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.compliance().updateAmlScreeningConfiguration(idempotencyKey); + name: Fireblocks SDK Java example x-accepts: application/json /screening/aml/screening_policy: get: @@ -8330,6 +9580,16 @@ paths: summary: AML - View Screening Policy tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getAmlScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.compliance().getAmlScreeningPolicy(); + name: Fireblocks SDK Java example x-accepts: application/json /screening/aml/post_screening_policy: get: @@ -8346,6 +9606,16 @@ paths: summary: AML - View Post-Screening Policy tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getAmlPostScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.compliance().getAmlPostScreeningPolicy(); + name: Fireblocks SDK Java example x-accepts: application/json /screening/configurations: put: @@ -8373,6 +9643,16 @@ paths: summary: Tenant - Screening Configuration tags: - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.updateScreeningConfiguration(complianceApiUpdateScreeningConfigurationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.compliance().updateScreeningConfiguration(idempotencyKey); + name: Fireblocks SDK Java example x-accepts: application/json /management/ota: get: @@ -8390,6 +9670,14 @@ paths: summary: Returns current OTA status tags: - OTA (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.oTABeta.getOtaStatus();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.oTABeta().getOtaStatus(); + name: Fireblocks SDK Java example x-accepts: application/json put: description: Enable or disable transactions to OTA @@ -8431,6 +9719,16 @@ paths: summary: Enable or disable transactions to OTA tags: - OTA (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.oTABeta.setOtaStatus(oTABetaApiSetOtaStatusRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.oTABeta().setOtaStatus(setOtaStatusRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /management/workspace_status: @@ -8449,6 +9747,14 @@ paths: summary: Returns current workspace status tags: - Workspace Status (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.workspaceStatusBeta.getWorkspaceStatus();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.workspaceStatusBeta().getWorkspaceStatus(); + name: Fireblocks SDK Java example x-accepts: application/json /tap/active_policy: get: @@ -8487,6 +9793,14 @@ paths: - language: javascript code: const policy = await fireblocks.getActivePolicy(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.policyEditorBeta.getActivePolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.policyEditorBeta().getActivePolicy(); + name: Fireblocks SDK Java example x-accepts: application/json /tap/draft: get: @@ -8525,6 +9839,14 @@ paths: - language: javascript code: const policy = await fireblocks.getDraft(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.policyEditorBeta.getDraft();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.policyEditorBeta().getDraft(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: | @@ -8580,6 +9902,13 @@ paths: - language: javascript code: const policy = await fireblocks.publishDraft(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.policyEditorBeta.publishDraft(policyEditorBetaApiPublishDraftRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.policyEditorBeta().publishDraft(publishDraftRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json put: @@ -8636,6 +9965,14 @@ paths: - language: javascript code: const policy = await fireblocks.updateDraft(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.policyEditorBeta.updateDraft(policyEditorBetaApiUpdateDraftRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.policyEditorBeta().updateDraft(policyRules, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /tap/publish: @@ -8693,6 +10030,13 @@ paths: - language: javascript code: const policy = await fireblocks.publishRules(); name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.policyEditorBeta.publishPolicyRules(policyEditorBetaApiPublishPolicyRulesRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.policyEditorBeta().publishPolicyRules(policyRules,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /management/users: @@ -8749,6 +10093,16 @@ paths: summary: get console users tags: - Console User + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.consoleUser.getConsoleUsers();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.consoleUser().getConsoleUsers(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: creates fireblocks console user @@ -8821,6 +10175,15 @@ paths: summary: create console user tags: - Console User + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.consoleUser.createConsoleUser(consoleUserApiCreateConsoleUserRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.consoleUser().createConsoleUser(createConsoleUser,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /management/api_users: @@ -8877,6 +10240,15 @@ paths: summary: get api users tags: - Api User + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.apiUser.getApiUsers();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.apiUser().getApiUsers(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: creates api user @@ -8944,6 +10316,15 @@ paths: summary: create api user tags: - Api User + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.apiUser.createApiUser(apiUserApiCreateApiUserRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.apiUser().createApiUser(createAPIUser,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /management/users/{id}/reset_device: @@ -9016,6 +10397,15 @@ paths: summary: resets device tags: - Reset device + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.resetDevice.resetDevice(resetDeviceApiResetDeviceRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.resetDevice().resetDevice(id,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /management/api_users/{userId}/whitelist_ip_addresses: get: @@ -9080,6 +10470,16 @@ paths: summary: gets ip addresses tags: - whitelist ip addresses + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.whitelistIpAddresses.getWhitelistIpAddresses(whitelistIpAddressesApiGetWhitelistIpAddressesRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.whitelistIpAddresses().getWhitelistIpAddresses(userId); + name: Fireblocks SDK Java example x-accepts: application/json /smart-transfers: get: @@ -9206,6 +10606,18 @@ paths: summary: Find Ticket tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.searchTickets(smartTransferApiSearchTicketsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.smartTransfer().searchTickets(q, statuses, networkId,\ + \ createdByMe, expiresAfter, expiresBefore, type, externalRefId, after,\ + \ limit);" + name: Fireblocks SDK Java example x-accepts: application/json post: description: Creates new Smart Transfer ticket @@ -9250,6 +10662,17 @@ paths: summary: Create Ticket tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.createTicket(smartTransferApiCreateTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().createTicket(smartTransferCreateTicket,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}: @@ -9286,6 +10709,16 @@ paths: summary: Search Tickets by ID tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.findTicketById(smartTransferApiFindTicketByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.smartTransfer().findTicketById(ticketId); + name: Fireblocks SDK Java example x-accepts: application/json /smart-transfers/{ticketId}/expires-in: put: @@ -9344,6 +10777,17 @@ paths: summary: Set expiration tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.setTicketExpiration(smartTransferApiSetTicketExpirationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().setTicketExpiration(smartTransferSetTicketExpiration,\ + \ ticketId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/external-id: @@ -9403,6 +10847,17 @@ paths: summary: Add external ref. ID tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.setExternalRefId(smartTransferApiSetExternalRefIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().setExternalRefId(smartTransferSetTicketExternalId,\ + \ ticketId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/submit: @@ -9463,6 +10918,17 @@ paths: summary: Submit ticket tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.submitTicket(smartTransferApiSubmitTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().submitTicket(smartTransferSubmitTicket,\ + \ ticketId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/fulfill: @@ -9517,6 +10983,16 @@ paths: summary: Fund ticket manually tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /smart-transfers/{ticketId}/cancel: put: @@ -9569,6 +11045,16 @@ paths: summary: Cancel Ticket tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.cancelTicket(smartTransferApiCancelTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().cancelTicket(ticketId, idempotencyKey);" + name: Fireblocks SDK Java example x-accepts: application/json /smart-transfers/{ticketId}/terms: post: @@ -9622,6 +11108,17 @@ paths: summary: Create leg (term) tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.createTicketTerm(smartTransferApiCreateTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().createTicketTerm(smartTransferCreateTicketTerm,\ + \ ticketId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/terms/{termId}: @@ -9661,6 +11158,15 @@ paths: summary: Delete ticket leg (term) tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.smartTransfer.removeTicketTerm(smartTransferApiRemoveTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.smartTransfer().removeTicketTerm(ticketId,\ + \ termId);" + name: Fireblocks SDK Java example x-accepts: application/json get: description: Find Smart Transfer ticket term by id @@ -9702,6 +11208,16 @@ paths: summary: Search ticket by leg (term) ID tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.findTicketTermById(smartTransferApiFindTicketTermByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().findTicketTermById(ticketId, termId);" + name: Fireblocks SDK Java example x-accepts: application/json put: description: Update ticket term (when ticket status is DRAFT) @@ -9760,6 +11276,17 @@ paths: summary: Update ticket leg (term) tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.updateTicketTerm(smartTransferApiUpdateTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().updateTicketTerm(smartTransferUpdateTicketTerm,\ + \ ticketId, termId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/terms/{termId}/fund: @@ -9827,6 +11354,17 @@ paths: summary: Define funding source tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.fundTicketTerm(smartTransferApiFundTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().fundTicketTerm(smartTransferFundTerm, ticketId,\ + \ termId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/terms/{termId}/manually-fund: @@ -9893,6 +11431,17 @@ paths: summary: Manually add term transaction tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.manuallyFundTicketTerm(smartTransferApiManuallyFundTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().manuallyFundTicketTerm(smartTransferManuallyFundTerm,\ + \ ticketId, termId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json /smart-transfers/settings/user-groups: @@ -9922,6 +11471,16 @@ paths: summary: Get user group tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.getSmartTransferUserGroups();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.smartTransfer().getSmartTransferUserGroups(); + name: Fireblocks SDK Java example x-accepts: application/json post: description: Set Smart Transfer user group @@ -9966,37 +11525,358 @@ paths: summary: Set user group tags: - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.setUserGroups(smartTransferApiSetUserGroupsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().setUserGroups(smartTransferSetUserGroups,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /batch/jobs: + /batch/jobs: + get: + description: "Get an array of objects including all active, paused, canceled,\ + \ and complete jobs in a workspace." + operationId: getJobs + parameters: + - description: Start of time range in ms since 1970 + explode: true + in: query + name: fromTime + required: false + schema: + type: integer + style: form + - description: End of time range in ms since 1970 + explode: true + in: query + name: toTime + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Jobs' + description: An array of jobs + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return a list of jobs belonging to tenant + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJobs(jobManagementApiGetJobsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().getJobs(fromTime,\ + \ toTime);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}: + get: + description: Get an object describing the given job + operationId: getJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + description: A JSON object that describes the job + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get job details + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJob(jobManagementApiGetJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.jobManagement().getJob(jobId); + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/pause: + post: + description: "Pause the given job, after the current task is done. A paused\ + \ job can later be resumed by calling ‘continue’, or canceled." + operationId: pauseJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + description: paused successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Pause a job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.pauseJob(jobManagementApiPauseJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().pauseJob(jobId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/continue: + post: + description: Continue the given paused job. + operationId: continueJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + description: continued successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Continue a paused job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.continueJob(jobManagementApiContinueJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().continueJob(jobId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/cancel: + post: + description: "Stop the given job immediately. If the job is in the ‘Active’\ + \ state, the job will be canceled after completing the current task. Vault\ + \ accounts and Wallets that are already created will not be affected." + operationId: cancelJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + description: canceled successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Cancel a running job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.cancelJob(jobManagementApiCancelJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().cancelJob(jobId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/tasks: + get: + description: Return a list of tasks for given job + operationId: getJobTasks + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + description: An array of tasks + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return a list of tasks for given job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.jobManagement().getJobTasks(jobId); + name: Fireblocks SDK Java example + x-accepts: application/json + /cosigners: get: - description: "Get an array of objects including all active, paused, canceled,\ - \ and complete jobs in a workspace." - operationId: getJobs + description: | + Get all workspace cosigners (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getCosigners parameters: - - description: Start of time range in ms since 1970 + - description: ASC / DESC ordering (default DESC) + example: ASC explode: true in: query - name: fromTime + name: order required: false schema: - type: integer + default: DESC + enum: + - ASC + - DESC + type: string style: form - - description: End of time range in ms since 1970 + - description: Cursor of the required page explode: true in: query - name: toTime + name: pageCursor required: false schema: - type: integer + type: string + style: form + - description: Maximum number of items in the page + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: number style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Jobs' - description: An array of jobs + $ref: '#/components/schemas/CosignersPaginatedResponse' + description: A paginated response containing Cosigner objects headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -10009,21 +11889,35 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return a list of jobs belonging to tenant + summary: Get all cosigners tags: - - Job Management + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + name: Fireblocks SDK Java example x-accepts: application/json - /batch/{jobId}: + /cosigners/{cosignerId}: get: - description: Get an object describing the given job - operationId: getJob + description: | + Get a cosigner by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getCosigner parameters: - - description: The requested job id + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f explode: false in: path - name: jobId + name: cosignerId required: true schema: + format: uuid type: string style: simple responses: @@ -10031,8 +11925,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Job' - description: A JSON object that describes the job + $ref: '#/components/schemas/Cosigner' + description: A cosigner object headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -10045,78 +11939,50 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get job details + summary: Get cosigner tags: - - Job Management + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + name: Fireblocks SDK Java example x-accepts: application/json - /batch/{jobId}/pause: - post: - description: "Pause the given job, after the current task is done. A paused\ - \ job can later be resumed by calling ‘continue’, or canceled." - operationId: pauseJob + patch: + description: | + Rename a cosigner by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: renameCosigner parameters: - - description: The requested job id + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f explode: false in: path - name: jobId + name: cosignerId required: true schema: + format: uuid type: string style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string - style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RenameCosigner' + required: true responses: "200": - description: paused successfully - default: content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + $ref: '#/components/schemas/Cosigner' + description: A cosigner object headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Pause a job - tags: - - Job Management - x-accepts: application/json - /batch/{jobId}/continue: - post: - description: Continue the given paused job. - operationId: continueJob - parameters: - - description: The requested job id - explode: false - in: path - name: jobId - required: true - schema: - type: string - style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string - style: simple - responses: - "200": - description: continued successfully default: content: application/json: @@ -10126,39 +11992,80 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Continue a paused job + summary: Rename cosigner tags: - - Job Management + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ + \ cosignerId);" + name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /batch/{jobId}/cancel: - post: - description: "Stop the given job immediately. If the job is in the ‘Active’\ - \ state, the job will be canceled after completing the current task. Vault\ - \ accounts and Wallets that are already created will not be affected." - operationId: cancelJob + /cosigners/{cosignerId}/api_keys: + get: + description: | + Get all cosigner paired API keys (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getApiKeys parameters: - - description: The requested job id + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f explode: false in: path - name: jobId + name: cosignerId required: true schema: + format: uuid type: string style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key + - description: ASC / DESC ordering (default DESC) + example: ASC + explode: true + in: query + name: order + required: false + schema: + default: DESC + enum: + - ASC + - DESC + type: string + style: form + - description: Cursor of the required page + explode: true + in: query + name: pageCursor required: false schema: type: string - style: simple + style: form + - description: Maximum number of items in the page + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: number + style: form responses: "200": - description: canceled successfully + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeysPaginatedResponse' + description: A paginated response containing ApiKey objects + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' default: content: application/json: @@ -10168,19 +12075,43 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Cancel a running job + summary: Get all API keys tags: - - Job Management + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ + \ pageSize);" + name: Fireblocks SDK Java example x-accepts: application/json - /batch/{jobId}/tasks: + /cosigners/{cosignerId}/api_keys/{apiKeyId}: get: - description: Return a list of tasks for given job - operationId: getJobTasks + description: | + Get an API key by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getApiKey parameters: - - description: The requested job id + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f explode: false in: path - name: jobId + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + - description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: apiKeyId required: true schema: type: string @@ -10190,8 +12121,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Tasks' - description: An array of tasks + $ref: '#/components/schemas/ApiKey' + description: An ApiKey object headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -10204,9 +12135,18 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return a list of tasks for given job + summary: Get API key tags: - - Job Management + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ + \ apiKeyId);" + name: Fireblocks SDK Java example x-accepts: application/json components: headers: @@ -11538,6 +13478,10 @@ components: required: - name type: object + GetEnabledRoutingPolicyAssetGroupsResponse: + items: + type: string + type: array SetNetworkIdRoutingPolicyRequest: example: routingPolicy: @@ -19970,12 +21914,11 @@ components: expiresIn: description: "Sets the ticket expiration time (in hours) after the ticket\ \ is submitted. If no funding source is set for any term, the ticket will\ - \ automatically expire after given time." + \ automatically expire after given time. If expiresIn is not sent ticket\ + \ will not expire." maximum: 48 minimum: 1 type: number - required: - - expiresIn type: object SmartTransferTicketTermResponse: example: @@ -20039,6 +21982,7 @@ components: type: object SmartTransferFundTerm: example: + note: Transaction note amount: "133.789161216184" networkConnectionId: 0805153d-e77d-4f9b-8818-e507eeb2d122 srcId: "2" @@ -20076,6 +22020,10 @@ components: description: Transaction fee level. example: MEDIUM type: string + note: + description: Transaction note + example: Transaction note + type: string required: - amount - asset @@ -20218,6 +22166,105 @@ components: items: $ref: '#/components/schemas/Task' type: array + Cosigner: + example: + archived: false + name: My Cosigner 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + properties: + archived: + description: Whether the cosigner is archived + example: false + type: boolean + id: + description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + name: + description: The name of the cosigner + example: My Cosigner 1 + nullable: true + type: string + required: + - archived + - id + type: object + CosignersPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - archived: false + name: My Cosigner 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + - archived: false + name: My Cosigner 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/Cosigner' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + required: + - data + type: object + RenameCosigner: + example: + name: My Cosigner 1 + properties: + name: + description: The new name of the cosigner + example: My Cosigner 1 + nullable: true + type: string + type: object + ApiKey: + example: + lastSeen: 2021-07-01T00:00:00Z + id: 44fcead0-7053-4831-a53a-df7fb90d440f + properties: + id: + description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + lastSeen: + description: The date the API key was last seen + example: 2021-07-01T00:00:00Z + format: date-time + type: string + required: + - id + - lastSeen + type: object + ApiKeysPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - lastSeen: 2021-07-01T00:00:00Z + id: 44fcead0-7053-4831-a53a-df7fb90d440f + - lastSeen: 2021-07-01T00:00:00Z + id: 44fcead0-7053-4831-a53a-df7fb90d440f + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/ApiKey' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + required: + - data + type: object updateVaultAccountAssetAddress_request: properties: description: diff --git a/build.gradle b/build.gradle index d0e9159..375421c 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '1.0.1' +version = '1.1.0' buildscript { repositories { diff --git a/docs/ApiKey.md b/docs/ApiKey.md new file mode 100644 index 0000000..e892019 --- /dev/null +++ b/docs/ApiKey.md @@ -0,0 +1,14 @@ + + +# ApiKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The unique identifier of the API key | | +|**lastSeen** | **OffsetDateTime** | The date the API key was last seen | | + + + diff --git a/docs/ApiKeysPaginatedResponse.md b/docs/ApiKeysPaginatedResponse.md new file mode 100644 index 0000000..db59c46 --- /dev/null +++ b/docs/ApiKeysPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# ApiKeysPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ApiKey>**](ApiKey.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/Cosigner.md b/docs/Cosigner.md new file mode 100644 index 0000000..4820b31 --- /dev/null +++ b/docs/Cosigner.md @@ -0,0 +1,15 @@ + + +# Cosigner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**archived** | **Boolean** | Whether the cosigner is archived | | +|**id** | **UUID** | The unique identifier of the cosigner | | +|**name** | **String** | The name of the cosigner | [optional] | + + + diff --git a/docs/CosignersBetaApi.md b/docs/CosignersBetaApi.md new file mode 100644 index 0000000..e56246a --- /dev/null +++ b/docs/CosignersBetaApi.md @@ -0,0 +1,442 @@ +# CosignersBetaApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApiKey**](CosignersBetaApi.md#getApiKey) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Get API key | +| [**getApiKeys**](CosignersBetaApi.md#getApiKeys) | **GET** /cosigners/{cosignerId}/api_keys | Get all API keys | +| [**getCosigner**](CosignersBetaApi.md#getCosigner) | **GET** /cosigners/{cosignerId} | Get cosigner | +| [**getCosigners**](CosignersBetaApi.md#getCosigners) | **GET** /cosigners | Get all cosigners | +| [**renameCosigner**](CosignersBetaApi.md#renameCosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner | + + + +## getApiKey + +> CompletableFuture> getApiKey getApiKey(cosignerId, apiKeyId) + +Get API key + +Get an API key by ID **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + String apiKeyId = "44fcead0-7053-4831-a53a-df7fb90d440f"; // String | The unique identifier of the API key + try { + CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId, apiKeyId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#getApiKey"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#getApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | +| **apiKeyId** | **String**| The unique identifier of the API key | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | An ApiKey object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getApiKeys + +> CompletableFuture> getApiKeys getApiKeys(cosignerId, order, pageCursor, pageSize) + +Get all API keys + +Get all cosigner paired API keys (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + String order = "ASC"; // String | ASC / DESC ordering (default DESC) + String pageCursor = "pageCursor_example"; // String | Cursor of the required page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Maximum number of items in the page + try { + CompletableFuture> response = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor, pageSize); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#getApiKeys"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#getApiKeys"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | +| **order** | **String**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] [enum: ASC, DESC] | +| **pageCursor** | **String**| Cursor of the required page | [optional] | +| **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 10] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A paginated response containing ApiKey objects | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getCosigner + +> CompletableFuture> getCosigner getCosigner(cosignerId) + +Get cosigner + +Get a cosigner by ID **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + try { + CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#getCosigner"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#getCosigner"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A cosigner object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getCosigners + +> CompletableFuture> getCosigners getCosigners(order, pageCursor, pageSize) + +Get all cosigners + +Get all workspace cosigners (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String order = "ASC"; // String | ASC / DESC ordering (default DESC) + String pageCursor = "pageCursor_example"; // String | Cursor of the required page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Maximum number of items in the page + try { + CompletableFuture> response = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#getCosigners"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#getCosigners"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | **String**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] [enum: ASC, DESC] | +| **pageCursor** | **String**| Cursor of the required page | [optional] | +| **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 10] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A paginated response containing Cosigner objects | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## renameCosigner + +> CompletableFuture> renameCosigner renameCosigner(renameCosigner, cosignerId) + +Rename cosigner + +Rename a cosigner by ID **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + RenameCosigner renameCosigner = new RenameCosigner(); // RenameCosigner | + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + try { + CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner, cosignerId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#renameCosigner"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#renameCosigner"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **renameCosigner** | [**RenameCosigner**](RenameCosigner.md)| | | +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A cosigner object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/CosignersPaginatedResponse.md b/docs/CosignersPaginatedResponse.md new file mode 100644 index 0000000..2d9bf76 --- /dev/null +++ b/docs/CosignersPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# CosignersPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<Cosigner>**](Cosigner.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md index c0065d4..c288a92 100644 --- a/docs/NetworkConnectionsApi.md +++ b/docs/NetworkConnectionsApi.md @@ -111,7 +111,7 @@ No authorization required Creates a new network connection -Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -196,7 +196,7 @@ No authorization required Creates a new Network ID -Creates a new Network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Creates a new Network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -941,7 +941,7 @@ No authorization required Update network id routing policy. -Updates the routing policy of a specified network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Updates the routing policy of a specified network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -1026,7 +1026,7 @@ No authorization required Update network connection routing policy. -Updates an existing network connection's routing policy. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Updates an existing network connection's routing policy. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example diff --git a/docs/RenameCosigner.md b/docs/RenameCosigner.md new file mode 100644 index 0000000..27bee74 --- /dev/null +++ b/docs/RenameCosigner.md @@ -0,0 +1,13 @@ + + +# RenameCosigner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The new name of the cosigner | [optional] | + + + diff --git a/docs/SmartTransferFundTerm.md b/docs/SmartTransferFundTerm.md index 544fd4f..3f9ee57 100644 --- a/docs/SmartTransferFundTerm.md +++ b/docs/SmartTransferFundTerm.md @@ -14,6 +14,7 @@ |**srcType** | **String** | Source of the asset. | | |**fee** | **String** | Transaction fee | [optional] | |**feeLevel** | **String** | Transaction fee level. | [optional] | +|**note** | **String** | Transaction note | [optional] | diff --git a/docs/SmartTransferSubmitTicket.md b/docs/SmartTransferSubmitTicket.md index 5842d27..3efe752 100644 --- a/docs/SmartTransferSubmitTicket.md +++ b/docs/SmartTransferSubmitTicket.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**expiresIn** | **BigDecimal** | Sets the ticket expiration time (in hours) after the ticket is submitted. If no funding source is set for any term, the ticket will automatically expire after given time. | | +|**expiresIn** | **BigDecimal** | Sets the ticket expiration time (in hours) after the ticket is submitted. If no funding source is set for any term, the ticket will automatically expire after given time. If expiresIn is not sent ticket will not expire. | [optional] | diff --git a/pom.xml b/pom.xml index b12645e..d6149f3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 1.0.1 + 1.1.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index b396b19..c9e236d 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "1.0.1"; + public static final String VERSION = "1.1.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index 4da1bf3..5abedc1 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -44,6 +44,7 @@ public class Fireblocks { private ComplianceScreeningConfigurationApi complianceScreeningConfiguration; private ConsoleUserApi consoleUser; private ContractsApi contracts; + private CosignersBetaApi cosignersBeta; private ExchangeAccountsApi exchangeAccounts; private ExternalWalletsApi externalWallets; private FiatAccountsApi fiatAccounts; @@ -263,6 +264,13 @@ public ContractsApi contracts() { return contracts; } + public CosignersBetaApi cosignersBeta() { + if (cosignersBeta == null) { + cosignersBeta = new CosignersBetaApi(apiClient); + } + return cosignersBeta; + } + public ExchangeAccountsApi exchangeAccounts() { if (exchangeAccounts == null) { exchangeAccounts = new ExchangeAccountsApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/UserAgentUtil.java b/src/main/java/com/fireblocks/sdk/UserAgentUtil.java index 0af18c9..9660c02 100644 --- a/src/main/java/com/fireblocks/sdk/UserAgentUtil.java +++ b/src/main/java/com/fireblocks/sdk/UserAgentUtil.java @@ -18,8 +18,8 @@ public class UserAgentUtil { public static String getUserAgent(AdditionalOptions additionalOptions) { - String sdkVersion = SystemWrapper.getProperty("sdk.version"); - String userAgent = "fireblocks-sdk-java/" + sdkVersion; + String sdkVersion = "1.1.0"; + String userAgent = "fireblocks/sdk/java/" + sdkVersion; if (!Optional.ofNullable(additionalOptions) .map(AdditionalOptions::isAnonymousPlatform) .orElse(false)) { diff --git a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java new file mode 100644 index 0000000..d7caf9b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java @@ -0,0 +1,499 @@ +/* + * 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.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.ApiKey; +import com.fireblocks.sdk.model.ApiKeysPaginatedResponse; +import com.fireblocks.sdk.model.Cosigner; +import com.fireblocks.sdk.model.CosignersPaginatedResponse; +import com.fireblocks.sdk.model.RenameCosigner; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CosignersBetaApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public CosignersBetaApi() { + this(new ApiClient()); + } + + public CosignersBetaApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get API key Get an API key by ID **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @param cosignerId The unique identifier of the cosigner (required) + * @param apiKeyId The unique identifier of the API key (required) + * @return CompletableFuture<ApiResponse<ApiKey>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getApiKey(UUID cosignerId, String apiKeyId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getApiKeyRequestBuilder(cosignerId, apiKeyId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getApiKey", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + ApiKey>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getApiKeyRequestBuilder(UUID cosignerId, String apiKeyId) + throws ApiException { + // verify the required parameter 'cosignerId' is set + if (cosignerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'cosignerId' when calling getApiKey"); + } + // verify the required parameter 'apiKeyId' is set + if (apiKeyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'apiKeyId' when calling getApiKey"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}/api_keys/{apiKeyId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())) + .replace("{apiKeyId}", ApiClient.urlEncode(apiKeyId.toString())); + + 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; + } + /** + * Get all API keys Get all cosigner paired API keys (paginated) **Note:** These endpoints are + * currently in beta and might be subject to changes. + * + * @param cosignerId The unique identifier of the cosigner (required) + * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) + * @param pageCursor Cursor of the required page (optional) + * @param pageSize Maximum number of items in the page (optional, default to 10) + * @return CompletableFuture<ApiResponse<ApiKeysPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getApiKeys( + UUID cosignerId, String order, String pageCursor, BigDecimal pageSize) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getApiKeysRequestBuilder(cosignerId, order, pageCursor, pageSize); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getApiKeys", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + ApiKeysPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getApiKeysRequestBuilder( + UUID cosignerId, String order, String pageCursor, BigDecimal pageSize) + throws ApiException { + // verify the required parameter 'cosignerId' is set + if (cosignerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'cosignerId' when calling getApiKeys"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}/api_keys" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "order"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("order", order)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + 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; + } + /** + * Get cosigner Get a cosigner by ID **Note:** These endpoints are currently in beta and might + * be subject to changes. + * + * @param cosignerId The unique identifier of the cosigner (required) + * @return CompletableFuture<ApiResponse<Cosigner>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getCosigner(UUID cosignerId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getCosignerRequestBuilder(cosignerId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getCosigner", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Cosigner>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getCosignerRequestBuilder(UUID cosignerId) throws ApiException { + // verify the required parameter 'cosignerId' is set + if (cosignerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'cosignerId' when calling getCosigner"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())); + + 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; + } + /** + * Get all cosigners Get all workspace cosigners (paginated) **Note:** These endpoints are + * currently in beta and might be subject to changes. + * + * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) + * @param pageCursor Cursor of the required page (optional) + * @param pageSize Maximum number of items in the page (optional, default to 10) + * @return CompletableFuture<ApiResponse<CosignersPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getCosigners( + String order, String pageCursor, BigDecimal pageSize) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getCosignersRequestBuilder(order, pageCursor, pageSize); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getCosigners", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + CosignersPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getCosignersRequestBuilder( + String order, String pageCursor, BigDecimal pageSize) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cosigners"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "order"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("order", order)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + 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; + } + /** + * Rename cosigner Rename a cosigner by ID **Note:** These endpoints are currently in beta and + * might be subject to changes. + * + * @param renameCosigner (required) + * @param cosignerId The unique identifier of the cosigner (required) + * @return CompletableFuture<ApiResponse<Cosigner>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> renameCosigner( + RenameCosigner renameCosigner, UUID cosignerId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + renameCosignerRequestBuilder(renameCosigner, cosignerId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("renameCosigner", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Cosigner>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder renameCosignerRequestBuilder( + RenameCosigner renameCosigner, UUID cosignerId) throws ApiException { + // verify the required parameter 'renameCosigner' is set + if (renameCosigner == null) { + throw new ApiException( + 400, + "Missing the required parameter 'renameCosigner' when calling renameCosigner"); + } + // verify the required parameter 'cosignerId' is set + if (cosignerId == null) { + throw new ApiException( + 400, "Missing the required parameter 'cosignerId' when calling renameCosigner"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(renameCosigner); + localVarRequestBuilder.method( + "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java index 85d933e..f40352f 100644 --- a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java @@ -174,9 +174,11 @@ private HttpRequest.Builder checkThirdPartyRoutingRequestBuilder( * choose another one. - **Default**; Use the routing specified by the network profile the * connection is connected to. This scheme is also referred to as \"Profile Routing\" * Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → - * **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - - * **Note**: By default, Custom routing scheme uses (`dstId` = `0`, - * `dstType` = `VAULT`). + * **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** + * Supported asset groups for routing police can be found at + * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * scheme uses (`dstId` = `0`, `dstType` = + * `VAULT`). * * @param networkConnection (optional) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -263,9 +265,11 @@ private HttpRequest.Builder createNetworkConnectionRequestBuilder( * one. - **Default**; Use the routing specified by the network profile the connection is * connected to. This scheme is also referred to as \"Profile Routing\" Default * Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - - * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: - * By default, Custom routing scheme uses (`dstId` = `0`, - * `dstType` = `VAULT`). + * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported + * asset groups for routing police can be found at + * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * scheme uses (`dstId` = `0`, `dstType` = + * `VAULT`). * * @param createNetworkIdRequest (optional) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -1035,8 +1039,10 @@ private HttpRequest.Builder setNetworkIdNameRequestBuilder( * by the network profile the connection is connected to. This scheme is also referred to as * \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → * **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - - * Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses - * (`dstId` = `0`, `dstType` = `VAULT`). + * Network Connection FIAT → **Default** Supported asset groups for routing police can be found + * at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * scheme uses (`dstId` = `0`, `dstType` = + * `VAULT`). * * @param networkId The ID of the network (required) * @param setNetworkIdRoutingPolicyRequest (optional) @@ -1132,9 +1138,10 @@ private HttpRequest.Builder setNetworkIdRoutingPolicyRequestBuilder( * the routing specified by the network profile the connection is connected to. This scheme is * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → - * **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing - * scheme uses (`dstId` = `0`, `dstType` = - * `VAULT`). + * **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police + * can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, + * Custom routing scheme uses (`dstId` = `0`, `dstType` + * = `VAULT`). * * @param connectionId The ID of the network connection (required) * @param setRoutingPolicyRequest (optional) diff --git a/src/main/java/com/fireblocks/sdk/model/ApiKey.java b/src/main/java/com/fireblocks/sdk/model/ApiKey.java new file mode 100644 index 0000000..7fb903f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ApiKey.java @@ -0,0 +1,179 @@ +/* + * 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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** ApiKey */ +@JsonPropertyOrder({ApiKey.JSON_PROPERTY_ID, ApiKey.JSON_PROPERTY_LAST_SEEN}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKey { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_LAST_SEEN = "lastSeen"; + private OffsetDateTime lastSeen; + + public ApiKey() {} + + public ApiKey id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the API key + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public ApiKey lastSeen(OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + return this; + } + + /** + * The date the API key was last seen + * + * @return lastSeen + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastSeen() { + return lastSeen; + } + + @JsonProperty(JSON_PROPERTY_LAST_SEEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastSeen(OffsetDateTime lastSeen) { + this.lastSeen = lastSeen; + } + + /** Return true if this ApiKey object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKey apiKey = (ApiKey) o; + return Objects.equals(this.id, apiKey.id) && Objects.equals(this.lastSeen, apiKey.lastSeen); + } + + @Override + public int hashCode() { + return Objects.hash(id, lastSeen); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiKey {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" lastSeen: ").append(toIndentedString(lastSeen)).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 `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `lastSeen` to the URL query string + if (getLastSeen() != null) { + joiner.add( + String.format( + "%slastSeen%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLastSeen()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponse.java new file mode 100644 index 0000000..51ed2c5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponse.java @@ -0,0 +1,203 @@ +/* + * 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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ApiKeysPaginatedResponse */ +@JsonPropertyOrder({ + ApiKeysPaginatedResponse.JSON_PROPERTY_DATA, + ApiKeysPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKeysPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public ApiKeysPaginatedResponse() {} + + public ApiKeysPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public ApiKeysPaginatedResponse addDataItem(ApiKey dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public ApiKeysPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @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 ApiKeysPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKeysPaginatedResponse apiKeysPaginatedResponse = (ApiKeysPaginatedResponse) o; + return Objects.equals(this.data, apiKeysPaginatedResponse.data) + && Objects.equals(this.next, apiKeysPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiKeysPaginatedResponse {\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 `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // 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/Cosigner.java b/src/main/java/com/fireblocks/sdk/model/Cosigner.java new file mode 100644 index 0000000..4639f11 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Cosigner.java @@ -0,0 +1,222 @@ +/* + * 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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** Cosigner */ +@JsonPropertyOrder({ + Cosigner.JSON_PROPERTY_ARCHIVED, + Cosigner.JSON_PROPERTY_ID, + Cosigner.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Cosigner { + public static final String JSON_PROPERTY_ARCHIVED = "archived"; + private Boolean archived; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Cosigner() {} + + public Cosigner archived(Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Whether the cosigner is archived + * + * @return archived + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getArchived() { + return archived; + } + + @JsonProperty(JSON_PROPERTY_ARCHIVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArchived(Boolean archived) { + this.archived = archived; + } + + public Cosigner id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the cosigner + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public Cosigner name(String name) { + this.name = name; + return this; + } + + /** + * The name of the cosigner + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + /** Return true if this Cosigner object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Cosigner cosigner = (Cosigner) o; + return Objects.equals(this.archived, cosigner.archived) + && Objects.equals(this.id, cosigner.id) + && Objects.equals(this.name, cosigner.name); + } + + @Override + public int hashCode() { + return Objects.hash(archived, id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Cosigner {\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 `archived` to the URL query string + if (getArchived() != null) { + joiner.add( + String.format( + "%sarchived%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getArchived()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CosignersPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/CosignersPaginatedResponse.java new file mode 100644 index 0000000..2c8e2a7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CosignersPaginatedResponse.java @@ -0,0 +1,203 @@ +/* + * 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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** CosignersPaginatedResponse */ +@JsonPropertyOrder({ + CosignersPaginatedResponse.JSON_PROPERTY_DATA, + CosignersPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CosignersPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public CosignersPaginatedResponse() {} + + public CosignersPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public CosignersPaginatedResponse addDataItem(Cosigner dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public CosignersPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @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 CosignersPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CosignersPaginatedResponse cosignersPaginatedResponse = (CosignersPaginatedResponse) o; + return Objects.equals(this.data, cosignersPaginatedResponse.data) + && Objects.equals(this.next, cosignersPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CosignersPaginatedResponse {\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 `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // 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/RenameCosigner.java b/src/main/java/com/fireblocks/sdk/model/RenameCosigner.java new file mode 100644 index 0000000..ff95bc6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RenameCosigner.java @@ -0,0 +1,139 @@ +/* + * 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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** RenameCosigner */ +@JsonPropertyOrder({RenameCosigner.JSON_PROPERTY_NAME}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RenameCosigner { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public RenameCosigner() {} + + public RenameCosigner name(String name) { + this.name = name; + return this; + } + + /** + * The new name of the cosigner + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + /** Return true if this RenameCosigner object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenameCosigner renameCosigner = (RenameCosigner) o; + return Objects.equals(this.name, renameCosigner.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenameCosigner {\n"); + sb.append(" name: ").append(toIndentedString(name)).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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferFundTerm.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferFundTerm.java index 7d83556..30d01cf 100644 --- a/src/main/java/com/fireblocks/sdk/model/SmartTransferFundTerm.java +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferFundTerm.java @@ -29,7 +29,8 @@ SmartTransferFundTerm.JSON_PROPERTY_SRC_ID, SmartTransferFundTerm.JSON_PROPERTY_SRC_TYPE, SmartTransferFundTerm.JSON_PROPERTY_FEE, - SmartTransferFundTerm.JSON_PROPERTY_FEE_LEVEL + SmartTransferFundTerm.JSON_PROPERTY_FEE_LEVEL, + SmartTransferFundTerm.JSON_PROPERTY_NOTE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SmartTransferFundTerm { @@ -54,6 +55,9 @@ public class SmartTransferFundTerm { public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; private String feeLevel; + public static final String JSON_PROPERTY_NOTE = "note"; + private String note; + public SmartTransferFundTerm() {} public SmartTransferFundTerm asset(String asset) { @@ -217,6 +221,29 @@ public void setFeeLevel(String feeLevel) { this.feeLevel = feeLevel; } + public SmartTransferFundTerm note(String note) { + this.note = note; + return this; + } + + /** + * Transaction note + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(String note) { + this.note = note; + } + /** Return true if this SmartTransferFundTerm object is equal to o. */ @Override public boolean equals(Object o) { @@ -234,12 +261,14 @@ public boolean equals(Object o) { && Objects.equals(this.srcId, smartTransferFundTerm.srcId) && Objects.equals(this.srcType, smartTransferFundTerm.srcType) && Objects.equals(this.fee, smartTransferFundTerm.fee) - && Objects.equals(this.feeLevel, smartTransferFundTerm.feeLevel); + && Objects.equals(this.feeLevel, smartTransferFundTerm.feeLevel) + && Objects.equals(this.note, smartTransferFundTerm.note); } @Override public int hashCode() { - return Objects.hash(asset, amount, networkConnectionId, srcId, srcType, fee, feeLevel); + return Objects.hash( + asset, amount, networkConnectionId, srcId, srcType, fee, feeLevel, note); } @Override @@ -255,6 +284,7 @@ public String toString() { sb.append(" srcType: ").append(toIndentedString(srcType)).append("\n"); sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append("}"); return sb.toString(); } @@ -381,6 +411,17 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `note` to the URL query string + if (getNote() != null) { + joiner.add( + String.format( + "%snote%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNote()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferSubmitTicket.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferSubmitTicket.java index 437a97c..c083713 100644 --- a/src/main/java/com/fireblocks/sdk/model/SmartTransferSubmitTicket.java +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferSubmitTicket.java @@ -38,20 +38,20 @@ public SmartTransferSubmitTicket expiresIn(BigDecimal expiresIn) { /** * Sets the ticket expiration time (in hours) after the ticket is submitted. If no funding - * source is set for any term, the ticket will automatically expire after given time. minimum: 1 - * maximum: 48 + * source is set for any term, the ticket will automatically expire after given time. If + * expiresIn is not sent ticket will not expire. minimum: 1 maximum: 48 * * @return expiresIn */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_IN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getExpiresIn() { return expiresIn; } @JsonProperty(JSON_PROPERTY_EXPIRES_IN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setExpiresIn(BigDecimal expiresIn) { this.expiresIn = expiresIn; } diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index cef0d48..e0f750f 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -122,7 +122,7 @@ private void runAndVerifyAuthorizationValue( Assert.assertEquals(expectedAuthorizationValue, headerMap.get("Authorization").get(0)); Assert.assertEquals("application/json", headerMap.get("Content-Type").get(0)); Assert.assertEquals( - "testUserAgent fireblocks-sdk-java/null", headerMap.get("User-Agent").get(0)); + "testUserAgent fireblocks/sdk/java/1.1.0", headerMap.get("User-Agent").get(0)); Assert.assertEquals("testApiKey", headerMap.get("X-API-Key").get(0)); } } @@ -255,7 +255,7 @@ public void testHeadersExistsInRequest() { Assert.assertEquals("Bearer mockJwt", headerMap.get("Authorization").get(0)); Assert.assertEquals("application/json", headerMap.get("Content-Type").get(0)); Assert.assertEquals( - "testUserAgent fireblocks-sdk-java/null", headerMap.get("User-Agent").get(0)); + "testUserAgent fireblocks/sdk/java/1.1.0", headerMap.get("User-Agent").get(0)); Assert.assertEquals("testApiKey", headerMap.get("X-API-Key").get(0)); } } @@ -374,6 +374,14 @@ public void testGetContractsApi() { Assert.assertSame(contracts, fireblocks.contracts()); } + @Test + public void testGetCosignersBetaApi() { + setupFireblocks(true, null, null); + CosignersBetaApi cosignersBeta = fireblocks.cosignersBeta(); + Assert.assertNotNull(cosignersBeta); + Assert.assertSame(cosignersBeta, fireblocks.cosignersBeta()); + } + @Test public void testGetExchangeAccountsApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java b/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java index feefdbd..0e6da7a 100644 --- a/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java +++ b/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java @@ -13,11 +13,8 @@ public class UserAgentUtilTest { @Test public void testGetUserAgentWithAnonymousPlatform() { AdditionalOptions additionalOptions = new AdditionalOptions().isAnonymousPlatform(true); - try (MockedStatic mockedSystem = Mockito.mockStatic(SystemWrapper.class)) { - mockedSystem.when(() -> SystemWrapper.getProperty(anyString())).thenReturn("testValue"); - String userAgent = UserAgentUtil.getUserAgent(additionalOptions); - Assert.assertEquals("fireblocks-sdk-java/testValue", userAgent); - } + String userAgent = UserAgentUtil.getUserAgent(additionalOptions); + Assert.assertEquals("fireblocks/sdk/java/1.1.0", userAgent); } @Test @@ -28,9 +25,8 @@ public void testGetUserAgentWithoutAnonymousPlatform() { mockedSystem.when(() -> SystemWrapper.getProperty("os.name")).thenReturn("macOS"); mockedSystem.when(() -> SystemWrapper.getProperty("os.version")).thenReturn("10.15.7"); mockedSystem.when(() -> SystemWrapper.getProperty("os.arch")).thenReturn("x86_64"); - mockedSystem.when(() -> SystemWrapper.getProperty("sdk.version")).thenReturn("1.0.0"); String userAgent = UserAgentUtil.getUserAgent(additionalOptions); - Assert.assertEquals("fireblocks-sdk-java/1.0.0 (macOS 10.15.7; x86_64)", userAgent); + Assert.assertEquals("fireblocks/sdk/java/1.1.0 (macOS 10.15.7; x86_64)", userAgent); } } @@ -43,10 +39,9 @@ public void testGetUserAgentWithCustomUserAgent() { mockedSystem.when(() -> SystemWrapper.getProperty("os.name")).thenReturn("macOS"); mockedSystem.when(() -> SystemWrapper.getProperty("os.version")).thenReturn("10.15.7"); mockedSystem.when(() -> SystemWrapper.getProperty("os.arch")).thenReturn("x86_64"); - mockedSystem.when(() -> SystemWrapper.getProperty("sdk.version")).thenReturn("1.0.0"); String userAgent = UserAgentUtil.getUserAgent(additionalOptions); Assert.assertEquals( - "customUserAgent fireblocks-sdk-java/1.0.0 (macOS 10.15.7; x86_64)", userAgent); + "customUserAgent fireblocks/sdk/java/1.1.0 (macOS 10.15.7; x86_64)", userAgent); } } } diff --git a/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java new file mode 100644 index 0000000..fb315a7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java @@ -0,0 +1,114 @@ +/* + * 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.ApiKey; +import com.fireblocks.sdk.model.ApiKeysPaginatedResponse; +import com.fireblocks.sdk.model.Cosigner; +import com.fireblocks.sdk.model.CosignersPaginatedResponse; +import com.fireblocks.sdk.model.RenameCosigner; +import java.math.BigDecimal; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for CosignersBetaApi */ +@Ignore +public class CosignersBetaApiTest { + + private final CosignersBetaApi api = new CosignersBetaApi(); + + /** + * Get API key + * + *

Get an API key by ID **Note:** These endpoints are currently in beta and might be subject + * to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getApiKeyTest() throws ApiException { + UUID cosignerId = null; + String apiKeyId = null; + CompletableFuture> response = api.getApiKey(cosignerId, apiKeyId); + } + + /** + * Get all API keys + * + *

Get all cosigner paired API keys (paginated) **Note:** These endpoints are currently in + * beta and might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getApiKeysTest() throws ApiException { + UUID cosignerId = null; + String order = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.getApiKeys(cosignerId, order, pageCursor, pageSize); + } + + /** + * Get cosigner + * + *

Get a cosigner by ID **Note:** These endpoints are currently in beta and might be subject + * to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCosignerTest() throws ApiException { + UUID cosignerId = null; + CompletableFuture> response = api.getCosigner(cosignerId); + } + + /** + * Get all cosigners + * + *

Get all workspace cosigners (paginated) **Note:** These endpoints are currently in beta + * and might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCosignersTest() throws ApiException { + String order = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.getCosigners(order, pageCursor, pageSize); + } + + /** + * Rename cosigner + * + *

Rename a cosigner by ID **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void renameCosignerTest() throws ApiException { + RenameCosigner renameCosigner = null; + UUID cosignerId = null; + CompletableFuture> response = + api.renameCosigner(renameCosigner, cosignerId); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java index 65b8892..f859ade 100644 --- a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java @@ -66,9 +66,10 @@ public void checkThirdPartyRoutingTest() throws ApiException { * the routing specified by the network profile the connection is connected to. This scheme is * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → - * **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing - * scheme uses (`dstId` = `0`, `dstType` = - * `VAULT`). + * **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police + * can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, + * Custom routing scheme uses (`dstId` = `0`, `dstType` + * = `VAULT`). * * @throws ApiException if the Api call fails */ @@ -92,9 +93,10 @@ public void createNetworkConnectionTest() throws ApiException { * the routing specified by the network profile the connection is connected to. This scheme is * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → - * **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing - * scheme uses (`dstId` = `0`, `dstType` = - * `VAULT`). + * **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police + * can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, + * Custom routing scheme uses (`dstId` = `0`, `dstType` + * = `VAULT`). * * @throws ApiException if the Api call fails */ @@ -316,9 +318,11 @@ public void setNetworkIdNameTest() throws ApiException { * one. - **Default**; Use the routing specified by the network profile the connection is * connected to. This scheme is also referred to as \"Profile Routing\" Default * Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - - * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: - * By default, Custom routing scheme uses (`dstId` = `0`, - * `dstType` = `VAULT`). + * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported + * asset groups for routing police can be found at + * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * scheme uses (`dstId` = `0`, `dstType` = + * `VAULT`). * * @throws ApiException if the Api call fails */ @@ -342,9 +346,11 @@ public void setNetworkIdRoutingPolicyTest() throws ApiException { * choose another one. - **Default**; Use the routing specified by the network profile the * connection is connected to. This scheme is also referred to as \"Profile Routing\" * Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → - * **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - - * **Note**: By default, Custom routing scheme uses (`dstId` = `0`, - * `dstType` = `VAULT`). + * **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** + * Supported asset groups for routing police can be found at + * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * scheme uses (`dstId` = `0`, `dstType` = + * `VAULT`). * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java b/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java new file mode 100644 index 0000000..bf97262 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java @@ -0,0 +1,39 @@ +/* + * 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 ApiKey */ +public class ApiKeyTest { + private final ApiKey model = new ApiKey(); + + /** Model tests for ApiKey */ + @Test + public void testApiKey() { + // TODO: test ApiKey + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'lastSeen' */ + @Test + public void lastSeenTest() { + // TODO: test lastSeen + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponseTest.java new file mode 100644 index 0000000..cb23a33 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponseTest.java @@ -0,0 +1,39 @@ +/* + * 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 ApiKeysPaginatedResponse */ +public class ApiKeysPaginatedResponseTest { + private final ApiKeysPaginatedResponse model = new ApiKeysPaginatedResponse(); + + /** Model tests for ApiKeysPaginatedResponse */ + @Test + public void testApiKeysPaginatedResponse() { + // TODO: test ApiKeysPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CosignerTest.java b/src/test/java/com/fireblocks/sdk/model/CosignerTest.java new file mode 100644 index 0000000..7e9b541 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CosignerTest.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 Cosigner */ +public class CosignerTest { + private final Cosigner model = new Cosigner(); + + /** Model tests for Cosigner */ + @Test + public void testCosigner() { + // TODO: test Cosigner + } + + /** Test the property 'archived' */ + @Test + public void archivedTest() { + // TODO: test archived + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CosignersPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/CosignersPaginatedResponseTest.java new file mode 100644 index 0000000..f97115d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CosignersPaginatedResponseTest.java @@ -0,0 +1,39 @@ +/* + * 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 CosignersPaginatedResponse */ +public class CosignersPaginatedResponseTest { + private final CosignersPaginatedResponse model = new CosignersPaginatedResponse(); + + /** Model tests for CosignersPaginatedResponse */ + @Test + public void testCosignersPaginatedResponse() { + // TODO: test CosignersPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java b/src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java new file mode 100644 index 0000000..7701d38 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java @@ -0,0 +1,33 @@ +/* + * 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 RenameCosigner */ +public class RenameCosignerTest { + private final RenameCosigner model = new RenameCosigner(); + + /** Model tests for RenameCosigner */ + @Test + public void testRenameCosigner() { + // TODO: test RenameCosigner + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferFundTermTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferFundTermTest.java index 98ae6ea..42414f5 100644 --- a/src/test/java/com/fireblocks/sdk/model/SmartTransferFundTermTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferFundTermTest.java @@ -66,4 +66,10 @@ public void feeTest() { public void feeLevelTest() { // TODO: test feeLevel } + + /** Test the property 'note' */ + @Test + public void noteTest() { + // TODO: test note + } }