diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 548eeecb..d9996178 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -51,7 +51,10 @@ docs/AssetMedia.md docs/AssetMediaAttributes.md docs/AssetMetadata.md docs/AssetMetadataDto.md +docs/AssetMetadataRequest.md docs/AssetNotFoundErrorResponse.md +docs/AssetNote.md +docs/AssetNoteRequest.md docs/AssetOnchain.md docs/AssetPriceForbiddenErrorResponse.md docs/AssetPriceNotFoundErrorResponse.md @@ -110,6 +113,13 @@ docs/ConsoleUserApi.md docs/ContractAbiResponseDto.md docs/ContractAbiResponseDtoAbiInner.md docs/ContractAttributes.md +docs/ContractDataDecodeDataType.md +docs/ContractDataDecodeError.md +docs/ContractDataDecodeRequest.md +docs/ContractDataDecodeRequestData.md +docs/ContractDataDecodeResponseParams.md +docs/ContractDataDecodedResponse.md +docs/ContractDataLogDataParam.md docs/ContractDeployRequest.md docs/ContractDeployResponse.md docs/ContractDoc.md @@ -155,11 +165,13 @@ docs/CreateMultichainTokenRequestCreateParams.md docs/CreateMultipleAccountsRequest.md docs/CreateMultipleDepositAddressesJobStatus.md docs/CreateMultipleDepositAddressesRequest.md +docs/CreateMultipleVaultAccountsJobStatus.md docs/CreateNcwConnectionRequest.md docs/CreateNetworkIdRequest.md docs/CreatePayoutRequest.md docs/CreateSigningKeyDto.md docs/CreateSigningKeyDtoProofOfOwnership.md +docs/CreateTagRequest.md docs/CreateTokenRequestDto.md docs/CreateTokenRequestDtoCreateParams.md docs/CreateTransactionResponse.md @@ -508,6 +520,9 @@ docs/SwapProvidersPaginatedResponse.md docs/SwapRequiredAction.md docs/SwapRequiredActionsEnum.md docs/SystemMessageInfo.md +docs/Tag.md +docs/TagsApi.md +docs/TagsPagedResponse.md docs/Task.md docs/TemplatesPaginatedResponse.md docs/ThirdPartyRouting.md @@ -599,8 +614,10 @@ docs/UnmanagedWallet.md docs/UnspentInput.md docs/UnspentInputsResponse.md docs/UnstakeRequest.md +docs/UpdateAssetUserMetadataRequest.md docs/UpdateCallbackHandlerRequest.md docs/UpdateCallbackHandlerResponse.md +docs/UpdateTagRequest.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md @@ -622,6 +639,7 @@ docs/Validator.md docs/VaultAccount.md docs/VaultAccountsPagedResponse.md docs/VaultAccountsPagedResponsePaging.md +docs/VaultAccountsTagAttachmentsRequest.md docs/VaultActionStatus.md docs/VaultAsset.md docs/VaultWalletAddress.md @@ -704,6 +722,7 @@ src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java src/main/java/com/fireblocks/sdk/api/StakingApi.java src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java +src/main/java/com/fireblocks/sdk/api/TagsApi.java src/main/java/com/fireblocks/sdk/api/TokenizationApi.java src/main/java/com/fireblocks/sdk/api/TransactionsApi.java src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java @@ -758,7 +777,10 @@ src/main/java/com/fireblocks/sdk/model/AssetMedia.java src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java src/main/java/com/fireblocks/sdk/model/AssetMetadata.java src/main/java/com/fireblocks/sdk/model/AssetMetadataDto.java +src/main/java/com/fireblocks/sdk/model/AssetMetadataRequest.java src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java +src/main/java/com/fireblocks/sdk/model/AssetNote.java +src/main/java/com/fireblocks/sdk/model/AssetNoteRequest.java src/main/java/com/fireblocks/sdk/model/AssetOnchain.java src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java @@ -811,6 +833,13 @@ src/main/java/com/fireblocks/sdk/model/ConsoleUser.java src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInner.java src/main/java/com/fireblocks/sdk/model/ContractAttributes.java +src/main/java/com/fireblocks/sdk/model/ContractDataDecodeDataType.java +src/main/java/com/fireblocks/sdk/model/ContractDataDecodeError.java +src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequest.java +src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequestData.java +src/main/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParams.java +src/main/java/com/fireblocks/sdk/model/ContractDataDecodedResponse.java +src/main/java/com/fireblocks/sdk/model/ContractDataLogDataParam.java src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java src/main/java/com/fireblocks/sdk/model/ContractDeployResponse.java src/main/java/com/fireblocks/sdk/model/ContractDoc.java @@ -852,11 +881,13 @@ src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestCreateParams. 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/CreateMultipleVaultAccountsJobStatus.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 src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnership.java +src/main/java/com/fireblocks/sdk/model/CreateTagRequest.java src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java src/main/java/com/fireblocks/sdk/model/CreateTransactionResponse.java @@ -1185,6 +1216,8 @@ src/main/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/SwapRequiredAction.java src/main/java/com/fireblocks/sdk/model/SwapRequiredActionsEnum.java src/main/java/com/fireblocks/sdk/model/SystemMessageInfo.java +src/main/java/com/fireblocks/sdk/model/Tag.java +src/main/java/com/fireblocks/sdk/model/TagsPagedResponse.java src/main/java/com/fireblocks/sdk/model/Task.java src/main/java/com/fireblocks/sdk/model/TemplatesPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/ThirdPartyRouting.java @@ -1273,8 +1306,10 @@ src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java src/main/java/com/fireblocks/sdk/model/UnspentInput.java src/main/java/com/fireblocks/sdk/model/UnspentInputsResponse.java src/main/java/com/fireblocks/sdk/model/UnstakeRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequest.java src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java +src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.java src/main/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDto.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountRequest.java @@ -1294,6 +1329,7 @@ src/main/java/com/fireblocks/sdk/model/Validator.java src/main/java/com/fireblocks/sdk/model/VaultAccount.java src/main/java/com/fireblocks/sdk/model/VaultAccountsPagedResponse.java src/main/java/com/fireblocks/sdk/model/VaultAccountsPagedResponsePaging.java +src/main/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequest.java src/main/java/com/fireblocks/sdk/model/VaultActionStatus.java src/main/java/com/fireblocks/sdk/model/VaultAsset.java src/main/java/com/fireblocks/sdk/model/VaultWalletAddress.java @@ -1351,6 +1387,7 @@ src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java src/test/java/com/fireblocks/sdk/api/StakingApiTest.java src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java +src/test/java/com/fireblocks/sdk/api/TagsApiTest.java src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java @@ -1402,8 +1439,11 @@ src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java src/test/java/com/fireblocks/sdk/model/AssetMediaTest.java src/test/java/com/fireblocks/sdk/model/AssetMetadataDtoTest.java +src/test/java/com/fireblocks/sdk/model/AssetMetadataRequestTest.java src/test/java/com/fireblocks/sdk/model/AssetMetadataTest.java src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/AssetNoteRequestTest.java +src/test/java/com/fireblocks/sdk/model/AssetNoteTest.java src/test/java/com/fireblocks/sdk/model/AssetOnchainTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponseTest.java @@ -1457,6 +1497,13 @@ src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInnerTest.java src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/ContractAttributesTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataDecodeDataTypeTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataDecodeErrorTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestDataTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParamsTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataDecodedResponseTest.java +src/test/java/com/fireblocks/sdk/model/ContractDataLogDataParamTest.java src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java src/test/java/com/fireblocks/sdk/model/ContractDeployResponseTest.java src/test/java/com/fireblocks/sdk/model/ContractDocTest.java @@ -1498,11 +1545,13 @@ 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/CreateMultipleVaultAccountsJobStatusTest.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 src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnershipTest.java src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java +src/test/java/com/fireblocks/sdk/model/CreateTagRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/CreateTransactionResponseTest.java @@ -1831,6 +1880,8 @@ src/test/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/SwapRequiredActionTest.java src/test/java/com/fireblocks/sdk/model/SwapRequiredActionsEnumTest.java src/test/java/com/fireblocks/sdk/model/SystemMessageInfoTest.java +src/test/java/com/fireblocks/sdk/model/TagTest.java +src/test/java/com/fireblocks/sdk/model/TagsPagedResponseTest.java src/test/java/com/fireblocks/sdk/model/TaskTest.java src/test/java/com/fireblocks/sdk/model/TemplatesPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/ThirdPartyRoutingTest.java @@ -1919,8 +1970,10 @@ src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java src/test/java/com/fireblocks/sdk/model/UnspentInputTest.java src/test/java/com/fireblocks/sdk/model/UnspentInputsResponseTest.java src/test/java/com/fireblocks/sdk/model/UnstakeRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java +src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDtoTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountRequestTest.java @@ -1940,6 +1993,7 @@ src/test/java/com/fireblocks/sdk/model/ValidatorTest.java src/test/java/com/fireblocks/sdk/model/VaultAccountTest.java src/test/java/com/fireblocks/sdk/model/VaultAccountsPagedResponsePagingTest.java src/test/java/com/fireblocks/sdk/model/VaultAccountsPagedResponseTest.java +src/test/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequestTest.java src/test/java/com/fireblocks/sdk/model/VaultActionStatusTest.java src/test/java/com/fireblocks/sdk/model/VaultAssetTest.java src/test/java/com/fireblocks/sdk/model/VaultWalletAddressTest.java diff --git a/README.md b/README.md index dd2d51de..a45e6007 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.4.0 + 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.4.0" +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.4.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -152,6 +152,7 @@ Class | Method | HTTP request | Description *BlockchainsAssetsApi* | [**listBlockchains**](docs/BlockchainsAssetsApi.md#listBlockchains) | **GET** /blockchains | List blockchains *BlockchainsAssetsApi* | [**registerNewAsset**](docs/BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset *BlockchainsAssetsApi* | [**setAssetPrice**](docs/BlockchainsAssetsApi.md#setAssetPrice) | **POST** /assets/prices/{id} | Set asset price +*BlockchainsAssetsApi* | [**updateAssetUserMetadata**](docs/BlockchainsAssetsApi.md#updateAssetUserMetadata) | **PATCH** /assets/{id} | Update the user’s metadata for an asset *ComplianceApi* | [**getAmlPostScreeningPolicy**](docs/ComplianceApi.md#getAmlPostScreeningPolicy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy *ComplianceApi* | [**getAmlScreeningPolicy**](docs/ComplianceApi.md#getAmlScreeningPolicy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy *ComplianceApi* | [**getPostScreeningPolicy**](docs/ComplianceApi.md#getPostScreeningPolicy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy @@ -165,6 +166,7 @@ Class | Method | HTTP request | Description *ComplianceScreeningConfigurationApi* | [**getScreeningConfiguration**](docs/ComplianceScreeningConfigurationApi.md#getScreeningConfiguration) | **GET** /screening/travel_rule/policy_configuration | Get Travel Rule Screening Policy Configuration *ConsoleUserApi* | [**createConsoleUser**](docs/ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | Create console user *ConsoleUserApi* | [**getConsoleUsers**](docs/ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | Get console users +*ContractInteractionsApi* | [**decodeContractData**](docs/ContractInteractionsApi.md#decodeContractData) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/decode | Decode a function call data, error, or event log *ContractInteractionsApi* | [**getDeployedContractAbi**](docs/ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI *ContractInteractionsApi* | [**getTransactionReceipt**](docs/ContractInteractionsApi.md#getTransactionReceipt) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt | Get transaction receipt *ContractInteractionsApi* | [**readCallFunction**](docs/ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract @@ -343,6 +345,11 @@ Class | Method | HTTP request | Description *SwapBetaApi* | [**getSwapOperationById**](docs/SwapBetaApi.md#getSwapOperationById) | **GET** /swap/operations/{operationId} | Get operation details *SwapBetaApi* | [**getSwapOperations**](docs/SwapBetaApi.md#getSwapOperations) | **GET** /swap/operations | Get Operations list *SwapBetaApi* | [**getSwapProviders**](docs/SwapBetaApi.md#getSwapProviders) | **GET** /swap/providers | Get Providers List +*TagsApi* | [**createTag**](docs/TagsApi.md#createTag) | **POST** /tags | Create a tag +*TagsApi* | [**deleteTag**](docs/TagsApi.md#deleteTag) | **DELETE** /tags/{tagId} | Delete a tag +*TagsApi* | [**getTag**](docs/TagsApi.md#getTag) | **GET** /tags/{tagId} | Get a tag +*TagsApi* | [**getTags**](docs/TagsApi.md#getTags) | **GET** /tags | Get list of tags +*TagsApi* | [**updateTag**](docs/TagsApi.md#updateTag) | **PATCH** /tags/{tagId} | Update a tag *TokenizationApi* | [**burnCollectionToken**](docs/TokenizationApi.md#burnCollectionToken) | **POST** /tokenization/collections/{id}/tokens/burn | Burn tokens *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 @@ -385,14 +392,17 @@ Class | Method | HTTP request | Description *UserGroupsBetaApi* | [**updateUserGroup**](docs/UserGroupsBetaApi.md#updateUserGroup) | **PUT** /management/user_groups/{groupId} | Update user group *UsersApi* | [**getUsers**](docs/UsersApi.md#getUsers) | **GET** /users | List users *VaultsApi* | [**activateAssetForVaultAccount**](docs/VaultsApi.md#activateAssetForVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/activate | Activate a wallet in a vault account +*VaultsApi* | [**attachTagsToVaultAccounts**](docs/VaultsApi.md#attachTagsToVaultAccounts) | **POST** /vault/accounts/attached_tags/attach | Attach tags to a vault accounts *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* | [**detachTagsFromVaultAccounts**](docs/VaultsApi.md#detachTagsFromVaultAccounts) | **POST** /vault/accounts/attached_tags/detach | Detach tags from a vault accounts *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* | [**getCreateMultipleVaultAccountsJobStatus**](docs/VaultsApi.md#getCreateMultipleVaultAccountsJobStatus) | **GET** /vault/accounts/bulk/{jobId} | Get job status of bulk creation of new vault accounts *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 @@ -474,7 +484,10 @@ Class | Method | HTTP request | Description - [AssetMediaAttributes](docs/AssetMediaAttributes.md) - [AssetMetadata](docs/AssetMetadata.md) - [AssetMetadataDto](docs/AssetMetadataDto.md) + - [AssetMetadataRequest](docs/AssetMetadataRequest.md) - [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md) + - [AssetNote](docs/AssetNote.md) + - [AssetNoteRequest](docs/AssetNoteRequest.md) - [AssetOnchain](docs/AssetOnchain.md) - [AssetPriceForbiddenErrorResponse](docs/AssetPriceForbiddenErrorResponse.md) - [AssetPriceNotFoundErrorResponse](docs/AssetPriceNotFoundErrorResponse.md) @@ -527,6 +540,13 @@ Class | Method | HTTP request | Description - [ContractAbiResponseDto](docs/ContractAbiResponseDto.md) - [ContractAbiResponseDtoAbiInner](docs/ContractAbiResponseDtoAbiInner.md) - [ContractAttributes](docs/ContractAttributes.md) + - [ContractDataDecodeDataType](docs/ContractDataDecodeDataType.md) + - [ContractDataDecodeError](docs/ContractDataDecodeError.md) + - [ContractDataDecodeRequest](docs/ContractDataDecodeRequest.md) + - [ContractDataDecodeRequestData](docs/ContractDataDecodeRequestData.md) + - [ContractDataDecodeResponseParams](docs/ContractDataDecodeResponseParams.md) + - [ContractDataDecodedResponse](docs/ContractDataDecodedResponse.md) + - [ContractDataLogDataParam](docs/ContractDataLogDataParam.md) - [ContractDeployRequest](docs/ContractDeployRequest.md) - [ContractDeployResponse](docs/ContractDeployResponse.md) - [ContractDoc](docs/ContractDoc.md) @@ -568,11 +588,13 @@ Class | Method | HTTP request | Description - [CreateMultipleAccountsRequest](docs/CreateMultipleAccountsRequest.md) - [CreateMultipleDepositAddressesJobStatus](docs/CreateMultipleDepositAddressesJobStatus.md) - [CreateMultipleDepositAddressesRequest](docs/CreateMultipleDepositAddressesRequest.md) + - [CreateMultipleVaultAccountsJobStatus](docs/CreateMultipleVaultAccountsJobStatus.md) - [CreateNcwConnectionRequest](docs/CreateNcwConnectionRequest.md) - [CreateNetworkIdRequest](docs/CreateNetworkIdRequest.md) - [CreatePayoutRequest](docs/CreatePayoutRequest.md) - [CreateSigningKeyDto](docs/CreateSigningKeyDto.md) - [CreateSigningKeyDtoProofOfOwnership](docs/CreateSigningKeyDtoProofOfOwnership.md) + - [CreateTagRequest](docs/CreateTagRequest.md) - [CreateTokenRequestDto](docs/CreateTokenRequestDto.md) - [CreateTokenRequestDtoCreateParams](docs/CreateTokenRequestDtoCreateParams.md) - [CreateTransactionResponse](docs/CreateTransactionResponse.md) @@ -901,6 +923,8 @@ Class | Method | HTTP request | Description - [SwapRequiredAction](docs/SwapRequiredAction.md) - [SwapRequiredActionsEnum](docs/SwapRequiredActionsEnum.md) - [SystemMessageInfo](docs/SystemMessageInfo.md) + - [Tag](docs/Tag.md) + - [TagsPagedResponse](docs/TagsPagedResponse.md) - [Task](docs/Task.md) - [TemplatesPaginatedResponse](docs/TemplatesPaginatedResponse.md) - [ThirdPartyRouting](docs/ThirdPartyRouting.md) @@ -989,8 +1013,10 @@ Class | Method | HTTP request | Description - [UnspentInput](docs/UnspentInput.md) - [UnspentInputsResponse](docs/UnspentInputsResponse.md) - [UnstakeRequest](docs/UnstakeRequest.md) + - [UpdateAssetUserMetadataRequest](docs/UpdateAssetUserMetadataRequest.md) - [UpdateCallbackHandlerRequest](docs/UpdateCallbackHandlerRequest.md) - [UpdateCallbackHandlerResponse](docs/UpdateCallbackHandlerResponse.md) + - [UpdateTagRequest](docs/UpdateTagRequest.md) - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) @@ -1010,6 +1036,7 @@ Class | Method | HTTP request | Description - [VaultAccount](docs/VaultAccount.md) - [VaultAccountsPagedResponse](docs/VaultAccountsPagedResponse.md) - [VaultAccountsPagedResponsePaging](docs/VaultAccountsPagedResponsePaging.md) + - [VaultAccountsTagAttachmentsRequest](docs/VaultAccountsTagAttachmentsRequest.md) - [VaultActionStatus](docs/VaultActionStatus.md) - [VaultAsset](docs/VaultAsset.md) - [VaultWalletAddress](docs/VaultWalletAddress.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index dae101de..8db37290 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -150,210 +150,6 @@ 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: | - Create multiple vault accounts by running an async job.
- **Note**: - - These endpoints are currently in beta and might be subject to changes. - - We limit accounts to 10k per operation and 200k per customer during beta testing. - operationId: createMultipleAccounts - 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/CreateMultipleAccountsRequest' - 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 vault accounts - tags: - - Vaults - x-rate-limit-category: write - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.vaults.createMultipleAccounts(vaultsApiCreateMultipleAccountsRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response = fireblocks.vaults().createMultipleAccounts(createMultipleAccountsRequest,\ - \ idempotencyKey);" - name: Fireblocks SDK Java example - - language: python - code: "response = fireblocks.vaults.create_multiple_accounts(create_multiple_accounts_request,\ - \ idempotency_key);" - name: Fireblocks SDK Python example - x-codeSamples: - - lang: TypeScript - source: "const response: Promise> = fireblocks.vaults.createMultipleAccounts(vaultsApiCreateMultipleAccountsRequest);" - - lang: Java - source: "CompletableFuture> response = fireblocks.vaults().createMultipleAccounts(createMultipleAccountsRequest,\ - \ idempotencyKey);" - - lang: Python - source: "response = fireblocks.vaults.create_multiple_accounts(create_multiple_accounts_request,\ - \ idempotency_key);" - x-content-type: application/json - x-accepts: application/json /vault/accounts_paged: get: description: Gets all vault accounts in your workspace. This endpoint returns @@ -426,6 +222,18 @@ paths: minimum: 1 type: number style: form + - description: List of tag IDs to filter vault accounts. + explode: true + in: query + name: tagIds + required: false + schema: + items: + format: uuid + type: string + maxItems: 100 + type: array + style: form responses: "200": content: @@ -455,12 +263,12 @@ paths: - language: java code: "CompletableFuture> response\ \ = fireblocks.vaults().getPagedVaultAccounts(namePrefix, nameSuffix,\ - \ minAmountThreshold, assetId, orderBy, before, after, limit);" + \ minAmountThreshold, assetId, orderBy, before, after, limit, tagIds);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.vaults.get_paged_vault_accounts(name_prefix,\ \ name_suffix, min_amount_threshold, asset_id, order_by, before, after,\ - \ limit);" + \ limit, tag_ids);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -469,11 +277,11 @@ paths: - lang: Java source: "CompletableFuture> response\ \ = fireblocks.vaults().getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold,\ - \ assetId, orderBy, before, after, limit);" + \ assetId, orderBy, before, after, limit, tagIds);" - lang: Python source: "response = fireblocks.vaults.get_paged_vault_accounts(name_prefix,\ \ name_suffix, min_amount_threshold, asset_id, order_by, before, after,\ - \ limit);" + \ limit, tag_ids);" x-accepts: application/json /vault/accounts/{vaultAccountId}: get: @@ -2171,6 +1979,383 @@ paths: source: "response = fireblocks.vaults.get_unspent_inputs(vault_account_id,\ \ asset_id);" x-accepts: application/json + /vault/accounts/bulk: + post: + description: | + Create multiple vault accounts by running an async job.
+ **Note**: + - These endpoints are currently in beta and might be subject to changes. + - We limit accounts to 10k per operation and 200k per customer during beta testing. + Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + operationId: createMultipleAccounts + 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/CreateMultipleAccountsRequest' + 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 vault accounts + tags: + - Vaults + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.vaults.createMultipleAccounts(vaultsApiCreateMultipleAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().createMultipleAccounts(createMultipleAccountsRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.vaults.create_multiple_accounts(create_multiple_accounts_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.vaults.createMultipleAccounts(vaultsApiCreateMultipleAccountsRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.vaults().createMultipleAccounts(createMultipleAccountsRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.vaults.create_multiple_accounts(create_multiple_accounts_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /vault/accounts/bulk/{jobId}: + get: + description: | + Returns the status of bulk creation of new vault accounts job and the result or error + Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + operationId: getCreateMultipleVaultAccountsJobStatus + 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/CreateMultipleVaultAccountsJobStatus' + 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 vault accounts + tags: + - Vaults + x-rate-limit-category: async + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.vaults.getCreateMultipleVaultAccountsJobStatus(vaultsApiGetCreateMultipleVaultAccountsJobStatusRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.vaults().getCreateMultipleVaultAccountsJobStatus(jobId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.vaults.get_create_multiple_vault_accounts_job_status(job_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.vaults.getCreateMultipleVaultAccountsJobStatus(vaultsApiGetCreateMultipleVaultAccountsJobStatusRequest);" + - lang: Java + source: CompletableFuture> + response = fireblocks.vaults().getCreateMultipleVaultAccountsJobStatus(jobId); + - lang: Python + source: response = fireblocks.vaults.get_create_multiple_vault_accounts_job_status(job_id); + 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. + Endpoint Permission: Admin, Non-Signing Admin. + 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-rate-limit-category: async + 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/attached_tags/attach: + post: + description: Attach one or more tags to the requested vault accounts. + operationId: attachTagsToVaultAccounts + 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/VaultAccountsTagAttachmentsRequest' + required: true + responses: + "204": + description: Tags were attached successfully + summary: Attach tags to a vault accounts + tags: + - Vaults + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.vaults.attachTagsToVaultAccounts(vaultsApiAttachTagsToVaultAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().attachTagsToVaultAccounts(vaultAccountsTagAttachmentsRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.vaults.attach_tags_to_vault_accounts(vault_accounts_tag_attachments_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.vaults.attachTagsToVaultAccounts(vaultsApiAttachTagsToVaultAccountsRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.vaults().attachTagsToVaultAccounts(vaultAccountsTagAttachmentsRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.vaults.attach_tags_to_vault_accounts(vault_accounts_tag_attachments_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /vault/accounts/attached_tags/detach: + post: + description: Detach one or more tags from the requested vault account. + operationId: detachTagsFromVaultAccounts + 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/VaultAccountsTagAttachmentsRequest' + required: true + responses: + "204": + description: Tags were detached successfully + summary: Detach tags from a vault accounts + tags: + - Vaults + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.vaults.detachTagsFromVaultAccounts(vaultsApiDetachTagsFromVaultAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.vaults().detachTagsFromVaultAccounts(vaultAccountsTagAttachmentsRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.vaults.detach_tags_from_vault_accounts(vault_accounts_tag_attachments_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.vaults.detachTagsFromVaultAccounts(vaultsApiDetachTagsFromVaultAccountsRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.vaults().detachTagsFromVaultAccounts(vaultAccountsTagAttachmentsRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.vaults.detach_tags_from_vault_accounts(vault_accounts_tag_attachments_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 + Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + 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-rate-limit-category: read + 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/public_key_info: get: description: Gets the public key information based on derivation path and signing @@ -2619,6 +2804,7 @@ paths: summary: Retrieve supported assets tags: - Embedded Wallets + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -2727,6 +2913,7 @@ paths: summary: List wallets tags: - Embedded Wallets + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -2791,6 +2978,7 @@ paths: summary: Create a new wallet tags: - Embedded Wallets + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -2846,6 +3034,7 @@ paths: summary: Get a wallet tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -2921,6 +3110,7 @@ paths: summary: Retrieve asset tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -3011,6 +3201,7 @@ paths: summary: Add asset to account tags: - Embedded Wallets + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -3090,6 +3281,7 @@ paths: summary: Retrieve asset balance tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -3182,6 +3374,7 @@ paths: summary: Refresh asset balance tags: - Embedded Wallets + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -3316,6 +3509,7 @@ paths: summary: Retrieve asset addresses tags: - Embedded Wallets + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -3391,6 +3585,7 @@ paths: summary: Create a new account tags: - Embedded Wallets + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -3461,6 +3656,7 @@ paths: summary: Get a account tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -3523,6 +3719,7 @@ paths: summary: Get wallet Latest Backup details tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -3591,6 +3788,7 @@ paths: summary: Get Embedded Wallet Device tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -3662,6 +3860,7 @@ paths: summary: Get device key setup state tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -3774,6 +3973,7 @@ paths: summary: Get the public key for a derivation path tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: javascript @@ -3898,6 +4098,7 @@ paths: summary: Get the public key of an asset tags: - Embedded Wallets + x-rate-limit-category: read x-readme: code-samples: - language: javascript @@ -4024,6 +4225,7 @@ paths: tags: - Embedded Wallets x-internal: true + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -5360,6 +5562,7 @@ paths: summary: Get a network connection tags: - Network connections + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -5572,6 +5775,7 @@ paths: summary: Returns all enabled routing policy asset groups tags: - Network connections + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -6725,6 +6929,7 @@ paths: summary: Get an asset from an internal wallet tags: - Internal wallets + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -6826,6 +7031,7 @@ paths: summary: Add an asset to an internal wallet tags: - Internal wallets + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -8913,6 +9119,7 @@ paths: summary: List assets tags: - Blockchains & assets + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -9168,6 +9375,105 @@ paths: - lang: Python source: "response = fireblocks.blockchains_&_assets.get_asset(id, idempotency_key);" x-accepts: application/json + patch: + description: |- + Update the user’s metadata for an asset. + + Endpoint Permission: Owner, Admin, Non-Signing Admin, NCW Admin, Signer, Editor. + operationId: updateAssetUserMetadata + parameters: + - description: The ID or legacyId of the asset + example: ETH + explode: false + in: path + name: id + required: true + schema: + type: string + x-fb-entity: asset + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAssetUserMetadataRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Asset' + description: Updated asset user metadata + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetNotFoundErrorResponse' + description: | + - Asset with specified ID or legacy ID is not found. Error code 1504 + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInternalServerErrorResponse' + description: Error occurred while updating asset user metadata + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update the user’s metadata for an asset + tags: + - Blockchains & assets + x-rate-limit-category: write + x-readme: + code-samples: + - language: python + code: "asset = fireblocks.update_asset_user_metadata(asset_id, update_asset_user_metadata_request)" + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: "const asset = await fireblocks.updateAssetUserMetadata(assetId, updateAssetUserMetadataRequest);" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.blockchainsAssets.updateAssetUserMetadata(blockchainsAssetsApiUpdateAssetUserMetadataRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.blockchainsAssets().updateAssetUserMetadata(id,\ + \ updateAssetUserMetadataRequest, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.blockchains_&_assets.update_asset_user_metadata(id,\ + \ update_asset_user_metadata_request, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.blockchainsAssets.updateAssetUserMetadata(blockchainsAssetsApiUpdateAssetUserMetadataRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.blockchainsAssets().updateAssetUserMetadata(id,\ + \ updateAssetUserMetadataRequest, idempotencyKey);" + - lang: Python + source: "response = fireblocks.blockchains_&_assets.update_asset_user_metadata(id,\ + \ update_asset_user_metadata_request, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /assets/prices/{id}: post: description: | @@ -9232,6 +9538,7 @@ paths: summary: Set asset price tags: - Blockchains & assets + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -9358,6 +9665,7 @@ paths: summary: List blockchains tags: - Blockchains & assets + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -9441,6 +9749,7 @@ paths: summary: Get an blockchain tags: - Blockchains & assets + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -11121,6 +11430,7 @@ paths: tags: - Payments - Flows x-internal: true + x-rate-limit-category: write x-content-type: application/json x-accepts: application/json /payments/workflow_config/{configId}: @@ -11159,6 +11469,7 @@ paths: tags: - Payments - Flows x-internal: true + x-rate-limit-category: write x-accepts: application/json get: description: Retrieve a previously created workflow configuration using the @@ -11196,6 +11507,7 @@ paths: tags: - Payments - Flows x-internal: true + x-rate-limit-category: read x-accepts: application/json /payments/workflow_execution: post: @@ -11249,6 +11561,7 @@ paths: tags: - Payments - Flows x-internal: true + x-rate-limit-category: write x-content-type: application/json x-accepts: application/json /payments/workflow_execution/{workflowExecutionId}: @@ -11288,6 +11601,7 @@ paths: tags: - Payments - Flows x-internal: true + x-rate-limit-category: read x-accepts: application/json /payments/workflow_execution/{workflowExecutionId}/actions/execute: post: @@ -11340,6 +11654,7 @@ paths: tags: - Payments - Flows x-internal: true + x-rate-limit-category: write x-accepts: application/json /gas_station: get: @@ -11853,6 +12168,7 @@ paths: summary: Get user group tags: - User groups (Beta) + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -11930,6 +12246,7 @@ paths: summary: Update user group tags: - User groups (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -13370,6 +13687,7 @@ paths: summary: List all contract templates tags: - Contract Templates + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -13444,6 +13762,7 @@ paths: summary: Upload contract template tags: - Contract Templates + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -13512,6 +13831,7 @@ paths: summary: Delete a contract template by id tags: - Contract Templates + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -13575,6 +13895,7 @@ paths: summary: Return contract template by id tags: - Contract Templates + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -13650,6 +13971,7 @@ paths: summary: Return contract template's constructor tags: - Contract Templates + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -13725,6 +14047,7 @@ paths: summary: Return contract template's function tags: - Contract Templates + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -13805,6 +14128,7 @@ paths: summary: Deploy contract tags: - Contract Templates + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -13908,6 +14232,7 @@ paths: summary: List deployed contracts data tags: - Deployed Contracts + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -13974,6 +14299,7 @@ paths: summary: Return deployed contract data by id tags: - Deployed Contracts + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -14044,6 +14370,7 @@ paths: summary: Return deployed contract data tags: - Deployed Contracts + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -14122,6 +14449,7 @@ paths: summary: Fetch the contract ABI tags: - Deployed Contracts + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -14191,6 +14519,7 @@ paths: summary: Save contract ABI tags: - Deployed Contracts + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -15394,11 +15723,202 @@ paths: type: string style: simple responses: - "200": + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ContractAbiResponseDto' + description: "" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return deployed contract's ABI + tags: + - Contract Interactions + x-rate-limit-category: read + x-readme: + code-samples: + - language: python + code: "deployed_contract_abi = fireblocks.get_contracts_abi(base_asset_id,\ + \ contract_address)" + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: "const deployedContractAbi = await fireblocks.getContractAbi(baseAssetId,\ + \ contractAddress);" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ + \ baseAssetId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address,\ + \ base_asset_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);" + - lang: Java + source: "CompletableFuture> response =\ + \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ + \ baseAssetId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address,\ + \ base_asset_id, idempotency_key);" + x-accepts: application/json + /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read: + post: + description: Call a read function on a deployed contract by blockchain native + asset id and contract address + operationId: readCallFunction + 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 contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + explode: false + in: path + name: contractAddress + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: baseAssetId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReadCallFunctionDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterWithValueList' + description: Read Call Retrieved Successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Call a read function on a deployed contract + tags: + - Contract Interactions + x-readme: + code-samples: + - language: python + code: "read_response = fireblocks.read_contract_call_function(base_asset_id,\ + \ contract_address, payload)" + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: "const readResponse= await fireblocks.readContractCallFunction(baseAssetId,\ + \ contractAddress, payload);" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.readCallFunction(contractInteractionsApiReadCallFunctionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response\ + \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ + \ contractAddress, baseAssetId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.contract_interactions.read_call_function(read_call_function_dto,\ + \ contract_address, base_asset_id, idempotency_key);" + name: Fireblocks SDK Python example + x-rate-limit-category: read + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.contractInteractions.readCallFunction(contractInteractionsApiReadCallFunctionRequest);" + - lang: Java + source: "CompletableFuture>> response\ + \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ + \ contractAddress, baseAssetId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.contract_interactions.read_call_function(read_call_function_dto,\ + \ contract_address, base_asset_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write: + post: + description: "Call a write function on a deployed contract by blockchain native\ + \ asset id and contract address. This creates an onchain transaction, thus\ + \ it is an async operation. It returns a transaction id that can be polled\ + \ for status check" + operationId: writeCallFunction + 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 contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + explode: false + in: path + name: contractAddress + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: baseAssetId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WriteCallFunctionDto' + required: true + responses: + "202": content: application/json: schema: - $ref: '#/components/schemas/ContractAbiResponseDto' + $ref: '#/components/schemas/WriteCallFunctionResponseDto' description: "" default: content: @@ -15409,90 +15929,77 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return deployed contract's ABI + summary: Call a write function on a deployed contract tags: - Contract Interactions x-readme: code-samples: - language: python - code: "deployed_contract_abi = fireblocks.get_contracts_abi(base_asset_id,\ - \ contract_address)" + code: "write_function_response = fireblocks.write_contract_call_function(base_asset_id,\ + \ contract_address, payload)" name: Fireblocks SDK Python example (Legacy) - language: javascript - code: "const deployedContractAbi = await fireblocks.getContractAbi(baseAssetId,\ - \ contractAddress);" + code: "const writeFunctionResponse = await fireblocks.writeContractCallFunction(baseAssetId,\ + \ contractAddress, payload);" name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.writeCallFunction(contractInteractionsApiWriteCallFunctionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response =\ - \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ - \ baseAssetId, idempotencyKey);" + code: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ + \ contractAddress, baseAssetId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address,\ - \ base_asset_id, idempotency_key);" + code: "response = fireblocks.contract_interactions.write_call_function(write_call_function_dto,\ + \ contract_address, base_asset_id, idempotency_key);" name: Fireblocks SDK Python example + x-rate-limit-category: async x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);" + source: "const response: Promise>\ + \ = fireblocks.contractInteractions.writeCallFunction(contractInteractionsApiWriteCallFunctionRequest);" - lang: Java - source: "CompletableFuture> response =\ - \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ - \ baseAssetId, idempotencyKey);" + source: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ + \ contractAddress, baseAssetId, idempotencyKey);" - lang: Python - source: "response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address,\ - \ base_asset_id, idempotency_key);" + source: "response = fireblocks.contract_interactions.write_call_function(write_call_function_dto,\ + \ contract_address, base_asset_id, idempotency_key);" + x-content-type: application/json x-accepts: application/json - /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read: - post: - description: Call a read function on a deployed contract by blockchain native - asset id and contract address - operationId: readCallFunction + /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt: + get: + description: Retrieve the transaction receipt by blockchain native asset ID + and transaction hash + operationId: getTransactionReceipt 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 contract's onchain address - example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + - description: The blockchain base assetId + example: ETH_TEST6 explode: false in: path - name: contractAddress + name: baseAssetId required: true schema: type: string style: simple - - explode: false + - description: The transaction hash + example: 0x3b015ca0518c55d7bff4e3f5aa5d0431705771553ba8a95cf20e34cb597f57f6 + explode: false in: path - name: baseAssetId + name: txHash required: true schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReadCallFunctionDto' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ParameterWithValueList' - description: Read Call Retrieved Successfully + $ref: '#/components/schemas/TransactionReceiptResponse' + description: Retrieved The Transaction Receipt Successfully default: content: application/json: @@ -15502,53 +16009,50 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Call a read function on a deployed contract + summary: Get transaction receipt tags: - Contract Interactions + x-rate-limit-category: read x-readme: code-samples: - language: python - code: "read_response = fireblocks.read_contract_call_function(base_asset_id,\ - \ contract_address, payload)" + code: "transaction_receipt = fireblocks.get_transaction_receipt(base_asset_id,\ + \ tx_hash)" name: Fireblocks SDK Python example (Legacy) - language: javascript - code: "const readResponse= await fireblocks.readContractCallFunction(baseAssetId,\ - \ contractAddress, payload);" + code: "const transactionReceipt = await fireblocks.getTransactionReceipt(baseAssetId,\ + \ txHash);" name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.contractInteractions.readCallFunction(contractInteractionsApiReadCallFunctionRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.getTransactionReceipt(contractInteractionsApiGetTransactionReceiptRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture>> response\ - \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ - \ contractAddress, baseAssetId, idempotencyKey);" + code: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId,\ + \ txHash);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.contract_interactions.read_call_function(read_call_function_dto,\ - \ contract_address, base_asset_id, idempotency_key);" + code: "response = fireblocks.contract_interactions.get_transaction_receipt(base_asset_id,\ + \ tx_hash);" name: Fireblocks SDK Python example - x-rate-limit-category: read x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.contractInteractions.readCallFunction(contractInteractionsApiReadCallFunctionRequest);" + source: "const response: Promise>\ + \ = fireblocks.contractInteractions.getTransactionReceipt(contractInteractionsApiGetTransactionReceiptRequest);" - lang: Java - source: "CompletableFuture>> response\ - \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ - \ contractAddress, baseAssetId, idempotencyKey);" + source: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId,\ + \ txHash);" - lang: Python - source: "response = fireblocks.contract_interactions.read_call_function(read_call_function_dto,\ - \ contract_address, base_asset_id, idempotency_key);" - x-content-type: application/json + source: "response = fireblocks.contract_interactions.get_transaction_receipt(base_asset_id,\ + \ tx_hash);" x-accepts: application/json - /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write: + /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/decode: post: - description: "Call a write function on a deployed contract by blockchain native\ - \ asset id and contract address. This creates an onchain transaction, thus\ - \ it is an async operation. It returns a transaction id that can be polled\ - \ for status check" - operationId: writeCallFunction + description: "Decode a function call data, error, or event log from a deployed\ + \ contract by blockchain native asset id and contract address." + operationId: decodeContractData 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\ @@ -15570,7 +16074,9 @@ paths: schema: type: string style: simple - - explode: false + - description: The blockchain native asset identifier + example: ETH + explode: false in: path name: baseAssetId required: true @@ -15581,15 +16087,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/WriteCallFunctionDto' + $ref: '#/components/schemas/ContractDataDecodeRequest' required: true responses: - "202": + "200": content: application/json: schema: - $ref: '#/components/schemas/WriteCallFunctionResponseDto' - description: "" + $ref: '#/components/schemas/ContractDataDecodedResponse' + description: Decoded data retrieved successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDataDecodeError' + description: "Bad request, invalid input data or parameters" default: content: application/json: @@ -15599,124 +16111,45 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Call a write function on a deployed contract + summary: "Decode a function call data, error, or event log" tags: - Contract Interactions + x-rate-limit-category: read x-readme: code-samples: - - language: python - code: "write_function_response = fireblocks.write_contract_call_function(base_asset_id,\ - \ contract_address, payload)" - name: Fireblocks SDK Python example (Legacy) - language: javascript - code: "const writeFunctionResponse = await fireblocks.writeContractCallFunction(baseAssetId,\ - \ contractAddress, payload);" + code: |- + const payload = { + "data": "0xcd21db4f000000000000000000000000000000000000000000000000000000006790c645", + "dataType": "ERROR" + } const decodeResponse = await fireblocks.decodeContractData(baseAssetId, contractAddress, payload); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.contractInteractions.writeCallFunction(contractInteractionsApiWriteCallFunctionRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.decodeContractData(contractInteractionsApiDecodeContractDataRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ + code: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().decodeContractData(contractDataDecodeRequest,\ \ contractAddress, baseAssetId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.contract_interactions.write_call_function(write_call_function_dto,\ + code: "response = fireblocks.contract_interactions.decode_contract_data(contract_data_decode_request,\ \ contract_address, base_asset_id, idempotency_key);" name: Fireblocks SDK Python example - x-rate-limit-category: async x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.contractInteractions.writeCallFunction(contractInteractionsApiWriteCallFunctionRequest);" + source: "const response: Promise>\ + \ = fireblocks.contractInteractions.decodeContractData(contractInteractionsApiDecodeContractDataRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ + source: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().decodeContractData(contractDataDecodeRequest,\ \ contractAddress, baseAssetId, idempotencyKey);" - lang: Python - source: "response = fireblocks.contract_interactions.write_call_function(write_call_function_dto,\ + source: "response = fireblocks.contract_interactions.decode_contract_data(contract_data_decode_request,\ \ contract_address, base_asset_id, idempotency_key);" x-content-type: application/json x-accepts: application/json - /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt: - get: - description: Retrieve the transaction receipt by blockchain native asset ID - and transaction hash - operationId: getTransactionReceipt - parameters: - - description: The blockchain base assetId - example: ETH_TEST6 - explode: false - in: path - name: baseAssetId - required: true - schema: - type: string - style: simple - - description: The transaction hash - example: 0x3b015ca0518c55d7bff4e3f5aa5d0431705771553ba8a95cf20e34cb597f57f6 - explode: false - in: path - name: txHash - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TransactionReceiptResponse' - description: Retrieved The Transaction Receipt Successfully - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get transaction receipt - tags: - - Contract Interactions - x-readme: - code-samples: - - language: python - code: "transaction_receipt = fireblocks.get_transaction_receipt(base_asset_id,\ - \ tx_hash)" - name: Fireblocks SDK Python example (Legacy) - - language: javascript - code: "const transactionReceipt = await fireblocks.getTransactionReceipt(baseAssetId,\ - \ txHash);" - name: Fireblocks SDK Javascript example - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.contractInteractions.getTransactionReceipt(contractInteractionsApiGetTransactionReceiptRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response\ - \ = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId,\ - \ txHash);" - name: Fireblocks SDK Java example - - language: python - code: "response = fireblocks.contract_interactions.get_transaction_receipt(base_asset_id,\ - \ tx_hash);" - name: Fireblocks SDK Python example - x-codeSamples: - - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.contractInteractions.getTransactionReceipt(contractInteractionsApiGetTransactionReceiptRequest);" - - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId,\ - \ txHash);" - - lang: Python - source: "response = fireblocks.contract_interactions.get_transaction_receipt(base_asset_id,\ - \ tx_hash);" - x-accepts: application/json /staking/chains: get: description: Return an alphabetical list of supported chains. @@ -16275,6 +16708,7 @@ paths: summary: Merge Solana on stake accounts tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -16747,6 +17181,7 @@ paths: summary: Get Providers List tags: - Swap (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -16788,6 +17223,7 @@ paths: name: providerId required: true schema: + format: uuid type: string style: simple - description: "A unique identifier for the request. If the request is sent\ @@ -16820,6 +17256,7 @@ paths: summary: Approve terms of service tags: - Swap (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -16860,6 +17297,7 @@ paths: name: providerId required: true schema: + format: uuid type: string style: simple - description: "A unique identifier for the request. If the request is sent\ @@ -16899,6 +17337,7 @@ paths: summary: Create a quote tags: - Swap (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -16976,6 +17415,7 @@ paths: summary: Get Operations list tags: - Swap (Beta) + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -17048,6 +17488,7 @@ paths: summary: Create swap operation tags: - Swap (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -17110,6 +17551,7 @@ paths: summary: Get operation details tags: - Swap (Beta) + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -17473,6 +17915,7 @@ paths: summary: Refresh vault account tokens tags: - NFTs + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -17865,6 +18308,7 @@ paths: summary: Refresh token metadata tags: - NFTs + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -19028,6 +19472,7 @@ paths: summary: Get assigned VASP to vault tags: - Travel Rule + x-rate-limit-category: read x-readme: code-samples: - language: javascript @@ -19284,6 +19729,7 @@ paths: summary: Update Travel Rule Configuration tags: - Compliance + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -19506,6 +19952,7 @@ paths: summary: Tenant - Screening Configuration tags: - Compliance + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -22632,6 +23079,305 @@ paths: - lang: Python source: response = fireblocks.job_management.get_job_tasks(job_id); x-accepts: application/json + /tags: + get: + description: Retrieve a paged list of all tags according to filters. + operationId: getTags + parameters: + - description: Page cursor to get the next page. + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Maximum number of items in the page + explode: true + in: query + name: pageSize + required: false + schema: + default: 100 + maximum: 100 + minimum: 1 + type: number + style: form + - description: Label prefix to filter by. + example: VIP + explode: true + in: query + name: label + required: false + schema: + type: string + style: form + - description: List of tag IDs to filter by. + explode: true + in: query + name: tagIds + required: false + schema: + items: + format: uuid + type: string + maxItems: 100 + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TagsPagedResponse' + description: A TagsPagedResponse object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get list of tags + tags: + - Tags + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.tags.getTags(tagsApiGetTagsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.tags().getTags(pageCursor,\ + \ pageSize, label, tagIds);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tags.get_tags(page_cursor, page_size, label,\ + \ tag_ids);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.tags.getTags(tagsApiGetTagsRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.tags().getTags(pageCursor,\ + \ pageSize, label, tagIds);" + - lang: Python + source: "response = fireblocks.tags.get_tags(page_cursor, page_size, label,\ + \ tag_ids);" + x-accepts: application/json + post: + description: Create a new tag. + operationId: createTag + 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/CreateTagRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: A tag object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Create a tag + tags: + - Tags + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.tags.createTag(tagsApiCreateTagRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.tags().createTag(createTagRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tags.create_tag(create_tag_request, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tags.createTag(tagsApiCreateTagRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.tags().createTag(createTagRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tags.create_tag(create_tag_request, idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tags/{tagId}: + delete: + description: Delete the specified tag. + operationId: deleteTag + parameters: + - description: The ID of the tag to retrieve + explode: false + in: path + name: tagId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "204": + description: Tag was deleted successfully + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Delete a tag + tags: + - Tags + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.tags.deleteTag(tagsApiDeleteTagRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.tags().deleteTag(tagId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tags.delete_tag(tag_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tags.deleteTag(tagsApiDeleteTagRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.tags().deleteTag(tagId); + - lang: Python + source: response = fireblocks.tags.delete_tag(tag_id); + x-accepts: application/json + get: + description: Retrieve an existing tag by ID. + operationId: getTag + parameters: + - description: The ID of the tag to retrieve + explode: false + in: path + name: tagId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: A tag object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get a tag + tags: + - Tags + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.tags.getTag(tagsApiGetTagRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.tags().getTag(tagId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tags.get_tag(tag_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tags.getTag(tagsApiGetTagRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.tags().getTag(tagId); + - lang: Python + source: response = fireblocks.tags.get_tag(tag_id); + x-accepts: application/json + patch: + description: Update an existing specified tag. + operationId: updateTag + parameters: + - description: The ID of the tag to update + explode: false + in: path + name: tagId + required: true + schema: + format: uuid + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTagRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: A tag object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update a tag + tags: + - Tags + x-rate-limit-category: write + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.tags.updateTag(tagsApiUpdateTagRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.tags().updateTag(updateTagRequest,\ + \ tagId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tags.update_tag(update_tag_request, tag_id,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tags.updateTag(tagsApiUpdateTagRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.tags().updateTag(updateTagRequest,\ + \ tagId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.tags.update_tag(update_tag_request, tag_id,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json /cosigners: get: description: | @@ -23575,6 +24321,29 @@ components: rewardsInfo: $ref: '#/components/schemas/RewardsInfo' type: object + Tag: + example: + description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP + properties: + id: + description: The unique identifier of the tag + example: df4c0987-30da-4976-8dcf-bc2dd41ae331 + format: uuid + type: string + label: + description: The tag label + example: VIP + type: string + description: + description: Description for the tag + example: Tag for VIP customers + type: string + required: + - id + - label + type: object VaultAccount: example: assets: @@ -23619,6 +24388,13 @@ components: id: id customerRefId: customerRefId autoFuel: true + tags: + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP properties: id: type: string @@ -23634,6 +24410,11 @@ components: type: string autoFuel: type: boolean + tags: + description: List of tags attached to the vault account + items: + $ref: '#/components/schemas/Tag' + type: array type: object GetVaultAccountsResponse: items: @@ -23680,122 +24461,6 @@ 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 - assetIds: - - assetIds - - assetIds - properties: - count: - description: Count - type: integer - assetIds: - description: Array of asset IDs - items: - type: string - type: array - type: object VaultAccountsPagedResponse: example: previousUrl: previousUrl @@ -23845,6 +24510,13 @@ components: id: id customerRefId: customerRefId autoFuel: true + tags: + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP - assets: - totalStakedCPU: totalStakedCPU blockHash: blockHash @@ -23887,6 +24559,13 @@ components: id: id customerRefId: customerRefId autoFuel: true + tags: + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP nextUrl: nextUrl properties: accounts: @@ -24244,6 +24923,220 @@ components: items: $ref: '#/components/schemas/UnspentInputsResponse' type: array + CreateMultipleAccountsRequest: + example: + names: + - first va + - client 65502e71-ecdf-48da-a074-c1753befc7fb + prefix: "Copied from: " + count: 1000 + baseAssetIds: + - BTC + - ETH + - SOL + vaultAccountNamesStartingIndex: 0 + properties: + count: + description: Count + example: 1000 + type: integer + baseAssetIds: + description: Array of base asset IDs + example: + - BTC + - ETH + - SOL + items: + type: string + type: array + names: + description: Names to assign to vault accounts. if vaultAccountNamesStartingIndex + or prefix is used it'll fail + example: + - first va + - client 65502e71-ecdf-48da-a074-c1753befc7fb + items: + type: string + type: array + vaultAccountNamesStartingIndex: + description: Copy vault accounts names starting from this index. If names + array is used it'll fail + example: 0 + type: integer + prefix: + description: When copying from existing vault accounts (vaultAccountNamesStartingIndex) + then adding a prefix to the names. If names array is used it'll fail + example: "Copied from: " + type: string + required: + - baseAssetIds + - count + type: object + JobCreated: + example: + jobId: jobId + properties: + jobId: + type: string + type: object + CreateMultipleVaultAccountsJobStatus: + example: + vaultAccounts: + "0": + BTC_TEST: bcrt1qs0zzqytuw49w2jqkmfhzgdh2lylzde2uw4zncz + ETH_TEST: 0x460395Edb2338023c6f137259C6e20B6C37dDE95 + errorMessage: Asset not supported + status: Success + properties: + status: + example: Success + type: string + vaultAccounts: + additionalProperties: + additionalProperties: + type: string + description: Mapping between asset (key) to address (value) + type: object + description: Mapping between VaultAccountId to a mapping of asset to address + example: + "0": + BTC_TEST: bcrt1qs0zzqytuw49w2jqkmfhzgdh2lylzde2uw4zncz + ETH_TEST: 0x460395Edb2338023c6f137259C6e20B6C37dDE95 + type: object + errorMessage: + example: Asset not supported + type: string + required: + - status + 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 + VaultAccountsTagAttachmentsRequest: + example: + tagIds: + - df4c0987-30da-4976-8dcf-bc2dd41ae331 + - a1b2c3d4-e5f6-7890-abcd-ef1234567890 + vaultAccountIds: + - "0" + - "1" + properties: + tagIds: + description: The IDs of the tags to attach + example: + - df4c0987-30da-4976-8dcf-bc2dd41ae331 + - a1b2c3d4-e5f6-7890-abcd-ef1234567890 + items: + format: uuid + type: string + maxItems: 200 + minItems: 1 + type: array + vaultAccountIds: + description: The IDs of the vault accounts to attach tags to + example: + - "0" + - "1" + items: + format: numeric + type: string + maxItems: 200 + minItems: 1 + type: array + required: + - tagIds + - vaultAccountIds + 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 + description: Address one + errorMessage: Asset not supported + status: Success + properties: + status: + example: Success + type: string + addresses: + example: + - address: addr_test1qp07k5kdwdfx4rpfqud8ry65acxgtgfgrxw0t35cwvl4uasjneqjdc868eqlex5p2f0nyekyyk4ze5xuanvj50ysrj3qqxqhsn + index: 0 + description: Address one + items: + $ref: '#/components/schemas/NewAddress' + type: array + errorMessage: + example: Asset not supported + type: string + required: + - status + type: object PublicKeyInformation: example: derivationPath: @@ -26504,11 +27397,48 @@ components: - type - url type: object + AssetNote: + example: + text: Pay attention to gas fees + userName: Test test + userId: 056776ab-9efa-4219-9820-9ece0cc4d90d + updatedAt: 2025-06-08T19:42:49Z + properties: + text: + description: Note content + example: Pay attention to gas fees + type: string + userId: + description: Who updated the note (uuid) + example: 056776ab-9efa-4219-9820-9ece0cc4d90d + format: uuid + type: string + userName: + description: User name + example: Test test + type: string + updatedAt: + description: ISO Timestamp when last updated + example: 2025-06-08T19:42:49Z + format: date-time + type: string + required: + - text + - updatedAt + - userId + - userName + type: object AssetDetailsMetadata: example: + note: + text: Pay attention to gas fees + userName: Test test + userId: 056776ab-9efa-4219-9820-9ece0cc4d90d + updatedAt: 2025-06-08T19:42:49Z website: https://example.org scope: GLOBAL deprecated: false + verified: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d media: - attributes: @@ -26522,6 +27452,10 @@ components: properties: scope: $ref: '#/components/schemas/AssetScope' + verified: + description: Is asset verified by Fireblocks + example: false + type: boolean deprecated: description: Is asset deprecated example: false @@ -26539,17 +27473,26 @@ components: items: $ref: '#/components/schemas/AssetMedia' type: array + note: + $ref: '#/components/schemas/AssetNote' required: - deprecated - scope + - verified type: object Asset: example: displaySymbol: USDT metadata: + note: + text: Pay attention to gas fees + userName: Test test + userId: 056776ab-9efa-4219-9820-9ece0cc4d90d + updatedAt: 2025-06-08T19:42:49Z website: https://example.org scope: GLOBAL deprecated: false + verified: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d media: - attributes: @@ -26613,9 +27556,15 @@ components: data: - displaySymbol: USDT metadata: + note: + text: Pay attention to gas fees + userName: Test test + userId: 056776ab-9efa-4219-9820-9ece0cc4d90d + updatedAt: 2025-06-08T19:42:49Z website: https://example.org scope: GLOBAL deprecated: false + verified: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d media: - attributes: @@ -26640,9 +27589,15 @@ components: name: Tether USD - displaySymbol: USDT metadata: + note: + text: Pay attention to gas fees + userName: Test test + userId: 056776ab-9efa-4219-9820-9ece0cc4d90d + updatedAt: 2025-06-08T19:42:49Z website: https://example.org scope: GLOBAL deprecated: false + verified: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d media: - attributes: @@ -26899,6 +27854,32 @@ components: - code - message type: object + AssetNoteRequest: + example: + text: Pay attention to ETH gas fees + properties: + text: + description: Asset user note + example: Pay attention to ETH gas fees + type: string + type: object + AssetMetadataRequest: + example: + note: + text: Pay attention to ETH gas fees + properties: + note: + $ref: '#/components/schemas/AssetNoteRequest' + type: object + UpdateAssetUserMetadataRequest: + example: + metadata: + note: + text: Pay attention to ETH gas fees + properties: + metadata: + $ref: '#/components/schemas/AssetMetadataRequest' + type: object SetAssetPriceRequest: example: price: 3100 @@ -27635,6 +28616,33 @@ components: format: date-time type: number type: object + ComplianceResultStatusesEnum: + description: Status of compliance result screening. + enum: + - Started + - NetworkConnectionAddressResolve + - ScreeningPrepare + - AMLStarted + - AMLCompleted + - AMLFailed + - AMLInBackground + - TRPreconditionChecks + - TRStarted + - TRCompleted + - TRFailed + - Completed + - IncomingStarted + - IncomingScreeningPrepare + - IncomingWaitForFirstConfirmation + - AMLIncomingStarted + - AMLIncomingCompleted + - AMLIncomingFailed + - AMLIncomingInBackground + - TRIncomingStarted + - TRIncomingCompleted + - TRIncomingFailed + - IncomingCompleted + type: string AmlRegistrationResult: example: provider: provider @@ -27652,21 +28660,13 @@ components: description: The result of the Compliance AML/Travel Rule screening. example: aml: - - provider: provider - payload: "{}" - bypassReason: bypassReason - screeningStatus: COMPLETED - timestamp: 5.637376656633329 - - provider: provider + provider: provider payload: "{}" bypassReason: bypassReason screeningStatus: COMPLETED timestamp: 5.637376656633329 amlRegistration: - - provider: provider - success: true - timestamp: 2.3021358869347655 - - provider: provider + provider: provider success: true timestamp: 2.3021358869347655 amlList: @@ -27681,66 +28681,26 @@ components: screeningStatus: COMPLETED timestamp: 5.637376656633329 tr: - - provider: provider - payload: "{}" - bypassReason: bypassReason - screeningStatus: COMPLETED - timestamp: 5.637376656633329 - - provider: provider + provider: provider payload: "{}" bypassReason: bypassReason screeningStatus: COMPLETED timestamp: 5.637376656633329 - status: Started + status: null properties: aml: - description: The end result of the AML screening. - items: - $ref: '#/components/schemas/ComplianceScreeningResult' - type: array + $ref: '#/components/schemas/ComplianceScreeningResult' tr: - description: The result of the Travel Rule screening. - items: - $ref: '#/components/schemas/ComplianceScreeningResult' - type: array + $ref: '#/components/schemas/ComplianceScreeningResult' amlList: description: The list of all results of the AML screening. items: $ref: '#/components/schemas/ComplianceScreeningResult' type: array status: - description: Status of compliance result screening. - enum: - - Started - - AMLStarted - - AMLCompleted - - AMLFailed - - AMLInBackground - - TRStarted - - TRCompleted - - TRFailed - - Completed - - RegistrationStarted - - AMLRegistrationStarted - - AMLRegistrationCompleted - - TRUpdateStarted - - TRUpdateCompleted - - UpdateCompleted - - IncomingStarted - - AMLIncomingStarted - - AMLIncomingCompleted - - AMLIncomingFailed - - AMLIncomingInBackground - - TRIncomingStarted - - TRIncomingCompleted - - TRIncomingFailed - - IncomingCompleted - type: string + $ref: '#/components/schemas/ComplianceResultStatusesEnum' amlRegistration: - description: The results of the AML address registration. - items: - $ref: '#/components/schemas/AmlRegistrationResult' - type: array + $ref: '#/components/schemas/AmlRegistrationResult' type: object ExtraParameters: description: | @@ -27751,6 +28711,7 @@ components: For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. + For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) properties: {} type: object SignedMessage: @@ -28029,21 +28990,13 @@ components: numOfConfirmations: 3.616076749251911 complianceResults: aml: - - provider: provider - payload: "{}" - bypassReason: bypassReason - screeningStatus: COMPLETED - timestamp: 5.637376656633329 - - provider: provider + provider: provider payload: "{}" bypassReason: bypassReason screeningStatus: COMPLETED timestamp: 5.637376656633329 amlRegistration: - - provider: provider - success: true - timestamp: 2.3021358869347655 - - provider: provider + provider: provider success: true timestamp: 2.3021358869347655 amlList: @@ -28058,17 +29011,12 @@ components: screeningStatus: COMPLETED timestamp: 5.637376656633329 tr: - - provider: provider - payload: "{}" - bypassReason: bypassReason - screeningStatus: COMPLETED - timestamp: 5.637376656633329 - - provider: provider + provider: provider payload: "{}" bypassReason: bypassReason screeningStatus: COMPLETED timestamp: 5.637376656633329 - status: Started + status: null createdBy: createdBy exchangeTxId: exchangeTxId rewardInfo: @@ -28227,6 +29175,7 @@ components: For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. + For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) properties: {} type: object signedMessages: @@ -30234,6 +31183,7 @@ components: accountNumber: - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt + targetProtocol: GTR originatorVASPname: Originator VASP Ltd. beneficiaryVASPname: Beneficiary VASP Inc. protocol: IVMS101 @@ -30850,8 +31800,18 @@ components: type: string protocol: description: The protocol used to perform the travel rule. + enum: + - IVMS101 + - TRLight + - TRP + - OpenVASP + - GTR example: IVMS101 type: string + targetProtocol: + description: The target protocol for GTR (Global Travel Rule) transfers. + example: GTR + type: string skipBeneficiaryDataValidation: description: Whether to skip validation of beneficiary data. example: false @@ -31529,6 +32489,7 @@ components: accountNumber: - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt + targetProtocol: GTR originatorVASPname: Originator VASP Ltd. beneficiaryVASPname: Beneficiary VASP Inc. protocol: IVMS101 @@ -32218,6 +33179,7 @@ components: For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. + For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) properties: {} type: object customerRefId: @@ -34662,6 +35624,7 @@ components: accountNumber: - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt + targetProtocol: GTR originatorVASPname: Originator VASP Ltd. beneficiaryVASPname: Beneficiary VASP Inc. protocol: IVMS101 @@ -35879,6 +36842,7 @@ components: accountNumber: - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt - QmNkEt9VdnhjefQMXo3ZaZAs765ugoWiazaqcY9skHMjCt + targetProtocol: GTR originatorVASPname: Originator VASP Ltd. beneficiaryVASPname: Beneficiary VASP Inc. protocol: IVMS101 @@ -40158,11 +41122,267 @@ components: - transactionIndex - type type: object + ContractDataEncodedDataString: + description: The encoded data to decode + example: 0x1234567890abcdef + type: string + ContractDataLogDataParam: + properties: + data: + description: "The data to decode, which can be a string or an object containing\ + \ the data and its type." + example: 0x1234567890abcdef + type: string + topics: + description: "The topics of the log, which is an array of strings." + example: + - 1311768467294899700 + - 12379813812177893000 + items: + type: string + type: array + required: + - data + - topics + type: object + ContractDataDecodeDataType: + description: The type of the data to decode. + enum: + - ERROR + - LOG + - FUNCTION + example: FUNCTION + type: string + ContractDataDecodeRequest: + example: + data: 0x1234567890abcdef + dataType: FUNCTION + abi: + - inputs: + - name: to + type: address + - name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: transfer + properties: + data: + $ref: '#/components/schemas/ContractDataDecodeRequest_data' + dataType: + $ref: '#/components/schemas/ContractDataDecodeDataType' + abi: + description: The abi of the function/error/log to decode. + example: + - inputs: + - name: to + type: address + - name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: transfer + items: + $ref: '#/components/schemas/AbiFunction' + type: array + required: + - data + - dataType + type: object + ContractDataDecodeResponseParams: + example: + args: + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + signature: "transfer(address,uint256)" + name: transfer + properties: + name: + description: The name of the contract function. + example: transfer + type: string + signature: + description: The signature of the contract function. + example: "transfer(address,uint256)" + type: string + args: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + required: + - args + - name + - signature + type: object + ContractDataDecodedResponse: + example: + result: + - args: + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + signature: "transfer(address,uint256)" + name: transfer + - args: + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + signature: "transfer(address,uint256)" + name: transfer + type: FUNCTION + properties: + result: + description: The decoded parameters of the contract function call. + items: + $ref: '#/components/schemas/ContractDataDecodeResponseParams' + type: array + type: + $ref: '#/components/schemas/ContractDataDecodeDataType' + required: + - result + - type + type: object + ContractDataDecodeError: + example: + code: 400 + message: "Error decoding data: Invalid ABI" + properties: + message: + description: Bad request error message + example: "Error decoding data: Invalid ABI" + type: string + code: + description: Error code + example: 400 + type: number + required: + - code + - message + type: object ChainDescriptor: enum: - ETH - SOL - MATIC + - ETH_TEST_HOODI - ETH_TEST6 - SOL_TEST type: string @@ -40170,6 +41390,7 @@ components: example: - ETH - ETH_TEST6 + - ETH_TEST_HOODI - SOL - SOL_TEST - MATIC @@ -40863,7 +42084,7 @@ components: termsOfServiceUrl: https://uniswap.org/terms-of-service isTermsApprovalRequired: true name: Uniswap - id: UNISWAP + id: 3e2efee1-0d69-4276-a6e6-711531185e4f protocols: - UNISWAP_CLASSIC - UNISWAPX @@ -40871,8 +42092,9 @@ components: isTermsOfServiceApproved: true properties: id: - description: The ID of the provider - example: UNISWAP + description: The uuid that identifies the provider + example: 3e2efee1-0d69-4276-a6e6-711531185e4f + format: uuid type: string name: description: Name of the provider @@ -40918,7 +42140,7 @@ components: - termsOfServiceUrl: https://uniswap.org/terms-of-service isTermsApprovalRequired: true name: Uniswap - id: UNISWAP + id: 3e2efee1-0d69-4276-a6e6-711531185e4f protocols: - UNISWAP_CLASSIC - UNISWAPX @@ -40927,7 +42149,7 @@ components: - termsOfServiceUrl: https://uniswap.org/terms-of-service isTermsApprovalRequired: true name: Uniswap - id: UNISWAP + id: 3e2efee1-0d69-4276-a6e6-711531185e4f protocols: - UNISWAP_CLASSIC - UNISWAPX @@ -41277,7 +42499,7 @@ components: type: APPROVE status: PENDING createdBy: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - providerId: UNISWAP + providerId: 3e2efee1-0d69-4276-a6e6-711531185e4f inputAsset: WETH slippageTolerance: 0.5 outputAsset: DAI @@ -41295,8 +42517,9 @@ components: example: "1" type: string providerId: - description: The ID of the provider - example: UNISWAP + description: The uuid that identifies the provider + example: 3e2efee1-0d69-4276-a6e6-711531185e4f + format: uuid type: string category: $ref: '#/components/schemas/ProviderCategoryEnum' @@ -41412,7 +42635,7 @@ components: type: APPROVE status: PENDING createdBy: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - providerId: UNISWAP + providerId: 3e2efee1-0d69-4276-a6e6-711531185e4f inputAsset: WETH slippageTolerance: 0.5 outputAsset: DAI @@ -41436,7 +42659,7 @@ components: type: APPROVE status: PENDING createdBy: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - providerId: UNISWAP + providerId: 3e2efee1-0d69-4276-a6e6-711531185e4f inputAsset: WETH slippageTolerance: 0.5 outputAsset: DAI @@ -45474,6 +46697,7 @@ components: - TRLight - TRP - OpenVASP + - GTR example: TRLight type: string skipBeneficiaryDataValidation: @@ -46350,33 +47574,6 @@ components: format: date-time type: number type: object - ComplianceResultStatusesEnum: - description: Status of compliance result screening. - enum: - - Started - - NetworkConnectionAddressResolve - - ScreeningPrepare - - AMLStarted - - AMLCompleted - - AMLFailed - - AMLInBackground - - TRPreconditionChecks - - TRStarted - - TRCompleted - - TRFailed - - Completed - - IncomingStarted - - IncomingScreeningPrepare - - IncomingWaitForFirstConfirmation - - AMLIncomingStarted - - AMLIncomingCompleted - - AMLIncomingFailed - - AMLIncomingInBackground - - TRIncomingStarted - - TRIncomingCompleted - - TRIncomingFailed - - IncomingCompleted - type: string AmlRegistrationResultFullPayload: description: The results of the AML address registration. example: @@ -49453,6 +50650,60 @@ components: items: $ref: '#/components/schemas/Task' type: array + TagsPagedResponse: + example: + next: MjAyNS0wNy0wOSAxMDo1MzoxMy40NTI=:NA== + data: + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP + - description: Tag for VIP customers + id: df4c0987-30da-4976-8dcf-bc2dd41ae331 + label: VIP + properties: + data: + items: + $ref: '#/components/schemas/Tag' + type: array + next: + description: Cursor to the next page + example: MjAyNS0wNy0wOSAxMDo1MzoxMy40NTI=:NA== + nullable: true + type: string + required: + - data + - next + type: object + CreateTagRequest: + example: + description: Tag for VIP customers + label: VIP + properties: + label: + description: The tag label + example: VIP + type: string + description: + description: Description for the tag + example: Tag for VIP customers + type: string + required: + - label + type: object + UpdateTagRequest: + example: + description: Tag for VIP customers + label: VIP + properties: + label: + description: The tag label + example: VIP + type: string + description: + description: Description for the tag + example: Tag for VIP customers + type: string + type: object Version: example: hash: a1b2c3d4 @@ -50298,6 +51549,13 @@ components: oneOf: - $ref: '#/components/schemas/WriteAbiFunction' - $ref: '#/components/schemas/SolanaInstructionWithValue' + ContractDataDecodeRequest_data: + description: "The data to decode, which can be a string or an object containing\ + \ the data and its type." + example: 0x1234567890abcdef + oneOf: + - $ref: '#/components/schemas/ContractDataEncodedDataString' + - $ref: '#/components/schemas/ContractDataLogDataParam' SetOtaStatusResponse_oneOf: example: message: No change needed. The current status is false diff --git a/build.gradle b/build.gradle index 7f84bf67..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.4.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AssetDetailsMetadata.md b/docs/AssetDetailsMetadata.md index 42cc7ea5..aaca6198 100644 --- a/docs/AssetDetailsMetadata.md +++ b/docs/AssetDetailsMetadata.md @@ -8,10 +8,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**scope** | **AssetScope** | | | +|**verified** | **Boolean** | Is asset verified by Fireblocks | | |**deprecated** | **Boolean** | Is asset deprecated | | |**deprecationReferralId** | **String** | New asset ID replacement | [optional] | |**website** | **String** | Vendor’s website | [optional] | |**media** | [**List<AssetMedia>**](AssetMedia.md) | Asset’s media | [optional] | +|**note** | [**AssetNote**](AssetNote.md) | | [optional] | diff --git a/docs/AssetMetadataRequest.md b/docs/AssetMetadataRequest.md new file mode 100644 index 00000000..35c5fbbc --- /dev/null +++ b/docs/AssetMetadataRequest.md @@ -0,0 +1,13 @@ + + +# AssetMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**note** | [**AssetNoteRequest**](AssetNoteRequest.md) | | [optional] | + + + diff --git a/docs/AssetNote.md b/docs/AssetNote.md new file mode 100644 index 00000000..d02d985c --- /dev/null +++ b/docs/AssetNote.md @@ -0,0 +1,16 @@ + + +# AssetNote + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**text** | **String** | Note content | | +|**userId** | **UUID** | Who updated the note (uuid) | | +|**userName** | **String** | User name | | +|**updatedAt** | **OffsetDateTime** | ISO Timestamp when last updated | | + + + diff --git a/docs/AssetNoteRequest.md b/docs/AssetNoteRequest.md new file mode 100644 index 00000000..9e1426f0 --- /dev/null +++ b/docs/AssetNoteRequest.md @@ -0,0 +1,13 @@ + + +# AssetNoteRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**text** | **String** | Asset user note | [optional] | + + + diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index 8a9ff557..2b012940 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -11,6 +11,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**listBlockchains**](BlockchainsAssetsApi.md#listBlockchains) | **GET** /blockchains | List blockchains | | [**registerNewAsset**](BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset | | [**setAssetPrice**](BlockchainsAssetsApi.md#setAssetPrice) | **POST** /assets/prices/{id} | Set asset price | +| [**updateAssetUserMetadata**](BlockchainsAssetsApi.md#updateAssetUserMetadata) | **PATCH** /assets/{id} | Update the user’s metadata for an asset | @@ -637,3 +638,92 @@ No authorization required | **404** | - Currency not found. Error code 1001 | - | | **0** | Error Response | * X-Request-ID -
| + +## updateAssetUserMetadata + +> CompletableFuture> updateAssetUserMetadata updateAssetUserMetadata(id, updateAssetUserMetadataRequest, idempotencyKey) + +Update the user’s metadata for an asset + +Update the user’s metadata for an asset. Endpoint Permission: Owner, Admin, Non-Signing Admin, NCW Admin, Signer, Editor. + +### 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.BlockchainsAssetsApi; +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 id = "ETH"; // String | The ID or legacyId of the asset + UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest = new UpdateAssetUserMetadataRequest(); // UpdateAssetUserMetadataRequest | + 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().updateAssetUserMetadata(id, updateAssetUserMetadataRequest, 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 BlockchainsAssetsApi#updateAssetUserMetadata"); + 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 BlockchainsAssetsApi#updateAssetUserMetadata"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The ID or legacyId of the asset | | +| **updateAssetUserMetadataRequest** | [**UpdateAssetUserMetadataRequest**](UpdateAssetUserMetadataRequest.md)| | [optional] | +| **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** | Updated asset user metadata | * X-Request-ID -
| +| **404** | - Asset with specified ID or legacy ID is not found. Error code 1504 | - | +| **500** | Error occurred while updating asset user metadata | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ChainDescriptor.md b/docs/ChainDescriptor.md index 9f2c08bd..40df159e 100644 --- a/docs/ChainDescriptor.md +++ b/docs/ChainDescriptor.md @@ -11,6 +11,8 @@ * `MATIC` (value: `"MATIC"`) +* `ETH_TEST_HOODI` (value: `"ETH_TEST_HOODI"`) + * `ETH_TEST6` (value: `"ETH_TEST6"`) * `SOL_TEST` (value: `"SOL_TEST"`) diff --git a/docs/ComplianceResults.md b/docs/ComplianceResults.md index d76bfb80..24db872c 100644 --- a/docs/ComplianceResults.md +++ b/docs/ComplianceResults.md @@ -8,42 +8,11 @@ The result of the Compliance AML/Travel Rule screening. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**aml** | [**List<ComplianceScreeningResult>**](ComplianceScreeningResult.md) | The end result of the AML screening. | [optional] | -|**tr** | [**List<ComplianceScreeningResult>**](ComplianceScreeningResult.md) | The result of the Travel Rule screening. | [optional] | +|**aml** | [**ComplianceScreeningResult**](ComplianceScreeningResult.md) | | [optional] | +|**tr** | [**ComplianceScreeningResult**](ComplianceScreeningResult.md) | | [optional] | |**amlList** | [**List<ComplianceScreeningResult>**](ComplianceScreeningResult.md) | The list of all results of the AML screening. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | Status of compliance result screening. | [optional] | -|**amlRegistration** | [**List<AmlRegistrationResult>**](AmlRegistrationResult.md) | The results of the AML address registration. | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| STARTED | "Started" | -| AMLSTARTED | "AMLStarted" | -| AMLCOMPLETED | "AMLCompleted" | -| AMLFAILED | "AMLFailed" | -| AMLINBACKGROUND | "AMLInBackground" | -| TRSTARTED | "TRStarted" | -| TRCOMPLETED | "TRCompleted" | -| TRFAILED | "TRFailed" | -| COMPLETED | "Completed" | -| REGISTRATIONSTARTED | "RegistrationStarted" | -| AMLREGISTRATIONSTARTED | "AMLRegistrationStarted" | -| AMLREGISTRATIONCOMPLETED | "AMLRegistrationCompleted" | -| TRUPDATESTARTED | "TRUpdateStarted" | -| TRUPDATECOMPLETED | "TRUpdateCompleted" | -| UPDATECOMPLETED | "UpdateCompleted" | -| INCOMINGSTARTED | "IncomingStarted" | -| AMLINCOMINGSTARTED | "AMLIncomingStarted" | -| AMLINCOMINGCOMPLETED | "AMLIncomingCompleted" | -| AMLINCOMINGFAILED | "AMLIncomingFailed" | -| AMLINCOMINGINBACKGROUND | "AMLIncomingInBackground" | -| TRINCOMINGSTARTED | "TRIncomingStarted" | -| TRINCOMINGCOMPLETED | "TRIncomingCompleted" | -| TRINCOMINGFAILED | "TRIncomingFailed" | -| INCOMINGCOMPLETED | "IncomingCompleted" | +|**status** | **ComplianceResultStatusesEnum** | | [optional] | +|**amlRegistration** | [**AmlRegistrationResult**](AmlRegistrationResult.md) | | [optional] | diff --git a/docs/ContractDataDecodeDataType.md b/docs/ContractDataDecodeDataType.md new file mode 100644 index 00000000..34376662 --- /dev/null +++ b/docs/ContractDataDecodeDataType.md @@ -0,0 +1,15 @@ + + +# ContractDataDecodeDataType + +## Enum + + +* `ERROR` (value: `"ERROR"`) + +* `LOG` (value: `"LOG"`) + +* `FUNCTION` (value: `"FUNCTION"`) + + + diff --git a/docs/ContractDataDecodeError.md b/docs/ContractDataDecodeError.md new file mode 100644 index 00000000..c08a4296 --- /dev/null +++ b/docs/ContractDataDecodeError.md @@ -0,0 +1,14 @@ + + +# ContractDataDecodeError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Bad request error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/ContractDataDecodeRequest.md b/docs/ContractDataDecodeRequest.md new file mode 100644 index 00000000..aac9e9d5 --- /dev/null +++ b/docs/ContractDataDecodeRequest.md @@ -0,0 +1,15 @@ + + +# ContractDataDecodeRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ContractDataDecodeRequestData**](ContractDataDecodeRequestData.md) | | | +|**dataType** | **ContractDataDecodeDataType** | | | +|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the function/error/log to decode. | [optional] | + + + diff --git a/docs/ContractDataDecodeRequestData.md b/docs/ContractDataDecodeRequestData.md new file mode 100644 index 00000000..09381ec4 --- /dev/null +++ b/docs/ContractDataDecodeRequestData.md @@ -0,0 +1,39 @@ + + +# ContractDataDecodeRequestData + +The data to decode, which can be a string or an object containing the data and its type. + +## oneOf schemas +* [ContractDataLogDataParam](ContractDataLogDataParam.md) +* [String](String.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ContractDataDecodeRequestData; +import com.fireblocks.sdk.model.ContractDataLogDataParam; +import com.fireblocks.sdk.model.String; + +public class Example { + public static void main(String[] args) { + ContractDataDecodeRequestData exampleContractDataDecodeRequestData = new ContractDataDecodeRequestData(); + + // create a new ContractDataLogDataParam + ContractDataLogDataParam exampleContractDataLogDataParam = new ContractDataLogDataParam(); + // set ContractDataDecodeRequestData to ContractDataLogDataParam + exampleContractDataDecodeRequestData.setActualInstance(exampleContractDataLogDataParam); + // to get back the ContractDataLogDataParam set earlier + ContractDataLogDataParam testContractDataLogDataParam = (ContractDataLogDataParam) exampleContractDataDecodeRequestData.getActualInstance(); + + // create a new String + String exampleString = new String(); + // set ContractDataDecodeRequestData to String + exampleContractDataDecodeRequestData.setActualInstance(exampleString); + // to get back the String set earlier + String testString = (String) exampleContractDataDecodeRequestData.getActualInstance(); + } +} +``` + + diff --git a/docs/ContractDataDecodeResponseParams.md b/docs/ContractDataDecodeResponseParams.md new file mode 100644 index 00000000..7f34df16 --- /dev/null +++ b/docs/ContractDataDecodeResponseParams.md @@ -0,0 +1,15 @@ + + +# ContractDataDecodeResponseParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the contract function. | | +|**signature** | **String** | The signature of the contract function. | | +|**args** | [**List<ParameterWithValue>**](ParameterWithValue.md) | | | + + + diff --git a/docs/ContractDataDecodedResponse.md b/docs/ContractDataDecodedResponse.md new file mode 100644 index 00000000..d1ef2b09 --- /dev/null +++ b/docs/ContractDataDecodedResponse.md @@ -0,0 +1,14 @@ + + +# ContractDataDecodedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**result** | [**List<ContractDataDecodeResponseParams>**](ContractDataDecodeResponseParams.md) | The decoded parameters of the contract function call. | | +|**type** | **ContractDataDecodeDataType** | | | + + + diff --git a/docs/ContractDataLogDataParam.md b/docs/ContractDataLogDataParam.md new file mode 100644 index 00000000..7e64021b --- /dev/null +++ b/docs/ContractDataLogDataParam.md @@ -0,0 +1,14 @@ + + +# ContractDataLogDataParam + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | **String** | The data to decode, which can be a string or an object containing the data and its type. | | +|**topics** | **List<String>** | The topics of the log, which is an array of strings. | | + + + diff --git a/docs/ContractInteractionsApi.md b/docs/ContractInteractionsApi.md index 9982a486..dfe7657c 100644 --- a/docs/ContractInteractionsApi.md +++ b/docs/ContractInteractionsApi.md @@ -4,6 +4,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**decodeContractData**](ContractInteractionsApi.md#decodeContractData) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/decode | Decode a function call data, error, or event log | | [**getDeployedContractAbi**](ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI | | [**getTransactionReceipt**](ContractInteractionsApi.md#getTransactionReceipt) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt | Get transaction receipt | | [**readCallFunction**](ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract | @@ -11,6 +12,96 @@ All URIs are relative to https://developers.fireblocks.com/reference/ +## decodeContractData + +> CompletableFuture> decodeContractData decodeContractData(contractDataDecodeRequest, contractAddress, baseAssetId, idempotencyKey) + +Decode a function call data, error, or event log + +Decode a function call data, error, or event log from a deployed contract by blockchain native asset id and contract address. + +### 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.ContractInteractionsApi; +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); + + ContractDataDecodeRequest contractDataDecodeRequest = new ContractDataDecodeRequest(); // ContractDataDecodeRequest | + String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address + String baseAssetId = "ETH"; // String | The blockchain native asset identifier + 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.contractInteractions().decodeContractData(contractDataDecodeRequest, contractAddress, baseAssetId, 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 ContractInteractionsApi#decodeContractData"); + 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 ContractInteractionsApi#decodeContractData"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractDataDecodeRequest** | [**ContractDataDecodeRequest**](ContractDataDecodeRequest.md)| | | +| **contractAddress** | **String**| The contract's onchain address | | +| **baseAssetId** | **String**| The blockchain native asset identifier | | +| **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** | Decoded data retrieved successfully | - | +| **400** | Bad request, invalid input data or parameters | - | +| **0** | Error Response | * X-Request-ID -
| + + ## getDeployedContractAbi > CompletableFuture> getDeployedContractAbi getDeployedContractAbi(contractAddress, baseAssetId, idempotencyKey) diff --git a/docs/CreateMultipleAccountsRequest.md b/docs/CreateMultipleAccountsRequest.md index 57aba1b1..bcb27cfa 100644 --- a/docs/CreateMultipleAccountsRequest.md +++ b/docs/CreateMultipleAccountsRequest.md @@ -7,8 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**count** | **Integer** | Count | [optional] | -|**assetIds** | **List<String>** | Array of asset IDs | [optional] | +|**count** | **Integer** | Count | | +|**baseAssetIds** | **List<String>** | Array of base asset IDs | | +|**names** | **List<String>** | Names to assign to vault accounts. if vaultAccountNamesStartingIndex or prefix is used it'll fail | [optional] | +|**vaultAccountNamesStartingIndex** | **Integer** | Copy vault accounts names starting from this index. If names array is used it'll fail | [optional] | +|**prefix** | **String** | When copying from existing vault accounts (vaultAccountNamesStartingIndex) then adding a prefix to the names. If names array is used it'll fail | [optional] | diff --git a/docs/CreateMultipleVaultAccountsJobStatus.md b/docs/CreateMultipleVaultAccountsJobStatus.md new file mode 100644 index 00000000..196d010f --- /dev/null +++ b/docs/CreateMultipleVaultAccountsJobStatus.md @@ -0,0 +1,15 @@ + + +# CreateMultipleVaultAccountsJobStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | | +|**vaultAccounts** | **Map<String, Map<String, String>>** | Mapping between VaultAccountId to a mapping of asset to address | [optional] | +|**errorMessage** | **String** | | [optional] | + + + diff --git a/docs/CreateTagRequest.md b/docs/CreateTagRequest.md new file mode 100644 index 00000000..faac3d4b --- /dev/null +++ b/docs/CreateTagRequest.md @@ -0,0 +1,14 @@ + + +# CreateTagRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**label** | **String** | The tag label | | +|**description** | **String** | Description for the tag | [optional] | + + + diff --git a/docs/StakingApi.md b/docs/StakingApi.md index d9a303cf..d3687867 100644 --- a/docs/StakingApi.md +++ b/docs/StakingApi.md @@ -251,7 +251,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **chainDescriptor** | [**ChainDescriptor**](.md)| Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. | [optional] [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **chainDescriptor** | [**ChainDescriptor**](.md)| Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. | [optional] [enum: ETH, SOL, MATIC, ETH_TEST_HOODI, ETH_TEST6, SOL_TEST] | ### Return type @@ -334,7 +334,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use | [enum: ETH, SOL, MATIC, ETH_TEST_HOODI, ETH_TEST6, SOL_TEST] | ### Return type @@ -993,7 +993,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **stakeRequest** | [**StakeRequest**](StakeRequest.md)| | | -| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST_HOODI, ETH_TEST6, SOL_TEST] | | **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 @@ -1079,7 +1079,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **unstakeRequest** | [**UnstakeRequest**](UnstakeRequest.md)| | | -| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST_HOODI, ETH_TEST6, SOL_TEST] | | **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 @@ -1165,7 +1165,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **withdrawRequest** | [**WithdrawRequest**](WithdrawRequest.md)| | | -| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST_HOODI, ETH_TEST6, SOL_TEST] | | **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 diff --git a/docs/SwapBetaApi.md b/docs/SwapBetaApi.md index 860cd2fa..309aabcb 100644 --- a/docs/SwapBetaApi.md +++ b/docs/SwapBetaApi.md @@ -44,7 +44,7 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String providerId = "providerId_example"; // String | + UUID providerId = UUID.randomUUID(); // UUID | 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.swapBeta().approveTermsOfService(providerId, idempotencyKey); @@ -74,7 +74,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **providerId** | **String**| | | +| **providerId** | **UUID**| | | | **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 @@ -130,7 +130,7 @@ public class Example { Fireblocks fireblocks = new Fireblocks(configurationOptions); QuoteRequest quoteRequest = new QuoteRequest(); // QuoteRequest | - String providerId = "providerId_example"; // String | + UUID providerId = UUID.randomUUID(); // UUID | 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.swapBeta().createQuote(quoteRequest, providerId, idempotencyKey); @@ -161,7 +161,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **quoteRequest** | [**QuoteRequest**](QuoteRequest.md)| | | -| **providerId** | **String**| | | +| **providerId** | **UUID**| | | | **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 diff --git a/docs/SwapOperation.md b/docs/SwapOperation.md index ba270930..f2504ec4 100644 --- a/docs/SwapOperation.md +++ b/docs/SwapOperation.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | The id of the swap operation | | |**accountId** | **String** | The id of the vault account or account id | | -|**providerId** | **String** | The ID of the provider | | +|**providerId** | **UUID** | The uuid that identifies the provider | | |**category** | **ProviderCategoryEnum** | | | |**protocol** | **SwapProviderProtocolsEnum** | | | |**status** | [**StatusEnum**](#StatusEnum) | **CREATED** – The swap request has been created but not yet started. **PENDING_USER_ACTION** – Awaiting a user action (e.g. signature or approval). **PENDING_PROVIDER_ACTION** – Awaiting the provider to process the request. **PROCESSING** – The swap is actively being executed on‐chain. **COMPLETED** – The swap has finished successfully. **CANCELED** – The swap was cancelled by user or provider before completion. **FAILED** – The swap attempted but encountered an error. | | diff --git a/docs/SwapProvider.md b/docs/SwapProvider.md index 7286c64f..0c29917d 100644 --- a/docs/SwapProvider.md +++ b/docs/SwapProvider.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of the provider | | +|**id** | **UUID** | The uuid that identifies the provider | | |**name** | **String** | Name of the provider | | |**protocols** | **List<SwapProviderProtocolsEnum>** | List of supported protocols. Protocols are specific per provider | | |**category** | **ProviderCategoryEnum** | | | diff --git a/docs/Tag.md b/docs/Tag.md new file mode 100644 index 00000000..37da981b --- /dev/null +++ b/docs/Tag.md @@ -0,0 +1,15 @@ + + +# Tag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The unique identifier of the tag | | +|**label** | **String** | The tag label | | +|**description** | **String** | Description for the tag | [optional] | + + + diff --git a/docs/TagsApi.md b/docs/TagsApi.md new file mode 100644 index 00000000..ed1a0c34 --- /dev/null +++ b/docs/TagsApi.md @@ -0,0 +1,434 @@ +# TagsApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createTag**](TagsApi.md#createTag) | **POST** /tags | Create a tag | +| [**deleteTag**](TagsApi.md#deleteTag) | **DELETE** /tags/{tagId} | Delete a tag | +| [**getTag**](TagsApi.md#getTag) | **GET** /tags/{tagId} | Get a tag | +| [**getTags**](TagsApi.md#getTags) | **GET** /tags | Get list of tags | +| [**updateTag**](TagsApi.md#updateTag) | **PATCH** /tags/{tagId} | Update a tag | + + + +## createTag + +> CompletableFuture> createTag createTag(createTagRequest, idempotencyKey) + +Create a tag + +Create a new tag. + +### 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.TagsApi; +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); + + CreateTagRequest createTagRequest = new CreateTagRequest(); // CreateTagRequest | + 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.tags().createTag(createTagRequest, 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 TagsApi#createTag"); + 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 TagsApi#createTag"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createTagRequest** | [**CreateTagRequest**](CreateTagRequest.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 tag object | * X-Request-ID -
| + + +## deleteTag + +> CompletableFuture> deleteTag deleteTag(tagId) + +Delete a tag + +Delete the specified tag. + +### 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.TagsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID tagId = UUID.randomUUID(); // UUID | The ID of the tag to retrieve + try { + CompletableFuture> response = fireblocks.tags().deleteTag(tagId); + 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 TagsApi#deleteTag"); + 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 TagsApi#deleteTag"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **tagId** | **UUID**| The ID of the tag to retrieve | | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tag was deleted successfully | * X-Request-ID -
| + + +## getTag + +> CompletableFuture> getTag getTag(tagId) + +Get a tag + +Retrieve an existing tag by ID. + +### 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.TagsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID tagId = UUID.randomUUID(); // UUID | The ID of the tag to retrieve + try { + CompletableFuture> response = fireblocks.tags().getTag(tagId); + 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 TagsApi#getTag"); + 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 TagsApi#getTag"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **tagId** | **UUID**| The ID of the tag to retrieve | | + +### 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 tag object | * X-Request-ID -
| + + +## getTags + +> CompletableFuture> getTags getTags(pageCursor, pageSize, label, tagIds) + +Get list of tags + +Retrieve a paged list of all tags according to filters. + +### 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.TagsApi; +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 pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page. + BigDecimal pageSize = new BigDecimal("100"); // BigDecimal | Maximum number of items in the page + String label = "VIP"; // String | Label prefix to filter by. + List tagIds = Arrays.asList(); // List | List of tag IDs to filter by. + try { + CompletableFuture> response = fireblocks.tags().getTags(pageCursor, pageSize, label, tagIds); + 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 TagsApi#getTags"); + 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 TagsApi#getTags"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **pageCursor** | **String**| Page cursor to get the next page. | [optional] | +| **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 100] | +| **label** | **String**| Label prefix to filter by. | [optional] | +| **tagIds** | [**List<UUID>**](UUID.md)| List of tag IDs to filter by. | [optional] | + +### 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 TagsPagedResponse object | * X-Request-ID -
| + + +## updateTag + +> CompletableFuture> updateTag updateTag(updateTagRequest, tagId, idempotencyKey) + +Update a tag + +Update an existing specified tag. + +### 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.TagsApi; +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); + + UpdateTagRequest updateTagRequest = new UpdateTagRequest(); // UpdateTagRequest | + UUID tagId = UUID.randomUUID(); // UUID | The ID of the tag to update + 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.tags().updateTag(updateTagRequest, tagId, 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 TagsApi#updateTag"); + 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 TagsApi#updateTag"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **updateTagRequest** | [**UpdateTagRequest**](UpdateTagRequest.md)| | | +| **tagId** | **UUID**| The ID of the tag to update | | +| **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 tag object | * X-Request-ID -
| + diff --git a/docs/TagsPagedResponse.md b/docs/TagsPagedResponse.md new file mode 100644 index 00000000..ed83a3d8 --- /dev/null +++ b/docs/TagsPagedResponse.md @@ -0,0 +1,14 @@ + + +# TagsPagedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<Tag>**](Tag.md) | | | +|**next** | **String** | Cursor to the next page | | + + + diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index dc24cd8b..c9505fcd 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -27,7 +27,7 @@ |**gasPrice** | [**TransactionRequestGasPrice**](TransactionRequestGasPrice.md) | | [optional] | |**networkFee** | [**TransactionRequestNetworkFee**](TransactionRequestNetworkFee.md) | | [optional] | |**replaceTxByHash** | **String** | For EVM-based blockchains only. In case a transaction is stuck, specify the hash of the stuck transaction to replace it by this transaction with a higher fee, or to replace it with this transaction with a zero fee and drop it from the blockchain. | [optional] | -|**extraParameters** | **Object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. | [optional] | +|**extraParameters** | **Object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) | [optional] | |**customerRefId** | **String** | The ID for AML providers to associate the owner of funds with transactions. | [optional] | |**travelRuleMessage** | [**TravelRuleCreateTransactionRequest**](TravelRuleCreateTransactionRequest.md) | | [optional] | |**autoStaking** | **Boolean** | This feature is no longer supported. | [optional] | diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index ecbcc3b0..d3682c69 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -39,7 +39,7 @@ |**customerRefId** | **String** | The ID for AML providers to associate the owner of funds with transactions. | [optional] | |**amlScreeningResult** | [**AmlScreeningResult**](AmlScreeningResult.md) | | [optional] | |**complianceResults** | [**ComplianceResults**](ComplianceResults.md) | | [optional] | -|**extraParameters** | **Object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. | [optional] | +|**extraParameters** | **Object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) | [optional] | |**signedMessages** | [**List<SignedMessage>**](SignedMessage.md) | | [optional] | |**numOfConfirmations** | **BigDecimal** | The number of confirmations of the transaction. The number will increase until the transaction will be considered completed according to the confirmation policy. | [optional] | |**blockInfo** | [**BlockInfo**](BlockInfo.md) | | [optional] | diff --git a/docs/TravelRuleCreateTransactionRequest.md b/docs/TravelRuleCreateTransactionRequest.md index 03e78d14..a4804a1a 100644 --- a/docs/TravelRuleCreateTransactionRequest.md +++ b/docs/TravelRuleCreateTransactionRequest.md @@ -16,7 +16,8 @@ |**originator** | [**TravelRulePiiIVMS**](TravelRulePiiIVMS.md) | | | |**beneficiary** | [**TravelRulePiiIVMS**](TravelRulePiiIVMS.md) | | | |**encrypted** | **String** | Encrypted data related to the transaction. | [optional] | -|**protocol** | **String** | The protocol used to perform the travel rule. | [optional] | +|**protocol** | [**ProtocolEnum**](#ProtocolEnum) | The protocol used to perform the travel rule. | [optional] | +|**targetProtocol** | **String** | The target protocol for GTR (Global Travel Rule) transfers. | [optional] | |**skipBeneficiaryDataValidation** | **Boolean** | Whether to skip validation of beneficiary data. | [optional] | |**travelRuleBehavior** | **Boolean** | Whether to check if the transaction complies with the travel rule in the beneficiary VASP's jurisdiction. | [optional] | |**originatorRef** | **String** | A reference ID related to the originator of the transaction. | [optional] | @@ -30,3 +31,15 @@ +## Enum: ProtocolEnum + +| Name | Value | +|---- | -----| +| IVMS101 | "IVMS101" | +| TRLIGHT | "TRLight" | +| TRP | "TRP" | +| OPENVASP | "OpenVASP" | +| GTR | "GTR" | + + + diff --git a/docs/TravelRuleValidateFullTransactionRequest.md b/docs/TravelRuleValidateFullTransactionRequest.md index 6bd1ca19..3e8a09fd 100644 --- a/docs/TravelRuleValidateFullTransactionRequest.md +++ b/docs/TravelRuleValidateFullTransactionRequest.md @@ -41,6 +41,7 @@ | TRLIGHT | "TRLight" | | TRP | "TRP" | | OPENVASP | "OpenVASP" | +| GTR | "GTR" | diff --git a/docs/UpdateAssetUserMetadataRequest.md b/docs/UpdateAssetUserMetadataRequest.md new file mode 100644 index 00000000..b6fb4037 --- /dev/null +++ b/docs/UpdateAssetUserMetadataRequest.md @@ -0,0 +1,13 @@ + + +# UpdateAssetUserMetadataRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**AssetMetadataRequest**](AssetMetadataRequest.md) | | [optional] | + + + diff --git a/docs/UpdateTagRequest.md b/docs/UpdateTagRequest.md new file mode 100644 index 00000000..89c53374 --- /dev/null +++ b/docs/UpdateTagRequest.md @@ -0,0 +1,14 @@ + + +# UpdateTagRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**label** | **String** | The tag label | [optional] | +|**description** | **String** | Description for the tag | [optional] | + + + diff --git a/docs/VaultAccount.md b/docs/VaultAccount.md index 0e81afd5..be3806fd 100644 --- a/docs/VaultAccount.md +++ b/docs/VaultAccount.md @@ -13,6 +13,7 @@ |**hiddenOnUI** | **Boolean** | | [optional] | |**customerRefId** | **String** | | [optional] | |**autoFuel** | **Boolean** | | [optional] | +|**tags** | [**List<Tag>**](Tag.md) | List of tags attached to the vault account | [optional] | diff --git a/docs/VaultAccountsTagAttachmentsRequest.md b/docs/VaultAccountsTagAttachmentsRequest.md new file mode 100644 index 00000000..def5361b --- /dev/null +++ b/docs/VaultAccountsTagAttachmentsRequest.md @@ -0,0 +1,14 @@ + + +# VaultAccountsTagAttachmentsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tagIds** | **List<UUID>** | The IDs of the tags to attach | | +|**vaultAccountIds** | **List<String>** | The IDs of the vault accounts to attach tags to | | + + + diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 0e5e4250..ac66e665 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -5,14 +5,17 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**activateAssetForVaultAccount**](VaultsApi.md#activateAssetForVaultAccount) | **POST** /vault/accounts/{vaultAccountId}/{assetId}/activate | Activate a wallet in a vault account | +| [**attachTagsToVaultAccounts**](VaultsApi.md#attachTagsToVaultAccounts) | **POST** /vault/accounts/attached_tags/attach | Attach tags to a vault accounts | | [**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 | +| [**detachTagsFromVaultAccounts**](VaultsApi.md#detachTagsFromVaultAccounts) | **POST** /vault/accounts/attached_tags/detach | Detach tags from a vault accounts | | [**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 | +| [**getCreateMultipleVaultAccountsJobStatus**](VaultsApi.md#getCreateMultipleVaultAccountsJobStatus) | **GET** /vault/accounts/bulk/{jobId} | Get job status of bulk creation of new vault accounts | | [**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 | @@ -121,6 +124,89 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## attachTagsToVaultAccounts + +> CompletableFuture> attachTagsToVaultAccounts attachTagsToVaultAccounts(vaultAccountsTagAttachmentsRequest, idempotencyKey) + +Attach tags to a vault accounts + +Attach one or more tags to the requested vault accounts. + +### 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); + + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest = new VaultAccountsTagAttachmentsRequest(); // VaultAccountsTagAttachmentsRequest | + 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().attachTagsToVaultAccounts(vaultAccountsTagAttachmentsRequest, 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 VaultsApi#attachTagsToVaultAccounts"); + 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#attachTagsToVaultAccounts"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **vaultAccountsTagAttachmentsRequest** | [**VaultAccountsTagAttachmentsRequest**](VaultAccountsTagAttachmentsRequest.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**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tags were attached successfully | - | + + ## createLegacyAddress > CompletableFuture> createLegacyAddress createLegacyAddress(vaultAccountId, assetId, addressId, idempotencyKey) @@ -216,7 +302,7 @@ No authorization required Bulk creation of new vault accounts -Create multiple vault accounts by running an async job. </br> **Note**: - These endpoints are currently in beta and might be subject to changes. - We limit accounts to 10k per operation and 200k per customer during beta testing. +Create multiple vault accounts by running an async job. </br> **Note**: - These endpoints are currently in beta and might be subject to changes. - We limit accounts to 10k per operation and 200k per customer during beta testing. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. ### Example @@ -301,7 +387,7 @@ No authorization required Bulk creation of new deposit addresses -Create multiple deposit address by running an async job. </br> **Note**: - We limit accounts to 10k per operation. +Create multiple deposit address by running an async job. </br> **Note**: - We limit accounts to 10k per operation. Endpoint Permission: Admin, Non-Signing Admin. ### Example @@ -643,6 +729,89 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## detachTagsFromVaultAccounts + +> CompletableFuture> detachTagsFromVaultAccounts detachTagsFromVaultAccounts(vaultAccountsTagAttachmentsRequest, idempotencyKey) + +Detach tags from a vault accounts + +Detach one or more tags from the requested vault account. + +### 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); + + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest = new VaultAccountsTagAttachmentsRequest(); // VaultAccountsTagAttachmentsRequest | + 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().detachTagsFromVaultAccounts(vaultAccountsTagAttachmentsRequest, 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 VaultsApi#detachTagsFromVaultAccounts"); + 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#detachTagsFromVaultAccounts"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **vaultAccountsTagAttachmentsRequest** | [**VaultAccountsTagAttachmentsRequest**](VaultAccountsTagAttachmentsRequest.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**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Tags were detached successfully | - | + + ## getAssetWallets > CompletableFuture> getAssetWallets getAssetWallets(totalAmountLargerThan, assetId, orderBy, before, after, limit) @@ -741,7 +910,7 @@ No authorization required 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 +Returns the status of bulk creation of new deposit addresses job and the result or error Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -818,6 +987,89 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getCreateMultipleVaultAccountsJobStatus + +> CompletableFuture> getCreateMultipleVaultAccountsJobStatus getCreateMultipleVaultAccountsJobStatus(jobId) + +Get job status of bulk creation of new vault accounts + +Returns the status of bulk creation of new vault accounts job and the result or error Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + +### 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().getCreateMultipleVaultAccountsJobStatus(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#getCreateMultipleVaultAccountsJobStatus"); + 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#getCreateMultipleVaultAccountsJobStatus"); + 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) @@ -907,7 +1159,7 @@ No authorization required ## getPagedVaultAccounts -> CompletableFuture> getPagedVaultAccounts getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold, assetId, orderBy, before, after, limit) +> CompletableFuture> getPagedVaultAccounts getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold, assetId, orderBy, before, after, limit, tagIds) List vault accounts (Paginated) @@ -944,8 +1196,9 @@ public class Example { String before = "before_example"; // String | String after = "after_example"; // String | BigDecimal limit = new BigDecimal("200"); // BigDecimal | + List tagIds = Arrays.asList(); // List | List of tag IDs to filter vault accounts. try { - CompletableFuture> response = fireblocks.vaults().getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold, assetId, orderBy, before, after, limit); + CompletableFuture> response = fireblocks.vaults().getPagedVaultAccounts(namePrefix, nameSuffix, minAmountThreshold, assetId, orderBy, before, after, limit, tagIds); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -980,6 +1233,7 @@ public class Example { | **before** | **String**| | [optional] | | **after** | **String**| | [optional] | | **limit** | **BigDecimal**| | [optional] [default to 200] | +| **tagIds** | [**List<UUID>**](UUID.md)| List of tag IDs to filter vault accounts. | [optional] | ### Return type diff --git a/pom.xml b/pom.xml index 879bedc5..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 10.4.0 + 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 eaeea664..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.4.0"; + public static final String VERSION = "0.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index 4bc0a61d..b2650772 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -67,6 +67,7 @@ public class Fireblocks { private SmartTransferApi smartTransfer; private StakingApi staking; private SwapBetaApi swapBeta; + private TagsApi tags; private TokenizationApi tokenization; private TransactionsApi transactions; private TravelRuleApi travelRule; @@ -434,6 +435,13 @@ public SwapBetaApi swapBeta() { return swapBeta; } + public TagsApi tags() { + if (tags == null) { + tags = new TagsApi(apiClient); + } + return tags; + } + public TokenizationApi tokenization() { if (tokenization == null) { tokenization = new TokenizationApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java index 0d6670a8..52fa82ce 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -31,6 +31,7 @@ import com.fireblocks.sdk.model.ListBlockchainsResponse; import com.fireblocks.sdk.model.RegisterNewAssetRequest; import com.fireblocks.sdk.model.SetAssetPriceRequest; +import com.fireblocks.sdk.model.UpdateAssetUserMetadataRequest; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -697,4 +698,93 @@ private HttpRequest.Builder setAssetPriceRequestBuilder( } return localVarRequestBuilder; } + /** + * Update the user’s metadata for an asset Update the user’s metadata for an asset. Endpoint + * Permission: Owner, Admin, Non-Signing Admin, NCW Admin, Signer, Editor. + * + * @param id The ID or legacyId of the asset (required) + * @param updateAssetUserMetadataRequest (optional) + * @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<Asset>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> updateAssetUserMetadata( + String id, + UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + updateAssetUserMetadataRequestBuilder( + id, updateAssetUserMetadataRequest, 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( + "updateAssetUserMetadata", 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< + Asset>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder updateAssetUserMetadataRequestBuilder( + String id, + UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("updateAssetUserMetadata", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/assets/{id}".replace("{id}", ApiClient.urlEncode(id.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(updateAssetUserMetadataRequest); + localVarRequestBuilder.method( + "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java index 67f0ffff..93b69728 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java @@ -20,6 +20,8 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ContractAbiResponseDto; +import com.fireblocks.sdk.model.ContractDataDecodeRequest; +import com.fireblocks.sdk.model.ContractDataDecodedResponse; import com.fireblocks.sdk.model.ParameterWithValue; import com.fireblocks.sdk.model.ReadCallFunctionDto; import com.fireblocks.sdk.model.TransactionReceiptResponse; @@ -74,6 +76,111 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Decode a function call data, error, or event log Decode a function call data, error, or event + * log from a deployed contract by blockchain native asset id and contract address. + * + * @param contractDataDecodeRequest (required) + * @param contractAddress The contract's onchain address (required) + * @param baseAssetId The blockchain native asset identifier (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<ContractDataDecodedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> decodeContractData( + ContractDataDecodeRequest contractDataDecodeRequest, + String contractAddress, + String baseAssetId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + decodeContractDataRequestBuilder( + contractDataDecodeRequest, + contractAddress, + baseAssetId, + 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( + "decodeContractData", 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< + ContractDataDecodedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder decodeContractDataRequestBuilder( + ContractDataDecodeRequest contractDataDecodeRequest, + String contractAddress, + String baseAssetId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "decodeContractData", "contractDataDecodeRequest", contractDataDecodeRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "decodeContractData", "contractAddress", contractAddress); + ValidationUtils.assertParamExistsAndNotEmpty( + "decodeContractData", "baseAssetId", baseAssetId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/decode" + .replace( + "{contractAddress}", + ApiClient.urlEncode(contractAddress.toString())) + .replace("{baseAssetId}", ApiClient.urlEncode(baseAssetId.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(contractDataDecodeRequest); + 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; + } /** * Return deployed contract's ABI Return deployed contract's ABI by blockchain native * asset id and contract address diff --git a/src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java b/src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java index d75ca343..51e690cc 100644 --- a/src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java @@ -38,6 +38,7 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; @@ -95,7 +96,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @throws ApiException if fails to make API call */ public CompletableFuture> approveTermsOfService( - String providerId, String idempotencyKey) throws ApiException { + UUID providerId, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = approveTermsOfServiceRequestBuilder(providerId, idempotencyKey); @@ -133,9 +134,9 @@ public CompletableFuture> approveTermsOfService( } private HttpRequest.Builder approveTermsOfServiceRequestBuilder( - String providerId, String idempotencyKey) throws ApiException { + UUID providerId, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( - "approveTermsOfService", "providerId", providerId); + "approveTermsOfService", "providerId", providerId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -175,8 +176,7 @@ private HttpRequest.Builder approveTermsOfServiceRequestBuilder( * @throws ApiException if fails to make API call */ public CompletableFuture> createQuote( - QuoteRequest quoteRequest, String providerId, String idempotencyKey) - throws ApiException { + QuoteRequest quoteRequest, UUID providerId, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = createQuoteRequestBuilder(quoteRequest, providerId, idempotencyKey); @@ -213,10 +213,10 @@ public CompletableFuture> createQuote( } private HttpRequest.Builder createQuoteRequestBuilder( - QuoteRequest quoteRequest, String providerId, String idempotencyKey) - throws ApiException { + QuoteRequest quoteRequest, UUID providerId, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExists("createQuote", "quoteRequest", quoteRequest); - ValidationUtils.assertParamExistsAndNotEmpty("createQuote", "providerId", providerId); + ValidationUtils.assertParamExistsAndNotEmpty( + "createQuote", "providerId", providerId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); diff --git a/src/main/java/com/fireblocks/sdk/api/TagsApi.java b/src/main/java/com/fireblocks/sdk/api/TagsApi.java new file mode 100644 index 00000000..171c5ec9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/TagsApi.java @@ -0,0 +1,445 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.CreateTagRequest; +import com.fireblocks.sdk.model.Tag; +import com.fireblocks.sdk.model.TagsPagedResponse; +import com.fireblocks.sdk.model.UpdateTagRequest; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TagsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public TagsApi() { + this(new ApiClient()); + } + + public TagsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create a tag Create a new tag. + * + * @param createTagRequest (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<Tag>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> createTag( + CreateTagRequest createTagRequest, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + createTagRequestBuilder(createTagRequest, 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("createTag", 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() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder createTagRequestBuilder( + CreateTagRequest createTagRequest, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists("createTag", "createTagRequest", createTagRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tags"; + + 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(createTagRequest); + 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; + } + /** + * Delete a tag Delete the specified tag. + * + * @param tagId The ID of the tag to retrieve (required) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> deleteTag(UUID tagId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = deleteTagRequestBuilder(tagId); + 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("deleteTag", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deleteTagRequestBuilder(UUID tagId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("deleteTag", "tagId", tagId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tags/{tagId}".replace("{tagId}", ApiClient.urlEncode(tagId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get a tag Retrieve an existing tag by ID. + * + * @param tagId The ID of the tag to retrieve (required) + * @return CompletableFuture<ApiResponse<Tag>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getTag(UUID tagId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getTagRequestBuilder(tagId); + 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("getTag", 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() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getTagRequestBuilder(UUID tagId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getTag", "tagId", tagId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tags/{tagId}".replace("{tagId}", ApiClient.urlEncode(tagId.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 list of tags Retrieve a paged list of all tags according to filters. + * + * @param pageCursor Page cursor to get the next page. (optional) + * @param pageSize Maximum number of items in the page (optional, default to 100) + * @param label Label prefix to filter by. (optional) + * @param tagIds List of tag IDs to filter by. (optional + * @return CompletableFuture<ApiResponse<TagsPagedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getTags( + String pageCursor, BigDecimal pageSize, String label, List tagIds) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getTagsRequestBuilder(pageCursor, pageSize, label, tagIds); + 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("getTags", 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< + TagsPagedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getTagsRequestBuilder( + String pageCursor, BigDecimal pageSize, String label, List tagIds) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tags"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "label"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("label", label)); + localVarQueryParameterBaseName = "tagIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "tagIds", tagIds)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Update a tag Update an existing specified tag. + * + * @param updateTagRequest (required) + * @param tagId The ID of the tag to update (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<Tag>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> updateTag( + UpdateTagRequest updateTagRequest, UUID tagId, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + updateTagRequestBuilder(updateTagRequest, tagId, 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("updateTag", 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() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder updateTagRequestBuilder( + UpdateTagRequest updateTagRequest, UUID tagId, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists("updateTag", "updateTagRequest", updateTagRequest); + ValidationUtils.assertParamExistsAndNotEmpty("updateTag", "tagId", tagId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tags/{tagId}".replace("{tagId}", ApiClient.urlEncode(tagId.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(updateTagRequest); + localVarRequestBuilder.method( + "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index fdaa71d9..6a9372a0 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -26,6 +26,7 @@ import com.fireblocks.sdk.model.CreateMultipleAccountsRequest; import com.fireblocks.sdk.model.CreateMultipleDepositAddressesJobStatus; import com.fireblocks.sdk.model.CreateMultipleDepositAddressesRequest; +import com.fireblocks.sdk.model.CreateMultipleVaultAccountsJobStatus; import com.fireblocks.sdk.model.CreateVaultAccountRequest; import com.fireblocks.sdk.model.CreateVaultAssetResponse; import com.fireblocks.sdk.model.GetMaxSpendableAmountResponse; @@ -42,6 +43,7 @@ import com.fireblocks.sdk.model.UpdateVaultAccountRequest; import com.fireblocks.sdk.model.VaultAccount; import com.fireblocks.sdk.model.VaultAccountsPagedResponse; +import com.fireblocks.sdk.model.VaultAccountsTagAttachmentsRequest; import com.fireblocks.sdk.model.VaultActionStatus; import com.fireblocks.sdk.model.VaultAsset; import java.io.IOException; @@ -55,6 +57,7 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; @@ -178,6 +181,84 @@ private HttpRequest.Builder activateAssetForVaultAccountRequestBuilder( } return localVarRequestBuilder; } + /** + * Attach tags to a vault accounts Attach one or more tags to the requested vault accounts. + * + * @param vaultAccountsTagAttachmentsRequest (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> attachTagsToVaultAccounts( + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + attachTagsToVaultAccountsRequestBuilder( + vaultAccountsTagAttachmentsRequest, 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( + "attachTagsToVaultAccounts", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder attachTagsToVaultAccountsRequestBuilder( + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "attachTagsToVaultAccounts", + "vaultAccountsTagAttachmentsRequest", + vaultAccountsTagAttachmentsRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/vault/accounts/attached_tags/attach"; + + 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(vaultAccountsTagAttachmentsRequest); + 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; + } /** * Convert a segwit address to legacy format Converts an existing segwit address to the legacy * format. @@ -267,6 +348,7 @@ private HttpRequest.Builder createLegacyAddressRequestBuilder( * Bulk creation of new vault accounts Create multiple vault accounts by running an async job. * </br> **Note**: - These endpoints are currently in beta and might be subject to * changes. - We limit accounts to 10k per operation and 200k per customer during beta testing. + * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param createMultipleAccountsRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -353,7 +435,8 @@ private HttpRequest.Builder createMultipleAccountsRequestBuilder( } /** * Bulk creation of new deposit addresses Create multiple deposit address by running an async - * job. </br> **Note**: - We limit accounts to 10k per operation. + * job. </br> **Note**: - We limit accounts to 10k per operation. Endpoint Permission: + * Admin, Non-Signing Admin. * * @param createMultipleDepositAddressesRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -718,6 +801,85 @@ private HttpRequest.Builder createVaultAccountAssetAddressRequestBuilder( } return localVarRequestBuilder; } + /** + * Detach tags from a vault accounts Detach one or more tags from the requested vault account. + * + * @param vaultAccountsTagAttachmentsRequest (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> detachTagsFromVaultAccounts( + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + detachTagsFromVaultAccountsRequestBuilder( + vaultAccountsTagAttachmentsRequest, 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( + "detachTagsFromVaultAccounts", + localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder detachTagsFromVaultAccountsRequestBuilder( + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "detachTagsFromVaultAccounts", + "vaultAccountsTagAttachmentsRequest", + vaultAccountsTagAttachmentsRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/vault/accounts/attached_tags/detach"; + + 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(vaultAccountsTagAttachmentsRequest); + 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; + } /** * List asset wallets (Paginated) Gets all asset wallets at all of the vault accounts in your * workspace. An asset wallet is an asset at a vault account. This method allows fast traversal @@ -836,7 +998,8 @@ private HttpRequest.Builder getAssetWalletsRequestBuilder( } /** * 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 + * of new deposit addresses job and the result or error Endpoint Permission: Admin, Non-Signing + * Admin, Signer, Approver, Editor, Viewer. * * @param jobId The ID of the job to create addresses (required) * @return CompletableFuture<ApiResponse<CreateMultipleDepositAddressesJobStatus>> @@ -906,6 +1069,78 @@ private HttpRequest.Builder getCreateMultipleDepositAddressesJobStatusRequestBui } return localVarRequestBuilder; } + /** + * Get job status of bulk creation of new vault accounts Returns the status of bulk creation of + * new vault accounts job and the result or error Endpoint Permission: Admin, Non-Signing Admin, + * Signer, Approver, Editor, Viewer. + * + * @param jobId The ID of the job to create addresses (required) + * @return CompletableFuture<ApiResponse<CreateMultipleVaultAccountsJobStatus>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getCreateMultipleVaultAccountsJobStatus(String jobId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getCreateMultipleVaultAccountsJobStatusRequestBuilder(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( + "getCreateMultipleVaultAccountsJobStatus", + 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< + CreateMultipleVaultAccountsJobStatus>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getCreateMultipleVaultAccountsJobStatusRequestBuilder(String jobId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getCreateMultipleVaultAccountsJobStatus", "jobId", jobId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/vault/accounts/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 @@ -1014,6 +1249,7 @@ private HttpRequest.Builder getMaxSpendableAmountRequestBuilder( * @param before (optional) * @param after (optional) * @param limit (optional, default to 200) + * @param tagIds List of tag IDs to filter vault accounts. (optional * @return CompletableFuture<ApiResponse<VaultAccountsPagedResponse>> * @throws ApiException if fails to make API call */ @@ -1025,7 +1261,8 @@ public CompletableFuture> getPagedVaultA String orderBy, String before, String after, - BigDecimal limit) + BigDecimal limit, + List tagIds) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = @@ -1037,7 +1274,8 @@ public CompletableFuture> getPagedVaultA orderBy, before, after, - limit); + limit, + tagIds); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -1079,7 +1317,8 @@ private HttpRequest.Builder getPagedVaultAccountsRequestBuilder( String orderBy, String before, String after, - BigDecimal limit) + BigDecimal limit, + List tagIds) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -1106,6 +1345,8 @@ private HttpRequest.Builder getPagedVaultAccountsRequestBuilder( localVarQueryParams.addAll(ApiClient.parameterToPairs("after", after)); localVarQueryParameterBaseName = "limit"; localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "tagIds"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "tagIds", tagIds)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); diff --git a/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java b/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java index e6dcc810..cb433ca4 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java @@ -26,16 +26,21 @@ /** AssetDetailsMetadata */ @JsonPropertyOrder({ AssetDetailsMetadata.JSON_PROPERTY_SCOPE, + AssetDetailsMetadata.JSON_PROPERTY_VERIFIED, AssetDetailsMetadata.JSON_PROPERTY_DEPRECATED, AssetDetailsMetadata.JSON_PROPERTY_DEPRECATION_REFERRAL_ID, AssetDetailsMetadata.JSON_PROPERTY_WEBSITE, - AssetDetailsMetadata.JSON_PROPERTY_MEDIA + AssetDetailsMetadata.JSON_PROPERTY_MEDIA, + AssetDetailsMetadata.JSON_PROPERTY_NOTE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AssetDetailsMetadata { public static final String JSON_PROPERTY_SCOPE = "scope"; private AssetScope scope; + public static final String JSON_PROPERTY_VERIFIED = "verified"; + private Boolean verified; + public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; private Boolean deprecated; @@ -48,6 +53,9 @@ public class AssetDetailsMetadata { public static final String JSON_PROPERTY_MEDIA = "media"; private List media; + public static final String JSON_PROPERTY_NOTE = "note"; + private AssetNote note; + public AssetDetailsMetadata() {} public AssetDetailsMetadata scope(AssetScope scope) { @@ -73,6 +81,29 @@ public void setScope(AssetScope scope) { this.scope = scope; } + public AssetDetailsMetadata verified(Boolean verified) { + this.verified = verified; + return this; + } + + /** + * Is asset verified by Fireblocks + * + * @return verified + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getVerified() { + return verified; + } + + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVerified(Boolean verified) { + this.verified = verified; + } + public AssetDetailsMetadata deprecated(Boolean deprecated) { this.deprecated = deprecated; return this; @@ -173,6 +204,29 @@ public void setMedia(List media) { this.media = media; } + public AssetDetailsMetadata note(AssetNote note) { + this.note = note; + return this; + } + + /** + * Get note + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssetNote getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(AssetNote note) { + this.note = note; + } + /** Return true if this AssetDetailsMetadata object is equal to o. */ @Override public boolean equals(Object o) { @@ -184,16 +238,19 @@ public boolean equals(Object o) { } AssetDetailsMetadata assetDetailsMetadata = (AssetDetailsMetadata) o; return Objects.equals(this.scope, assetDetailsMetadata.scope) + && Objects.equals(this.verified, assetDetailsMetadata.verified) && Objects.equals(this.deprecated, assetDetailsMetadata.deprecated) && Objects.equals( this.deprecationReferralId, assetDetailsMetadata.deprecationReferralId) && Objects.equals(this.website, assetDetailsMetadata.website) - && Objects.equals(this.media, assetDetailsMetadata.media); + && Objects.equals(this.media, assetDetailsMetadata.media) + && Objects.equals(this.note, assetDetailsMetadata.note); } @Override public int hashCode() { - return Objects.hash(scope, deprecated, deprecationReferralId, website, media); + return Objects.hash( + scope, verified, deprecated, deprecationReferralId, website, media, note); } @Override @@ -201,12 +258,14 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetDetailsMetadata {\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); sb.append(" deprecationReferralId: ") .append(toIndentedString(deprecationReferralId)) .append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append(" media: ").append(toIndentedString(media)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append("}"); return sb.toString(); } @@ -265,6 +324,17 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `verified` to the URL query string + if (getVerified() != null) { + joiner.add( + String.format( + "%sverified%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getVerified()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `deprecated` to the URL query string if (getDeprecated() != null) { joiner.add( @@ -324,6 +394,11 @@ public String toUrlQueryString(String prefix) { } } + // add `note` to the URL query string + if (getNote() != null) { + joiner.add(getNote().toUrlQueryString(prefix + "note" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetMetadataRequest.java b/src/main/java/com/fireblocks/sdk/model/AssetMetadataRequest.java new file mode 100644 index 00000000..90c3eda7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetMetadataRequest.java @@ -0,0 +1,131 @@ +/* + * 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.util.Objects; +import java.util.StringJoiner; + +/** AssetMetadataRequest */ +@JsonPropertyOrder({AssetMetadataRequest.JSON_PROPERTY_NOTE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetMetadataRequest { + public static final String JSON_PROPERTY_NOTE = "note"; + private AssetNoteRequest note; + + public AssetMetadataRequest() {} + + public AssetMetadataRequest note(AssetNoteRequest note) { + this.note = note; + return this; + } + + /** + * Get note + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssetNoteRequest getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(AssetNoteRequest note) { + this.note = note; + } + + /** Return true if this AssetMetadataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetMetadataRequest assetMetadataRequest = (AssetMetadataRequest) o; + return Objects.equals(this.note, assetMetadataRequest.note); + } + + @Override + public int hashCode() { + return Objects.hash(note); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetMetadataRequest {\n"); + sb.append(" note: ").append(toIndentedString(note)).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 `note` to the URL query string + if (getNote() != null) { + joiner.add(getNote().toUrlQueryString(prefix + "note" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetNote.java b/src/main/java/com/fireblocks/sdk/model/AssetNote.java new file mode 100644 index 00000000..8b6b9c01 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetNote.java @@ -0,0 +1,264 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** AssetNote */ +@JsonPropertyOrder({ + AssetNote.JSON_PROPERTY_TEXT, + AssetNote.JSON_PROPERTY_USER_ID, + AssetNote.JSON_PROPERTY_USER_NAME, + AssetNote.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetNote { + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public static final String JSON_PROPERTY_USER_ID = "userId"; + private UUID userId; + + public static final String JSON_PROPERTY_USER_NAME = "userName"; + private String userName; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public AssetNote() {} + + public AssetNote text(String text) { + this.text = text; + return this; + } + + /** + * Note content + * + * @return text + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getText() { + return text; + } + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setText(String text) { + this.text = text; + } + + public AssetNote userId(UUID userId) { + this.userId = userId; + return this; + } + + /** + * Who updated the note (uuid) + * + * @return userId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserId() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(UUID userId) { + this.userId = userId; + } + + public AssetNote userName(String userName) { + this.userName = userName; + return this; + } + + /** + * User name + * + * @return userName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserName() { + return userName; + } + + @JsonProperty(JSON_PROPERTY_USER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserName(String userName) { + this.userName = userName; + } + + public AssetNote updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO Timestamp when last updated + * + * @return updatedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** Return true if this AssetNote object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetNote assetNote = (AssetNote) o; + return Objects.equals(this.text, assetNote.text) + && Objects.equals(this.userId, assetNote.userId) + && Objects.equals(this.userName, assetNote.userName) + && Objects.equals(this.updatedAt, assetNote.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(text, userId, userName, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetNote {\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 `text` to the URL query string + if (getText() != null) { + joiner.add( + String.format( + "%stext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getText()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `userId` to the URL query string + if (getUserId() != null) { + joiner.add( + String.format( + "%suserId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `userName` to the URL query string + if (getUserName() != null) { + joiner.add( + String.format( + "%suserName%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetNoteRequest.java b/src/main/java/com/fireblocks/sdk/model/AssetNoteRequest.java new file mode 100644 index 00000000..6db0aa81 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetNoteRequest.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; + +/** AssetNoteRequest */ +@JsonPropertyOrder({AssetNoteRequest.JSON_PROPERTY_TEXT}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetNoteRequest { + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public AssetNoteRequest() {} + + public AssetNoteRequest text(String text) { + this.text = text; + return this; + } + + /** + * Asset user note + * + * @return text + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getText() { + return text; + } + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setText(String text) { + this.text = text; + } + + /** Return true if this AssetNoteRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetNoteRequest assetNoteRequest = (AssetNoteRequest) o; + return Objects.equals(this.text, assetNoteRequest.text); + } + + @Override + public int hashCode() { + return Objects.hash(text); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetNoteRequest {\n"); + sb.append(" text: ").append(toIndentedString(text)).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 `text` to the URL query string + if (getText() != null) { + joiner.add( + String.format( + "%stext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getText()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java b/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java index 1e1d3dbc..3233a90a 100644 --- a/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java +++ b/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java @@ -24,6 +24,8 @@ public enum ChainDescriptor { MATIC("MATIC"), + ETH_TEST_HOODI("ETH_TEST_HOODI"), + ETH_TEST6("ETH_TEST6"), SOL_TEST("SOL_TEST"); diff --git a/src/main/java/com/fireblocks/sdk/model/ComplianceResults.java b/src/main/java/com/fireblocks/sdk/model/ComplianceResults.java index a5c5264a..e33149bb 100644 --- a/src/main/java/com/fireblocks/sdk/model/ComplianceResults.java +++ b/src/main/java/com/fireblocks/sdk/model/ComplianceResults.java @@ -13,11 +13,9 @@ 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; @@ -36,158 +34,65 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ComplianceResults { public static final String JSON_PROPERTY_AML = "aml"; - private List aml; + private ComplianceScreeningResult aml; public static final String JSON_PROPERTY_TR = "tr"; - private List tr; + private ComplianceScreeningResult tr; public static final String JSON_PROPERTY_AML_LIST = "amlList"; private List amlList; - /** Status of compliance result screening. */ - public enum StatusEnum { - STARTED("Started"), - - AMLSTARTED("AMLStarted"), - - AMLCOMPLETED("AMLCompleted"), - - AMLFAILED("AMLFailed"), - - AMLINBACKGROUND("AMLInBackground"), - - TRSTARTED("TRStarted"), - - TRCOMPLETED("TRCompleted"), - - TRFAILED("TRFailed"), - - COMPLETED("Completed"), - - REGISTRATIONSTARTED("RegistrationStarted"), - - AMLREGISTRATIONSTARTED("AMLRegistrationStarted"), - - AMLREGISTRATIONCOMPLETED("AMLRegistrationCompleted"), - - TRUPDATESTARTED("TRUpdateStarted"), - - TRUPDATECOMPLETED("TRUpdateCompleted"), - - UPDATECOMPLETED("UpdateCompleted"), - - INCOMINGSTARTED("IncomingStarted"), - - AMLINCOMINGSTARTED("AMLIncomingStarted"), - - AMLINCOMINGCOMPLETED("AMLIncomingCompleted"), - - AMLINCOMINGFAILED("AMLIncomingFailed"), - - AMLINCOMINGINBACKGROUND("AMLIncomingInBackground"), - - TRINCOMINGSTARTED("TRIncomingStarted"), - - TRINCOMINGCOMPLETED("TRIncomingCompleted"), - - TRINCOMINGFAILED("TRIncomingFailed"), - - INCOMINGCOMPLETED("IncomingCompleted"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusEnum status; + private ComplianceResultStatusesEnum status; public static final String JSON_PROPERTY_AML_REGISTRATION = "amlRegistration"; - private List amlRegistration; + private AmlRegistrationResult amlRegistration; public ComplianceResults() {} - public ComplianceResults aml(List aml) { + public ComplianceResults aml(ComplianceScreeningResult aml) { this.aml = aml; return this; } - public ComplianceResults addAmlItem(ComplianceScreeningResult amlItem) { - if (this.aml == null) { - this.aml = new ArrayList<>(); - } - this.aml.add(amlItem); - return this; - } - /** - * The end result of the AML screening. + * Get aml * * @return aml */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_AML) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAml() { + public ComplianceScreeningResult getAml() { return aml; } @JsonProperty(JSON_PROPERTY_AML) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAml(List aml) { + public void setAml(ComplianceScreeningResult aml) { this.aml = aml; } - public ComplianceResults tr(List tr) { + public ComplianceResults tr(ComplianceScreeningResult tr) { this.tr = tr; return this; } - public ComplianceResults addTrItem(ComplianceScreeningResult trItem) { - if (this.tr == null) { - this.tr = new ArrayList<>(); - } - this.tr.add(trItem); - return this; - } - /** - * The result of the Travel Rule screening. + * Get tr * * @return tr */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTr() { + public ComplianceScreeningResult getTr() { return tr; } @JsonProperty(JSON_PROPERTY_TR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTr(List tr) { + public void setTr(ComplianceScreeningResult tr) { this.tr = tr; } @@ -222,57 +127,49 @@ public void setAmlList(List amlList) { this.amlList = amlList; } - public ComplianceResults status(StatusEnum status) { + public ComplianceResults status(ComplianceResultStatusesEnum status) { this.status = status; return this; } /** - * Status of compliance result screening. + * Get status * * @return status */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public StatusEnum getStatus() { + public ComplianceResultStatusesEnum getStatus() { return status; } @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(StatusEnum status) { + public void setStatus(ComplianceResultStatusesEnum status) { this.status = status; } - public ComplianceResults amlRegistration(List amlRegistration) { + public ComplianceResults amlRegistration(AmlRegistrationResult amlRegistration) { this.amlRegistration = amlRegistration; return this; } - public ComplianceResults addAmlRegistrationItem(AmlRegistrationResult amlRegistrationItem) { - if (this.amlRegistration == null) { - this.amlRegistration = new ArrayList<>(); - } - this.amlRegistration.add(amlRegistrationItem); - return this; - } - /** - * The results of the AML address registration. + * Get amlRegistration * * @return amlRegistration */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_AML_REGISTRATION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAmlRegistration() { + public AmlRegistrationResult getAmlRegistration() { return amlRegistration; } @JsonProperty(JSON_PROPERTY_AML_REGISTRATION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAmlRegistration(List amlRegistration) { + public void setAmlRegistration(AmlRegistrationResult amlRegistration) { this.amlRegistration = amlRegistration; } @@ -356,46 +253,12 @@ public String toUrlQueryString(String prefix) { // add `aml` to the URL query string if (getAml() != null) { - for (int i = 0; i < getAml().size(); i++) { - if (getAml().get(i) != null) { - joiner.add( - getAml().get(i) - .toUrlQueryString( - String.format( - "%saml%s%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", - containerPrefix, - i, - containerSuffix)))); - } - } + joiner.add(getAml().toUrlQueryString(prefix + "aml" + suffix)); } // add `tr` to the URL query string if (getTr() != null) { - for (int i = 0; i < getTr().size(); i++) { - if (getTr().get(i) != null) { - joiner.add( - getTr().get(i) - .toUrlQueryString( - String.format( - "%str%s%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", - containerPrefix, - i, - containerSuffix)))); - } - } + joiner.add(getTr().toUrlQueryString(prefix + "tr" + suffix)); } // add `amlList` to the URL query string @@ -434,25 +297,7 @@ public String toUrlQueryString(String prefix) { // add `amlRegistration` to the URL query string if (getAmlRegistration() != null) { - for (int i = 0; i < getAmlRegistration().size(); i++) { - if (getAmlRegistration().get(i) != null) { - joiner.add( - getAmlRegistration() - .get(i) - .toUrlQueryString( - String.format( - "%samlRegistration%s%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", - containerPrefix, - i, - containerSuffix)))); - } - } + joiner.add(getAmlRegistration().toUrlQueryString(prefix + "amlRegistration" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeDataType.java b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeDataType.java new file mode 100644 index 00000000..eb5d9444 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeDataType.java @@ -0,0 +1,66 @@ +/* + * 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.JsonValue; + +/** The type of the data to decode. */ +public enum ContractDataDecodeDataType { + ERROR("ERROR"), + + LOG("LOG"), + + FUNCTION("FUNCTION"); + + private String value; + + ContractDataDecodeDataType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ContractDataDecodeDataType fromValue(String value) { + for (ContractDataDecodeDataType b : ContractDataDecodeDataType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeError.java b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeError.java new file mode 100644 index 00000000..25bd1f79 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeError.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; + +/** ContractDataDecodeError */ +@JsonPropertyOrder({ + ContractDataDecodeError.JSON_PROPERTY_MESSAGE, + ContractDataDecodeError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDataDecodeError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public ContractDataDecodeError() {} + + public ContractDataDecodeError 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 ContractDataDecodeError 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 ContractDataDecodeError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDataDecodeError contractDataDecodeError = (ContractDataDecodeError) o; + return Objects.equals(this.message, contractDataDecodeError.message) + && Objects.equals(this.code, contractDataDecodeError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDataDecodeError {\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/ContractDataDecodeRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequest.java new file mode 100644 index 00000000..c0a55b40 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequest.java @@ -0,0 +1,236 @@ +/* + * 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; + +/** ContractDataDecodeRequest */ +@JsonPropertyOrder({ + ContractDataDecodeRequest.JSON_PROPERTY_DATA, + ContractDataDecodeRequest.JSON_PROPERTY_DATA_TYPE, + ContractDataDecodeRequest.JSON_PROPERTY_ABI +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDataDecodeRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private ContractDataDecodeRequestData data; + + public static final String JSON_PROPERTY_DATA_TYPE = "dataType"; + private ContractDataDecodeDataType dataType; + + public static final String JSON_PROPERTY_ABI = "abi"; + private List abi; + + public ContractDataDecodeRequest() {} + + public ContractDataDecodeRequest data(ContractDataDecodeRequestData data) { + this.data = data; + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ContractDataDecodeRequestData getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(ContractDataDecodeRequestData data) { + this.data = data; + } + + public ContractDataDecodeRequest dataType(ContractDataDecodeDataType dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get dataType + * + * @return dataType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ContractDataDecodeDataType getDataType() { + return dataType; + } + + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDataType(ContractDataDecodeDataType dataType) { + this.dataType = dataType; + } + + public ContractDataDecodeRequest abi(List abi) { + this.abi = abi; + return this; + } + + public ContractDataDecodeRequest addAbiItem(AbiFunction abiItem) { + if (this.abi == null) { + this.abi = new ArrayList<>(); + } + this.abi.add(abiItem); + return this; + } + + /** + * The abi of the function/error/log to decode. + * + * @return abi + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAbi() { + return abi; + } + + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAbi(List abi) { + this.abi = abi; + } + + /** Return true if this ContractDataDecodeRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDataDecodeRequest contractDataDecodeRequest = (ContractDataDecodeRequest) o; + return Objects.equals(this.data, contractDataDecodeRequest.data) + && Objects.equals(this.dataType, contractDataDecodeRequest.dataType) + && Objects.equals(this.abi, contractDataDecodeRequest.abi); + } + + @Override + public int hashCode() { + return Objects.hash(data, dataType, abi); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDataDecodeRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add(getData().toUrlQueryString(prefix + "data" + suffix)); + } + + // add `dataType` to the URL query string + if (getDataType() != null) { + joiner.add( + String.format( + "%sdataType%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getDataType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `abi` to the URL query string + if (getAbi() != null) { + for (int i = 0; i < getAbi().size(); i++) { + if (getAbi().get(i) != null) { + joiner.add( + getAbi().get(i) + .toUrlQueryString( + String.format( + "%sabi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequestData.java b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequestData.java new file mode 100644 index 00000000..ec72327a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeRequestData.java @@ -0,0 +1,339 @@ +/* + * 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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +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 = ContractDataDecodeRequestData.ContractDataDecodeRequestDataDeserializer.class) +@JsonSerialize(using = ContractDataDecodeRequestData.ContractDataDecodeRequestDataSerializer.class) +public class ContractDataDecodeRequestData extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ContractDataDecodeRequestData.class.getName()); + + public static class ContractDataDecodeRequestDataSerializer + extends StdSerializer { + public ContractDataDecodeRequestDataSerializer(Class t) { + super(t); + } + + public ContractDataDecodeRequestDataSerializer() { + this(null); + } + + @Override + public void serialize( + ContractDataDecodeRequestData value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ContractDataDecodeRequestDataDeserializer + extends StdDeserializer { + public ContractDataDecodeRequestDataDeserializer() { + this(ContractDataDecodeRequestData.class); + } + + public ContractDataDecodeRequestDataDeserializer(Class vc) { + super(vc); + } + + @Override + public ContractDataDecodeRequestData 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 ContractDataLogDataParam + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ContractDataLogDataParam.class.equals(Integer.class) + || ContractDataLogDataParam.class.equals(Long.class) + || ContractDataLogDataParam.class.equals(Float.class) + || ContractDataLogDataParam.class.equals(Double.class) + || ContractDataLogDataParam.class.equals(Boolean.class) + || ContractDataLogDataParam.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ContractDataLogDataParam.class.equals(Integer.class) + || ContractDataLogDataParam.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ContractDataLogDataParam.class.equals(Float.class) + || ContractDataLogDataParam.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ContractDataLogDataParam.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ContractDataLogDataParam.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(ContractDataLogDataParam.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 'ContractDataLogDataParam'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ContractDataLogDataParam'", + e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) + || String.class.equals(Long.class) + || String.class.equals(Float.class) + || String.class.equals(Double.class) + || String.class.equals(Boolean.class) + || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((String.class.equals(Integer.class) + || String.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((String.class.equals(Float.class) + || String.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (String.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (String.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(String.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 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + if (match == 1) { + ContractDataDecodeRequestData ret = new ContractDataDecodeRequestData(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for ContractDataDecodeRequestData: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ContractDataDecodeRequestData getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ContractDataDecodeRequestData cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public ContractDataDecodeRequestData() { + super("oneOf", Boolean.FALSE); + } + + public ContractDataDecodeRequestData(ContractDataLogDataParam o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ContractDataDecodeRequestData(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ContractDataLogDataParam", ContractDataLogDataParam.class); + schemas.put("String", String.class); + JSON.registerDescendants( + ContractDataDecodeRequestData.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return ContractDataDecodeRequestData.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ContractDataLogDataParam, String + * + *

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(ContractDataLogDataParam.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ContractDataLogDataParam, String"); + } + + /** + * Get the actual instance, which can be the following: ContractDataLogDataParam, String + * + * @return The actual instance (ContractDataLogDataParam, String) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ContractDataLogDataParam`. If the actual instance is not + * `ContractDataLogDataParam`, the ClassCastException will be thrown. + * + * @return The actual instance of `ContractDataLogDataParam` + * @throws ClassCastException if the instance is not `ContractDataLogDataParam` + */ + public ContractDataLogDataParam getContractDataLogDataParam() throws ClassCastException { + return (ContractDataLogDataParam) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) 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 String) { + if (getActualInstance() != null) { + joiner.add( + String.format( + "%sone_of_0%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getActualInstance()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ContractDataLogDataParam) { + if (getActualInstance() != null) { + joiner.add( + ((ContractDataLogDataParam) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParams.java b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParams.java new file mode 100644 index 00000000..d38c7820 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParams.java @@ -0,0 +1,245 @@ +/* + * 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; + +/** ContractDataDecodeResponseParams */ +@JsonPropertyOrder({ + ContractDataDecodeResponseParams.JSON_PROPERTY_NAME, + ContractDataDecodeResponseParams.JSON_PROPERTY_SIGNATURE, + ContractDataDecodeResponseParams.JSON_PROPERTY_ARGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDataDecodeResponseParams { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SIGNATURE = "signature"; + private String signature; + + public static final String JSON_PROPERTY_ARGS = "args"; + private List args = new ArrayList<>(); + + public ContractDataDecodeResponseParams() {} + + public ContractDataDecodeResponseParams name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract function. + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public ContractDataDecodeResponseParams signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the contract function. + * + * @return signature + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSignature() { + return signature; + } + + @JsonProperty(JSON_PROPERTY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignature(String signature) { + this.signature = signature; + } + + public ContractDataDecodeResponseParams args(List args) { + this.args = args; + return this; + } + + public ContractDataDecodeResponseParams addArgsItem(ParameterWithValue argsItem) { + if (this.args == null) { + this.args = new ArrayList<>(); + } + this.args.add(argsItem); + return this; + } + + /** + * Get args + * + * @return args + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ARGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getArgs() { + return args; + } + + @JsonProperty(JSON_PROPERTY_ARGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArgs(List args) { + this.args = args; + } + + /** Return true if this ContractDataDecodeResponseParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDataDecodeResponseParams contractDataDecodeResponseParams = + (ContractDataDecodeResponseParams) o; + return Objects.equals(this.name, contractDataDecodeResponseParams.name) + && Objects.equals(this.signature, contractDataDecodeResponseParams.signature) + && Objects.equals(this.args, contractDataDecodeResponseParams.args); + } + + @Override + public int hashCode() { + return Objects.hash(name, signature, args); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDataDecodeResponseParams {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); + sb.append(" args: ").append(toIndentedString(args)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `signature` to the URL query string + if (getSignature() != null) { + joiner.add( + String.format( + "%ssignature%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSignature()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `args` to the URL query string + if (getArgs() != null) { + for (int i = 0; i < getArgs().size(); i++) { + if (getArgs().get(i) != null) { + joiner.add( + getArgs() + .get(i) + .toUrlQueryString( + String.format( + "%sargs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDataDecodedResponse.java b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodedResponse.java new file mode 100644 index 00000000..6d1ef626 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataDecodedResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ContractDataDecodedResponse */ +@JsonPropertyOrder({ + ContractDataDecodedResponse.JSON_PROPERTY_RESULT, + ContractDataDecodedResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDataDecodedResponse { + public static final String JSON_PROPERTY_RESULT = "result"; + private List result = new ArrayList<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private ContractDataDecodeDataType type; + + public ContractDataDecodedResponse() {} + + public ContractDataDecodedResponse result(List result) { + this.result = result; + return this; + } + + public ContractDataDecodedResponse addResultItem(ContractDataDecodeResponseParams resultItem) { + if (this.result == null) { + this.result = new ArrayList<>(); + } + this.result.add(resultItem); + return this; + } + + /** + * The decoded parameters of the contract function call. + * + * @return result + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getResult() { + return result; + } + + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setResult(List result) { + this.result = result; + } + + public ContractDataDecodedResponse type(ContractDataDecodeDataType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ContractDataDecodeDataType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(ContractDataDecodeDataType type) { + this.type = type; + } + + /** Return true if this ContractDataDecodedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDataDecodedResponse contractDataDecodedResponse = (ContractDataDecodedResponse) o; + return Objects.equals(this.result, contractDataDecodedResponse.result) + && Objects.equals(this.type, contractDataDecodedResponse.type); + } + + @Override + public int hashCode() { + return Objects.hash(result, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDataDecodedResponse {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 `result` to the URL query string + if (getResult() != null) { + for (int i = 0; i < getResult().size(); i++) { + if (getResult().get(i) != null) { + joiner.add( + getResult() + .get(i) + .toUrlQueryString( + String.format( + "%sresult%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDataLogDataParam.java b/src/main/java/com/fireblocks/sdk/model/ContractDataLogDataParam.java new file mode 100644 index 00000000..b0a3c68e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDataLogDataParam.java @@ -0,0 +1,199 @@ +/* + * 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; + +/** ContractDataLogDataParam */ +@JsonPropertyOrder({ + ContractDataLogDataParam.JSON_PROPERTY_DATA, + ContractDataLogDataParam.JSON_PROPERTY_TOPICS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDataLogDataParam { + public static final String JSON_PROPERTY_DATA = "data"; + private String data; + + public static final String JSON_PROPERTY_TOPICS = "topics"; + private List topics = new ArrayList<>(); + + public ContractDataLogDataParam() {} + + public ContractDataLogDataParam data(String data) { + this.data = data; + return this; + } + + /** + * The data to decode, which can be a string or an object containing the data and its type. + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(String data) { + this.data = data; + } + + public ContractDataLogDataParam topics(List topics) { + this.topics = topics; + return this; + } + + public ContractDataLogDataParam addTopicsItem(String topicsItem) { + if (this.topics == null) { + this.topics = new ArrayList<>(); + } + this.topics.add(topicsItem); + return this; + } + + /** + * The topics of the log, which is an array of strings. + * + * @return topics + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTopics() { + return topics; + } + + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTopics(List topics) { + this.topics = topics; + } + + /** Return true if this ContractDataLogDataParam object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDataLogDataParam contractDataLogDataParam = (ContractDataLogDataParam) o; + return Objects.equals(this.data, contractDataLogDataParam.data) + && Objects.equals(this.topics, contractDataLogDataParam.topics); + } + + @Override + public int hashCode() { + return Objects.hash(data, topics); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDataLogDataParam {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + joiner.add( + String.format( + "%sdata%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getData()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `topics` to the URL query string + if (getTopics() != null) { + for (int i = 0; i < getTopics().size(); i++) { + joiner.add( + String.format( + "%stopics%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTopics().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequest.java index af13300e..d0d099ed 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequest.java @@ -26,15 +26,28 @@ /** CreateMultipleAccountsRequest */ @JsonPropertyOrder({ CreateMultipleAccountsRequest.JSON_PROPERTY_COUNT, - CreateMultipleAccountsRequest.JSON_PROPERTY_ASSET_IDS + CreateMultipleAccountsRequest.JSON_PROPERTY_BASE_ASSET_IDS, + CreateMultipleAccountsRequest.JSON_PROPERTY_NAMES, + CreateMultipleAccountsRequest.JSON_PROPERTY_VAULT_ACCOUNT_NAMES_STARTING_INDEX, + CreateMultipleAccountsRequest.JSON_PROPERTY_PREFIX }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateMultipleAccountsRequest { public static final String JSON_PROPERTY_COUNT = "count"; private Integer count; - public static final String JSON_PROPERTY_ASSET_IDS = "assetIds"; - private List assetIds; + public static final String JSON_PROPERTY_BASE_ASSET_IDS = "baseAssetIds"; + private List baseAssetIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAMES = "names"; + private List names; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_NAMES_STARTING_INDEX = + "vaultAccountNamesStartingIndex"; + private Integer vaultAccountNamesStartingIndex; + + public static final String JSON_PROPERTY_PREFIX = "prefix"; + private String prefix; public CreateMultipleAccountsRequest() {} @@ -48,48 +61,128 @@ public CreateMultipleAccountsRequest count(Integer count) { * * @return count */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public Integer getCount() { return count; } @JsonProperty(JSON_PROPERTY_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setCount(Integer count) { this.count = count; } - public CreateMultipleAccountsRequest assetIds(List assetIds) { - this.assetIds = assetIds; + public CreateMultipleAccountsRequest baseAssetIds(List baseAssetIds) { + this.baseAssetIds = baseAssetIds; return this; } - public CreateMultipleAccountsRequest addAssetIdsItem(String assetIdsItem) { - if (this.assetIds == null) { - this.assetIds = new ArrayList<>(); + public CreateMultipleAccountsRequest addBaseAssetIdsItem(String baseAssetIdsItem) { + if (this.baseAssetIds == null) { + this.baseAssetIds = new ArrayList<>(); } - this.assetIds.add(assetIdsItem); + this.baseAssetIds.add(baseAssetIdsItem); + return this; + } + + /** + * Array of base asset IDs + * + * @return baseAssetIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getBaseAssetIds() { + return baseAssetIds; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetIds(List baseAssetIds) { + this.baseAssetIds = baseAssetIds; + } + + public CreateMultipleAccountsRequest names(List names) { + this.names = names; + return this; + } + + public CreateMultipleAccountsRequest addNamesItem(String namesItem) { + if (this.names == null) { + this.names = new ArrayList<>(); + } + this.names.add(namesItem); + return this; + } + + /** + * Names to assign to vault accounts. if vaultAccountNamesStartingIndex or prefix is used + * it'll fail + * + * @return names + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNames() { + return names; + } + + @JsonProperty(JSON_PROPERTY_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNames(List names) { + this.names = names; + } + + public CreateMultipleAccountsRequest vaultAccountNamesStartingIndex( + Integer vaultAccountNamesStartingIndex) { + this.vaultAccountNamesStartingIndex = vaultAccountNamesStartingIndex; + return this; + } + + /** + * Copy vault accounts names starting from this index. If names array is used it'll fail + * + * @return vaultAccountNamesStartingIndex + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_NAMES_STARTING_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getVaultAccountNamesStartingIndex() { + return vaultAccountNamesStartingIndex; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_NAMES_STARTING_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccountNamesStartingIndex(Integer vaultAccountNamesStartingIndex) { + this.vaultAccountNamesStartingIndex = vaultAccountNamesStartingIndex; + } + + public CreateMultipleAccountsRequest prefix(String prefix) { + this.prefix = prefix; return this; } /** - * Array of asset IDs + * When copying from existing vault accounts (vaultAccountNamesStartingIndex) then adding a + * prefix to the names. If names array is used it'll fail * - * @return assetIds + * @return prefix */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ASSET_IDS) + @JsonProperty(JSON_PROPERTY_PREFIX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAssetIds() { - return assetIds; + public String getPrefix() { + return prefix; } - @JsonProperty(JSON_PROPERTY_ASSET_IDS) + @JsonProperty(JSON_PROPERTY_PREFIX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAssetIds(List assetIds) { - this.assetIds = assetIds; + public void setPrefix(String prefix) { + this.prefix = prefix; } /** Return true if this CreateMultipleAccountsRequest object is equal to o. */ @@ -104,12 +197,17 @@ public boolean equals(Object o) { CreateMultipleAccountsRequest createMultipleAccountsRequest = (CreateMultipleAccountsRequest) o; return Objects.equals(this.count, createMultipleAccountsRequest.count) - && Objects.equals(this.assetIds, createMultipleAccountsRequest.assetIds); + && Objects.equals(this.baseAssetIds, createMultipleAccountsRequest.baseAssetIds) + && Objects.equals(this.names, createMultipleAccountsRequest.names) + && Objects.equals( + this.vaultAccountNamesStartingIndex, + createMultipleAccountsRequest.vaultAccountNamesStartingIndex) + && Objects.equals(this.prefix, createMultipleAccountsRequest.prefix); } @Override public int hashCode() { - return Objects.hash(count, assetIds); + return Objects.hash(count, baseAssetIds, names, vaultAccountNamesStartingIndex, prefix); } @Override @@ -117,7 +215,12 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateMultipleAccountsRequest {\n"); sb.append(" count: ").append(toIndentedString(count)).append("\n"); - sb.append(" assetIds: ").append(toIndentedString(assetIds)).append("\n"); + sb.append(" baseAssetIds: ").append(toIndentedString(baseAssetIds)).append("\n"); + sb.append(" names: ").append(toIndentedString(names)).append("\n"); + sb.append(" vaultAccountNamesStartingIndex: ") + .append(toIndentedString(vaultAccountNamesStartingIndex)) + .append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); sb.append("}"); return sb.toString(); } @@ -176,12 +279,12 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } - // add `assetIds` to the URL query string - if (getAssetIds() != null) { - for (int i = 0; i < getAssetIds().size(); i++) { + // add `baseAssetIds` to the URL query string + if (getBaseAssetIds() != null) { + for (int i = 0; i < getBaseAssetIds().size(); i++) { joiner.add( String.format( - "%sassetIds%s%s=%s", + "%sbaseAssetIds%s%s=%s", prefix, suffix, "".equals(suffix) @@ -189,12 +292,55 @@ public String toUrlQueryString(String prefix) { : String.format( "%s%d%s", containerPrefix, i, containerSuffix), URLEncoder.encode( - String.valueOf(getAssetIds().get(i)), + String.valueOf(getBaseAssetIds().get(i)), StandardCharsets.UTF_8) .replaceAll("\\+", "%20"))); } } + // add `names` to the URL query string + if (getNames() != null) { + for (int i = 0; i < getNames().size(); i++) { + joiner.add( + String.format( + "%snames%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getNames().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `vaultAccountNamesStartingIndex` to the URL query string + if (getVaultAccountNamesStartingIndex() != null) { + joiner.add( + String.format( + "%svaultAccountNamesStartingIndex%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountNamesStartingIndex()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `prefix` to the URL query string + if (getPrefix() != null) { + joiner.add( + String.format( + "%sprefix%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getPrefix()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatus.java b/src/main/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatus.java new file mode 100644 index 00000000..f14e27d4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatus.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.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateMultipleVaultAccountsJobStatus */ +@JsonPropertyOrder({ + CreateMultipleVaultAccountsJobStatus.JSON_PROPERTY_STATUS, + CreateMultipleVaultAccountsJobStatus.JSON_PROPERTY_VAULT_ACCOUNTS, + CreateMultipleVaultAccountsJobStatus.JSON_PROPERTY_ERROR_MESSAGE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateMultipleVaultAccountsJobStatus { + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_VAULT_ACCOUNTS = "vaultAccounts"; + private Map> vaultAccounts = new HashMap<>(); + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "errorMessage"; + private String errorMessage; + + public CreateMultipleVaultAccountsJobStatus() {} + + public CreateMultipleVaultAccountsJobStatus 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 CreateMultipleVaultAccountsJobStatus vaultAccounts( + Map> vaultAccounts) { + this.vaultAccounts = vaultAccounts; + return this; + } + + public CreateMultipleVaultAccountsJobStatus putVaultAccountsItem( + String key, Map vaultAccountsItem) { + if (this.vaultAccounts == null) { + this.vaultAccounts = new HashMap<>(); + } + this.vaultAccounts.put(key, vaultAccountsItem); + return this; + } + + /** + * Mapping between VaultAccountId to a mapping of asset to address + * + * @return vaultAccounts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getVaultAccounts() { + return vaultAccounts; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccounts(Map> vaultAccounts) { + this.vaultAccounts = vaultAccounts; + } + + public CreateMultipleVaultAccountsJobStatus 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 CreateMultipleVaultAccountsJobStatus object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMultipleVaultAccountsJobStatus createMultipleVaultAccountsJobStatus = + (CreateMultipleVaultAccountsJobStatus) o; + return Objects.equals(this.status, createMultipleVaultAccountsJobStatus.status) + && Objects.equals( + this.vaultAccounts, createMultipleVaultAccountsJobStatus.vaultAccounts) + && Objects.equals( + this.errorMessage, createMultipleVaultAccountsJobStatus.errorMessage); + } + + @Override + public int hashCode() { + return Objects.hash(status, vaultAccounts, errorMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateMultipleVaultAccountsJobStatus {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" vaultAccounts: ").append(toIndentedString(vaultAccounts)).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 `vaultAccounts` to the URL query string + if (getVaultAccounts() != null) { + for (String _key : getVaultAccounts().keySet()) { + joiner.add( + String.format( + "%svaultAccounts%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getVaultAccounts().get(_key), + URLEncoder.encode( + String.valueOf(getVaultAccounts().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // 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/CreateTagRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateTagRequest.java new file mode 100644 index 00000000..99f463f6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateTagRequest.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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateTagRequest */ +@JsonPropertyOrder({ + CreateTagRequest.JSON_PROPERTY_LABEL, + CreateTagRequest.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTagRequest { + public static final String JSON_PROPERTY_LABEL = "label"; + private String label; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public CreateTagRequest() {} + + public CreateTagRequest label(String label) { + this.label = label; + return this; + } + + /** + * The tag label + * + * @return label + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(String label) { + this.label = label; + } + + public CreateTagRequest description(String description) { + this.description = description; + return this; + } + + /** + * Description for the tag + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this CreateTagRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTagRequest createTagRequest = (CreateTagRequest) o; + return Objects.equals(this.label, createTagRequest.label) + && Objects.equals(this.description, createTagRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(label, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTagRequest {\n"); + sb.append(" label: ").append(toIndentedString(label)).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 `label` to the URL query string + if (getLabel() != null) { + joiner.add( + String.format( + "%slabel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLabel()), 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/SwapOperation.java b/src/main/java/com/fireblocks/sdk/model/SwapOperation.java index b6c897f3..93585949 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapOperation.java +++ b/src/main/java/com/fireblocks/sdk/model/SwapOperation.java @@ -58,7 +58,7 @@ public class SwapOperation { private String accountId; public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; - private String providerId; + private UUID providerId; public static final String JSON_PROPERTY_CATEGORY = "category"; private ProviderCategoryEnum category; @@ -201,26 +201,26 @@ public void setAccountId(String accountId) { this.accountId = accountId; } - public SwapOperation providerId(String providerId) { + public SwapOperation providerId(UUID providerId) { this.providerId = providerId; return this; } /** - * The ID of the provider + * The uuid that identifies the provider * * @return providerId */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderId() { + public UUID getProviderId() { return providerId; } @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderId(String providerId) { + public void setProviderId(UUID providerId) { this.providerId = providerId; } diff --git a/src/main/java/com/fireblocks/sdk/model/SwapProvider.java b/src/main/java/com/fireblocks/sdk/model/SwapProvider.java index eb5f9f54..7317b13b 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapProvider.java +++ b/src/main/java/com/fireblocks/sdk/model/SwapProvider.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Objects; import java.util.StringJoiner; +import java.util.UUID; /** SwapProvider */ @JsonPropertyOrder({ @@ -36,7 +37,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SwapProvider { public static final String JSON_PROPERTY_ID = "id"; - private String id; + private UUID id; public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -59,26 +60,26 @@ public class SwapProvider { public SwapProvider() {} - public SwapProvider id(String id) { + public SwapProvider id(UUID id) { this.id = id; return this; } /** - * The ID of the provider + * The uuid that identifies the provider * * @return id */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { + public UUID getId() { return id; } @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(UUID id) { this.id = id; } diff --git a/src/main/java/com/fireblocks/sdk/model/Tag.java b/src/main/java/com/fireblocks/sdk/model/Tag.java new file mode 100644 index 00000000..7efca3a7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Tag.java @@ -0,0 +1,220 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** Tag */ +@JsonPropertyOrder({Tag.JSON_PROPERTY_ID, Tag.JSON_PROPERTY_LABEL, Tag.JSON_PROPERTY_DESCRIPTION}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_LABEL = "label"; + private String label; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public Tag() {} + + public Tag id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the tag + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public Tag label(String label) { + this.label = label; + return this; + } + + /** + * The tag label + * + * @return label + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabel() { + return label; + } + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(String label) { + this.label = label; + } + + public Tag description(String description) { + this.description = description; + return this; + } + + /** + * Description for the tag + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this Tag object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) + && Objects.equals(this.label, tag.label) + && Objects.equals(this.description, tag.description); + } + + @Override + public int hashCode() { + return Objects.hash(id, label, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).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 `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `label` to the URL query string + if (getLabel() != null) { + joiner.add( + String.format( + "%slabel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLabel()), 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/TagsPagedResponse.java b/src/main/java/com/fireblocks/sdk/model/TagsPagedResponse.java new file mode 100644 index 00000000..27b81033 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TagsPagedResponse.java @@ -0,0 +1,200 @@ +/* + * 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; + +/** TagsPagedResponse */ +@JsonPropertyOrder({TagsPagedResponse.JSON_PROPERTY_DATA, TagsPagedResponse.JSON_PROPERTY_NEXT}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TagsPagedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public TagsPagedResponse() {} + + public TagsPagedResponse data(List data) { + this.data = data; + return this; + } + + public TagsPagedResponse addDataItem(Tag dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public TagsPagedResponse next(String next) { + this.next = next; + return this; + } + + /** + * Cursor to the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this TagsPagedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagsPagedResponse tagsPagedResponse = (TagsPagedResponse) o; + return Objects.equals(this.data, tagsPagedResponse.data) + && Objects.equals(this.next, tagsPagedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagsPagedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java index 85dc402f..f792588e 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java @@ -690,7 +690,14 @@ public TransactionRequest extraParameters(Object extraParameters) { * value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The * Fireblocks [development * libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) - * are recommended for building contract call transactions. + * are recommended for building contract call transactions. For **exchange compliance (e.g., + * Binance) and Travel Rule purposes**, include the key `piiData` containing a + * **custom JSON structure** with Personally Identifiable Information (PII) relevant to the + * transaction. This data must be fully **encrypted by the sender** before being submitted to + * the Fireblocks API. The recommended encryption method is **hybrid encryption** using + * AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s + * public key. [development + * libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) * * @return extraParameters */ diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java index a97ce26b..00fcc5c6 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java @@ -1084,7 +1084,14 @@ public TransactionResponse extraParameters(Object extraParameters) { * value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The * Fireblocks [development * libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) - * are recommended for building contract call transactions. + * are recommended for building contract call transactions. For **exchange compliance (e.g., + * Binance) and Travel Rule purposes**, include the key `piiData` containing a + * **custom JSON structure** with Personally Identifiable Information (PII) relevant to the + * transaction. This data must be fully **encrypted by the sender** before being submitted to + * the Fireblocks API. The recommended encryption method is **hybrid encryption** using + * AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s + * public key. [development + * libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) * * @return extraParameters */ diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequest.java index 4b0a0cb5..65786d23 100644 --- a/src/main/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequest.java @@ -13,9 +13,11 @@ 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.Objects; @@ -33,6 +35,7 @@ TravelRuleCreateTransactionRequest.JSON_PROPERTY_BENEFICIARY, TravelRuleCreateTransactionRequest.JSON_PROPERTY_ENCRYPTED, TravelRuleCreateTransactionRequest.JSON_PROPERTY_PROTOCOL, + TravelRuleCreateTransactionRequest.JSON_PROPERTY_TARGET_PROTOCOL, TravelRuleCreateTransactionRequest.JSON_PROPERTY_SKIP_BENEFICIARY_DATA_VALIDATION, TravelRuleCreateTransactionRequest.JSON_PROPERTY_TRAVEL_RULE_BEHAVIOR, TravelRuleCreateTransactionRequest.JSON_PROPERTY_ORIGINATOR_REF, @@ -74,8 +77,50 @@ public class TravelRuleCreateTransactionRequest { public static final String JSON_PROPERTY_ENCRYPTED = "encrypted"; private String encrypted; + /** The protocol used to perform the travel rule. */ + public enum ProtocolEnum { + IVMS101("IVMS101"), + + TRLIGHT("TRLight"), + + TRP("TRP"), + + OPENVASP("OpenVASP"), + + GTR("GTR"); + + private String value; + + ProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolEnum fromValue(String value) { + for (ProtocolEnum b : ProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_PROTOCOL = "protocol"; - private String protocol; + private ProtocolEnum protocol; + + public static final String JSON_PROPERTY_TARGET_PROTOCOL = "targetProtocol"; + private String targetProtocol; public static final String JSON_PROPERTY_SKIP_BENEFICIARY_DATA_VALIDATION = "skipBeneficiaryDataValidation"; @@ -324,7 +369,7 @@ public void setEncrypted(String encrypted) { this.encrypted = encrypted; } - public TravelRuleCreateTransactionRequest protocol(String protocol) { + public TravelRuleCreateTransactionRequest protocol(ProtocolEnum protocol) { this.protocol = protocol; return this; } @@ -337,16 +382,39 @@ public TravelRuleCreateTransactionRequest protocol(String protocol) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_PROTOCOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getProtocol() { + public ProtocolEnum getProtocol() { return protocol; } @JsonProperty(JSON_PROPERTY_PROTOCOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProtocol(String protocol) { + public void setProtocol(ProtocolEnum protocol) { this.protocol = protocol; } + public TravelRuleCreateTransactionRequest targetProtocol(String targetProtocol) { + this.targetProtocol = targetProtocol; + return this; + } + + /** + * The target protocol for GTR (Global Travel Rule) transfers. + * + * @return targetProtocol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTargetProtocol() { + return targetProtocol; + } + + @JsonProperty(JSON_PROPERTY_TARGET_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTargetProtocol(String targetProtocol) { + this.targetProtocol = targetProtocol; + } + public TravelRuleCreateTransactionRequest skipBeneficiaryDataValidation( Boolean skipBeneficiaryDataValidation) { this.skipBeneficiaryDataValidation = skipBeneficiaryDataValidation; @@ -622,6 +690,8 @@ public boolean equals(Object o) { && Objects.equals(this.beneficiary, travelRuleCreateTransactionRequest.beneficiary) && Objects.equals(this.encrypted, travelRuleCreateTransactionRequest.encrypted) && Objects.equals(this.protocol, travelRuleCreateTransactionRequest.protocol) + && Objects.equals( + this.targetProtocol, travelRuleCreateTransactionRequest.targetProtocol) && Objects.equals( this.skipBeneficiaryDataValidation, travelRuleCreateTransactionRequest.skipBeneficiaryDataValidation) @@ -660,6 +730,7 @@ public int hashCode() { beneficiary, encrypted, protocol, + targetProtocol, skipBeneficiaryDataValidation, travelRuleBehavior, originatorRef, @@ -698,6 +769,7 @@ public String toString() { sb.append(" beneficiary: ").append(toIndentedString(beneficiary)).append("\n"); sb.append(" encrypted: ").append(toIndentedString(encrypted)).append("\n"); sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); + sb.append(" targetProtocol: ").append(toIndentedString(targetProtocol)).append("\n"); sb.append(" skipBeneficiaryDataValidation: ") .append(toIndentedString(skipBeneficiaryDataValidation)) .append("\n"); @@ -866,6 +938,19 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `targetProtocol` to the URL query string + if (getTargetProtocol() != null) { + joiner.add( + String.format( + "%stargetProtocol%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTargetProtocol()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `skipBeneficiaryDataValidation` to the URL query string if (getSkipBeneficiaryDataValidation() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest.java index 0267f896..726498d6 100644 --- a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest.java @@ -89,7 +89,9 @@ public enum ProtocolEnum { TRP("TRP"), - OPENVASP("OpenVASP"); + OPENVASP("OpenVASP"), + + GTR("GTR"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequest.java new file mode 100644 index 00000000..296bd773 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequest.java @@ -0,0 +1,132 @@ +/* + * 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.util.Objects; +import java.util.StringJoiner; + +/** UpdateAssetUserMetadataRequest */ +@JsonPropertyOrder({UpdateAssetUserMetadataRequest.JSON_PROPERTY_METADATA}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateAssetUserMetadataRequest { + public static final String JSON_PROPERTY_METADATA = "metadata"; + private AssetMetadataRequest metadata; + + public UpdateAssetUserMetadataRequest() {} + + public UpdateAssetUserMetadataRequest metadata(AssetMetadataRequest metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssetMetadataRequest getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(AssetMetadataRequest metadata) { + this.metadata = metadata; + } + + /** Return true if this UpdateAssetUserMetadataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest = + (UpdateAssetUserMetadataRequest) o; + return Objects.equals(this.metadata, updateAssetUserMetadataRequest.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAssetUserMetadataRequest {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).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 `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.java new file mode 100644 index 00000000..2a7cf33f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateTagRequest.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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** UpdateTagRequest */ +@JsonPropertyOrder({ + UpdateTagRequest.JSON_PROPERTY_LABEL, + UpdateTagRequest.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateTagRequest { + public static final String JSON_PROPERTY_LABEL = "label"; + private String label; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public UpdateTagRequest() {} + + public UpdateTagRequest label(String label) { + this.label = label; + return this; + } + + /** + * The tag label + * + * @return label + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLabel() { + return label; + } + + @JsonProperty(JSON_PROPERTY_LABEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLabel(String label) { + this.label = label; + } + + public UpdateTagRequest description(String description) { + this.description = description; + return this; + } + + /** + * Description for the tag + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this UpdateTagRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTagRequest updateTagRequest = (UpdateTagRequest) o; + return Objects.equals(this.label, updateTagRequest.label) + && Objects.equals(this.description, updateTagRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(label, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTagRequest {\n"); + sb.append(" label: ").append(toIndentedString(label)).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 `label` to the URL query string + if (getLabel() != null) { + joiner.add( + String.format( + "%slabel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLabel()), 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/VaultAccount.java b/src/main/java/com/fireblocks/sdk/model/VaultAccount.java index bb749567..d29f94ae 100644 --- a/src/main/java/com/fireblocks/sdk/model/VaultAccount.java +++ b/src/main/java/com/fireblocks/sdk/model/VaultAccount.java @@ -30,7 +30,8 @@ VaultAccount.JSON_PROPERTY_ASSETS, VaultAccount.JSON_PROPERTY_HIDDEN_ON_U_I, VaultAccount.JSON_PROPERTY_CUSTOMER_REF_ID, - VaultAccount.JSON_PROPERTY_AUTO_FUEL + VaultAccount.JSON_PROPERTY_AUTO_FUEL, + VaultAccount.JSON_PROPERTY_TAGS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class VaultAccount { @@ -52,6 +53,9 @@ public class VaultAccount { public static final String JSON_PROPERTY_AUTO_FUEL = "autoFuel"; private Boolean autoFuel; + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags; + public VaultAccount() {} public VaultAccount id(String id) { @@ -200,6 +204,37 @@ public void setAutoFuel(Boolean autoFuel) { this.autoFuel = autoFuel; } + public VaultAccount tags(List tags) { + this.tags = tags; + return this; + } + + public VaultAccount addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags attached to the vault account + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(List tags) { + this.tags = tags; + } + /** Return true if this VaultAccount object is equal to o. */ @Override public boolean equals(Object o) { @@ -215,12 +250,13 @@ public boolean equals(Object o) { && Objects.equals(this.assets, vaultAccount.assets) && Objects.equals(this.hiddenOnUI, vaultAccount.hiddenOnUI) && Objects.equals(this.customerRefId, vaultAccount.customerRefId) - && Objects.equals(this.autoFuel, vaultAccount.autoFuel); + && Objects.equals(this.autoFuel, vaultAccount.autoFuel) + && Objects.equals(this.tags, vaultAccount.tags); } @Override public int hashCode() { - return Objects.hash(id, name, assets, hiddenOnUI, customerRefId, autoFuel); + return Objects.hash(id, name, assets, hiddenOnUI, customerRefId, autoFuel, tags); } @Override @@ -233,6 +269,7 @@ public String toString() { sb.append(" hiddenOnUI: ").append(toIndentedString(hiddenOnUI)).append("\n"); sb.append(" customerRefId: ").append(toIndentedString(customerRefId)).append("\n"); sb.append(" autoFuel: ").append(toIndentedString(autoFuel)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append("}"); return sb.toString(); } @@ -361,6 +398,29 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `tags` to the URL query string + if (getTags() != null) { + for (int i = 0; i < getTags().size(); i++) { + if (getTags().get(i) != null) { + joiner.add( + getTags() + .get(i) + .toUrlQueryString( + String.format( + "%stags%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequest.java b/src/main/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequest.java new file mode 100644 index 00000000..b1ada40b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequest.java @@ -0,0 +1,220 @@ +/* + * 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; + +/** VaultAccountsTagAttachmentsRequest */ +@JsonPropertyOrder({ + VaultAccountsTagAttachmentsRequest.JSON_PROPERTY_TAG_IDS, + VaultAccountsTagAttachmentsRequest.JSON_PROPERTY_VAULT_ACCOUNT_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class VaultAccountsTagAttachmentsRequest { + public static final String JSON_PROPERTY_TAG_IDS = "tagIds"; + private List tagIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_IDS = "vaultAccountIds"; + private List vaultAccountIds = new ArrayList<>(); + + public VaultAccountsTagAttachmentsRequest() {} + + public VaultAccountsTagAttachmentsRequest tagIds(List tagIds) { + this.tagIds = tagIds; + return this; + } + + public VaultAccountsTagAttachmentsRequest addTagIdsItem(UUID tagIdsItem) { + if (this.tagIds == null) { + this.tagIds = new ArrayList<>(); + } + this.tagIds.add(tagIdsItem); + return this; + } + + /** + * The IDs of the tags to attach + * + * @return tagIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TAG_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTagIds() { + return tagIds; + } + + @JsonProperty(JSON_PROPERTY_TAG_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTagIds(List tagIds) { + this.tagIds = tagIds; + } + + public VaultAccountsTagAttachmentsRequest vaultAccountIds(List vaultAccountIds) { + this.vaultAccountIds = vaultAccountIds; + return this; + } + + public VaultAccountsTagAttachmentsRequest addVaultAccountIdsItem(String vaultAccountIdsItem) { + if (this.vaultAccountIds == null) { + this.vaultAccountIds = new ArrayList<>(); + } + this.vaultAccountIds.add(vaultAccountIdsItem); + return this; + } + + /** + * The IDs of the vault accounts to attach tags to + * + * @return vaultAccountIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVaultAccountIds() { + return vaultAccountIds; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountIds(List vaultAccountIds) { + this.vaultAccountIds = vaultAccountIds; + } + + /** Return true if this VaultAccountsTagAttachmentsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest = + (VaultAccountsTagAttachmentsRequest) o; + return Objects.equals(this.tagIds, vaultAccountsTagAttachmentsRequest.tagIds) + && Objects.equals( + this.vaultAccountIds, vaultAccountsTagAttachmentsRequest.vaultAccountIds); + } + + @Override + public int hashCode() { + return Objects.hash(tagIds, vaultAccountIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VaultAccountsTagAttachmentsRequest {\n"); + sb.append(" tagIds: ").append(toIndentedString(tagIds)).append("\n"); + sb.append(" vaultAccountIds: ").append(toIndentedString(vaultAccountIds)).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 `tagIds` to the URL query string + if (getTagIds() != null) { + for (int i = 0; i < getTagIds().size(); i++) { + if (getTagIds().get(i) != null) { + joiner.add( + String.format( + "%stagIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTagIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `vaultAccountIds` to the URL query string + if (getVaultAccountIds() != null) { + for (int i = 0; i < getVaultAccountIds().size(); i++) { + joiner.add( + String.format( + "%svaultAccountIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getVaultAccountIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index c33dee55..d3aec3a3 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -605,6 +605,14 @@ public void testGetSwapBetaApi() { Assert.assertSame(swapBeta, fireblocks.swapBeta()); } + @Test + public void testGetTagsApi() { + setupFireblocks(true, null, null); + TagsApi tags = fireblocks.tags(); + Assert.assertNotNull(tags); + Assert.assertSame(tags, fireblocks.tags()); + } + @Test public void testGetTokenizationApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java index 013b977b..479cbd0f 100644 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java @@ -26,6 +26,7 @@ import com.fireblocks.sdk.model.ListBlockchainsResponse; import com.fireblocks.sdk.model.RegisterNewAssetRequest; import com.fireblocks.sdk.model.SetAssetPriceRequest; +import com.fireblocks.sdk.model.UpdateAssetUserMetadataRequest; import java.math.BigDecimal; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -169,4 +170,21 @@ public void setAssetPriceTest() throws ApiException { CompletableFuture> response = api.setAssetPrice(id, setAssetPriceRequest, idempotencyKey); } + + /** + * Update the user’s metadata for an asset + * + *

Update the user’s metadata for an asset. Endpoint Permission: Owner, Admin, Non-Signing + * Admin, NCW Admin, Signer, Editor. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateAssetUserMetadataTest() throws ApiException { + String id = null; + UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.updateAssetUserMetadata(id, updateAssetUserMetadataRequest, idempotencyKey); + } } diff --git a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java index bec418b6..89bedeed 100644 --- a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java @@ -16,6 +16,8 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ContractAbiResponseDto; +import com.fireblocks.sdk.model.ContractDataDecodeRequest; +import com.fireblocks.sdk.model.ContractDataDecodedResponse; import com.fireblocks.sdk.model.ParameterWithValue; import com.fireblocks.sdk.model.ReadCallFunctionDto; import com.fireblocks.sdk.model.TransactionReceiptResponse; @@ -32,6 +34,25 @@ public class ContractInteractionsApiTest { private final ContractInteractionsApi api = new ContractInteractionsApi(); + /** + * Decode a function call data, error, or event log + * + *

Decode a function call data, error, or event log from a deployed contract by blockchain + * native asset id and contract address. + * + * @throws ApiException if the Api call fails + */ + @Test + public void decodeContractDataTest() throws ApiException { + ContractDataDecodeRequest contractDataDecodeRequest = null; + String contractAddress = null; + String baseAssetId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.decodeContractData( + contractDataDecodeRequest, contractAddress, baseAssetId, idempotencyKey); + } + /** * Return deployed contract's ABI * diff --git a/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java index ae39233f..355e6a5d 100644 --- a/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java @@ -23,6 +23,7 @@ import com.fireblocks.sdk.model.SwapProvider; import com.fireblocks.sdk.model.SwapProvidersPaginatedResponse; import java.math.BigDecimal; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -46,7 +47,7 @@ public class SwapBetaApiTest { */ @Test public void approveTermsOfServiceTest() throws ApiException { - String providerId = null; + UUID providerId = null; String idempotencyKey = null; CompletableFuture> response = api.approveTermsOfService(providerId, idempotencyKey); @@ -66,7 +67,7 @@ public void approveTermsOfServiceTest() throws ApiException { @Test public void createQuoteTest() throws ApiException { QuoteRequest quoteRequest = null; - String providerId = null; + UUID providerId = null; String idempotencyKey = null; CompletableFuture> response = api.createQuote(quoteRequest, providerId, idempotencyKey); diff --git a/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java b/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java new file mode 100644 index 00000000..fa1f96b2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java @@ -0,0 +1,109 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateTagRequest; +import com.fireblocks.sdk.model.Tag; +import com.fireblocks.sdk.model.TagsPagedResponse; +import com.fireblocks.sdk.model.UpdateTagRequest; +import java.math.BigDecimal; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for TagsApi */ +@Ignore +public class TagsApiTest { + + private final TagsApi api = new TagsApi(); + + /** + * Create a tag + * + *

Create a new tag. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createTagTest() throws ApiException { + CreateTagRequest createTagRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createTag(createTagRequest, idempotencyKey); + } + + /** + * Delete a tag + * + *

Delete the specified tag. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteTagTest() throws ApiException { + UUID tagId = null; + + CompletableFuture> response = api.deleteTag(tagId); + } + + /** + * Get a tag + * + *

Retrieve an existing tag by ID. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTagTest() throws ApiException { + UUID tagId = null; + CompletableFuture> response = api.getTag(tagId); + } + + /** + * Get list of tags + * + *

Retrieve a paged list of all tags according to filters. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTagsTest() throws ApiException { + String pageCursor = null; + BigDecimal pageSize = null; + String label = null; + List tagIds = null; + CompletableFuture> response = + api.getTags(pageCursor, pageSize, label, tagIds); + } + + /** + * Update a tag + * + *

Update an existing specified tag. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateTagTest() throws ApiException { + UpdateTagRequest updateTagRequest = null; + UUID tagId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.updateTag(updateTagRequest, tagId, idempotencyKey); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java index 417f7d59..de69cbc9 100644 --- a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java @@ -21,6 +21,7 @@ import com.fireblocks.sdk.model.CreateMultipleAccountsRequest; import com.fireblocks.sdk.model.CreateMultipleDepositAddressesJobStatus; import com.fireblocks.sdk.model.CreateMultipleDepositAddressesRequest; +import com.fireblocks.sdk.model.CreateMultipleVaultAccountsJobStatus; import com.fireblocks.sdk.model.CreateVaultAccountRequest; import com.fireblocks.sdk.model.CreateVaultAssetResponse; import com.fireblocks.sdk.model.GetMaxSpendableAmountResponse; @@ -37,10 +38,12 @@ import com.fireblocks.sdk.model.UpdateVaultAccountRequest; import com.fireblocks.sdk.model.VaultAccount; import com.fireblocks.sdk.model.VaultAccountsPagedResponse; +import com.fireblocks.sdk.model.VaultAccountsTagAttachmentsRequest; import com.fireblocks.sdk.model.VaultActionStatus; import com.fireblocks.sdk.model.VaultAsset; import java.math.BigDecimal; import java.util.List; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -67,6 +70,22 @@ public void activateAssetForVaultAccountTest() throws ApiException { api.activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey); } + /** + * Attach tags to a vault accounts + * + *

Attach one or more tags to the requested vault accounts. + * + * @throws ApiException if the Api call fails + */ + @Test + public void attachTagsToVaultAccountsTest() throws ApiException { + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.attachTagsToVaultAccounts(vaultAccountsTagAttachmentsRequest, idempotencyKey); + } + /** * Convert a segwit address to legacy format * @@ -89,7 +108,8 @@ public void createLegacyAddressTest() throws ApiException { * *

Create multiple vault accounts by running an async job. </br> **Note**: - These * endpoints are currently in beta and might be subject to changes. - We limit accounts to 10k - * per operation and 200k per customer during beta testing. + * per operation and 200k per customer during beta testing. Endpoint Permission: Admin, + * Non-Signing Admin, Signer, Approver, Editor. * * @throws ApiException if the Api call fails */ @@ -105,7 +125,7 @@ public void createMultipleAccountsTest() throws ApiException { * Bulk creation of new deposit addresses * *

Create multiple deposit address by running an async job. </br> **Note**: - We limit - * accounts to 10k per operation. + * accounts to 10k per operation. Endpoint Permission: Admin, Non-Signing Admin. * * @throws ApiException if the Api call fails */ @@ -169,6 +189,22 @@ public void createVaultAccountAssetAddressTest() throws ApiException { vaultAccountId, assetId, createAddressRequest, idempotencyKey); } + /** + * Detach tags from a vault accounts + * + *

Detach one or more tags from the requested vault account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void detachTagsFromVaultAccountsTest() throws ApiException { + VaultAccountsTagAttachmentsRequest vaultAccountsTagAttachmentsRequest = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.detachTagsFromVaultAccounts(vaultAccountsTagAttachmentsRequest, idempotencyKey); + } + /** * List asset wallets (Paginated) * @@ -193,6 +229,7 @@ public void getAssetWalletsTest() throws ApiException { * 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 + * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @throws ApiException if the Api call fails */ @@ -203,6 +240,21 @@ public void getCreateMultipleDepositAddressesJobStatusTest() throws ApiException api.getCreateMultipleDepositAddressesJobStatus(jobId); } + /** + * Get job status of bulk creation of new vault accounts + * + *

Returns the status of bulk creation of new vault accounts job and the result or error + * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCreateMultipleVaultAccountsJobStatusTest() throws ApiException { + String jobId = null; + CompletableFuture> response = + api.getCreateMultipleVaultAccountsJobStatus(jobId); + } + /** * Get the maximum spendable amount in a single transaction. * @@ -240,6 +292,7 @@ public void getPagedVaultAccountsTest() throws ApiException { String before = null; String after = null; BigDecimal limit = null; + List tagIds = null; CompletableFuture> response = api.getPagedVaultAccounts( namePrefix, @@ -249,7 +302,8 @@ public void getPagedVaultAccountsTest() throws ApiException { orderBy, before, after, - limit); + limit, + tagIds); } /** diff --git a/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java index 5735084a..ec705323 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java @@ -31,6 +31,12 @@ public void scopeTest() { // TODO: test scope } + /** Test the property 'verified' */ + @Test + public void verifiedTest() { + // TODO: test verified + } + /** Test the property 'deprecated' */ @Test public void deprecatedTest() { @@ -54,4 +60,10 @@ public void websiteTest() { public void mediaTest() { // TODO: test media } + + /** Test the property 'note' */ + @Test + public void noteTest() { + // TODO: test note + } } diff --git a/src/test/java/com/fireblocks/sdk/model/AssetMetadataRequestTest.java b/src/test/java/com/fireblocks/sdk/model/AssetMetadataRequestTest.java new file mode 100644 index 00000000..75d09898 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetMetadataRequestTest.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 AssetMetadataRequest */ +public class AssetMetadataRequestTest { + private final AssetMetadataRequest model = new AssetMetadataRequest(); + + /** Model tests for AssetMetadataRequest */ + @Test + public void testAssetMetadataRequest() { + // TODO: test AssetMetadataRequest + } + + /** Test the property 'note' */ + @Test + public void noteTest() { + // TODO: test note + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetNoteRequestTest.java b/src/test/java/com/fireblocks/sdk/model/AssetNoteRequestTest.java new file mode 100644 index 00000000..73f07aef --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetNoteRequestTest.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 AssetNoteRequest */ +public class AssetNoteRequestTest { + private final AssetNoteRequest model = new AssetNoteRequest(); + + /** Model tests for AssetNoteRequest */ + @Test + public void testAssetNoteRequest() { + // TODO: test AssetNoteRequest + } + + /** Test the property 'text' */ + @Test + public void textTest() { + // TODO: test text + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetNoteTest.java b/src/test/java/com/fireblocks/sdk/model/AssetNoteTest.java new file mode 100644 index 00000000..a4b1feba --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetNoteTest.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 AssetNote */ +public class AssetNoteTest { + private final AssetNote model = new AssetNote(); + + /** Model tests for AssetNote */ + @Test + public void testAssetNote() { + // TODO: test AssetNote + } + + /** Test the property 'text' */ + @Test + public void textTest() { + // TODO: test text + } + + /** Test the property 'userId' */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** Test the property 'userName' */ + @Test + public void userNameTest() { + // TODO: test userName + } + + /** Test the property 'updatedAt' */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeDataTypeTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeDataTypeTest.java new file mode 100644 index 00000000..d341085f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeDataTypeTest.java @@ -0,0 +1,25 @@ +/* + * 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 ContractDataDecodeDataType */ +public class ContractDataDecodeDataTypeTest { + /** Model tests for ContractDataDecodeDataType */ + @Test + public void testContractDataDecodeDataType() { + // TODO: test ContractDataDecodeDataType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeErrorTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeErrorTest.java new file mode 100644 index 00000000..30c7c41b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeErrorTest.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 ContractDataDecodeError */ +public class ContractDataDecodeErrorTest { + private final ContractDataDecodeError model = new ContractDataDecodeError(); + + /** Model tests for ContractDataDecodeError */ + @Test + public void testContractDataDecodeError() { + // TODO: test ContractDataDecodeError + } + + /** 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/ContractDataDecodeRequestDataTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestDataTest.java new file mode 100644 index 00000000..e6a28acf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestDataTest.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 ContractDataDecodeRequestData */ +public class ContractDataDecodeRequestDataTest { + private final ContractDataDecodeRequestData model = new ContractDataDecodeRequestData(); + + /** Model tests for ContractDataDecodeRequestData */ + @Test + public void testContractDataDecodeRequestData() { + // TODO: test ContractDataDecodeRequestData + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'topics' */ + @Test + public void topicsTest() { + // TODO: test topics + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestTest.java new file mode 100644 index 00000000..7caa8049 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeRequestTest.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 ContractDataDecodeRequest */ +public class ContractDataDecodeRequestTest { + private final ContractDataDecodeRequest model = new ContractDataDecodeRequest(); + + /** Model tests for ContractDataDecodeRequest */ + @Test + public void testContractDataDecodeRequest() { + // TODO: test ContractDataDecodeRequest + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'dataType' */ + @Test + public void dataTypeTest() { + // TODO: test dataType + } + + /** Test the property 'abi' */ + @Test + public void abiTest() { + // TODO: test abi + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParamsTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParamsTest.java new file mode 100644 index 00000000..d4d75ff1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodeResponseParamsTest.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 ContractDataDecodeResponseParams */ +public class ContractDataDecodeResponseParamsTest { + private final ContractDataDecodeResponseParams model = new ContractDataDecodeResponseParams(); + + /** Model tests for ContractDataDecodeResponseParams */ + @Test + public void testContractDataDecodeResponseParams() { + // TODO: test ContractDataDecodeResponseParams + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'signature' */ + @Test + public void signatureTest() { + // TODO: test signature + } + + /** Test the property 'args' */ + @Test + public void argsTest() { + // TODO: test args + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDataDecodedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodedResponseTest.java new file mode 100644 index 00000000..d42b7ee2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataDecodedResponseTest.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 ContractDataDecodedResponse */ +public class ContractDataDecodedResponseTest { + private final ContractDataDecodedResponse model = new ContractDataDecodedResponse(); + + /** Model tests for ContractDataDecodedResponse */ + @Test + public void testContractDataDecodedResponse() { + // TODO: test ContractDataDecodedResponse + } + + /** Test the property 'result' */ + @Test + public void resultTest() { + // TODO: test result + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDataLogDataParamTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDataLogDataParamTest.java new file mode 100644 index 00000000..082de0f4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDataLogDataParamTest.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 ContractDataLogDataParam */ +public class ContractDataLogDataParamTest { + private final ContractDataLogDataParam model = new ContractDataLogDataParam(); + + /** Model tests for ContractDataLogDataParam */ + @Test + public void testContractDataLogDataParam() { + // TODO: test ContractDataLogDataParam + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'topics' */ + @Test + public void topicsTest() { + // TODO: test topics + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java index 43fb9d6b..97c6fe90 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java @@ -31,9 +31,27 @@ public void countTest() { // TODO: test count } - /** Test the property 'assetIds' */ + /** Test the property 'baseAssetIds' */ @Test - public void assetIdsTest() { - // TODO: test assetIds + public void baseAssetIdsTest() { + // TODO: test baseAssetIds + } + + /** Test the property 'names' */ + @Test + public void namesTest() { + // TODO: test names + } + + /** Test the property 'vaultAccountNamesStartingIndex' */ + @Test + public void vaultAccountNamesStartingIndexTest() { + // TODO: test vaultAccountNamesStartingIndex + } + + /** Test the property 'prefix' */ + @Test + public void prefixTest() { + // TODO: test prefix } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatusTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatusTest.java new file mode 100644 index 00000000..8af775ea --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatusTest.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 CreateMultipleVaultAccountsJobStatus */ +public class CreateMultipleVaultAccountsJobStatusTest { + private final CreateMultipleVaultAccountsJobStatus model = + new CreateMultipleVaultAccountsJobStatus(); + + /** Model tests for CreateMultipleVaultAccountsJobStatus */ + @Test + public void testCreateMultipleVaultAccountsJobStatus() { + // TODO: test CreateMultipleVaultAccountsJobStatus + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'vaultAccounts' */ + @Test + public void vaultAccountsTest() { + // TODO: test vaultAccounts + } + + /** Test the property 'errorMessage' */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTagRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTagRequestTest.java new file mode 100644 index 00000000..b1d5fe97 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateTagRequestTest.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 CreateTagRequest */ +public class CreateTagRequestTest { + private final CreateTagRequest model = new CreateTagRequest(); + + /** Model tests for CreateTagRequest */ + @Test + public void testCreateTagRequest() { + // TODO: test CreateTagRequest + } + + /** Test the property 'label' */ + @Test + public void labelTest() { + // TODO: test label + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TagTest.java b/src/test/java/com/fireblocks/sdk/model/TagTest.java new file mode 100644 index 00000000..fb1b066c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TagTest.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 Tag */ +public class TagTest { + private final Tag model = new Tag(); + + /** Model tests for Tag */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'label' */ + @Test + public void labelTest() { + // TODO: test label + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TagsPagedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TagsPagedResponseTest.java new file mode 100644 index 00000000..01c2a8eb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TagsPagedResponseTest.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 TagsPagedResponse */ +public class TagsPagedResponseTest { + private final TagsPagedResponse model = new TagsPagedResponse(); + + /** Model tests for TagsPagedResponse */ + @Test + public void testTagsPagedResponse() { + // TODO: test TagsPagedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequestTest.java b/src/test/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequestTest.java index bc9f3537..2cc80acf 100644 --- a/src/test/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequestTest.java @@ -86,6 +86,12 @@ public void protocolTest() { // TODO: test protocol } + /** Test the property 'targetProtocol' */ + @Test + public void targetProtocolTest() { + // TODO: test targetProtocol + } + /** Test the property 'skipBeneficiaryDataValidation' */ @Test public void skipBeneficiaryDataValidationTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequestTest.java new file mode 100644 index 00000000..5b80f440 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateAssetUserMetadataRequestTest.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 UpdateAssetUserMetadataRequest */ +public class UpdateAssetUserMetadataRequestTest { + private final UpdateAssetUserMetadataRequest model = new UpdateAssetUserMetadataRequest(); + + /** Model tests for UpdateAssetUserMetadataRequest */ + @Test + public void testUpdateAssetUserMetadataRequest() { + // TODO: test UpdateAssetUserMetadataRequest + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.java new file mode 100644 index 00000000..62090c80 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateTagRequestTest.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 UpdateTagRequest */ +public class UpdateTagRequestTest { + private final UpdateTagRequest model = new UpdateTagRequest(); + + /** Model tests for UpdateTagRequest */ + @Test + public void testUpdateTagRequest() { + // TODO: test UpdateTagRequest + } + + /** Test the property 'label' */ + @Test + public void labelTest() { + // TODO: test label + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/VaultAccountTest.java b/src/test/java/com/fireblocks/sdk/model/VaultAccountTest.java index 47cb9f24..814dbac2 100644 --- a/src/test/java/com/fireblocks/sdk/model/VaultAccountTest.java +++ b/src/test/java/com/fireblocks/sdk/model/VaultAccountTest.java @@ -60,4 +60,10 @@ public void customerRefIdTest() { public void autoFuelTest() { // TODO: test autoFuel } + + /** Test the property 'tags' */ + @Test + public void tagsTest() { + // TODO: test tags + } } diff --git a/src/test/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequestTest.java b/src/test/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequestTest.java new file mode 100644 index 00000000..bd7221ad --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/VaultAccountsTagAttachmentsRequestTest.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 VaultAccountsTagAttachmentsRequest */ +public class VaultAccountsTagAttachmentsRequestTest { + private final VaultAccountsTagAttachmentsRequest model = + new VaultAccountsTagAttachmentsRequest(); + + /** Model tests for VaultAccountsTagAttachmentsRequest */ + @Test + public void testVaultAccountsTagAttachmentsRequest() { + // TODO: test VaultAccountsTagAttachmentsRequest + } + + /** Test the property 'tagIds' */ + @Test + public void tagIdsTest() { + // TODO: test tagIds + } + + /** Test the property 'vaultAccountIds' */ + @Test + public void vaultAccountIdsTest() { + // TODO: test vaultAccountIds + } +}