From a3f9fb8067ac08c6bd8d6136246354e53ea5f0bc Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Thu, 5 Dec 2024 13:47:57 +0000 Subject: [PATCH] Generated SDK #1430 --- .openapi-generator/FILES | 15 +- README.md | 12 +- api/openapi.yaml | 484 +++++++++++++----- build.gradle | 2 +- docs/AbiFunction.md | 2 +- docs/ComplianceApi.md | 10 +- docs/ContractDeployRequest.md | 13 + docs/ContractDoc.md | 2 +- docs/ContractTemplateDto.md | 2 +- docs/ContractUploadRequest.md | 2 +- docs/CreateTokenRequestDto.md | 13 + docs/DeployedContractsApi.md | 8 +- docs/NetworkConnectionsApi.md | 92 ++++ docs/RelatedRequestDto.md | 10 +- docs/RelatedRequestStatusType.md | 73 --- ...st.md => ScreeningUpdateConfigurations.md} | 2 +- docs/SearchNetworkIdsResponse.md | 14 + docs/SmartTransferApi.md | 8 +- docs/SmartTransferFundDvpTicket.md | 25 + docs/SmartTransferTicket.md | 16 + docs/SmartTransferTicketTerm.md | 1 + docs/UnstakeRequestDto.md | 1 + docs/WriteCallFunctionDto.md | 2 + pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../com/fireblocks/sdk/api/ComplianceApi.java | 37 +- .../sdk/api/DeployedContractsApi.java | 13 +- .../sdk/api/NetworkConnectionsApi.java | 123 +++++ .../fireblocks/sdk/api/SmartTransferApi.java | 27 +- .../com/fireblocks/sdk/model/AbiFunction.java | 8 +- .../sdk/model/ContractDeployRequest.java | 170 +++++- .../com/fireblocks/sdk/model/ContractDoc.java | 9 +- .../sdk/model/ContractTemplateDto.java | 37 +- .../sdk/model/ContractUploadRequest.java | 37 +- .../sdk/model/CreateTokenRequestDto.java | 177 ++++++- .../sdk/model/RelatedRequestDto.java | 43 +- .../sdk/model/RelatedRequestStatusType.java | 124 ----- ...ava => ScreeningUpdateConfigurations.java} | 27 +- .../sdk/model/SearchNetworkIdsResponse.java | 203 ++++++++ .../sdk/model/SmartTransferFundDvpTicket.java | 258 ++++++++++ .../sdk/model/SmartTransferTicket.java | 135 +++++ .../sdk/model/SmartTransferTicketTerm.java | 43 ++ .../sdk/model/UnstakeRequestDto.java | 48 +- .../sdk/model/WriteCallFunctionDto.java | 92 +++- .../fireblocks/sdk/api/ComplianceApiTest.java | 7 +- .../sdk/api/DeployedContractsApiTest.java | 4 +- .../sdk/api/NetworkConnectionsApiTest.java | 31 ++ .../sdk/api/SmartTransferApiTest.java | 4 +- .../sdk/model/ContractDeployRequestTest.java | 18 + .../sdk/model/CreateTokenRequestDtoTest.java | 18 + .../sdk/model/ExecuteActionRequestTest.java | 6 + .../model/RelatedRequestStatusTypeTest.java | 25 - ...=> ScreeningUpdateConfigurationsTest.java} | 13 +- .../model/SearchNetworkIdsResponseTest.java | 39 ++ .../model/SmartTransferFundDvpTicketTest.java | 45 ++ .../model/SmartTransferTicketTermTest.java | 6 + .../sdk/model/SmartTransferTicketTest.java | 12 + .../sdk/model/UnstakeRequestDtoTest.java | 6 + .../sdk/model/WriteCallFunctionDtoTest.java | 12 + 59 files changed, 2184 insertions(+), 486 deletions(-) delete mode 100644 docs/RelatedRequestStatusType.md rename docs/{ScreeningUpdateConfigurationsRequest.md => ScreeningUpdateConfigurations.md} (90%) create mode 100644 docs/SearchNetworkIdsResponse.md create mode 100644 docs/SmartTransferFundDvpTicket.md delete mode 100644 src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java rename src/main/java/com/fireblocks/sdk/model/{ScreeningUpdateConfigurationsRequest.java => ScreeningUpdateConfigurations.java} (85%) create mode 100644 src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicket.java delete mode 100644 src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java rename src/test/java/com/fireblocks/sdk/model/{ScreeningUpdateConfigurationsRequestTest.java => ScreeningUpdateConfigurationsTest.java} (63%) create mode 100644 src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicketTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 9514a20..f13f77f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -318,7 +318,6 @@ docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md docs/RelatedRequestDto.md -docs/RelatedRequestStatusType.md docs/RelatedTransactionDto.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md @@ -338,10 +337,11 @@ docs/ScreeningOperationFailure.md docs/ScreeningOperationType.md docs/ScreeningPolicyResponse.md docs/ScreeningProviderRulesConfigurationResponse.md -docs/ScreeningUpdateConfigurationsRequest.md +docs/ScreeningUpdateConfigurations.md docs/ScreeningValidationFailure.md docs/ScreeningVerdict.md docs/ScreeningVerdictMatchedRule.md +docs/SearchNetworkIdsResponse.md docs/SessionDTO.md docs/SessionMetadata.md docs/SetAdminQuorumThresholdRequest.md @@ -373,6 +373,7 @@ docs/SmartTransferCoinStatistic.md docs/SmartTransferCreateTicket.md docs/SmartTransferCreateTicketTerm.md docs/SmartTransferForbiddenResponse.md +docs/SmartTransferFundDvpTicket.md docs/SmartTransferFundTerm.md docs/SmartTransferManuallyFundTerm.md docs/SmartTransferNotFoundResponse.md @@ -858,7 +859,6 @@ 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 @@ -877,10 +877,11 @@ src/main/java/com/fireblocks/sdk/model/ScreeningOperationFailure.java src/main/java/com/fireblocks/sdk/model/ScreeningOperationType.java src/main/java/com/fireblocks/sdk/model/ScreeningPolicyResponse.java src/main/java/com/fireblocks/sdk/model/ScreeningProviderRulesConfigurationResponse.java -src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsRequest.java +src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurations.java src/main/java/com/fireblocks/sdk/model/ScreeningValidationFailure.java src/main/java/com/fireblocks/sdk/model/ScreeningVerdict.java src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java +src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java src/main/java/com/fireblocks/sdk/model/SessionDTO.java src/main/java/com/fireblocks/sdk/model/SessionMetadata.java src/main/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdRequest.java @@ -911,6 +912,7 @@ 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 +src/main/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicket.java src/main/java/com/fireblocks/sdk/model/SmartTransferFundTerm.java src/main/java/com/fireblocks/sdk/model/SmartTransferManuallyFundTerm.java src/main/java/com/fireblocks/sdk/model/SmartTransferNotFoundResponse.java @@ -1365,7 +1367,6 @@ 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 @@ -1384,10 +1385,11 @@ src/test/java/com/fireblocks/sdk/model/ScreeningOperationFailureTest.java src/test/java/com/fireblocks/sdk/model/ScreeningOperationTypeTest.java src/test/java/com/fireblocks/sdk/model/ScreeningPolicyResponseTest.java src/test/java/com/fireblocks/sdk/model/ScreeningProviderRulesConfigurationResponseTest.java -src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsRequestTest.java +src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsTest.java src/test/java/com/fireblocks/sdk/model/ScreeningValidationFailureTest.java src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java +src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.java src/test/java/com/fireblocks/sdk/model/SessionDTOTest.java src/test/java/com/fireblocks/sdk/model/SessionMetadataTest.java src/test/java/com/fireblocks/sdk/model/SetAdminQuorumThresholdRequestTest.java @@ -1418,6 +1420,7 @@ 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 +src/test/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicketTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferFundTermTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferManuallyFundTermTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferNotFoundResponseTest.java diff --git a/README.md b/README.md index 460b17f..c97a075 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 5.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:5.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-5.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -240,6 +240,7 @@ Class | Method | HTTP request | Description *NetworkConnectionsApi* | [**getNetworkId**](docs/NetworkConnectionsApi.md#getNetworkId) | **GET** /network_ids/{networkId} | Returns specific network ID. *NetworkConnectionsApi* | [**getNetworkIds**](docs/NetworkConnectionsApi.md#getNetworkIds) | **GET** /network_ids | Returns all network IDs, both local IDs and discoverable remote IDs *NetworkConnectionsApi* | [**getRoutingPolicyAssetGroups**](docs/NetworkConnectionsApi.md#getRoutingPolicyAssetGroups) | **GET** /network_ids/routing_policy_asset_groups | Returns all enabled routing policy asset groups +*NetworkConnectionsApi* | [**searchNetworkIds**](docs/NetworkConnectionsApi.md#searchNetworkIds) | **GET** /network_ids/search | Search network IDs, both local IDs and discoverable remote IDs *NetworkConnectionsApi* | [**setNetworkIdDiscoverability**](docs/NetworkConnectionsApi.md#setNetworkIdDiscoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID's discoverability. *NetworkConnectionsApi* | [**setNetworkIdName**](docs/NetworkConnectionsApi.md#setNetworkIdName) | **PATCH** /network_ids/{networkId}/set_name | Update network ID's name. *NetworkConnectionsApi* | [**setNetworkIdRoutingPolicy**](docs/NetworkConnectionsApi.md#setNetworkIdRoutingPolicy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy. @@ -659,7 +660,6 @@ Class | Method | HTTP request | Description - [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) @@ -678,10 +678,11 @@ Class | Method | HTTP request | Description - [ScreeningOperationType](docs/ScreeningOperationType.md) - [ScreeningPolicyResponse](docs/ScreeningPolicyResponse.md) - [ScreeningProviderRulesConfigurationResponse](docs/ScreeningProviderRulesConfigurationResponse.md) - - [ScreeningUpdateConfigurationsRequest](docs/ScreeningUpdateConfigurationsRequest.md) + - [ScreeningUpdateConfigurations](docs/ScreeningUpdateConfigurations.md) - [ScreeningValidationFailure](docs/ScreeningValidationFailure.md) - [ScreeningVerdict](docs/ScreeningVerdict.md) - [ScreeningVerdictMatchedRule](docs/ScreeningVerdictMatchedRule.md) + - [SearchNetworkIdsResponse](docs/SearchNetworkIdsResponse.md) - [SessionDTO](docs/SessionDTO.md) - [SessionMetadata](docs/SessionMetadata.md) - [SetAdminQuorumThresholdRequest](docs/SetAdminQuorumThresholdRequest.md) @@ -712,6 +713,7 @@ Class | Method | HTTP request | Description - [SmartTransferCreateTicket](docs/SmartTransferCreateTicket.md) - [SmartTransferCreateTicketTerm](docs/SmartTransferCreateTicketTerm.md) - [SmartTransferForbiddenResponse](docs/SmartTransferForbiddenResponse.md) + - [SmartTransferFundDvpTicket](docs/SmartTransferFundDvpTicket.md) - [SmartTransferFundTerm](docs/SmartTransferFundTerm.md) - [SmartTransferManuallyFundTerm](docs/SmartTransferManuallyFundTerm.md) - [SmartTransferNotFoundResponse](docs/SmartTransferNotFoundResponse.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 6012007..8656467 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -3801,6 +3801,7 @@ paths: x-accepts: application/json /network_ids: get: + deprecated: true description: | Retrieves a list of all local and discoverable remote network IDs. @@ -4000,6 +4001,121 @@ paths: - lang: Python source: response = fireblocks.network_connections.get_routing_policy_asset_groups(); x-accepts: application/json + /network_ids/search: + get: + description: | + Retrieves a list of all local and discoverable remote network IDs. Can be filtered. + + **Note:** This API call is subject to Flexible Routing Schemes. + + Your routing policy defines how your transactions are routed. + You can choose 1 of the 3 different schemes mentioned below for each asset type: + - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. + - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. + - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as "Profile Routing" + + Default Workspace Presets: + - Network Profile Crypto → **Custom** + - Network Profile FIAT → **None** + - Network Connection Crypto → **Default** + - Network Connection FIAT → **Default** + + - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). + operationId: searchNetworkIds + parameters: + - description: Search string - displayName networkId. Optional + explode: true + in: query + name: search + required: false + schema: + minLength: 1 + type: string + style: form + - description: "Exclude your networkIds. Optional, default false" + explode: true + in: query + name: excludeSelf + required: false + schema: + type: boolean + style: form + - description: "Exclude connected networkIds. Optional, default false" + explode: true + in: query + name: excludeConnected + required: false + schema: + type: boolean + style: form + - description: ID of the record after which to fetch $limit records + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: "Number of records to fetch. By default, it is 50" + explode: true + in: query + name: pageSize + required: false + schema: + default: 50 + maximum: 50 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SearchNetworkIdsResponse' + description: A list of network IDs + 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: "Search network IDs, both local IDs and discoverable remote IDs" + tags: + - Network connections + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.searchNetworkIds(networkConnectionsApiSearchNetworkIdsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.networkConnections().searchNetworkIds(search, excludeSelf,\ + \ excludeConnected, pageCursor, pageSize);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.network_connections.search_network_ids(search,\ + \ exclude_self, exclude_connected, page_cursor, page_size);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.networkConnections.searchNetworkIds(networkConnectionsApiSearchNetworkIdsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.networkConnections().searchNetworkIds(search, excludeSelf,\ + \ excludeConnected, pageCursor, pageSize);" + - lang: Python + source: "response = fireblocks.network_connections.search_network_ids(search,\ + \ exclude_self, exclude_connected, page_cursor, page_size);" + x-accepts: application/json /network_ids/{networkId}: delete: description: | @@ -10603,7 +10719,7 @@ paths: style: form - explode: true in: query - name: templateId + name: contractTemplateId required: false schema: type: string @@ -10642,11 +10758,11 @@ paths: - language: java code: "CompletableFuture>\ \ response = fireblocks.deployedContracts().getDeployedContracts(pageCursor,\ - \ pageSize, contractAddress, baseAssetId, templateId);" + \ pageSize, contractAddress, baseAssetId, contractTemplateId);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.deployed_contracts.get_deployed_contracts(page_cursor,\ - \ page_size, contract_address, base_asset_id, template_id);" + \ page_size, contract_address, base_asset_id, contract_template_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -10655,10 +10771,10 @@ paths: - lang: Java source: "CompletableFuture>\ \ response = fireblocks.deployedContracts().getDeployedContracts(pageCursor,\ - \ pageSize, contractAddress, baseAssetId, templateId);" + \ pageSize, contractAddress, baseAssetId, contractTemplateId);" - lang: Python source: "response = fireblocks.deployed_contracts.get_deployed_contracts(page_cursor,\ - \ page_size, contract_address, base_asset_id, template_id);" + \ page_size, contract_address, base_asset_id, contract_template_id);" x-accepts: application/json /tokenization/contracts/{id}: get: @@ -14771,12 +14887,18 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScreeningUpdateConfigurations' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ScreeningUpdateConfigurationsRequest' + $ref: '#/components/schemas/ScreeningUpdateConfigurations' description: Tenant Screening configuration updated successfully. summary: Tenant - Screening Configuration tags: @@ -14784,25 +14906,30 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise>\ + code: "const response: Promise>\ \ = fireblocks.compliance.updateScreeningConfiguration(complianceApiUpdateScreeningConfigurationRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> - response = fireblocks.compliance().updateScreeningConfiguration(idempotencyKey); + code: "CompletableFuture> response\ + \ = fireblocks.compliance().updateScreeningConfiguration(screeningUpdateConfigurations,\ + \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.compliance.update_screening_configuration(idempotency_key); + code: "response = fireblocks.compliance.update_screening_configuration(screening_update_configurations,\ + \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ + source: "const response: Promise>\ \ = fireblocks.compliance.updateScreeningConfiguration(complianceApiUpdateScreeningConfigurationRequest);" - lang: Java - source: CompletableFuture> - response = fireblocks.compliance().updateScreeningConfiguration(idempotencyKey); + source: "CompletableFuture> response\ + \ = fireblocks.compliance().updateScreeningConfiguration(screeningUpdateConfigurations,\ + \ idempotencyKey);" - lang: Python - source: response = fireblocks.compliance.update_screening_configuration(idempotency_key); + source: "response = fireblocks.compliance.update_screening_configuration(screening_update_configurations,\ + \ idempotency_key);" + x-content-type: application/json x-accepts: application/json /management/ota: get: @@ -16491,6 +16618,12 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferFundDvpTicket' + required: true responses: "200": content: @@ -16528,10 +16661,12 @@ paths: name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().fundDvpTicket(ticketId, idempotencyKey);" + \ = fireblocks.smartTransfer().fundDvpTicket(smartTransferFundDvpTicket,\ + \ ticketId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.smart_transfer.fund_dvp_ticket(ticket_id, idempotency_key);" + code: "response = fireblocks.smart_transfer.fund_dvp_ticket(smart_transfer_fund_dvp_ticket,\ + \ ticket_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -16539,9 +16674,12 @@ paths: \ = fireblocks.smartTransfer.fundDvpTicket(smartTransferApiFundDvpTicketRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().fundDvpTicket(ticketId, idempotencyKey);" + \ = fireblocks.smartTransfer().fundDvpTicket(smartTransferFundDvpTicket,\ + \ ticketId, idempotencyKey);" - lang: Python - source: "response = fireblocks.smart_transfer.fund_dvp_ticket(ticket_id, idempotency_key);" + source: "response = fireblocks.smart_transfer.fund_dvp_ticket(smart_transfer_fund_dvp_ticket,\ + \ ticket_id, idempotency_key);" + x-content-type: application/json x-accepts: application/json /smart-transfers/{ticketId}/cancel: put: @@ -19571,6 +19709,34 @@ components: items: type: string type: array + SearchNetworkIdsResponse: + example: + next: next + data: + - name: name + isDiscoverable: true + routingPolicy: + key: + scheme: CUSTOM + dstId: dstId + dstType: FIAT_ACCOUNT + id: id + - name: name + isDiscoverable: true + routingPolicy: + key: + scheme: CUSTOM + dstId: dstId + dstType: FIAT_ACCOUNT + id: id + properties: + data: + items: + $ref: '#/components/schemas/NetworkIdResponse' + type: array + next: + type: string + type: object DeleteNetworkIdResponse: example: success: true @@ -24228,8 +24394,8 @@ components: type: object version: description: The version of the contract - example: "1" - type: string + example: 1 + type: number required: - kind - methods @@ -24346,7 +24512,6 @@ components: description: The documentation of this function (if has any) type: string required: - - inputs - type type: object ContractUploadRequest: @@ -24382,24 +24547,15 @@ components: name: My Contract description: an ERC20 implementation abi: - - - inputs: - - internalType: address - name: implementation - type: address - - internalType: bytes - name: _data - type: bytes - stateMutability: payable - type: constructor - - - inputs: - - internalType: address - name: implementation - type: address - - internalType: bytes - name: _data - type: bytes - stateMutability: payable - type: constructor + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor attributes: useCases: - Stablecoin @@ -24477,22 +24633,20 @@ components: \ is empty, `msg.value` must be zero." version: 1 abi: + description: The abi of the contract template. Necessary for displaying + and for after deployment encoding + example: + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor items: - description: The abi of the contract template. Necessary for displaying - and for after deployment encoding - example: - - inputs: - - internalType: address - name: implementation - type: address - - internalType: bytes - name: _data - type: bytes - stateMutability: payable - type: constructor - items: - $ref: '#/components/schemas/AbiFunction' - type: array + $ref: '#/components/schemas/AbiFunction' type: array attributes: allOf: @@ -24526,24 +24680,15 @@ components: owner: b70701f4-d7b1-4795-a8ee-b09cdb5b850d description: an ERC20 implementation abi: - - - inputs: - - internalType: address - name: implementation - type: address - - internalType: bytes - name: _data - type: bytes - stateMutability: payable - type: constructor - - - inputs: - - internalType: address - name: implementation - type: address - - internalType: bytes - name: _data - type: bytes - stateMutability: payable - type: constructor + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor initializationPhase: ON_DEPLOYMENT type: FUNGIBLE_TOKEN docs: @@ -24608,22 +24753,20 @@ components: - burn type: string abi: + description: The abi of the contract template. Necessary for displaying + and for after deployment encoding + example: + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor items: - description: The abi of the contract template. Necessary for displaying - and for after deployment encoding - example: - - inputs: - - internalType: address - name: implementation - type: address - - internalType: bytes - name: _data - type: bytes - stateMutability: payable - type: constructor - items: - $ref: '#/components/schemas/AbiFunction' - type: array + $ref: '#/components/schemas/AbiFunction' type: array attributes: allOf: @@ -24828,7 +24971,10 @@ components: name: symbol_ type: string value: TokenSymbol + useGasless: false + fee: "2000" vaultAccountId: "0" + feeLevel: MEDIUM properties: assetId: description: The base asset identifier of the blockchain you want to deploy @@ -24853,6 +24999,27 @@ components: items: $ref: '#/components/schemas/ParameterWithValue' type: array + useGasless: + description: "Indicates whether the token should be created in a gasless\ + \ manner, utilizing the ERC-2771 standard. When set to true, the transaction\ + \ will be relayed by a designated relayer. The workspace must be configured\ + \ to use Fireblocks gasless relay." + example: false + type: boolean + fee: + description: Max fee amount for the write function transaction. interchangeable + with the 'feeLevel' field + example: "2000" + type: string + feeLevel: + description: Fee level for the write function transaction. interchangeable + with the 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string required: - assetId - vaultAccountId @@ -25416,7 +25583,10 @@ components: example: assetId: ETH_TEST5 displayName: displayName + useGasless: false + fee: "2000" vaultAccountId: "0" + feeLevel: MEDIUM blockchainId: B7QG017M createParams: deployFunctionParams: @@ -25460,6 +25630,27 @@ components: $ref: '#/components/schemas/CreateTokenRequestDto_createParams' displayName: type: string + useGasless: + description: "Indicates whether the token should be created in a gasless\ + \ manner, utilizing the ERC-2771 standard. When set to true, the transaction\ + \ will be relayed by a designated relayer. The workspace must be configured\ + \ to use Fireblocks gasless relay." + example: false + type: boolean + fee: + description: Max fee amount for the write function transaction. interchangeable + with the 'feeLevel' field + example: "2000" + type: string + feeLevel: + description: Fee level for the write function transaction. interchangeable + with the 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string required: - createParams - vaultAccountId @@ -26198,7 +26389,9 @@ components: note: note amount: "12.345" fee: "2000" + useGasless: false vaultAccountId: "0" + externalId: 0192e4f5-924e-7bb9-8e5b-c748270feb38 feeLevel: MEDIUM properties: vaultAccountId: @@ -26229,6 +26422,19 @@ components: description: "Custom note, not sent to the blockchain, that describes the\ \ transaction at your Fireblocks workspace" type: string + useGasless: + description: "Indicates whether the token should be created in a gasless\ + \ manner, utilizing the ERC-2771 standard. When set to true, the transaction\ + \ will be relayed by a designated relayer. The workspace must be configured\ + \ to use Fireblocks gasless relay." + example: false + type: boolean + externalId: + description: External id that can be used to identify the transaction in + your system. The unique identifier of the transaction outside of Fireblocks + with max length of 255 characters + example: 0192e4f5-924e-7bb9-8e5b-c748270feb38 + type: string required: - abiFunction - vaultAccountId @@ -26367,6 +26573,12 @@ components: description: The note to associate with the transactions. example: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH" type: string + amount: + description: "The number of tokens to unstake. This optional field is applicable\ + \ only for liquid staking and allows for a partial unstake of the position.\ + \ If not provided, the entire position will be unstaked by default." + example: "75" + type: string required: - id type: object @@ -26443,47 +26655,14 @@ 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' + description: The status of the request + enum: + - deactivating + example: deactivating + type: string inProgress: description: Indicates whether there is an ongoing action for this position related to this request @@ -28459,7 +28638,7 @@ components: description: Outbound transaction delay in seconds. type: number type: object - ScreeningUpdateConfigurationsRequest: + ScreeningUpdateConfigurations: example: disableUnfreeze: true disableBypass: true @@ -30401,6 +30580,7 @@ components: toNetworkId: 5d009697-c29b-48e0-aff8-1f4305d19dc2 txStatus: COMPLETED createdAt: 2023-03-01T11:23:00Z + dvpSrcDstVaultId: "1" id: 84601ee2-b10f-4aa8-be9c-dba259a3533a fromNetworkId: 947c6115-1f5f-4fb4-9fd6-a1f9dee14670 toNetworkIdName: Destination network profile name @@ -30428,6 +30608,10 @@ components: description: Amount example: "133.789161216184" type: string + dvpSrcDstVaultId: + description: Identifier of the source and destination vault for DVP execution + example: "1" + type: string amountUsd: description: Amount USD example: "1333.789161216184" @@ -30523,6 +30707,7 @@ components: example: note: Random note externalRefId: 2631ffb9d8fe47c6b0825b5be28297da + orderCreatedByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 type: ASYNC createdByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 expiresAt: 2023-03-01T11:23:00Z @@ -30531,6 +30716,7 @@ components: createdAt: 2023-03-01T11:23:00Z fulfilledAt: 2023-03-01T11:23:00Z createdByMe: true + dvpExecutionStatus: STARTED terms: - id: 84601ee2-b10f-4aa8-be9c-dba259a3533a ticketId: 118320d2-761f-46c7-96cf-65e71a370b36 @@ -30609,6 +30795,22 @@ components: - CANCELED example: DRAFT type: string + dvpExecutionStatus: + description: Current status of DVP execution + enum: + - STARTED + - CREATING_ORDER + - ORDER_CREATED + - FULFILLING + - FULFILLING_ORDER_FAILED + - CREATING_ORDER_FAILED + - FULFILLED + example: STARTED + type: string + orderCreatedByNetworkId: + description: ID of network profile that created order + example: 3eaa94c5-128b-4835-bb08-3111bb6564c7 + type: string terms: description: Ticket terms (legs) example: @@ -30728,6 +30930,7 @@ components: data: - note: Random note externalRefId: 2631ffb9d8fe47c6b0825b5be28297da + orderCreatedByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 type: ASYNC createdByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 expiresAt: 2023-03-01T11:23:00Z @@ -30736,6 +30939,7 @@ components: createdAt: 2023-03-01T11:23:00Z fulfilledAt: 2023-03-01T11:23:00Z createdByMe: true + dvpExecutionStatus: STARTED terms: - id: 84601ee2-b10f-4aa8-be9c-dba259a3533a ticketId: 118320d2-761f-46c7-96cf-65e71a370b36 @@ -30782,6 +30986,7 @@ components: updatedAt: 2023-03-01T11:23:00Z - note: Random note externalRefId: 2631ffb9d8fe47c6b0825b5be28297da + orderCreatedByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 type: ASYNC createdByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 expiresAt: 2023-03-01T11:23:00Z @@ -30790,6 +30995,7 @@ components: createdAt: 2023-03-01T11:23:00Z fulfilledAt: 2023-03-01T11:23:00Z createdByMe: true + dvpExecutionStatus: STARTED terms: - id: 84601ee2-b10f-4aa8-be9c-dba259a3533a ticketId: 118320d2-761f-46c7-96cf-65e71a370b36 @@ -30955,6 +31161,7 @@ components: data: note: Random note externalRefId: 2631ffb9d8fe47c6b0825b5be28297da + orderCreatedByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 type: ASYNC createdByNetworkId: 3eaa94c5-128b-4835-bb08-3111bb6564c7 expiresAt: 2023-03-01T11:23:00Z @@ -30963,6 +31170,7 @@ components: createdAt: 2023-03-01T11:23:00Z fulfilledAt: 2023-03-01T11:23:00Z createdByMe: true + dvpExecutionStatus: STARTED terms: - id: 84601ee2-b10f-4aa8-be9c-dba259a3533a ticketId: 118320d2-761f-46c7-96cf-65e71a370b36 @@ -31093,6 +31301,29 @@ components: minimum: 1 type: number type: object + SmartTransferFundDvpTicket: + example: + note: Transaction note + fee: "0.001" + feeLevel: MEDIUM + properties: + 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 + type: object SmartTransferTicketTermResponse: example: data: @@ -31103,6 +31334,7 @@ components: toNetworkId: 5d009697-c29b-48e0-aff8-1f4305d19dc2 txStatus: COMPLETED createdAt: 2023-03-01T11:23:00Z + dvpSrcDstVaultId: "1" id: 84601ee2-b10f-4aa8-be9c-dba259a3533a fromNetworkId: 947c6115-1f5f-4fb4-9fd6-a1f9dee14670 toNetworkIdName: Destination network profile name diff --git a/build.gradle b/build.gradle index 5ffc010..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 = '5.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AbiFunction.md b/docs/AbiFunction.md index b85adbf..fde3624 100644 --- a/docs/AbiFunction.md +++ b/docs/AbiFunction.md @@ -10,7 +10,7 @@ |**name** | **String** | The name of the contract function as it appears in the ABI | [optional] | |**stateMutability** | [**StateMutabilityEnum**](#StateMutabilityEnum) | The state mutability of the contract function as it appears in the ABI | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The type of the function | | -|**inputs** | [**List<Parameter>**](Parameter.md) | The parameters that this function/constructor posses | | +|**inputs** | [**List<Parameter>**](Parameter.md) | The parameters that this function/constructor posses | [optional] | |**outputs** | [**List<Parameter>**](Parameter.md) | The parameters that this 'read' function returns | [optional] | |**description** | **String** | The documentation of this function (if has any) | [optional] | diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index cdcb7d3..ad5ade3 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -410,7 +410,7 @@ No authorization required ## updateScreeningConfiguration -> CompletableFuture> updateScreeningConfiguration updateScreeningConfiguration(idempotencyKey) +> CompletableFuture> updateScreeningConfiguration updateScreeningConfiguration(screeningUpdateConfigurations, idempotencyKey) Tenant - Screening Configuration @@ -439,9 +439,10 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); + ScreeningUpdateConfigurations screeningUpdateConfigurations = new ScreeningUpdateConfigurations(); // ScreeningUpdateConfigurations | 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.compliance().updateScreeningConfiguration(idempotencyKey); + CompletableFuture> response = fireblocks.compliance().updateScreeningConfiguration(screeningUpdateConfigurations, 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()); @@ -468,11 +469,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **screeningUpdateConfigurations** | [**ScreeningUpdateConfigurations**](ScreeningUpdateConfigurations.md)| | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -481,7 +483,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details diff --git a/docs/ContractDeployRequest.md b/docs/ContractDeployRequest.md index 309d78d..eec1c92 100644 --- a/docs/ContractDeployRequest.md +++ b/docs/ContractDeployRequest.md @@ -10,6 +10,19 @@ |**assetId** | **String** | The base asset identifier of the blockchain you want to deploy to | | |**vaultAccountId** | **String** | The vault account id you wish to deploy from | | |**constructorParameters** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The constructor parameters of this contract | [optional] | +|**useGasless** | **Boolean** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] | +|**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | diff --git a/docs/ContractDoc.md b/docs/ContractDoc.md index 5a9873b..2fed527 100644 --- a/docs/ContractDoc.md +++ b/docs/ContractDoc.md @@ -11,7 +11,7 @@ |**events** | **String** | A description of the contract`s events | [optional] | |**kind** | **String** | Is it devdoc or userdoc | | |**methods** | [**Map<String, FunctionDoc>**](FunctionDoc.md) | The description of the contract functions | | -|**version** | **String** | The version of the contract | | +|**version** | **BigDecimal** | The version of the contract | | diff --git a/docs/ContractTemplateDto.md b/docs/ContractTemplateDto.md index 48b46bb..f1f85c0 100644 --- a/docs/ContractTemplateDto.md +++ b/docs/ContractTemplateDto.md @@ -11,7 +11,7 @@ |**name** | **String** | The name of the contract template | | |**description** | **String** | A short description of the contract template | | |**longDescription** | **String** | A full description of the contract template. May contain to break the lines | [optional] | -|**abi** | **List<List<AbiFunction>>** | | | +|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the contract template. Necessary for displaying and for after deployment encoding | | |**attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] | |**docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] | |**owner** | **String** | The workspace id of the owner of this contract template. If it's a private contract, only this workspace will be allowed to deploy it | [optional] | diff --git a/docs/ContractUploadRequest.md b/docs/ContractUploadRequest.md index 85603dd..38bb079 100644 --- a/docs/ContractUploadRequest.md +++ b/docs/ContractUploadRequest.md @@ -14,7 +14,7 @@ |**sourcecode** | **String** | The source code of the contract. Optional. | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The type of the contract template | [optional] | |**docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] | -|**abi** | **List<List<AbiFunction>>** | | | +|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the contract template. Necessary for displaying and for after deployment encoding | | |**attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] | diff --git a/docs/CreateTokenRequestDto.md b/docs/CreateTokenRequestDto.md index 96c6cbc..c32627f 100644 --- a/docs/CreateTokenRequestDto.md +++ b/docs/CreateTokenRequestDto.md @@ -12,6 +12,19 @@ |**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | |**createParams** | [**CreateTokenRequestDtoCreateParams**](CreateTokenRequestDtoCreateParams.md) | | | |**displayName** | **String** | | [optional] | +|**useGasless** | **Boolean** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] | +|**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md index 9f77837..47edae5 100644 --- a/docs/DeployedContractsApi.md +++ b/docs/DeployedContractsApi.md @@ -354,7 +354,7 @@ No authorization required ## getDeployedContracts -> CompletableFuture> getDeployedContracts getDeployedContracts(pageCursor, pageSize, contractAddress, baseAssetId, templateId) +> CompletableFuture> getDeployedContracts getDeployedContracts(pageCursor, pageSize, contractAddress, baseAssetId, contractTemplateId) List deployed contracts data @@ -387,9 +387,9 @@ public class Example { 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 baseAssetId = "baseAssetId_example"; // String | - String templateId = "templateId_example"; // String | + String contractTemplateId = "contractTemplateId_example"; // String | try { - CompletableFuture> response = fireblocks.deployedContracts().getDeployedContracts(pageCursor, pageSize, contractAddress, baseAssetId, templateId); + CompletableFuture> response = fireblocks.deployedContracts().getDeployedContracts(pageCursor, pageSize, contractAddress, baseAssetId, contractTemplateId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -420,7 +420,7 @@ public class Example { | **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | | **contractAddress** | **String**| The contract's onchain address | [optional] | | **baseAssetId** | **String**| | [optional] | -| **templateId** | **String**| | [optional] | +| **contractTemplateId** | **String**| | [optional] | ### Return type diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md index 536f365..d3639c8 100644 --- a/docs/NetworkConnectionsApi.md +++ b/docs/NetworkConnectionsApi.md @@ -14,6 +14,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getNetworkId**](NetworkConnectionsApi.md#getNetworkId) | **GET** /network_ids/{networkId} | Returns specific network ID. | | [**getNetworkIds**](NetworkConnectionsApi.md#getNetworkIds) | **GET** /network_ids | Returns all network IDs, both local IDs and discoverable remote IDs | | [**getRoutingPolicyAssetGroups**](NetworkConnectionsApi.md#getRoutingPolicyAssetGroups) | **GET** /network_ids/routing_policy_asset_groups | Returns all enabled routing policy asset groups | +| [**searchNetworkIds**](NetworkConnectionsApi.md#searchNetworkIds) | **GET** /network_ids/search | Search network IDs, both local IDs and discoverable remote IDs | | [**setNetworkIdDiscoverability**](NetworkConnectionsApi.md#setNetworkIdDiscoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID's discoverability. | | [**setNetworkIdName**](NetworkConnectionsApi.md#setNetworkIdName) | **PATCH** /network_ids/{networkId}/set_name | Update network ID's name. | | [**setNetworkIdRoutingPolicy**](NetworkConnectionsApi.md#setNetworkIdRoutingPolicy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy. | @@ -845,6 +846,97 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## searchNetworkIds + +> CompletableFuture> searchNetworkIds searchNetworkIds(search, excludeSelf, excludeConnected, pageCursor, pageSize) + +Search network IDs, both local IDs and discoverable remote IDs + +Retrieves a list of all local and discoverable remote network IDs. Can be filtered. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). + +### 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.NetworkConnectionsApi; +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 search = "search_example"; // String | Search string - displayName networkId. Optional + Boolean excludeSelf = true; // Boolean | Exclude your networkIds. Optional, default false + Boolean excludeConnected = true; // Boolean | Exclude connected networkIds. Optional, default false + String pageCursor = "pageCursor_example"; // String | ID of the record after which to fetch $limit records + BigDecimal pageSize = new BigDecimal("50"); // BigDecimal | Number of records to fetch. By default, it is 50 + try { + CompletableFuture> response = fireblocks.networkConnections().searchNetworkIds(search, excludeSelf, excludeConnected, pageCursor, pageSize); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling NetworkConnectionsApi#searchNetworkIds"); + 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 NetworkConnectionsApi#searchNetworkIds"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **search** | **String**| Search string - displayName networkId. Optional | [optional] | +| **excludeSelf** | **Boolean**| Exclude your networkIds. Optional, default false | [optional] | +| **excludeConnected** | **Boolean**| Exclude connected networkIds. Optional, default false | [optional] | +| **pageCursor** | **String**| ID of the record after which to fetch $limit records | [optional] | +| **pageSize** | **BigDecimal**| Number of records to fetch. By default, it is 50 | [optional] [default to 50] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of network IDs | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## setNetworkIdDiscoverability > CompletableFuture> setNetworkIdDiscoverability setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest, networkId) diff --git a/docs/RelatedRequestDto.md b/docs/RelatedRequestDto.md index 255267d..58f0cab 100644 --- a/docs/RelatedRequestDto.md +++ b/docs/RelatedRequestDto.md @@ -7,10 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**status** | **RelatedRequestStatusType** | | | +|**status** | [**StatusEnum**](#StatusEnum) | The status of the request | | |**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] | +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| DEACTIVATING | "deactivating" | + + + diff --git a/docs/RelatedRequestStatusType.md b/docs/RelatedRequestStatusType.md deleted file mode 100644 index 3975dd9..0000000 --- a/docs/RelatedRequestStatusType.md +++ /dev/null @@ -1,73 +0,0 @@ - - -# 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/ScreeningUpdateConfigurationsRequest.md b/docs/ScreeningUpdateConfigurations.md similarity index 90% rename from docs/ScreeningUpdateConfigurationsRequest.md rename to docs/ScreeningUpdateConfigurations.md index 964783b..986d521 100644 --- a/docs/ScreeningUpdateConfigurationsRequest.md +++ b/docs/ScreeningUpdateConfigurations.md @@ -1,6 +1,6 @@ -# ScreeningUpdateConfigurationsRequest +# ScreeningUpdateConfigurations ## Properties diff --git a/docs/SearchNetworkIdsResponse.md b/docs/SearchNetworkIdsResponse.md new file mode 100644 index 0000000..67d4be9 --- /dev/null +++ b/docs/SearchNetworkIdsResponse.md @@ -0,0 +1,14 @@ + + +# SearchNetworkIdsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<NetworkIdResponse>**](NetworkIdResponse.md) | | [optional] | +|**next** | **String** | | [optional] | + + + diff --git a/docs/SmartTransferApi.md b/docs/SmartTransferApi.md index 4ac9fa4..eda1f5f 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -637,7 +637,7 @@ No authorization required ## fundDvpTicket -> CompletableFuture> fundDvpTicket fundDvpTicket(ticketId, idempotencyKey) +> CompletableFuture> fundDvpTicket fundDvpTicket(smartTransferFundDvpTicket, ticketId, idempotencyKey) Fund dvp ticket @@ -666,10 +666,11 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); + SmartTransferFundDvpTicket smartTransferFundDvpTicket = new SmartTransferFundDvpTicket(); // SmartTransferFundDvpTicket | 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); + CompletableFuture> response = fireblocks.smartTransfer().fundDvpTicket(smartTransferFundDvpTicket, 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()); @@ -696,6 +697,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **smartTransferFundDvpTicket** | [**SmartTransferFundDvpTicket**](SmartTransferFundDvpTicket.md)| | | | **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] | @@ -710,7 +712,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details diff --git a/docs/SmartTransferFundDvpTicket.md b/docs/SmartTransferFundDvpTicket.md new file mode 100644 index 0000000..a477d03 --- /dev/null +++ b/docs/SmartTransferFundDvpTicket.md @@ -0,0 +1,25 @@ + + +# SmartTransferFundDvpTicket + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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/SmartTransferTicket.md b/docs/SmartTransferTicket.md index 6a2da7c..0090789 100644 --- a/docs/SmartTransferTicket.md +++ b/docs/SmartTransferTicket.md @@ -12,6 +12,8 @@ Data object with result data |**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 | | +|**dvpExecutionStatus** | [**DvpExecutionStatusEnum**](#DvpExecutionStatusEnum) | Current status of DVP execution | [optional] | +|**orderCreatedByNetworkId** | **String** | ID of network profile that created order | [optional] | |**terms** | [**List<SmartTransferTicketTerm>**](SmartTransferTicketTerm.md) | Ticket terms (legs) | [optional] | |**expiresIn** | **BigDecimal** | Number of hours for expiration.This data is valid only it ticket not in DRAFT state and it will be used to calculate expiresAt value | [optional] | |**expiresAt** | **OffsetDateTime** | Date and time at which the ticket will expire if no funding is performed. | [optional] | @@ -65,3 +67,17 @@ Data object with result data +## Enum: DvpExecutionStatusEnum + +| Name | Value | +|---- | -----| +| STARTED | "STARTED" | +| CREATING_ORDER | "CREATING_ORDER" | +| ORDER_CREATED | "ORDER_CREATED" | +| FULFILLING | "FULFILLING" | +| FULFILLING_ORDER_FAILED | "FULFILLING_ORDER_FAILED" | +| CREATING_ORDER_FAILED | "CREATING_ORDER_FAILED" | +| FULFILLED | "FULFILLED" | + + + diff --git a/docs/SmartTransferTicketTerm.md b/docs/SmartTransferTicketTerm.md index 6976632..2db6acd 100644 --- a/docs/SmartTransferTicketTerm.md +++ b/docs/SmartTransferTicketTerm.md @@ -12,6 +12,7 @@ Data object with result data |**ticketId** | **String** | Unique id of Smart Transfer ticket | | |**asset** | **String** | Asset name | | |**amount** | **String** | Amount | | +|**dvpSrcDstVaultId** | **String** | Identifier of the source and destination vault for DVP execution | [optional] | |**amountUsd** | **String** | Amount USD | [optional] | |**fromNetworkId** | **String** | Identifier of the origination Network Profile | | |**fromNetworkIdName** | **String** | Source network name | | diff --git a/docs/UnstakeRequestDto.md b/docs/UnstakeRequestDto.md index 343d71a..48b2ddf 100644 --- a/docs/UnstakeRequestDto.md +++ b/docs/UnstakeRequestDto.md @@ -11,6 +11,7 @@ |**fee** | **String** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] | |**feeLevel** | **String** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] | |**txNote** | **String** | The note to associate with the transactions. | [optional] | +|**amount** | **String** | The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default. | [optional] | diff --git a/docs/WriteCallFunctionDto.md b/docs/WriteCallFunctionDto.md index 00ad25e..f88a9c1 100644 --- a/docs/WriteCallFunctionDto.md +++ b/docs/WriteCallFunctionDto.md @@ -13,6 +13,8 @@ |**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | |**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | |**note** | **String** | Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace | [optional] | +|**useGasless** | **Boolean** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] | +|**externalId** | **String** | External id that can be used to identify the transaction in your system. The unique identifier of the transaction outside of Fireblocks with max length of 255 characters | [optional] | diff --git a/pom.xml b/pom.xml index c57b2d2..94938f5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 5.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 b10120a..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 = "5.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/ComplianceApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java index db4feba..9c088a2 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java @@ -18,10 +18,11 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.ScreeningConfigurationsRequest; import com.fireblocks.sdk.model.ScreeningPolicyResponse; import com.fireblocks.sdk.model.ScreeningProviderRulesConfigurationResponse; -import com.fireblocks.sdk.model.ScreeningUpdateConfigurationsRequest; +import com.fireblocks.sdk.model.ScreeningUpdateConfigurations; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -397,17 +398,22 @@ private HttpRequest.Builder updateAmlScreeningConfigurationRequestBuilder(String /** * Tenant - Screening Configuration Update tenant screening configuration. * + * @param screeningUpdateConfigurations (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<ScreeningUpdateConfigurationsRequest>> + * @return CompletableFuture<ApiResponse<ScreeningUpdateConfigurations>> * @throws ApiException if fails to make API call */ - public CompletableFuture> - updateScreeningConfiguration(String idempotencyKey) throws ApiException { + public CompletableFuture> + updateScreeningConfiguration( + ScreeningUpdateConfigurations screeningUpdateConfigurations, + String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - updateScreeningConfigurationRequestBuilder(idempotencyKey); + updateScreeningConfigurationRequestBuilder( + screeningUpdateConfigurations, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -424,7 +430,7 @@ private HttpRequest.Builder updateAmlScreeningConfigurationRequestBuilder(String try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -432,7 +438,7 @@ private HttpRequest.Builder updateAmlScreeningConfigurationRequestBuilder(String : memberVarObjectMapper.readValue( responseBody, new TypeReference< - ScreeningUpdateConfigurationsRequest>() {}))); + ScreeningUpdateConfigurations>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -442,8 +448,13 @@ private HttpRequest.Builder updateAmlScreeningConfigurationRequestBuilder(String } } - private HttpRequest.Builder updateScreeningConfigurationRequestBuilder(String idempotencyKey) + private HttpRequest.Builder updateScreeningConfigurationRequestBuilder( + ScreeningUpdateConfigurations screeningUpdateConfigurations, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists( + "updateScreeningConfiguration", + "screeningUpdateConfigurations", + screeningUpdateConfigurations); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -454,9 +465,17 @@ private HttpRequest.Builder updateScreeningConfigurationRequestBuilder(String id if (idempotencyKey != null) { localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(screeningUpdateConfigurations); + localVarRequestBuilder.method( + "PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } diff --git a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java index 9c2990b..668904a 100644 --- a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java @@ -386,7 +386,7 @@ private HttpRequest.Builder getDeployedContractByIdRequestBuilder(String id) * (optional) * @param contractAddress The contract's onchain address (optional) * @param baseAssetId (optional) - * @param templateId (optional) + * @param contractTemplateId (optional) * @return CompletableFuture<ApiResponse<DeployedContractsPaginatedResponse>> * @throws ApiException if fails to make API call */ @@ -395,12 +395,12 @@ public CompletableFuture> getDep BigDecimal pageSize, String contractAddress, String baseAssetId, - String templateId) + String contractTemplateId) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getDeployedContractsRequestBuilder( - pageCursor, pageSize, contractAddress, baseAssetId, templateId); + pageCursor, pageSize, contractAddress, baseAssetId, contractTemplateId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -439,7 +439,7 @@ private HttpRequest.Builder getDeployedContractsRequestBuilder( BigDecimal pageSize, String contractAddress, String baseAssetId, - String templateId) + String contractTemplateId) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -457,8 +457,9 @@ private HttpRequest.Builder getDeployedContractsRequestBuilder( localVarQueryParams.addAll(ApiClient.parameterToPairs("contractAddress", contractAddress)); localVarQueryParameterBaseName = "baseAssetId"; localVarQueryParams.addAll(ApiClient.parameterToPairs("baseAssetId", baseAssetId)); - localVarQueryParameterBaseName = "templateId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("templateId", templateId)); + localVarQueryParameterBaseName = "contractTemplateId"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("contractTemplateId", contractTemplateId)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); diff --git a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java index bc8d013..56de9c1 100644 --- a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateNetworkIdRequest; import com.fireblocks.sdk.model.DeleteNetworkConnectionResponse; @@ -25,6 +26,7 @@ import com.fireblocks.sdk.model.NetworkConnection; import com.fireblocks.sdk.model.NetworkConnectionResponse; import com.fireblocks.sdk.model.NetworkIdResponse; +import com.fireblocks.sdk.model.SearchNetworkIdsResponse; import com.fireblocks.sdk.model.SetNetworkIdDiscoverabilityRequest; import com.fireblocks.sdk.model.SetNetworkIdNameRequest; import com.fireblocks.sdk.model.SetNetworkIdResponse; @@ -34,12 +36,15 @@ import com.fireblocks.sdk.model.ThirdPartyRouting; import java.io.IOException; import java.io.InputStream; +import java.math.BigDecimal; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.ArrayList; import java.util.List; +import java.util.StringJoiner; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; @@ -742,7 +747,9 @@ private HttpRequest.Builder getNetworkIdRequestBuilder(String networkId) throws * * @return CompletableFuture<ApiResponse<List<NetworkIdResponse>>> * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public CompletableFuture>> getNetworkIds() throws ApiException { try { @@ -866,6 +873,122 @@ private HttpRequest.Builder getRoutingPolicyAssetGroupsRequestBuilder() throws A } return localVarRequestBuilder; } + /** + * Search network IDs, both local IDs and discoverable remote IDs Retrieves a list of all local + * and discoverable remote network IDs. Can be filtered. **Note:** This API call is subject to + * Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You + * can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; + * Defines the profile routing to no destination for that asset type. Incoming transactions to + * asset types routed to `None` will fail. - **Custom**; Route to an account that you + * choose. If you remove the account, incoming transactions will fail until you choose another + * one. - **Default**; Use the routing specified by the network profile the connection is + * connected to. This scheme is also referred to as \"Profile Routing\" Default + * Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - + * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - **Note**: + * By default, Custom routing scheme uses (`dstId` = `0`, + * `dstType` = `VAULT`). + * + * @param search Search string - displayName networkId. Optional (optional) + * @param excludeSelf Exclude your networkIds. Optional, default false (optional) + * @param excludeConnected Exclude connected networkIds. Optional, default false (optional) + * @param pageCursor ID of the record after which to fetch $limit records (optional) + * @param pageSize Number of records to fetch. By default, it is 50 (optional, default to 50) + * @return CompletableFuture<ApiResponse<SearchNetworkIdsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> searchNetworkIds( + String search, + Boolean excludeSelf, + Boolean excludeConnected, + String pageCursor, + BigDecimal pageSize) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + searchNetworkIdsRequestBuilder( + search, excludeSelf, excludeConnected, pageCursor, pageSize); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("searchNetworkIds", 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< + SearchNetworkIdsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder searchNetworkIdsRequestBuilder( + String search, + Boolean excludeSelf, + Boolean excludeConnected, + String pageCursor, + BigDecimal pageSize) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/network_ids/search"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "search"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("search", search)); + localVarQueryParameterBaseName = "excludeSelf"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("excludeSelf", excludeSelf)); + localVarQueryParameterBaseName = "excludeConnected"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("excludeConnected", excludeConnected)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Update network ID's discoverability. Update whether or not the network ID is discoverable * by others. **Note:** This API call is subject to Flexible Routing Schemes. Your routing diff --git a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java index 2881e69..e427e29 100644 --- a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java @@ -23,6 +23,7 @@ import com.fireblocks.sdk.model.SmartTransferApproveTerm; import com.fireblocks.sdk.model.SmartTransferCreateTicket; import com.fireblocks.sdk.model.SmartTransferCreateTicketTerm; +import com.fireblocks.sdk.model.SmartTransferFundDvpTicket; import com.fireblocks.sdk.model.SmartTransferFundTerm; import com.fireblocks.sdk.model.SmartTransferManuallyFundTerm; import com.fireblocks.sdk.model.SmartTransferSetTicketExpiration; @@ -645,6 +646,7 @@ private HttpRequest.Builder fulfillTicketRequestBuilder(String ticketId, String /** * Fund dvp ticket Create or fulfill dvp ticket order * + * @param smartTransferFundDvpTicket (required) * @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 @@ -653,10 +655,14 @@ private HttpRequest.Builder fulfillTicketRequestBuilder(String ticketId, String * @throws ApiException if fails to make API call */ public CompletableFuture> fundDvpTicket( - String ticketId, String idempotencyKey) throws ApiException { + SmartTransferFundDvpTicket smartTransferFundDvpTicket, + String ticketId, + String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - fundDvpTicketRequestBuilder(ticketId, idempotencyKey); + fundDvpTicketRequestBuilder( + smartTransferFundDvpTicket, ticketId, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -689,8 +695,13 @@ public CompletableFuture> fundDvpTicket } } - private HttpRequest.Builder fundDvpTicketRequestBuilder(String ticketId, String idempotencyKey) + private HttpRequest.Builder fundDvpTicketRequestBuilder( + SmartTransferFundDvpTicket smartTransferFundDvpTicket, + String ticketId, + String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists( + "fundDvpTicket", "smartTransferFundDvpTicket", smartTransferFundDvpTicket); ValidationUtils.assertParamExistsAndNotEmpty("fundDvpTicket", "ticketId", ticketId); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -704,9 +715,17 @@ private HttpRequest.Builder fundDvpTicketRequestBuilder(String ticketId, String if (idempotencyKey != null) { localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); - localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.noBody()); + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(smartTransferFundDvpTicket); + localVarRequestBuilder.method( + "PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } diff --git a/src/main/java/com/fireblocks/sdk/model/AbiFunction.java b/src/main/java/com/fireblocks/sdk/model/AbiFunction.java index a12b194..8e8712b 100644 --- a/src/main/java/com/fireblocks/sdk/model/AbiFunction.java +++ b/src/main/java/com/fireblocks/sdk/model/AbiFunction.java @@ -124,7 +124,7 @@ public static TypeEnum fromValue(String value) { private TypeEnum type; public static final String JSON_PROPERTY_INPUTS = "inputs"; - private List inputs = new ArrayList<>(); + private List inputs; public static final String JSON_PROPERTY_OUTPUTS = "outputs"; private List outputs; @@ -221,15 +221,15 @@ public AbiFunction addInputsItem(Parameter inputsItem) { * * @return inputs */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_INPUTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getInputs() { return inputs; } @JsonProperty(JSON_PROPERTY_INPUTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setInputs(List inputs) { this.inputs = inputs; } diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java index 81c0b7a..1987b71 100644 --- a/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.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; @@ -27,7 +29,10 @@ @JsonPropertyOrder({ ContractDeployRequest.JSON_PROPERTY_ASSET_ID, ContractDeployRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, - ContractDeployRequest.JSON_PROPERTY_CONSTRUCTOR_PARAMETERS + ContractDeployRequest.JSON_PROPERTY_CONSTRUCTOR_PARAMETERS, + ContractDeployRequest.JSON_PROPERTY_USE_GASLESS, + ContractDeployRequest.JSON_PROPERTY_FEE, + ContractDeployRequest.JSON_PROPERTY_FEE_LEVEL }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ContractDeployRequest { @@ -40,6 +45,52 @@ public class ContractDeployRequest { public static final String JSON_PROPERTY_CONSTRUCTOR_PARAMETERS = "constructorParameters"; private List constructorParameters; + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + public ContractDeployRequest() {} public ContractDeployRequest assetId(String assetId) { @@ -121,6 +172,78 @@ public void setConstructorParameters(List constructorParamet this.constructorParameters = constructorParameters; } + public ContractDeployRequest useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 + * standard. When set to true, the transaction will be relayed by a designated relayer. The + * workspace must be configured to use Fireblocks gasless relay. + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + + public ContractDeployRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Max fee amount for the write function transaction. interchangeable with the + * 'feeLevel' field + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public ContractDeployRequest feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + /** Return true if this ContractDeployRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -134,12 +257,16 @@ public boolean equals(Object o) { return Objects.equals(this.assetId, contractDeployRequest.assetId) && Objects.equals(this.vaultAccountId, contractDeployRequest.vaultAccountId) && Objects.equals( - this.constructorParameters, contractDeployRequest.constructorParameters); + this.constructorParameters, contractDeployRequest.constructorParameters) + && Objects.equals(this.useGasless, contractDeployRequest.useGasless) + && Objects.equals(this.fee, contractDeployRequest.fee) + && Objects.equals(this.feeLevel, contractDeployRequest.feeLevel); } @Override public int hashCode() { - return Objects.hash(assetId, vaultAccountId, constructorParameters); + return Objects.hash( + assetId, vaultAccountId, constructorParameters, useGasless, fee, feeLevel); } @Override @@ -151,6 +278,9 @@ public String toString() { sb.append(" constructorParameters: ") .append(toIndentedString(constructorParameters)) .append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); sb.append("}"); return sb.toString(); } @@ -245,6 +375,40 @@ public String toUrlQueryString(String prefix) { } } + // add `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDoc.java b/src/main/java/com/fireblocks/sdk/model/ContractDoc.java index 7e6c1f7..61627d8 100644 --- a/src/main/java/com/fireblocks/sdk/model/ContractDoc.java +++ b/src/main/java/com/fireblocks/sdk/model/ContractDoc.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.HashMap; @@ -46,7 +47,7 @@ public class ContractDoc { private Map methods = new HashMap<>(); public static final String JSON_PROPERTY_VERSION = "version"; - private String version; + private BigDecimal version; public ContractDoc() {} @@ -150,7 +151,7 @@ public void setMethods(Map methods) { this.methods = methods; } - public ContractDoc version(String version) { + public ContractDoc version(BigDecimal version) { this.version = version; return this; } @@ -163,13 +164,13 @@ public ContractDoc version(String version) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VERSION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getVersion() { + public BigDecimal getVersion() { return version; } @JsonProperty(JSON_PROPERTY_VERSION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVersion(String version) { + public void setVersion(BigDecimal version) { this.version = version; } diff --git a/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java b/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java index caee38b..f438893 100644 --- a/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java +++ b/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java @@ -57,7 +57,7 @@ public class ContractTemplateDto { private String longDescription; public static final String JSON_PROPERTY_ABI = "abi"; - private List> abi = new ArrayList<>(); + private List abi = new ArrayList<>(); public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ContractAttributes attributes; @@ -253,12 +253,12 @@ public void setLongDescription(String longDescription) { this.longDescription = longDescription; } - public ContractTemplateDto abi(List> abi) { + public ContractTemplateDto abi(List abi) { this.abi = abi; return this; } - public ContractTemplateDto addAbiItem(List abiItem) { + public ContractTemplateDto addAbiItem(AbiFunction abiItem) { if (this.abi == null) { this.abi = new ArrayList<>(); } @@ -267,20 +267,20 @@ public ContractTemplateDto addAbiItem(List abiItem) { } /** - * Get abi + * The abi of the contract template. Necessary for displaying and for after deployment encoding * * @return abi */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ABI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List> getAbi() { + public List getAbi() { return abi; } @JsonProperty(JSON_PROPERTY_ABI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAbi(List> abi) { + public void setAbi(List abi) { this.abi = abi; } @@ -665,18 +665,19 @@ public String toUrlQueryString(String prefix) { for (int i = 0; i < getAbi().size(); i++) { if (getAbi().get(i) != null) { joiner.add( - String.format( - "%sabi%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getAbi().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); + getAbi().get(i) + .toUrlQueryString( + String.format( + "%sabi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); } } } diff --git a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java index 93227e9..59bec1f 100644 --- a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java @@ -100,7 +100,7 @@ public static TypeEnum fromValue(String value) { private ContractDoc docs; public static final String JSON_PROPERTY_ABI = "abi"; - private List> abi = new ArrayList<>(); + private List abi = new ArrayList<>(); public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ContractAttributes attributes; @@ -269,12 +269,12 @@ public void setDocs(ContractDoc docs) { this.docs = docs; } - public ContractUploadRequest abi(List> abi) { + public ContractUploadRequest abi(List abi) { this.abi = abi; return this; } - public ContractUploadRequest addAbiItem(List abiItem) { + public ContractUploadRequest addAbiItem(AbiFunction abiItem) { if (this.abi == null) { this.abi = new ArrayList<>(); } @@ -283,20 +283,20 @@ public ContractUploadRequest addAbiItem(List abiItem) { } /** - * Get abi + * The abi of the contract template. Necessary for displaying and for after deployment encoding * * @return abi */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ABI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List> getAbi() { + public List getAbi() { return abi; } @JsonProperty(JSON_PROPERTY_ABI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAbi(List> abi) { + public void setAbi(List abi) { this.abi = abi; } @@ -500,18 +500,19 @@ public String toUrlQueryString(String prefix) { for (int i = 0; i < getAbi().size(); i++) { if (getAbi().get(i) != null) { joiner.add( - String.format( - "%sabi%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getAbi().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); + getAbi().get(i) + .toUrlQueryString( + String.format( + "%sabi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); } } } diff --git a/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java index 9e2afdc..ae5f586 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java @@ -13,9 +13,11 @@ package com.fireblocks.sdk.model; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -27,7 +29,10 @@ CreateTokenRequestDto.JSON_PROPERTY_ASSET_ID, CreateTokenRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, CreateTokenRequestDto.JSON_PROPERTY_CREATE_PARAMS, - CreateTokenRequestDto.JSON_PROPERTY_DISPLAY_NAME + CreateTokenRequestDto.JSON_PROPERTY_DISPLAY_NAME, + CreateTokenRequestDto.JSON_PROPERTY_USE_GASLESS, + CreateTokenRequestDto.JSON_PROPERTY_FEE, + CreateTokenRequestDto.JSON_PROPERTY_FEE_LEVEL }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateTokenRequestDto { @@ -46,6 +51,52 @@ public class CreateTokenRequestDto { public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; private String displayName; + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + public CreateTokenRequestDto() {} public CreateTokenRequestDto blockchainId(String blockchainId) { @@ -163,6 +214,78 @@ public void setDisplayName(String displayName) { this.displayName = displayName; } + public CreateTokenRequestDto useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 + * standard. When set to true, the transaction will be relayed by a designated relayer. The + * workspace must be configured to use Fireblocks gasless relay. + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + + public CreateTokenRequestDto fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Max fee amount for the write function transaction. interchangeable with the + * 'feeLevel' field + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public CreateTokenRequestDto feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + /** Return true if this CreateTokenRequestDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -177,12 +300,23 @@ public boolean equals(Object o) { && Objects.equals(this.assetId, createTokenRequestDto.assetId) && Objects.equals(this.vaultAccountId, createTokenRequestDto.vaultAccountId) && Objects.equals(this.createParams, createTokenRequestDto.createParams) - && Objects.equals(this.displayName, createTokenRequestDto.displayName); + && Objects.equals(this.displayName, createTokenRequestDto.displayName) + && Objects.equals(this.useGasless, createTokenRequestDto.useGasless) + && Objects.equals(this.fee, createTokenRequestDto.fee) + && Objects.equals(this.feeLevel, createTokenRequestDto.feeLevel); } @Override public int hashCode() { - return Objects.hash(blockchainId, assetId, vaultAccountId, createParams, displayName); + return Objects.hash( + blockchainId, + assetId, + vaultAccountId, + createParams, + displayName, + useGasless, + fee, + feeLevel); } @Override @@ -194,6 +328,9 @@ public String toString() { sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); sb.append(" createParams: ").append(toIndentedString(createParams)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); sb.append("}"); return sb.toString(); } @@ -296,6 +433,40 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java b/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java index 5447291..ed5b328 100644 --- a/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java @@ -13,9 +13,11 @@ package com.fireblocks.sdk.model; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -30,8 +32,39 @@ }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class RelatedRequestDto { + /** The status of the request */ + public enum StatusEnum { + DEACTIVATING("deactivating"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_STATUS = "status"; - private RelatedRequestStatusType status; + private StatusEnum status; public static final String JSON_PROPERTY_IN_PROGRESS = "inProgress"; private Boolean inProgress; @@ -44,26 +77,26 @@ public class RelatedRequestDto { public RelatedRequestDto() {} - public RelatedRequestDto status(RelatedRequestStatusType status) { + public RelatedRequestDto status(StatusEnum status) { this.status = status; return this; } /** - * Get status + * The status of the request * * @return status */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public RelatedRequestStatusType getStatus() { + public StatusEnum getStatus() { return status; } @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatus(RelatedRequestStatusType status) { + public void setStatus(StatusEnum status) { this.status = status; } diff --git a/src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java b/src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java deleted file mode 100644 index e3a810e..0000000 --- a/src/main/java/com/fireblocks/sdk/model/RelatedRequestStatusType.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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/ScreeningUpdateConfigurationsRequest.java b/src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurations.java similarity index 85% rename from src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsRequest.java rename to src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurations.java index ecd8fe5..942f913 100644 --- a/src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurations.java @@ -21,22 +21,22 @@ import java.util.Objects; import java.util.StringJoiner; -/** ScreeningUpdateConfigurationsRequest */ +/** ScreeningUpdateConfigurations */ @JsonPropertyOrder({ - ScreeningUpdateConfigurationsRequest.JSON_PROPERTY_DISABLE_BYPASS, - ScreeningUpdateConfigurationsRequest.JSON_PROPERTY_DISABLE_UNFREEZE + ScreeningUpdateConfigurations.JSON_PROPERTY_DISABLE_BYPASS, + ScreeningUpdateConfigurations.JSON_PROPERTY_DISABLE_UNFREEZE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ScreeningUpdateConfigurationsRequest { +public class ScreeningUpdateConfigurations { public static final String JSON_PROPERTY_DISABLE_BYPASS = "disableBypass"; private Boolean disableBypass; public static final String JSON_PROPERTY_DISABLE_UNFREEZE = "disableUnfreeze"; private Boolean disableUnfreeze; - public ScreeningUpdateConfigurationsRequest() {} + public ScreeningUpdateConfigurations() {} - public ScreeningUpdateConfigurationsRequest disableBypass(Boolean disableBypass) { + public ScreeningUpdateConfigurations disableBypass(Boolean disableBypass) { this.disableBypass = disableBypass; return this; } @@ -59,7 +59,7 @@ public void setDisableBypass(Boolean disableBypass) { this.disableBypass = disableBypass; } - public ScreeningUpdateConfigurationsRequest disableUnfreeze(Boolean disableUnfreeze) { + public ScreeningUpdateConfigurations disableUnfreeze(Boolean disableUnfreeze) { this.disableUnfreeze = disableUnfreeze; return this; } @@ -83,7 +83,7 @@ public void setDisableUnfreeze(Boolean disableUnfreeze) { this.disableUnfreeze = disableUnfreeze; } - /** Return true if this ScreeningUpdateConfigurationsRequest object is equal to o. */ + /** Return true if this ScreeningUpdateConfigurations object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,12 +92,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ScreeningUpdateConfigurationsRequest screeningUpdateConfigurationsRequest = - (ScreeningUpdateConfigurationsRequest) o; - return Objects.equals( - this.disableBypass, screeningUpdateConfigurationsRequest.disableBypass) + ScreeningUpdateConfigurations screeningUpdateConfigurations = + (ScreeningUpdateConfigurations) o; + return Objects.equals(this.disableBypass, screeningUpdateConfigurations.disableBypass) && Objects.equals( - this.disableUnfreeze, screeningUpdateConfigurationsRequest.disableUnfreeze); + this.disableUnfreeze, screeningUpdateConfigurations.disableUnfreeze); } @Override @@ -108,7 +107,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ScreeningUpdateConfigurationsRequest {\n"); + sb.append("class ScreeningUpdateConfigurations {\n"); sb.append(" disableBypass: ").append(toIndentedString(disableBypass)).append("\n"); sb.append(" disableUnfreeze: ").append(toIndentedString(disableUnfreeze)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java b/src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java new file mode 100644 index 0000000..549204a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** SearchNetworkIdsResponse */ +@JsonPropertyOrder({ + SearchNetworkIdsResponse.JSON_PROPERTY_DATA, + SearchNetworkIdsResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SearchNetworkIdsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public SearchNetworkIdsResponse() {} + + public SearchNetworkIdsResponse data(List data) { + this.data = data; + return this; + } + + public SearchNetworkIdsResponse addDataItem(NetworkIdResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + public SearchNetworkIdsResponse next(String next) { + this.next = next; + return this; + } + + /** + * Get next + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this SearchNetworkIdsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchNetworkIdsResponse searchNetworkIdsResponse = (SearchNetworkIdsResponse) o; + return Objects.equals(this.data, searchNetworkIdsResponse.data) + && Objects.equals(this.next, searchNetworkIdsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchNetworkIdsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicket.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicket.java new file mode 100644 index 0000000..412ca1b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicket.java @@ -0,0 +1,258 @@ +/* + * 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; + +/** SmartTransferFundDvpTicket */ +@JsonPropertyOrder({ + SmartTransferFundDvpTicket.JSON_PROPERTY_FEE, + SmartTransferFundDvpTicket.JSON_PROPERTY_FEE_LEVEL, + SmartTransferFundDvpTicket.JSON_PROPERTY_NOTE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SmartTransferFundDvpTicket { + 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 SmartTransferFundDvpTicket() {} + + public SmartTransferFundDvpTicket 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 SmartTransferFundDvpTicket 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 SmartTransferFundDvpTicket 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 SmartTransferFundDvpTicket object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmartTransferFundDvpTicket smartTransferFundDvpTicket = (SmartTransferFundDvpTicket) o; + return Objects.equals(this.fee, smartTransferFundDvpTicket.fee) + && Objects.equals(this.feeLevel, smartTransferFundDvpTicket.feeLevel) + && Objects.equals(this.note, smartTransferFundDvpTicket.note); + } + + @Override + public int hashCode() { + return Objects.hash(fee, feeLevel, note); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SmartTransferFundDvpTicket {\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 `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/SmartTransferTicket.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java index 7e36774..8033516 100644 --- a/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferTicket.java @@ -33,6 +33,8 @@ SmartTransferTicket.JSON_PROPERTY_TYPE, SmartTransferTicket.JSON_PROPERTY_DIRECTION, SmartTransferTicket.JSON_PROPERTY_STATUS, + SmartTransferTicket.JSON_PROPERTY_DVP_EXECUTION_STATUS, + SmartTransferTicket.JSON_PROPERTY_ORDER_CREATED_BY_NETWORK_ID, SmartTransferTicket.JSON_PROPERTY_TERMS, SmartTransferTicket.JSON_PROPERTY_EXPIRES_IN, SmartTransferTicket.JSON_PROPERTY_EXPIRES_AT, @@ -177,6 +179,56 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_STATUS = "status"; private StatusEnum status; + /** Current status of DVP execution */ + public enum DvpExecutionStatusEnum { + STARTED("STARTED"), + + CREATING_ORDER("CREATING_ORDER"), + + ORDER_CREATED("ORDER_CREATED"), + + FULFILLING("FULFILLING"), + + FULFILLING_ORDER_FAILED("FULFILLING_ORDER_FAILED"), + + CREATING_ORDER_FAILED("CREATING_ORDER_FAILED"), + + FULFILLED("FULFILLED"); + + private String value; + + DvpExecutionStatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DvpExecutionStatusEnum fromValue(String value) { + for (DvpExecutionStatusEnum b : DvpExecutionStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_DVP_EXECUTION_STATUS = "dvpExecutionStatus"; + private DvpExecutionStatusEnum dvpExecutionStatus; + + public static final String JSON_PROPERTY_ORDER_CREATED_BY_NETWORK_ID = + "orderCreatedByNetworkId"; + private String orderCreatedByNetworkId; + public static final String JSON_PROPERTY_TERMS = "terms"; private List terms; @@ -320,6 +372,52 @@ public void setStatus(StatusEnum status) { this.status = status; } + public SmartTransferTicket dvpExecutionStatus(DvpExecutionStatusEnum dvpExecutionStatus) { + this.dvpExecutionStatus = dvpExecutionStatus; + return this; + } + + /** + * Current status of DVP execution + * + * @return dvpExecutionStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DVP_EXECUTION_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DvpExecutionStatusEnum getDvpExecutionStatus() { + return dvpExecutionStatus; + } + + @JsonProperty(JSON_PROPERTY_DVP_EXECUTION_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDvpExecutionStatus(DvpExecutionStatusEnum dvpExecutionStatus) { + this.dvpExecutionStatus = dvpExecutionStatus; + } + + public SmartTransferTicket orderCreatedByNetworkId(String orderCreatedByNetworkId) { + this.orderCreatedByNetworkId = orderCreatedByNetworkId; + return this; + } + + /** + * ID of network profile that created order + * + * @return orderCreatedByNetworkId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER_CREATED_BY_NETWORK_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrderCreatedByNetworkId() { + return orderCreatedByNetworkId; + } + + @JsonProperty(JSON_PROPERTY_ORDER_CREATED_BY_NETWORK_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOrderCreatedByNetworkId(String orderCreatedByNetworkId) { + this.orderCreatedByNetworkId = orderCreatedByNetworkId; + } + public SmartTransferTicket terms(List terms) { this.terms = terms; return this; @@ -711,6 +809,9 @@ public boolean equals(Object o) { && Objects.equals(this.type, smartTransferTicket.type) && Objects.equals(this.direction, smartTransferTicket.direction) && Objects.equals(this.status, smartTransferTicket.status) + && Objects.equals(this.dvpExecutionStatus, smartTransferTicket.dvpExecutionStatus) + && Objects.equals( + this.orderCreatedByNetworkId, smartTransferTicket.orderCreatedByNetworkId) && Objects.equals(this.terms, smartTransferTicket.terms) && Objects.equals(this.expiresIn, smartTransferTicket.expiresIn) && Objects.equals(this.expiresAt, smartTransferTicket.expiresAt) @@ -738,6 +839,8 @@ public int hashCode() { type, direction, status, + dvpExecutionStatus, + orderCreatedByNetworkId, terms, expiresIn, expiresAt, @@ -764,6 +867,12 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" direction: ").append(toIndentedString(direction)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" dvpExecutionStatus: ") + .append(toIndentedString(dvpExecutionStatus)) + .append("\n"); + sb.append(" orderCreatedByNetworkId: ") + .append(toIndentedString(orderCreatedByNetworkId)) + .append("\n"); sb.append(" terms: ").append(toIndentedString(terms)).append("\n"); sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); @@ -878,6 +987,32 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `dvpExecutionStatus` to the URL query string + if (getDvpExecutionStatus() != null) { + joiner.add( + String.format( + "%sdvpExecutionStatus%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDvpExecutionStatus()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `orderCreatedByNetworkId` to the URL query string + if (getOrderCreatedByNetworkId() != null) { + joiner.add( + String.format( + "%sorderCreatedByNetworkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOrderCreatedByNetworkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `terms` to the URL query string if (getTerms() != null) { for (int i = 0; i < getTerms().size(); i++) { diff --git a/src/main/java/com/fireblocks/sdk/model/SmartTransferTicketTerm.java b/src/main/java/com/fireblocks/sdk/model/SmartTransferTicketTerm.java index 6ce492b..2366e2d 100644 --- a/src/main/java/com/fireblocks/sdk/model/SmartTransferTicketTerm.java +++ b/src/main/java/com/fireblocks/sdk/model/SmartTransferTicketTerm.java @@ -30,6 +30,7 @@ SmartTransferTicketTerm.JSON_PROPERTY_TICKET_ID, SmartTransferTicketTerm.JSON_PROPERTY_ASSET, SmartTransferTicketTerm.JSON_PROPERTY_AMOUNT, + SmartTransferTicketTerm.JSON_PROPERTY_DVP_SRC_DST_VAULT_ID, SmartTransferTicketTerm.JSON_PROPERTY_AMOUNT_USD, SmartTransferTicketTerm.JSON_PROPERTY_FROM_NETWORK_ID, SmartTransferTicketTerm.JSON_PROPERTY_FROM_NETWORK_ID_NAME, @@ -56,6 +57,9 @@ public class SmartTransferTicketTerm { public static final String JSON_PROPERTY_AMOUNT = "amount"; private String amount; + public static final String JSON_PROPERTY_DVP_SRC_DST_VAULT_ID = "dvpSrcDstVaultId"; + private String dvpSrcDstVaultId; + public static final String JSON_PROPERTY_AMOUNT_USD = "amountUsd"; private String amountUsd; @@ -283,6 +287,29 @@ public void setAmount(String amount) { this.amount = amount; } + public SmartTransferTicketTerm dvpSrcDstVaultId(String dvpSrcDstVaultId) { + this.dvpSrcDstVaultId = dvpSrcDstVaultId; + return this; + } + + /** + * Identifier of the source and destination vault for DVP execution + * + * @return dvpSrcDstVaultId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DVP_SRC_DST_VAULT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDvpSrcDstVaultId() { + return dvpSrcDstVaultId; + } + + @JsonProperty(JSON_PROPERTY_DVP_SRC_DST_VAULT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDvpSrcDstVaultId(String dvpSrcDstVaultId) { + this.dvpSrcDstVaultId = dvpSrcDstVaultId; + } + public SmartTransferTicketTerm amountUsd(String amountUsd) { this.amountUsd = amountUsd; return this; @@ -550,6 +577,7 @@ public boolean equals(Object o) { && Objects.equals(this.ticketId, smartTransferTicketTerm.ticketId) && Objects.equals(this.asset, smartTransferTicketTerm.asset) && Objects.equals(this.amount, smartTransferTicketTerm.amount) + && Objects.equals(this.dvpSrcDstVaultId, smartTransferTicketTerm.dvpSrcDstVaultId) && Objects.equals(this.amountUsd, smartTransferTicketTerm.amountUsd) && Objects.equals(this.fromNetworkId, smartTransferTicketTerm.fromNetworkId) && Objects.equals(this.fromNetworkIdName, smartTransferTicketTerm.fromNetworkIdName) @@ -570,6 +598,7 @@ public int hashCode() { ticketId, asset, amount, + dvpSrcDstVaultId, amountUsd, fromNetworkId, fromNetworkIdName, @@ -591,6 +620,7 @@ public String toString() { sb.append(" ticketId: ").append(toIndentedString(ticketId)).append("\n"); sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" dvpSrcDstVaultId: ").append(toIndentedString(dvpSrcDstVaultId)).append("\n"); sb.append(" amountUsd: ").append(toIndentedString(amountUsd)).append("\n"); sb.append(" fromNetworkId: ").append(toIndentedString(fromNetworkId)).append("\n"); sb.append(" fromNetworkIdName: ") @@ -695,6 +725,19 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `dvpSrcDstVaultId` to the URL query string + if (getDvpSrcDstVaultId() != null) { + joiner.add( + String.format( + "%sdvpSrcDstVaultId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDvpSrcDstVaultId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `amountUsd` to the URL query string if (getAmountUsd() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java b/src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java index ce77da1..500dc08 100644 --- a/src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java @@ -26,7 +26,8 @@ UnstakeRequestDto.JSON_PROPERTY_ID, UnstakeRequestDto.JSON_PROPERTY_FEE, UnstakeRequestDto.JSON_PROPERTY_FEE_LEVEL, - UnstakeRequestDto.JSON_PROPERTY_TX_NOTE + UnstakeRequestDto.JSON_PROPERTY_TX_NOTE, + UnstakeRequestDto.JSON_PROPERTY_AMOUNT }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class UnstakeRequestDto { @@ -42,6 +43,9 @@ public class UnstakeRequestDto { public static final String JSON_PROPERTY_TX_NOTE = "txNote"; private String txNote; + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + public UnstakeRequestDto() {} public UnstakeRequestDto id(String id) { @@ -138,6 +142,31 @@ public void setTxNote(String txNote) { this.txNote = txNote; } + public UnstakeRequestDto amount(String amount) { + this.amount = amount; + return this; + } + + /** + * The number of tokens to unstake. This optional field is applicable only for liquid staking + * and allows for a partial unstake of the position. If not provided, the entire position will + * be unstaked by default. + * + * @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 UnstakeRequestDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -151,12 +180,13 @@ public boolean equals(Object o) { return Objects.equals(this.id, unstakeRequestDto.id) && Objects.equals(this.fee, unstakeRequestDto.fee) && Objects.equals(this.feeLevel, unstakeRequestDto.feeLevel) - && Objects.equals(this.txNote, unstakeRequestDto.txNote); + && Objects.equals(this.txNote, unstakeRequestDto.txNote) + && Objects.equals(this.amount, unstakeRequestDto.amount); } @Override public int hashCode() { - return Objects.hash(id, fee, feeLevel, txNote); + return Objects.hash(id, fee, feeLevel, txNote, amount); } @Override @@ -167,6 +197,7 @@ public String toString() { sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); sb.append(" txNote: ").append(toIndentedString(txNote)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append("}"); return sb.toString(); } @@ -258,6 +289,17 @@ public String toUrlQueryString(String prefix) { .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/WriteCallFunctionDto.java b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java index fcc850d..69aacab 100644 --- a/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java +++ b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java @@ -30,7 +30,9 @@ WriteCallFunctionDto.JSON_PROPERTY_AMOUNT, WriteCallFunctionDto.JSON_PROPERTY_FEE_LEVEL, WriteCallFunctionDto.JSON_PROPERTY_FEE, - WriteCallFunctionDto.JSON_PROPERTY_NOTE + WriteCallFunctionDto.JSON_PROPERTY_NOTE, + WriteCallFunctionDto.JSON_PROPERTY_USE_GASLESS, + WriteCallFunctionDto.JSON_PROPERTY_EXTERNAL_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class WriteCallFunctionDto { @@ -89,6 +91,12 @@ public static FeeLevelEnum fromValue(String value) { public static final String JSON_PROPERTY_NOTE = "note"; private String note; + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + public static final String JSON_PROPERTY_EXTERNAL_ID = "externalId"; + private String externalId; + public WriteCallFunctionDto() {} public WriteCallFunctionDto vaultAccountId(String vaultAccountId) { @@ -231,6 +239,55 @@ public void setNote(String note) { this.note = note; } + public WriteCallFunctionDto useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 + * standard. When set to true, the transaction will be relayed by a designated relayer. The + * workspace must be configured to use Fireblocks gasless relay. + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + + public WriteCallFunctionDto externalId(String externalId) { + this.externalId = externalId; + return this; + } + + /** + * External id that can be used to identify the transaction in your system. The unique + * identifier of the transaction outside of Fireblocks with max length of 255 characters + * + * @return externalId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExternalId() { + return externalId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExternalId(String externalId) { + this.externalId = externalId; + } + /** Return true if this WriteCallFunctionDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -246,12 +303,15 @@ public boolean equals(Object o) { && Objects.equals(this.amount, writeCallFunctionDto.amount) && Objects.equals(this.feeLevel, writeCallFunctionDto.feeLevel) && Objects.equals(this.fee, writeCallFunctionDto.fee) - && Objects.equals(this.note, writeCallFunctionDto.note); + && Objects.equals(this.note, writeCallFunctionDto.note) + && Objects.equals(this.useGasless, writeCallFunctionDto.useGasless) + && Objects.equals(this.externalId, writeCallFunctionDto.externalId); } @Override public int hashCode() { - return Objects.hash(vaultAccountId, abiFunction, amount, feeLevel, fee, note); + return Objects.hash( + vaultAccountId, abiFunction, amount, feeLevel, fee, note, useGasless, externalId); } @Override @@ -264,6 +324,8 @@ public String toString() { sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -373,6 +435,30 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `externalId` to the URL query string + if (getExternalId() != null) { + joiner.add( + String.format( + "%sexternalId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getExternalId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java b/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java index 4427504..945ae8d 100644 --- a/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java @@ -18,7 +18,7 @@ import com.fireblocks.sdk.model.ScreeningConfigurationsRequest; import com.fireblocks.sdk.model.ScreeningPolicyResponse; import com.fireblocks.sdk.model.ScreeningProviderRulesConfigurationResponse; -import com.fireblocks.sdk.model.ScreeningUpdateConfigurationsRequest; +import com.fireblocks.sdk.model.ScreeningUpdateConfigurations; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -104,9 +104,10 @@ public void updateAmlScreeningConfigurationTest() throws ApiException { */ @Test public void updateScreeningConfigurationTest() throws ApiException { + ScreeningUpdateConfigurations screeningUpdateConfigurations = null; String idempotencyKey = null; - CompletableFuture> response = - api.updateScreeningConfiguration(idempotencyKey); + CompletableFuture> response = + api.updateScreeningConfiguration(screeningUpdateConfigurations, idempotencyKey); } /** diff --git a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java index b40076e..f3aa6e4 100644 --- a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java @@ -104,9 +104,9 @@ public void getDeployedContractsTest() throws ApiException { BigDecimal pageSize = null; String contractAddress = null; String baseAssetId = null; - String templateId = null; + String contractTemplateId = null; CompletableFuture> response = api.getDeployedContracts( - pageCursor, pageSize, contractAddress, baseAssetId, templateId); + pageCursor, pageSize, contractAddress, baseAssetId, contractTemplateId); } } diff --git a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java index 70acd37..4917823 100644 --- a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java @@ -21,6 +21,7 @@ import com.fireblocks.sdk.model.NetworkConnection; import com.fireblocks.sdk.model.NetworkConnectionResponse; import com.fireblocks.sdk.model.NetworkIdResponse; +import com.fireblocks.sdk.model.SearchNetworkIdsResponse; import com.fireblocks.sdk.model.SetNetworkIdDiscoverabilityRequest; import com.fireblocks.sdk.model.SetNetworkIdNameRequest; import com.fireblocks.sdk.model.SetNetworkIdResponse; @@ -28,6 +29,7 @@ import com.fireblocks.sdk.model.SetRoutingPolicyRequest; import com.fireblocks.sdk.model.SetRoutingPolicyResponse; import com.fireblocks.sdk.model.ThirdPartyRouting; +import java.math.BigDecimal; import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -270,6 +272,35 @@ public void getRoutingPolicyAssetGroupsTest() throws ApiException { CompletableFuture>> response = api.getRoutingPolicyAssetGroups(); } + /** + * Search network IDs, both local IDs and discoverable remote IDs + * + *

Retrieves a list of all local and discoverable remote network IDs. Can be filtered. + * **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines + * how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below + * for each asset type: - **None**; Defines the profile routing to no destination for that asset + * type. Incoming transactions to asset types routed to `None` will fail. - + * **Custom**; Route to an account that you choose. If you remove the account, incoming + * transactions will fail until you choose another one. - **Default**; Use the routing specified + * by the network profile the connection is connected to. This scheme is also referred to as + * \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → + * **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - + * Network Connection FIAT → **Default** - **Note**: By default, Custom routing scheme uses + * (`dstId` = `0`, `dstType` = `VAULT`). + * + * @throws ApiException if the Api call fails + */ + @Test + public void searchNetworkIdsTest() throws ApiException { + String search = null; + Boolean excludeSelf = null; + Boolean excludeConnected = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.searchNetworkIds(search, excludeSelf, excludeConnected, pageCursor, pageSize); + } + /** * Update network ID's discoverability. * diff --git a/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java b/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java index 3cff3bc..4b0ea8e 100644 --- a/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.model.SmartTransferApproveTerm; import com.fireblocks.sdk.model.SmartTransferCreateTicket; import com.fireblocks.sdk.model.SmartTransferCreateTicketTerm; +import com.fireblocks.sdk.model.SmartTransferFundDvpTicket; import com.fireblocks.sdk.model.SmartTransferFundTerm; import com.fireblocks.sdk.model.SmartTransferManuallyFundTerm; import com.fireblocks.sdk.model.SmartTransferSetTicketExpiration; @@ -161,10 +162,11 @@ public void fulfillTicketTest() throws ApiException { */ @Test public void fundDvpTicketTest() throws ApiException { + SmartTransferFundDvpTicket smartTransferFundDvpTicket = null; String ticketId = null; String idempotencyKey = null; CompletableFuture> response = - api.fundDvpTicket(ticketId, idempotencyKey); + api.fundDvpTicket(smartTransferFundDvpTicket, ticketId, idempotencyKey); } /** diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java index 712265a..00ce44b 100644 --- a/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java @@ -42,4 +42,22 @@ public void vaultAccountIdTest() { public void constructorParametersTest() { // TODO: test constructorParameters } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java index 3d5026f..f7b4664 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java @@ -54,4 +54,22 @@ public void createParamsTest() { public void displayNameTest() { // TODO: test displayName } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java index d466a73..2f1ce4c 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java @@ -66,4 +66,10 @@ public void feeLevelTest() { public void idTest() { // TODO: test id } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } } diff --git a/src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java b/src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java deleted file mode 100644 index 9347c8a..0000000 --- a/src/test/java/com/fireblocks/sdk/model/RelatedRequestStatusTypeTest.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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/ScreeningUpdateConfigurationsRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsTest.java similarity index 63% rename from src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsRequestTest.java rename to src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsTest.java index 93afc5b..56f1166 100644 --- a/src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ScreeningUpdateConfigurationsTest.java @@ -15,15 +15,14 @@ import org.junit.Test; -/** Model tests for ScreeningUpdateConfigurationsRequest */ -public class ScreeningUpdateConfigurationsRequestTest { - private final ScreeningUpdateConfigurationsRequest model = - new ScreeningUpdateConfigurationsRequest(); +/** Model tests for ScreeningUpdateConfigurations */ +public class ScreeningUpdateConfigurationsTest { + private final ScreeningUpdateConfigurations model = new ScreeningUpdateConfigurations(); - /** Model tests for ScreeningUpdateConfigurationsRequest */ + /** Model tests for ScreeningUpdateConfigurations */ @Test - public void testScreeningUpdateConfigurationsRequest() { - // TODO: test ScreeningUpdateConfigurationsRequest + public void testScreeningUpdateConfigurations() { + // TODO: test ScreeningUpdateConfigurations } /** Test the property 'disableBypass' */ diff --git a/src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.java new file mode 100644 index 0000000..8119c88 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.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 SearchNetworkIdsResponse */ +public class SearchNetworkIdsResponseTest { + private final SearchNetworkIdsResponse model = new SearchNetworkIdsResponse(); + + /** Model tests for SearchNetworkIdsResponse */ + @Test + public void testSearchNetworkIdsResponse() { + // TODO: test SearchNetworkIdsResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicketTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicketTest.java new file mode 100644 index 0000000..3550e46 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferFundDvpTicketTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for SmartTransferFundDvpTicket */ +public class SmartTransferFundDvpTicketTest { + private final SmartTransferFundDvpTicket model = new SmartTransferFundDvpTicket(); + + /** Model tests for SmartTransferFundDvpTicket */ + @Test + public void testSmartTransferFundDvpTicket() { + // TODO: test SmartTransferFundDvpTicket + } + + /** 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/SmartTransferTicketTermTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTermTest.java index bfb750a..1f54223 100644 --- a/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTermTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTermTest.java @@ -49,6 +49,12 @@ public void amountTest() { // TODO: test amount } + /** Test the property 'dvpSrcDstVaultId' */ + @Test + public void dvpSrcDstVaultIdTest() { + // TODO: test dvpSrcDstVaultId + } + /** Test the property 'amountUsd' */ @Test public void amountUsdTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTest.java b/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTest.java index 6a6d075..f7d5472 100644 --- a/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTest.java @@ -49,6 +49,18 @@ public void statusTest() { // TODO: test status } + /** Test the property 'dvpExecutionStatus' */ + @Test + public void dvpExecutionStatusTest() { + // TODO: test dvpExecutionStatus + } + + /** Test the property 'orderCreatedByNetworkId' */ + @Test + public void orderCreatedByNetworkIdTest() { + // TODO: test orderCreatedByNetworkId + } + /** Test the property 'terms' */ @Test public void termsTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java index 916d677..f330bb2 100644 --- a/src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java @@ -48,4 +48,10 @@ public void feeLevelTest() { public void txNoteTest() { // TODO: test txNote } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } } diff --git a/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java index a9be73e..4ff984f 100644 --- a/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java @@ -60,4 +60,16 @@ public void feeTest() { public void noteTest() { // TODO: test note } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'externalId' */ + @Test + public void externalIdTest() { + // TODO: test externalId + } }