diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 54dd6445..2628bebd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -107,6 +107,7 @@ docs/ConfigTransferOperationSnapshot.md docs/ConsoleUser.md docs/ConsoleUserApi.md docs/ContractAbiResponseDto.md +docs/ContractAbiResponseDtoAbiInner.md docs/ContractAttributes.md docs/ContractDeployRequest.md docs/ContractDeployResponse.md @@ -244,6 +245,8 @@ docs/GasStationConfiguration.md docs/GasStationConfigurationResponse.md docs/GasStationPropertiesResponse.md docs/GasStationsApi.md +docs/GasslessStandardConfigurations.md +docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md docs/GetAPIUsersResponse.md docs/GetAuditLogsResponse.md docs/GetConnectionsResponse.md @@ -263,6 +266,7 @@ docs/GetValidationKeyResponseDto.md docs/GetWhitelistIpAddressesResponse.md docs/GetWorkspaceStatusResponse.md docs/HttpContractDoesNotExistError.md +docs/IdlType.md docs/InstructionAmount.md docs/InternalTransferResponse.md docs/InternalWalletsApi.md @@ -284,6 +288,7 @@ docs/ModifySigningKeyAgentIdDto.md docs/ModifySigningKeyDto.md docs/ModifyValidationKeyDto.md docs/MpcKey.md +docs/MultichainDeploymentMetadata.md docs/NetworkChannel.md docs/NetworkConnection.md docs/NetworkConnectionResponse.md @@ -364,6 +369,7 @@ docs/PublishDraftRequest.md docs/PublishResult.md docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md +docs/ReadCallFunctionDtoAbiFunction.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md docs/ReissueMultichainTokenRequest.md @@ -381,6 +387,8 @@ docs/ResetDeviceApi.md docs/RespondToConnectionRequest.md docs/RewardInfo.md docs/RewardsInfo.md +docs/SOLAccount.md +docs/SOLAccountWithValue.md docs/ScreeningConfigurationsRequest.md docs/ScreeningOperationExecution.md docs/ScreeningOperationExecutionOutput.md @@ -443,7 +451,13 @@ docs/SmartTransferTicketTermResponse.md docs/SmartTransferUpdateTicketTerm.md docs/SmartTransferUserGroups.md docs/SmartTransferUserGroupsResponse.md +docs/SolParameter.md +docs/SolParameterWithValue.md docs/SolanaBlockchainData.md +docs/SolanaConfig.md +docs/SolanaInstruction.md +docs/SolanaInstructionWithValue.md +docs/SolanaSimpleCreateParams.md docs/SourceTransferPeerPath.md docs/SourceTransferPeerPathResponse.md docs/SpamOwnershipResponse.md @@ -594,6 +608,7 @@ docs/WorkflowExecutionOperation.md docs/WorkspaceStatusBetaApi.md docs/WriteAbiFunction.md docs/WriteCallFunctionDto.md +docs/WriteCallFunctionDtoAbiFunction.md docs/WriteCallFunctionResponseDto.md git_push.sh gradle.properties @@ -755,6 +770,7 @@ src/main/java/com/fireblocks/sdk/model/ConfigOperationStatus.java src/main/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshot.java src/main/java/com/fireblocks/sdk/model/ConsoleUser.java src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java +src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInner.java src/main/java/com/fireblocks/sdk/model/ContractAttributes.java src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java src/main/java/com/fireblocks/sdk/model/ContractDeployResponse.java @@ -882,6 +898,8 @@ src/main/java/com/fireblocks/sdk/model/Funds.java src/main/java/com/fireblocks/sdk/model/GasStationConfiguration.java src/main/java/com/fireblocks/sdk/model/GasStationConfigurationResponse.java src/main/java/com/fireblocks/sdk/model/GasStationPropertiesResponse.java +src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurations.java +src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.java src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java src/main/java/com/fireblocks/sdk/model/GetConnectionsResponse.java @@ -901,6 +919,7 @@ src/main/java/com/fireblocks/sdk/model/GetValidationKeyResponseDto.java src/main/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponse.java src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.java +src/main/java/com/fireblocks/sdk/model/IdlType.java src/main/java/com/fireblocks/sdk/model/InstructionAmount.java src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java @@ -918,6 +937,7 @@ 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 src/main/java/com/fireblocks/sdk/model/MpcKey.java +src/main/java/com/fireblocks/sdk/model/MultichainDeploymentMetadata.java src/main/java/com/fireblocks/sdk/model/NetworkChannel.java src/main/java/com/fireblocks/sdk/model/NetworkConnection.java src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java @@ -992,6 +1012,7 @@ src/main/java/com/fireblocks/sdk/model/PublishDraftRequest.java src/main/java/com/fireblocks/sdk/model/PublishResult.java src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java +src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunction.java src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java @@ -1008,6 +1029,8 @@ src/main/java/com/fireblocks/sdk/model/ResendWebhooksResponse.java src/main/java/com/fireblocks/sdk/model/RespondToConnectionRequest.java src/main/java/com/fireblocks/sdk/model/RewardInfo.java src/main/java/com/fireblocks/sdk/model/RewardsInfo.java +src/main/java/com/fireblocks/sdk/model/SOLAccount.java +src/main/java/com/fireblocks/sdk/model/SOLAccountWithValue.java src/main/java/com/fireblocks/sdk/model/ScreeningConfigurationsRequest.java src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecution.java src/main/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutput.java @@ -1069,7 +1092,13 @@ src/main/java/com/fireblocks/sdk/model/SmartTransferTicketTermResponse.java src/main/java/com/fireblocks/sdk/model/SmartTransferUpdateTicketTerm.java src/main/java/com/fireblocks/sdk/model/SmartTransferUserGroups.java src/main/java/com/fireblocks/sdk/model/SmartTransferUserGroupsResponse.java +src/main/java/com/fireblocks/sdk/model/SolParameter.java +src/main/java/com/fireblocks/sdk/model/SolParameterWithValue.java src/main/java/com/fireblocks/sdk/model/SolanaBlockchainData.java +src/main/java/com/fireblocks/sdk/model/SolanaConfig.java +src/main/java/com/fireblocks/sdk/model/SolanaInstruction.java +src/main/java/com/fireblocks/sdk/model/SolanaInstructionWithValue.java +src/main/java/com/fireblocks/sdk/model/SolanaSimpleCreateParams.java src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPath.java src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPathResponse.java src/main/java/com/fireblocks/sdk/model/SpamOwnershipResponse.java @@ -1208,6 +1237,7 @@ src/main/java/com/fireblocks/sdk/model/WorkflowConfigurationId.java src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java src/main/java/com/fireblocks/sdk/model/WriteAbiFunction.java src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java +src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunction.java src/main/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDto.java src/test/java/com/fireblocks/sdk/AdditionalOptionsTest.java src/test/java/com/fireblocks/sdk/BasePathTest.java @@ -1348,6 +1378,7 @@ src/test/java/com/fireblocks/sdk/model/ConfigOperationStatusTest.java src/test/java/com/fireblocks/sdk/model/ConfigOperationTest.java src/test/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshotTest.java src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java +src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInnerTest.java src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/ContractAttributesTest.java src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java @@ -1476,6 +1507,8 @@ src/test/java/com/fireblocks/sdk/model/FundsTest.java src/test/java/com/fireblocks/sdk/model/GasStationConfigurationResponseTest.java src/test/java/com/fireblocks/sdk/model/GasStationConfigurationTest.java src/test/java/com/fireblocks/sdk/model/GasStationPropertiesResponseTest.java +src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValueTest.java +src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsTest.java src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConnectionsResponseTest.java @@ -1495,6 +1528,7 @@ src/test/java/com/fireblocks/sdk/model/GetValidationKeyResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponseTest.java src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.java +src/test/java/com/fireblocks/sdk/model/IdlTypeTest.java src/test/java/com/fireblocks/sdk/model/InstructionAmountTest.java src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java @@ -1512,6 +1546,7 @@ 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 src/test/java/com/fireblocks/sdk/model/MpcKeyTest.java +src/test/java/com/fireblocks/sdk/model/MultichainDeploymentMetadataTest.java src/test/java/com/fireblocks/sdk/model/NetworkChannelTest.java src/test/java/com/fireblocks/sdk/model/NetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValueTest.java @@ -1585,6 +1620,7 @@ src/test/java/com/fireblocks/sdk/model/PublicKeyInformationTest.java src/test/java/com/fireblocks/sdk/model/PublishDraftRequestTest.java src/test/java/com/fireblocks/sdk/model/PublishResultTest.java src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java +src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java @@ -1602,6 +1638,8 @@ src/test/java/com/fireblocks/sdk/model/ResendWebhooksResponseTest.java src/test/java/com/fireblocks/sdk/model/RespondToConnectionRequestTest.java src/test/java/com/fireblocks/sdk/model/RewardInfoTest.java src/test/java/com/fireblocks/sdk/model/RewardsInfoTest.java +src/test/java/com/fireblocks/sdk/model/SOLAccountTest.java +src/test/java/com/fireblocks/sdk/model/SOLAccountWithValueTest.java src/test/java/com/fireblocks/sdk/model/ScreeningConfigurationsRequestTest.java src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionOutputTest.java src/test/java/com/fireblocks/sdk/model/ScreeningOperationExecutionTest.java @@ -1663,7 +1701,13 @@ src/test/java/com/fireblocks/sdk/model/SmartTransferTicketTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferUpdateTicketTermTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferUserGroupsResponseTest.java src/test/java/com/fireblocks/sdk/model/SmartTransferUserGroupsTest.java +src/test/java/com/fireblocks/sdk/model/SolParameterTest.java +src/test/java/com/fireblocks/sdk/model/SolParameterWithValueTest.java src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataTest.java +src/test/java/com/fireblocks/sdk/model/SolanaConfigTest.java +src/test/java/com/fireblocks/sdk/model/SolanaInstructionTest.java +src/test/java/com/fireblocks/sdk/model/SolanaInstructionWithValueTest.java +src/test/java/com/fireblocks/sdk/model/SolanaSimpleCreateParamsTest.java src/test/java/com/fireblocks/sdk/model/SourceTransferPeerPathResponseTest.java src/test/java/com/fireblocks/sdk/model/SourceTransferPeerPathTest.java src/test/java/com/fireblocks/sdk/model/SpamOwnershipResponseTest.java @@ -1801,5 +1845,6 @@ src/test/java/com/fireblocks/sdk/model/WorkflowConfigStatusTest.java src/test/java/com/fireblocks/sdk/model/WorkflowConfigurationIdTest.java src/test/java/com/fireblocks/sdk/model/WorkflowExecutionOperationTest.java src/test/java/com/fireblocks/sdk/model/WriteAbiFunctionTest.java +src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java src/test/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDtoTest.java diff --git a/README.md b/README.md index 9b8cca6a..1a0025ad 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.1.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.1.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.1.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -503,6 +503,7 @@ Class | Method | HTTP request | Description - [ConfigTransferOperationSnapshot](docs/ConfigTransferOperationSnapshot.md) - [ConsoleUser](docs/ConsoleUser.md) - [ContractAbiResponseDto](docs/ContractAbiResponseDto.md) + - [ContractAbiResponseDtoAbiInner](docs/ContractAbiResponseDtoAbiInner.md) - [ContractAttributes](docs/ContractAttributes.md) - [ContractDeployRequest](docs/ContractDeployRequest.md) - [ContractDeployResponse](docs/ContractDeployResponse.md) @@ -630,6 +631,8 @@ Class | Method | HTTP request | Description - [GasStationConfiguration](docs/GasStationConfiguration.md) - [GasStationConfigurationResponse](docs/GasStationConfigurationResponse.md) - [GasStationPropertiesResponse](docs/GasStationPropertiesResponse.md) + - [GasslessStandardConfigurations](docs/GasslessStandardConfigurations.md) + - [GasslessStandardConfigurationsGaslessStandardConfigurationsValue](docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md) - [GetAPIUsersResponse](docs/GetAPIUsersResponse.md) - [GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) @@ -649,6 +652,7 @@ Class | Method | HTTP request | Description - [GetWhitelistIpAddressesResponse](docs/GetWhitelistIpAddressesResponse.md) - [GetWorkspaceStatusResponse](docs/GetWorkspaceStatusResponse.md) - [HttpContractDoesNotExistError](docs/HttpContractDoesNotExistError.md) + - [IdlType](docs/IdlType.md) - [InstructionAmount](docs/InstructionAmount.md) - [InternalTransferResponse](docs/InternalTransferResponse.md) - [InvalidParamaterValueError](docs/InvalidParamaterValueError.md) @@ -666,6 +670,7 @@ Class | Method | HTTP request | Description - [ModifySigningKeyDto](docs/ModifySigningKeyDto.md) - [ModifyValidationKeyDto](docs/ModifyValidationKeyDto.md) - [MpcKey](docs/MpcKey.md) + - [MultichainDeploymentMetadata](docs/MultichainDeploymentMetadata.md) - [NetworkChannel](docs/NetworkChannel.md) - [NetworkConnection](docs/NetworkConnection.md) - [NetworkConnectionResponse](docs/NetworkConnectionResponse.md) @@ -740,6 +745,7 @@ Class | Method | HTTP request | Description - [PublishResult](docs/PublishResult.md) - [ReadAbiFunction](docs/ReadAbiFunction.md) - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) + - [ReadCallFunctionDtoAbiFunction](docs/ReadCallFunctionDtoAbiFunction.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - [ReissueMultichainTokenRequest](docs/ReissueMultichainTokenRequest.md) @@ -756,6 +762,8 @@ Class | Method | HTTP request | Description - [RespondToConnectionRequest](docs/RespondToConnectionRequest.md) - [RewardInfo](docs/RewardInfo.md) - [RewardsInfo](docs/RewardsInfo.md) + - [SOLAccount](docs/SOLAccount.md) + - [SOLAccountWithValue](docs/SOLAccountWithValue.md) - [ScreeningConfigurationsRequest](docs/ScreeningConfigurationsRequest.md) - [ScreeningOperationExecution](docs/ScreeningOperationExecution.md) - [ScreeningOperationExecutionOutput](docs/ScreeningOperationExecutionOutput.md) @@ -817,7 +825,13 @@ Class | Method | HTTP request | Description - [SmartTransferUpdateTicketTerm](docs/SmartTransferUpdateTicketTerm.md) - [SmartTransferUserGroups](docs/SmartTransferUserGroups.md) - [SmartTransferUserGroupsResponse](docs/SmartTransferUserGroupsResponse.md) + - [SolParameter](docs/SolParameter.md) + - [SolParameterWithValue](docs/SolParameterWithValue.md) - [SolanaBlockchainData](docs/SolanaBlockchainData.md) + - [SolanaConfig](docs/SolanaConfig.md) + - [SolanaInstruction](docs/SolanaInstruction.md) + - [SolanaInstructionWithValue](docs/SolanaInstructionWithValue.md) + - [SolanaSimpleCreateParams](docs/SolanaSimpleCreateParams.md) - [SourceTransferPeerPath](docs/SourceTransferPeerPath.md) - [SourceTransferPeerPathResponse](docs/SourceTransferPeerPathResponse.md) - [SpamOwnershipResponse](docs/SpamOwnershipResponse.md) @@ -956,6 +970,7 @@ Class | Method | HTTP request | Description - [WorkflowExecutionOperation](docs/WorkflowExecutionOperation.md) - [WriteAbiFunction](docs/WriteAbiFunction.md) - [WriteCallFunctionDto](docs/WriteCallFunctionDto.md) + - [WriteCallFunctionDtoAbiFunction](docs/WriteCallFunctionDtoAbiFunction.md) - [WriteCallFunctionResponseDto](docs/WriteCallFunctionResponseDto.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 1da9ad52..247817cb 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -5641,6 +5641,15 @@ paths: schema: type: boolean style: form + - description: Return keys that are assigned to a vault account + explode: true + in: query + name: isAssigned + required: false + schema: + nullable: true + type: boolean + style: form responses: "200": content: @@ -5673,12 +5682,13 @@ paths: - language: java code: "CompletableFuture> response\ \ = fireblocks.keyLinkBeta().getSigningKeysList(pageCursor, pageSize,\ - \ sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available);" + \ sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available,\ + \ isAssigned);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.key_link_beta.get_signing_keys_list(page_cursor,\ \ page_size, sort_by, order, vault_account_id, agent_user_id, algorithm,\ - \ enabled, available);" + \ enabled, available, is_assigned);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -5687,11 +5697,11 @@ paths: - lang: Java source: "CompletableFuture> response\ \ = fireblocks.keyLinkBeta().getSigningKeysList(pageCursor, pageSize, sortBy,\ - \ order, vaultAccountId, agentUserId, algorithm, enabled, available);" + \ order, vaultAccountId, agentUserId, algorithm, enabled, available, isAssigned);" - lang: Python source: "response = fireblocks.key_link_beta.get_signing_keys_list(page_cursor,\ \ page_size, sort_by, order, vault_account_id, agent_user_id, algorithm,\ - \ enabled, available);" + \ enabled, available, is_assigned);" x-accepts: application/json post: description: "Adds a new signing key to the workspace. The added key will be\ @@ -34661,6 +34671,7 @@ components: - mint - burn bytecode: bytecode + protocol: ETH docs: details: "This contract implements an upgradeable proxy. It is upgradeable\ \ because calls are delegated to an implementation address that can be\ @@ -34803,6 +34814,13 @@ components: name: MyAuditor imageURL: https://my-images.com/my-image.jpg link: https://my-auditor.com/my-audit-report + protocol: + description: The protocol that the template will be used for + enum: + - ETH + - SOL + example: ETH + type: string required: - abi - bytecode @@ -35228,11 +35246,195 @@ components: required: - data type: object + GasslessStandardConfigurations: + description: The gasless configuration of the contract + example: + gaslessStandardConfigurations: + key: + forwarderAddresses: + - 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + - 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + lastOnChainCheck: 2024-09-09T04:17:46.918Z + properties: + gaslessStandardConfigurations: + additionalProperties: + $ref: '#/components/schemas/GasslessStandardConfigurations_gaslessStandardConfigurations_value' + type: object + type: object + ParameterWithValueList: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + MultichainDeploymentMetadata: + description: The multichain deployment metadata + example: + address: 0x742d35Cc6634C0532925a3b844Bc454e4438f44e + initParams: + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + deploymentSalt: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + templateId: 0e4f5a3b-924e-7bb9-8e5b-c748270feb38 + encodedInitParams: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + properties: + id: + description: The unique identifier of the deployment metadata + format: uuid + type: string + address: + description: The address of the deployed contract + example: 0x742d35Cc6634C0532925a3b844Bc454e4438f44e + type: string + templateId: + description: The unique identifier of the contract template + example: 0e4f5a3b-924e-7bb9-8e5b-c748270feb38 + format: uuid + type: string + deploymentSalt: + description: The salt used for the deployment + example: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + type: string + initParams: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + encodedInitParams: + description: The encoded init params + example: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + type: string + type: object + SolanaConfig: + description: The Solana configuration of the contract + example: + extensions: + - metadataPointer + - transferHook + type: TOKEN2022 + properties: + extensions: + description: The extensions that the contract implements. + example: + - metadataPointer + - transferHook + items: + type: string + type: array + type: + description: The type of the contract. + enum: + - SPL + - TOKEN2022 + - PROGRAM + example: TOKEN2022 + type: string + type: object DeployedContractResponseDto: example: + baseAssetId: ETH_TEST5 + gaslessConfig: + gaslessStandardConfigurations: + key: + forwarderAddresses: + - 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + - 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + lastOnChainCheck: 2024-09-09T04:17:46.918Z contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + solanaConfig: + extensions: + - metadataPointer + - transferHook + type: TOKEN2022 contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 vaultAccountId: "0" + multichainDeploymentMetadata: + address: 0x742d35Cc6634C0532925a3b844Bc454e4438f44e + initParams: + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + - components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + deploymentSalt: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + templateId: 0e4f5a3b-924e-7bb9-8e5b-c748270feb38 + encodedInitParams: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d blockchainId: blockchainId properties: @@ -35254,6 +35456,16 @@ components: type: string blockchainId: type: string + baseAssetId: + description: The blockchain base assetId + example: ETH_TEST5 + type: string + gaslessConfig: + $ref: '#/components/schemas/GasslessStandardConfigurations' + multichainDeploymentMetadata: + $ref: '#/components/schemas/MultichainDeploymentMetadata' + solanaConfig: + $ref: '#/components/schemas/SolanaConfig' required: - blockchainId - contractAddress @@ -35719,6 +35931,26 @@ components: - name - symbol type: object + SolanaSimpleCreateParams: + properties: + name: + description: The name of the token or asset being created. + example: SolanaToken + type: string + symbol: + description: "The symbol for the token, typically an abbreviated representation." + example: SOL + type: string + decimals: + description: "The number of decimal places the token supports (e.g., 9 for\ + \ typical Solana tokens)." + example: 9 + type: integer + required: + - decimals + - name + - symbol + type: object CreateTokenRequestDto: example: assetId: ETH_TEST5 @@ -36430,6 +36662,92 @@ components: required: - txId type: object + SOLAccount: + description: The accounts involved in the instruction + properties: + name: + description: The name of the account + example: mint + type: string + signer: + description: Indicates if the account needs to sign the instruction. If + true a signature for this account must be provided + example: false + type: boolean + writable: + description: Indicates if the account's data can be changed by the instruction. + example: true + type: boolean + address: + description: The address of the account + example: 4PVcDXAkAgQkVx4puiSXdZ5H8BrTqUzstJBKKWFy3XsH + type: string + required: + - name + type: object + IdlType: + description: The type of the parameter + enum: + - bool + - u8 + - i8 + - u16 + - i16 + - u32 + - i32 + - f32 + - u64 + - i64 + - f64 + - u128 + - i128 + - u256 + - i256 + - bytes + - string + - pubkey + example: u8 + type: string + SolParameter: + description: The arguments of the instruction + properties: + name: + description: The name of the parameter + example: mint + type: string + type: + $ref: '#/components/schemas/IdlType' + required: + - name + - type + type: object + SolanaInstruction: + properties: + name: + description: The name of the instruction + example: transfer + type: string + discriminator: + description: The discriminator for the instruction. Acts as a function selector + example: + - 13 + items: + type: number + type: array + accounts: + items: + $ref: '#/components/schemas/SOLAccount' + type: array + args: + items: + $ref: '#/components/schemas/SolParameter' + type: array + required: + - accounts + - args + - discriminator + - name + type: object ContractAbiResponseDto: example: abi: @@ -36467,7 +36785,7 @@ components: stateMutability: nonpayable type: constructor items: - $ref: '#/components/schemas/AbiFunction' + $ref: '#/components/schemas/ContractAbiResponseDto_abi_inner' type: array implementationAbi: description: The abi of the implementation contract if exists. Relevant @@ -36579,6 +36897,74 @@ components: - stateMutability - type type: object + SOLAccountWithValue: + properties: + name: + description: The name of the account + example: mint + type: string + signer: + description: Indicates if the account needs to sign the instruction. If + true a signature for this account must be provided + example: false + type: boolean + writable: + description: Indicates if the account's data can be changed by the instruction. + example: true + type: boolean + address: + description: The address of the account + example: 4PVcDXAkAgQkVx4puiSXdZ5H8BrTqUzstJBKKWFy3XsH + type: string + required: + - address + - name + type: object + SolParameterWithValue: + properties: + value: + description: The value of the parameter + example: "1000000" + type: string + name: + description: The name of the parameter + example: mint + type: string + type: + $ref: '#/components/schemas/IdlType' + required: + - name + - type + - value + type: object + SolanaInstructionWithValue: + properties: + name: + description: The name of the instruction + example: approve + type: string + discriminator: + description: The discriminator for the instruction. Acts as a function selector + example: + - 13 + items: + type: number + type: array + accounts: + items: + $ref: '#/components/schemas/SOLAccountWithValue' + type: array + args: + description: The arguments of the instruction + items: + $ref: '#/components/schemas/SolParameterWithValue' + type: array + required: + - accounts + - args + - discriminator + - name + type: object ReadCallFunctionDto: example: abiFunction: @@ -36646,14 +37032,10 @@ components: type: type properties: abiFunction: - $ref: '#/components/schemas/ReadAbiFunction' + $ref: '#/components/schemas/ReadCallFunctionDto_abiFunction' required: - abiFunction type: object - ParameterWithValueList: - items: - $ref: '#/components/schemas/ParameterWithValue' - type: array WriteAbiFunction: example: outputs: @@ -36824,7 +37206,7 @@ components: example: "0" type: string abiFunction: - $ref: '#/components/schemas/WriteAbiFunction' + $ref: '#/components/schemas/WriteCallFunctionDto_abiFunction' amount: description: Amount in base asset. Being used in payable functions example: "12.345" @@ -46455,6 +46837,23 @@ components: required: - timeSeconds type: object + GasslessStandardConfigurations_gaslessStandardConfigurations_value: + example: + forwarderAddresses: + - 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + - 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + lastOnChainCheck: 2024-09-09T04:17:46.918Z + properties: + lastOnChainCheck: + example: 2024-09-09T04:17:46.918Z + format: date-time + type: string + forwarderAddresses: + items: + example: 0x2E7B54631e18E9eEcc2eb5219249cc8388586f66 + type: string + type: array + type: object TokenLinkDto_tokenMetadata: description: The token's metadata oneOf: @@ -46465,9 +46864,22 @@ components: oneOf: - $ref: '#/components/schemas/EVMTokenCreateParamsDto' - $ref: '#/components/schemas/StellarRippleCreateParamsDto' + - $ref: '#/components/schemas/SolanaSimpleCreateParams' CreateMultichainTokenRequest_createParams: oneOf: - $ref: '#/components/schemas/EVMTokenCreateParamsDto' + ContractAbiResponseDto_abi_inner: + oneOf: + - $ref: '#/components/schemas/AbiFunction' + - $ref: '#/components/schemas/SolanaInstruction' + ReadCallFunctionDto_abiFunction: + oneOf: + - $ref: '#/components/schemas/ReadAbiFunction' + - $ref: '#/components/schemas/SolanaInstructionWithValue' + WriteCallFunctionDto_abiFunction: + oneOf: + - $ref: '#/components/schemas/WriteAbiFunction' + - $ref: '#/components/schemas/SolanaInstructionWithValue' SetOtaStatusResponse_oneOf: example: message: No change needed. The current status is false diff --git a/build.gradle b/build.gradle index b4e6b879..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.1.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/ContractAbiResponseDto.md b/docs/ContractAbiResponseDto.md index 901458cd..41cf5a1b 100644 --- a/docs/ContractAbiResponseDto.md +++ b/docs/ContractAbiResponseDto.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the contract | | +|**abi** | [**List<ContractAbiResponseDtoAbiInner>**](ContractAbiResponseDtoAbiInner.md) | The abi of the contract | | |**implementationAbi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the implementation contract if exists. Relevant only for proxy patterns | [optional] | diff --git a/docs/ContractAbiResponseDtoAbiInner.md b/docs/ContractAbiResponseDtoAbiInner.md new file mode 100644 index 00000000..a8d2b8cf --- /dev/null +++ b/docs/ContractAbiResponseDtoAbiInner.md @@ -0,0 +1,37 @@ + + +# ContractAbiResponseDtoAbiInner + +## oneOf schemas +* [AbiFunction](AbiFunction.md) +* [SolanaInstruction](SolanaInstruction.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ContractAbiResponseDtoAbiInner; +import com.fireblocks.sdk.model.AbiFunction; +import com.fireblocks.sdk.model.SolanaInstruction; + +public class Example { + public static void main(String[] args) { + ContractAbiResponseDtoAbiInner exampleContractAbiResponseDtoAbiInner = new ContractAbiResponseDtoAbiInner(); + + // create a new AbiFunction + AbiFunction exampleAbiFunction = new AbiFunction(); + // set ContractAbiResponseDtoAbiInner to AbiFunction + exampleContractAbiResponseDtoAbiInner.setActualInstance(exampleAbiFunction); + // to get back the AbiFunction set earlier + AbiFunction testAbiFunction = (AbiFunction) exampleContractAbiResponseDtoAbiInner.getActualInstance(); + + // create a new SolanaInstruction + SolanaInstruction exampleSolanaInstruction = new SolanaInstruction(); + // set ContractAbiResponseDtoAbiInner to SolanaInstruction + exampleContractAbiResponseDtoAbiInner.setActualInstance(exampleSolanaInstruction); + // to get back the SolanaInstruction set earlier + SolanaInstruction testSolanaInstruction = (SolanaInstruction) exampleContractAbiResponseDtoAbiInner.getActualInstance(); + } +} +``` + + diff --git a/docs/ContractUploadRequest.md b/docs/ContractUploadRequest.md index 4401f652..aa721c2d 100644 --- a/docs/ContractUploadRequest.md +++ b/docs/ContractUploadRequest.md @@ -16,6 +16,7 @@ |**docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] | |**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] | +|**protocol** | [**ProtocolEnum**](#ProtocolEnum) | The protocol that the template will be used for | [optional] | @@ -31,3 +32,12 @@ +## Enum: ProtocolEnum + +| Name | Value | +|---- | -----| +| ETH | "ETH" | +| SOL | "SOL" | + + + diff --git a/docs/CreateTokenRequestDtoCreateParams.md b/docs/CreateTokenRequestDtoCreateParams.md index de35004d..7a01f874 100644 --- a/docs/CreateTokenRequestDtoCreateParams.md +++ b/docs/CreateTokenRequestDtoCreateParams.md @@ -4,6 +4,7 @@ ## oneOf schemas * [EVMTokenCreateParamsDto](EVMTokenCreateParamsDto.md) +* [SolanaSimpleCreateParams](SolanaSimpleCreateParams.md) * [StellarRippleCreateParamsDto](StellarRippleCreateParamsDto.md) ## Example @@ -11,6 +12,7 @@ // Import classes: import com.fireblocks.sdk.model.CreateTokenRequestDtoCreateParams; import com.fireblocks.sdk.model.EVMTokenCreateParamsDto; +import com.fireblocks.sdk.model.SolanaSimpleCreateParams; import com.fireblocks.sdk.model.StellarRippleCreateParamsDto; public class Example { @@ -24,6 +26,13 @@ public class Example { // to get back the EVMTokenCreateParamsDto set earlier EVMTokenCreateParamsDto testEVMTokenCreateParamsDto = (EVMTokenCreateParamsDto) exampleCreateTokenRequestDtoCreateParams.getActualInstance(); + // create a new SolanaSimpleCreateParams + SolanaSimpleCreateParams exampleSolanaSimpleCreateParams = new SolanaSimpleCreateParams(); + // set CreateTokenRequestDtoCreateParams to SolanaSimpleCreateParams + exampleCreateTokenRequestDtoCreateParams.setActualInstance(exampleSolanaSimpleCreateParams); + // to get back the SolanaSimpleCreateParams set earlier + SolanaSimpleCreateParams testSolanaSimpleCreateParams = (SolanaSimpleCreateParams) exampleCreateTokenRequestDtoCreateParams.getActualInstance(); + // create a new StellarRippleCreateParamsDto StellarRippleCreateParamsDto exampleStellarRippleCreateParamsDto = new StellarRippleCreateParamsDto(); // set CreateTokenRequestDtoCreateParams to StellarRippleCreateParamsDto diff --git a/docs/DeployedContractResponseDto.md b/docs/DeployedContractResponseDto.md index a506f50f..87b27809 100644 --- a/docs/DeployedContractResponseDto.md +++ b/docs/DeployedContractResponseDto.md @@ -12,6 +12,10 @@ |**contractTemplateId** | **String** | The contract template identifier | | |**vaultAccountId** | **String** | The vault account id this contract was deploy from | [optional] | |**blockchainId** | **String** | | | +|**baseAssetId** | **String** | The blockchain base assetId | [optional] | +|**gaslessConfig** | [**GasslessStandardConfigurations**](GasslessStandardConfigurations.md) | | [optional] | +|**multichainDeploymentMetadata** | [**MultichainDeploymentMetadata**](MultichainDeploymentMetadata.md) | | [optional] | +|**solanaConfig** | [**SolanaConfig**](SolanaConfig.md) | | [optional] | diff --git a/docs/GasslessStandardConfigurations.md b/docs/GasslessStandardConfigurations.md new file mode 100644 index 00000000..95cfd119 --- /dev/null +++ b/docs/GasslessStandardConfigurations.md @@ -0,0 +1,14 @@ + + +# GasslessStandardConfigurations + +The gasless configuration of the contract + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**gaslessStandardConfigurations** | [**Map<String, GasslessStandardConfigurationsGaslessStandardConfigurationsValue>**](GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md) | | [optional] | + + + diff --git a/docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md b/docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md new file mode 100644 index 00000000..c7fddfbd --- /dev/null +++ b/docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md @@ -0,0 +1,14 @@ + + +# GasslessStandardConfigurationsGaslessStandardConfigurationsValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**lastOnChainCheck** | **OffsetDateTime** | | [optional] | +|**forwarderAddresses** | **List<String>** | | [optional] | + + + diff --git a/docs/IdlType.md b/docs/IdlType.md new file mode 100644 index 00000000..1731bf97 --- /dev/null +++ b/docs/IdlType.md @@ -0,0 +1,45 @@ + + +# IdlType + +## Enum + + +* `BOOL` (value: `"bool"`) + +* `U8` (value: `"u8"`) + +* `I8` (value: `"i8"`) + +* `U16` (value: `"u16"`) + +* `I16` (value: `"i16"`) + +* `U32` (value: `"u32"`) + +* `I32` (value: `"i32"`) + +* `F32` (value: `"f32"`) + +* `U64` (value: `"u64"`) + +* `I64` (value: `"i64"`) + +* `F64` (value: `"f64"`) + +* `U128` (value: `"u128"`) + +* `I128` (value: `"i128"`) + +* `U256` (value: `"u256"`) + +* `I256` (value: `"i256"`) + +* `BYTES` (value: `"bytes"`) + +* `STRING` (value: `"string"`) + +* `PUBKEY` (value: `"pubkey"`) + + + diff --git a/docs/KeyLinkBetaApi.md b/docs/KeyLinkBetaApi.md index baf9c674..f3109b95 100644 --- a/docs/KeyLinkBetaApi.md +++ b/docs/KeyLinkBetaApi.md @@ -356,7 +356,7 @@ No authorization required ## getSigningKeysList -> CompletableFuture> getSigningKeysList getSigningKeysList(pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available) +> CompletableFuture> getSigningKeysList getSigningKeysList(pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available, isAssigned) Get list of signing keys @@ -394,8 +394,9 @@ public class Example { String algorithm = "ECDSA_SECP256K1"; // String | Return only keys with a specific algorithm Boolean enabled = true; // Boolean | Return keys that have been proof of ownership Boolean available = true; // Boolean | Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set + Boolean isAssigned = true; // Boolean | Return keys that are assigned to a vault account try { - CompletableFuture> response = fireblocks.keyLinkBeta().getSigningKeysList(pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available); + CompletableFuture> response = fireblocks.keyLinkBeta().getSigningKeysList(pageCursor, pageSize, sortBy, order, vaultAccountId, agentUserId, algorithm, enabled, available, isAssigned); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -431,6 +432,7 @@ public class Example { | **algorithm** | **String**| Return only keys with a specific algorithm | [optional] [enum: ECDSA_SECP256K1, EDDSA_ED25519] | | **enabled** | **Boolean**| Return keys that have been proof of ownership | [optional] | | **available** | **Boolean**| Return keys that are proof of ownership but not assigned. Available filter can be used only when vaultAccountId and enabled filters are not set | [optional] | +| **isAssigned** | **Boolean**| Return keys that are assigned to a vault account | [optional] | ### Return type diff --git a/docs/MultichainDeploymentMetadata.md b/docs/MultichainDeploymentMetadata.md new file mode 100644 index 00000000..da2e00bb --- /dev/null +++ b/docs/MultichainDeploymentMetadata.md @@ -0,0 +1,19 @@ + + +# MultichainDeploymentMetadata + +The multichain deployment metadata + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The unique identifier of the deployment metadata | [optional] | +|**address** | **String** | The address of the deployed contract | [optional] | +|**templateId** | **UUID** | The unique identifier of the contract template | [optional] | +|**deploymentSalt** | **String** | The salt used for the deployment | [optional] | +|**initParams** | [**List<ParameterWithValue>**](ParameterWithValue.md) | | [optional] | +|**encodedInitParams** | **String** | The encoded init params | [optional] | + + + diff --git a/docs/ReadCallFunctionDto.md b/docs/ReadCallFunctionDto.md index d88db5ae..33eae17e 100644 --- a/docs/ReadCallFunctionDto.md +++ b/docs/ReadCallFunctionDto.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**abiFunction** | [**ReadAbiFunction**](ReadAbiFunction.md) | | | +|**abiFunction** | [**ReadCallFunctionDtoAbiFunction**](ReadCallFunctionDtoAbiFunction.md) | | | diff --git a/docs/ReadCallFunctionDtoAbiFunction.md b/docs/ReadCallFunctionDtoAbiFunction.md new file mode 100644 index 00000000..93e767f4 --- /dev/null +++ b/docs/ReadCallFunctionDtoAbiFunction.md @@ -0,0 +1,37 @@ + + +# ReadCallFunctionDtoAbiFunction + +## oneOf schemas +* [ReadAbiFunction](ReadAbiFunction.md) +* [SolanaInstructionWithValue](SolanaInstructionWithValue.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ReadCallFunctionDtoAbiFunction; +import com.fireblocks.sdk.model.ReadAbiFunction; +import com.fireblocks.sdk.model.SolanaInstructionWithValue; + +public class Example { + public static void main(String[] args) { + ReadCallFunctionDtoAbiFunction exampleReadCallFunctionDtoAbiFunction = new ReadCallFunctionDtoAbiFunction(); + + // create a new ReadAbiFunction + ReadAbiFunction exampleReadAbiFunction = new ReadAbiFunction(); + // set ReadCallFunctionDtoAbiFunction to ReadAbiFunction + exampleReadCallFunctionDtoAbiFunction.setActualInstance(exampleReadAbiFunction); + // to get back the ReadAbiFunction set earlier + ReadAbiFunction testReadAbiFunction = (ReadAbiFunction) exampleReadCallFunctionDtoAbiFunction.getActualInstance(); + + // create a new SolanaInstructionWithValue + SolanaInstructionWithValue exampleSolanaInstructionWithValue = new SolanaInstructionWithValue(); + // set ReadCallFunctionDtoAbiFunction to SolanaInstructionWithValue + exampleReadCallFunctionDtoAbiFunction.setActualInstance(exampleSolanaInstructionWithValue); + // to get back the SolanaInstructionWithValue set earlier + SolanaInstructionWithValue testSolanaInstructionWithValue = (SolanaInstructionWithValue) exampleReadCallFunctionDtoAbiFunction.getActualInstance(); + } +} +``` + + diff --git a/docs/SOLAccount.md b/docs/SOLAccount.md new file mode 100644 index 00000000..d2e78c1b --- /dev/null +++ b/docs/SOLAccount.md @@ -0,0 +1,17 @@ + + +# SOLAccount + +The accounts involved in the instruction + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the account | | +|**signer** | **Boolean** | Indicates if the account needs to sign the instruction. If true a signature for this account must be provided | [optional] | +|**writable** | **Boolean** | Indicates if the account's data can be changed by the instruction. | [optional] | +|**address** | **String** | The address of the account | [optional] | + + + diff --git a/docs/SOLAccountWithValue.md b/docs/SOLAccountWithValue.md new file mode 100644 index 00000000..f494ee45 --- /dev/null +++ b/docs/SOLAccountWithValue.md @@ -0,0 +1,16 @@ + + +# SOLAccountWithValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the account | | +|**signer** | **Boolean** | Indicates if the account needs to sign the instruction. If true a signature for this account must be provided | [optional] | +|**writable** | **Boolean** | Indicates if the account's data can be changed by the instruction. | [optional] | +|**address** | **String** | The address of the account | | + + + diff --git a/docs/SolParameter.md b/docs/SolParameter.md new file mode 100644 index 00000000..34fdc38d --- /dev/null +++ b/docs/SolParameter.md @@ -0,0 +1,15 @@ + + +# SolParameter + +The arguments of the instruction + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the parameter | | +|**type** | **IdlType** | | | + + + diff --git a/docs/SolParameterWithValue.md b/docs/SolParameterWithValue.md new file mode 100644 index 00000000..edc06b89 --- /dev/null +++ b/docs/SolParameterWithValue.md @@ -0,0 +1,15 @@ + + +# SolParameterWithValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | The value of the parameter | | +|**name** | **String** | The name of the parameter | | +|**type** | **IdlType** | | | + + + diff --git a/docs/SolanaConfig.md b/docs/SolanaConfig.md new file mode 100644 index 00000000..8e554c1e --- /dev/null +++ b/docs/SolanaConfig.md @@ -0,0 +1,25 @@ + + +# SolanaConfig + +The Solana configuration of the contract + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**extensions** | **List<String>** | The extensions that the contract implements. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type of the contract. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SPL | "SPL" | +| TOKEN2022 | "TOKEN2022" | +| PROGRAM | "PROGRAM" | + + + diff --git a/docs/SolanaInstruction.md b/docs/SolanaInstruction.md new file mode 100644 index 00000000..ecb52de7 --- /dev/null +++ b/docs/SolanaInstruction.md @@ -0,0 +1,16 @@ + + +# SolanaInstruction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the instruction | | +|**discriminator** | **List<BigDecimal>** | The discriminator for the instruction. Acts as a function selector | | +|**accounts** | [**List<SOLAccount>**](SOLAccount.md) | | | +|**args** | [**List<SolParameter>**](SolParameter.md) | | | + + + diff --git a/docs/SolanaInstructionWithValue.md b/docs/SolanaInstructionWithValue.md new file mode 100644 index 00000000..14d39edc --- /dev/null +++ b/docs/SolanaInstructionWithValue.md @@ -0,0 +1,16 @@ + + +# SolanaInstructionWithValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the instruction | | +|**discriminator** | **List<BigDecimal>** | The discriminator for the instruction. Acts as a function selector | | +|**accounts** | [**List<SOLAccountWithValue>**](SOLAccountWithValue.md) | | | +|**args** | [**List<SolParameterWithValue>**](SolParameterWithValue.md) | The arguments of the instruction | | + + + diff --git a/docs/SolanaSimpleCreateParams.md b/docs/SolanaSimpleCreateParams.md new file mode 100644 index 00000000..b866a66e --- /dev/null +++ b/docs/SolanaSimpleCreateParams.md @@ -0,0 +1,15 @@ + + +# SolanaSimpleCreateParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the token or asset being created. | | +|**symbol** | **String** | The symbol for the token, typically an abbreviated representation. | | +|**decimals** | **Integer** | The number of decimal places the token supports (e.g., 9 for typical Solana tokens). | | + + + diff --git a/docs/WriteCallFunctionDto.md b/docs/WriteCallFunctionDto.md index f88a9c18..7cbfb037 100644 --- a/docs/WriteCallFunctionDto.md +++ b/docs/WriteCallFunctionDto.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**vaultAccountId** | **String** | The vault account id this contract was deploy from | | -|**abiFunction** | [**WriteAbiFunction**](WriteAbiFunction.md) | | | +|**abiFunction** | [**WriteCallFunctionDtoAbiFunction**](WriteCallFunctionDtoAbiFunction.md) | | | |**amount** | **String** | Amount in base asset. Being used in payable functions | [optional] | |**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] | diff --git a/docs/WriteCallFunctionDtoAbiFunction.md b/docs/WriteCallFunctionDtoAbiFunction.md new file mode 100644 index 00000000..ea163f6e --- /dev/null +++ b/docs/WriteCallFunctionDtoAbiFunction.md @@ -0,0 +1,37 @@ + + +# WriteCallFunctionDtoAbiFunction + +## oneOf schemas +* [SolanaInstructionWithValue](SolanaInstructionWithValue.md) +* [WriteAbiFunction](WriteAbiFunction.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.WriteCallFunctionDtoAbiFunction; +import com.fireblocks.sdk.model.SolanaInstructionWithValue; +import com.fireblocks.sdk.model.WriteAbiFunction; + +public class Example { + public static void main(String[] args) { + WriteCallFunctionDtoAbiFunction exampleWriteCallFunctionDtoAbiFunction = new WriteCallFunctionDtoAbiFunction(); + + // create a new SolanaInstructionWithValue + SolanaInstructionWithValue exampleSolanaInstructionWithValue = new SolanaInstructionWithValue(); + // set WriteCallFunctionDtoAbiFunction to SolanaInstructionWithValue + exampleWriteCallFunctionDtoAbiFunction.setActualInstance(exampleSolanaInstructionWithValue); + // to get back the SolanaInstructionWithValue set earlier + SolanaInstructionWithValue testSolanaInstructionWithValue = (SolanaInstructionWithValue) exampleWriteCallFunctionDtoAbiFunction.getActualInstance(); + + // create a new WriteAbiFunction + WriteAbiFunction exampleWriteAbiFunction = new WriteAbiFunction(); + // set WriteCallFunctionDtoAbiFunction to WriteAbiFunction + exampleWriteCallFunctionDtoAbiFunction.setActualInstance(exampleWriteAbiFunction); + // to get back the WriteAbiFunction set earlier + WriteAbiFunction testWriteAbiFunction = (WriteAbiFunction) exampleWriteCallFunctionDtoAbiFunction.getActualInstance(); + } +} +``` + + diff --git a/pom.xml b/pom.xml index 03124095..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 10.1.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 69e12da7..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.1.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/KeyLinkBetaApi.java b/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java index df84fd7a..52488501 100644 --- a/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java @@ -426,6 +426,7 @@ private HttpRequest.Builder getSigningKeyRequestBuilder(String keyId) throws Api * @param enabled Return keys that have been proof of ownership (optional) * @param available Return keys that are proof of ownership but not assigned. Available filter * can be used only when vaultAccountId and enabled filters are not set (optional) + * @param isAssigned Return keys that are assigned to a vault account (optional) * @return CompletableFuture<ApiResponse<GetSigningKeyResponseDto>> * @throws ApiException if fails to make API call */ @@ -438,7 +439,8 @@ public CompletableFuture> getSigningKeysLi String agentUserId, String algorithm, Boolean enabled, - Boolean available) + Boolean available, + Boolean isAssigned) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = @@ -451,7 +453,8 @@ public CompletableFuture> getSigningKeysLi agentUserId, algorithm, enabled, - available); + available, + isAssigned); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -494,7 +497,8 @@ private HttpRequest.Builder getSigningKeysListRequestBuilder( String agentUserId, String algorithm, Boolean enabled, - Boolean available) + Boolean available, + Boolean isAssigned) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -522,6 +526,8 @@ private HttpRequest.Builder getSigningKeysListRequestBuilder( localVarQueryParams.addAll(ApiClient.parameterToPairs("enabled", enabled)); localVarQueryParameterBaseName = "available"; localVarQueryParams.addAll(ApiClient.parameterToPairs("available", available)); + localVarQueryParameterBaseName = "isAssigned"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("isAssigned", isAssigned)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); diff --git a/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java b/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java index f2211fb8..e014c319 100644 --- a/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java +++ b/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java @@ -29,19 +29,19 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ContractAbiResponseDto { public static final String JSON_PROPERTY_ABI = "abi"; - private List abi = new ArrayList<>(); + private List abi = new ArrayList<>(); public static final String JSON_PROPERTY_IMPLEMENTATION_ABI = "implementationAbi"; private List implementationAbi; public ContractAbiResponseDto() {} - public ContractAbiResponseDto abi(List abi) { + public ContractAbiResponseDto abi(List abi) { this.abi = abi; return this; } - public ContractAbiResponseDto addAbiItem(AbiFunction abiItem) { + public ContractAbiResponseDto addAbiItem(ContractAbiResponseDtoAbiInner abiItem) { if (this.abi == null) { this.abi = new ArrayList<>(); } @@ -57,13 +57,13 @@ public ContractAbiResponseDto addAbiItem(AbiFunction abiItem) { @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; } diff --git a/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInner.java b/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInner.java new file mode 100644 index 00000000..97fe8774 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInner.java @@ -0,0 +1,326 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize( + using = ContractAbiResponseDtoAbiInner.ContractAbiResponseDtoAbiInnerDeserializer.class) +@JsonSerialize( + using = ContractAbiResponseDtoAbiInner.ContractAbiResponseDtoAbiInnerSerializer.class) +public class ContractAbiResponseDtoAbiInner extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ContractAbiResponseDtoAbiInner.class.getName()); + + public static class ContractAbiResponseDtoAbiInnerSerializer + extends StdSerializer { + public ContractAbiResponseDtoAbiInnerSerializer(Class t) { + super(t); + } + + public ContractAbiResponseDtoAbiInnerSerializer() { + this(null); + } + + @Override + public void serialize( + ContractAbiResponseDtoAbiInner value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ContractAbiResponseDtoAbiInnerDeserializer + extends StdDeserializer { + public ContractAbiResponseDtoAbiInnerDeserializer() { + this(ContractAbiResponseDtoAbiInner.class); + } + + public ContractAbiResponseDtoAbiInnerDeserializer(Class vc) { + super(vc); + } + + @Override + public ContractAbiResponseDtoAbiInner deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AbiFunction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AbiFunction.class.equals(Integer.class) + || AbiFunction.class.equals(Long.class) + || AbiFunction.class.equals(Float.class) + || AbiFunction.class.equals(Double.class) + || AbiFunction.class.equals(Boolean.class) + || AbiFunction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AbiFunction.class.equals(Integer.class) + || AbiFunction.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AbiFunction.class.equals(Float.class) + || AbiFunction.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AbiFunction.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AbiFunction.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AbiFunction.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'AbiFunction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AbiFunction'", e); + } + + // deserialize SolanaInstruction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SolanaInstruction.class.equals(Integer.class) + || SolanaInstruction.class.equals(Long.class) + || SolanaInstruction.class.equals(Float.class) + || SolanaInstruction.class.equals(Double.class) + || SolanaInstruction.class.equals(Boolean.class) + || SolanaInstruction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SolanaInstruction.class.equals(Integer.class) + || SolanaInstruction.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SolanaInstruction.class.equals(Float.class) + || SolanaInstruction.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (SolanaInstruction.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SolanaInstruction.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(SolanaInstruction.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SolanaInstruction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SolanaInstruction'", e); + } + + if (match == 1) { + ContractAbiResponseDtoAbiInner ret = new ContractAbiResponseDtoAbiInner(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for ContractAbiResponseDtoAbiInner: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ContractAbiResponseDtoAbiInner getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ContractAbiResponseDtoAbiInner cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public ContractAbiResponseDtoAbiInner() { + super("oneOf", Boolean.FALSE); + } + + public ContractAbiResponseDtoAbiInner(AbiFunction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ContractAbiResponseDtoAbiInner(SolanaInstruction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AbiFunction", AbiFunction.class); + schemas.put("SolanaInstruction", SolanaInstruction.class); + JSON.registerDescendants( + ContractAbiResponseDtoAbiInner.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return ContractAbiResponseDtoAbiInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AbiFunction, SolanaInstruction + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AbiFunction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(SolanaInstruction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AbiFunction, SolanaInstruction"); + } + + /** + * Get the actual instance, which can be the following: AbiFunction, SolanaInstruction + * + * @return The actual instance (AbiFunction, SolanaInstruction) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AbiFunction`. If the actual instance is not `AbiFunction`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `AbiFunction` + * @throws ClassCastException if the instance is not `AbiFunction` + */ + public AbiFunction getAbiFunction() throws ClassCastException { + return (AbiFunction) super.getActualInstance(); + } + + /** + * Get the actual instance of `SolanaInstruction`. If the actual instance is not + * `SolanaInstruction`, the ClassCastException will be thrown. + * + * @return The actual instance of `SolanaInstruction` + * @throws ClassCastException if the instance is not `SolanaInstruction` + */ + public SolanaInstruction getSolanaInstruction() throws ClassCastException { + return (SolanaInstruction) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof AbiFunction) { + if (getActualInstance() != null) { + joiner.add( + ((AbiFunction) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SolanaInstruction) { + if (getActualInstance() != null) { + joiner.add( + ((SolanaInstruction) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java index 1e217d1a..fbfd53eb 100644 --- a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java @@ -35,7 +35,8 @@ ContractUploadRequest.JSON_PROPERTY_TYPE, ContractUploadRequest.JSON_PROPERTY_DOCS, ContractUploadRequest.JSON_PROPERTY_ABI, - ContractUploadRequest.JSON_PROPERTY_ATTRIBUTES + ContractUploadRequest.JSON_PROPERTY_ATTRIBUTES, + ContractUploadRequest.JSON_PROPERTY_PROTOCOL }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ContractUploadRequest { @@ -105,6 +106,42 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; private ContractAttributes attributes; + /** The protocol that the template will be used for */ + public enum ProtocolEnum { + ETH("ETH"), + + SOL("SOL"); + + private String value; + + ProtocolEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProtocolEnum fromValue(String value) { + for (ProtocolEnum b : ProtocolEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_PROTOCOL = "protocol"; + private ProtocolEnum protocol; + public ContractUploadRequest() {} public ContractUploadRequest name(String name) { @@ -324,6 +361,29 @@ public void setAttributes(ContractAttributes attributes) { this.attributes = attributes; } + public ContractUploadRequest protocol(ProtocolEnum protocol) { + this.protocol = protocol; + return this; + } + + /** + * The protocol that the template will be used for + * + * @return protocol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProtocolEnum getProtocol() { + return protocol; + } + + @JsonProperty(JSON_PROPERTY_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProtocol(ProtocolEnum protocol) { + this.protocol = protocol; + } + /** Return true if this ContractUploadRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -342,7 +402,8 @@ public boolean equals(Object o) { && Objects.equals(this.type, contractUploadRequest.type) && Objects.equals(this.docs, contractUploadRequest.docs) && Objects.equals(this.abi, contractUploadRequest.abi) - && Objects.equals(this.attributes, contractUploadRequest.attributes); + && Objects.equals(this.attributes, contractUploadRequest.attributes) + && Objects.equals(this.protocol, contractUploadRequest.protocol); } @Override @@ -356,7 +417,8 @@ public int hashCode() { type, docs, abi, - attributes); + attributes, + protocol); } @Override @@ -372,6 +434,7 @@ public String toString() { sb.append(" docs: ").append(toIndentedString(docs)).append("\n"); sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); sb.append("}"); return sb.toString(); } @@ -522,6 +585,17 @@ public String toUrlQueryString(String prefix) { joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); } + // add `protocol` to the URL query string + if (getProtocol() != null) { + joiner.add( + String.format( + "%sprotocol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getProtocol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java index edfe47c4..93643e07 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java @@ -134,6 +134,55 @@ public CreateTokenRequestDtoCreateParams deserialize( e); } + // deserialize SolanaSimpleCreateParams + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SolanaSimpleCreateParams.class.equals(Integer.class) + || SolanaSimpleCreateParams.class.equals(Long.class) + || SolanaSimpleCreateParams.class.equals(Float.class) + || SolanaSimpleCreateParams.class.equals(Double.class) + || SolanaSimpleCreateParams.class.equals(Boolean.class) + || SolanaSimpleCreateParams.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SolanaSimpleCreateParams.class.equals(Integer.class) + || SolanaSimpleCreateParams.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SolanaSimpleCreateParams.class.equals(Float.class) + || SolanaSimpleCreateParams.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (SolanaSimpleCreateParams.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SolanaSimpleCreateParams.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(SolanaSimpleCreateParams.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SolanaSimpleCreateParams'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'SolanaSimpleCreateParams'", + e); + } + // deserialize StellarRippleCreateParamsDto try { boolean attemptParsing = true; @@ -218,6 +267,11 @@ public CreateTokenRequestDtoCreateParams(EVMTokenCreateParamsDto o) { setActualInstance(o); } + public CreateTokenRequestDtoCreateParams(SolanaSimpleCreateParams o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CreateTokenRequestDtoCreateParams(StellarRippleCreateParamsDto o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -225,6 +279,7 @@ public CreateTokenRequestDtoCreateParams(StellarRippleCreateParamsDto o) { static { schemas.put("EVMTokenCreateParamsDto", EVMTokenCreateParamsDto.class); + schemas.put("SolanaSimpleCreateParams", SolanaSimpleCreateParams.class); schemas.put("StellarRippleCreateParamsDto", StellarRippleCreateParamsDto.class); JSON.registerDescendants( CreateTokenRequestDtoCreateParams.class, Collections.unmodifiableMap(schemas)); @@ -237,7 +292,8 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: EVMTokenCreateParamsDto, StellarRippleCreateParamsDto + * against the oneOf child schemas: EVMTokenCreateParamsDto, SolanaSimpleCreateParams, + * StellarRippleCreateParamsDto * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be * a composed schema (allOf, anyOf, oneOf). @@ -249,6 +305,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(SolanaSimpleCreateParams.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( StellarRippleCreateParamsDto.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -256,15 +317,16 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be EVMTokenCreateParamsDto," + "Invalid instance type. Must be EVMTokenCreateParamsDto, SolanaSimpleCreateParams," + " StellarRippleCreateParamsDto"); } /** * Get the actual instance, which can be the following: EVMTokenCreateParamsDto, - * StellarRippleCreateParamsDto + * SolanaSimpleCreateParams, StellarRippleCreateParamsDto * - * @return The actual instance (EVMTokenCreateParamsDto, StellarRippleCreateParamsDto) + * @return The actual instance (EVMTokenCreateParamsDto, SolanaSimpleCreateParams, + * StellarRippleCreateParamsDto) */ @Override public Object getActualInstance() { @@ -282,6 +344,17 @@ public EVMTokenCreateParamsDto getEVMTokenCreateParamsDto() throws ClassCastExce return (EVMTokenCreateParamsDto) super.getActualInstance(); } + /** + * Get the actual instance of `SolanaSimpleCreateParams`. If the actual instance is not + * `SolanaSimpleCreateParams`, the ClassCastException will be thrown. + * + * @return The actual instance of `SolanaSimpleCreateParams` + * @throws ClassCastException if the instance is not `SolanaSimpleCreateParams` + */ + public SolanaSimpleCreateParams getSolanaSimpleCreateParams() throws ClassCastException { + return (SolanaSimpleCreateParams) super.getActualInstance(); + } + /** * Get the actual instance of `StellarRippleCreateParamsDto`. If the actual instance is not * `StellarRippleCreateParamsDto`, the ClassCastException will be thrown. @@ -342,6 +415,14 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } + if (getActualInstance() instanceof SolanaSimpleCreateParams) { + if (getActualInstance() != null) { + joiner.add( + ((SolanaSimpleCreateParams) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java b/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java index 7b356c46..f4afd66a 100644 --- a/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java +++ b/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java @@ -27,7 +27,11 @@ DeployedContractResponseDto.JSON_PROPERTY_CONTRACT_ADDRESS, DeployedContractResponseDto.JSON_PROPERTY_CONTRACT_TEMPLATE_ID, DeployedContractResponseDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, - DeployedContractResponseDto.JSON_PROPERTY_BLOCKCHAIN_ID + DeployedContractResponseDto.JSON_PROPERTY_BLOCKCHAIN_ID, + DeployedContractResponseDto.JSON_PROPERTY_BASE_ASSET_ID, + DeployedContractResponseDto.JSON_PROPERTY_GASLESS_CONFIG, + DeployedContractResponseDto.JSON_PROPERTY_MULTICHAIN_DEPLOYMENT_METADATA, + DeployedContractResponseDto.JSON_PROPERTY_SOLANA_CONFIG }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DeployedContractResponseDto { @@ -46,6 +50,19 @@ public class DeployedContractResponseDto { public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; private String blockchainId; + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public static final String JSON_PROPERTY_GASLESS_CONFIG = "gaslessConfig"; + private GasslessStandardConfigurations gaslessConfig; + + public static final String JSON_PROPERTY_MULTICHAIN_DEPLOYMENT_METADATA = + "multichainDeploymentMetadata"; + private MultichainDeploymentMetadata multichainDeploymentMetadata; + + public static final String JSON_PROPERTY_SOLANA_CONFIG = "solanaConfig"; + private SolanaConfig solanaConfig; + public DeployedContractResponseDto() {} public DeployedContractResponseDto id(String id) { @@ -163,6 +180,100 @@ public void setBlockchainId(String blockchainId) { this.blockchainId = blockchainId; } + public DeployedContractResponseDto baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The blockchain base assetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public DeployedContractResponseDto gaslessConfig(GasslessStandardConfigurations gaslessConfig) { + this.gaslessConfig = gaslessConfig; + return this; + } + + /** + * Get gaslessConfig + * + * @return gaslessConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GASLESS_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GasslessStandardConfigurations getGaslessConfig() { + return gaslessConfig; + } + + @JsonProperty(JSON_PROPERTY_GASLESS_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGaslessConfig(GasslessStandardConfigurations gaslessConfig) { + this.gaslessConfig = gaslessConfig; + } + + public DeployedContractResponseDto multichainDeploymentMetadata( + MultichainDeploymentMetadata multichainDeploymentMetadata) { + this.multichainDeploymentMetadata = multichainDeploymentMetadata; + return this; + } + + /** + * Get multichainDeploymentMetadata + * + * @return multichainDeploymentMetadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MULTICHAIN_DEPLOYMENT_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MultichainDeploymentMetadata getMultichainDeploymentMetadata() { + return multichainDeploymentMetadata; + } + + @JsonProperty(JSON_PROPERTY_MULTICHAIN_DEPLOYMENT_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMultichainDeploymentMetadata( + MultichainDeploymentMetadata multichainDeploymentMetadata) { + this.multichainDeploymentMetadata = multichainDeploymentMetadata; + } + + public DeployedContractResponseDto solanaConfig(SolanaConfig solanaConfig) { + this.solanaConfig = solanaConfig; + return this; + } + + /** + * Get solanaConfig + * + * @return solanaConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOLANA_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SolanaConfig getSolanaConfig() { + return solanaConfig; + } + + @JsonProperty(JSON_PROPERTY_SOLANA_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSolanaConfig(SolanaConfig solanaConfig) { + this.solanaConfig = solanaConfig; + } + /** Return true if this DeployedContractResponseDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -178,12 +289,27 @@ public boolean equals(Object o) { && Objects.equals( this.contractTemplateId, deployedContractResponseDto.contractTemplateId) && Objects.equals(this.vaultAccountId, deployedContractResponseDto.vaultAccountId) - && Objects.equals(this.blockchainId, deployedContractResponseDto.blockchainId); + && Objects.equals(this.blockchainId, deployedContractResponseDto.blockchainId) + && Objects.equals(this.baseAssetId, deployedContractResponseDto.baseAssetId) + && Objects.equals(this.gaslessConfig, deployedContractResponseDto.gaslessConfig) + && Objects.equals( + this.multichainDeploymentMetadata, + deployedContractResponseDto.multichainDeploymentMetadata) + && Objects.equals(this.solanaConfig, deployedContractResponseDto.solanaConfig); } @Override public int hashCode() { - return Objects.hash(id, contractAddress, contractTemplateId, vaultAccountId, blockchainId); + return Objects.hash( + id, + contractAddress, + contractTemplateId, + vaultAccountId, + blockchainId, + baseAssetId, + gaslessConfig, + multichainDeploymentMetadata, + solanaConfig); } @Override @@ -197,6 +323,12 @@ public String toString() { .append("\n"); sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" gaslessConfig: ").append(toIndentedString(gaslessConfig)).append("\n"); + sb.append(" multichainDeploymentMetadata: ") + .append(toIndentedString(multichainDeploymentMetadata)) + .append("\n"); + sb.append(" solanaConfig: ").append(toIndentedString(solanaConfig)).append("\n"); sb.append("}"); return sb.toString(); } @@ -307,6 +439,36 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBaseAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `gaslessConfig` to the URL query string + if (getGaslessConfig() != null) { + joiner.add(getGaslessConfig().toUrlQueryString(prefix + "gaslessConfig" + suffix)); + } + + // add `multichainDeploymentMetadata` to the URL query string + if (getMultichainDeploymentMetadata() != null) { + joiner.add( + getMultichainDeploymentMetadata() + .toUrlQueryString(prefix + "multichainDeploymentMetadata" + suffix)); + } + + // add `solanaConfig` to the URL query string + if (getSolanaConfig() != null) { + joiner.add(getSolanaConfig().toUrlQueryString(prefix + "solanaConfig" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurations.java b/src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurations.java new file mode 100644 index 00000000..3b6514e3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurations.java @@ -0,0 +1,174 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** The gasless configuration of the contract */ +@JsonPropertyOrder({GasslessStandardConfigurations.JSON_PROPERTY_GASLESS_STANDARD_CONFIGURATIONS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GasslessStandardConfigurations { + public static final String JSON_PROPERTY_GASLESS_STANDARD_CONFIGURATIONS = + "gaslessStandardConfigurations"; + private Map + gaslessStandardConfigurations = new HashMap<>(); + + public GasslessStandardConfigurations() {} + + public GasslessStandardConfigurations gaslessStandardConfigurations( + Map + gaslessStandardConfigurations) { + this.gaslessStandardConfigurations = gaslessStandardConfigurations; + return this; + } + + public GasslessStandardConfigurations putGaslessStandardConfigurationsItem( + String key, + GasslessStandardConfigurationsGaslessStandardConfigurationsValue + gaslessStandardConfigurationsItem) { + if (this.gaslessStandardConfigurations == null) { + this.gaslessStandardConfigurations = new HashMap<>(); + } + this.gaslessStandardConfigurations.put(key, gaslessStandardConfigurationsItem); + return this; + } + + /** + * Get gaslessStandardConfigurations + * + * @return gaslessStandardConfigurations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GASLESS_STANDARD_CONFIGURATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map + getGaslessStandardConfigurations() { + return gaslessStandardConfigurations; + } + + @JsonProperty(JSON_PROPERTY_GASLESS_STANDARD_CONFIGURATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGaslessStandardConfigurations( + Map + gaslessStandardConfigurations) { + this.gaslessStandardConfigurations = gaslessStandardConfigurations; + } + + /** Return true if this GasslessStandardConfigurations object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GasslessStandardConfigurations gasslessStandardConfigurations = + (GasslessStandardConfigurations) o; + return Objects.equals( + this.gaslessStandardConfigurations, + gasslessStandardConfigurations.gaslessStandardConfigurations); + } + + @Override + public int hashCode() { + return Objects.hash(gaslessStandardConfigurations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GasslessStandardConfigurations {\n"); + sb.append(" gaslessStandardConfigurations: ") + .append(toIndentedString(gaslessStandardConfigurations)) + .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 `gaslessStandardConfigurations` to the URL query string + if (getGaslessStandardConfigurations() != null) { + for (String _key : getGaslessStandardConfigurations().keySet()) { + if (getGaslessStandardConfigurations().get(_key) != null) { + joiner.add( + getGaslessStandardConfigurations() + .get(_key) + .toUrlQueryString( + String.format( + "%sgaslessStandardConfigurations%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.java b/src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.java new file mode 100644 index 00000000..2b7518c7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.java @@ -0,0 +1,220 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GasslessStandardConfigurationsGaslessStandardConfigurationsValue */ +@JsonPropertyOrder({ + GasslessStandardConfigurationsGaslessStandardConfigurationsValue + .JSON_PROPERTY_LAST_ON_CHAIN_CHECK, + GasslessStandardConfigurationsGaslessStandardConfigurationsValue + .JSON_PROPERTY_FORWARDER_ADDRESSES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GasslessStandardConfigurationsGaslessStandardConfigurationsValue { + public static final String JSON_PROPERTY_LAST_ON_CHAIN_CHECK = "lastOnChainCheck"; + private OffsetDateTime lastOnChainCheck; + + public static final String JSON_PROPERTY_FORWARDER_ADDRESSES = "forwarderAddresses"; + private List forwarderAddresses; + + public GasslessStandardConfigurationsGaslessStandardConfigurationsValue() {} + + public GasslessStandardConfigurationsGaslessStandardConfigurationsValue lastOnChainCheck( + OffsetDateTime lastOnChainCheck) { + this.lastOnChainCheck = lastOnChainCheck; + return this; + } + + /** + * Get lastOnChainCheck + * + * @return lastOnChainCheck + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_ON_CHAIN_CHECK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastOnChainCheck() { + return lastOnChainCheck; + } + + @JsonProperty(JSON_PROPERTY_LAST_ON_CHAIN_CHECK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastOnChainCheck(OffsetDateTime lastOnChainCheck) { + this.lastOnChainCheck = lastOnChainCheck; + } + + public GasslessStandardConfigurationsGaslessStandardConfigurationsValue forwarderAddresses( + List forwarderAddresses) { + this.forwarderAddresses = forwarderAddresses; + return this; + } + + public GasslessStandardConfigurationsGaslessStandardConfigurationsValue + addForwarderAddressesItem(String forwarderAddressesItem) { + if (this.forwarderAddresses == null) { + this.forwarderAddresses = new ArrayList<>(); + } + this.forwarderAddresses.add(forwarderAddressesItem); + return this; + } + + /** + * Get forwarderAddresses + * + * @return forwarderAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORWARDER_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getForwarderAddresses() { + return forwarderAddresses; + } + + @JsonProperty(JSON_PROPERTY_FORWARDER_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setForwarderAddresses(List forwarderAddresses) { + this.forwarderAddresses = forwarderAddresses; + } + + /** + * Return true if this GasslessStandardConfigurations_gaslessStandardConfigurations_value object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GasslessStandardConfigurationsGaslessStandardConfigurationsValue + gasslessStandardConfigurationsGaslessStandardConfigurationsValue = + (GasslessStandardConfigurationsGaslessStandardConfigurationsValue) o; + return Objects.equals( + this.lastOnChainCheck, + gasslessStandardConfigurationsGaslessStandardConfigurationsValue + .lastOnChainCheck) + && Objects.equals( + this.forwarderAddresses, + gasslessStandardConfigurationsGaslessStandardConfigurationsValue + .forwarderAddresses); + } + + @Override + public int hashCode() { + return Objects.hash(lastOnChainCheck, forwarderAddresses); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GasslessStandardConfigurationsGaslessStandardConfigurationsValue {\n"); + sb.append(" lastOnChainCheck: ").append(toIndentedString(lastOnChainCheck)).append("\n"); + sb.append(" forwarderAddresses: ") + .append(toIndentedString(forwarderAddresses)) + .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 `lastOnChainCheck` to the URL query string + if (getLastOnChainCheck() != null) { + joiner.add( + String.format( + "%slastOnChainCheck%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getLastOnChainCheck()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `forwarderAddresses` to the URL query string + if (getForwarderAddresses() != null) { + for (int i = 0; i < getForwarderAddresses().size(); i++) { + joiner.add( + String.format( + "%sforwarderAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getForwarderAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/IdlType.java b/src/main/java/com/fireblocks/sdk/model/IdlType.java new file mode 100644 index 00000000..7b50eda4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/IdlType.java @@ -0,0 +1,96 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The type of the parameter */ +public enum IdlType { + BOOL("bool"), + + U8("u8"), + + I8("i8"), + + U16("u16"), + + I16("i16"), + + U32("u32"), + + I32("i32"), + + F32("f32"), + + U64("u64"), + + I64("i64"), + + F64("f64"), + + U128("u128"), + + I128("i128"), + + U256("u256"), + + I256("i256"), + + BYTES("bytes"), + + STRING("string"), + + PUBKEY("pubkey"); + + private String value; + + IdlType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IdlType fromValue(String value) { + for (IdlType b : IdlType.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/MultichainDeploymentMetadata.java b/src/main/java/com/fireblocks/sdk/model/MultichainDeploymentMetadata.java new file mode 100644 index 00000000..320f8d6a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MultichainDeploymentMetadata.java @@ -0,0 +1,373 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** The multichain deployment metadata */ +@JsonPropertyOrder({ + MultichainDeploymentMetadata.JSON_PROPERTY_ID, + MultichainDeploymentMetadata.JSON_PROPERTY_ADDRESS, + MultichainDeploymentMetadata.JSON_PROPERTY_TEMPLATE_ID, + MultichainDeploymentMetadata.JSON_PROPERTY_DEPLOYMENT_SALT, + MultichainDeploymentMetadata.JSON_PROPERTY_INIT_PARAMS, + MultichainDeploymentMetadata.JSON_PROPERTY_ENCODED_INIT_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MultichainDeploymentMetadata { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "templateId"; + private UUID templateId; + + public static final String JSON_PROPERTY_DEPLOYMENT_SALT = "deploymentSalt"; + private String deploymentSalt; + + public static final String JSON_PROPERTY_INIT_PARAMS = "initParams"; + private List initParams; + + public static final String JSON_PROPERTY_ENCODED_INIT_PARAMS = "encodedInitParams"; + private String encodedInitParams; + + public MultichainDeploymentMetadata() {} + + public MultichainDeploymentMetadata id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the deployment metadata + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(UUID id) { + this.id = id; + } + + public MultichainDeploymentMetadata address(String address) { + this.address = address; + return this; + } + + /** + * The address of the deployed contract + * + * @return address + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(String address) { + this.address = address; + } + + public MultichainDeploymentMetadata templateId(UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * The unique identifier of the contract template + * + * @return templateId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTemplateId() { + return templateId; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemplateId(UUID templateId) { + this.templateId = templateId; + } + + public MultichainDeploymentMetadata deploymentSalt(String deploymentSalt) { + this.deploymentSalt = deploymentSalt; + return this; + } + + /** + * The salt used for the deployment + * + * @return deploymentSalt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPLOYMENT_SALT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeploymentSalt() { + return deploymentSalt; + } + + @JsonProperty(JSON_PROPERTY_DEPLOYMENT_SALT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeploymentSalt(String deploymentSalt) { + this.deploymentSalt = deploymentSalt; + } + + public MultichainDeploymentMetadata initParams(List initParams) { + this.initParams = initParams; + return this; + } + + public MultichainDeploymentMetadata addInitParamsItem(ParameterWithValue initParamsItem) { + if (this.initParams == null) { + this.initParams = new ArrayList<>(); + } + this.initParams.add(initParamsItem); + return this; + } + + /** + * Get initParams + * + * @return initParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getInitParams() { + return initParams; + } + + @JsonProperty(JSON_PROPERTY_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInitParams(List initParams) { + this.initParams = initParams; + } + + public MultichainDeploymentMetadata encodedInitParams(String encodedInitParams) { + this.encodedInitParams = encodedInitParams; + return this; + } + + /** + * The encoded init params + * + * @return encodedInitParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENCODED_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEncodedInitParams() { + return encodedInitParams; + } + + @JsonProperty(JSON_PROPERTY_ENCODED_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEncodedInitParams(String encodedInitParams) { + this.encodedInitParams = encodedInitParams; + } + + /** Return true if this MultichainDeploymentMetadata object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultichainDeploymentMetadata multichainDeploymentMetadata = + (MultichainDeploymentMetadata) o; + return Objects.equals(this.id, multichainDeploymentMetadata.id) + && Objects.equals(this.address, multichainDeploymentMetadata.address) + && Objects.equals(this.templateId, multichainDeploymentMetadata.templateId) + && Objects.equals(this.deploymentSalt, multichainDeploymentMetadata.deploymentSalt) + && Objects.equals(this.initParams, multichainDeploymentMetadata.initParams) + && Objects.equals( + this.encodedInitParams, multichainDeploymentMetadata.encodedInitParams); + } + + @Override + public int hashCode() { + return Objects.hash(id, address, templateId, deploymentSalt, initParams, encodedInitParams); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultichainDeploymentMetadata {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" deploymentSalt: ").append(toIndentedString(deploymentSalt)).append("\n"); + sb.append(" initParams: ").append(toIndentedString(initParams)).append("\n"); + sb.append(" encodedInitParams: ") + .append(toIndentedString(encodedInitParams)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `templateId` to the URL query string + if (getTemplateId() != null) { + joiner.add( + String.format( + "%stemplateId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTemplateId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `deploymentSalt` to the URL query string + if (getDeploymentSalt() != null) { + joiner.add( + String.format( + "%sdeploymentSalt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDeploymentSalt()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `initParams` to the URL query string + if (getInitParams() != null) { + for (int i = 0; i < getInitParams().size(); i++) { + if (getInitParams().get(i) != null) { + joiner.add( + getInitParams() + .get(i) + .toUrlQueryString( + String.format( + "%sinitParams%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `encodedInitParams` to the URL query string + if (getEncodedInitParams() != null) { + joiner.add( + String.format( + "%sencodedInitParams%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getEncodedInitParams()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java b/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java index 2af90501..e69af647 100644 --- a/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java +++ b/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java @@ -24,11 +24,11 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ReadCallFunctionDto { public static final String JSON_PROPERTY_ABI_FUNCTION = "abiFunction"; - private ReadAbiFunction abiFunction; + private ReadCallFunctionDtoAbiFunction abiFunction; public ReadCallFunctionDto() {} - public ReadCallFunctionDto abiFunction(ReadAbiFunction abiFunction) { + public ReadCallFunctionDto abiFunction(ReadCallFunctionDtoAbiFunction abiFunction) { this.abiFunction = abiFunction; return this; } @@ -41,13 +41,13 @@ public ReadCallFunctionDto abiFunction(ReadAbiFunction abiFunction) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ReadAbiFunction getAbiFunction() { + public ReadCallFunctionDtoAbiFunction getAbiFunction() { return abiFunction; } @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAbiFunction(ReadAbiFunction abiFunction) { + public void setAbiFunction(ReadCallFunctionDtoAbiFunction abiFunction) { this.abiFunction = abiFunction; } diff --git a/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunction.java b/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunction.java new file mode 100644 index 00000000..28eab481 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunction.java @@ -0,0 +1,335 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize( + using = ReadCallFunctionDtoAbiFunction.ReadCallFunctionDtoAbiFunctionDeserializer.class) +@JsonSerialize( + using = ReadCallFunctionDtoAbiFunction.ReadCallFunctionDtoAbiFunctionSerializer.class) +public class ReadCallFunctionDtoAbiFunction extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ReadCallFunctionDtoAbiFunction.class.getName()); + + public static class ReadCallFunctionDtoAbiFunctionSerializer + extends StdSerializer { + public ReadCallFunctionDtoAbiFunctionSerializer(Class t) { + super(t); + } + + public ReadCallFunctionDtoAbiFunctionSerializer() { + this(null); + } + + @Override + public void serialize( + ReadCallFunctionDtoAbiFunction value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ReadCallFunctionDtoAbiFunctionDeserializer + extends StdDeserializer { + public ReadCallFunctionDtoAbiFunctionDeserializer() { + this(ReadCallFunctionDtoAbiFunction.class); + } + + public ReadCallFunctionDtoAbiFunctionDeserializer(Class vc) { + super(vc); + } + + @Override + public ReadCallFunctionDtoAbiFunction deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize ReadAbiFunction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReadAbiFunction.class.equals(Integer.class) + || ReadAbiFunction.class.equals(Long.class) + || ReadAbiFunction.class.equals(Float.class) + || ReadAbiFunction.class.equals(Double.class) + || ReadAbiFunction.class.equals(Boolean.class) + || ReadAbiFunction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ReadAbiFunction.class.equals(Integer.class) + || ReadAbiFunction.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ReadAbiFunction.class.equals(Float.class) + || ReadAbiFunction.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ReadAbiFunction.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ReadAbiFunction.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ReadAbiFunction.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'ReadAbiFunction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReadAbiFunction'", e); + } + + // deserialize SolanaInstructionWithValue + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SolanaInstructionWithValue.class.equals(Integer.class) + || SolanaInstructionWithValue.class.equals(Long.class) + || SolanaInstructionWithValue.class.equals(Float.class) + || SolanaInstructionWithValue.class.equals(Double.class) + || SolanaInstructionWithValue.class.equals(Boolean.class) + || SolanaInstructionWithValue.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SolanaInstructionWithValue.class.equals(Integer.class) + || SolanaInstructionWithValue.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SolanaInstructionWithValue.class.equals(Float.class) + || SolanaInstructionWithValue.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (SolanaInstructionWithValue.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SolanaInstructionWithValue.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(SolanaInstructionWithValue.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SolanaInstructionWithValue'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'SolanaInstructionWithValue'", + e); + } + + if (match == 1) { + ReadCallFunctionDtoAbiFunction ret = new ReadCallFunctionDtoAbiFunction(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for ReadCallFunctionDtoAbiFunction: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ReadCallFunctionDtoAbiFunction getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ReadCallFunctionDtoAbiFunction cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public ReadCallFunctionDtoAbiFunction() { + super("oneOf", Boolean.FALSE); + } + + public ReadCallFunctionDtoAbiFunction(ReadAbiFunction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ReadCallFunctionDtoAbiFunction(SolanaInstructionWithValue o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ReadAbiFunction", ReadAbiFunction.class); + schemas.put("SolanaInstructionWithValue", SolanaInstructionWithValue.class); + JSON.registerDescendants( + ReadCallFunctionDtoAbiFunction.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return ReadCallFunctionDtoAbiFunction.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ReadAbiFunction, SolanaInstructionWithValue + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ReadAbiFunction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + SolanaInstructionWithValue.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ReadAbiFunction, SolanaInstructionWithValue"); + } + + /** + * Get the actual instance, which can be the following: ReadAbiFunction, + * SolanaInstructionWithValue + * + * @return The actual instance (ReadAbiFunction, SolanaInstructionWithValue) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ReadAbiFunction`. If the actual instance is not + * `ReadAbiFunction`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReadAbiFunction` + * @throws ClassCastException if the instance is not `ReadAbiFunction` + */ + public ReadAbiFunction getReadAbiFunction() throws ClassCastException { + return (ReadAbiFunction) super.getActualInstance(); + } + + /** + * Get the actual instance of `SolanaInstructionWithValue`. If the actual instance is not + * `SolanaInstructionWithValue`, the ClassCastException will be thrown. + * + * @return The actual instance of `SolanaInstructionWithValue` + * @throws ClassCastException if the instance is not `SolanaInstructionWithValue` + */ + public SolanaInstructionWithValue getSolanaInstructionWithValue() throws ClassCastException { + return (SolanaInstructionWithValue) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof ReadAbiFunction) { + if (getActualInstance() != null) { + joiner.add( + ((ReadAbiFunction) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SolanaInstructionWithValue) { + if (getActualInstance() != null) { + joiner.add( + ((SolanaInstructionWithValue) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SOLAccount.java b/src/main/java/com/fireblocks/sdk/model/SOLAccount.java new file mode 100644 index 00000000..f5e858a1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SOLAccount.java @@ -0,0 +1,262 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** The accounts involved in the instruction */ +@JsonPropertyOrder({ + SOLAccount.JSON_PROPERTY_NAME, + SOLAccount.JSON_PROPERTY_SIGNER, + SOLAccount.JSON_PROPERTY_WRITABLE, + SOLAccount.JSON_PROPERTY_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SOLAccount { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SIGNER = "signer"; + private Boolean signer; + + public static final String JSON_PROPERTY_WRITABLE = "writable"; + private Boolean writable; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public SOLAccount() {} + + public SOLAccount name(String name) { + this.name = name; + return this; + } + + /** + * The name of the account + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SOLAccount signer(Boolean signer) { + this.signer = signer; + return this; + } + + /** + * Indicates if the account needs to sign the instruction. If true a signature for this account + * must be provided + * + * @return signer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSigner() { + return signer; + } + + @JsonProperty(JSON_PROPERTY_SIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigner(Boolean signer) { + this.signer = signer; + } + + public SOLAccount writable(Boolean writable) { + this.writable = writable; + return this; + } + + /** + * Indicates if the account's data can be changed by the instruction. + * + * @return writable + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWritable() { + return writable; + } + + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWritable(Boolean writable) { + this.writable = writable; + } + + public SOLAccount address(String address) { + this.address = address; + return this; + } + + /** + * The address of the account + * + * @return address + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(String address) { + this.address = address; + } + + /** Return true if this SOLAccount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SOLAccount soLAccount = (SOLAccount) o; + return Objects.equals(this.name, soLAccount.name) + && Objects.equals(this.signer, soLAccount.signer) + && Objects.equals(this.writable, soLAccount.writable) + && Objects.equals(this.address, soLAccount.address); + } + + @Override + public int hashCode() { + return Objects.hash(name, signer, writable, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SOLAccount {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); + sb.append(" writable: ").append(toIndentedString(writable)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `signer` to the URL query string + if (getSigner() != null) { + joiner.add( + String.format( + "%ssigner%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSigner()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `writable` to the URL query string + if (getWritable() != null) { + joiner.add( + String.format( + "%swritable%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getWritable()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SOLAccountWithValue.java b/src/main/java/com/fireblocks/sdk/model/SOLAccountWithValue.java new file mode 100644 index 00000000..91c63d38 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SOLAccountWithValue.java @@ -0,0 +1,262 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** SOLAccountWithValue */ +@JsonPropertyOrder({ + SOLAccountWithValue.JSON_PROPERTY_NAME, + SOLAccountWithValue.JSON_PROPERTY_SIGNER, + SOLAccountWithValue.JSON_PROPERTY_WRITABLE, + SOLAccountWithValue.JSON_PROPERTY_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SOLAccountWithValue { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SIGNER = "signer"; + private Boolean signer; + + public static final String JSON_PROPERTY_WRITABLE = "writable"; + private Boolean writable; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public SOLAccountWithValue() {} + + public SOLAccountWithValue name(String name) { + this.name = name; + return this; + } + + /** + * The name of the account + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SOLAccountWithValue signer(Boolean signer) { + this.signer = signer; + return this; + } + + /** + * Indicates if the account needs to sign the instruction. If true a signature for this account + * must be provided + * + * @return signer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSigner() { + return signer; + } + + @JsonProperty(JSON_PROPERTY_SIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigner(Boolean signer) { + this.signer = signer; + } + + public SOLAccountWithValue writable(Boolean writable) { + this.writable = writable; + return this; + } + + /** + * Indicates if the account's data can be changed by the instruction. + * + * @return writable + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getWritable() { + return writable; + } + + @JsonProperty(JSON_PROPERTY_WRITABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWritable(Boolean writable) { + this.writable = writable; + } + + public SOLAccountWithValue address(String address) { + this.address = address; + return this; + } + + /** + * The address of the account + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(String address) { + this.address = address; + } + + /** Return true if this SOLAccountWithValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SOLAccountWithValue soLAccountWithValue = (SOLAccountWithValue) o; + return Objects.equals(this.name, soLAccountWithValue.name) + && Objects.equals(this.signer, soLAccountWithValue.signer) + && Objects.equals(this.writable, soLAccountWithValue.writable) + && Objects.equals(this.address, soLAccountWithValue.address); + } + + @Override + public int hashCode() { + return Objects.hash(name, signer, writable, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SOLAccountWithValue {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); + sb.append(" writable: ").append(toIndentedString(writable)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `signer` to the URL query string + if (getSigner() != null) { + joiner.add( + String.format( + "%ssigner%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSigner()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `writable` to the URL query string + if (getWritable() != null) { + joiner.add( + String.format( + "%swritable%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getWritable()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolParameter.java b/src/main/java/com/fireblocks/sdk/model/SolParameter.java new file mode 100644 index 00000000..8f35cab7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolParameter.java @@ -0,0 +1,178 @@ +/* + * 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; + +/** The arguments of the instruction */ +@JsonPropertyOrder({SolParameter.JSON_PROPERTY_NAME, SolParameter.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolParameter { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IdlType type; + + public SolParameter() {} + + public SolParameter name(String name) { + this.name = name; + return this; + } + + /** + * The name of the parameter + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SolParameter type(IdlType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IdlType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(IdlType type) { + this.type = type; + } + + /** Return true if this SolParameter object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolParameter solParameter = (SolParameter) o; + return Objects.equals(this.name, solParameter.name) + && Objects.equals(this.type, solParameter.type); + } + + @Override + public int hashCode() { + return Objects.hash(name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolParameter {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolParameterWithValue.java b/src/main/java/com/fireblocks/sdk/model/SolParameterWithValue.java new file mode 100644 index 00000000..c0b5cf37 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolParameterWithValue.java @@ -0,0 +1,221 @@ +/* + * 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; + +/** SolParameterWithValue */ +@JsonPropertyOrder({ + SolParameterWithValue.JSON_PROPERTY_VALUE, + SolParameterWithValue.JSON_PROPERTY_NAME, + SolParameterWithValue.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolParameterWithValue { + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IdlType type; + + public SolParameterWithValue() {} + + public SolParameterWithValue value(String value) { + this.value = value; + return this; + } + + /** + * The value of the parameter + * + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(String value) { + this.value = value; + } + + public SolParameterWithValue name(String name) { + this.name = name; + return this; + } + + /** + * The name of the parameter + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SolParameterWithValue type(IdlType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IdlType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(IdlType type) { + this.type = type; + } + + /** Return true if this SolParameterWithValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolParameterWithValue solParameterWithValue = (SolParameterWithValue) o; + return Objects.equals(this.value, solParameterWithValue.value) + && Objects.equals(this.name, solParameterWithValue.name) + && Objects.equals(this.type, solParameterWithValue.type); + } + + @Override + public int hashCode() { + return Objects.hash(value, name, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolParameterWithValue {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add( + String.format( + "%svalue%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getValue()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolanaConfig.java b/src/main/java/com/fireblocks/sdk/model/SolanaConfig.java new file mode 100644 index 00000000..c8acba7b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolanaConfig.java @@ -0,0 +1,233 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** The Solana configuration of the contract */ +@JsonPropertyOrder({SolanaConfig.JSON_PROPERTY_EXTENSIONS, SolanaConfig.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolanaConfig { + public static final String JSON_PROPERTY_EXTENSIONS = "extensions"; + private List extensions; + + /** The type of the contract. */ + public enum TypeEnum { + SPL("SPL"), + + TOKEN2022("TOKEN2022"), + + PROGRAM("PROGRAM"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public SolanaConfig() {} + + public SolanaConfig extensions(List extensions) { + this.extensions = extensions; + return this; + } + + public SolanaConfig addExtensionsItem(String extensionsItem) { + if (this.extensions == null) { + this.extensions = new ArrayList<>(); + } + this.extensions.add(extensionsItem); + return this; + } + + /** + * The extensions that the contract implements. + * + * @return extensions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTENSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExtensions() { + return extensions; + } + + @JsonProperty(JSON_PROPERTY_EXTENSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExtensions(List extensions) { + this.extensions = extensions; + } + + public SolanaConfig type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of the contract. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** Return true if this SolanaConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolanaConfig solanaConfig = (SolanaConfig) o; + return Objects.equals(this.extensions, solanaConfig.extensions) + && Objects.equals(this.type, solanaConfig.type); + } + + @Override + public int hashCode() { + return Objects.hash(extensions, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolanaConfig {\n"); + sb.append(" extensions: ").append(toIndentedString(extensions)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `extensions` to the URL query string + if (getExtensions() != null) { + for (int i = 0; i < getExtensions().size(); i++) { + joiner.add( + String.format( + "%sextensions%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getExtensions().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolanaInstruction.java b/src/main/java/com/fireblocks/sdk/model/SolanaInstruction.java new file mode 100644 index 00000000..525f1245 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolanaInstruction.java @@ -0,0 +1,322 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** SolanaInstruction */ +@JsonPropertyOrder({ + SolanaInstruction.JSON_PROPERTY_NAME, + SolanaInstruction.JSON_PROPERTY_DISCRIMINATOR, + SolanaInstruction.JSON_PROPERTY_ACCOUNTS, + SolanaInstruction.JSON_PROPERTY_ARGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolanaInstruction { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DISCRIMINATOR = "discriminator"; + private List discriminator = new ArrayList<>(); + + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts = new ArrayList<>(); + + public static final String JSON_PROPERTY_ARGS = "args"; + private List args = new ArrayList<>(); + + public SolanaInstruction() {} + + public SolanaInstruction name(String name) { + this.name = name; + return this; + } + + /** + * The name of the instruction + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SolanaInstruction discriminator(List discriminator) { + this.discriminator = discriminator; + return this; + } + + public SolanaInstruction addDiscriminatorItem(BigDecimal discriminatorItem) { + if (this.discriminator == null) { + this.discriminator = new ArrayList<>(); + } + this.discriminator.add(discriminatorItem); + return this; + } + + /** + * The discriminator for the instruction. Acts as a function selector + * + * @return discriminator + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISCRIMINATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDiscriminator() { + return discriminator; + } + + @JsonProperty(JSON_PROPERTY_DISCRIMINATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDiscriminator(List discriminator) { + this.discriminator = discriminator; + } + + public SolanaInstruction accounts(List accounts) { + this.accounts = accounts; + return this; + } + + public SolanaInstruction addAccountsItem(SOLAccount accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * Get accounts + * + * @return accounts + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAccounts() { + return accounts; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + public SolanaInstruction args(List args) { + this.args = args; + return this; + } + + public SolanaInstruction addArgsItem(SolParameter argsItem) { + if (this.args == null) { + this.args = new ArrayList<>(); + } + this.args.add(argsItem); + return this; + } + + /** + * Get args + * + * @return args + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ARGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getArgs() { + return args; + } + + @JsonProperty(JSON_PROPERTY_ARGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArgs(List args) { + this.args = args; + } + + /** Return true if this SolanaInstruction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolanaInstruction solanaInstruction = (SolanaInstruction) o; + return Objects.equals(this.name, solanaInstruction.name) + && Objects.equals(this.discriminator, solanaInstruction.discriminator) + && Objects.equals(this.accounts, solanaInstruction.accounts) + && Objects.equals(this.args, solanaInstruction.args); + } + + @Override + public int hashCode() { + return Objects.hash(name, discriminator, accounts, args); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolanaInstruction {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" discriminator: ").append(toIndentedString(discriminator)).append("\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" args: ").append(toIndentedString(args)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `discriminator` to the URL query string + if (getDiscriminator() != null) { + for (int i = 0; i < getDiscriminator().size(); i++) { + if (getDiscriminator().get(i) != null) { + joiner.add( + String.format( + "%sdiscriminator%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDiscriminator().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `accounts` to the URL query string + if (getAccounts() != null) { + for (int i = 0; i < getAccounts().size(); i++) { + if (getAccounts().get(i) != null) { + joiner.add( + getAccounts() + .get(i) + .toUrlQueryString( + String.format( + "%saccounts%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `args` to the URL query string + if (getArgs() != null) { + for (int i = 0; i < getArgs().size(); i++) { + if (getArgs().get(i) != null) { + joiner.add( + getArgs() + .get(i) + .toUrlQueryString( + String.format( + "%sargs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolanaInstructionWithValue.java b/src/main/java/com/fireblocks/sdk/model/SolanaInstructionWithValue.java new file mode 100644 index 00000000..7d63bb8c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolanaInstructionWithValue.java @@ -0,0 +1,322 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** SolanaInstructionWithValue */ +@JsonPropertyOrder({ + SolanaInstructionWithValue.JSON_PROPERTY_NAME, + SolanaInstructionWithValue.JSON_PROPERTY_DISCRIMINATOR, + SolanaInstructionWithValue.JSON_PROPERTY_ACCOUNTS, + SolanaInstructionWithValue.JSON_PROPERTY_ARGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolanaInstructionWithValue { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DISCRIMINATOR = "discriminator"; + private List discriminator = new ArrayList<>(); + + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts = new ArrayList<>(); + + public static final String JSON_PROPERTY_ARGS = "args"; + private List args = new ArrayList<>(); + + public SolanaInstructionWithValue() {} + + public SolanaInstructionWithValue name(String name) { + this.name = name; + return this; + } + + /** + * The name of the instruction + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SolanaInstructionWithValue discriminator(List discriminator) { + this.discriminator = discriminator; + return this; + } + + public SolanaInstructionWithValue addDiscriminatorItem(BigDecimal discriminatorItem) { + if (this.discriminator == null) { + this.discriminator = new ArrayList<>(); + } + this.discriminator.add(discriminatorItem); + return this; + } + + /** + * The discriminator for the instruction. Acts as a function selector + * + * @return discriminator + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISCRIMINATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDiscriminator() { + return discriminator; + } + + @JsonProperty(JSON_PROPERTY_DISCRIMINATOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDiscriminator(List discriminator) { + this.discriminator = discriminator; + } + + public SolanaInstructionWithValue accounts(List accounts) { + this.accounts = accounts; + return this; + } + + public SolanaInstructionWithValue addAccountsItem(SOLAccountWithValue accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * Get accounts + * + * @return accounts + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAccounts() { + return accounts; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + public SolanaInstructionWithValue args(List args) { + this.args = args; + return this; + } + + public SolanaInstructionWithValue addArgsItem(SolParameterWithValue argsItem) { + if (this.args == null) { + this.args = new ArrayList<>(); + } + this.args.add(argsItem); + return this; + } + + /** + * The arguments of the instruction + * + * @return args + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ARGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getArgs() { + return args; + } + + @JsonProperty(JSON_PROPERTY_ARGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setArgs(List args) { + this.args = args; + } + + /** Return true if this SolanaInstructionWithValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolanaInstructionWithValue solanaInstructionWithValue = (SolanaInstructionWithValue) o; + return Objects.equals(this.name, solanaInstructionWithValue.name) + && Objects.equals(this.discriminator, solanaInstructionWithValue.discriminator) + && Objects.equals(this.accounts, solanaInstructionWithValue.accounts) + && Objects.equals(this.args, solanaInstructionWithValue.args); + } + + @Override + public int hashCode() { + return Objects.hash(name, discriminator, accounts, args); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolanaInstructionWithValue {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" discriminator: ").append(toIndentedString(discriminator)).append("\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" args: ").append(toIndentedString(args)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `discriminator` to the URL query string + if (getDiscriminator() != null) { + for (int i = 0; i < getDiscriminator().size(); i++) { + if (getDiscriminator().get(i) != null) { + joiner.add( + String.format( + "%sdiscriminator%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDiscriminator().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `accounts` to the URL query string + if (getAccounts() != null) { + for (int i = 0; i < getAccounts().size(); i++) { + if (getAccounts().get(i) != null) { + joiner.add( + getAccounts() + .get(i) + .toUrlQueryString( + String.format( + "%saccounts%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `args` to the URL query string + if (getArgs() != null) { + for (int i = 0; i < getArgs().size(); i++) { + if (getArgs().get(i) != null) { + joiner.add( + getArgs() + .get(i) + .toUrlQueryString( + String.format( + "%sargs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolanaSimpleCreateParams.java b/src/main/java/com/fireblocks/sdk/model/SolanaSimpleCreateParams.java new file mode 100644 index 00000000..3c0333a6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolanaSimpleCreateParams.java @@ -0,0 +1,221 @@ +/* + * 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; + +/** SolanaSimpleCreateParams */ +@JsonPropertyOrder({ + SolanaSimpleCreateParams.JSON_PROPERTY_NAME, + SolanaSimpleCreateParams.JSON_PROPERTY_SYMBOL, + SolanaSimpleCreateParams.JSON_PROPERTY_DECIMALS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolanaSimpleCreateParams { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_DECIMALS = "decimals"; + private Integer decimals; + + public SolanaSimpleCreateParams() {} + + public SolanaSimpleCreateParams name(String name) { + this.name = name; + return this; + } + + /** + * The name of the token or asset being created. + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public SolanaSimpleCreateParams symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The symbol for the token, typically an abbreviated representation. + * + * @return symbol + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSymbol() { + return symbol; + } + + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public SolanaSimpleCreateParams decimals(Integer decimals) { + this.decimals = decimals; + return this; + } + + /** + * The number of decimal places the token supports (e.g., 9 for typical Solana tokens). + * + * @return decimals + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getDecimals() { + return decimals; + } + + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDecimals(Integer decimals) { + this.decimals = decimals; + } + + /** Return true if this SolanaSimpleCreateParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolanaSimpleCreateParams solanaSimpleCreateParams = (SolanaSimpleCreateParams) o; + return Objects.equals(this.name, solanaSimpleCreateParams.name) + && Objects.equals(this.symbol, solanaSimpleCreateParams.symbol) + && Objects.equals(this.decimals, solanaSimpleCreateParams.decimals); + } + + @Override + public int hashCode() { + return Objects.hash(name, symbol, decimals); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolanaSimpleCreateParams {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" decimals: ").append(toIndentedString(decimals)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `decimals` to the URL query string + if (getDecimals() != null) { + joiner.add( + String.format( + "%sdecimals%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getDecimals()), 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 69aacab1..9ad527db 100644 --- a/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java +++ b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java @@ -40,7 +40,7 @@ public class WriteCallFunctionDto { private String vaultAccountId; public static final String JSON_PROPERTY_ABI_FUNCTION = "abiFunction"; - private WriteAbiFunction abiFunction; + private WriteCallFunctionDtoAbiFunction abiFunction; public static final String JSON_PROPERTY_AMOUNT = "amount"; private String amount; @@ -122,7 +122,7 @@ public void setVaultAccountId(String vaultAccountId) { this.vaultAccountId = vaultAccountId; } - public WriteCallFunctionDto abiFunction(WriteAbiFunction abiFunction) { + public WriteCallFunctionDto abiFunction(WriteCallFunctionDtoAbiFunction abiFunction) { this.abiFunction = abiFunction; return this; } @@ -135,13 +135,13 @@ public WriteCallFunctionDto abiFunction(WriteAbiFunction abiFunction) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WriteAbiFunction getAbiFunction() { + public WriteCallFunctionDtoAbiFunction getAbiFunction() { return abiFunction; } @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAbiFunction(WriteAbiFunction abiFunction) { + public void setAbiFunction(WriteCallFunctionDtoAbiFunction abiFunction) { this.abiFunction = abiFunction; } diff --git a/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunction.java b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunction.java new file mode 100644 index 00000000..631f5cf7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunction.java @@ -0,0 +1,335 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize( + using = WriteCallFunctionDtoAbiFunction.WriteCallFunctionDtoAbiFunctionDeserializer.class) +@JsonSerialize( + using = WriteCallFunctionDtoAbiFunction.WriteCallFunctionDtoAbiFunctionSerializer.class) +public class WriteCallFunctionDtoAbiFunction extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(WriteCallFunctionDtoAbiFunction.class.getName()); + + public static class WriteCallFunctionDtoAbiFunctionSerializer + extends StdSerializer { + public WriteCallFunctionDtoAbiFunctionSerializer(Class t) { + super(t); + } + + public WriteCallFunctionDtoAbiFunctionSerializer() { + this(null); + } + + @Override + public void serialize( + WriteCallFunctionDtoAbiFunction value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class WriteCallFunctionDtoAbiFunctionDeserializer + extends StdDeserializer { + public WriteCallFunctionDtoAbiFunctionDeserializer() { + this(WriteCallFunctionDtoAbiFunction.class); + } + + public WriteCallFunctionDtoAbiFunctionDeserializer(Class vc) { + super(vc); + } + + @Override + public WriteCallFunctionDtoAbiFunction deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize SolanaInstructionWithValue + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SolanaInstructionWithValue.class.equals(Integer.class) + || SolanaInstructionWithValue.class.equals(Long.class) + || SolanaInstructionWithValue.class.equals(Float.class) + || SolanaInstructionWithValue.class.equals(Double.class) + || SolanaInstructionWithValue.class.equals(Boolean.class) + || SolanaInstructionWithValue.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SolanaInstructionWithValue.class.equals(Integer.class) + || SolanaInstructionWithValue.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SolanaInstructionWithValue.class.equals(Float.class) + || SolanaInstructionWithValue.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (SolanaInstructionWithValue.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SolanaInstructionWithValue.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(SolanaInstructionWithValue.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'SolanaInstructionWithValue'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'SolanaInstructionWithValue'", + e); + } + + // deserialize WriteAbiFunction + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (WriteAbiFunction.class.equals(Integer.class) + || WriteAbiFunction.class.equals(Long.class) + || WriteAbiFunction.class.equals(Float.class) + || WriteAbiFunction.class.equals(Double.class) + || WriteAbiFunction.class.equals(Boolean.class) + || WriteAbiFunction.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((WriteAbiFunction.class.equals(Integer.class) + || WriteAbiFunction.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((WriteAbiFunction.class.equals(Float.class) + || WriteAbiFunction.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (WriteAbiFunction.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (WriteAbiFunction.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(WriteAbiFunction.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'WriteAbiFunction'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'WriteAbiFunction'", e); + } + + if (match == 1) { + WriteCallFunctionDtoAbiFunction ret = new WriteCallFunctionDtoAbiFunction(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for WriteCallFunctionDtoAbiFunction: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public WriteCallFunctionDtoAbiFunction getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "WriteCallFunctionDtoAbiFunction cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public WriteCallFunctionDtoAbiFunction() { + super("oneOf", Boolean.FALSE); + } + + public WriteCallFunctionDtoAbiFunction(SolanaInstructionWithValue o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public WriteCallFunctionDtoAbiFunction(WriteAbiFunction o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("SolanaInstructionWithValue", SolanaInstructionWithValue.class); + schemas.put("WriteAbiFunction", WriteAbiFunction.class); + JSON.registerDescendants( + WriteCallFunctionDtoAbiFunction.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return WriteCallFunctionDtoAbiFunction.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: SolanaInstructionWithValue, WriteAbiFunction + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + SolanaInstructionWithValue.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(WriteAbiFunction.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be SolanaInstructionWithValue, WriteAbiFunction"); + } + + /** + * Get the actual instance, which can be the following: SolanaInstructionWithValue, + * WriteAbiFunction + * + * @return The actual instance (SolanaInstructionWithValue, WriteAbiFunction) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `SolanaInstructionWithValue`. If the actual instance is not + * `SolanaInstructionWithValue`, the ClassCastException will be thrown. + * + * @return The actual instance of `SolanaInstructionWithValue` + * @throws ClassCastException if the instance is not `SolanaInstructionWithValue` + */ + public SolanaInstructionWithValue getSolanaInstructionWithValue() throws ClassCastException { + return (SolanaInstructionWithValue) super.getActualInstance(); + } + + /** + * Get the actual instance of `WriteAbiFunction`. If the actual instance is not + * `WriteAbiFunction`, the ClassCastException will be thrown. + * + * @return The actual instance of `WriteAbiFunction` + * @throws ClassCastException if the instance is not `WriteAbiFunction` + */ + public WriteAbiFunction getWriteAbiFunction() throws ClassCastException { + return (WriteAbiFunction) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof WriteAbiFunction) { + if (getActualInstance() != null) { + joiner.add( + ((WriteAbiFunction) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof SolanaInstructionWithValue) { + if (getActualInstance() != null) { + joiner.add( + ((SolanaInstructionWithValue) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java index a9565d9a..cbae9980 100644 --- a/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java @@ -136,6 +136,7 @@ public void getSigningKeysListTest() throws ApiException { String algorithm = null; Boolean enabled = null; Boolean available = null; + Boolean isAssigned = null; CompletableFuture> response = api.getSigningKeysList( pageCursor, @@ -146,7 +147,8 @@ public void getSigningKeysListTest() throws ApiException { agentUserId, algorithm, enabled, - available); + available, + isAssigned); } /** diff --git a/src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInnerTest.java b/src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInnerTest.java new file mode 100644 index 00000000..bf5ecef0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInnerTest.java @@ -0,0 +1,81 @@ +/* + * 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 ContractAbiResponseDtoAbiInner */ +public class ContractAbiResponseDtoAbiInnerTest { + private final ContractAbiResponseDtoAbiInner model = new ContractAbiResponseDtoAbiInner(); + + /** Model tests for ContractAbiResponseDtoAbiInner */ + @Test + public void testContractAbiResponseDtoAbiInner() { + // TODO: test ContractAbiResponseDtoAbiInner + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'discriminator' */ + @Test + public void discriminatorTest() { + // TODO: test discriminator + } + + /** Test the property 'accounts' */ + @Test + public void accountsTest() { + // TODO: test accounts + } + + /** Test the property 'args' */ + @Test + public void argsTest() { + // TODO: test args + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java index 547e709b..53dfd83b 100644 --- a/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java @@ -78,4 +78,10 @@ public void abiTest() { public void attributesTest() { // TODO: test attributes } + + /** Test the property 'protocol' */ + @Test + public void protocolTest() { + // TODO: test protocol + } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java index 97bd9948..c3a67fbe 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java @@ -54,4 +54,10 @@ public void nameTest() { public void issuerAddressTest() { // TODO: test issuerAddress } + + /** Test the property 'decimals' */ + @Test + public void decimalsTest() { + // TODO: test decimals + } } diff --git a/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java index 962b2976..e7fb5b83 100644 --- a/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java @@ -54,4 +54,28 @@ public void vaultAccountIdTest() { public void blockchainIdTest() { // TODO: test blockchainId } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'gaslessConfig' */ + @Test + public void gaslessConfigTest() { + // TODO: test gaslessConfig + } + + /** Test the property 'multichainDeploymentMetadata' */ + @Test + public void multichainDeploymentMetadataTest() { + // TODO: test multichainDeploymentMetadata + } + + /** Test the property 'solanaConfig' */ + @Test + public void solanaConfigTest() { + // TODO: test solanaConfig + } } diff --git a/src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValueTest.java b/src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValueTest.java new file mode 100644 index 00000000..0b1139f6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValueTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for GasslessStandardConfigurationsGaslessStandardConfigurationsValue */ +public class GasslessStandardConfigurationsGaslessStandardConfigurationsValueTest { + private final GasslessStandardConfigurationsGaslessStandardConfigurationsValue model = + new GasslessStandardConfigurationsGaslessStandardConfigurationsValue(); + + /** Model tests for GasslessStandardConfigurationsGaslessStandardConfigurationsValue */ + @Test + public void testGasslessStandardConfigurationsGaslessStandardConfigurationsValue() { + // TODO: test GasslessStandardConfigurationsGaslessStandardConfigurationsValue + } + + /** Test the property 'lastOnChainCheck' */ + @Test + public void lastOnChainCheckTest() { + // TODO: test lastOnChainCheck + } + + /** Test the property 'forwarderAddresses' */ + @Test + public void forwarderAddressesTest() { + // TODO: test forwarderAddresses + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsTest.java b/src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsTest.java new file mode 100644 index 00000000..f13a684f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsTest.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 GasslessStandardConfigurations */ +public class GasslessStandardConfigurationsTest { + private final GasslessStandardConfigurations model = new GasslessStandardConfigurations(); + + /** Model tests for GasslessStandardConfigurations */ + @Test + public void testGasslessStandardConfigurations() { + // TODO: test GasslessStandardConfigurations + } + + /** Test the property 'gaslessStandardConfigurations' */ + @Test + public void gaslessStandardConfigurationsTest() { + // TODO: test gaslessStandardConfigurations + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/IdlTypeTest.java b/src/test/java/com/fireblocks/sdk/model/IdlTypeTest.java new file mode 100644 index 00000000..ef3b0ad7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/IdlTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for IdlType */ +public class IdlTypeTest { + /** Model tests for IdlType */ + @Test + public void testIdlType() { + // TODO: test IdlType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/MultichainDeploymentMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/MultichainDeploymentMetadataTest.java new file mode 100644 index 00000000..f2d7c696 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MultichainDeploymentMetadataTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for MultichainDeploymentMetadata */ +public class MultichainDeploymentMetadataTest { + private final MultichainDeploymentMetadata model = new MultichainDeploymentMetadata(); + + /** Model tests for MultichainDeploymentMetadata */ + @Test + public void testMultichainDeploymentMetadata() { + // TODO: test MultichainDeploymentMetadata + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'templateId' */ + @Test + public void templateIdTest() { + // TODO: test templateId + } + + /** Test the property 'deploymentSalt' */ + @Test + public void deploymentSaltTest() { + // TODO: test deploymentSalt + } + + /** Test the property 'initParams' */ + @Test + public void initParamsTest() { + // TODO: test initParams + } + + /** Test the property 'encodedInitParams' */ + @Test + public void encodedInitParamsTest() { + // TODO: test encodedInitParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunctionTest.java new file mode 100644 index 00000000..80d990d2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunctionTest.java @@ -0,0 +1,81 @@ +/* + * 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 ReadCallFunctionDtoAbiFunction */ +public class ReadCallFunctionDtoAbiFunctionTest { + private final ReadCallFunctionDtoAbiFunction model = new ReadCallFunctionDtoAbiFunction(); + + /** Model tests for ReadCallFunctionDtoAbiFunction */ + @Test + public void testReadCallFunctionDtoAbiFunction() { + // TODO: test ReadCallFunctionDtoAbiFunction + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'discriminator' */ + @Test + public void discriminatorTest() { + // TODO: test discriminator + } + + /** Test the property 'accounts' */ + @Test + public void accountsTest() { + // TODO: test accounts + } + + /** Test the property 'args' */ + @Test + public void argsTest() { + // TODO: test args + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SOLAccountTest.java b/src/test/java/com/fireblocks/sdk/model/SOLAccountTest.java new file mode 100644 index 00000000..24656d40 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SOLAccountTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for SOLAccount */ +public class SOLAccountTest { + private final SOLAccount model = new SOLAccount(); + + /** Model tests for SOLAccount */ + @Test + public void testSOLAccount() { + // TODO: test SOLAccount + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'signer' */ + @Test + public void signerTest() { + // TODO: test signer + } + + /** Test the property 'writable' */ + @Test + public void writableTest() { + // TODO: test writable + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SOLAccountWithValueTest.java b/src/test/java/com/fireblocks/sdk/model/SOLAccountWithValueTest.java new file mode 100644 index 00000000..810d1beb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SOLAccountWithValueTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for SOLAccountWithValue */ +public class SOLAccountWithValueTest { + private final SOLAccountWithValue model = new SOLAccountWithValue(); + + /** Model tests for SOLAccountWithValue */ + @Test + public void testSOLAccountWithValue() { + // TODO: test SOLAccountWithValue + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'signer' */ + @Test + public void signerTest() { + // TODO: test signer + } + + /** Test the property 'writable' */ + @Test + public void writableTest() { + // TODO: test writable + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SolParameterTest.java b/src/test/java/com/fireblocks/sdk/model/SolParameterTest.java new file mode 100644 index 00000000..3792b667 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SolParameterTest.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 SolParameter */ +public class SolParameterTest { + private final SolParameter model = new SolParameter(); + + /** Model tests for SolParameter */ + @Test + public void testSolParameter() { + // TODO: test SolParameter + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SolParameterWithValueTest.java b/src/test/java/com/fireblocks/sdk/model/SolParameterWithValueTest.java new file mode 100644 index 00000000..4c1f79c6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SolParameterWithValueTest.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 SolParameterWithValue */ +public class SolParameterWithValueTest { + private final SolParameterWithValue model = new SolParameterWithValue(); + + /** Model tests for SolParameterWithValue */ + @Test + public void testSolParameterWithValue() { + // TODO: test SolParameterWithValue + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SolanaConfigTest.java b/src/test/java/com/fireblocks/sdk/model/SolanaConfigTest.java new file mode 100644 index 00000000..62bff5e9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SolanaConfigTest.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 SolanaConfig */ +public class SolanaConfigTest { + private final SolanaConfig model = new SolanaConfig(); + + /** Model tests for SolanaConfig */ + @Test + public void testSolanaConfig() { + // TODO: test SolanaConfig + } + + /** Test the property 'extensions' */ + @Test + public void extensionsTest() { + // TODO: test extensions + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SolanaInstructionTest.java b/src/test/java/com/fireblocks/sdk/model/SolanaInstructionTest.java new file mode 100644 index 00000000..51d00c4c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SolanaInstructionTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for SolanaInstruction */ +public class SolanaInstructionTest { + private final SolanaInstruction model = new SolanaInstruction(); + + /** Model tests for SolanaInstruction */ + @Test + public void testSolanaInstruction() { + // TODO: test SolanaInstruction + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'discriminator' */ + @Test + public void discriminatorTest() { + // TODO: test discriminator + } + + /** Test the property 'accounts' */ + @Test + public void accountsTest() { + // TODO: test accounts + } + + /** Test the property 'args' */ + @Test + public void argsTest() { + // TODO: test args + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SolanaInstructionWithValueTest.java b/src/test/java/com/fireblocks/sdk/model/SolanaInstructionWithValueTest.java new file mode 100644 index 00000000..3f74416f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SolanaInstructionWithValueTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for SolanaInstructionWithValue */ +public class SolanaInstructionWithValueTest { + private final SolanaInstructionWithValue model = new SolanaInstructionWithValue(); + + /** Model tests for SolanaInstructionWithValue */ + @Test + public void testSolanaInstructionWithValue() { + // TODO: test SolanaInstructionWithValue + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'discriminator' */ + @Test + public void discriminatorTest() { + // TODO: test discriminator + } + + /** Test the property 'accounts' */ + @Test + public void accountsTest() { + // TODO: test accounts + } + + /** Test the property 'args' */ + @Test + public void argsTest() { + // TODO: test args + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SolanaSimpleCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/SolanaSimpleCreateParamsTest.java new file mode 100644 index 00000000..6f8789c5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SolanaSimpleCreateParamsTest.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 SolanaSimpleCreateParams */ +public class SolanaSimpleCreateParamsTest { + private final SolanaSimpleCreateParams model = new SolanaSimpleCreateParams(); + + /** Model tests for SolanaSimpleCreateParams */ + @Test + public void testSolanaSimpleCreateParams() { + // TODO: test SolanaSimpleCreateParams + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'decimals' */ + @Test + public void decimalsTest() { + // TODO: test decimals + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunctionTest.java new file mode 100644 index 00000000..e47be495 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunctionTest.java @@ -0,0 +1,81 @@ +/* + * 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 WriteCallFunctionDtoAbiFunction */ +public class WriteCallFunctionDtoAbiFunctionTest { + private final WriteCallFunctionDtoAbiFunction model = new WriteCallFunctionDtoAbiFunction(); + + /** Model tests for WriteCallFunctionDtoAbiFunction */ + @Test + public void testWriteCallFunctionDtoAbiFunction() { + // TODO: test WriteCallFunctionDtoAbiFunction + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'discriminator' */ + @Test + public void discriminatorTest() { + // TODO: test discriminator + } + + /** Test the property 'accounts' */ + @Test + public void accountsTest() { + // TODO: test accounts + } + + /** Test the property 'args' */ + @Test + public void argsTest() { + // TODO: test args + } +}