From c5745e3e8c848ee4a5b788e88c032d6d83f4c32c Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Wed, 30 Oct 2024 08:42:50 +0000 Subject: [PATCH] Generated SDK #5184 --- .openapi-generator/FILES | 24 + README.md | 25 +- api/openapi.yaml | 868 ++++++++++++++++-- build.gradle | 2 +- docs/ContractInteractionsApi.md | 30 +- docs/DelegationDto.md | 4 +- docs/DeployedContractsApi.md | 8 +- docs/EVMTokenCreateParamsDto.md | 2 +- docs/LeanAbiFunction.md | 13 + docs/RelatedRequestDto.md | 16 + docs/RelatedRequestStatusType.md | 73 ++ docs/SmartTransferApi.md | 265 +++++- docs/SmartTransferApproveTerm.md | 28 + docs/SmartTransferCoinStatistic.md | 15 + docs/SmartTransferCreateTicket.md | 1 + docs/SmartTransferStatistic.md | 17 + docs/SmartTransferStatisticInflow.md | 15 + docs/SmartTransferStatisticOutflow.md | 15 + docs/SmartTransferTicket.md | 3 +- docs/TransactionRequest.md | 2 +- docs/TravelRuleBetaApi.md | 172 ++++ docs/TravelRuleVaspForVault.md | 13 + pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../sdk/api/ContractInteractionsApi.java | 46 +- .../sdk/api/DeployedContractsApi.java | 12 +- .../fireblocks/sdk/api/SmartTransferApi.java | 239 ++++- .../fireblocks/sdk/api/TravelRuleBetaApi.java | 165 ++++ .../fireblocks/sdk/model/DelegationDto.java | 124 ++- .../sdk/model/EVMTokenCreateParamsDto.java | 80 +- .../fireblocks/sdk/model/LeanAbiFunction.java | 150 ++- .../sdk/model/RelatedRequestDto.java | 262 ++++++ .../sdk/model/RelatedRequestStatusType.java | 124 +++ .../sdk/model/SmartTransferApproveTerm.java | 378 ++++++++ .../sdk/model/SmartTransferCoinStatistic.java | 181 ++++ .../sdk/model/SmartTransferCreateTicket.java | 4 +- .../sdk/model/SmartTransferStatistic.java | 259 ++++++ .../model/SmartTransferStatisticInflow.java | 206 +++++ .../model/SmartTransferStatisticOutflow.java | 206 +++++ .../sdk/model/SmartTransferTicket.java | 8 +- .../sdk/model/TransactionRequest.java | 2 +- .../sdk/model/TravelRuleVaspForVault.java | 139 +++ .../sdk/api/ContractInteractionsApiTest.java | 13 +- .../sdk/api/DeployedContractsApiTest.java | 4 +- .../sdk/api/SmartTransferApiTest.java | 49 + .../sdk/api/TravelRuleBetaApiTest.java | 32 + ...CreateTokenRequestDtoCreateParamsTest.java | 6 +- .../sdk/model/DelegationDtoTest.java | 12 + .../model/EVMTokenCreateParamsDtoTest.java | 6 +- .../sdk/model/LeanAbiFunctionTest.java | 12 + .../sdk/model/RelatedRequestDtoTest.java | 51 + .../model/RelatedRequestStatusTypeTest.java | 25 + .../model/SmartTransferApproveTermTest.java | 63 ++ .../model/SmartTransferCoinStatisticTest.java | 39 + .../SmartTransferStatisticInflowTest.java | 39 + .../SmartTransferStatisticOutflowTest.java | 39 + .../sdk/model/SmartTransferStatisticTest.java | 51 + .../sdk/model/TravelRuleVaspForVaultTest.java | 33 + 58 files changed, 4490 insertions(+), 184 deletions(-) create mode 100644 docs/RelatedRequestDto.md create mode 100644 docs/RelatedRequestStatusType.md create mode 100644 docs/SmartTransferApproveTerm.md create mode 100644 docs/SmartTransferCoinStatistic.md create mode 100644 docs/SmartTransferStatistic.md create mode 100644 docs/SmartTransferStatisticInflow.md create mode 100644 docs/SmartTransferStatisticOutflow.md create mode 100644 docs/TravelRuleVaspForVault.md create mode 100644 src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SmartTransferApproveTerm.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SmartTransferCoinStatistic.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SmartTransferStatistic.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticInflow.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflow.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TravelRuleVaspForVault.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SmartTransferApproveTermTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SmartTransferCoinStatisticTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticInflowTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflowTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TravelRuleVaspForVaultTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fe52699..9514a20 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -317,6 +317,8 @@ docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md +docs/RelatedRequestDto.md +docs/RelatedRequestStatusType.md docs/RelatedTransactionDto.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md @@ -365,7 +367,9 @@ docs/SignedMessage.md docs/SignedMessageSignature.md docs/SigningKeyDto.md docs/SmartTransferApi.md +docs/SmartTransferApproveTerm.md docs/SmartTransferBadRequestResponse.md +docs/SmartTransferCoinStatistic.md docs/SmartTransferCreateTicket.md docs/SmartTransferCreateTicketTerm.md docs/SmartTransferForbiddenResponse.md @@ -375,6 +379,9 @@ docs/SmartTransferNotFoundResponse.md docs/SmartTransferSetTicketExpiration.md docs/SmartTransferSetTicketExternalId.md docs/SmartTransferSetUserGroups.md +docs/SmartTransferStatistic.md +docs/SmartTransferStatisticInflow.md +docs/SmartTransferStatisticOutflow.md docs/SmartTransferSubmitTicket.md docs/SmartTransferTicket.md docs/SmartTransferTicketFilteredResponse.md @@ -457,6 +464,7 @@ docs/TravelRuleVASP.md docs/TravelRuleValidateFullTransactionRequest.md docs/TravelRuleValidateTransactionRequest.md docs/TravelRuleValidateTransactionResponse.md +docs/TravelRuleVaspForVault.md docs/UnfreezeTransactionResponse.md docs/UnmanagedWallet.md docs/UnspentInput.md @@ -849,6 +857,8 @@ src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java +src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java +src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java src/main/java/com/fireblocks/sdk/model/RelatedTransactionDto.java src/main/java/com/fireblocks/sdk/model/RemoveCollateralRequestBody.java src/main/java/com/fireblocks/sdk/model/RenameCosigner.java @@ -895,7 +905,9 @@ src/main/java/com/fireblocks/sdk/model/SettlementResponse.java src/main/java/com/fireblocks/sdk/model/SignedMessage.java src/main/java/com/fireblocks/sdk/model/SignedMessageSignature.java src/main/java/com/fireblocks/sdk/model/SigningKeyDto.java +src/main/java/com/fireblocks/sdk/model/SmartTransferApproveTerm.java src/main/java/com/fireblocks/sdk/model/SmartTransferBadRequestResponse.java +src/main/java/com/fireblocks/sdk/model/SmartTransferCoinStatistic.java src/main/java/com/fireblocks/sdk/model/SmartTransferCreateTicket.java src/main/java/com/fireblocks/sdk/model/SmartTransferCreateTicketTerm.java src/main/java/com/fireblocks/sdk/model/SmartTransferForbiddenResponse.java @@ -905,6 +917,9 @@ src/main/java/com/fireblocks/sdk/model/SmartTransferNotFoundResponse.java src/main/java/com/fireblocks/sdk/model/SmartTransferSetTicketExpiration.java src/main/java/com/fireblocks/sdk/model/SmartTransferSetTicketExternalId.java src/main/java/com/fireblocks/sdk/model/SmartTransferSetUserGroups.java +src/main/java/com/fireblocks/sdk/model/SmartTransferStatistic.java +src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticInflow.java +src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflow.java src/main/java/com/fireblocks/sdk/model/SmartTransferSubmitTicket.java src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java src/main/java/com/fireblocks/sdk/model/SmartTransferTicketFilteredResponse.java @@ -983,6 +998,7 @@ src/main/java/com/fireblocks/sdk/model/TravelRuleVASP.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionRequest.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionResponse.java +src/main/java/com/fireblocks/sdk/model/TravelRuleVaspForVault.java src/main/java/com/fireblocks/sdk/model/UnfreezeTransactionResponse.java src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java src/main/java/com/fireblocks/sdk/model/UnspentInput.java @@ -1348,6 +1364,8 @@ src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java +src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java +src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java src/test/java/com/fireblocks/sdk/model/RelatedTransactionDtoTest.java src/test/java/com/fireblocks/sdk/model/RemoveCollateralRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java @@ -1394,7 +1412,9 @@ src/test/java/com/fireblocks/sdk/model/SettlementResponseTest.java src/test/java/com/fireblocks/sdk/model/SignedMessageSignatureTest.java src/test/java/com/fireblocks/sdk/model/SignedMessageTest.java src/test/java/com/fireblocks/sdk/model/SigningKeyDtoTest.java +src/test/java/com/fireblocks/sdk/model/SmartTransferApproveTermTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferBadRequestResponseTest.java +src/test/java/com/fireblocks/sdk/model/SmartTransferCoinStatisticTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferCreateTicketTermTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferCreateTicketTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferForbiddenResponseTest.java @@ -1404,6 +1424,9 @@ src/test/java/com/fireblocks/sdk/model/SmartTransferNotFoundResponseTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferSetTicketExpirationTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferSetTicketExternalIdTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferSetUserGroupsTest.java +src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticInflowTest.java +src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflowTest.java +src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferSubmitTicketTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferTicketFilteredResponseTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferTicketResponseTest.java @@ -1482,6 +1505,7 @@ src/test/java/com/fireblocks/sdk/model/TravelRuleVASPTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequestTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionRequestTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionResponseTest.java +src/test/java/com/fireblocks/sdk/model/TravelRuleVaspForVaultTest.java src/test/java/com/fireblocks/sdk/model/UnfreezeTransactionResponseTest.java src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java src/test/java/com/fireblocks/sdk/model/UnspentInputTest.java diff --git a/README.md b/README.md index 1d06609..90aef60 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 4.0.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:4.0.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-4.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -159,9 +159,9 @@ 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* | [**getDeployedContractAbi**](docs/ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI -*ContractInteractionsApi* | [**readCallFunction**](docs/ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract -*ContractInteractionsApi* | [**writeCallFunction**](docs/ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract +*ContractInteractionsApi* | [**getDeployedContractAbi**](docs/ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI +*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 +*ContractInteractionsApi* | [**writeCallFunction**](docs/ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract *ContractTemplatesApi* | [**deleteContractTemplateById**](docs/ContractTemplatesApi.md#deleteContractTemplateById) | **DELETE** /tokenization/templates/{contractTemplateId} | Delete a contract template by id *ContractTemplatesApi* | [**deployContract**](docs/ContractTemplatesApi.md#deployContract) | **POST** /tokenization/templates/{contractTemplateId}/deploy | Deploy contract *ContractTemplatesApi* | [**getConstructorByContractTemplateId**](docs/ContractTemplatesApi.md#getConstructorByContractTemplateId) | **GET** /tokenization/templates/{contractTemplateId}/constructor | Return contract template's constructor @@ -270,13 +270,16 @@ Class | Method | HTTP request | Description *PolicyEditorBetaApi* | [**publishPolicyRules**](docs/PolicyEditorBetaApi.md#publishPolicyRules) | **POST** /tap/publish | Send publish request for a set of policy rules *PolicyEditorBetaApi* | [**updateDraft**](docs/PolicyEditorBetaApi.md#updateDraft) | **PUT** /tap/draft | Update the draft with a new set of rules *ResetDeviceApi* | [**resetDevice**](docs/ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | Resets device +*SmartTransferApi* | [**approveDvPTicketTerm**](docs/SmartTransferApi.md#approveDvPTicketTerm) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Define funding source and give approve to contract to transfer asset *SmartTransferApi* | [**cancelTicket**](docs/SmartTransferApi.md#cancelTicket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket *SmartTransferApi* | [**createTicket**](docs/SmartTransferApi.md#createTicket) | **POST** /smart-transfers | Create Ticket *SmartTransferApi* | [**createTicketTerm**](docs/SmartTransferApi.md#createTicketTerm) | **POST** /smart-transfers/{ticketId}/terms | Create leg (term) *SmartTransferApi* | [**findTicketById**](docs/SmartTransferApi.md#findTicketById) | **GET** /smart-transfers/{ticketId} | Search Tickets by ID *SmartTransferApi* | [**findTicketTermById**](docs/SmartTransferApi.md#findTicketTermById) | **GET** /smart-transfers/{ticketId}/terms/{termId} | Search ticket by leg (term) ID *SmartTransferApi* | [**fulfillTicket**](docs/SmartTransferApi.md#fulfillTicket) | **PUT** /smart-transfers/{ticketId}/fulfill | Fund ticket manually +*SmartTransferApi* | [**fundDvpTicket**](docs/SmartTransferApi.md#fundDvpTicket) | **PUT** /smart_transfers/{ticketId}/dvp/fund | Fund dvp ticket *SmartTransferApi* | [**fundTicketTerm**](docs/SmartTransferApi.md#fundTicketTerm) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/fund | Define funding source +*SmartTransferApi* | [**getSmartTransferStatistic**](docs/SmartTransferApi.md#getSmartTransferStatistic) | **GET** /smart_transfers/statistic | Get smart transfers statistic *SmartTransferApi* | [**getSmartTransferUserGroups**](docs/SmartTransferApi.md#getSmartTransferUserGroups) | **GET** /smart-transfers/settings/user-groups | Get user group *SmartTransferApi* | [**manuallyFundTicketTerm**](docs/SmartTransferApi.md#manuallyFundTicketTerm) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/manually-fund | Manually add term transaction *SmartTransferApi* | [**removeTicketTerm**](docs/SmartTransferApi.md#removeTicketTerm) | **DELETE** /smart-transfers/{ticketId}/terms/{termId} | Delete ticket leg (term) @@ -323,6 +326,8 @@ Class | Method | HTTP request | Description *TransactionsApi* | [**validateAddress**](docs/TransactionsApi.md#validateAddress) | **GET** /transactions/validate_address/{assetId}/{address} | Validate destination address *TravelRuleBetaApi* | [**getVASPByDID**](docs/TravelRuleBetaApi.md#getVASPByDID) | **GET** /screening/travel_rule/vasp/{did} | Get VASP details *TravelRuleBetaApi* | [**getVASPs**](docs/TravelRuleBetaApi.md#getVASPs) | **GET** /screening/travel_rule/vasp | Get All VASPs +*TravelRuleBetaApi* | [**getVaspForVault**](docs/TravelRuleBetaApi.md#getVaspForVault) | **GET** /screening/travel_rule/vault/{vaultAccountId}/vasp | Get assigned VASP to vault +*TravelRuleBetaApi* | [**setVaspForVault**](docs/TravelRuleBetaApi.md#setVaspForVault) | **POST** /screening/travel_rule/vault/{vaultAccountId}/vasp | Assign VASP to vault *TravelRuleBetaApi* | [**updateVasp**](docs/TravelRuleBetaApi.md#updateVasp) | **PUT** /screening/travel_rule/vasp/update | Add jsonDidKey to VASP details *TravelRuleBetaApi* | [**validateFullTravelRuleTransaction**](docs/TravelRuleBetaApi.md#validateFullTravelRuleTransaction) | **POST** /screening/travel_rule/transaction/validate/full | Validate Full Travel Rule Transaction *TravelRuleBetaApi* | [**validateTravelRuleTransaction**](docs/TravelRuleBetaApi.md#validateTravelRuleTransaction) | **POST** /screening/travel_rule/transaction/validate | Validate Travel Rule Transaction @@ -653,6 +658,8 @@ Class | Method | HTTP request | Description - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) + - [RelatedRequestDto](docs/RelatedRequestDto.md) + - [RelatedRequestStatusType](docs/RelatedRequestStatusType.md) - [RelatedTransactionDto](docs/RelatedTransactionDto.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) - [RenameCosigner](docs/RenameCosigner.md) @@ -699,7 +706,9 @@ Class | Method | HTTP request | Description - [SignedMessage](docs/SignedMessage.md) - [SignedMessageSignature](docs/SignedMessageSignature.md) - [SigningKeyDto](docs/SigningKeyDto.md) + - [SmartTransferApproveTerm](docs/SmartTransferApproveTerm.md) - [SmartTransferBadRequestResponse](docs/SmartTransferBadRequestResponse.md) + - [SmartTransferCoinStatistic](docs/SmartTransferCoinStatistic.md) - [SmartTransferCreateTicket](docs/SmartTransferCreateTicket.md) - [SmartTransferCreateTicketTerm](docs/SmartTransferCreateTicketTerm.md) - [SmartTransferForbiddenResponse](docs/SmartTransferForbiddenResponse.md) @@ -709,6 +718,9 @@ Class | Method | HTTP request | Description - [SmartTransferSetTicketExpiration](docs/SmartTransferSetTicketExpiration.md) - [SmartTransferSetTicketExternalId](docs/SmartTransferSetTicketExternalId.md) - [SmartTransferSetUserGroups](docs/SmartTransferSetUserGroups.md) + - [SmartTransferStatistic](docs/SmartTransferStatistic.md) + - [SmartTransferStatisticInflow](docs/SmartTransferStatisticInflow.md) + - [SmartTransferStatisticOutflow](docs/SmartTransferStatisticOutflow.md) - [SmartTransferSubmitTicket](docs/SmartTransferSubmitTicket.md) - [SmartTransferTicket](docs/SmartTransferTicket.md) - [SmartTransferTicketFilteredResponse](docs/SmartTransferTicketFilteredResponse.md) @@ -787,6 +799,7 @@ Class | Method | HTTP request | Description - [TravelRuleValidateFullTransactionRequest](docs/TravelRuleValidateFullTransactionRequest.md) - [TravelRuleValidateTransactionRequest](docs/TravelRuleValidateTransactionRequest.md) - [TravelRuleValidateTransactionResponse](docs/TravelRuleValidateTransactionResponse.md) + - [TravelRuleVaspForVault](docs/TravelRuleVaspForVault.md) - [UnfreezeTransactionResponse](docs/UnfreezeTransactionResponse.md) - [UnmanagedWallet](docs/UnmanagedWallet.md) - [UnspentInput](docs/UnspentInput.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 978418f..6012007 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2404,6 +2404,157 @@ paths: - lang: Python source: response = fireblocks.vaults.get_vault_balance_by_asset(asset_id); x-accepts: application/json + /ncw/{walletId}/public_key_info: + get: + description: Gets the public key information based on derivation path and signing + algorithm. + operationId: getPublicKeyInfoNcw + parameters: + - explode: false + in: path + name: walletId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: derivationPath + required: true + schema: + type: string + style: form + - explode: true + in: query + name: algorithm + required: true + schema: + type: string + style: form + - explode: true + in: query + name: compressed + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PublicKeyInformation' + description: Public key information + 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 the public key information + tags: + - Embedded Wallets + x-internal: true + x-readme: + code-samples: + - language: python + code: "pubKey = fireblocks.NCW.get_public_key_info(wallet_id, algorithm,\ + \ derivation_path, compressed)" + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: | + const PublicKeyInfoArgs = { algorithm: 'MPC_ECDSA_SECP256K1', derivationPath: '[44,0,0,0,0]' } const pubKey = await fireblocks.NCW.getPublicKeyInfo(walletId, PublicKeyInfoArgs); + name: Fireblocks SDK Javascript example + x-accepts: application/json + /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info: + get: + description: Gets the public key information for the account asset. + operationId: getPublicKeyInfoForAddressNcw + parameters: + - explode: false + in: path + name: walletId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: accountId + required: true + schema: + format: numeric + type: string + style: simple + - explode: false + in: path + name: assetId + required: true + schema: + type: string + x-fb-entity: asset + style: simple + - explode: false + in: path + name: change + required: true + schema: + type: number + style: simple + - explode: false + in: path + name: addressIndex + required: true + schema: + type: number + style: simple + - explode: true + in: query + name: compressed + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PublicKeyInformation' + description: Public Key Information + 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 the public key for an account asset + tags: + - Embedded Wallets + x-internal: true + x-readme: + code-samples: + - language: python + code: "pubKey = fireblocks.NCW.get_public_key_info_by_account_asset(wallet_id,\ + \ asset_id, account_id, change, address_index, compressed)" + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: | + const PublicKeyInfoByAccountAssetArgs = { assetId: 'ETH', accountId: 0, change: 0, addressIndex: 0, compressed: true } const pubKey = await fireblocks.NCW.getPublicKeyInfoByAccountAsset(walletId, PublicKeyInfoByAccountAssetArgs); + name: Fireblocks SDK Javascript example + x-accepts: application/json /workspace/freeze: post: description: "Freezes a Workspace so that ALL operations by ANY user are blocked.\n\ @@ -10445,7 +10596,7 @@ paths: style: form - explode: true in: query - name: assetId + name: baseAssetId required: false schema: type: string @@ -10491,11 +10642,11 @@ paths: - language: java code: "CompletableFuture>\ \ response = fireblocks.deployedContracts().getDeployedContracts(pageCursor,\ - \ pageSize, contractAddress, assetId, templateId);" + \ pageSize, contractAddress, baseAssetId, templateId);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.deployed_contracts.get_deployed_contracts(page_cursor,\ - \ page_size, contract_address, asset_id, template_id);" + \ page_size, contract_address, base_asset_id, template_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -10504,10 +10655,10 @@ paths: - lang: Java source: "CompletableFuture>\ \ response = fireblocks.deployedContracts().getDeployedContracts(pageCursor,\ - \ pageSize, contractAddress, assetId, templateId);" + \ pageSize, contractAddress, baseAssetId, templateId);" - lang: Python source: "response = fireblocks.deployed_contracts.get_deployed_contracts(page_cursor,\ - \ page_size, contract_address, asset_id, template_id);" + \ page_size, contract_address, base_asset_id, template_id);" x-accepts: application/json /tokenization/contracts/{id}: get: @@ -11613,7 +11764,7 @@ paths: \ id, idempotency_key);" x-content-type: application/json x-accepts: application/json - /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions: + /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions: get: description: Return deployed contract's ABI by blockchain native asset id and contract address @@ -11641,7 +11792,7 @@ paths: style: simple - explode: false in: path - name: assetId + name: baseAssetId required: true schema: type: string @@ -11682,11 +11833,11 @@ paths: - language: java code: "CompletableFuture> response =\ \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ - \ assetId, idempotencyKey);" + \ baseAssetId, idempotencyKey);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address,\ - \ asset_id, idempotency_key);" + \ base_asset_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -11695,12 +11846,12 @@ paths: - lang: Java source: "CompletableFuture> response =\ \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ - \ assetId, idempotencyKey);" + \ baseAssetId, idempotencyKey);" - lang: Python source: "response = fireblocks.contract_interactions.get_deployed_contract_abi(contract_address,\ - \ asset_id, idempotency_key);" + \ base_asset_id, idempotency_key);" x-accepts: application/json - /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read: + /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 @@ -11728,7 +11879,7 @@ paths: style: simple - explode: false in: path - name: assetId + name: baseAssetId required: true schema: type: string @@ -11775,11 +11926,11 @@ paths: - language: java code: "CompletableFuture>> response\ \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ - \ contractAddress, assetId, idempotencyKey);" + \ contractAddress, baseAssetId, idempotencyKey);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.contract_interactions.read_call_function(read_call_function_dto,\ - \ contract_address, asset_id, idempotency_key);" + \ contract_address, base_asset_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -11788,13 +11939,13 @@ paths: - lang: Java source: "CompletableFuture>> response\ \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ - \ contractAddress, assetId, idempotencyKey);" + \ contractAddress, baseAssetId, idempotencyKey);" - lang: Python source: "response = fireblocks.contract_interactions.read_call_function(read_call_function_dto,\ - \ contract_address, asset_id, idempotency_key);" + \ contract_address, base_asset_id, idempotency_key);" x-content-type: application/json x-accepts: application/json - /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write: + /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\ @@ -11824,7 +11975,7 @@ paths: style: simple - explode: false in: path - name: assetId + name: baseAssetId required: true schema: type: string @@ -11871,11 +12022,11 @@ paths: - language: java code: "CompletableFuture> response\ \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ - \ contractAddress, assetId, idempotencyKey);" + \ contractAddress, baseAssetId, idempotencyKey);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.contract_interactions.write_call_function(write_call_function_dto,\ - \ contract_address, asset_id, idempotency_key);" + \ contract_address, base_asset_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -11884,10 +12035,10 @@ paths: - lang: Java source: "CompletableFuture> response\ \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ - \ contractAddress, assetId, idempotencyKey);" + \ contractAddress, baseAssetId, idempotencyKey);" - lang: Python source: "response = fireblocks.contract_interactions.write_call_function(write_call_function_dto,\ - \ contract_address, asset_id, idempotency_key);" + \ contract_address, base_asset_id, idempotency_key);" x-content-type: application/json x-accepts: application/json /staking/chains: @@ -14127,6 +14278,157 @@ paths: \ idempotency_key);" x-content-type: application/json x-accepts: application/json + /screening/travel_rule/vault/{vaultAccountId}/vasp: + get: + description: Get assigned VASP Did for a specific vault. Returns empty string + vaspDid value in response if none assigned. + operationId: getVaspForVault + parameters: + - description: The ID of the vault account + example: 1 + explode: false + in: path + name: vaultAccountId + required: true + schema: + format: numeric + type: string + x-fb-entity: vault_account + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TravelRuleVaspForVault' + description: OK + 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 assigned VASP to vault + tags: + - Travel Rule (Beta) + x-readme: + code-samples: + - language: javascript + code: const vaultAsset = await fireblocks.getVaspForVault(vaultAccountId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.getVaspForVault(travelRuleBetaApiGetVaspForVaultRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.travelRuleBeta().getVaspForVault(vaultAccountId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.travel_rule_beta.get_vasp_for_vault(vault_account_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.getVaspForVault(travelRuleBetaApiGetVaspForVaultRequest);" + - lang: Java + source: CompletableFuture> response = + fireblocks.travelRuleBeta().getVaspForVault(vaultAccountId); + - lang: Python + source: response = fireblocks.travel_rule_beta.get_vasp_for_vault(vault_account_id); + x-accepts: application/json + post: + description: Sets the VASP Did for a specific vault. Pass empty string to remove + existing one. + operationId: setVaspForVault + parameters: + - description: The ID of the vault account + explode: false + in: path + name: vaultAccountId + required: true + schema: + format: numeric + type: string + x-fb-entity: vault_account + 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/TravelRuleVaspForVault' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TravelRuleVaspForVault' + description: OK + 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: Assign VASP to vault + tags: + - Travel Rule (Beta) + x-readme: + code-samples: + - language: javascript + code: "const vaultAsset = await fireblocks.setVaspForVault(vaultAccountId,\ + \ vaspDid);" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.setVaspForVault(travelRuleBetaApiSetVaspForVaultRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.travelRuleBeta().setVaspForVault(travelRuleVaspForVault,\ + \ vaultAccountId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.travel_rule_beta.set_vasp_for_vault(travel_rule_vasp_for_vault,\ + \ vault_account_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.setVaspForVault(travelRuleBetaApiSetVaspForVaultRequest);" + - lang: Java + source: "CompletableFuture> response =\ + \ fireblocks.travelRuleBeta().setVaspForVault(travelRuleVaspForVault, vaultAccountId,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.travel_rule_beta.set_vasp_for_vault(travel_rule_vasp_for_vault,\ + \ vault_account_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /screening/travel_rule/post_screening_policy: get: description: Get the post-screening policy for Travel Rule. @@ -15622,7 +15924,7 @@ paths: type: string style: form - description: "Type of transfer. ASYNC executes transfers as they are funded,\ - \ ATOMIC executes all terms (legs) as one atomic transfer" + \ DVP executes all terms (legs) as one dvp transfer" explode: true in: query name: type @@ -15630,6 +15932,7 @@ paths: schema: enum: - ASYNC + - DVP type: string style: form - description: External ref. ID that workspace can use to identify ticket outside @@ -16083,18 +16386,92 @@ paths: \ = fireblocks.smartTransfer.submitTicket(smartTransferApiSubmitTicketRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().submitTicket(smartTransferSubmitTicket, ticketId,\ - \ idempotencyKey);" + \ = fireblocks.smartTransfer().submitTicket(smartTransferSubmitTicket, ticketId,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.smart_transfer.submit_ticket(smart_transfer_submit_ticket,\ + \ ticket_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /smart-transfers/{ticketId}/fulfill: + put: + description: "Manually fulfill ticket, in case when all terms (legs) are funded\ + \ manually" + operationId: fulfillTicket + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Successfully fulfilled on Smart Transfer ticket + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Fund ticket manually + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.smart_transfer.fulfill_ticket(ticket_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" - lang: Python - source: "response = fireblocks.smart_transfer.submit_ticket(smart_transfer_submit_ticket,\ - \ ticket_id, idempotency_key);" - x-content-type: application/json + source: "response = fireblocks.smart_transfer.fulfill_ticket(ticket_id, idempotency_key);" x-accepts: application/json - /smart-transfers/{ticketId}/fulfill: + /smart_transfers/{ticketId}/dvp/fund: put: - description: "Manually fulfill ticket, in case when all terms (legs) are funded\ - \ manually" - operationId: fulfillTicket + description: Create or fulfill dvp ticket order + operationId: fundDvpTicket parameters: - explode: false in: path @@ -16120,7 +16497,8 @@ paths: application/json: schema: $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Successfully fulfilled on Smart Transfer ticket + description: Successfully started creating or fulfilling order on dvp Smart + Transfer ticket "403": content: application/json: @@ -16139,31 +16517,31 @@ paths: schema: $ref: '#/components/schemas/SmartTransferBadRequestResponse' description: Bad Request - summary: Fund ticket manually + summary: Fund dvp ticket tags: - Smart Transfer x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + \ = fireblocks.smartTransfer.fundDvpTicket(smartTransferApiFundDvpTicketRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" + \ = fireblocks.smartTransfer().fundDvpTicket(ticketId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.smart_transfer.fulfill_ticket(ticket_id, idempotency_key);" + code: "response = fireblocks.smart_transfer.fund_dvp_ticket(ticket_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + \ = fireblocks.smartTransfer.fundDvpTicket(smartTransferApiFundDvpTicketRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" + \ = fireblocks.smartTransfer().fundDvpTicket(ticketId, idempotencyKey);" - lang: Python - source: "response = fireblocks.smart_transfer.fulfill_ticket(ticket_id, idempotency_key);" + source: "response = fireblocks.smart_transfer.fund_dvp_ticket(ticket_id, idempotency_key);" x-accepts: application/json /smart-transfers/{ticketId}/cancel: put: @@ -16622,6 +17000,99 @@ paths: \ ticket_id, term_id, idempotency_key);" x-content-type: application/json x-accepts: application/json + /smart_transfers/{ticketId}/terms/{termId}/dvp/approve: + put: + description: Set funding source for ticket term and creating approving transaction + for contract to transfer asset + operationId: approveDvPTicketTerm + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: termId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferApproveTerm' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketTermResponse' + description: Creating approval transaction started + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Define funding source and give approve to contract to transfer asset + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.approveDvPTicketTerm(smartTransferApiApproveDvPTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().approveDvPTicketTerm(smartTransferApproveTerm,\ + \ ticketId, termId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.smart_transfer.approve_dv_p_ticket_term(smart_transfer_approve_term,\ + \ ticket_id, term_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.smartTransfer.approveDvPTicketTerm(smartTransferApiApproveDvPTicketTermRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().approveDvPTicketTerm(smartTransferApproveTerm,\ + \ ticketId, termId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.smart_transfer.approve_dv_p_ticket_term(smart_transfer_approve_term,\ + \ ticket_id, term_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /smart-transfers/{ticketId}/terms/{termId}/manually-fund: put: description: Manually set ticket term transaction @@ -16835,6 +17306,58 @@ paths: \ idempotency_key);" x-content-type: application/json x-accepts: application/json + /smart_transfers/statistic: + get: + description: Get smart transfer statistic + operationId: getSmartTransferStatistic + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferStatistic' + description: Smart Transfer ticket statistic returned successfully + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get smart transfers statistic + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.getSmartTransferStatistic();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.smartTransfer().getSmartTransferStatistic(); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.smart_transfer.get_smart_transfer_statistic(); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.smartTransfer.getSmartTransferStatistic();" + - lang: Java + source: CompletableFuture> response = + fireblocks.smartTransfer().getSmartTransferStatistic(); + - lang: Python + source: response = fireblocks.smart_transfer.get_smart_transfer_statistic(); + x-accepts: application/json /batch/jobs: get: description: "Get an array of objects including all active, paused, canceled,\ @@ -21369,7 +21892,7 @@ components: cpuStaking: $ref: '#/components/schemas/TransactionRequest_networkStaking' useGasless: - description: '- Override the default gaslsess configuration by sending true\false' + description: '- Override the default gasless configuration by sending true\false' type: boolean type: object CreateTransactionResponse: @@ -24275,6 +24798,21 @@ components: items: $ref: '#/components/schemas/ParameterWithValue' type: array + outputs: + description: The function outputs + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + stateMutability: + description: "The state mutability of the function (e.g., view, pure, nonpayable,\ + \ payable)" + enum: + - view + - pure + - nonpayable + - payable + example: nonpayable + type: string required: - inputs type: object @@ -24797,8 +25335,7 @@ components: type: object EVMTokenCreateParamsDto: example: - contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d - constructorParams: + deployFunctionParams: - internalType: string name: name type: string @@ -24819,14 +25356,15 @@ components: name: _isMintable type: bool value: false + contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d properties: contractId: description: The id of the contract template that will be used to create the token example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string - constructorParams: - description: The constructor parameters and values of the contract template + deployFunctionParams: + description: The deploy function parameters and values of the contract template example: - internalType: string name: name @@ -24849,9 +25387,7 @@ components: type: bool value: false items: - items: - $ref: '#/components/schemas/ParameterWithValue' - type: array + $ref: '#/components/schemas/ParameterWithValue' type: array required: - contractId @@ -24883,8 +25419,7 @@ components: vaultAccountId: "0" blockchainId: B7QG017M createParams: - contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d - constructorParams: + deployFunctionParams: - internalType: string name: name type: string @@ -24905,6 +25440,7 @@ components: name: _isMintable type: bool value: false + contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d properties: blockchainId: description: The id of the blockchain the request was initiated on @@ -25907,6 +26443,65 @@ components: required: - stakeAccountAddress type: object + RelatedRequestStatusType: + description: The status of the request + enum: + - error + - created + - canceled + - activate_requested + - approve_inprogress + - approve_inprogress_signed + - activate_inprogress + - activate_inprogress_signed + - activate_inprogress_confirmed + - activate_done + - deactivate_requested + - deactivate_inprogress + - deactivate_inprogress_signed + - deactivate_inprogress_confirmed + - deactivate_done + - withdraw_inprogress + - withdraw_requested + - withdraw_inprogress_confirmed + - withdraw_done + - claim_rewards_requested + - claim_rewards_inprogress + - claim_rewards_done + - pending + - pending_queued + - active_offline + - active_online + - exiting_online + - exited + - active + - inactive + - activating + - deactivating + example: deactivating + type: string + RelatedRequestDto: + properties: + status: + $ref: '#/components/schemas/RelatedRequestStatusType' + inProgress: + description: Indicates whether there is an ongoing action for this position + related to this request + example: false + type: boolean + amount: + description: Amount of tokens to Unstake + example: "0.05" + type: string + txId: + description: The transaction ID of the ongoing request + example: c80601f4-d7b1-4795-a8ee-b09cdb5b450c + type: string + required: + - amount + - inProgress + - status + type: object DelegationDto: example: availableActions: @@ -25915,10 +26510,16 @@ components: stakeAccountAddress: 3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq chainDescriptor: SOL amount: "0.05" + relatedRequests: + - status: deactivating + inProgress: false + amount: "0.05" + txId: c80601f4-d7b1-4795-a8ee-b09cdb5b450c inProgress: true inProgressTxId: c80601f4-d7b1-4795-a8ee-b09cdb5b450c validatorAddress: FwR3PbjS5iyqzLiLugrBqKSa5EKZ4vK9SKs7eQXtT59f vaultAccountId: "2" + dateUpdated: 2023-07-13T15:55:34.256Z rewardsAmount: "0.000856038" dateCreated: 2023-07-13T15:55:34.256Z providerId: kiln @@ -25964,6 +26565,12 @@ components: dateCreated: description: When was the request made (ISO Date). example: 2023-07-13T15:55:34.256Z + format: date-time + type: string + dateUpdated: + description: When has the position last changed (ISO Date). + example: 2023-07-13T15:55:34.256Z + format: date-time type: string status: description: The current status. @@ -26016,6 +26623,22 @@ components: \ is available." example: stakeAccountAddress: 3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq + relatedRequests: + description: "An array of partial unstake requests for this position, relevant\ + \ only for the Lido provider. Each object includes the status of the unstake\ + \ request, a boolean indicating whether the action is in progress, the\ + \ amount of tokens to unstake, and the transaction ID of the request.\ + \ With Lido, a position may have multiple partial unstake requests in\ + \ different states. This field is optional and not applicable for other\ + \ providers." + example: + - status: deactivating + inProgress: false + amount: "0.05" + txId: c80601f4-d7b1-4795-a8ee-b09cdb5b450c + items: + $ref: '#/components/schemas/RelatedRequestDto' + type: array required: - amount - availableActions @@ -27679,6 +28302,15 @@ components: - did - pii_didkey type: object + TravelRuleVaspForVault: + example: + vaspDid: did:ethr:0x5dddec8dd669c49304ddbcba36ccc6e0798534dc + properties: + vaspDid: + description: VASP DID + example: did:ethr:0x5dddec8dd669c49304ddbcba36ccc6e0798534dc + type: string + type: object TravelRulePolicyRuleResponse: example: sourceId: sourceId @@ -29950,9 +30582,10 @@ components: example: 118320d2-761f-46c7-96cf-65e71a370b36 type: string type: - description: Kind of Smart Transfer. Can be either `ASYNC` or `ATOMIC` + description: Kind of Smart Transfer. Can be either `ASYNC` or `DVP` enum: - ASYNC + - DVP example: ASYNC type: string direction: @@ -30293,6 +30926,7 @@ components: type: enum: - ASYNC + - DVP type: string expiresIn: description: Number of hours after which an OPEN ticket will expire if no @@ -30570,6 +31204,49 @@ components: - srcId - srcType type: object + SmartTransferApproveTerm: + example: + note: Transaction note + amount: "133.789161216184" + srcId: "2" + fee: "0.001" + feeLevel: MEDIUM + asset: USDC + properties: + asset: + description: Asset name + example: USDC + type: string + x-fb-entity: asset + amount: + description: Amount + example: "133.789161216184" + type: string + srcId: + description: Id of the vault that is used as the source of the asset. + example: "2" + type: string + fee: + description: Transaction fee + example: "0.001" + type: string + feeLevel: + description: Transaction fee level. + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + note: + description: Transaction note + example: Transaction note + type: string + required: + - amount + - asset + - srcId + type: object SmartTransferManuallyFundTerm: example: txHash: txHash @@ -30628,6 +31305,57 @@ components: required: - userGroupIds type: object + SmartTransferCoinStatistic: + description: Smart transfer coin statistic + example: + amount: "15" + asset: BTC + properties: + asset: + example: BTC + type: string + amount: + example: "15" + type: string + type: object + SmartTransferStatistic: + description: Smart transfers statistic + example: + outflow: + ticketCount: 4 + coins: + - amount: "15" + asset: BTC + - amount: "15" + asset: BTC + totalInactiveTickets: 5 + inflow: + ticketCount: 4 + coins: + - amount: "15" + asset: BTC + - amount: "15" + asset: BTC + totalActiveTickets: 5 + properties: + inflow: + $ref: '#/components/schemas/SmartTransferStatistic_inflow' + outflow: + $ref: '#/components/schemas/SmartTransferStatistic_outflow' + totalActiveTickets: + description: Number of total active tickets + example: 5 + type: integer + totalInactiveTickets: + description: "Number of total inactive tickets (expired, canceled, completed)" + example: 5 + type: integer + required: + - inflow + - outflow + - totalActiveTickets + - totalInactiveTickets + type: object Task: example: jobId: jobId @@ -31489,6 +32217,42 @@ components: derivationPath: $ref: '#/components/schemas/PolicyRule_rawMessageSigning_derivationPath' type: object + SmartTransferStatistic_inflow: + description: Inflow tickets data + example: + ticketCount: 4 + coins: + - amount: "15" + asset: BTC + - amount: "15" + asset: BTC + properties: + coins: + items: + $ref: '#/components/schemas/SmartTransferCoinStatistic' + type: array + ticketCount: + example: 4 + type: integer + type: object + SmartTransferStatistic_outflow: + description: Outflow tickets data + example: + ticketCount: 4 + coins: + - amount: "15" + asset: BTC + - amount: "15" + asset: BTC + properties: + coins: + items: + $ref: '#/components/schemas/SmartTransferCoinStatistic' + type: array + ticketCount: + example: 4 + type: integer + type: object securitySchemes: bearerTokenAuth: bearerFormat: JWT diff --git a/build.gradle b/build.gradle index c713efc..358eefb 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '4.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/ContractInteractionsApi.md b/docs/ContractInteractionsApi.md index 36e336e..cf00b74 100644 --- a/docs/ContractInteractionsApi.md +++ b/docs/ContractInteractionsApi.md @@ -4,15 +4,15 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getDeployedContractAbi**](ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI | -| [**readCallFunction**](ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract | -| [**writeCallFunction**](ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract | +| [**getDeployedContractAbi**](ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI | +| [**readCallFunction**](ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract | +| [**writeCallFunction**](ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract | ## getDeployedContractAbi -> CompletableFuture> getDeployedContractAbi getDeployedContractAbi(contractAddress, assetId, idempotencyKey) +> CompletableFuture> getDeployedContractAbi getDeployedContractAbi(contractAddress, baseAssetId, idempotencyKey) Return deployed contract's ABI @@ -42,10 +42,10 @@ public class Example { Fireblocks fireblocks = new Fireblocks(configurationOptions); String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address - String assetId = "assetId_example"; // String | + String baseAssetId = "baseAssetId_example"; // String | 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().getDeployedContractAbi(contractAddress, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.contractInteractions().getDeployedContractAbi(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()); @@ -73,7 +73,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **contractAddress** | **String**| The contract's onchain address | | -| **assetId** | **String**| | | +| **baseAssetId** | **String**| | | | **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 @@ -99,7 +99,7 @@ No authorization required ## readCallFunction -> CompletableFuture>> readCallFunction readCallFunction(readCallFunctionDto, contractAddress, assetId, idempotencyKey) +> CompletableFuture>> readCallFunction readCallFunction(readCallFunctionDto, contractAddress, baseAssetId, idempotencyKey) Call a read function on a deployed contract @@ -130,10 +130,10 @@ public class Example { ReadCallFunctionDto readCallFunctionDto = new ReadCallFunctionDto(); // ReadCallFunctionDto | String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address - String assetId = "assetId_example"; // String | + String baseAssetId = "baseAssetId_example"; // String | 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().readCallFunction(readCallFunctionDto, contractAddress, assetId, idempotencyKey); + CompletableFuture>> response = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto, 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()); @@ -162,7 +162,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **readCallFunctionDto** | [**ReadCallFunctionDto**](ReadCallFunctionDto.md)| | | | **contractAddress** | **String**| The contract's onchain address | | -| **assetId** | **String**| | | +| **baseAssetId** | **String**| | | | **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 @@ -188,7 +188,7 @@ No authorization required ## writeCallFunction -> CompletableFuture> writeCallFunction writeCallFunction(writeCallFunctionDto, contractAddress, assetId, idempotencyKey) +> CompletableFuture> writeCallFunction writeCallFunction(writeCallFunctionDto, contractAddress, baseAssetId, idempotencyKey) Call a write function on a deployed contract @@ -219,10 +219,10 @@ public class Example { WriteCallFunctionDto writeCallFunctionDto = new WriteCallFunctionDto(); // WriteCallFunctionDto | String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address - String assetId = "assetId_example"; // String | + String baseAssetId = "baseAssetId_example"; // String | 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().writeCallFunction(writeCallFunctionDto, contractAddress, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto, 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()); @@ -251,7 +251,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **writeCallFunctionDto** | [**WriteCallFunctionDto**](WriteCallFunctionDto.md)| | | | **contractAddress** | **String**| The contract's onchain address | | -| **assetId** | **String**| | | +| **baseAssetId** | **String**| | | | **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/DelegationDto.md b/docs/DelegationDto.md index a09ca77..a17898d 100644 --- a/docs/DelegationDto.md +++ b/docs/DelegationDto.md @@ -14,7 +14,8 @@ |**chainDescriptor** | **String** | The protocol identifier (e.g. \"ETH\"/ \"SOL\") to use | | |**amount** | **String** | Amount of tokens to stake, measured in the staked asset unit. | | |**rewardsAmount** | **String** | The amount staked in the position, measured in the staked asset unit. | | -|**dateCreated** | **String** | When was the request made (ISO Date). | | +|**dateCreated** | **OffsetDateTime** | When was the request made (ISO Date). | | +|**dateUpdated** | **OffsetDateTime** | When has the position last changed (ISO Date). | [optional] | |**status** | **String** | The current status. | | |**relatedTransactions** | [**List<RelatedTransactionDto>**](RelatedTransactionDto.md) | An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed. | | |**validatorAddress** | **String** | The destination address of the staking transaction. | | @@ -23,6 +24,7 @@ |**inProgress** | **Boolean** | Indicates whether there is an ongoing action for this position (true if ongoing, false if not). | | |**inProgressTxId** | **String** | The transaction ID of the ongoing request | [optional] | |**blockchainPositionInfo** | [**SolanaBlockchainDataDto**](SolanaBlockchainDataDto.md) | Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. | | +|**relatedRequests** | [**List<RelatedRequestDto>**](RelatedRequestDto.md) | An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers. | [optional] | diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md index 4a7ac8a..9f77837 100644 --- a/docs/DeployedContractsApi.md +++ b/docs/DeployedContractsApi.md @@ -354,7 +354,7 @@ No authorization required ## getDeployedContracts -> CompletableFuture> getDeployedContracts getDeployedContracts(pageCursor, pageSize, contractAddress, assetId, templateId) +> CompletableFuture> getDeployedContracts getDeployedContracts(pageCursor, pageSize, contractAddress, baseAssetId, templateId) List deployed contracts data @@ -386,10 +386,10 @@ public class Example { String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items per page, requesting more then max will return max items String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address - String assetId = "assetId_example"; // String | + String baseAssetId = "baseAssetId_example"; // String | String templateId = "templateId_example"; // String | try { - CompletableFuture> response = fireblocks.deployedContracts().getDeployedContracts(pageCursor, pageSize, contractAddress, assetId, templateId); + CompletableFuture> response = fireblocks.deployedContracts().getDeployedContracts(pageCursor, pageSize, contractAddress, baseAssetId, templateId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -419,7 +419,7 @@ public class Example { | **pageCursor** | **String**| Page cursor to get the next page | [optional] | | **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | | **contractAddress** | **String**| The contract's onchain address | [optional] | -| **assetId** | **String**| | [optional] | +| **baseAssetId** | **String**| | [optional] | | **templateId** | **String**| | [optional] | ### Return type diff --git a/docs/EVMTokenCreateParamsDto.md b/docs/EVMTokenCreateParamsDto.md index 72d59a1..03c3b00 100644 --- a/docs/EVMTokenCreateParamsDto.md +++ b/docs/EVMTokenCreateParamsDto.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**contractId** | **String** | The id of the contract template that will be used to create the token | | -|**constructorParams** | **List<List<ParameterWithValue>>** | The constructor parameters and values of the contract template | [optional] | +|**deployFunctionParams** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The deploy function parameters and values of the contract template | [optional] | diff --git a/docs/LeanAbiFunction.md b/docs/LeanAbiFunction.md index f9fc415..e87aca4 100644 --- a/docs/LeanAbiFunction.md +++ b/docs/LeanAbiFunction.md @@ -9,6 +9,19 @@ |------------ | ------------- | ------------- | -------------| |**name** | **String** | The function name | [optional] | |**inputs** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The function inputs | | +|**outputs** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The function outputs | [optional] | +|**stateMutability** | [**StateMutabilityEnum**](#StateMutabilityEnum) | The state mutability of the function (e.g., view, pure, nonpayable, payable) | [optional] | + + + +## Enum: StateMutabilityEnum + +| Name | Value | +|---- | -----| +| VIEW | "view" | +| PURE | "pure" | +| NONPAYABLE | "nonpayable" | +| PAYABLE | "payable" | diff --git a/docs/RelatedRequestDto.md b/docs/RelatedRequestDto.md new file mode 100644 index 0000000..255267d --- /dev/null +++ b/docs/RelatedRequestDto.md @@ -0,0 +1,16 @@ + + +# RelatedRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **RelatedRequestStatusType** | | | +|**inProgress** | **Boolean** | Indicates whether there is an ongoing action for this position related to this request | | +|**amount** | **String** | Amount of tokens to Unstake | | +|**txId** | **String** | The transaction ID of the ongoing request | [optional] | + + + diff --git a/docs/RelatedRequestStatusType.md b/docs/RelatedRequestStatusType.md new file mode 100644 index 0000000..3975dd9 --- /dev/null +++ b/docs/RelatedRequestStatusType.md @@ -0,0 +1,73 @@ + + +# RelatedRequestStatusType + +## Enum + + +* `ERROR` (value: `"error"`) + +* `CREATED` (value: `"created"`) + +* `CANCELED` (value: `"canceled"`) + +* `ACTIVATE_REQUESTED` (value: `"activate_requested"`) + +* `APPROVE_INPROGRESS` (value: `"approve_inprogress"`) + +* `APPROVE_INPROGRESS_SIGNED` (value: `"approve_inprogress_signed"`) + +* `ACTIVATE_INPROGRESS` (value: `"activate_inprogress"`) + +* `ACTIVATE_INPROGRESS_SIGNED` (value: `"activate_inprogress_signed"`) + +* `ACTIVATE_INPROGRESS_CONFIRMED` (value: `"activate_inprogress_confirmed"`) + +* `ACTIVATE_DONE` (value: `"activate_done"`) + +* `DEACTIVATE_REQUESTED` (value: `"deactivate_requested"`) + +* `DEACTIVATE_INPROGRESS` (value: `"deactivate_inprogress"`) + +* `DEACTIVATE_INPROGRESS_SIGNED` (value: `"deactivate_inprogress_signed"`) + +* `DEACTIVATE_INPROGRESS_CONFIRMED` (value: `"deactivate_inprogress_confirmed"`) + +* `DEACTIVATE_DONE` (value: `"deactivate_done"`) + +* `WITHDRAW_INPROGRESS` (value: `"withdraw_inprogress"`) + +* `WITHDRAW_REQUESTED` (value: `"withdraw_requested"`) + +* `WITHDRAW_INPROGRESS_CONFIRMED` (value: `"withdraw_inprogress_confirmed"`) + +* `WITHDRAW_DONE` (value: `"withdraw_done"`) + +* `CLAIM_REWARDS_REQUESTED` (value: `"claim_rewards_requested"`) + +* `CLAIM_REWARDS_INPROGRESS` (value: `"claim_rewards_inprogress"`) + +* `CLAIM_REWARDS_DONE` (value: `"claim_rewards_done"`) + +* `PENDING` (value: `"pending"`) + +* `PENDING_QUEUED` (value: `"pending_queued"`) + +* `ACTIVE_OFFLINE` (value: `"active_offline"`) + +* `ACTIVE_ONLINE` (value: `"active_online"`) + +* `EXITING_ONLINE` (value: `"exiting_online"`) + +* `EXITED` (value: `"exited"`) + +* `ACTIVE` (value: `"active"`) + +* `INACTIVE` (value: `"inactive"`) + +* `ACTIVATING` (value: `"activating"`) + +* `DEACTIVATING` (value: `"deactivating"`) + + + diff --git a/docs/SmartTransferApi.md b/docs/SmartTransferApi.md index 56452f1..4ac9fa4 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -4,13 +4,16 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**approveDvPTicketTerm**](SmartTransferApi.md#approveDvPTicketTerm) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Define funding source and give approve to contract to transfer asset | | [**cancelTicket**](SmartTransferApi.md#cancelTicket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket | | [**createTicket**](SmartTransferApi.md#createTicket) | **POST** /smart-transfers | Create Ticket | | [**createTicketTerm**](SmartTransferApi.md#createTicketTerm) | **POST** /smart-transfers/{ticketId}/terms | Create leg (term) | | [**findTicketById**](SmartTransferApi.md#findTicketById) | **GET** /smart-transfers/{ticketId} | Search Tickets by ID | | [**findTicketTermById**](SmartTransferApi.md#findTicketTermById) | **GET** /smart-transfers/{ticketId}/terms/{termId} | Search ticket by leg (term) ID | | [**fulfillTicket**](SmartTransferApi.md#fulfillTicket) | **PUT** /smart-transfers/{ticketId}/fulfill | Fund ticket manually | +| [**fundDvpTicket**](SmartTransferApi.md#fundDvpTicket) | **PUT** /smart_transfers/{ticketId}/dvp/fund | Fund dvp ticket | | [**fundTicketTerm**](SmartTransferApi.md#fundTicketTerm) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/fund | Define funding source | +| [**getSmartTransferStatistic**](SmartTransferApi.md#getSmartTransferStatistic) | **GET** /smart_transfers/statistic | Get smart transfers statistic | | [**getSmartTransferUserGroups**](SmartTransferApi.md#getSmartTransferUserGroups) | **GET** /smart-transfers/settings/user-groups | Get user group | | [**manuallyFundTicketTerm**](SmartTransferApi.md#manuallyFundTicketTerm) | **PUT** /smart-transfers/{ticketId}/terms/{termId}/manually-fund | Manually add term transaction | | [**removeTicketTerm**](SmartTransferApi.md#removeTicketTerm) | **DELETE** /smart-transfers/{ticketId}/terms/{termId} | Delete ticket leg (term) | @@ -23,6 +26,97 @@ All URIs are relative to https://developers.fireblocks.com/reference/ +## approveDvPTicketTerm + +> CompletableFuture> approveDvPTicketTerm approveDvPTicketTerm(smartTransferApproveTerm, ticketId, termId, idempotencyKey) + +Define funding source and give approve to contract to transfer asset + +Set funding source for ticket term and creating approving transaction for contract to transfer asset + +### 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.SmartTransferApi; +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); + + SmartTransferApproveTerm smartTransferApproveTerm = new SmartTransferApproveTerm(); // SmartTransferApproveTerm | + String ticketId = "ticketId_example"; // String | + String termId = "termId_example"; // String | + 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.smartTransfer().approveDvPTicketTerm(smartTransferApproveTerm, ticketId, termId, 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 SmartTransferApi#approveDvPTicketTerm"); + 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 SmartTransferApi#approveDvPTicketTerm"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **smartTransferApproveTerm** | [**SmartTransferApproveTerm**](SmartTransferApproveTerm.md)| | | +| **ticketId** | **String**| | | +| **termId** | **String**| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Creating approval transaction started | - | +| **403** | Unauthorized | - | +| **404** | Not found | - | +| **422** | Bad Request | - | + + ## cancelTicket > CompletableFuture> cancelTicket cancelTicket(ticketId, idempotencyKey) @@ -541,6 +635,93 @@ No authorization required | **422** | Bad Request | - | +## fundDvpTicket + +> CompletableFuture> fundDvpTicket fundDvpTicket(ticketId, idempotencyKey) + +Fund dvp ticket + +Create or fulfill dvp ticket order + +### 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.SmartTransferApi; +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 ticketId = "ticketId_example"; // String | + 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.smartTransfer().fundDvpTicket(ticketId, 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 SmartTransferApi#fundDvpTicket"); + 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 SmartTransferApi#fundDvpTicket"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **ticketId** | **String**| | | +| **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**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successfully started creating or fulfilling order on dvp Smart Transfer ticket | - | +| **403** | Unauthorized | - | +| **404** | Not found | - | +| **422** | Bad Request | - | + + ## fundTicketTerm > CompletableFuture> fundTicketTerm fundTicketTerm(smartTransferFundTerm, ticketId, termId, idempotencyKey) @@ -632,6 +813,86 @@ No authorization required | **422** | Bad Request | - | +## getSmartTransferStatistic + +> CompletableFuture> getSmartTransferStatistic getSmartTransferStatistic() + +Get smart transfers statistic + +Get smart transfer statistic + +### 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.SmartTransferApi; +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); + + try { + CompletableFuture> response = fireblocks.smartTransfer().getSmartTransferStatistic(); + 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 SmartTransferApi#getSmartTransferStatistic"); + 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 SmartTransferApi#getSmartTransferStatistic"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### 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** | Smart Transfer ticket statistic returned successfully | - | +| **403** | Unauthorized | - | +| **0** | Error Response | * X-Request-ID -
| + + ## getSmartTransferUserGroups > CompletableFuture> getSmartTransferUserGroups getSmartTransferUserGroups() @@ -925,7 +1186,7 @@ public class Example { Boolean createdByMe = true; // Boolean | Filter created tickets by created by self or by others. Optional OffsetDateTime expiresAfter = OffsetDateTime.now(); // OffsetDateTime | Lower bound of search range. Optional OffsetDateTime expiresBefore = OffsetDateTime.now(); // OffsetDateTime | Upper bound of search range. Optional - String type = "ASYNC"; // String | Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes all terms (legs) as one atomic transfer + String type = "ASYNC"; // String | Type of transfer. ASYNC executes transfers as they are funded, DVP executes all terms (legs) as one dvp transfer String externalRefId = "externalRefId_example"; // String | External ref. ID that workspace can use to identify ticket outside of Fireblocks system. String after = "after_example"; // String | ID of the record after which to fetch $limit records BigDecimal limit = new BigDecimal(78); // BigDecimal | Number of records to fetch. By default, it is 100 @@ -963,7 +1224,7 @@ public class Example { | **createdByMe** | **Boolean**| Filter created tickets by created by self or by others. Optional | [optional] | | **expiresAfter** | **OffsetDateTime**| Lower bound of search range. Optional | [optional] | | **expiresBefore** | **OffsetDateTime**| Upper bound of search range. Optional | [optional] | -| **type** | **String**| Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes all terms (legs) as one atomic transfer | [optional] [enum: ASYNC] | +| **type** | **String**| Type of transfer. ASYNC executes transfers as they are funded, DVP executes all terms (legs) as one dvp transfer | [optional] [enum: ASYNC, DVP] | | **externalRefId** | **String**| External ref. ID that workspace can use to identify ticket outside of Fireblocks system. | [optional] | | **after** | **String**| ID of the record after which to fetch $limit records | [optional] | | **limit** | **BigDecimal**| Number of records to fetch. By default, it is 100 | [optional] | diff --git a/docs/SmartTransferApproveTerm.md b/docs/SmartTransferApproveTerm.md new file mode 100644 index 0000000..9f7e157 --- /dev/null +++ b/docs/SmartTransferApproveTerm.md @@ -0,0 +1,28 @@ + + +# SmartTransferApproveTerm + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | **String** | Asset name | | +|**amount** | **String** | Amount | | +|**srcId** | **String** | Id of the vault that is used as the source of the asset. | | +|**fee** | **String** | Transaction fee | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Transaction fee level. | [optional] | +|**note** | **String** | Transaction note | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/SmartTransferCoinStatistic.md b/docs/SmartTransferCoinStatistic.md new file mode 100644 index 0000000..b2b37e2 --- /dev/null +++ b/docs/SmartTransferCoinStatistic.md @@ -0,0 +1,15 @@ + + +# SmartTransferCoinStatistic + +Smart transfer coin statistic + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**asset** | **String** | | [optional] | +|**amount** | **String** | | [optional] | + + + diff --git a/docs/SmartTransferCreateTicket.md b/docs/SmartTransferCreateTicket.md index 20abfbe..89913d9 100644 --- a/docs/SmartTransferCreateTicket.md +++ b/docs/SmartTransferCreateTicket.md @@ -22,6 +22,7 @@ | Name | Value | |---- | -----| | ASYNC | "ASYNC" | +| DVP | "DVP" | diff --git a/docs/SmartTransferStatistic.md b/docs/SmartTransferStatistic.md new file mode 100644 index 0000000..f7da180 --- /dev/null +++ b/docs/SmartTransferStatistic.md @@ -0,0 +1,17 @@ + + +# SmartTransferStatistic + +Smart transfers statistic + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**inflow** | [**SmartTransferStatisticInflow**](SmartTransferStatisticInflow.md) | | | +|**outflow** | [**SmartTransferStatisticOutflow**](SmartTransferStatisticOutflow.md) | | | +|**totalActiveTickets** | **Integer** | Number of total active tickets | | +|**totalInactiveTickets** | **Integer** | Number of total inactive tickets (expired, canceled, completed) | | + + + diff --git a/docs/SmartTransferStatisticInflow.md b/docs/SmartTransferStatisticInflow.md new file mode 100644 index 0000000..216a63c --- /dev/null +++ b/docs/SmartTransferStatisticInflow.md @@ -0,0 +1,15 @@ + + +# SmartTransferStatisticInflow + +Inflow tickets data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**coins** | [**List<SmartTransferCoinStatistic>**](SmartTransferCoinStatistic.md) | | [optional] | +|**ticketCount** | **Integer** | | [optional] | + + + diff --git a/docs/SmartTransferStatisticOutflow.md b/docs/SmartTransferStatisticOutflow.md new file mode 100644 index 0000000..8033370 --- /dev/null +++ b/docs/SmartTransferStatisticOutflow.md @@ -0,0 +1,15 @@ + + +# SmartTransferStatisticOutflow + +Outflow tickets data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**coins** | [**List<SmartTransferCoinStatistic>**](SmartTransferCoinStatistic.md) | | [optional] | +|**ticketCount** | **Integer** | | [optional] | + + + diff --git a/docs/SmartTransferTicket.md b/docs/SmartTransferTicket.md index 70dffba..6a2da7c 100644 --- a/docs/SmartTransferTicket.md +++ b/docs/SmartTransferTicket.md @@ -9,7 +9,7 @@ Data object with result data | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | Unique id of Smart Transfer ticket | | -|**type** | [**TypeEnum**](#TypeEnum) | Kind of Smart Transfer. Can be either `ASYNC` or `ATOMIC` | | +|**type** | [**TypeEnum**](#TypeEnum) | Kind of Smart Transfer. Can be either `ASYNC` or `DVP` | | |**direction** | [**DirectionEnum**](#DirectionEnum) | Direction of Smart Transfer. | [optional] | |**status** | [**StatusEnum**](#StatusEnum) | Current status of Smart Transfer ticket | | |**terms** | [**List<SmartTransferTicketTerm>**](SmartTransferTicketTerm.md) | Ticket terms (legs) | [optional] | @@ -36,6 +36,7 @@ Data object with result data | Name | Value | |---- | -----| | ASYNC | "ASYNC" | +| DVP | "DVP" | diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index cb79744..dc24cd8 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -33,7 +33,7 @@ |**autoStaking** | **Boolean** | This feature is no longer supported. | [optional] | |**networkStaking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] | |**cpuStaking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] | -|**useGasless** | **Boolean** | - Override the default gaslsess configuration by sending true\\false | [optional] | +|**useGasless** | **Boolean** | - Override the default gasless configuration by sending true\\false | [optional] | diff --git a/docs/TravelRuleBetaApi.md b/docs/TravelRuleBetaApi.md index 0744e98..f5b97d6 100644 --- a/docs/TravelRuleBetaApi.md +++ b/docs/TravelRuleBetaApi.md @@ -6,6 +6,8 @@ All URIs are relative to https://developers.fireblocks.com/reference/ |------------- | ------------- | -------------| | [**getVASPByDID**](TravelRuleBetaApi.md#getVASPByDID) | **GET** /screening/travel_rule/vasp/{did} | Get VASP details | | [**getVASPs**](TravelRuleBetaApi.md#getVASPs) | **GET** /screening/travel_rule/vasp | Get All VASPs | +| [**getVaspForVault**](TravelRuleBetaApi.md#getVaspForVault) | **GET** /screening/travel_rule/vault/{vaultAccountId}/vasp | Get assigned VASP to vault | +| [**setVaspForVault**](TravelRuleBetaApi.md#setVaspForVault) | **POST** /screening/travel_rule/vault/{vaultAccountId}/vasp | Assign VASP to vault | | [**updateVasp**](TravelRuleBetaApi.md#updateVasp) | **PUT** /screening/travel_rule/vasp/update | Add jsonDidKey to VASP details | | [**validateFullTravelRuleTransaction**](TravelRuleBetaApi.md#validateFullTravelRuleTransaction) | **POST** /screening/travel_rule/transaction/validate/full | Validate Full Travel Rule Transaction | | [**validateTravelRuleTransaction**](TravelRuleBetaApi.md#validateTravelRuleTransaction) | **POST** /screening/travel_rule/transaction/validate | Validate Travel Rule Transaction | @@ -186,6 +188,176 @@ No authorization required | **200** | Get all VASPs | - | +## getVaspForVault + +> CompletableFuture> getVaspForVault getVaspForVault(vaultAccountId) + +Get assigned VASP to vault + +Get assigned VASP Did for a specific vault. Returns empty string vaspDid value in response if none assigned. + +### 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.TravelRuleBetaApi; +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 vaultAccountId = "1"; // String | The ID of the vault account + try { + CompletableFuture> response = fireblocks.travelRuleBeta().getVaspForVault(vaultAccountId); + 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 TravelRuleBetaApi#getVaspForVault"); + 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 TravelRuleBetaApi#getVaspForVault"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **vaultAccountId** | **String**| The ID of the vault account | | + +### 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** | OK | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## setVaspForVault + +> CompletableFuture> setVaspForVault setVaspForVault(travelRuleVaspForVault, vaultAccountId, idempotencyKey) + +Assign VASP to vault + +Sets the VASP Did for a specific vault. Pass empty string to remove existing one. + +### 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.TravelRuleBetaApi; +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); + + TravelRuleVaspForVault travelRuleVaspForVault = new TravelRuleVaspForVault(); // TravelRuleVaspForVault | + String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account + 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.travelRuleBeta().setVaspForVault(travelRuleVaspForVault, vaultAccountId, 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 TravelRuleBetaApi#setVaspForVault"); + 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 TravelRuleBetaApi#setVaspForVault"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **travelRuleVaspForVault** | [**TravelRuleVaspForVault**](TravelRuleVaspForVault.md)| | | +| **vaultAccountId** | **String**| The ID of the vault account | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | OK | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## updateVasp > CompletableFuture> updateVasp updateVasp(travelRuleUpdateVASPDetails, idempotencyKey) diff --git a/docs/TravelRuleVaspForVault.md b/docs/TravelRuleVaspForVault.md new file mode 100644 index 0000000..ca8bdaf --- /dev/null +++ b/docs/TravelRuleVaspForVault.md @@ -0,0 +1,13 @@ + + +# TravelRuleVaspForVault + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaspDid** | **String** | VASP DID | [optional] | + + + diff --git a/pom.xml b/pom.xml index 1dbdeab..94938f5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 4.0.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 6b4df65..9ec56d0 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 = "4.0.0"; + public static final String VERSION = "0.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java index faf3c3c..7016fef 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java @@ -78,7 +78,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * asset id and contract address * * @param contractAddress The contract's onchain address (required) - * @param assetId (required) + * @param baseAssetId (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) @@ -86,10 +86,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @throws ApiException if fails to make API call */ public CompletableFuture> getDeployedContractAbi( - String contractAddress, String assetId, String idempotencyKey) throws ApiException { + String contractAddress, String baseAssetId, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - getDeployedContractAbiRequestBuilder(contractAddress, assetId, idempotencyKey); + getDeployedContractAbiRequestBuilder( + contractAddress, baseAssetId, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -124,19 +125,20 @@ public CompletableFuture> getDeployedContrac } private HttpRequest.Builder getDeployedContractAbiRequestBuilder( - String contractAddress, String assetId, String idempotencyKey) throws ApiException { + String contractAddress, String baseAssetId, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( "getDeployedContractAbi", "contractAddress", contractAddress); - ValidationUtils.assertParamExistsAndNotEmpty("getDeployedContractAbi", "assetId", assetId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getDeployedContractAbi", "baseAssetId", baseAssetId); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = - "/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions" + "/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions" .replace( "{contractAddress}", ApiClient.urlEncode(contractAddress.toString())) - .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); + .replace("{baseAssetId}", ApiClient.urlEncode(baseAssetId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -160,7 +162,7 @@ private HttpRequest.Builder getDeployedContractAbiRequestBuilder( * * @param readCallFunctionDto (required) * @param contractAddress The contract's onchain address (required) - * @param assetId (required) + * @param baseAssetId (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) @@ -170,13 +172,13 @@ private HttpRequest.Builder getDeployedContractAbiRequestBuilder( public CompletableFuture>> readCallFunction( ReadCallFunctionDto readCallFunctionDto, String contractAddress, - String assetId, + String baseAssetId, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = readCallFunctionRequestBuilder( - readCallFunctionDto, contractAddress, assetId, idempotencyKey); + readCallFunctionDto, contractAddress, baseAssetId, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -213,23 +215,24 @@ public CompletableFuture>> readCallFunction private HttpRequest.Builder readCallFunctionRequestBuilder( ReadCallFunctionDto readCallFunctionDto, String contractAddress, - String assetId, + String baseAssetId, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExists( "readCallFunction", "readCallFunctionDto", readCallFunctionDto); ValidationUtils.assertParamExistsAndNotEmpty( "readCallFunction", "contractAddress", contractAddress); - ValidationUtils.assertParamExistsAndNotEmpty("readCallFunction", "assetId", assetId); + ValidationUtils.assertParamExistsAndNotEmpty( + "readCallFunction", "baseAssetId", baseAssetId); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = - "/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read" + "/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read" .replace( "{contractAddress}", ApiClient.urlEncode(contractAddress.toString())) - .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); + .replace("{baseAssetId}", ApiClient.urlEncode(baseAssetId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -261,7 +264,7 @@ private HttpRequest.Builder readCallFunctionRequestBuilder( * * @param writeCallFunctionDto (required) * @param contractAddress The contract's onchain address (required) - * @param assetId (required) + * @param baseAssetId (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) @@ -271,13 +274,13 @@ private HttpRequest.Builder readCallFunctionRequestBuilder( public CompletableFuture> writeCallFunction( WriteCallFunctionDto writeCallFunctionDto, String contractAddress, - String assetId, + String baseAssetId, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = writeCallFunctionRequestBuilder( - writeCallFunctionDto, contractAddress, assetId, idempotencyKey); + writeCallFunctionDto, contractAddress, baseAssetId, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -313,23 +316,24 @@ public CompletableFuture> writeCallFun private HttpRequest.Builder writeCallFunctionRequestBuilder( WriteCallFunctionDto writeCallFunctionDto, String contractAddress, - String assetId, + String baseAssetId, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExists( "writeCallFunction", "writeCallFunctionDto", writeCallFunctionDto); ValidationUtils.assertParamExistsAndNotEmpty( "writeCallFunction", "contractAddress", contractAddress); - ValidationUtils.assertParamExistsAndNotEmpty("writeCallFunction", "assetId", assetId); + ValidationUtils.assertParamExistsAndNotEmpty( + "writeCallFunction", "baseAssetId", baseAssetId); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = - "/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write" + "/contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write" .replace( "{contractAddress}", ApiClient.urlEncode(contractAddress.toString())) - .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); + .replace("{baseAssetId}", ApiClient.urlEncode(baseAssetId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); diff --git a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java index 5e9614a..9c2990b 100644 --- a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java @@ -385,7 +385,7 @@ private HttpRequest.Builder getDeployedContractByIdRequestBuilder(String id) * @param pageSize Number of items per page, requesting more then max will return max items * (optional) * @param contractAddress The contract's onchain address (optional) - * @param assetId (optional) + * @param baseAssetId (optional) * @param templateId (optional) * @return CompletableFuture<ApiResponse<DeployedContractsPaginatedResponse>> * @throws ApiException if fails to make API call @@ -394,13 +394,13 @@ public CompletableFuture> getDep String pageCursor, BigDecimal pageSize, String contractAddress, - String assetId, + String baseAssetId, String templateId) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getDeployedContractsRequestBuilder( - pageCursor, pageSize, contractAddress, assetId, templateId); + pageCursor, pageSize, contractAddress, baseAssetId, templateId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -438,7 +438,7 @@ private HttpRequest.Builder getDeployedContractsRequestBuilder( String pageCursor, BigDecimal pageSize, String contractAddress, - String assetId, + String baseAssetId, String templateId) throws ApiException { @@ -455,8 +455,8 @@ private HttpRequest.Builder getDeployedContractsRequestBuilder( localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); localVarQueryParameterBaseName = "contractAddress"; localVarQueryParams.addAll(ApiClient.parameterToPairs("contractAddress", contractAddress)); - localVarQueryParameterBaseName = "assetId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("assetId", assetId)); + localVarQueryParameterBaseName = "baseAssetId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("baseAssetId", baseAssetId)); localVarQueryParameterBaseName = "templateId"; localVarQueryParams.addAll(ApiClient.parameterToPairs("templateId", templateId)); diff --git a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java index 2fc95d3..2881e69 100644 --- a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java @@ -20,6 +20,7 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.SmartTransferApproveTerm; import com.fireblocks.sdk.model.SmartTransferCreateTicket; import com.fireblocks.sdk.model.SmartTransferCreateTicketTerm; import com.fireblocks.sdk.model.SmartTransferFundTerm; @@ -27,6 +28,7 @@ import com.fireblocks.sdk.model.SmartTransferSetTicketExpiration; import com.fireblocks.sdk.model.SmartTransferSetTicketExternalId; import com.fireblocks.sdk.model.SmartTransferSetUserGroups; +import com.fireblocks.sdk.model.SmartTransferStatistic; import com.fireblocks.sdk.model.SmartTransferSubmitTicket; import com.fireblocks.sdk.model.SmartTransferTicketFilteredResponse; import com.fireblocks.sdk.model.SmartTransferTicketResponse; @@ -86,6 +88,104 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Define funding source and give approve to contract to transfer asset Set funding source for + * ticket term and creating approving transaction for contract to transfer asset + * + * @param smartTransferApproveTerm (required) + * @param ticketId (required) + * @param termId (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<SmartTransferTicketTermResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> approveDvPTicketTerm( + SmartTransferApproveTerm smartTransferApproveTerm, + String ticketId, + String termId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + approveDvPTicketTermRequestBuilder( + smartTransferApproveTerm, ticketId, termId, 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( + "approveDvPTicketTerm", 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< + SmartTransferTicketTermResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder approveDvPTicketTermRequestBuilder( + SmartTransferApproveTerm smartTransferApproveTerm, + String ticketId, + String termId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "approveDvPTicketTerm", "smartTransferApproveTerm", smartTransferApproveTerm); + ValidationUtils.assertParamExistsAndNotEmpty("approveDvPTicketTerm", "ticketId", ticketId); + ValidationUtils.assertParamExistsAndNotEmpty("approveDvPTicketTerm", "termId", termId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/smart_transfers/{ticketId}/terms/{termId}/dvp/approve" + .replace("{ticketId}", ApiClient.urlEncode(ticketId.toString())) + .replace("{termId}", ApiClient.urlEncode(termId.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(smartTransferApproveTerm); + localVarRequestBuilder.method( + "PUT", 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; + } /** * Cancel Ticket Cancel Smart Transfer ticket * @@ -542,6 +642,79 @@ private HttpRequest.Builder fulfillTicketRequestBuilder(String ticketId, String } return localVarRequestBuilder; } + /** + * Fund dvp ticket Create or fulfill dvp ticket order + * + * @param ticketId (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<SmartTransferTicketResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> fundDvpTicket( + String ticketId, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + fundDvpTicketRequestBuilder(ticketId, 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("fundDvpTicket", 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< + SmartTransferTicketResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder fundDvpTicketRequestBuilder(String ticketId, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("fundDvpTicket", "ticketId", ticketId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/smart_transfers/{ticketId}/dvp/fund" + .replace("{ticketId}", ApiClient.urlEncode(ticketId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Define funding source Set funding source for ticket term (in case of ASYNC tickets, this will * execute transfer immediately) @@ -639,6 +812,68 @@ private HttpRequest.Builder fundTicketTermRequestBuilder( } return localVarRequestBuilder; } + /** + * Get smart transfers statistic Get smart transfer statistic + * + * @return CompletableFuture<ApiResponse<SmartTransferStatistic>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getSmartTransferStatistic() + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getSmartTransferStatisticRequestBuilder(); + 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( + "getSmartTransferStatistic", 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< + SmartTransferStatistic>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getSmartTransferStatisticRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/smart_transfers/statistic"; + + 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 user group Get Smart Transfer user groups * @@ -872,8 +1107,8 @@ private HttpRequest.Builder removeTicketTermRequestBuilder(String ticketId, Stri * (optional) * @param expiresAfter Lower bound of search range. Optional (optional) * @param expiresBefore Upper bound of search range. Optional (optional) - * @param type Type of transfer. ASYNC executes transfers as they are funded, ATOMIC executes - * all terms (legs) as one atomic transfer (optional) + * @param type Type of transfer. ASYNC executes transfers as they are funded, DVP executes all + * terms (legs) as one dvp transfer (optional) * @param externalRefId External ref. ID that workspace can use to identify ticket outside of * Fireblocks system. (optional) * @param after ID of the record after which to fetch $limit records (optional) diff --git a/src/main/java/com/fireblocks/sdk/api/TravelRuleBetaApi.java b/src/main/java/com/fireblocks/sdk/api/TravelRuleBetaApi.java index 9f410ca..f4793b6 100644 --- a/src/main/java/com/fireblocks/sdk/api/TravelRuleBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TravelRuleBetaApi.java @@ -26,6 +26,7 @@ import com.fireblocks.sdk.model.TravelRuleValidateFullTransactionRequest; import com.fireblocks.sdk.model.TravelRuleValidateTransactionRequest; import com.fireblocks.sdk.model.TravelRuleValidateTransactionResponse; +import com.fireblocks.sdk.model.TravelRuleVaspForVault; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -261,6 +262,170 @@ private HttpRequest.Builder getVASPsRequestBuilder( } return localVarRequestBuilder; } + /** + * Get assigned VASP to vault Get assigned VASP Did for a specific vault. Returns empty string + * vaspDid value in response if none assigned. + * + * @param vaultAccountId The ID of the vault account (required) + * @return CompletableFuture<ApiResponse<TravelRuleVaspForVault>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getVaspForVault( + String vaultAccountId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getVaspForVaultRequestBuilder(vaultAccountId); + 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("getVaspForVault", 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< + TravelRuleVaspForVault>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getVaspForVaultRequestBuilder(String vaultAccountId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getVaspForVault", "vaultAccountId", vaultAccountId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/screening/travel_rule/vault/{vaultAccountId}/vasp" + .replace( + "{vaultAccountId}", ApiClient.urlEncode(vaultAccountId.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; + } + /** + * Assign VASP to vault Sets the VASP Did for a specific vault. Pass empty string to remove + * existing one. + * + * @param travelRuleVaspForVault (required) + * @param vaultAccountId The ID of the vault account (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<TravelRuleVaspForVault>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> setVaspForVault( + TravelRuleVaspForVault travelRuleVaspForVault, + String vaultAccountId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + setVaspForVaultRequestBuilder( + travelRuleVaspForVault, vaultAccountId, 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("setVaspForVault", 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< + TravelRuleVaspForVault>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder setVaspForVaultRequestBuilder( + TravelRuleVaspForVault travelRuleVaspForVault, + String vaultAccountId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "setVaspForVault", "travelRuleVaspForVault", travelRuleVaspForVault); + ValidationUtils.assertParamExistsAndNotEmpty( + "setVaspForVault", "vaultAccountId", vaultAccountId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/screening/travel_rule/vault/{vaultAccountId}/vasp" + .replace( + "{vaultAccountId}", ApiClient.urlEncode(vaultAccountId.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(travelRuleVaspForVault); + 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; + } /** * Add jsonDidKey to VASP details Update VASP Details. Updates a VASP with the provided * parameters. Use this endpoint to add your public jsonDIDkey generated by Notabene. **Note:** diff --git a/src/main/java/com/fireblocks/sdk/model/DelegationDto.java b/src/main/java/com/fireblocks/sdk/model/DelegationDto.java index b9446f9..e5a3b92 100644 --- a/src/main/java/com/fireblocks/sdk/model/DelegationDto.java +++ b/src/main/java/com/fireblocks/sdk/model/DelegationDto.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -33,6 +34,7 @@ DelegationDto.JSON_PROPERTY_AMOUNT, DelegationDto.JSON_PROPERTY_REWARDS_AMOUNT, DelegationDto.JSON_PROPERTY_DATE_CREATED, + DelegationDto.JSON_PROPERTY_DATE_UPDATED, DelegationDto.JSON_PROPERTY_STATUS, DelegationDto.JSON_PROPERTY_RELATED_TRANSACTIONS, DelegationDto.JSON_PROPERTY_VALIDATOR_ADDRESS, @@ -40,7 +42,8 @@ DelegationDto.JSON_PROPERTY_AVAILABLE_ACTIONS, DelegationDto.JSON_PROPERTY_IN_PROGRESS, DelegationDto.JSON_PROPERTY_IN_PROGRESS_TX_ID, - DelegationDto.JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO + DelegationDto.JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO, + DelegationDto.JSON_PROPERTY_RELATED_REQUESTS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DelegationDto { @@ -66,7 +69,10 @@ public class DelegationDto { private String rewardsAmount; public static final String JSON_PROPERTY_DATE_CREATED = "dateCreated"; - private String dateCreated; + private OffsetDateTime dateCreated; + + public static final String JSON_PROPERTY_DATE_UPDATED = "dateUpdated"; + private OffsetDateTime dateUpdated; public static final String JSON_PROPERTY_STATUS = "status"; private String status; @@ -92,6 +98,9 @@ public class DelegationDto { public static final String JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO = "blockchainPositionInfo"; private SolanaBlockchainDataDto blockchainPositionInfo; + public static final String JSON_PROPERTY_RELATED_REQUESTS = "relatedRequests"; + private List relatedRequests; + public DelegationDto() {} public DelegationDto id(String id) { @@ -255,7 +264,7 @@ public void setRewardsAmount(String rewardsAmount) { this.rewardsAmount = rewardsAmount; } - public DelegationDto dateCreated(String dateCreated) { + public DelegationDto dateCreated(OffsetDateTime dateCreated) { this.dateCreated = dateCreated; return this; } @@ -268,16 +277,39 @@ public DelegationDto dateCreated(String dateCreated) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DATE_CREATED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDateCreated() { + public OffsetDateTime getDateCreated() { return dateCreated; } @JsonProperty(JSON_PROPERTY_DATE_CREATED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDateCreated(String dateCreated) { + public void setDateCreated(OffsetDateTime dateCreated) { this.dateCreated = dateCreated; } + public DelegationDto dateUpdated(OffsetDateTime dateUpdated) { + this.dateUpdated = dateUpdated; + return this; + } + + /** + * When has the position last changed (ISO Date). + * + * @return dateUpdated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getDateUpdated() { + return dateUpdated; + } + + @JsonProperty(JSON_PROPERTY_DATE_UPDATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateUpdated(OffsetDateTime dateUpdated) { + this.dateUpdated = dateUpdated; + } + public DelegationDto status(String status) { this.status = status; return this; @@ -485,6 +517,41 @@ public void setBlockchainPositionInfo(SolanaBlockchainDataDto blockchainPosition this.blockchainPositionInfo = blockchainPositionInfo; } + public DelegationDto relatedRequests(List relatedRequests) { + this.relatedRequests = relatedRequests; + return this; + } + + public DelegationDto addRelatedRequestsItem(RelatedRequestDto relatedRequestsItem) { + if (this.relatedRequests == null) { + this.relatedRequests = new ArrayList<>(); + } + this.relatedRequests.add(relatedRequestsItem); + return this; + } + + /** + * An array of partial unstake requests for this position, relevant only for the Lido provider. + * Each object includes the status of the unstake request, a boolean indicating whether the + * action is in progress, the amount of tokens to unstake, and the transaction ID of the + * request. With Lido, a position may have multiple partial unstake requests in different + * states. This field is optional and not applicable for other providers. + * + * @return relatedRequests + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATED_REQUESTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRelatedRequests() { + return relatedRequests; + } + + @JsonProperty(JSON_PROPERTY_RELATED_REQUESTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelatedRequests(List relatedRequests) { + this.relatedRequests = relatedRequests; + } + /** Return true if this DelegationDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -503,6 +570,7 @@ public boolean equals(Object o) { && Objects.equals(this.amount, delegationDto.amount) && Objects.equals(this.rewardsAmount, delegationDto.rewardsAmount) && Objects.equals(this.dateCreated, delegationDto.dateCreated) + && Objects.equals(this.dateUpdated, delegationDto.dateUpdated) && Objects.equals(this.status, delegationDto.status) && Objects.equals(this.relatedTransactions, delegationDto.relatedTransactions) && Objects.equals(this.validatorAddress, delegationDto.validatorAddress) @@ -510,8 +578,8 @@ public boolean equals(Object o) { && Objects.equals(this.availableActions, delegationDto.availableActions) && Objects.equals(this.inProgress, delegationDto.inProgress) && Objects.equals(this.inProgressTxId, delegationDto.inProgressTxId) - && Objects.equals( - this.blockchainPositionInfo, delegationDto.blockchainPositionInfo); + && Objects.equals(this.blockchainPositionInfo, delegationDto.blockchainPositionInfo) + && Objects.equals(this.relatedRequests, delegationDto.relatedRequests); } @Override @@ -525,6 +593,7 @@ public int hashCode() { amount, rewardsAmount, dateCreated, + dateUpdated, status, relatedTransactions, validatorAddress, @@ -532,7 +601,8 @@ public int hashCode() { availableActions, inProgress, inProgressTxId, - blockchainPositionInfo); + blockchainPositionInfo, + relatedRequests); } @Override @@ -547,6 +617,7 @@ public String toString() { sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" rewardsAmount: ").append(toIndentedString(rewardsAmount)).append("\n"); sb.append(" dateCreated: ").append(toIndentedString(dateCreated)).append("\n"); + sb.append(" dateUpdated: ").append(toIndentedString(dateUpdated)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" relatedTransactions: ") .append(toIndentedString(relatedTransactions)) @@ -559,6 +630,7 @@ public String toString() { sb.append(" blockchainPositionInfo: ") .append(toIndentedString(blockchainPositionInfo)) .append("\n"); + sb.append(" relatedRequests: ").append(toIndentedString(relatedRequests)).append("\n"); sb.append("}"); return sb.toString(); } @@ -706,6 +778,19 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `dateUpdated` to the URL query string + if (getDateUpdated() != null) { + joiner.add( + String.format( + "%sdateUpdated%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDateUpdated()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `status` to the URL query string if (getStatus() != null) { joiner.add( @@ -816,6 +901,29 @@ public String toUrlQueryString(String prefix) { .toUrlQueryString(prefix + "blockchainPositionInfo" + suffix)); } + // add `relatedRequests` to the URL query string + if (getRelatedRequests() != null) { + for (int i = 0; i < getRelatedRequests().size(); i++) { + if (getRelatedRequests().get(i) != null) { + joiner.add( + getRelatedRequests() + .get(i) + .toUrlQueryString( + String.format( + "%srelatedRequests%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/EVMTokenCreateParamsDto.java b/src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java index 3dcc318..37fd5aa 100644 --- a/src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java +++ b/src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java @@ -26,15 +26,15 @@ /** EVMTokenCreateParamsDto */ @JsonPropertyOrder({ EVMTokenCreateParamsDto.JSON_PROPERTY_CONTRACT_ID, - EVMTokenCreateParamsDto.JSON_PROPERTY_CONSTRUCTOR_PARAMS + EVMTokenCreateParamsDto.JSON_PROPERTY_DEPLOY_FUNCTION_PARAMS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class EVMTokenCreateParamsDto { public static final String JSON_PROPERTY_CONTRACT_ID = "contractId"; private String contractId; - public static final String JSON_PROPERTY_CONSTRUCTOR_PARAMS = "constructorParams"; - private List> constructorParams; + public static final String JSON_PROPERTY_DEPLOY_FUNCTION_PARAMS = "deployFunctionParams"; + private List deployFunctionParams; public EVMTokenCreateParamsDto() {} @@ -61,37 +61,37 @@ public void setContractId(String contractId) { this.contractId = contractId; } - public EVMTokenCreateParamsDto constructorParams( - List> constructorParams) { - this.constructorParams = constructorParams; + public EVMTokenCreateParamsDto deployFunctionParams( + List deployFunctionParams) { + this.deployFunctionParams = deployFunctionParams; return this; } - public EVMTokenCreateParamsDto addConstructorParamsItem( - List constructorParamsItem) { - if (this.constructorParams == null) { - this.constructorParams = new ArrayList<>(); + public EVMTokenCreateParamsDto addDeployFunctionParamsItem( + ParameterWithValue deployFunctionParamsItem) { + if (this.deployFunctionParams == null) { + this.deployFunctionParams = new ArrayList<>(); } - this.constructorParams.add(constructorParamsItem); + this.deployFunctionParams.add(deployFunctionParamsItem); return this; } /** - * The constructor parameters and values of the contract template + * The deploy function parameters and values of the contract template * - * @return constructorParams + * @return deployFunctionParams */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CONSTRUCTOR_PARAMS) + @JsonProperty(JSON_PROPERTY_DEPLOY_FUNCTION_PARAMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List> getConstructorParams() { - return constructorParams; + public List getDeployFunctionParams() { + return deployFunctionParams; } - @JsonProperty(JSON_PROPERTY_CONSTRUCTOR_PARAMS) + @JsonProperty(JSON_PROPERTY_DEPLOY_FUNCTION_PARAMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConstructorParams(List> constructorParams) { - this.constructorParams = constructorParams; + public void setDeployFunctionParams(List deployFunctionParams) { + this.deployFunctionParams = deployFunctionParams; } /** Return true if this EVMTokenCreateParamsDto object is equal to o. */ @@ -106,12 +106,12 @@ public boolean equals(Object o) { EVMTokenCreateParamsDto evMTokenCreateParamsDto = (EVMTokenCreateParamsDto) o; return Objects.equals(this.contractId, evMTokenCreateParamsDto.contractId) && Objects.equals( - this.constructorParams, evMTokenCreateParamsDto.constructorParams); + this.deployFunctionParams, evMTokenCreateParamsDto.deployFunctionParams); } @Override public int hashCode() { - return Objects.hash(contractId, constructorParams); + return Objects.hash(contractId, deployFunctionParams); } @Override @@ -119,8 +119,8 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EVMTokenCreateParamsDto {\n"); sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n"); - sb.append(" constructorParams: ") - .append(toIndentedString(constructorParams)) + sb.append(" deployFunctionParams: ") + .append(toIndentedString(deployFunctionParams)) .append("\n"); sb.append("}"); return sb.toString(); @@ -181,23 +181,25 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } - // add `constructorParams` to the URL query string - if (getConstructorParams() != null) { - for (int i = 0; i < getConstructorParams().size(); i++) { - if (getConstructorParams().get(i) != null) { + // add `deployFunctionParams` to the URL query string + if (getDeployFunctionParams() != null) { + for (int i = 0; i < getDeployFunctionParams().size(); i++) { + if (getDeployFunctionParams().get(i) != null) { joiner.add( - String.format( - "%sconstructorParams%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getConstructorParams().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); + getDeployFunctionParams() + .get(i) + .toUrlQueryString( + String.format( + "%sdeployFunctionParams%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); } } } diff --git a/src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java b/src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java index ead8307..04bf0c2 100644 --- a/src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java +++ b/src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.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.ArrayList; @@ -24,7 +26,12 @@ import java.util.StringJoiner; /** LeanAbiFunction */ -@JsonPropertyOrder({LeanAbiFunction.JSON_PROPERTY_NAME, LeanAbiFunction.JSON_PROPERTY_INPUTS}) +@JsonPropertyOrder({ + LeanAbiFunction.JSON_PROPERTY_NAME, + LeanAbiFunction.JSON_PROPERTY_INPUTS, + LeanAbiFunction.JSON_PROPERTY_OUTPUTS, + LeanAbiFunction.JSON_PROPERTY_STATE_MUTABILITY +}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class LeanAbiFunction { public static final String JSON_PROPERTY_NAME = "name"; @@ -33,6 +40,49 @@ public class LeanAbiFunction { public static final String JSON_PROPERTY_INPUTS = "inputs"; private List inputs = new ArrayList<>(); + public static final String JSON_PROPERTY_OUTPUTS = "outputs"; + private List outputs; + + /** The state mutability of the function (e.g., view, pure, nonpayable, payable) */ + public enum StateMutabilityEnum { + VIEW("view"), + + PURE("pure"), + + NONPAYABLE("nonpayable"), + + PAYABLE("payable"); + + private String value; + + StateMutabilityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StateMutabilityEnum fromValue(String value) { + for (StateMutabilityEnum b : StateMutabilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATE_MUTABILITY = "stateMutability"; + private StateMutabilityEnum stateMutability; + public LeanAbiFunction() {} public LeanAbiFunction name(String name) { @@ -89,6 +139,60 @@ public void setInputs(List inputs) { this.inputs = inputs; } + public LeanAbiFunction outputs(List outputs) { + this.outputs = outputs; + return this; + } + + public LeanAbiFunction addOutputsItem(ParameterWithValue outputsItem) { + if (this.outputs == null) { + this.outputs = new ArrayList<>(); + } + this.outputs.add(outputsItem); + return this; + } + + /** + * The function outputs + * + * @return outputs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOutputs() { + return outputs; + } + + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputs(List outputs) { + this.outputs = outputs; + } + + public LeanAbiFunction stateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + return this; + } + + /** + * The state mutability of the function (e.g., view, pure, nonpayable, payable) + * + * @return stateMutability + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StateMutabilityEnum getStateMutability() { + return stateMutability; + } + + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + } + /** Return true if this LeanAbiFunction object is equal to o. */ @Override public boolean equals(Object o) { @@ -100,12 +204,14 @@ public boolean equals(Object o) { } LeanAbiFunction leanAbiFunction = (LeanAbiFunction) o; return Objects.equals(this.name, leanAbiFunction.name) - && Objects.equals(this.inputs, leanAbiFunction.inputs); + && Objects.equals(this.inputs, leanAbiFunction.inputs) + && Objects.equals(this.outputs, leanAbiFunction.outputs) + && Objects.equals(this.stateMutability, leanAbiFunction.stateMutability); } @Override public int hashCode() { - return Objects.hash(name, inputs); + return Objects.hash(name, inputs, outputs, stateMutability); } @Override @@ -114,6 +220,8 @@ public String toString() { sb.append("class LeanAbiFunction {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" outputs: ").append(toIndentedString(outputs)).append("\n"); + sb.append(" stateMutability: ").append(toIndentedString(stateMutability)).append("\n"); sb.append("}"); return sb.toString(); } @@ -195,6 +303,42 @@ public String toUrlQueryString(String prefix) { } } + // add `outputs` to the URL query string + if (getOutputs() != null) { + for (int i = 0; i < getOutputs().size(); i++) { + if (getOutputs().get(i) != null) { + joiner.add( + getOutputs() + .get(i) + .toUrlQueryString( + String.format( + "%soutputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `stateMutability` to the URL query string + if (getStateMutability() != null) { + joiner.add( + String.format( + "%sstateMutability%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStateMutability()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java b/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java new file mode 100644 index 0000000..5447291 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java @@ -0,0 +1,262 @@ +/* + * 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; + +/** RelatedRequestDto */ +@JsonPropertyOrder({ + RelatedRequestDto.JSON_PROPERTY_STATUS, + RelatedRequestDto.JSON_PROPERTY_IN_PROGRESS, + RelatedRequestDto.JSON_PROPERTY_AMOUNT, + RelatedRequestDto.JSON_PROPERTY_TX_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RelatedRequestDto { + public static final String JSON_PROPERTY_STATUS = "status"; + private RelatedRequestStatusType status; + + public static final String JSON_PROPERTY_IN_PROGRESS = "inProgress"; + private Boolean inProgress; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public RelatedRequestDto() {} + + public RelatedRequestDto status(RelatedRequestStatusType status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RelatedRequestStatusType getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(RelatedRequestStatusType status) { + this.status = status; + } + + public RelatedRequestDto inProgress(Boolean inProgress) { + this.inProgress = inProgress; + return this; + } + + /** + * Indicates whether there is an ongoing action for this position related to this request + * + * @return inProgress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getInProgress() { + return inProgress; + } + + @JsonProperty(JSON_PROPERTY_IN_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInProgress(Boolean inProgress) { + this.inProgress = inProgress; + } + + public RelatedRequestDto amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Amount of tokens to Unstake + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(String amount) { + this.amount = amount; + } + + public RelatedRequestDto txId(String txId) { + this.txId = txId; + return this; + } + + /** + * The transaction ID of the ongoing request + * + * @return txId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxId(String txId) { + this.txId = txId; + } + + /** Return true if this RelatedRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedRequestDto relatedRequestDto = (RelatedRequestDto) o; + return Objects.equals(this.status, relatedRequestDto.status) + && Objects.equals(this.inProgress, relatedRequestDto.inProgress) + && Objects.equals(this.amount, relatedRequestDto.amount) + && Objects.equals(this.txId, relatedRequestDto.txId); + } + + @Override + public int hashCode() { + return Objects.hash(status, inProgress, amount, txId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedRequestDto {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" inProgress: ").append(toIndentedString(inProgress)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" txId: ").append(toIndentedString(txId)).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 `inProgress` to the URL query string + if (getInProgress() != null) { + joiner.add( + String.format( + "%sinProgress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getInProgress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java b/src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java new file mode 100644 index 0000000..e3a810e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java @@ -0,0 +1,124 @@ +/* + * 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 status of the request */ +public enum RelatedRequestStatusType { + ERROR("error"), + + CREATED("created"), + + CANCELED("canceled"), + + ACTIVATE_REQUESTED("activate_requested"), + + APPROVE_INPROGRESS("approve_inprogress"), + + APPROVE_INPROGRESS_SIGNED("approve_inprogress_signed"), + + ACTIVATE_INPROGRESS("activate_inprogress"), + + ACTIVATE_INPROGRESS_SIGNED("activate_inprogress_signed"), + + ACTIVATE_INPROGRESS_CONFIRMED("activate_inprogress_confirmed"), + + ACTIVATE_DONE("activate_done"), + + DEACTIVATE_REQUESTED("deactivate_requested"), + + DEACTIVATE_INPROGRESS("deactivate_inprogress"), + + DEACTIVATE_INPROGRESS_SIGNED("deactivate_inprogress_signed"), + + DEACTIVATE_INPROGRESS_CONFIRMED("deactivate_inprogress_confirmed"), + + DEACTIVATE_DONE("deactivate_done"), + + WITHDRAW_INPROGRESS("withdraw_inprogress"), + + WITHDRAW_REQUESTED("withdraw_requested"), + + WITHDRAW_INPROGRESS_CONFIRMED("withdraw_inprogress_confirmed"), + + WITHDRAW_DONE("withdraw_done"), + + CLAIM_REWARDS_REQUESTED("claim_rewards_requested"), + + CLAIM_REWARDS_INPROGRESS("claim_rewards_inprogress"), + + CLAIM_REWARDS_DONE("claim_rewards_done"), + + PENDING("pending"), + + PENDING_QUEUED("pending_queued"), + + ACTIVE_OFFLINE("active_offline"), + + ACTIVE_ONLINE("active_online"), + + EXITING_ONLINE("exiting_online"), + + EXITED("exited"), + + ACTIVE("active"), + + INACTIVE("inactive"), + + ACTIVATING("activating"), + + DEACTIVATING("deactivating"); + + private String value; + + RelatedRequestStatusType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RelatedRequestStatusType fromValue(String value) { + for (RelatedRequestStatusType b : RelatedRequestStatusType.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/SmartTransferApproveTerm.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferApproveTerm.java new file mode 100644 index 0000000..a42c664 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferApproveTerm.java @@ -0,0 +1,378 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** SmartTransferApproveTerm */ +@JsonPropertyOrder({ + SmartTransferApproveTerm.JSON_PROPERTY_ASSET, + SmartTransferApproveTerm.JSON_PROPERTY_AMOUNT, + SmartTransferApproveTerm.JSON_PROPERTY_SRC_ID, + SmartTransferApproveTerm.JSON_PROPERTY_FEE, + SmartTransferApproveTerm.JSON_PROPERTY_FEE_LEVEL, + SmartTransferApproveTerm.JSON_PROPERTY_NOTE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SmartTransferApproveTerm { + public static final String JSON_PROPERTY_ASSET = "asset"; + private String asset; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_SRC_ID = "srcId"; + private String srcId; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** Transaction fee level. */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + + public static final String JSON_PROPERTY_NOTE = "note"; + private String note; + + public SmartTransferApproveTerm() {} + + public SmartTransferApproveTerm asset(String asset) { + this.asset = asset; + return this; + } + + /** + * Asset name + * + * @return asset + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAsset(String asset) { + this.asset = asset; + } + + public SmartTransferApproveTerm amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Amount + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(String amount) { + this.amount = amount; + } + + public SmartTransferApproveTerm srcId(String srcId) { + this.srcId = srcId; + return this; + } + + /** + * Id of the vault that is used as the source of the asset. + * + * @return srcId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SRC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSrcId() { + return srcId; + } + + @JsonProperty(JSON_PROPERTY_SRC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSrcId(String srcId) { + this.srcId = srcId; + } + + public SmartTransferApproveTerm fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Transaction fee + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public SmartTransferApproveTerm feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Transaction fee level. + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + + public SmartTransferApproveTerm note(String note) { + this.note = note; + return this; + } + + /** + * Transaction note + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(String note) { + this.note = note; + } + + /** Return true if this SmartTransferApproveTerm object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmartTransferApproveTerm smartTransferApproveTerm = (SmartTransferApproveTerm) o; + return Objects.equals(this.asset, smartTransferApproveTerm.asset) + && Objects.equals(this.amount, smartTransferApproveTerm.amount) + && Objects.equals(this.srcId, smartTransferApproveTerm.srcId) + && Objects.equals(this.fee, smartTransferApproveTerm.fee) + && Objects.equals(this.feeLevel, smartTransferApproveTerm.feeLevel) + && Objects.equals(this.note, smartTransferApproveTerm.note); + } + + @Override + public int hashCode() { + return Objects.hash(asset, amount, srcId, fee, feeLevel, note); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SmartTransferApproveTerm {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" srcId: ").append(toIndentedString(srcId)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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 `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAsset()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `srcId` to the URL query string + if (getSrcId() != null) { + joiner.add( + String.format( + "%ssrcId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSrcId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `note` to the URL query string + if (getNote() != null) { + joiner.add( + String.format( + "%snote%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNote()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferCoinStatistic.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferCoinStatistic.java new file mode 100644 index 0000000..f68e078 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferCoinStatistic.java @@ -0,0 +1,181 @@ +/* + * 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; + +/** Smart transfer coin statistic */ +@JsonPropertyOrder({ + SmartTransferCoinStatistic.JSON_PROPERTY_ASSET, + SmartTransferCoinStatistic.JSON_PROPERTY_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SmartTransferCoinStatistic { + public static final String JSON_PROPERTY_ASSET = "asset"; + private String asset; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public SmartTransferCoinStatistic() {} + + public SmartTransferCoinStatistic asset(String asset) { + this.asset = asset; + return this; + } + + /** + * Get asset + * + * @return asset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAsset() { + return asset; + } + + @JsonProperty(JSON_PROPERTY_ASSET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAsset(String asset) { + this.asset = asset; + } + + public SmartTransferCoinStatistic amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Get amount + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + /** Return true if this SmartTransferCoinStatistic object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmartTransferCoinStatistic smartTransferCoinStatistic = (SmartTransferCoinStatistic) o; + return Objects.equals(this.asset, smartTransferCoinStatistic.asset) + && Objects.equals(this.amount, smartTransferCoinStatistic.amount); + } + + @Override + public int hashCode() { + return Objects.hash(asset, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SmartTransferCoinStatistic {\n"); + sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).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 `asset` to the URL query string + if (getAsset() != null) { + joiner.add( + String.format( + "%sasset%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAsset()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferCreateTicket.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferCreateTicket.java index 55507cc..6a70958 100644 --- a/src/main/java/com/fireblocks/sdk/model/SmartTransferCreateTicket.java +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferCreateTicket.java @@ -43,7 +43,9 @@ public class SmartTransferCreateTicket { /** Gets or Sets type */ public enum TypeEnum { - ASYNC("ASYNC"); + ASYNC("ASYNC"), + + DVP("DVP"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferStatistic.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferStatistic.java new file mode 100644 index 0000000..72a77df --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferStatistic.java @@ -0,0 +1,259 @@ +/* + * 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; + +/** Smart transfers statistic */ +@JsonPropertyOrder({ + SmartTransferStatistic.JSON_PROPERTY_INFLOW, + SmartTransferStatistic.JSON_PROPERTY_OUTFLOW, + SmartTransferStatistic.JSON_PROPERTY_TOTAL_ACTIVE_TICKETS, + SmartTransferStatistic.JSON_PROPERTY_TOTAL_INACTIVE_TICKETS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SmartTransferStatistic { + public static final String JSON_PROPERTY_INFLOW = "inflow"; + private SmartTransferStatisticInflow inflow; + + public static final String JSON_PROPERTY_OUTFLOW = "outflow"; + private SmartTransferStatisticOutflow outflow; + + public static final String JSON_PROPERTY_TOTAL_ACTIVE_TICKETS = "totalActiveTickets"; + private Integer totalActiveTickets; + + public static final String JSON_PROPERTY_TOTAL_INACTIVE_TICKETS = "totalInactiveTickets"; + private Integer totalInactiveTickets; + + public SmartTransferStatistic() {} + + public SmartTransferStatistic inflow(SmartTransferStatisticInflow inflow) { + this.inflow = inflow; + return this; + } + + /** + * Get inflow + * + * @return inflow + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INFLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SmartTransferStatisticInflow getInflow() { + return inflow; + } + + @JsonProperty(JSON_PROPERTY_INFLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInflow(SmartTransferStatisticInflow inflow) { + this.inflow = inflow; + } + + public SmartTransferStatistic outflow(SmartTransferStatisticOutflow outflow) { + this.outflow = outflow; + return this; + } + + /** + * Get outflow + * + * @return outflow + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OUTFLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SmartTransferStatisticOutflow getOutflow() { + return outflow; + } + + @JsonProperty(JSON_PROPERTY_OUTFLOW) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOutflow(SmartTransferStatisticOutflow outflow) { + this.outflow = outflow; + } + + public SmartTransferStatistic totalActiveTickets(Integer totalActiveTickets) { + this.totalActiveTickets = totalActiveTickets; + return this; + } + + /** + * Number of total active tickets + * + * @return totalActiveTickets + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_ACTIVE_TICKETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalActiveTickets() { + return totalActiveTickets; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_ACTIVE_TICKETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalActiveTickets(Integer totalActiveTickets) { + this.totalActiveTickets = totalActiveTickets; + } + + public SmartTransferStatistic totalInactiveTickets(Integer totalInactiveTickets) { + this.totalInactiveTickets = totalInactiveTickets; + return this; + } + + /** + * Number of total inactive tickets (expired, canceled, completed) + * + * @return totalInactiveTickets + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_INACTIVE_TICKETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotalInactiveTickets() { + return totalInactiveTickets; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_INACTIVE_TICKETS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalInactiveTickets(Integer totalInactiveTickets) { + this.totalInactiveTickets = totalInactiveTickets; + } + + /** Return true if this SmartTransferStatistic object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmartTransferStatistic smartTransferStatistic = (SmartTransferStatistic) o; + return Objects.equals(this.inflow, smartTransferStatistic.inflow) + && Objects.equals(this.outflow, smartTransferStatistic.outflow) + && Objects.equals( + this.totalActiveTickets, smartTransferStatistic.totalActiveTickets) + && Objects.equals( + this.totalInactiveTickets, smartTransferStatistic.totalInactiveTickets); + } + + @Override + public int hashCode() { + return Objects.hash(inflow, outflow, totalActiveTickets, totalInactiveTickets); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SmartTransferStatistic {\n"); + sb.append(" inflow: ").append(toIndentedString(inflow)).append("\n"); + sb.append(" outflow: ").append(toIndentedString(outflow)).append("\n"); + sb.append(" totalActiveTickets: ") + .append(toIndentedString(totalActiveTickets)) + .append("\n"); + sb.append(" totalInactiveTickets: ") + .append(toIndentedString(totalInactiveTickets)) + .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 `inflow` to the URL query string + if (getInflow() != null) { + joiner.add(getInflow().toUrlQueryString(prefix + "inflow" + suffix)); + } + + // add `outflow` to the URL query string + if (getOutflow() != null) { + joiner.add(getOutflow().toUrlQueryString(prefix + "outflow" + suffix)); + } + + // add `totalActiveTickets` to the URL query string + if (getTotalActiveTickets() != null) { + joiner.add( + String.format( + "%stotalActiveTickets%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTotalActiveTickets()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `totalInactiveTickets` to the URL query string + if (getTotalInactiveTickets() != null) { + joiner.add( + String.format( + "%stotalInactiveTickets%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTotalInactiveTickets()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticInflow.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticInflow.java new file mode 100644 index 0000000..00b5907 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticInflow.java @@ -0,0 +1,206 @@ +/* + * 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; + +/** Inflow tickets data */ +@JsonPropertyOrder({ + SmartTransferStatisticInflow.JSON_PROPERTY_COINS, + SmartTransferStatisticInflow.JSON_PROPERTY_TICKET_COUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SmartTransferStatisticInflow { + public static final String JSON_PROPERTY_COINS = "coins"; + private List coins; + + public static final String JSON_PROPERTY_TICKET_COUNT = "ticketCount"; + private Integer ticketCount; + + public SmartTransferStatisticInflow() {} + + public SmartTransferStatisticInflow coins(List coins) { + this.coins = coins; + return this; + } + + public SmartTransferStatisticInflow addCoinsItem(SmartTransferCoinStatistic coinsItem) { + if (this.coins == null) { + this.coins = new ArrayList<>(); + } + this.coins.add(coinsItem); + return this; + } + + /** + * Get coins + * + * @return coins + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COINS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCoins() { + return coins; + } + + @JsonProperty(JSON_PROPERTY_COINS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoins(List coins) { + this.coins = coins; + } + + public SmartTransferStatisticInflow ticketCount(Integer ticketCount) { + this.ticketCount = ticketCount; + return this; + } + + /** + * Get ticketCount + * + * @return ticketCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TICKET_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTicketCount() { + return ticketCount; + } + + @JsonProperty(JSON_PROPERTY_TICKET_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTicketCount(Integer ticketCount) { + this.ticketCount = ticketCount; + } + + /** Return true if this SmartTransferStatistic_inflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmartTransferStatisticInflow smartTransferStatisticInflow = + (SmartTransferStatisticInflow) o; + return Objects.equals(this.coins, smartTransferStatisticInflow.coins) + && Objects.equals(this.ticketCount, smartTransferStatisticInflow.ticketCount); + } + + @Override + public int hashCode() { + return Objects.hash(coins, ticketCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SmartTransferStatisticInflow {\n"); + sb.append(" coins: ").append(toIndentedString(coins)).append("\n"); + sb.append(" ticketCount: ").append(toIndentedString(ticketCount)).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 `coins` to the URL query string + if (getCoins() != null) { + for (int i = 0; i < getCoins().size(); i++) { + if (getCoins().get(i) != null) { + joiner.add( + getCoins() + .get(i) + .toUrlQueryString( + String.format( + "%scoins%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `ticketCount` to the URL query string + if (getTicketCount() != null) { + joiner.add( + String.format( + "%sticketCount%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTicketCount()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflow.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflow.java new file mode 100644 index 0000000..5e1258c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflow.java @@ -0,0 +1,206 @@ +/* + * 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; + +/** Outflow tickets data */ +@JsonPropertyOrder({ + SmartTransferStatisticOutflow.JSON_PROPERTY_COINS, + SmartTransferStatisticOutflow.JSON_PROPERTY_TICKET_COUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SmartTransferStatisticOutflow { + public static final String JSON_PROPERTY_COINS = "coins"; + private List coins; + + public static final String JSON_PROPERTY_TICKET_COUNT = "ticketCount"; + private Integer ticketCount; + + public SmartTransferStatisticOutflow() {} + + public SmartTransferStatisticOutflow coins(List coins) { + this.coins = coins; + return this; + } + + public SmartTransferStatisticOutflow addCoinsItem(SmartTransferCoinStatistic coinsItem) { + if (this.coins == null) { + this.coins = new ArrayList<>(); + } + this.coins.add(coinsItem); + return this; + } + + /** + * Get coins + * + * @return coins + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COINS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCoins() { + return coins; + } + + @JsonProperty(JSON_PROPERTY_COINS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCoins(List coins) { + this.coins = coins; + } + + public SmartTransferStatisticOutflow ticketCount(Integer ticketCount) { + this.ticketCount = ticketCount; + return this; + } + + /** + * Get ticketCount + * + * @return ticketCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TICKET_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTicketCount() { + return ticketCount; + } + + @JsonProperty(JSON_PROPERTY_TICKET_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTicketCount(Integer ticketCount) { + this.ticketCount = ticketCount; + } + + /** Return true if this SmartTransferStatistic_outflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmartTransferStatisticOutflow smartTransferStatisticOutflow = + (SmartTransferStatisticOutflow) o; + return Objects.equals(this.coins, smartTransferStatisticOutflow.coins) + && Objects.equals(this.ticketCount, smartTransferStatisticOutflow.ticketCount); + } + + @Override + public int hashCode() { + return Objects.hash(coins, ticketCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SmartTransferStatisticOutflow {\n"); + sb.append(" coins: ").append(toIndentedString(coins)).append("\n"); + sb.append(" ticketCount: ").append(toIndentedString(ticketCount)).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 `coins` to the URL query string + if (getCoins() != null) { + for (int i = 0; i < getCoins().size(); i++) { + if (getCoins().get(i) != null) { + joiner.add( + getCoins() + .get(i) + .toUrlQueryString( + String.format( + "%scoins%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `ticketCount` to the URL query string + if (getTicketCount() != null) { + joiner.add( + String.format( + "%sticketCount%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTicketCount()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java index dbba212..7e36774 100644 --- a/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java @@ -55,9 +55,11 @@ public class SmartTransferTicket { public static final String JSON_PROPERTY_ID = "id"; private String id; - /** Kind of Smart Transfer. Can be either `ASYNC` or `ATOMIC` */ + /** Kind of Smart Transfer. Can be either `ASYNC` or `DVP` */ public enum TypeEnum { - ASYNC("ASYNC"); + ASYNC("ASYNC"), + + DVP("DVP"); private String value; @@ -255,7 +257,7 @@ public SmartTransferTicket type(TypeEnum type) { } /** - * Kind of Smart Transfer. Can be either `ASYNC` or `ATOMIC` + * Kind of Smart Transfer. Can be either `ASYNC` or `DVP` * * @return type */ diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java index dbd6b66..85dc402 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java @@ -835,7 +835,7 @@ public TransactionRequest useGasless(Boolean useGasless) { } /** - * - Override the default gaslsess configuration by sending true\\false + * - Override the default gasless configuration by sending true\\false * * @return useGasless */ diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleVaspForVault.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleVaspForVault.java new file mode 100644 index 0000000..fb512e5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleVaspForVault.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; + +/** TravelRuleVaspForVault */ +@JsonPropertyOrder({TravelRuleVaspForVault.JSON_PROPERTY_VASP_DID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TravelRuleVaspForVault { + public static final String JSON_PROPERTY_VASP_DID = "vaspDid"; + private String vaspDid; + + public TravelRuleVaspForVault() {} + + public TravelRuleVaspForVault vaspDid(String vaspDid) { + this.vaspDid = vaspDid; + return this; + } + + /** + * VASP DID + * + * @return vaspDid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VASP_DID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVaspDid() { + return vaspDid; + } + + @JsonProperty(JSON_PROPERTY_VASP_DID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaspDid(String vaspDid) { + this.vaspDid = vaspDid; + } + + /** Return true if this TravelRuleVaspForVault object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TravelRuleVaspForVault travelRuleVaspForVault = (TravelRuleVaspForVault) o; + return Objects.equals(this.vaspDid, travelRuleVaspForVault.vaspDid); + } + + @Override + public int hashCode() { + return Objects.hash(vaspDid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TravelRuleVaspForVault {\n"); + sb.append(" vaspDid: ").append(toIndentedString(vaspDid)).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 `vaspDid` to the URL query string + if (getVaspDid() != null) { + joiner.add( + String.format( + "%svaspDid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getVaspDid()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java index 74ecba1..c4261f5 100644 --- a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java @@ -41,10 +41,10 @@ public class ContractInteractionsApiTest { @Test public void getDeployedContractAbiTest() throws ApiException { String contractAddress = null; - String assetId = null; + String baseAssetId = null; String idempotencyKey = null; CompletableFuture> response = - api.getDeployedContractAbi(contractAddress, assetId, idempotencyKey); + api.getDeployedContractAbi(contractAddress, baseAssetId, idempotencyKey); } /** @@ -59,10 +59,11 @@ public void getDeployedContractAbiTest() throws ApiException { public void readCallFunctionTest() throws ApiException { ReadCallFunctionDto readCallFunctionDto = null; String contractAddress = null; - String assetId = null; + String baseAssetId = null; String idempotencyKey = null; CompletableFuture>> response = - api.readCallFunction(readCallFunctionDto, contractAddress, assetId, idempotencyKey); + api.readCallFunction( + readCallFunctionDto, contractAddress, baseAssetId, idempotencyKey); } /** @@ -78,10 +79,10 @@ public void readCallFunctionTest() throws ApiException { public void writeCallFunctionTest() throws ApiException { WriteCallFunctionDto writeCallFunctionDto = null; String contractAddress = null; - String assetId = null; + String baseAssetId = null; String idempotencyKey = null; CompletableFuture> response = api.writeCallFunction( - writeCallFunctionDto, contractAddress, assetId, idempotencyKey); + writeCallFunctionDto, contractAddress, baseAssetId, idempotencyKey); } } diff --git a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java index eb3ffa2..b40076e 100644 --- a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java @@ -103,10 +103,10 @@ public void getDeployedContractsTest() throws ApiException { String pageCursor = null; BigDecimal pageSize = null; String contractAddress = null; - String assetId = null; + String baseAssetId = null; String templateId = null; CompletableFuture> response = api.getDeployedContracts( - pageCursor, pageSize, contractAddress, assetId, templateId); + pageCursor, pageSize, contractAddress, baseAssetId, templateId); } } diff --git a/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java b/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java index 49b70a1..3cff3bc 100644 --- a/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java @@ -15,6 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.SmartTransferApproveTerm; import com.fireblocks.sdk.model.SmartTransferCreateTicket; import com.fireblocks.sdk.model.SmartTransferCreateTicketTerm; import com.fireblocks.sdk.model.SmartTransferFundTerm; @@ -22,6 +23,7 @@ import com.fireblocks.sdk.model.SmartTransferSetTicketExpiration; import com.fireblocks.sdk.model.SmartTransferSetTicketExternalId; import com.fireblocks.sdk.model.SmartTransferSetUserGroups; +import com.fireblocks.sdk.model.SmartTransferStatistic; import com.fireblocks.sdk.model.SmartTransferSubmitTicket; import com.fireblocks.sdk.model.SmartTransferTicketFilteredResponse; import com.fireblocks.sdk.model.SmartTransferTicketResponse; @@ -41,6 +43,25 @@ public class SmartTransferApiTest { private final SmartTransferApi api = new SmartTransferApi(); + /** + * Define funding source and give approve to contract to transfer asset + * + *

Set funding source for ticket term and creating approving transaction for contract to + * transfer asset + * + * @throws ApiException if the Api call fails + */ + @Test + public void approveDvPTicketTermTest() throws ApiException { + SmartTransferApproveTerm smartTransferApproveTerm = null; + String ticketId = null; + String termId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.approveDvPTicketTerm( + smartTransferApproveTerm, ticketId, termId, idempotencyKey); + } + /** * Cancel Ticket * @@ -131,6 +152,21 @@ public void fulfillTicketTest() throws ApiException { api.fulfillTicket(ticketId, idempotencyKey); } + /** + * Fund dvp ticket + * + *

Create or fulfill dvp ticket order + * + * @throws ApiException if the Api call fails + */ + @Test + public void fundDvpTicketTest() throws ApiException { + String ticketId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.fundDvpTicket(ticketId, idempotencyKey); + } + /** * Define funding source * @@ -149,6 +185,19 @@ public void fundTicketTermTest() throws ApiException { api.fundTicketTerm(smartTransferFundTerm, ticketId, termId, idempotencyKey); } + /** + * Get smart transfers statistic + * + *

Get smart transfer statistic + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSmartTransferStatisticTest() throws ApiException { + CompletableFuture> response = + api.getSmartTransferStatistic(); + } + /** * Get user group * diff --git a/src/test/java/com/fireblocks/sdk/api/TravelRuleBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/TravelRuleBetaApiTest.java index 69bfbcc..ec791eb 100644 --- a/src/test/java/com/fireblocks/sdk/api/TravelRuleBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TravelRuleBetaApiTest.java @@ -21,6 +21,7 @@ import com.fireblocks.sdk.model.TravelRuleValidateFullTransactionRequest; import com.fireblocks.sdk.model.TravelRuleValidateTransactionRequest; import com.fireblocks.sdk.model.TravelRuleValidateTransactionResponse; +import com.fireblocks.sdk.model.TravelRuleVaspForVault; import java.math.BigDecimal; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -71,6 +72,37 @@ public void getVASPsTest() throws ApiException { api.getVASPs(order, perPage, page, fields); } + /** + * Get assigned VASP to vault + * + *

Get assigned VASP Did for a specific vault. Returns empty string vaspDid value in response + * if none assigned. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getVaspForVaultTest() throws ApiException { + String vaultAccountId = null; + CompletableFuture> response = + api.getVaspForVault(vaultAccountId); + } + + /** + * Assign VASP to vault + * + *

Sets the VASP Did for a specific vault. Pass empty string to remove existing one. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setVaspForVaultTest() throws ApiException { + TravelRuleVaspForVault travelRuleVaspForVault = null; + String vaultAccountId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.setVaspForVault(travelRuleVaspForVault, vaultAccountId, idempotencyKey); + } + /** * Add jsonDidKey to VASP details * diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java index f49f34c..97bd994 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java @@ -31,10 +31,10 @@ public void contractIdTest() { // TODO: test contractId } - /** Test the property 'constructorParams' */ + /** Test the property 'deployFunctionParams' */ @Test - public void constructorParamsTest() { - // TODO: test constructorParams + public void deployFunctionParamsTest() { + // TODO: test deployFunctionParams } /** Test the property 'symbol' */ diff --git a/src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java b/src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java index ed5099b..3c2b765 100644 --- a/src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java @@ -73,6 +73,12 @@ public void dateCreatedTest() { // TODO: test dateCreated } + /** Test the property 'dateUpdated' */ + @Test + public void dateUpdatedTest() { + // TODO: test dateUpdated + } + /** Test the property 'status' */ @Test public void statusTest() { @@ -120,4 +126,10 @@ public void inProgressTxIdTest() { public void blockchainPositionInfoTest() { // TODO: test blockchainPositionInfo } + + /** Test the property 'relatedRequests' */ + @Test + public void relatedRequestsTest() { + // TODO: test relatedRequests + } } diff --git a/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java b/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java index c16627c..851b054 100644 --- a/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java @@ -31,9 +31,9 @@ public void contractIdTest() { // TODO: test contractId } - /** Test the property 'constructorParams' */ + /** Test the property 'deployFunctionParams' */ @Test - public void constructorParamsTest() { - // TODO: test constructorParams + public void deployFunctionParamsTest() { + // TODO: test deployFunctionParams } } diff --git a/src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java index 7929052..6258239 100644 --- a/src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java +++ b/src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java @@ -36,4 +36,16 @@ public void nameTest() { public void inputsTest() { // TODO: test inputs } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } } diff --git a/src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java new file mode 100644 index 0000000..831ca19 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.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 RelatedRequestDto */ +public class RelatedRequestDtoTest { + private final RelatedRequestDto model = new RelatedRequestDto(); + + /** Model tests for RelatedRequestDto */ + @Test + public void testRelatedRequestDto() { + // TODO: test RelatedRequestDto + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'inProgress' */ + @Test + public void inProgressTest() { + // TODO: test inProgress + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java b/src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java new file mode 100644 index 0000000..9347c8a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.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 RelatedRequestStatusType */ +public class RelatedRequestStatusTypeTest { + /** Model tests for RelatedRequestStatusType */ + @Test + public void testRelatedRequestStatusType() { + // TODO: test RelatedRequestStatusType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferApproveTermTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferApproveTermTest.java new file mode 100644 index 0000000..d3bd0b3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferApproveTermTest.java @@ -0,0 +1,63 @@ +/* + * 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 SmartTransferApproveTerm */ +public class SmartTransferApproveTermTest { + private final SmartTransferApproveTerm model = new SmartTransferApproveTerm(); + + /** Model tests for SmartTransferApproveTerm */ + @Test + public void testSmartTransferApproveTerm() { + // TODO: test SmartTransferApproveTerm + } + + /** Test the property 'asset' */ + @Test + public void assetTest() { + // TODO: test asset + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'srcId' */ + @Test + public void srcIdTest() { + // TODO: test srcId + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } + + /** Test the property 'note' */ + @Test + public void noteTest() { + // TODO: test note + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferCoinStatisticTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferCoinStatisticTest.java new file mode 100644 index 0000000..8acd479 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferCoinStatisticTest.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 SmartTransferCoinStatistic */ +public class SmartTransferCoinStatisticTest { + private final SmartTransferCoinStatistic model = new SmartTransferCoinStatistic(); + + /** Model tests for SmartTransferCoinStatistic */ + @Test + public void testSmartTransferCoinStatistic() { + // TODO: test SmartTransferCoinStatistic + } + + /** Test the property 'asset' */ + @Test + public void assetTest() { + // TODO: test asset + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticInflowTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticInflowTest.java new file mode 100644 index 0000000..8a9d3e9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticInflowTest.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 SmartTransferStatisticInflow */ +public class SmartTransferStatisticInflowTest { + private final SmartTransferStatisticInflow model = new SmartTransferStatisticInflow(); + + /** Model tests for SmartTransferStatisticInflow */ + @Test + public void testSmartTransferStatisticInflow() { + // TODO: test SmartTransferStatisticInflow + } + + /** Test the property 'coins' */ + @Test + public void coinsTest() { + // TODO: test coins + } + + /** Test the property 'ticketCount' */ + @Test + public void ticketCountTest() { + // TODO: test ticketCount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflowTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflowTest.java new file mode 100644 index 0000000..b64601a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticOutflowTest.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 SmartTransferStatisticOutflow */ +public class SmartTransferStatisticOutflowTest { + private final SmartTransferStatisticOutflow model = new SmartTransferStatisticOutflow(); + + /** Model tests for SmartTransferStatisticOutflow */ + @Test + public void testSmartTransferStatisticOutflow() { + // TODO: test SmartTransferStatisticOutflow + } + + /** Test the property 'coins' */ + @Test + public void coinsTest() { + // TODO: test coins + } + + /** Test the property 'ticketCount' */ + @Test + public void ticketCountTest() { + // TODO: test ticketCount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticTest.java new file mode 100644 index 0000000..7857894 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferStatisticTest.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 SmartTransferStatistic */ +public class SmartTransferStatisticTest { + private final SmartTransferStatistic model = new SmartTransferStatistic(); + + /** Model tests for SmartTransferStatistic */ + @Test + public void testSmartTransferStatistic() { + // TODO: test SmartTransferStatistic + } + + /** Test the property 'inflow' */ + @Test + public void inflowTest() { + // TODO: test inflow + } + + /** Test the property 'outflow' */ + @Test + public void outflowTest() { + // TODO: test outflow + } + + /** Test the property 'totalActiveTickets' */ + @Test + public void totalActiveTicketsTest() { + // TODO: test totalActiveTickets + } + + /** Test the property 'totalInactiveTickets' */ + @Test + public void totalInactiveTicketsTest() { + // TODO: test totalInactiveTickets + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TravelRuleVaspForVaultTest.java b/src/test/java/com/fireblocks/sdk/model/TravelRuleVaspForVaultTest.java new file mode 100644 index 0000000..4cbf019 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TravelRuleVaspForVaultTest.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 TravelRuleVaspForVault */ +public class TravelRuleVaspForVaultTest { + private final TravelRuleVaspForVault model = new TravelRuleVaspForVault(); + + /** Model tests for TravelRuleVaspForVault */ + @Test + public void testTravelRuleVaspForVault() { + // TODO: test TravelRuleVaspForVault + } + + /** Test the property 'vaspDid' */ + @Test + public void vaspDidTest() { + // TODO: test vaspDid + } +}