diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5181c34a..54dd6445 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -27,6 +27,7 @@ docs/AddCosignerResponse.md docs/AddExchangeAccountRequest.md docs/AddExchangeAccountResponse.md docs/AdditionalInfo.md +docs/AddressNotAvailableError.md docs/AmlRegistrationResult.md docs/AmlRegistrationResultFullPayload.md docs/AmlScreeningResult.md @@ -147,7 +148,11 @@ docs/CreateConversionConfigOperationRequest.md docs/CreateDisbursementConfigOperationRequest.md docs/CreateInternalTransferRequest.md docs/CreateInternalWalletAssetRequest.md +docs/CreateMultichainTokenRequest.md +docs/CreateMultichainTokenRequestCreateParams.md docs/CreateMultipleAccountsRequest.md +docs/CreateMultipleDepositAddressesJobStatus.md +docs/CreateMultipleDepositAddressesRequest.md docs/CreateNcwConnectionRequest.md docs/CreateNetworkIdRequest.md docs/CreatePayoutRequest.md @@ -172,6 +177,8 @@ docs/Delegation.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md +docs/DeployableAddressResponse.md +docs/DeployedContractNotFoundError.md docs/DeployedContractResponseDto.md docs/DeployedContractsApi.md docs/DeployedContractsPaginatedResponse.md @@ -241,6 +248,7 @@ docs/GetAPIUsersResponse.md docs/GetAuditLogsResponse.md docs/GetConnectionsResponse.md docs/GetConsoleUsersResponse.md +docs/GetDeployableAddressRequest.md docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md docs/GetLinkedCollectionsPaginatedResponse.md @@ -258,6 +266,7 @@ docs/HttpContractDoesNotExistError.md docs/InstructionAmount.md docs/InternalTransferResponse.md docs/InternalWalletsApi.md +docs/InvalidParamaterValueError.md docs/Job.md docs/JobCreated.md docs/JobManagementApi.md @@ -286,6 +295,7 @@ docs/NetworkId.md docs/NetworkIdResponse.md docs/NetworkIdRoutingPolicyValue.md docs/NetworkRecord.md +docs/NewAddress.md docs/NftsApi.md docs/NoneNetworkRoutingDest.md docs/NotFoundException.md @@ -356,12 +366,14 @@ docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md +docs/ReissueMultichainTokenRequest.md docs/RelatedRequest.md docs/RelatedTransaction.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md docs/RescanTransaction.md +docs/ResendNotificationsByResourceIdRequest.md docs/ResendTransactionWebhooksRequest.md docs/ResendWebhooksByTransactionIdResponse.md docs/ResendWebhooksResponse.md @@ -456,6 +468,7 @@ docs/TokenInfoNotFoundErrorResponse.md docs/TokenLinkDto.md docs/TokenLinkDtoTokenMetadata.md docs/TokenLinkExistsHttpError.md +docs/TokenLinkNotMultichainCompatibleHttpError.md docs/TokenLinkRequestDto.md docs/TokenOwnershipResponse.md docs/TokenOwnershipSpamUpdatePayload.md @@ -669,6 +682,7 @@ src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java src/main/java/com/fireblocks/sdk/model/AddExchangeAccountRequest.java src/main/java/com/fireblocks/sdk/model/AddExchangeAccountResponse.java src/main/java/com/fireblocks/sdk/model/AdditionalInfo.java +src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java src/main/java/com/fireblocks/sdk/model/AmlRegistrationResult.java src/main/java/com/fireblocks/sdk/model/AmlRegistrationResultFullPayload.java src/main/java/com/fireblocks/sdk/model/AmlScreeningResult.java @@ -778,7 +792,11 @@ src/main/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequest.ja src/main/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequest.java src/main/java/com/fireblocks/sdk/model/CreateInternalTransferRequest.java src/main/java/com/fireblocks/sdk/model/CreateInternalWalletAssetRequest.java +src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequest.java +src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParams.java src/main/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequest.java +src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatus.java +src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequest.java src/main/java/com/fireblocks/sdk/model/CreateNcwConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java src/main/java/com/fireblocks/sdk/model/CreatePayoutRequest.java @@ -803,6 +821,8 @@ src/main/java/com/fireblocks/sdk/model/Delegation.java src/main/java/com/fireblocks/sdk/model/DelegationSummary.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java +src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.java +src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java src/main/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponse.java @@ -866,6 +886,7 @@ src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java src/main/java/com/fireblocks/sdk/model/GetConnectionsResponse.java src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java +src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequest.java src/main/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponse.java src/main/java/com/fireblocks/sdk/model/GetFilterParameter.java src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java @@ -882,6 +903,7 @@ src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.java src/main/java/com/fireblocks/sdk/model/InstructionAmount.java src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java +src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java src/main/java/com/fireblocks/sdk/model/Job.java src/main/java/com/fireblocks/sdk/model/JobCreated.java src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java @@ -906,6 +928,7 @@ src/main/java/com/fireblocks/sdk/model/NetworkId.java src/main/java/com/fireblocks/sdk/model/NetworkIdResponse.java src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValue.java src/main/java/com/fireblocks/sdk/model/NetworkRecord.java +src/main/java/com/fireblocks/sdk/model/NewAddress.java src/main/java/com/fireblocks/sdk/model/NoneNetworkRoutingDest.java src/main/java/com/fireblocks/sdk/model/NotFoundException.java src/main/java/com/fireblocks/sdk/model/Notification.java @@ -971,12 +994,14 @@ src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java +src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java src/main/java/com/fireblocks/sdk/model/RelatedRequest.java src/main/java/com/fireblocks/sdk/model/RelatedTransaction.java src/main/java/com/fireblocks/sdk/model/RemoveCollateralRequestBody.java src/main/java/com/fireblocks/sdk/model/RenameCosigner.java src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java src/main/java/com/fireblocks/sdk/model/RescanTransaction.java +src/main/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequest.java src/main/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequest.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksResponse.java @@ -1068,6 +1093,7 @@ src/main/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java src/main/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadata.java src/main/java/com/fireblocks/sdk/model/TokenLinkExistsHttpError.java +src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java src/main/java/com/fireblocks/sdk/model/TokenOwnershipSpamUpdatePayload.java @@ -1250,6 +1276,7 @@ src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.java src/test/java/com/fireblocks/sdk/model/AddExchangeAccountRequestTest.java src/test/java/com/fireblocks/sdk/model/AddExchangeAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/AdditionalInfoTest.java +src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.java src/test/java/com/fireblocks/sdk/model/AmlRegistrationResultFullPayloadTest.java src/test/java/com/fireblocks/sdk/model/AmlRegistrationResultTest.java src/test/java/com/fireblocks/sdk/model/AmlScreeningResultTest.java @@ -1359,7 +1386,11 @@ src/test/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequestTes src/test/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateInternalTransferRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateInternalWalletAssetRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParamsTest.java +src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatusTest.java +src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNcwConnectionRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNetworkIdRequestTest.java src/test/java/com/fireblocks/sdk/model/CreatePayoutRequestTest.java @@ -1384,6 +1415,8 @@ src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java src/test/java/com/fireblocks/sdk/model/DelegationTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java +src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.java +src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponseTest.java @@ -1447,6 +1480,7 @@ src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConnectionsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java +src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/GetFilterParameterTest.java src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java @@ -1463,6 +1497,7 @@ src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.java src/test/java/com/fireblocks/sdk/model/InstructionAmountTest.java src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java +src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java src/test/java/com/fireblocks/sdk/model/JobCreatedTest.java src/test/java/com/fireblocks/sdk/model/JobTest.java src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java @@ -1487,6 +1522,7 @@ src/test/java/com/fireblocks/sdk/model/NetworkIdResponseTest.java src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValueTest.java src/test/java/com/fireblocks/sdk/model/NetworkIdTest.java src/test/java/com/fireblocks/sdk/model/NetworkRecordTest.java +src/test/java/com/fireblocks/sdk/model/NewAddressTest.java src/test/java/com/fireblocks/sdk/model/NoneNetworkRoutingDestTest.java src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java src/test/java/com/fireblocks/sdk/model/NotificationAttemptTest.java @@ -1552,12 +1588,14 @@ src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java +src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestTest.java src/test/java/com/fireblocks/sdk/model/RelatedRequestTest.java src/test/java/com/fireblocks/sdk/model/RelatedTransactionTest.java src/test/java/com/fireblocks/sdk/model/RemoveCollateralRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.java +src/test/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequestTest.java src/test/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequestTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksResponseTest.java @@ -1649,6 +1687,7 @@ src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadataTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkExistsHttpErrorTest.java +src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/TokenOwnershipResponseTest.java src/test/java/com/fireblocks/sdk/model/TokenOwnershipSpamUpdatePayloadTest.java diff --git a/README.md b/README.md index 8a95bdc1..4524c1b8 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 10.0.2 + 0.0.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:10.0.2" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-10.0.2.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -326,12 +326,15 @@ Class | Method | HTTP request | Description *TokenizationApi* | [**createNewCollection**](docs/TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection *TokenizationApi* | [**fetchCollectionTokenDetails**](docs/TokenizationApi.md#fetchCollectionTokenDetails) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details *TokenizationApi* | [**getCollectionById**](docs/TokenizationApi.md#getCollectionById) | **GET** /tokenization/collections/{id} | Get a collection by id +*TokenizationApi* | [**getDeployableAddress**](docs/TokenizationApi.md#getDeployableAddress) | **POST** /tokenization/multichain/deterministic_address | Get deterministic address for contract deployment *TokenizationApi* | [**getLinkedCollections**](docs/TokenizationApi.md#getLinkedCollections) | **GET** /tokenization/collections | Get collections *TokenizationApi* | [**getLinkedToken**](docs/TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token *TokenizationApi* | [**getLinkedTokens**](docs/TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens *TokenizationApi* | [**issueNewToken**](docs/TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token +*TokenizationApi* | [**issueTokenMultiChain**](docs/TokenizationApi.md#issueTokenMultiChain) | **POST** /tokenization/multichain/tokens | Issue a token on one or more blockchains *TokenizationApi* | [**link**](docs/TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a contract *TokenizationApi* | [**mintCollectionToken**](docs/TokenizationApi.md#mintCollectionToken) | **POST** /tokenization/collections/{id}/tokens/mint | Mint tokens +*TokenizationApi* | [**reIssueTokenMultiChain**](docs/TokenizationApi.md#reIssueTokenMultiChain) | **POST** /tokenization/multichain/token/{tokenLinkId} | Reissue a multichain token *TokenizationApi* | [**unlink**](docs/TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token *TokenizationApi* | [**unlinkCollection**](docs/TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link *TransactionsApi* | [**cancelTransaction**](docs/TransactionsApi.md#cancelTransaction) | **POST** /transactions/{txId}/cancel | Cancel a transaction @@ -363,10 +366,12 @@ Class | Method | HTTP request | Description *VaultsApi* | [**activateAssetForVaultAccount**](docs/VaultsApi.md#activateAssetForVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/activate | Activate a wallet in a vault account *VaultsApi* | [**createLegacyAddress**](docs/VaultsApi.md#createLegacyAddress) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/create_legacy | Convert a segwit address to legacy format *VaultsApi* | [**createMultipleAccounts**](docs/VaultsApi.md#createMultipleAccounts) | **POST** /vault/accounts/bulk | Bulk creation of new vault accounts +*VaultsApi* | [**createMultipleDepositAddresses**](docs/VaultsApi.md#createMultipleDepositAddresses) | **POST** /vault/accounts/addresses/bulk | Bulk creation of new deposit addresses *VaultsApi* | [**createVaultAccount**](docs/VaultsApi.md#createVaultAccount) | **POST** /vault/accounts | Create a new vault account *VaultsApi* | [**createVaultAccountAsset**](docs/VaultsApi.md#createVaultAccountAsset) | **POST** /vault/accounts/{vaultAccountId}/{assetId} | Create a new wallet *VaultsApi* | [**createVaultAccountAssetAddress**](docs/VaultsApi.md#createVaultAccountAssetAddress) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/addresses | Create new asset deposit address *VaultsApi* | [**getAssetWallets**](docs/VaultsApi.md#getAssetWallets) | **GET** /vault/asset_wallets | List asset wallets (Paginated) +*VaultsApi* | [**getCreateMultipleDepositAddressesJobStatus**](docs/VaultsApi.md#getCreateMultipleDepositAddressesJobStatus) | **GET** /vault/accounts/addresses/bulk/{jobId} | Get job status of bulk creation of new deposit addresses *VaultsApi* | [**getMaxSpendableAmount**](docs/VaultsApi.md#getMaxSpendableAmount) | **GET** /vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount | Get the maximum spendable amount in a single transaction. *VaultsApi* | [**getPagedVaultAccounts**](docs/VaultsApi.md#getPagedVaultAccounts) | **GET** /vault/accounts_paged | List vault accounts (Paginated) *VaultsApi* | [**getPublicKeyInfo**](docs/VaultsApi.md#getPublicKeyInfo) | **GET** /vault/public_key_info | Get the public key information @@ -398,6 +403,7 @@ Class | Method | HTTP request | Description *WebhooksV2BetaApi* | [**getWebhook**](docs/WebhooksV2BetaApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id *WebhooksV2BetaApi* | [**getWebhooks**](docs/WebhooksV2BetaApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks *WebhooksV2BetaApi* | [**resendNotificationById**](docs/WebhooksV2BetaApi.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id +*WebhooksV2BetaApi* | [**resendNotificationsByResourceId**](docs/WebhooksV2BetaApi.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id *WebhooksV2BetaApi* | [**updateWebhook**](docs/WebhooksV2BetaApi.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook *WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status @@ -424,6 +430,7 @@ Class | Method | HTTP request | Description - [AddExchangeAccountRequest](docs/AddExchangeAccountRequest.md) - [AddExchangeAccountResponse](docs/AddExchangeAccountResponse.md) - [AdditionalInfo](docs/AdditionalInfo.md) + - [AddressNotAvailableError](docs/AddressNotAvailableError.md) - [AmlRegistrationResult](docs/AmlRegistrationResult.md) - [AmlRegistrationResultFullPayload](docs/AmlRegistrationResultFullPayload.md) - [AmlScreeningResult](docs/AmlScreeningResult.md) @@ -533,7 +540,11 @@ Class | Method | HTTP request | Description - [CreateDisbursementConfigOperationRequest](docs/CreateDisbursementConfigOperationRequest.md) - [CreateInternalTransferRequest](docs/CreateInternalTransferRequest.md) - [CreateInternalWalletAssetRequest](docs/CreateInternalWalletAssetRequest.md) + - [CreateMultichainTokenRequest](docs/CreateMultichainTokenRequest.md) + - [CreateMultichainTokenRequestCreateParams](docs/CreateMultichainTokenRequestCreateParams.md) - [CreateMultipleAccountsRequest](docs/CreateMultipleAccountsRequest.md) + - [CreateMultipleDepositAddressesJobStatus](docs/CreateMultipleDepositAddressesJobStatus.md) + - [CreateMultipleDepositAddressesRequest](docs/CreateMultipleDepositAddressesRequest.md) - [CreateNcwConnectionRequest](docs/CreateNcwConnectionRequest.md) - [CreateNetworkIdRequest](docs/CreateNetworkIdRequest.md) - [CreatePayoutRequest](docs/CreatePayoutRequest.md) @@ -558,6 +569,8 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) + - [DeployableAddressResponse](docs/DeployableAddressResponse.md) + - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) - [DeployedContractResponseDto](docs/DeployedContractResponseDto.md) - [DeployedContractsPaginatedResponse](docs/DeployedContractsPaginatedResponse.md) - [DepositFundsFromLinkedDDAResponse](docs/DepositFundsFromLinkedDDAResponse.md) @@ -621,6 +634,7 @@ Class | Method | HTTP request | Description - [GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) - [GetConsoleUsersResponse](docs/GetConsoleUsersResponse.md) + - [GetDeployableAddressRequest](docs/GetDeployableAddressRequest.md) - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) @@ -637,6 +651,7 @@ Class | Method | HTTP request | Description - [HttpContractDoesNotExistError](docs/HttpContractDoesNotExistError.md) - [InstructionAmount](docs/InstructionAmount.md) - [InternalTransferResponse](docs/InternalTransferResponse.md) + - [InvalidParamaterValueError](docs/InvalidParamaterValueError.md) - [Job](docs/Job.md) - [JobCreated](docs/JobCreated.md) - [LeanAbiFunction](docs/LeanAbiFunction.md) @@ -661,6 +676,7 @@ Class | Method | HTTP request | Description - [NetworkIdResponse](docs/NetworkIdResponse.md) - [NetworkIdRoutingPolicyValue](docs/NetworkIdRoutingPolicyValue.md) - [NetworkRecord](docs/NetworkRecord.md) + - [NewAddress](docs/NewAddress.md) - [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md) - [NotFoundException](docs/NotFoundException.md) - [Notification](docs/Notification.md) @@ -726,12 +742,14 @@ Class | Method | HTTP request | Description - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) + - [ReissueMultichainTokenRequest](docs/ReissueMultichainTokenRequest.md) - [RelatedRequest](docs/RelatedRequest.md) - [RelatedTransaction](docs/RelatedTransaction.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) - [RescanTransaction](docs/RescanTransaction.md) + - [ResendNotificationsByResourceIdRequest](docs/ResendNotificationsByResourceIdRequest.md) - [ResendTransactionWebhooksRequest](docs/ResendTransactionWebhooksRequest.md) - [ResendWebhooksByTransactionIdResponse](docs/ResendWebhooksByTransactionIdResponse.md) - [ResendWebhooksResponse](docs/ResendWebhooksResponse.md) @@ -823,6 +841,7 @@ Class | Method | HTTP request | Description - [TokenLinkDto](docs/TokenLinkDto.md) - [TokenLinkDtoTokenMetadata](docs/TokenLinkDtoTokenMetadata.md) - [TokenLinkExistsHttpError](docs/TokenLinkExistsHttpError.md) + - [TokenLinkNotMultichainCompatibleHttpError](docs/TokenLinkNotMultichainCompatibleHttpError.md) - [TokenLinkRequestDto](docs/TokenLinkRequestDto.md) - [TokenOwnershipResponse](docs/TokenOwnershipResponse.md) - [TokenOwnershipSpamUpdatePayload](docs/TokenOwnershipSpamUpdatePayload.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 6d08c61b..1da9ad52 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -148,6 +148,137 @@ paths: \ idempotency_key);" x-content-type: application/json x-accepts: application/json + /vault/accounts/addresses/bulk: + post: + description: | + Create multiple deposit address by running an async job.
+ **Note**: + - We limit accounts to 10k per operation. + operationId: createMultipleDepositAddresses + parameters: + - 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/CreateMultipleDepositAddressesRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/JobCreated' + description: A JobCreated object + 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: Bulk creation of new deposit addresses + tags: + - Vaults + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.vaults.createMultipleDepositAddresses(vaultsApiCreateMultipleDepositAddressesRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().createMultipleDepositAddresses(createMultipleDepositAddressesRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.vaults.create_multiple_deposit_addresses(create_multiple_deposit_addresses_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.vaults.createMultipleDepositAddresses(vaultsApiCreateMultipleDepositAddressesRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.vaults().createMultipleDepositAddresses(createMultipleDepositAddressesRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.vaults.create_multiple_deposit_addresses(create_multiple_deposit_addresses_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /vault/accounts/addresses/bulk/{jobId}: + get: + description: Returns the status of bulk creation of new deposit addresses job + and the result or error + operationId: getCreateMultipleDepositAddressesJobStatus + parameters: + - description: The ID of the job to create addresses + example: 019681b4-107d-7243-942d-4c3c30e36fae + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateMultipleDepositAddressesJobStatus' + description: A Job with status + 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 status of bulk creation of new deposit addresses + tags: + - Vaults + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getCreateMultipleDepositAddressesJobStatus(vaultsApiGetCreateMultipleDepositAddressesJobStatusRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.vaults().getCreateMultipleDepositAddressesJobStatus(jobId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.vaults.get_create_multiple_deposit_addresses_job_status(job_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.vaults.getCreateMultipleDepositAddressesJobStatus(vaultsApiGetCreateMultipleDepositAddressesJobStatusRequest);" + - lang: Java + source: CompletableFuture> + response = fireblocks.vaults().getCreateMultipleDepositAddressesJobStatus(jobId); + - lang: Python + source: response = fireblocks.vaults.get_create_multiple_deposit_addresses_job_status(job_id); + x-accepts: application/json /vault/accounts/bulk: post: description: | @@ -7357,6 +7488,20 @@ paths: schema: type: boolean style: form + - description: A list of asset IDs (max 100) + example: + - 3ed32525-70df-45c8-bae3-e69ab56dc095 + - 3a3b5f06-61e7-44f0-9962-4425b55795ff + - SHANI5_B75VRLGX_MUPA + explode: true + in: query + name: ids + required: false + schema: + items: + type: string + type: array + style: form - description: Next page cursor to fetch example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== explode: true @@ -7428,11 +7573,12 @@ paths: name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId,\ - \ assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey);" + \ assetClass, symbol, scope, deprecated, ids, pageCursor, pageSize, idempotencyKey);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.blockchains_&_assets.list_assets(blockchain_id,\ - \ asset_class, symbol, scope, deprecated, page_cursor, page_size, idempotency_key);" + \ asset_class, symbol, scope, deprecated, ids, page_cursor, page_size,\ + \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -7440,10 +7586,10 @@ paths: \ fireblocks.blockchainsAssets.listAssets(blockchainsAssetsApiListAssetsRequest);" - lang: Java source: "CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId,\ - \ assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey);" + \ assetClass, symbol, scope, deprecated, ids, pageCursor, pageSize, idempotencyKey);" - lang: Python source: "response = fireblocks.blockchains_&_assets.list_assets(blockchain_id,\ - \ asset_class, symbol, scope, deprecated, page_cursor, page_size, idempotency_key);" + \ asset_class, symbol, scope, deprecated, ids, page_cursor, page_size, idempotency_key);" x-accepts: application/json post: description: | @@ -7796,6 +7942,20 @@ paths: schema: type: boolean style: form + - description: A list of blockchain IDs (max 100) + example: + - 3ed32525-70df-45c8-bae3-e69ab56dc095 + - 3a3b5f06-61e7-44f0-9962-4425b55795ff + - MANTRA + explode: true + in: query + name: ids + required: false + schema: + items: + type: string + type: array + style: form - description: Page cursor to fetch example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== explode: true @@ -7857,11 +8017,11 @@ paths: - language: java code: "CompletableFuture> response\ \ = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated,\ - \ test, pageCursor, pageSize);" + \ test, ids, pageCursor, pageSize);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.blockchains_&_assets.list_blockchains(protocol,\ - \ deprecated, test, page_cursor, page_size);" + \ deprecated, test, ids, page_cursor, page_size);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -7870,10 +8030,10 @@ paths: - lang: Java source: "CompletableFuture> response\ \ = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated,\ - \ test, pageCursor, pageSize);" + \ test, ids, pageCursor, pageSize);" - lang: Python source: "response = fireblocks.blockchains_&_assets.list_blockchains(protocol,\ - \ deprecated, test, page_cursor, page_size);" + \ deprecated, test, ids, page_cursor, page_size);" x-accepts: application/json /blockchains/{id}: get: @@ -11646,6 +11806,81 @@ paths: source: "response = fireblocks.webhooks_v2_beta.resend_notification_by_id(webhook_id,\ \ notification_id, idempotency_key);" x-accepts: application/json + /webhooks/{webhookId}/notifications/resend_by_resource: + post: + description: | + Resend notifications by resource Id + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: resendNotificationsByResourceId + parameters: + - 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 + - description: The ID of the webhook + explode: false + in: path + name: webhookId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResendNotificationsByResourceIdRequest' + required: true + responses: + "202": + description: Resend notifications by resource request was accepted and is + being processed + 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: Resend notifications by resource Id + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2Beta.resendNotificationsByResourceId(webhooksV2BetaApiResendNotificationsByResourceIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest,\ + \ webhookId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2_beta.resend_notifications_by_resource_id(resend_notifications_by_resource_id_request,\ + \ webhook_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2Beta.resendNotificationsByResourceId(webhooksV2BetaApiResendNotificationsByResourceIdRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest,\ + \ webhookId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.webhooks_v2_beta.resend_notifications_by_resource_id(resend_notifications_by_resource_id_request,\ + \ webhook_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /tokenization/templates: get: description: Return minimal representation of all the contract templates available @@ -12940,6 +13175,306 @@ paths: - lang: Python source: response = fireblocks.tokenization.get_linked_token(id); x-accepts: application/json + /tokenization/multichain/deterministic_address: + post: + description: Get a deterministic address for contract deployment. The address + is derived from the contract's bytecode and provided salt. This endpoint + is used to get the address of a contract that will be deployed in the future. + operationId: getDeployableAddress + parameters: + - 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/GetDeployableAddressRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployableAddressResponse' + description: Deterministic address for contract deployment + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidParamaterValueError' + description: Invalid parameters or template has no bytecode + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AddressNotAvailableError' + description: Address is already taken + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get deterministic address for contract deployment + tags: + - Tokenization + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + chainDescriptor: "ETH", + templateId: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d", + initParams: [ + { name: "name", type: "string", value: "TokenName" }, + { name: "symbol", type: "string", value: "TokenSymbol" }, + { + name: "customConfigProps", + type: "tuple", + components: [ + { name: "_isMintable", type: "bool" } + ], + value: [{ _isMintable: false }] + } + ], + salt: "123456789" + }; const address = await fireblocks.getDeterministicAddress(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.getDeployableAddress(tokenizationApiGetDeployableAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().getDeployableAddress(getDeployableAddressRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.get_deployable_address(get_deployable_address_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.getDeployableAddress(tokenizationApiGetDeployableAddressRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().getDeployableAddress(getDeployableAddressRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.get_deployable_address(get_deployable_address_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/tokens: + post: + description: Facilitates the creation of a new token on one or more blockchains. + operationId: issueTokenMultiChain + parameters: + - 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/CreateMultichainTokenRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/IssueTokenMultichainResponse' + description: Tokens were created successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidParamaterValueError' + description: Invalid input. + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AddressNotAvailableError' + description: Address is already taken. + summary: Issue a token on one or more blockchains + tags: + - Tokenization + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + vaultAccountId: "0", + createParams: { + contractId: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d", + deployFunctionParams: [ + { name: "name", type: "string", value: "TokenName" }, + { name: "symbol", type: "string", value: "TokenSymbol" }, + { + name: "customConfigProps", + type: "tuple", + components: [ + { name: "_isMintable", type: "bool" } + ], + value: [{ _isMintable: false }] + }, + ], + }, + salt: "123456789", + chains: ["ETH", "POLYGON"] + }; const token = await fireblocks.issueTokenMultiChain(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.issueTokenMultiChain(tokenizationApiIssueTokenMultiChainRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response = fireblocks.tokenization().issueTokenMultiChain(createMultichainTokenRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.issue_token_multi_chain(create_multichain_token_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.issueTokenMultiChain(tokenizationApiIssueTokenMultiChainRequest);" + - lang: Java + source: "CompletableFuture>> response = fireblocks.tokenization().issueTokenMultiChain(createMultichainTokenRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.issue_token_multi_chain(create_multichain_token_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/token/{tokenLinkId}: + post: + description: Reissue a multichain token. This endpoint allows you to reissue + a token on one or more blockchains. The token must be initially issued using + the issueTokenMultiChain endpoint. + operationId: reIssueTokenMultiChain + parameters: + - 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 + - description: The ID of the token link + explode: false + in: path + name: tokenLinkId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReissueMultichainTokenRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/IssueTokenMultichainResponse' + description: Successfully reissued multichain token + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkNotMultichainCompatibleHttpError' + description: Invalid input + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployedContractNotFoundError' + description: Deployed contract not found + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AddressNotAvailableError' + description: Address is already taken + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Reissue a multichain token + tags: + - Tokenization + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + vaultAccountId: "0", + chains: "ETH", + salt: "123456789", + chains: ["ETH", "POLYGON"] + }; const token = await fireblocks.reIssueTokenMultiChain(tokenLinkId, payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.reIssueTokenMultiChain(tokenizationApiReIssueTokenMultiChainRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequest,\ + \ tokenLinkId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.re_issue_token_multi_chain(reissue_multichain_token_request,\ + \ token_link_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.reIssueTokenMultiChain(tokenizationApiReIssueTokenMultiChainRequest);" + - lang: Java + source: "CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequest,\ + \ tokenLinkId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.re_issue_token_multi_chain(reissue_multichain_token_request,\ + \ token_link_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /tokenization/collections: get: description: Get collections (paginated) @@ -20822,7 +21357,7 @@ components: schemas: ErrorSchema: example: - code: 6.027456183070403 + code: 0.8008281904610115 message: message properties: message: @@ -20840,7 +21375,7 @@ components: type: object VaultAsset: example: - totalStakedCPU: 0.8008281904610115 + totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -20889,7 +21424,7 @@ components: type: string totalStakedCPU: description: Deprecated - type: number + type: string totalStakedNetwork: description: Deprecated type: string @@ -20915,7 +21450,7 @@ components: VaultAccount: example: assets: - - totalStakedCPU: 0.8008281904610115 + - totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -20933,7 +21468,7 @@ components: selfStakedNetwork: selfStakedNetwork pendingRefundCPU: pendingRefundCPU id: id - - totalStakedCPU: 0.8008281904610115 + - totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -21017,6 +21552,106 @@ components: \ be created without any keys." type: boolean type: object + CreateMultipleDepositAddressesRequest: + example: + assetId: ADA + vaultAccountToCopyDescFrom: 0 + vaultAccountToCopyDescFromIndex: 1000 + count: 10 + vaultAccountId: 5 + descriptions: + - First address + - Second address + - df4c0987-30da-4976-8dcf-bc2dd41ae331 + properties: + vaultAccountId: + description: Existing Vault account ID to add deposit addresses to + example: 5 + type: integer + assetId: + description: asset ID + example: ADA + type: string + count: + description: Count of deposit addresses to issue + example: 10 + type: integer + descriptions: + description: Desctiptions of the newly created addresses + example: + - First address + - Second address + - df4c0987-30da-4976-8dcf-bc2dd41ae331 + items: + type: string + type: array + vaultAccountToCopyDescFrom: + description: Existing Vault Account ID to copy deposit addresses descriptions + from in case no descriptions were provided + example: 0 + type: integer + vaultAccountToCopyDescFromIndex: + description: Existing length within the vault account to copy deposit addresses + descriptions from + example: 1000 + type: integer + required: + - assetId + - count + - vaultAccountId + type: object + JobCreated: + example: + jobId: jobId + properties: + jobId: + type: string + type: object + NewAddress: + properties: + address: + description: The address string. + example: addr_test1qp07k5kdwdfx4rpfqud8ry65acxgtgfgrxw0t35cwvl4uasjneqjdc868eqlex5p2f0nyekyyk4ze5xuanvj50ysrj3qqxqhsn + type: string + index: + description: The index of the address in the list. + example: 0 + type: integer + description: + description: A description of the address. + example: Address one + type: string + required: + - address + - description + - index + type: object + CreateMultipleDepositAddressesJobStatus: + example: + addresses: + - address: addr_test1qp07k5kdwdfx4rpfqud8ry65acxgtgfgrxw0t35cwvl4uasjneqjdc868eqlex5p2f0nyekyyk4ze5xuanvj50ysrj3qqxqhsn + index: 0 + descriptio: Address one + errorMessage: Asset not supported + status: Success + properties: + status: + example: Success + type: string + addresses: + example: + - address: addr_test1qp07k5kdwdfx4rpfqud8ry65acxgtgfgrxw0t35cwvl4uasjneqjdc868eqlex5p2f0nyekyyk4ze5xuanvj50ysrj3qqxqhsn + index: 0 + descriptio: Address one + items: + $ref: '#/components/schemas/NewAddress' + type: array + errorMessage: + example: Asset not supported + type: string + required: + - status + type: object CreateMultipleAccountsRequest: example: count: 0 @@ -21033,13 +21668,6 @@ components: type: string type: array type: object - JobCreated: - example: - jobId: jobId - properties: - jobId: - type: string - type: object VaultAccountsPagedResponse: example: previousUrl: previousUrl @@ -21048,7 +21676,7 @@ components: after: after accounts: - assets: - - totalStakedCPU: 0.8008281904610115 + - totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -21066,7 +21694,7 @@ components: selfStakedNetwork: selfStakedNetwork pendingRefundCPU: pendingRefundCPU id: id - - totalStakedCPU: 0.8008281904610115 + - totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -21090,7 +21718,7 @@ components: customerRefId: customerRefId autoFuel: true - assets: - - totalStakedCPU: 0.8008281904610115 + - totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -21108,7 +21736,7 @@ components: selfStakedNetwork: selfStakedNetwork pendingRefundCPU: pendingRefundCPU id: id - - totalStakedCPU: 0.8008281904610115 + - totalStakedCPU: totalStakedCPU blockHash: blockHash pendingRefundNetwork: pendingRefundNetwork lockedAmount: lockedAmount @@ -23117,7 +23745,7 @@ components: standards: - ERC20 symbol: USDT - address: 1.2488751460129641E+48 + address: 0xdAC17F958D2ee523a2206206994597C13D831ec7 decimals: 6 name: Tether USD properties: @@ -23131,7 +23759,7 @@ components: type: string address: description: The asset address - example: 1.2488751460129641E+48 + example: 0xdAC17F958D2ee523a2206206994597C13D831ec7 type: string decimals: description: Number of decimals @@ -23238,7 +23866,7 @@ components: standards: - ERC20 symbol: USDT - address: 1.2488751460129641E+48 + address: 0xdAC17F958D2ee523a2206206994597C13D831ec7 decimals: 6 name: Tether USD properties: @@ -23304,7 +23932,7 @@ components: standards: - ERC20 symbol: USDT - address: 1.2488751460129641E+48 + address: 0xdAC17F958D2ee523a2206206994597C13D831ec7 decimals: 6 name: Tether USD - displaySymbol: USDT @@ -23331,7 +23959,7 @@ components: standards: - ERC20 symbol: USDT - address: 1.2488751460129641E+48 + address: 0xdAC17F958D2ee523a2206206994597C13D831ec7 decimals: 6 name: Tether USD properties: @@ -23917,6 +24545,7 @@ components: * `SUPPLY_TO_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `REDEEM_FROM_COMPOUND` - Deprecated since April 1st, 2023. Older transactions may have this as their operation, in case users in the workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * `PROGRAM_CALL` - In Solana refers to invoking on-chain programs (smart contracts) to execute transactions and interact with the blockchain. + * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). enum: - TRANSFER - BURN @@ -23931,6 +24560,7 @@ components: - REDEEM_FROM_COMPOUND - SUPPLY_TO_COMPOUND - PROGRAM_CALL + - APPROVE type: string TransferPeerPathType: enum: @@ -24950,6 +25580,7 @@ components: * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) * `APPROVE` - Enables the approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). + * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain transaction to create an asset wallet and enable the deposit address. This transaction is automatically created when adding assets on these blockchains at a vault account. enum: - TRANSFER - BURN @@ -24959,6 +25590,7 @@ components: - RAW - TYPED_MESSAGE - APPROVE + - ENABLE_ASSET type: string TransferPeerPathSubType: enum: @@ -24999,6 +25631,7 @@ components: description: The source of the transaction. example: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -25015,6 +25648,10 @@ components: walletId: format: uuid type: string + isCollateral: + description: indicate if the source is collateral account + example: true + type: boolean required: - type type: object @@ -25037,6 +25674,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -25055,6 +25693,10 @@ components: type: string oneTimeAddress: $ref: '#/components/schemas/OneTimeAddress' + isCollateral: + description: indicate if the destination is collateral account + example: true + type: boolean required: - type type: object @@ -25066,6 +25708,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -27539,6 +28182,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -27546,6 +28190,7 @@ components: extraParameters: "{}" source: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -27568,6 +28213,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -27578,6 +28224,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -30668,6 +31315,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -30675,6 +31323,7 @@ components: extraParameters: "{}" source: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -30697,6 +31346,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -30707,6 +31357,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -31881,6 +32532,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -31888,6 +32540,7 @@ components: extraParameters: "{}" source: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -31910,6 +32563,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -31920,6 +32574,7 @@ components: address: address tag: tag walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + isCollateral: true name: name subType: null id: id @@ -33423,6 +34078,7 @@ components: - COMPLETED - FAILED - IN_PROGRESS + - ON_HOLD example: COMPLETED type: string NotificationAttempt: @@ -33623,6 +34279,33 @@ components: - status - updatedAt type: object + ResendNotificationsByResourceIdRequest: + example: + resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f + excludeStatuses: + - IN_PROGRESS + - FAILED + properties: + resourceId: + description: The resource id to resend notifications for + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + excludeStatuses: + description: | + (optional) List of notification statuses to exclude from the resend operation + - Empty array means all statuses will be included + - If you want to exclude some statuses, you can use the following example: [ IN_PROGRESS, FAILED ] + - Default if missing, means all statuses other than "COMPLETED" will be included + example: + - IN_PROGRESS + - FAILED + items: + $ref: '#/components/schemas/NotificationStatus' + type: array + required: + - resourceId + type: object AuditorData: properties: name: @@ -35205,6 +35888,291 @@ components: example: Not Found type: string type: object + GetDeployableAddressRequest: + description: Request body for calculating deterministic address + example: + chainDescriptor: ETH + initParams: + - internalType: string + name: name + type: string + value: name + - internalType: string + name: symbol + type: string + value: symbol + - components: + - internalType: bool + name: _isMintable + type: bool + internalType: struct MyStruct + value: + - internalType: bool + name: _isMintable + type: bool + value: false + salt: "123456789" + templateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + properties: + chainDescriptor: + description: The base asset identifier of the blockchain (legacyId) to calculate + deterministic address + example: ETH + type: string + templateId: + description: The template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + format: uuid + type: string + initParams: + description: The deploy function parameters and values of the contract template + example: + - internalType: string + name: name + type: string + value: name + - internalType: string + name: symbol + type: string + value: symbol + - components: + - internalType: bool + name: _isMintable + type: bool + internalType: struct MyStruct + value: + - internalType: bool + name: _isMintable + type: bool + value: false + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + salt: + description: "The salt to calculate the deterministic address. Must be a\ + \ number between 0 and 2^256 -1, for it to fit in the bytes32 parameter" + example: "123456789" + type: string + required: + - chainDescriptor + - initParams + - salt + - templateId + type: object + DeployableAddressResponse: + description: Response DTO containing a deployable address + example: + address: 0x1234567890abcdef1234567890abcdef12345678 + properties: + address: + description: The deployable address + type: string + required: + - address + type: object + InvalidParamaterValueError: + example: + code: 400 + message: Invalid initParams. + properties: + message: + description: Bad request error message + example: Invalid initParams. + type: string + code: + description: Error code + example: 400 + type: number + required: + - code + - message + type: object + AddressNotAvailableError: + example: + code: 409 + message: Address is already taken + properties: + message: + description: Conflict error message + example: Address is already taken + type: string + code: + description: Error code + example: 409 + type: number + required: + - code + - message + type: object + CreateMultichainTokenRequest: + example: + salt: "123456789" + chains: + - ETH + - POLYGON + displayName: displayName + useGasless: false + fee: "2000" + vaultAccountId: "0" + feeLevel: MEDIUM + createParams: + deployFunctionParams: + - internalType: string + name: name + type: string + value: name + - internalType: string + name: symbol + type: string + value: symbol + - components: + - internalType: bool + name: _isMintable + type: bool + internalType: struct MyStruct + name: customConfigProps + type: tuple + value: + - internalType: bool + name: _isMintable + type: bool + value: false + contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + properties: + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token + example: "0" + type: string + createParams: + $ref: '#/components/schemas/CreateMultichainTokenRequest_createParams' + salt: + description: "The salt to calculate the deterministic address. Must be a\ + \ number between 0 and 2^256 -1, for it to fit in the bytes32 parameter." + example: "123456789" + type: string + chains: + description: The base asset identifiers of the blockchains (legacyId) to + calculate deterministic addresses + example: + - ETH + - POLYGON + items: + type: string + type: array + displayName: + type: string + useGasless: + description: "Indicates whether the token should be created in a gasless\ + \ manner, utilizing the ERC-2771 standard. When set to true, the transaction\ + \ will be relayed by a designated relayer. The workspace must be configured\ + \ to use Fireblocks gasless relay." + example: false + type: boolean + fee: + description: Max fee amount for the write function transaction. interchangeable + with the 'feeLevel' field + example: "2000" + type: string + feeLevel: + description: Fee level for the write function transaction. interchangeable + with the 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + required: + - chains + - createParams + - vaultAccountId + type: object + IssueTokenMultichainResponse: + description: Response schema for issuing tokens across multiple chains + items: + $ref: '#/components/schemas/TokenLinkDto' + type: array + ReissueMultichainTokenRequest: + example: + chains: + - ETH + - POLYGON + useGasless: true + fee: "2000" + vaultAccountId: "0" + feeLevel: MEDIUM + properties: + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token + example: "0" + type: string + chains: + description: The base asset identifiers of the blockchains you want to deploy + to + example: + - ETH + - POLYGON + items: + type: string + type: array + useGasless: + description: Whether to use gasless deployment or not + example: true + type: boolean + fee: + description: Max fee amount for the deploy request. Interchangeable with + the 'feeLevel' field + example: "2000" + type: string + feeLevel: + description: Fee level for the deploy request. Interchangeable with the + 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + required: + - chains + - vaultAccountId + type: object + TokenLinkNotMultichainCompatibleHttpError: + example: + code: 400 + message: Token link is not multichain compatible. + properties: + message: + description: Bad request error message + example: Token link is not multichain compatible. + type: string + code: + description: Error code + example: 400 + type: number + required: + - code + - message + type: object + DeployedContractNotFoundError: + example: + code: 404 + message: Deployed contract not found + properties: + message: + description: Not Found error message + example: Deployed contract not found + type: string + code: + description: Error code + example: 404 + type: number + required: + - code + - message + type: object CollectionType: description: The type of collection enum: @@ -45497,6 +46465,9 @@ components: oneOf: - $ref: '#/components/schemas/EVMTokenCreateParamsDto' - $ref: '#/components/schemas/StellarRippleCreateParamsDto' + CreateMultichainTokenRequest_createParams: + oneOf: + - $ref: '#/components/schemas/EVMTokenCreateParamsDto' SetOtaStatusResponse_oneOf: example: message: No change needed. The current status is false diff --git a/build.gradle b/build.gradle index 4858177f..358eefb7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '10.0.2' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AddressNotAvailableError.md b/docs/AddressNotAvailableError.md new file mode 100644 index 00000000..d1bcb510 --- /dev/null +++ b/docs/AddressNotAvailableError.md @@ -0,0 +1,14 @@ + + +# AddressNotAvailableError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Conflict error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index 9092d820..8a9ff557 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -267,7 +267,7 @@ No authorization required ## listAssets -> CompletableFuture> listAssets listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey) +> CompletableFuture> listAssets listAssets(blockchainId, assetClass, symbol, scope, deprecated, ids, pageCursor, pageSize, idempotencyKey) List assets @@ -301,11 +301,12 @@ public class Example { String symbol = "ETH"; // String | Assets onchain symbol AssetScope scope = AssetScope.fromValue("GLOBAL"); // AssetScope | Scope of the assets Boolean deprecated = false; // Boolean | Are assets deprecated + List ids = Arrays.asList(); // List | A list of asset IDs (max 100) String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Next page cursor to fetch BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page String idempotencyKey = "idempotencyKey_example"; // String | 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. try { - CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey); + CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId, assetClass, symbol, scope, deprecated, ids, pageCursor, pageSize, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -337,6 +338,7 @@ public class Example { | **symbol** | **String**| Assets onchain symbol | [optional] | | **scope** | [**AssetScope**](.md)| Scope of the assets | [optional] [enum: GLOBAL, LOCAL] | | **deprecated** | **Boolean**| Are assets deprecated | [optional] | +| **ids** | [**List<String>**](String.md)| A list of asset IDs (max 100) | [optional] | | **pageCursor** | **String**| Next page cursor to fetch | [optional] | | **pageSize** | **BigDecimal**| Items per page | [optional] [default to 500] | | **idempotencyKey** | **String**| 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. | [optional] | @@ -365,7 +367,7 @@ No authorization required ## listBlockchains -> CompletableFuture> listBlockchains listBlockchains(protocol, deprecated, test, pageCursor, pageSize) +> CompletableFuture> listBlockchains listBlockchains(protocol, deprecated, test, ids, pageCursor, pageSize) List blockchains @@ -397,10 +399,11 @@ public class Example { String protocol = "SOL"; // String | Blockchain protocol Boolean deprecated = false; // Boolean | Is blockchain deprecated Boolean test = false; // Boolean | Is test blockchain + List ids = Arrays.asList(); // List | A list of blockchain IDs (max 100) String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to fetch BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page (max 500) try { - CompletableFuture> response = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated, test, pageCursor, pageSize); + CompletableFuture> response = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated, test, ids, 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()); @@ -430,6 +433,7 @@ public class Example { | **protocol** | **String**| Blockchain protocol | [optional] | | **deprecated** | **Boolean**| Is blockchain deprecated | [optional] | | **test** | **Boolean**| Is test blockchain | [optional] | +| **ids** | [**List<String>**](String.md)| A list of blockchain IDs (max 100) | [optional] | | **pageCursor** | **String**| Page cursor to fetch | [optional] | | **pageSize** | **BigDecimal**| Items per page (max 500) | [optional] [default to 500] | diff --git a/docs/CreateMultichainTokenRequest.md b/docs/CreateMultichainTokenRequest.md new file mode 100644 index 00000000..acc7afc9 --- /dev/null +++ b/docs/CreateMultichainTokenRequest.md @@ -0,0 +1,30 @@ + + +# CreateMultichainTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | +|**createParams** | [**CreateMultichainTokenRequestCreateParams**](CreateMultichainTokenRequestCreateParams.md) | | | +|**salt** | **String** | The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for it to fit in the bytes32 parameter. | [optional] | +|**chains** | **List<String>** | The base asset identifiers of the blockchains (legacyId) to calculate deterministic addresses | | +|**displayName** | **String** | | [optional] | +|**useGasless** | **Boolean** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] | +|**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/CreateMultichainTokenRequestCreateParams.md b/docs/CreateMultichainTokenRequestCreateParams.md new file mode 100644 index 00000000..b63c82d6 --- /dev/null +++ b/docs/CreateMultichainTokenRequestCreateParams.md @@ -0,0 +1,28 @@ + + +# CreateMultichainTokenRequestCreateParams + +## oneOf schemas +* [EVMTokenCreateParamsDto](EVMTokenCreateParamsDto.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateMultichainTokenRequestCreateParams; +import com.fireblocks.sdk.model.EVMTokenCreateParamsDto; + +public class Example { + public static void main(String[] args) { + CreateMultichainTokenRequestCreateParams exampleCreateMultichainTokenRequestCreateParams = new CreateMultichainTokenRequestCreateParams(); + + // create a new EVMTokenCreateParamsDto + EVMTokenCreateParamsDto exampleEVMTokenCreateParamsDto = new EVMTokenCreateParamsDto(); + // set CreateMultichainTokenRequestCreateParams to EVMTokenCreateParamsDto + exampleCreateMultichainTokenRequestCreateParams.setActualInstance(exampleEVMTokenCreateParamsDto); + // to get back the EVMTokenCreateParamsDto set earlier + EVMTokenCreateParamsDto testEVMTokenCreateParamsDto = (EVMTokenCreateParamsDto) exampleCreateMultichainTokenRequestCreateParams.getActualInstance(); + } +} +``` + + diff --git a/docs/CreateMultipleDepositAddressesJobStatus.md b/docs/CreateMultipleDepositAddressesJobStatus.md new file mode 100644 index 00000000..c0e58fc9 --- /dev/null +++ b/docs/CreateMultipleDepositAddressesJobStatus.md @@ -0,0 +1,15 @@ + + +# CreateMultipleDepositAddressesJobStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | | +|**addresses** | [**List<NewAddress>**](NewAddress.md) | | [optional] | +|**errorMessage** | **String** | | [optional] | + + + diff --git a/docs/CreateMultipleDepositAddressesRequest.md b/docs/CreateMultipleDepositAddressesRequest.md new file mode 100644 index 00000000..e3855733 --- /dev/null +++ b/docs/CreateMultipleDepositAddressesRequest.md @@ -0,0 +1,18 @@ + + +# CreateMultipleDepositAddressesRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **Integer** | Existing Vault account ID to add deposit addresses to | | +|**assetId** | **String** | asset ID | | +|**count** | **Integer** | Count of deposit addresses to issue | | +|**descriptions** | **List<String>** | Desctiptions of the newly created addresses | [optional] | +|**vaultAccountToCopyDescFrom** | **Integer** | Existing Vault Account ID to copy deposit addresses descriptions from in case no descriptions were provided | [optional] | +|**vaultAccountToCopyDescFromIndex** | **Integer** | Existing length within the vault account to copy deposit addresses descriptions from | [optional] | + + + diff --git a/docs/DeployableAddressResponse.md b/docs/DeployableAddressResponse.md new file mode 100644 index 00000000..0606c12b --- /dev/null +++ b/docs/DeployableAddressResponse.md @@ -0,0 +1,14 @@ + + +# DeployableAddressResponse + +Response DTO containing a deployable address + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**address** | **String** | The deployable address | | + + + diff --git a/docs/DeployedContractNotFoundError.md b/docs/DeployedContractNotFoundError.md new file mode 100644 index 00000000..6eb85f11 --- /dev/null +++ b/docs/DeployedContractNotFoundError.md @@ -0,0 +1,14 @@ + + +# DeployedContractNotFoundError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Not Found error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/DestinationTransferPeerPath.md b/docs/DestinationTransferPeerPath.md index 82d69f38..276ab8e7 100644 --- a/docs/DestinationTransferPeerPath.md +++ b/docs/DestinationTransferPeerPath.md @@ -14,6 +14,7 @@ The destination of the transaction. |**name** | **String** | | [optional] | |**walletId** | **UUID** | | [optional] | |**oneTimeAddress** | [**OneTimeAddress**](OneTimeAddress.md) | | [optional] | +|**isCollateral** | **Boolean** | indicate if the destination is collateral account | [optional] | diff --git a/docs/GetDeployableAddressRequest.md b/docs/GetDeployableAddressRequest.md new file mode 100644 index 00000000..92d1e661 --- /dev/null +++ b/docs/GetDeployableAddressRequest.md @@ -0,0 +1,17 @@ + + +# GetDeployableAddressRequest + +Request body for calculating deterministic address + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**chainDescriptor** | **String** | The base asset identifier of the blockchain (legacyId) to calculate deterministic address | | +|**templateId** | **UUID** | The template identifier | | +|**initParams** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The deploy function parameters and values of the contract template | | +|**salt** | **String** | The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for it to fit in the bytes32 parameter | | + + + diff --git a/docs/GetTransactionOperation.md b/docs/GetTransactionOperation.md index af7873a5..77121dfe 100644 --- a/docs/GetTransactionOperation.md +++ b/docs/GetTransactionOperation.md @@ -31,5 +31,7 @@ * `PROGRAM_CALL` (value: `"PROGRAM_CALL"`) +* `APPROVE` (value: `"APPROVE"`) + diff --git a/docs/InvalidParamaterValueError.md b/docs/InvalidParamaterValueError.md new file mode 100644 index 00000000..f4b29447 --- /dev/null +++ b/docs/InvalidParamaterValueError.md @@ -0,0 +1,14 @@ + + +# InvalidParamaterValueError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Bad request error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/NewAddress.md b/docs/NewAddress.md new file mode 100644 index 00000000..44653131 --- /dev/null +++ b/docs/NewAddress.md @@ -0,0 +1,15 @@ + + +# NewAddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**address** | **String** | The address string. | | +|**index** | **Integer** | The index of the address in the list. | | +|**description** | **String** | A description of the address. | | + + + diff --git a/docs/NotificationStatus.md b/docs/NotificationStatus.md index be48ffbd..5ef74f1f 100644 --- a/docs/NotificationStatus.md +++ b/docs/NotificationStatus.md @@ -11,5 +11,7 @@ * `IN_PROGRESS` (value: `"IN_PROGRESS"`) +* `ON_HOLD` (value: `"ON_HOLD"`) + diff --git a/docs/ReissueMultichainTokenRequest.md b/docs/ReissueMultichainTokenRequest.md new file mode 100644 index 00000000..1820eda7 --- /dev/null +++ b/docs/ReissueMultichainTokenRequest.md @@ -0,0 +1,27 @@ + + +# ReissueMultichainTokenRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | +|**chains** | **List<String>** | The base asset identifiers of the blockchains you want to deploy to | | +|**useGasless** | **Boolean** | Whether to use gasless deployment or not | [optional] | +|**fee** | **String** | Max fee amount for the deploy request. Interchangeable with the 'feeLevel' field | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the deploy request. Interchangeable with the 'fee' field | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/ResendNotificationsByResourceIdRequest.md b/docs/ResendNotificationsByResourceIdRequest.md new file mode 100644 index 00000000..91d1b4fd --- /dev/null +++ b/docs/ResendNotificationsByResourceIdRequest.md @@ -0,0 +1,14 @@ + + +# ResendNotificationsByResourceIdRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resourceId** | **UUID** | The resource id to resend notifications for | | +|**excludeStatuses** | **List<NotificationStatus>** | (optional) List of notification statuses to exclude from the resend operation - Empty array means all statuses will be included - If you want to exclude some statuses, you can use the following example: [ IN_PROGRESS, FAILED ] - Default if missing, means all statuses other than \"COMPLETED\" will be included | [optional] | + + + diff --git a/docs/SourceTransferPeerPath.md b/docs/SourceTransferPeerPath.md index 707f3f21..d6d339a2 100644 --- a/docs/SourceTransferPeerPath.md +++ b/docs/SourceTransferPeerPath.md @@ -13,6 +13,7 @@ The source of the transaction. |**id** | **String** | | [optional] | |**name** | **String** | | [optional] | |**walletId** | **UUID** | | [optional] | +|**isCollateral** | **Boolean** | indicate if the source is collateral account | [optional] | diff --git a/docs/TokenLinkNotMultichainCompatibleHttpError.md b/docs/TokenLinkNotMultichainCompatibleHttpError.md new file mode 100644 index 00000000..ca4cbf98 --- /dev/null +++ b/docs/TokenLinkNotMultichainCompatibleHttpError.md @@ -0,0 +1,14 @@ + + +# TokenLinkNotMultichainCompatibleHttpError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Bad request error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md index 48c2a728..a83cf7fd 100644 --- a/docs/TokenizationApi.md +++ b/docs/TokenizationApi.md @@ -8,12 +8,15 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**createNewCollection**](TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection | | [**fetchCollectionTokenDetails**](TokenizationApi.md#fetchCollectionTokenDetails) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details | | [**getCollectionById**](TokenizationApi.md#getCollectionById) | **GET** /tokenization/collections/{id} | Get a collection by id | +| [**getDeployableAddress**](TokenizationApi.md#getDeployableAddress) | **POST** /tokenization/multichain/deterministic_address | Get deterministic address for contract deployment | | [**getLinkedCollections**](TokenizationApi.md#getLinkedCollections) | **GET** /tokenization/collections | Get collections | | [**getLinkedToken**](TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token | | [**getLinkedTokens**](TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens | | [**issueNewToken**](TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token | +| [**issueTokenMultiChain**](TokenizationApi.md#issueTokenMultiChain) | **POST** /tokenization/multichain/tokens | Issue a token on one or more blockchains | | [**link**](TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a contract | | [**mintCollectionToken**](TokenizationApi.md#mintCollectionToken) | **POST** /tokenization/collections/{id}/tokens/mint | Mint tokens | +| [**reIssueTokenMultiChain**](TokenizationApi.md#reIssueTokenMultiChain) | **POST** /tokenization/multichain/token/{tokenLinkId} | Reissue a multichain token | | [**unlink**](TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token | | [**unlinkCollection**](TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link | @@ -359,6 +362,93 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getDeployableAddress + +> CompletableFuture> getDeployableAddress getDeployableAddress(getDeployableAddressRequest, idempotencyKey) + +Get deterministic address for contract deployment + +Get a deterministic address for contract deployment. The address is derived from the contract's bytecode and provided salt. This endpoint is used to get the address of a contract that will be deployed in the future. + +### 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.TokenizationApi; +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); + + GetDeployableAddressRequest getDeployableAddressRequest = new GetDeployableAddressRequest(); // GetDeployableAddressRequest | + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.tokenization().getDeployableAddress(getDeployableAddressRequest, idempotencyKey); + 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 TokenizationApi#getDeployableAddress"); + 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 TokenizationApi#getDeployableAddress"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **getDeployableAddressRequest** | [**GetDeployableAddressRequest**](GetDeployableAddressRequest.md)| | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### 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** | Deterministic address for contract deployment | - | +| **400** | Invalid parameters or template has no bytecode | - | +| **409** | Address is already taken | - | +| **0** | Error Response | * X-Request-ID -
| + + ## getLinkedCollections > CompletableFuture> getLinkedCollections getLinkedCollections(pageCursor, pageSize, status) @@ -701,6 +791,92 @@ No authorization required | **409** | Asset already exists | - | +## issueTokenMultiChain + +> CompletableFuture>> issueTokenMultiChain issueTokenMultiChain(createMultichainTokenRequest, idempotencyKey) + +Issue a token on one or more blockchains + +Facilitates the creation of a new token on one or more blockchains. + +### 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.TokenizationApi; +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); + + CreateMultichainTokenRequest createMultichainTokenRequest = new CreateMultichainTokenRequest(); // CreateMultichainTokenRequest | + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture>> response = fireblocks.tokenization().issueTokenMultiChain(createMultichainTokenRequest, idempotencyKey); + 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 TokenizationApi#issueTokenMultiChain"); + 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 TokenizationApi#issueTokenMultiChain"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createMultichainTokenRequest** | [**CreateMultichainTokenRequest**](CreateMultichainTokenRequest.md)| | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### 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 | +|-------------|-------------|------------------| +| **201** | Tokens were created successfully | - | +| **400** | Invalid input. | - | +| **409** | Address is already taken. | - | + + ## link > CompletableFuture> link link(tokenLinkRequestDto, idempotencyKey) @@ -876,6 +1052,96 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## reIssueTokenMultiChain + +> CompletableFuture>> reIssueTokenMultiChain reIssueTokenMultiChain(reissueMultichainTokenRequest, tokenLinkId, idempotencyKey) + +Reissue a multichain token + +Reissue a multichain token. This endpoint allows you to reissue a token on one or more blockchains. The token must be initially issued using the issueTokenMultiChain endpoint. + +### 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.TokenizationApi; +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); + + ReissueMultichainTokenRequest reissueMultichainTokenRequest = new ReissueMultichainTokenRequest(); // ReissueMultichainTokenRequest | + String tokenLinkId = "tokenLinkId_example"; // String | The ID of the token link + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequest, tokenLinkId, idempotencyKey); + 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 TokenizationApi#reIssueTokenMultiChain"); + 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 TokenizationApi#reIssueTokenMultiChain"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **reissueMultichainTokenRequest** | [**ReissueMultichainTokenRequest**](ReissueMultichainTokenRequest.md)| | | +| **tokenLinkId** | **String**| The ID of the token link | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### 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 | +|-------------|-------------|------------------| +| **201** | Successfully reissued multichain token | - | +| **400** | Invalid input | - | +| **404** | Deployed contract not found | - | +| **409** | Address is already taken | - | +| **0** | Error Response | * X-Request-ID -
| + + ## unlink > CompletableFuture> unlink unlink(id) diff --git a/docs/TransactionOperation.md b/docs/TransactionOperation.md index e47a5ba8..3f6bcfa7 100644 --- a/docs/TransactionOperation.md +++ b/docs/TransactionOperation.md @@ -21,5 +21,7 @@ * `APPROVE` (value: `"APPROVE"`) +* `ENABLE_ASSET` (value: `"ENABLE_ASSET"`) + diff --git a/docs/VaultAsset.md b/docs/VaultAsset.md index bb0224da..6fdbde47 100644 --- a/docs/VaultAsset.md +++ b/docs/VaultAsset.md @@ -15,7 +15,7 @@ |**frozen** | **String** | The cumulative frozen balance | [optional] | |**lockedAmount** | **String** | Funds in outgoing transactions that are not yet published to the network | [optional] | |**staked** | **String** | Staked balance | [optional] | -|**totalStakedCPU** | **BigDecimal** | Deprecated | [optional] | +|**totalStakedCPU** | **String** | Deprecated | [optional] | |**totalStakedNetwork** | **String** | Deprecated | [optional] | |**selfStakedCPU** | **String** | Deprecated | [optional] | |**selfStakedNetwork** | **String** | Deprecated | [optional] | diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index d0985e46..0e5e4250 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -7,10 +7,12 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**activateAssetForVaultAccount**](VaultsApi.md#activateAssetForVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/activate | Activate a wallet in a vault account | | [**createLegacyAddress**](VaultsApi.md#createLegacyAddress) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}/create_legacy | Convert a segwit address to legacy format | | [**createMultipleAccounts**](VaultsApi.md#createMultipleAccounts) | **POST** /vault/accounts/bulk | Bulk creation of new vault accounts | +| [**createMultipleDepositAddresses**](VaultsApi.md#createMultipleDepositAddresses) | **POST** /vault/accounts/addresses/bulk | Bulk creation of new deposit addresses | | [**createVaultAccount**](VaultsApi.md#createVaultAccount) | **POST** /vault/accounts | Create a new vault account | | [**createVaultAccountAsset**](VaultsApi.md#createVaultAccountAsset) | **POST** /vault/accounts/{vaultAccountId}/{assetId} | Create a new wallet | | [**createVaultAccountAssetAddress**](VaultsApi.md#createVaultAccountAssetAddress) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/addresses | Create new asset deposit address | | [**getAssetWallets**](VaultsApi.md#getAssetWallets) | **GET** /vault/asset_wallets | List asset wallets (Paginated) | +| [**getCreateMultipleDepositAddressesJobStatus**](VaultsApi.md#getCreateMultipleDepositAddressesJobStatus) | **GET** /vault/accounts/addresses/bulk/{jobId} | Get job status of bulk creation of new deposit addresses | | [**getMaxSpendableAmount**](VaultsApi.md#getMaxSpendableAmount) | **GET** /vault/accounts/{vaultAccountId}/{assetId}/max_spendable_amount | Get the maximum spendable amount in a single transaction. | | [**getPagedVaultAccounts**](VaultsApi.md#getPagedVaultAccounts) | **GET** /vault/accounts_paged | List vault accounts (Paginated) | | [**getPublicKeyInfo**](VaultsApi.md#getPublicKeyInfo) | **GET** /vault/public_key_info | Get the public key information | @@ -293,6 +295,91 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## createMultipleDepositAddresses + +> CompletableFuture> createMultipleDepositAddresses createMultipleDepositAddresses(createMultipleDepositAddressesRequest, idempotencyKey) + +Bulk creation of new deposit addresses + +Create multiple deposit address by running an async job. </br> **Note**: - We limit accounts to 10k per operation. + +### 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.VaultsApi; +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); + + CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest = new CreateMultipleDepositAddressesRequest(); // CreateMultipleDepositAddressesRequest | + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.vaults().createMultipleDepositAddresses(createMultipleDepositAddressesRequest, idempotencyKey); + 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 VaultsApi#createMultipleDepositAddresses"); + 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 VaultsApi#createMultipleDepositAddresses"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createMultipleDepositAddressesRequest** | [**CreateMultipleDepositAddressesRequest**](CreateMultipleDepositAddressesRequest.md)| | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### 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 JobCreated object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## createVaultAccount > CompletableFuture> createVaultAccount createVaultAccount(createVaultAccountRequest, idempotencyKey) @@ -648,6 +735,89 @@ No authorization required | **200** | A PaginatedAssetWalletResponse object | * X-Request-ID -
| +## getCreateMultipleDepositAddressesJobStatus + +> CompletableFuture> getCreateMultipleDepositAddressesJobStatus getCreateMultipleDepositAddressesJobStatus(jobId) + +Get job status of bulk creation of new deposit addresses + +Returns the status of bulk creation of new deposit addresses job and the result or error + +### 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.VaultsApi; +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 jobId = "019681b4-107d-7243-942d-4c3c30e36fae"; // String | The ID of the job to create addresses + try { + CompletableFuture> response = fireblocks.vaults().getCreateMultipleDepositAddressesJobStatus(jobId); + 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 VaultsApi#getCreateMultipleDepositAddressesJobStatus"); + 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 VaultsApi#getCreateMultipleDepositAddressesJobStatus"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **jobId** | **String**| The ID of the job to create addresses | | + +### 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 Job with status | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getMaxSpendableAmount > CompletableFuture> getMaxSpendableAmount getMaxSpendableAmount(vaultAccountId, assetId, manualSignging) diff --git a/docs/WebhooksV2BetaApi.md b/docs/WebhooksV2BetaApi.md index 9bc5a91e..ec707ce0 100644 --- a/docs/WebhooksV2BetaApi.md +++ b/docs/WebhooksV2BetaApi.md @@ -11,6 +11,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getWebhook**](WebhooksV2BetaApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id | | [**getWebhooks**](WebhooksV2BetaApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks | | [**resendNotificationById**](WebhooksV2BetaApi.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id | +| [**resendNotificationsByResourceId**](WebhooksV2BetaApi.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id | | [**updateWebhook**](WebhooksV2BetaApi.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook | @@ -625,6 +626,92 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## resendNotificationsByResourceId + +> CompletableFuture> resendNotificationsByResourceId resendNotificationsByResourceId(resendNotificationsByResourceIdRequest, webhookId, idempotencyKey) + +Resend notifications by resource Id + +Resend notifications by resource 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.WebhooksV2BetaApi; +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); + + ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest = new ResendNotificationsByResourceIdRequest(); // ResendNotificationsByResourceIdRequest | + String webhookId = "webhookId_example"; // String | The ID of the webhook + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest, webhookId, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling WebhooksV2BetaApi#resendNotificationsByResourceId"); + 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 WebhooksV2BetaApi#resendNotificationsByResourceId"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **resendNotificationsByResourceIdRequest** | [**ResendNotificationsByResourceIdRequest**](ResendNotificationsByResourceIdRequest.md)| | | +| **webhookId** | **String**| The ID of the webhook | | +| **idempotencyKey** | **String**| 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. | [optional] | + +### 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 | +|-------------|-------------|------------------| +| **202** | Resend notifications by resource request was accepted and is being processed | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## updateWebhook > CompletableFuture> updateWebhook updateWebhook(updateWebhookRequest, webhookId) diff --git a/pom.xml b/pom.xml index ea41944b..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 10.0.2 + 0.0.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 f91fa6f6..9ec56d09 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 = "10.0.2"; + public static final String VERSION = "0.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java index a7dfd471..0d6670a8 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -299,6 +299,7 @@ private HttpRequest.Builder getSupportedAssetsRequestBuilder() throws ApiExcepti * @param symbol Assets onchain symbol (optional) * @param scope Scope of the assets (optional) * @param deprecated Are assets deprecated (optional) + * @param ids A list of asset IDs (max 100) (optional * @param pageCursor Next page cursor to fetch (optional) * @param pageSize Items per page (optional, default to 500) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -313,6 +314,7 @@ public CompletableFuture> listAssets( String symbol, AssetScope scope, Boolean deprecated, + List ids, String pageCursor, BigDecimal pageSize, String idempotencyKey) @@ -325,6 +327,7 @@ public CompletableFuture> listAssets( symbol, scope, deprecated, + ids, pageCursor, pageSize, idempotencyKey); @@ -366,6 +369,7 @@ private HttpRequest.Builder listAssetsRequestBuilder( String symbol, AssetScope scope, Boolean deprecated, + List ids, String pageCursor, BigDecimal pageSize, String idempotencyKey) @@ -388,6 +392,8 @@ private HttpRequest.Builder listAssetsRequestBuilder( localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); localVarQueryParameterBaseName = "deprecated"; localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); + localVarQueryParameterBaseName = "ids"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "ids", ids)); localVarQueryParameterBaseName = "pageCursor"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); localVarQueryParameterBaseName = "pageSize"; @@ -425,6 +431,7 @@ private HttpRequest.Builder listAssetsRequestBuilder( * @param protocol Blockchain protocol (optional) * @param deprecated Is blockchain deprecated (optional) * @param test Is test blockchain (optional) + * @param ids A list of blockchain IDs (max 100) (optional * @param pageCursor Page cursor to fetch (optional) * @param pageSize Items per page (max 500) (optional, default to 500) * @return CompletableFuture<ApiResponse<ListBlockchainsResponse>> @@ -434,12 +441,14 @@ public CompletableFuture> listBlockchains( String protocol, Boolean deprecated, Boolean test, + List ids, String pageCursor, BigDecimal pageSize) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - listBlockchainsRequestBuilder(protocol, deprecated, test, pageCursor, pageSize); + listBlockchainsRequestBuilder( + protocol, deprecated, test, ids, pageCursor, pageSize); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -476,6 +485,7 @@ private HttpRequest.Builder listBlockchainsRequestBuilder( String protocol, Boolean deprecated, Boolean test, + List ids, String pageCursor, BigDecimal pageSize) throws ApiException { @@ -493,6 +503,8 @@ private HttpRequest.Builder listBlockchainsRequestBuilder( localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); localVarQueryParameterBaseName = "test"; localVarQueryParams.addAll(ApiClient.parameterToPairs("test", test)); + localVarQueryParameterBaseName = "ids"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "ids", ids)); localVarQueryParameterBaseName = "pageCursor"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); localVarQueryParameterBaseName = "pageSize"; diff --git a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java index 285600f5..3ceb9c0e 100644 --- a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -26,8 +26,12 @@ import com.fireblocks.sdk.model.CollectionLinkDto; import com.fireblocks.sdk.model.CollectionMintRequestDto; import com.fireblocks.sdk.model.CollectionMintResponseDto; +import com.fireblocks.sdk.model.CreateMultichainTokenRequest; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.DeployableAddressResponse; +import com.fireblocks.sdk.model.GetDeployableAddressRequest; import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; +import com.fireblocks.sdk.model.ReissueMultichainTokenRequest; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; @@ -391,6 +395,91 @@ private HttpRequest.Builder getCollectionByIdRequestBuilder(String id) throws Ap } return localVarRequestBuilder; } + /** + * Get deterministic address for contract deployment Get a deterministic address for contract + * deployment. The address is derived from the contract's bytecode and provided salt. This + * endpoint is used to get the address of a contract that will be deployed in the future. + * + * @param getDeployableAddressRequest (required) + * @param idempotencyKey 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. (optional) + * @return CompletableFuture<ApiResponse<DeployableAddressResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getDeployableAddress( + GetDeployableAddressRequest getDeployableAddressRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getDeployableAddressRequestBuilder(getDeployableAddressRequest, idempotencyKey); + 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( + "getDeployableAddress", 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< + DeployableAddressResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getDeployableAddressRequestBuilder( + GetDeployableAddressRequest getDeployableAddressRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "getDeployableAddress", "getDeployableAddressRequest", getDeployableAddressRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/deterministic_address"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(getDeployableAddressRequest); + localVarRequestBuilder.method( + "POST", 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; + } /** * Get collections Get collections (paginated) * @@ -721,6 +810,94 @@ private HttpRequest.Builder issueNewTokenRequestBuilder( } return localVarRequestBuilder; } + /** + * Issue a token on one or more blockchains Facilitates the creation of a new token on one or + * more blockchains. + * + * @param createMultichainTokenRequest (required) + * @param idempotencyKey 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. (optional) + * @return CompletableFuture<ApiResponse<List<TokenLinkDto>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> issueTokenMultiChain( + CreateMultichainTokenRequest createMultichainTokenRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + issueTokenMultiChainRequestBuilder( + createMultichainTokenRequest, idempotencyKey); + 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( + "issueTokenMultiChain", 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< + List< + TokenLinkDto>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder issueTokenMultiChainRequestBuilder( + CreateMultichainTokenRequest createMultichainTokenRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "issueTokenMultiChain", + "createMultichainTokenRequest", + createMultichainTokenRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/tokens"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(createMultichainTokenRequest); + localVarRequestBuilder.method( + "POST", 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; + } /** * Link a contract Link an a contract * @@ -886,6 +1063,104 @@ private HttpRequest.Builder mintCollectionTokenRequestBuilder( } return localVarRequestBuilder; } + /** + * Reissue a multichain token Reissue a multichain token. This endpoint allows you to reissue a + * token on one or more blockchains. The token must be initially issued using the + * issueTokenMultiChain endpoint. + * + * @param reissueMultichainTokenRequest (required) + * @param tokenLinkId The ID of the token link (required) + * @param idempotencyKey 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. (optional) + * @return CompletableFuture<ApiResponse<List<TokenLinkDto>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> reIssueTokenMultiChain( + ReissueMultichainTokenRequest reissueMultichainTokenRequest, + String tokenLinkId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + reIssueTokenMultiChainRequestBuilder( + reissueMultichainTokenRequest, tokenLinkId, idempotencyKey); + 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( + "reIssueTokenMultiChain", 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< + List< + TokenLinkDto>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder reIssueTokenMultiChainRequestBuilder( + ReissueMultichainTokenRequest reissueMultichainTokenRequest, + String tokenLinkId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "reIssueTokenMultiChain", + "reissueMultichainTokenRequest", + reissueMultichainTokenRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "reIssueTokenMultiChain", "tokenLinkId", tokenLinkId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/multichain/token/{tokenLinkId}" + .replace("{tokenLinkId}", ApiClient.urlEncode(tokenLinkId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(reissueMultichainTokenRequest); + localVarRequestBuilder.method( + "POST", 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; + } /** * Unlink a token Unlink a token. The token will be unlinked from the workspace. The token will * not be deleted on chain nor the refId, only the link to the workspace will be removed. diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index b7f39fbb..fdaa71d9 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -24,6 +24,8 @@ import com.fireblocks.sdk.model.CreateAddressResponse; import com.fireblocks.sdk.model.CreateAssetsRequest; import com.fireblocks.sdk.model.CreateMultipleAccountsRequest; +import com.fireblocks.sdk.model.CreateMultipleDepositAddressesJobStatus; +import com.fireblocks.sdk.model.CreateMultipleDepositAddressesRequest; import com.fireblocks.sdk.model.CreateVaultAccountRequest; import com.fireblocks.sdk.model.CreateVaultAssetResponse; import com.fireblocks.sdk.model.GetMaxSpendableAmountResponse; @@ -349,6 +351,96 @@ private HttpRequest.Builder createMultipleAccountsRequestBuilder( } return localVarRequestBuilder; } + /** + * Bulk creation of new deposit addresses Create multiple deposit address by running an async + * job. </br> **Note**: - We limit accounts to 10k per operation. + * + * @param createMultipleDepositAddressesRequest (required) + * @param idempotencyKey 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. (optional) + * @return CompletableFuture<ApiResponse<JobCreated>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> createMultipleDepositAddresses( + CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + createMultipleDepositAddressesRequestBuilder( + createMultipleDepositAddressesRequest, idempotencyKey); + 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( + "createMultipleDepositAddresses", + 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< + JobCreated>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder createMultipleDepositAddressesRequestBuilder( + CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "createMultipleDepositAddresses", + "createMultipleDepositAddressesRequest", + createMultipleDepositAddressesRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/vault/accounts/addresses/bulk"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(createMultipleDepositAddressesRequest); + localVarRequestBuilder.method( + "POST", 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; + } /** * Create a new vault account Creates a new vault account with the requested name. * @@ -742,6 +834,78 @@ private HttpRequest.Builder getAssetWalletsRequestBuilder( } return localVarRequestBuilder; } + /** + * Get job status of bulk creation of new deposit addresses Returns the status of bulk creation + * of new deposit addresses job and the result or error + * + * @param jobId The ID of the job to create addresses (required) + * @return CompletableFuture<ApiResponse<CreateMultipleDepositAddressesJobStatus>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getCreateMultipleDepositAddressesJobStatus(String jobId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getCreateMultipleDepositAddressesJobStatusRequestBuilder(jobId); + 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( + "getCreateMultipleDepositAddressesJobStatus", + localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse< + CreateMultipleDepositAddressesJobStatus>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + CreateMultipleDepositAddressesJobStatus>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getCreateMultipleDepositAddressesJobStatusRequestBuilder( + String jobId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getCreateMultipleDepositAddressesJobStatus", "jobId", jobId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/vault/accounts/addresses/bulk/{jobId}" + .replace("{jobId}", ApiClient.urlEncode(jobId.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 the maximum spendable amount in a single transaction. Get the maximum amount of a * particular asset that can be spent in a single transaction from a specified vault account diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java index 4e4d1fcc..e974bd7f 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java @@ -24,6 +24,7 @@ import com.fireblocks.sdk.model.NotificationPaginatedResponse; import com.fireblocks.sdk.model.NotificationStatus; import com.fireblocks.sdk.model.NotificationWithData; +import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; import com.fireblocks.sdk.model.WebhookEvent; @@ -677,6 +678,93 @@ private HttpRequest.Builder resendNotificationByIdRequestBuilder( } return localVarRequestBuilder; } + /** + * Resend notifications by resource Id Resend notifications by resource Id **Note:** These + * endpoints are currently in beta and might be subject to changes. + * + * @param resendNotificationsByResourceIdRequest (required) + * @param webhookId The ID of the webhook (required) + * @param idempotencyKey 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. (optional) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> resendNotificationsByResourceId( + ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest, + String webhookId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + resendNotificationsByResourceIdRequestBuilder( + resendNotificationsByResourceIdRequest, webhookId, idempotencyKey); + 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( + "resendNotificationsByResourceId", + localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder resendNotificationsByResourceIdRequestBuilder( + ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest, + String webhookId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "resendNotificationsByResourceId", + "resendNotificationsByResourceIdRequest", + resendNotificationsByResourceIdRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "resendNotificationsByResourceId", "webhookId", webhookId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications/resend_by_resource" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(resendNotificationsByResourceIdRequest); + localVarRequestBuilder.method( + "POST", 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; + } /** * Update webhook Update a webhook by its id **Note:** These endpoints are currently in beta and * might be subject to changes. diff --git a/src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java b/src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java new file mode 100644 index 00000000..536565ee --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AddressNotAvailableError */ +@JsonPropertyOrder({ + AddressNotAvailableError.JSON_PROPERTY_MESSAGE, + AddressNotAvailableError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddressNotAvailableError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public AddressNotAvailableError() {} + + public AddressNotAvailableError message(String message) { + this.message = message; + return this; + } + + /** + * Conflict error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AddressNotAvailableError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this AddressNotAvailableError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddressNotAvailableError addressNotAvailableError = (AddressNotAvailableError) o; + return Objects.equals(this.message, addressNotAvailableError.message) + && Objects.equals(this.code, addressNotAvailableError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddressNotAvailableError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequest.java new file mode 100644 index 00000000..e33b90ae --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequest.java @@ -0,0 +1,484 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +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; + +/** CreateMultichainTokenRequest */ +@JsonPropertyOrder({ + CreateMultichainTokenRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CreateMultichainTokenRequest.JSON_PROPERTY_CREATE_PARAMS, + CreateMultichainTokenRequest.JSON_PROPERTY_SALT, + CreateMultichainTokenRequest.JSON_PROPERTY_CHAINS, + CreateMultichainTokenRequest.JSON_PROPERTY_DISPLAY_NAME, + CreateMultichainTokenRequest.JSON_PROPERTY_USE_GASLESS, + CreateMultichainTokenRequest.JSON_PROPERTY_FEE, + CreateMultichainTokenRequest.JSON_PROPERTY_FEE_LEVEL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateMultichainTokenRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CREATE_PARAMS = "createParams"; + private CreateMultichainTokenRequestCreateParams createParams; + + public static final String JSON_PROPERTY_SALT = "salt"; + private String salt; + + public static final String JSON_PROPERTY_CHAINS = "chains"; + private List chains = new ArrayList<>(); + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + + public CreateMultichainTokenRequest() {} + + public CreateMultichainTokenRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to issue the token + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CreateMultichainTokenRequest createParams( + CreateMultichainTokenRequestCreateParams createParams) { + this.createParams = createParams; + return this; + } + + /** + * Get createParams + * + * @return createParams + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateMultichainTokenRequestCreateParams getCreateParams() { + return createParams; + } + + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreateParams(CreateMultichainTokenRequestCreateParams createParams) { + this.createParams = createParams; + } + + public CreateMultichainTokenRequest salt(String salt) { + this.salt = salt; + return this; + } + + /** + * The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for + * it to fit in the bytes32 parameter. + * + * @return salt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSalt() { + return salt; + } + + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSalt(String salt) { + this.salt = salt; + } + + public CreateMultichainTokenRequest chains(List chains) { + this.chains = chains; + return this; + } + + public CreateMultichainTokenRequest addChainsItem(String chainsItem) { + if (this.chains == null) { + this.chains = new ArrayList<>(); + } + this.chains.add(chainsItem); + return this; + } + + /** + * The base asset identifiers of the blockchains (legacyId) to calculate deterministic addresses + * + * @return chains + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChains() { + return chains; + } + + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChains(List chains) { + this.chains = chains; + } + + public CreateMultichainTokenRequest displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public CreateMultichainTokenRequest useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 + * standard. When set to true, the transaction will be relayed by a designated relayer. The + * workspace must be configured to use Fireblocks gasless relay. + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + + public CreateMultichainTokenRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Max fee amount for the write function transaction. interchangeable with the + * 'feeLevel' field + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public CreateMultichainTokenRequest feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + + /** Return true if this CreateMultichainTokenRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMultichainTokenRequest createMultichainTokenRequest = + (CreateMultichainTokenRequest) o; + return Objects.equals(this.vaultAccountId, createMultichainTokenRequest.vaultAccountId) + && Objects.equals(this.createParams, createMultichainTokenRequest.createParams) + && Objects.equals(this.salt, createMultichainTokenRequest.salt) + && Objects.equals(this.chains, createMultichainTokenRequest.chains) + && Objects.equals(this.displayName, createMultichainTokenRequest.displayName) + && Objects.equals(this.useGasless, createMultichainTokenRequest.useGasless) + && Objects.equals(this.fee, createMultichainTokenRequest.fee) + && Objects.equals(this.feeLevel, createMultichainTokenRequest.feeLevel); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, createParams, salt, chains, displayName, useGasless, fee, feeLevel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateMultichainTokenRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" createParams: ").append(toIndentedString(createParams)).append("\n"); + sb.append(" salt: ").append(toIndentedString(salt)).append("\n"); + sb.append(" chains: ").append(toIndentedString(chains)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `createParams` to the URL query string + if (getCreateParams() != null) { + joiner.add(getCreateParams().toUrlQueryString(prefix + "createParams" + suffix)); + } + + // add `salt` to the URL query string + if (getSalt() != null) { + joiner.add( + String.format( + "%ssalt%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSalt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `chains` to the URL query string + if (getChains() != null) { + for (int i = 0; i < getChains().size(); i++) { + joiner.add( + String.format( + "%schains%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getChains().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `displayName` to the URL query string + if (getDisplayName() != null) { + joiner.add( + String.format( + "%sdisplayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayName()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParams.java b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParams.java new file mode 100644 index 00000000..ab4bb240 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParams.java @@ -0,0 +1,265 @@ +/* + * 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.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize( + using = + CreateMultichainTokenRequestCreateParams + .CreateMultichainTokenRequestCreateParamsDeserializer.class) +@JsonSerialize( + using = + CreateMultichainTokenRequestCreateParams + .CreateMultichainTokenRequestCreateParamsSerializer.class) +public class CreateMultichainTokenRequestCreateParams extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(CreateMultichainTokenRequestCreateParams.class.getName()); + + public static class CreateMultichainTokenRequestCreateParamsSerializer + extends StdSerializer { + public CreateMultichainTokenRequestCreateParamsSerializer( + Class t) { + super(t); + } + + public CreateMultichainTokenRequestCreateParamsSerializer() { + this(null); + } + + @Override + public void serialize( + CreateMultichainTokenRequestCreateParams value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateMultichainTokenRequestCreateParamsDeserializer + extends StdDeserializer { + public CreateMultichainTokenRequestCreateParamsDeserializer() { + this(CreateMultichainTokenRequestCreateParams.class); + } + + public CreateMultichainTokenRequestCreateParamsDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateMultichainTokenRequestCreateParams deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize EVMTokenCreateParamsDto + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EVMTokenCreateParamsDto.class.equals(Integer.class) + || EVMTokenCreateParamsDto.class.equals(Long.class) + || EVMTokenCreateParamsDto.class.equals(Float.class) + || EVMTokenCreateParamsDto.class.equals(Double.class) + || EVMTokenCreateParamsDto.class.equals(Boolean.class) + || EVMTokenCreateParamsDto.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((EVMTokenCreateParamsDto.class.equals(Integer.class) + || EVMTokenCreateParamsDto.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((EVMTokenCreateParamsDto.class.equals(Float.class) + || EVMTokenCreateParamsDto.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (EVMTokenCreateParamsDto.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (EVMTokenCreateParamsDto.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(EVMTokenCreateParamsDto.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EVMTokenCreateParamsDto'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'EVMTokenCreateParamsDto'", + e); + } + + if (match == 1) { + CreateMultichainTokenRequestCreateParams ret = + new CreateMultichainTokenRequestCreateParams(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for CreateMultichainTokenRequestCreateParams:" + + " %d classes match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public CreateMultichainTokenRequestCreateParams getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateMultichainTokenRequestCreateParams cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateMultichainTokenRequestCreateParams() { + super("oneOf", Boolean.FALSE); + } + + public CreateMultichainTokenRequestCreateParams(EVMTokenCreateParamsDto o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("EVMTokenCreateParamsDto", EVMTokenCreateParamsDto.class); + JSON.registerDescendants( + CreateMultichainTokenRequestCreateParams.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateMultichainTokenRequestCreateParams.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: EVMTokenCreateParamsDto + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(EVMTokenCreateParamsDto.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be EVMTokenCreateParamsDto"); + } + + /** + * Get the actual instance, which can be the following: EVMTokenCreateParamsDto + * + * @return The actual instance (EVMTokenCreateParamsDto) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `EVMTokenCreateParamsDto`. If the actual instance is not + * `EVMTokenCreateParamsDto`, the ClassCastException will be thrown. + * + * @return The actual instance of `EVMTokenCreateParamsDto` + * @throws ClassCastException if the instance is not `EVMTokenCreateParamsDto` + */ + public EVMTokenCreateParamsDto getEVMTokenCreateParamsDto() throws ClassCastException { + return (EVMTokenCreateParamsDto) super.getActualInstance(); + } + + /** + * 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("&"); + + if (getActualInstance() instanceof EVMTokenCreateParamsDto) { + if (getActualInstance() != null) { + joiner.add( + ((EVMTokenCreateParamsDto) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatus.java b/src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatus.java new file mode 100644 index 00000000..4dbd9f70 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatus.java @@ -0,0 +1,247 @@ +/* + * 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; + +/** CreateMultipleDepositAddressesJobStatus */ +@JsonPropertyOrder({ + CreateMultipleDepositAddressesJobStatus.JSON_PROPERTY_STATUS, + CreateMultipleDepositAddressesJobStatus.JSON_PROPERTY_ADDRESSES, + CreateMultipleDepositAddressesJobStatus.JSON_PROPERTY_ERROR_MESSAGE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateMultipleDepositAddressesJobStatus { + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_ADDRESSES = "addresses"; + private List addresses; + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage"; + private String errorMessage; + + public CreateMultipleDepositAddressesJobStatus() {} + + public CreateMultipleDepositAddressesJobStatus status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(String status) { + this.status = status; + } + + public CreateMultipleDepositAddressesJobStatus addresses(List addresses) { + this.addresses = addresses; + return this; + } + + public CreateMultipleDepositAddressesJobStatus addAddressesItem(NewAddress addressesItem) { + if (this.addresses == null) { + this.addresses = new ArrayList<>(); + } + this.addresses.add(addressesItem); + return this; + } + + /** + * Get addresses + * + * @return addresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAddresses() { + return addresses; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddresses(List addresses) { + this.addresses = addresses; + } + + public CreateMultipleDepositAddressesJobStatus errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get errorMessage + * + * @return errorMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorMessage() { + return errorMessage; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + /** Return true if this CreateMultipleDepositAddressesJobStatus object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMultipleDepositAddressesJobStatus createMultipleDepositAddressesJobStatus = + (CreateMultipleDepositAddressesJobStatus) o; + return Objects.equals(this.status, createMultipleDepositAddressesJobStatus.status) + && Objects.equals(this.addresses, createMultipleDepositAddressesJobStatus.addresses) + && Objects.equals( + this.errorMessage, createMultipleDepositAddressesJobStatus.errorMessage); + } + + @Override + public int hashCode() { + return Objects.hash(status, addresses, errorMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateMultipleDepositAddressesJobStatus {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" addresses: ").append(toIndentedString(addresses)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).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 `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `addresses` to the URL query string + if (getAddresses() != null) { + for (int i = 0; i < getAddresses().size(); i++) { + if (getAddresses().get(i) != null) { + joiner.add( + getAddresses() + .get(i) + .toUrlQueryString( + String.format( + "%saddresses%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `errorMessage` to the URL query string + if (getErrorMessage() != null) { + joiner.add( + String.format( + "%serrorMessage%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getErrorMessage()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequest.java new file mode 100644 index 00000000..8b3c192c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequest.java @@ -0,0 +1,387 @@ +/* + * 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; + +/** CreateMultipleDepositAddressesRequest */ +@JsonPropertyOrder({ + CreateMultipleDepositAddressesRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CreateMultipleDepositAddressesRequest.JSON_PROPERTY_ASSET_ID, + CreateMultipleDepositAddressesRequest.JSON_PROPERTY_COUNT, + CreateMultipleDepositAddressesRequest.JSON_PROPERTY_DESCRIPTIONS, + CreateMultipleDepositAddressesRequest.JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM, + CreateMultipleDepositAddressesRequest.JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM_INDEX +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateMultipleDepositAddressesRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private Integer vaultAccountId; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_COUNT = "count"; + private Integer count; + + public static final String JSON_PROPERTY_DESCRIPTIONS = "descriptions"; + private List descriptions; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM = + "vaultAccountToCopyDescFrom"; + private Integer vaultAccountToCopyDescFrom; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM_INDEX = + "vaultAccountToCopyDescFromIndex"; + private Integer vaultAccountToCopyDescFromIndex; + + public CreateMultipleDepositAddressesRequest() {} + + public CreateMultipleDepositAddressesRequest vaultAccountId(Integer vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * Existing Vault account ID to add deposit addresses to + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(Integer vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CreateMultipleDepositAddressesRequest assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * asset ID + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public CreateMultipleDepositAddressesRequest count(Integer count) { + this.count = count; + return this; + } + + /** + * Count of deposit addresses to issue + * + * @return count + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCount() { + return count; + } + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(Integer count) { + this.count = count; + } + + public CreateMultipleDepositAddressesRequest descriptions(List descriptions) { + this.descriptions = descriptions; + return this; + } + + public CreateMultipleDepositAddressesRequest addDescriptionsItem(String descriptionsItem) { + if (this.descriptions == null) { + this.descriptions = new ArrayList<>(); + } + this.descriptions.add(descriptionsItem); + return this; + } + + /** + * Desctiptions of the newly created addresses + * + * @return descriptions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDescriptions() { + return descriptions; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescriptions(List descriptions) { + this.descriptions = descriptions; + } + + public CreateMultipleDepositAddressesRequest vaultAccountToCopyDescFrom( + Integer vaultAccountToCopyDescFrom) { + this.vaultAccountToCopyDescFrom = vaultAccountToCopyDescFrom; + return this; + } + + /** + * Existing Vault Account ID to copy deposit addresses descriptions from in case no descriptions + * were provided + * + * @return vaultAccountToCopyDescFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVaultAccountToCopyDescFrom() { + return vaultAccountToCopyDescFrom; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccountToCopyDescFrom(Integer vaultAccountToCopyDescFrom) { + this.vaultAccountToCopyDescFrom = vaultAccountToCopyDescFrom; + } + + public CreateMultipleDepositAddressesRequest vaultAccountToCopyDescFromIndex( + Integer vaultAccountToCopyDescFromIndex) { + this.vaultAccountToCopyDescFromIndex = vaultAccountToCopyDescFromIndex; + return this; + } + + /** + * Existing length within the vault account to copy deposit addresses descriptions from + * + * @return vaultAccountToCopyDescFromIndex + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVaultAccountToCopyDescFromIndex() { + return vaultAccountToCopyDescFromIndex; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_TO_COPY_DESC_FROM_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccountToCopyDescFromIndex(Integer vaultAccountToCopyDescFromIndex) { + this.vaultAccountToCopyDescFromIndex = vaultAccountToCopyDescFromIndex; + } + + /** Return true if this CreateMultipleDepositAddressesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest = + (CreateMultipleDepositAddressesRequest) o; + return Objects.equals( + this.vaultAccountId, createMultipleDepositAddressesRequest.vaultAccountId) + && Objects.equals(this.assetId, createMultipleDepositAddressesRequest.assetId) + && Objects.equals(this.count, createMultipleDepositAddressesRequest.count) + && Objects.equals( + this.descriptions, createMultipleDepositAddressesRequest.descriptions) + && Objects.equals( + this.vaultAccountToCopyDescFrom, + createMultipleDepositAddressesRequest.vaultAccountToCopyDescFrom) + && Objects.equals( + this.vaultAccountToCopyDescFromIndex, + createMultipleDepositAddressesRequest.vaultAccountToCopyDescFromIndex); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, + assetId, + count, + descriptions, + vaultAccountToCopyDescFrom, + vaultAccountToCopyDescFromIndex); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateMultipleDepositAddressesRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); + sb.append(" vaultAccountToCopyDescFrom: ") + .append(toIndentedString(vaultAccountToCopyDescFrom)) + .append("\n"); + sb.append(" vaultAccountToCopyDescFromIndex: ") + .append(toIndentedString(vaultAccountToCopyDescFromIndex)) + .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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `count` to the URL query string + if (getCount() != null) { + joiner.add( + String.format( + "%scount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `descriptions` to the URL query string + if (getDescriptions() != null) { + for (int i = 0; i < getDescriptions().size(); i++) { + joiner.add( + String.format( + "%sdescriptions%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDescriptions().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `vaultAccountToCopyDescFrom` to the URL query string + if (getVaultAccountToCopyDescFrom() != null) { + joiner.add( + String.format( + "%svaultAccountToCopyDescFrom%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountToCopyDescFrom()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `vaultAccountToCopyDescFromIndex` to the URL query string + if (getVaultAccountToCopyDescFromIndex() != null) { + joiner.add( + String.format( + "%svaultAccountToCopyDescFromIndex%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountToCopyDescFromIndex()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.java b/src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.java new file mode 100644 index 00000000..57496ca2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.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; + +/** Response DTO containing a deployable address */ +@JsonPropertyOrder({DeployableAddressResponse.JSON_PROPERTY_ADDRESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployableAddressResponse { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public DeployableAddressResponse() {} + + public DeployableAddressResponse address(String address) { + this.address = address; + return this; + } + + /** + * The deployable address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(String address) { + this.address = address; + } + + /** Return true if this DeployableAddressResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployableAddressResponse deployableAddressResponse = (DeployableAddressResponse) o; + return Objects.equals(this.address, deployableAddressResponse.address); + } + + @Override + public int hashCode() { + return Objects.hash(address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployableAddressResponse {\n"); + sb.append(" address: ").append(toIndentedString(address)).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 `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java b/src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java new file mode 100644 index 00000000..9c6967fd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DeployedContractNotFoundError */ +@JsonPropertyOrder({ + DeployedContractNotFoundError.JSON_PROPERTY_MESSAGE, + DeployedContractNotFoundError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployedContractNotFoundError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public DeployedContractNotFoundError() {} + + public DeployedContractNotFoundError message(String message) { + this.message = message; + return this; + } + + /** + * Not Found error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public DeployedContractNotFoundError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this DeployedContractNotFoundError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployedContractNotFoundError deployedContractNotFoundError = + (DeployedContractNotFoundError) o; + return Objects.equals(this.message, deployedContractNotFoundError.message) + && Objects.equals(this.code, deployedContractNotFoundError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployedContractNotFoundError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPath.java b/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPath.java index 733583ee..fd7d46bc 100644 --- a/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPath.java +++ b/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPath.java @@ -29,7 +29,8 @@ DestinationTransferPeerPath.JSON_PROPERTY_ID, DestinationTransferPeerPath.JSON_PROPERTY_NAME, DestinationTransferPeerPath.JSON_PROPERTY_WALLET_ID, - DestinationTransferPeerPath.JSON_PROPERTY_ONE_TIME_ADDRESS + DestinationTransferPeerPath.JSON_PROPERTY_ONE_TIME_ADDRESS, + DestinationTransferPeerPath.JSON_PROPERTY_IS_COLLATERAL }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DestinationTransferPeerPath { @@ -51,6 +52,9 @@ public class DestinationTransferPeerPath { public static final String JSON_PROPERTY_ONE_TIME_ADDRESS = "oneTimeAddress"; private OneTimeAddress oneTimeAddress; + public static final String JSON_PROPERTY_IS_COLLATERAL = "isCollateral"; + private Boolean isCollateral; + public DestinationTransferPeerPath() {} public DestinationTransferPeerPath type(TransferPeerPathType type) { @@ -191,6 +195,29 @@ public void setOneTimeAddress(OneTimeAddress oneTimeAddress) { this.oneTimeAddress = oneTimeAddress; } + public DestinationTransferPeerPath isCollateral(Boolean isCollateral) { + this.isCollateral = isCollateral; + return this; + } + + /** + * indicate if the destination is collateral account + * + * @return isCollateral + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_COLLATERAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCollateral() { + return isCollateral; + } + + @JsonProperty(JSON_PROPERTY_IS_COLLATERAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsCollateral(Boolean isCollateral) { + this.isCollateral = isCollateral; + } + /** Return true if this DestinationTransferPeerPath object is equal to o. */ @Override public boolean equals(Object o) { @@ -206,12 +233,13 @@ public boolean equals(Object o) { && Objects.equals(this.id, destinationTransferPeerPath.id) && Objects.equals(this.name, destinationTransferPeerPath.name) && Objects.equals(this.walletId, destinationTransferPeerPath.walletId) - && Objects.equals(this.oneTimeAddress, destinationTransferPeerPath.oneTimeAddress); + && Objects.equals(this.oneTimeAddress, destinationTransferPeerPath.oneTimeAddress) + && Objects.equals(this.isCollateral, destinationTransferPeerPath.isCollateral); } @Override public int hashCode() { - return Objects.hash(type, subType, id, name, walletId, oneTimeAddress); + return Objects.hash(type, subType, id, name, walletId, oneTimeAddress, isCollateral); } @Override @@ -224,6 +252,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" walletId: ").append(toIndentedString(walletId)).append("\n"); sb.append(" oneTimeAddress: ").append(toIndentedString(oneTimeAddress)).append("\n"); + sb.append(" isCollateral: ").append(toIndentedString(isCollateral)).append("\n"); sb.append("}"); return sb.toString(); } @@ -331,6 +360,19 @@ public String toUrlQueryString(String prefix) { joiner.add(getOneTimeAddress().toUrlQueryString(prefix + "oneTimeAddress" + suffix)); } + // add `isCollateral` to the URL query string + if (getIsCollateral() != null) { + joiner.add( + String.format( + "%sisCollateral%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIsCollateral()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequest.java b/src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequest.java new file mode 100644 index 00000000..c5d341b6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequest.java @@ -0,0 +1,288 @@ +/* + * 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; +import java.util.UUID; + +/** Request body for calculating deterministic address */ +@JsonPropertyOrder({ + GetDeployableAddressRequest.JSON_PROPERTY_CHAIN_DESCRIPTOR, + GetDeployableAddressRequest.JSON_PROPERTY_TEMPLATE_ID, + GetDeployableAddressRequest.JSON_PROPERTY_INIT_PARAMS, + GetDeployableAddressRequest.JSON_PROPERTY_SALT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetDeployableAddressRequest { + public static final String JSON_PROPERTY_CHAIN_DESCRIPTOR = "chainDescriptor"; + private String chainDescriptor; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "templateId"; + private UUID templateId; + + public static final String JSON_PROPERTY_INIT_PARAMS = "initParams"; + private List initParams = new ArrayList<>(); + + public static final String JSON_PROPERTY_SALT = "salt"; + private String salt; + + public GetDeployableAddressRequest() {} + + public GetDeployableAddressRequest chainDescriptor(String chainDescriptor) { + this.chainDescriptor = chainDescriptor; + return this; + } + + /** + * The base asset identifier of the blockchain (legacyId) to calculate deterministic address + * + * @return chainDescriptor + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHAIN_DESCRIPTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChainDescriptor() { + return chainDescriptor; + } + + @JsonProperty(JSON_PROPERTY_CHAIN_DESCRIPTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChainDescriptor(String chainDescriptor) { + this.chainDescriptor = chainDescriptor; + } + + public GetDeployableAddressRequest templateId(UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template identifier + * + * @return templateId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(UUID templateId) { + this.templateId = templateId; + } + + public GetDeployableAddressRequest initParams(List initParams) { + this.initParams = initParams; + return this; + } + + public GetDeployableAddressRequest addInitParamsItem(ParameterWithValue initParamsItem) { + if (this.initParams == null) { + this.initParams = new ArrayList<>(); + } + this.initParams.add(initParamsItem); + return this; + } + + /** + * The deploy function parameters and values of the contract template + * + * @return initParams + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInitParams() { + return initParams; + } + + @JsonProperty(JSON_PROPERTY_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInitParams(List initParams) { + this.initParams = initParams; + } + + public GetDeployableAddressRequest salt(String salt) { + this.salt = salt; + return this; + } + + /** + * The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for + * it to fit in the bytes32 parameter + * + * @return salt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSalt() { + return salt; + } + + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSalt(String salt) { + this.salt = salt; + } + + /** Return true if this GetDeployableAddressRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDeployableAddressRequest getDeployableAddressRequest = (GetDeployableAddressRequest) o; + return Objects.equals(this.chainDescriptor, getDeployableAddressRequest.chainDescriptor) + && Objects.equals(this.templateId, getDeployableAddressRequest.templateId) + && Objects.equals(this.initParams, getDeployableAddressRequest.initParams) + && Objects.equals(this.salt, getDeployableAddressRequest.salt); + } + + @Override + public int hashCode() { + return Objects.hash(chainDescriptor, templateId, initParams, salt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDeployableAddressRequest {\n"); + sb.append(" chainDescriptor: ").append(toIndentedString(chainDescriptor)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" initParams: ").append(toIndentedString(initParams)).append("\n"); + sb.append(" salt: ").append(toIndentedString(salt)).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 `chainDescriptor` to the URL query string + if (getChainDescriptor() != null) { + joiner.add( + String.format( + "%schainDescriptor%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getChainDescriptor()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `templateId` to the URL query string + if (getTemplateId() != null) { + joiner.add( + String.format( + "%stemplateId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTemplateId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `initParams` to the URL query string + if (getInitParams() != null) { + for (int i = 0; i < getInitParams().size(); i++) { + if (getInitParams().get(i) != null) { + joiner.add( + getInitParams() + .get(i) + .toUrlQueryString( + String.format( + "%sinitParams%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `salt` to the URL query string + if (getSalt() != null) { + joiner.add( + String.format( + "%ssalt%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSalt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetTransactionOperation.java b/src/main/java/com/fireblocks/sdk/model/GetTransactionOperation.java index aee80122..816fdad2 100644 --- a/src/main/java/com/fireblocks/sdk/model/GetTransactionOperation.java +++ b/src/main/java/com/fireblocks/sdk/model/GetTransactionOperation.java @@ -50,7 +50,9 @@ * April 1st, 2023. Older transactions may have this as their operation, in case users in the * workspace have used the direct integration between Fireblocks and the Compound DeFI protocol. * * `PROGRAM_CALL` - In Solana refers to invoking on-chain programs (smart contracts) to - * execute transactions and interact with the blockchain. + * execute transactions and interact with the blockchain. * `APPROVE` - Enables the + * approve function for a smart contract or wallet to withdraw from a designated wallet. [Learn + * more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). */ public enum GetTransactionOperation { TRANSFER("TRANSFER"), @@ -77,7 +79,9 @@ public enum GetTransactionOperation { SUPPLY_TO_COMPOUND("SUPPLY_TO_COMPOUND"), - PROGRAM_CALL("PROGRAM_CALL"); + PROGRAM_CALL("PROGRAM_CALL"), + + APPROVE("APPROVE"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java b/src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java new file mode 100644 index 00000000..5725df14 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** InvalidParamaterValueError */ +@JsonPropertyOrder({ + InvalidParamaterValueError.JSON_PROPERTY_MESSAGE, + InvalidParamaterValueError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InvalidParamaterValueError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public InvalidParamaterValueError() {} + + public InvalidParamaterValueError message(String message) { + this.message = message; + return this; + } + + /** + * Bad request error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public InvalidParamaterValueError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this InvalidParamaterValueError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvalidParamaterValueError invalidParamaterValueError = (InvalidParamaterValueError) o; + return Objects.equals(this.message, invalidParamaterValueError.message) + && Objects.equals(this.code, invalidParamaterValueError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvalidParamaterValueError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NewAddress.java b/src/main/java/com/fireblocks/sdk/model/NewAddress.java new file mode 100644 index 00000000..1e67d92f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NewAddress.java @@ -0,0 +1,223 @@ +/* + * 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; + +/** NewAddress */ +@JsonPropertyOrder({ + NewAddress.JSON_PROPERTY_ADDRESS, + NewAddress.JSON_PROPERTY_INDEX, + NewAddress.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NewAddress { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_INDEX = "index"; + private Integer index; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public NewAddress() {} + + public NewAddress address(String address) { + this.address = address; + return this; + } + + /** + * The address string. + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(String address) { + this.address = address; + } + + public NewAddress index(Integer index) { + this.index = index; + return this; + } + + /** + * The index of the address in the list. + * + * @return index + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getIndex() { + return index; + } + + @JsonProperty(JSON_PROPERTY_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIndex(Integer index) { + this.index = index; + } + + public NewAddress description(String description) { + this.description = description; + return this; + } + + /** + * A description of the address. + * + * @return description + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this NewAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewAddress newAddress = (NewAddress) o; + return Objects.equals(this.address, newAddress.address) + && Objects.equals(this.index, newAddress.index) + && Objects.equals(this.description, newAddress.description); + } + + @Override + public int hashCode() { + return Objects.hash(address, index, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewAddress {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `index` to the URL query string + if (getIndex() != null) { + joiner.add( + String.format( + "%sindex%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getIndex()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java b/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java index af5a32d4..bc417912 100644 --- a/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java +++ b/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java @@ -22,7 +22,9 @@ public enum NotificationStatus { FAILED("FAILED"), - IN_PROGRESS("IN_PROGRESS"); + IN_PROGRESS("IN_PROGRESS"), + + ON_HOLD("ON_HOLD"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java b/src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java new file mode 100644 index 00000000..fc6f980a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java @@ -0,0 +1,360 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +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; + +/** ReissueMultichainTokenRequest */ +@JsonPropertyOrder({ + ReissueMultichainTokenRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + ReissueMultichainTokenRequest.JSON_PROPERTY_CHAINS, + ReissueMultichainTokenRequest.JSON_PROPERTY_USE_GASLESS, + ReissueMultichainTokenRequest.JSON_PROPERTY_FEE, + ReissueMultichainTokenRequest.JSON_PROPERTY_FEE_LEVEL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReissueMultichainTokenRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CHAINS = "chains"; + private List chains = new ArrayList<>(); + + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** Fee level for the deploy request. Interchangeable with the 'fee' field */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + + public ReissueMultichainTokenRequest() {} + + public ReissueMultichainTokenRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to issue the token + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public ReissueMultichainTokenRequest chains(List chains) { + this.chains = chains; + return this; + } + + public ReissueMultichainTokenRequest addChainsItem(String chainsItem) { + if (this.chains == null) { + this.chains = new ArrayList<>(); + } + this.chains.add(chainsItem); + return this; + } + + /** + * The base asset identifiers of the blockchains you want to deploy to + * + * @return chains + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChains() { + return chains; + } + + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChains(List chains) { + this.chains = chains; + } + + public ReissueMultichainTokenRequest useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Whether to use gasless deployment or not + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + + public ReissueMultichainTokenRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Max fee amount for the deploy request. Interchangeable with the 'feeLevel' field + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public ReissueMultichainTokenRequest feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the deploy request. Interchangeable with the 'fee' field + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + + /** Return true if this ReissueMultichainTokenRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReissueMultichainTokenRequest reissueMultichainTokenRequest = + (ReissueMultichainTokenRequest) o; + return Objects.equals(this.vaultAccountId, reissueMultichainTokenRequest.vaultAccountId) + && Objects.equals(this.chains, reissueMultichainTokenRequest.chains) + && Objects.equals(this.useGasless, reissueMultichainTokenRequest.useGasless) + && Objects.equals(this.fee, reissueMultichainTokenRequest.fee) + && Objects.equals(this.feeLevel, reissueMultichainTokenRequest.feeLevel); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, chains, useGasless, fee, feeLevel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReissueMultichainTokenRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" chains: ").append(toIndentedString(chains)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `chains` to the URL query string + if (getChains() != null) { + for (int i = 0; i < getChains().size(); i++) { + joiner.add( + String.format( + "%schains%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getChains().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequest.java b/src/main/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequest.java new file mode 100644 index 00000000..83bee1c8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequest.java @@ -0,0 +1,211 @@ +/* + * 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; +import java.util.UUID; + +/** ResendNotificationsByResourceIdRequest */ +@JsonPropertyOrder({ + ResendNotificationsByResourceIdRequest.JSON_PROPERTY_RESOURCE_ID, + ResendNotificationsByResourceIdRequest.JSON_PROPERTY_EXCLUDE_STATUSES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResendNotificationsByResourceIdRequest { + public static final String JSON_PROPERTY_RESOURCE_ID = "resourceId"; + private UUID resourceId; + + public static final String JSON_PROPERTY_EXCLUDE_STATUSES = "excludeStatuses"; + private List excludeStatuses; + + public ResendNotificationsByResourceIdRequest() {} + + public ResendNotificationsByResourceIdRequest resourceId(UUID resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The resource id to resend notifications for + * + * @return resourceId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getResourceId() { + return resourceId; + } + + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResourceId(UUID resourceId) { + this.resourceId = resourceId; + } + + public ResendNotificationsByResourceIdRequest excludeStatuses( + List excludeStatuses) { + this.excludeStatuses = excludeStatuses; + return this; + } + + public ResendNotificationsByResourceIdRequest addExcludeStatusesItem( + NotificationStatus excludeStatusesItem) { + if (this.excludeStatuses == null) { + this.excludeStatuses = new ArrayList<>(); + } + this.excludeStatuses.add(excludeStatusesItem); + return this; + } + + /** + * (optional) List of notification statuses to exclude from the resend operation - Empty array + * means all statuses will be included - If you want to exclude some statuses, you can use the + * following example: [ IN_PROGRESS, FAILED ] - Default if missing, means all statuses other + * than \"COMPLETED\" will be included + * + * @return excludeStatuses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_STATUSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExcludeStatuses() { + return excludeStatuses; + } + + @JsonProperty(JSON_PROPERTY_EXCLUDE_STATUSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExcludeStatuses(List excludeStatuses) { + this.excludeStatuses = excludeStatuses; + } + + /** Return true if this ResendNotificationsByResourceIdRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest = + (ResendNotificationsByResourceIdRequest) o; + return Objects.equals(this.resourceId, resendNotificationsByResourceIdRequest.resourceId) + && Objects.equals( + this.excludeStatuses, + resendNotificationsByResourceIdRequest.excludeStatuses); + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, excludeStatuses); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResendNotificationsByResourceIdRequest {\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" excludeStatuses: ").append(toIndentedString(excludeStatuses)).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 `resourceId` to the URL query string + if (getResourceId() != null) { + joiner.add( + String.format( + "%sresourceId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getResourceId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `excludeStatuses` to the URL query string + if (getExcludeStatuses() != null) { + for (int i = 0; i < getExcludeStatuses().size(); i++) { + if (getExcludeStatuses().get(i) != null) { + joiner.add( + String.format( + "%sexcludeStatuses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getExcludeStatuses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPath.java b/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPath.java index 85aedfe3..870ee666 100644 --- a/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPath.java +++ b/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPath.java @@ -28,7 +28,8 @@ SourceTransferPeerPath.JSON_PROPERTY_SUB_TYPE, SourceTransferPeerPath.JSON_PROPERTY_ID, SourceTransferPeerPath.JSON_PROPERTY_NAME, - SourceTransferPeerPath.JSON_PROPERTY_WALLET_ID + SourceTransferPeerPath.JSON_PROPERTY_WALLET_ID, + SourceTransferPeerPath.JSON_PROPERTY_IS_COLLATERAL }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SourceTransferPeerPath { @@ -47,6 +48,9 @@ public class SourceTransferPeerPath { public static final String JSON_PROPERTY_WALLET_ID = "walletId"; private UUID walletId; + public static final String JSON_PROPERTY_IS_COLLATERAL = "isCollateral"; + private Boolean isCollateral; + public SourceTransferPeerPath() {} public SourceTransferPeerPath type(TransferPeerPathType type) { @@ -164,6 +168,29 @@ public void setWalletId(UUID walletId) { this.walletId = walletId; } + public SourceTransferPeerPath isCollateral(Boolean isCollateral) { + this.isCollateral = isCollateral; + return this; + } + + /** + * indicate if the source is collateral account + * + * @return isCollateral + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_COLLATERAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCollateral() { + return isCollateral; + } + + @JsonProperty(JSON_PROPERTY_IS_COLLATERAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsCollateral(Boolean isCollateral) { + this.isCollateral = isCollateral; + } + /** Return true if this SourceTransferPeerPath object is equal to o. */ @Override public boolean equals(Object o) { @@ -178,12 +205,13 @@ public boolean equals(Object o) { && Objects.equals(this.subType, sourceTransferPeerPath.subType) && Objects.equals(this.id, sourceTransferPeerPath.id) && Objects.equals(this.name, sourceTransferPeerPath.name) - && Objects.equals(this.walletId, sourceTransferPeerPath.walletId); + && Objects.equals(this.walletId, sourceTransferPeerPath.walletId) + && Objects.equals(this.isCollateral, sourceTransferPeerPath.isCollateral); } @Override public int hashCode() { - return Objects.hash(type, subType, id, name, walletId); + return Objects.hash(type, subType, id, name, walletId, isCollateral); } @Override @@ -195,6 +223,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" walletId: ").append(toIndentedString(walletId)).append("\n"); + sb.append(" isCollateral: ").append(toIndentedString(isCollateral)).append("\n"); sb.append("}"); return sb.toString(); } @@ -297,6 +326,19 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `isCollateral` to the URL query string + if (getIsCollateral() != null) { + joiner.add( + String.format( + "%sisCollateral%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIsCollateral()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java new file mode 100644 index 00000000..e67798f5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokenLinkNotMultichainCompatibleHttpError */ +@JsonPropertyOrder({ + TokenLinkNotMultichainCompatibleHttpError.JSON_PROPERTY_MESSAGE, + TokenLinkNotMultichainCompatibleHttpError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenLinkNotMultichainCompatibleHttpError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public TokenLinkNotMultichainCompatibleHttpError() {} + + public TokenLinkNotMultichainCompatibleHttpError message(String message) { + this.message = message; + return this; + } + + /** + * Bad request error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public TokenLinkNotMultichainCompatibleHttpError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this TokenLinkNotMultichainCompatibleHttpError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenLinkNotMultichainCompatibleHttpError tokenLinkNotMultichainCompatibleHttpError = + (TokenLinkNotMultichainCompatibleHttpError) o; + return Objects.equals(this.message, tokenLinkNotMultichainCompatibleHttpError.message) + && Objects.equals(this.code, tokenLinkNotMultichainCompatibleHttpError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenLinkNotMultichainCompatibleHttpError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java b/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java index a66688e0..05a0d1a5 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java @@ -38,6 +38,9 @@ * - Enables the approve function for a smart contract or wallet to withdraw from a designated * wallet. [Learn * more](https://support.fireblocks.io/hc/en-us/articles/4404616097426-Amount-Cap-for-Approve-transactions). + * * `ENABLE_ASSET` - Algorand, DigitalBits, Solana, and Stellar require an on-chain + * transaction to create an asset wallet and enable the deposit address. This transaction is + * automatically created when adding assets on these blockchains at a vault account. */ public enum TransactionOperation { TRANSFER("TRANSFER"), @@ -54,7 +57,9 @@ public enum TransactionOperation { TYPED_MESSAGE("TYPED_MESSAGE"), - APPROVE("APPROVE"); + APPROVE("APPROVE"), + + ENABLE_ASSET("ENABLE_ASSET"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/VaultAsset.java b/src/main/java/com/fireblocks/sdk/model/VaultAsset.java index 51fd01d9..13327c9b 100644 --- a/src/main/java/com/fireblocks/sdk/model/VaultAsset.java +++ b/src/main/java/com/fireblocks/sdk/model/VaultAsset.java @@ -16,7 +16,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -69,7 +68,7 @@ public class VaultAsset { private String staked; public static final String JSON_PROPERTY_TOTAL_STAKED_C_P_U = "totalStakedCPU"; - private BigDecimal totalStakedCPU; + private String totalStakedCPU; public static final String JSON_PROPERTY_TOTAL_STAKED_NETWORK = "totalStakedNetwork"; private String totalStakedNetwork; @@ -284,7 +283,7 @@ public void setStaked(String staked) { this.staked = staked; } - public VaultAsset totalStakedCPU(BigDecimal totalStakedCPU) { + public VaultAsset totalStakedCPU(String totalStakedCPU) { this.totalStakedCPU = totalStakedCPU; return this; } @@ -297,13 +296,13 @@ public VaultAsset totalStakedCPU(BigDecimal totalStakedCPU) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TOTAL_STAKED_C_P_U) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getTotalStakedCPU() { + public String getTotalStakedCPU() { return totalStakedCPU; } @JsonProperty(JSON_PROPERTY_TOTAL_STAKED_C_P_U) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotalStakedCPU(BigDecimal totalStakedCPU) { + public void setTotalStakedCPU(String totalStakedCPU) { this.totalStakedCPU = totalStakedCPU; } diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java index d065eaf7..013b977b 100644 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java @@ -101,6 +101,7 @@ public void listAssetsTest() throws ApiException { String symbol = null; AssetScope scope = null; Boolean deprecated = null; + List ids = null; String pageCursor = null; BigDecimal pageSize = null; String idempotencyKey = null; @@ -111,6 +112,7 @@ public void listAssetsTest() throws ApiException { symbol, scope, deprecated, + ids, pageCursor, pageSize, idempotencyKey); @@ -128,10 +130,11 @@ public void listBlockchainsTest() throws ApiException { String protocol = null; Boolean deprecated = null; Boolean test = null; + List ids = null; String pageCursor = null; BigDecimal pageSize = null; CompletableFuture> response = - api.listBlockchains(protocol, deprecated, test, pageCursor, pageSize); + api.listBlockchains(protocol, deprecated, test, ids, pageCursor, pageSize); } /** diff --git a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java index fdc07355..6de522fd 100644 --- a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java @@ -21,12 +21,17 @@ import com.fireblocks.sdk.model.CollectionLinkDto; import com.fireblocks.sdk.model.CollectionMintRequestDto; import com.fireblocks.sdk.model.CollectionMintResponseDto; +import com.fireblocks.sdk.model.CreateMultichainTokenRequest; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.DeployableAddressResponse; +import com.fireblocks.sdk.model.GetDeployableAddressRequest; import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; +import com.fireblocks.sdk.model.ReissueMultichainTokenRequest; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; import java.math.BigDecimal; +import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -96,6 +101,23 @@ public void getCollectionByIdTest() throws ApiException { CompletableFuture> response = api.getCollectionById(id); } + /** + * Get deterministic address for contract deployment + * + *

Get a deterministic address for contract deployment. The address is derived from the + * contract's bytecode and provided salt. This endpoint is used to get the address of a + * contract that will be deployed in the future. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDeployableAddressTest() throws ApiException { + GetDeployableAddressRequest getDeployableAddressRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.getDeployableAddress(getDeployableAddressRequest, idempotencyKey); + } + /** * Get collections * @@ -161,6 +183,21 @@ public void issueNewTokenTest() throws ApiException { api.issueNewToken(createTokenRequestDto, idempotencyKey); } + /** + * Issue a token on one or more blockchains + * + *

Facilitates the creation of a new token on one or more blockchains. + * + * @throws ApiException if the Api call fails + */ + @Test + public void issueTokenMultiChainTest() throws ApiException { + CreateMultichainTokenRequest createMultichainTokenRequest = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.issueTokenMultiChain(createMultichainTokenRequest, idempotencyKey); + } + /** * Link a contract * @@ -192,6 +229,24 @@ public void mintCollectionTokenTest() throws ApiException { api.mintCollectionToken(collectionMintRequestDto, id, idempotencyKey); } + /** + * Reissue a multichain token + * + *

Reissue a multichain token. This endpoint allows you to reissue a token on one or more + * blockchains. The token must be initially issued using the issueTokenMultiChain endpoint. + * + * @throws ApiException if the Api call fails + */ + @Test + public void reIssueTokenMultiChainTest() throws ApiException { + ReissueMultichainTokenRequest reissueMultichainTokenRequest = null; + String tokenLinkId = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.reIssueTokenMultiChain( + reissueMultichainTokenRequest, tokenLinkId, idempotencyKey); + } + /** * Unlink a token * diff --git a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java index f3be3762..417f7d59 100644 --- a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java @@ -19,6 +19,8 @@ import com.fireblocks.sdk.model.CreateAddressResponse; import com.fireblocks.sdk.model.CreateAssetsRequest; import com.fireblocks.sdk.model.CreateMultipleAccountsRequest; +import com.fireblocks.sdk.model.CreateMultipleDepositAddressesJobStatus; +import com.fireblocks.sdk.model.CreateMultipleDepositAddressesRequest; import com.fireblocks.sdk.model.CreateVaultAccountRequest; import com.fireblocks.sdk.model.CreateVaultAssetResponse; import com.fireblocks.sdk.model.GetMaxSpendableAmountResponse; @@ -99,6 +101,23 @@ public void createMultipleAccountsTest() throws ApiException { api.createMultipleAccounts(createMultipleAccountsRequest, idempotencyKey); } + /** + * Bulk creation of new deposit addresses + * + *

Create multiple deposit address by running an async job. </br> **Note**: - We limit + * accounts to 10k per operation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createMultipleDepositAddressesTest() throws ApiException { + CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createMultipleDepositAddresses( + createMultipleDepositAddressesRequest, idempotencyKey); + } + /** * Create a new vault account * @@ -170,6 +189,20 @@ public void getAssetWalletsTest() throws ApiException { api.getAssetWallets(totalAmountLargerThan, assetId, orderBy, before, after, limit); } + /** + * Get job status of bulk creation of new deposit addresses + * + *

Returns the status of bulk creation of new deposit addresses job and the result or error + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCreateMultipleDepositAddressesJobStatusTest() throws ApiException { + String jobId = null; + CompletableFuture> response = + api.getCreateMultipleDepositAddressesJobStatus(jobId); + } + /** * Get the maximum spendable amount in a single transaction. * diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java index fbebede4..6dda5ef6 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java @@ -19,6 +19,7 @@ import com.fireblocks.sdk.model.NotificationPaginatedResponse; import com.fireblocks.sdk.model.NotificationStatus; import com.fireblocks.sdk.model.NotificationWithData; +import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; import com.fireblocks.sdk.model.WebhookEvent; @@ -164,6 +165,25 @@ public void resendNotificationByIdTest() throws ApiException { api.resendNotificationById(webhookId, notificationId, idempotencyKey); } + /** + * Resend notifications by resource Id + * + *

Resend notifications by resource Id **Note:** These endpoints are currently in beta and + * might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void resendNotificationsByResourceIdTest() throws ApiException { + ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest = null; + String webhookId = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.resendNotificationsByResourceId( + resendNotificationsByResourceIdRequest, webhookId, idempotencyKey); + } + /** * Update webhook * diff --git a/src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.java b/src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.java new file mode 100644 index 00000000..c490d0e7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.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 AddressNotAvailableError */ +public class AddressNotAvailableErrorTest { + private final AddressNotAvailableError model = new AddressNotAvailableError(); + + /** Model tests for AddressNotAvailableError */ + @Test + public void testAddressNotAvailableError() { + // TODO: test AddressNotAvailableError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParamsTest.java new file mode 100644 index 00000000..df2524eb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParamsTest.java @@ -0,0 +1,40 @@ +/* + * 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 CreateMultichainTokenRequestCreateParams */ +public class CreateMultichainTokenRequestCreateParamsTest { + private final CreateMultichainTokenRequestCreateParams model = + new CreateMultichainTokenRequestCreateParams(); + + /** Model tests for CreateMultichainTokenRequestCreateParams */ + @Test + public void testCreateMultichainTokenRequestCreateParams() { + // TODO: test CreateMultichainTokenRequestCreateParams + } + + /** Test the property 'contractId' */ + @Test + public void contractIdTest() { + // TODO: test contractId + } + + /** Test the property 'deployFunctionParams' */ + @Test + public void deployFunctionParamsTest() { + // TODO: test deployFunctionParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestTest.java new file mode 100644 index 00000000..aaf1bd37 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestTest.java @@ -0,0 +1,75 @@ +/* + * 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 CreateMultichainTokenRequest */ +public class CreateMultichainTokenRequestTest { + private final CreateMultichainTokenRequest model = new CreateMultichainTokenRequest(); + + /** Model tests for CreateMultichainTokenRequest */ + @Test + public void testCreateMultichainTokenRequest() { + // TODO: test CreateMultichainTokenRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'createParams' */ + @Test + public void createParamsTest() { + // TODO: test createParams + } + + /** Test the property 'salt' */ + @Test + public void saltTest() { + // TODO: test salt + } + + /** Test the property 'chains' */ + @Test + public void chainsTest() { + // TODO: test chains + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatusTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatusTest.java new file mode 100644 index 00000000..f8d2a991 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesJobStatusTest.java @@ -0,0 +1,46 @@ +/* + * 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 CreateMultipleDepositAddressesJobStatus */ +public class CreateMultipleDepositAddressesJobStatusTest { + private final CreateMultipleDepositAddressesJobStatus model = + new CreateMultipleDepositAddressesJobStatus(); + + /** Model tests for CreateMultipleDepositAddressesJobStatus */ + @Test + public void testCreateMultipleDepositAddressesJobStatus() { + // TODO: test CreateMultipleDepositAddressesJobStatus + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'addresses' */ + @Test + public void addressesTest() { + // TODO: test addresses + } + + /** Test the property 'errorMessage' */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequestTest.java new file mode 100644 index 00000000..522c77db --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequestTest.java @@ -0,0 +1,64 @@ +/* + * 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 CreateMultipleDepositAddressesRequest */ +public class CreateMultipleDepositAddressesRequestTest { + private final CreateMultipleDepositAddressesRequest model = + new CreateMultipleDepositAddressesRequest(); + + /** Model tests for CreateMultipleDepositAddressesRequest */ + @Test + public void testCreateMultipleDepositAddressesRequest() { + // TODO: test CreateMultipleDepositAddressesRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'count' */ + @Test + public void countTest() { + // TODO: test count + } + + /** Test the property 'descriptions' */ + @Test + public void descriptionsTest() { + // TODO: test descriptions + } + + /** Test the property 'vaultAccountToCopyDescFrom' */ + @Test + public void vaultAccountToCopyDescFromTest() { + // TODO: test vaultAccountToCopyDescFrom + } + + /** Test the property 'vaultAccountToCopyDescFromIndex' */ + @Test + public void vaultAccountToCopyDescFromIndexTest() { + // TODO: test vaultAccountToCopyDescFromIndex + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.java new file mode 100644 index 00000000..35559e45 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.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 DeployableAddressResponse */ +public class DeployableAddressResponseTest { + private final DeployableAddressResponse model = new DeployableAddressResponse(); + + /** Model tests for DeployableAddressResponse */ + @Test + public void testDeployableAddressResponse() { + // TODO: test DeployableAddressResponse + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java b/src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java new file mode 100644 index 00000000..8c292bdf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.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 DeployedContractNotFoundError */ +public class DeployedContractNotFoundErrorTest { + private final DeployedContractNotFoundError model = new DeployedContractNotFoundError(); + + /** Model tests for DeployedContractNotFoundError */ + @Test + public void testDeployedContractNotFoundError() { + // TODO: test DeployedContractNotFoundError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathTest.java b/src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathTest.java index f3c3f790..915f3f72 100644 --- a/src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathTest.java @@ -60,4 +60,10 @@ public void walletIdTest() { public void oneTimeAddressTest() { // TODO: test oneTimeAddress } + + /** Test the property 'isCollateral' */ + @Test + public void isCollateralTest() { + // TODO: test isCollateral + } } diff --git a/src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestTest.java b/src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestTest.java new file mode 100644 index 00000000..407f9e34 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestTest.java @@ -0,0 +1,51 @@ +/* + * 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 GetDeployableAddressRequest */ +public class GetDeployableAddressRequestTest { + private final GetDeployableAddressRequest model = new GetDeployableAddressRequest(); + + /** Model tests for GetDeployableAddressRequest */ + @Test + public void testGetDeployableAddressRequest() { + // TODO: test GetDeployableAddressRequest + } + + /** Test the property 'chainDescriptor' */ + @Test + public void chainDescriptorTest() { + // TODO: test chainDescriptor + } + + /** Test the property 'templateId' */ + @Test + public void templateIdTest() { + // TODO: test templateId + } + + /** Test the property 'initParams' */ + @Test + public void initParamsTest() { + // TODO: test initParams + } + + /** Test the property 'salt' */ + @Test + public void saltTest() { + // TODO: test salt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java b/src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java new file mode 100644 index 00000000..7ae59b88 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.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 InvalidParamaterValueError */ +public class InvalidParamaterValueErrorTest { + private final InvalidParamaterValueError model = new InvalidParamaterValueError(); + + /** Model tests for InvalidParamaterValueError */ + @Test + public void testInvalidParamaterValueError() { + // TODO: test InvalidParamaterValueError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NewAddressTest.java b/src/test/java/com/fireblocks/sdk/model/NewAddressTest.java new file mode 100644 index 00000000..e2400b34 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NewAddressTest.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 NewAddress */ +public class NewAddressTest { + private final NewAddress model = new NewAddress(); + + /** Model tests for NewAddress */ + @Test + public void testNewAddress() { + // TODO: test NewAddress + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'index' */ + @Test + public void indexTest() { + // TODO: test index + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestTest.java new file mode 100644 index 00000000..e279774b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestTest.java @@ -0,0 +1,57 @@ +/* + * 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 ReissueMultichainTokenRequest */ +public class ReissueMultichainTokenRequestTest { + private final ReissueMultichainTokenRequest model = new ReissueMultichainTokenRequest(); + + /** Model tests for ReissueMultichainTokenRequest */ + @Test + public void testReissueMultichainTokenRequest() { + // TODO: test ReissueMultichainTokenRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'chains' */ + @Test + public void chainsTest() { + // TODO: test chains + } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequestTest.java new file mode 100644 index 00000000..cb1acebd --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequestTest.java @@ -0,0 +1,40 @@ +/* + * 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 ResendNotificationsByResourceIdRequest */ +public class ResendNotificationsByResourceIdRequestTest { + private final ResendNotificationsByResourceIdRequest model = + new ResendNotificationsByResourceIdRequest(); + + /** Model tests for ResendNotificationsByResourceIdRequest */ + @Test + public void testResendNotificationsByResourceIdRequest() { + // TODO: test ResendNotificationsByResourceIdRequest + } + + /** Test the property 'resourceId' */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + + /** Test the property 'excludeStatuses' */ + @Test + public void excludeStatusesTest() { + // TODO: test excludeStatuses + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SourceTransferPeerPathTest.java b/src/test/java/com/fireblocks/sdk/model/SourceTransferPeerPathTest.java index ffa9b12a..9cc4803b 100644 --- a/src/test/java/com/fireblocks/sdk/model/SourceTransferPeerPathTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SourceTransferPeerPathTest.java @@ -54,4 +54,10 @@ public void nameTest() { public void walletIdTest() { // TODO: test walletId } + + /** Test the property 'isCollateral' */ + @Test + public void isCollateralTest() { + // TODO: test isCollateral + } } diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java new file mode 100644 index 00000000..66a315a9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java @@ -0,0 +1,40 @@ +/* + * 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 TokenLinkNotMultichainCompatibleHttpError */ +public class TokenLinkNotMultichainCompatibleHttpErrorTest { + private final TokenLinkNotMultichainCompatibleHttpError model = + new TokenLinkNotMultichainCompatibleHttpError(); + + /** Model tests for TokenLinkNotMultichainCompatibleHttpError */ + @Test + public void testTokenLinkNotMultichainCompatibleHttpError() { + // TODO: test TokenLinkNotMultichainCompatibleHttpError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +}