From 366c828866959187f400119cc5af5d56afc82977 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Wed, 18 Jun 2025 13:24:09 +0000 Subject: [PATCH] Generated SDK #4009 --- .openapi-generator/FILES | 12 +- README.md | 11 +- api/openapi.yaml | 288 ++++++++++++++++- build.gradle | 2 +- ...mplianceResult.md => ComplianceResults.md} | 2 +- docs/FeeInfo.md | 13 + docs/MergeStakeAccountsRequest.md | 17 + docs/MergeStakeAccountsResponse.md | 13 + docs/StakingApi.md | 88 +++++ docs/TransactionResponse.md | 2 +- pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../com/fireblocks/sdk/api/StakingApi.java | 99 ++++++ ...anceResult.java => ComplianceResults.java} | 48 +-- .../com/fireblocks/sdk/model/FeeInfo.java | 206 +++++++++++- .../sdk/model/MergeStakeAccountsRequest.java | 305 ++++++++++++++++++ .../sdk/model/MergeStakeAccountsResponse.java | 140 ++++++++ .../sdk/model/TransactionResponse.java | 40 +-- .../fireblocks/sdk/api/StakingApiTest.java | 18 ++ ...ltTest.java => ComplianceResultsTest.java} | 12 +- .../com/fireblocks/sdk/model/FeeInfoTest.java | 24 ++ .../model/MergeStakeAccountsRequestTest.java | 57 ++++ .../model/MergeStakeAccountsResponseTest.java | 33 ++ .../sdk/model/TransactionResponseTest.java | 6 +- 24 files changed, 1359 insertions(+), 81 deletions(-) rename docs/{ComplianceResult.md => ComplianceResults.md} (99%) create mode 100644 docs/MergeStakeAccountsRequest.md create mode 100644 docs/MergeStakeAccountsResponse.md rename src/main/java/com/fireblocks/sdk/model/{ComplianceResult.java => ComplianceResults.java} (90%) create mode 100644 src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsResponse.java rename src/test/java/com/fireblocks/sdk/model/{ComplianceResultTest.java => ComplianceResultsTest.java} (79%) create mode 100644 src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsResponseTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 53a65de0..b9e31156 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -92,9 +92,9 @@ docs/CollectionTokenMetadataAttributeDto.md docs/CollectionTokenMetadataDto.md docs/CollectionType.md docs/ComplianceApi.md -docs/ComplianceResult.md docs/ComplianceResultFullPayload.md docs/ComplianceResultStatusesEnum.md +docs/ComplianceResults.md docs/ComplianceScreeningConfigurationApi.md docs/ComplianceScreeningResult.md docs/ComplianceScreeningResultFullPayload.md @@ -301,6 +301,8 @@ docs/ListBlockchainsResponse.md docs/ListOwnedCollectionsResponse.md docs/ListOwnedTokensResponse.md docs/MediaEntityResponse.md +docs/MergeStakeAccountsRequest.md +docs/MergeStakeAccountsResponse.md docs/ModifySigningKeyAgentIdDto.md docs/ModifySigningKeyDto.md docs/ModifyValidationKeyDto.md @@ -774,9 +776,9 @@ src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java src/main/java/com/fireblocks/sdk/model/CollectionType.java -src/main/java/com/fireblocks/sdk/model/ComplianceResult.java src/main/java/com/fireblocks/sdk/model/ComplianceResultFullPayload.java src/main/java/com/fireblocks/sdk/model/ComplianceResultStatusesEnum.java +src/main/java/com/fireblocks/sdk/model/ComplianceResults.java src/main/java/com/fireblocks/sdk/model/ComplianceScreeningResult.java src/main/java/com/fireblocks/sdk/model/ComplianceScreeningResultFullPayload.java src/main/java/com/fireblocks/sdk/model/ConfigChangeRequestStatus.java @@ -967,6 +969,8 @@ src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java src/main/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponse.java src/main/java/com/fireblocks/sdk/model/ListOwnedTokensResponse.java src/main/java/com/fireblocks/sdk/model/MediaEntityResponse.java +src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsRequest.java +src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsResponse.java src/main/java/com/fireblocks/sdk/model/ModifySigningKeyAgentIdDto.java src/main/java/com/fireblocks/sdk/model/ModifySigningKeyDto.java src/main/java/com/fireblocks/sdk/model/ModifyValidationKeyDto.java @@ -1402,7 +1406,7 @@ src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultFullPayloadTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultStatusesEnumTest.java -src/test/java/com/fireblocks/sdk/model/ComplianceResultTest.java +src/test/java/com/fireblocks/sdk/model/ComplianceResultsTest.java src/test/java/com/fireblocks/sdk/model/ComplianceScreeningResultFullPayloadTest.java src/test/java/com/fireblocks/sdk/model/ComplianceScreeningResultTest.java src/test/java/com/fireblocks/sdk/model/ConfigChangeRequestStatusTest.java @@ -1593,6 +1597,8 @@ src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListOwnedTokensResponseTest.java src/test/java/com/fireblocks/sdk/model/MediaEntityResponseTest.java +src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsRequestTest.java +src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsResponseTest.java src/test/java/com/fireblocks/sdk/model/ModifySigningKeyAgentIdDtoTest.java src/test/java/com/fireblocks/sdk/model/ModifySigningKeyDtoTest.java src/test/java/com/fireblocks/sdk/model/ModifyValidationKeyDtoTest.java diff --git a/README.md b/README.md index 2385ef1c..94bbaf8e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 10.2.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:10.2.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-10.2.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -332,6 +332,7 @@ Class | Method | HTTP request | Description *StakingApi* | [**getProviders**](docs/StakingApi.md#getProviders) | **GET** /staking/providers | List staking providers details *StakingApi* | [**getSummary**](docs/StakingApi.md#getSummary) | **GET** /staking/positions/summary | Get staking summary details *StakingApi* | [**getSummaryByVault**](docs/StakingApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | Get staking summary details by vault +*StakingApi* | [**mergeStakeAccounts**](docs/StakingApi.md#mergeStakeAccounts) | **POST** /staking/chains/{chainDescriptor}/merge | Execute a Merge operation on SOL/SOL_TEST stake accounts *StakingApi* | [**split**](docs/StakingApi.md#split) | **POST** /staking/chains/{chainDescriptor}/split | Execute a Split operation on SOL/SOL_TEST stake account *StakingApi* | [**stake**](docs/StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation *StakingApi* | [**unstake**](docs/StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation @@ -504,9 +505,9 @@ Class | Method | HTTP request | Description - [CollectionTokenMetadataAttributeDto](docs/CollectionTokenMetadataAttributeDto.md) - [CollectionTokenMetadataDto](docs/CollectionTokenMetadataDto.md) - [CollectionType](docs/CollectionType.md) - - [ComplianceResult](docs/ComplianceResult.md) - [ComplianceResultFullPayload](docs/ComplianceResultFullPayload.md) - [ComplianceResultStatusesEnum](docs/ComplianceResultStatusesEnum.md) + - [ComplianceResults](docs/ComplianceResults.md) - [ComplianceScreeningResult](docs/ComplianceScreeningResult.md) - [ComplianceScreeningResultFullPayload](docs/ComplianceScreeningResultFullPayload.md) - [ConfigChangeRequestStatus](docs/ConfigChangeRequestStatus.md) @@ -697,6 +698,8 @@ Class | Method | HTTP request | Description - [ListOwnedCollectionsResponse](docs/ListOwnedCollectionsResponse.md) - [ListOwnedTokensResponse](docs/ListOwnedTokensResponse.md) - [MediaEntityResponse](docs/MediaEntityResponse.md) + - [MergeStakeAccountsRequest](docs/MergeStakeAccountsRequest.md) + - [MergeStakeAccountsResponse](docs/MergeStakeAccountsResponse.md) - [ModifySigningKeyAgentIdDto](docs/ModifySigningKeyAgentIdDto.md) - [ModifySigningKeyDto](docs/ModifySigningKeyDto.md) - [ModifyValidationKeyDto](docs/ModifyValidationKeyDto.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8b26ddde..87f20d47 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -591,6 +591,7 @@ paths: summary: Rename a vault account tags: - Vaults + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -1963,6 +1964,7 @@ paths: summary: Assign AML customer reference ID tags: - Vaults + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -4075,6 +4077,7 @@ paths: tags: - Workspace x-internal: true + x-rate-limit-category: write x-accepts: application/json /exchange_accounts: get: @@ -4157,6 +4160,7 @@ paths: summary: Add an exchange account tags: - Exchange accounts + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -4648,6 +4652,7 @@ paths: summary: List fiat accounts tags: - Fiat accounts + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -4710,6 +4715,7 @@ paths: summary: Find a specific fiat account tags: - Fiat accounts + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -4786,6 +4792,7 @@ paths: summary: Redeem funds to DDA tags: - Fiat accounts + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -4871,6 +4878,7 @@ paths: summary: Deposit funds from DDA tags: - Fiat accounts + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -5126,6 +5134,7 @@ paths: summary: Update network connection routing policy. tags: - Network connections + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -5198,6 +5207,7 @@ paths: summary: Retrieve third-party network routing validation by asset type. tags: - Network connections + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -5275,6 +5285,7 @@ paths: summary: Deletes a network connection by ID tags: - Network connections + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -5678,6 +5689,7 @@ paths: summary: "Search network IDs, both local IDs and discoverable remote IDs" tags: - Network connections + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -5754,6 +5766,7 @@ paths: summary: Deletes specific network ID. tags: - Network connections + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -5828,6 +5841,7 @@ paths: summary: Returns specific network ID. tags: - Network connections + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -5908,6 +5922,7 @@ paths: summary: Update network id routing policy. tags: - Network connections + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -5992,6 +6007,7 @@ paths: summary: Update network ID's discoverability. tags: - Network connections + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -6076,6 +6092,7 @@ paths: summary: Update network ID's name. tags: - Network connections + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -6145,6 +6162,7 @@ paths: summary: List internal wallets tags: - Internal wallets + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -6213,6 +6231,7 @@ paths: summary: Create an internal wallet tags: - Internal wallets + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -6282,6 +6301,7 @@ paths: summary: Delete an internal wallet tags: - Internal wallets + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -6351,6 +6371,7 @@ paths: summary: Get an asset from an internal wallet tags: - Internal wallets + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -6443,6 +6464,7 @@ paths: summary: List assets in an internal wallet (Paginated) tags: - Internal wallets + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -6536,6 +6558,7 @@ paths: summary: Set an AML/KYT customer reference ID for an internal wallet tags: - Internal wallets + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -6618,6 +6641,7 @@ paths: summary: Delete a whitelisted address tags: - Internal wallets + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -6966,6 +6990,7 @@ paths: summary: Get list of signing keys tags: - Key Link (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -7046,6 +7071,7 @@ paths: summary: Add a new signing key tags: - Key Link (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -7111,6 +7137,7 @@ paths: summary: Get a signing key by `keyId` tags: - Key Link (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -7176,6 +7203,7 @@ paths: summary: Modify the signing by Fireblocks provided `keyId` tags: - Key Link (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -7245,6 +7273,7 @@ paths: the Fireblocks provided `keyId` tags: - Key Link (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -7344,6 +7373,7 @@ paths: summary: Get list of registered validation keys tags: - Key Link (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -7419,6 +7449,7 @@ paths: summary: Add a new validation key tags: - Key Link (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -7486,6 +7517,7 @@ paths: summary: Get a validation key by `keyId` tags: - Key Link (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -7552,6 +7584,7 @@ paths: summary: Disables a validation key tags: - Key Link (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -7605,6 +7638,7 @@ paths: summary: Get list of mpc keys tags: - Keys (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -7665,6 +7699,7 @@ paths: summary: Get list of mpc keys by `userId` tags: - Keys (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -10815,6 +10850,7 @@ paths: summary: Create a payout instruction set tags: - Payments - Payout + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -10904,6 +10940,7 @@ paths: summary: Execute a payout instruction set tags: - Payments - Payout + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -11015,6 +11052,7 @@ paths: summary: Get the status of a payout instruction set tags: - Payments - Payout + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -11329,6 +11367,7 @@ paths: summary: Get gas station settings tags: - Gas stations + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -11394,6 +11433,7 @@ paths: summary: Get gas station settings by asset tags: - Gas stations + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -11467,6 +11507,7 @@ paths: summary: Edit gas station settings tags: - Gas stations + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -11556,6 +11597,7 @@ paths: summary: Edit gas station settings for an asset tags: - Gas stations + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -11687,6 +11729,7 @@ paths: summary: Create user group tags: - User groups (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -11751,6 +11794,7 @@ paths: summary: Delete user group tags: - User groups (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -11943,6 +11987,7 @@ paths: summary: List users tags: - Users + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -12078,6 +12123,7 @@ paths: summary: add collateral tags: - Off exchanges + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -12145,6 +12191,7 @@ paths: summary: remove collateral tags: - Off exchanges + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -12213,6 +12260,7 @@ paths: summary: create settlement for a trader tags: - Off exchanges + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -12270,6 +12318,7 @@ paths: summary: get settlements transactions from exchange tags: - Off exchanges + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -12327,6 +12376,7 @@ paths: summary: Find a specific collateral exchange account tags: - Off exchanges + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -12565,6 +12615,7 @@ paths: summary: Get all webhooks tags: - Webhooks V2 (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -12635,6 +12686,7 @@ paths: summary: Create new webhook tags: - Webhooks V2 (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -15691,6 +15743,7 @@ paths: summary: List staking supported chains tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -15750,6 +15803,7 @@ paths: summary: Get chain-specific staking summary tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -15825,6 +15879,7 @@ paths: summary: Initiate Stake Operation tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -15899,6 +15954,7 @@ paths: summary: Execute an Unstake operation tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -15973,6 +16029,7 @@ paths: summary: Execute a Withdraw operation tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -16051,6 +16108,7 @@ paths: summary: Execute a Claim Rewards operation tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -16132,6 +16190,7 @@ paths: summary: Execute a Split operation on SOL/SOL_TEST stake account tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -16156,6 +16215,91 @@ paths: \ idempotency_key);" x-content-type: application/json x-accepts: application/json + /staking/chains/{chainDescriptor}/merge: + post: + description: Perform a Solana Merge of two active stake accounts into one. + operationId: mergeStakeAccounts + parameters: + - description: The protocol identifier (e.g. "SOL"/"SOL_TEST") to use + example: SOL + explode: false + in: path + name: chainDescriptor + required: true + schema: + enum: + - SOL + - SOL_TEST + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MergeStakeAccountsRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/MergeStakeAccountsResponse' + description: Merge action has been executed successfully on vault and is + associated with 201 status code. + 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: Execute a Merge operation on SOL/SOL_TEST stake accounts + tags: + - Staking + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.staking.mergeStakeAccounts(stakingApiMergeStakeAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.staking().mergeStakeAccounts(mergeStakeAccountsRequest,\ + \ chainDescriptor, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.staking.merge_stake_accounts(merge_stake_accounts_request,\ + \ chain_descriptor, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.staking.mergeStakeAccounts(stakingApiMergeStakeAccountsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.staking().mergeStakeAccounts(mergeStakeAccountsRequest, chainDescriptor,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.staking.merge_stake_accounts(merge_stake_accounts_request,\ + \ chain_descriptor, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /staking/positions: get: description: "Return detailed information on all staking positions, including\ @@ -16195,6 +16339,7 @@ paths: summary: List staking positions details tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -16264,6 +16409,7 @@ paths: summary: Get staking summary details tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -16347,6 +16493,7 @@ paths: summary: Get staking summary details by vault tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -16407,6 +16554,7 @@ paths: summary: Get staking position details tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -16452,6 +16600,7 @@ paths: summary: List staking providers details tags: - Staking + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -16519,6 +16668,7 @@ paths: summary: Approve staking terms of service tags: - Staking + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -17450,6 +17600,7 @@ paths: summary: Update token ownership status tags: - NFTs + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -17525,6 +17676,7 @@ paths: summary: Update tokens ownership status tags: - NFTs + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -17601,6 +17753,7 @@ paths: summary: Update tokens ownership spam property tags: - NFTs + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -18064,6 +18217,7 @@ paths: tags: - Travel Rule x-internal: true + x-rate-limit-category: write x-content-type: application/json x-accepts: application/json /screening/travel_rule/transaction/validate/full: @@ -18120,6 +18274,7 @@ paths: summary: Validate Full Travel Rule Transaction tags: - Travel Rule + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -18185,6 +18340,7 @@ paths: summary: Get VASP details tags: - Travel Rule + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18302,6 +18458,7 @@ paths: summary: Get All VASPs tags: - Travel Rule + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18368,6 +18525,7 @@ paths: summary: Add jsonDidKey to VASP details tags: - Travel Rule + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -18513,6 +18671,7 @@ paths: summary: Assign VASP to vault tags: - Travel Rule + x-rate-limit-category: write x-readme: code-samples: - language: javascript @@ -18560,6 +18719,7 @@ paths: summary: Travel Rule - View Post-Screening Policy tags: - Compliance + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18598,6 +18758,7 @@ paths: summary: Travel Rule - View Screening Policy tags: - Compliance + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18636,6 +18797,7 @@ paths: summary: Get Travel Rule Screening Policy Configuration tags: - Compliance Screening Configuration + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -18723,6 +18885,7 @@ paths: summary: Get AML Screening Policy Configuration tags: - Compliance Screening Configuration + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18772,6 +18935,7 @@ paths: summary: Update AML Configuration tags: - Compliance + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -18810,6 +18974,7 @@ paths: summary: AML - View Screening Policy tags: - Compliance + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18848,6 +19013,7 @@ paths: summary: AML - View Post-Screening Policy tags: - Compliance + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -18981,6 +19147,7 @@ paths: \ policy check" tags: - Compliance + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -19044,6 +19211,7 @@ paths: summary: Provides all the compliance details for the given screened transaction. tags: - Compliance + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -19083,6 +19251,7 @@ paths: summary: Returns current OTA status tags: - OTA (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -19144,6 +19313,7 @@ paths: summary: Enable or disable transactions to OTA tags: - OTA (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -19186,6 +19356,7 @@ paths: summary: Returns current workspace status tags: - Workspace Status (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript @@ -19238,6 +19409,7 @@ paths: summary: Get the active policy and its validation tags: - Policy Editor (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: python @@ -19296,6 +19468,7 @@ paths: summary: Get the active draft tags: - Policy Editor (Beta) + x-rate-limit-category: read x-readme: code-samples: - language: python @@ -19371,6 +19544,7 @@ paths: summary: Send publish request for a certain draft id tags: - Policy Editor (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -19447,6 +19621,7 @@ paths: summary: Update the draft with a new set of rules tags: - Policy Editor (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -19526,6 +19701,7 @@ paths: summary: Send publish request for a set of policy rules tags: - Policy Editor (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: python @@ -19610,6 +19786,7 @@ paths: summary: Get console users tags: - Console User + x-rate-limit-category: query x-readme: code-samples: - language: javascript @@ -19710,6 +19887,7 @@ paths: summary: Create console user tags: - Console User + x-rate-limit-category: write x-readme: code-samples: - language: javascript @@ -19796,6 +19974,7 @@ paths: summary: Get Api users tags: - Api User + x-rate-limit-category: query x-readme: code-samples: - language: javascript @@ -19894,6 +20073,7 @@ paths: summary: Create Api user tags: - Api User + x-rate-limit-category: write x-readme: code-samples: - language: javascript @@ -19997,6 +20177,7 @@ paths: summary: Resets device tags: - Reset device + x-rate-limit-category: write x-readme: code-samples: - language: javascript @@ -20087,6 +20268,7 @@ paths: summary: Gets whitelisted ip addresses tags: - whitelist ip addresses + x-rate-limit-category: read x-readme: code-samples: - language: javascript @@ -20796,6 +20978,7 @@ paths: summary: Fund dvp ticket tags: - Smart Transfer + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -22144,6 +22327,7 @@ paths: summary: Add cosigner tags: - Cosigners (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -22444,6 +22628,7 @@ paths: summary: Unpair API key tags: - Cosigners (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -22589,6 +22774,7 @@ paths: summary: Update API key callback handler tags: - Cosigners (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -22681,6 +22867,7 @@ paths: summary: Pair API key tags: - Cosigners (Beta) + x-rate-limit-category: write x-readme: code-samples: - language: typescript @@ -22760,6 +22947,7 @@ paths: summary: Get request status tags: - Cosigners (Beta) + x-rate-limit-category: read x-readme: code-samples: - language: typescript @@ -26871,8 +27059,12 @@ components: description: Details of the transaction's fee. example: serviceFee: serviceFee + relayType: LOCAL + relayId: "1" networkFee: networkFee + relayName: Tenant Name gasPrice: gasPrice + paidByRelay: true properties: networkFee: description: The fee paid to the network @@ -26883,6 +27075,26 @@ components: type: string gasPrice: type: string + paidByRelay: + description: Wether the fee was paid by the relay or not + example: true + type: boolean + relayType: + description: Wether the relay is the same tenant (LOCAL) or another tenant + (THIRD_PARTY) + enum: + - LOCAL + - THIRD_PARTY + example: LOCAL + type: string + relayId: + description: The vault account ID of the relay + example: "1" + type: string + relayName: + description: "The name of the tenant, only for THIRD_PARTY relays" + example: Tenant Name + type: string type: object RewardInfo: description: "This field is relevant only for Algorand transactions. Both `srcRewards`\ @@ -26999,7 +27211,7 @@ components: timestamp: type: number type: object - ComplianceResult: + ComplianceResults: description: The result of the Compliance AML/Travel Rule screening. example: aml: @@ -27274,8 +27486,12 @@ components: lastUpdated: 5.962133916683182 feeInfo: serviceFee: serviceFee + relayType: LOCAL + relayId: "1" networkFee: networkFee + relayName: Tenant Name gasPrice: gasPrice + paidByRelay: true assetId: assetId id: id tag: tag @@ -27374,17 +27590,7 @@ components: message: Slow transaction processing. Outgoing transactions might be stuck. rejectedBy: rejectedBy numOfConfirmations: 3.616076749251911 - createdBy: createdBy - exchangeTxId: exchangeTxId - rewardInfo: - destRewards: destRewards - srcRewards: srcRewards - amlScreeningResult: - provider: provider - payload: "{}" - destinationAddressDescription: destinationAddressDescription - requestedAmount: 4.145608029883936 - complianceResult: + complianceResults: aml: - provider: provider payload: "{}" @@ -27426,6 +27632,16 @@ components: screeningStatus: COMPLETED timestamp: 5.637376656633329 status: Started + createdBy: createdBy + exchangeTxId: exchangeTxId + rewardInfo: + destRewards: destRewards + srcRewards: srcRewards + amlScreeningResult: + provider: provider + payload: "{}" + destinationAddressDescription: destinationAddressDescription + requestedAmount: 4.145608029883936 operation: null status: status properties: @@ -27563,8 +27779,8 @@ components: type: string amlScreeningResult: $ref: '#/components/schemas/AmlScreeningResult' - complianceResult: - $ref: '#/components/schemas/ComplianceResult' + complianceResults: + $ref: '#/components/schemas/ComplianceResults' extraParameters: description: | Additional protocol / operation specific key-value parameters: @@ -39773,6 +39989,50 @@ components: required: - id type: object + MergeStakeAccountsRequest: + example: + sourceId: b70701f4-d7b1-4795-a8ee-b09cdb5b850f + txNote: "split 20 SOL out of 100 SOL, created on 02.04.23" + fee: "7" + feeLevel: MEDIUM + destinationId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + sourceId: + description: Id of the source position to merge from + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850f + format: uuid + type: string + destinationId: + description: Id of the destination position to merge into + format: uuid + type: string + fee: + description: "Represents the fee for a transaction, which can be specified\ + \ as a percentage value. Only one of fee/feeLevel is required." + example: "7" + type: string + feeLevel: + $ref: '#/components/schemas/FeeLevel' + txNote: + description: The note to associate with the transactions. + example: "split 20 SOL out of 100 SOL, created on 02.04.23" + type: string + required: + - destinationId + - sourceId + type: object + MergeStakeAccountsResponse: + example: + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + id: + description: The unique identifier of the merge position (the id of the + destination position) + format: uuid + type: string + required: + - id + type: object RelatedTransaction: properties: txId: diff --git a/build.gradle b/build.gradle index 2e9013f2..358eefb7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '10.2.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/ComplianceResult.md b/docs/ComplianceResults.md similarity index 99% rename from docs/ComplianceResult.md rename to docs/ComplianceResults.md index 84622977..d76bfb80 100644 --- a/docs/ComplianceResult.md +++ b/docs/ComplianceResults.md @@ -1,6 +1,6 @@ -# ComplianceResult +# ComplianceResults The result of the Compliance AML/Travel Rule screening. diff --git a/docs/FeeInfo.md b/docs/FeeInfo.md index 18efaf9f..c5b0c102 100644 --- a/docs/FeeInfo.md +++ b/docs/FeeInfo.md @@ -11,6 +11,19 @@ Details of the transaction's fee. |**networkFee** | **String** | The fee paid to the network | [optional] | |**serviceFee** | **String** | The total fee deducted by the exchange from the actual requested amount (serviceFee = amount - netAmount) | [optional] | |**gasPrice** | **String** | | [optional] | +|**paidByRelay** | **Boolean** | Wether the fee was paid by the relay or not | [optional] | +|**relayType** | [**RelayTypeEnum**](#RelayTypeEnum) | Wether the relay is the same tenant (LOCAL) or another tenant (THIRD_PARTY) | [optional] | +|**relayId** | **String** | The vault account ID of the relay | [optional] | +|**relayName** | **String** | The name of the tenant, only for THIRD_PARTY relays | [optional] | + + + +## Enum: RelayTypeEnum + +| Name | Value | +|---- | -----| +| LOCAL | "LOCAL" | +| THIRD_PARTY | "THIRD_PARTY" | diff --git a/docs/MergeStakeAccountsRequest.md b/docs/MergeStakeAccountsRequest.md new file mode 100644 index 00000000..3015297f --- /dev/null +++ b/docs/MergeStakeAccountsRequest.md @@ -0,0 +1,17 @@ + + +# MergeStakeAccountsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceId** | **UUID** | Id of the source position to merge from | | +|**destinationId** | **UUID** | Id of the destination position to merge into | | +|**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** | **FeeLevel** | | [optional] | +|**txNote** | **String** | The note to associate with the transactions. | [optional] | + + + diff --git a/docs/MergeStakeAccountsResponse.md b/docs/MergeStakeAccountsResponse.md new file mode 100644 index 00000000..243d1d51 --- /dev/null +++ b/docs/MergeStakeAccountsResponse.md @@ -0,0 +1,13 @@ + + +# MergeStakeAccountsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The unique identifier of the merge position (the id of the destination position) | | + + + diff --git a/docs/StakingApi.md b/docs/StakingApi.md index 6d02851a..9741022c 100644 --- a/docs/StakingApi.md +++ b/docs/StakingApi.md @@ -13,6 +13,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getProviders**](StakingApi.md#getProviders) | **GET** /staking/providers | List staking providers details | | [**getSummary**](StakingApi.md#getSummary) | **GET** /staking/positions/summary | Get staking summary details | | [**getSummaryByVault**](StakingApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | Get staking summary details by vault | +| [**mergeStakeAccounts**](StakingApi.md#mergeStakeAccounts) | **POST** /staking/chains/{chainDescriptor}/merge | Execute a Merge operation on SOL/SOL_TEST stake accounts | | [**split**](StakingApi.md#split) | **POST** /staking/chains/{chainDescriptor}/split | Execute a Split operation on SOL/SOL_TEST stake account | | [**stake**](StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation | | [**unstake**](StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation | @@ -755,6 +756,93 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## mergeStakeAccounts + +> CompletableFuture> mergeStakeAccounts mergeStakeAccounts(mergeStakeAccountsRequest, chainDescriptor, idempotencyKey) + +Execute a Merge operation on SOL/SOL_TEST stake accounts + +Perform a Solana Merge of two active stake accounts into one. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +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); + + MergeStakeAccountsRequest mergeStakeAccountsRequest = new MergeStakeAccountsRequest(); // MergeStakeAccountsRequest | + String chainDescriptor = "SOL"; // String | The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use + 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.staking().mergeStakeAccounts(mergeStakeAccountsRequest, chainDescriptor, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#mergeStakeAccounts"); + 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 StakingApi#mergeStakeAccounts"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **mergeStakeAccountsRequest** | [**MergeStakeAccountsRequest**](MergeStakeAccountsRequest.md)| | | +| **chainDescriptor** | **String**| The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use | [enum: SOL, SOL_TEST] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Merge action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## split > CompletableFuture> split split(splitRequest, chainDescriptor, idempotencyKey) diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index dedfe9b1..ecbcc3b0 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -38,7 +38,7 @@ |**exchangeTxId** | **String** | If the transaction originated from an exchange, this is the ID of this transaction at the exchange. | [optional] | |**customerRefId** | **String** | The ID for AML providers to associate the owner of funds with transactions. | [optional] | |**amlScreeningResult** | [**AmlScreeningResult**](AmlScreeningResult.md) | | [optional] | -|**complianceResult** | [**ComplianceResult**](ComplianceResult.md) | | [optional] | +|**complianceResults** | [**ComplianceResults**](ComplianceResults.md) | | [optional] | |**extraParameters** | **Object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. | [optional] | |**signedMessages** | [**List<SignedMessage>**](SignedMessage.md) | | [optional] | |**numOfConfirmations** | **BigDecimal** | The number of confirmations of the transaction. The number will increase until the transaction will be considered completed according to the confirmation policy. | [optional] | diff --git a/pom.xml b/pom.xml index cc3d2c6a..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 10.2.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 12271f07..9ec56d09 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "10.2.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/StakingApi.java b/src/main/java/com/fireblocks/sdk/api/StakingApi.java index 0faa0d45..e8f79fbb 100644 --- a/src/main/java/com/fireblocks/sdk/api/StakingApi.java +++ b/src/main/java/com/fireblocks/sdk/api/StakingApi.java @@ -25,6 +25,8 @@ import com.fireblocks.sdk.model.ClaimRewardsRequest; import com.fireblocks.sdk.model.Delegation; import com.fireblocks.sdk.model.DelegationSummary; +import com.fireblocks.sdk.model.MergeStakeAccountsRequest; +import com.fireblocks.sdk.model.MergeStakeAccountsResponse; import com.fireblocks.sdk.model.Provider; import com.fireblocks.sdk.model.SplitRequest; import com.fireblocks.sdk.model.SplitResponse; @@ -700,6 +702,103 @@ private HttpRequest.Builder getSummaryByVaultRequestBuilder() throws ApiExceptio } return localVarRequestBuilder; } + /** + * Execute a Merge operation on SOL/SOL_TEST stake accounts Perform a Solana Merge of two active + * stake accounts into one. + * + * @param mergeStakeAccountsRequest (required) + * @param chainDescriptor The protocol identifier (e.g. + * \"SOL\"/\"SOL_TEST\") to use (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<MergeStakeAccountsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> mergeStakeAccounts( + MergeStakeAccountsRequest mergeStakeAccountsRequest, + String chainDescriptor, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + mergeStakeAccountsRequestBuilder( + mergeStakeAccountsRequest, chainDescriptor, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "mergeStakeAccounts", 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< + MergeStakeAccountsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder mergeStakeAccountsRequestBuilder( + MergeStakeAccountsRequest mergeStakeAccountsRequest, + String chainDescriptor, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "mergeStakeAccounts", "mergeStakeAccountsRequest", mergeStakeAccountsRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "mergeStakeAccounts", "chainDescriptor", chainDescriptor); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/staking/chains/{chainDescriptor}/merge" + .replace( + "{chainDescriptor}", + ApiClient.urlEncode(chainDescriptor.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(mergeStakeAccountsRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Execute a Split operation on SOL/SOL_TEST stake account Perform a Solana Split stake account. * diff --git a/src/main/java/com/fireblocks/sdk/model/ComplianceResult.java b/src/main/java/com/fireblocks/sdk/model/ComplianceResults.java similarity index 90% rename from src/main/java/com/fireblocks/sdk/model/ComplianceResult.java rename to src/main/java/com/fireblocks/sdk/model/ComplianceResults.java index 75b16922..a5c5264a 100644 --- a/src/main/java/com/fireblocks/sdk/model/ComplianceResult.java +++ b/src/main/java/com/fireblocks/sdk/model/ComplianceResults.java @@ -27,14 +27,14 @@ /** The result of the Compliance AML/Travel Rule screening. */ @JsonPropertyOrder({ - ComplianceResult.JSON_PROPERTY_AML, - ComplianceResult.JSON_PROPERTY_TR, - ComplianceResult.JSON_PROPERTY_AML_LIST, - ComplianceResult.JSON_PROPERTY_STATUS, - ComplianceResult.JSON_PROPERTY_AML_REGISTRATION + ComplianceResults.JSON_PROPERTY_AML, + ComplianceResults.JSON_PROPERTY_TR, + ComplianceResults.JSON_PROPERTY_AML_LIST, + ComplianceResults.JSON_PROPERTY_STATUS, + ComplianceResults.JSON_PROPERTY_AML_REGISTRATION }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ComplianceResult { +public class ComplianceResults { public static final String JSON_PROPERTY_AML = "aml"; private List aml; @@ -127,14 +127,14 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_AML_REGISTRATION = "amlRegistration"; private List amlRegistration; - public ComplianceResult() {} + public ComplianceResults() {} - public ComplianceResult aml(List aml) { + public ComplianceResults aml(List aml) { this.aml = aml; return this; } - public ComplianceResult addAmlItem(ComplianceScreeningResult amlItem) { + public ComplianceResults addAmlItem(ComplianceScreeningResult amlItem) { if (this.aml == null) { this.aml = new ArrayList<>(); } @@ -160,12 +160,12 @@ public void setAml(List aml) { this.aml = aml; } - public ComplianceResult tr(List tr) { + public ComplianceResults tr(List tr) { this.tr = tr; return this; } - public ComplianceResult addTrItem(ComplianceScreeningResult trItem) { + public ComplianceResults addTrItem(ComplianceScreeningResult trItem) { if (this.tr == null) { this.tr = new ArrayList<>(); } @@ -191,12 +191,12 @@ public void setTr(List tr) { this.tr = tr; } - public ComplianceResult amlList(List amlList) { + public ComplianceResults amlList(List amlList) { this.amlList = amlList; return this; } - public ComplianceResult addAmlListItem(ComplianceScreeningResult amlListItem) { + public ComplianceResults addAmlListItem(ComplianceScreeningResult amlListItem) { if (this.amlList == null) { this.amlList = new ArrayList<>(); } @@ -222,7 +222,7 @@ public void setAmlList(List amlList) { this.amlList = amlList; } - public ComplianceResult status(StatusEnum status) { + public ComplianceResults status(StatusEnum status) { this.status = status; return this; } @@ -245,12 +245,12 @@ public void setStatus(StatusEnum status) { this.status = status; } - public ComplianceResult amlRegistration(List amlRegistration) { + public ComplianceResults amlRegistration(List amlRegistration) { this.amlRegistration = amlRegistration; return this; } - public ComplianceResult addAmlRegistrationItem(AmlRegistrationResult amlRegistrationItem) { + public ComplianceResults addAmlRegistrationItem(AmlRegistrationResult amlRegistrationItem) { if (this.amlRegistration == null) { this.amlRegistration = new ArrayList<>(); } @@ -276,7 +276,7 @@ public void setAmlRegistration(List amlRegistration) { this.amlRegistration = amlRegistration; } - /** Return true if this ComplianceResult object is equal to o. */ + /** Return true if this ComplianceResults object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -285,12 +285,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ComplianceResult complianceResult = (ComplianceResult) o; - return Objects.equals(this.aml, complianceResult.aml) - && Objects.equals(this.tr, complianceResult.tr) - && Objects.equals(this.amlList, complianceResult.amlList) - && Objects.equals(this.status, complianceResult.status) - && Objects.equals(this.amlRegistration, complianceResult.amlRegistration); + ComplianceResults complianceResults = (ComplianceResults) o; + return Objects.equals(this.aml, complianceResults.aml) + && Objects.equals(this.tr, complianceResults.tr) + && Objects.equals(this.amlList, complianceResults.amlList) + && Objects.equals(this.status, complianceResults.status) + && Objects.equals(this.amlRegistration, complianceResults.amlRegistration); } @Override @@ -301,7 +301,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ComplianceResult {\n"); + sb.append("class ComplianceResults {\n"); sb.append(" aml: ").append(toIndentedString(aml)).append("\n"); sb.append(" tr: ").append(toIndentedString(tr)).append("\n"); sb.append(" amlList: ").append(toIndentedString(amlList)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/FeeInfo.java b/src/main/java/com/fireblocks/sdk/model/FeeInfo.java index 5069b374..ec0f8ebf 100644 --- a/src/main/java/com/fireblocks/sdk/model/FeeInfo.java +++ b/src/main/java/com/fireblocks/sdk/model/FeeInfo.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; @@ -25,7 +27,11 @@ @JsonPropertyOrder({ FeeInfo.JSON_PROPERTY_NETWORK_FEE, FeeInfo.JSON_PROPERTY_SERVICE_FEE, - FeeInfo.JSON_PROPERTY_GAS_PRICE + FeeInfo.JSON_PROPERTY_GAS_PRICE, + FeeInfo.JSON_PROPERTY_PAID_BY_RELAY, + FeeInfo.JSON_PROPERTY_RELAY_TYPE, + FeeInfo.JSON_PROPERTY_RELAY_ID, + FeeInfo.JSON_PROPERTY_RELAY_NAME }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FeeInfo { @@ -38,6 +44,51 @@ public class FeeInfo { public static final String JSON_PROPERTY_GAS_PRICE = "gasPrice"; private String gasPrice; + public static final String JSON_PROPERTY_PAID_BY_RELAY = "paidByRelay"; + private Boolean paidByRelay; + + /** Wether the relay is the same tenant (LOCAL) or another tenant (THIRD_PARTY) */ + public enum RelayTypeEnum { + LOCAL("LOCAL"), + + THIRD_PARTY("THIRD_PARTY"); + + private String value; + + RelayTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RelayTypeEnum fromValue(String value) { + for (RelayTypeEnum b : RelayTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RELAY_TYPE = "relayType"; + private RelayTypeEnum relayType; + + public static final String JSON_PROPERTY_RELAY_ID = "relayId"; + private String relayId; + + public static final String JSON_PROPERTY_RELAY_NAME = "relayName"; + private String relayName; + public FeeInfo() {} public FeeInfo networkFee(String networkFee) { @@ -110,6 +161,98 @@ public void setGasPrice(String gasPrice) { this.gasPrice = gasPrice; } + public FeeInfo paidByRelay(Boolean paidByRelay) { + this.paidByRelay = paidByRelay; + return this; + } + + /** + * Wether the fee was paid by the relay or not + * + * @return paidByRelay + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAID_BY_RELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPaidByRelay() { + return paidByRelay; + } + + @JsonProperty(JSON_PROPERTY_PAID_BY_RELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaidByRelay(Boolean paidByRelay) { + this.paidByRelay = paidByRelay; + } + + public FeeInfo relayType(RelayTypeEnum relayType) { + this.relayType = relayType; + return this; + } + + /** + * Wether the relay is the same tenant (LOCAL) or another tenant (THIRD_PARTY) + * + * @return relayType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELAY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelayTypeEnum getRelayType() { + return relayType; + } + + @JsonProperty(JSON_PROPERTY_RELAY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayType(RelayTypeEnum relayType) { + this.relayType = relayType; + } + + public FeeInfo relayId(String relayId) { + this.relayId = relayId; + return this; + } + + /** + * The vault account ID of the relay + * + * @return relayId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELAY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRelayId() { + return relayId; + } + + @JsonProperty(JSON_PROPERTY_RELAY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayId(String relayId) { + this.relayId = relayId; + } + + public FeeInfo relayName(String relayName) { + this.relayName = relayName; + return this; + } + + /** + * The name of the tenant, only for THIRD_PARTY relays + * + * @return relayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRelayName() { + return relayName; + } + + @JsonProperty(JSON_PROPERTY_RELAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayName(String relayName) { + this.relayName = relayName; + } + /** Return true if this FeeInfo object is equal to o. */ @Override public boolean equals(Object o) { @@ -122,12 +265,17 @@ public boolean equals(Object o) { FeeInfo feeInfo = (FeeInfo) o; return Objects.equals(this.networkFee, feeInfo.networkFee) && Objects.equals(this.serviceFee, feeInfo.serviceFee) - && Objects.equals(this.gasPrice, feeInfo.gasPrice); + && Objects.equals(this.gasPrice, feeInfo.gasPrice) + && Objects.equals(this.paidByRelay, feeInfo.paidByRelay) + && Objects.equals(this.relayType, feeInfo.relayType) + && Objects.equals(this.relayId, feeInfo.relayId) + && Objects.equals(this.relayName, feeInfo.relayName); } @Override public int hashCode() { - return Objects.hash(networkFee, serviceFee, gasPrice); + return Objects.hash( + networkFee, serviceFee, gasPrice, paidByRelay, relayType, relayId, relayName); } @Override @@ -137,6 +285,10 @@ public String toString() { sb.append(" networkFee: ").append(toIndentedString(networkFee)).append("\n"); sb.append(" serviceFee: ").append(toIndentedString(serviceFee)).append("\n"); sb.append(" gasPrice: ").append(toIndentedString(gasPrice)).append("\n"); + sb.append(" paidByRelay: ").append(toIndentedString(paidByRelay)).append("\n"); + sb.append(" relayType: ").append(toIndentedString(relayType)).append("\n"); + sb.append(" relayId: ").append(toIndentedString(relayId)).append("\n"); + sb.append(" relayName: ").append(toIndentedString(relayName)).append("\n"); sb.append("}"); return sb.toString(); } @@ -219,6 +371,54 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `paidByRelay` to the URL query string + if (getPaidByRelay() != null) { + joiner.add( + String.format( + "%spaidByRelay%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPaidByRelay()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `relayType` to the URL query string + if (getRelayType() != null) { + joiner.add( + String.format( + "%srelayType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getRelayType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `relayId` to the URL query string + if (getRelayId() != null) { + joiner.add( + String.format( + "%srelayId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRelayId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `relayName` to the URL query string + if (getRelayName() != null) { + joiner.add( + String.format( + "%srelayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getRelayName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsRequest.java b/src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsRequest.java new file mode 100644 index 00000000..b1456fff --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsRequest.java @@ -0,0 +1,305 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** MergeStakeAccountsRequest */ +@JsonPropertyOrder({ + MergeStakeAccountsRequest.JSON_PROPERTY_SOURCE_ID, + MergeStakeAccountsRequest.JSON_PROPERTY_DESTINATION_ID, + MergeStakeAccountsRequest.JSON_PROPERTY_FEE, + MergeStakeAccountsRequest.JSON_PROPERTY_FEE_LEVEL, + MergeStakeAccountsRequest.JSON_PROPERTY_TX_NOTE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MergeStakeAccountsRequest { + public static final String JSON_PROPERTY_SOURCE_ID = "sourceId"; + private UUID sourceId; + + public static final String JSON_PROPERTY_DESTINATION_ID = "destinationId"; + private UUID destinationId; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevel feeLevel; + + public static final String JSON_PROPERTY_TX_NOTE = "txNote"; + private String txNote; + + public MergeStakeAccountsRequest() {} + + public MergeStakeAccountsRequest sourceId(UUID sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Id of the source position to merge from + * + * @return sourceId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSourceId() { + return sourceId; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceId(UUID sourceId) { + this.sourceId = sourceId; + } + + public MergeStakeAccountsRequest destinationId(UUID destinationId) { + this.destinationId = destinationId; + return this; + } + + /** + * Id of the destination position to merge into + * + * @return destinationId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDestinationId() { + return destinationId; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationId(UUID destinationId) { + this.destinationId = destinationId; + } + + public MergeStakeAccountsRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Represents the fee for a transaction, which can be specified as a percentage value. Only one + * of fee/feeLevel is required. + * + * @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 MergeStakeAccountsRequest feeLevel(FeeLevel feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Get feeLevel + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevel getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevel feeLevel) { + this.feeLevel = feeLevel; + } + + public MergeStakeAccountsRequest txNote(String txNote) { + this.txNote = txNote; + return this; + } + + /** + * The note to associate with the transactions. + * + * @return txNote + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxNote() { + return txNote; + } + + @JsonProperty(JSON_PROPERTY_TX_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxNote(String txNote) { + this.txNote = txNote; + } + + /** Return true if this MergeStakeAccountsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeStakeAccountsRequest mergeStakeAccountsRequest = (MergeStakeAccountsRequest) o; + return Objects.equals(this.sourceId, mergeStakeAccountsRequest.sourceId) + && Objects.equals(this.destinationId, mergeStakeAccountsRequest.destinationId) + && Objects.equals(this.fee, mergeStakeAccountsRequest.fee) + && Objects.equals(this.feeLevel, mergeStakeAccountsRequest.feeLevel) + && Objects.equals(this.txNote, mergeStakeAccountsRequest.txNote); + } + + @Override + public int hashCode() { + return Objects.hash(sourceId, destinationId, fee, feeLevel, txNote); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeStakeAccountsRequest {\n"); + sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); + sb.append(" destinationId: ").append(toIndentedString(destinationId)).append("\n"); + 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("}"); + 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 `sourceId` to the URL query string + if (getSourceId() != null) { + joiner.add( + String.format( + "%ssourceId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSourceId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `destinationId` to the URL query string + if (getDestinationId() != null) { + joiner.add( + String.format( + "%sdestinationId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDestinationId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `txNote` to the URL query string + if (getTxNote() != null) { + joiner.add( + String.format( + "%stxNote%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxNote()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsResponse.java b/src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsResponse.java new file mode 100644 index 00000000..3e5a6105 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsResponse.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** MergeStakeAccountsResponse */ +@JsonPropertyOrder({MergeStakeAccountsResponse.JSON_PROPERTY_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MergeStakeAccountsResponse { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public MergeStakeAccountsResponse() {} + + public MergeStakeAccountsResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the merge position (the id of the destination position) + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + /** Return true if this MergeStakeAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeStakeAccountsResponse mergeStakeAccountsResponse = (MergeStakeAccountsResponse) o; + return Objects.equals(this.id, mergeStakeAccountsResponse.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeStakeAccountsResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java index 1aa5ea90..a97ce26b 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java @@ -59,7 +59,7 @@ TransactionResponse.JSON_PROPERTY_EXCHANGE_TX_ID, TransactionResponse.JSON_PROPERTY_CUSTOMER_REF_ID, TransactionResponse.JSON_PROPERTY_AML_SCREENING_RESULT, - TransactionResponse.JSON_PROPERTY_COMPLIANCE_RESULT, + TransactionResponse.JSON_PROPERTY_COMPLIANCE_RESULTS, TransactionResponse.JSON_PROPERTY_EXTRA_PARAMETERS, TransactionResponse.JSON_PROPERTY_SIGNED_MESSAGES, TransactionResponse.JSON_PROPERTY_NUM_OF_CONFIRMATIONS, @@ -173,8 +173,8 @@ public class TransactionResponse { public static final String JSON_PROPERTY_AML_SCREENING_RESULT = "amlScreeningResult"; private AmlScreeningResult amlScreeningResult; - public static final String JSON_PROPERTY_COMPLIANCE_RESULT = "complianceResult"; - private ComplianceResult complianceResult; + public static final String JSON_PROPERTY_COMPLIANCE_RESULTS = "complianceResults"; + private ComplianceResults complianceResults; public static final String JSON_PROPERTY_EXTRA_PARAMETERS = "extraParameters"; private Object extraParameters; @@ -1042,27 +1042,27 @@ public void setAmlScreeningResult(AmlScreeningResult amlScreeningResult) { this.amlScreeningResult = amlScreeningResult; } - public TransactionResponse complianceResult(ComplianceResult complianceResult) { - this.complianceResult = complianceResult; + public TransactionResponse complianceResults(ComplianceResults complianceResults) { + this.complianceResults = complianceResults; return this; } /** - * Get complianceResult + * Get complianceResults * - * @return complianceResult + * @return complianceResults */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPLIANCE_RESULT) + @JsonProperty(JSON_PROPERTY_COMPLIANCE_RESULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ComplianceResult getComplianceResult() { - return complianceResult; + public ComplianceResults getComplianceResults() { + return complianceResults; } - @JsonProperty(JSON_PROPERTY_COMPLIANCE_RESULT) + @JsonProperty(JSON_PROPERTY_COMPLIANCE_RESULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setComplianceResult(ComplianceResult complianceResult) { - this.complianceResult = complianceResult; + public void setComplianceResults(ComplianceResults complianceResults) { + this.complianceResults = complianceResults; } public TransactionResponse extraParameters(Object extraParameters) { @@ -1524,7 +1524,7 @@ public boolean equals(Object o) { && Objects.equals(this.exchangeTxId, transactionResponse.exchangeTxId) && Objects.equals(this.customerRefId, transactionResponse.customerRefId) && Objects.equals(this.amlScreeningResult, transactionResponse.amlScreeningResult) - && Objects.equals(this.complianceResult, transactionResponse.complianceResult) + && Objects.equals(this.complianceResults, transactionResponse.complianceResults) && Objects.equals(this.extraParameters, transactionResponse.extraParameters) && Objects.equals(this.signedMessages, transactionResponse.signedMessages) && Objects.equals(this.numOfConfirmations, transactionResponse.numOfConfirmations) @@ -1577,7 +1577,7 @@ public int hashCode() { exchangeTxId, customerRefId, amlScreeningResult, - complianceResult, + complianceResults, extraParameters, signedMessages, numOfConfirmations, @@ -1643,7 +1643,9 @@ public String toString() { sb.append(" amlScreeningResult: ") .append(toIndentedString(amlScreeningResult)) .append("\n"); - sb.append(" complianceResult: ").append(toIndentedString(complianceResult)).append("\n"); + sb.append(" complianceResults: ") + .append(toIndentedString(complianceResults)) + .append("\n"); sb.append(" extraParameters: ").append(toIndentedString(extraParameters)).append("\n"); sb.append(" signedMessages: ").append(toIndentedString(signedMessages)).append("\n"); sb.append(" numOfConfirmations: ") @@ -2070,10 +2072,10 @@ public String toUrlQueryString(String prefix) { .toUrlQueryString(prefix + "amlScreeningResult" + suffix)); } - // add `complianceResult` to the URL query string - if (getComplianceResult() != null) { + // add `complianceResults` to the URL query string + if (getComplianceResults() != null) { joiner.add( - getComplianceResult().toUrlQueryString(prefix + "complianceResult" + suffix)); + getComplianceResults().toUrlQueryString(prefix + "complianceResults" + suffix)); } // add `extraParameters` to the URL query string diff --git a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java index decc7eb8..8b6974c5 100644 --- a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java @@ -20,6 +20,8 @@ import com.fireblocks.sdk.model.ClaimRewardsRequest; import com.fireblocks.sdk.model.Delegation; import com.fireblocks.sdk.model.DelegationSummary; +import com.fireblocks.sdk.model.MergeStakeAccountsRequest; +import com.fireblocks.sdk.model.MergeStakeAccountsResponse; import com.fireblocks.sdk.model.Provider; import com.fireblocks.sdk.model.SplitRequest; import com.fireblocks.sdk.model.SplitResponse; @@ -169,6 +171,22 @@ public void getSummaryByVaultTest() throws ApiException { api.getSummaryByVault(); } + /** + * Execute a Merge operation on SOL/SOL_TEST stake accounts + * + *

Perform a Solana Merge of two active stake accounts into one. + * + * @throws ApiException if the Api call fails + */ + @Test + public void mergeStakeAccountsTest() throws ApiException { + MergeStakeAccountsRequest mergeStakeAccountsRequest = null; + String chainDescriptor = null; + String idempotencyKey = null; + CompletableFuture> response = + api.mergeStakeAccounts(mergeStakeAccountsRequest, chainDescriptor, idempotencyKey); + } + /** * Execute a Split operation on SOL/SOL_TEST stake account * diff --git a/src/test/java/com/fireblocks/sdk/model/ComplianceResultTest.java b/src/test/java/com/fireblocks/sdk/model/ComplianceResultsTest.java similarity index 79% rename from src/test/java/com/fireblocks/sdk/model/ComplianceResultTest.java rename to src/test/java/com/fireblocks/sdk/model/ComplianceResultsTest.java index 458ec6dc..b6e6bb8b 100644 --- a/src/test/java/com/fireblocks/sdk/model/ComplianceResultTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ComplianceResultsTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ComplianceResult */ -public class ComplianceResultTest { - private final ComplianceResult model = new ComplianceResult(); +/** Model tests for ComplianceResults */ +public class ComplianceResultsTest { + private final ComplianceResults model = new ComplianceResults(); - /** Model tests for ComplianceResult */ + /** Model tests for ComplianceResults */ @Test - public void testComplianceResult() { - // TODO: test ComplianceResult + public void testComplianceResults() { + // TODO: test ComplianceResults } /** Test the property 'aml' */ diff --git a/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java b/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java index c2f87b21..98cb303c 100644 --- a/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java @@ -42,4 +42,28 @@ public void serviceFeeTest() { public void gasPriceTest() { // TODO: test gasPrice } + + /** Test the property 'paidByRelay' */ + @Test + public void paidByRelayTest() { + // TODO: test paidByRelay + } + + /** Test the property 'relayType' */ + @Test + public void relayTypeTest() { + // TODO: test relayType + } + + /** Test the property 'relayId' */ + @Test + public void relayIdTest() { + // TODO: test relayId + } + + /** Test the property 'relayName' */ + @Test + public void relayNameTest() { + // TODO: test relayName + } } diff --git a/src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsRequestTest.java b/src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsRequestTest.java new file mode 100644 index 00000000..e8c2c9f8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsRequestTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for MergeStakeAccountsRequest */ +public class MergeStakeAccountsRequestTest { + private final MergeStakeAccountsRequest model = new MergeStakeAccountsRequest(); + + /** Model tests for MergeStakeAccountsRequest */ + @Test + public void testMergeStakeAccountsRequest() { + // TODO: test MergeStakeAccountsRequest + } + + /** Test the property 'sourceId' */ + @Test + public void sourceIdTest() { + // TODO: test sourceId + } + + /** Test the property 'destinationId' */ + @Test + public void destinationIdTest() { + // TODO: test destinationId + } + + /** 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 'txNote' */ + @Test + public void txNoteTest() { + // TODO: test txNote + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsResponseTest.java new file mode 100644 index 00000000..7dfa846b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for MergeStakeAccountsResponse */ +public class MergeStakeAccountsResponseTest { + private final MergeStakeAccountsResponse model = new MergeStakeAccountsResponse(); + + /** Model tests for MergeStakeAccountsResponse */ + @Test + public void testMergeStakeAccountsResponse() { + // TODO: test MergeStakeAccountsResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java index f3210724..16125ca1 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java @@ -211,10 +211,10 @@ public void amlScreeningResultTest() { // TODO: test amlScreeningResult } - /** Test the property 'complianceResult' */ + /** Test the property 'complianceResults' */ @Test - public void complianceResultTest() { - // TODO: test complianceResult + public void complianceResultsTest() { + // TODO: test complianceResults } /** Test the property 'extraParameters' */