From 0046390c89cf1ad47385ce3a20c2de08ebc36e11 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Wed, 8 Jan 2025 15:48:49 +0000 Subject: [PATCH] Generated SDK #8699 --- .openapi-generator/FILES | 249 +- README.md | 127 +- api/openapi.yaml | 4818 +++++++++++++++-- build.gradle | 2 +- docs/AddCosignerRequest.md | 15 + docs/AddCosignerResponse.md | 16 + ...AdditionalInfoDto.md => AdditionalInfo.md} | 3 +- docs/ApiKey.md | 3 +- docs/AssetBadRequestErrorResponse.md | 2 +- docs/AssetClassBeta.md | 19 + docs/AssetConflictErrorResponse.md | 2 +- docs/AssetForbiddenErrorResponse.md | 2 +- docs/AssetInternalServerErrorResponse.md | 2 +- docs/AssetMedia.md | 24 + docs/AssetMediaAttributes.md | 14 + ...etResponseMetadata.md => AssetMetadata.md} | 2 +- docs/AssetMetadataBeta.md | 27 + docs/AssetNotFoundErrorResponse.md | 2 +- ...ssetResponseOnchain.md => AssetOnchain.md} | 2 +- docs/AssetOnchainBeta.md | 17 + docs/AssetPriceForbiddenErrorResponse.md | 2 +- docs/AssetPriceNotFoundErrorResponse.md | 2 +- docs/AssetResponse.md | 4 +- docs/AssetResponseBeta.md | 20 + docs/AuditLogData.md | 4 +- docs/BlockchainExplorer.md | 16 + docs/BlockchainMedia.md | 23 + docs/BlockchainMetadata.md | 25 + docs/BlockchainNotFoundErrorResponse.md | 14 + docs/BlockchainOnchain.md | 25 + docs/BlockchainResponse.md | 18 + docs/BlockchainsAssetsApi.md | 1 + docs/BlockchainsAssetsBetaApi.md | 374 ++ docs/CallbackHandler.md | 15 + docs/CallbackHandlerRequest.md | 15 + docs/ChainDescriptor.md | 19 + ...nfoResponseDto.md => ChainInfoResponse.md} | 4 +- docs/ClaimRewardsRequest.md | 16 + docs/ComplianceApi.md | 86 + docs/ContractInteractionsApi.md | 86 + docs/Cosigner.md | 14 + docs/CosignersBetaApi.md | 440 +- docs/CreateWebhookRequest.md | 16 + docs/{DelegationDto.md => Delegation.md} | 12 +- ...tionSummaryDto.md => DelegationSummary.md} | 2 +- docs/EmbeddedWalletsApi.md | 192 + docs/ExecuteActionRequest.md | 46 - docs/ExecuteActionResponse.md | 37 - docs/FeeLevel.md | 15 + docs/GetMpcKeysResponse.md | 14 + docs/KeysBetaApi.md | 172 + docs/ListAssetsResponse.md | 14 + docs/ListBlockchainsResponse.md | 14 + docs/MpcKey.md | 17 + docs/Notification.md | 20 + docs/NotificationPaginatedResponse.md | 14 + docs/NotificationStatus.md | 15 + docs/NotificationWithData.md | 21 + docs/PairApiKeyRequest.md | 13 + docs/PairApiKeyResponse.md | 14 + docs/Players.md | 23 + docs/Provider.md | 20 + docs/ProviderDto.md | 18 - docs/PublicKeyInformation.md | 16 +- ...RelatedRequestDto.md => RelatedRequest.md} | 2 +- ...ransactionDto.md => RelatedTransaction.md} | 2 +- docs/SolanaBlockchainData.md | 15 + docs/SolanaBlockchainDataDto.md | 13 - docs/SplitRequest.md | 17 + docs/SplitResponse.md | 13 + docs/{StakeRequestDto.md => StakeRequest.md} | 6 +- .../{StakeResponseDto.md => StakeResponse.md} | 2 +- docs/StakingApi.md | 1102 ++++ docs/StakingProvider.md | 15 + docs/Status.md | 36 + docs/TokenInfoNotFoundErrorResponse.md | 14 + docs/TransactionOperation.md | 2 + docs/TransactionReceiptResponse.md | 26 + docs/TransferPeerPathType.md | 2 + docs/TxLog.md | 21 + ...UnstakeRequestDto.md => UnstakeRequest.md} | 4 +- docs/UpdateCallbackHandlerRequest.md | 13 + docs/UpdateCallbackHandlerResponse.md | 14 + docs/UpdateWebhookRequest.md | 16 + docs/{ValidatorDto.md => Validator.md} | 3 +- docs/Version.md | 13 + docs/Webhook.md | 28 + docs/WebhookEvent.md | 79 + docs/WebhookPaginatedResponse.md | 14 + ...StakingBetaApi.md => WebhooksV2BetaApi.md} | 387 +- ...thdrawRequestDto.md => WithdrawRequest.md} | 4 +- pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../java/com/fireblocks/sdk/Fireblocks.java | 42 +- .../sdk/api/BlockchainsAssetsBetaApi.java | 449 ++ .../com/fireblocks/sdk/api/ComplianceApi.java | 81 + .../sdk/api/ContractInteractionsApi.java | 74 + .../fireblocks/sdk/api/CosignersBetaApi.java | 421 +- .../sdk/api/EmbeddedWalletsApi.java | 292 + .../com/fireblocks/sdk/api/KeysBetaApi.java | 202 + .../{StakingBetaApi.java => StakingApi.java} | 555 +- .../fireblocks/sdk/api/WebhooksV2BetaApi.java | 688 +++ .../sdk/model/AddCosignerRequest.java | 224 + .../sdk/model/AddCosignerResponse.java | 268 + ...tionalInfoDto.java => AdditionalInfo.java} | 33 +- .../java/com/fireblocks/sdk/model/ApiKey.java | 50 +- .../model/AssetBadRequestErrorResponse.java | 9 +- .../fireblocks/sdk/model/AssetClassBeta.java | 70 + .../sdk/model/AssetConflictErrorResponse.java | 9 +- .../model/AssetForbiddenErrorResponse.java | 9 +- .../AssetInternalServerErrorResponse.java | 9 +- .../com/fireblocks/sdk/model/AssetMedia.java | 250 + .../sdk/model/AssetMediaAttributes.java | 140 + ...sponseMetadata.java => AssetMetadata.java} | 25 +- .../sdk/model/AssetMetadataBeta.java | 404 ++ .../sdk/model/AssetNotFoundErrorResponse.java | 9 +- ...ResponseOnchain.java => AssetOnchain.java} | 42 +- .../sdk/model/AssetOnchainBeta.java | 320 ++ .../AssetPriceForbiddenErrorResponse.java | 9 +- .../AssetPriceNotFoundErrorResponse.java | 9 +- .../fireblocks/sdk/model/AssetResponse.java | 16 +- .../sdk/model/AssetResponseBeta.java | 424 ++ .../fireblocks/sdk/model/AuditLogData.java | 17 +- .../sdk/model/BlockchainExplorer.java | 261 + .../fireblocks/sdk/model/BlockchainMedia.java | 213 + .../sdk/model/BlockchainMetadata.java | 313 ++ .../BlockchainNotFoundErrorResponse.java | 183 + .../sdk/model/BlockchainOnchain.java | 298 + .../sdk/model/BlockchainResponse.java | 333 ++ .../fireblocks/sdk/model/CallbackHandler.java | 226 + .../sdk/model/CallbackHandlerRequest.java | 222 + .../fireblocks/sdk/model/ChainDescriptor.java | 70 + ...esponseDto.java => ChainInfoResponse.java} | 51 +- .../sdk/model/ClaimRewardsRequest.java | 262 + .../com/fireblocks/sdk/model/Cosigner.java | 121 +- .../sdk/model/CreateWebhookRequest.java | 283 + .../{DelegationDto.java => Delegation.java} | 163 +- ...SummaryDto.java => DelegationSummary.java} | 44 +- .../sdk/model/ExecuteActionRequest.java | 393 -- .../sdk/model/ExecuteActionResponse.java | 326 -- .../com/fireblocks/sdk/model/FeeLevel.java | 69 + .../sdk/model/GetMpcKeysResponse.java | 203 + .../sdk/model/ListAssetsResponse.java | 200 + .../sdk/model/ListBlockchainsResponse.java | 203 + .../java/com/fireblocks/sdk/model/MpcKey.java | 329 ++ .../fireblocks/sdk/model/Notification.java | 449 ++ .../model/NotificationPaginatedResponse.java | 204 + .../sdk/model/NotificationStatus.java | 66 + .../sdk/model/NotificationWithData.java | 497 ++ .../sdk/model/PairApiKeyRequest.java | 131 + .../sdk/model/PairApiKeyResponse.java | 176 + .../com/fireblocks/sdk/model/Players.java | 212 + .../model/{ProviderDto.java => Provider.java} | 161 +- .../sdk/model/PublicKeyInformation.java | 90 +- ...tedRequestDto.java => RelatedRequest.java} | 36 +- ...actionDto.java => RelatedTransaction.java} | 24 +- .../sdk/model/SolanaBlockchainData.java | 199 + .../fireblocks/sdk/model/SplitRequest.java | 302 ++ ...ckchainDataDto.java => SplitResponse.java} | 57 +- ...StakeRequestDto.java => StakeRequest.java} | 65 +- ...akeResponseDto.java => StakeResponse.java} | 18 +- .../fireblocks/sdk/model/StakingProvider.java | 66 + .../java/com/fireblocks/sdk/model/Status.java | 253 + .../model/TokenInfoNotFoundErrorResponse.java | 183 + .../sdk/model/TransactionOperation.java | 10 +- .../sdk/model/TransactionReceiptResponse.java | 718 +++ .../sdk/model/TransferPeerPathType.java | 4 +- .../java/com/fireblocks/sdk/model/TxLog.java | 495 ++ ...akeRequestDto.java => UnstakeRequest.java} | 51 +- .../model/UpdateCallbackHandlerRequest.java | 132 + .../model/UpdateCallbackHandlerResponse.java | 178 + .../sdk/model/UpdateWebhookRequest.java | 283 + .../{ValidatorDto.java => Validator.java} | 67 +- .../com/fireblocks/sdk/model/Version.java | 139 + .../com/fireblocks/sdk/model/Webhook.java | 442 ++ .../fireblocks/sdk/model/WebhookEvent.java | 130 + .../sdk/model/WebhookPaginatedResponse.java | 203 + ...awRequestDto.java => WithdrawRequest.java} | 45 +- .../com/fireblocks/sdk/FireblocksTest.java | 40 +- .../sdk/api/BlockchainsAssetsBetaApiTest.java | 112 + .../fireblocks/sdk/api/ComplianceApiTest.java | 18 + .../sdk/api/ContractInteractionsApiTest.java | 16 + .../sdk/api/CosignersBetaApiTest.java | 89 +- .../sdk/api/EmbeddedWalletsApiTest.java | 68 + .../fireblocks/sdk/api/KeysBetaApiTest.java | 58 + .../fireblocks/sdk/api/StakingApiTest.java | 237 + .../sdk/api/StakingBetaApiTest.java | 145 - .../sdk/api/WebhooksV2BetaApiTest.java | 164 + .../sdk/model/AddCosignerRequestTest.java | 45 + .../sdk/model/AddCosignerResponseTest.java | 51 + ...foDtoTest.java => AdditionalInfoTest.java} | 12 +- .../com/fireblocks/sdk/model/ApiKeyTest.java | 6 + .../sdk/model/AssetClassBetaTest.java | 25 + .../sdk/model/AssetMediaAttributesTest.java | 33 + .../fireblocks/sdk/model/AssetMediaTest.java | 45 + .../sdk/model/AssetMetadataBetaTest.java | 63 + ...tadataTest.java => AssetMetadataTest.java} | 12 +- .../sdk/model/AssetOnchainBetaTest.java | 57 + ...OnchainTest.java => AssetOnchainTest.java} | 12 +- .../sdk/model/AssetResponseBetaTest.java | 75 + .../sdk/model/BlockchainExplorerTest.java | 51 + .../sdk/model/BlockchainMediaTest.java | 39 + .../sdk/model/BlockchainMetadataTest.java | 51 + .../BlockchainNotFoundErrorResponseTest.java | 39 + .../sdk/model/BlockchainOnchainTest.java | 51 + .../sdk/model/BlockchainResponseTest.java | 63 + .../sdk/model/CallbackHandlerRequestTest.java | 45 + .../sdk/model/CallbackHandlerTest.java | 45 + .../sdk/model/ChainDescriptorTest.java | 25 + ...toTest.java => ChainInfoResponseTest.java} | 12 +- .../sdk/model/ClaimRewardsRequestTest.java | 51 + .../fireblocks/sdk/model/CosignerTest.java | 12 + .../sdk/model/CreateWebhookRequestTest.java | 51 + ...toTest.java => DelegationSummaryTest.java} | 12 +- ...gationDtoTest.java => DelegationTest.java} | 12 +- .../fireblocks/sdk/model/FeeLevelTest.java | 25 + .../sdk/model/GetMpcKeysResponseTest.java | 39 + .../sdk/model/ListAssetsResponseTest.java | 39 + .../model/ListBlockchainsResponseTest.java | 39 + .../com/fireblocks/sdk/model/MpcKeyTest.java | 57 + .../NotificationPaginatedResponseTest.java | 39 + .../sdk/model/NotificationStatusTest.java | 25 + .../sdk/model/NotificationTest.java | 75 + .../sdk/model/NotificationWithDataTest.java | 81 + .../sdk/model/PairApiKeyRequestTest.java | 33 + .../sdk/model/PairApiKeyResponseTest.java | 39 + .../com/fireblocks/sdk/model/PlayersTest.java | 39 + ...ProviderDtoTest.java => ProviderTest.java} | 24 +- ...stDtoTest.java => RelatedRequestTest.java} | 12 +- ...oTest.java => RelatedTransactionTest.java} | 12 +- ...est.java => SolanaBlockchainDataTest.java} | 18 +- ...uestDtoTest.java => SplitRequestTest.java} | 24 +- ...nseDtoTest.java => SplitResponseTest.java} | 12 +- ...uestDtoTest.java => StakeRequestTest.java} | 12 +- ...sponseTest.java => StakeResponseTest.java} | 12 +- .../sdk/model/StakingProviderTest.java | 25 + .../com/fireblocks/sdk/model/StatusTest.java | 39 + .../TokenInfoNotFoundErrorResponseTest.java | 39 + .../model/TransactionReceiptResponseTest.java | 111 + .../com/fireblocks/sdk/model/TxLogTest.java | 81 + ...questTest.java => UnstakeRequestTest.java} | 42 +- .../UpdateCallbackHandlerRequestTest.java | 33 + .../UpdateCallbackHandlerResponseTest.java | 39 + .../sdk/model/UpdateWebhookRequestTest.java | 51 + ...lidatorDtoTest.java => ValidatorTest.java} | 18 +- .../com/fireblocks/sdk/model/VersionTest.java | 33 + .../sdk/model/WebhookEventTest.java | 25 + .../model/WebhookPaginatedResponseTest.java | 39 + .../com/fireblocks/sdk/model/WebhookTest.java | 69 + ...tDtoTest.java => WithdrawRequestTest.java} | 12 +- 250 files changed, 25730 insertions(+), 2689 deletions(-) create mode 100644 docs/AddCosignerRequest.md create mode 100644 docs/AddCosignerResponse.md rename docs/{AdditionalInfoDto.md => AdditionalInfo.md} (81%) create mode 100644 docs/AssetClassBeta.md create mode 100644 docs/AssetMedia.md create mode 100644 docs/AssetMediaAttributes.md rename docs/{AssetResponseMetadata.md => AssetMetadata.md} (93%) create mode 100644 docs/AssetMetadataBeta.md rename docs/{AssetResponseOnchain.md => AssetOnchain.md} (94%) create mode 100644 docs/AssetOnchainBeta.md create mode 100644 docs/AssetResponseBeta.md create mode 100644 docs/BlockchainExplorer.md create mode 100644 docs/BlockchainMedia.md create mode 100644 docs/BlockchainMetadata.md create mode 100644 docs/BlockchainNotFoundErrorResponse.md create mode 100644 docs/BlockchainOnchain.md create mode 100644 docs/BlockchainResponse.md create mode 100644 docs/BlockchainsAssetsBetaApi.md create mode 100644 docs/CallbackHandler.md create mode 100644 docs/CallbackHandlerRequest.md create mode 100644 docs/ChainDescriptor.md rename docs/{ChainInfoResponseDto.md => ChainInfoResponse.md} (73%) create mode 100644 docs/ClaimRewardsRequest.md create mode 100644 docs/CreateWebhookRequest.md rename docs/{DelegationDto.md => Delegation.md} (51%) rename docs/{DelegationSummaryDto.md => DelegationSummary.md} (97%) create mode 100644 docs/EmbeddedWalletsApi.md delete mode 100644 docs/ExecuteActionRequest.md delete mode 100644 docs/ExecuteActionResponse.md create mode 100644 docs/FeeLevel.md create mode 100644 docs/GetMpcKeysResponse.md create mode 100644 docs/KeysBetaApi.md create mode 100644 docs/ListAssetsResponse.md create mode 100644 docs/ListBlockchainsResponse.md create mode 100644 docs/MpcKey.md create mode 100644 docs/Notification.md create mode 100644 docs/NotificationPaginatedResponse.md create mode 100644 docs/NotificationStatus.md create mode 100644 docs/NotificationWithData.md create mode 100644 docs/PairApiKeyRequest.md create mode 100644 docs/PairApiKeyResponse.md create mode 100644 docs/Players.md create mode 100644 docs/Provider.md delete mode 100644 docs/ProviderDto.md rename docs/{RelatedRequestDto.md => RelatedRequest.md} (96%) rename docs/{RelatedTransactionDto.md => RelatedTransaction.md} (91%) create mode 100644 docs/SolanaBlockchainData.md delete mode 100644 docs/SolanaBlockchainDataDto.md create mode 100644 docs/SplitRequest.md create mode 100644 docs/SplitResponse.md rename docs/{StakeRequestDto.md => StakeRequest.md} (67%) rename docs/{StakeResponseDto.md => StakeResponse.md} (91%) create mode 100644 docs/StakingApi.md create mode 100644 docs/StakingProvider.md create mode 100644 docs/Status.md create mode 100644 docs/TokenInfoNotFoundErrorResponse.md create mode 100644 docs/TransactionReceiptResponse.md create mode 100644 docs/TxLog.md rename docs/{UnstakeRequestDto.md => UnstakeRequest.md} (78%) create mode 100644 docs/UpdateCallbackHandlerRequest.md create mode 100644 docs/UpdateCallbackHandlerResponse.md create mode 100644 docs/UpdateWebhookRequest.md rename docs/{ValidatorDto.md => Validator.md} (76%) create mode 100644 docs/Version.md create mode 100644 docs/Webhook.md create mode 100644 docs/WebhookEvent.md create mode 100644 docs/WebhookPaginatedResponse.md rename docs/{StakingBetaApi.md => WebhooksV2BetaApi.md} (51%) rename docs/{WithdrawRequestDto.md => WithdrawRequest.md} (69%) create mode 100644 src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java create mode 100644 src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java create mode 100644 src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java rename src/main/java/com/fireblocks/sdk/api/{StakingBetaApi.java => StakingApi.java} (60%) create mode 100644 src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AddCosignerRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java rename src/main/java/com/fireblocks/sdk/model/{AdditionalInfoDto.java => AdditionalInfo.java} (89%) create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetMedia.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java rename src/main/java/com/fireblocks/sdk/model/{AssetResponseMetadata.java => AssetMetadata.java} (88%) create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java rename src/main/java/com/fireblocks/sdk/model/{AssetResponseOnchain.java => AssetOnchain.java} (87%) create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java create mode 100644 src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java create mode 100644 src/main/java/com/fireblocks/sdk/model/BlockchainExplorer.java create mode 100644 src/main/java/com/fireblocks/sdk/model/BlockchainMedia.java create mode 100644 src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java create mode 100644 src/main/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/BlockchainOnchain.java create mode 100644 src/main/java/com/fireblocks/sdk/model/BlockchainResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CallbackHandler.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java rename src/main/java/com/fireblocks/sdk/model/{ChainInfoResponseDto.java => ChainInfoResponse.java} (87%) create mode 100644 src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java rename src/main/java/com/fireblocks/sdk/model/{DelegationDto.java => Delegation.java} (86%) rename src/main/java/com/fireblocks/sdk/model/{DelegationSummaryDto.java => DelegationSummary.java} (89%) delete mode 100644 src/main/java/com/fireblocks/sdk/model/ExecuteActionRequest.java delete mode 100644 src/main/java/com/fireblocks/sdk/model/ExecuteActionResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/FeeLevel.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetMpcKeysResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/MpcKey.java create mode 100644 src/main/java/com/fireblocks/sdk/model/Notification.java create mode 100644 src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/NotificationStatus.java create mode 100644 src/main/java/com/fireblocks/sdk/model/NotificationWithData.java create mode 100644 src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/Players.java rename src/main/java/com/fireblocks/sdk/model/{ProviderDto.java => Provider.java} (69%) rename src/main/java/com/fireblocks/sdk/model/{RelatedRequestDto.java => RelatedRequest.java} (89%) rename src/main/java/com/fireblocks/sdk/model/{RelatedTransactionDto.java => RelatedTransaction.java} (88%) create mode 100644 src/main/java/com/fireblocks/sdk/model/SolanaBlockchainData.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SplitRequest.java rename src/main/java/com/fireblocks/sdk/model/{SolanaBlockchainDataDto.java => SplitResponse.java} (61%) rename src/main/java/com/fireblocks/sdk/model/{StakeRequestDto.java => StakeRequest.java} (85%) rename src/main/java/com/fireblocks/sdk/model/{StakeResponseDto.java => StakeResponse.java} (89%) create mode 100644 src/main/java/com/fireblocks/sdk/model/StakingProvider.java create mode 100644 src/main/java/com/fireblocks/sdk/model/Status.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TransactionReceiptResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/TxLog.java rename src/main/java/com/fireblocks/sdk/model/{UnstakeRequestDto.java => UnstakeRequest.java} (85%) create mode 100644 src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java rename src/main/java/com/fireblocks/sdk/model/{ValidatorDto.java => Validator.java} (71%) create mode 100644 src/main/java/com/fireblocks/sdk/model/Version.java create mode 100644 src/main/java/com/fireblocks/sdk/model/Webhook.java create mode 100644 src/main/java/com/fireblocks/sdk/model/WebhookEvent.java create mode 100644 src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java rename src/main/java/com/fireblocks/sdk/model/{WithdrawRequestDto.java => WithdrawRequest.java} (85%) create mode 100644 src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/api/StakingApiTest.java delete mode 100644 src/test/java/com/fireblocks/sdk/api/StakingBetaApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AddCosignerRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.java rename src/test/java/com/fireblocks/sdk/model/{AdditionalInfoDtoTest.java => AdditionalInfoTest.java} (76%) create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetMediaTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java rename src/test/java/com/fireblocks/sdk/model/{AssetResponseMetadataTest.java => AssetMetadataTest.java} (69%) create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java rename src/test/java/com/fireblocks/sdk/model/{AssetResponseOnchainTest.java => AssetOnchainTest.java} (78%) create mode 100644 src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/BlockchainExplorerTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/BlockchainMediaTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/BlockchainMetadataTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/BlockchainOnchainTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/BlockchainResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java rename src/test/java/com/fireblocks/sdk/model/{ChainInfoResponseDtoTest.java => ChainInfoResponseTest.java} (79%) create mode 100644 src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java rename src/test/java/com/fireblocks/sdk/model/{DelegationSummaryDtoTest.java => DelegationSummaryTest.java} (76%) rename src/test/java/com/fireblocks/sdk/model/{DelegationDtoTest.java => DelegationTest.java} (92%) create mode 100644 src/test/java/com/fireblocks/sdk/model/FeeLevelTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/MpcKeyTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/NotificationTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/PlayersTest.java rename src/test/java/com/fireblocks/sdk/model/{ProviderDtoTest.java => ProviderTest.java} (72%) rename src/test/java/com/fireblocks/sdk/model/{RelatedRequestDtoTest.java => RelatedRequestTest.java} (77%) rename src/test/java/com/fireblocks/sdk/model/{RelatedTransactionDtoTest.java => RelatedTransactionTest.java} (69%) rename src/test/java/com/fireblocks/sdk/model/{SolanaBlockchainDataDtoTest.java => SolanaBlockchainDataTest.java} (55%) rename src/test/java/com/fireblocks/sdk/model/{UnstakeRequestDtoTest.java => SplitRequestTest.java} (78%) rename src/test/java/com/fireblocks/sdk/model/{StakeResponseDtoTest.java => SplitResponseTest.java} (67%) rename src/test/java/com/fireblocks/sdk/model/{StakeRequestDtoTest.java => StakeRequestTest.java} (82%) rename src/test/java/com/fireblocks/sdk/model/{ExecuteActionResponseTest.java => StakeResponseTest.java} (65%) create mode 100644 src/test/java/com/fireblocks/sdk/model/StakingProviderTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/StatusTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TransactionReceiptResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/TxLogTest.java rename src/test/java/com/fireblocks/sdk/model/{ExecuteActionRequestTest.java => UnstakeRequestTest.java} (59%) create mode 100644 src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java rename src/test/java/com/fireblocks/sdk/model/{ValidatorDtoTest.java => ValidatorTest.java} (68%) create mode 100644 src/test/java/com/fireblocks/sdk/model/VersionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/WebhookTest.java rename src/test/java/com/fireblocks/sdk/model/{WithdrawRequestDtoTest.java => WithdrawRequestTest.java} (76%) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f13f77f..89bff77 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -22,7 +22,9 @@ docs/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf1.md docs/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2.md docs/AddCollateralRequestBody.md docs/AddContractAssetRequest.md -docs/AdditionalInfoDto.md +docs/AddCosignerRequest.md +docs/AddCosignerResponse.md +docs/AdditionalInfo.md docs/AmlRegistrationResult.md docs/AmlScreeningResult.md docs/AmountAggregationTimePeriodMethod.md @@ -34,17 +36,23 @@ docs/ApiUserApi.md docs/AssetAlreadyExistHttpError.md docs/AssetAmount.md docs/AssetBadRequestErrorResponse.md +docs/AssetClassBeta.md docs/AssetConflictErrorResponse.md docs/AssetForbiddenErrorResponse.md docs/AssetInternalServerErrorResponse.md +docs/AssetMedia.md +docs/AssetMediaAttributes.md +docs/AssetMetadata.md +docs/AssetMetadataBeta.md docs/AssetMetadataDto.md docs/AssetNotFoundErrorResponse.md +docs/AssetOnchain.md +docs/AssetOnchainBeta.md docs/AssetPriceForbiddenErrorResponse.md docs/AssetPriceNotFoundErrorResponse.md docs/AssetPriceResponse.md docs/AssetResponse.md -docs/AssetResponseMetadata.md -docs/AssetResponseOnchain.md +docs/AssetResponseBeta.md docs/AssetTypeResponse.md docs/AssetWallet.md docs/AssetsApi.md @@ -54,9 +62,20 @@ docs/AuditorData.md docs/AuthorizationGroups.md docs/AuthorizationInfo.md docs/BlockInfo.md +docs/BlockchainExplorer.md +docs/BlockchainMedia.md +docs/BlockchainMetadata.md +docs/BlockchainNotFoundErrorResponse.md +docs/BlockchainOnchain.md +docs/BlockchainResponse.md docs/BlockchainsAssetsApi.md +docs/BlockchainsAssetsBetaApi.md +docs/CallbackHandler.md +docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md -docs/ChainInfoResponseDto.md +docs/ChainDescriptor.md +docs/ChainInfoResponse.md +docs/ClaimRewardsRequest.md docs/CollectionBurnRequestDto.md docs/CollectionBurnResponseDto.md docs/CollectionDeployRequestDto.md @@ -140,11 +159,12 @@ docs/CreateVaultAccountConnectionRequest.md docs/CreateVaultAccountRequest.md docs/CreateVaultAssetResponse.md docs/CreateWalletRequest.md +docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md docs/DefaultNetworkRoutingDest.md -docs/DelegationDto.md -docs/DelegationSummaryDto.md +docs/Delegation.md +docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md docs/DeployedContractResponseDto.md @@ -177,6 +197,7 @@ docs/DropTransactionRequest.md docs/DropTransactionResponse.md docs/EVMTokenCreateParamsDto.md docs/EditGasStationConfigurationResponse.md +docs/EmbeddedWalletsApi.md docs/ErrorResponse.md docs/ErrorResponseError.md docs/ErrorSchema.md @@ -190,8 +211,6 @@ docs/ExchangeAsset.md docs/ExchangeSettlementTransactionsResponse.md docs/ExchangeTradingAccount.md docs/ExchangeType.md -docs/ExecuteActionRequest.md -docs/ExecuteActionResponse.md docs/ExecutionConversionOperation.md docs/ExecutionDisbursementOperation.md docs/ExecutionOperationStatus.md @@ -200,6 +219,7 @@ docs/ExecutionTransferOperation.md docs/ExternalWalletAsset.md docs/ExternalWalletsApi.md docs/FeeInfo.md +docs/FeeLevel.md docs/FetchAbiRequestDto.md docs/FiatAccount.md docs/FiatAccountType.md @@ -220,6 +240,7 @@ docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md docs/GetLinkedCollectionsPaginatedResponse.md docs/GetMaxSpendableAmountResponse.md +docs/GetMpcKeysResponse.md docs/GetNFTsResponse.md docs/GetOtaStatusResponse.md docs/GetOwnershipTokensResponse.md @@ -236,15 +257,19 @@ docs/Job.md docs/JobCreated.md docs/JobManagementApi.md docs/KeyLinkBetaApi.md +docs/KeysBetaApi.md docs/LeanAbiFunction.md docs/LeanContractDto.md docs/LeanDeployedContractResponseDto.md +docs/ListAssetsResponse.md +docs/ListBlockchainsResponse.md docs/ListOwnedCollectionsResponse.md docs/ListOwnedTokensResponse.md docs/MediaEntityResponse.md docs/ModifySigningKeyAgentIdDto.md docs/ModifySigningKeyDto.md docs/ModifyValidationKeyDto.md +docs/MpcKey.md docs/NetworkChannel.md docs/NetworkConnection.md docs/NetworkConnectionResponse.md @@ -259,6 +284,10 @@ docs/NetworkRecord.md docs/NftsApi.md docs/NoneNetworkRoutingDest.md docs/NotFoundException.md +docs/Notification.md +docs/NotificationPaginatedResponse.md +docs/NotificationStatus.md +docs/NotificationWithData.md docs/OffExchangesApi.md docs/OneTimeAddress.md docs/OneTimeAddressAccount.md @@ -269,6 +298,8 @@ docs/PaginatedAddressResponsePaging.md docs/PaginatedAssetWalletResponse.md docs/PaginatedAssetWalletResponsePaging.md docs/Paging.md +docs/PairApiKeyRequest.md +docs/PairApiKeyResponse.md docs/Parameter.md docs/ParameterWithValue.md docs/PayeeAccount.md @@ -285,6 +316,7 @@ docs/PayoutInstructionState.md docs/PayoutResponse.md docs/PayoutState.md docs/PayoutStatus.md +docs/Players.md docs/PolicyAndValidationResponse.md docs/PolicyCheckResult.md docs/PolicyEditorBetaApi.md @@ -309,7 +341,7 @@ docs/PolicySrcOrDestType.md docs/PolicyStatus.md docs/PolicyValidation.md docs/PreScreening.md -docs/ProviderDto.md +docs/Provider.md docs/PublicKeyInformation.md docs/PublishDraftRequest.md docs/PublishResult.md @@ -317,8 +349,8 @@ docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md -docs/RelatedRequestDto.md -docs/RelatedTransactionDto.md +docs/RelatedRequest.md +docs/RelatedTransaction.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md @@ -392,15 +424,19 @@ docs/SmartTransferTicketTermResponse.md docs/SmartTransferUpdateTicketTerm.md docs/SmartTransferUserGroups.md docs/SmartTransferUserGroupsResponse.md -docs/SolanaBlockchainDataDto.md +docs/SolanaBlockchainData.md docs/SourceTransferPeerPath.md docs/SourceTransferPeerPathResponse.md docs/SpamOwnershipResponse.md docs/SpamTokenResponse.md +docs/SplitRequest.md +docs/SplitResponse.md docs/SrcOrDestAttributesInner.md -docs/StakeRequestDto.md -docs/StakeResponseDto.md -docs/StakingBetaApi.md +docs/StakeRequest.md +docs/StakeResponse.md +docs/StakingApi.md +docs/StakingProvider.md +docs/Status.md docs/StellarRippleCreateParamsDto.md docs/SystemMessageInfo.md docs/Task.md @@ -409,6 +445,7 @@ docs/ThirdPartyRouting.md docs/ToCollateralTransaction.md docs/ToExchangeTransaction.md docs/TokenCollectionResponse.md +docs/TokenInfoNotFoundErrorResponse.md docs/TokenLinkDto.md docs/TokenLinkDtoTokenMetadata.md docs/TokenLinkExistsHttpError.md @@ -423,6 +460,7 @@ docs/TradingAccountType.md docs/Transaction.md docs/TransactionFee.md docs/TransactionOperation.md +docs/TransactionReceiptResponse.md docs/TransactionRequest.md docs/TransactionRequestAmount.md docs/TransactionRequestDestination.md @@ -466,14 +504,18 @@ docs/TravelRuleValidateFullTransactionRequest.md docs/TravelRuleValidateTransactionRequest.md docs/TravelRuleValidateTransactionResponse.md docs/TravelRuleVaspForVault.md +docs/TxLog.md docs/UnfreezeTransactionResponse.md docs/UnmanagedWallet.md docs/UnspentInput.md docs/UnspentInputsResponse.md -docs/UnstakeRequestDto.md +docs/UnstakeRequest.md +docs/UpdateCallbackHandlerRequest.md +docs/UpdateCallbackHandlerResponse.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md +docs/UpdateWebhookRequest.md docs/UserGroupCreateRequest.md docs/UserGroupCreateResponse.md docs/UserGroupResponse.md @@ -487,7 +529,7 @@ docs/UsersApi.md docs/ValidateAddressResponse.md docs/ValidatedTransactionsForRescan.md docs/ValidationKeyDto.md -docs/ValidatorDto.md +docs/Validator.md docs/VaultAccount.md docs/VaultAccountsPagedResponse.md docs/VaultAccountsPagedResponsePaging.md @@ -496,12 +538,17 @@ docs/VaultAsset.md docs/VaultWalletAddress.md docs/VaultsApi.md docs/VendorDto.md +docs/Version.md docs/WalletAsset.md docs/WalletAssetAdditionalInfo.md docs/Web3ConnectionsApi.md +docs/Webhook.md +docs/WebhookEvent.md +docs/WebhookPaginatedResponse.md docs/WebhooksApi.md +docs/WebhooksV2BetaApi.md docs/WhitelistIpAddressesApi.md -docs/WithdrawRequestDto.md +docs/WithdrawRequest.md docs/WorkflowConfigStatus.md docs/WorkflowConfigurationId.md docs/WorkflowExecutionOperation.md @@ -539,6 +586,7 @@ src/main/java/com/fireblocks/sdk/api/ApiUserApi.java src/main/java/com/fireblocks/sdk/api/AssetsApi.java src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java src/main/java/com/fireblocks/sdk/api/ComplianceApi.java src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java @@ -547,6 +595,7 @@ src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java src/main/java/com/fireblocks/sdk/api/ContractsApi.java src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java +src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java @@ -554,6 +603,7 @@ src/main/java/com/fireblocks/sdk/api/GasStationsApi.java src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java src/main/java/com/fireblocks/sdk/api/JobManagementApi.java src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java +src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java src/main/java/com/fireblocks/sdk/api/NftsApi.java src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java @@ -562,7 +612,7 @@ src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java -src/main/java/com/fireblocks/sdk/api/StakingBetaApi.java +src/main/java/com/fireblocks/sdk/api/StakingApi.java src/main/java/com/fireblocks/sdk/api/TokenizationApi.java src/main/java/com/fireblocks/sdk/api/TransactionsApi.java src/main/java/com/fireblocks/sdk/api/TravelRuleBetaApi.java @@ -571,6 +621,7 @@ src/main/java/com/fireblocks/sdk/api/UsersApi.java src/main/java/com/fireblocks/sdk/api/VaultsApi.java src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java src/main/java/com/fireblocks/sdk/api/WebhooksApi.java +src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java src/main/java/com/fireblocks/sdk/model/APIUser.java @@ -588,7 +639,9 @@ src/main/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf1Addi src/main/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2.java src/main/java/com/fireblocks/sdk/model/AddCollateralRequestBody.java src/main/java/com/fireblocks/sdk/model/AddContractAssetRequest.java -src/main/java/com/fireblocks/sdk/model/AdditionalInfoDto.java +src/main/java/com/fireblocks/sdk/model/AddCosignerRequest.java +src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java +src/main/java/com/fireblocks/sdk/model/AdditionalInfo.java src/main/java/com/fireblocks/sdk/model/AmlRegistrationResult.java src/main/java/com/fireblocks/sdk/model/AmlScreeningResult.java src/main/java/com/fireblocks/sdk/model/AmountAggregationTimePeriodMethod.java @@ -599,17 +652,23 @@ src/main/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpError.java src/main/java/com/fireblocks/sdk/model/AssetAmount.java src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java +src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java +src/main/java/com/fireblocks/sdk/model/AssetMedia.java +src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java +src/main/java/com/fireblocks/sdk/model/AssetMetadata.java +src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java src/main/java/com/fireblocks/sdk/model/AssetMetadataDto.java src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java +src/main/java/com/fireblocks/sdk/model/AssetOnchain.java +src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetPriceResponse.java src/main/java/com/fireblocks/sdk/model/AssetResponse.java -src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java -src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java +src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java src/main/java/com/fireblocks/sdk/model/AssetTypeResponse.java src/main/java/com/fireblocks/sdk/model/AssetWallet.java src/main/java/com/fireblocks/sdk/model/AuditLogData.java @@ -617,8 +676,18 @@ src/main/java/com/fireblocks/sdk/model/AuditorData.java src/main/java/com/fireblocks/sdk/model/AuthorizationGroups.java src/main/java/com/fireblocks/sdk/model/AuthorizationInfo.java src/main/java/com/fireblocks/sdk/model/BlockInfo.java +src/main/java/com/fireblocks/sdk/model/BlockchainExplorer.java +src/main/java/com/fireblocks/sdk/model/BlockchainMedia.java +src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java +src/main/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponse.java +src/main/java/com/fireblocks/sdk/model/BlockchainOnchain.java +src/main/java/com/fireblocks/sdk/model/BlockchainResponse.java +src/main/java/com/fireblocks/sdk/model/CallbackHandler.java +src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/CancelTransactionResponse.java -src/main/java/com/fireblocks/sdk/model/ChainInfoResponseDto.java +src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java +src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java +src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java src/main/java/com/fireblocks/sdk/model/CollectionDeployRequestDto.java @@ -695,11 +764,12 @@ src/main/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.java src/main/java/com/fireblocks/sdk/model/CreateVaultAssetResponse.java src/main/java/com/fireblocks/sdk/model/CreateWalletRequest.java +src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java src/main/java/com/fireblocks/sdk/model/DefaultNetworkRoutingDest.java -src/main/java/com/fireblocks/sdk/model/DelegationDto.java -src/main/java/com/fireblocks/sdk/model/DelegationSummaryDto.java +src/main/java/com/fireblocks/sdk/model/Delegation.java +src/main/java/com/fireblocks/sdk/model/DelegationSummary.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java @@ -743,8 +813,6 @@ src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java src/main/java/com/fireblocks/sdk/model/ExchangeSettlementTransactionsResponse.java src/main/java/com/fireblocks/sdk/model/ExchangeTradingAccount.java src/main/java/com/fireblocks/sdk/model/ExchangeType.java -src/main/java/com/fireblocks/sdk/model/ExecuteActionRequest.java -src/main/java/com/fireblocks/sdk/model/ExecuteActionResponse.java src/main/java/com/fireblocks/sdk/model/ExecutionConversionOperation.java src/main/java/com/fireblocks/sdk/model/ExecutionDisbursementOperation.java src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java @@ -752,6 +820,7 @@ src/main/java/com/fireblocks/sdk/model/ExecutionScreeningOperation.java src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java src/main/java/com/fireblocks/sdk/model/ExternalWalletAsset.java src/main/java/com/fireblocks/sdk/model/FeeInfo.java +src/main/java/com/fireblocks/sdk/model/FeeLevel.java src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java src/main/java/com/fireblocks/sdk/model/FiatAccount.java src/main/java/com/fireblocks/sdk/model/FiatAccountType.java @@ -770,6 +839,7 @@ src/main/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyRe src/main/java/com/fireblocks/sdk/model/GetFilterParameter.java src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java +src/main/java/com/fireblocks/sdk/model/GetMpcKeysResponse.java src/main/java/com/fireblocks/sdk/model/GetNFTsResponse.java src/main/java/com/fireblocks/sdk/model/GetOtaStatusResponse.java src/main/java/com/fireblocks/sdk/model/GetOwnershipTokensResponse.java @@ -786,12 +856,15 @@ src/main/java/com/fireblocks/sdk/model/JobCreated.java src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java src/main/java/com/fireblocks/sdk/model/LeanContractDto.java src/main/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDto.java +src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java +src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java src/main/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponse.java src/main/java/com/fireblocks/sdk/model/ListOwnedTokensResponse.java src/main/java/com/fireblocks/sdk/model/MediaEntityResponse.java src/main/java/com/fireblocks/sdk/model/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/NetworkChannel.java src/main/java/com/fireblocks/sdk/model/NetworkConnection.java src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java @@ -804,6 +877,10 @@ src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValue.java src/main/java/com/fireblocks/sdk/model/NetworkRecord.java src/main/java/com/fireblocks/sdk/model/NoneNetworkRoutingDest.java src/main/java/com/fireblocks/sdk/model/NotFoundException.java +src/main/java/com/fireblocks/sdk/model/Notification.java +src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java +src/main/java/com/fireblocks/sdk/model/NotificationStatus.java +src/main/java/com/fireblocks/sdk/model/NotificationWithData.java src/main/java/com/fireblocks/sdk/model/OneTimeAddress.java src/main/java/com/fireblocks/sdk/model/OneTimeAddressAccount.java src/main/java/com/fireblocks/sdk/model/OperationExecutionFailure.java @@ -812,6 +889,8 @@ src/main/java/com/fireblocks/sdk/model/PaginatedAddressResponsePaging.java src/main/java/com/fireblocks/sdk/model/PaginatedAssetWalletResponse.java src/main/java/com/fireblocks/sdk/model/PaginatedAssetWalletResponsePaging.java src/main/java/com/fireblocks/sdk/model/Paging.java +src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java +src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java src/main/java/com/fireblocks/sdk/model/Parameter.java src/main/java/com/fireblocks/sdk/model/ParameterWithValue.java src/main/java/com/fireblocks/sdk/model/PayeeAccount.java @@ -827,6 +906,7 @@ src/main/java/com/fireblocks/sdk/model/PayoutInstructionState.java src/main/java/com/fireblocks/sdk/model/PayoutResponse.java src/main/java/com/fireblocks/sdk/model/PayoutState.java src/main/java/com/fireblocks/sdk/model/PayoutStatus.java +src/main/java/com/fireblocks/sdk/model/Players.java src/main/java/com/fireblocks/sdk/model/PolicyAndValidationResponse.java src/main/java/com/fireblocks/sdk/model/PolicyCheckResult.java src/main/java/com/fireblocks/sdk/model/PolicyMetadata.java @@ -850,7 +930,7 @@ src/main/java/com/fireblocks/sdk/model/PolicySrcOrDestType.java src/main/java/com/fireblocks/sdk/model/PolicyStatus.java src/main/java/com/fireblocks/sdk/model/PolicyValidation.java src/main/java/com/fireblocks/sdk/model/PreScreening.java -src/main/java/com/fireblocks/sdk/model/ProviderDto.java +src/main/java/com/fireblocks/sdk/model/Provider.java src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java src/main/java/com/fireblocks/sdk/model/PublishDraftRequest.java src/main/java/com/fireblocks/sdk/model/PublishResult.java @@ -858,8 +938,8 @@ src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java -src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java -src/main/java/com/fireblocks/sdk/model/RelatedTransactionDto.java +src/main/java/com/fireblocks/sdk/model/RelatedRequest.java +src/main/java/com/fireblocks/sdk/model/RelatedTransaction.java src/main/java/com/fireblocks/sdk/model/RemoveCollateralRequestBody.java src/main/java/com/fireblocks/sdk/model/RenameCosigner.java src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java @@ -931,14 +1011,18 @@ 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/SolanaBlockchainDataDto.java +src/main/java/com/fireblocks/sdk/model/SolanaBlockchainData.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 src/main/java/com/fireblocks/sdk/model/SpamTokenResponse.java +src/main/java/com/fireblocks/sdk/model/SplitRequest.java +src/main/java/com/fireblocks/sdk/model/SplitResponse.java src/main/java/com/fireblocks/sdk/model/SrcOrDestAttributesInner.java -src/main/java/com/fireblocks/sdk/model/StakeRequestDto.java -src/main/java/com/fireblocks/sdk/model/StakeResponseDto.java +src/main/java/com/fireblocks/sdk/model/StakeRequest.java +src/main/java/com/fireblocks/sdk/model/StakeResponse.java +src/main/java/com/fireblocks/sdk/model/StakingProvider.java +src/main/java/com/fireblocks/sdk/model/Status.java src/main/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDto.java src/main/java/com/fireblocks/sdk/model/SystemMessageInfo.java src/main/java/com/fireblocks/sdk/model/Task.java @@ -947,6 +1031,7 @@ src/main/java/com/fireblocks/sdk/model/ThirdPartyRouting.java src/main/java/com/fireblocks/sdk/model/ToCollateralTransaction.java src/main/java/com/fireblocks/sdk/model/ToExchangeTransaction.java src/main/java/com/fireblocks/sdk/model/TokenCollectionResponse.java +src/main/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java src/main/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadata.java src/main/java/com/fireblocks/sdk/model/TokenLinkExistsHttpError.java @@ -960,6 +1045,7 @@ src/main/java/com/fireblocks/sdk/model/TradingAccountType.java src/main/java/com/fireblocks/sdk/model/Transaction.java src/main/java/com/fireblocks/sdk/model/TransactionFee.java src/main/java/com/fireblocks/sdk/model/TransactionOperation.java +src/main/java/com/fireblocks/sdk/model/TransactionReceiptResponse.java src/main/java/com/fireblocks/sdk/model/TransactionRequest.java src/main/java/com/fireblocks/sdk/model/TransactionRequestAmount.java src/main/java/com/fireblocks/sdk/model/TransactionRequestDestination.java @@ -1001,14 +1087,18 @@ src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest. src/main/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionRequest.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionResponse.java src/main/java/com/fireblocks/sdk/model/TravelRuleVaspForVault.java +src/main/java/com/fireblocks/sdk/model/TxLog.java src/main/java/com/fireblocks/sdk/model/UnfreezeTransactionResponse.java src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java src/main/java/com/fireblocks/sdk/model/UnspentInput.java src/main/java/com/fireblocks/sdk/model/UnspentInputsResponse.java -src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java +src/main/java/com/fireblocks/sdk/model/UnstakeRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java src/main/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDto.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountRequest.java +src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/UserGroupCreateRequest.java src/main/java/com/fireblocks/sdk/model/UserGroupCreateResponse.java src/main/java/com/fireblocks/sdk/model/UserGroupResponse.java @@ -1020,7 +1110,7 @@ src/main/java/com/fireblocks/sdk/model/UserType.java src/main/java/com/fireblocks/sdk/model/ValidateAddressResponse.java src/main/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescan.java src/main/java/com/fireblocks/sdk/model/ValidationKeyDto.java -src/main/java/com/fireblocks/sdk/model/ValidatorDto.java +src/main/java/com/fireblocks/sdk/model/Validator.java src/main/java/com/fireblocks/sdk/model/VaultAccount.java src/main/java/com/fireblocks/sdk/model/VaultAccountsPagedResponse.java src/main/java/com/fireblocks/sdk/model/VaultAccountsPagedResponsePaging.java @@ -1028,9 +1118,13 @@ src/main/java/com/fireblocks/sdk/model/VaultActionStatus.java src/main/java/com/fireblocks/sdk/model/VaultAsset.java src/main/java/com/fireblocks/sdk/model/VaultWalletAddress.java src/main/java/com/fireblocks/sdk/model/VendorDto.java +src/main/java/com/fireblocks/sdk/model/Version.java src/main/java/com/fireblocks/sdk/model/WalletAsset.java src/main/java/com/fireblocks/sdk/model/WalletAssetAdditionalInfo.java -src/main/java/com/fireblocks/sdk/model/WithdrawRequestDto.java +src/main/java/com/fireblocks/sdk/model/Webhook.java +src/main/java/com/fireblocks/sdk/model/WebhookEvent.java +src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java +src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java src/main/java/com/fireblocks/sdk/model/WorkflowConfigStatus.java src/main/java/com/fireblocks/sdk/model/WorkflowConfigurationId.java src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java @@ -1048,6 +1142,7 @@ src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java src/test/java/com/fireblocks/sdk/api/AssetsApiTest.java src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java +src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java @@ -1056,6 +1151,7 @@ src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java src/test/java/com/fireblocks/sdk/api/ContractsApiTest.java src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java +src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java src/test/java/com/fireblocks/sdk/api/ExternalWalletsApiTest.java src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java @@ -1063,6 +1159,7 @@ src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java src/test/java/com/fireblocks/sdk/api/JobManagementApiTest.java src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java +src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java src/test/java/com/fireblocks/sdk/api/NftsApiTest.java src/test/java/com/fireblocks/sdk/api/OffExchangesApiTest.java @@ -1071,7 +1168,7 @@ src/test/java/com/fireblocks/sdk/api/PaymentsPayoutApiTest.java src/test/java/com/fireblocks/sdk/api/PolicyEditorBetaApiTest.java src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java -src/test/java/com/fireblocks/sdk/api/StakingBetaApiTest.java +src/test/java/com/fireblocks/sdk/api/StakingApiTest.java src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java src/test/java/com/fireblocks/sdk/api/TravelRuleBetaApiTest.java @@ -1080,6 +1177,7 @@ src/test/java/com/fireblocks/sdk/api/UsersApiTest.java src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java +src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java src/test/java/com/fireblocks/sdk/model/APIUserTest.java @@ -1096,7 +1194,9 @@ src/test/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOfTest. src/test/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestTest.java src/test/java/com/fireblocks/sdk/model/AddCollateralRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/AddContractAssetRequestTest.java -src/test/java/com/fireblocks/sdk/model/AdditionalInfoDtoTest.java +src/test/java/com/fireblocks/sdk/model/AddCosignerRequestTest.java +src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.java +src/test/java/com/fireblocks/sdk/model/AdditionalInfoTest.java src/test/java/com/fireblocks/sdk/model/AmlRegistrationResultTest.java src/test/java/com/fireblocks/sdk/model/AmlScreeningResultTest.java src/test/java/com/fireblocks/sdk/model/AmountAggregationTimePeriodMethodTest.java @@ -1107,16 +1207,22 @@ src/test/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpErrorTest.java src/test/java/com/fireblocks/sdk/model/AssetAmountTest.java src/test/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java +src/test/java/com/fireblocks/sdk/model/AssetMediaTest.java +src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java src/test/java/com/fireblocks/sdk/model/AssetMetadataDtoTest.java +src/test/java/com/fireblocks/sdk/model/AssetMetadataTest.java src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java +src/test/java/com/fireblocks/sdk/model/AssetOnchainTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceResponseTest.java -src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java -src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java +src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java src/test/java/com/fireblocks/sdk/model/AssetResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetTypeResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetWalletTest.java @@ -1125,8 +1231,18 @@ src/test/java/com/fireblocks/sdk/model/AuditorDataTest.java src/test/java/com/fireblocks/sdk/model/AuthorizationGroupsTest.java src/test/java/com/fireblocks/sdk/model/AuthorizationInfoTest.java src/test/java/com/fireblocks/sdk/model/BlockInfoTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainExplorerTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainMediaTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainMetadataTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainOnchainTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainResponseTest.java +src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java +src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java src/test/java/com/fireblocks/sdk/model/CancelTransactionResponseTest.java -src/test/java/com/fireblocks/sdk/model/ChainInfoResponseDtoTest.java +src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java +src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java +src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionDeployRequestDtoTest.java @@ -1203,11 +1319,12 @@ src/test/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequestTest.j src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateVaultAssetResponseTest.java src/test/java/com/fireblocks/sdk/model/CreateWalletRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java src/test/java/com/fireblocks/sdk/model/DefaultNetworkRoutingDestTest.java -src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java -src/test/java/com/fireblocks/sdk/model/DelegationSummaryDtoTest.java +src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java +src/test/java/com/fireblocks/sdk/model/DelegationTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java @@ -1251,8 +1368,6 @@ src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java src/test/java/com/fireblocks/sdk/model/ExchangeSettlementTransactionsResponseTest.java src/test/java/com/fireblocks/sdk/model/ExchangeTradingAccountTest.java src/test/java/com/fireblocks/sdk/model/ExchangeTypeTest.java -src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java -src/test/java/com/fireblocks/sdk/model/ExecuteActionResponseTest.java src/test/java/com/fireblocks/sdk/model/ExecutionConversionOperationTest.java src/test/java/com/fireblocks/sdk/model/ExecutionDisbursementOperationTest.java src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java @@ -1260,6 +1375,7 @@ src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java src/test/java/com/fireblocks/sdk/model/ExternalWalletAssetTest.java src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java +src/test/java/com/fireblocks/sdk/model/FeeLevelTest.java src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/FiatAccountTest.java src/test/java/com/fireblocks/sdk/model/FiatAccountTypeTest.java @@ -1278,6 +1394,7 @@ src/test/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyRe src/test/java/com/fireblocks/sdk/model/GetFilterParameterTest.java src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java +src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.java src/test/java/com/fireblocks/sdk/model/GetNFTsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetOtaStatusResponseTest.java src/test/java/com/fireblocks/sdk/model/GetOwnershipTokensResponseTest.java @@ -1294,12 +1411,15 @@ src/test/java/com/fireblocks/sdk/model/JobTest.java src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/LeanContractDtoTest.java src/test/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDtoTest.java +src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.java +src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListOwnedTokensResponseTest.java src/test/java/com/fireblocks/sdk/model/MediaEntityResponseTest.java src/test/java/com/fireblocks/sdk/model/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/NetworkChannelTest.java src/test/java/com/fireblocks/sdk/model/NetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValueTest.java @@ -1312,6 +1432,10 @@ src/test/java/com/fireblocks/sdk/model/NetworkIdTest.java src/test/java/com/fireblocks/sdk/model/NetworkRecordTest.java src/test/java/com/fireblocks/sdk/model/NoneNetworkRoutingDestTest.java src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java +src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.java +src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java +src/test/java/com/fireblocks/sdk/model/NotificationTest.java +src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java src/test/java/com/fireblocks/sdk/model/OneTimeAddressAccountTest.java src/test/java/com/fireblocks/sdk/model/OneTimeAddressTest.java src/test/java/com/fireblocks/sdk/model/OperationExecutionFailureTest.java @@ -1320,6 +1444,8 @@ src/test/java/com/fireblocks/sdk/model/PaginatedAddressResponseTest.java src/test/java/com/fireblocks/sdk/model/PaginatedAssetWalletResponsePagingTest.java src/test/java/com/fireblocks/sdk/model/PaginatedAssetWalletResponseTest.java src/test/java/com/fireblocks/sdk/model/PagingTest.java +src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.java +src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/ParameterTest.java src/test/java/com/fireblocks/sdk/model/ParameterWithValueTest.java src/test/java/com/fireblocks/sdk/model/PayeeAccountResponseTest.java @@ -1335,6 +1461,7 @@ src/test/java/com/fireblocks/sdk/model/PayoutInstructionTest.java src/test/java/com/fireblocks/sdk/model/PayoutResponseTest.java src/test/java/com/fireblocks/sdk/model/PayoutStateTest.java src/test/java/com/fireblocks/sdk/model/PayoutStatusTest.java +src/test/java/com/fireblocks/sdk/model/PlayersTest.java src/test/java/com/fireblocks/sdk/model/PolicyAndValidationResponseTest.java src/test/java/com/fireblocks/sdk/model/PolicyCheckResultTest.java src/test/java/com/fireblocks/sdk/model/PolicyMetadataTest.java @@ -1358,7 +1485,7 @@ src/test/java/com/fireblocks/sdk/model/PolicySrcOrDestTypeTest.java src/test/java/com/fireblocks/sdk/model/PolicyStatusTest.java src/test/java/com/fireblocks/sdk/model/PolicyValidationTest.java src/test/java/com/fireblocks/sdk/model/PreScreeningTest.java -src/test/java/com/fireblocks/sdk/model/ProviderDtoTest.java +src/test/java/com/fireblocks/sdk/model/ProviderTest.java 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 @@ -1366,8 +1493,8 @@ src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java -src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java -src/test/java/com/fireblocks/sdk/model/RelatedTransactionDtoTest.java +src/test/java/com/fireblocks/sdk/model/RelatedRequestTest.java +src/test/java/com/fireblocks/sdk/model/RelatedTransactionTest.java src/test/java/com/fireblocks/sdk/model/RemoveCollateralRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java @@ -1439,14 +1566,18 @@ 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/SolanaBlockchainDataDtoTest.java +src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataTest.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 src/test/java/com/fireblocks/sdk/model/SpamTokenResponseTest.java +src/test/java/com/fireblocks/sdk/model/SplitRequestTest.java +src/test/java/com/fireblocks/sdk/model/SplitResponseTest.java src/test/java/com/fireblocks/sdk/model/SrcOrDestAttributesInnerTest.java -src/test/java/com/fireblocks/sdk/model/StakeRequestDtoTest.java -src/test/java/com/fireblocks/sdk/model/StakeResponseDtoTest.java +src/test/java/com/fireblocks/sdk/model/StakeRequestTest.java +src/test/java/com/fireblocks/sdk/model/StakeResponseTest.java +src/test/java/com/fireblocks/sdk/model/StakingProviderTest.java +src/test/java/com/fireblocks/sdk/model/StatusTest.java src/test/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDtoTest.java src/test/java/com/fireblocks/sdk/model/SystemMessageInfoTest.java src/test/java/com/fireblocks/sdk/model/TaskTest.java @@ -1455,6 +1586,7 @@ src/test/java/com/fireblocks/sdk/model/ThirdPartyRoutingTest.java src/test/java/com/fireblocks/sdk/model/ToCollateralTransactionTest.java src/test/java/com/fireblocks/sdk/model/ToExchangeTransactionTest.java src/test/java/com/fireblocks/sdk/model/TokenCollectionResponseTest.java +src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadataTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkExistsHttpErrorTest.java @@ -1467,6 +1599,7 @@ src/test/java/com/fireblocks/sdk/model/TokensPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/TradingAccountTypeTest.java src/test/java/com/fireblocks/sdk/model/TransactionFeeTest.java src/test/java/com/fireblocks/sdk/model/TransactionOperationTest.java +src/test/java/com/fireblocks/sdk/model/TransactionReceiptResponseTest.java src/test/java/com/fireblocks/sdk/model/TransactionRequestAmountTest.java src/test/java/com/fireblocks/sdk/model/TransactionRequestDestinationTest.java src/test/java/com/fireblocks/sdk/model/TransactionRequestFeeTest.java @@ -1509,14 +1642,18 @@ src/test/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequestT src/test/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionRequestTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateTransactionResponseTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleVaspForVaultTest.java +src/test/java/com/fireblocks/sdk/model/TxLogTest.java src/test/java/com/fireblocks/sdk/model/UnfreezeTransactionResponseTest.java src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java src/test/java/com/fireblocks/sdk/model/UnspentInputTest.java src/test/java/com/fireblocks/sdk/model/UnspentInputsResponseTest.java -src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java +src/test/java/com/fireblocks/sdk/model/UnstakeRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java src/test/java/com/fireblocks/sdk/model/UpdateTokenOwnershipStatusDtoTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/UpdateVaultAccountRequestTest.java +src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/UserGroupCreateRequestTest.java src/test/java/com/fireblocks/sdk/model/UserGroupCreateResponseTest.java src/test/java/com/fireblocks/sdk/model/UserGroupResponseTest.java @@ -1528,7 +1665,7 @@ src/test/java/com/fireblocks/sdk/model/UserTypeTest.java src/test/java/com/fireblocks/sdk/model/ValidateAddressResponseTest.java src/test/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescanTest.java src/test/java/com/fireblocks/sdk/model/ValidationKeyDtoTest.java -src/test/java/com/fireblocks/sdk/model/ValidatorDtoTest.java +src/test/java/com/fireblocks/sdk/model/ValidatorTest.java src/test/java/com/fireblocks/sdk/model/VaultAccountTest.java src/test/java/com/fireblocks/sdk/model/VaultAccountsPagedResponsePagingTest.java src/test/java/com/fireblocks/sdk/model/VaultAccountsPagedResponseTest.java @@ -1536,9 +1673,13 @@ src/test/java/com/fireblocks/sdk/model/VaultActionStatusTest.java src/test/java/com/fireblocks/sdk/model/VaultAssetTest.java src/test/java/com/fireblocks/sdk/model/VaultWalletAddressTest.java src/test/java/com/fireblocks/sdk/model/VendorDtoTest.java +src/test/java/com/fireblocks/sdk/model/VersionTest.java src/test/java/com/fireblocks/sdk/model/WalletAssetAdditionalInfoTest.java src/test/java/com/fireblocks/sdk/model/WalletAssetTest.java -src/test/java/com/fireblocks/sdk/model/WithdrawRequestDtoTest.java +src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java +src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java +src/test/java/com/fireblocks/sdk/model/WebhookTest.java +src/test/java/com/fireblocks/sdk/model/WithdrawRequestTest.java 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 diff --git a/README.md b/README.md index 278929e..d090e68 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 6.0.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:6.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-6.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -148,10 +148,15 @@ Class | Method | HTTP request | Description *BlockchainsAssetsApi* | [**getSupportedAssets**](docs/BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks *BlockchainsAssetsApi* | [**registerNewAsset**](docs/BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset *BlockchainsAssetsApi* | [**setAssetPrice**](docs/BlockchainsAssetsApi.md#setAssetPrice) | **POST** /assets/prices/{id} | Set asset price +*BlockchainsAssetsBetaApi* | [**getAssetById**](docs/BlockchainsAssetsBetaApi.md#getAssetById) | **GET** /assets/{id} | Get an asset +*BlockchainsAssetsBetaApi* | [**getBlockchainById**](docs/BlockchainsAssetsBetaApi.md#getBlockchainById) | **GET** /blockchains/{id} | Get an blockchain +*BlockchainsAssetsBetaApi* | [**listAssets**](docs/BlockchainsAssetsBetaApi.md#listAssets) | **GET** /assets | List assets +*BlockchainsAssetsBetaApi* | [**listBlockchains**](docs/BlockchainsAssetsBetaApi.md#listBlockchains) | **GET** /blockchains | List blockchains *ComplianceApi* | [**getAmlPostScreeningPolicy**](docs/ComplianceApi.md#getAmlPostScreeningPolicy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy *ComplianceApi* | [**getAmlScreeningPolicy**](docs/ComplianceApi.md#getAmlScreeningPolicy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy *ComplianceApi* | [**getPostScreeningPolicy**](docs/ComplianceApi.md#getPostScreeningPolicy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy *ComplianceApi* | [**getScreeningPolicy**](docs/ComplianceApi.md#getScreeningPolicy) | **GET** /screening/travel_rule/screening_policy | Travel Rule - View Screening Policy +*ComplianceApi* | [**retryRejectedTransactionBypassScreeningChecks**](docs/ComplianceApi.md#retryRejectedTransactionBypassScreeningChecks) | **POST** /screening/transaction/{txId}/bypass_screening_policy | Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check *ComplianceApi* | [**updateAmlScreeningConfiguration**](docs/ComplianceApi.md#updateAmlScreeningConfiguration) | **PUT** /screening/aml/policy_configuration | Update AML Configuration *ComplianceApi* | [**updateScreeningConfiguration**](docs/ComplianceApi.md#updateScreeningConfiguration) | **PUT** /screening/configurations | Tenant - Screening Configuration *ComplianceApi* | [**updateTravelRuleConfig**](docs/ComplianceApi.md#updateTravelRuleConfig) | **PUT** /screening/travel_rule/policy_configuration | Update Travel Rule Configuration @@ -160,6 +165,7 @@ Class | Method | HTTP request | Description *ConsoleUserApi* | [**createConsoleUser**](docs/ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | Create console user *ConsoleUserApi* | [**getConsoleUsers**](docs/ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | Get console users *ContractInteractionsApi* | [**getDeployedContractAbi**](docs/ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI +*ContractInteractionsApi* | [**getTransactionReceipt**](docs/ContractInteractionsApi.md#getTransactionReceipt) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt | Get transaction receipt *ContractInteractionsApi* | [**readCallFunction**](docs/ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract *ContractInteractionsApi* | [**writeCallFunction**](docs/ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract *ContractTemplatesApi* | [**deleteContractTemplateById**](docs/ContractTemplatesApi.md#deleteContractTemplateById) | **DELETE** /tokenization/templates/{contractTemplateId} | Delete a contract template by id @@ -176,16 +182,23 @@ Class | Method | HTTP request | Description *ContractsApi* | [**getContract**](docs/ContractsApi.md#getContract) | **GET** /contracts/{contractId} | Find a specific contract *ContractsApi* | [**getContractAsset**](docs/ContractsApi.md#getContractAsset) | **GET** /contracts/{contractId}/{assetId} | Find a contract asset *ContractsApi* | [**getContracts**](docs/ContractsApi.md#getContracts) | **GET** /contracts | List contracts +*CosignersBetaApi* | [**addCosigner**](docs/CosignersBetaApi.md#addCosigner) | **POST** /cosigners | Add cosigner *CosignersBetaApi* | [**getApiKey**](docs/CosignersBetaApi.md#getApiKey) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Get API key *CosignersBetaApi* | [**getApiKeys**](docs/CosignersBetaApi.md#getApiKeys) | **GET** /cosigners/{cosignerId}/api_keys | Get all API keys *CosignersBetaApi* | [**getCosigner**](docs/CosignersBetaApi.md#getCosigner) | **GET** /cosigners/{cosignerId} | Get cosigner *CosignersBetaApi* | [**getCosigners**](docs/CosignersBetaApi.md#getCosigners) | **GET** /cosigners | Get all cosigners +*CosignersBetaApi* | [**getRequestStatus**](docs/CosignersBetaApi.md#getRequestStatus) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId} | Get request status +*CosignersBetaApi* | [**pairApiKey**](docs/CosignersBetaApi.md#pairApiKey) | **PUT** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Pair API key *CosignersBetaApi* | [**renameCosigner**](docs/CosignersBetaApi.md#renameCosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner +*CosignersBetaApi* | [**unpairApiKey**](docs/CosignersBetaApi.md#unpairApiKey) | **DELETE** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Unpair API key +*CosignersBetaApi* | [**updateCallbackHandler**](docs/CosignersBetaApi.md#updateCallbackHandler) | **PATCH** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Update API key callback handler *DeployedContractsApi* | [**addContractABI**](docs/DeployedContractsApi.md#addContractABI) | **POST** /tokenization/contracts/abi | Save contract ABI *DeployedContractsApi* | [**fetchContractAbi**](docs/DeployedContractsApi.md#fetchContractAbi) | **POST** /tokenization/contracts/fetch_abi | Fetch the contract ABI *DeployedContractsApi* | [**getDeployedContractByAddress**](docs/DeployedContractsApi.md#getDeployedContractByAddress) | **GET** /tokenization/contracts/{assetId}/{contractAddress} | Return deployed contract data *DeployedContractsApi* | [**getDeployedContractById**](docs/DeployedContractsApi.md#getDeployedContractById) | **GET** /tokenization/contracts/{id} | Return deployed contract data by id *DeployedContractsApi* | [**getDeployedContracts**](docs/DeployedContractsApi.md#getDeployedContracts) | **GET** /tokenization/contracts | List deployed contracts data +*EmbeddedWalletsApi* | [**getPublicKeyInfoForAddressNcw**](docs/EmbeddedWalletsApi.md#getPublicKeyInfoForAddressNcw) | **GET** /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info | Get the public key of an asset +*EmbeddedWalletsApi* | [**getPublicKeyInfoNcw**](docs/EmbeddedWalletsApi.md#getPublicKeyInfoNcw) | **GET** /ncw/{walletId}/public_key_info | Get the public key for a derivation path *ExchangeAccountsApi* | [**convertAssets**](docs/ExchangeAccountsApi.md#convertAssets) | **POST** /exchange_accounts/{exchangeAccountId}/convert | Convert exchange account funds from the source asset to the destination asset. *ExchangeAccountsApi* | [**getExchangeAccount**](docs/ExchangeAccountsApi.md#getExchangeAccount) | **GET** /exchange_accounts/{exchangeAccountId} | Find a specific exchange account *ExchangeAccountsApi* | [**getExchangeAccountAsset**](docs/ExchangeAccountsApi.md#getExchangeAccountAsset) | **GET** /exchange_accounts/{exchangeAccountId}/{assetId} | Find an asset for an exchange account @@ -230,6 +243,8 @@ Class | Method | HTTP request | Description *KeyLinkBetaApi* | [**getValidationKeysList**](docs/KeyLinkBetaApi.md#getValidationKeysList) | **GET** /key_link/validation_keys | Get list of registered validation keys *KeyLinkBetaApi* | [**setAgentId**](docs/KeyLinkBetaApi.md#setAgentId) | **PATCH** /key_link/signing_keys/{keyId}/agent_user_id | Set agent user id that can sign with the signing key identified by the Fireblocks provided `keyId` *KeyLinkBetaApi* | [**updateSigningKey**](docs/KeyLinkBetaApi.md#updateSigningKey) | **PATCH** /key_link/signing_keys/{keyId} | Modify the signing by Fireblocks provided `keyId` +*KeysBetaApi* | [**getMpcKeysList**](docs/KeysBetaApi.md#getMpcKeysList) | **GET** /keys/mpc/list | Get list of mpc keys +*KeysBetaApi* | [**getMpcKeysListByUser**](docs/KeysBetaApi.md#getMpcKeysListByUser) | **GET** /keys/mpc/list/{userId} | Get list of mpc keys by `userId` *NetworkConnectionsApi* | [**checkThirdPartyRouting**](docs/NetworkConnectionsApi.md#checkThirdPartyRouting) | **GET** /network_connections/{connectionId}/is_third_party_routing/{assetType} | Retrieve third-party network routing validation by asset type. *NetworkConnectionsApi* | [**createNetworkConnection**](docs/NetworkConnectionsApi.md#createNetworkConnection) | **POST** /network_connections | Creates a new network connection *NetworkConnectionsApi* | [**createNetworkId**](docs/NetworkConnectionsApi.md#createNetworkId) | **POST** /network_ids | Creates a new Network ID @@ -290,15 +305,19 @@ Class | Method | HTTP request | Description *SmartTransferApi* | [**setUserGroups**](docs/SmartTransferApi.md#setUserGroups) | **POST** /smart-transfers/settings/user-groups | Set user group *SmartTransferApi* | [**submitTicket**](docs/SmartTransferApi.md#submitTicket) | **PUT** /smart-transfers/{ticketId}/submit | Submit ticket *SmartTransferApi* | [**updateTicketTerm**](docs/SmartTransferApi.md#updateTicketTerm) | **PUT** /smart-transfers/{ticketId}/terms/{termId} | Update ticket leg (term) -*StakingBetaApi* | [**approveTermsOfServiceByProviderId**](docs/StakingBetaApi.md#approveTermsOfServiceByProviderId) | **POST** /staking/providers/{providerId}/approveTermsOfService | -*StakingBetaApi* | [**executeAction**](docs/StakingBetaApi.md#executeAction) | **POST** /staking/chains/{chainDescriptor}/{actionId} | -*StakingBetaApi* | [**getAllDelegations**](docs/StakingBetaApi.md#getAllDelegations) | **GET** /staking/positions | -*StakingBetaApi* | [**getChainInfo**](docs/StakingBetaApi.md#getChainInfo) | **GET** /staking/chains/{chainDescriptor}/chainInfo | -*StakingBetaApi* | [**getChains**](docs/StakingBetaApi.md#getChains) | **GET** /staking/chains | -*StakingBetaApi* | [**getDelegationById**](docs/StakingBetaApi.md#getDelegationById) | **GET** /staking/positions/{id} | -*StakingBetaApi* | [**getProviders**](docs/StakingBetaApi.md#getProviders) | **GET** /staking/providers | -*StakingBetaApi* | [**getSummary**](docs/StakingBetaApi.md#getSummary) | **GET** /staking/positions/summary | -*StakingBetaApi* | [**getSummaryByVault**](docs/StakingBetaApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | +*StakingApi* | [**approveTermsOfServiceByProviderId**](docs/StakingApi.md#approveTermsOfServiceByProviderId) | **POST** /staking/providers/{providerId}/approveTermsOfService | Approve staking terms of service +*StakingApi* | [**claimRewards**](docs/StakingApi.md#claimRewards) | **POST** /staking/chains/{chainDescriptor}/claim_rewards | Execute a Claim Rewards operation +*StakingApi* | [**getAllDelegations**](docs/StakingApi.md#getAllDelegations) | **GET** /staking/positions | List staking positions details +*StakingApi* | [**getChainInfo**](docs/StakingApi.md#getChainInfo) | **GET** /staking/chains/{chainDescriptor}/chainInfo | Get chain-specific staking summary +*StakingApi* | [**getChains**](docs/StakingApi.md#getChains) | **GET** /staking/chains | List staking supported chains +*StakingApi* | [**getDelegationById**](docs/StakingApi.md#getDelegationById) | **GET** /staking/positions/{id} | Get staking position details +*StakingApi* | [**getProviders**](docs/StakingApi.md#getProviders) | **GET** /staking/providers | List staking providers details +*StakingApi* | [**getSummary**](docs/StakingApi.md#getSummary) | **GET** /staking/positions/summary | Get staking summary details +*StakingApi* | [**getSummaryByVault**](docs/StakingApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | Get staking summary details by vault +*StakingApi* | [**split**](docs/StakingApi.md#split) | **POST** /staking/chains/{chainDescriptor}/split | Execute a Split operation on SOL/SOL_TEST stake account +*StakingApi* | [**stake**](docs/StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation +*StakingApi* | [**unstake**](docs/StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation +*StakingApi* | [**withdraw**](docs/StakingApi.md#withdraw) | **POST** /staking/chains/{chainDescriptor}/withdraw | Execute a Withdraw operation *TokenizationApi* | [**burnCollectionToken**](docs/TokenizationApi.md#burnCollectionToken) | **POST** /tokenization/collections/{id}/tokens/burn | Burn tokens *TokenizationApi* | [**createNewCollection**](docs/TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection *TokenizationApi* | [**fetchCollectionTokenDetails**](docs/TokenizationApi.md#fetchCollectionTokenDetails) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details @@ -369,6 +388,13 @@ Class | Method | HTTP request | Description *Web3ConnectionsApi* | [**submit**](docs/Web3ConnectionsApi.md#submit) | **PUT** /connections/wc/{id} | Respond to a pending Web3 connection request. *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend failed webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks +*WebhooksV2BetaApi* | [**createWebhook**](docs/WebhooksV2BetaApi.md#createWebhook) | **POST** /webhooks | Create new webhook +*WebhooksV2BetaApi* | [**deleteWebhook**](docs/WebhooksV2BetaApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook +*WebhooksV2BetaApi* | [**getNotification**](docs/WebhooksV2BetaApi.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id +*WebhooksV2BetaApi* | [**getNotifications**](docs/WebhooksV2BetaApi.md#getNotifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id +*WebhooksV2BetaApi* | [**getWebhook**](docs/WebhooksV2BetaApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id +*WebhooksV2BetaApi* | [**getWebhooks**](docs/WebhooksV2BetaApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks +*WebhooksV2BetaApi* | [**updateWebhook**](docs/WebhooksV2BetaApi.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook *WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status @@ -389,7 +415,9 @@ Class | Method | HTTP request | Description - [AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2](docs/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2.md) - [AddCollateralRequestBody](docs/AddCollateralRequestBody.md) - [AddContractAssetRequest](docs/AddContractAssetRequest.md) - - [AdditionalInfoDto](docs/AdditionalInfoDto.md) + - [AddCosignerRequest](docs/AddCosignerRequest.md) + - [AddCosignerResponse](docs/AddCosignerResponse.md) + - [AdditionalInfo](docs/AdditionalInfo.md) - [AmlRegistrationResult](docs/AmlRegistrationResult.md) - [AmlScreeningResult](docs/AmlScreeningResult.md) - [AmountAggregationTimePeriodMethod](docs/AmountAggregationTimePeriodMethod.md) @@ -400,17 +428,23 @@ Class | Method | HTTP request | Description - [AssetAlreadyExistHttpError](docs/AssetAlreadyExistHttpError.md) - [AssetAmount](docs/AssetAmount.md) - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) + - [AssetClassBeta](docs/AssetClassBeta.md) - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) - [AssetForbiddenErrorResponse](docs/AssetForbiddenErrorResponse.md) - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) + - [AssetMedia](docs/AssetMedia.md) + - [AssetMediaAttributes](docs/AssetMediaAttributes.md) + - [AssetMetadata](docs/AssetMetadata.md) + - [AssetMetadataBeta](docs/AssetMetadataBeta.md) - [AssetMetadataDto](docs/AssetMetadataDto.md) - [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md) + - [AssetOnchain](docs/AssetOnchain.md) + - [AssetOnchainBeta](docs/AssetOnchainBeta.md) - [AssetPriceForbiddenErrorResponse](docs/AssetPriceForbiddenErrorResponse.md) - [AssetPriceNotFoundErrorResponse](docs/AssetPriceNotFoundErrorResponse.md) - [AssetPriceResponse](docs/AssetPriceResponse.md) - [AssetResponse](docs/AssetResponse.md) - - [AssetResponseMetadata](docs/AssetResponseMetadata.md) - - [AssetResponseOnchain](docs/AssetResponseOnchain.md) + - [AssetResponseBeta](docs/AssetResponseBeta.md) - [AssetTypeResponse](docs/AssetTypeResponse.md) - [AssetWallet](docs/AssetWallet.md) - [AuditLogData](docs/AuditLogData.md) @@ -418,8 +452,18 @@ Class | Method | HTTP request | Description - [AuthorizationGroups](docs/AuthorizationGroups.md) - [AuthorizationInfo](docs/AuthorizationInfo.md) - [BlockInfo](docs/BlockInfo.md) + - [BlockchainExplorer](docs/BlockchainExplorer.md) + - [BlockchainMedia](docs/BlockchainMedia.md) + - [BlockchainMetadata](docs/BlockchainMetadata.md) + - [BlockchainNotFoundErrorResponse](docs/BlockchainNotFoundErrorResponse.md) + - [BlockchainOnchain](docs/BlockchainOnchain.md) + - [BlockchainResponse](docs/BlockchainResponse.md) + - [CallbackHandler](docs/CallbackHandler.md) + - [CallbackHandlerRequest](docs/CallbackHandlerRequest.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) - - [ChainInfoResponseDto](docs/ChainInfoResponseDto.md) + - [ChainDescriptor](docs/ChainDescriptor.md) + - [ChainInfoResponse](docs/ChainInfoResponse.md) + - [ClaimRewardsRequest](docs/ClaimRewardsRequest.md) - [CollectionBurnRequestDto](docs/CollectionBurnRequestDto.md) - [CollectionBurnResponseDto](docs/CollectionBurnResponseDto.md) - [CollectionDeployRequestDto](docs/CollectionDeployRequestDto.md) @@ -496,11 +540,12 @@ Class | Method | HTTP request | Description - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) + - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) - [DefaultNetworkRoutingDest](docs/DefaultNetworkRoutingDest.md) - - [DelegationDto](docs/DelegationDto.md) - - [DelegationSummaryDto](docs/DelegationSummaryDto.md) + - [Delegation](docs/Delegation.md) + - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) - [DeployedContractResponseDto](docs/DeployedContractResponseDto.md) @@ -544,8 +589,6 @@ Class | Method | HTTP request | Description - [ExchangeSettlementTransactionsResponse](docs/ExchangeSettlementTransactionsResponse.md) - [ExchangeTradingAccount](docs/ExchangeTradingAccount.md) - [ExchangeType](docs/ExchangeType.md) - - [ExecuteActionRequest](docs/ExecuteActionRequest.md) - - [ExecuteActionResponse](docs/ExecuteActionResponse.md) - [ExecutionConversionOperation](docs/ExecutionConversionOperation.md) - [ExecutionDisbursementOperation](docs/ExecutionDisbursementOperation.md) - [ExecutionOperationStatus](docs/ExecutionOperationStatus.md) @@ -553,6 +596,7 @@ Class | Method | HTTP request | Description - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) - [FeeInfo](docs/FeeInfo.md) + - [FeeLevel](docs/FeeLevel.md) - [FetchAbiRequestDto](docs/FetchAbiRequestDto.md) - [FiatAccount](docs/FiatAccount.md) - [FiatAccountType](docs/FiatAccountType.md) @@ -571,6 +615,7 @@ Class | Method | HTTP request | Description - [GetFilterParameter](docs/GetFilterParameter.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) + - [GetMpcKeysResponse](docs/GetMpcKeysResponse.md) - [GetNFTsResponse](docs/GetNFTsResponse.md) - [GetOtaStatusResponse](docs/GetOtaStatusResponse.md) - [GetOwnershipTokensResponse](docs/GetOwnershipTokensResponse.md) @@ -587,12 +632,15 @@ Class | Method | HTTP request | Description - [LeanAbiFunction](docs/LeanAbiFunction.md) - [LeanContractDto](docs/LeanContractDto.md) - [LeanDeployedContractResponseDto](docs/LeanDeployedContractResponseDto.md) + - [ListAssetsResponse](docs/ListAssetsResponse.md) + - [ListBlockchainsResponse](docs/ListBlockchainsResponse.md) - [ListOwnedCollectionsResponse](docs/ListOwnedCollectionsResponse.md) - [ListOwnedTokensResponse](docs/ListOwnedTokensResponse.md) - [MediaEntityResponse](docs/MediaEntityResponse.md) - [ModifySigningKeyAgentIdDto](docs/ModifySigningKeyAgentIdDto.md) - [ModifySigningKeyDto](docs/ModifySigningKeyDto.md) - [ModifyValidationKeyDto](docs/ModifyValidationKeyDto.md) + - [MpcKey](docs/MpcKey.md) - [NetworkChannel](docs/NetworkChannel.md) - [NetworkConnection](docs/NetworkConnection.md) - [NetworkConnectionResponse](docs/NetworkConnectionResponse.md) @@ -605,6 +653,10 @@ Class | Method | HTTP request | Description - [NetworkRecord](docs/NetworkRecord.md) - [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md) - [NotFoundException](docs/NotFoundException.md) + - [Notification](docs/Notification.md) + - [NotificationPaginatedResponse](docs/NotificationPaginatedResponse.md) + - [NotificationStatus](docs/NotificationStatus.md) + - [NotificationWithData](docs/NotificationWithData.md) - [OneTimeAddress](docs/OneTimeAddress.md) - [OneTimeAddressAccount](docs/OneTimeAddressAccount.md) - [OperationExecutionFailure](docs/OperationExecutionFailure.md) @@ -613,6 +665,8 @@ Class | Method | HTTP request | Description - [PaginatedAssetWalletResponse](docs/PaginatedAssetWalletResponse.md) - [PaginatedAssetWalletResponsePaging](docs/PaginatedAssetWalletResponsePaging.md) - [Paging](docs/Paging.md) + - [PairApiKeyRequest](docs/PairApiKeyRequest.md) + - [PairApiKeyResponse](docs/PairApiKeyResponse.md) - [Parameter](docs/Parameter.md) - [ParameterWithValue](docs/ParameterWithValue.md) - [PayeeAccount](docs/PayeeAccount.md) @@ -628,6 +682,7 @@ Class | Method | HTTP request | Description - [PayoutResponse](docs/PayoutResponse.md) - [PayoutState](docs/PayoutState.md) - [PayoutStatus](docs/PayoutStatus.md) + - [Players](docs/Players.md) - [PolicyAndValidationResponse](docs/PolicyAndValidationResponse.md) - [PolicyCheckResult](docs/PolicyCheckResult.md) - [PolicyMetadata](docs/PolicyMetadata.md) @@ -651,7 +706,7 @@ Class | Method | HTTP request | Description - [PolicyStatus](docs/PolicyStatus.md) - [PolicyValidation](docs/PolicyValidation.md) - [PreScreening](docs/PreScreening.md) - - [ProviderDto](docs/ProviderDto.md) + - [Provider](docs/Provider.md) - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) @@ -659,8 +714,8 @@ Class | Method | HTTP request | Description - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - - [RelatedRequestDto](docs/RelatedRequestDto.md) - - [RelatedTransactionDto](docs/RelatedTransactionDto.md) + - [RelatedRequest](docs/RelatedRequest.md) + - [RelatedTransaction](docs/RelatedTransaction.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) @@ -732,14 +787,18 @@ Class | Method | HTTP request | Description - [SmartTransferUpdateTicketTerm](docs/SmartTransferUpdateTicketTerm.md) - [SmartTransferUserGroups](docs/SmartTransferUserGroups.md) - [SmartTransferUserGroupsResponse](docs/SmartTransferUserGroupsResponse.md) - - [SolanaBlockchainDataDto](docs/SolanaBlockchainDataDto.md) + - [SolanaBlockchainData](docs/SolanaBlockchainData.md) - [SourceTransferPeerPath](docs/SourceTransferPeerPath.md) - [SourceTransferPeerPathResponse](docs/SourceTransferPeerPathResponse.md) - [SpamOwnershipResponse](docs/SpamOwnershipResponse.md) - [SpamTokenResponse](docs/SpamTokenResponse.md) + - [SplitRequest](docs/SplitRequest.md) + - [SplitResponse](docs/SplitResponse.md) - [SrcOrDestAttributesInner](docs/SrcOrDestAttributesInner.md) - - [StakeRequestDto](docs/StakeRequestDto.md) - - [StakeResponseDto](docs/StakeResponseDto.md) + - [StakeRequest](docs/StakeRequest.md) + - [StakeResponse](docs/StakeResponse.md) + - [StakingProvider](docs/StakingProvider.md) + - [Status](docs/Status.md) - [StellarRippleCreateParamsDto](docs/StellarRippleCreateParamsDto.md) - [SystemMessageInfo](docs/SystemMessageInfo.md) - [Task](docs/Task.md) @@ -748,6 +807,7 @@ Class | Method | HTTP request | Description - [ToCollateralTransaction](docs/ToCollateralTransaction.md) - [ToExchangeTransaction](docs/ToExchangeTransaction.md) - [TokenCollectionResponse](docs/TokenCollectionResponse.md) + - [TokenInfoNotFoundErrorResponse](docs/TokenInfoNotFoundErrorResponse.md) - [TokenLinkDto](docs/TokenLinkDto.md) - [TokenLinkDtoTokenMetadata](docs/TokenLinkDtoTokenMetadata.md) - [TokenLinkExistsHttpError](docs/TokenLinkExistsHttpError.md) @@ -761,6 +821,7 @@ Class | Method | HTTP request | Description - [Transaction](docs/Transaction.md) - [TransactionFee](docs/TransactionFee.md) - [TransactionOperation](docs/TransactionOperation.md) + - [TransactionReceiptResponse](docs/TransactionReceiptResponse.md) - [TransactionRequest](docs/TransactionRequest.md) - [TransactionRequestAmount](docs/TransactionRequestAmount.md) - [TransactionRequestDestination](docs/TransactionRequestDestination.md) @@ -802,14 +863,18 @@ Class | Method | HTTP request | Description - [TravelRuleValidateTransactionRequest](docs/TravelRuleValidateTransactionRequest.md) - [TravelRuleValidateTransactionResponse](docs/TravelRuleValidateTransactionResponse.md) - [TravelRuleVaspForVault](docs/TravelRuleVaspForVault.md) + - [TxLog](docs/TxLog.md) - [UnfreezeTransactionResponse](docs/UnfreezeTransactionResponse.md) - [UnmanagedWallet](docs/UnmanagedWallet.md) - [UnspentInput](docs/UnspentInput.md) - [UnspentInputsResponse](docs/UnspentInputsResponse.md) - - [UnstakeRequestDto](docs/UnstakeRequestDto.md) + - [UnstakeRequest](docs/UnstakeRequest.md) + - [UpdateCallbackHandlerRequest](docs/UpdateCallbackHandlerRequest.md) + - [UpdateCallbackHandlerResponse](docs/UpdateCallbackHandlerResponse.md) - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) + - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UserGroupCreateRequest](docs/UserGroupCreateRequest.md) - [UserGroupCreateResponse](docs/UserGroupCreateResponse.md) - [UserGroupResponse](docs/UserGroupResponse.md) @@ -821,7 +886,7 @@ Class | Method | HTTP request | Description - [ValidateAddressResponse](docs/ValidateAddressResponse.md) - [ValidatedTransactionsForRescan](docs/ValidatedTransactionsForRescan.md) - [ValidationKeyDto](docs/ValidationKeyDto.md) - - [ValidatorDto](docs/ValidatorDto.md) + - [Validator](docs/Validator.md) - [VaultAccount](docs/VaultAccount.md) - [VaultAccountsPagedResponse](docs/VaultAccountsPagedResponse.md) - [VaultAccountsPagedResponsePaging](docs/VaultAccountsPagedResponsePaging.md) @@ -829,9 +894,13 @@ Class | Method | HTTP request | Description - [VaultAsset](docs/VaultAsset.md) - [VaultWalletAddress](docs/VaultWalletAddress.md) - [VendorDto](docs/VendorDto.md) + - [Version](docs/Version.md) - [WalletAsset](docs/WalletAsset.md) - [WalletAssetAdditionalInfo](docs/WalletAssetAdditionalInfo.md) - - [WithdrawRequestDto](docs/WithdrawRequestDto.md) + - [Webhook](docs/Webhook.md) + - [WebhookEvent](docs/WebhookEvent.md) + - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) + - [WithdrawRequest](docs/WithdrawRequest.md) - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) - [WorkflowConfigurationId](docs/WorkflowConfigurationId.md) - [WorkflowExecutionOperation](docs/WorkflowExecutionOperation.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8656467..4e263fa 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -2407,28 +2407,44 @@ paths: /ncw/{walletId}/public_key_info: get: description: Gets the public key information based on derivation path and signing - algorithm. + algorithm within a Non-Custodial Wallet operationId: getPublicKeyInfoNcw parameters: - - explode: false + - description: The ID of the Non-Custodial wallet + explode: false in: path name: walletId required: true schema: + example: 550e8400-e29b-41d4-a716-446655440000 type: string style: simple - - explode: true + - description: "An array of integers (passed as JSON stringified array) representing\ + \ the full BIP44 derivation path of the requested public key. \nThe first\ + \ element must always be 44.\n" + example: + - 44 + - 0 + - 0 + - 0 + - 0 + explode: true in: query name: derivationPath required: true schema: type: string style: form - - explode: true + - description: Elliptic Curve + explode: true in: query name: algorithm required: true schema: + enum: + - MPC_ECDSA_SECP256K1 + - MPC_ECDSA_SECP256R1 + - MPC_EDDSA_ED25519 type: string style: form - explode: true @@ -2457,64 +2473,94 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get the public key information + summary: Get the public key for a derivation path tags: - Embedded Wallets - x-internal: true x-readme: code-samples: - - language: python - code: "pubKey = fireblocks.NCW.get_public_key_info(wallet_id, algorithm,\ - \ derivation_path, compressed)" - name: Fireblocks SDK Python example (Legacy) - language: javascript - code: | - const PublicKeyInfoArgs = { algorithm: 'MPC_ECDSA_SECP256K1', derivationPath: '[44,0,0,0,0]' } const pubKey = await fireblocks.NCW.getPublicKeyInfo(walletId, PublicKeyInfoArgs); + code: "const publicKeyInfoArgs = { \n algorithm: 'MPC_ECDSA_SECP256K1',\n\ + \ derivationPath: [44, 0, 0, 0, 0],\n compressed: true\n};\nconst pubKey\ + \ = await fireblocks.NCW.getPublicKeyInfo(walletId, publicKeyInfoArgs);\n" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.embeddedWallets.getPublicKeyInfoNcw(embeddedWalletsApiGetPublicKeyInfoNcwRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.embeddedWallets().getPublicKeyInfoNcw(walletId,\ + \ derivationPath, algorithm, compressed);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.embedded_wallets.get_public_key_info_ncw(wallet_id,\ + \ derivation_path, algorithm, compressed);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.embeddedWallets.getPublicKeyInfoNcw(embeddedWalletsApiGetPublicKeyInfoNcwRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.embeddedWallets().getPublicKeyInfoNcw(walletId,\ + \ derivationPath, algorithm, compressed);" + - lang: Python + source: "response = fireblocks.embedded_wallets.get_public_key_info_ncw(wallet_id,\ + \ derivation_path, algorithm, compressed);" x-accepts: application/json /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info: get: - description: Gets the public key information for the account asset. + description: Gets the public key of an asset associated with a specific account + within a Non-Custodial Wallet operationId: getPublicKeyInfoForAddressNcw parameters: - - explode: false + - description: The ID of the Non-Custodial wallet + explode: false in: path name: walletId required: true schema: + example: 550e8400-e29b-41d4-a716-446655440000 type: string style: simple - - explode: false + - description: The ID of the account + explode: false in: path name: accountId required: true schema: + example: "0" format: numeric type: string style: simple - - explode: false + - description: The ID of the asset + explode: false in: path name: assetId required: true schema: + example: BTC type: string x-fb-entity: asset style: simple - - explode: false + - description: BIP44 derivation path - change value + explode: false in: path name: change required: true schema: + example: 0 type: number style: simple - - explode: false + - description: BIP44 derivation path - index value + explode: false in: path name: addressIndex required: true schema: + example: 0 type: number style: simple - - explode: true + - description: Compressed/Uncompressed public key format + explode: true in: query name: compressed required: false @@ -2540,20 +2586,39 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get the public key for an account asset + summary: Get the public key of an asset tags: - Embedded Wallets - x-internal: true x-readme: code-samples: - - language: python - code: "pubKey = fireblocks.NCW.get_public_key_info_by_account_asset(wallet_id,\ - \ asset_id, account_id, change, address_index, compressed)" - name: Fireblocks SDK Python example (Legacy) - language: javascript - code: | - const PublicKeyInfoByAccountAssetArgs = { assetId: 'ETH', accountId: 0, change: 0, addressIndex: 0, compressed: true } const pubKey = await fireblocks.NCW.getPublicKeyInfoByAccountAsset(walletId, PublicKeyInfoByAccountAssetArgs); + code: "const publicKeyInfoByAccountAssetArgs = {\n assetId: 'ETH',\n accountId:\ + \ 0,\n change: 0,\n addressIndex: 0,\n compressed: true\n}; \ + \ \nconst pubKey = await fireblocks.NCW.getPublicKeyInfoByAccountAsset(walletId,\ + \ publicKeyInfoByAccountAssetArgs);\n" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.embeddedWallets.getPublicKeyInfoForAddressNcw(embeddedWalletsApiGetPublicKeyInfoForAddressNcwRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.embeddedWallets().getPublicKeyInfoForAddressNcw(walletId,\ + \ accountId, assetId, change, addressIndex, compressed);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.embedded_wallets.get_public_key_info_for_address_ncw(wallet_id,\ + \ account_id, asset_id, change, address_index, compressed);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.embeddedWallets.getPublicKeyInfoForAddressNcw(embeddedWalletsApiGetPublicKeyInfoForAddressNcwRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.embeddedWallets().getPublicKeyInfoForAddressNcw(walletId,\ + \ accountId, assetId, change, addressIndex, compressed);" + - lang: Python + source: "response = fireblocks.embedded_wallets.get_public_key_info_for_address_ncw(wallet_id,\ + \ account_id, asset_id, change, address_index, compressed);" x-accepts: application/json /workspace/freeze: post: @@ -5799,6 +5864,116 @@ paths: \ key_id);" x-content-type: application/json x-accepts: application/json + /keys/mpc/list: + get: + description: "Returns a list of MPC signing keys of the workspace. For each\ + \ key, the list of players associated with it is attached.\n**Note:** \nThis\ + \ endpoint is currently in beta and might be subject to changes." + operationId: getMpcKeysList + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetMpcKeysResponse' + description: List of mpc keys + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get list of mpc keys + tags: + - Keys (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.keysBeta.getMpcKeysList();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.keysBeta().getMpcKeysList(); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.keys_beta.get_mpc_keys_list(); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.keysBeta.getMpcKeysList();" + - lang: Java + source: CompletableFuture> response = fireblocks.keysBeta().getMpcKeysList(); + - lang: Python + source: response = fireblocks.keys_beta.get_mpc_keys_list(); + x-accepts: application/json + /keys/mpc/list/{userId}: + get: + description: |- + Returns a list of MPC signing keys of a specific user. For each key, the list of players associated with it is attached. + **Note:** + This endpoint is currently in beta and might be subject to changes. + operationId: getMpcKeysListByUser + parameters: + - description: The id for the user + example: 46a92767-5f93-4a46-9eed-f012196bb4fc + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetMpcKeysResponse' + description: List of mpc keys + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get list of mpc keys by `userId` + tags: + - Keys (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.keysBeta.getMpcKeysListByUser(keysBetaApiGetMpcKeysListByUserRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.keysBeta().getMpcKeysListByUser(userId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.keys_beta.get_mpc_keys_list_by_user(user_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.keysBeta.getMpcKeysListByUser(keysBetaApiGetMpcKeysListByUserRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.keysBeta().getMpcKeysListByUser(userId); + - lang: Python + source: response = fireblocks.keys_beta.get_mpc_keys_list_by_user(user_id); + x-accepts: application/json /external_wallets: get: description: Gets a list of external wallets under the workspace. @@ -6846,6 +7021,150 @@ paths: source: response = fireblocks.blockchains_&_assets.get_supported_assets(); x-accepts: application/json /assets: + get: + description: | + Returns all asset type supported by Fireblocks.
+ + **Note**: + - This endpoint is now in Beta, disabled for general availability at this time. + operationId: listAssets + parameters: + - description: Blockchain id of the assets + example: 0f672204-a28b-464a-b318-a387abd3d3c7 + explode: true + in: query + name: blockchainId + required: false + schema: + type: string + style: form + - description: Assets class + explode: true + in: query + name: assetClass + required: false + schema: + $ref: '#/components/schemas/AssetClassBeta' + style: form + - description: Assets onchain symbol + example: ETH + explode: true + in: query + name: symbol + required: false + schema: + minLength: 1 + type: string + style: form + - description: Scope of the assets + example: Global + explode: true + in: query + name: scope + required: false + schema: + enum: + - Global + - Local + type: string + style: form + - description: Are assets deprecated + example: false + explode: true + in: query + name: deprecated + required: false + schema: + type: boolean + style: form + - description: Next page cursor to fetch + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Items per page + example: 500 + explode: true + in: query + name: pageSize + required: false + schema: + default: 500 + maximum: 1000 + minimum: 100 + type: number + style: form + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListAssetsResponse' + description: List of assets + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInternalServerErrorResponse' + description: Error occurred while listing assets + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List assets + tags: + - Blockchains & assets (Beta) + x-readme: + code-samples: + - language: python + code: assets = fireblocks.listAssets(filters) + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: const assets = await fireblocks.listAssets(filters); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.blockchainsAssetsBeta.listAssets(blockchainsAssetsBetaApiListAssetsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listAssets(blockchainId,\ + \ assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.blockchains_&_assets_beta.list_assets(blockchain_id,\ + \ asset_class, symbol, scope, deprecated, page_cursor, page_size, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.blockchainsAssetsBeta.listAssets(blockchainsAssetsBetaApiListAssetsRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listAssets(blockchainId,\ + \ assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey);" + - lang: Python + source: "response = fireblocks.blockchains_&_assets_beta.list_assets(blockchain_id,\ + \ asset_class, symbol, scope, deprecated, page_cursor, page_size, idempotency_key);" + x-accepts: application/json post: description: | Register a new asset to a workspace and return the newly created asset's details. Currently supported chains are: @@ -6912,7 +7231,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AssetNotFoundErrorResponse' + $ref: '#/components/schemas/TokenInfoNotFoundErrorResponse' description: | - Invalid address, could not get asset information. Error code 1003 "409": @@ -6930,6 +7249,15 @@ paths: schema: $ref: '#/components/schemas/AssetInternalServerErrorResponse' description: Failed to create asset + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' summary: Register an asset tags: - Blockchains & assets @@ -6965,13 +7293,109 @@ paths: \ idempotency_key);" x-content-type: application/json x-accepts: application/json - /assets/prices/{id}: - post: + /assets/{id}: + get: description: | - Set asset price for the given asset id. Returns the asset price response. - operationId: setAssetPrice - parameters: - - description: The ID of the asset + Returns an asset by ID or legacyID.
+ + **Note**: + - This endpoint is now in Beta, disabled for general availability at this time. + operationId: getAssetById + parameters: + - description: The ID or legacyId of the asset + example: ETH + explode: false + in: path + name: id + required: true + schema: + type: string + x-fb-entity: asset + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetResponseBeta' + description: Asset with requested identification + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetNotFoundErrorResponse' + description: | + - Asset with specified ID or legacy ID is not found. Error code 1504 + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInternalServerErrorResponse' + description: Error occurred while getting an asset + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get an asset + tags: + - Blockchains & assets (Beta) + x-readme: + code-samples: + - language: python + code: asset = fireblocks.getAssetById(assetId) + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: const asset = await fireblocks.getAssetById(assetId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.blockchainsAssetsBeta.getAssetById(blockchainsAssetsBetaApiGetAssetByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getAssetById(id,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.blockchains_&_assets_beta.get_asset_by_id(id,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.blockchainsAssetsBeta.getAssetById(blockchainsAssetsBetaApiGetAssetByIdRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getAssetById(id,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.blockchains_&_assets_beta.get_asset_by_id(id,\ + \ idempotency_key);" + x-accepts: application/json + /assets/prices/{id}: + post: + description: | + Set asset price for the given asset id. Returns the asset price response. + operationId: setAssetPrice + parameters: + - description: The ID of the asset example: ETH explode: false in: path @@ -7062,6 +7486,201 @@ paths: \ idempotency_key);" x-content-type: application/json x-accepts: application/json + /blockchains: + get: + description: | + Returns all blockchains supported by Fireblocks.
+ + **Note**: + - This endpoint is now in Beta, disabled for general availability at this time. + operationId: listBlockchains + parameters: + - description: Blockchain protocol + example: SOL + explode: true + in: query + name: protocol + required: false + schema: + type: string + style: form + - description: Is blockchain deprecated + example: false + explode: true + in: query + name: deprecated + required: false + schema: + type: boolean + style: form + - description: Is test blockchain + example: false + explode: true + in: query + name: test + required: false + schema: + type: boolean + style: form + - description: Page cursor to fetch + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Items per page (max 500) + example: 500 + explode: true + in: query + name: pageSize + required: false + schema: + default: 500 + maximum: 500 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListBlockchainsResponse' + description: List of supported blockchains + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInternalServerErrorResponse' + description: Error occurred while listing blockchains + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List blockchains + tags: + - Blockchains & assets (Beta) + x-readme: + code-samples: + - language: python + code: blockchains = fireblocks.listBlockchains(filters) + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: const blockchains = await fireblocks.listBlockchains(filters); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.blockchainsAssetsBeta.listBlockchains(blockchainsAssetsBetaApiListBlockchainsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.blockchainsAssetsBeta().listBlockchains(protocol, deprecated,\ + \ test, pageCursor, pageSize);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.blockchains_&_assets_beta.list_blockchains(protocol,\ + \ deprecated, test, page_cursor, page_size);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.blockchainsAssetsBeta.listBlockchains(blockchainsAssetsBetaApiListBlockchainsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.blockchainsAssetsBeta().listBlockchains(protocol, deprecated,\ + \ test, pageCursor, pageSize);" + - lang: Python + source: "response = fireblocks.blockchains_&_assets_beta.list_blockchains(protocol,\ + \ deprecated, test, page_cursor, page_size);" + x-accepts: application/json + /blockchains/{id}: + get: + description: | + Returns an blockchain by ID or legacyID.
+ + **Note**: + - This endpoint is now in Beta, disabled for general availability at this time. + operationId: getBlockchainById + parameters: + - description: The ID or legacyId of the blockchain + example: ETH + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/BlockchainResponse' + description: Blockchain with requested identification + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/BlockchainNotFoundErrorResponse' + description: | + - Blockchain with specified ID or legacy ID is not found. Error code 1505 + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInternalServerErrorResponse' + description: Error occurred while getting an blockchain + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get an blockchain + tags: + - Blockchains & assets (Beta) + x-readme: + code-samples: + - language: python + code: blockchain = fireblocks.getBlockchainById(blockchainId) + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: const blockchain = await fireblocks.getBlockchainById(blockchainId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.blockchainsAssetsBeta.getBlockchainById(blockchainsAssetsBetaApiGetBlockchainByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getBlockchainById(id); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.blockchains_&_assets_beta.get_blockchain_by_id(id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.blockchainsAssetsBeta.getBlockchainById(blockchainsAssetsBetaApiGetBlockchainByIdRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getBlockchainById(id); + - lang: Python + source: response = fireblocks.blockchains_&_assets_beta.get_blockchain_by_id(id); + x-accepts: application/json /transactions: get: description: Lists the transaction history for your workspace. @@ -10114,35 +10733,27 @@ paths: \ tx_id, idempotency_key);" x-content-type: application/json x-accepts: application/json - /tokenization/templates: + /webhooks: get: - description: Return minimal representation of all the contract templates available - for the workspace - operationId: getContractTemplates + description: | + Get all webhooks (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getWebhooks parameters: - - description: Items per page (max 100) - explode: true - in: query - name: limit - required: false - schema: - default: 100 - maximum: 100 - minimum: 1 - type: number - style: form - - description: Paging offset + - description: ASC / DESC ordering (default DESC) explode: true in: query - name: offset + name: order required: false schema: - default: 0 - minimum: 0 - type: number + default: DESC + enum: + - ASC + - DESC + example: ASC + type: string style: form - - description: Page cursor to get the next page - example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + - description: Cursor of the required page explode: true in: query name: pageCursor @@ -10150,15 +10761,572 @@ paths: schema: type: string style: form - - description: "Number of items per page, requesting more then max will return\ - \ max items" - example: 10 + - description: Maximum number of items in the page explode: true in: query name: pageSize required: false schema: - maximum: 100 + default: 10 + example: 10 + maximum: 100 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WebhookPaginatedResponse' + description: A paginated response containing WebhookDto objects + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get all webhooks + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2Beta.getWebhooks(webhooksV2BetaApiGetWebhooksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2Beta().getWebhooks(order, pageCursor, pageSize);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2_beta.get_webhooks(order, page_cursor,\ + \ page_size);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2Beta.getWebhooks(webhooksV2BetaApiGetWebhooksRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2Beta().getWebhooks(order, pageCursor, pageSize);" + - lang: Python + source: "response = fireblocks.webhooks_v2_beta.get_webhooks(order, page_cursor,\ + \ page_size);" + x-accepts: application/json + post: + description: | + Creates a new webhook, which will be triggered on the specified events + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: createWebhook + parameters: + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWebhookRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + description: created new webhook successfully + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Create new webhook + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2Beta.createWebhook(webhooksV2BetaApiCreateWebhookRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.webhooksV2Beta().createWebhook(createWebhookRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2_beta.create_webhook(create_webhook_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2Beta.createWebhook(webhooksV2BetaApiCreateWebhookRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.webhooksV2Beta().createWebhook(createWebhookRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.webhooks_v2_beta.create_webhook(create_webhook_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /webhooks/{webhookId}: + delete: + description: | + Delete a webhook by its id + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: deleteWebhook + parameters: + - description: The unique identifier of the webhook + explode: false + in: path + name: webhookId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + description: Deleted webhook object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Delete webhook + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2Beta.deleteWebhook(webhooksV2BetaApiDeleteWebhookRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.webhooksV2Beta().deleteWebhook(webhookId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.webhooks_v2_beta.delete_webhook(webhook_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2Beta.deleteWebhook(webhooksV2BetaApiDeleteWebhookRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.webhooksV2Beta().deleteWebhook(webhookId); + - lang: Python + source: response = fireblocks.webhooks_v2_beta.delete_webhook(webhook_id); + x-accepts: application/json + get: + description: | + Retrieve a webhook by its id + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getWebhook + parameters: + - description: The unique identifier of the webhook + explode: false + in: path + name: webhookId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + description: A webhook object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get webhook by id + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2Beta.getWebhook(webhooksV2BetaApiGetWebhookRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhook(webhookId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.webhooks_v2_beta.get_webhook(webhook_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2Beta.getWebhook(webhooksV2BetaApiGetWebhookRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhook(webhookId); + - lang: Python + source: response = fireblocks.webhooks_v2_beta.get_webhook(webhook_id); + x-accepts: application/json + patch: + description: | + Update a webhook by its id + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: updateWebhook + parameters: + - description: The unique identifier of the webhook + explode: false + in: path + name: webhookId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateWebhookRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Webhook' + description: Updated webhook object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update webhook + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2Beta.updateWebhook(webhooksV2BetaApiUpdateWebhookRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.webhooksV2Beta().updateWebhook(updateWebhookRequest,\ + \ webhookId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2_beta.update_webhook(update_webhook_request,\ + \ webhook_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2Beta.updateWebhook(webhooksV2BetaApiUpdateWebhookRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.webhooksV2Beta().updateWebhook(updateWebhookRequest,\ + \ webhookId);" + - lang: Python + source: "response = fireblocks.webhooks_v2_beta.update_webhook(update_webhook_request,\ + \ webhook_id);" + x-content-type: application/json + x-accepts: application/json + /webhooks/{webhookId}/notifications: + get: + description: | + Get all notifications by webhook id (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getNotifications + parameters: + - explode: false + in: path + name: webhookId + required: true + schema: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + style: simple + - description: ASC / DESC ordering (default DESC) + explode: true + in: query + name: order + required: false + schema: + default: DESC + enum: + - ASC + - DESC + example: ASC + type: string + style: form + - description: Cursor of the required page + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Maximum number of items in the page + explode: true + in: query + name: pageSize + required: false + schema: + default: 100 + example: 10 + maximum: 100 + minimum: 1 + type: number + style: form + - description: sort by start date + explode: true + in: query + name: createdStartDate + required: false + schema: + example: 2024-09-24T09:14:38.356Z + type: string + style: form + - description: sort by end date + explode: true + in: query + name: createdEndDate + required: false + schema: + example: 2024-09-24T09:14:38.356Z + type: string + style: form + - description: Filter by Notification statues + explode: true + in: query + name: statuses + required: false + schema: + example: COMPLETED + items: + $ref: '#/components/schemas/NotificationStatus' + type: array + style: form + - description: Filter by Notification eventTypes + explode: true + in: query + name: eventTypes + required: false + schema: + example: + - transaction.created + - transaction.status.updated + items: + $ref: '#/components/schemas/WebhookEvent' + type: array + style: form + - description: Filter by resourceId + explode: true + in: query + name: resourceId + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationPaginatedResponse' + description: A paginated response containing NotificationExternalDTO objects + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get all notifications by webhook id + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2Beta.getNotifications(webhooksV2BetaApiGetNotificationsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.webhooksV2Beta().getNotifications(webhookId, order, pageCursor,\ + \ pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2_beta.get_notifications(webhook_id,\ + \ order, page_cursor, page_size, created_start_date, created_end_date,\ + \ statuses, event_types, resource_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2Beta.getNotifications(webhooksV2BetaApiGetNotificationsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.webhooksV2Beta().getNotifications(webhookId, order, pageCursor,\ + \ pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId);" + - lang: Python + source: "response = fireblocks.webhooks_v2_beta.get_notifications(webhook_id,\ + \ order, page_cursor, page_size, created_start_date, created_end_date, statuses,\ + \ event_types, resource_id);" + x-accepts: application/json + /webhooks/{webhookId}/notifications/{notificationId}: + get: + description: | + Get notification by id + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getNotification + parameters: + - description: Include the data of the notification + explode: true + in: query + name: includeData + required: false + schema: + type: boolean + style: form + - description: The ID of the webhook to fetch + explode: false + in: path + name: webhookId + required: true + schema: + type: string + style: simple + - description: The ID of the notification to fetch + explode: false + in: path + name: notificationId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationWithData' + description: OK + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get notification by id + tags: + - Webhooks V2 (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2Beta.getNotification(webhooksV2BetaApiGetNotificationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.webhooksV2Beta().getNotification(webhookId,\ + \ notificationId, includeData);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2_beta.get_notification(webhook_id,\ + \ notification_id, include_data);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2Beta.getNotification(webhooksV2BetaApiGetNotificationRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.webhooksV2Beta().getNotification(webhookId,\ + \ notificationId, includeData);" + - lang: Python + source: "response = fireblocks.webhooks_v2_beta.get_notification(webhook_id,\ + \ notification_id, include_data);" + x-accepts: application/json + /tokenization/templates: + get: + description: Return minimal representation of all the contract templates available + for the workspace + operationId: getContractTemplates + parameters: + - description: Items per page (max 100) + explode: true + in: query + name: limit + required: false + schema: + default: 100 + maximum: 100 + minimum: 1 + type: number + style: form + - description: Paging offset + explode: true + in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + type: number + style: form + - description: Page cursor to get the next page + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: "Number of items per page, requesting more then max will return\ + \ max items" + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 minimum: 1 type: number style: form @@ -12157,126 +13325,511 @@ paths: \ contract_address, base_asset_id, idempotency_key);" x-content-type: application/json x-accepts: application/json - /staking/chains: - get: - description: Return an alphabetical list of supported chains. - operationId: getChains - parameters: [] + /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt: + get: + description: Retrieve the transaction receipt by blockchain native asset ID + and transaction hash + operationId: getTransactionReceipt + parameters: + - description: The blockchain base assetId + example: ETH_TEST6 + explode: false + in: path + name: baseAssetId + required: true + schema: + type: string + style: simple + - description: The transaction hash + example: 0x3b015ca0518c55d7bff4e3f5aa5d0431705771553ba8a95cf20e34cb597f57f6 + explode: false + in: path + name: txHash + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionReceiptResponse' + description: Retrieved The Transaction Receipt Successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get transaction receipt + tags: + - Contract Interactions + x-readme: + code-samples: + - language: python + code: "transaction_receipt = fireblocks.get_transaction_receipt(base_asset_id,\ + \ tx_hash)" + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: "const transactionReceipt = await fireblocks.getTransactionReceipt(baseAssetId,\ + \ txHash);" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.getTransactionReceipt(contractInteractionsApiGetTransactionReceiptRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId,\ + \ txHash);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.contract_interactions.get_transaction_receipt(base_asset_id,\ + \ tx_hash);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.contractInteractions.getTransactionReceipt(contractInteractionsApiGetTransactionReceiptRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId,\ + \ txHash);" + - lang: Python + source: "response = fireblocks.contract_interactions.get_transaction_receipt(base_asset_id,\ + \ tx_hash);" + x-accepts: application/json + /staking/chains: + get: + description: Return an alphabetical list of supported chains. + operationId: getChains + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StakingGetChainsResponse' + description: An array of supported chains was returned successfully + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List staking supported chains + tags: + - Staking + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.staking.getChains();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture>> response = fireblocks.staking().getChains(); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.staking.get_chains(); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.staking.getChains();" + - lang: Java + source: CompletableFuture>> response = fireblocks.staking().getChains(); + - lang: Python + source: response = fireblocks.staking.get_chains(); + x-accepts: application/json + /staking/chains/{chainDescriptor}/chainInfo: + get: + description: "Return chain-specific, staking-related information summary (e.g.\ + \ epoch details, lockup durations, estimated rewards, etc.)" + operationId: getChainInfo + parameters: + - description: The protocol identifier (e.g. "ETH"/"SOL"/"MATIC"/"STETH_ETH") + to use + example: SOL + explode: false + in: path + name: chainDescriptor + required: true + schema: + $ref: '#/components/schemas/ChainDescriptor' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ChainInfoResponse' + description: Chain specific info summary was returned successfully + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get chain-specific staking summary + tags: + - Staking + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.staking.getChainInfo(stakingApiGetChainInfoRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.staking().getChainInfo(chainDescriptor); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.staking.get_chain_info(chain_descriptor); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.staking.getChainInfo(stakingApiGetChainInfoRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.staking().getChainInfo(chainDescriptor); + - lang: Python + source: response = fireblocks.staking.get_chain_info(chain_descriptor); + x-accepts: application/json + /staking/chains/{chainDescriptor}/stake: + post: + description: Perform a chain-specific Stake. + operationId: stake + parameters: + - description: The protocol identifier (e.g. "ETH"/"SOL"/"MATIC") to use + example: SOL + explode: false + in: path + name: chainDescriptor + required: true + schema: + $ref: '#/components/schemas/ChainDescriptor' + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StakeRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/StakeResponse' + description: Stake action has been executed successfully on vault and is + associated with 201 status code. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Initiate Stake Operation + tags: + - Staking + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.staking.stake(stakingApiStakeRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.staking().stake(stakeRequest,\ + \ chainDescriptor, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.staking.stake(stake_request, chain_descriptor,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.staking.stake(stakingApiStakeRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.staking().stake(stakeRequest,\ + \ chainDescriptor, idempotencyKey);" + - lang: Python + source: "response = fireblocks.staking.stake(stake_request, chain_descriptor,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /staking/chains/{chainDescriptor}/unstake: + post: + description: Execute an Unstake operation + operationId: unstake + parameters: + - description: The protocol identifier (e.g. "ETH"/"SOL"/"MATIC") to use + example: SOL + explode: false + in: path + name: chainDescriptor + required: true + schema: + $ref: '#/components/schemas/ChainDescriptor' + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnstakeRequest' + required: true + responses: + "201": + description: Unstake action has been executed successfully on vault and + is associated with 201 status code. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Execute an Unstake operation + tags: + - Staking + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.staking.unstake(stakingApiUnstakeRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.staking().unstake(unstakeRequest,\ + \ chainDescriptor, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.staking.unstake(unstake_request, chain_descriptor,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.staking.unstake(stakingApiUnstakeRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.staking().unstake(unstakeRequest,\ + \ chainDescriptor, idempotencyKey);" + - lang: Python + source: "response = fireblocks.staking.unstake(unstake_request, chain_descriptor,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /staking/chains/{chainDescriptor}/withdraw: + post: + description: Perform a chain-specific Withdraw. + operationId: withdraw + parameters: + - description: The protocol identifier (e.g. "ETH"/"SOL"/"MATIC") to use + example: SOL + explode: false + in: path + name: chainDescriptor + required: true + schema: + $ref: '#/components/schemas/ChainDescriptor' + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WithdrawRequest' + required: true responses: - "200": + "201": + description: Withdraw action has been executed successfully on vault and + is associated with 201 status code. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: - example: - - ETH - - SOL schema: - $ref: '#/components/schemas/StakingGetChainsResponse' - description: "" - summary: "" + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Execute a Withdraw operation tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getChains();" + code: "const response: Promise> = fireblocks.staking.withdraw(stakingApiWithdrawRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture>> response = fireblocks.stakingBeta().getChains(); + code: "CompletableFuture> response = fireblocks.staking().withdraw(withdrawRequest,\ + \ chainDescriptor, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_chains(); + code: "response = fireblocks.staking.withdraw(withdraw_request, chain_descriptor,\ + \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.stakingBeta.getChains();" + source: "const response: Promise> = fireblocks.staking.withdraw(stakingApiWithdrawRequest);" - lang: Java - source: CompletableFuture>> response = fireblocks.stakingBeta().getChains(); + source: "CompletableFuture> response = fireblocks.staking().withdraw(withdrawRequest,\ + \ chainDescriptor, idempotencyKey);" - lang: Python - source: response = fireblocks.staking_beta.get_chains(); + source: "response = fireblocks.staking.withdraw(withdraw_request, chain_descriptor,\ + \ idempotency_key);" + x-content-type: application/json x-accepts: application/json - /staking/chains/{chainDescriptor}/chainInfo: - get: - description: "Return chain-specific, staking-related information summary (e.g.\ - \ epoch details, lockup durations, estimated rewards, etc.)" - operationId: getChainInfo + /staking/chains/{chainDescriptor}/claim_rewards: + post: + description: Perform a chain-specific Claim Rewards. + operationId: claimRewards parameters: - - description: The protocol identifier (e.g. "ETH"/"SOL") to use + - description: The protocol identifier (e.g. "MATIC"/"SOL") to use + example: MATIC explode: false in: path name: chainDescriptor required: true schema: enum: - - ETH + - MATIC - SOL - - ETH_TEST3 - SOL_TEST type: string style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClaimRewardsRequest' + required: true responses: - "200": + "201": + description: Claim Rewards action has been executed successfully on vault + and is associated with 201 status code. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/ChainInfoResponseDto' - description: Chain specific info summary was returned successfully - summary: "" + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Execute a Claim Rewards operation tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getChainInfo(stakingBetaApiGetChainInfoRequest);" + code: "const response: Promise> = fireblocks.staking.claimRewards(stakingApiClaimRewardsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); + code: "CompletableFuture> response = fireblocks.staking().claimRewards(claimRewardsRequest,\ + \ chainDescriptor, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_chain_info(chain_descriptor); + code: "response = fireblocks.staking.claim_rewards(claim_rewards_request,\ + \ chain_descriptor, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.stakingBeta.getChainInfo(stakingBetaApiGetChainInfoRequest);" + source: "const response: Promise> = fireblocks.staking.claimRewards(stakingApiClaimRewardsRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); + source: "CompletableFuture> response = fireblocks.staking().claimRewards(claimRewardsRequest,\ + \ chainDescriptor, idempotencyKey);" - lang: Python - source: response = fireblocks.staking_beta.get_chain_info(chain_descriptor); + source: "response = fireblocks.staking.claim_rewards(claim_rewards_request,\ + \ chain_descriptor, idempotency_key);" + x-content-type: application/json x-accepts: application/json - /staking/chains/{chainDescriptor}/{actionId}: + /staking/chains/{chainDescriptor}/split: post: - description: "Perform a chain-specific staking action (e.g. stake, unstake,\ - \ withdraw)." - operationId: executeAction + description: Perform a Solana Split stake account. + operationId: split parameters: - - description: The protocol identifier (e.g. "ETH"/"SOL") to use + - description: The protocol identifier (e.g. "SOL"/"SOL_TEST") to use + example: SOL explode: false in: path name: chainDescriptor required: true schema: enum: - - ETH - SOL - - ETH_TEST3 - SOL_TEST type: string style: simple - - description: The operation that can be executed on a vault/position - explode: false - in: path - name: actionId - required: true - schema: - enum: - - stake - - unstake - - withdraw - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -12291,76 +13844,54 @@ paths: requestBody: content: application/json: - examples: - stake: - value: - vaultAccountId: "22" - providerId: kiln - stakeAmount: "32" - chainDescriptor: ETH - txNote: stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 - of 32ETH created on 02.04.23 - feeLevel: MEDIUM - unstake: - value: - id: b70701f4-d7b1-4795-a8ee-b09cdb5b850b - txNote: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ - \ #ETH" - feeLevel: MEDIUM - withdraw: - value: - id: b70701f4-d7b1-4795-a8ee-b09cdb5b850c - txNote: "withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ - \ #ETH" - feeLevel: MEDIUM schema: - $ref: '#/components/schemas/ExecuteActionRequest' + $ref: '#/components/schemas/SplitRequest' required: true responses: "201": content: application/json: - examples: - stake: - value: - id: afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8 - unstake: - value: {} - withdraw: - value: {} schema: - $ref: '#/components/schemas/ExecuteActionResponse' - description: A chain-specific action has been executed successfully on vault/position - and is associated with 201 status code. - summary: "" + $ref: '#/components/schemas/SplitResponse' + description: Split action has been executed successfully on vault and is + associated with 201 status code. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Execute a Split operation on SOL/SOL_TEST stake account tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.executeAction(stakingBetaApiExecuteActionRequest);" + code: "const response: Promise> = fireblocks.staking.split(stakingApiSplitRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response =\ - \ fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor,\ - \ actionId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.staking().split(splitRequest,\ + \ chainDescriptor, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.staking_beta.execute_action(execute_action_request,\ - \ chain_descriptor, action_id, idempotency_key);" + code: "response = fireblocks.staking.split(split_request, chain_descriptor,\ + \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.stakingBeta.executeAction(stakingBetaApiExecuteActionRequest);" + source: "const response: Promise> = fireblocks.staking.split(stakingApiSplitRequest);" - lang: Java - source: "CompletableFuture> response =\ - \ fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor,\ - \ actionId, idempotencyKey);" + source: "CompletableFuture> response = fireblocks.staking().split(splitRequest,\ + \ chainDescriptor, idempotencyKey);" - lang: Python - source: "response = fireblocks.staking_beta.execute_action(execute_action_request,\ - \ chain_descriptor, action_id, idempotency_key);" + source: "response = fireblocks.staking.split(split_request, chain_descriptor,\ + \ idempotency_key);" x-content-type: application/json x-accepts: application/json /staking/positions: @@ -12369,15 +13900,16 @@ paths: \ the staked amount, rewards, status and more." operationId: getAllDelegations parameters: - - description: Use "ETH" / "SOL" in order to obtain information related to the - specific blockchain network or retrieve information about all chains that - have data available by providing no argument. + - description: Use "ETH" / "SOL" / "MATIC" / "STETH_ETH" in order to obtain + information related to the specific blockchain network or retrieve information + about all chains that have data available by providing no argument. + example: SOL explode: true in: query name: chainDescriptor required: false schema: - type: string + $ref: '#/components/schemas/ChainDescriptor' style: form responses: "200": @@ -12386,36 +13918,47 @@ paths: schema: $ref: '#/components/schemas/StakingGetAllDelegationsResponse' description: An array of position data was returned successfully - summary: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List staking positions details tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getAllDelegations(stakingBetaApiGetAllDelegationsRequest);" + \ = fireblocks.staking.getAllDelegations(stakingApiGetAllDelegationsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture>> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); + code: CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_all_delegations(chain_descriptor); + code: response = fireblocks.staking.get_all_delegations(chain_descriptor); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.stakingBeta.getAllDelegations(stakingBetaApiGetAllDelegationsRequest);" + \ = fireblocks.staking.getAllDelegations(stakingApiGetAllDelegationsRequest);" - lang: Java - source: CompletableFuture>> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); + source: CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); - lang: Python - source: response = fireblocks.staking_beta.get_all_delegations(chain_descriptor); + source: response = fireblocks.staking.get_all_delegations(chain_descriptor); x-accepts: application/json /staking/positions/summary: get: description: "Return a summary of all vaults, categorized by their status (active,\ \ inactive), the total amounts staked and total rewards per-chain." operationId: getSummary - parameters: [] responses: "200": content: @@ -12442,38 +13985,49 @@ paths: - chainDescriptor: SOL amount: "0.077345939" schema: - $ref: '#/components/schemas/DelegationSummaryDto' + $ref: '#/components/schemas/DelegationSummary' description: A summary for all vaults were returned successfully - summary: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get staking summary details tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getSummary();" + code: "const response: Promise> =\ + \ fireblocks.staking.getSummary();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getSummary(); + code: CompletableFuture> response = fireblocks.staking().getSummary(); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_summary(); + code: response = fireblocks.staking.get_summary(); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.stakingBeta.getSummary();" + source: "const response: Promise> =\ + \ fireblocks.staking.getSummary();" - lang: Java - source: CompletableFuture> response = fireblocks.stakingBeta().getSummary(); + source: CompletableFuture> response = fireblocks.staking().getSummary(); - lang: Python - source: response = fireblocks.staking_beta.get_summary(); + source: response = fireblocks.staking.get_summary(); x-accepts: application/json /staking/positions/summary/vaults: get: description: "Return a summary for each vault, categorized by their status (active,\ \ inactive), the total amounts staked and total rewards per-chain." operationId: getSummaryByVault - parameters: [] responses: "200": content: @@ -12516,31 +14070,43 @@ paths: schema: $ref: '#/components/schemas/StakingGetSummaryByVaultResponse' description: A summary for each vault were returned successfully - summary: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get staking summary details by vault tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getSummaryByVault();" + \ = fireblocks.staking.getSummaryByVault();" name: Fireblocks SDK TypeScript example - language: java code: CompletableFuture> response - = fireblocks.stakingBeta().getSummaryByVault(); + = fireblocks.staking().getSummaryByVault(); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_summary_by_vault(); + code: response = fireblocks.staking.get_summary_by_vault(); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.stakingBeta.getSummaryByVault();" + \ = fireblocks.staking.getSummaryByVault();" - lang: Java source: CompletableFuture> response - = fireblocks.stakingBeta().getSummaryByVault(); + = fireblocks.staking().getSummaryByVault(); - lang: Python - source: response = fireblocks.staking_beta.get_summary_by_vault(); + source: response = fireblocks.staking.get_summary_by_vault(); x-accepts: application/json /staking/positions/{id}: get: @@ -12549,6 +14115,7 @@ paths: operationId: getDelegationById parameters: - description: The unique identifier of the staking position + example: 1fe3b61f-7e1f-4a19-aff0-4f0a524d44d7 explode: false in: path name: id @@ -12561,35 +14128,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DelegationDto' + $ref: '#/components/schemas/Delegation' description: Position data was returned successfully - summary: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get staking position details tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.stakingBeta.getDelegationById(stakingBetaApiGetDelegationByIdRequest);" + code: "const response: Promise> = fireblocks.staking.getDelegationById(stakingApiGetDelegationByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); + code: CompletableFuture> response = fireblocks.staking().getDelegationById(id); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_delegation_by_id(id); + code: response = fireblocks.staking.get_delegation_by_id(id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.stakingBeta.getDelegationById(stakingBetaApiGetDelegationByIdRequest);" + source: "const response: Promise> = fireblocks.staking.getDelegationById(stakingApiGetDelegationByIdRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); + source: CompletableFuture> response = fireblocks.staking().getDelegationById(id); - lang: Python - source: response = fireblocks.staking_beta.get_delegation_by_id(id); + source: response = fireblocks.staking.get_delegation_by_id(id); x-accepts: application/json /staking/providers: get: description: Return information on all the available staking providers. operationId: getProviders - parameters: [] responses: "200": content: @@ -12597,29 +14175,41 @@ paths: schema: $ref: '#/components/schemas/StakingGetProvidersResponse' description: An array of supported providers was returned successfully - summary: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List staking providers details tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getProviders();" + \ = fireblocks.staking.getProviders();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture>> response = fireblocks.stakingBeta().getProviders(); + code: CompletableFuture>> response = fireblocks.staking().getProviders(); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking_beta.get_providers(); + code: response = fireblocks.staking.get_providers(); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.stakingBeta.getProviders();" + \ = fireblocks.staking.getProviders();" - lang: Java - source: CompletableFuture>> response = fireblocks.stakingBeta().getProviders(); + source: CompletableFuture>> response = fireblocks.staking().getProviders(); - lang: Python - source: response = fireblocks.staking_beta.get_providers(); + source: response = fireblocks.staking.get_providers(); x-accepts: application/json /staking/providers/{providerId}/approveTermsOfService: post: @@ -12629,15 +14219,13 @@ paths: operationId: approveTermsOfServiceByProviderId parameters: - description: The unique identifier of the staking provider + example: kiln explode: false in: path name: providerId required: true schema: - enum: - - kiln - - figment - type: string + $ref: '#/components/schemas/StakingProvider' style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ @@ -12652,38 +14240,44 @@ paths: style: simple responses: "201": + description: The terms of service have been successfully approved and is + associated with 201 status code. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/ProvidersResponseDto' - description: The terms of service have been successfully approved and is - associated with 201 status code. - summary: "" + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Approve staking terms of service tags: - - Staking (Beta) + - Staking x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.approveTermsOfServiceByProviderId(stakingBetaApiApproveTermsOfServiceByProviderIdRequest);" + code: "const response: Promise> = fireblocks.staking.approveTermsOfServiceByProviderId(stakingApiApproveTermsOfServiceByProviderIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId,\ + code: "CompletableFuture> response = fireblocks.staking().approveTermsOfServiceByProviderId(providerId,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.staking_beta.approve_terms_of_service_by_provider_id(provider_id,\ + code: "response = fireblocks.staking.approve_terms_of_service_by_provider_id(provider_id,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.stakingBeta.approveTermsOfServiceByProviderId(stakingBetaApiApproveTermsOfServiceByProviderIdRequest);" + source: "const response: Promise> = fireblocks.staking.approveTermsOfServiceByProviderId(stakingApiApproveTermsOfServiceByProviderIdRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId,\ + source: "CompletableFuture> response = fireblocks.staking().approveTermsOfServiceByProviderId(providerId,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.staking_beta.approve_terms_of_service_by_provider_id(provider_id,\ + source: "response = fireblocks.staking.approve_terms_of_service_by_provider_id(provider_id,\ \ idempotency_key);" x-accepts: application/json /admin_quorum: @@ -14927,9 +16521,86 @@ paths: \ = fireblocks.compliance().updateScreeningConfiguration(screeningUpdateConfigurations,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.compliance.update_screening_configuration(screening_update_configurations,\ + source: "response = fireblocks.compliance.update_screening_configuration(screening_update_configurations,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /screening/transaction/{txId}/bypass_screening_policy: + post: + description: This endpoint is restricted to Admin API users and is only applicable + to outgoing transactions. + operationId: retryRejectedTransactionBypassScreeningChecks + parameters: + - description: The transaction id that was rejected by screening checks + example: 550e8400-e29b-41d4-a716-446655440000 + explode: false + in: path + name: txId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTransactionResponse' + description: A transaction object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: "Calling the \"Bypass Screening Policy\" API endpoint triggers a new\ + \ transaction, with the API user as the initiator, bypassing the screening\ + \ policy check" + tags: + - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.retryRejectedTransactionBypassScreeningChecks(complianceApiRetryRejectedTransactionBypassScreeningChecksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.compliance().retryRejectedTransactionBypassScreeningChecks(txId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.compliance.retry_rejected_transaction_bypass_screening_checks(tx_id,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.compliance.retryRejectedTransactionBypassScreeningChecks(complianceApiRetryRejectedTransactionBypassScreeningChecksRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.compliance().retryRejectedTransactionBypassScreeningChecks(txId,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.compliance.retry_rejected_transaction_bypass_screening_checks(tx_id,\ \ idempotency_key);" - x-content-type: application/json x-accepts: application/json /management/ota: get: @@ -17796,28 +19467,306 @@ paths: source: "CompletableFuture> response = fireblocks.jobManagement().cancelJob(jobId,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.job_management.cancel_job(job_id, idempotency_key);" + source: "response = fireblocks.job_management.cancel_job(job_id, idempotency_key);" + x-accepts: application/json + /batch/{jobId}/tasks: + get: + description: Return a list of tasks for given job + operationId: getJobTasks + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + description: An array of tasks + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return a list of tasks for given job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture>> response = fireblocks.jobManagement().getJobTasks(jobId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.job_management.get_job_tasks(job_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + - lang: Java + source: CompletableFuture>> response = fireblocks.jobManagement().getJobTasks(jobId); + - lang: Python + source: response = fireblocks.job_management.get_job_tasks(job_id); + x-accepts: application/json + /cosigners: + get: + description: | + Get all workspace cosigners (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getCosigners + parameters: + - description: ASC / DESC ordering (default DESC) + example: ASC + explode: true + in: query + name: order + required: false + schema: + default: DESC + enum: + - ASC + - DESC + type: string + style: form + - description: Cursor of the required page + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Maximum number of items in the page + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CosignersPaginatedResponse' + description: A paginated response containing Cosigner objects + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get all cosigners + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.cosigners_beta.get_cosigners(order, page_cursor,\ + \ page_size);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + - lang: Python + source: "response = fireblocks.cosigners_beta.get_cosigners(order, page_cursor,\ + \ page_size);" + x-accepts: application/json + post: + description: Add a new cosigner. The cosigner will be pending pairing until + the API key is manually paired + operationId: addCosigner + parameters: + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddCosignerRequest' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AddCosignerResponse' + description: Pending cosigner added + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Add cosigner + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.addCosigner(cosignersBetaApiAddCosignerRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.cosignersBeta().addCosigner(addCosignerRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.cosigners_beta.add_cosigner(add_cosigner_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.cosignersBeta.addCosigner(cosignersBetaApiAddCosignerRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.cosignersBeta().addCosigner(addCosignerRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.cosigners_beta.add_cosigner(add_cosigner_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /cosigners/{cosignerId}: + get: + description: | + Get a cosigner by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getCosigner + parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cosigner' + description: A cosigner object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get cosigner + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.cosigners_beta.get_cosigner(cosigner_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + - lang: Python + source: response = fireblocks.cosigners_beta.get_cosigner(cosigner_id); x-accepts: application/json - /batch/{jobId}/tasks: - get: - description: Return a list of tasks for given job - operationId: getJobTasks + patch: + description: | + Rename a cosigner by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: renameCosigner parameters: - - description: The requested job id + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f explode: false in: path - name: jobId + name: cosignerId required: true schema: + format: uuid type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RenameCosigner' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Tasks' - description: An array of tasks + $ref: '#/components/schemas/Cosigner' + description: A cosigner object headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -17830,35 +19779,48 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return a list of tasks for given job + summary: Rename cosigner tags: - - Job Management + - Cosigners (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + code: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture>> response = fireblocks.jobManagement().getJobTasks(jobId); + code: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ + \ cosignerId);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.job_management.get_job_tasks(job_id); + code: "response = fireblocks.cosigners_beta.rename_cosigner(rename_cosigner,\ + \ cosigner_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + source: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" - lang: Java - source: CompletableFuture>> response = fireblocks.jobManagement().getJobTasks(jobId); + source: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ + \ cosignerId);" - lang: Python - source: response = fireblocks.job_management.get_job_tasks(job_id); + source: "response = fireblocks.cosigners_beta.rename_cosigner(rename_cosigner,\ + \ cosigner_id);" + x-content-type: application/json x-accepts: application/json - /cosigners: + /cosigners/{cosignerId}/api_keys: get: - description: | - Get all workspace cosigners (paginated) - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getCosigners + description: Get all cosigner paired API keys (paginated) + operationId: getApiKeys parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple - description: ASC / DESC ordering (default DESC) example: ASC explode: true @@ -17897,8 +19859,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CosignersPaginatedResponse' - description: A paginated response containing Cosigner objects + $ref: '#/components/schemas/ApiKeysPaginatedResponse' + description: A paginated response containing ApiKey objects headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -17911,40 +19873,112 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get all cosigners + summary: Get all API keys tags: - Cosigners (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ + \ pageSize);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.cosigners_beta.get_cosigners(order, page_cursor,\ - \ page_size);" + code: "response = fireblocks.cosigners_beta.get_api_keys(cosigner_id, order,\ + \ page_cursor, page_size);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + source: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + source: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ + \ pageSize);" - lang: Python - source: "response = fireblocks.cosigners_beta.get_cosigners(order, page_cursor,\ - \ page_size);" + source: "response = fireblocks.cosigners_beta.get_api_keys(cosigner_id, order,\ + \ page_cursor, page_size);" + x-accepts: application/json + /cosigners/{cosignerId}/api_keys/{apiKeyId}: + delete: + description: Unpair an API key from a cosigner + operationId: unpairApiKey + parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + - description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: apiKeyId + required: true + schema: + type: string + style: simple + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: The API key object to be unpaired + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + Location: + $ref: '#/components/headers/Location' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Unpair API key + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.unpairApiKey(cosignersBetaApiUnpairApiKeyRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.cosignersBeta().unpairApiKey(cosignerId,\ + \ apiKeyId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.cosigners_beta.unpair_api_key(cosigner_id,\ + \ api_key_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.cosignersBeta.unpairApiKey(cosignersBetaApiUnpairApiKeyRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.cosignersBeta().unpairApiKey(cosignerId,\ + \ apiKeyId);" + - lang: Python + source: "response = fireblocks.cosigners_beta.unpair_api_key(cosigner_id,\ + \ api_key_id);" x-accepts: application/json - /cosigners/{cosignerId}: get: description: | - Get a cosigner by ID + Get an API key by ID **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getCosigner + operationId: getApiKey parameters: - description: The unique identifier of the cosigner example: 44fcead0-7053-4831-a53a-df7fb90d440f @@ -17956,13 +19990,22 @@ paths: format: uuid type: string style: simple + - description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: apiKeyId + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Cosigner' - description: A cosigner object + $ref: '#/components/schemas/ApiKey' + description: An ApiKey object headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -17975,33 +20018,33 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get cosigner + summary: Get API key tags: - Cosigners (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + code: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + code: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ + \ apiKeyId);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.cosigners_beta.get_cosigner(cosigner_id); + code: "response = fireblocks.cosigners_beta.get_api_key(cosigner_id, api_key_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + source: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + source: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ + \ apiKeyId);" - lang: Python - source: response = fireblocks.cosigners_beta.get_cosigner(cosigner_id); + source: "response = fireblocks.cosigners_beta.get_api_key(cosigner_id, api_key_id);" x-accepts: application/json patch: - description: | - Rename a cosigner by ID - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: renameCosigner + description: Update the callback handler of an API key + operationId: updateCallbackHandler parameters: - description: The unique identifier of the cosigner example: 44fcead0-7053-4831-a53a-df7fb90d440f @@ -18013,22 +20056,33 @@ paths: format: uuid type: string style: simple + - description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: apiKeyId + required: true + schema: + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/RenameCosigner' + $ref: '#/components/schemas/UpdateCallbackHandlerRequest' required: true responses: - "200": + "202": content: application/json: schema: - $ref: '#/components/schemas/Cosigner' - description: A cosigner object + $ref: '#/components/schemas/UpdateCallbackHandlerResponse' + description: The API key object with the new callback handler headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' + Location: + $ref: '#/components/headers/Location' default: content: application/json: @@ -18038,39 +20092,40 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Rename cosigner + summary: Update API key callback handler tags: - Cosigners (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.updateCallbackHandler(cosignersBetaApiUpdateCallbackHandlerRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ - \ cosignerId);" + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().updateCallbackHandler(updateCallbackHandlerRequest,\ + \ cosignerId, apiKeyId);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.cosigners_beta.rename_cosigner(rename_cosigner,\ - \ cosigner_id);" + code: "response = fireblocks.cosigners_beta.update_callback_handler(update_callback_handler_request,\ + \ cosigner_id, api_key_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" + source: "const response: Promise>\ + \ = fireblocks.cosignersBeta.updateCallbackHandler(cosignersBetaApiUpdateCallbackHandlerRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ - \ cosignerId);" + source: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().updateCallbackHandler(updateCallbackHandlerRequest,\ + \ cosignerId, apiKeyId);" - lang: Python - source: "response = fireblocks.cosigners_beta.rename_cosigner(rename_cosigner,\ - \ cosigner_id);" + source: "response = fireblocks.cosigners_beta.update_callback_handler(update_callback_handler_request,\ + \ cosigner_id, api_key_id);" x-content-type: application/json x-accepts: application/json - /cosigners/{cosignerId}/api_keys: - get: - description: | - Get all cosigner paired API keys (paginated) - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getApiKeys + put: + description: Pair an API key to a cosigner + operationId: pairApiKey parameters: - description: The unique identifier of the cosigner example: 44fcead0-7053-4831-a53a-df7fb90d440f @@ -18082,49 +20137,44 @@ paths: format: uuid type: string style: simple - - description: ASC / DESC ordering (default DESC) - example: ASC - explode: true - in: query - name: order - required: false - schema: - default: DESC - enum: - - ASC - - DESC - type: string - style: form - - description: Cursor of the required page - explode: true - in: query - name: pageCursor - required: false + - description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: apiKeyId + required: true schema: type: string - style: form - - description: Maximum number of items in the page - example: 10 - explode: true - in: query - name: pageSize + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key required: false schema: - default: 10 - maximum: 100 - minimum: 1 - type: number - style: form + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PairApiKeyRequest' + required: true responses: - "200": + "202": content: application/json: schema: - $ref: '#/components/schemas/ApiKeysPaginatedResponse' - description: A paginated response containing ApiKey objects + $ref: '#/components/schemas/PairApiKeyResponse' + description: The API key object to be paired headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' + Location: + $ref: '#/components/headers/Location' default: content: application/json: @@ -18134,42 +20184,39 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get all API keys + summary: Pair API key tags: - Cosigners (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" + code: "const response: Promise> =\ + \ fireblocks.cosignersBeta.pairApiKey(cosignersBetaApiPairApiKeyRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ - \ pageSize);" + code: "CompletableFuture> response = fireblocks.cosignersBeta().pairApiKey(pairApiKeyRequest,\ + \ cosignerId, apiKeyId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.cosigners_beta.get_api_keys(cosigner_id, order,\ - \ page_cursor, page_size);" + code: "response = fireblocks.cosigners_beta.pair_api_key(pair_api_key_request,\ + \ cosigner_id, api_key_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" + source: "const response: Promise> =\ + \ fireblocks.cosignersBeta.pairApiKey(cosignersBetaApiPairApiKeyRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ - \ pageSize);" + source: "CompletableFuture> response = fireblocks.cosignersBeta().pairApiKey(pairApiKeyRequest,\ + \ cosignerId, apiKeyId, idempotencyKey);" - lang: Python - source: "response = fireblocks.cosigners_beta.get_api_keys(cosigner_id, order,\ - \ page_cursor, page_size);" + source: "response = fireblocks.cosigners_beta.pair_api_key(pair_api_key_request,\ + \ cosigner_id, api_key_id, idempotency_key);" + x-content-type: application/json x-accepts: application/json - /cosigners/{cosignerId}/api_keys/{apiKeyId}: + /cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId}: get: - description: | - Get an API key by ID - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getApiKey + description: Get the status of an asynchronous request + operationId: getRequestStatus parameters: - description: The unique identifier of the cosigner example: 44fcead0-7053-4831-a53a-df7fb90d440f @@ -18190,13 +20237,20 @@ paths: schema: type: string style: simple + - explode: false + in: path + name: requestId + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ApiKey' - description: An ApiKey object + $ref: '#/components/schemas/Status' + description: The status of the request headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -18209,29 +20263,31 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get API key + summary: Get request status tags: - Cosigners (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" + code: "const response: Promise> = fireblocks.cosignersBeta.getRequestStatus(cosignersBetaApiGetRequestStatusRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ - \ apiKeyId);" + code: "CompletableFuture> response = fireblocks.cosignersBeta().getRequestStatus(cosignerId,\ + \ apiKeyId, requestId);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.cosigners_beta.get_api_key(cosigner_id, api_key_id);" + code: "response = fireblocks.cosigners_beta.get_request_status(cosigner_id,\ + \ api_key_id, request_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" + source: "const response: Promise> = fireblocks.cosignersBeta.getRequestStatus(cosignersBetaApiGetRequestStatusRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ - \ apiKeyId);" + source: "CompletableFuture> response = fireblocks.cosignersBeta().getRequestStatus(cosignerId,\ + \ apiKeyId, requestId);" - lang: Python - source: "response = fireblocks.cosigners_beta.get_api_key(cosigner_id, api_key_id);" + source: "response = fireblocks.cosigners_beta.get_request_status(cosigner_id,\ + \ api_key_id, request_id);" x-accepts: application/json components: headers: @@ -18256,6 +20312,13 @@ components: schema: type: string style: simple + Location: + description: The location URL of the request status + example: /v1/cosigners/7cd3c3d2-611b-43fe-98da-1e0bfe893e2f/api_keys/ec1ca5d4-3824-4c67-9bea-7f3f636b9f40/123456789 + explode: false + schema: + type: string + style: simple parameters: X-Idempotency-Key: description: "A unique identifier for the request. If the request is sent multiple\ @@ -18959,18 +21022,35 @@ components: PublicKeyInformation: example: derivationPath: - - 0.8008281904610115 - - 0.8008281904610115 - publicKey: publicKey - algorithm: algorithm + - 44 + - 0 + - 0 + - 0 + - 0 + publicKey: 1044c36403c1802818b472398f546a43a0d91569d5583a6e807c3825b155c7bd + algorithm: MPC_ECDSA_SECP256K1 properties: algorithm: + description: Elliptic Curve + enum: + - MPC_ECDSA_SECP256K1 + - MPC_ECDSA_SECP256R1 + - MPC_EDDSA_ED25519 type: string derivationPath: + description: BIP44 derivation path + example: + - 44 + - 0 + - 0 + - 0 + - 0 items: - type: number + type: integer type: array publicKey: + description: Compressed/Uncompressed public key value in hex representation + example: 1044c36403c1802818b472398f546a43a0d91569d5583a6e807c3825b155c7bd type: string type: object GetVaultAssetsResponse: @@ -20166,6 +22246,109 @@ components: required: - enabled type: object + Players: + example: + id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + properties: + id: + description: id of the player + example: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + maxLength: 36 + minLength: 36 + type: string + type: + description: Type of the player + enum: + - MOBILE + - CLOUD + example: MOBILE + type: string + required: + - id + - type + type: object + MpcKey: + example: + lastPreprocessedIndex: 6 + players: + - id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + - id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + keyId: 743f82cf-b526-4148-afb1-cd71f1dfee10 + userId: da084d02-d446-413e-b4ce-1e3256517dfd + algorithm: 201 + properties: + keyId: + example: 743f82cf-b526-4148-afb1-cd71f1dfee10 + maxLength: 36 + minLength: 36 + type: string + userId: + description: The user id that owns the key + example: da084d02-d446-413e-b4ce-1e3256517dfd + maxLength: 36 + minLength: 36 + type: string + algorithm: + description: The algorithm of the key + example: 201 + type: number + players: + description: The players that are associated with the key + items: + $ref: '#/components/schemas/Players' + type: array + lastPreprocessedIndex: + description: The last index used on this key + example: 6 + minimum: 0 + type: number + required: + - algorithm + - keyId + - players + - userId + type: object + GetMpcKeysResponse: + example: + keys: + - lastPreprocessedIndex: 6 + players: + - id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + - id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + keyId: 743f82cf-b526-4148-afb1-cd71f1dfee10 + userId: da084d02-d446-413e-b4ce-1e3256517dfd + algorithm: 201 + - lastPreprocessedIndex: 6 + players: + - id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + - id: 47d3383e-37a3-43d5-90a4-de0ca8c5e258 + type: MOBILE + keyId: 743f82cf-b526-4148-afb1-cd71f1dfee10 + userId: da084d02-d446-413e-b4ce-1e3256517dfd + algorithm: 201 + tenantId: bdb57751-921d-45d5-99fd-344cffb364f6 + properties: + tenantId: + description: The workspace id of the keys + example: bdb57751-921d-45d5-99fd-344cffb364f6 + maxLength: 36 + minLength: 36 + type: string + keys: + description: The keys that are associated with the workspace + items: + $ref: '#/components/schemas/MpcKey' + type: array + required: + - keys + - tenantId + type: object GetExternalWalletsResponse: items: $ref: '#/components/schemas/UnmanagedWallet' @@ -20300,50 +22483,325 @@ components: description: the contract's display name type: string type: object - AddContractAssetRequest: + AddContractAssetRequest: + example: + address: address + tag: tag + properties: + address: + description: The contract's address (or xpub) of the wallet + type: string + tag: + description: "The destination tag, for XRP wallets" + type: string + required: + - address + type: object + AssetTypeResponse: + example: + nativeAsset: nativeAsset + decimals: 0.8008281904610115 + name: name + contractAddress: contractAddress + id: id + type: type + properties: + id: + type: string + name: + type: string + type: + type: string + contractAddress: + type: string + nativeAsset: + type: string + decimals: + type: number + required: + - id + - name + - type + type: object + GetSupportedAssetsResponse: + items: + $ref: '#/components/schemas/AssetTypeResponse' + type: array + AssetClassBeta: + enum: + - NATIVE + - FT + - FIAT + - NFT + - SFT + example: FT + type: string + AssetOnchainBeta: + example: + standards: + - ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 + properties: + symbol: + description: The asset symbol + example: TST3 + type: string + name: + description: The asset name + example: Test 3 + type: string + address: + description: The asset address + example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + type: string + decimals: + description: Number of decimals + example: 18 + type: number + standards: + description: Supported standards + example: + - ERC20 + items: + type: string + type: array + required: + - decimals + - name + - symbol + type: object + AssetMedia: + example: + attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + properties: + url: + description: Media URL + example: https://example.com/image.png + type: string + type: + description: Media type + enum: + - image/svg+xml + - image/png + example: image/svg+xml + type: string + attributes: + $ref: '#/components/schemas/AssetMedia_attributes' + required: + - type + - url + type: object + AssetMetadataBeta: + example: + website: https://example.org + scope: Global + deprecated: false + deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d + verified: true + media: + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + properties: + scope: + description: The scope of the asset + enum: + - Global + - Local + example: Global + type: string + deprecated: + description: Is asset deprecated + example: false + type: boolean + deprecationReferralId: + description: New asset ID replacement + example: 056776ab-9efa-4219-9820-9ece0cc4d90d + type: string + verified: + description: Is asset verified by Fireblocks + example: true + type: boolean + website: + description: Vendor’s website + example: https://example.org + type: string + media: + description: Asset’s media + items: + $ref: '#/components/schemas/AssetMedia' + type: array + required: + - deprecated + - scope + - verified + type: object + AssetResponseBeta: + example: + displaySymbol: TST3 + metadata: + website: https://example.org + scope: Global + deprecated: false + deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d + verified: true + media: + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + displayName: Test 3 + legacyId: TST3 + id: 9f9f7062-df90-4fc0-8697-96685184358d + assetClass: FT + blockchainId: e85208ff-3b15-44e9-af14-0ed0280b2a15 + onchain: + standards: + - ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 + properties: + id: + description: The ID of the asset + example: 9f9f7062-df90-4fc0-8697-96685184358d + type: string + legacyId: + description: The Legacy ID of the asset + example: TST3 + type: string + blockchainId: + description: The ID of the asset's blockchain + example: e85208ff-3b15-44e9-af14-0ed0280b2a15 + type: string + displayName: + description: Asset's display name + example: Test 3 + type: string + displaySymbol: + description: Asset's display symbol + example: TST3 + type: string + assetClass: + $ref: '#/components/schemas/AssetClassBeta' + onchain: + $ref: '#/components/schemas/AssetOnchainBeta' + metadata: + $ref: '#/components/schemas/AssetMetadataBeta' + required: + - assetClass + - id + - legacyId + - metadata + type: object + ListAssetsResponse: example: - address: address - tag: tag + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - displaySymbol: TST3 + metadata: + website: https://example.org + scope: Global + deprecated: false + deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d + verified: true + media: + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + displayName: Test 3 + legacyId: TST3 + id: 9f9f7062-df90-4fc0-8697-96685184358d + assetClass: FT + blockchainId: e85208ff-3b15-44e9-af14-0ed0280b2a15 + onchain: + standards: + - ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 + - displaySymbol: TST3 + metadata: + website: https://example.org + scope: Global + deprecated: false + deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d + verified: true + media: + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + - attributes: + monochrome: true + type: image/svg+xml + url: https://example.com/image.png + displayName: Test 3 + legacyId: TST3 + id: 9f9f7062-df90-4fc0-8697-96685184358d + assetClass: FT + blockchainId: e85208ff-3b15-44e9-af14-0ed0280b2a15 + onchain: + standards: + - ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 properties: - address: - description: The contract's address (or xpub) of the wallet - type: string - tag: - description: "The destination tag, for XRP wallets" + data: + description: The data of the current page + items: + $ref: '#/components/schemas/AssetResponseBeta' + type: array + next: + description: Cursor to the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true type: string required: - - address + - data + - next type: object - AssetTypeResponse: + AssetInternalServerErrorResponse: example: - nativeAsset: nativeAsset - decimals: 0.8008281904610115 - name: name - contractAddress: contractAddress - id: id - type: type + code: 3005 + message: Internal server error properties: - id: - type: string - name: - type: string - type: - type: string - contractAddress: - type: string - nativeAsset: + message: + description: Internal server error code + example: Internal server error type: string - decimals: + code: + description: Error code + example: 3005 type: number required: - - id - - name - - type + - code + - message type: object - GetSupportedAssetsResponse: - items: - $ref: '#/components/schemas/AssetTypeResponse' - type: array RegisterNewAssetRequest: example: symbol: TST3 @@ -20373,6 +22831,59 @@ components: - address - blockchainId type: object + AssetOnchain: + example: + standard: ERC20 + symbol: TST3 + address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + decimals: 18 + name: Test 3 + properties: + symbol: + description: The asset symbol + example: TST3 + type: string + name: + description: The asset name + example: Test 3 + type: string + address: + description: The asset address + example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + type: string + decimals: + description: Number of decimals + example: 18 + type: number + standard: + description: The asset standard + example: ERC20 + type: string + required: + - decimals + - name + - symbol + type: object + AssetMetadata: + example: + scope: Global + deprecated: false + properties: + scope: + description: The scope of the asset + enum: + - Global + - Local + example: Global + type: string + deprecated: + description: Is asset deprecated + example: false + type: boolean + required: + - deprecated + - scope + type: object AssetResponse: example: metadata: @@ -20399,9 +22910,9 @@ components: example: FT type: string onchain: - $ref: '#/components/schemas/AssetResponse_onchain' + $ref: '#/components/schemas/AssetOnchain' metadata: - $ref: '#/components/schemas/AssetResponse_metadata' + $ref: '#/components/schemas/AssetMetadata' required: - assetClass - legacyId @@ -20410,7 +22921,7 @@ components: type: object AssetBadRequestErrorResponse: example: - code: "3001" + code: 3001 message: Listing an asset on the requested blockchain is not supported properties: message: @@ -20419,15 +22930,15 @@ components: type: string code: description: Error code - example: "3001" - type: string + example: 3001 + type: number required: - code - message type: object AssetForbiddenErrorResponse: example: - code: "3006" + code: 3006 message: Asset creation quota reached properties: message: @@ -20436,15 +22947,15 @@ components: type: string code: description: Error code - example: "3006" - type: string + example: 3006 + type: number required: - code - message type: object - AssetNotFoundErrorResponse: + TokenInfoNotFoundErrorResponse: example: - code: "3009" + code: 3009 message: "Invalid address, could not get asset information" properties: message: @@ -20453,15 +22964,15 @@ components: type: string code: description: Error code - example: "3009" - type: string + example: 3009 + type: number required: - code - message type: object AssetConflictErrorResponse: example: - code: "3002" + code: 3002 message: Asset already listed properties: message: @@ -20470,25 +22981,25 @@ components: type: string code: description: Error code - example: "3002" - type: string + example: 3002 + type: number required: - code - message type: object - AssetInternalServerErrorResponse: + AssetNotFoundErrorResponse: example: - code: "3005" - message: Internal server error + code: 1504 + message: Asset with specified ID not found properties: message: - description: Internal server error code - example: Internal server error + description: Not found error code + example: Asset with specified ID not found type: string code: description: Error code - example: "3005" - type: string + example: 1504 + type: number required: - code - message @@ -20550,7 +23061,7 @@ components: type: object AssetPriceForbiddenErrorResponse: example: - code: "3002" + code: 3002 message: Tenant is not allowed to update asset properties: message: @@ -20559,25 +23070,272 @@ components: type: string code: description: Error code - example: "3002" + example: 3002 + type: number + required: + - code + - message + type: object + AssetPriceNotFoundErrorResponse: + example: + code: 3001 + message: Currency not found + properties: + message: + description: Not found error message + example: Currency not found + type: string + code: + description: Error code + example: 3001 + type: number + required: + - code + - message + type: object + BlockchainOnchain: + example: + protocol: EVM + test: false + chainId: "1" + signingAlgo: ECDSA_SECP256K1 + properties: + protocol: + description: The protocol of the blockchain + example: EVM + type: string + chainId: + description: Network/chain ID + example: "1" + type: string + test: + description: Is test blockchain + example: false + type: boolean + signingAlgo: + description: Signing alghorithm + enum: + - ECDSA_SECP256K1 + - EDDSA_ED25519 + example: ECDSA_SECP256K1 + type: string + required: + - protocol + - signingAlgo + - test + type: object + BlockchainMedia: + example: + type: image/svg+xml + url: https://example.com/image.png + properties: + url: + description: Media URL + example: https://example.com/image.png + type: string + type: + description: Media type + enum: + - image/svg+xml + - image/png + example: image/svg+xml + type: string + required: + - type + - url + type: object + BlockchainExplorer: + example: + address: "https://example.com/address/{address}" + tx: "https://example.com/tx/{tx}" + base: https://example.com + token: "https://example.com/nft/{contract}/{tokenId}" + properties: + base: + description: Explorer base url + example: https://example.com + type: string + address: + description: Explorer address url + example: "https://example.com/address/{address}" + type: string + tx: + description: Explorer transaction url + example: "https://example.com/tx/{tx}" + type: string + token: + description: Explorer token url + example: "https://example.com/nft/{contract}/{tokenId}" + type: string + required: + - base + type: object + BlockchainMetadata: + example: + scope: Global + deprecated: false + explorer: + address: "https://example.com/address/{address}" + tx: "https://example.com/tx/{tx}" + base: https://example.com + token: "https://example.com/nft/{contract}/{tokenId}" + media: + - type: image/svg+xml + url: https://example.com/image.png + - type: image/svg+xml + url: https://example.com/image.png + properties: + scope: + description: Is blockchain listed on all workspaces? Global or Local + enum: + - Global + - Local + example: Global + type: string + deprecated: + description: Is blockchain deprecated + example: false + type: boolean + media: + description: Blockchain’s media + items: + $ref: '#/components/schemas/BlockchainMedia' + type: array + explorer: + $ref: '#/components/schemas/BlockchainExplorer' + required: + - deprecated + - scope + type: object + BlockchainResponse: + example: + nativeAssetId: 9f9f7062-df90-4fc0-8697-96685184356a + metadata: + scope: Global + deprecated: false + explorer: + address: "https://example.com/address/{address}" + tx: "https://example.com/tx/{tx}" + base: https://example.com + token: "https://example.com/nft/{contract}/{tokenId}" + media: + - type: image/svg+xml + url: https://example.com/image.png + - type: image/svg+xml + url: https://example.com/image.png + displayName: Test 3 + legacyId: TST3 + id: 9f9f7062-df90-4fc0-8697-96685184357b + onchain: + protocol: EVM + test: false + chainId: "1" + signingAlgo: ECDSA_SECP256K1 + properties: + id: + description: The ID of the blockchain + example: 9f9f7062-df90-4fc0-8697-96685184357b + type: string + legacyId: + description: The old blockchain ID representation of the blockchain + example: TST3 + type: string + displayName: + description: The name of the blockchain + example: Test 3 + type: string + nativeAssetId: + description: Native asset ID of this blockchain + example: 9f9f7062-df90-4fc0-8697-96685184356a + type: string + onchain: + $ref: '#/components/schemas/BlockchainOnchain' + metadata: + $ref: '#/components/schemas/BlockchainMetadata' + required: + - displayName + - id + - legacyId + - metadata + - nativeAssetId + - onchain + type: object + ListBlockchainsResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - nativeAssetId: 9f9f7062-df90-4fc0-8697-96685184356a + metadata: + scope: Global + deprecated: false + explorer: + address: "https://example.com/address/{address}" + tx: "https://example.com/tx/{tx}" + base: https://example.com + token: "https://example.com/nft/{contract}/{tokenId}" + media: + - type: image/svg+xml + url: https://example.com/image.png + - type: image/svg+xml + url: https://example.com/image.png + displayName: Test 3 + legacyId: TST3 + id: 9f9f7062-df90-4fc0-8697-96685184357b + onchain: + protocol: EVM + test: false + chainId: "1" + signingAlgo: ECDSA_SECP256K1 + - nativeAssetId: 9f9f7062-df90-4fc0-8697-96685184356a + metadata: + scope: Global + deprecated: false + explorer: + address: "https://example.com/address/{address}" + tx: "https://example.com/tx/{tx}" + base: https://example.com + token: "https://example.com/nft/{contract}/{tokenId}" + media: + - type: image/svg+xml + url: https://example.com/image.png + - type: image/svg+xml + url: https://example.com/image.png + displayName: Test 3 + legacyId: TST3 + id: 9f9f7062-df90-4fc0-8697-96685184357b + onchain: + protocol: EVM + test: false + chainId: "1" + signingAlgo: ECDSA_SECP256K1 + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/BlockchainResponse' + type: array + next: + description: Cursor to the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true type: string required: - - code - - message + - data + - next type: object - AssetPriceNotFoundErrorResponse: + BlockchainNotFoundErrorResponse: example: - code: "3001" - message: Currency not found + code: 1505 + message: Blockchain with specified ID not found properties: message: - description: Not found error message - example: Currency not found + description: Not found error code + example: Blockchain with specified ID not found type: string code: description: Error code - example: "3001" - type: string + example: 1505 + type: number required: - code - message @@ -20627,6 +23385,7 @@ components: - ONE_TIME_ADDRESS - UNKNOWN - END_USER_WALLET + - PROGRAM_CALL type: string SourceTransferPeerPathResponse: description: Source of the transaction. @@ -21626,12 +24385,14 @@ components: * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. + * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. Currently in beta and disabled * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) enum: - TRANSFER - BURN - CONTRACT_CALL + - PROGRAM_CALL - MINT - RAW - TYPED_MESSAGE @@ -23784,24 +26545,24 @@ components: type: array AuditLogData: example: - createdAt: createdAt + createdAt: 6.027456183070403 subject: subject tenantId: tenantId id: id event: event user: user userId: userId - timestamp: timestamp + timestamp: 0.8008281904610115 properties: id: description: The unique identifier of the audit log type: string timestamp: description: The timestamp of the audit log - type: string + type: number createdAt: description: The timestamp of the audit log creation - type: string + type: number user: description: The user who performed the action type: string @@ -23825,24 +26586,24 @@ components: GetAuditLogsResponse: example: cursor: cursor - total: 0.8008281904610115 + total: 1.4658129805029452 data: - - createdAt: createdAt + - createdAt: 6.027456183070403 subject: subject tenantId: tenantId id: id event: event user: user userId: userId - timestamp: timestamp - - createdAt: createdAt + timestamp: 0.8008281904610115 + - createdAt: 6.027456183070403 subject: subject tenantId: tenantId id: id event: event user: user userId: userId - timestamp: timestamp + timestamp: 0.8008281904610115 properties: data: items: @@ -24167,6 +26928,371 @@ components: required: - success type: object + WebhookEvent: + enum: + - transaction.created + - transaction.status.updated + - transaction.approval_status.updated + - external_wallet.asset.added + - internal_wallet.asset.added + - internal_wallet.asset.removed + - contract_wallet.asset.added + - contract_wallet.asset.removed + - vault_account.created + - vault_account.asset.added + - vault_account.asset.balance_updated + - vault_account.nft.balance_updated + - embedded_wallet.asset.added + - embedded_wallet.asset.balance_updated + - exchange_account.added + - fiat_account.added + - ticket.created + - ticket.submitted + - ticket.expired + - ticket.canceled + - ticket.fulfilled + - ticket.counterparty.added + - ticket.counterparty_external_id.set + - ticket.note.added + - ticket.expired_in.set + - ticket.expired_at.set + - ticket.term.added + - ticket.term.updated + - ticket.term.deleted + - ticket.term.funded + - ticket.term.manually_funded + - ticket.term.funding_canceled + - ticket.term.funding_failed + - ticket.term.funding_completed + - ticket.term.transaction_status_changed + type: string + Webhook: + example: + createdAt: 2021-09-01T12:00:00Z + description: This webhook is used for transactions notifications + id: 123e4567-e89b-12d3-a456-426614174000 + url: https://example.com/webhook + events: + - transaction.created + - transaction.status.updated + status: ENABLED + updatedAt: 2021-09-05T15:00:00Z + properties: + id: + description: The id of the webhook + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + url: + description: The url of the webhook where notifications will be sent. Must + be a valid URL and https. + example: https://example.com/webhook + minLength: 1 + type: string + description: + description: description of the webhook of what it is used for + example: This webhook is used for transactions notifications + minLength: 1 + type: string + events: + description: The events that the webhook will be subscribed to + example: + - transaction.created + - transaction.status.updated + items: + $ref: '#/components/schemas/WebhookEvent' + type: array + status: + description: The status of the webhook + enum: + - DISABLED + - ENABLED + example: ENABLED + type: string + createdAt: + description: The date and time the webhook was created + example: 2021-09-01T12:00:00Z + format: date-time + type: string + updatedAt: + description: The date and time the webhook was last updated + example: 2021-09-05T15:00:00Z + format: date-time + type: string + type: object + WebhookPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - createdAt: 2021-09-01T12:00:00Z + description: This webhook is used for transactions notifications + id: 123e4567-e89b-12d3-a456-426614174000 + url: https://example.com/webhook + events: + - transaction.created + - transaction.status.updated + status: ENABLED + updatedAt: 2021-09-05T15:00:00Z + - createdAt: 2021-09-01T12:00:00Z + description: This webhook is used for transactions notifications + id: 123e4567-e89b-12d3-a456-426614174000 + url: https://example.com/webhook + events: + - transaction.created + - transaction.status.updated + status: ENABLED + updatedAt: 2021-09-05T15:00:00Z + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/Webhook' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + required: + - data + type: object + CreateWebhookRequest: + example: + description: This webhook is used for transactions notifications + url: https://example.com/webhook + events: + - transaction.created + - transaction.status.updated + enabled: false + properties: + url: + description: "The url of the webhook where notifications will be sent. URL\ + \ must be valid, unique and https." + example: https://example.com/webhook + minLength: 1 + type: string + description: + description: description of the webhook. should not contain special characters. + example: This webhook is used for transactions notifications + minLength: 1 + type: string + events: + description: event types the webhook will subscribe to + example: + - transaction.created + - transaction.status.updated + items: + $ref: '#/components/schemas/WebhookEvent' + type: array + enabled: + default: true + description: "The status of the webhook. If false, the webhook will not\ + \ receive notifications." + example: false + type: boolean + required: + - description + - events + - url + type: object + UpdateWebhookRequest: + example: + description: This webhook is used for transactions notifications + url: https://example.com/webhook + events: + - transaction.created + - transaction.status.updated + enabled: false + properties: + url: + description: "The url of the webhook where notifications will be sent. URL\ + \ must be valid, unique and https." + example: https://example.com/webhook + minLength: 1 + type: string + description: + description: description of the webhook of what it is used for.should not + contain special characters. + example: This webhook is used for transactions notifications + minLength: 1 + type: string + events: + description: The events that the webhook will be subscribed to + example: + - transaction.created + - transaction.status.updated + items: + $ref: '#/components/schemas/WebhookEvent' + type: array + enabled: + description: The status of the webhook + example: false + type: boolean + type: object + NotificationStatus: + description: The status of the Notification + enum: + - COMPLETED + - FAILED + - IN_PROGRESS + example: COMPLETED + type: string + Notification: + example: + createdAt: 2021-07-01T00:00:00Z + resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f + eventVersion: 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + eventType: null + updatedAt: 2021-07-01T00:00:00Z + status: COMPLETED + attempts: + - attempts + - attempts + properties: + id: + description: The id of the Notification + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + createdAt: + description: The creation date of the notification + example: 2021-07-01T00:00:00Z + format: date-time + type: string + updatedAt: + description: The date when the notification was updated + example: 2021-07-01T00:00:00Z + format: date-time + type: string + status: + $ref: '#/components/schemas/NotificationStatus' + eventType: + $ref: '#/components/schemas/WebhookEvent' + eventVersion: + description: The event version of the Notification + example: 1 + type: number + resourceId: + description: The resource id of the event which the Notification is listen + to + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + nullable: true + type: string + attempts: + default: [] + description: The attempts related to Notification + items: + type: string + type: array + required: + - createdAt + - eventType + - eventVersion + - id + - status + - updatedAt + type: object + NotificationPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - createdAt: 2021-07-01T00:00:00Z + resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f + eventVersion: 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + eventType: null + updatedAt: 2021-07-01T00:00:00Z + status: COMPLETED + attempts: + - attempts + - attempts + - createdAt: 2021-07-01T00:00:00Z + resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f + eventVersion: 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + eventType: null + updatedAt: 2021-07-01T00:00:00Z + status: COMPLETED + attempts: + - attempts + - attempts + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/Notification' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + required: + - data + type: object + NotificationWithData: + example: + createdAt: 2021-07-01T00:00:00Z + resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f + data: "{}" + eventVersion: 1 + id: 44fcead0-7053-4831-a53a-df7fb90d440f + eventType: null + updatedAt: 2021-07-01T00:00:00Z + status: COMPLETED + attempts: + - attempts + - attempts + properties: + id: + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + createdAt: + description: The creation date of the notification + example: 2021-07-01T00:00:00Z + format: date-time + type: string + updatedAt: + description: The date when the notification was updated + example: 2021-07-01T00:00:00Z + format: date-time + type: string + status: + $ref: '#/components/schemas/NotificationStatus' + eventType: + $ref: '#/components/schemas/WebhookEvent' + eventVersion: + description: The event version which the Notification is listen to + example: 1 + type: number + resourceId: + description: The resource id of the event which the Notification is listen + to + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + nullable: true + type: string + attempts: + default: [] + description: The attempts related to Notification + items: + type: string + type: array + data: + description: notification data + type: object + required: + - attempts + - createdAt + - eventType + - eventVersion + - id + - status + - updatedAt + type: object AuditorData: properties: name: @@ -26448,11 +29574,212 @@ components: required: - txId type: object + TxLog: + example: + blockHash: 0x6e3c92a3d96f96e46b7f39c30244edb6e8e0f4b65d3846c9f8287f9dd5d1a3d2 + address: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + logIndex: 1 + data: 0x000000000000000000000000000000000000000000000000000000000000000a + removed: false + topics: + - 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + - 0x000000000000000000000000a7d9ddbe1f17865597fbd27ec712455208b6b76d + - 0x000000000000000000000000c2c4e1db41f0bb97996d0ed0542d2170d146fb66 + blockNumber: 123456 + transactionIndex: 2 + transactionHash: 0x5a3b7f4b2c9e4a0b1f8a12c8e5f1d0e2a6b4c9d1f7e2b1a2b3c4d5e6f7a8b9c + properties: + address: + description: The log address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + type: string + topics: + description: Array of log topics + example: + - 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + - 0x000000000000000000000000a7d9ddbe1f17865597fbd27ec712455208b6b76d + - 0x000000000000000000000000c2c4e1db41f0bb97996d0ed0542d2170d146fb66 + items: + type: string + type: array + data: + description: The log data + example: 0x000000000000000000000000000000000000000000000000000000000000000a + type: string + blockNumber: + description: Block number where the log occurred + example: 123456 + type: integer + transactionHash: + description: Transaction hash associated with the log + example: 0x5a3b7f4b2c9e4a0b1f8a12c8e5f1d0e2a6b4c9d1f7e2b1a2b3c4d5e6f7a8b9c + type: string + transactionIndex: + description: Transaction index in the block + example: 2 + type: integer + blockHash: + description: The hash of the block + example: 0x6e3c92a3d96f96e46b7f39c30244edb6e8e0f4b65d3846c9f8287f9dd5d1a3d2 + type: string + logIndex: + description: Log index in the block + example: 1 + type: integer + removed: + description: Indicates if the log was removed + example: false + type: boolean + required: + - address + - blockHash + - blockNumber + - data + - logIndex + - removed + - topics + - transactionHash + - transactionIndex + type: object + TransactionReceiptResponse: + example: + blockHash: 0x6e3c92a3d96f96e46b7f39c30244edb6e8e0f4b65d3846c9f8287f9dd5d1a3d2 + logsBloom: 0x0000000000000000000000000000000000000000000000000000000000000000 + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + transactionIndex: 3 + type: 0x2 + transactionHash: 0x5a3b7f4b2c9e4a0b1f8a12c8e5f1d0e2a6b4c9d1f7e2b1a2b3c4d5e6f7a8b9c + gasUsed: 21000 + blockNumber: 123456 + cumulativeGasUsed: 21000 + from: 0xa7D9ddBE1f17865597Fbd27ec712455208B6b76D + to: 0x1eC4a8bB9bB9Afa24f79cC2e1423cD00B6cFf50 + effectiveGasPrice: 1000000000 + logs: + - blockHash: 0x6e3c92a3d96f96e46b7f39c30244edb6e8e0f4b65d3846c9f8287f9dd5d1a3d2 + address: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + logIndex: 1 + data: 0x000000000000000000000000000000000000000000000000000000000000000a + removed: false + topics: + - 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + - 0x000000000000000000000000a7d9ddbe1f17865597fbd27ec712455208b6b76d + - 0x000000000000000000000000c2c4e1db41f0bb97996d0ed0542d2170d146fb66 + blockNumber: 123456 + transactionIndex: 2 + transactionHash: 0x5a3b7f4b2c9e4a0b1f8a12c8e5f1d0e2a6b4c9d1f7e2b1a2b3c4d5e6f7a8b9c + - blockHash: 0x6e3c92a3d96f96e46b7f39c30244edb6e8e0f4b65d3846c9f8287f9dd5d1a3d2 + address: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + logIndex: 1 + data: 0x000000000000000000000000000000000000000000000000000000000000000a + removed: false + topics: + - 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + - 0x000000000000000000000000a7d9ddbe1f17865597fbd27ec712455208b6b76d + - 0x000000000000000000000000c2c4e1db41f0bb97996d0ed0542d2170d146fb66 + blockNumber: 123456 + transactionIndex: 2 + transactionHash: 0x5a3b7f4b2c9e4a0b1f8a12c8e5f1d0e2a6b4c9d1f7e2b1a2b3c4d5e6f7a8b9c + status: 1 + properties: + blockHash: + description: The block hash + example: 0x6e3c92a3d96f96e46b7f39c30244edb6e8e0f4b65d3846c9f8287f9dd5d1a3d2 + type: string + blockNumber: + description: The block number + example: 123456 + type: integer + contractAddress: + description: The address of deployed contract + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + nullable: true + type: string + cumulativeGasUsed: + description: The cumulative gas used in the transaction + example: 21000 + type: integer + effectiveGasPrice: + description: The effective gas price + example: 1000000000 + type: integer + from: + description: Sender address + example: 0xa7D9ddBE1f17865597Fbd27ec712455208B6b76D + type: string + gasUsed: + description: Gas used by the transaction + example: 21000 + type: integer + logs: + description: Array of transaction logs + items: + $ref: '#/components/schemas/TxLog' + type: array + logsBloom: + description: Logs bloom filter + example: 0x0000000000000000000000000000000000000000000000000000000000000000 + type: string + status: + description: "Transaction status (1 for success, 0 for failure)" + example: 1 + type: integer + to: + description: Recipient address + example: 0x1eC4a8bB9bB9Afa24f79cC2e1423cD00B6cFf50 + nullable: true + type: string + transactionHash: + description: The transaction hash + example: 0x5a3b7f4b2c9e4a0b1f8a12c8e5f1d0e2a6b4c9d1f7e2b1a2b3c4d5e6f7a8b9c + type: string + transactionIndex: + description: Transaction index in the block + example: 3 + type: integer + type: + description: Type of transaction + example: 0x2 + type: string + required: + - blockHash + - blockNumber + - cumulativeGasUsed + - effectiveGasPrice + - from + - gasUsed + - logs + - logsBloom + - status + - transactionHash + - transactionIndex + - type + type: object + ChainDescriptor: + enum: + - ETH + - SOL + - MATIC + - ETH_TEST6 + - SOL_TEST + type: string StakingGetChainsResponse: + example: + - ETH + - ETH_TEST6 + - SOL + - SOL_TEST + - MATIC items: - type: string + $ref: '#/components/schemas/ChainDescriptor' type: array - AdditionalInfoDto: + AdditionalInfo: + description: Additional information related to the blockchain. This may include + extra details about the blockchain network. + example: + activationPeriod: 172800000 + estimatedAnnualReward: 6.48 + lockupPeriod: 172800000 properties: estimatedAnnualReward: description: "The estimated annual reward rate for the blockchain, represented\ @@ -26474,12 +29801,15 @@ components: - estimatedAnnualReward - lockupPeriod type: object - ChainInfoResponseDto: + ChainInfoResponse: example: chainDescriptor: SOL epochElapsed: 0.31 epochDuration: 172800000 - additionalInfo: "" + additionalInfo: + activationPeriod: 172800000 + estimatedAnnualReward: 6.48 + lockupPeriod: 172800000 currentEpoch: 483 properties: chainDescriptor: @@ -26500,10 +29830,7 @@ components: example: 172800000 type: number additionalInfo: - allOf: - - $ref: '#/components/schemas/AdditionalInfoDto' - description: Additional information related to the blockchain. This may - include extra details about the blockchain network. + $ref: '#/components/schemas/AdditionalInfo' required: - additionalInfo - chainDescriptor @@ -26511,14 +29838,30 @@ components: - epochDuration - epochElapsed type: object - StakeRequestDto: + StakingProvider: + description: The unique identifier of the staking provider + enum: + - kiln + - figment + - lido + example: kiln + type: string + FeeLevel: + description: "Represents the fee level for a transaction, which can be set as\ + \ slow, medium, or fast. Only one of fee/feeLevel is required." + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + StakeRequest: example: - stakeAmount: "32" - txNote: stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 of 32ETH - created on 02.04.23 - providerId: kiln - fee: "7" vaultAccountId: "22" + providerId: kiln + stakeAmount: "100" + txNote: stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 of 100 + SOL created on 02.04.23 feeLevel: MEDIUM properties: vaultAccountId: @@ -26526,9 +29869,7 @@ components: example: "22" type: string providerId: - description: The ID of the provider - example: kiln - type: string + $ref: '#/components/schemas/StakingProvider' stakeAmount: description: Amount of tokens to stake example: "32" @@ -26544,16 +29885,28 @@ components: example: "7" type: string feeLevel: - description: "Represents the fee level for a transaction, which can be set\ - \ as slow, medium, or fast. Only one of fee/feeLevel is required." - example: MEDIUM - type: string + $ref: '#/components/schemas/FeeLevel' required: - providerId - stakeAmount - vaultAccountId type: object - UnstakeRequestDto: + StakeResponse: + example: + id: afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8 + properties: + id: + description: The unique identifier of the staking position + example: afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8 + type: string + required: + - id + type: object + UnstakeRequest: + example: + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + txNote: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #SOL" + feeLevel: MEDIUM properties: id: description: id of position to unstake @@ -26565,10 +29918,7 @@ components: example: "7" type: string feeLevel: - description: "Represents the fee level for a transaction, which can be set\ - \ as slow, medium, or fast. Only one of fee/feeLevel is required." - example: MEDIUM - type: string + $ref: '#/components/schemas/FeeLevel' txNote: description: The note to associate with the transactions. example: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH" @@ -26582,7 +29932,11 @@ components: required: - id type: object - WithdrawRequestDto: + WithdrawRequest: + example: + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + txNote: "withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #SOL" + feeLevel: MEDIUM properties: id: description: id of position to withdraw @@ -26594,10 +29948,7 @@ components: example: "7" type: string feeLevel: - description: "Represents the fee level for a transaction, which can be set\ - \ as slow, medium, or fast. Only one of fee/feeLevel is required." - example: MEDIUM - type: string + $ref: '#/components/schemas/FeeLevel' txNote: description: The note to associate with the transactions. example: "withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH" @@ -26605,34 +29956,73 @@ components: required: - id type: object - ExecuteActionRequest: - oneOf: - - $ref: '#/components/schemas/StakeRequestDto' - - $ref: '#/components/schemas/UnstakeRequestDto' - - $ref: '#/components/schemas/WithdrawRequestDto' - StakeResponseDto: + ClaimRewardsRequest: example: id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + txNote: claim rewards request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d + feeLevel: MEDIUM properties: id: - description: The unique identifier of the staking position - example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + description: id of position to withdraw rewards from + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850f + type: string + fee: + description: "Represents the fee for a transaction, which can be specified\ + \ as a percentage value. Only one of fee/feeLevel is required." + example: "7" + type: string + feeLevel: + $ref: '#/components/schemas/FeeLevel' + txNote: + description: The note to associate with the transactions. + example: "claim rewards request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ + \ #MATIC" type: string required: - id type: object - UnstakeResponseDto: - properties: {} + SplitRequest: + example: + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + amount: "20" + txNote: "split 20 SOL out of 100 SOL, created on 02.04.23" + feeLevel: MEDIUM + properties: + id: + description: id of position to split + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850f + type: string + amount: + description: Amount of tokens to be transferred to the new stake account. + example: "20" + type: string + fee: + description: "Represents the fee for a transaction, which can be specified\ + \ as a percentage value. Only one of fee/feeLevel is required." + example: "7" + type: string + feeLevel: + $ref: '#/components/schemas/FeeLevel' + txNote: + description: The note to associate with the transactions. + example: "split 20 SOL out of 100 SOL, created on 02.04.23" + type: string + required: + - amount + - id type: object - WithdrawResponseDto: - properties: {} + SplitResponse: + example: + id: afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8 + properties: + id: + description: The unique identifier of the new staking position + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + required: + - id type: object - ExecuteActionResponse: - oneOf: - - $ref: '#/components/schemas/StakeResponseDto' - - $ref: '#/components/schemas/UnstakeResponseDto' - - $ref: '#/components/schemas/WithdrawResponseDto' - RelatedTransactionDto: + RelatedTransaction: properties: txId: description: The transaction ID @@ -26646,16 +30036,28 @@ components: - completed - txId type: object - SolanaBlockchainDataDto: + SolanaBlockchainData: + description: "Additional fields per blockchain - can be empty or missing if\ + \ not initialized or no additional info exists. The type depends on the chainDescriptor\ + \ value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty\ + \ object is returned as no specific data is available." + example: + stakeAccountAddress: 3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq properties: stakeAccountAddress: description: The stake account address matching the stakeAccountId. example: 3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq type: string + stakeAccountDerivationChangeValue: + description: The value of the change level in the BIP44 path which was used + to derive the stake account address + example: 7 + type: number required: - stakeAccountAddress + - stakeAccountDerivationChangeValue type: object - RelatedRequestDto: + RelatedRequest: properties: status: description: The status of the request @@ -26681,7 +30083,7 @@ components: - inProgress - status type: object - DelegationDto: + Delegation: example: availableActions: - unstake @@ -26765,16 +30167,14 @@ components: - txId: c80601f4-d7b1-4795-a8ee-b09cdb5b450c completed: false items: - $ref: '#/components/schemas/RelatedTransactionDto' + $ref: '#/components/schemas/RelatedTransaction' type: array validatorAddress: description: The destination address of the staking transaction. example: FwR3PbjS5iyqzLiLugrBqKSa5EKZ4vK9SKs7eQXtT59f type: string providerId: - description: The unique identifier of the staking provider - example: kiln - type: string + $ref: '#/components/schemas/StakingProvider' availableActions: description: "An array of available actions that can be performed. for example,\ \ actions like \"unstake\" or \"withdraw\"." @@ -26793,15 +30193,7 @@ components: example: c80601f4-d7b1-4795-a8ee-b09cdb5b450c type: string blockchainPositionInfo: - allOf: - - $ref: '#/components/schemas/SolanaBlockchainDataDto' - description: "Additional fields per blockchain - can be empty or missing\ - \ if not initialized or no additional info exists. The type depends on\ - \ the chainDescriptor value. For Solana (SOL), stake account address.\ - \ For Ethereum (ETH), an empty object is returned as no specific data\ - \ is available." - example: - stakeAccountAddress: 3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq + $ref: '#/components/schemas/SolanaBlockchainData' relatedRequests: description: "An array of partial unstake requests for this position, relevant\ \ only for the Lido provider. Each object includes the status of the unstake\ @@ -26816,7 +30208,7 @@ components: amount: "0.05" txId: c80601f4-d7b1-4795-a8ee-b09cdb5b450c items: - $ref: '#/components/schemas/RelatedRequestDto' + $ref: '#/components/schemas/RelatedRequest' type: array required: - amount @@ -26824,6 +30216,7 @@ components: - blockchainPositionInfo - chainDescriptor - dateCreated + - dateUpdated - id - inProgress - providerId @@ -26837,7 +30230,7 @@ components: type: object StakingGetAllDelegationsResponse: items: - $ref: '#/components/schemas/DelegationDto' + $ref: '#/components/schemas/Delegation' type: array AmountAndChainDescriptor: example: @@ -26856,7 +30249,7 @@ components: - amount - chainDescriptor type: object - DelegationSummaryDto: + DelegationSummary: example: rewardsAmount: - chainDescriptor: ETH @@ -26912,9 +30305,9 @@ components: type: object StakingGetSummaryByVaultResponse: additionalProperties: - $ref: '#/components/schemas/DelegationSummaryDto' + $ref: '#/components/schemas/DelegationSummary' type: object - ValidatorDto: + Validator: properties: chainDescriptor: description: The protocol identifier (e.g. "ETH"/"SOL") of the validator @@ -26924,22 +30317,28 @@ components: description: The service fee as a percentage out of the earned rewards example: 5 type: number + isPrivate: + description: "Is the validator private, i.e created by the user" + example: true + type: boolean required: - chainDescriptor - feePercent type: object - ProviderDto: + Provider: example: termsOfServiceUrl: https://www.kiln.fi/terms-and-conditions-for-fireblocks-customers validators: - - chainDescriptor: SOL - feePercent: 5 - chainDescriptor: ETH + feePercent: 5 + - chainDescriptor: SOL feePercent: 7 id: kiln iconUrl: https://static.fireblocks.io/staking/validators/kiln_console.png + isPrivate: true providerName: Kiln isTermsOfServiceApproved: true + isLiquidStaking: true properties: id: description: The ID of the provider @@ -26953,12 +30352,12 @@ components: description: An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider example: - - chainDescriptor: SOL - feePercent: 5 - chainDescriptor: ETH + feePercent: 5 + - chainDescriptor: SOL feePercent: 7 items: - $ref: '#/components/schemas/ValidatorDto' + $ref: '#/components/schemas/Validator' type: array iconUrl: description: URL to the validator's icon @@ -26972,21 +30371,25 @@ components: description: Indicates whether the terms of service are approved example: true type: boolean + isPrivate: + description: "Is the provider private, i.e created by the user" + example: true + type: boolean + isLiquidStaking: + description: Is the provider a liquid staking provider + example: true + type: boolean required: - - iconUrl - id + - isLiquidStaking - isTermsOfServiceApproved - providerName - - termsOfServiceUrl - validators type: object StakingGetProvidersResponse: items: - $ref: '#/components/schemas/ProviderDto' + $ref: '#/components/schemas/Provider' type: array - ProvidersResponseDto: - properties: {} - type: object SetAdminQuorumThresholdRequest: properties: adminQuorumThreshold: @@ -31665,11 +35068,25 @@ components: items: $ref: '#/components/schemas/Task' type: array + Version: + example: + hash: a1b2c3d4 + properties: + hash: + description: The version hash of the cosigner + example: a1b2c3d4 + type: string + required: + - hash + type: object Cosigner: example: archived: false name: My Cosigner 1 id: 44fcead0-7053-4831-a53a-df7fb90d440f + type: SGX + version: + hash: a1b2c3d4 properties: archived: description: Whether the cosigner is archived @@ -31683,8 +35100,19 @@ components: name: description: The name of the cosigner example: My Cosigner 1 - nullable: true type: string + type: + description: The type of the cosigner + enum: + - SANDBOX + - SGX + - GCP-CONFSPACE + - AWS-NITRO + - PLAIN + example: SGX + type: string + version: + $ref: '#/components/schemas/Version' required: - archived - id @@ -31696,9 +35124,15 @@ components: - archived: false name: My Cosigner 1 id: 44fcead0-7053-4831-a53a-df7fb90d440f + type: SGX + version: + hash: a1b2c3d4 - archived: false name: My Cosigner 1 id: 44fcead0-7053-4831-a53a-df7fb90d440f + type: SGX + version: + hash: a1b2c3d4 properties: data: description: The data of the current page @@ -31713,6 +35147,63 @@ components: required: - data type: object + AddCosignerRequest: + example: + existingCosigner: false + name: My Cosigner 1 + apiKeyId: 123e4567-e89b-12d3-a456-426614174000 + properties: + apiKeyId: + description: The id of the API key to be paired with the cosigner + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + name: + description: The name of the cosigner + example: My Cosigner 1 + minLength: 1 + type: string + existingCosigner: + default: false + description: Whether the cosigner already exists in another workspace + example: false + type: boolean + required: + - apiKeyId + - name + type: object + AddCosignerResponse: + example: + pendingCosignerId: 44fcead0-7053-4831-a53a-df7fb90d440f + existingCosigner: false + name: My Cosigner 1 + apiKeyId: 123e4567-e89b-12d3-a456-426614174000 + properties: + apiKeyId: + description: The id of the API key to be paired with the cosigner + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + name: + description: The name of the cosigner + example: My Cosigner 1 + minLength: 1 + type: string + existingCosigner: + default: false + description: Whether the cosigner already exists in another workspace + example: false + type: boolean + pendingCosignerId: + description: The unique identifier of a pending cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + required: + - apiKeyId + - name + - pendingCosignerId + type: object RenameCosigner: example: name: My Cosigner 1 @@ -31720,11 +35211,44 @@ components: name: description: The new name of the cosigner example: My Cosigner 1 - nullable: true type: string type: object + CallbackHandler: + example: + certPublicKeyHash: certPublicKeyHash + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ... + -----END PUBLIC KEY----- + url: https://example.com/callback-handler + properties: + url: + description: The callback handler's URL + example: https://example.com/callback-handler + type: string + publicKey: + description: The callback handler's public key + example: |- + -----BEGIN PUBLIC KEY----- + ... truncated ... + -----END PUBLIC KEY----- + type: string + certPublicKeyHash: + description: A hashed representation of the public key of the callback handler's + certificate + type: string + required: + - url + type: object ApiKey: example: + callbackHandler: + certPublicKeyHash: certPublicKeyHash + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ... + -----END PUBLIC KEY----- + url: https://example.com/callback-handler lastSeen: 2021-07-01T00:00:00Z id: 44fcead0-7053-4831-a53a-df7fb90d440f properties: @@ -31738,17 +35262,32 @@ components: example: 2021-07-01T00:00:00Z format: date-time type: string + callbackHandler: + $ref: '#/components/schemas/CallbackHandler' required: - id - - lastSeen type: object ApiKeysPaginatedResponse: example: next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 data: - - lastSeen: 2021-07-01T00:00:00Z + - callbackHandler: + certPublicKeyHash: certPublicKeyHash + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ... + -----END PUBLIC KEY----- + url: https://example.com/callback-handler + lastSeen: 2021-07-01T00:00:00Z id: 44fcead0-7053-4831-a53a-df7fb90d440f - - lastSeen: 2021-07-01T00:00:00Z + - callbackHandler: + certPublicKeyHash: certPublicKeyHash + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ... + -----END PUBLIC KEY----- + url: https://example.com/callback-handler + lastSeen: 2021-07-01T00:00:00Z id: 44fcead0-7053-4831-a53a-df7fb90d440f properties: data: @@ -31764,6 +35303,140 @@ components: required: - data type: object + CallbackHandlerRequest: + example: + cert: |- + -----BEGIN CERTIFICATE----- + ... truncated ... + -----END CERTIFICATE----- + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ...-----END PUBLIC KEY----- + url: https://example.com/callback-handler + properties: + url: + description: The callback handler's URL + example: https://example.com/callback-handler + type: string + publicKey: + description: The callback handler's public key + example: |- + -----BEGIN PUBLIC KEY----- + ... truncated ...-----END PUBLIC KEY----- + type: string + cert: + description: The callback handler's certificate + example: |- + -----BEGIN CERTIFICATE----- + ... truncated ... + -----END CERTIFICATE----- + type: string + required: + - url + type: object + PairApiKeyRequest: + example: + callbackHandler: + cert: |- + -----BEGIN CERTIFICATE----- + ... truncated ... + -----END CERTIFICATE----- + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ...-----END PUBLIC KEY----- + url: https://example.com/callback-handler + properties: + callbackHandler: + $ref: '#/components/schemas/CallbackHandlerRequest' + type: object + PairApiKeyResponse: + example: + callbackHandler: + cert: |- + -----BEGIN CERTIFICATE----- + ... truncated ... + -----END CERTIFICATE----- + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ...-----END PUBLIC KEY----- + url: https://example.com/callback-handler + id: 44fcead0-7053-4831-a53a-df7fb90d440f + properties: + id: + description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + callbackHandler: + $ref: '#/components/schemas/CallbackHandlerRequest' + required: + - id + type: object + UpdateCallbackHandlerRequest: + example: + callbackHandler: + cert: |- + -----BEGIN CERTIFICATE----- + ... truncated ... + -----END CERTIFICATE----- + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ...-----END PUBLIC KEY----- + url: https://example.com/callback-handler + properties: + callbackHandler: + $ref: '#/components/schemas/CallbackHandlerRequest' + type: object + UpdateCallbackHandlerResponse: + example: + callbackHandler: + cert: |- + -----BEGIN CERTIFICATE----- + ... truncated ... + -----END CERTIFICATE----- + publicKey: |- + -----BEGIN PUBLIC KEY----- + ... truncated ...-----END PUBLIC KEY----- + url: https://example.com/callback-handler + id: 44fcead0-7053-4831-a53a-df7fb90d440f + properties: + id: + description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + format: uuid + type: string + callbackHandler: + $ref: '#/components/schemas/CallbackHandlerRequest' + required: + - id + type: object + Status: + example: + type: PAIR_API_KEY + status: COMPLETED + properties: + status: + description: The status of the command + enum: + - WAITING_FOR_APPROVAL + - APPROVED + - CANCELLED + - REJECTED + - COMPLETED + example: COMPLETED + type: string + type: + description: The type of the command + enum: + - PAIR_API_KEY + - UPDATE_CALLBACK_HANDLER + - UNPAIR_API_KEY + example: PAIR_API_KEY + type: string + required: + - status + - type + type: object get_filter_parameter: properties: id: @@ -31970,58 +35643,15 @@ components: required: - additionalInfo type: object - AssetResponse_onchain: - example: - standard: ERC20 - symbol: TST3 - address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 - decimals: 18 - name: Test 3 - properties: - symbol: - description: The asset symbol - example: TST3 - type: string - name: - description: The asset name - example: Test 3 - type: string - address: - description: The asset address - example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 - type: string - decimals: - description: Number of decimals - example: 18 - type: number - standard: - description: The asset standard - example: ERC20 - type: string - required: - - decimals - - name - - symbol - type: object - AssetResponse_metadata: + AssetMedia_attributes: + description: Media attributes example: - scope: Global - deprecated: false + monochrome: true properties: - scope: - description: The scope of the asset - enum: - - Global - - Local - example: Global - type: string - deprecated: - description: Is asset deprecated - example: false + monochrome: + description: Monochrome flag + example: true type: boolean - required: - - deprecated - - scope type: object SignedMessage_signature: example: diff --git a/build.gradle b/build.gradle index 29c4407..358eefb 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '6.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AddCosignerRequest.md b/docs/AddCosignerRequest.md new file mode 100644 index 0000000..57fd31a --- /dev/null +++ b/docs/AddCosignerRequest.md @@ -0,0 +1,15 @@ + + +# AddCosignerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiKeyId** | **UUID** | The id of the API key to be paired with the cosigner | | +|**name** | **String** | The name of the cosigner | | +|**existingCosigner** | **Boolean** | Whether the cosigner already exists in another workspace | [optional] | + + + diff --git a/docs/AddCosignerResponse.md b/docs/AddCosignerResponse.md new file mode 100644 index 0000000..0d6119e --- /dev/null +++ b/docs/AddCosignerResponse.md @@ -0,0 +1,16 @@ + + +# AddCosignerResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**apiKeyId** | **UUID** | The id of the API key to be paired with the cosigner | | +|**name** | **String** | The name of the cosigner | | +|**existingCosigner** | **Boolean** | Whether the cosigner already exists in another workspace | [optional] | +|**pendingCosignerId** | **UUID** | The unique identifier of a pending cosigner | | + + + diff --git a/docs/AdditionalInfoDto.md b/docs/AdditionalInfo.md similarity index 81% rename from docs/AdditionalInfoDto.md rename to docs/AdditionalInfo.md index 96431bd..a333cec 100644 --- a/docs/AdditionalInfoDto.md +++ b/docs/AdditionalInfo.md @@ -1,7 +1,8 @@ -# AdditionalInfoDto +# AdditionalInfo +Additional information related to the blockchain. This may include extra details about the blockchain network. ## Properties diff --git a/docs/ApiKey.md b/docs/ApiKey.md index e892019..5d3dd02 100644 --- a/docs/ApiKey.md +++ b/docs/ApiKey.md @@ -8,7 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **UUID** | The unique identifier of the API key | | -|**lastSeen** | **OffsetDateTime** | The date the API key was last seen | | +|**lastSeen** | **OffsetDateTime** | The date the API key was last seen | [optional] | +|**callbackHandler** | [**CallbackHandler**](CallbackHandler.md) | | [optional] | diff --git a/docs/AssetBadRequestErrorResponse.md b/docs/AssetBadRequestErrorResponse.md index 79f8731..c0ea2fa 100644 --- a/docs/AssetBadRequestErrorResponse.md +++ b/docs/AssetBadRequestErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Bad request error code | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetClassBeta.md b/docs/AssetClassBeta.md new file mode 100644 index 0000000..0c26b23 --- /dev/null +++ b/docs/AssetClassBeta.md @@ -0,0 +1,19 @@ + + +# AssetClassBeta + +## Enum + + +* `NATIVE` (value: `"NATIVE"`) + +* `FT` (value: `"FT"`) + +* `FIAT` (value: `"FIAT"`) + +* `NFT` (value: `"NFT"`) + +* `SFT` (value: `"SFT"`) + + + diff --git a/docs/AssetConflictErrorResponse.md b/docs/AssetConflictErrorResponse.md index 063daa0..b48b6d8 100644 --- a/docs/AssetConflictErrorResponse.md +++ b/docs/AssetConflictErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Conflict error code | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetForbiddenErrorResponse.md b/docs/AssetForbiddenErrorResponse.md index f92b9d2..f6682b3 100644 --- a/docs/AssetForbiddenErrorResponse.md +++ b/docs/AssetForbiddenErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Forbidden error code | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetInternalServerErrorResponse.md b/docs/AssetInternalServerErrorResponse.md index f1ddcb6..5202f56 100644 --- a/docs/AssetInternalServerErrorResponse.md +++ b/docs/AssetInternalServerErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Internal server error code | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetMedia.md b/docs/AssetMedia.md new file mode 100644 index 0000000..15cfef1 --- /dev/null +++ b/docs/AssetMedia.md @@ -0,0 +1,24 @@ + + +# AssetMedia + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | Media URL | | +|**type** | [**TypeEnum**](#TypeEnum) | Media type | | +|**attributes** | [**AssetMediaAttributes**](AssetMediaAttributes.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SVG_XML | "image/svg+xml" | +| PNG | "image/png" | + + + diff --git a/docs/AssetMediaAttributes.md b/docs/AssetMediaAttributes.md new file mode 100644 index 0000000..c05b780 --- /dev/null +++ b/docs/AssetMediaAttributes.md @@ -0,0 +1,14 @@ + + +# AssetMediaAttributes + +Media attributes + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**monochrome** | **Boolean** | Monochrome flag | [optional] | + + + diff --git a/docs/AssetResponseMetadata.md b/docs/AssetMetadata.md similarity index 93% rename from docs/AssetResponseMetadata.md rename to docs/AssetMetadata.md index f9cd177..f78cdda 100644 --- a/docs/AssetResponseMetadata.md +++ b/docs/AssetMetadata.md @@ -1,6 +1,6 @@ -# AssetResponseMetadata +# AssetMetadata ## Properties diff --git a/docs/AssetMetadataBeta.md b/docs/AssetMetadataBeta.md new file mode 100644 index 0000000..0e39f42 --- /dev/null +++ b/docs/AssetMetadataBeta.md @@ -0,0 +1,27 @@ + + +# AssetMetadataBeta + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**scope** | [**ScopeEnum**](#ScopeEnum) | The scope of the asset | | +|**deprecated** | **Boolean** | Is asset deprecated | | +|**deprecationReferralId** | **String** | New asset ID replacement | [optional] | +|**verified** | **Boolean** | Is asset verified by Fireblocks | | +|**website** | **String** | Vendor’s website | [optional] | +|**media** | [**List<AssetMedia>**](AssetMedia.md) | Asset’s media | [optional] | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| GLOBAL | "Global" | +| LOCAL | "Local" | + + + diff --git a/docs/AssetNotFoundErrorResponse.md b/docs/AssetNotFoundErrorResponse.md index de220c6..a98c983 100644 --- a/docs/AssetNotFoundErrorResponse.md +++ b/docs/AssetNotFoundErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Not found error code | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetResponseOnchain.md b/docs/AssetOnchain.md similarity index 94% rename from docs/AssetResponseOnchain.md rename to docs/AssetOnchain.md index 9ed25f3..c52e9da 100644 --- a/docs/AssetResponseOnchain.md +++ b/docs/AssetOnchain.md @@ -1,6 +1,6 @@ -# AssetResponseOnchain +# AssetOnchain ## Properties diff --git a/docs/AssetOnchainBeta.md b/docs/AssetOnchainBeta.md new file mode 100644 index 0000000..c679b77 --- /dev/null +++ b/docs/AssetOnchainBeta.md @@ -0,0 +1,17 @@ + + +# AssetOnchainBeta + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | The asset symbol | | +|**name** | **String** | The asset name | | +|**address** | **String** | The asset address | [optional] | +|**decimals** | **BigDecimal** | Number of decimals | | +|**standards** | **List<String>** | Supported standards | [optional] | + + + diff --git a/docs/AssetPriceForbiddenErrorResponse.md b/docs/AssetPriceForbiddenErrorResponse.md index 57c53bc..4dd22af 100644 --- a/docs/AssetPriceForbiddenErrorResponse.md +++ b/docs/AssetPriceForbiddenErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Forbidden error message | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetPriceNotFoundErrorResponse.md b/docs/AssetPriceNotFoundErrorResponse.md index 1aa559e..06146c0 100644 --- a/docs/AssetPriceNotFoundErrorResponse.md +++ b/docs/AssetPriceNotFoundErrorResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**message** | **String** | Not found error message | | -|**code** | **String** | Error code | | +|**code** | **BigDecimal** | Error code | | diff --git a/docs/AssetResponse.md b/docs/AssetResponse.md index 7142e69..025bbd5 100644 --- a/docs/AssetResponse.md +++ b/docs/AssetResponse.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**legacyId** | **String** | | | |**assetClass** | [**AssetClassEnum**](#AssetClassEnum) | | | -|**onchain** | [**AssetResponseOnchain**](AssetResponseOnchain.md) | | | -|**metadata** | [**AssetResponseMetadata**](AssetResponseMetadata.md) | | | +|**onchain** | [**AssetOnchain**](AssetOnchain.md) | | | +|**metadata** | [**AssetMetadata**](AssetMetadata.md) | | | diff --git a/docs/AssetResponseBeta.md b/docs/AssetResponseBeta.md new file mode 100644 index 0000000..fe34f45 --- /dev/null +++ b/docs/AssetResponseBeta.md @@ -0,0 +1,20 @@ + + +# AssetResponseBeta + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The ID of the asset | | +|**legacyId** | **String** | The Legacy ID of the asset | | +|**blockchainId** | **String** | The ID of the asset's blockchain | [optional] | +|**displayName** | **String** | Asset's display name | [optional] | +|**displaySymbol** | **String** | Asset's display symbol | [optional] | +|**assetClass** | **AssetClassBeta** | | | +|**onchain** | [**AssetOnchainBeta**](AssetOnchainBeta.md) | | [optional] | +|**metadata** | [**AssetMetadataBeta**](AssetMetadataBeta.md) | | | + + + diff --git a/docs/AuditLogData.md b/docs/AuditLogData.md index 7642dc0..0b89ac3 100644 --- a/docs/AuditLogData.md +++ b/docs/AuditLogData.md @@ -8,8 +8,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | The unique identifier of the audit log | [optional] | -|**timestamp** | **String** | The timestamp of the audit log | [optional] | -|**createdAt** | **String** | The timestamp of the audit log creation | [optional] | +|**timestamp** | **BigDecimal** | The timestamp of the audit log | [optional] | +|**createdAt** | **BigDecimal** | The timestamp of the audit log creation | [optional] | |**user** | **String** | The user who performed the action | [optional] | |**subject** | **String** | The subject of the action | [optional] | |**event** | **String** | The event that was performed | [optional] | diff --git a/docs/BlockchainExplorer.md b/docs/BlockchainExplorer.md new file mode 100644 index 0000000..292019f --- /dev/null +++ b/docs/BlockchainExplorer.md @@ -0,0 +1,16 @@ + + +# BlockchainExplorer + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**base** | **String** | Explorer base url | | +|**address** | **String** | Explorer address url | [optional] | +|**tx** | **String** | Explorer transaction url | [optional] | +|**token** | **String** | Explorer token url | [optional] | + + + diff --git a/docs/BlockchainMedia.md b/docs/BlockchainMedia.md new file mode 100644 index 0000000..71a23d5 --- /dev/null +++ b/docs/BlockchainMedia.md @@ -0,0 +1,23 @@ + + +# BlockchainMedia + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | Media URL | | +|**type** | [**TypeEnum**](#TypeEnum) | Media type | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SVG_XML | "image/svg+xml" | +| PNG | "image/png" | + + + diff --git a/docs/BlockchainMetadata.md b/docs/BlockchainMetadata.md new file mode 100644 index 0000000..35e80c9 --- /dev/null +++ b/docs/BlockchainMetadata.md @@ -0,0 +1,25 @@ + + +# BlockchainMetadata + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**scope** | [**ScopeEnum**](#ScopeEnum) | Is blockchain listed on all workspaces? Global or Local | | +|**deprecated** | **Boolean** | Is blockchain deprecated | | +|**media** | [**List<BlockchainMedia>**](BlockchainMedia.md) | Blockchain’s media | [optional] | +|**explorer** | [**BlockchainExplorer**](BlockchainExplorer.md) | | [optional] | + + + +## Enum: ScopeEnum + +| Name | Value | +|---- | -----| +| GLOBAL | "Global" | +| LOCAL | "Local" | + + + diff --git a/docs/BlockchainNotFoundErrorResponse.md b/docs/BlockchainNotFoundErrorResponse.md new file mode 100644 index 0000000..b4f17f0 --- /dev/null +++ b/docs/BlockchainNotFoundErrorResponse.md @@ -0,0 +1,14 @@ + + +# BlockchainNotFoundErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Not found error code | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/BlockchainOnchain.md b/docs/BlockchainOnchain.md new file mode 100644 index 0000000..90b5093 --- /dev/null +++ b/docs/BlockchainOnchain.md @@ -0,0 +1,25 @@ + + +# BlockchainOnchain + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**protocol** | **String** | The protocol of the blockchain | | +|**chainId** | **String** | Network/chain ID | [optional] | +|**test** | **Boolean** | Is test blockchain | | +|**signingAlgo** | [**SigningAlgoEnum**](#SigningAlgoEnum) | Signing alghorithm | | + + + +## Enum: SigningAlgoEnum + +| Name | Value | +|---- | -----| +| ECDSA_SECP256K1 | "ECDSA_SECP256K1" | +| EDDSA_ED25519 | "EDDSA_ED25519" | + + + diff --git a/docs/BlockchainResponse.md b/docs/BlockchainResponse.md new file mode 100644 index 0000000..0a55f0b --- /dev/null +++ b/docs/BlockchainResponse.md @@ -0,0 +1,18 @@ + + +# BlockchainResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The ID of the blockchain | | +|**legacyId** | **String** | The old blockchain ID representation of the blockchain | | +|**displayName** | **String** | The name of the blockchain | | +|**nativeAssetId** | **String** | Native asset ID of this blockchain | | +|**onchain** | [**BlockchainOnchain**](BlockchainOnchain.md) | | | +|**metadata** | [**BlockchainMetadata**](BlockchainMetadata.md) | | | + + + diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index db41467..d62228a 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -176,6 +176,7 @@ No authorization required | **404** | - Invalid address, could not get asset information. Error code 1003 | - | | **409** | - The asset is already supported globally. Error code: 1001 - The asset has already been added to this workspace. Error code: 1002 | - | | **500** | Failed to create asset | - | +| **0** | Error Response | * X-Request-ID -
| ## setAssetPrice diff --git a/docs/BlockchainsAssetsBetaApi.md b/docs/BlockchainsAssetsBetaApi.md new file mode 100644 index 0000000..b748f5d --- /dev/null +++ b/docs/BlockchainsAssetsBetaApi.md @@ -0,0 +1,374 @@ +# BlockchainsAssetsBetaApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getAssetById**](BlockchainsAssetsBetaApi.md#getAssetById) | **GET** /assets/{id} | Get an asset | +| [**getBlockchainById**](BlockchainsAssetsBetaApi.md#getBlockchainById) | **GET** /blockchains/{id} | Get an blockchain | +| [**listAssets**](BlockchainsAssetsBetaApi.md#listAssets) | **GET** /assets | List assets | +| [**listBlockchains**](BlockchainsAssetsBetaApi.md#listBlockchains) | **GET** /blockchains | List blockchains | + + + +## getAssetById + +> CompletableFuture> getAssetById getAssetById(id, idempotencyKey) + +Get an asset + +Returns an asset by ID or legacyID.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.BlockchainsAssetsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String id = "ETH"; // String | The ID or legacyId of the asset + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getAssetById(id, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling BlockchainsAssetsBetaApi#getAssetById"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling BlockchainsAssetsBetaApi#getAssetById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The ID or legacyId of the asset | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Asset with requested identification | * X-Request-ID -
| +| **404** | - Asset with specified ID or legacy ID is not found. Error code 1504 | - | +| **500** | Error occurred while getting an asset | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getBlockchainById + +> CompletableFuture> getBlockchainById getBlockchainById(id) + +Get an blockchain + +Returns an blockchain by ID or legacyID.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.BlockchainsAssetsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String id = "ETH"; // String | The ID or legacyId of the blockchain + try { + CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getBlockchainById(id); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling BlockchainsAssetsBetaApi#getBlockchainById"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling BlockchainsAssetsBetaApi#getBlockchainById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The ID or legacyId of the blockchain | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Blockchain with requested identification | * X-Request-ID -
| +| **404** | - Blockchain with specified ID or legacy ID is not found. Error code 1505 | - | +| **500** | Error occurred while getting an blockchain | - | +| **0** | Error Response | * X-Request-ID -
| + + +## listAssets + +> CompletableFuture> listAssets listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey) + +List assets + +Returns all asset type supported by Fireblocks.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.BlockchainsAssetsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String blockchainId = "0f672204-a28b-464a-b318-a387abd3d3c7"; // String | Blockchain id of the assets + AssetClassBeta assetClass = AssetClassBeta.fromValue("NATIVE"); // AssetClassBeta | Assets class + String symbol = "ETH"; // String | Assets onchain symbol + String scope = "Global"; // String | Scope of the assets + Boolean deprecated = false; // Boolean | Are assets deprecated + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Next page cursor to fetch + BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling BlockchainsAssetsBetaApi#listAssets"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling BlockchainsAssetsBetaApi#listAssets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **blockchainId** | **String**| Blockchain id of the assets | [optional] | +| **assetClass** | [**AssetClassBeta**](.md)| Assets class | [optional] [enum: NATIVE, FT, FIAT, NFT, SFT] | +| **symbol** | **String**| Assets onchain symbol | [optional] | +| **scope** | **String**| Scope of the assets | [optional] [enum: Global, Local] | +| **deprecated** | **Boolean**| Are assets deprecated | [optional] | +| **pageCursor** | **String**| Next page cursor to fetch | [optional] | +| **pageSize** | **BigDecimal**| Items per page | [optional] [default to 500] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of assets | - | +| **500** | Error occurred while listing assets | - | +| **0** | Error Response | * X-Request-ID -
| + + +## listBlockchains + +> CompletableFuture> listBlockchains listBlockchains(protocol, deprecated, test, pageCursor, pageSize) + +List blockchains + +Returns all blockchains supported by Fireblocks.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.BlockchainsAssetsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String protocol = "SOL"; // String | Blockchain protocol + Boolean deprecated = false; // Boolean | Is blockchain deprecated + Boolean test = false; // Boolean | Is test blockchain + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to fetch + BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page (max 500) + try { + CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listBlockchains(protocol, deprecated, test, pageCursor, pageSize); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling BlockchainsAssetsBetaApi#listBlockchains"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling BlockchainsAssetsBetaApi#listBlockchains"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **protocol** | **String**| Blockchain protocol | [optional] | +| **deprecated** | **Boolean**| Is blockchain deprecated | [optional] | +| **test** | **Boolean**| Is test blockchain | [optional] | +| **pageCursor** | **String**| Page cursor to fetch | [optional] | +| **pageSize** | **BigDecimal**| Items per page (max 500) | [optional] [default to 500] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of supported blockchains | - | +| **500** | Error occurred while listing blockchains | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/CallbackHandler.md b/docs/CallbackHandler.md new file mode 100644 index 0000000..b9658ad --- /dev/null +++ b/docs/CallbackHandler.md @@ -0,0 +1,15 @@ + + +# CallbackHandler + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | The callback handler's URL | | +|**publicKey** | **String** | The callback handler's public key | [optional] | +|**certPublicKeyHash** | **String** | A hashed representation of the public key of the callback handler's certificate | [optional] | + + + diff --git a/docs/CallbackHandlerRequest.md b/docs/CallbackHandlerRequest.md new file mode 100644 index 0000000..2e99b43 --- /dev/null +++ b/docs/CallbackHandlerRequest.md @@ -0,0 +1,15 @@ + + +# CallbackHandlerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | The callback handler's URL | | +|**publicKey** | **String** | The callback handler's public key | [optional] | +|**cert** | **String** | The callback handler's certificate | [optional] | + + + diff --git a/docs/ChainDescriptor.md b/docs/ChainDescriptor.md new file mode 100644 index 0000000..9f2c08b --- /dev/null +++ b/docs/ChainDescriptor.md @@ -0,0 +1,19 @@ + + +# ChainDescriptor + +## Enum + + +* `ETH` (value: `"ETH"`) + +* `SOL` (value: `"SOL"`) + +* `MATIC` (value: `"MATIC"`) + +* `ETH_TEST6` (value: `"ETH_TEST6"`) + +* `SOL_TEST` (value: `"SOL_TEST"`) + + + diff --git a/docs/ChainInfoResponseDto.md b/docs/ChainInfoResponse.md similarity index 73% rename from docs/ChainInfoResponseDto.md rename to docs/ChainInfoResponse.md index d6465b7..3030464 100644 --- a/docs/ChainInfoResponseDto.md +++ b/docs/ChainInfoResponse.md @@ -1,6 +1,6 @@ -# ChainInfoResponseDto +# ChainInfoResponse ## Properties @@ -11,7 +11,7 @@ |**currentEpoch** | **BigDecimal** | The current epoch number of the blockchain network. | | |**epochElapsed** | **BigDecimal** | The percentage of time that has elapsed within the current epoch, represented as a decimal value between 0 and 1. | | |**epochDuration** | **BigDecimal** | The total duration in milliseconds of a single epoch. | | -|**additionalInfo** | [**AdditionalInfoDto**](AdditionalInfoDto.md) | Additional information related to the blockchain. This may include extra details about the blockchain network. | | +|**additionalInfo** | [**AdditionalInfo**](AdditionalInfo.md) | | | diff --git a/docs/ClaimRewardsRequest.md b/docs/ClaimRewardsRequest.md new file mode 100644 index 0000000..8f1682b --- /dev/null +++ b/docs/ClaimRewardsRequest.md @@ -0,0 +1,16 @@ + + +# ClaimRewardsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | id of position to withdraw rewards from | | +|**fee** | **String** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] | +|**feeLevel** | **FeeLevel** | | [optional] | +|**txNote** | **String** | The note to associate with the transactions. | [optional] | + + + diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index ad5ade3..7cd0fd0 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -8,6 +8,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getAmlScreeningPolicy**](ComplianceApi.md#getAmlScreeningPolicy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy | | [**getPostScreeningPolicy**](ComplianceApi.md#getPostScreeningPolicy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy | | [**getScreeningPolicy**](ComplianceApi.md#getScreeningPolicy) | **GET** /screening/travel_rule/screening_policy | Travel Rule - View Screening Policy | +| [**retryRejectedTransactionBypassScreeningChecks**](ComplianceApi.md#retryRejectedTransactionBypassScreeningChecks) | **POST** /screening/transaction/{txId}/bypass_screening_policy | Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check | | [**updateAmlScreeningConfiguration**](ComplianceApi.md#updateAmlScreeningConfiguration) | **PUT** /screening/aml/policy_configuration | Update AML Configuration | | [**updateScreeningConfiguration**](ComplianceApi.md#updateScreeningConfiguration) | **PUT** /screening/configurations | Tenant - Screening Configuration | | [**updateTravelRuleConfig**](ComplianceApi.md#updateTravelRuleConfig) | **PUT** /screening/travel_rule/policy_configuration | Update Travel Rule Configuration | @@ -326,6 +327,91 @@ No authorization required | **200** | Screening policy retrieved successfully. | - | +## retryRejectedTransactionBypassScreeningChecks + +> CompletableFuture> retryRejectedTransactionBypassScreeningChecks retryRejectedTransactionBypassScreeningChecks(txId, idempotencyKey) + +Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check + +This endpoint is restricted to Admin API users and is only applicable to outgoing transactions. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ComplianceApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String txId = "550e8400-e29b-41d4-a716-446655440000"; // String | The transaction id that was rejected by screening checks + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.compliance().retryRejectedTransactionBypassScreeningChecks(txId, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling ComplianceApi#retryRejectedTransactionBypassScreeningChecks"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling ComplianceApi#retryRejectedTransactionBypassScreeningChecks"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **txId** | **String**| The transaction id that was rejected by screening checks | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | A transaction object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## updateAmlScreeningConfiguration > CompletableFuture> updateAmlScreeningConfiguration updateAmlScreeningConfiguration(idempotencyKey) diff --git a/docs/ContractInteractionsApi.md b/docs/ContractInteractionsApi.md index cf00b74..9982a48 100644 --- a/docs/ContractInteractionsApi.md +++ b/docs/ContractInteractionsApi.md @@ -5,6 +5,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getDeployedContractAbi**](ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI | +| [**getTransactionReceipt**](ContractInteractionsApi.md#getTransactionReceipt) | **GET** /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt | Get transaction receipt | | [**readCallFunction**](ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract | | [**writeCallFunction**](ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract | @@ -97,6 +98,91 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getTransactionReceipt + +> CompletableFuture> getTransactionReceipt getTransactionReceipt(baseAssetId, txHash) + +Get transaction receipt + +Retrieve the transaction receipt by blockchain native asset ID and transaction hash + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ContractInteractionsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String baseAssetId = "ETH_TEST6"; // String | The blockchain base assetId + String txHash = "0x3b015ca0518c55d7bff4e3f5aa5d0431705771553ba8a95cf20e34cb597f57f6"; // String | The transaction hash + try { + CompletableFuture> response = fireblocks.contractInteractions().getTransactionReceipt(baseAssetId, txHash); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling ContractInteractionsApi#getTransactionReceipt"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling ContractInteractionsApi#getTransactionReceipt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **baseAssetId** | **String**| The blockchain base assetId | | +| **txHash** | **String**| The transaction hash | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Retrieved The Transaction Receipt Successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + ## readCallFunction > CompletableFuture>> readCallFunction readCallFunction(readCallFunctionDto, contractAddress, baseAssetId, idempotencyKey) diff --git a/docs/Cosigner.md b/docs/Cosigner.md index 4820b31..fce2a64 100644 --- a/docs/Cosigner.md +++ b/docs/Cosigner.md @@ -10,6 +10,20 @@ |**archived** | **Boolean** | Whether the cosigner is archived | | |**id** | **UUID** | The unique identifier of the cosigner | | |**name** | **String** | The name of the cosigner | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type of the cosigner | [optional] | +|**version** | [**Version**](Version.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| SANDBOX | "SANDBOX" | +| SGX | "SGX" | +| GCP_CONFSPACE | "GCP-CONFSPACE" | +| AWS_NITRO | "AWS-NITRO" | +| PLAIN | "PLAIN" | diff --git a/docs/CosignersBetaApi.md b/docs/CosignersBetaApi.md index e56246a..20461d7 100644 --- a/docs/CosignersBetaApi.md +++ b/docs/CosignersBetaApi.md @@ -4,14 +4,104 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**addCosigner**](CosignersBetaApi.md#addCosigner) | **POST** /cosigners | Add cosigner | | [**getApiKey**](CosignersBetaApi.md#getApiKey) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Get API key | | [**getApiKeys**](CosignersBetaApi.md#getApiKeys) | **GET** /cosigners/{cosignerId}/api_keys | Get all API keys | | [**getCosigner**](CosignersBetaApi.md#getCosigner) | **GET** /cosigners/{cosignerId} | Get cosigner | | [**getCosigners**](CosignersBetaApi.md#getCosigners) | **GET** /cosigners | Get all cosigners | +| [**getRequestStatus**](CosignersBetaApi.md#getRequestStatus) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId} | Get request status | +| [**pairApiKey**](CosignersBetaApi.md#pairApiKey) | **PUT** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Pair API key | | [**renameCosigner**](CosignersBetaApi.md#renameCosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner | +| [**unpairApiKey**](CosignersBetaApi.md#unpairApiKey) | **DELETE** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Unpair API key | +| [**updateCallbackHandler**](CosignersBetaApi.md#updateCallbackHandler) | **PATCH** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Update API key callback handler | +## addCosigner + +> CompletableFuture> addCosigner addCosigner(addCosignerRequest, idempotencyKey) + +Add cosigner + +Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + AddCosignerRequest addCosignerRequest = new AddCosignerRequest(); // AddCosignerRequest | + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.cosignersBeta().addCosigner(addCosignerRequest, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#addCosigner"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#addCosigner"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **addCosignerRequest** | [**AddCosignerRequest**](AddCosignerRequest.md)| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Pending cosigner added | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getApiKey > CompletableFuture> getApiKey getApiKey(cosignerId, apiKeyId) @@ -103,7 +193,7 @@ No authorization required Get all API keys -Get all cosigner paired API keys (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. +Get all cosigner paired API keys (paginated) ### Example @@ -356,6 +446,182 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getRequestStatus + +> CompletableFuture> getRequestStatus getRequestStatus(cosignerId, apiKeyId, requestId) + +Get request status + +Get the status of an asynchronous request + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + String apiKeyId = "44fcead0-7053-4831-a53a-df7fb90d440f"; // String | The unique identifier of the API key + String requestId = "requestId_example"; // String | + try { + CompletableFuture> response = fireblocks.cosignersBeta().getRequestStatus(cosignerId, apiKeyId, requestId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#getRequestStatus"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#getRequestStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | +| **apiKeyId** | **String**| The unique identifier of the API key | | +| **requestId** | **String**| | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The status of the request | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## pairApiKey + +> CompletableFuture> pairApiKey pairApiKey(pairApiKeyRequest, cosignerId, apiKeyId, idempotencyKey) + +Pair API key + +Pair an API key to a cosigner + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + PairApiKeyRequest pairApiKeyRequest = new PairApiKeyRequest(); // PairApiKeyRequest | + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + String apiKeyId = "44fcead0-7053-4831-a53a-df7fb90d440f"; // String | The unique identifier of the API key + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.cosignersBeta().pairApiKey(pairApiKeyRequest, cosignerId, apiKeyId, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#pairApiKey"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#pairApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pairApiKeyRequest** | [**PairApiKeyRequest**](PairApiKeyRequest.md)| | | +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | +| **apiKeyId** | **String**| The unique identifier of the API key | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | The API key object to be paired | * X-Request-ID -
* Location -
| +| **0** | Error Response | * X-Request-ID -
| + + ## renameCosigner > CompletableFuture> renameCosigner renameCosigner(renameCosigner, cosignerId) @@ -440,3 +706,175 @@ No authorization required | **200** | A cosigner object | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| + +## unpairApiKey + +> CompletableFuture> unpairApiKey unpairApiKey(cosignerId, apiKeyId) + +Unpair API key + +Unpair an API key from a cosigner + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + String apiKeyId = "44fcead0-7053-4831-a53a-df7fb90d440f"; // String | The unique identifier of the API key + try { + CompletableFuture> response = fireblocks.cosignersBeta().unpairApiKey(cosignerId, apiKeyId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#unpairApiKey"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#unpairApiKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | +| **apiKeyId** | **String**| The unique identifier of the API key | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | The API key object to be unpaired | * X-Request-ID -
* Location -
| +| **0** | Error Response | * X-Request-ID -
| + + +## updateCallbackHandler + +> CompletableFuture> updateCallbackHandler updateCallbackHandler(updateCallbackHandlerRequest, cosignerId, apiKeyId) + +Update API key callback handler + +Update the callback handler of an API key + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.CosignersBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UpdateCallbackHandlerRequest updateCallbackHandlerRequest = new UpdateCallbackHandlerRequest(); // UpdateCallbackHandlerRequest | + UUID cosignerId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the cosigner + String apiKeyId = "44fcead0-7053-4831-a53a-df7fb90d440f"; // String | The unique identifier of the API key + try { + CompletableFuture> response = fireblocks.cosignersBeta().updateCallbackHandler(updateCallbackHandlerRequest, cosignerId, apiKeyId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling CosignersBetaApi#updateCallbackHandler"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling CosignersBetaApi#updateCallbackHandler"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **updateCallbackHandlerRequest** | [**UpdateCallbackHandlerRequest**](UpdateCallbackHandlerRequest.md)| | | +| **cosignerId** | **UUID**| The unique identifier of the cosigner | | +| **apiKeyId** | **String**| The unique identifier of the API key | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | The API key object with the new callback handler | * X-Request-ID -
* Location -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md new file mode 100644 index 0000000..cd9f04a --- /dev/null +++ b/docs/CreateWebhookRequest.md @@ -0,0 +1,16 @@ + + +# CreateWebhookRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | The url of the webhook where notifications will be sent. URL must be valid, unique and https. | | +|**description** | **String** | description of the webhook. should not contain special characters. | | +|**events** | **List<WebhookEvent>** | event types the webhook will subscribe to | | +|**enabled** | **Boolean** | The status of the webhook. If false, the webhook will not receive notifications. | [optional] | + + + diff --git a/docs/DelegationDto.md b/docs/Delegation.md similarity index 51% rename from docs/DelegationDto.md rename to docs/Delegation.md index a17898d..196eda9 100644 --- a/docs/DelegationDto.md +++ b/docs/Delegation.md @@ -1,6 +1,6 @@ -# DelegationDto +# Delegation ## Properties @@ -15,16 +15,16 @@ |**amount** | **String** | Amount of tokens to stake, measured in the staked asset unit. | | |**rewardsAmount** | **String** | The amount staked in the position, measured in the staked asset unit. | | |**dateCreated** | **OffsetDateTime** | When was the request made (ISO Date). | | -|**dateUpdated** | **OffsetDateTime** | When has the position last changed (ISO Date). | [optional] | +|**dateUpdated** | **OffsetDateTime** | When has the position last changed (ISO Date). | | |**status** | **String** | The current status. | | -|**relatedTransactions** | [**List<RelatedTransactionDto>**](RelatedTransactionDto.md) | An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed. | | +|**relatedTransactions** | [**List<RelatedTransaction>**](RelatedTransaction.md) | An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed. | | |**validatorAddress** | **String** | The destination address of the staking transaction. | | -|**providerId** | **String** | The unique identifier of the staking provider | | +|**providerId** | **StakingProvider** | | | |**availableActions** | **List<String>** | An array of available actions that can be performed. for example, actions like \"unstake\" or \"withdraw\". | | |**inProgress** | **Boolean** | Indicates whether there is an ongoing action for this position (true if ongoing, false if not). | | |**inProgressTxId** | **String** | The transaction ID of the ongoing request | [optional] | -|**blockchainPositionInfo** | [**SolanaBlockchainDataDto**](SolanaBlockchainDataDto.md) | Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. | | -|**relatedRequests** | [**List<RelatedRequestDto>**](RelatedRequestDto.md) | An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers. | [optional] | +|**blockchainPositionInfo** | [**SolanaBlockchainData**](SolanaBlockchainData.md) | | | +|**relatedRequests** | [**List<RelatedRequest>**](RelatedRequest.md) | An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers. | [optional] | diff --git a/docs/DelegationSummaryDto.md b/docs/DelegationSummary.md similarity index 97% rename from docs/DelegationSummaryDto.md rename to docs/DelegationSummary.md index f792b4d..74c710b 100644 --- a/docs/DelegationSummaryDto.md +++ b/docs/DelegationSummary.md @@ -1,6 +1,6 @@ -# DelegationSummaryDto +# DelegationSummary ## Properties diff --git a/docs/EmbeddedWalletsApi.md b/docs/EmbeddedWalletsApi.md new file mode 100644 index 0000000..3b8aa50 --- /dev/null +++ b/docs/EmbeddedWalletsApi.md @@ -0,0 +1,192 @@ +# EmbeddedWalletsApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getPublicKeyInfoForAddressNcw**](EmbeddedWalletsApi.md#getPublicKeyInfoForAddressNcw) | **GET** /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info | Get the public key of an asset | +| [**getPublicKeyInfoNcw**](EmbeddedWalletsApi.md#getPublicKeyInfoNcw) | **GET** /ncw/{walletId}/public_key_info | Get the public key for a derivation path | + + + +## getPublicKeyInfoForAddressNcw + +> CompletableFuture> getPublicKeyInfoForAddressNcw getPublicKeyInfoForAddressNcw(walletId, accountId, assetId, change, addressIndex, compressed) + +Get the public key of an asset + +Gets the public key of an asset associated with a specific account within a Non-Custodial Wallet + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.EmbeddedWalletsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String walletId = "550e8400-e29b-41d4-a716-446655440000"; // String | The ID of the Non-Custodial wallet + String accountId = "0"; // String | The ID of the account + String assetId = "BTC"; // String | The ID of the asset + BigDecimal change = new BigDecimal("0"); // BigDecimal | BIP44 derivation path - change value + BigDecimal addressIndex = new BigDecimal("0"); // BigDecimal | BIP44 derivation path - index value + Boolean compressed = true; // Boolean | Compressed/Uncompressed public key format + try { + CompletableFuture> response = fireblocks.embeddedWallets().getPublicKeyInfoForAddressNcw(walletId, accountId, assetId, change, addressIndex, compressed); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling EmbeddedWalletsApi#getPublicKeyInfoForAddressNcw"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedWalletsApi#getPublicKeyInfoForAddressNcw"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **walletId** | **String**| The ID of the Non-Custodial wallet | | +| **accountId** | **String**| The ID of the account | | +| **assetId** | **String**| The ID of the asset | | +| **change** | **BigDecimal**| BIP44 derivation path - change value | | +| **addressIndex** | **BigDecimal**| BIP44 derivation path - index value | | +| **compressed** | **Boolean**| Compressed/Uncompressed public key format | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Public Key Information | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getPublicKeyInfoNcw + +> CompletableFuture> getPublicKeyInfoNcw getPublicKeyInfoNcw(walletId, derivationPath, algorithm, compressed) + +Get the public key for a derivation path + +Gets the public key information based on derivation path and signing algorithm within a Non-Custodial Wallet + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.EmbeddedWalletsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String walletId = "550e8400-e29b-41d4-a716-446655440000"; // String | The ID of the Non-Custodial wallet + String derivationPath = "[44,0,0,0,0]"; // String | An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. + String algorithm = "MPC_ECDSA_SECP256K1"; // String | Elliptic Curve + Boolean compressed = true; // Boolean | + try { + CompletableFuture> response = fireblocks.embeddedWallets().getPublicKeyInfoNcw(walletId, derivationPath, algorithm, compressed); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling EmbeddedWalletsApi#getPublicKeyInfoNcw"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedWalletsApi#getPublicKeyInfoNcw"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **walletId** | **String**| The ID of the Non-Custodial wallet | | +| **derivationPath** | **String**| An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. | | +| **algorithm** | **String**| Elliptic Curve | [enum: MPC_ECDSA_SECP256K1, MPC_ECDSA_SECP256R1, MPC_EDDSA_ED25519] | +| **compressed** | **Boolean**| | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Public key information | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ExecuteActionRequest.md b/docs/ExecuteActionRequest.md deleted file mode 100644 index 1dd9a3b..0000000 --- a/docs/ExecuteActionRequest.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# ExecuteActionRequest - -## oneOf schemas -* [StakeRequestDto](StakeRequestDto.md) -* [UnstakeRequestDto](UnstakeRequestDto.md) -* [WithdrawRequestDto](WithdrawRequestDto.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.ExecuteActionRequest; -import com.fireblocks.sdk.model.StakeRequestDto; -import com.fireblocks.sdk.model.UnstakeRequestDto; -import com.fireblocks.sdk.model.WithdrawRequestDto; - -public class Example { - public static void main(String[] args) { - ExecuteActionRequest exampleExecuteActionRequest = new ExecuteActionRequest(); - - // create a new StakeRequestDto - StakeRequestDto exampleStakeRequestDto = new StakeRequestDto(); - // set ExecuteActionRequest to StakeRequestDto - exampleExecuteActionRequest.setActualInstance(exampleStakeRequestDto); - // to get back the StakeRequestDto set earlier - StakeRequestDto testStakeRequestDto = (StakeRequestDto) exampleExecuteActionRequest.getActualInstance(); - - // create a new UnstakeRequestDto - UnstakeRequestDto exampleUnstakeRequestDto = new UnstakeRequestDto(); - // set ExecuteActionRequest to UnstakeRequestDto - exampleExecuteActionRequest.setActualInstance(exampleUnstakeRequestDto); - // to get back the UnstakeRequestDto set earlier - UnstakeRequestDto testUnstakeRequestDto = (UnstakeRequestDto) exampleExecuteActionRequest.getActualInstance(); - - // create a new WithdrawRequestDto - WithdrawRequestDto exampleWithdrawRequestDto = new WithdrawRequestDto(); - // set ExecuteActionRequest to WithdrawRequestDto - exampleExecuteActionRequest.setActualInstance(exampleWithdrawRequestDto); - // to get back the WithdrawRequestDto set earlier - WithdrawRequestDto testWithdrawRequestDto = (WithdrawRequestDto) exampleExecuteActionRequest.getActualInstance(); - } -} -``` - - diff --git a/docs/ExecuteActionResponse.md b/docs/ExecuteActionResponse.md deleted file mode 100644 index 4b545e4..0000000 --- a/docs/ExecuteActionResponse.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# ExecuteActionResponse - -## oneOf schemas -* [Object](Object.md) -* [StakeResponseDto](StakeResponseDto.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.ExecuteActionResponse; -import com.fireblocks.sdk.model.Object; -import com.fireblocks.sdk.model.StakeResponseDto; - -public class Example { - public static void main(String[] args) { - ExecuteActionResponse exampleExecuteActionResponse = new ExecuteActionResponse(); - - // create a new Object - Object exampleObject = new Object(); - // set ExecuteActionResponse to Object - exampleExecuteActionResponse.setActualInstance(exampleObject); - // to get back the Object set earlier - Object testObject = (Object) exampleExecuteActionResponse.getActualInstance(); - - // create a new StakeResponseDto - StakeResponseDto exampleStakeResponseDto = new StakeResponseDto(); - // set ExecuteActionResponse to StakeResponseDto - exampleExecuteActionResponse.setActualInstance(exampleStakeResponseDto); - // to get back the StakeResponseDto set earlier - StakeResponseDto testStakeResponseDto = (StakeResponseDto) exampleExecuteActionResponse.getActualInstance(); - } -} -``` - - diff --git a/docs/FeeLevel.md b/docs/FeeLevel.md new file mode 100644 index 0000000..0d7c1d1 --- /dev/null +++ b/docs/FeeLevel.md @@ -0,0 +1,15 @@ + + +# FeeLevel + +## Enum + + +* `LOW` (value: `"LOW"`) + +* `MEDIUM` (value: `"MEDIUM"`) + +* `HIGH` (value: `"HIGH"`) + + + diff --git a/docs/GetMpcKeysResponse.md b/docs/GetMpcKeysResponse.md new file mode 100644 index 0000000..35b4926 --- /dev/null +++ b/docs/GetMpcKeysResponse.md @@ -0,0 +1,14 @@ + + +# GetMpcKeysResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tenantId** | **String** | The workspace id of the keys | | +|**keys** | [**List<MpcKey>**](MpcKey.md) | The keys that are associated with the workspace | | + + + diff --git a/docs/KeysBetaApi.md b/docs/KeysBetaApi.md new file mode 100644 index 0000000..7e8c793 --- /dev/null +++ b/docs/KeysBetaApi.md @@ -0,0 +1,172 @@ +# KeysBetaApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getMpcKeysList**](KeysBetaApi.md#getMpcKeysList) | **GET** /keys/mpc/list | Get list of mpc keys | +| [**getMpcKeysListByUser**](KeysBetaApi.md#getMpcKeysListByUser) | **GET** /keys/mpc/list/{userId} | Get list of mpc keys by `userId` | + + + +## getMpcKeysList + +> CompletableFuture> getMpcKeysList getMpcKeysList() + +Get list of mpc keys + +Returns a list of MPC signing keys of the workspace. For each key, the list of players associated with it is attached. **Note:** This endpoint is currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.KeysBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + try { + CompletableFuture> response = fireblocks.keysBeta().getMpcKeysList(); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling KeysBetaApi#getMpcKeysList"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling KeysBetaApi#getMpcKeysList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of mpc keys | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getMpcKeysListByUser + +> CompletableFuture> getMpcKeysListByUser getMpcKeysListByUser(userId) + +Get list of mpc keys by `userId` + +Returns a list of MPC signing keys of a specific user. For each key, the list of players associated with it is attached. **Note:** This endpoint is currently in beta and might be subject to changes. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.KeysBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String userId = "46a92767-5f93-4a46-9eed-f012196bb4fc"; // String | The id for the user + try { + CompletableFuture> response = fireblocks.keysBeta().getMpcKeysListByUser(userId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling KeysBetaApi#getMpcKeysListByUser"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling KeysBetaApi#getMpcKeysListByUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **userId** | **String**| The id for the user | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of mpc keys | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ListAssetsResponse.md b/docs/ListAssetsResponse.md new file mode 100644 index 0000000..d25f90d --- /dev/null +++ b/docs/ListAssetsResponse.md @@ -0,0 +1,14 @@ + + +# ListAssetsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AssetResponseBeta>**](AssetResponseBeta.md) | The data of the current page | | +|**next** | **String** | Cursor to the next page | | + + + diff --git a/docs/ListBlockchainsResponse.md b/docs/ListBlockchainsResponse.md new file mode 100644 index 0000000..ea78efd --- /dev/null +++ b/docs/ListBlockchainsResponse.md @@ -0,0 +1,14 @@ + + +# ListBlockchainsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<BlockchainResponse>**](BlockchainResponse.md) | The data of the current page | | +|**next** | **String** | Cursor to the next page | | + + + diff --git a/docs/MpcKey.md b/docs/MpcKey.md new file mode 100644 index 0000000..757a8da --- /dev/null +++ b/docs/MpcKey.md @@ -0,0 +1,17 @@ + + +# MpcKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**keyId** | **String** | | | +|**userId** | **String** | The user id that owns the key | | +|**algorithm** | **BigDecimal** | The algorithm of the key | | +|**players** | [**List<Players>**](Players.md) | The players that are associated with the key | | +|**lastPreprocessedIndex** | **BigDecimal** | The last index used on this key | [optional] | + + + diff --git a/docs/Notification.md b/docs/Notification.md new file mode 100644 index 0000000..f43d5c1 --- /dev/null +++ b/docs/Notification.md @@ -0,0 +1,20 @@ + + +# Notification + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The id of the Notification | | +|**createdAt** | **OffsetDateTime** | The creation date of the notification | | +|**updatedAt** | **OffsetDateTime** | The date when the notification was updated | | +|**status** | **NotificationStatus** | | | +|**eventType** | **WebhookEvent** | | | +|**eventVersion** | **BigDecimal** | The event version of the Notification | | +|**resourceId** | **UUID** | The resource id of the event which the Notification is listen to | [optional] | +|**attempts** | **List<String>** | The attempts related to Notification | [optional] | + + + diff --git a/docs/NotificationPaginatedResponse.md b/docs/NotificationPaginatedResponse.md new file mode 100644 index 0000000..a8d2408 --- /dev/null +++ b/docs/NotificationPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# NotificationPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<Notification>**](Notification.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/NotificationStatus.md b/docs/NotificationStatus.md new file mode 100644 index 0000000..be48ffb --- /dev/null +++ b/docs/NotificationStatus.md @@ -0,0 +1,15 @@ + + +# NotificationStatus + +## Enum + + +* `COMPLETED` (value: `"COMPLETED"`) + +* `FAILED` (value: `"FAILED"`) + +* `IN_PROGRESS` (value: `"IN_PROGRESS"`) + + + diff --git a/docs/NotificationWithData.md b/docs/NotificationWithData.md new file mode 100644 index 0000000..95f6a1a --- /dev/null +++ b/docs/NotificationWithData.md @@ -0,0 +1,21 @@ + + +# NotificationWithData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | | | +|**createdAt** | **OffsetDateTime** | The creation date of the notification | | +|**updatedAt** | **OffsetDateTime** | The date when the notification was updated | | +|**status** | **NotificationStatus** | | | +|**eventType** | **WebhookEvent** | | | +|**eventVersion** | **BigDecimal** | The event version which the Notification is listen to | | +|**resourceId** | **UUID** | The resource id of the event which the Notification is listen to | [optional] | +|**attempts** | **List<String>** | The attempts related to Notification | | +|**data** | **Object** | notification data | [optional] | + + + diff --git a/docs/PairApiKeyRequest.md b/docs/PairApiKeyRequest.md new file mode 100644 index 0000000..cd07f6e --- /dev/null +++ b/docs/PairApiKeyRequest.md @@ -0,0 +1,13 @@ + + +# PairApiKeyRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**callbackHandler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] | + + + diff --git a/docs/PairApiKeyResponse.md b/docs/PairApiKeyResponse.md new file mode 100644 index 0000000..2857408 --- /dev/null +++ b/docs/PairApiKeyResponse.md @@ -0,0 +1,14 @@ + + +# PairApiKeyResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The unique identifier of the API key | | +|**callbackHandler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] | + + + diff --git a/docs/Players.md b/docs/Players.md new file mode 100644 index 0000000..fb0746b --- /dev/null +++ b/docs/Players.md @@ -0,0 +1,23 @@ + + +# Players + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | id of the player | | +|**type** | [**TypeEnum**](#TypeEnum) | Type of the player | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| MOBILE | "MOBILE" | +| CLOUD | "CLOUD" | + + + diff --git a/docs/Provider.md b/docs/Provider.md new file mode 100644 index 0000000..04fce66 --- /dev/null +++ b/docs/Provider.md @@ -0,0 +1,20 @@ + + +# Provider + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The ID of the provider | | +|**providerName** | **String** | Name of the provider | | +|**validators** | [**List<Validator>**](Validator.md) | An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider | | +|**iconUrl** | **String** | URL to the validator's icon | [optional] | +|**termsOfServiceUrl** | **String** | URL to the terms of service | [optional] | +|**isTermsOfServiceApproved** | **Boolean** | Indicates whether the terms of service are approved | | +|**isPrivate** | **Boolean** | Is the provider private, i.e created by the user | [optional] | +|**isLiquidStaking** | **Boolean** | Is the provider a liquid staking provider | | + + + diff --git a/docs/ProviderDto.md b/docs/ProviderDto.md deleted file mode 100644 index 981bc9f..0000000 --- a/docs/ProviderDto.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# ProviderDto - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The ID of the provider | | -|**providerName** | **String** | Name of the provider | | -|**validators** | [**List<ValidatorDto>**](ValidatorDto.md) | An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider | | -|**iconUrl** | **String** | URL to the validator's icon | | -|**termsOfServiceUrl** | **String** | URL to the terms of service | | -|**isTermsOfServiceApproved** | **Boolean** | Indicates whether the terms of service are approved | | - - - diff --git a/docs/PublicKeyInformation.md b/docs/PublicKeyInformation.md index 381d8a0..d1fd403 100644 --- a/docs/PublicKeyInformation.md +++ b/docs/PublicKeyInformation.md @@ -7,9 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**algorithm** | **String** | | [optional] | -|**derivationPath** | **List<BigDecimal>** | | [optional] | -|**publicKey** | **String** | | [optional] | +|**algorithm** | [**AlgorithmEnum**](#AlgorithmEnum) | Elliptic Curve | [optional] | +|**derivationPath** | **List<Integer>** | BIP44 derivation path | [optional] | +|**publicKey** | **String** | Compressed/Uncompressed public key value in hex representation | [optional] | + + + +## Enum: AlgorithmEnum + +| Name | Value | +|---- | -----| +| ECDSA_SECP256K1 | "MPC_ECDSA_SECP256K1" | +| ECDSA_SECP256R1 | "MPC_ECDSA_SECP256R1" | +| EDDSA_ED25519 | "MPC_EDDSA_ED25519" | diff --git a/docs/RelatedRequestDto.md b/docs/RelatedRequest.md similarity index 96% rename from docs/RelatedRequestDto.md rename to docs/RelatedRequest.md index 58f0cab..2cacf8a 100644 --- a/docs/RelatedRequestDto.md +++ b/docs/RelatedRequest.md @@ -1,6 +1,6 @@ -# RelatedRequestDto +# RelatedRequest ## Properties diff --git a/docs/RelatedTransactionDto.md b/docs/RelatedTransaction.md similarity index 91% rename from docs/RelatedTransactionDto.md rename to docs/RelatedTransaction.md index cc7af79..f978a71 100644 --- a/docs/RelatedTransactionDto.md +++ b/docs/RelatedTransaction.md @@ -1,6 +1,6 @@ -# RelatedTransactionDto +# RelatedTransaction ## Properties diff --git a/docs/SolanaBlockchainData.md b/docs/SolanaBlockchainData.md new file mode 100644 index 0000000..d34491e --- /dev/null +++ b/docs/SolanaBlockchainData.md @@ -0,0 +1,15 @@ + + +# SolanaBlockchainData + +Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stakeAccountAddress** | **String** | The stake account address matching the stakeAccountId. | | +|**stakeAccountDerivationChangeValue** | **BigDecimal** | The value of the change level in the BIP44 path which was used to derive the stake account address | | + + + diff --git a/docs/SolanaBlockchainDataDto.md b/docs/SolanaBlockchainDataDto.md deleted file mode 100644 index 81b027f..0000000 --- a/docs/SolanaBlockchainDataDto.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SolanaBlockchainDataDto - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**stakeAccountAddress** | **String** | The stake account address matching the stakeAccountId. | | - - - diff --git a/docs/SplitRequest.md b/docs/SplitRequest.md new file mode 100644 index 0000000..3b48003 --- /dev/null +++ b/docs/SplitRequest.md @@ -0,0 +1,17 @@ + + +# SplitRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | id of position to split | | +|**amount** | **String** | Amount of tokens to be transferred to the new stake account. | | +|**fee** | **String** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] | +|**feeLevel** | **FeeLevel** | | [optional] | +|**txNote** | **String** | The note to associate with the transactions. | [optional] | + + + diff --git a/docs/SplitResponse.md b/docs/SplitResponse.md new file mode 100644 index 0000000..0fa06af --- /dev/null +++ b/docs/SplitResponse.md @@ -0,0 +1,13 @@ + + +# SplitResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the new staking position | | + + + diff --git a/docs/StakeRequestDto.md b/docs/StakeRequest.md similarity index 67% rename from docs/StakeRequestDto.md rename to docs/StakeRequest.md index f8e73d9..f1edba6 100644 --- a/docs/StakeRequestDto.md +++ b/docs/StakeRequest.md @@ -1,6 +1,6 @@ -# StakeRequestDto +# StakeRequest ## Properties @@ -8,11 +8,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**vaultAccountId** | **String** | The source vault account to stake from | | -|**providerId** | **String** | The ID of the provider | | +|**providerId** | **StakingProvider** | | | |**stakeAmount** | **String** | Amount of tokens to stake | | |**txNote** | **String** | The note to associate with the stake transactions. | [optional] | |**fee** | **String** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] | -|**feeLevel** | **String** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] | +|**feeLevel** | **FeeLevel** | | [optional] | diff --git a/docs/StakeResponseDto.md b/docs/StakeResponse.md similarity index 91% rename from docs/StakeResponseDto.md rename to docs/StakeResponse.md index dcae7bb..22ce8c0 100644 --- a/docs/StakeResponseDto.md +++ b/docs/StakeResponse.md @@ -1,6 +1,6 @@ -# StakeResponseDto +# StakeResponse ## Properties diff --git a/docs/StakingApi.md b/docs/StakingApi.md new file mode 100644 index 0000000..30957f9 --- /dev/null +++ b/docs/StakingApi.md @@ -0,0 +1,1102 @@ +# StakingApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**approveTermsOfServiceByProviderId**](StakingApi.md#approveTermsOfServiceByProviderId) | **POST** /staking/providers/{providerId}/approveTermsOfService | Approve staking terms of service | +| [**claimRewards**](StakingApi.md#claimRewards) | **POST** /staking/chains/{chainDescriptor}/claim_rewards | Execute a Claim Rewards operation | +| [**getAllDelegations**](StakingApi.md#getAllDelegations) | **GET** /staking/positions | List staking positions details | +| [**getChainInfo**](StakingApi.md#getChainInfo) | **GET** /staking/chains/{chainDescriptor}/chainInfo | Get chain-specific staking summary | +| [**getChains**](StakingApi.md#getChains) | **GET** /staking/chains | List staking supported chains | +| [**getDelegationById**](StakingApi.md#getDelegationById) | **GET** /staking/positions/{id} | Get staking position details | +| [**getProviders**](StakingApi.md#getProviders) | **GET** /staking/providers | List staking providers details | +| [**getSummary**](StakingApi.md#getSummary) | **GET** /staking/positions/summary | Get staking summary details | +| [**getSummaryByVault**](StakingApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | Get staking summary details by vault | +| [**split**](StakingApi.md#split) | **POST** /staking/chains/{chainDescriptor}/split | Execute a Split operation on SOL/SOL_TEST stake account | +| [**stake**](StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation | +| [**unstake**](StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation | +| [**withdraw**](StakingApi.md#withdraw) | **POST** /staking/chains/{chainDescriptor}/withdraw | Execute a Withdraw operation | + + + +## approveTermsOfServiceByProviderId + +> CompletableFuture> approveTermsOfServiceByProviderId approveTermsOfServiceByProviderId(providerId, idempotencyKey) + +Approve staking terms of service + +Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + StakingProvider providerId = StakingProvider.fromValue("kiln"); // StakingProvider | The unique identifier of the staking provider + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.staking().approveTermsOfServiceByProviderId(providerId, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#approveTermsOfServiceByProviderId"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#approveTermsOfServiceByProviderId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **providerId** | [**StakingProvider**](.md)| The unique identifier of the staking provider | [enum: kiln, figment, lido] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The terms of service have been successfully approved and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## claimRewards + +> CompletableFuture> claimRewards claimRewards(claimRewardsRequest, chainDescriptor, idempotencyKey) + +Execute a Claim Rewards operation + +Perform a chain-specific Claim Rewards. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + ClaimRewardsRequest claimRewardsRequest = new ClaimRewardsRequest(); // ClaimRewardsRequest | + String chainDescriptor = "MATIC"; // String | The protocol identifier (e.g. \"MATIC\"/\"SOL\") to use + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.staking().claimRewards(claimRewardsRequest, chainDescriptor, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#claimRewards"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#claimRewards"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **claimRewardsRequest** | [**ClaimRewardsRequest**](ClaimRewardsRequest.md)| | | +| **chainDescriptor** | **String**| The protocol identifier (e.g. \"MATIC\"/\"SOL\") to use | [enum: MATIC, SOL, SOL_TEST] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Claim Rewards action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getAllDelegations + +> CompletableFuture>> getAllDelegations getAllDelegations(chainDescriptor) + +List staking positions details + +Return detailed information on all staking positions, including the staked amount, rewards, status and more. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + ChainDescriptor chainDescriptor = ChainDescriptor.fromValue("ETH"); // ChainDescriptor | Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. + try { + CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getAllDelegations"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getAllDelegations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chainDescriptor** | [**ChainDescriptor**](.md)| Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. | [optional] [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | An array of position data was returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getChainInfo + +> CompletableFuture> getChainInfo getChainInfo(chainDescriptor) + +Get chain-specific staking summary + +Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.) + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + ChainDescriptor chainDescriptor = ChainDescriptor.fromValue("ETH"); // ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use + try { + CompletableFuture> response = fireblocks.staking().getChainInfo(chainDescriptor); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getChainInfo"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getChainInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Chain specific info summary was returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getChains + +> CompletableFuture>> getChains getChains() + +List staking supported chains + +Return an alphabetical list of supported chains. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + try { + CompletableFuture>> response = fireblocks.staking().getChains(); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getChains"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getChains"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | An array of supported chains was returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getDelegationById + +> CompletableFuture> getDelegationById getDelegationById(id) + +Get staking position details + +Return detailed information on a staking position, including the staked amount, rewards, status and more. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String id = "1fe3b61f-7e1f-4a19-aff0-4f0a524d44d7"; // String | The unique identifier of the staking position + try { + CompletableFuture> response = fireblocks.staking().getDelegationById(id); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getDelegationById"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getDelegationById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The unique identifier of the staking position | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Position data was returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getProviders + +> CompletableFuture>> getProviders getProviders() + +List staking providers details + +Return information on all the available staking providers. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + try { + CompletableFuture>> response = fireblocks.staking().getProviders(); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getProviders"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getProviders"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | An array of supported providers was returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getSummary + +> CompletableFuture> getSummary getSummary() + +Get staking summary details + +Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + try { + CompletableFuture> response = fireblocks.staking().getSummary(); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getSummary"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getSummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A summary for all vaults were returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getSummaryByVault + +> CompletableFuture>> getSummaryByVault getSummaryByVault() + +Get staking summary details by vault + +Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + try { + CompletableFuture>> response = fireblocks.staking().getSummaryByVault(); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#getSummaryByVault"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#getSummaryByVault"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A summary for each vault were returned successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## split + +> CompletableFuture> split split(splitRequest, chainDescriptor, idempotencyKey) + +Execute a Split operation on SOL/SOL_TEST stake account + +Perform a Solana Split stake account. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + SplitRequest splitRequest = new SplitRequest(); // SplitRequest | + String chainDescriptor = "SOL"; // String | The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.staking().split(splitRequest, chainDescriptor, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#split"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#split"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **splitRequest** | [**SplitRequest**](SplitRequest.md)| | | +| **chainDescriptor** | **String**| The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use | [enum: SOL, SOL_TEST] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Split action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## stake + +> CompletableFuture> stake stake(stakeRequest, chainDescriptor, idempotencyKey) + +Initiate Stake Operation + +Perform a chain-specific Stake. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + StakeRequest stakeRequest = new StakeRequest(); // StakeRequest | + ChainDescriptor chainDescriptor = ChainDescriptor.fromValue("ETH"); // ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.staking().stake(stakeRequest, chainDescriptor, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#stake"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#stake"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **stakeRequest** | [**StakeRequest**](StakeRequest.md)| | | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Stake action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## unstake + +> CompletableFuture> unstake unstake(unstakeRequest, chainDescriptor, idempotencyKey) + +Execute an Unstake operation + +Execute an Unstake operation + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + UnstakeRequest unstakeRequest = new UnstakeRequest(); // UnstakeRequest | + ChainDescriptor chainDescriptor = ChainDescriptor.fromValue("ETH"); // ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.staking().unstake(unstakeRequest, chainDescriptor, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#unstake"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#unstake"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **unstakeRequest** | [**UnstakeRequest**](UnstakeRequest.md)| | | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Unstake action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## withdraw + +> CompletableFuture> withdraw withdraw(withdrawRequest, chainDescriptor, idempotencyKey) + +Execute a Withdraw operation + +Perform a chain-specific Withdraw. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.StakingApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + WithdrawRequest withdrawRequest = new WithdrawRequest(); // WithdrawRequest | + ChainDescriptor chainDescriptor = ChainDescriptor.fromValue("ETH"); // ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.staking().withdraw(withdrawRequest, chainDescriptor, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling StakingApi#withdraw"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling StakingApi#withdraw"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **withdrawRequest** | [**WithdrawRequest**](WithdrawRequest.md)| | | +| **chainDescriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | [enum: ETH, SOL, MATIC, ETH_TEST6, SOL_TEST] | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Withdraw action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/StakingProvider.md b/docs/StakingProvider.md new file mode 100644 index 0000000..87403ff --- /dev/null +++ b/docs/StakingProvider.md @@ -0,0 +1,15 @@ + + +# StakingProvider + +## Enum + + +* `KILN` (value: `"kiln"`) + +* `FIGMENT` (value: `"figment"`) + +* `LIDO` (value: `"lido"`) + + + diff --git a/docs/Status.md b/docs/Status.md new file mode 100644 index 0000000..5ae934f --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,36 @@ + + +# Status + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | The status of the command | | +|**type** | [**TypeEnum**](#TypeEnum) | The type of the command | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| WAITING_FOR_APPROVAL | "WAITING_FOR_APPROVAL" | +| APPROVED | "APPROVED" | +| CANCELLED | "CANCELLED" | +| REJECTED | "REJECTED" | +| COMPLETED | "COMPLETED" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PAIR_API_KEY | "PAIR_API_KEY" | +| UPDATE_CALLBACK_HANDLER | "UPDATE_CALLBACK_HANDLER" | +| UNPAIR_API_KEY | "UNPAIR_API_KEY" | + + + diff --git a/docs/TokenInfoNotFoundErrorResponse.md b/docs/TokenInfoNotFoundErrorResponse.md new file mode 100644 index 0000000..4a573d0 --- /dev/null +++ b/docs/TokenInfoNotFoundErrorResponse.md @@ -0,0 +1,14 @@ + + +# TokenInfoNotFoundErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Not found error code | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/TransactionOperation.md b/docs/TransactionOperation.md index c565eb8..f0e0d16 100644 --- a/docs/TransactionOperation.md +++ b/docs/TransactionOperation.md @@ -11,6 +11,8 @@ * `CONTRACT_CALL` (value: `"CONTRACT_CALL"`) +* `PROGRAM_CALL` (value: `"PROGRAM_CALL"`) + * `MINT` (value: `"MINT"`) * `RAW` (value: `"RAW"`) diff --git a/docs/TransactionReceiptResponse.md b/docs/TransactionReceiptResponse.md new file mode 100644 index 0000000..2938ed6 --- /dev/null +++ b/docs/TransactionReceiptResponse.md @@ -0,0 +1,26 @@ + + +# TransactionReceiptResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockHash** | **String** | The block hash | | +|**blockNumber** | **Integer** | The block number | | +|**contractAddress** | **String** | The address of deployed contract | [optional] | +|**cumulativeGasUsed** | **Integer** | The cumulative gas used in the transaction | | +|**effectiveGasPrice** | **Integer** | The effective gas price | | +|**from** | **String** | Sender address | | +|**gasUsed** | **Integer** | Gas used by the transaction | | +|**logs** | [**List<TxLog>**](TxLog.md) | Array of transaction logs | | +|**logsBloom** | **String** | Logs bloom filter | | +|**status** | **Integer** | Transaction status (1 for success, 0 for failure) | | +|**to** | **String** | Recipient address | [optional] | +|**transactionHash** | **String** | The transaction hash | | +|**transactionIndex** | **Integer** | Transaction index in the block | | +|**type** | **String** | Type of transaction | | + + + diff --git a/docs/TransferPeerPathType.md b/docs/TransferPeerPathType.md index 9edde63..0d88508 100644 --- a/docs/TransferPeerPathType.md +++ b/docs/TransferPeerPathType.md @@ -29,5 +29,7 @@ * `END_USER_WALLET` (value: `"END_USER_WALLET"`) +* `PROGRAM_CALL` (value: `"PROGRAM_CALL"`) + diff --git a/docs/TxLog.md b/docs/TxLog.md new file mode 100644 index 0000000..05dc4ac --- /dev/null +++ b/docs/TxLog.md @@ -0,0 +1,21 @@ + + +# TxLog + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**address** | **String** | The log address | | +|**topics** | **List<String>** | Array of log topics | | +|**data** | **String** | The log data | | +|**blockNumber** | **Integer** | Block number where the log occurred | | +|**transactionHash** | **String** | Transaction hash associated with the log | | +|**transactionIndex** | **Integer** | Transaction index in the block | | +|**blockHash** | **String** | The hash of the block | | +|**logIndex** | **Integer** | Log index in the block | | +|**removed** | **Boolean** | Indicates if the log was removed | | + + + diff --git a/docs/UnstakeRequestDto.md b/docs/UnstakeRequest.md similarity index 78% rename from docs/UnstakeRequestDto.md rename to docs/UnstakeRequest.md index 48b2ddf..92f13f9 100644 --- a/docs/UnstakeRequestDto.md +++ b/docs/UnstakeRequest.md @@ -1,6 +1,6 @@ -# UnstakeRequestDto +# UnstakeRequest ## Properties @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | id of position to unstake | | |**fee** | **String** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] | -|**feeLevel** | **String** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] | +|**feeLevel** | **FeeLevel** | | [optional] | |**txNote** | **String** | The note to associate with the transactions. | [optional] | |**amount** | **String** | The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default. | [optional] | diff --git a/docs/UpdateCallbackHandlerRequest.md b/docs/UpdateCallbackHandlerRequest.md new file mode 100644 index 0000000..bd5915b --- /dev/null +++ b/docs/UpdateCallbackHandlerRequest.md @@ -0,0 +1,13 @@ + + +# UpdateCallbackHandlerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**callbackHandler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] | + + + diff --git a/docs/UpdateCallbackHandlerResponse.md b/docs/UpdateCallbackHandlerResponse.md new file mode 100644 index 0000000..e521141 --- /dev/null +++ b/docs/UpdateCallbackHandlerResponse.md @@ -0,0 +1,14 @@ + + +# UpdateCallbackHandlerResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The unique identifier of the API key | | +|**callbackHandler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] | + + + diff --git a/docs/UpdateWebhookRequest.md b/docs/UpdateWebhookRequest.md new file mode 100644 index 0000000..ff7e6cf --- /dev/null +++ b/docs/UpdateWebhookRequest.md @@ -0,0 +1,16 @@ + + +# UpdateWebhookRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | The url of the webhook where notifications will be sent. URL must be valid, unique and https. | [optional] | +|**description** | **String** | description of the webhook of what it is used for.should not contain special characters. | [optional] | +|**events** | **List<WebhookEvent>** | The events that the webhook will be subscribed to | [optional] | +|**enabled** | **Boolean** | The status of the webhook | [optional] | + + + diff --git a/docs/ValidatorDto.md b/docs/Validator.md similarity index 76% rename from docs/ValidatorDto.md rename to docs/Validator.md index 35cc54d..12bd336 100644 --- a/docs/ValidatorDto.md +++ b/docs/Validator.md @@ -1,6 +1,6 @@ -# ValidatorDto +# Validator ## Properties @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**chainDescriptor** | **String** | The protocol identifier (e.g. \"ETH\"/\"SOL\") of the validator | | |**feePercent** | **BigDecimal** | The service fee as a percentage out of the earned rewards | | +|**isPrivate** | **Boolean** | Is the validator private, i.e created by the user | [optional] | diff --git a/docs/Version.md b/docs/Version.md new file mode 100644 index 0000000..6bfca04 --- /dev/null +++ b/docs/Version.md @@ -0,0 +1,13 @@ + + +# Version + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hash** | **String** | The version hash of the cosigner | | + + + diff --git a/docs/Webhook.md b/docs/Webhook.md new file mode 100644 index 0000000..fcbdab0 --- /dev/null +++ b/docs/Webhook.md @@ -0,0 +1,28 @@ + + +# Webhook + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | The id of the webhook | [optional] | +|**url** | **String** | The url of the webhook where notifications will be sent. Must be a valid URL and https. | [optional] | +|**description** | **String** | description of the webhook of what it is used for | [optional] | +|**events** | **List<WebhookEvent>** | The events that the webhook will be subscribed to | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | The status of the webhook | [optional] | +|**createdAt** | **OffsetDateTime** | The date and time the webhook was created | [optional] | +|**updatedAt** | **OffsetDateTime** | The date and time the webhook was last updated | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| DISABLED | "DISABLED" | +| ENABLED | "ENABLED" | + + + diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md new file mode 100644 index 0000000..b9290a1 --- /dev/null +++ b/docs/WebhookEvent.md @@ -0,0 +1,79 @@ + + +# WebhookEvent + +## Enum + + +* `TRANSACTION_CREATED` (value: `"transaction.created"`) + +* `TRANSACTION_STATUS_UPDATED` (value: `"transaction.status.updated"`) + +* `TRANSACTION_APPROVAL_STATUS_UPDATED` (value: `"transaction.approval_status.updated"`) + +* `EXTERNAL_WALLET_ASSET_ADDED` (value: `"external_wallet.asset.added"`) + +* `INTERNAL_WALLET_ASSET_ADDED` (value: `"internal_wallet.asset.added"`) + +* `INTERNAL_WALLET_ASSET_REMOVED` (value: `"internal_wallet.asset.removed"`) + +* `CONTRACT_WALLET_ASSET_ADDED` (value: `"contract_wallet.asset.added"`) + +* `CONTRACT_WALLET_ASSET_REMOVED` (value: `"contract_wallet.asset.removed"`) + +* `VAULT_ACCOUNT_CREATED` (value: `"vault_account.created"`) + +* `VAULT_ACCOUNT_ASSET_ADDED` (value: `"vault_account.asset.added"`) + +* `VAULT_ACCOUNT_ASSET_BALANCE_UPDATED` (value: `"vault_account.asset.balance_updated"`) + +* `VAULT_ACCOUNT_NFT_BALANCE_UPDATED` (value: `"vault_account.nft.balance_updated"`) + +* `EMBEDDED_WALLET_ASSET_ADDED` (value: `"embedded_wallet.asset.added"`) + +* `EMBEDDED_WALLET_ASSET_BALANCE_UPDATED` (value: `"embedded_wallet.asset.balance_updated"`) + +* `EXCHANGE_ACCOUNT_ADDED` (value: `"exchange_account.added"`) + +* `FIAT_ACCOUNT_ADDED` (value: `"fiat_account.added"`) + +* `TICKET_CREATED` (value: `"ticket.created"`) + +* `TICKET_SUBMITTED` (value: `"ticket.submitted"`) + +* `TICKET_EXPIRED` (value: `"ticket.expired"`) + +* `TICKET_CANCELED` (value: `"ticket.canceled"`) + +* `TICKET_FULFILLED` (value: `"ticket.fulfilled"`) + +* `TICKET_COUNTERPARTY_ADDED` (value: `"ticket.counterparty.added"`) + +* `TICKET_COUNTERPARTY_EXTERNAL_ID_SET` (value: `"ticket.counterparty_external_id.set"`) + +* `TICKET_NOTE_ADDED` (value: `"ticket.note.added"`) + +* `TICKET_EXPIRED_IN_SET` (value: `"ticket.expired_in.set"`) + +* `TICKET_EXPIRED_AT_SET` (value: `"ticket.expired_at.set"`) + +* `TICKET_TERM_ADDED` (value: `"ticket.term.added"`) + +* `TICKET_TERM_UPDATED` (value: `"ticket.term.updated"`) + +* `TICKET_TERM_DELETED` (value: `"ticket.term.deleted"`) + +* `TICKET_TERM_FUNDED` (value: `"ticket.term.funded"`) + +* `TICKET_TERM_MANUALLY_FUNDED` (value: `"ticket.term.manually_funded"`) + +* `TICKET_TERM_FUNDING_CANCELED` (value: `"ticket.term.funding_canceled"`) + +* `TICKET_TERM_FUNDING_FAILED` (value: `"ticket.term.funding_failed"`) + +* `TICKET_TERM_FUNDING_COMPLETED` (value: `"ticket.term.funding_completed"`) + +* `TICKET_TERM_TRANSACTION_STATUS_CHANGED` (value: `"ticket.term.transaction_status_changed"`) + + + diff --git a/docs/WebhookPaginatedResponse.md b/docs/WebhookPaginatedResponse.md new file mode 100644 index 0000000..8543bed --- /dev/null +++ b/docs/WebhookPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# WebhookPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<Webhook>**](Webhook.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/StakingBetaApi.md b/docs/WebhooksV2BetaApi.md similarity index 51% rename from docs/StakingBetaApi.md rename to docs/WebhooksV2BetaApi.md index 6ecf3f0..938200c 100644 --- a/docs/StakingBetaApi.md +++ b/docs/WebhooksV2BetaApi.md @@ -1,28 +1,26 @@ -# StakingBetaApi +# WebhooksV2BetaApi All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**approveTermsOfServiceByProviderId**](StakingBetaApi.md#approveTermsOfServiceByProviderId) | **POST** /staking/providers/{providerId}/approveTermsOfService | | -| [**executeAction**](StakingBetaApi.md#executeAction) | **POST** /staking/chains/{chainDescriptor}/{actionId} | | -| [**getAllDelegations**](StakingBetaApi.md#getAllDelegations) | **GET** /staking/positions | | -| [**getChainInfo**](StakingBetaApi.md#getChainInfo) | **GET** /staking/chains/{chainDescriptor}/chainInfo | | -| [**getChains**](StakingBetaApi.md#getChains) | **GET** /staking/chains | | -| [**getDelegationById**](StakingBetaApi.md#getDelegationById) | **GET** /staking/positions/{id} | | -| [**getProviders**](StakingBetaApi.md#getProviders) | **GET** /staking/providers | | -| [**getSummary**](StakingBetaApi.md#getSummary) | **GET** /staking/positions/summary | | -| [**getSummaryByVault**](StakingBetaApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | | +| [**createWebhook**](WebhooksV2BetaApi.md#createWebhook) | **POST** /webhooks | Create new webhook | +| [**deleteWebhook**](WebhooksV2BetaApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook | +| [**getNotification**](WebhooksV2BetaApi.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id | +| [**getNotifications**](WebhooksV2BetaApi.md#getNotifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id | +| [**getWebhook**](WebhooksV2BetaApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id | +| [**getWebhooks**](WebhooksV2BetaApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks | +| [**updateWebhook**](WebhooksV2BetaApi.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook | -## approveTermsOfServiceByProviderId +## createWebhook -> CompletableFuture> approveTermsOfServiceByProviderId approveTermsOfServiceByProviderId(providerId, idempotencyKey) +> CompletableFuture> createWebhook createWebhook(createWebhookRequest, idempotencyKey) +Create new webhook - -Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider. +Creates a new webhook, which will be triggered on the specified events **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -35,7 +33,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -47,22 +45,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String providerId = "kiln"; // String | The unique identifier of the staking provider + CreateWebhookRequest createWebhookRequest = new CreateWebhookRequest(); // CreateWebhookRequest | String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. try { - CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId, idempotencyKey); + CompletableFuture> response = fireblocks.webhooksV2Beta().createWebhook(createWebhookRequest, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#approveTermsOfServiceByProviderId"); + System.err.println("Exception when calling WebhooksV2BetaApi#createWebhook"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#approveTermsOfServiceByProviderId"); + System.err.println("Exception when calling WebhooksV2BetaApi#createWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -77,12 +75,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **providerId** | **String**| The unique identifier of the staking provider | [enum: kiln, figment] | +| **createWebhookRequest** | [**CreateWebhookRequest**](CreateWebhookRequest.md)| | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -91,22 +89,23 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | The terms of service have been successfully approved and is associated with 201 status code. | - | +| **201** | created new webhook successfully | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| -## executeAction +## deleteWebhook -> CompletableFuture> executeAction executeAction(executeActionRequest, chainDescriptor, actionId, idempotencyKey) +> CompletableFuture> deleteWebhook deleteWebhook(webhookId) +Delete webhook - -Perform a chain-specific staking action (e.g. stake, unstake, withdraw). +Delete a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -119,7 +118,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -131,24 +130,21 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - ExecuteActionRequest executeActionRequest = new ExecuteActionRequest(); // ExecuteActionRequest | - String chainDescriptor = "ETH"; // String | The protocol identifier (e.g. \"ETH\"/\"SOL\") to use - String actionId = "stake"; // String | The operation that can be executed on a vault/position - String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the webhook try { - CompletableFuture> response = fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor, actionId, idempotencyKey); + CompletableFuture> response = fireblocks.webhooksV2Beta().deleteWebhook(webhookId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#executeAction"); + System.err.println("Exception when calling WebhooksV2BetaApi#deleteWebhook"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#executeAction"); + System.err.println("Exception when calling WebhooksV2BetaApi#deleteWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -163,14 +159,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **executeActionRequest** | [**ExecuteActionRequest**](ExecuteActionRequest.md)| | | -| **chainDescriptor** | **String**| The protocol identifier (e.g. \"ETH\"/\"SOL\") to use | [enum: ETH, SOL, ETH_TEST3, SOL_TEST] | -| **actionId** | **String**| The operation that can be executed on a vault/position | [enum: stake, unstake, withdraw] | -| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | +| **webhookId** | **UUID**| The unique identifier of the webhook | | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -179,22 +172,23 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | A chain-specific action has been executed successfully on vault/position and is associated with 201 status code. | - | +| **200** | Deleted webhook object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| -## getAllDelegations +## getNotification -> CompletableFuture>> getAllDelegations getAllDelegations(chainDescriptor) +> CompletableFuture> getNotification getNotification(webhookId, notificationId, includeData) +Get notification by id - -Return detailed information on all staking positions, including the staked amount, rewards, status and more. +Get notification by id **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -207,7 +201,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -219,21 +213,23 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String chainDescriptor = "chainDescriptor_example"; // String | Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. + String webhookId = "webhookId_example"; // String | The ID of the webhook to fetch + String notificationId = "notificationId_example"; // String | The ID of the notification to fetch + Boolean includeData = true; // Boolean | Include the data of the notification try { - CompletableFuture>> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); + CompletableFuture> response = fireblocks.webhooksV2Beta().getNotification(webhookId, notificationId, includeData); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getAllDelegations"); + System.err.println("Exception when calling WebhooksV2BetaApi#getNotification"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getAllDelegations"); + System.err.println("Exception when calling WebhooksV2BetaApi#getNotification"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -248,11 +244,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **chainDescriptor** | **String**| Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. | [optional] | +| **webhookId** | **String**| The ID of the webhook to fetch | | +| **notificationId** | **String**| The ID of the notification to fetch | | +| **includeData** | **Boolean**| Include the data of the notification | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -267,16 +265,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | An array of position data was returned successfully | - | - +| **200** | OK | * X-Request-ID -
| -## getChainInfo -> CompletableFuture> getChainInfo getChainInfo(chainDescriptor) +## getNotifications +> CompletableFuture> getNotifications getNotifications(webhookId, order, pageCursor, pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId) +Get all notifications by webhook id -Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.) +Get all notifications by webhook id (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -289,7 +287,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -301,21 +299,29 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String chainDescriptor = "ETH"; // String | The protocol identifier (e.g. \"ETH\"/\"SOL\") to use + UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | + String order = "ASC"; // String | ASC / DESC ordering (default DESC) + String pageCursor = "pageCursor_example"; // String | Cursor of the required page + BigDecimal pageSize = new BigDecimal("100"); // BigDecimal | Maximum number of items in the page + String createdStartDate = "2024-09-24T09:14:38.356Z"; // String | sort by start date + String createdEndDate = "2024-09-24T09:14:38.356Z"; // String | sort by end date + List statuses = Arrays.asList(); // List | Filter by Notification statues + List eventTypes = Arrays.asList(); // List | Filter by Notification eventTypes + String resourceId = "resourceId_example"; // String | Filter by resourceId try { - CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); + CompletableFuture> response = fireblocks.webhooksV2Beta().getNotifications(webhookId, order, pageCursor, pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getChainInfo"); + System.err.println("Exception when calling WebhooksV2BetaApi#getNotifications"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getChainInfo"); + System.err.println("Exception when calling WebhooksV2BetaApi#getNotifications"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -330,11 +336,19 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **chainDescriptor** | **String**| The protocol identifier (e.g. \"ETH\"/\"SOL\") to use | [enum: ETH, SOL, ETH_TEST3, SOL_TEST] | +| **webhookId** | **UUID**| | | +| **order** | **String**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] [enum: ASC, DESC] | +| **pageCursor** | **String**| Cursor of the required page | [optional] | +| **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 100] | +| **createdStartDate** | **String**| sort by start date | [optional] | +| **createdEndDate** | **String**| sort by end date | [optional] | +| **statuses** | [**List<NotificationStatus>**](NotificationStatus.md)| Filter by Notification statues | [optional] | +| **eventTypes** | [**List<WebhookEvent>**](WebhookEvent.md)| Filter by Notification eventTypes | [optional] | +| **resourceId** | **String**| Filter by resourceId | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -349,16 +363,16 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Chain specific info summary was returned successfully | - | +| **200** | A paginated response containing NotificationExternalDTO objects | * X-Request-ID -
| -## getChains +## getWebhook -> CompletableFuture>> getChains getChains() +> CompletableFuture> getWebhook getWebhook(webhookId) +Get webhook by id - -Return an alphabetical list of supported chains. +Retrieve a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -371,7 +385,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -383,99 +397,21 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); + UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the webhook try { - CompletableFuture>> response = fireblocks.stakingBeta().getChains(); + CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhook(webhookId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getChains"); + System.err.println("Exception when calling WebhooksV2BetaApi#getWebhook"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getChains"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -CompletableFuture> - - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -## getDelegationById - -> CompletableFuture> getDelegationById getDelegationById(id) - - - -Return detailed information on a staking position, including the staked amount, rewards, status and more. - -### Example - -```java -// Import classes: -import com.fireblocks.sdk.ApiClient; -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.BasePath; -import com.fireblocks.sdk.Fireblocks; -import com.fireblocks.sdk.ConfigurationOptions; -import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; - -public class Example { - public static void main(String[] args) { - ConfigurationOptions configurationOptions = new ConfigurationOptions() - .basePath(BasePath.Sandbox) - .apiKey("my-api-key") - .secretKey("my-secret-key"); - Fireblocks fireblocks = new Fireblocks(configurationOptions); - - String id = "id_example"; // String | The unique identifier of the staking position - try { - CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); - System.out.println("Status code: " + response.get().getStatusCode()); - System.out.println("Response headers: " + response.get().getHeaders()); - System.out.println("Response body: " + response.get().getData()); - } catch (InterruptedException | ExecutionException e) { - ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getDelegationById"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getDelegationById"); + System.err.println("Exception when calling WebhooksV2BetaApi#getWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -490,11 +426,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **id** | **String**| The unique identifier of the staking position | | +| **webhookId** | **UUID**| The unique identifier of the webhook | | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -509,16 +445,17 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Position data was returned successfully | - | - +| **200** | A webhook object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| -## getProviders -> CompletableFuture>> getProviders getProviders() +## getWebhooks +> CompletableFuture> getWebhooks getWebhooks(order, pageCursor, pageSize) +Get all webhooks -Return information on all the available staking providers. +Get all webhooks (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -531,7 +468,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -543,20 +480,23 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); + String order = "ASC"; // String | ASC / DESC ordering (default DESC) + String pageCursor = "pageCursor_example"; // String | Cursor of the required page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Maximum number of items in the page try { - CompletableFuture>> response = fireblocks.stakingBeta().getProviders(); + CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhooks(order, pageCursor, pageSize); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getProviders"); + System.err.println("Exception when calling WebhooksV2BetaApi#getWebhooks"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getProviders"); + System.err.println("Exception when calling WebhooksV2BetaApi#getWebhooks"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -568,89 +508,16 @@ public class Example { ### Parameters -This endpoint does not need any parameter. - -### Return type - -CompletableFuture> - - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | An array of supported providers was returned successfully | - | - - -## getSummary - -> CompletableFuture> getSummary getSummary() - - - -Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. - -### Example - -```java -// Import classes: -import com.fireblocks.sdk.ApiClient; -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.BasePath; -import com.fireblocks.sdk.Fireblocks; -import com.fireblocks.sdk.ConfigurationOptions; -import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutionException; -public class Example { - public static void main(String[] args) { - ConfigurationOptions configurationOptions = new ConfigurationOptions() - .basePath(BasePath.Sandbox) - .apiKey("my-api-key") - .secretKey("my-secret-key"); - Fireblocks fireblocks = new Fireblocks(configurationOptions); - - try { - CompletableFuture> response = fireblocks.stakingBeta().getSummary(); - System.out.println("Status code: " + response.get().getStatusCode()); - System.out.println("Response headers: " + response.get().getHeaders()); - System.out.println("Response body: " + response.get().getData()); - } catch (InterruptedException | ExecutionException e) { - ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getSummary"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getSummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **order** | **String**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] [enum: ASC, DESC] | +| **pageCursor** | **String**| Cursor of the required page | [optional] | +| **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 10] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -665,16 +532,17 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | A summary for all vaults were returned successfully | - | +| **200** | A paginated response containing WebhookDto objects | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| -## getSummaryByVault +## updateWebhook -> CompletableFuture>> getSummaryByVault getSummaryByVault() +> CompletableFuture> updateWebhook updateWebhook(updateWebhookRequest, webhookId) +Update webhook - -Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. +Update a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. ### Example @@ -687,7 +555,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.StakingBetaApi; +import com.fireblocks.sdk.api.WebhooksV2BetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -699,20 +567,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); + UpdateWebhookRequest updateWebhookRequest = new UpdateWebhookRequest(); // UpdateWebhookRequest | + UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the webhook try { - CompletableFuture>> response = fireblocks.stakingBeta().getSummaryByVault(); + CompletableFuture> response = fireblocks.webhooksV2Beta().updateWebhook(updateWebhookRequest, webhookId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling StakingBetaApi#getSummaryByVault"); + System.err.println("Exception when calling WebhooksV2BetaApi#updateWebhook"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling StakingBetaApi#getSummaryByVault"); + System.err.println("Exception when calling WebhooksV2BetaApi#updateWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -724,11 +594,15 @@ public class Example { ### Parameters -This endpoint does not need any parameter. + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **updateWebhookRequest** | [**UpdateWebhookRequest**](UpdateWebhookRequest.md)| | | +| **webhookId** | **UUID**| The unique identifier of the webhook | | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -737,11 +611,12 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | A summary for each vault were returned successfully | - | +| **200** | Updated webhook object | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| diff --git a/docs/WithdrawRequestDto.md b/docs/WithdrawRequest.md similarity index 69% rename from docs/WithdrawRequestDto.md rename to docs/WithdrawRequest.md index ebb49d2..25ce387 100644 --- a/docs/WithdrawRequestDto.md +++ b/docs/WithdrawRequest.md @@ -1,6 +1,6 @@ -# WithdrawRequestDto +# WithdrawRequest ## Properties @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | id of position to withdraw | | |**fee** | **String** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] | -|**feeLevel** | **String** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] | +|**feeLevel** | **FeeLevel** | | [optional] | |**txNote** | **String** | The note to associate with the transactions. | [optional] | diff --git a/pom.xml b/pom.xml index f0f57c8..94938f5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 6.0.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index 4277714..9ec56d0 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "6.0.0"; + public static final String VERSION = "0.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index c0032ea..9d78a66 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -40,6 +40,7 @@ public class Fireblocks { private AssetsApi assets; private AuditLogsApi auditLogs; private BlockchainsAssetsApi blockchainsAssets; + private BlockchainsAssetsBetaApi blockchainsAssetsBeta; private ComplianceApi compliance; private ComplianceScreeningConfigurationApi complianceScreeningConfiguration; private ConsoleUserApi consoleUser; @@ -48,6 +49,7 @@ public class Fireblocks { private ContractsApi contracts; private CosignersBetaApi cosignersBeta; private DeployedContractsApi deployedContracts; + private EmbeddedWalletsApi embeddedWallets; private ExchangeAccountsApi exchangeAccounts; private ExternalWalletsApi externalWallets; private FiatAccountsApi fiatAccounts; @@ -55,6 +57,7 @@ public class Fireblocks { private InternalWalletsApi internalWallets; private JobManagementApi jobManagement; private KeyLinkBetaApi keyLinkBeta; + private KeysBetaApi keysBeta; private NetworkConnectionsApi networkConnections; private NftsApi nfts; private OffExchangesApi offExchanges; @@ -63,7 +66,7 @@ public class Fireblocks { private PolicyEditorBetaApi policyEditorBeta; private ResetDeviceApi resetDevice; private SmartTransferApi smartTransfer; - private StakingBetaApi stakingBeta; + private StakingApi staking; private TokenizationApi tokenization; private TransactionsApi transactions; private TravelRuleBetaApi travelRuleBeta; @@ -72,6 +75,7 @@ public class Fireblocks { private VaultsApi vaults; private Web3ConnectionsApi web3Connections; private WebhooksApi webhooks; + private WebhooksV2BetaApi webhooksV2Beta; private WhitelistIpAddressesApi whitelistIpAddresses; private WorkspaceStatusBetaApi workspaceStatusBeta; @@ -241,6 +245,13 @@ public BlockchainsAssetsApi blockchainsAssets() { return blockchainsAssets; } + public BlockchainsAssetsBetaApi blockchainsAssetsBeta() { + if (blockchainsAssetsBeta == null) { + blockchainsAssetsBeta = new BlockchainsAssetsBetaApi(apiClient); + } + return blockchainsAssetsBeta; + } + public ComplianceApi compliance() { if (compliance == null) { compliance = new ComplianceApi(apiClient); @@ -297,6 +308,13 @@ public DeployedContractsApi deployedContracts() { return deployedContracts; } + public EmbeddedWalletsApi embeddedWallets() { + if (embeddedWallets == null) { + embeddedWallets = new EmbeddedWalletsApi(apiClient); + } + return embeddedWallets; + } + public ExchangeAccountsApi exchangeAccounts() { if (exchangeAccounts == null) { exchangeAccounts = new ExchangeAccountsApi(apiClient); @@ -346,6 +364,13 @@ public KeyLinkBetaApi keyLinkBeta() { return keyLinkBeta; } + public KeysBetaApi keysBeta() { + if (keysBeta == null) { + keysBeta = new KeysBetaApi(apiClient); + } + return keysBeta; + } + public NetworkConnectionsApi networkConnections() { if (networkConnections == null) { networkConnections = new NetworkConnectionsApi(apiClient); @@ -402,11 +427,11 @@ public SmartTransferApi smartTransfer() { return smartTransfer; } - public StakingBetaApi stakingBeta() { - if (stakingBeta == null) { - stakingBeta = new StakingBetaApi(apiClient); + public StakingApi staking() { + if (staking == null) { + staking = new StakingApi(apiClient); } - return stakingBeta; + return staking; } public TokenizationApi tokenization() { @@ -465,6 +490,13 @@ public WebhooksApi webhooks() { return webhooks; } + public WebhooksV2BetaApi webhooksV2Beta() { + if (webhooksV2Beta == null) { + webhooksV2Beta = new WebhooksV2BetaApi(apiClient); + } + return webhooksV2Beta; + } + public WhitelistIpAddressesApi whitelistIpAddresses() { if (whitelistIpAddresses == null) { whitelistIpAddresses = new WhitelistIpAddressesApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java new file mode 100644 index 0000000..19eceec --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java @@ -0,0 +1,449 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.AssetClassBeta; +import com.fireblocks.sdk.model.AssetResponseBeta; +import com.fireblocks.sdk.model.BlockchainResponse; +import com.fireblocks.sdk.model.ListAssetsResponse; +import com.fireblocks.sdk.model.ListBlockchainsResponse; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainsAssetsBetaApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public BlockchainsAssetsBetaApi() { + this(new ApiClient()); + } + + public BlockchainsAssetsBetaApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get an asset Returns an asset by ID or legacyID.</br> **Note**: - This endpoint is now + * in Beta, disabled for general availability at this time. + * + * @param id The ID or legacyId of the asset (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<AssetResponseBeta>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getAssetById( + String id, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getAssetByIdRequestBuilder(id, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getAssetById", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + AssetResponseBeta>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getAssetByIdRequestBuilder(String id, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getAssetById", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/assets/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get an blockchain Returns an blockchain by ID or legacyID.</br> **Note**: - This + * endpoint is now in Beta, disabled for general availability at this time. + * + * @param id The ID or legacyId of the blockchain (required) + * @return CompletableFuture<ApiResponse<BlockchainResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getBlockchainById(String id) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getBlockchainByIdRequestBuilder(id); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getBlockchainById", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + BlockchainResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getBlockchainByIdRequestBuilder(String id) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getBlockchainById", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/blockchains/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * List assets Returns all asset type supported by Fireblocks.</br> **Note**: - This + * endpoint is now in Beta, disabled for general availability at this time. + * + * @param blockchainId Blockchain id of the assets (optional) + * @param assetClass Assets class (optional) + * @param symbol Assets onchain symbol (optional) + * @param scope Scope of the assets (optional) + * @param deprecated Are assets deprecated (optional) + * @param pageCursor Next page cursor to fetch (optional) + * @param pageSize Items per page (optional, default to 500) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<ListAssetsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> listAssets( + String blockchainId, + AssetClassBeta assetClass, + String symbol, + String scope, + Boolean deprecated, + String pageCursor, + BigDecimal pageSize, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + listAssetsRequestBuilder( + blockchainId, + assetClass, + symbol, + scope, + deprecated, + pageCursor, + pageSize, + idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("listAssets", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + ListAssetsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder listAssetsRequestBuilder( + String blockchainId, + AssetClassBeta assetClass, + String symbol, + String scope, + Boolean deprecated, + String pageCursor, + BigDecimal pageSize, + String idempotencyKey) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/assets"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "blockchainId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("blockchainId", blockchainId)); + localVarQueryParameterBaseName = "assetClass"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("assetClass", assetClass)); + localVarQueryParameterBaseName = "symbol"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("symbol", symbol)); + localVarQueryParameterBaseName = "scope"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); + localVarQueryParameterBaseName = "deprecated"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * List blockchains Returns all blockchains supported by Fireblocks.</br> **Note**: - This + * endpoint is now in Beta, disabled for general availability at this time. + * + * @param protocol Blockchain protocol (optional) + * @param deprecated Is blockchain deprecated (optional) + * @param test Is test blockchain (optional) + * @param pageCursor Page cursor to fetch (optional) + * @param pageSize Items per page (max 500) (optional, default to 500) + * @return CompletableFuture<ApiResponse<ListBlockchainsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> listBlockchains( + String protocol, + Boolean deprecated, + Boolean test, + String pageCursor, + BigDecimal pageSize) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + listBlockchainsRequestBuilder(protocol, deprecated, test, pageCursor, pageSize); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("listBlockchains", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + ListBlockchainsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder listBlockchainsRequestBuilder( + String protocol, + Boolean deprecated, + Boolean test, + String pageCursor, + BigDecimal pageSize) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/blockchains"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "protocol"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("protocol", protocol)); + localVarQueryParameterBaseName = "deprecated"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); + localVarQueryParameterBaseName = "test"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("test", test)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java index 9c088a2..9c44824 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java @@ -19,6 +19,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.CreateTransactionResponse; import com.fireblocks.sdk.model.ScreeningConfigurationsRequest; import com.fireblocks.sdk.model.ScreeningPolicyResponse; import com.fireblocks.sdk.model.ScreeningProviderRulesConfigurationResponse; @@ -323,6 +324,86 @@ private HttpRequest.Builder getScreeningPolicyRequestBuilder() throws ApiExcepti } return localVarRequestBuilder; } + /** + * Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, + * with the API user as the initiator, bypassing the screening policy check This endpoint is + * restricted to Admin API users and is only applicable to outgoing transactions. + * + * @param txId The transaction id that was rejected by screening checks (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<CreateTransactionResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + retryRejectedTransactionBypassScreeningChecks(String txId, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + retryRejectedTransactionBypassScreeningChecksRequestBuilder( + txId, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "retryRejectedTransactionBypassScreeningChecks", + localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + CreateTransactionResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder retryRejectedTransactionBypassScreeningChecksRequestBuilder( + String txId, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "retryRejectedTransactionBypassScreeningChecks", "txId", txId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/screening/transaction/{txId}/bypass_screening_policy" + .replace("{txId}", ApiClient.urlEncode(txId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Update AML Configuration Updates bypass screening, inbound delay, or outbound delay * configurations for AML. diff --git a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java index 7016fef..67f0fff 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java @@ -22,6 +22,7 @@ import com.fireblocks.sdk.model.ContractAbiResponseDto; import com.fireblocks.sdk.model.ParameterWithValue; import com.fireblocks.sdk.model.ReadCallFunctionDto; +import com.fireblocks.sdk.model.TransactionReceiptResponse; import com.fireblocks.sdk.model.WriteCallFunctionDto; import com.fireblocks.sdk.model.WriteCallFunctionResponseDto; import java.io.IOException; @@ -156,6 +157,79 @@ private HttpRequest.Builder getDeployedContractAbiRequestBuilder( } return localVarRequestBuilder; } + /** + * Get transaction receipt Retrieve the transaction receipt by blockchain native asset ID and + * transaction hash + * + * @param baseAssetId The blockchain base assetId (required) + * @param txHash The transaction hash (required) + * @return CompletableFuture<ApiResponse<TransactionReceiptResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getTransactionReceipt( + String baseAssetId, String txHash) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getTransactionReceiptRequestBuilder(baseAssetId, txHash); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getTransactionReceipt", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + TransactionReceiptResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getTransactionReceiptRequestBuilder( + String baseAssetId, String txHash) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getTransactionReceipt", "baseAssetId", baseAssetId); + ValidationUtils.assertParamExistsAndNotEmpty("getTransactionReceipt", "txHash", txHash); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/receipt" + .replace("{baseAssetId}", ApiClient.urlEncode(baseAssetId.toString())) + .replace("{txHash}", ApiClient.urlEncode(txHash.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Call a read function on a deployed contract Call a read function on a deployed contract by * blockchain native asset id and contract address diff --git a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java index d3af338..9153294 100644 --- a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java @@ -20,11 +20,18 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.AddCosignerRequest; +import com.fireblocks.sdk.model.AddCosignerResponse; import com.fireblocks.sdk.model.ApiKey; import com.fireblocks.sdk.model.ApiKeysPaginatedResponse; import com.fireblocks.sdk.model.Cosigner; import com.fireblocks.sdk.model.CosignersPaginatedResponse; +import com.fireblocks.sdk.model.PairApiKeyRequest; +import com.fireblocks.sdk.model.PairApiKeyResponse; import com.fireblocks.sdk.model.RenameCosigner; +import com.fireblocks.sdk.model.Status; +import com.fireblocks.sdk.model.UpdateCallbackHandlerRequest; +import com.fireblocks.sdk.model.UpdateCallbackHandlerResponse; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -78,6 +85,85 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Add cosigner Add a new cosigner. The cosigner will be pending pairing until the API key is + * manually paired + * + * @param addCosignerRequest (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<AddCosignerResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> addCosigner( + AddCosignerRequest addCosignerRequest, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + addCosignerRequestBuilder(addCosignerRequest, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("addCosigner", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + AddCosignerResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder addCosignerRequestBuilder( + AddCosignerRequest addCosignerRequest, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists("addCosigner", "addCosignerRequest", addCosignerRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/cosigners"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(addCosignerRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Get API key Get an API key by ID **Note:** These endpoints are currently in beta and might be * subject to changes. @@ -151,8 +237,7 @@ private HttpRequest.Builder getApiKeyRequestBuilder(UUID cosignerId, String apiK return localVarRequestBuilder; } /** - * Get all API keys Get all cosigner paired API keys (paginated) **Note:** These endpoints are - * currently in beta and might be subject to changes. + * Get all API keys Get all cosigner paired API keys (paginated) * * @param cosignerId The unique identifier of the cosigner (required) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) @@ -398,6 +483,175 @@ private HttpRequest.Builder getCosignersRequestBuilder( } return localVarRequestBuilder; } + /** + * Get request status Get the status of an asynchronous request + * + * @param cosignerId The unique identifier of the cosigner (required) + * @param apiKeyId The unique identifier of the API key (required) + * @param requestId (required) + * @return CompletableFuture<ApiResponse<Status>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getRequestStatus( + UUID cosignerId, String apiKeyId, String requestId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getRequestStatusRequestBuilder(cosignerId, apiKeyId, requestId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getRequestStatus", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Status>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getRequestStatusRequestBuilder( + UUID cosignerId, String apiKeyId, String requestId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getRequestStatus", "cosignerId", cosignerId.toString()); + ValidationUtils.assertParamExistsAndNotEmpty("getRequestStatus", "apiKeyId", apiKeyId); + ValidationUtils.assertParamExistsAndNotEmpty("getRequestStatus", "requestId", requestId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())) + .replace("{apiKeyId}", ApiClient.urlEncode(apiKeyId.toString())) + .replace("{requestId}", ApiClient.urlEncode(requestId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Pair API key Pair an API key to a cosigner + * + * @param pairApiKeyRequest (required) + * @param cosignerId The unique identifier of the cosigner (required) + * @param apiKeyId The unique identifier of the API key (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<PairApiKeyResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> pairApiKey( + PairApiKeyRequest pairApiKeyRequest, + UUID cosignerId, + String apiKeyId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + pairApiKeyRequestBuilder( + pairApiKeyRequest, cosignerId, apiKeyId, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("pairApiKey", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + PairApiKeyResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder pairApiKeyRequestBuilder( + PairApiKeyRequest pairApiKeyRequest, + UUID cosignerId, + String apiKeyId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists("pairApiKey", "pairApiKeyRequest", pairApiKeyRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "pairApiKey", "cosignerId", cosignerId.toString()); + ValidationUtils.assertParamExistsAndNotEmpty("pairApiKey", "apiKeyId", apiKeyId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}/api_keys/{apiKeyId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())) + .replace("{apiKeyId}", ApiClient.urlEncode(apiKeyId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pairApiKeyRequest); + localVarRequestBuilder.method( + "PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Rename cosigner Rename a cosigner by ID **Note:** These endpoints are currently in beta and * might be subject to changes. @@ -476,4 +730,167 @@ private HttpRequest.Builder renameCosignerRequestBuilder( } return localVarRequestBuilder; } + /** + * Unpair API key Unpair an API key from a cosigner + * + * @param cosignerId The unique identifier of the cosigner (required) + * @param apiKeyId The unique identifier of the API key (required) + * @return CompletableFuture<ApiResponse<ApiKey>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> unpairApiKey(UUID cosignerId, String apiKeyId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + unpairApiKeyRequestBuilder(cosignerId, apiKeyId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("unpairApiKey", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + ApiKey>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder unpairApiKeyRequestBuilder(UUID cosignerId, String apiKeyId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "unpairApiKey", "cosignerId", cosignerId.toString()); + ValidationUtils.assertParamExistsAndNotEmpty("unpairApiKey", "apiKeyId", apiKeyId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}/api_keys/{apiKeyId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())) + .replace("{apiKeyId}", ApiClient.urlEncode(apiKeyId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Update API key callback handler Update the callback handler of an API key + * + * @param updateCallbackHandlerRequest (required) + * @param cosignerId The unique identifier of the cosigner (required) + * @param apiKeyId The unique identifier of the API key (required) + * @return CompletableFuture<ApiResponse<UpdateCallbackHandlerResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> updateCallbackHandler( + UpdateCallbackHandlerRequest updateCallbackHandlerRequest, + UUID cosignerId, + String apiKeyId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + updateCallbackHandlerRequestBuilder( + updateCallbackHandlerRequest, cosignerId, apiKeyId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "updateCallbackHandler", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + UpdateCallbackHandlerResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder updateCallbackHandlerRequestBuilder( + UpdateCallbackHandlerRequest updateCallbackHandlerRequest, + UUID cosignerId, + String apiKeyId) + throws ApiException { + ValidationUtils.assertParamExists( + "updateCallbackHandler", + "updateCallbackHandlerRequest", + updateCallbackHandlerRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "updateCallbackHandler", "cosignerId", cosignerId.toString()); + ValidationUtils.assertParamExistsAndNotEmpty("updateCallbackHandler", "apiKeyId", apiKeyId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/cosigners/{cosignerId}/api_keys/{apiKeyId}" + .replace("{cosignerId}", ApiClient.urlEncode(cosignerId.toString())) + .replace("{apiKeyId}", ApiClient.urlEncode(apiKeyId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(updateCallbackHandlerRequest); + localVarRequestBuilder.method( + "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java new file mode 100644 index 0000000..9f4c777 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java @@ -0,0 +1,292 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.PublicKeyInformation; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EmbeddedWalletsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public EmbeddedWalletsApi() { + this(new ApiClient()); + } + + public EmbeddedWalletsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get the public key of an asset Gets the public key of an asset associated with a specific + * account within a Non-Custodial Wallet + * + * @param walletId The ID of the Non-Custodial wallet (required) + * @param accountId The ID of the account (required) + * @param assetId The ID of the asset (required) + * @param change BIP44 derivation path - change value (required) + * @param addressIndex BIP44 derivation path - index value (required) + * @param compressed Compressed/Uncompressed public key format (optional) + * @return CompletableFuture<ApiResponse<PublicKeyInformation>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getPublicKeyInfoForAddressNcw( + String walletId, + String accountId, + String assetId, + BigDecimal change, + BigDecimal addressIndex, + Boolean compressed) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getPublicKeyInfoForAddressNcwRequestBuilder( + walletId, accountId, assetId, change, addressIndex, compressed); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getPublicKeyInfoForAddressNcw", + localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + PublicKeyInformation>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getPublicKeyInfoForAddressNcwRequestBuilder( + String walletId, + String accountId, + String assetId, + BigDecimal change, + BigDecimal addressIndex, + Boolean compressed) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getPublicKeyInfoForAddressNcw", "walletId", walletId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getPublicKeyInfoForAddressNcw", "accountId", accountId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getPublicKeyInfoForAddressNcw", "assetId", assetId); + ValidationUtils.assertParamExists("getPublicKeyInfoForAddressNcw", "change", change); + ValidationUtils.assertParamExists( + "getPublicKeyInfoForAddressNcw", "addressIndex", addressIndex); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info" + .replace("{walletId}", ApiClient.urlEncode(walletId.toString())) + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())) + .replace("{assetId}", ApiClient.urlEncode(assetId.toString())) + .replace("{change}", ApiClient.urlEncode(change.toString())) + .replace("{addressIndex}", ApiClient.urlEncode(addressIndex.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "compressed"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("compressed", compressed)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get the public key for a derivation path Gets the public key information based on derivation + * path and signing algorithm within a Non-Custodial Wallet + * + * @param walletId The ID of the Non-Custodial wallet (required) + * @param derivationPath An array of integers (passed as JSON stringified array) representing + * the full BIP44 derivation path of the requested public key. The first element must always + * be 44. (required) + * @param algorithm Elliptic Curve (required) + * @param compressed (optional) + * @return CompletableFuture<ApiResponse<PublicKeyInformation>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getPublicKeyInfoNcw( + String walletId, String derivationPath, String algorithm, Boolean compressed) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getPublicKeyInfoNcwRequestBuilder( + walletId, derivationPath, algorithm, compressed); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getPublicKeyInfoNcw", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + PublicKeyInformation>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getPublicKeyInfoNcwRequestBuilder( + String walletId, String derivationPath, String algorithm, Boolean compressed) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getPublicKeyInfoNcw", "walletId", walletId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getPublicKeyInfoNcw", "derivationPath", derivationPath); + ValidationUtils.assertParamExistsAndNotEmpty("getPublicKeyInfoNcw", "algorithm", algorithm); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/ncw/{walletId}/public_key_info" + .replace("{walletId}", ApiClient.urlEncode(walletId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "derivationPath"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("derivationPath", derivationPath)); + localVarQueryParameterBaseName = "algorithm"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("algorithm", algorithm)); + localVarQueryParameterBaseName = "compressed"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("compressed", compressed)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java b/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java new file mode 100644 index 0000000..17b1a73 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java @@ -0,0 +1,202 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.GetMpcKeysResponse; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class KeysBetaApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public KeysBetaApi() { + this(new ApiClient()); + } + + public KeysBetaApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get list of mpc keys Returns a list of MPC signing keys of the workspace. For each key, the + * list of players associated with it is attached. **Note:** This endpoint is currently in beta + * and might be subject to changes. + * + * @return CompletableFuture<ApiResponse<GetMpcKeysResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getMpcKeysList() throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getMpcKeysListRequestBuilder(); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getMpcKeysList", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + GetMpcKeysResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getMpcKeysListRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/keys/mpc/list"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get list of mpc keys by `userId` Returns a list of MPC signing keys of a specific + * user. For each key, the list of players associated with it is attached. **Note:** This + * endpoint is currently in beta and might be subject to changes. + * + * @param userId The id for the user (required) + * @return CompletableFuture<ApiResponse<GetMpcKeysResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getMpcKeysListByUser(String userId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getMpcKeysListByUserRequestBuilder(userId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getMpcKeysListByUser", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + GetMpcKeysResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getMpcKeysListByUserRequestBuilder(String userId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getMpcKeysListByUser", "userId", userId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/keys/mpc/list/{userId}" + .replace("{userId}", ApiClient.urlEncode(userId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/StakingBetaApi.java b/src/main/java/com/fireblocks/sdk/api/StakingApi.java similarity index 60% rename from src/main/java/com/fireblocks/sdk/api/StakingBetaApi.java rename to src/main/java/com/fireblocks/sdk/api/StakingApi.java index 9e9579b..0faa0d4 100644 --- a/src/main/java/com/fireblocks/sdk/api/StakingBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/StakingApi.java @@ -20,12 +20,19 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; -import com.fireblocks.sdk.model.ChainInfoResponseDto; -import com.fireblocks.sdk.model.DelegationDto; -import com.fireblocks.sdk.model.DelegationSummaryDto; -import com.fireblocks.sdk.model.ExecuteActionRequest; -import com.fireblocks.sdk.model.ExecuteActionResponse; -import com.fireblocks.sdk.model.ProviderDto; +import com.fireblocks.sdk.model.ChainDescriptor; +import com.fireblocks.sdk.model.ChainInfoResponse; +import com.fireblocks.sdk.model.ClaimRewardsRequest; +import com.fireblocks.sdk.model.Delegation; +import com.fireblocks.sdk.model.DelegationSummary; +import com.fireblocks.sdk.model.Provider; +import com.fireblocks.sdk.model.SplitRequest; +import com.fireblocks.sdk.model.SplitResponse; +import com.fireblocks.sdk.model.StakeRequest; +import com.fireblocks.sdk.model.StakeResponse; +import com.fireblocks.sdk.model.StakingProvider; +import com.fireblocks.sdk.model.UnstakeRequest; +import com.fireblocks.sdk.model.WithdrawRequest; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -41,7 +48,7 @@ import java.util.function.Consumer; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StakingBetaApi { +public class StakingApi { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; private final String memberVarBaseUri; @@ -50,11 +57,11 @@ public class StakingBetaApi { private final Consumer> memberVarResponseInterceptor; private final Consumer> memberVarAsyncResponseInterceptor; - public StakingBetaApi() { + public StakingApi() { this(new ApiClient()); } - public StakingBetaApi(ApiClient apiClient) { + public StakingApi(ApiClient apiClient) { memberVarHttpClient = apiClient.getHttpClient(); memberVarObjectMapper = apiClient.getObjectMapper(); memberVarBaseUri = apiClient.getBaseUri(); @@ -79,18 +86,18 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * Approve the terms of service of the staking provider. This must be called before performing a - * staking action for the first time with this provider. + * Approve staking terms of service Approve the terms of service of the staking provider. This + * must be called before performing a staking action for the first time with this provider. * * @param providerId The unique identifier of the staking provider (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Object>> + * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> approveTermsOfServiceByProviderId( - String providerId, String idempotencyKey) throws ApiException { + public CompletableFuture> approveTermsOfServiceByProviderId( + StakingProvider providerId, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = approveTermsOfServiceByProviderIdRequestBuilder(providerId, idempotencyKey); @@ -107,21 +114,11 @@ public CompletableFuture> approveTermsOfServiceByProviderId( "approveTermsOfServiceByProviderId", localVarResponse)); } - try { - String responseBody = localVarResponse.body(); - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() - ? null - : memberVarObjectMapper.readValue( - responseBody, - new TypeReference< - Object>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); @@ -129,8 +126,8 @@ public CompletableFuture> approveTermsOfServiceByProviderId( } private HttpRequest.Builder approveTermsOfServiceByProviderIdRequestBuilder( - String providerId, String idempotencyKey) throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty( + StakingProvider providerId, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists( "approveTermsOfServiceByProviderId", "providerId", providerId); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -156,28 +153,24 @@ private HttpRequest.Builder approveTermsOfServiceByProviderIdRequestBuilder( return localVarRequestBuilder; } /** - * Perform a chain-specific staking action (e.g. stake, unstake, withdraw). + * Execute a Claim Rewards operation Perform a chain-specific Claim Rewards. * - * @param executeActionRequest (required) - * @param chainDescriptor The protocol identifier (e.g. \"ETH\"/\"SOL\") to - * use (required) - * @param actionId The operation that can be executed on a vault/position (required) + * @param claimRewardsRequest (required) + * @param chainDescriptor The protocol identifier (e.g. \"MATIC\"/\"SOL\") + * to use (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ExecuteActionResponse>> + * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> executeAction( - ExecuteActionRequest executeActionRequest, - String chainDescriptor, - String actionId, - String idempotencyKey) + public CompletableFuture> claimRewards( + ClaimRewardsRequest claimRewardsRequest, String chainDescriptor, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - executeActionRequestBuilder( - executeActionRequest, chainDescriptor, actionId, idempotencyKey); + claimRewardsRequestBuilder( + claimRewardsRequest, chainDescriptor, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -187,49 +180,34 @@ public CompletableFuture> executeAction( } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("executeAction", localVarResponse)); - } - try { - String responseBody = localVarResponse.body(); - return CompletableFuture.completedFuture( - new ApiResponse( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - responseBody == null || responseBody.isBlank() - ? null - : memberVarObjectMapper.readValue( - responseBody, - new TypeReference< - ExecuteActionResponse>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); + getApiException("claimRewards", localVarResponse)); } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); }); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } } - private HttpRequest.Builder executeActionRequestBuilder( - ExecuteActionRequest executeActionRequest, - String chainDescriptor, - String actionId, - String idempotencyKey) + private HttpRequest.Builder claimRewardsRequestBuilder( + ClaimRewardsRequest claimRewardsRequest, String chainDescriptor, String idempotencyKey) throws ApiException { ValidationUtils.assertParamExists( - "executeAction", "executeActionRequest", executeActionRequest); + "claimRewards", "claimRewardsRequest", claimRewardsRequest); ValidationUtils.assertParamExistsAndNotEmpty( - "executeAction", "chainDescriptor", chainDescriptor); - ValidationUtils.assertParamExistsAndNotEmpty("executeAction", "actionId", actionId); + "claimRewards", "chainDescriptor", chainDescriptor); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = - "/staking/chains/{chainDescriptor}/{actionId}" + "/staking/chains/{chainDescriptor}/claim_rewards" .replace( "{chainDescriptor}", - ApiClient.urlEncode(chainDescriptor.toString())) - .replace("{actionId}", ApiClient.urlEncode(actionId.toString())); + ApiClient.urlEncode(chainDescriptor.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -240,7 +218,7 @@ private HttpRequest.Builder executeActionRequestBuilder( localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(executeActionRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(claimRewardsRequest); localVarRequestBuilder.method( "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { @@ -255,17 +233,18 @@ private HttpRequest.Builder executeActionRequestBuilder( return localVarRequestBuilder; } /** - * Return detailed information on all staking positions, including the staked amount, rewards, - * status and more. + * List staking positions details Return detailed information on all staking positions, + * including the staked amount, rewards, status and more. * - * @param chainDescriptor Use \"ETH\" / \"SOL\" in order to obtain - * information related to the specific blockchain network or retrieve information about all - * chains that have data available by providing no argument. (optional) - * @return CompletableFuture<ApiResponse<List<DelegationDto>>> + * @param chainDescriptor Use \"ETH\" / \"SOL\" / \"MATIC\" / + * \"STETH_ETH\" in order to obtain information related to the specific blockchain + * network or retrieve information about all chains that have data available by providing no + * argument. (optional) + * @return CompletableFuture<ApiResponse<List<Delegation>>> * @throws ApiException if fails to make API call */ - public CompletableFuture>> getAllDelegations( - String chainDescriptor) throws ApiException { + public CompletableFuture>> getAllDelegations( + ChainDescriptor chainDescriptor) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getAllDelegationsRequestBuilder(chainDescriptor); @@ -283,7 +262,7 @@ public CompletableFuture>> getAllDelegations( try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse>( + new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -292,7 +271,7 @@ public CompletableFuture>> getAllDelegations( responseBody, new TypeReference< List< - DelegationDto>>() {}))); + Delegation>>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -302,7 +281,7 @@ public CompletableFuture>> getAllDelegations( } } - private HttpRequest.Builder getAllDelegationsRequestBuilder(String chainDescriptor) + private HttpRequest.Builder getAllDelegationsRequestBuilder(ChainDescriptor chainDescriptor) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -339,16 +318,17 @@ private HttpRequest.Builder getAllDelegationsRequestBuilder(String chainDescript return localVarRequestBuilder; } /** - * Return chain-specific, staking-related information summary (e.g. epoch details, lockup - * durations, estimated rewards, etc.) + * Get chain-specific staking summary Return chain-specific, staking-related information summary + * (e.g. epoch details, lockup durations, estimated rewards, etc.) * - * @param chainDescriptor The protocol identifier (e.g. \"ETH\"/\"SOL\") to - * use (required) - * @return CompletableFuture<ApiResponse<ChainInfoResponseDto>> + * @param chainDescriptor The protocol identifier (e.g. + * \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use + * (required) + * @return CompletableFuture<ApiResponse<ChainInfoResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getChainInfo(String chainDescriptor) - throws ApiException { + public CompletableFuture> getChainInfo( + ChainDescriptor chainDescriptor) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getChainInfoRequestBuilder(chainDescriptor); @@ -366,7 +346,7 @@ public CompletableFuture> getChainInfo(String try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -374,7 +354,7 @@ public CompletableFuture> getChainInfo(String : memberVarObjectMapper.readValue( responseBody, new TypeReference< - ChainInfoResponseDto>() {}))); + ChainInfoResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -384,10 +364,9 @@ public CompletableFuture> getChainInfo(String } } - private HttpRequest.Builder getChainInfoRequestBuilder(String chainDescriptor) + private HttpRequest.Builder getChainInfoRequestBuilder(ChainDescriptor chainDescriptor) throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty( - "getChainInfo", "chainDescriptor", chainDescriptor); + ValidationUtils.assertParamExists("getChainInfo", "chainDescriptor", chainDescriptor); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -411,12 +390,12 @@ private HttpRequest.Builder getChainInfoRequestBuilder(String chainDescriptor) return localVarRequestBuilder; } /** - * Return an alphabetical list of supported chains. + * List staking supported chains Return an alphabetical list of supported chains. * - * @return CompletableFuture<ApiResponse<List<String>>> + * @return CompletableFuture<ApiResponse<List<ChainDescriptor>>> * @throws ApiException if fails to make API call */ - public CompletableFuture>> getChains() throws ApiException { + public CompletableFuture>> getChains() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getChainsRequestBuilder(); return memberVarHttpClient @@ -433,7 +412,7 @@ public CompletableFuture>> getChains() throws ApiExcept try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse>( + new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -441,7 +420,8 @@ public CompletableFuture>> getChains() throws ApiExcept : memberVarObjectMapper.readValue( responseBody, new TypeReference< - List>() {}))); + List< + ChainDescriptor>>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -471,14 +451,14 @@ private HttpRequest.Builder getChainsRequestBuilder() throws ApiException { return localVarRequestBuilder; } /** - * Return detailed information on a staking position, including the staked amount, rewards, - * status and more. + * Get staking position details Return detailed information on a staking position, including the + * staked amount, rewards, status and more. * * @param id The unique identifier of the staking position (required) - * @return CompletableFuture<ApiResponse<DelegationDto>> + * @return CompletableFuture<ApiResponse<Delegation>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getDelegationById(String id) + public CompletableFuture> getDelegationById(String id) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getDelegationByIdRequestBuilder(id); @@ -496,7 +476,7 @@ public CompletableFuture> getDelegationById(String id try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -504,7 +484,7 @@ public CompletableFuture> getDelegationById(String id : memberVarObjectMapper.readValue( responseBody, new TypeReference< - DelegationDto>() {}))); + Delegation>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -536,12 +516,12 @@ private HttpRequest.Builder getDelegationByIdRequestBuilder(String id) throws Ap return localVarRequestBuilder; } /** - * Return information on all the available staking providers. + * List staking providers details Return information on all the available staking providers. * - * @return CompletableFuture<ApiResponse<List<ProviderDto>>> + * @return CompletableFuture<ApiResponse<List<Provider>>> * @throws ApiException if fails to make API call */ - public CompletableFuture>> getProviders() throws ApiException { + public CompletableFuture>> getProviders() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getProvidersRequestBuilder(); return memberVarHttpClient @@ -558,7 +538,7 @@ public CompletableFuture>> getProviders() throws A try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse>( + new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -566,8 +546,7 @@ public CompletableFuture>> getProviders() throws A : memberVarObjectMapper.readValue( responseBody, new TypeReference< - List< - ProviderDto>>() {}))); + List>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -597,13 +576,13 @@ private HttpRequest.Builder getProvidersRequestBuilder() throws ApiException { return localVarRequestBuilder; } /** - * Return a summary of all vaults, categorized by their status (active, inactive), the total - * amounts staked and total rewards per-chain. + * Get staking summary details Return a summary of all vaults, categorized by their status + * (active, inactive), the total amounts staked and total rewards per-chain. * - * @return CompletableFuture<ApiResponse<DelegationSummaryDto>> + * @return CompletableFuture<ApiResponse<DelegationSummary>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getSummary() throws ApiException { + public CompletableFuture> getSummary() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getSummaryRequestBuilder(); return memberVarHttpClient @@ -620,7 +599,7 @@ public CompletableFuture> getSummary() throws try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -628,7 +607,7 @@ public CompletableFuture> getSummary() throws : memberVarObjectMapper.readValue( responseBody, new TypeReference< - DelegationSummaryDto>() {}))); + DelegationSummary>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -658,13 +637,13 @@ private HttpRequest.Builder getSummaryRequestBuilder() throws ApiException { return localVarRequestBuilder; } /** - * Return a summary for each vault, categorized by their status (active, inactive), the total - * amounts staked and total rewards per-chain. + * Get staking summary details by vault Return a summary for each vault, categorized by their + * status (active, inactive), the total amounts staked and total rewards per-chain. * - * @return CompletableFuture<ApiResponse<Map<String, DelegationSummaryDto>>> + * @return CompletableFuture<ApiResponse<Map<String, DelegationSummary>>> * @throws ApiException if fails to make API call */ - public CompletableFuture>> getSummaryByVault() + public CompletableFuture>> getSummaryByVault() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getSummaryByVaultRequestBuilder(); @@ -682,7 +661,7 @@ public CompletableFuture>> getSumm try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse>( + new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -692,7 +671,7 @@ public CompletableFuture>> getSumm new TypeReference< Map< String, - DelegationSummaryDto>>() {}))); + DelegationSummary>>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -721,4 +700,332 @@ private HttpRequest.Builder getSummaryByVaultRequestBuilder() throws ApiExceptio } return localVarRequestBuilder; } + /** + * Execute a Split operation on SOL/SOL_TEST stake account Perform a Solana Split stake account. + * + * @param splitRequest (required) + * @param chainDescriptor The protocol identifier (e.g. + * \"SOL\"/\"SOL_TEST\") to use (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<SplitResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> split( + SplitRequest splitRequest, String chainDescriptor, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + splitRequestBuilder(splitRequest, chainDescriptor, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("split", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + SplitResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder splitRequestBuilder( + SplitRequest splitRequest, String chainDescriptor, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists("split", "splitRequest", splitRequest); + ValidationUtils.assertParamExistsAndNotEmpty("split", "chainDescriptor", chainDescriptor); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/staking/chains/{chainDescriptor}/split" + .replace( + "{chainDescriptor}", + ApiClient.urlEncode(chainDescriptor.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(splitRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Initiate Stake Operation Perform a chain-specific Stake. + * + * @param stakeRequest (required) + * @param chainDescriptor The protocol identifier (e.g. + * \"ETH\"/\"SOL\"/\"MATIC\") to use (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<StakeResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> stake( + StakeRequest stakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + stakeRequestBuilder(stakeRequest, chainDescriptor, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("stake", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + StakeResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder stakeRequestBuilder( + StakeRequest stakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists("stake", "stakeRequest", stakeRequest); + ValidationUtils.assertParamExists("stake", "chainDescriptor", chainDescriptor); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/staking/chains/{chainDescriptor}/stake" + .replace( + "{chainDescriptor}", + ApiClient.urlEncode(chainDescriptor.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(stakeRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Execute an Unstake operation Execute an Unstake operation + * + * @param unstakeRequest (required) + * @param chainDescriptor The protocol identifier (e.g. + * \"ETH\"/\"SOL\"/\"MATIC\") to use (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> unstake( + UnstakeRequest unstakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + unstakeRequestBuilder(unstakeRequest, chainDescriptor, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("unstake", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder unstakeRequestBuilder( + UnstakeRequest unstakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists("unstake", "unstakeRequest", unstakeRequest); + ValidationUtils.assertParamExists("unstake", "chainDescriptor", chainDescriptor); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/staking/chains/{chainDescriptor}/unstake" + .replace( + "{chainDescriptor}", + ApiClient.urlEncode(chainDescriptor.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(unstakeRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Execute a Withdraw operation Perform a chain-specific Withdraw. + * + * @param withdrawRequest (required) + * @param chainDescriptor The protocol identifier (e.g. + * \"ETH\"/\"SOL\"/\"MATIC\") to use (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> withdraw( + WithdrawRequest withdrawRequest, ChainDescriptor chainDescriptor, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + withdrawRequestBuilder(withdrawRequest, chainDescriptor, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("withdraw", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder withdrawRequestBuilder( + WithdrawRequest withdrawRequest, ChainDescriptor chainDescriptor, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists("withdraw", "withdrawRequest", withdrawRequest); + ValidationUtils.assertParamExists("withdraw", "chainDescriptor", chainDescriptor); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/staking/chains/{chainDescriptor}/withdraw" + .replace( + "{chainDescriptor}", + ApiClient.urlEncode(chainDescriptor.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(withdrawRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java new file mode 100644 index 0000000..a1aea36 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java @@ -0,0 +1,688 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.CreateWebhookRequest; +import com.fireblocks.sdk.model.NotificationPaginatedResponse; +import com.fireblocks.sdk.model.NotificationStatus; +import com.fireblocks.sdk.model.NotificationWithData; +import com.fireblocks.sdk.model.UpdateWebhookRequest; +import com.fireblocks.sdk.model.Webhook; +import com.fireblocks.sdk.model.WebhookEvent; +import com.fireblocks.sdk.model.WebhookPaginatedResponse; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WebhooksV2BetaApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public WebhooksV2BetaApi() { + this(new ApiClient()); + } + + public WebhooksV2BetaApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Create new webhook Creates a new webhook, which will be triggered on the specified events + * **Note:** These endpoints are currently in beta and might be subject to changes. + * + * @param createWebhookRequest (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<Webhook>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> createWebhook( + CreateWebhookRequest createWebhookRequest, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + createWebhookRequestBuilder(createWebhookRequest, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("createWebhook", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Webhook>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder createWebhookRequestBuilder( + CreateWebhookRequest createWebhookRequest, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists( + "createWebhook", "createWebhookRequest", createWebhookRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createWebhookRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Delete webhook Delete a webhook by its id **Note:** These endpoints are currently in beta and + * might be subject to changes. + * + * @param webhookId The unique identifier of the webhook (required) + * @return CompletableFuture<ApiResponse<Webhook>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> deleteWebhook(UUID webhookId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = deleteWebhookRequestBuilder(webhookId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("deleteWebhook", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Webhook>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deleteWebhookRequestBuilder(UUID webhookId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "deleteWebhook", "webhookId", webhookId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get notification by id Get notification by id **Note:** These endpoints are currently in beta + * and might be subject to changes. + * + * @param webhookId The ID of the webhook to fetch (required) + * @param notificationId The ID of the notification to fetch (required) + * @param includeData Include the data of the notification (optional) + * @return CompletableFuture<ApiResponse<NotificationWithData>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getNotification( + String webhookId, String notificationId, Boolean includeData) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getNotificationRequestBuilder(webhookId, notificationId, includeData); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getNotification", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + NotificationWithData>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getNotificationRequestBuilder( + String webhookId, String notificationId, Boolean includeData) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getNotification", "webhookId", webhookId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getNotification", "notificationId", notificationId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications/{notificationId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())) + .replace( + "{notificationId}", ApiClient.urlEncode(notificationId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "includeData"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("includeData", includeData)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get all notifications by webhook id Get all notifications by webhook id (paginated) **Note:** + * These endpoints are currently in beta and might be subject to changes. + * + * @param webhookId (required) + * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) + * @param pageCursor Cursor of the required page (optional) + * @param pageSize Maximum number of items in the page (optional, default to 100) + * @param createdStartDate sort by start date (optional) + * @param createdEndDate sort by end date (optional) + * @param statuses Filter by Notification statues (optional + * @param eventTypes Filter by Notification eventTypes (optional + * @param resourceId Filter by resourceId (optional) + * @return CompletableFuture<ApiResponse<NotificationPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getNotifications( + UUID webhookId, + String order, + String pageCursor, + BigDecimal pageSize, + String createdStartDate, + String createdEndDate, + List statuses, + List eventTypes, + String resourceId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getNotificationsRequestBuilder( + webhookId, + order, + pageCursor, + pageSize, + createdStartDate, + createdEndDate, + statuses, + eventTypes, + resourceId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getNotifications", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + NotificationPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getNotificationsRequestBuilder( + UUID webhookId, + String order, + String pageCursor, + BigDecimal pageSize, + String createdStartDate, + String createdEndDate, + List statuses, + List eventTypes, + String resourceId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getNotifications", "webhookId", webhookId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "order"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("order", order)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "createdStartDate"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("createdStartDate", createdStartDate)); + localVarQueryParameterBaseName = "createdEndDate"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("createdEndDate", createdEndDate)); + localVarQueryParameterBaseName = "statuses"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "statuses", statuses)); + localVarQueryParameterBaseName = "eventTypes"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "eventTypes", eventTypes)); + localVarQueryParameterBaseName = "resourceId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("resourceId", resourceId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get webhook by id Retrieve a webhook by its id **Note:** These endpoints are currently in + * beta and might be subject to changes. + * + * @param webhookId The unique identifier of the webhook (required) + * @return CompletableFuture<ApiResponse<Webhook>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getWebhook(UUID webhookId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getWebhookRequestBuilder(webhookId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getWebhook", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Webhook>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getWebhookRequestBuilder(UUID webhookId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getWebhook", "webhookId", webhookId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get all webhooks Get all webhooks (paginated) **Note:** These endpoints are currently in beta + * and might be subject to changes. + * + * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) + * @param pageCursor Cursor of the required page (optional) + * @param pageSize Maximum number of items in the page (optional, default to 10) + * @return CompletableFuture<ApiResponse<WebhookPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getWebhooks( + String order, String pageCursor, BigDecimal pageSize) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getWebhooksRequestBuilder(order, pageCursor, pageSize); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getWebhooks", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + WebhookPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getWebhooksRequestBuilder( + String order, String pageCursor, BigDecimal pageSize) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/webhooks"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "order"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("order", order)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Update webhook Update a webhook by its id **Note:** These endpoints are currently in beta and + * might be subject to changes. + * + * @param updateWebhookRequest (required) + * @param webhookId The unique identifier of the webhook (required) + * @return CompletableFuture<ApiResponse<Webhook>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> updateWebhook( + UpdateWebhookRequest updateWebhookRequest, UUID webhookId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + updateWebhookRequestBuilder(updateWebhookRequest, webhookId); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("updateWebhook", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + Webhook>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder updateWebhookRequestBuilder( + UpdateWebhookRequest updateWebhookRequest, UUID webhookId) throws ApiException { + ValidationUtils.assertParamExists( + "updateWebhook", "updateWebhookRequest", updateWebhookRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "updateWebhook", "webhookId", webhookId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(updateWebhookRequest); + localVarRequestBuilder.method( + "PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AddCosignerRequest.java b/src/main/java/com/fireblocks/sdk/model/AddCosignerRequest.java new file mode 100644 index 0000000..c8dc291 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AddCosignerRequest.java @@ -0,0 +1,224 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** AddCosignerRequest */ +@JsonPropertyOrder({ + AddCosignerRequest.JSON_PROPERTY_API_KEY_ID, + AddCosignerRequest.JSON_PROPERTY_NAME, + AddCosignerRequest.JSON_PROPERTY_EXISTING_COSIGNER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddCosignerRequest { + public static final String JSON_PROPERTY_API_KEY_ID = "apiKeyId"; + private UUID apiKeyId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_EXISTING_COSIGNER = "existingCosigner"; + private Boolean existingCosigner = false; + + public AddCosignerRequest() {} + + public AddCosignerRequest apiKeyId(UUID apiKeyId) { + this.apiKeyId = apiKeyId; + return this; + } + + /** + * The id of the API key to be paired with the cosigner + * + * @return apiKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getApiKeyId() { + return apiKeyId; + } + + @JsonProperty(JSON_PROPERTY_API_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setApiKeyId(UUID apiKeyId) { + this.apiKeyId = apiKeyId; + } + + public AddCosignerRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the cosigner + * + * @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 AddCosignerRequest existingCosigner(Boolean existingCosigner) { + this.existingCosigner = existingCosigner; + return this; + } + + /** + * Whether the cosigner already exists in another workspace + * + * @return existingCosigner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXISTING_COSIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExistingCosigner() { + return existingCosigner; + } + + @JsonProperty(JSON_PROPERTY_EXISTING_COSIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExistingCosigner(Boolean existingCosigner) { + this.existingCosigner = existingCosigner; + } + + /** Return true if this AddCosignerRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCosignerRequest addCosignerRequest = (AddCosignerRequest) o; + return Objects.equals(this.apiKeyId, addCosignerRequest.apiKeyId) + && Objects.equals(this.name, addCosignerRequest.name) + && Objects.equals(this.existingCosigner, addCosignerRequest.existingCosigner); + } + + @Override + public int hashCode() { + return Objects.hash(apiKeyId, name, existingCosigner); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCosignerRequest {\n"); + sb.append(" apiKeyId: ").append(toIndentedString(apiKeyId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" existingCosigner: ").append(toIndentedString(existingCosigner)).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 `apiKeyId` to the URL query string + if (getApiKeyId() != null) { + joiner.add( + String.format( + "%sapiKeyId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getApiKeyId()), 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 `existingCosigner` to the URL query string + if (getExistingCosigner() != null) { + joiner.add( + String.format( + "%sexistingCosigner%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getExistingCosigner()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java b/src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java new file mode 100644 index 0000000..cce067c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java @@ -0,0 +1,268 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** AddCosignerResponse */ +@JsonPropertyOrder({ + AddCosignerResponse.JSON_PROPERTY_API_KEY_ID, + AddCosignerResponse.JSON_PROPERTY_NAME, + AddCosignerResponse.JSON_PROPERTY_EXISTING_COSIGNER, + AddCosignerResponse.JSON_PROPERTY_PENDING_COSIGNER_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddCosignerResponse { + public static final String JSON_PROPERTY_API_KEY_ID = "apiKeyId"; + private UUID apiKeyId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_EXISTING_COSIGNER = "existingCosigner"; + private Boolean existingCosigner = false; + + public static final String JSON_PROPERTY_PENDING_COSIGNER_ID = "pendingCosignerId"; + private UUID pendingCosignerId; + + public AddCosignerResponse() {} + + public AddCosignerResponse apiKeyId(UUID apiKeyId) { + this.apiKeyId = apiKeyId; + return this; + } + + /** + * The id of the API key to be paired with the cosigner + * + * @return apiKeyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getApiKeyId() { + return apiKeyId; + } + + @JsonProperty(JSON_PROPERTY_API_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setApiKeyId(UUID apiKeyId) { + this.apiKeyId = apiKeyId; + } + + public AddCosignerResponse name(String name) { + this.name = name; + return this; + } + + /** + * The name of the cosigner + * + * @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 AddCosignerResponse existingCosigner(Boolean existingCosigner) { + this.existingCosigner = existingCosigner; + return this; + } + + /** + * Whether the cosigner already exists in another workspace + * + * @return existingCosigner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXISTING_COSIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExistingCosigner() { + return existingCosigner; + } + + @JsonProperty(JSON_PROPERTY_EXISTING_COSIGNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExistingCosigner(Boolean existingCosigner) { + this.existingCosigner = existingCosigner; + } + + public AddCosignerResponse pendingCosignerId(UUID pendingCosignerId) { + this.pendingCosignerId = pendingCosignerId; + return this; + } + + /** + * The unique identifier of a pending cosigner + * + * @return pendingCosignerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PENDING_COSIGNER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getPendingCosignerId() { + return pendingCosignerId; + } + + @JsonProperty(JSON_PROPERTY_PENDING_COSIGNER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPendingCosignerId(UUID pendingCosignerId) { + this.pendingCosignerId = pendingCosignerId; + } + + /** Return true if this AddCosignerResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCosignerResponse addCosignerResponse = (AddCosignerResponse) o; + return Objects.equals(this.apiKeyId, addCosignerResponse.apiKeyId) + && Objects.equals(this.name, addCosignerResponse.name) + && Objects.equals(this.existingCosigner, addCosignerResponse.existingCosigner) + && Objects.equals(this.pendingCosignerId, addCosignerResponse.pendingCosignerId); + } + + @Override + public int hashCode() { + return Objects.hash(apiKeyId, name, existingCosigner, pendingCosignerId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCosignerResponse {\n"); + sb.append(" apiKeyId: ").append(toIndentedString(apiKeyId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" existingCosigner: ").append(toIndentedString(existingCosigner)).append("\n"); + sb.append(" pendingCosignerId: ") + .append(toIndentedString(pendingCosignerId)) + .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 `apiKeyId` to the URL query string + if (getApiKeyId() != null) { + joiner.add( + String.format( + "%sapiKeyId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getApiKeyId()), 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 `existingCosigner` to the URL query string + if (getExistingCosigner() != null) { + joiner.add( + String.format( + "%sexistingCosigner%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getExistingCosigner()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `pendingCosignerId` to the URL query string + if (getPendingCosignerId() != null) { + joiner.add( + String.format( + "%spendingCosignerId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPendingCosignerId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AdditionalInfoDto.java b/src/main/java/com/fireblocks/sdk/model/AdditionalInfo.java similarity index 89% rename from src/main/java/com/fireblocks/sdk/model/AdditionalInfoDto.java rename to src/main/java/com/fireblocks/sdk/model/AdditionalInfo.java index 16636f8..362e504 100644 --- a/src/main/java/com/fireblocks/sdk/model/AdditionalInfoDto.java +++ b/src/main/java/com/fireblocks/sdk/model/AdditionalInfo.java @@ -22,14 +22,17 @@ import java.util.Objects; import java.util.StringJoiner; -/** AdditionalInfoDto */ +/** + * Additional information related to the blockchain. This may include extra details about the + * blockchain network. + */ @JsonPropertyOrder({ - AdditionalInfoDto.JSON_PROPERTY_ESTIMATED_ANNUAL_REWARD, - AdditionalInfoDto.JSON_PROPERTY_LOCKUP_PERIOD, - AdditionalInfoDto.JSON_PROPERTY_ACTIVATION_PERIOD + AdditionalInfo.JSON_PROPERTY_ESTIMATED_ANNUAL_REWARD, + AdditionalInfo.JSON_PROPERTY_LOCKUP_PERIOD, + AdditionalInfo.JSON_PROPERTY_ACTIVATION_PERIOD }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalInfoDto { +public class AdditionalInfo { public static final String JSON_PROPERTY_ESTIMATED_ANNUAL_REWARD = "estimatedAnnualReward"; private BigDecimal estimatedAnnualReward; @@ -39,9 +42,9 @@ public class AdditionalInfoDto { public static final String JSON_PROPERTY_ACTIVATION_PERIOD = "activationPeriod"; private BigDecimal activationPeriod; - public AdditionalInfoDto() {} + public AdditionalInfo() {} - public AdditionalInfoDto estimatedAnnualReward(BigDecimal estimatedAnnualReward) { + public AdditionalInfo estimatedAnnualReward(BigDecimal estimatedAnnualReward) { this.estimatedAnnualReward = estimatedAnnualReward; return this; } @@ -65,7 +68,7 @@ public void setEstimatedAnnualReward(BigDecimal estimatedAnnualReward) { this.estimatedAnnualReward = estimatedAnnualReward; } - public AdditionalInfoDto lockupPeriod(BigDecimal lockupPeriod) { + public AdditionalInfo lockupPeriod(BigDecimal lockupPeriod) { this.lockupPeriod = lockupPeriod; return this; } @@ -89,7 +92,7 @@ public void setLockupPeriod(BigDecimal lockupPeriod) { this.lockupPeriod = lockupPeriod; } - public AdditionalInfoDto activationPeriod(BigDecimal activationPeriod) { + public AdditionalInfo activationPeriod(BigDecimal activationPeriod) { this.activationPeriod = activationPeriod; return this; } @@ -113,7 +116,7 @@ public void setActivationPeriod(BigDecimal activationPeriod) { this.activationPeriod = activationPeriod; } - /** Return true if this AdditionalInfoDto object is equal to o. */ + /** Return true if this AdditionalInfo object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -122,10 +125,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdditionalInfoDto additionalInfoDto = (AdditionalInfoDto) o; - return Objects.equals(this.estimatedAnnualReward, additionalInfoDto.estimatedAnnualReward) - && Objects.equals(this.lockupPeriod, additionalInfoDto.lockupPeriod) - && Objects.equals(this.activationPeriod, additionalInfoDto.activationPeriod); + AdditionalInfo additionalInfo = (AdditionalInfo) o; + return Objects.equals(this.estimatedAnnualReward, additionalInfo.estimatedAnnualReward) + && Objects.equals(this.lockupPeriod, additionalInfo.lockupPeriod) + && Objects.equals(this.activationPeriod, additionalInfo.activationPeriod); } @Override @@ -136,7 +139,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalInfoDto {\n"); + sb.append("class AdditionalInfo {\n"); sb.append(" estimatedAnnualReward: ") .append(toIndentedString(estimatedAnnualReward)) .append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/ApiKey.java b/src/main/java/com/fireblocks/sdk/model/ApiKey.java index 7fb903f..f5c2f3e 100644 --- a/src/main/java/com/fireblocks/sdk/model/ApiKey.java +++ b/src/main/java/com/fireblocks/sdk/model/ApiKey.java @@ -24,7 +24,11 @@ import java.util.UUID; /** ApiKey */ -@JsonPropertyOrder({ApiKey.JSON_PROPERTY_ID, ApiKey.JSON_PROPERTY_LAST_SEEN}) +@JsonPropertyOrder({ + ApiKey.JSON_PROPERTY_ID, + ApiKey.JSON_PROPERTY_LAST_SEEN, + ApiKey.JSON_PROPERTY_CALLBACK_HANDLER +}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiKey { public static final String JSON_PROPERTY_ID = "id"; @@ -33,6 +37,9 @@ public class ApiKey { public static final String JSON_PROPERTY_LAST_SEEN = "lastSeen"; private OffsetDateTime lastSeen; + public static final String JSON_PROPERTY_CALLBACK_HANDLER = "callbackHandler"; + private CallbackHandler callbackHandler; + public ApiKey() {} public ApiKey id(UUID id) { @@ -68,19 +75,42 @@ public ApiKey lastSeen(OffsetDateTime lastSeen) { * * @return lastSeen */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_LAST_SEEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public OffsetDateTime getLastSeen() { return lastSeen; } @JsonProperty(JSON_PROPERTY_LAST_SEEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setLastSeen(OffsetDateTime lastSeen) { this.lastSeen = lastSeen; } + public ApiKey callbackHandler(CallbackHandler callbackHandler) { + this.callbackHandler = callbackHandler; + return this; + } + + /** + * Get callbackHandler + * + * @return callbackHandler + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CallbackHandler getCallbackHandler() { + return callbackHandler; + } + + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallbackHandler(CallbackHandler callbackHandler) { + this.callbackHandler = callbackHandler; + } + /** Return true if this ApiKey object is equal to o. */ @Override public boolean equals(Object o) { @@ -91,12 +121,14 @@ public boolean equals(Object o) { return false; } ApiKey apiKey = (ApiKey) o; - return Objects.equals(this.id, apiKey.id) && Objects.equals(this.lastSeen, apiKey.lastSeen); + return Objects.equals(this.id, apiKey.id) + && Objects.equals(this.lastSeen, apiKey.lastSeen) + && Objects.equals(this.callbackHandler, apiKey.callbackHandler); } @Override public int hashCode() { - return Objects.hash(id, lastSeen); + return Objects.hash(id, lastSeen, callbackHandler); } @Override @@ -105,6 +137,7 @@ public String toString() { sb.append("class ApiKey {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" lastSeen: ").append(toIndentedString(lastSeen)).append("\n"); + sb.append(" callbackHandler: ").append(toIndentedString(callbackHandler)).append("\n"); sb.append("}"); return sb.toString(); } @@ -174,6 +207,11 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `callbackHandler` to the URL query string + if (getCallbackHandler() != null) { + joiner.add(getCallbackHandler().toUrlQueryString(prefix + "callbackHandler" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java index 4412dde..2ccc818 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetBadRequestErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetBadRequestErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetBadRequestErrorResponse code(String code) { + public AssetBadRequestErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetBadRequestErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java new file mode 100644 index 0000000..b8cdef4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java @@ -0,0 +1,70 @@ +/* + * 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; + +/** Gets or Sets AssetClassBeta */ +public enum AssetClassBeta { + NATIVE("NATIVE"), + + FT("FT"), + + FIAT("FIAT"), + + NFT("NFT"), + + SFT("SFT"); + + private String value; + + AssetClassBeta(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetClassBeta fromValue(String value) { + for (AssetClassBeta b : AssetClassBeta.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/AssetConflictErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java index 5c78429..4d51acf 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetConflictErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetConflictErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetConflictErrorResponse code(String code) { + public AssetConflictErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetConflictErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java index 00e8c7f..9cf4db6 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetForbiddenErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetForbiddenErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetForbiddenErrorResponse code(String code) { + public AssetForbiddenErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetForbiddenErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java index cecc32c..94e9f74 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetInternalServerErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetInternalServerErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetInternalServerErrorResponse code(String code) { + public AssetInternalServerErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetInternalServerErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetMedia.java b/src/main/java/com/fireblocks/sdk/model/AssetMedia.java new file mode 100644 index 0000000..9d96ea6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetMedia.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetMedia */ +@JsonPropertyOrder({ + AssetMedia.JSON_PROPERTY_URL, + AssetMedia.JSON_PROPERTY_TYPE, + AssetMedia.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetMedia { + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + /** Media type */ + public enum TypeEnum { + SVG_XML("image/svg+xml"), + + PNG("image/png"); + + 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 static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AssetMediaAttributes attributes; + + public AssetMedia() {} + + public AssetMedia url(String url) { + this.url = url; + return this; + } + + /** + * Media URL + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + public AssetMedia type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Media type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + public AssetMedia attributes(AssetMediaAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssetMediaAttributes getAttributes() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(AssetMediaAttributes attributes) { + this.attributes = attributes; + } + + /** Return true if this AssetMedia object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetMedia assetMedia = (AssetMedia) o; + return Objects.equals(this.url, assetMedia.url) + && Objects.equals(this.type, assetMedia.type) + && Objects.equals(this.attributes, assetMedia.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(url, type, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetMedia {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), 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"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java b/src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java new file mode 100644 index 0000000..5a68a96 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Media attributes */ +@JsonPropertyOrder({AssetMediaAttributes.JSON_PROPERTY_MONOCHROME}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetMediaAttributes { + public static final String JSON_PROPERTY_MONOCHROME = "monochrome"; + private Boolean monochrome; + + public AssetMediaAttributes() {} + + public AssetMediaAttributes monochrome(Boolean monochrome) { + this.monochrome = monochrome; + return this; + } + + /** + * Monochrome flag + * + * @return monochrome + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONOCHROME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMonochrome() { + return monochrome; + } + + @JsonProperty(JSON_PROPERTY_MONOCHROME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMonochrome(Boolean monochrome) { + this.monochrome = monochrome; + } + + /** Return true if this AssetMedia_attributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetMediaAttributes assetMediaAttributes = (AssetMediaAttributes) o; + return Objects.equals(this.monochrome, assetMediaAttributes.monochrome); + } + + @Override + public int hashCode() { + return Objects.hash(monochrome); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetMediaAttributes {\n"); + sb.append(" monochrome: ").append(toIndentedString(monochrome)).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 `monochrome` to the URL query string + if (getMonochrome() != null) { + joiner.add( + String.format( + "%smonochrome%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getMonochrome()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java b/src/main/java/com/fireblocks/sdk/model/AssetMetadata.java similarity index 88% rename from src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java rename to src/main/java/com/fireblocks/sdk/model/AssetMetadata.java index 7fe03f8..40885e4 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetResponseMetadata.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetMetadata.java @@ -23,13 +23,10 @@ import java.util.Objects; import java.util.StringJoiner; -/** AssetResponseMetadata */ -@JsonPropertyOrder({ - AssetResponseMetadata.JSON_PROPERTY_SCOPE, - AssetResponseMetadata.JSON_PROPERTY_DEPRECATED -}) +/** AssetMetadata */ +@JsonPropertyOrder({AssetMetadata.JSON_PROPERTY_SCOPE, AssetMetadata.JSON_PROPERTY_DEPRECATED}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AssetResponseMetadata { +public class AssetMetadata { /** The scope of the asset */ public enum ScopeEnum { GLOBAL("Global"), @@ -69,9 +66,9 @@ public static ScopeEnum fromValue(String value) { public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; private Boolean deprecated; - public AssetResponseMetadata() {} + public AssetMetadata() {} - public AssetResponseMetadata scope(ScopeEnum scope) { + public AssetMetadata scope(ScopeEnum scope) { this.scope = scope; return this; } @@ -94,7 +91,7 @@ public void setScope(ScopeEnum scope) { this.scope = scope; } - public AssetResponseMetadata deprecated(Boolean deprecated) { + public AssetMetadata deprecated(Boolean deprecated) { this.deprecated = deprecated; return this; } @@ -117,7 +114,7 @@ public void setDeprecated(Boolean deprecated) { this.deprecated = deprecated; } - /** Return true if this AssetResponse_metadata object is equal to o. */ + /** Return true if this AssetMetadata object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -126,9 +123,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetResponseMetadata assetResponseMetadata = (AssetResponseMetadata) o; - return Objects.equals(this.scope, assetResponseMetadata.scope) - && Objects.equals(this.deprecated, assetResponseMetadata.deprecated); + AssetMetadata assetMetadata = (AssetMetadata) o; + return Objects.equals(this.scope, assetMetadata.scope) + && Objects.equals(this.deprecated, assetMetadata.deprecated); } @Override @@ -139,7 +136,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssetResponseMetadata {\n"); + sb.append("class AssetMetadata {\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java new file mode 100644 index 0000000..d7adc85 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java @@ -0,0 +1,404 @@ +/* + * 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; + +/** AssetMetadataBeta */ +@JsonPropertyOrder({ + AssetMetadataBeta.JSON_PROPERTY_SCOPE, + AssetMetadataBeta.JSON_PROPERTY_DEPRECATED, + AssetMetadataBeta.JSON_PROPERTY_DEPRECATION_REFERRAL_ID, + AssetMetadataBeta.JSON_PROPERTY_VERIFIED, + AssetMetadataBeta.JSON_PROPERTY_WEBSITE, + AssetMetadataBeta.JSON_PROPERTY_MEDIA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetMetadataBeta { + /** The scope of the asset */ + public enum ScopeEnum { + GLOBAL("Global"), + + LOCAL("Local"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private ScopeEnum scope; + + public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; + private Boolean deprecated; + + public static final String JSON_PROPERTY_DEPRECATION_REFERRAL_ID = "deprecationReferralId"; + private String deprecationReferralId; + + public static final String JSON_PROPERTY_VERIFIED = "verified"; + private Boolean verified; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public static final String JSON_PROPERTY_MEDIA = "media"; + private List media; + + public AssetMetadataBeta() {} + + public AssetMetadataBeta scope(ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * The scope of the asset + * + * @return scope + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ScopeEnum getScope() { + return scope; + } + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScope(ScopeEnum scope) { + this.scope = scope; + } + + public AssetMetadataBeta deprecated(Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Is asset deprecated + * + * @return deprecated + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEPRECATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getDeprecated() { + return deprecated; + } + + @JsonProperty(JSON_PROPERTY_DEPRECATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeprecated(Boolean deprecated) { + this.deprecated = deprecated; + } + + public AssetMetadataBeta deprecationReferralId(String deprecationReferralId) { + this.deprecationReferralId = deprecationReferralId; + return this; + } + + /** + * New asset ID replacement + * + * @return deprecationReferralId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATION_REFERRAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeprecationReferralId() { + return deprecationReferralId; + } + + @JsonProperty(JSON_PROPERTY_DEPRECATION_REFERRAL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecationReferralId(String deprecationReferralId) { + this.deprecationReferralId = deprecationReferralId; + } + + public AssetMetadataBeta verified(Boolean verified) { + this.verified = verified; + return this; + } + + /** + * Is asset verified by Fireblocks + * + * @return verified + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getVerified() { + return verified; + } + + @JsonProperty(JSON_PROPERTY_VERIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVerified(Boolean verified) { + this.verified = verified; + } + + public AssetMetadataBeta website(String website) { + this.website = website; + return this; + } + + /** + * Vendor’s website + * + * @return website + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWebsite() { + return website; + } + + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setWebsite(String website) { + this.website = website; + } + + public AssetMetadataBeta media(List media) { + this.media = media; + return this; + } + + public AssetMetadataBeta addMediaItem(AssetMedia mediaItem) { + if (this.media == null) { + this.media = new ArrayList<>(); + } + this.media.add(mediaItem); + return this; + } + + /** + * Asset’s media + * + * @return media + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMedia() { + return media; + } + + @JsonProperty(JSON_PROPERTY_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMedia(List media) { + this.media = media; + } + + /** Return true if this AssetMetadataBeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetMetadataBeta assetMetadataBeta = (AssetMetadataBeta) o; + return Objects.equals(this.scope, assetMetadataBeta.scope) + && Objects.equals(this.deprecated, assetMetadataBeta.deprecated) + && Objects.equals( + this.deprecationReferralId, assetMetadataBeta.deprecationReferralId) + && Objects.equals(this.verified, assetMetadataBeta.verified) + && Objects.equals(this.website, assetMetadataBeta.website) + && Objects.equals(this.media, assetMetadataBeta.media); + } + + @Override + public int hashCode() { + return Objects.hash(scope, deprecated, deprecationReferralId, verified, website, media); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetMetadataBeta {\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" deprecationReferralId: ") + .append(toIndentedString(deprecationReferralId)) + .append("\n"); + sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" media: ").append(toIndentedString(media)).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 `scope` to the URL query string + if (getScope() != null) { + joiner.add( + String.format( + "%sscope%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getScope()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `deprecated` to the URL query string + if (getDeprecated() != null) { + joiner.add( + String.format( + "%sdeprecated%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDeprecated()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `deprecationReferralId` to the URL query string + if (getDeprecationReferralId() != null) { + joiner.add( + String.format( + "%sdeprecationReferralId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDeprecationReferralId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `verified` to the URL query string + if (getVerified() != null) { + joiner.add( + String.format( + "%sverified%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getVerified()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `website` to the URL query string + if (getWebsite() != null) { + joiner.add( + String.format( + "%swebsite%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getWebsite()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `media` to the URL query string + if (getMedia() != null) { + for (int i = 0; i < getMedia().size(); i++) { + if (getMedia().get(i) != null) { + joiner.add( + getMedia() + .get(i) + .toUrlQueryString( + String.format( + "%smedia%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/AssetNotFoundErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java index 9ad5fd9..33a4ede 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetNotFoundErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetNotFoundErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetNotFoundErrorResponse code(String code) { + public AssetNotFoundErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetNotFoundErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java b/src/main/java/com/fireblocks/sdk/model/AssetOnchain.java similarity index 87% rename from src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java rename to src/main/java/com/fireblocks/sdk/model/AssetOnchain.java index d71b4a6..1aae902 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetResponseOnchain.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetOnchain.java @@ -22,16 +22,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** AssetResponseOnchain */ +/** AssetOnchain */ @JsonPropertyOrder({ - AssetResponseOnchain.JSON_PROPERTY_SYMBOL, - AssetResponseOnchain.JSON_PROPERTY_NAME, - AssetResponseOnchain.JSON_PROPERTY_ADDRESS, - AssetResponseOnchain.JSON_PROPERTY_DECIMALS, - AssetResponseOnchain.JSON_PROPERTY_STANDARD + AssetOnchain.JSON_PROPERTY_SYMBOL, + AssetOnchain.JSON_PROPERTY_NAME, + AssetOnchain.JSON_PROPERTY_ADDRESS, + AssetOnchain.JSON_PROPERTY_DECIMALS, + AssetOnchain.JSON_PROPERTY_STANDARD }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AssetResponseOnchain { +public class AssetOnchain { public static final String JSON_PROPERTY_SYMBOL = "symbol"; private String symbol; @@ -47,9 +47,9 @@ public class AssetResponseOnchain { public static final String JSON_PROPERTY_STANDARD = "standard"; private String standard; - public AssetResponseOnchain() {} + public AssetOnchain() {} - public AssetResponseOnchain symbol(String symbol) { + public AssetOnchain symbol(String symbol) { this.symbol = symbol; return this; } @@ -72,7 +72,7 @@ public void setSymbol(String symbol) { this.symbol = symbol; } - public AssetResponseOnchain name(String name) { + public AssetOnchain name(String name) { this.name = name; return this; } @@ -95,7 +95,7 @@ public void setName(String name) { this.name = name; } - public AssetResponseOnchain address(String address) { + public AssetOnchain address(String address) { this.address = address; return this; } @@ -118,7 +118,7 @@ public void setAddress(String address) { this.address = address; } - public AssetResponseOnchain decimals(BigDecimal decimals) { + public AssetOnchain decimals(BigDecimal decimals) { this.decimals = decimals; return this; } @@ -141,7 +141,7 @@ public void setDecimals(BigDecimal decimals) { this.decimals = decimals; } - public AssetResponseOnchain standard(String standard) { + public AssetOnchain standard(String standard) { this.standard = standard; return this; } @@ -164,7 +164,7 @@ public void setStandard(String standard) { this.standard = standard; } - /** Return true if this AssetResponse_onchain object is equal to o. */ + /** Return true if this AssetOnchain object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -173,12 +173,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetResponseOnchain assetResponseOnchain = (AssetResponseOnchain) o; - return Objects.equals(this.symbol, assetResponseOnchain.symbol) - && Objects.equals(this.name, assetResponseOnchain.name) - && Objects.equals(this.address, assetResponseOnchain.address) - && Objects.equals(this.decimals, assetResponseOnchain.decimals) - && Objects.equals(this.standard, assetResponseOnchain.standard); + AssetOnchain assetOnchain = (AssetOnchain) o; + return Objects.equals(this.symbol, assetOnchain.symbol) + && Objects.equals(this.name, assetOnchain.name) + && Objects.equals(this.address, assetOnchain.address) + && Objects.equals(this.decimals, assetOnchain.decimals) + && Objects.equals(this.standard, assetOnchain.standard); } @Override @@ -189,7 +189,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssetResponseOnchain {\n"); + sb.append("class AssetOnchain {\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java new file mode 100644 index 0000000..1dc8355 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java @@ -0,0 +1,320 @@ +/* + * 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; + +/** AssetOnchainBeta */ +@JsonPropertyOrder({ + AssetOnchainBeta.JSON_PROPERTY_SYMBOL, + AssetOnchainBeta.JSON_PROPERTY_NAME, + AssetOnchainBeta.JSON_PROPERTY_ADDRESS, + AssetOnchainBeta.JSON_PROPERTY_DECIMALS, + AssetOnchainBeta.JSON_PROPERTY_STANDARDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetOnchainBeta { + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_DECIMALS = "decimals"; + private BigDecimal decimals; + + public static final String JSON_PROPERTY_STANDARDS = "standards"; + private List standards; + + public AssetOnchainBeta() {} + + public AssetOnchainBeta symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The asset symbol + * + * @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 AssetOnchainBeta name(String name) { + this.name = name; + return this; + } + + /** + * The asset name + * + * @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 AssetOnchainBeta address(String address) { + this.address = address; + return this; + } + + /** + * The asset address + * + * @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 AssetOnchainBeta decimals(BigDecimal decimals) { + this.decimals = decimals; + return this; + } + + /** + * Number of decimals + * + * @return decimals + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getDecimals() { + return decimals; + } + + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDecimals(BigDecimal decimals) { + this.decimals = decimals; + } + + public AssetOnchainBeta standards(List standards) { + this.standards = standards; + return this; + } + + public AssetOnchainBeta addStandardsItem(String standardsItem) { + if (this.standards == null) { + this.standards = new ArrayList<>(); + } + this.standards.add(standardsItem); + return this; + } + + /** + * Supported standards + * + * @return standards + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STANDARDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStandards() { + return standards; + } + + @JsonProperty(JSON_PROPERTY_STANDARDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStandards(List standards) { + this.standards = standards; + } + + /** Return true if this AssetOnchainBeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetOnchainBeta assetOnchainBeta = (AssetOnchainBeta) o; + return Objects.equals(this.symbol, assetOnchainBeta.symbol) + && Objects.equals(this.name, assetOnchainBeta.name) + && Objects.equals(this.address, assetOnchainBeta.address) + && Objects.equals(this.decimals, assetOnchainBeta.decimals) + && Objects.equals(this.standards, assetOnchainBeta.standards); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, name, address, decimals, standards); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetOnchainBeta {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" decimals: ").append(toIndentedString(decimals)).append("\n"); + sb.append(" standards: ").append(toIndentedString(standards)).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 `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 `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 `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 `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"))); + } + + // add `standards` to the URL query string + if (getStandards() != null) { + for (int i = 0; i < getStandards().size(); i++) { + joiner.add( + String.format( + "%sstandards%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getStandards().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java index 13845a7..18c27a0 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetPriceForbiddenErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetPriceForbiddenErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetPriceForbiddenErrorResponse code(String code) { + public AssetPriceForbiddenErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetPriceForbiddenErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java index 6d607e8..4253bb1 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -32,7 +33,7 @@ public class AssetPriceNotFoundErrorResponse { private String message; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + private BigDecimal code; public AssetPriceNotFoundErrorResponse() {} @@ -59,7 +60,7 @@ public void setMessage(String message) { this.message = message; } - public AssetPriceNotFoundErrorResponse code(String code) { + public AssetPriceNotFoundErrorResponse code(BigDecimal code) { this.code = code; return this; } @@ -72,13 +73,13 @@ public AssetPriceNotFoundErrorResponse code(String code) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { + public BigDecimal getCode() { return code; } @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(BigDecimal code) { this.code = code; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetResponse.java index 1eb8ce1..d5402a6 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetResponse.java @@ -76,10 +76,10 @@ public static AssetClassEnum fromValue(String value) { private AssetClassEnum assetClass; public static final String JSON_PROPERTY_ONCHAIN = "onchain"; - private AssetResponseOnchain onchain; + private AssetOnchain onchain; public static final String JSON_PROPERTY_METADATA = "metadata"; - private AssetResponseMetadata metadata; + private AssetMetadata metadata; public AssetResponse() {} @@ -129,7 +129,7 @@ public void setAssetClass(AssetClassEnum assetClass) { this.assetClass = assetClass; } - public AssetResponse onchain(AssetResponseOnchain onchain) { + public AssetResponse onchain(AssetOnchain onchain) { this.onchain = onchain; return this; } @@ -142,17 +142,17 @@ public AssetResponse onchain(AssetResponseOnchain onchain) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ONCHAIN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AssetResponseOnchain getOnchain() { + public AssetOnchain getOnchain() { return onchain; } @JsonProperty(JSON_PROPERTY_ONCHAIN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOnchain(AssetResponseOnchain onchain) { + public void setOnchain(AssetOnchain onchain) { this.onchain = onchain; } - public AssetResponse metadata(AssetResponseMetadata metadata) { + public AssetResponse metadata(AssetMetadata metadata) { this.metadata = metadata; return this; } @@ -165,13 +165,13 @@ public AssetResponse metadata(AssetResponseMetadata metadata) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AssetResponseMetadata getMetadata() { + public AssetMetadata getMetadata() { return metadata; } @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setMetadata(AssetResponseMetadata metadata) { + public void setMetadata(AssetMetadata metadata) { this.metadata = metadata; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java new file mode 100644 index 0000000..e941f76 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java @@ -0,0 +1,424 @@ +/* + * 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; + +/** AssetResponseBeta */ +@JsonPropertyOrder({ + AssetResponseBeta.JSON_PROPERTY_ID, + AssetResponseBeta.JSON_PROPERTY_LEGACY_ID, + AssetResponseBeta.JSON_PROPERTY_BLOCKCHAIN_ID, + AssetResponseBeta.JSON_PROPERTY_DISPLAY_NAME, + AssetResponseBeta.JSON_PROPERTY_DISPLAY_SYMBOL, + AssetResponseBeta.JSON_PROPERTY_ASSET_CLASS, + AssetResponseBeta.JSON_PROPERTY_ONCHAIN, + AssetResponseBeta.JSON_PROPERTY_METADATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetResponseBeta { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_LEGACY_ID = "legacyId"; + private String legacyId; + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + private String blockchainId; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_DISPLAY_SYMBOL = "displaySymbol"; + private String displaySymbol; + + public static final String JSON_PROPERTY_ASSET_CLASS = "assetClass"; + private AssetClassBeta assetClass; + + public static final String JSON_PROPERTY_ONCHAIN = "onchain"; + private AssetOnchainBeta onchain; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private AssetMetadataBeta metadata; + + public AssetResponseBeta() {} + + public AssetResponseBeta id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the asset + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public AssetResponseBeta legacyId(String legacyId) { + this.legacyId = legacyId; + return this; + } + + /** + * The Legacy ID of the asset + * + * @return legacyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLegacyId() { + return legacyId; + } + + @JsonProperty(JSON_PROPERTY_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegacyId(String legacyId) { + this.legacyId = legacyId; + } + + public AssetResponseBeta blockchainId(String blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The ID of the asset's blockchain + * + * @return blockchainId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBlockchainId(String blockchainId) { + this.blockchainId = blockchainId; + } + + public AssetResponseBeta displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Asset's display name + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public AssetResponseBeta displaySymbol(String displaySymbol) { + this.displaySymbol = displaySymbol; + return this; + } + + /** + * Asset's display symbol + * + * @return displaySymbol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplaySymbol() { + return displaySymbol; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplaySymbol(String displaySymbol) { + this.displaySymbol = displaySymbol; + } + + public AssetResponseBeta assetClass(AssetClassBeta assetClass) { + this.assetClass = assetClass; + return this; + } + + /** + * Get assetClass + * + * @return assetClass + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_CLASS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetClassBeta getAssetClass() { + return assetClass; + } + + @JsonProperty(JSON_PROPERTY_ASSET_CLASS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetClass(AssetClassBeta assetClass) { + this.assetClass = assetClass; + } + + public AssetResponseBeta onchain(AssetOnchainBeta onchain) { + this.onchain = onchain; + return this; + } + + /** + * Get onchain + * + * @return onchain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONCHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AssetOnchainBeta getOnchain() { + return onchain; + } + + @JsonProperty(JSON_PROPERTY_ONCHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOnchain(AssetOnchainBeta onchain) { + this.onchain = onchain; + } + + public AssetResponseBeta metadata(AssetMetadataBeta metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * + * @return metadata + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssetMetadataBeta getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetadata(AssetMetadataBeta metadata) { + this.metadata = metadata; + } + + /** Return true if this AssetResponseBeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetResponseBeta assetResponseBeta = (AssetResponseBeta) o; + return Objects.equals(this.id, assetResponseBeta.id) + && Objects.equals(this.legacyId, assetResponseBeta.legacyId) + && Objects.equals(this.blockchainId, assetResponseBeta.blockchainId) + && Objects.equals(this.displayName, assetResponseBeta.displayName) + && Objects.equals(this.displaySymbol, assetResponseBeta.displaySymbol) + && Objects.equals(this.assetClass, assetResponseBeta.assetClass) + && Objects.equals(this.onchain, assetResponseBeta.onchain) + && Objects.equals(this.metadata, assetResponseBeta.metadata); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + legacyId, + blockchainId, + displayName, + displaySymbol, + assetClass, + onchain, + metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetResponseBeta {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" legacyId: ").append(toIndentedString(legacyId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" displaySymbol: ").append(toIndentedString(displaySymbol)).append("\n"); + sb.append(" assetClass: ").append(toIndentedString(assetClass)).append("\n"); + sb.append(" onchain: ").append(toIndentedString(onchain)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `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 `legacyId` to the URL query string + if (getLegacyId() != null) { + joiner.add( + String.format( + "%slegacyId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLegacyId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `displayName` to the URL query string + if (getDisplayName() != null) { + joiner.add( + String.format( + "%sdisplayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayName()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `displaySymbol` to the URL query string + if (getDisplaySymbol() != null) { + joiner.add( + String.format( + "%sdisplaySymbol%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplaySymbol()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetClass` to the URL query string + if (getAssetClass() != null) { + joiner.add( + String.format( + "%sassetClass%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAssetClass()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `onchain` to the URL query string + if (getOnchain() != null) { + joiner.add(getOnchain().toUrlQueryString(prefix + "onchain" + suffix)); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AuditLogData.java b/src/main/java/com/fireblocks/sdk/model/AuditLogData.java index 878b501..7c6c0ec 100644 --- a/src/main/java/com/fireblocks/sdk/model/AuditLogData.java +++ b/src/main/java/com/fireblocks/sdk/model/AuditLogData.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -38,10 +39,10 @@ public class AuditLogData { private String id; public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - private String timestamp; + private BigDecimal timestamp; public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; - private String createdAt; + private BigDecimal createdAt; public static final String JSON_PROPERTY_USER = "user"; private String user; @@ -83,7 +84,7 @@ public void setId(String id) { this.id = id; } - public AuditLogData timestamp(String timestamp) { + public AuditLogData timestamp(BigDecimal timestamp) { this.timestamp = timestamp; return this; } @@ -96,17 +97,17 @@ public AuditLogData timestamp(String timestamp) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TIMESTAMP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTimestamp() { + public BigDecimal getTimestamp() { return timestamp; } @JsonProperty(JSON_PROPERTY_TIMESTAMP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTimestamp(String timestamp) { + public void setTimestamp(BigDecimal timestamp) { this.timestamp = timestamp; } - public AuditLogData createdAt(String createdAt) { + public AuditLogData createdAt(BigDecimal createdAt) { this.createdAt = createdAt; return this; } @@ -119,13 +120,13 @@ public AuditLogData createdAt(String createdAt) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedAt() { + public BigDecimal getCreatedAt() { return createdAt; } @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(String createdAt) { + public void setCreatedAt(BigDecimal createdAt) { this.createdAt = createdAt; } diff --git a/src/main/java/com/fireblocks/sdk/model/BlockchainExplorer.java b/src/main/java/com/fireblocks/sdk/model/BlockchainExplorer.java new file mode 100644 index 0000000..dc6f0a1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainExplorer.java @@ -0,0 +1,261 @@ +/* + * 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; + +/** BlockchainExplorer */ +@JsonPropertyOrder({ + BlockchainExplorer.JSON_PROPERTY_BASE, + BlockchainExplorer.JSON_PROPERTY_ADDRESS, + BlockchainExplorer.JSON_PROPERTY_TX, + BlockchainExplorer.JSON_PROPERTY_TOKEN +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainExplorer { + public static final String JSON_PROPERTY_BASE = "base"; + private String base; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_TX = "tx"; + private String tx; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public BlockchainExplorer() {} + + public BlockchainExplorer base(String base) { + this.base = base; + return this; + } + + /** + * Explorer base url + * + * @return base + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBase() { + return base; + } + + @JsonProperty(JSON_PROPERTY_BASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBase(String base) { + this.base = base; + } + + public BlockchainExplorer address(String address) { + this.address = address; + return this; + } + + /** + * Explorer address url + * + * @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 BlockchainExplorer tx(String tx) { + this.tx = tx; + return this; + } + + /** + * Explorer transaction url + * + * @return tx + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTx() { + return tx; + } + + @JsonProperty(JSON_PROPERTY_TX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTx(String tx) { + this.tx = tx; + } + + public BlockchainExplorer token(String token) { + this.token = token; + return this; + } + + /** + * Explorer token url + * + * @return token + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getToken() { + return token; + } + + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setToken(String token) { + this.token = token; + } + + /** Return true if this BlockchainExplorer object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockchainExplorer blockchainExplorer = (BlockchainExplorer) o; + return Objects.equals(this.base, blockchainExplorer.base) + && Objects.equals(this.address, blockchainExplorer.address) + && Objects.equals(this.tx, blockchainExplorer.tx) + && Objects.equals(this.token, blockchainExplorer.token); + } + + @Override + public int hashCode() { + return Objects.hash(base, address, tx, token); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockchainExplorer {\n"); + sb.append(" base: ").append(toIndentedString(base)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" tx: ").append(toIndentedString(tx)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).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 `base` to the URL query string + if (getBase() != null) { + joiner.add( + String.format( + "%sbase%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getBase()), 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 `tx` to the URL query string + if (getTx() != null) { + joiner.add( + String.format( + "%stx%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTx()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `token` to the URL query string + if (getToken() != null) { + joiner.add( + String.format( + "%stoken%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getToken()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BlockchainMedia.java b/src/main/java/com/fireblocks/sdk/model/BlockchainMedia.java new file mode 100644 index 0000000..d3fcb27 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainMedia.java @@ -0,0 +1,213 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** BlockchainMedia */ +@JsonPropertyOrder({BlockchainMedia.JSON_PROPERTY_URL, BlockchainMedia.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainMedia { + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + /** Media type */ + public enum TypeEnum { + SVG_XML("image/svg+xml"), + + PNG("image/png"); + + 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 BlockchainMedia() {} + + public BlockchainMedia url(String url) { + this.url = url; + return this; + } + + /** + * Media URL + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + public BlockchainMedia type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Media type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** Return true if this BlockchainMedia object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockchainMedia blockchainMedia = (BlockchainMedia) o; + return Objects.equals(this.url, blockchainMedia.url) + && Objects.equals(this.type, blockchainMedia.type); + } + + @Override + public int hashCode() { + return Objects.hash(url, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockchainMedia {\n"); + sb.append(" url: ").append(toIndentedString(url)).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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), 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/BlockchainMetadata.java b/src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java new file mode 100644 index 0000000..6c3b1a1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java @@ -0,0 +1,313 @@ +/* + * 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; + +/** BlockchainMetadata */ +@JsonPropertyOrder({ + BlockchainMetadata.JSON_PROPERTY_SCOPE, + BlockchainMetadata.JSON_PROPERTY_DEPRECATED, + BlockchainMetadata.JSON_PROPERTY_MEDIA, + BlockchainMetadata.JSON_PROPERTY_EXPLORER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainMetadata { + /** Is blockchain listed on all workspaces? Global or Local */ + public enum ScopeEnum { + GLOBAL("Global"), + + LOCAL("Local"); + + private String value; + + ScopeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScopeEnum fromValue(String value) { + for (ScopeEnum b : ScopeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private ScopeEnum scope; + + public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; + private Boolean deprecated; + + public static final String JSON_PROPERTY_MEDIA = "media"; + private List media; + + public static final String JSON_PROPERTY_EXPLORER = "explorer"; + private BlockchainExplorer explorer; + + public BlockchainMetadata() {} + + public BlockchainMetadata scope(ScopeEnum scope) { + this.scope = scope; + return this; + } + + /** + * Is blockchain listed on all workspaces? Global or Local + * + * @return scope + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ScopeEnum getScope() { + return scope; + } + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScope(ScopeEnum scope) { + this.scope = scope; + } + + public BlockchainMetadata deprecated(Boolean deprecated) { + this.deprecated = deprecated; + return this; + } + + /** + * Is blockchain deprecated + * + * @return deprecated + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEPRECATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getDeprecated() { + return deprecated; + } + + @JsonProperty(JSON_PROPERTY_DEPRECATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeprecated(Boolean deprecated) { + this.deprecated = deprecated; + } + + public BlockchainMetadata media(List media) { + this.media = media; + return this; + } + + public BlockchainMetadata addMediaItem(BlockchainMedia mediaItem) { + if (this.media == null) { + this.media = new ArrayList<>(); + } + this.media.add(mediaItem); + return this; + } + + /** + * Blockchain’s media + * + * @return media + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMedia() { + return media; + } + + @JsonProperty(JSON_PROPERTY_MEDIA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMedia(List media) { + this.media = media; + } + + public BlockchainMetadata explorer(BlockchainExplorer explorer) { + this.explorer = explorer; + return this; + } + + /** + * Get explorer + * + * @return explorer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPLORER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BlockchainExplorer getExplorer() { + return explorer; + } + + @JsonProperty(JSON_PROPERTY_EXPLORER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExplorer(BlockchainExplorer explorer) { + this.explorer = explorer; + } + + /** Return true if this BlockchainMetadata object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockchainMetadata blockchainMetadata = (BlockchainMetadata) o; + return Objects.equals(this.scope, blockchainMetadata.scope) + && Objects.equals(this.deprecated, blockchainMetadata.deprecated) + && Objects.equals(this.media, blockchainMetadata.media) + && Objects.equals(this.explorer, blockchainMetadata.explorer); + } + + @Override + public int hashCode() { + return Objects.hash(scope, deprecated, media, explorer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockchainMetadata {\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); + sb.append(" media: ").append(toIndentedString(media)).append("\n"); + sb.append(" explorer: ").append(toIndentedString(explorer)).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 `scope` to the URL query string + if (getScope() != null) { + joiner.add( + String.format( + "%sscope%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getScope()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `deprecated` to the URL query string + if (getDeprecated() != null) { + joiner.add( + String.format( + "%sdeprecated%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDeprecated()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `media` to the URL query string + if (getMedia() != null) { + for (int i = 0; i < getMedia().size(); i++) { + if (getMedia().get(i) != null) { + joiner.add( + getMedia() + .get(i) + .toUrlQueryString( + String.format( + "%smedia%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `explorer` to the URL query string + if (getExplorer() != null) { + joiner.add(getExplorer().toUrlQueryString(prefix + "explorer" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponse.java new file mode 100644 index 0000000..f03c494 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponse.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** BlockchainNotFoundErrorResponse */ +@JsonPropertyOrder({ + BlockchainNotFoundErrorResponse.JSON_PROPERTY_MESSAGE, + BlockchainNotFoundErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainNotFoundErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public BlockchainNotFoundErrorResponse() {} + + public BlockchainNotFoundErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Not found error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public BlockchainNotFoundErrorResponse code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this BlockchainNotFoundErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockchainNotFoundErrorResponse blockchainNotFoundErrorResponse = + (BlockchainNotFoundErrorResponse) o; + return Objects.equals(this.message, blockchainNotFoundErrorResponse.message) + && Objects.equals(this.code, blockchainNotFoundErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockchainNotFoundErrorResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BlockchainOnchain.java b/src/main/java/com/fireblocks/sdk/model/BlockchainOnchain.java new file mode 100644 index 0000000..2222b55 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainOnchain.java @@ -0,0 +1,298 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** BlockchainOnchain */ +@JsonPropertyOrder({ + BlockchainOnchain.JSON_PROPERTY_PROTOCOL, + BlockchainOnchain.JSON_PROPERTY_CHAIN_ID, + BlockchainOnchain.JSON_PROPERTY_TEST, + BlockchainOnchain.JSON_PROPERTY_SIGNING_ALGO +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainOnchain { + public static final String JSON_PROPERTY_PROTOCOL = "protocol"; + private String protocol; + + public static final String JSON_PROPERTY_CHAIN_ID = "chainId"; + private String chainId; + + public static final String JSON_PROPERTY_TEST = "test"; + private Boolean test; + + /** Signing alghorithm */ + public enum SigningAlgoEnum { + ECDSA_SECP256K1("ECDSA_SECP256K1"), + + EDDSA_ED25519("EDDSA_ED25519"); + + private String value; + + SigningAlgoEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SigningAlgoEnum fromValue(String value) { + for (SigningAlgoEnum b : SigningAlgoEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIGNING_ALGO = "signingAlgo"; + private SigningAlgoEnum signingAlgo; + + public BlockchainOnchain() {} + + public BlockchainOnchain protocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * The protocol of the blockchain + * + * @return protocol + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProtocol() { + return protocol; + } + + @JsonProperty(JSON_PROPERTY_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public BlockchainOnchain chainId(String chainId) { + this.chainId = chainId; + return this; + } + + /** + * Network/chain ID + * + * @return chainId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getChainId() { + return chainId; + } + + @JsonProperty(JSON_PROPERTY_CHAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChainId(String chainId) { + this.chainId = chainId; + } + + public BlockchainOnchain test(Boolean test) { + this.test = test; + return this; + } + + /** + * Is test blockchain + * + * @return test + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getTest() { + return test; + } + + @JsonProperty(JSON_PROPERTY_TEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTest(Boolean test) { + this.test = test; + } + + public BlockchainOnchain signingAlgo(SigningAlgoEnum signingAlgo) { + this.signingAlgo = signingAlgo; + return this; + } + + /** + * Signing alghorithm + * + * @return signingAlgo + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNING_ALGO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SigningAlgoEnum getSigningAlgo() { + return signingAlgo; + } + + @JsonProperty(JSON_PROPERTY_SIGNING_ALGO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSigningAlgo(SigningAlgoEnum signingAlgo) { + this.signingAlgo = signingAlgo; + } + + /** Return true if this BlockchainOnchain object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockchainOnchain blockchainOnchain = (BlockchainOnchain) o; + return Objects.equals(this.protocol, blockchainOnchain.protocol) + && Objects.equals(this.chainId, blockchainOnchain.chainId) + && Objects.equals(this.test, blockchainOnchain.test) + && Objects.equals(this.signingAlgo, blockchainOnchain.signingAlgo); + } + + @Override + public int hashCode() { + return Objects.hash(protocol, chainId, test, signingAlgo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockchainOnchain {\n"); + sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); + sb.append(" chainId: ").append(toIndentedString(chainId)).append("\n"); + sb.append(" test: ").append(toIndentedString(test)).append("\n"); + sb.append(" signingAlgo: ").append(toIndentedString(signingAlgo)).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 `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"))); + } + + // add `chainId` to the URL query string + if (getChainId() != null) { + joiner.add( + String.format( + "%schainId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getChainId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `test` to the URL query string + if (getTest() != null) { + joiner.add( + String.format( + "%stest%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTest()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `signingAlgo` to the URL query string + if (getSigningAlgo() != null) { + joiner.add( + String.format( + "%ssigningAlgo%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSigningAlgo()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BlockchainResponse.java b/src/main/java/com/fireblocks/sdk/model/BlockchainResponse.java new file mode 100644 index 0000000..e8a2a04 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainResponse.java @@ -0,0 +1,333 @@ +/* + * 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; + +/** BlockchainResponse */ +@JsonPropertyOrder({ + BlockchainResponse.JSON_PROPERTY_ID, + BlockchainResponse.JSON_PROPERTY_LEGACY_ID, + BlockchainResponse.JSON_PROPERTY_DISPLAY_NAME, + BlockchainResponse.JSON_PROPERTY_NATIVE_ASSET_ID, + BlockchainResponse.JSON_PROPERTY_ONCHAIN, + BlockchainResponse.JSON_PROPERTY_METADATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BlockchainResponse { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_LEGACY_ID = "legacyId"; + private String legacyId; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_NATIVE_ASSET_ID = "nativeAssetId"; + private String nativeAssetId; + + public static final String JSON_PROPERTY_ONCHAIN = "onchain"; + private BlockchainOnchain onchain; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private BlockchainMetadata metadata; + + public BlockchainResponse() {} + + public BlockchainResponse id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the blockchain + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public BlockchainResponse legacyId(String legacyId) { + this.legacyId = legacyId; + return this; + } + + /** + * The old blockchain ID representation of the blockchain + * + * @return legacyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLegacyId() { + return legacyId; + } + + @JsonProperty(JSON_PROPERTY_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegacyId(String legacyId) { + this.legacyId = legacyId; + } + + public BlockchainResponse displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The name of the blockchain + * + * @return displayName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public BlockchainResponse nativeAssetId(String nativeAssetId) { + this.nativeAssetId = nativeAssetId; + return this; + } + + /** + * Native asset ID of this blockchain + * + * @return nativeAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NATIVE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNativeAssetId() { + return nativeAssetId; + } + + @JsonProperty(JSON_PROPERTY_NATIVE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNativeAssetId(String nativeAssetId) { + this.nativeAssetId = nativeAssetId; + } + + public BlockchainResponse onchain(BlockchainOnchain onchain) { + this.onchain = onchain; + return this; + } + + /** + * Get onchain + * + * @return onchain + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ONCHAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainOnchain getOnchain() { + return onchain; + } + + @JsonProperty(JSON_PROPERTY_ONCHAIN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOnchain(BlockchainOnchain onchain) { + this.onchain = onchain; + } + + public BlockchainResponse metadata(BlockchainMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * + * @return metadata + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BlockchainMetadata getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMetadata(BlockchainMetadata metadata) { + this.metadata = metadata; + } + + /** Return true if this BlockchainResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BlockchainResponse blockchainResponse = (BlockchainResponse) o; + return Objects.equals(this.id, blockchainResponse.id) + && Objects.equals(this.legacyId, blockchainResponse.legacyId) + && Objects.equals(this.displayName, blockchainResponse.displayName) + && Objects.equals(this.nativeAssetId, blockchainResponse.nativeAssetId) + && Objects.equals(this.onchain, blockchainResponse.onchain) + && Objects.equals(this.metadata, blockchainResponse.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(id, legacyId, displayName, nativeAssetId, onchain, metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockchainResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" legacyId: ").append(toIndentedString(legacyId)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" nativeAssetId: ").append(toIndentedString(nativeAssetId)).append("\n"); + sb.append(" onchain: ").append(toIndentedString(onchain)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `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 `legacyId` to the URL query string + if (getLegacyId() != null) { + joiner.add( + String.format( + "%slegacyId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLegacyId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `displayName` to the URL query string + if (getDisplayName() != null) { + joiner.add( + String.format( + "%sdisplayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayName()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `nativeAssetId` to the URL query string + if (getNativeAssetId() != null) { + joiner.add( + String.format( + "%snativeAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getNativeAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `onchain` to the URL query string + if (getOnchain() != null) { + joiner.add(getOnchain().toUrlQueryString(prefix + "onchain" + suffix)); + } + + // add `metadata` to the URL query string + if (getMetadata() != null) { + joiner.add(getMetadata().toUrlQueryString(prefix + "metadata" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CallbackHandler.java b/src/main/java/com/fireblocks/sdk/model/CallbackHandler.java new file mode 100644 index 0000000..3306fca --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CallbackHandler.java @@ -0,0 +1,226 @@ +/* + * 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; + +/** CallbackHandler */ +@JsonPropertyOrder({ + CallbackHandler.JSON_PROPERTY_URL, + CallbackHandler.JSON_PROPERTY_PUBLIC_KEY, + CallbackHandler.JSON_PROPERTY_CERT_PUBLIC_KEY_HASH +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CallbackHandler { + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_PUBLIC_KEY = "publicKey"; + private String publicKey; + + public static final String JSON_PROPERTY_CERT_PUBLIC_KEY_HASH = "certPublicKeyHash"; + private String certPublicKeyHash; + + public CallbackHandler() {} + + public CallbackHandler url(String url) { + this.url = url; + return this; + } + + /** + * The callback handler's URL + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + public CallbackHandler publicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The callback handler's public key + * + * @return publicKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicKey() { + return publicKey; + } + + @JsonProperty(JSON_PROPERTY_PUBLIC_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPublicKey(String publicKey) { + this.publicKey = publicKey; + } + + public CallbackHandler certPublicKeyHash(String certPublicKeyHash) { + this.certPublicKeyHash = certPublicKeyHash; + return this; + } + + /** + * A hashed representation of the public key of the callback handler's certificate + * + * @return certPublicKeyHash + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERT_PUBLIC_KEY_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCertPublicKeyHash() { + return certPublicKeyHash; + } + + @JsonProperty(JSON_PROPERTY_CERT_PUBLIC_KEY_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCertPublicKeyHash(String certPublicKeyHash) { + this.certPublicKeyHash = certPublicKeyHash; + } + + /** Return true if this CallbackHandler object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallbackHandler callbackHandler = (CallbackHandler) o; + return Objects.equals(this.url, callbackHandler.url) + && Objects.equals(this.publicKey, callbackHandler.publicKey) + && Objects.equals(this.certPublicKeyHash, callbackHandler.certPublicKeyHash); + } + + @Override + public int hashCode() { + return Objects.hash(url, publicKey, certPublicKeyHash); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallbackHandler {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" certPublicKeyHash: ") + .append(toIndentedString(certPublicKeyHash)) + .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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `publicKey` to the URL query string + if (getPublicKey() != null) { + joiner.add( + String.format( + "%spublicKey%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPublicKey()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `certPublicKeyHash` to the URL query string + if (getCertPublicKeyHash() != null) { + joiner.add( + String.format( + "%scertPublicKeyHash%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCertPublicKeyHash()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java b/src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java new file mode 100644 index 0000000..0c52286 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java @@ -0,0 +1,222 @@ +/* + * 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; + +/** CallbackHandlerRequest */ +@JsonPropertyOrder({ + CallbackHandlerRequest.JSON_PROPERTY_URL, + CallbackHandlerRequest.JSON_PROPERTY_PUBLIC_KEY, + CallbackHandlerRequest.JSON_PROPERTY_CERT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CallbackHandlerRequest { + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_PUBLIC_KEY = "publicKey"; + private String publicKey; + + public static final String JSON_PROPERTY_CERT = "cert"; + private String cert; + + public CallbackHandlerRequest() {} + + public CallbackHandlerRequest url(String url) { + this.url = url; + return this; + } + + /** + * The callback handler's URL + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + public CallbackHandlerRequest publicKey(String publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The callback handler's public key + * + * @return publicKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicKey() { + return publicKey; + } + + @JsonProperty(JSON_PROPERTY_PUBLIC_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPublicKey(String publicKey) { + this.publicKey = publicKey; + } + + public CallbackHandlerRequest cert(String cert) { + this.cert = cert; + return this; + } + + /** + * The callback handler's certificate + * + * @return cert + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCert() { + return cert; + } + + @JsonProperty(JSON_PROPERTY_CERT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCert(String cert) { + this.cert = cert; + } + + /** Return true if this CallbackHandlerRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CallbackHandlerRequest callbackHandlerRequest = (CallbackHandlerRequest) o; + return Objects.equals(this.url, callbackHandlerRequest.url) + && Objects.equals(this.publicKey, callbackHandlerRequest.publicKey) + && Objects.equals(this.cert, callbackHandlerRequest.cert); + } + + @Override + public int hashCode() { + return Objects.hash(url, publicKey, cert); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CallbackHandlerRequest {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" cert: ").append(toIndentedString(cert)).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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `publicKey` to the URL query string + if (getPublicKey() != null) { + joiner.add( + String.format( + "%spublicKey%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPublicKey()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `cert` to the URL query string + if (getCert() != null) { + joiner.add( + String.format( + "%scert%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCert()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java b/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java new file mode 100644 index 0000000..1e1d3db --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java @@ -0,0 +1,70 @@ +/* + * 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; + +/** Gets or Sets ChainDescriptor */ +public enum ChainDescriptor { + ETH("ETH"), + + SOL("SOL"), + + MATIC("MATIC"), + + ETH_TEST6("ETH_TEST6"), + + SOL_TEST("SOL_TEST"); + + private String value; + + ChainDescriptor(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChainDescriptor fromValue(String value) { + for (ChainDescriptor b : ChainDescriptor.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/ChainInfoResponseDto.java b/src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java similarity index 87% rename from src/main/java/com/fireblocks/sdk/model/ChainInfoResponseDto.java rename to src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java index 6951486..b63df14 100644 --- a/src/main/java/com/fireblocks/sdk/model/ChainInfoResponseDto.java +++ b/src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java @@ -22,16 +22,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** ChainInfoResponseDto */ +/** ChainInfoResponse */ @JsonPropertyOrder({ - ChainInfoResponseDto.JSON_PROPERTY_CHAIN_DESCRIPTOR, - ChainInfoResponseDto.JSON_PROPERTY_CURRENT_EPOCH, - ChainInfoResponseDto.JSON_PROPERTY_EPOCH_ELAPSED, - ChainInfoResponseDto.JSON_PROPERTY_EPOCH_DURATION, - ChainInfoResponseDto.JSON_PROPERTY_ADDITIONAL_INFO + ChainInfoResponse.JSON_PROPERTY_CHAIN_DESCRIPTOR, + ChainInfoResponse.JSON_PROPERTY_CURRENT_EPOCH, + ChainInfoResponse.JSON_PROPERTY_EPOCH_ELAPSED, + ChainInfoResponse.JSON_PROPERTY_EPOCH_DURATION, + ChainInfoResponse.JSON_PROPERTY_ADDITIONAL_INFO }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChainInfoResponseDto { +public class ChainInfoResponse { public static final String JSON_PROPERTY_CHAIN_DESCRIPTOR = "chainDescriptor"; private String chainDescriptor; @@ -45,11 +45,11 @@ public class ChainInfoResponseDto { private BigDecimal epochDuration; public static final String JSON_PROPERTY_ADDITIONAL_INFO = "additionalInfo"; - private AdditionalInfoDto additionalInfo; + private AdditionalInfo additionalInfo; - public ChainInfoResponseDto() {} + public ChainInfoResponse() {} - public ChainInfoResponseDto chainDescriptor(String chainDescriptor) { + public ChainInfoResponse chainDescriptor(String chainDescriptor) { this.chainDescriptor = chainDescriptor; return this; } @@ -72,7 +72,7 @@ public void setChainDescriptor(String chainDescriptor) { this.chainDescriptor = chainDescriptor; } - public ChainInfoResponseDto currentEpoch(BigDecimal currentEpoch) { + public ChainInfoResponse currentEpoch(BigDecimal currentEpoch) { this.currentEpoch = currentEpoch; return this; } @@ -95,7 +95,7 @@ public void setCurrentEpoch(BigDecimal currentEpoch) { this.currentEpoch = currentEpoch; } - public ChainInfoResponseDto epochElapsed(BigDecimal epochElapsed) { + public ChainInfoResponse epochElapsed(BigDecimal epochElapsed) { this.epochElapsed = epochElapsed; return this; } @@ -119,7 +119,7 @@ public void setEpochElapsed(BigDecimal epochElapsed) { this.epochElapsed = epochElapsed; } - public ChainInfoResponseDto epochDuration(BigDecimal epochDuration) { + public ChainInfoResponse epochDuration(BigDecimal epochDuration) { this.epochDuration = epochDuration; return this; } @@ -142,31 +142,30 @@ public void setEpochDuration(BigDecimal epochDuration) { this.epochDuration = epochDuration; } - public ChainInfoResponseDto additionalInfo(AdditionalInfoDto additionalInfo) { + public ChainInfoResponse additionalInfo(AdditionalInfo additionalInfo) { this.additionalInfo = additionalInfo; return this; } /** - * Additional information related to the blockchain. This may include extra details about the - * blockchain network. + * Get additionalInfo * * @return additionalInfo */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ADDITIONAL_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AdditionalInfoDto getAdditionalInfo() { + public AdditionalInfo getAdditionalInfo() { return additionalInfo; } @JsonProperty(JSON_PROPERTY_ADDITIONAL_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAdditionalInfo(AdditionalInfoDto additionalInfo) { + public void setAdditionalInfo(AdditionalInfo additionalInfo) { this.additionalInfo = additionalInfo; } - /** Return true if this ChainInfoResponseDto object is equal to o. */ + /** Return true if this ChainInfoResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -175,12 +174,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ChainInfoResponseDto chainInfoResponseDto = (ChainInfoResponseDto) o; - return Objects.equals(this.chainDescriptor, chainInfoResponseDto.chainDescriptor) - && Objects.equals(this.currentEpoch, chainInfoResponseDto.currentEpoch) - && Objects.equals(this.epochElapsed, chainInfoResponseDto.epochElapsed) - && Objects.equals(this.epochDuration, chainInfoResponseDto.epochDuration) - && Objects.equals(this.additionalInfo, chainInfoResponseDto.additionalInfo); + ChainInfoResponse chainInfoResponse = (ChainInfoResponse) o; + return Objects.equals(this.chainDescriptor, chainInfoResponse.chainDescriptor) + && Objects.equals(this.currentEpoch, chainInfoResponse.currentEpoch) + && Objects.equals(this.epochElapsed, chainInfoResponse.epochElapsed) + && Objects.equals(this.epochDuration, chainInfoResponse.epochDuration) + && Objects.equals(this.additionalInfo, chainInfoResponse.additionalInfo); } @Override @@ -192,7 +191,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ChainInfoResponseDto {\n"); + sb.append("class ChainInfoResponse {\n"); sb.append(" chainDescriptor: ").append(toIndentedString(chainDescriptor)).append("\n"); sb.append(" currentEpoch: ").append(toIndentedString(currentEpoch)).append("\n"); sb.append(" epochElapsed: ").append(toIndentedString(epochElapsed)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java b/src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java new file mode 100644 index 0000000..6d9e64b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.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; + +/** ClaimRewardsRequest */ +@JsonPropertyOrder({ + ClaimRewardsRequest.JSON_PROPERTY_ID, + ClaimRewardsRequest.JSON_PROPERTY_FEE, + ClaimRewardsRequest.JSON_PROPERTY_FEE_LEVEL, + ClaimRewardsRequest.JSON_PROPERTY_TX_NOTE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ClaimRewardsRequest { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevel feeLevel; + + public static final String JSON_PROPERTY_TX_NOTE = "txNote"; + private String txNote; + + public ClaimRewardsRequest() {} + + public ClaimRewardsRequest id(String id) { + this.id = id; + return this; + } + + /** + * id of position to withdraw rewards from + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public ClaimRewardsRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Represents the fee for a transaction, which can be specified as a percentage value. Only one + * of fee/feeLevel is required. + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public ClaimRewardsRequest feeLevel(FeeLevel feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Get feeLevel + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevel getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevel feeLevel) { + this.feeLevel = feeLevel; + } + + public ClaimRewardsRequest txNote(String txNote) { + this.txNote = txNote; + return this; + } + + /** + * The note to associate with the transactions. + * + * @return txNote + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxNote() { + return txNote; + } + + @JsonProperty(JSON_PROPERTY_TX_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxNote(String txNote) { + this.txNote = txNote; + } + + /** Return true if this ClaimRewardsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClaimRewardsRequest claimRewardsRequest = (ClaimRewardsRequest) o; + return Objects.equals(this.id, claimRewardsRequest.id) + && Objects.equals(this.fee, claimRewardsRequest.fee) + && Objects.equals(this.feeLevel, claimRewardsRequest.feeLevel) + && Objects.equals(this.txNote, claimRewardsRequest.txNote); + } + + @Override + public int hashCode() { + return Objects.hash(id, fee, feeLevel, txNote); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClaimRewardsRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" txNote: ").append(toIndentedString(txNote)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `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 `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `txNote` to the URL query string + if (getTxNote() != null) { + joiner.add( + String.format( + "%stxNote%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxNote()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Cosigner.java b/src/main/java/com/fireblocks/sdk/model/Cosigner.java index 4639f11..7df81be 100644 --- a/src/main/java/com/fireblocks/sdk/model/Cosigner.java +++ b/src/main/java/com/fireblocks/sdk/model/Cosigner.java @@ -13,9 +13,11 @@ package com.fireblocks.sdk.model; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.Objects; @@ -26,7 +28,9 @@ @JsonPropertyOrder({ Cosigner.JSON_PROPERTY_ARCHIVED, Cosigner.JSON_PROPERTY_ID, - Cosigner.JSON_PROPERTY_NAME + Cosigner.JSON_PROPERTY_NAME, + Cosigner.JSON_PROPERTY_TYPE, + Cosigner.JSON_PROPERTY_VERSION }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Cosigner { @@ -39,6 +43,51 @@ public class Cosigner { public static final String JSON_PROPERTY_NAME = "name"; private String name; + /** The type of the cosigner */ + public enum TypeEnum { + SANDBOX("SANDBOX"), + + SGX("SGX"), + + GCP_CONFSPACE("GCP-CONFSPACE"), + + AWS_NITRO("AWS-NITRO"), + + PLAIN("PLAIN"); + + 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 static final String JSON_PROPERTY_VERSION = "version"; + private Version version; + public Cosigner() {} public Cosigner archived(Boolean archived) { @@ -110,6 +159,52 @@ public void setName(String name) { this.name = name; } + public Cosigner type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of the cosigner + * + * @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; + } + + public Cosigner version(Version version) { + this.version = version; + return this; + } + + /** + * Get version + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Version getVersion() { + return version; + } + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVersion(Version version) { + this.version = version; + } + /** Return true if this Cosigner object is equal to o. */ @Override public boolean equals(Object o) { @@ -122,12 +217,14 @@ public boolean equals(Object o) { Cosigner cosigner = (Cosigner) o; return Objects.equals(this.archived, cosigner.archived) && Objects.equals(this.id, cosigner.id) - && Objects.equals(this.name, cosigner.name); + && Objects.equals(this.name, cosigner.name) + && Objects.equals(this.type, cosigner.type) + && Objects.equals(this.version, cosigner.version); } @Override public int hashCode() { - return Objects.hash(archived, id, name); + return Objects.hash(archived, id, name, type, version); } @Override @@ -137,6 +234,8 @@ public String toString() { sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append("}"); return sb.toString(); } @@ -217,6 +316,22 @@ public String toUrlQueryString(String prefix) { .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"))); + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add(getVersion().toUrlQueryString(prefix + "version" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java new file mode 100644 index 0000000..7334d1b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java @@ -0,0 +1,283 @@ +/* + * 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; + +/** CreateWebhookRequest */ +@JsonPropertyOrder({ + CreateWebhookRequest.JSON_PROPERTY_URL, + CreateWebhookRequest.JSON_PROPERTY_DESCRIPTION, + CreateWebhookRequest.JSON_PROPERTY_EVENTS, + CreateWebhookRequest.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateWebhookRequest { + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = new ArrayList<>(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled = true; + + public CreateWebhookRequest() {} + + public CreateWebhookRequest url(String url) { + this.url = url; + return this; + } + + /** + * The url of the webhook where notifications will be sent. URL must be valid, unique and https. + * + * @return url + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUrl(String url) { + this.url = url; + } + + public CreateWebhookRequest description(String description) { + this.description = description; + return this; + } + + /** + * description of the webhook. should not contain special characters. + * + * @return description + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + public CreateWebhookRequest events(List events) { + this.events = events; + return this; + } + + public CreateWebhookRequest addEventsItem(WebhookEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * event types the webhook will subscribe to + * + * @return events + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvents() { + return events; + } + + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEvents(List events) { + this.events = events; + } + + public CreateWebhookRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The status of the webhook. If false, the webhook will not receive notifications. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** Return true if this CreateWebhookRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhookRequest createWebhookRequest = (CreateWebhookRequest) o; + return Objects.equals(this.url, createWebhookRequest.url) + && Objects.equals(this.description, createWebhookRequest.description) + && Objects.equals(this.events, createWebhookRequest.events) + && Objects.equals(this.enabled, createWebhookRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(url, description, events, enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhookRequest {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `events` to the URL query string + if (getEvents() != null) { + for (int i = 0; i < getEvents().size(); i++) { + if (getEvents().get(i) != null) { + joiner.add( + String.format( + "%sevents%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getEvents().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add( + String.format( + "%senabled%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEnabled()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DelegationDto.java b/src/main/java/com/fireblocks/sdk/model/Delegation.java similarity index 86% rename from src/main/java/com/fireblocks/sdk/model/DelegationDto.java rename to src/main/java/com/fireblocks/sdk/model/Delegation.java index e5a3b92..87825e4 100644 --- a/src/main/java/com/fireblocks/sdk/model/DelegationDto.java +++ b/src/main/java/com/fireblocks/sdk/model/Delegation.java @@ -24,29 +24,29 @@ import java.util.Objects; import java.util.StringJoiner; -/** DelegationDto */ +/** Delegation */ @JsonPropertyOrder({ - DelegationDto.JSON_PROPERTY_ID, - DelegationDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, - DelegationDto.JSON_PROPERTY_VALIDATOR_NAME, - DelegationDto.JSON_PROPERTY_PROVIDER_NAME, - DelegationDto.JSON_PROPERTY_CHAIN_DESCRIPTOR, - DelegationDto.JSON_PROPERTY_AMOUNT, - DelegationDto.JSON_PROPERTY_REWARDS_AMOUNT, - DelegationDto.JSON_PROPERTY_DATE_CREATED, - DelegationDto.JSON_PROPERTY_DATE_UPDATED, - DelegationDto.JSON_PROPERTY_STATUS, - DelegationDto.JSON_PROPERTY_RELATED_TRANSACTIONS, - DelegationDto.JSON_PROPERTY_VALIDATOR_ADDRESS, - DelegationDto.JSON_PROPERTY_PROVIDER_ID, - DelegationDto.JSON_PROPERTY_AVAILABLE_ACTIONS, - DelegationDto.JSON_PROPERTY_IN_PROGRESS, - DelegationDto.JSON_PROPERTY_IN_PROGRESS_TX_ID, - DelegationDto.JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO, - DelegationDto.JSON_PROPERTY_RELATED_REQUESTS + Delegation.JSON_PROPERTY_ID, + Delegation.JSON_PROPERTY_VAULT_ACCOUNT_ID, + Delegation.JSON_PROPERTY_VALIDATOR_NAME, + Delegation.JSON_PROPERTY_PROVIDER_NAME, + Delegation.JSON_PROPERTY_CHAIN_DESCRIPTOR, + Delegation.JSON_PROPERTY_AMOUNT, + Delegation.JSON_PROPERTY_REWARDS_AMOUNT, + Delegation.JSON_PROPERTY_DATE_CREATED, + Delegation.JSON_PROPERTY_DATE_UPDATED, + Delegation.JSON_PROPERTY_STATUS, + Delegation.JSON_PROPERTY_RELATED_TRANSACTIONS, + Delegation.JSON_PROPERTY_VALIDATOR_ADDRESS, + Delegation.JSON_PROPERTY_PROVIDER_ID, + Delegation.JSON_PROPERTY_AVAILABLE_ACTIONS, + Delegation.JSON_PROPERTY_IN_PROGRESS, + Delegation.JSON_PROPERTY_IN_PROGRESS_TX_ID, + Delegation.JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO, + Delegation.JSON_PROPERTY_RELATED_REQUESTS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DelegationDto { +public class Delegation { public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -78,13 +78,13 @@ public class DelegationDto { private String status; public static final String JSON_PROPERTY_RELATED_TRANSACTIONS = "relatedTransactions"; - private List relatedTransactions = new ArrayList<>(); + private List relatedTransactions = new ArrayList<>(); public static final String JSON_PROPERTY_VALIDATOR_ADDRESS = "validatorAddress"; private String validatorAddress; public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; - private String providerId; + private StakingProvider providerId; public static final String JSON_PROPERTY_AVAILABLE_ACTIONS = "availableActions"; private List availableActions = new ArrayList<>(); @@ -96,14 +96,14 @@ public class DelegationDto { private String inProgressTxId; public static final String JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO = "blockchainPositionInfo"; - private SolanaBlockchainDataDto blockchainPositionInfo; + private SolanaBlockchainData blockchainPositionInfo; public static final String JSON_PROPERTY_RELATED_REQUESTS = "relatedRequests"; - private List relatedRequests; + private List relatedRequests; - public DelegationDto() {} + public Delegation() {} - public DelegationDto id(String id) { + public Delegation id(String id) { this.id = id; return this; } @@ -126,7 +126,7 @@ public void setId(String id) { this.id = id; } - public DelegationDto vaultAccountId(String vaultAccountId) { + public Delegation vaultAccountId(String vaultAccountId) { this.vaultAccountId = vaultAccountId; return this; } @@ -149,7 +149,7 @@ public void setVaultAccountId(String vaultAccountId) { this.vaultAccountId = vaultAccountId; } - public DelegationDto validatorName(String validatorName) { + public Delegation validatorName(String validatorName) { this.validatorName = validatorName; return this; } @@ -172,7 +172,7 @@ public void setValidatorName(String validatorName) { this.validatorName = validatorName; } - public DelegationDto providerName(String providerName) { + public Delegation providerName(String providerName) { this.providerName = providerName; return this; } @@ -195,7 +195,7 @@ public void setProviderName(String providerName) { this.providerName = providerName; } - public DelegationDto chainDescriptor(String chainDescriptor) { + public Delegation chainDescriptor(String chainDescriptor) { this.chainDescriptor = chainDescriptor; return this; } @@ -218,7 +218,7 @@ public void setChainDescriptor(String chainDescriptor) { this.chainDescriptor = chainDescriptor; } - public DelegationDto amount(String amount) { + public Delegation amount(String amount) { this.amount = amount; return this; } @@ -241,7 +241,7 @@ public void setAmount(String amount) { this.amount = amount; } - public DelegationDto rewardsAmount(String rewardsAmount) { + public Delegation rewardsAmount(String rewardsAmount) { this.rewardsAmount = rewardsAmount; return this; } @@ -264,7 +264,7 @@ public void setRewardsAmount(String rewardsAmount) { this.rewardsAmount = rewardsAmount; } - public DelegationDto dateCreated(OffsetDateTime dateCreated) { + public Delegation dateCreated(OffsetDateTime dateCreated) { this.dateCreated = dateCreated; return this; } @@ -287,7 +287,7 @@ public void setDateCreated(OffsetDateTime dateCreated) { this.dateCreated = dateCreated; } - public DelegationDto dateUpdated(OffsetDateTime dateUpdated) { + public Delegation dateUpdated(OffsetDateTime dateUpdated) { this.dateUpdated = dateUpdated; return this; } @@ -297,20 +297,20 @@ public DelegationDto dateUpdated(OffsetDateTime dateUpdated) { * * @return dateUpdated */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DATE_UPDATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public OffsetDateTime getDateUpdated() { return dateUpdated; } @JsonProperty(JSON_PROPERTY_DATE_UPDATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setDateUpdated(OffsetDateTime dateUpdated) { this.dateUpdated = dateUpdated; } - public DelegationDto status(String status) { + public Delegation status(String status) { this.status = status; return this; } @@ -333,12 +333,12 @@ public void setStatus(String status) { this.status = status; } - public DelegationDto relatedTransactions(List relatedTransactions) { + public Delegation relatedTransactions(List relatedTransactions) { this.relatedTransactions = relatedTransactions; return this; } - public DelegationDto addRelatedTransactionsItem(RelatedTransactionDto relatedTransactionsItem) { + public Delegation addRelatedTransactionsItem(RelatedTransaction relatedTransactionsItem) { if (this.relatedTransactions == null) { this.relatedTransactions = new ArrayList<>(); } @@ -356,17 +356,17 @@ public DelegationDto addRelatedTransactionsItem(RelatedTransactionDto relatedTra @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_RELATED_TRANSACTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRelatedTransactions() { + public List getRelatedTransactions() { return relatedTransactions; } @JsonProperty(JSON_PROPERTY_RELATED_TRANSACTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRelatedTransactions(List relatedTransactions) { + public void setRelatedTransactions(List relatedTransactions) { this.relatedTransactions = relatedTransactions; } - public DelegationDto validatorAddress(String validatorAddress) { + public Delegation validatorAddress(String validatorAddress) { this.validatorAddress = validatorAddress; return this; } @@ -389,35 +389,35 @@ public void setValidatorAddress(String validatorAddress) { this.validatorAddress = validatorAddress; } - public DelegationDto providerId(String providerId) { + public Delegation providerId(StakingProvider providerId) { this.providerId = providerId; return this; } /** - * The unique identifier of the staking provider + * Get providerId * * @return providerId */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderId() { + public StakingProvider getProviderId() { return providerId; } @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderId(String providerId) { + public void setProviderId(StakingProvider providerId) { this.providerId = providerId; } - public DelegationDto availableActions(List availableActions) { + public Delegation availableActions(List availableActions) { this.availableActions = availableActions; return this; } - public DelegationDto addAvailableActionsItem(String availableActionsItem) { + public Delegation addAvailableActionsItem(String availableActionsItem) { if (this.availableActions == null) { this.availableActions = new ArrayList<>(); } @@ -444,7 +444,7 @@ public void setAvailableActions(List availableActions) { this.availableActions = availableActions; } - public DelegationDto inProgress(Boolean inProgress) { + public Delegation inProgress(Boolean inProgress) { this.inProgress = inProgress; return this; } @@ -468,7 +468,7 @@ public void setInProgress(Boolean inProgress) { this.inProgress = inProgress; } - public DelegationDto inProgressTxId(String inProgressTxId) { + public Delegation inProgressTxId(String inProgressTxId) { this.inProgressTxId = inProgressTxId; return this; } @@ -491,38 +491,35 @@ public void setInProgressTxId(String inProgressTxId) { this.inProgressTxId = inProgressTxId; } - public DelegationDto blockchainPositionInfo(SolanaBlockchainDataDto blockchainPositionInfo) { + public Delegation blockchainPositionInfo(SolanaBlockchainData blockchainPositionInfo) { this.blockchainPositionInfo = blockchainPositionInfo; return this; } /** - * Additional fields per blockchain - can be empty or missing if not initialized or no - * additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), - * stake account address. For Ethereum (ETH), an empty object is returned as no specific data is - * available. + * Get blockchainPositionInfo * * @return blockchainPositionInfo */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SolanaBlockchainDataDto getBlockchainPositionInfo() { + public SolanaBlockchainData getBlockchainPositionInfo() { return blockchainPositionInfo; } @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_POSITION_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBlockchainPositionInfo(SolanaBlockchainDataDto blockchainPositionInfo) { + public void setBlockchainPositionInfo(SolanaBlockchainData blockchainPositionInfo) { this.blockchainPositionInfo = blockchainPositionInfo; } - public DelegationDto relatedRequests(List relatedRequests) { + public Delegation relatedRequests(List relatedRequests) { this.relatedRequests = relatedRequests; return this; } - public DelegationDto addRelatedRequestsItem(RelatedRequestDto relatedRequestsItem) { + public Delegation addRelatedRequestsItem(RelatedRequest relatedRequestsItem) { if (this.relatedRequests == null) { this.relatedRequests = new ArrayList<>(); } @@ -542,17 +539,17 @@ public DelegationDto addRelatedRequestsItem(RelatedRequestDto relatedRequestsIte @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_RELATED_REQUESTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getRelatedRequests() { + public List getRelatedRequests() { return relatedRequests; } @JsonProperty(JSON_PROPERTY_RELATED_REQUESTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelatedRequests(List relatedRequests) { + public void setRelatedRequests(List relatedRequests) { this.relatedRequests = relatedRequests; } - /** Return true if this DelegationDto object is equal to o. */ + /** Return true if this Delegation object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -561,25 +558,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DelegationDto delegationDto = (DelegationDto) o; - return Objects.equals(this.id, delegationDto.id) - && Objects.equals(this.vaultAccountId, delegationDto.vaultAccountId) - && Objects.equals(this.validatorName, delegationDto.validatorName) - && Objects.equals(this.providerName, delegationDto.providerName) - && Objects.equals(this.chainDescriptor, delegationDto.chainDescriptor) - && Objects.equals(this.amount, delegationDto.amount) - && Objects.equals(this.rewardsAmount, delegationDto.rewardsAmount) - && Objects.equals(this.dateCreated, delegationDto.dateCreated) - && Objects.equals(this.dateUpdated, delegationDto.dateUpdated) - && Objects.equals(this.status, delegationDto.status) - && Objects.equals(this.relatedTransactions, delegationDto.relatedTransactions) - && Objects.equals(this.validatorAddress, delegationDto.validatorAddress) - && Objects.equals(this.providerId, delegationDto.providerId) - && Objects.equals(this.availableActions, delegationDto.availableActions) - && Objects.equals(this.inProgress, delegationDto.inProgress) - && Objects.equals(this.inProgressTxId, delegationDto.inProgressTxId) - && Objects.equals(this.blockchainPositionInfo, delegationDto.blockchainPositionInfo) - && Objects.equals(this.relatedRequests, delegationDto.relatedRequests); + Delegation delegation = (Delegation) o; + return Objects.equals(this.id, delegation.id) + && Objects.equals(this.vaultAccountId, delegation.vaultAccountId) + && Objects.equals(this.validatorName, delegation.validatorName) + && Objects.equals(this.providerName, delegation.providerName) + && Objects.equals(this.chainDescriptor, delegation.chainDescriptor) + && Objects.equals(this.amount, delegation.amount) + && Objects.equals(this.rewardsAmount, delegation.rewardsAmount) + && Objects.equals(this.dateCreated, delegation.dateCreated) + && Objects.equals(this.dateUpdated, delegation.dateUpdated) + && Objects.equals(this.status, delegation.status) + && Objects.equals(this.relatedTransactions, delegation.relatedTransactions) + && Objects.equals(this.validatorAddress, delegation.validatorAddress) + && Objects.equals(this.providerId, delegation.providerId) + && Objects.equals(this.availableActions, delegation.availableActions) + && Objects.equals(this.inProgress, delegation.inProgress) + && Objects.equals(this.inProgressTxId, delegation.inProgressTxId) + && Objects.equals(this.blockchainPositionInfo, delegation.blockchainPositionInfo) + && Objects.equals(this.relatedRequests, delegation.relatedRequests); } @Override @@ -608,7 +605,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DelegationDto {\n"); + sb.append("class Delegation {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); sb.append(" validatorName: ").append(toIndentedString(validatorName)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/DelegationSummaryDto.java b/src/main/java/com/fireblocks/sdk/model/DelegationSummary.java similarity index 89% rename from src/main/java/com/fireblocks/sdk/model/DelegationSummaryDto.java rename to src/main/java/com/fireblocks/sdk/model/DelegationSummary.java index 4d32eec..c4b3908 100644 --- a/src/main/java/com/fireblocks/sdk/model/DelegationSummaryDto.java +++ b/src/main/java/com/fireblocks/sdk/model/DelegationSummary.java @@ -21,15 +21,15 @@ import java.util.Objects; import java.util.StringJoiner; -/** DelegationSummaryDto */ +/** DelegationSummary */ @JsonPropertyOrder({ - DelegationSummaryDto.JSON_PROPERTY_ACTIVE, - DelegationSummaryDto.JSON_PROPERTY_INACTIVE, - DelegationSummaryDto.JSON_PROPERTY_REWARDS_AMOUNT, - DelegationSummaryDto.JSON_PROPERTY_TOTAL_STAKED + DelegationSummary.JSON_PROPERTY_ACTIVE, + DelegationSummary.JSON_PROPERTY_INACTIVE, + DelegationSummary.JSON_PROPERTY_REWARDS_AMOUNT, + DelegationSummary.JSON_PROPERTY_TOTAL_STAKED }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DelegationSummaryDto { +public class DelegationSummary { public static final String JSON_PROPERTY_ACTIVE = "active"; private List active = new ArrayList<>(); @@ -42,14 +42,14 @@ public class DelegationSummaryDto { public static final String JSON_PROPERTY_TOTAL_STAKED = "totalStaked"; private List totalStaked = new ArrayList<>(); - public DelegationSummaryDto() {} + public DelegationSummary() {} - public DelegationSummaryDto active(List active) { + public DelegationSummary active(List active) { this.active = active; return this; } - public DelegationSummaryDto addActiveItem(AmountAndChainDescriptor activeItem) { + public DelegationSummary addActiveItem(AmountAndChainDescriptor activeItem) { if (this.active == null) { this.active = new ArrayList<>(); } @@ -76,12 +76,12 @@ public void setActive(List active) { this.active = active; } - public DelegationSummaryDto inactive(List inactive) { + public DelegationSummary inactive(List inactive) { this.inactive = inactive; return this; } - public DelegationSummaryDto addInactiveItem(AmountAndChainDescriptor inactiveItem) { + public DelegationSummary addInactiveItem(AmountAndChainDescriptor inactiveItem) { if (this.inactive == null) { this.inactive = new ArrayList<>(); } @@ -108,12 +108,12 @@ public void setInactive(List inactive) { this.inactive = inactive; } - public DelegationSummaryDto rewardsAmount(List rewardsAmount) { + public DelegationSummary rewardsAmount(List rewardsAmount) { this.rewardsAmount = rewardsAmount; return this; } - public DelegationSummaryDto addRewardsAmountItem(AmountAndChainDescriptor rewardsAmountItem) { + public DelegationSummary addRewardsAmountItem(AmountAndChainDescriptor rewardsAmountItem) { if (this.rewardsAmount == null) { this.rewardsAmount = new ArrayList<>(); } @@ -140,12 +140,12 @@ public void setRewardsAmount(List rewardsAmount) { this.rewardsAmount = rewardsAmount; } - public DelegationSummaryDto totalStaked(List totalStaked) { + public DelegationSummary totalStaked(List totalStaked) { this.totalStaked = totalStaked; return this; } - public DelegationSummaryDto addTotalStakedItem(AmountAndChainDescriptor totalStakedItem) { + public DelegationSummary addTotalStakedItem(AmountAndChainDescriptor totalStakedItem) { if (this.totalStaked == null) { this.totalStaked = new ArrayList<>(); } @@ -172,7 +172,7 @@ public void setTotalStaked(List totalStaked) { this.totalStaked = totalStaked; } - /** Return true if this DelegationSummaryDto object is equal to o. */ + /** Return true if this DelegationSummary object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -181,11 +181,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DelegationSummaryDto delegationSummaryDto = (DelegationSummaryDto) o; - return Objects.equals(this.active, delegationSummaryDto.active) - && Objects.equals(this.inactive, delegationSummaryDto.inactive) - && Objects.equals(this.rewardsAmount, delegationSummaryDto.rewardsAmount) - && Objects.equals(this.totalStaked, delegationSummaryDto.totalStaked); + DelegationSummary delegationSummary = (DelegationSummary) o; + return Objects.equals(this.active, delegationSummary.active) + && Objects.equals(this.inactive, delegationSummary.inactive) + && Objects.equals(this.rewardsAmount, delegationSummary.rewardsAmount) + && Objects.equals(this.totalStaked, delegationSummary.totalStaked); } @Override @@ -196,7 +196,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DelegationSummaryDto {\n"); + sb.append("class DelegationSummary {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" inactive: ").append(toIndentedString(inactive)).append("\n"); sb.append(" rewardsAmount: ").append(toIndentedString(rewardsAmount)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/ExecuteActionRequest.java b/src/main/java/com/fireblocks/sdk/model/ExecuteActionRequest.java deleted file mode 100644 index 49c040b..0000000 --- a/src/main/java/com/fireblocks/sdk/model/ExecuteActionRequest.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import com.fasterxml.jackson.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 = ExecuteActionRequest.ExecuteActionRequestDeserializer.class) -@JsonSerialize(using = ExecuteActionRequest.ExecuteActionRequestSerializer.class) -public class ExecuteActionRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ExecuteActionRequest.class.getName()); - - public static class ExecuteActionRequestSerializer extends StdSerializer { - public ExecuteActionRequestSerializer(Class t) { - super(t); - } - - public ExecuteActionRequestSerializer() { - this(null); - } - - @Override - public void serialize( - ExecuteActionRequest value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class ExecuteActionRequestDeserializer - extends StdDeserializer { - public ExecuteActionRequestDeserializer() { - this(ExecuteActionRequest.class); - } - - public ExecuteActionRequestDeserializer(Class vc) { - super(vc); - } - - @Override - public ExecuteActionRequest 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 StakeRequestDto - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (StakeRequestDto.class.equals(Integer.class) - || StakeRequestDto.class.equals(Long.class) - || StakeRequestDto.class.equals(Float.class) - || StakeRequestDto.class.equals(Double.class) - || StakeRequestDto.class.equals(Boolean.class) - || StakeRequestDto.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((StakeRequestDto.class.equals(Integer.class) - || StakeRequestDto.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((StakeRequestDto.class.equals(Float.class) - || StakeRequestDto.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (StakeRequestDto.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (StakeRequestDto.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = tree.traverse(jp.getCodec()).readValueAs(StakeRequestDto.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 'StakeRequestDto'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'StakeRequestDto'", e); - } - - // deserialize UnstakeRequestDto - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (UnstakeRequestDto.class.equals(Integer.class) - || UnstakeRequestDto.class.equals(Long.class) - || UnstakeRequestDto.class.equals(Float.class) - || UnstakeRequestDto.class.equals(Double.class) - || UnstakeRequestDto.class.equals(Boolean.class) - || UnstakeRequestDto.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((UnstakeRequestDto.class.equals(Integer.class) - || UnstakeRequestDto.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((UnstakeRequestDto.class.equals(Float.class) - || UnstakeRequestDto.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (UnstakeRequestDto.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (UnstakeRequestDto.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(UnstakeRequestDto.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 'UnstakeRequestDto'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'UnstakeRequestDto'", e); - } - - // deserialize WithdrawRequestDto - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (WithdrawRequestDto.class.equals(Integer.class) - || WithdrawRequestDto.class.equals(Long.class) - || WithdrawRequestDto.class.equals(Float.class) - || WithdrawRequestDto.class.equals(Double.class) - || WithdrawRequestDto.class.equals(Boolean.class) - || WithdrawRequestDto.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((WithdrawRequestDto.class.equals(Integer.class) - || WithdrawRequestDto.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((WithdrawRequestDto.class.equals(Float.class) - || WithdrawRequestDto.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (WithdrawRequestDto.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (WithdrawRequestDto.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = - tree.traverse(jp.getCodec()).readValueAs(WithdrawRequestDto.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 'WithdrawRequestDto'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'WithdrawRequestDto'", e); - } - - if (match == 1) { - ExecuteActionRequest ret = new ExecuteActionRequest(); - ret.setActualInstance(deserialized); - return ret; - } - throw new IOException( - String.format( - "Failed deserialization for ExecuteActionRequest: %d classes match" - + " result, expected 1", - match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public ExecuteActionRequest getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "ExecuteActionRequest cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap<>(); - - public ExecuteActionRequest() { - super("oneOf", Boolean.FALSE); - } - - public ExecuteActionRequest(StakeRequestDto o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public ExecuteActionRequest(UnstakeRequestDto o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public ExecuteActionRequest(WithdrawRequestDto o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("StakeRequestDto", StakeRequestDto.class); - schemas.put("UnstakeRequestDto", UnstakeRequestDto.class); - schemas.put("WithdrawRequestDto", WithdrawRequestDto.class); - JSON.registerDescendants(ExecuteActionRequest.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map> getSchemas() { - return ExecuteActionRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto - * - *

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(StakeRequestDto.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(UnstakeRequestDto.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(WithdrawRequestDto.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException( - "Invalid instance type. Must be StakeRequestDto, UnstakeRequestDto," - + " WithdrawRequestDto"); - } - - /** - * Get the actual instance, which can be the following: StakeRequestDto, UnstakeRequestDto, - * WithdrawRequestDto - * - * @return The actual instance (StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `StakeRequestDto`. If the actual instance is not - * `StakeRequestDto`, the ClassCastException will be thrown. - * - * @return The actual instance of `StakeRequestDto` - * @throws ClassCastException if the instance is not `StakeRequestDto` - */ - public StakeRequestDto getStakeRequestDto() throws ClassCastException { - return (StakeRequestDto) super.getActualInstance(); - } - - /** - * Get the actual instance of `UnstakeRequestDto`. If the actual instance is not - * `UnstakeRequestDto`, the ClassCastException will be thrown. - * - * @return The actual instance of `UnstakeRequestDto` - * @throws ClassCastException if the instance is not `UnstakeRequestDto` - */ - public UnstakeRequestDto getUnstakeRequestDto() throws ClassCastException { - return (UnstakeRequestDto) super.getActualInstance(); - } - - /** - * Get the actual instance of `WithdrawRequestDto`. If the actual instance is not - * `WithdrawRequestDto`, the ClassCastException will be thrown. - * - * @return The actual instance of `WithdrawRequestDto` - * @throws ClassCastException if the instance is not `WithdrawRequestDto` - */ - public WithdrawRequestDto getWithdrawRequestDto() throws ClassCastException { - return (WithdrawRequestDto) 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 StakeRequestDto) { - if (getActualInstance() != null) { - joiner.add( - ((StakeRequestDto) getActualInstance()) - .toUrlQueryString(prefix + "one_of_0" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof UnstakeRequestDto) { - if (getActualInstance() != null) { - joiner.add( - ((UnstakeRequestDto) getActualInstance()) - .toUrlQueryString(prefix + "one_of_1" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof WithdrawRequestDto) { - if (getActualInstance() != null) { - joiner.add( - ((WithdrawRequestDto) getActualInstance()) - .toUrlQueryString(prefix + "one_of_2" + suffix)); - } - return joiner.toString(); - } - return null; - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecuteActionResponse.java b/src/main/java/com/fireblocks/sdk/model/ExecuteActionResponse.java deleted file mode 100644 index b4d6d24..0000000 --- a/src/main/java/com/fireblocks/sdk/model/ExecuteActionResponse.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.JsonToken; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.MapperFeature; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import com.fireblocks.sdk.JSON; -import java.io.IOException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.StringJoiner; -import java.util.logging.Level; -import java.util.logging.Logger; - -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonDeserialize(using = ExecuteActionResponse.ExecuteActionResponseDeserializer.class) -@JsonSerialize(using = ExecuteActionResponse.ExecuteActionResponseSerializer.class) -public class ExecuteActionResponse extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ExecuteActionResponse.class.getName()); - - public static class ExecuteActionResponseSerializer - extends StdSerializer { - public ExecuteActionResponseSerializer(Class t) { - super(t); - } - - public ExecuteActionResponseSerializer() { - this(null); - } - - @Override - public void serialize( - ExecuteActionResponse value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.getActualInstance()); - } - } - - public static class ExecuteActionResponseDeserializer - extends StdDeserializer { - public ExecuteActionResponseDeserializer() { - this(ExecuteActionResponse.class); - } - - public ExecuteActionResponseDeserializer(Class vc) { - super(vc); - } - - @Override - public ExecuteActionResponse 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 Object - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (Object.class.equals(Integer.class) - || Object.class.equals(Long.class) - || Object.class.equals(Float.class) - || Object.class.equals(Double.class) - || Object.class.equals(Boolean.class) - || Object.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((Object.class.equals(Integer.class) - || Object.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((Object.class.equals(Float.class) - || Object.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (Object.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Object.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = tree.traverse(jp.getCodec()).readValueAs(Object.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 'Object'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Object'", e); - } - - // deserialize StakeResponseDto - try { - boolean attemptParsing = true; - // ensure that we respect type coercion as set on the client ObjectMapper - if (StakeResponseDto.class.equals(Integer.class) - || StakeResponseDto.class.equals(Long.class) - || StakeResponseDto.class.equals(Float.class) - || StakeResponseDto.class.equals(Double.class) - || StakeResponseDto.class.equals(Boolean.class) - || StakeResponseDto.class.equals(String.class)) { - attemptParsing = typeCoercion; - if (!attemptParsing) { - attemptParsing |= - ((StakeResponseDto.class.equals(Integer.class) - || StakeResponseDto.class.equals(Long.class)) - && token == JsonToken.VALUE_NUMBER_INT); - attemptParsing |= - ((StakeResponseDto.class.equals(Float.class) - || StakeResponseDto.class.equals(Double.class)) - && token == JsonToken.VALUE_NUMBER_FLOAT); - attemptParsing |= - (StakeResponseDto.class.equals(Boolean.class) - && (token == JsonToken.VALUE_FALSE - || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (StakeResponseDto.class.equals(String.class) - && token == JsonToken.VALUE_STRING); - } - } - if (attemptParsing) { - deserialized = tree.traverse(jp.getCodec()).readValueAs(StakeResponseDto.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 'StakeResponseDto'"); - } - } catch (Exception e) { - // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'StakeResponseDto'", e); - } - - if (match == 1) { - ExecuteActionResponse ret = new ExecuteActionResponse(); - ret.setActualInstance(deserialized); - return ret; - } - throw new IOException( - String.format( - "Failed deserialization for ExecuteActionResponse: %d classes match" - + " result, expected 1", - match)); - } - - /** Handle deserialization of the 'null' value. */ - @Override - public ExecuteActionResponse getNullValue(DeserializationContext ctxt) - throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "ExecuteActionResponse cannot be null"); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap<>(); - - public ExecuteActionResponse() { - super("oneOf", Boolean.FALSE); - } - - public ExecuteActionResponse(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - public ExecuteActionResponse(StakeResponseDto o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Object", Object.class); - schemas.put("StakeResponseDto", StakeResponseDto.class); - JSON.registerDescendants(ExecuteActionResponse.class, Collections.unmodifiableMap(schemas)); - } - - @Override - public Map> getSchemas() { - return ExecuteActionResponse.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: Object, StakeResponseDto - * - *

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(Object.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - if (JSON.isInstanceOf(StakeResponseDto.class, instance, new HashSet>())) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Object, StakeResponseDto"); - } - - /** - * Get the actual instance, which can be the following: Object, StakeResponseDto - * - * @return The actual instance (Object, StakeResponseDto) - */ - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Object`. If the actual instance is not `Object`, the - * ClassCastException will be thrown. - * - * @return The actual instance of `Object` - * @throws ClassCastException if the instance is not `Object` - */ - public Object getObject() throws ClassCastException { - return (Object) super.getActualInstance(); - } - - /** - * Get the actual instance of `StakeResponseDto`. If the actual instance is not - * `StakeResponseDto`, the ClassCastException will be thrown. - * - * @return The actual instance of `StakeResponseDto` - * @throws ClassCastException if the instance is not `StakeResponseDto` - */ - public StakeResponseDto getStakeResponseDto() throws ClassCastException { - return (StakeResponseDto) 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 StakeResponseDto) { - if (getActualInstance() != null) { - joiner.add( - ((StakeResponseDto) getActualInstance()) - .toUrlQueryString(prefix + "one_of_0" + suffix)); - } - return joiner.toString(); - } - if (getActualInstance() instanceof Object) { - if (getActualInstance() != null) { - joiner.add( - String.format( - "%sone_of_1%s=%s", - prefix, - suffix, - URLEncoder.encode( - String.valueOf(getActualInstance()), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - return joiner.toString(); - } - return null; - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/FeeLevel.java b/src/main/java/com/fireblocks/sdk/model/FeeLevel.java new file mode 100644 index 0000000..c860be6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FeeLevel.java @@ -0,0 +1,69 @@ +/* + * 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; + +/** + * Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one + * of fee/feeLevel is required. + */ +public enum FeeLevel { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevel(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevel fromValue(String value) { + for (FeeLevel b : FeeLevel.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/GetMpcKeysResponse.java b/src/main/java/com/fireblocks/sdk/model/GetMpcKeysResponse.java new file mode 100644 index 0000000..71b2e40 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetMpcKeysResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetMpcKeysResponse */ +@JsonPropertyOrder({ + GetMpcKeysResponse.JSON_PROPERTY_TENANT_ID, + GetMpcKeysResponse.JSON_PROPERTY_KEYS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetMpcKeysResponse { + public static final String JSON_PROPERTY_TENANT_ID = "tenantId"; + private String tenantId; + + public static final String JSON_PROPERTY_KEYS = "keys"; + private List keys = new ArrayList<>(); + + public GetMpcKeysResponse() {} + + public GetMpcKeysResponse tenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * The workspace id of the keys + * + * @return tenantId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTenantId() { + return tenantId; + } + + @JsonProperty(JSON_PROPERTY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public GetMpcKeysResponse keys(List keys) { + this.keys = keys; + return this; + } + + public GetMpcKeysResponse addKeysItem(MpcKey keysItem) { + if (this.keys == null) { + this.keys = new ArrayList<>(); + } + this.keys.add(keysItem); + return this; + } + + /** + * The keys that are associated with the workspace + * + * @return keys + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getKeys() { + return keys; + } + + @JsonProperty(JSON_PROPERTY_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKeys(List keys) { + this.keys = keys; + } + + /** Return true if this GetMpcKeysResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMpcKeysResponse getMpcKeysResponse = (GetMpcKeysResponse) o; + return Objects.equals(this.tenantId, getMpcKeysResponse.tenantId) + && Objects.equals(this.keys, getMpcKeysResponse.keys); + } + + @Override + public int hashCode() { + return Objects.hash(tenantId, keys); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMpcKeysResponse {\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" keys: ").append(toIndentedString(keys)).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 `tenantId` to the URL query string + if (getTenantId() != null) { + joiner.add( + String.format( + "%stenantId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTenantId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `keys` to the URL query string + if (getKeys() != null) { + for (int i = 0; i < getKeys().size(); i++) { + if (getKeys().get(i) != null) { + joiner.add( + getKeys() + .get(i) + .toUrlQueryString( + String.format( + "%skeys%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/ListAssetsResponse.java b/src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java new file mode 100644 index 0000000..1445638 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java @@ -0,0 +1,200 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ListAssetsResponse */ +@JsonPropertyOrder({ListAssetsResponse.JSON_PROPERTY_DATA, ListAssetsResponse.JSON_PROPERTY_NEXT}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListAssetsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public ListAssetsResponse() {} + + public ListAssetsResponse data(List data) { + this.data = data; + return this; + } + + public ListAssetsResponse addDataItem(AssetResponseBeta dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public ListAssetsResponse next(String next) { + this.next = next; + return this; + } + + /** + * Cursor to the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this ListAssetsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAssetsResponse listAssetsResponse = (ListAssetsResponse) o; + return Objects.equals(this.data, listAssetsResponse.data) + && Objects.equals(this.next, listAssetsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAssetsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java b/src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java new file mode 100644 index 0000000..85d6a86 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ListBlockchainsResponse */ +@JsonPropertyOrder({ + ListBlockchainsResponse.JSON_PROPERTY_DATA, + ListBlockchainsResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListBlockchainsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public ListBlockchainsResponse() {} + + public ListBlockchainsResponse data(List data) { + this.data = data; + return this; + } + + public ListBlockchainsResponse addDataItem(BlockchainResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public ListBlockchainsResponse next(String next) { + this.next = next; + return this; + } + + /** + * Cursor to the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this ListBlockchainsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListBlockchainsResponse listBlockchainsResponse = (ListBlockchainsResponse) o; + return Objects.equals(this.data, listBlockchainsResponse.data) + && Objects.equals(this.next, listBlockchainsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListBlockchainsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/MpcKey.java b/src/main/java/com/fireblocks/sdk/model/MpcKey.java new file mode 100644 index 0000000..1078c88 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MpcKey.java @@ -0,0 +1,329 @@ +/* + * 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; + +/** MpcKey */ +@JsonPropertyOrder({ + MpcKey.JSON_PROPERTY_KEY_ID, + MpcKey.JSON_PROPERTY_USER_ID, + MpcKey.JSON_PROPERTY_ALGORITHM, + MpcKey.JSON_PROPERTY_PLAYERS, + MpcKey.JSON_PROPERTY_LAST_PREPROCESSED_INDEX +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MpcKey { + public static final String JSON_PROPERTY_KEY_ID = "keyId"; + private String keyId; + + public static final String JSON_PROPERTY_USER_ID = "userId"; + private String userId; + + public static final String JSON_PROPERTY_ALGORITHM = "algorithm"; + private BigDecimal algorithm; + + public static final String JSON_PROPERTY_PLAYERS = "players"; + private List players = new ArrayList<>(); + + public static final String JSON_PROPERTY_LAST_PREPROCESSED_INDEX = "lastPreprocessedIndex"; + private BigDecimal lastPreprocessedIndex; + + public MpcKey() {} + + public MpcKey keyId(String keyId) { + this.keyId = keyId; + return this; + } + + /** + * Get keyId + * + * @return keyId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKeyId() { + return keyId; + } + + @JsonProperty(JSON_PROPERTY_KEY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public MpcKey userId(String userId) { + this.userId = userId; + return this; + } + + /** + * The user id that owns the key + * + * @return userId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserId() { + return userId; + } + + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUserId(String userId) { + this.userId = userId; + } + + public MpcKey algorithm(BigDecimal algorithm) { + this.algorithm = algorithm; + return this; + } + + /** + * The algorithm of the key + * + * @return algorithm + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ALGORITHM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAlgorithm() { + return algorithm; + } + + @JsonProperty(JSON_PROPERTY_ALGORITHM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAlgorithm(BigDecimal algorithm) { + this.algorithm = algorithm; + } + + public MpcKey players(List players) { + this.players = players; + return this; + } + + public MpcKey addPlayersItem(Players playersItem) { + if (this.players == null) { + this.players = new ArrayList<>(); + } + this.players.add(playersItem); + return this; + } + + /** + * The players that are associated with the key + * + * @return players + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PLAYERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPlayers() { + return players; + } + + @JsonProperty(JSON_PROPERTY_PLAYERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPlayers(List players) { + this.players = players; + } + + public MpcKey lastPreprocessedIndex(BigDecimal lastPreprocessedIndex) { + this.lastPreprocessedIndex = lastPreprocessedIndex; + return this; + } + + /** + * The last index used on this key minimum: 0 + * + * @return lastPreprocessedIndex + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_PREPROCESSED_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getLastPreprocessedIndex() { + return lastPreprocessedIndex; + } + + @JsonProperty(JSON_PROPERTY_LAST_PREPROCESSED_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLastPreprocessedIndex(BigDecimal lastPreprocessedIndex) { + this.lastPreprocessedIndex = lastPreprocessedIndex; + } + + /** Return true if this MpcKey object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MpcKey mpcKey = (MpcKey) o; + return Objects.equals(this.keyId, mpcKey.keyId) + && Objects.equals(this.userId, mpcKey.userId) + && Objects.equals(this.algorithm, mpcKey.algorithm) + && Objects.equals(this.players, mpcKey.players) + && Objects.equals(this.lastPreprocessedIndex, mpcKey.lastPreprocessedIndex); + } + + @Override + public int hashCode() { + return Objects.hash(keyId, userId, algorithm, players, lastPreprocessedIndex); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MpcKey {\n"); + sb.append(" keyId: ").append(toIndentedString(keyId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" algorithm: ").append(toIndentedString(algorithm)).append("\n"); + sb.append(" players: ").append(toIndentedString(players)).append("\n"); + sb.append(" lastPreprocessedIndex: ") + .append(toIndentedString(lastPreprocessedIndex)) + .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 `keyId` to the URL query string + if (getKeyId() != null) { + joiner.add( + String.format( + "%skeyId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getKeyId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `userId` to the URL query string + if (getUserId() != null) { + joiner.add( + String.format( + "%suserId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUserId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `algorithm` to the URL query string + if (getAlgorithm() != null) { + joiner.add( + String.format( + "%salgorithm%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAlgorithm()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `players` to the URL query string + if (getPlayers() != null) { + for (int i = 0; i < getPlayers().size(); i++) { + if (getPlayers().get(i) != null) { + joiner.add( + getPlayers() + .get(i) + .toUrlQueryString( + String.format( + "%splayers%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `lastPreprocessedIndex` to the URL query string + if (getLastPreprocessedIndex() != null) { + joiner.add( + String.format( + "%slastPreprocessedIndex%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getLastPreprocessedIndex()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Notification.java b/src/main/java/com/fireblocks/sdk/model/Notification.java new file mode 100644 index 0000000..6e68014 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Notification.java @@ -0,0 +1,449 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** Notification */ +@JsonPropertyOrder({ + Notification.JSON_PROPERTY_ID, + Notification.JSON_PROPERTY_CREATED_AT, + Notification.JSON_PROPERTY_UPDATED_AT, + Notification.JSON_PROPERTY_STATUS, + Notification.JSON_PROPERTY_EVENT_TYPE, + Notification.JSON_PROPERTY_EVENT_VERSION, + Notification.JSON_PROPERTY_RESOURCE_ID, + Notification.JSON_PROPERTY_ATTEMPTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Notification { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private NotificationStatus status; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private WebhookEvent eventType; + + public static final String JSON_PROPERTY_EVENT_VERSION = "eventVersion"; + private BigDecimal eventVersion; + + public static final String JSON_PROPERTY_RESOURCE_ID = "resourceId"; + private UUID resourceId; + + public static final String JSON_PROPERTY_ATTEMPTS = "attempts"; + private List attempts = new ArrayList<>(); + + public Notification() {} + + public Notification id(UUID id) { + this.id = id; + return this; + } + + /** + * The id of the Notification + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public Notification createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation date of the notification + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public Notification updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The date when the notification was updated + * + * @return updatedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public Notification status(NotificationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(NotificationStatus status) { + this.status = status; + } + + public Notification eventType(WebhookEvent eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get eventType + * + * @return eventType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WebhookEvent getEventType() { + return eventType; + } + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventType(WebhookEvent eventType) { + this.eventType = eventType; + } + + public Notification eventVersion(BigDecimal eventVersion) { + this.eventVersion = eventVersion; + return this; + } + + /** + * The event version of the Notification + * + * @return eventVersion + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getEventVersion() { + return eventVersion; + } + + @JsonProperty(JSON_PROPERTY_EVENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventVersion(BigDecimal eventVersion) { + this.eventVersion = eventVersion; + } + + public Notification resourceId(UUID resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The resource id of the event which the Notification is listen to + * + * @return resourceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getResourceId() { + return resourceId; + } + + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResourceId(UUID resourceId) { + this.resourceId = resourceId; + } + + public Notification attempts(List attempts) { + this.attempts = attempts; + return this; + } + + public Notification addAttemptsItem(String attemptsItem) { + if (this.attempts == null) { + this.attempts = new ArrayList<>(); + } + this.attempts.add(attemptsItem); + return this; + } + + /** + * The attempts related to Notification + * + * @return attempts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTEMPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttempts() { + return attempts; + } + + @JsonProperty(JSON_PROPERTY_ATTEMPTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttempts(List attempts) { + this.attempts = attempts; + } + + /** Return true if this Notification object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Notification notification = (Notification) o; + return Objects.equals(this.id, notification.id) + && Objects.equals(this.createdAt, notification.createdAt) + && Objects.equals(this.updatedAt, notification.updatedAt) + && Objects.equals(this.status, notification.status) + && Objects.equals(this.eventType, notification.eventType) + && Objects.equals(this.eventVersion, notification.eventVersion) + && Objects.equals(this.resourceId, notification.resourceId) + && Objects.equals(this.attempts, notification.attempts); + } + + @Override + public int hashCode() { + return Objects.hash( + id, createdAt, updatedAt, status, eventType, eventVersion, resourceId, attempts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Notification {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" eventVersion: ").append(toIndentedString(eventVersion)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" attempts: ").append(toIndentedString(attempts)).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 `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCreatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `eventType` to the URL query string + if (getEventType() != null) { + joiner.add( + String.format( + "%seventType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getEventType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `eventVersion` to the URL query string + if (getEventVersion() != null) { + joiner.add( + String.format( + "%seventVersion%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getEventVersion()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `resourceId` to the URL query string + if (getResourceId() != null) { + joiner.add( + String.format( + "%sresourceId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getResourceId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `attempts` to the URL query string + if (getAttempts() != null) { + for (int i = 0; i < getAttempts().size(); i++) { + joiner.add( + String.format( + "%sattempts%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getAttempts().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java new file mode 100644 index 0000000..73913d9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java @@ -0,0 +1,204 @@ +/* + * 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; + +/** NotificationPaginatedResponse */ +@JsonPropertyOrder({ + NotificationPaginatedResponse.JSON_PROPERTY_DATA, + NotificationPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NotificationPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public NotificationPaginatedResponse() {} + + public NotificationPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public NotificationPaginatedResponse addDataItem(Notification dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public NotificationPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this NotificationPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationPaginatedResponse notificationPaginatedResponse = + (NotificationPaginatedResponse) o; + return Objects.equals(this.data, notificationPaginatedResponse.data) + && Objects.equals(this.next, notificationPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationPaginatedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java b/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java new file mode 100644 index 0000000..af5a32d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NotificationStatus.java @@ -0,0 +1,66 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The status of the Notification */ +public enum NotificationStatus { + COMPLETED("COMPLETED"), + + FAILED("FAILED"), + + IN_PROGRESS("IN_PROGRESS"); + + private String value; + + NotificationStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static NotificationStatus fromValue(String value) { + for (NotificationStatus b : NotificationStatus.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/NotificationWithData.java b/src/main/java/com/fireblocks/sdk/model/NotificationWithData.java new file mode 100644 index 0000000..fa020e5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NotificationWithData.java @@ -0,0 +1,497 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** NotificationWithData */ +@JsonPropertyOrder({ + NotificationWithData.JSON_PROPERTY_ID, + NotificationWithData.JSON_PROPERTY_CREATED_AT, + NotificationWithData.JSON_PROPERTY_UPDATED_AT, + NotificationWithData.JSON_PROPERTY_STATUS, + NotificationWithData.JSON_PROPERTY_EVENT_TYPE, + NotificationWithData.JSON_PROPERTY_EVENT_VERSION, + NotificationWithData.JSON_PROPERTY_RESOURCE_ID, + NotificationWithData.JSON_PROPERTY_ATTEMPTS, + NotificationWithData.JSON_PROPERTY_DATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NotificationWithData { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_STATUS = "status"; + private NotificationStatus status; + + public static final String JSON_PROPERTY_EVENT_TYPE = "eventType"; + private WebhookEvent eventType; + + public static final String JSON_PROPERTY_EVENT_VERSION = "eventVersion"; + private BigDecimal eventVersion; + + public static final String JSON_PROPERTY_RESOURCE_ID = "resourceId"; + private UUID resourceId; + + public static final String JSON_PROPERTY_ATTEMPTS = "attempts"; + private List attempts = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATA = "data"; + private Object data; + + public NotificationWithData() {} + + public NotificationWithData id(UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public NotificationWithData createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The creation date of the notification + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public NotificationWithData updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The date when the notification was updated + * + * @return updatedAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public NotificationWithData status(NotificationStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(NotificationStatus status) { + this.status = status; + } + + public NotificationWithData eventType(WebhookEvent eventType) { + this.eventType = eventType; + return this; + } + + /** + * Get eventType + * + * @return eventType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WebhookEvent getEventType() { + return eventType; + } + + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventType(WebhookEvent eventType) { + this.eventType = eventType; + } + + public NotificationWithData eventVersion(BigDecimal eventVersion) { + this.eventVersion = eventVersion; + return this; + } + + /** + * The event version which the Notification is listen to + * + * @return eventVersion + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EVENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getEventVersion() { + return eventVersion; + } + + @JsonProperty(JSON_PROPERTY_EVENT_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEventVersion(BigDecimal eventVersion) { + this.eventVersion = eventVersion; + } + + public NotificationWithData resourceId(UUID resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The resource id of the event which the Notification is listen to + * + * @return resourceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getResourceId() { + return resourceId; + } + + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResourceId(UUID resourceId) { + this.resourceId = resourceId; + } + + public NotificationWithData attempts(List attempts) { + this.attempts = attempts; + return this; + } + + public NotificationWithData addAttemptsItem(String attemptsItem) { + if (this.attempts == null) { + this.attempts = new ArrayList<>(); + } + this.attempts.add(attemptsItem); + return this; + } + + /** + * The attempts related to Notification + * + * @return attempts + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ATTEMPTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAttempts() { + return attempts; + } + + @JsonProperty(JSON_PROPERTY_ATTEMPTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttempts(List attempts) { + this.attempts = attempts; + } + + public NotificationWithData data(Object data) { + this.data = data; + return this; + } + + /** + * notification data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(Object data) { + this.data = data; + } + + /** Return true if this NotificationWithData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationWithData notificationWithData = (NotificationWithData) o; + return Objects.equals(this.id, notificationWithData.id) + && Objects.equals(this.createdAt, notificationWithData.createdAt) + && Objects.equals(this.updatedAt, notificationWithData.updatedAt) + && Objects.equals(this.status, notificationWithData.status) + && Objects.equals(this.eventType, notificationWithData.eventType) + && Objects.equals(this.eventVersion, notificationWithData.eventVersion) + && Objects.equals(this.resourceId, notificationWithData.resourceId) + && Objects.equals(this.attempts, notificationWithData.attempts) + && Objects.equals(this.data, notificationWithData.data); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + createdAt, + updatedAt, + status, + eventType, + eventVersion, + resourceId, + attempts, + data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationWithData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" eventVersion: ").append(toIndentedString(eventVersion)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" attempts: ").append(toIndentedString(attempts)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).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 `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCreatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `eventType` to the URL query string + if (getEventType() != null) { + joiner.add( + String.format( + "%seventType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getEventType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `eventVersion` to the URL query string + if (getEventVersion() != null) { + joiner.add( + String.format( + "%seventVersion%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getEventVersion()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `resourceId` to the URL query string + if (getResourceId() != null) { + joiner.add( + String.format( + "%sresourceId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getResourceId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `attempts` to the URL query string + if (getAttempts() != null) { + for (int i = 0; i < getAttempts().size(); i++) { + joiner.add( + String.format( + "%sattempts%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getAttempts().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add( + String.format( + "%sdata%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getData()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java b/src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java new file mode 100644 index 0000000..97266a3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java @@ -0,0 +1,131 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import java.util.StringJoiner; + +/** PairApiKeyRequest */ +@JsonPropertyOrder({PairApiKeyRequest.JSON_PROPERTY_CALLBACK_HANDLER}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PairApiKeyRequest { + public static final String JSON_PROPERTY_CALLBACK_HANDLER = "callbackHandler"; + private CallbackHandlerRequest callbackHandler; + + public PairApiKeyRequest() {} + + public PairApiKeyRequest callbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + return this; + } + + /** + * Get callbackHandler + * + * @return callbackHandler + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CallbackHandlerRequest getCallbackHandler() { + return callbackHandler; + } + + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + } + + /** Return true if this PairApiKeyRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PairApiKeyRequest pairApiKeyRequest = (PairApiKeyRequest) o; + return Objects.equals(this.callbackHandler, pairApiKeyRequest.callbackHandler); + } + + @Override + public int hashCode() { + return Objects.hash(callbackHandler); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PairApiKeyRequest {\n"); + sb.append(" callbackHandler: ").append(toIndentedString(callbackHandler)).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 `callbackHandler` to the URL query string + if (getCallbackHandler() != null) { + joiner.add(getCallbackHandler().toUrlQueryString(prefix + "callbackHandler" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java b/src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java new file mode 100644 index 0000000..459c6a1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java @@ -0,0 +1,176 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** PairApiKeyResponse */ +@JsonPropertyOrder({ + PairApiKeyResponse.JSON_PROPERTY_ID, + PairApiKeyResponse.JSON_PROPERTY_CALLBACK_HANDLER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PairApiKeyResponse { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_CALLBACK_HANDLER = "callbackHandler"; + private CallbackHandlerRequest callbackHandler; + + public PairApiKeyResponse() {} + + public PairApiKeyResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the API key + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public PairApiKeyResponse callbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + return this; + } + + /** + * Get callbackHandler + * + * @return callbackHandler + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CallbackHandlerRequest getCallbackHandler() { + return callbackHandler; + } + + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + } + + /** Return true if this PairApiKeyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PairApiKeyResponse pairApiKeyResponse = (PairApiKeyResponse) o; + return Objects.equals(this.id, pairApiKeyResponse.id) + && Objects.equals(this.callbackHandler, pairApiKeyResponse.callbackHandler); + } + + @Override + public int hashCode() { + return Objects.hash(id, callbackHandler); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PairApiKeyResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" callbackHandler: ").append(toIndentedString(callbackHandler)).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 `callbackHandler` to the URL query string + if (getCallbackHandler() != null) { + joiner.add(getCallbackHandler().toUrlQueryString(prefix + "callbackHandler" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Players.java b/src/main/java/com/fireblocks/sdk/model/Players.java new file mode 100644 index 0000000..09fff29 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Players.java @@ -0,0 +1,212 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Players */ +@JsonPropertyOrder({Players.JSON_PROPERTY_ID, Players.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Players { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Type of the player */ + public enum TypeEnum { + MOBILE("MOBILE"), + + CLOUD("CLOUD"); + + 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 Players() {} + + public Players id(String id) { + this.id = id; + return this; + } + + /** + * id of the player + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public Players type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the player + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** Return true if this Players object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Players players = (Players) o; + return Objects.equals(this.id, players.id) && Objects.equals(this.type, players.type); + } + + @Override + public int hashCode() { + return Objects.hash(id, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Players {\n"); + sb.append(" id: ").append(toIndentedString(id)).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 `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 `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/ProviderDto.java b/src/main/java/com/fireblocks/sdk/model/Provider.java similarity index 69% rename from src/main/java/com/fireblocks/sdk/model/ProviderDto.java rename to src/main/java/com/fireblocks/sdk/model/Provider.java index cc003ce..79a3ddd 100644 --- a/src/main/java/com/fireblocks/sdk/model/ProviderDto.java +++ b/src/main/java/com/fireblocks/sdk/model/Provider.java @@ -23,17 +23,19 @@ import java.util.Objects; import java.util.StringJoiner; -/** ProviderDto */ +/** Provider */ @JsonPropertyOrder({ - ProviderDto.JSON_PROPERTY_ID, - ProviderDto.JSON_PROPERTY_PROVIDER_NAME, - ProviderDto.JSON_PROPERTY_VALIDATORS, - ProviderDto.JSON_PROPERTY_ICON_URL, - ProviderDto.JSON_PROPERTY_TERMS_OF_SERVICE_URL, - ProviderDto.JSON_PROPERTY_IS_TERMS_OF_SERVICE_APPROVED + Provider.JSON_PROPERTY_ID, + Provider.JSON_PROPERTY_PROVIDER_NAME, + Provider.JSON_PROPERTY_VALIDATORS, + Provider.JSON_PROPERTY_ICON_URL, + Provider.JSON_PROPERTY_TERMS_OF_SERVICE_URL, + Provider.JSON_PROPERTY_IS_TERMS_OF_SERVICE_APPROVED, + Provider.JSON_PROPERTY_IS_PRIVATE, + Provider.JSON_PROPERTY_IS_LIQUID_STAKING }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ProviderDto { +public class Provider { public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -41,7 +43,7 @@ public class ProviderDto { private String providerName; public static final String JSON_PROPERTY_VALIDATORS = "validators"; - private List validators = new ArrayList<>(); + private List validators = new ArrayList<>(); public static final String JSON_PROPERTY_ICON_URL = "iconUrl"; private String iconUrl; @@ -53,9 +55,15 @@ public class ProviderDto { "isTermsOfServiceApproved"; private Boolean isTermsOfServiceApproved; - public ProviderDto() {} + public static final String JSON_PROPERTY_IS_PRIVATE = "isPrivate"; + private Boolean isPrivate; - public ProviderDto id(String id) { + public static final String JSON_PROPERTY_IS_LIQUID_STAKING = "isLiquidStaking"; + private Boolean isLiquidStaking; + + public Provider() {} + + public Provider id(String id) { this.id = id; return this; } @@ -78,7 +86,7 @@ public void setId(String id) { this.id = id; } - public ProviderDto providerName(String providerName) { + public Provider providerName(String providerName) { this.providerName = providerName; return this; } @@ -101,12 +109,12 @@ public void setProviderName(String providerName) { this.providerName = providerName; } - public ProviderDto validators(List validators) { + public Provider validators(List validators) { this.validators = validators; return this; } - public ProviderDto addValidatorsItem(ValidatorDto validatorsItem) { + public Provider addValidatorsItem(Validator validatorsItem) { if (this.validators == null) { this.validators = new ArrayList<>(); } @@ -123,17 +131,17 @@ public ProviderDto addValidatorsItem(ValidatorDto validatorsItem) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_VALIDATORS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getValidators() { + public List getValidators() { return validators; } @JsonProperty(JSON_PROPERTY_VALIDATORS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValidators(List validators) { + public void setValidators(List validators) { this.validators = validators; } - public ProviderDto iconUrl(String iconUrl) { + public Provider iconUrl(String iconUrl) { this.iconUrl = iconUrl; return this; } @@ -143,20 +151,20 @@ public ProviderDto iconUrl(String iconUrl) { * * @return iconUrl */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ICON_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getIconUrl() { return iconUrl; } @JsonProperty(JSON_PROPERTY_ICON_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setIconUrl(String iconUrl) { this.iconUrl = iconUrl; } - public ProviderDto termsOfServiceUrl(String termsOfServiceUrl) { + public Provider termsOfServiceUrl(String termsOfServiceUrl) { this.termsOfServiceUrl = termsOfServiceUrl; return this; } @@ -166,20 +174,20 @@ public ProviderDto termsOfServiceUrl(String termsOfServiceUrl) { * * @return termsOfServiceUrl */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TERMS_OF_SERVICE_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getTermsOfServiceUrl() { return termsOfServiceUrl; } @JsonProperty(JSON_PROPERTY_TERMS_OF_SERVICE_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setTermsOfServiceUrl(String termsOfServiceUrl) { this.termsOfServiceUrl = termsOfServiceUrl; } - public ProviderDto isTermsOfServiceApproved(Boolean isTermsOfServiceApproved) { + public Provider isTermsOfServiceApproved(Boolean isTermsOfServiceApproved) { this.isTermsOfServiceApproved = isTermsOfServiceApproved; return this; } @@ -202,7 +210,53 @@ public void setIsTermsOfServiceApproved(Boolean isTermsOfServiceApproved) { this.isTermsOfServiceApproved = isTermsOfServiceApproved; } - /** Return true if this ProviderDto object is equal to o. */ + public Provider isPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + return this; + } + + /** + * Is the provider private, i.e created by the user + * + * @return isPrivate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_PRIVATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsPrivate() { + return isPrivate; + } + + @JsonProperty(JSON_PROPERTY_IS_PRIVATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + } + + public Provider isLiquidStaking(Boolean isLiquidStaking) { + this.isLiquidStaking = isLiquidStaking; + return this; + } + + /** + * Is the provider a liquid staking provider + * + * @return isLiquidStaking + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_LIQUID_STAKING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsLiquidStaking() { + return isLiquidStaking; + } + + @JsonProperty(JSON_PROPERTY_IS_LIQUID_STAKING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsLiquidStaking(Boolean isLiquidStaking) { + this.isLiquidStaking = isLiquidStaking; + } + + /** Return true if this Provider object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -211,26 +265,34 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ProviderDto providerDto = (ProviderDto) o; - return Objects.equals(this.id, providerDto.id) - && Objects.equals(this.providerName, providerDto.providerName) - && Objects.equals(this.validators, providerDto.validators) - && Objects.equals(this.iconUrl, providerDto.iconUrl) - && Objects.equals(this.termsOfServiceUrl, providerDto.termsOfServiceUrl) - && Objects.equals( - this.isTermsOfServiceApproved, providerDto.isTermsOfServiceApproved); + Provider provider = (Provider) o; + return Objects.equals(this.id, provider.id) + && Objects.equals(this.providerName, provider.providerName) + && Objects.equals(this.validators, provider.validators) + && Objects.equals(this.iconUrl, provider.iconUrl) + && Objects.equals(this.termsOfServiceUrl, provider.termsOfServiceUrl) + && Objects.equals(this.isTermsOfServiceApproved, provider.isTermsOfServiceApproved) + && Objects.equals(this.isPrivate, provider.isPrivate) + && Objects.equals(this.isLiquidStaking, provider.isLiquidStaking); } @Override public int hashCode() { return Objects.hash( - id, providerName, validators, iconUrl, termsOfServiceUrl, isTermsOfServiceApproved); + id, + providerName, + validators, + iconUrl, + termsOfServiceUrl, + isTermsOfServiceApproved, + isPrivate, + isLiquidStaking); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ProviderDto {\n"); + sb.append("class Provider {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" providerName: ").append(toIndentedString(providerName)).append("\n"); sb.append(" validators: ").append(toIndentedString(validators)).append("\n"); @@ -241,6 +303,8 @@ public String toString() { sb.append(" isTermsOfServiceApproved: ") .append(toIndentedString(isTermsOfServiceApproved)) .append("\n"); + sb.append(" isPrivate: ").append(toIndentedString(isPrivate)).append("\n"); + sb.append(" isLiquidStaking: ").append(toIndentedString(isLiquidStaking)).append("\n"); sb.append("}"); return sb.toString(); } @@ -372,6 +436,31 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `isPrivate` to the URL query string + if (getIsPrivate() != null) { + joiner.add( + String.format( + "%sisPrivate%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIsPrivate()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `isLiquidStaking` to the URL query string + if (getIsLiquidStaking() != null) { + joiner.add( + String.format( + "%sisLiquidStaking%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIsLiquidStaking()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java b/src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java index 8427b37..51bc31a 100644 --- a/src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java +++ b/src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java @@ -13,10 +13,11 @@ package com.fireblocks.sdk.model; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonValue; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -32,46 +33,81 @@ }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class PublicKeyInformation { + /** Elliptic Curve */ + public enum AlgorithmEnum { + ECDSA_SECP256K1("MPC_ECDSA_SECP256K1"), + + ECDSA_SECP256R1("MPC_ECDSA_SECP256R1"), + + EDDSA_ED25519("MPC_EDDSA_ED25519"); + + private String value; + + AlgorithmEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AlgorithmEnum fromValue(String value) { + for (AlgorithmEnum b : AlgorithmEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + public static final String JSON_PROPERTY_ALGORITHM = "algorithm"; - private String algorithm; + private AlgorithmEnum algorithm; public static final String JSON_PROPERTY_DERIVATION_PATH = "derivationPath"; - private List derivationPath; + private List derivationPath; public static final String JSON_PROPERTY_PUBLIC_KEY = "publicKey"; private String publicKey; public PublicKeyInformation() {} - public PublicKeyInformation algorithm(String algorithm) { + public PublicKeyInformation algorithm(AlgorithmEnum algorithm) { this.algorithm = algorithm; return this; } /** - * Get algorithm + * Elliptic Curve * * @return algorithm */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALGORITHM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAlgorithm() { + public AlgorithmEnum getAlgorithm() { return algorithm; } @JsonProperty(JSON_PROPERTY_ALGORITHM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAlgorithm(String algorithm) { + public void setAlgorithm(AlgorithmEnum algorithm) { this.algorithm = algorithm; } - public PublicKeyInformation derivationPath(List derivationPath) { + public PublicKeyInformation derivationPath(List derivationPath) { this.derivationPath = derivationPath; return this; } - public PublicKeyInformation addDerivationPathItem(BigDecimal derivationPathItem) { + public PublicKeyInformation addDerivationPathItem(Integer derivationPathItem) { if (this.derivationPath == null) { this.derivationPath = new ArrayList<>(); } @@ -80,20 +116,20 @@ public PublicKeyInformation addDerivationPathItem(BigDecimal derivationPathItem) } /** - * Get derivationPath + * BIP44 derivation path * * @return derivationPath */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DERIVATION_PATH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDerivationPath() { + public List getDerivationPath() { return derivationPath; } @JsonProperty(JSON_PROPERTY_DERIVATION_PATH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDerivationPath(List derivationPath) { + public void setDerivationPath(List derivationPath) { this.derivationPath = derivationPath; } @@ -103,7 +139,7 @@ public PublicKeyInformation publicKey(String publicKey) { } /** - * Get publicKey + * Compressed/Uncompressed public key value in hex representation * * @return publicKey */ @@ -209,21 +245,19 @@ public String toUrlQueryString(String prefix) { // add `derivationPath` to the URL query string if (getDerivationPath() != null) { for (int i = 0; i < getDerivationPath().size(); i++) { - if (getDerivationPath().get(i) != null) { - joiner.add( - String.format( - "%sderivationPath%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getDerivationPath().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } + joiner.add( + String.format( + "%sderivationPath%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDerivationPath().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); } } diff --git a/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java b/src/main/java/com/fireblocks/sdk/model/RelatedRequest.java similarity index 89% rename from src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java rename to src/main/java/com/fireblocks/sdk/model/RelatedRequest.java index ed5b328..4f3e7d4 100644 --- a/src/main/java/com/fireblocks/sdk/model/RelatedRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/RelatedRequest.java @@ -23,15 +23,15 @@ import java.util.Objects; import java.util.StringJoiner; -/** RelatedRequestDto */ +/** RelatedRequest */ @JsonPropertyOrder({ - RelatedRequestDto.JSON_PROPERTY_STATUS, - RelatedRequestDto.JSON_PROPERTY_IN_PROGRESS, - RelatedRequestDto.JSON_PROPERTY_AMOUNT, - RelatedRequestDto.JSON_PROPERTY_TX_ID + RelatedRequest.JSON_PROPERTY_STATUS, + RelatedRequest.JSON_PROPERTY_IN_PROGRESS, + RelatedRequest.JSON_PROPERTY_AMOUNT, + RelatedRequest.JSON_PROPERTY_TX_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelatedRequestDto { +public class RelatedRequest { /** The status of the request */ public enum StatusEnum { DEACTIVATING("deactivating"); @@ -75,9 +75,9 @@ public static StatusEnum fromValue(String value) { public static final String JSON_PROPERTY_TX_ID = "txId"; private String txId; - public RelatedRequestDto() {} + public RelatedRequest() {} - public RelatedRequestDto status(StatusEnum status) { + public RelatedRequest status(StatusEnum status) { this.status = status; return this; } @@ -100,7 +100,7 @@ public void setStatus(StatusEnum status) { this.status = status; } - public RelatedRequestDto inProgress(Boolean inProgress) { + public RelatedRequest inProgress(Boolean inProgress) { this.inProgress = inProgress; return this; } @@ -123,7 +123,7 @@ public void setInProgress(Boolean inProgress) { this.inProgress = inProgress; } - public RelatedRequestDto amount(String amount) { + public RelatedRequest amount(String amount) { this.amount = amount; return this; } @@ -146,7 +146,7 @@ public void setAmount(String amount) { this.amount = amount; } - public RelatedRequestDto txId(String txId) { + public RelatedRequest txId(String txId) { this.txId = txId; return this; } @@ -169,7 +169,7 @@ public void setTxId(String txId) { this.txId = txId; } - /** Return true if this RelatedRequestDto object is equal to o. */ + /** Return true if this RelatedRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -178,11 +178,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelatedRequestDto relatedRequestDto = (RelatedRequestDto) o; - return Objects.equals(this.status, relatedRequestDto.status) - && Objects.equals(this.inProgress, relatedRequestDto.inProgress) - && Objects.equals(this.amount, relatedRequestDto.amount) - && Objects.equals(this.txId, relatedRequestDto.txId); + RelatedRequest relatedRequest = (RelatedRequest) o; + return Objects.equals(this.status, relatedRequest.status) + && Objects.equals(this.inProgress, relatedRequest.inProgress) + && Objects.equals(this.amount, relatedRequest.amount) + && Objects.equals(this.txId, relatedRequest.txId); } @Override @@ -193,7 +193,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RelatedRequestDto {\n"); + sb.append("class RelatedRequest {\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" inProgress: ").append(toIndentedString(inProgress)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/RelatedTransactionDto.java b/src/main/java/com/fireblocks/sdk/model/RelatedTransaction.java similarity index 88% rename from src/main/java/com/fireblocks/sdk/model/RelatedTransactionDto.java rename to src/main/java/com/fireblocks/sdk/model/RelatedTransaction.java index 26cf67c..bac45e5 100644 --- a/src/main/java/com/fireblocks/sdk/model/RelatedTransactionDto.java +++ b/src/main/java/com/fireblocks/sdk/model/RelatedTransaction.java @@ -21,22 +21,22 @@ import java.util.Objects; import java.util.StringJoiner; -/** RelatedTransactionDto */ +/** RelatedTransaction */ @JsonPropertyOrder({ - RelatedTransactionDto.JSON_PROPERTY_TX_ID, - RelatedTransactionDto.JSON_PROPERTY_COMPLETED + RelatedTransaction.JSON_PROPERTY_TX_ID, + RelatedTransaction.JSON_PROPERTY_COMPLETED }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RelatedTransactionDto { +public class RelatedTransaction { public static final String JSON_PROPERTY_TX_ID = "txId"; private String txId; public static final String JSON_PROPERTY_COMPLETED = "completed"; private Boolean completed; - public RelatedTransactionDto() {} + public RelatedTransaction() {} - public RelatedTransactionDto txId(String txId) { + public RelatedTransaction txId(String txId) { this.txId = txId; return this; } @@ -59,7 +59,7 @@ public void setTxId(String txId) { this.txId = txId; } - public RelatedTransactionDto completed(Boolean completed) { + public RelatedTransaction completed(Boolean completed) { this.completed = completed; return this; } @@ -82,7 +82,7 @@ public void setCompleted(Boolean completed) { this.completed = completed; } - /** Return true if this RelatedTransactionDto object is equal to o. */ + /** Return true if this RelatedTransaction object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -91,9 +91,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RelatedTransactionDto relatedTransactionDto = (RelatedTransactionDto) o; - return Objects.equals(this.txId, relatedTransactionDto.txId) - && Objects.equals(this.completed, relatedTransactionDto.completed); + RelatedTransaction relatedTransaction = (RelatedTransaction) o; + return Objects.equals(this.txId, relatedTransaction.txId) + && Objects.equals(this.completed, relatedTransaction.completed); } @Override @@ -104,7 +104,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RelatedTransactionDto {\n"); + sb.append("class RelatedTransaction {\n"); sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); sb.append(" completed: ").append(toIndentedString(completed)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/fireblocks/sdk/model/SolanaBlockchainData.java b/src/main/java/com/fireblocks/sdk/model/SolanaBlockchainData.java new file mode 100644 index 0000000..9e1c685 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SolanaBlockchainData.java @@ -0,0 +1,199 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * Additional fields per blockchain - can be empty or missing if not initialized or no additional + * info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account + * address. For Ethereum (ETH), an empty object is returned as no specific data is available. + */ +@JsonPropertyOrder({ + SolanaBlockchainData.JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS, + SolanaBlockchainData.JSON_PROPERTY_STAKE_ACCOUNT_DERIVATION_CHANGE_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SolanaBlockchainData { + public static final String JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS = "stakeAccountAddress"; + private String stakeAccountAddress; + + public static final String JSON_PROPERTY_STAKE_ACCOUNT_DERIVATION_CHANGE_VALUE = + "stakeAccountDerivationChangeValue"; + private BigDecimal stakeAccountDerivationChangeValue; + + public SolanaBlockchainData() {} + + public SolanaBlockchainData stakeAccountAddress(String stakeAccountAddress) { + this.stakeAccountAddress = stakeAccountAddress; + return this; + } + + /** + * The stake account address matching the stakeAccountId. + * + * @return stakeAccountAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStakeAccountAddress() { + return stakeAccountAddress; + } + + @JsonProperty(JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStakeAccountAddress(String stakeAccountAddress) { + this.stakeAccountAddress = stakeAccountAddress; + } + + public SolanaBlockchainData stakeAccountDerivationChangeValue( + BigDecimal stakeAccountDerivationChangeValue) { + this.stakeAccountDerivationChangeValue = stakeAccountDerivationChangeValue; + return this; + } + + /** + * The value of the change level in the BIP44 path which was used to derive the stake account + * address + * + * @return stakeAccountDerivationChangeValue + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STAKE_ACCOUNT_DERIVATION_CHANGE_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getStakeAccountDerivationChangeValue() { + return stakeAccountDerivationChangeValue; + } + + @JsonProperty(JSON_PROPERTY_STAKE_ACCOUNT_DERIVATION_CHANGE_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStakeAccountDerivationChangeValue(BigDecimal stakeAccountDerivationChangeValue) { + this.stakeAccountDerivationChangeValue = stakeAccountDerivationChangeValue; + } + + /** Return true if this SolanaBlockchainData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SolanaBlockchainData solanaBlockchainData = (SolanaBlockchainData) o; + return Objects.equals(this.stakeAccountAddress, solanaBlockchainData.stakeAccountAddress) + && Objects.equals( + this.stakeAccountDerivationChangeValue, + solanaBlockchainData.stakeAccountDerivationChangeValue); + } + + @Override + public int hashCode() { + return Objects.hash(stakeAccountAddress, stakeAccountDerivationChangeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SolanaBlockchainData {\n"); + sb.append(" stakeAccountAddress: ") + .append(toIndentedString(stakeAccountAddress)) + .append("\n"); + sb.append(" stakeAccountDerivationChangeValue: ") + .append(toIndentedString(stakeAccountDerivationChangeValue)) + .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 `stakeAccountAddress` to the URL query string + if (getStakeAccountAddress() != null) { + joiner.add( + String.format( + "%sstakeAccountAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStakeAccountAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `stakeAccountDerivationChangeValue` to the URL query string + if (getStakeAccountDerivationChangeValue() != null) { + joiner.add( + String.format( + "%sstakeAccountDerivationChangeValue%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStakeAccountDerivationChangeValue()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SplitRequest.java b/src/main/java/com/fireblocks/sdk/model/SplitRequest.java new file mode 100644 index 0000000..8be8f79 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SplitRequest.java @@ -0,0 +1,302 @@ +/* + * 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; + +/** SplitRequest */ +@JsonPropertyOrder({ + SplitRequest.JSON_PROPERTY_ID, + SplitRequest.JSON_PROPERTY_AMOUNT, + SplitRequest.JSON_PROPERTY_FEE, + SplitRequest.JSON_PROPERTY_FEE_LEVEL, + SplitRequest.JSON_PROPERTY_TX_NOTE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SplitRequest { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevel feeLevel; + + public static final String JSON_PROPERTY_TX_NOTE = "txNote"; + private String txNote; + + public SplitRequest() {} + + public SplitRequest id(String id) { + this.id = id; + return this; + } + + /** + * id of position to split + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public SplitRequest amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Amount of tokens to be transferred to the new stake account. + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(String amount) { + this.amount = amount; + } + + public SplitRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Represents the fee for a transaction, which can be specified as a percentage value. Only one + * of fee/feeLevel is required. + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public SplitRequest feeLevel(FeeLevel feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Get feeLevel + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevel getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevel feeLevel) { + this.feeLevel = feeLevel; + } + + public SplitRequest txNote(String txNote) { + this.txNote = txNote; + return this; + } + + /** + * The note to associate with the transactions. + * + * @return txNote + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxNote() { + return txNote; + } + + @JsonProperty(JSON_PROPERTY_TX_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxNote(String txNote) { + this.txNote = txNote; + } + + /** Return true if this SplitRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SplitRequest splitRequest = (SplitRequest) o; + return Objects.equals(this.id, splitRequest.id) + && Objects.equals(this.amount, splitRequest.amount) + && Objects.equals(this.fee, splitRequest.fee) + && Objects.equals(this.feeLevel, splitRequest.feeLevel) + && Objects.equals(this.txNote, splitRequest.txNote); + } + + @Override + public int hashCode() { + return Objects.hash(id, amount, fee, feeLevel, txNote); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SplitRequest {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" txNote: ").append(toIndentedString(txNote)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `txNote` to the URL query string + if (getTxNote() != null) { + joiner.add( + String.format( + "%stxNote%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxNote()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SolanaBlockchainDataDto.java b/src/main/java/com/fireblocks/sdk/model/SplitResponse.java similarity index 61% rename from src/main/java/com/fireblocks/sdk/model/SolanaBlockchainDataDto.java rename to src/main/java/com/fireblocks/sdk/model/SplitResponse.java index 6a0900a..1c46d8d 100644 --- a/src/main/java/com/fireblocks/sdk/model/SolanaBlockchainDataDto.java +++ b/src/main/java/com/fireblocks/sdk/model/SplitResponse.java @@ -21,39 +21,39 @@ import java.util.Objects; import java.util.StringJoiner; -/** SolanaBlockchainDataDto */ -@JsonPropertyOrder({SolanaBlockchainDataDto.JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS}) +/** SplitResponse */ +@JsonPropertyOrder({SplitResponse.JSON_PROPERTY_ID}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SolanaBlockchainDataDto { - public static final String JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS = "stakeAccountAddress"; - private String stakeAccountAddress; +public class SplitResponse { + public static final String JSON_PROPERTY_ID = "id"; + private String id; - public SolanaBlockchainDataDto() {} + public SplitResponse() {} - public SolanaBlockchainDataDto stakeAccountAddress(String stakeAccountAddress) { - this.stakeAccountAddress = stakeAccountAddress; + public SplitResponse id(String id) { + this.id = id; return this; } /** - * The stake account address matching the stakeAccountId. + * The unique identifier of the new staking position * - * @return stakeAccountAddress + * @return id */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS) + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStakeAccountAddress() { - return stakeAccountAddress; + public String getId() { + return id; } - @JsonProperty(JSON_PROPERTY_STAKE_ACCOUNT_ADDRESS) + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStakeAccountAddress(String stakeAccountAddress) { - this.stakeAccountAddress = stakeAccountAddress; + public void setId(String id) { + this.id = id; } - /** Return true if this SolanaBlockchainDataDto object is equal to o. */ + /** Return true if this SplitResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,23 +62,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SolanaBlockchainDataDto solanaBlockchainDataDto = (SolanaBlockchainDataDto) o; - return Objects.equals( - this.stakeAccountAddress, solanaBlockchainDataDto.stakeAccountAddress); + SplitResponse splitResponse = (SplitResponse) o; + return Objects.equals(this.id, splitResponse.id); } @Override public int hashCode() { - return Objects.hash(stakeAccountAddress); + return Objects.hash(id); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SolanaBlockchainDataDto {\n"); - sb.append(" stakeAccountAddress: ") - .append(toIndentedString(stakeAccountAddress)) - .append("\n"); + sb.append("class SplitResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); return sb.toString(); } @@ -126,16 +123,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `stakeAccountAddress` to the URL query string - if (getStakeAccountAddress() != null) { + // add `id` to the URL query string + if (getId() != null) { joiner.add( String.format( - "%sstakeAccountAddress%s=%s", + "%sid%s=%s", prefix, suffix, - URLEncoder.encode( - String.valueOf(getStakeAccountAddress()), - StandardCharsets.UTF_8) + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) .replaceAll("\\+", "%20"))); } diff --git a/src/main/java/com/fireblocks/sdk/model/StakeRequestDto.java b/src/main/java/com/fireblocks/sdk/model/StakeRequest.java similarity index 85% rename from src/main/java/com/fireblocks/sdk/model/StakeRequestDto.java rename to src/main/java/com/fireblocks/sdk/model/StakeRequest.java index 1fde0c7..efd1d90 100644 --- a/src/main/java/com/fireblocks/sdk/model/StakeRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/StakeRequest.java @@ -21,22 +21,22 @@ import java.util.Objects; import java.util.StringJoiner; -/** StakeRequestDto */ +/** StakeRequest */ @JsonPropertyOrder({ - StakeRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, - StakeRequestDto.JSON_PROPERTY_PROVIDER_ID, - StakeRequestDto.JSON_PROPERTY_STAKE_AMOUNT, - StakeRequestDto.JSON_PROPERTY_TX_NOTE, - StakeRequestDto.JSON_PROPERTY_FEE, - StakeRequestDto.JSON_PROPERTY_FEE_LEVEL + StakeRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + StakeRequest.JSON_PROPERTY_PROVIDER_ID, + StakeRequest.JSON_PROPERTY_STAKE_AMOUNT, + StakeRequest.JSON_PROPERTY_TX_NOTE, + StakeRequest.JSON_PROPERTY_FEE, + StakeRequest.JSON_PROPERTY_FEE_LEVEL }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StakeRequestDto { +public class StakeRequest { public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; private String vaultAccountId; public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; - private String providerId; + private StakingProvider providerId; public static final String JSON_PROPERTY_STAKE_AMOUNT = "stakeAmount"; private String stakeAmount; @@ -48,11 +48,11 @@ public class StakeRequestDto { private String fee; public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; - private String feeLevel; + private FeeLevel feeLevel; - public StakeRequestDto() {} + public StakeRequest() {} - public StakeRequestDto vaultAccountId(String vaultAccountId) { + public StakeRequest vaultAccountId(String vaultAccountId) { this.vaultAccountId = vaultAccountId; return this; } @@ -75,30 +75,30 @@ public void setVaultAccountId(String vaultAccountId) { this.vaultAccountId = vaultAccountId; } - public StakeRequestDto providerId(String providerId) { + public StakeRequest providerId(StakingProvider providerId) { this.providerId = providerId; return this; } /** - * The ID of the provider + * Get providerId * * @return providerId */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderId() { + public StakingProvider getProviderId() { return providerId; } @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderId(String providerId) { + public void setProviderId(StakingProvider providerId) { this.providerId = providerId; } - public StakeRequestDto stakeAmount(String stakeAmount) { + public StakeRequest stakeAmount(String stakeAmount) { this.stakeAmount = stakeAmount; return this; } @@ -121,7 +121,7 @@ public void setStakeAmount(String stakeAmount) { this.stakeAmount = stakeAmount; } - public StakeRequestDto txNote(String txNote) { + public StakeRequest txNote(String txNote) { this.txNote = txNote; return this; } @@ -144,7 +144,7 @@ public void setTxNote(String txNote) { this.txNote = txNote; } - public StakeRequestDto fee(String fee) { + public StakeRequest fee(String fee) { this.fee = fee; return this; } @@ -168,31 +168,30 @@ public void setFee(String fee) { this.fee = fee; } - public StakeRequestDto feeLevel(String feeLevel) { + public StakeRequest feeLevel(FeeLevel feeLevel) { this.feeLevel = feeLevel; return this; } /** - * Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only - * one of fee/feeLevel is required. + * Get feeLevel * * @return feeLevel */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_FEE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFeeLevel() { + public FeeLevel getFeeLevel() { return feeLevel; } @JsonProperty(JSON_PROPERTY_FEE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFeeLevel(String feeLevel) { + public void setFeeLevel(FeeLevel feeLevel) { this.feeLevel = feeLevel; } - /** Return true if this StakeRequestDto object is equal to o. */ + /** Return true if this StakeRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -201,13 +200,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - StakeRequestDto stakeRequestDto = (StakeRequestDto) o; - return Objects.equals(this.vaultAccountId, stakeRequestDto.vaultAccountId) - && Objects.equals(this.providerId, stakeRequestDto.providerId) - && Objects.equals(this.stakeAmount, stakeRequestDto.stakeAmount) - && Objects.equals(this.txNote, stakeRequestDto.txNote) - && Objects.equals(this.fee, stakeRequestDto.fee) - && Objects.equals(this.feeLevel, stakeRequestDto.feeLevel); + StakeRequest stakeRequest = (StakeRequest) o; + return Objects.equals(this.vaultAccountId, stakeRequest.vaultAccountId) + && Objects.equals(this.providerId, stakeRequest.providerId) + && Objects.equals(this.stakeAmount, stakeRequest.stakeAmount) + && Objects.equals(this.txNote, stakeRequest.txNote) + && Objects.equals(this.fee, stakeRequest.fee) + && Objects.equals(this.feeLevel, stakeRequest.feeLevel); } @Override @@ -218,7 +217,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class StakeRequestDto {\n"); + sb.append("class StakeRequest {\n"); sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); sb.append(" stakeAmount: ").append(toIndentedString(stakeAmount)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/StakeResponseDto.java b/src/main/java/com/fireblocks/sdk/model/StakeResponse.java similarity index 89% rename from src/main/java/com/fireblocks/sdk/model/StakeResponseDto.java rename to src/main/java/com/fireblocks/sdk/model/StakeResponse.java index 27bb282..e544e3b 100644 --- a/src/main/java/com/fireblocks/sdk/model/StakeResponseDto.java +++ b/src/main/java/com/fireblocks/sdk/model/StakeResponse.java @@ -21,16 +21,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** StakeResponseDto */ -@JsonPropertyOrder({StakeResponseDto.JSON_PROPERTY_ID}) +/** StakeResponse */ +@JsonPropertyOrder({StakeResponse.JSON_PROPERTY_ID}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StakeResponseDto { +public class StakeResponse { public static final String JSON_PROPERTY_ID = "id"; private String id; - public StakeResponseDto() {} + public StakeResponse() {} - public StakeResponseDto id(String id) { + public StakeResponse id(String id) { this.id = id; return this; } @@ -53,7 +53,7 @@ public void setId(String id) { this.id = id; } - /** Return true if this StakeResponseDto object is equal to o. */ + /** Return true if this StakeResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,8 +62,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - StakeResponseDto stakeResponseDto = (StakeResponseDto) o; - return Objects.equals(this.id, stakeResponseDto.id); + StakeResponse stakeResponse = (StakeResponse) o; + return Objects.equals(this.id, stakeResponse.id); } @Override @@ -74,7 +74,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class StakeResponseDto {\n"); + sb.append("class StakeResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/StakingProvider.java b/src/main/java/com/fireblocks/sdk/model/StakingProvider.java new file mode 100644 index 0000000..d455d40 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/StakingProvider.java @@ -0,0 +1,66 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The unique identifier of the staking provider */ +public enum StakingProvider { + KILN("kiln"), + + FIGMENT("figment"), + + LIDO("lido"); + + private String value; + + StakingProvider(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StakingProvider fromValue(String value) { + for (StakingProvider b : StakingProvider.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/Status.java b/src/main/java/com/fireblocks/sdk/model/Status.java new file mode 100644 index 0000000..d123b67 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Status.java @@ -0,0 +1,253 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Status */ +@JsonPropertyOrder({Status.JSON_PROPERTY_STATUS, Status.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Status { + /** The status of the command */ + public enum StatusEnum { + WAITING_FOR_APPROVAL("WAITING_FOR_APPROVAL"), + + APPROVED("APPROVED"), + + CANCELLED("CANCELLED"), + + REJECTED("REJECTED"), + + COMPLETED("COMPLETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** The type of the command */ + public enum TypeEnum { + PAIR_API_KEY("PAIR_API_KEY"), + + UPDATE_CALLBACK_HANDLER("UPDATE_CALLBACK_HANDLER"), + + UNPAIR_API_KEY("UNPAIR_API_KEY"); + + 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 Status() {} + + public Status status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the command + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Status type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of the command + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** Return true if this Status object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Status status = (Status) o; + return Objects.equals(this.status, status.status) && Objects.equals(this.type, status.type); + } + + @Override + public int hashCode() { + return Objects.hash(status, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Status {\n"); + sb.append(" status: ").append(toIndentedString(status)).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 `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `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/TokenInfoNotFoundErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponse.java new file mode 100644 index 0000000..da35af3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponse.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokenInfoNotFoundErrorResponse */ +@JsonPropertyOrder({ + TokenInfoNotFoundErrorResponse.JSON_PROPERTY_MESSAGE, + TokenInfoNotFoundErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenInfoNotFoundErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public TokenInfoNotFoundErrorResponse() {} + + public TokenInfoNotFoundErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Not found error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public TokenInfoNotFoundErrorResponse code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this TokenInfoNotFoundErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenInfoNotFoundErrorResponse tokenInfoNotFoundErrorResponse = + (TokenInfoNotFoundErrorResponse) o; + return Objects.equals(this.message, tokenInfoNotFoundErrorResponse.message) + && Objects.equals(this.code, tokenInfoNotFoundErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenInfoNotFoundErrorResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java b/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java index 21769a7..d235016 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionOperation.java @@ -25,9 +25,11 @@ * Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks * [development * libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are - * recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain - * message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable - * messages that are not actual transactions. [Learn more about typed + * recommended for building contract call transactions. * `PROGRAM_CALL` - Execute + * multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for + * building program call transactions. Currently in beta and disabled * `TYPED_MESSAGE` - + * An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign + * specific readable messages that are not actual transactions. [Learn more about typed * messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An * off-chain message with no predefined format. Use it to sign any message with your private key, * including protocols such as blockchains and custom transaction types that are not natively @@ -41,6 +43,8 @@ public enum TransactionOperation { CONTRACT_CALL("CONTRACT_CALL"), + PROGRAM_CALL("PROGRAM_CALL"), + MINT("MINT"), RAW("RAW"), diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionReceiptResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionReceiptResponse.java new file mode 100644 index 0000000..de15c14 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransactionReceiptResponse.java @@ -0,0 +1,718 @@ +/* + * 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; + +/** TransactionReceiptResponse */ +@JsonPropertyOrder({ + TransactionReceiptResponse.JSON_PROPERTY_BLOCK_HASH, + TransactionReceiptResponse.JSON_PROPERTY_BLOCK_NUMBER, + TransactionReceiptResponse.JSON_PROPERTY_CONTRACT_ADDRESS, + TransactionReceiptResponse.JSON_PROPERTY_CUMULATIVE_GAS_USED, + TransactionReceiptResponse.JSON_PROPERTY_EFFECTIVE_GAS_PRICE, + TransactionReceiptResponse.JSON_PROPERTY_FROM, + TransactionReceiptResponse.JSON_PROPERTY_GAS_USED, + TransactionReceiptResponse.JSON_PROPERTY_LOGS, + TransactionReceiptResponse.JSON_PROPERTY_LOGS_BLOOM, + TransactionReceiptResponse.JSON_PROPERTY_STATUS, + TransactionReceiptResponse.JSON_PROPERTY_TO, + TransactionReceiptResponse.JSON_PROPERTY_TRANSACTION_HASH, + TransactionReceiptResponse.JSON_PROPERTY_TRANSACTION_INDEX, + TransactionReceiptResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TransactionReceiptResponse { + public static final String JSON_PROPERTY_BLOCK_HASH = "blockHash"; + private String blockHash; + + public static final String JSON_PROPERTY_BLOCK_NUMBER = "blockNumber"; + private Integer blockNumber; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_CUMULATIVE_GAS_USED = "cumulativeGasUsed"; + private Integer cumulativeGasUsed; + + public static final String JSON_PROPERTY_EFFECTIVE_GAS_PRICE = "effectiveGasPrice"; + private Integer effectiveGasPrice; + + public static final String JSON_PROPERTY_FROM = "from"; + private String from; + + public static final String JSON_PROPERTY_GAS_USED = "gasUsed"; + private Integer gasUsed; + + public static final String JSON_PROPERTY_LOGS = "logs"; + private List logs = new ArrayList<>(); + + public static final String JSON_PROPERTY_LOGS_BLOOM = "logsBloom"; + private String logsBloom; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public static final String JSON_PROPERTY_TO = "to"; + private String to; + + public static final String JSON_PROPERTY_TRANSACTION_HASH = "transactionHash"; + private String transactionHash; + + public static final String JSON_PROPERTY_TRANSACTION_INDEX = "transactionIndex"; + private Integer transactionIndex; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public TransactionReceiptResponse() {} + + public TransactionReceiptResponse blockHash(String blockHash) { + this.blockHash = blockHash; + return this; + } + + /** + * The block hash + * + * @return blockHash + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCK_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockHash() { + return blockHash; + } + + @JsonProperty(JSON_PROPERTY_BLOCK_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockHash(String blockHash) { + this.blockHash = blockHash; + } + + public TransactionReceiptResponse blockNumber(Integer blockNumber) { + this.blockNumber = blockNumber; + return this; + } + + /** + * The block number + * + * @return blockNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getBlockNumber() { + return blockNumber; + } + + @JsonProperty(JSON_PROPERTY_BLOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockNumber(Integer blockNumber) { + this.blockNumber = blockNumber; + } + + public TransactionReceiptResponse contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The address of deployed contract + * + * @return contractAddress + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public TransactionReceiptResponse cumulativeGasUsed(Integer cumulativeGasUsed) { + this.cumulativeGasUsed = cumulativeGasUsed; + return this; + } + + /** + * The cumulative gas used in the transaction + * + * @return cumulativeGasUsed + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CUMULATIVE_GAS_USED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getCumulativeGasUsed() { + return cumulativeGasUsed; + } + + @JsonProperty(JSON_PROPERTY_CUMULATIVE_GAS_USED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCumulativeGasUsed(Integer cumulativeGasUsed) { + this.cumulativeGasUsed = cumulativeGasUsed; + } + + public TransactionReceiptResponse effectiveGasPrice(Integer effectiveGasPrice) { + this.effectiveGasPrice = effectiveGasPrice; + return this; + } + + /** + * The effective gas price + * + * @return effectiveGasPrice + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EFFECTIVE_GAS_PRICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getEffectiveGasPrice() { + return effectiveGasPrice; + } + + @JsonProperty(JSON_PROPERTY_EFFECTIVE_GAS_PRICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEffectiveGasPrice(Integer effectiveGasPrice) { + this.effectiveGasPrice = effectiveGasPrice; + } + + public TransactionReceiptResponse from(String from) { + this.from = from; + return this; + } + + /** + * Sender address + * + * @return from + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFrom() { + return from; + } + + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFrom(String from) { + this.from = from; + } + + public TransactionReceiptResponse gasUsed(Integer gasUsed) { + this.gasUsed = gasUsed; + return this; + } + + /** + * Gas used by the transaction + * + * @return gasUsed + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_GAS_USED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getGasUsed() { + return gasUsed; + } + + @JsonProperty(JSON_PROPERTY_GAS_USED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setGasUsed(Integer gasUsed) { + this.gasUsed = gasUsed; + } + + public TransactionReceiptResponse logs(List logs) { + this.logs = logs; + return this; + } + + public TransactionReceiptResponse addLogsItem(TxLog logsItem) { + if (this.logs == null) { + this.logs = new ArrayList<>(); + } + this.logs.add(logsItem); + return this; + } + + /** + * Array of transaction logs + * + * @return logs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLogs() { + return logs; + } + + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLogs(List logs) { + this.logs = logs; + } + + public TransactionReceiptResponse logsBloom(String logsBloom) { + this.logsBloom = logsBloom; + return this; + } + + /** + * Logs bloom filter + * + * @return logsBloom + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOGS_BLOOM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLogsBloom() { + return logsBloom; + } + + @JsonProperty(JSON_PROPERTY_LOGS_BLOOM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLogsBloom(String logsBloom) { + this.logsBloom = logsBloom; + } + + public TransactionReceiptResponse status(Integer status) { + this.status = status; + return this; + } + + /** + * Transaction status (1 for success, 0 for failure) + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(Integer status) { + this.status = status; + } + + public TransactionReceiptResponse to(String to) { + this.to = to; + return this; + } + + /** + * Recipient address + * + * @return to + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTo() { + return to; + } + + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTo(String to) { + this.to = to; + } + + public TransactionReceiptResponse transactionHash(String transactionHash) { + this.transactionHash = transactionHash; + return this; + } + + /** + * The transaction hash + * + * @return transactionHash + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTransactionHash() { + return transactionHash; + } + + @JsonProperty(JSON_PROPERTY_TRANSACTION_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionHash(String transactionHash) { + this.transactionHash = transactionHash; + } + + public TransactionReceiptResponse transactionIndex(Integer transactionIndex) { + this.transactionIndex = transactionIndex; + return this; + } + + /** + * Transaction index in the block + * + * @return transactionIndex + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTransactionIndex() { + return transactionIndex; + } + + @JsonProperty(JSON_PROPERTY_TRANSACTION_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionIndex(Integer transactionIndex) { + this.transactionIndex = transactionIndex; + } + + public TransactionReceiptResponse type(String type) { + this.type = type; + return this; + } + + /** + * Type of transaction + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + /** Return true if this TransactionReceiptResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransactionReceiptResponse transactionReceiptResponse = (TransactionReceiptResponse) o; + return Objects.equals(this.blockHash, transactionReceiptResponse.blockHash) + && Objects.equals(this.blockNumber, transactionReceiptResponse.blockNumber) + && Objects.equals(this.contractAddress, transactionReceiptResponse.contractAddress) + && Objects.equals( + this.cumulativeGasUsed, transactionReceiptResponse.cumulativeGasUsed) + && Objects.equals( + this.effectiveGasPrice, transactionReceiptResponse.effectiveGasPrice) + && Objects.equals(this.from, transactionReceiptResponse.from) + && Objects.equals(this.gasUsed, transactionReceiptResponse.gasUsed) + && Objects.equals(this.logs, transactionReceiptResponse.logs) + && Objects.equals(this.logsBloom, transactionReceiptResponse.logsBloom) + && Objects.equals(this.status, transactionReceiptResponse.status) + && Objects.equals(this.to, transactionReceiptResponse.to) + && Objects.equals(this.transactionHash, transactionReceiptResponse.transactionHash) + && Objects.equals( + this.transactionIndex, transactionReceiptResponse.transactionIndex) + && Objects.equals(this.type, transactionReceiptResponse.type); + } + + @Override + public int hashCode() { + return Objects.hash( + blockHash, + blockNumber, + contractAddress, + cumulativeGasUsed, + effectiveGasPrice, + from, + gasUsed, + logs, + logsBloom, + status, + to, + transactionHash, + transactionIndex, + type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransactionReceiptResponse {\n"); + sb.append(" blockHash: ").append(toIndentedString(blockHash)).append("\n"); + sb.append(" blockNumber: ").append(toIndentedString(blockNumber)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" cumulativeGasUsed: ") + .append(toIndentedString(cumulativeGasUsed)) + .append("\n"); + sb.append(" effectiveGasPrice: ") + .append(toIndentedString(effectiveGasPrice)) + .append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" gasUsed: ").append(toIndentedString(gasUsed)).append("\n"); + sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); + sb.append(" logsBloom: ").append(toIndentedString(logsBloom)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" transactionHash: ").append(toIndentedString(transactionHash)).append("\n"); + sb.append(" transactionIndex: ").append(toIndentedString(transactionIndex)).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 `blockHash` to the URL query string + if (getBlockHash() != null) { + joiner.add( + String.format( + "%sblockHash%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockHash()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockNumber` to the URL query string + if (getBlockNumber() != null) { + joiner.add( + String.format( + "%sblockNumber%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockNumber()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractAddress` to the URL query string + if (getContractAddress() != null) { + joiner.add( + String.format( + "%scontractAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `cumulativeGasUsed` to the URL query string + if (getCumulativeGasUsed() != null) { + joiner.add( + String.format( + "%scumulativeGasUsed%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCumulativeGasUsed()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `effectiveGasPrice` to the URL query string + if (getEffectiveGasPrice() != null) { + joiner.add( + String.format( + "%seffectiveGasPrice%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getEffectiveGasPrice()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `from` to the URL query string + if (getFrom() != null) { + joiner.add( + String.format( + "%sfrom%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFrom()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `gasUsed` to the URL query string + if (getGasUsed() != null) { + joiner.add( + String.format( + "%sgasUsed%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getGasUsed()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `logs` to the URL query string + if (getLogs() != null) { + for (int i = 0; i < getLogs().size(); i++) { + if (getLogs().get(i) != null) { + joiner.add( + getLogs() + .get(i) + .toUrlQueryString( + String.format( + "%slogs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `logsBloom` to the URL query string + if (getLogsBloom() != null) { + joiner.add( + String.format( + "%slogsBloom%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getLogsBloom()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `to` to the URL query string + if (getTo() != null) { + joiner.add( + String.format( + "%sto%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTo()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `transactionHash` to the URL query string + if (getTransactionHash() != null) { + joiner.add( + String.format( + "%stransactionHash%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTransactionHash()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `transactionIndex` to the URL query string + if (getTransactionIndex() != null) { + joiner.add( + String.format( + "%stransactionIndex%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTransactionIndex()), + 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/TransferPeerPathType.java b/src/main/java/com/fireblocks/sdk/model/TransferPeerPathType.java index 18854d4..d5e18f5 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransferPeerPathType.java +++ b/src/main/java/com/fireblocks/sdk/model/TransferPeerPathType.java @@ -40,7 +40,9 @@ public enum TransferPeerPathType { UNKNOWN("UNKNOWN"), - END_USER_WALLET("END_USER_WALLET"); + END_USER_WALLET("END_USER_WALLET"), + + PROGRAM_CALL("PROGRAM_CALL"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/TxLog.java b/src/main/java/com/fireblocks/sdk/model/TxLog.java new file mode 100644 index 0000000..c7c6587 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TxLog.java @@ -0,0 +1,495 @@ +/* + * 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; + +/** TxLog */ +@JsonPropertyOrder({ + TxLog.JSON_PROPERTY_ADDRESS, + TxLog.JSON_PROPERTY_TOPICS, + TxLog.JSON_PROPERTY_DATA, + TxLog.JSON_PROPERTY_BLOCK_NUMBER, + TxLog.JSON_PROPERTY_TRANSACTION_HASH, + TxLog.JSON_PROPERTY_TRANSACTION_INDEX, + TxLog.JSON_PROPERTY_BLOCK_HASH, + TxLog.JSON_PROPERTY_LOG_INDEX, + TxLog.JSON_PROPERTY_REMOVED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TxLog { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_TOPICS = "topics"; + private List topics = new ArrayList<>(); + + public static final String JSON_PROPERTY_DATA = "data"; + private String data; + + public static final String JSON_PROPERTY_BLOCK_NUMBER = "blockNumber"; + private Integer blockNumber; + + public static final String JSON_PROPERTY_TRANSACTION_HASH = "transactionHash"; + private String transactionHash; + + public static final String JSON_PROPERTY_TRANSACTION_INDEX = "transactionIndex"; + private Integer transactionIndex; + + public static final String JSON_PROPERTY_BLOCK_HASH = "blockHash"; + private String blockHash; + + public static final String JSON_PROPERTY_LOG_INDEX = "logIndex"; + private Integer logIndex; + + public static final String JSON_PROPERTY_REMOVED = "removed"; + private Boolean removed; + + public TxLog() {} + + public TxLog address(String address) { + this.address = address; + return this; + } + + /** + * The log address + * + * @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; + } + + public TxLog topics(List topics) { + this.topics = topics; + return this; + } + + public TxLog addTopicsItem(String topicsItem) { + if (this.topics == null) { + this.topics = new ArrayList<>(); + } + this.topics.add(topicsItem); + return this; + } + + /** + * Array of log topics + * + * @return topics + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTopics() { + return topics; + } + + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTopics(List topics) { + this.topics = topics; + } + + public TxLog data(String data) { + this.data = data; + return this; + } + + /** + * The log data + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(String data) { + this.data = data; + } + + public TxLog blockNumber(Integer blockNumber) { + this.blockNumber = blockNumber; + return this; + } + + /** + * Block number where the log occurred + * + * @return blockNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getBlockNumber() { + return blockNumber; + } + + @JsonProperty(JSON_PROPERTY_BLOCK_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockNumber(Integer blockNumber) { + this.blockNumber = blockNumber; + } + + public TxLog transactionHash(String transactionHash) { + this.transactionHash = transactionHash; + return this; + } + + /** + * Transaction hash associated with the log + * + * @return transactionHash + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTransactionHash() { + return transactionHash; + } + + @JsonProperty(JSON_PROPERTY_TRANSACTION_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionHash(String transactionHash) { + this.transactionHash = transactionHash; + } + + public TxLog transactionIndex(Integer transactionIndex) { + this.transactionIndex = transactionIndex; + return this; + } + + /** + * Transaction index in the block + * + * @return transactionIndex + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRANSACTION_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTransactionIndex() { + return transactionIndex; + } + + @JsonProperty(JSON_PROPERTY_TRANSACTION_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTransactionIndex(Integer transactionIndex) { + this.transactionIndex = transactionIndex; + } + + public TxLog blockHash(String blockHash) { + this.blockHash = blockHash; + return this; + } + + /** + * The hash of the block + * + * @return blockHash + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCK_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockHash() { + return blockHash; + } + + @JsonProperty(JSON_PROPERTY_BLOCK_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockHash(String blockHash) { + this.blockHash = blockHash; + } + + public TxLog logIndex(Integer logIndex) { + this.logIndex = logIndex; + return this; + } + + /** + * Log index in the block + * + * @return logIndex + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LOG_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getLogIndex() { + return logIndex; + } + + @JsonProperty(JSON_PROPERTY_LOG_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLogIndex(Integer logIndex) { + this.logIndex = logIndex; + } + + public TxLog removed(Boolean removed) { + this.removed = removed; + return this; + } + + /** + * Indicates if the log was removed + * + * @return removed + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REMOVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRemoved() { + return removed; + } + + @JsonProperty(JSON_PROPERTY_REMOVED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRemoved(Boolean removed) { + this.removed = removed; + } + + /** Return true if this TxLog object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TxLog txLog = (TxLog) o; + return Objects.equals(this.address, txLog.address) + && Objects.equals(this.topics, txLog.topics) + && Objects.equals(this.data, txLog.data) + && Objects.equals(this.blockNumber, txLog.blockNumber) + && Objects.equals(this.transactionHash, txLog.transactionHash) + && Objects.equals(this.transactionIndex, txLog.transactionIndex) + && Objects.equals(this.blockHash, txLog.blockHash) + && Objects.equals(this.logIndex, txLog.logIndex) + && Objects.equals(this.removed, txLog.removed); + } + + @Override + public int hashCode() { + return Objects.hash( + address, + topics, + data, + blockNumber, + transactionHash, + transactionIndex, + blockHash, + logIndex, + removed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TxLog {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" blockNumber: ").append(toIndentedString(blockNumber)).append("\n"); + sb.append(" transactionHash: ").append(toIndentedString(transactionHash)).append("\n"); + sb.append(" transactionIndex: ").append(toIndentedString(transactionIndex)).append("\n"); + sb.append(" blockHash: ").append(toIndentedString(blockHash)).append("\n"); + sb.append(" logIndex: ").append(toIndentedString(logIndex)).append("\n"); + sb.append(" removed: ").append(toIndentedString(removed)).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 `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 `topics` to the URL query string + if (getTopics() != null) { + for (int i = 0; i < getTopics().size(); i++) { + joiner.add( + String.format( + "%stopics%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTopics().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `data` to the URL query string + if (getData() != null) { + joiner.add( + String.format( + "%sdata%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getData()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockNumber` to the URL query string + if (getBlockNumber() != null) { + joiner.add( + String.format( + "%sblockNumber%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockNumber()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `transactionHash` to the URL query string + if (getTransactionHash() != null) { + joiner.add( + String.format( + "%stransactionHash%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTransactionHash()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `transactionIndex` to the URL query string + if (getTransactionIndex() != null) { + joiner.add( + String.format( + "%stransactionIndex%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTransactionIndex()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockHash` to the URL query string + if (getBlockHash() != null) { + joiner.add( + String.format( + "%sblockHash%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockHash()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `logIndex` to the URL query string + if (getLogIndex() != null) { + joiner.add( + String.format( + "%slogIndex%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLogIndex()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `removed` to the URL query string + if (getRemoved() != null) { + joiner.add( + String.format( + "%sremoved%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRemoved()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java b/src/main/java/com/fireblocks/sdk/model/UnstakeRequest.java similarity index 85% rename from src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java rename to src/main/java/com/fireblocks/sdk/model/UnstakeRequest.java index 500dc08..30a79d4 100644 --- a/src/main/java/com/fireblocks/sdk/model/UnstakeRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/UnstakeRequest.java @@ -21,16 +21,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** UnstakeRequestDto */ +/** UnstakeRequest */ @JsonPropertyOrder({ - UnstakeRequestDto.JSON_PROPERTY_ID, - UnstakeRequestDto.JSON_PROPERTY_FEE, - UnstakeRequestDto.JSON_PROPERTY_FEE_LEVEL, - UnstakeRequestDto.JSON_PROPERTY_TX_NOTE, - UnstakeRequestDto.JSON_PROPERTY_AMOUNT + UnstakeRequest.JSON_PROPERTY_ID, + UnstakeRequest.JSON_PROPERTY_FEE, + UnstakeRequest.JSON_PROPERTY_FEE_LEVEL, + UnstakeRequest.JSON_PROPERTY_TX_NOTE, + UnstakeRequest.JSON_PROPERTY_AMOUNT }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UnstakeRequestDto { +public class UnstakeRequest { public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -38,7 +38,7 @@ public class UnstakeRequestDto { private String fee; public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; - private String feeLevel; + private FeeLevel feeLevel; public static final String JSON_PROPERTY_TX_NOTE = "txNote"; private String txNote; @@ -46,9 +46,9 @@ public class UnstakeRequestDto { public static final String JSON_PROPERTY_AMOUNT = "amount"; private String amount; - public UnstakeRequestDto() {} + public UnstakeRequest() {} - public UnstakeRequestDto id(String id) { + public UnstakeRequest id(String id) { this.id = id; return this; } @@ -71,7 +71,7 @@ public void setId(String id) { this.id = id; } - public UnstakeRequestDto fee(String fee) { + public UnstakeRequest fee(String fee) { this.fee = fee; return this; } @@ -95,31 +95,30 @@ public void setFee(String fee) { this.fee = fee; } - public UnstakeRequestDto feeLevel(String feeLevel) { + public UnstakeRequest feeLevel(FeeLevel feeLevel) { this.feeLevel = feeLevel; return this; } /** - * Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only - * one of fee/feeLevel is required. + * Get feeLevel * * @return feeLevel */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_FEE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFeeLevel() { + public FeeLevel getFeeLevel() { return feeLevel; } @JsonProperty(JSON_PROPERTY_FEE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFeeLevel(String feeLevel) { + public void setFeeLevel(FeeLevel feeLevel) { this.feeLevel = feeLevel; } - public UnstakeRequestDto txNote(String txNote) { + public UnstakeRequest txNote(String txNote) { this.txNote = txNote; return this; } @@ -142,7 +141,7 @@ public void setTxNote(String txNote) { this.txNote = txNote; } - public UnstakeRequestDto amount(String amount) { + public UnstakeRequest amount(String amount) { this.amount = amount; return this; } @@ -167,7 +166,7 @@ public void setAmount(String amount) { this.amount = amount; } - /** Return true if this UnstakeRequestDto object is equal to o. */ + /** Return true if this UnstakeRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -176,12 +175,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UnstakeRequestDto unstakeRequestDto = (UnstakeRequestDto) o; - return Objects.equals(this.id, unstakeRequestDto.id) - && Objects.equals(this.fee, unstakeRequestDto.fee) - && Objects.equals(this.feeLevel, unstakeRequestDto.feeLevel) - && Objects.equals(this.txNote, unstakeRequestDto.txNote) - && Objects.equals(this.amount, unstakeRequestDto.amount); + UnstakeRequest unstakeRequest = (UnstakeRequest) o; + return Objects.equals(this.id, unstakeRequest.id) + && Objects.equals(this.fee, unstakeRequest.fee) + && Objects.equals(this.feeLevel, unstakeRequest.feeLevel) + && Objects.equals(this.txNote, unstakeRequest.txNote) + && Objects.equals(this.amount, unstakeRequest.amount); } @Override @@ -192,7 +191,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UnstakeRequestDto {\n"); + sb.append("class UnstakeRequest {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java new file mode 100644 index 0000000..a650044 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequest.java @@ -0,0 +1,132 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import java.util.StringJoiner; + +/** UpdateCallbackHandlerRequest */ +@JsonPropertyOrder({UpdateCallbackHandlerRequest.JSON_PROPERTY_CALLBACK_HANDLER}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCallbackHandlerRequest { + public static final String JSON_PROPERTY_CALLBACK_HANDLER = "callbackHandler"; + private CallbackHandlerRequest callbackHandler; + + public UpdateCallbackHandlerRequest() {} + + public UpdateCallbackHandlerRequest callbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + return this; + } + + /** + * Get callbackHandler + * + * @return callbackHandler + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CallbackHandlerRequest getCallbackHandler() { + return callbackHandler; + } + + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + } + + /** Return true if this UpdateCallbackHandlerRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCallbackHandlerRequest updateCallbackHandlerRequest = + (UpdateCallbackHandlerRequest) o; + return Objects.equals(this.callbackHandler, updateCallbackHandlerRequest.callbackHandler); + } + + @Override + public int hashCode() { + return Objects.hash(callbackHandler); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCallbackHandlerRequest {\n"); + sb.append(" callbackHandler: ").append(toIndentedString(callbackHandler)).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 `callbackHandler` to the URL query string + if (getCallbackHandler() != null) { + joiner.add(getCallbackHandler().toUrlQueryString(prefix + "callbackHandler" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java b/src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.java new file mode 100644 index 0000000..29902d9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponse.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; +import java.util.UUID; + +/** UpdateCallbackHandlerResponse */ +@JsonPropertyOrder({ + UpdateCallbackHandlerResponse.JSON_PROPERTY_ID, + UpdateCallbackHandlerResponse.JSON_PROPERTY_CALLBACK_HANDLER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCallbackHandlerResponse { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_CALLBACK_HANDLER = "callbackHandler"; + private CallbackHandlerRequest callbackHandler; + + public UpdateCallbackHandlerResponse() {} + + public UpdateCallbackHandlerResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the API key + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(UUID id) { + this.id = id; + } + + public UpdateCallbackHandlerResponse callbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + return this; + } + + /** + * Get callbackHandler + * + * @return callbackHandler + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CallbackHandlerRequest getCallbackHandler() { + return callbackHandler; + } + + @JsonProperty(JSON_PROPERTY_CALLBACK_HANDLER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCallbackHandler(CallbackHandlerRequest callbackHandler) { + this.callbackHandler = callbackHandler; + } + + /** Return true if this UpdateCallbackHandlerResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCallbackHandlerResponse updateCallbackHandlerResponse = + (UpdateCallbackHandlerResponse) o; + return Objects.equals(this.id, updateCallbackHandlerResponse.id) + && Objects.equals( + this.callbackHandler, updateCallbackHandlerResponse.callbackHandler); + } + + @Override + public int hashCode() { + return Objects.hash(id, callbackHandler); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCallbackHandlerResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" callbackHandler: ").append(toIndentedString(callbackHandler)).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 `callbackHandler` to the URL query string + if (getCallbackHandler() != null) { + joiner.add(getCallbackHandler().toUrlQueryString(prefix + "callbackHandler" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java new file mode 100644 index 0000000..37a67af --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/UpdateWebhookRequest.java @@ -0,0 +1,283 @@ +/* + * 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; + +/** UpdateWebhookRequest */ +@JsonPropertyOrder({ + UpdateWebhookRequest.JSON_PROPERTY_URL, + UpdateWebhookRequest.JSON_PROPERTY_DESCRIPTION, + UpdateWebhookRequest.JSON_PROPERTY_EVENTS, + UpdateWebhookRequest.JSON_PROPERTY_ENABLED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateWebhookRequest { + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public UpdateWebhookRequest() {} + + public UpdateWebhookRequest url(String url) { + this.url = url; + return this; + } + + /** + * The url of the webhook where notifications will be sent. URL must be valid, unique and https. + * + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(String url) { + this.url = url; + } + + public UpdateWebhookRequest description(String description) { + this.description = description; + return this; + } + + /** + * description of the webhook of what it is used for.should not contain special characters. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + public UpdateWebhookRequest events(List events) { + this.events = events; + return this; + } + + public UpdateWebhookRequest addEventsItem(WebhookEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * The events that the webhook will be subscribed to + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } + + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvents(List events) { + this.events = events; + } + + public UpdateWebhookRequest enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The status of the webhook + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** Return true if this UpdateWebhookRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateWebhookRequest updateWebhookRequest = (UpdateWebhookRequest) o; + return Objects.equals(this.url, updateWebhookRequest.url) + && Objects.equals(this.description, updateWebhookRequest.description) + && Objects.equals(this.events, updateWebhookRequest.events) + && Objects.equals(this.enabled, updateWebhookRequest.enabled); + } + + @Override + public int hashCode() { + return Objects.hash(url, description, events, enabled); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateWebhookRequest {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `events` to the URL query string + if (getEvents() != null) { + for (int i = 0; i < getEvents().size(); i++) { + if (getEvents().get(i) != null) { + joiner.add( + String.format( + "%sevents%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getEvents().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `enabled` to the URL query string + if (getEnabled() != null) { + joiner.add( + String.format( + "%senabled%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEnabled()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ValidatorDto.java b/src/main/java/com/fireblocks/sdk/model/Validator.java similarity index 71% rename from src/main/java/com/fireblocks/sdk/model/ValidatorDto.java rename to src/main/java/com/fireblocks/sdk/model/Validator.java index 26748f9..2ef3371 100644 --- a/src/main/java/com/fireblocks/sdk/model/ValidatorDto.java +++ b/src/main/java/com/fireblocks/sdk/model/Validator.java @@ -22,22 +22,26 @@ import java.util.Objects; import java.util.StringJoiner; -/** ValidatorDto */ +/** Validator */ @JsonPropertyOrder({ - ValidatorDto.JSON_PROPERTY_CHAIN_DESCRIPTOR, - ValidatorDto.JSON_PROPERTY_FEE_PERCENT + Validator.JSON_PROPERTY_CHAIN_DESCRIPTOR, + Validator.JSON_PROPERTY_FEE_PERCENT, + Validator.JSON_PROPERTY_IS_PRIVATE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ValidatorDto { +public class Validator { public static final String JSON_PROPERTY_CHAIN_DESCRIPTOR = "chainDescriptor"; private String chainDescriptor; public static final String JSON_PROPERTY_FEE_PERCENT = "feePercent"; private BigDecimal feePercent; - public ValidatorDto() {} + public static final String JSON_PROPERTY_IS_PRIVATE = "isPrivate"; + private Boolean isPrivate; - public ValidatorDto chainDescriptor(String chainDescriptor) { + public Validator() {} + + public Validator chainDescriptor(String chainDescriptor) { this.chainDescriptor = chainDescriptor; return this; } @@ -60,7 +64,7 @@ public void setChainDescriptor(String chainDescriptor) { this.chainDescriptor = chainDescriptor; } - public ValidatorDto feePercent(BigDecimal feePercent) { + public Validator feePercent(BigDecimal feePercent) { this.feePercent = feePercent; return this; } @@ -83,7 +87,30 @@ public void setFeePercent(BigDecimal feePercent) { this.feePercent = feePercent; } - /** Return true if this ValidatorDto object is equal to o. */ + public Validator isPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + return this; + } + + /** + * Is the validator private, i.e created by the user + * + * @return isPrivate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_PRIVATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsPrivate() { + return isPrivate; + } + + @JsonProperty(JSON_PROPERTY_IS_PRIVATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + } + + /** Return true if this Validator object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -92,22 +119,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ValidatorDto validatorDto = (ValidatorDto) o; - return Objects.equals(this.chainDescriptor, validatorDto.chainDescriptor) - && Objects.equals(this.feePercent, validatorDto.feePercent); + Validator validator = (Validator) o; + return Objects.equals(this.chainDescriptor, validator.chainDescriptor) + && Objects.equals(this.feePercent, validator.feePercent) + && Objects.equals(this.isPrivate, validator.isPrivate); } @Override public int hashCode() { - return Objects.hash(chainDescriptor, feePercent); + return Objects.hash(chainDescriptor, feePercent, isPrivate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ValidatorDto {\n"); + sb.append("class Validator {\n"); sb.append(" chainDescriptor: ").append(toIndentedString(chainDescriptor)).append("\n"); sb.append(" feePercent: ").append(toIndentedString(feePercent)).append("\n"); + sb.append(" isPrivate: ").append(toIndentedString(isPrivate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -180,6 +209,18 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `isPrivate` to the URL query string + if (getIsPrivate() != null) { + joiner.add( + String.format( + "%sisPrivate%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIsPrivate()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/Version.java b/src/main/java/com/fireblocks/sdk/model/Version.java new file mode 100644 index 0000000..ce6b435 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Version.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Version */ +@JsonPropertyOrder({Version.JSON_PROPERTY_HASH}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Version { + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; + + public Version() {} + + public Version hash(String hash) { + this.hash = hash; + return this; + } + + /** + * The version hash of the cosigner + * + * @return hash + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHash() { + return hash; + } + + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHash(String hash) { + this.hash = hash; + } + + /** Return true if this Version object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Version version = (Version) o; + return Objects.equals(this.hash, version.hash); + } + + @Override + public int hashCode() { + return Objects.hash(hash); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Version {\n"); + sb.append(" hash: ").append(toIndentedString(hash)).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 `hash` to the URL query string + if (getHash() != null) { + joiner.add( + String.format( + "%shash%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getHash()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Webhook.java b/src/main/java/com/fireblocks/sdk/model/Webhook.java new file mode 100644 index 0000000..7fb80b0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Webhook.java @@ -0,0 +1,442 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** Webhook */ +@JsonPropertyOrder({ + Webhook.JSON_PROPERTY_ID, + Webhook.JSON_PROPERTY_URL, + Webhook.JSON_PROPERTY_DESCRIPTION, + Webhook.JSON_PROPERTY_EVENTS, + Webhook.JSON_PROPERTY_STATUS, + Webhook.JSON_PROPERTY_CREATED_AT, + Webhook.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Webhook { + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events; + + /** The status of the webhook */ + public enum StatusEnum { + DISABLED("DISABLED"), + + ENABLED("ENABLED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + public Webhook() {} + + public Webhook id(UUID id) { + this.id = id; + return this; + } + + /** + * The id of the webhook + * + * @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 Webhook url(String url) { + this.url = url; + return this; + } + + /** + * The url of the webhook where notifications will be sent. Must be a valid URL and https. + * + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(String url) { + this.url = url; + } + + public Webhook description(String description) { + this.description = description; + return this; + } + + /** + * description of the webhook of what it is used for + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + public Webhook events(List events) { + this.events = events; + return this; + } + + public Webhook addEventsItem(WebhookEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * The events that the webhook will be subscribed to + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } + + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvents(List events) { + this.events = events; + } + + public Webhook status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the webhook + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Webhook createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The date and time the webhook was created + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public Webhook updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The date and time the webhook was last updated + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** Return true if this Webhook object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Webhook webhook = (Webhook) o; + return Objects.equals(this.id, webhook.id) + && Objects.equals(this.url, webhook.url) + && Objects.equals(this.description, webhook.description) + && Objects.equals(this.events, webhook.events) + && Objects.equals(this.status, webhook.status) + && Objects.equals(this.createdAt, webhook.createdAt) + && Objects.equals(this.updatedAt, webhook.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, url, description, events, status, createdAt, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Webhook {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUrl()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `events` to the URL query string + if (getEvents() != null) { + for (int i = 0; i < getEvents().size(); i++) { + if (getEvents().get(i) != null) { + joiner.add( + String.format( + "%sevents%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getEvents().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCreatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUpdatedAt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java new file mode 100644 index 0000000..a358d46 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java @@ -0,0 +1,130 @@ +/* + * 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; + +/** Gets or Sets WebhookEvent */ +public enum WebhookEvent { + TRANSACTION_CREATED("transaction.created"), + + TRANSACTION_STATUS_UPDATED("transaction.status.updated"), + + TRANSACTION_APPROVAL_STATUS_UPDATED("transaction.approval_status.updated"), + + EXTERNAL_WALLET_ASSET_ADDED("external_wallet.asset.added"), + + INTERNAL_WALLET_ASSET_ADDED("internal_wallet.asset.added"), + + INTERNAL_WALLET_ASSET_REMOVED("internal_wallet.asset.removed"), + + CONTRACT_WALLET_ASSET_ADDED("contract_wallet.asset.added"), + + CONTRACT_WALLET_ASSET_REMOVED("contract_wallet.asset.removed"), + + VAULT_ACCOUNT_CREATED("vault_account.created"), + + VAULT_ACCOUNT_ASSET_ADDED("vault_account.asset.added"), + + VAULT_ACCOUNT_ASSET_BALANCE_UPDATED("vault_account.asset.balance_updated"), + + VAULT_ACCOUNT_NFT_BALANCE_UPDATED("vault_account.nft.balance_updated"), + + EMBEDDED_WALLET_ASSET_ADDED("embedded_wallet.asset.added"), + + EMBEDDED_WALLET_ASSET_BALANCE_UPDATED("embedded_wallet.asset.balance_updated"), + + EXCHANGE_ACCOUNT_ADDED("exchange_account.added"), + + FIAT_ACCOUNT_ADDED("fiat_account.added"), + + TICKET_CREATED("ticket.created"), + + TICKET_SUBMITTED("ticket.submitted"), + + TICKET_EXPIRED("ticket.expired"), + + TICKET_CANCELED("ticket.canceled"), + + TICKET_FULFILLED("ticket.fulfilled"), + + TICKET_COUNTERPARTY_ADDED("ticket.counterparty.added"), + + TICKET_COUNTERPARTY_EXTERNAL_ID_SET("ticket.counterparty_external_id.set"), + + TICKET_NOTE_ADDED("ticket.note.added"), + + TICKET_EXPIRED_IN_SET("ticket.expired_in.set"), + + TICKET_EXPIRED_AT_SET("ticket.expired_at.set"), + + TICKET_TERM_ADDED("ticket.term.added"), + + TICKET_TERM_UPDATED("ticket.term.updated"), + + TICKET_TERM_DELETED("ticket.term.deleted"), + + TICKET_TERM_FUNDED("ticket.term.funded"), + + TICKET_TERM_MANUALLY_FUNDED("ticket.term.manually_funded"), + + TICKET_TERM_FUNDING_CANCELED("ticket.term.funding_canceled"), + + TICKET_TERM_FUNDING_FAILED("ticket.term.funding_failed"), + + TICKET_TERM_FUNDING_COMPLETED("ticket.term.funding_completed"), + + TICKET_TERM_TRANSACTION_STATUS_CHANGED("ticket.term.transaction_status_changed"); + + private String value; + + WebhookEvent(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static WebhookEvent fromValue(String value) { + for (WebhookEvent b : WebhookEvent.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/WebhookPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java new file mode 100644 index 0000000..69f4c9d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** WebhookPaginatedResponse */ +@JsonPropertyOrder({ + WebhookPaginatedResponse.JSON_PROPERTY_DATA, + WebhookPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WebhookPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public WebhookPaginatedResponse() {} + + public WebhookPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public WebhookPaginatedResponse addDataItem(Webhook dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public WebhookPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this WebhookPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebhookPaginatedResponse webhookPaginatedResponse = (WebhookPaginatedResponse) o; + return Objects.equals(this.data, webhookPaginatedResponse.data) + && Objects.equals(this.next, webhookPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WebhookPaginatedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WithdrawRequestDto.java b/src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java similarity index 85% rename from src/main/java/com/fireblocks/sdk/model/WithdrawRequestDto.java rename to src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java index 3516ad8..cff6be6 100644 --- a/src/main/java/com/fireblocks/sdk/model/WithdrawRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java @@ -21,15 +21,15 @@ import java.util.Objects; import java.util.StringJoiner; -/** WithdrawRequestDto */ +/** WithdrawRequest */ @JsonPropertyOrder({ - WithdrawRequestDto.JSON_PROPERTY_ID, - WithdrawRequestDto.JSON_PROPERTY_FEE, - WithdrawRequestDto.JSON_PROPERTY_FEE_LEVEL, - WithdrawRequestDto.JSON_PROPERTY_TX_NOTE + WithdrawRequest.JSON_PROPERTY_ID, + WithdrawRequest.JSON_PROPERTY_FEE, + WithdrawRequest.JSON_PROPERTY_FEE_LEVEL, + WithdrawRequest.JSON_PROPERTY_TX_NOTE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WithdrawRequestDto { +public class WithdrawRequest { public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -37,14 +37,14 @@ public class WithdrawRequestDto { private String fee; public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; - private String feeLevel; + private FeeLevel feeLevel; public static final String JSON_PROPERTY_TX_NOTE = "txNote"; private String txNote; - public WithdrawRequestDto() {} + public WithdrawRequest() {} - public WithdrawRequestDto id(String id) { + public WithdrawRequest id(String id) { this.id = id; return this; } @@ -67,7 +67,7 @@ public void setId(String id) { this.id = id; } - public WithdrawRequestDto fee(String fee) { + public WithdrawRequest fee(String fee) { this.fee = fee; return this; } @@ -91,31 +91,30 @@ public void setFee(String fee) { this.fee = fee; } - public WithdrawRequestDto feeLevel(String feeLevel) { + public WithdrawRequest feeLevel(FeeLevel feeLevel) { this.feeLevel = feeLevel; return this; } /** - * Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only - * one of fee/feeLevel is required. + * Get feeLevel * * @return feeLevel */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_FEE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFeeLevel() { + public FeeLevel getFeeLevel() { return feeLevel; } @JsonProperty(JSON_PROPERTY_FEE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFeeLevel(String feeLevel) { + public void setFeeLevel(FeeLevel feeLevel) { this.feeLevel = feeLevel; } - public WithdrawRequestDto txNote(String txNote) { + public WithdrawRequest txNote(String txNote) { this.txNote = txNote; return this; } @@ -138,7 +137,7 @@ public void setTxNote(String txNote) { this.txNote = txNote; } - /** Return true if this WithdrawRequestDto object is equal to o. */ + /** Return true if this WithdrawRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -147,11 +146,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WithdrawRequestDto withdrawRequestDto = (WithdrawRequestDto) o; - return Objects.equals(this.id, withdrawRequestDto.id) - && Objects.equals(this.fee, withdrawRequestDto.fee) - && Objects.equals(this.feeLevel, withdrawRequestDto.feeLevel) - && Objects.equals(this.txNote, withdrawRequestDto.txNote); + WithdrawRequest withdrawRequest = (WithdrawRequest) o; + return Objects.equals(this.id, withdrawRequest.id) + && Objects.equals(this.fee, withdrawRequest.fee) + && Objects.equals(this.feeLevel, withdrawRequest.feeLevel) + && Objects.equals(this.txNote, withdrawRequest.txNote); } @Override @@ -162,7 +161,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class WithdrawRequestDto {\n"); + sb.append("class WithdrawRequest {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index d20cfb1..8f6c638 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -387,6 +387,14 @@ public void testGetBlockchainsAssetsApi() { Assert.assertSame(blockchainsAssets, fireblocks.blockchainsAssets()); } + @Test + public void testGetBlockchainsAssetsBetaApi() { + setupFireblocks(true, null, null); + BlockchainsAssetsBetaApi blockchainsAssetsBeta = fireblocks.blockchainsAssetsBeta(); + Assert.assertNotNull(blockchainsAssetsBeta); + Assert.assertSame(blockchainsAssetsBeta, fireblocks.blockchainsAssetsBeta()); + } + @Test public void testGetComplianceApi() { setupFireblocks(true, null, null); @@ -453,6 +461,14 @@ public void testGetDeployedContractsApi() { Assert.assertSame(deployedContracts, fireblocks.deployedContracts()); } + @Test + public void testGetEmbeddedWalletsApi() { + setupFireblocks(true, null, null); + EmbeddedWalletsApi embeddedWallets = fireblocks.embeddedWallets(); + Assert.assertNotNull(embeddedWallets); + Assert.assertSame(embeddedWallets, fireblocks.embeddedWallets()); + } + @Test public void testGetExchangeAccountsApi() { setupFireblocks(true, null, null); @@ -509,6 +525,14 @@ public void testGetKeyLinkBetaApi() { Assert.assertSame(keyLinkBeta, fireblocks.keyLinkBeta()); } + @Test + public void testGetKeysBetaApi() { + setupFireblocks(true, null, null); + KeysBetaApi keysBeta = fireblocks.keysBeta(); + Assert.assertNotNull(keysBeta); + Assert.assertSame(keysBeta, fireblocks.keysBeta()); + } + @Test public void testGetNetworkConnectionsApi() { setupFireblocks(true, null, null); @@ -574,11 +598,11 @@ public void testGetSmartTransferApi() { } @Test - public void testGetStakingBetaApi() { + public void testGetStakingApi() { setupFireblocks(true, null, null); - StakingBetaApi stakingBeta = fireblocks.stakingBeta(); - Assert.assertNotNull(stakingBeta); - Assert.assertSame(stakingBeta, fireblocks.stakingBeta()); + StakingApi staking = fireblocks.staking(); + Assert.assertNotNull(staking); + Assert.assertSame(staking, fireblocks.staking()); } @Test @@ -645,6 +669,14 @@ public void testGetWebhooksApi() { Assert.assertSame(webhooks, fireblocks.webhooks()); } + @Test + public void testGetWebhooksV2BetaApi() { + setupFireblocks(true, null, null); + WebhooksV2BetaApi webhooksV2Beta = fireblocks.webhooksV2Beta(); + Assert.assertNotNull(webhooksV2Beta); + Assert.assertSame(webhooksV2Beta, fireblocks.webhooksV2Beta()); + } + @Test public void testGetWhitelistIpAddressesApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java new file mode 100644 index 0000000..24a859e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java @@ -0,0 +1,112 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AssetClassBeta; +import com.fireblocks.sdk.model.AssetResponseBeta; +import com.fireblocks.sdk.model.BlockchainResponse; +import com.fireblocks.sdk.model.ListAssetsResponse; +import com.fireblocks.sdk.model.ListBlockchainsResponse; +import java.math.BigDecimal; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for BlockchainsAssetsBetaApi */ +@Ignore +public class BlockchainsAssetsBetaApiTest { + + private final BlockchainsAssetsBetaApi api = new BlockchainsAssetsBetaApi(); + + /** + * Get an asset + * + *

Returns an asset by ID or legacyID.</br> **Note**: - This endpoint is now in Beta, + * disabled for general availability at this time. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAssetByIdTest() throws ApiException { + String id = null; + String idempotencyKey = null; + CompletableFuture> response = + api.getAssetById(id, idempotencyKey); + } + + /** + * Get an blockchain + * + *

Returns an blockchain by ID or legacyID.</br> **Note**: - This endpoint is now in + * Beta, disabled for general availability at this time. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBlockchainByIdTest() throws ApiException { + String id = null; + CompletableFuture> response = api.getBlockchainById(id); + } + + /** + * List assets + * + *

Returns all asset type supported by Fireblocks.</br> **Note**: - This endpoint is + * now in Beta, disabled for general availability at this time. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listAssetsTest() throws ApiException { + String blockchainId = null; + AssetClassBeta assetClass = null; + String symbol = null; + String scope = null; + Boolean deprecated = null; + String pageCursor = null; + BigDecimal pageSize = null; + String idempotencyKey = null; + CompletableFuture> response = + api.listAssets( + blockchainId, + assetClass, + symbol, + scope, + deprecated, + pageCursor, + pageSize, + idempotencyKey); + } + + /** + * List blockchains + * + *

Returns all blockchains supported by Fireblocks.</br> **Note**: - This endpoint is + * now in Beta, disabled for general availability at this time. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listBlockchainsTest() throws ApiException { + String protocol = null; + Boolean deprecated = null; + Boolean test = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.listBlockchains(protocol, deprecated, test, pageCursor, pageSize); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java b/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java index 945ae8d..1fa7c0c 100644 --- a/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java @@ -15,6 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateTransactionResponse; import com.fireblocks.sdk.model.ScreeningConfigurationsRequest; import com.fireblocks.sdk.model.ScreeningPolicyResponse; import com.fireblocks.sdk.model.ScreeningProviderRulesConfigurationResponse; @@ -81,6 +82,23 @@ public void getScreeningPolicyTest() throws ApiException { api.getScreeningPolicy(); } + /** + * Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, + * with the API user as the initiator, bypassing the screening policy check + * + *

This endpoint is restricted to Admin API users and is only applicable to outgoing + * transactions. + * + * @throws ApiException if the Api call fails + */ + @Test + public void retryRejectedTransactionBypassScreeningChecksTest() throws ApiException { + String txId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.retryRejectedTransactionBypassScreeningChecks(txId, idempotencyKey); + } + /** * Update AML Configuration * diff --git a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java index c4261f5..bec418b 100644 --- a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java @@ -18,6 +18,7 @@ import com.fireblocks.sdk.model.ContractAbiResponseDto; import com.fireblocks.sdk.model.ParameterWithValue; import com.fireblocks.sdk.model.ReadCallFunctionDto; +import com.fireblocks.sdk.model.TransactionReceiptResponse; import com.fireblocks.sdk.model.WriteCallFunctionDto; import com.fireblocks.sdk.model.WriteCallFunctionResponseDto; import java.util.List; @@ -47,6 +48,21 @@ public void getDeployedContractAbiTest() throws ApiException { api.getDeployedContractAbi(contractAddress, baseAssetId, idempotencyKey); } + /** + * Get transaction receipt + * + *

Retrieve the transaction receipt by blockchain native asset ID and transaction hash + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTransactionReceiptTest() throws ApiException { + String baseAssetId = null; + String txHash = null; + CompletableFuture> response = + api.getTransactionReceipt(baseAssetId, txHash); + } + /** * Call a read function on a deployed contract * diff --git a/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java index fb315a7..16e07d0 100644 --- a/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java @@ -15,11 +15,18 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AddCosignerRequest; +import com.fireblocks.sdk.model.AddCosignerResponse; import com.fireblocks.sdk.model.ApiKey; import com.fireblocks.sdk.model.ApiKeysPaginatedResponse; import com.fireblocks.sdk.model.Cosigner; import com.fireblocks.sdk.model.CosignersPaginatedResponse; +import com.fireblocks.sdk.model.PairApiKeyRequest; +import com.fireblocks.sdk.model.PairApiKeyResponse; import com.fireblocks.sdk.model.RenameCosigner; +import com.fireblocks.sdk.model.Status; +import com.fireblocks.sdk.model.UpdateCallbackHandlerRequest; +import com.fireblocks.sdk.model.UpdateCallbackHandlerResponse; import java.math.BigDecimal; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -32,6 +39,22 @@ public class CosignersBetaApiTest { private final CosignersBetaApi api = new CosignersBetaApi(); + /** + * Add cosigner + * + *

Add a new cosigner. The cosigner will be pending pairing until the API key is manually + * paired + * + * @throws ApiException if the Api call fails + */ + @Test + public void addCosignerTest() throws ApiException { + AddCosignerRequest addCosignerRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.addCosigner(addCosignerRequest, idempotencyKey); + } + /** * Get API key * @@ -50,8 +73,7 @@ public void getApiKeyTest() throws ApiException { /** * Get all API keys * - *

Get all cosigner paired API keys (paginated) **Note:** These endpoints are currently in - * beta and might be subject to changes. + *

Get all cosigner paired API keys (paginated) * * @throws ApiException if the Api call fails */ @@ -96,6 +118,39 @@ public void getCosignersTest() throws ApiException { api.getCosigners(order, pageCursor, pageSize); } + /** + * Get request status + * + *

Get the status of an asynchronous request + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRequestStatusTest() throws ApiException { + UUID cosignerId = null; + String apiKeyId = null; + String requestId = null; + CompletableFuture> response = + api.getRequestStatus(cosignerId, apiKeyId, requestId); + } + + /** + * Pair API key + * + *

Pair an API key to a cosigner + * + * @throws ApiException if the Api call fails + */ + @Test + public void pairApiKeyTest() throws ApiException { + PairApiKeyRequest pairApiKeyRequest = null; + UUID cosignerId = null; + String apiKeyId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.pairApiKey(pairApiKeyRequest, cosignerId, apiKeyId, idempotencyKey); + } + /** * Rename cosigner * @@ -111,4 +166,34 @@ public void renameCosignerTest() throws ApiException { CompletableFuture> response = api.renameCosigner(renameCosigner, cosignerId); } + + /** + * Unpair API key + * + *

Unpair an API key from a cosigner + * + * @throws ApiException if the Api call fails + */ + @Test + public void unpairApiKeyTest() throws ApiException { + UUID cosignerId = null; + String apiKeyId = null; + CompletableFuture> response = api.unpairApiKey(cosignerId, apiKeyId); + } + + /** + * Update API key callback handler + * + *

Update the callback handler of an API key + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateCallbackHandlerTest() throws ApiException { + UpdateCallbackHandlerRequest updateCallbackHandlerRequest = null; + UUID cosignerId = null; + String apiKeyId = null; + CompletableFuture> response = + api.updateCallbackHandler(updateCallbackHandlerRequest, cosignerId, apiKeyId); + } } diff --git a/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java b/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java new file mode 100644 index 0000000..5af6b7b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java @@ -0,0 +1,68 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.PublicKeyInformation; +import java.math.BigDecimal; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for EmbeddedWalletsApi */ +@Ignore +public class EmbeddedWalletsApiTest { + + private final EmbeddedWalletsApi api = new EmbeddedWalletsApi(); + + /** + * Get the public key of an asset + * + *

Gets the public key of an asset associated with a specific account within a Non-Custodial + * Wallet + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPublicKeyInfoForAddressNcwTest() throws ApiException { + String walletId = null; + String accountId = null; + String assetId = null; + BigDecimal change = null; + BigDecimal addressIndex = null; + Boolean compressed = null; + CompletableFuture> response = + api.getPublicKeyInfoForAddressNcw( + walletId, accountId, assetId, change, addressIndex, compressed); + } + + /** + * Get the public key for a derivation path + * + *

Gets the public key information based on derivation path and signing algorithm within a + * Non-Custodial Wallet + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPublicKeyInfoNcwTest() throws ApiException { + String walletId = null; + String derivationPath = null; + String algorithm = null; + Boolean compressed = null; + CompletableFuture> response = + api.getPublicKeyInfoNcw(walletId, derivationPath, algorithm, compressed); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java new file mode 100644 index 0000000..e4eb084 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java @@ -0,0 +1,58 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.GetMpcKeysResponse; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for KeysBetaApi */ +@Ignore +public class KeysBetaApiTest { + + private final KeysBetaApi api = new KeysBetaApi(); + + /** + * Get list of mpc keys + * + *

Returns a list of MPC signing keys of the workspace. For each key, the list of players + * associated with it is attached. **Note:** This endpoint is currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMpcKeysListTest() throws ApiException { + CompletableFuture> response = api.getMpcKeysList(); + } + + /** + * Get list of mpc keys by `userId` + * + *

Returns a list of MPC signing keys of a specific user. For each key, the list of players + * associated with it is attached. **Note:** This endpoint is currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getMpcKeysListByUserTest() throws ApiException { + String userId = null; + CompletableFuture> response = + api.getMpcKeysListByUser(userId); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java new file mode 100644 index 0000000..decc7eb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java @@ -0,0 +1,237 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.ChainDescriptor; +import com.fireblocks.sdk.model.ChainInfoResponse; +import com.fireblocks.sdk.model.ClaimRewardsRequest; +import com.fireblocks.sdk.model.Delegation; +import com.fireblocks.sdk.model.DelegationSummary; +import com.fireblocks.sdk.model.Provider; +import com.fireblocks.sdk.model.SplitRequest; +import com.fireblocks.sdk.model.SplitResponse; +import com.fireblocks.sdk.model.StakeRequest; +import com.fireblocks.sdk.model.StakeResponse; +import com.fireblocks.sdk.model.StakingProvider; +import com.fireblocks.sdk.model.UnstakeRequest; +import com.fireblocks.sdk.model.WithdrawRequest; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for StakingApi */ +@Ignore +public class StakingApiTest { + + private final StakingApi api = new StakingApi(); + + /** + * Approve staking terms of service + * + *

Approve the terms of service of the staking provider. This must be called before + * performing a staking action for the first time with this provider. + * + * @throws ApiException if the Api call fails + */ + @Test + public void approveTermsOfServiceByProviderIdTest() throws ApiException { + StakingProvider providerId = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.approveTermsOfServiceByProviderId(providerId, idempotencyKey); + } + + /** + * Execute a Claim Rewards operation + * + *

Perform a chain-specific Claim Rewards. + * + * @throws ApiException if the Api call fails + */ + @Test + public void claimRewardsTest() throws ApiException { + ClaimRewardsRequest claimRewardsRequest = null; + String chainDescriptor = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.claimRewards(claimRewardsRequest, chainDescriptor, idempotencyKey); + } + + /** + * List staking positions details + * + *

Return detailed information on all staking positions, including the staked amount, + * rewards, status and more. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAllDelegationsTest() throws ApiException { + ChainDescriptor chainDescriptor = null; + CompletableFuture>> response = + api.getAllDelegations(chainDescriptor); + } + + /** + * Get chain-specific staking summary + * + *

Return chain-specific, staking-related information summary (e.g. epoch details, lockup + * durations, estimated rewards, etc.) + * + * @throws ApiException if the Api call fails + */ + @Test + public void getChainInfoTest() throws ApiException { + ChainDescriptor chainDescriptor = null; + CompletableFuture> response = + api.getChainInfo(chainDescriptor); + } + + /** + * List staking supported chains + * + *

Return an alphabetical list of supported chains. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getChainsTest() throws ApiException { + CompletableFuture>> response = api.getChains(); + } + + /** + * Get staking position details + * + *

Return detailed information on a staking position, including the staked amount, rewards, + * status and more. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDelegationByIdTest() throws ApiException { + String id = null; + CompletableFuture> response = api.getDelegationById(id); + } + + /** + * List staking providers details + * + *

Return information on all the available staking providers. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getProvidersTest() throws ApiException { + CompletableFuture>> response = api.getProviders(); + } + + /** + * Get staking summary details + * + *

Return a summary of all vaults, categorized by their status (active, inactive), the total + * amounts staked and total rewards per-chain. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSummaryTest() throws ApiException { + CompletableFuture> response = api.getSummary(); + } + + /** + * Get staking summary details by vault + * + *

Return a summary for each vault, categorized by their status (active, inactive), the total + * amounts staked and total rewards per-chain. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getSummaryByVaultTest() throws ApiException { + CompletableFuture>> response = + api.getSummaryByVault(); + } + + /** + * Execute a Split operation on SOL/SOL_TEST stake account + * + *

Perform a Solana Split stake account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void splitTest() throws ApiException { + SplitRequest splitRequest = null; + String chainDescriptor = null; + String idempotencyKey = null; + CompletableFuture> response = + api.split(splitRequest, chainDescriptor, idempotencyKey); + } + + /** + * Initiate Stake Operation + * + *

Perform a chain-specific Stake. + * + * @throws ApiException if the Api call fails + */ + @Test + public void stakeTest() throws ApiException { + StakeRequest stakeRequest = null; + ChainDescriptor chainDescriptor = null; + String idempotencyKey = null; + CompletableFuture> response = + api.stake(stakeRequest, chainDescriptor, idempotencyKey); + } + + /** + * Execute an Unstake operation + * + *

Execute an Unstake operation + * + * @throws ApiException if the Api call fails + */ + @Test + public void unstakeTest() throws ApiException { + UnstakeRequest unstakeRequest = null; + ChainDescriptor chainDescriptor = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.unstake(unstakeRequest, chainDescriptor, idempotencyKey); + } + + /** + * Execute a Withdraw operation + * + *

Perform a chain-specific Withdraw. + * + * @throws ApiException if the Api call fails + */ + @Test + public void withdrawTest() throws ApiException { + WithdrawRequest withdrawRequest = null; + ChainDescriptor chainDescriptor = null; + String idempotencyKey = null; + + CompletableFuture> response = + api.withdraw(withdrawRequest, chainDescriptor, idempotencyKey); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/StakingBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/StakingBetaApiTest.java deleted file mode 100644 index c25f7bc..0000000 --- a/src/test/java/com/fireblocks/sdk/api/StakingBetaApiTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.api; - - -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.ChainInfoResponseDto; -import com.fireblocks.sdk.model.DelegationDto; -import com.fireblocks.sdk.model.DelegationSummaryDto; -import com.fireblocks.sdk.model.ExecuteActionRequest; -import com.fireblocks.sdk.model.ExecuteActionResponse; -import com.fireblocks.sdk.model.ProviderDto; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; -import org.junit.Ignore; -import org.junit.Test; - -/** API tests for StakingBetaApi */ -@Ignore -public class StakingBetaApiTest { - - private final StakingBetaApi api = new StakingBetaApi(); - - /** - * Approve the terms of service of the staking provider. This must be called before performing a - * staking action for the first time with this provider. - * - * @throws ApiException if the Api call fails - */ - @Test - public void approveTermsOfServiceByProviderIdTest() throws ApiException { - String providerId = null; - String idempotencyKey = null; - CompletableFuture> response = - api.approveTermsOfServiceByProviderId(providerId, idempotencyKey); - } - - /** - * Perform a chain-specific staking action (e.g. stake, unstake, withdraw). - * - * @throws ApiException if the Api call fails - */ - @Test - public void executeActionTest() throws ApiException { - ExecuteActionRequest executeActionRequest = null; - String chainDescriptor = null; - String actionId = null; - String idempotencyKey = null; - CompletableFuture> response = - api.executeAction(executeActionRequest, chainDescriptor, actionId, idempotencyKey); - } - - /** - * Return detailed information on all staking positions, including the staked amount, rewards, - * status and more. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAllDelegationsTest() throws ApiException { - String chainDescriptor = null; - CompletableFuture>> response = - api.getAllDelegations(chainDescriptor); - } - - /** - * Return chain-specific, staking-related information summary (e.g. epoch details, lockup - * durations, estimated rewards, etc.) - * - * @throws ApiException if the Api call fails - */ - @Test - public void getChainInfoTest() throws ApiException { - String chainDescriptor = null; - CompletableFuture> response = - api.getChainInfo(chainDescriptor); - } - - /** - * Return an alphabetical list of supported chains. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getChainsTest() throws ApiException { - CompletableFuture>> response = api.getChains(); - } - - /** - * Return detailed information on a staking position, including the staked amount, rewards, - * status and more. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getDelegationByIdTest() throws ApiException { - String id = null; - CompletableFuture> response = api.getDelegationById(id); - } - - /** - * Return information on all the available staking providers. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getProvidersTest() throws ApiException { - CompletableFuture>> response = api.getProviders(); - } - - /** - * Return a summary of all vaults, categorized by their status (active, inactive), the total - * amounts staked and total rewards per-chain. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSummaryTest() throws ApiException { - CompletableFuture> response = api.getSummary(); - } - - /** - * Return a summary for each vault, categorized by their status (active, inactive), the total - * amounts staked and total rewards per-chain. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSummaryByVaultTest() throws ApiException { - CompletableFuture>> response = - api.getSummaryByVault(); - } -} diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java new file mode 100644 index 0000000..b08550f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java @@ -0,0 +1,164 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateWebhookRequest; +import com.fireblocks.sdk.model.NotificationPaginatedResponse; +import com.fireblocks.sdk.model.NotificationStatus; +import com.fireblocks.sdk.model.NotificationWithData; +import com.fireblocks.sdk.model.UpdateWebhookRequest; +import com.fireblocks.sdk.model.Webhook; +import com.fireblocks.sdk.model.WebhookEvent; +import com.fireblocks.sdk.model.WebhookPaginatedResponse; +import java.math.BigDecimal; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for WebhooksV2BetaApi */ +@Ignore +public class WebhooksV2BetaApiTest { + + private final WebhooksV2BetaApi api = new WebhooksV2BetaApi(); + + /** + * Create new webhook + * + *

Creates a new webhook, which will be triggered on the specified events **Note:** These + * endpoints are currently in beta and might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createWebhookTest() throws ApiException { + CreateWebhookRequest createWebhookRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createWebhook(createWebhookRequest, idempotencyKey); + } + + /** + * Delete webhook + * + *

Delete a webhook by its id **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteWebhookTest() throws ApiException { + UUID webhookId = null; + CompletableFuture> response = api.deleteWebhook(webhookId); + } + + /** + * Get notification by id + * + *

Get notification by id **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNotificationTest() throws ApiException { + String webhookId = null; + String notificationId = null; + Boolean includeData = null; + CompletableFuture> response = + api.getNotification(webhookId, notificationId, includeData); + } + + /** + * Get all notifications by webhook id + * + *

Get all notifications by webhook id (paginated) **Note:** These endpoints are currently in + * beta and might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNotificationsTest() throws ApiException { + UUID webhookId = null; + String order = null; + String pageCursor = null; + BigDecimal pageSize = null; + String createdStartDate = null; + String createdEndDate = null; + List statuses = null; + List eventTypes = null; + String resourceId = null; + CompletableFuture> response = + api.getNotifications( + webhookId, + order, + pageCursor, + pageSize, + createdStartDate, + createdEndDate, + statuses, + eventTypes, + resourceId); + } + + /** + * Get webhook by id + * + *

Retrieve a webhook by its id **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getWebhookTest() throws ApiException { + UUID webhookId = null; + CompletableFuture> response = api.getWebhook(webhookId); + } + + /** + * Get all webhooks + * + *

Get all webhooks (paginated) **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getWebhooksTest() throws ApiException { + String order = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.getWebhooks(order, pageCursor, pageSize); + } + + /** + * Update webhook + * + *

Update a webhook by its id **Note:** These endpoints are currently in beta and might be + * subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void updateWebhookTest() throws ApiException { + UpdateWebhookRequest updateWebhookRequest = null; + UUID webhookId = null; + CompletableFuture> response = + api.updateWebhook(updateWebhookRequest, webhookId); + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AddCosignerRequestTest.java b/src/test/java/com/fireblocks/sdk/model/AddCosignerRequestTest.java new file mode 100644 index 0000000..9869d6b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AddCosignerRequestTest.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 AddCosignerRequest */ +public class AddCosignerRequestTest { + private final AddCosignerRequest model = new AddCosignerRequest(); + + /** Model tests for AddCosignerRequest */ + @Test + public void testAddCosignerRequest() { + // TODO: test AddCosignerRequest + } + + /** Test the property 'apiKeyId' */ + @Test + public void apiKeyIdTest() { + // TODO: test apiKeyId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'existingCosigner' */ + @Test + public void existingCosignerTest() { + // TODO: test existingCosigner + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.java new file mode 100644 index 0000000..e3dfcf1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.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 AddCosignerResponse */ +public class AddCosignerResponseTest { + private final AddCosignerResponse model = new AddCosignerResponse(); + + /** Model tests for AddCosignerResponse */ + @Test + public void testAddCosignerResponse() { + // TODO: test AddCosignerResponse + } + + /** Test the property 'apiKeyId' */ + @Test + public void apiKeyIdTest() { + // TODO: test apiKeyId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'existingCosigner' */ + @Test + public void existingCosignerTest() { + // TODO: test existingCosigner + } + + /** Test the property 'pendingCosignerId' */ + @Test + public void pendingCosignerIdTest() { + // TODO: test pendingCosignerId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AdditionalInfoDtoTest.java b/src/test/java/com/fireblocks/sdk/model/AdditionalInfoTest.java similarity index 76% rename from src/test/java/com/fireblocks/sdk/model/AdditionalInfoDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/AdditionalInfoTest.java index 77b295f..1b720ae 100644 --- a/src/test/java/com/fireblocks/sdk/model/AdditionalInfoDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AdditionalInfoTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for AdditionalInfoDto */ -public class AdditionalInfoDtoTest { - private final AdditionalInfoDto model = new AdditionalInfoDto(); +/** Model tests for AdditionalInfo */ +public class AdditionalInfoTest { + private final AdditionalInfo model = new AdditionalInfo(); - /** Model tests for AdditionalInfoDto */ + /** Model tests for AdditionalInfo */ @Test - public void testAdditionalInfoDto() { - // TODO: test AdditionalInfoDto + public void testAdditionalInfo() { + // TODO: test AdditionalInfo } /** Test the property 'estimatedAnnualReward' */ diff --git a/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java b/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java index bf97262..ffff5e0 100644 --- a/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ApiKeyTest.java @@ -36,4 +36,10 @@ public void idTest() { public void lastSeenTest() { // TODO: test lastSeen } + + /** Test the property 'callbackHandler' */ + @Test + public void callbackHandlerTest() { + // TODO: test callbackHandler + } } diff --git a/src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java new file mode 100644 index 0000000..d1429ab --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.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 AssetClassBeta */ +public class AssetClassBetaTest { + /** Model tests for AssetClassBeta */ + @Test + public void testAssetClassBeta() { + // TODO: test AssetClassBeta + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java b/src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java new file mode 100644 index 0000000..686dc26 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.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 AssetMediaAttributes */ +public class AssetMediaAttributesTest { + private final AssetMediaAttributes model = new AssetMediaAttributes(); + + /** Model tests for AssetMediaAttributes */ + @Test + public void testAssetMediaAttributes() { + // TODO: test AssetMediaAttributes + } + + /** Test the property 'monochrome' */ + @Test + public void monochromeTest() { + // TODO: test monochrome + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetMediaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetMediaTest.java new file mode 100644 index 0000000..f0c087f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetMediaTest.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 AssetMedia */ +public class AssetMediaTest { + private final AssetMedia model = new AssetMedia(); + + /** Model tests for AssetMedia */ + @Test + public void testAssetMedia() { + // TODO: test AssetMedia + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'attributes' */ + @Test + public void attributesTest() { + // TODO: test attributes + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java new file mode 100644 index 0000000..c892727 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.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 AssetMetadataBeta */ +public class AssetMetadataBetaTest { + private final AssetMetadataBeta model = new AssetMetadataBeta(); + + /** Model tests for AssetMetadataBeta */ + @Test + public void testAssetMetadataBeta() { + // TODO: test AssetMetadataBeta + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'deprecationReferralId' */ + @Test + public void deprecationReferralIdTest() { + // TODO: test deprecationReferralId + } + + /** Test the property 'verified' */ + @Test + public void verifiedTest() { + // TODO: test verified + } + + /** Test the property 'website' */ + @Test + public void websiteTest() { + // TODO: test website + } + + /** Test the property 'media' */ + @Test + public void mediaTest() { + // TODO: test media + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/AssetMetadataTest.java similarity index 69% rename from src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetMetadataTest.java index 82c46d2..fb936f0 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetResponseMetadataTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetMetadataTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for AssetResponseMetadata */ -public class AssetResponseMetadataTest { - private final AssetResponseMetadata model = new AssetResponseMetadata(); +/** Model tests for AssetMetadata */ +public class AssetMetadataTest { + private final AssetMetadata model = new AssetMetadata(); - /** Model tests for AssetResponseMetadata */ + /** Model tests for AssetMetadata */ @Test - public void testAssetResponseMetadata() { - // TODO: test AssetResponseMetadata + public void testAssetMetadata() { + // TODO: test AssetMetadata } /** Test the property 'scope' */ diff --git a/src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java new file mode 100644 index 0000000..489e90b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for AssetOnchainBeta */ +public class AssetOnchainBetaTest { + private final AssetOnchainBeta model = new AssetOnchainBeta(); + + /** Model tests for AssetOnchainBeta */ + @Test + public void testAssetOnchainBeta() { + // TODO: test AssetOnchainBeta + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'decimals' */ + @Test + public void decimalsTest() { + // TODO: test decimals + } + + /** Test the property 'standards' */ + @Test + public void standardsTest() { + // TODO: test standards + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java b/src/test/java/com/fireblocks/sdk/model/AssetOnchainTest.java similarity index 78% rename from src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetOnchainTest.java index aff74bd..7cd46fc 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetResponseOnchainTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetOnchainTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for AssetResponseOnchain */ -public class AssetResponseOnchainTest { - private final AssetResponseOnchain model = new AssetResponseOnchain(); +/** Model tests for AssetOnchain */ +public class AssetOnchainTest { + private final AssetOnchain model = new AssetOnchain(); - /** Model tests for AssetResponseOnchain */ + /** Model tests for AssetOnchain */ @Test - public void testAssetResponseOnchain() { - // TODO: test AssetResponseOnchain + public void testAssetOnchain() { + // TODO: test AssetOnchain } /** Test the property 'symbol' */ diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java new file mode 100644 index 0000000..eba130c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java @@ -0,0 +1,75 @@ +/* + * 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 AssetResponseBeta */ +public class AssetResponseBetaTest { + private final AssetResponseBeta model = new AssetResponseBeta(); + + /** Model tests for AssetResponseBeta */ + @Test + public void testAssetResponseBeta() { + // TODO: test AssetResponseBeta + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'legacyId' */ + @Test + public void legacyIdTest() { + // TODO: test legacyId + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'displaySymbol' */ + @Test + public void displaySymbolTest() { + // TODO: test displaySymbol + } + + /** Test the property 'assetClass' */ + @Test + public void assetClassTest() { + // TODO: test assetClass + } + + /** Test the property 'onchain' */ + @Test + public void onchainTest() { + // TODO: test onchain + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainExplorerTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainExplorerTest.java new file mode 100644 index 0000000..86371f4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainExplorerTest.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 BlockchainExplorer */ +public class BlockchainExplorerTest { + private final BlockchainExplorer model = new BlockchainExplorer(); + + /** Model tests for BlockchainExplorer */ + @Test + public void testBlockchainExplorer() { + // TODO: test BlockchainExplorer + } + + /** Test the property 'base' */ + @Test + public void baseTest() { + // TODO: test base + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'tx' */ + @Test + public void txTest() { + // TODO: test tx + } + + /** Test the property 'token' */ + @Test + public void tokenTest() { + // TODO: test token + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainMediaTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainMediaTest.java new file mode 100644 index 0000000..95f8ca8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainMediaTest.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 BlockchainMedia */ +public class BlockchainMediaTest { + private final BlockchainMedia model = new BlockchainMedia(); + + /** Model tests for BlockchainMedia */ + @Test + public void testBlockchainMedia() { + // TODO: test BlockchainMedia + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainMetadataTest.java new file mode 100644 index 0000000..d40909f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainMetadataTest.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 BlockchainMetadata */ +public class BlockchainMetadataTest { + private final BlockchainMetadata model = new BlockchainMetadata(); + + /** Model tests for BlockchainMetadata */ + @Test + public void testBlockchainMetadata() { + // TODO: test BlockchainMetadata + } + + /** Test the property 'scope' */ + @Test + public void scopeTest() { + // TODO: test scope + } + + /** Test the property 'deprecated' */ + @Test + public void deprecatedTest() { + // TODO: test deprecated + } + + /** Test the property 'media' */ + @Test + public void mediaTest() { + // TODO: test media + } + + /** Test the property 'explorer' */ + @Test + public void explorerTest() { + // TODO: test explorer + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponseTest.java new file mode 100644 index 0000000..7a80808 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponseTest.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 BlockchainNotFoundErrorResponse */ +public class BlockchainNotFoundErrorResponseTest { + private final BlockchainNotFoundErrorResponse model = new BlockchainNotFoundErrorResponse(); + + /** Model tests for BlockchainNotFoundErrorResponse */ + @Test + public void testBlockchainNotFoundErrorResponse() { + // TODO: test BlockchainNotFoundErrorResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainOnchainTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainOnchainTest.java new file mode 100644 index 0000000..053807b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainOnchainTest.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 BlockchainOnchain */ +public class BlockchainOnchainTest { + private final BlockchainOnchain model = new BlockchainOnchain(); + + /** Model tests for BlockchainOnchain */ + @Test + public void testBlockchainOnchain() { + // TODO: test BlockchainOnchain + } + + /** Test the property 'protocol' */ + @Test + public void protocolTest() { + // TODO: test protocol + } + + /** Test the property 'chainId' */ + @Test + public void chainIdTest() { + // TODO: test chainId + } + + /** Test the property 'test' */ + @Test + public void testTest() { + // TODO: test test + } + + /** Test the property 'signingAlgo' */ + @Test + public void signingAlgoTest() { + // TODO: test signingAlgo + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainResponseTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainResponseTest.java new file mode 100644 index 0000000..e515c13 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainResponseTest.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 BlockchainResponse */ +public class BlockchainResponseTest { + private final BlockchainResponse model = new BlockchainResponse(); + + /** Model tests for BlockchainResponse */ + @Test + public void testBlockchainResponse() { + // TODO: test BlockchainResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'legacyId' */ + @Test + public void legacyIdTest() { + // TODO: test legacyId + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'nativeAssetId' */ + @Test + public void nativeAssetIdTest() { + // TODO: test nativeAssetId + } + + /** Test the property 'onchain' */ + @Test + public void onchainTest() { + // TODO: test onchain + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java new file mode 100644 index 0000000..fe41972 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.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 CallbackHandlerRequest */ +public class CallbackHandlerRequestTest { + private final CallbackHandlerRequest model = new CallbackHandlerRequest(); + + /** Model tests for CallbackHandlerRequest */ + @Test + public void testCallbackHandlerRequest() { + // TODO: test CallbackHandlerRequest + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'publicKey' */ + @Test + public void publicKeyTest() { + // TODO: test publicKey + } + + /** Test the property 'cert' */ + @Test + public void certTest() { + // TODO: test cert + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java b/src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java new file mode 100644 index 0000000..41b7002 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.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 CallbackHandler */ +public class CallbackHandlerTest { + private final CallbackHandler model = new CallbackHandler(); + + /** Model tests for CallbackHandler */ + @Test + public void testCallbackHandler() { + // TODO: test CallbackHandler + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'publicKey' */ + @Test + public void publicKeyTest() { + // TODO: test publicKey + } + + /** Test the property 'certPublicKeyHash' */ + @Test + public void certPublicKeyHashTest() { + // TODO: test certPublicKeyHash + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java b/src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java new file mode 100644 index 0000000..60a6eed --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.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 ChainDescriptor */ +public class ChainDescriptorTest { + /** Model tests for ChainDescriptor */ + @Test + public void testChainDescriptor() { + // TODO: test ChainDescriptor + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChainInfoResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java similarity index 79% rename from src/test/java/com/fireblocks/sdk/model/ChainInfoResponseDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java index 32831c4..8755d48 100644 --- a/src/test/java/com/fireblocks/sdk/model/ChainInfoResponseDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ChainInfoResponseDto */ -public class ChainInfoResponseDtoTest { - private final ChainInfoResponseDto model = new ChainInfoResponseDto(); +/** Model tests for ChainInfoResponse */ +public class ChainInfoResponseTest { + private final ChainInfoResponse model = new ChainInfoResponse(); - /** Model tests for ChainInfoResponseDto */ + /** Model tests for ChainInfoResponse */ @Test - public void testChainInfoResponseDto() { - // TODO: test ChainInfoResponseDto + public void testChainInfoResponse() { + // TODO: test ChainInfoResponse } /** Test the property 'chainDescriptor' */ diff --git a/src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java new file mode 100644 index 0000000..3e6810a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.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 ClaimRewardsRequest */ +public class ClaimRewardsRequestTest { + private final ClaimRewardsRequest model = new ClaimRewardsRequest(); + + /** Model tests for ClaimRewardsRequest */ + @Test + public void testClaimRewardsRequest() { + // TODO: test ClaimRewardsRequest + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } + + /** Test the property 'txNote' */ + @Test + public void txNoteTest() { + // TODO: test txNote + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CosignerTest.java b/src/test/java/com/fireblocks/sdk/model/CosignerTest.java index 7e9b541..607d20a 100644 --- a/src/test/java/com/fireblocks/sdk/model/CosignerTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CosignerTest.java @@ -42,4 +42,16 @@ public void idTest() { public void nameTest() { // TODO: test name } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'version' */ + @Test + public void versionTest() { + // TODO: test version + } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java new file mode 100644 index 0000000..7e3896a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.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 CreateWebhookRequest */ +public class CreateWebhookRequestTest { + private final CreateWebhookRequest model = new CreateWebhookRequest(); + + /** Model tests for CreateWebhookRequest */ + @Test + public void testCreateWebhookRequest() { + // TODO: test CreateWebhookRequest + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DelegationSummaryDtoTest.java b/src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java similarity index 76% rename from src/test/java/com/fireblocks/sdk/model/DelegationSummaryDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java index 2b1eadd..982dde6 100644 --- a/src/test/java/com/fireblocks/sdk/model/DelegationSummaryDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for DelegationSummaryDto */ -public class DelegationSummaryDtoTest { - private final DelegationSummaryDto model = new DelegationSummaryDto(); +/** Model tests for DelegationSummary */ +public class DelegationSummaryTest { + private final DelegationSummary model = new DelegationSummary(); - /** Model tests for DelegationSummaryDto */ + /** Model tests for DelegationSummary */ @Test - public void testDelegationSummaryDto() { - // TODO: test DelegationSummaryDto + public void testDelegationSummary() { + // TODO: test DelegationSummary } /** Test the property 'active' */ diff --git a/src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java b/src/test/java/com/fireblocks/sdk/model/DelegationTest.java similarity index 92% rename from src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/DelegationTest.java index 3c2b765..c809bd5 100644 --- a/src/test/java/com/fireblocks/sdk/model/DelegationDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DelegationTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for DelegationDto */ -public class DelegationDtoTest { - private final DelegationDto model = new DelegationDto(); +/** Model tests for Delegation */ +public class DelegationTest { + private final Delegation model = new Delegation(); - /** Model tests for DelegationDto */ + /** Model tests for Delegation */ @Test - public void testDelegationDto() { - // TODO: test DelegationDto + public void testDelegation() { + // TODO: test Delegation } /** Test the property 'id' */ diff --git a/src/test/java/com/fireblocks/sdk/model/FeeLevelTest.java b/src/test/java/com/fireblocks/sdk/model/FeeLevelTest.java new file mode 100644 index 0000000..16435f3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FeeLevelTest.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 FeeLevel */ +public class FeeLevelTest { + /** Model tests for FeeLevel */ + @Test + public void testFeeLevel() { + // TODO: test FeeLevel + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.java new file mode 100644 index 0000000..7a6a909 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.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 GetMpcKeysResponse */ +public class GetMpcKeysResponseTest { + private final GetMpcKeysResponse model = new GetMpcKeysResponse(); + + /** Model tests for GetMpcKeysResponse */ + @Test + public void testGetMpcKeysResponse() { + // TODO: test GetMpcKeysResponse + } + + /** Test the property 'tenantId' */ + @Test + public void tenantIdTest() { + // TODO: test tenantId + } + + /** Test the property 'keys' */ + @Test + public void keysTest() { + // TODO: test keys + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.java new file mode 100644 index 0000000..aca084d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.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 ListAssetsResponse */ +public class ListAssetsResponseTest { + private final ListAssetsResponse model = new ListAssetsResponse(); + + /** Model tests for ListAssetsResponse */ + @Test + public void testListAssetsResponse() { + // TODO: test ListAssetsResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java new file mode 100644 index 0000000..9a45b29 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.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 ListBlockchainsResponse */ +public class ListBlockchainsResponseTest { + private final ListBlockchainsResponse model = new ListBlockchainsResponse(); + + /** Model tests for ListBlockchainsResponse */ + @Test + public void testListBlockchainsResponse() { + // TODO: test ListBlockchainsResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/MpcKeyTest.java b/src/test/java/com/fireblocks/sdk/model/MpcKeyTest.java new file mode 100644 index 0000000..51a7451 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MpcKeyTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for MpcKey */ +public class MpcKeyTest { + private final MpcKey model = new MpcKey(); + + /** Model tests for MpcKey */ + @Test + public void testMpcKey() { + // TODO: test MpcKey + } + + /** Test the property 'keyId' */ + @Test + public void keyIdTest() { + // TODO: test keyId + } + + /** Test the property 'userId' */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** Test the property 'algorithm' */ + @Test + public void algorithmTest() { + // TODO: test algorithm + } + + /** Test the property 'players' */ + @Test + public void playersTest() { + // TODO: test players + } + + /** Test the property 'lastPreprocessedIndex' */ + @Test + public void lastPreprocessedIndexTest() { + // TODO: test lastPreprocessedIndex + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.java new file mode 100644 index 0000000..ca23a4a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.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 NotificationPaginatedResponse */ +public class NotificationPaginatedResponseTest { + private final NotificationPaginatedResponse model = new NotificationPaginatedResponse(); + + /** Model tests for NotificationPaginatedResponse */ + @Test + public void testNotificationPaginatedResponse() { + // TODO: test NotificationPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java new file mode 100644 index 0000000..59ed1f9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.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 NotificationStatus */ +public class NotificationStatusTest { + /** Model tests for NotificationStatus */ + @Test + public void testNotificationStatus() { + // TODO: test NotificationStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationTest.java new file mode 100644 index 0000000..31044a5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NotificationTest.java @@ -0,0 +1,75 @@ +/* + * 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 Notification */ +public class NotificationTest { + private final Notification model = new Notification(); + + /** Model tests for Notification */ + @Test + public void testNotification() { + // TODO: test Notification + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'eventVersion' */ + @Test + public void eventVersionTest() { + // TODO: test eventVersion + } + + /** Test the property 'resourceId' */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + + /** Test the property 'attempts' */ + @Test + public void attemptsTest() { + // TODO: test attempts + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java new file mode 100644 index 0000000..42240b2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.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 NotificationWithData */ +public class NotificationWithDataTest { + private final NotificationWithData model = new NotificationWithData(); + + /** Model tests for NotificationWithData */ + @Test + public void testNotificationWithData() { + // TODO: test NotificationWithData + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'eventType' */ + @Test + public void eventTypeTest() { + // TODO: test eventType + } + + /** Test the property 'eventVersion' */ + @Test + public void eventVersionTest() { + // TODO: test eventVersion + } + + /** Test the property 'resourceId' */ + @Test + public void resourceIdTest() { + // TODO: test resourceId + } + + /** Test the property 'attempts' */ + @Test + public void attemptsTest() { + // TODO: test attempts + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.java b/src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.java new file mode 100644 index 0000000..88cc801 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.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 PairApiKeyRequest */ +public class PairApiKeyRequestTest { + private final PairApiKeyRequest model = new PairApiKeyRequest(); + + /** Model tests for PairApiKeyRequest */ + @Test + public void testPairApiKeyRequest() { + // TODO: test PairApiKeyRequest + } + + /** Test the property 'callbackHandler' */ + @Test + public void callbackHandlerTest() { + // TODO: test callbackHandler + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.java b/src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.java new file mode 100644 index 0000000..4a09d11 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.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 PairApiKeyResponse */ +public class PairApiKeyResponseTest { + private final PairApiKeyResponse model = new PairApiKeyResponse(); + + /** Model tests for PairApiKeyResponse */ + @Test + public void testPairApiKeyResponse() { + // TODO: test PairApiKeyResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'callbackHandler' */ + @Test + public void callbackHandlerTest() { + // TODO: test callbackHandler + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PlayersTest.java b/src/test/java/com/fireblocks/sdk/model/PlayersTest.java new file mode 100644 index 0000000..7adbd90 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PlayersTest.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 Players */ +public class PlayersTest { + private final Players model = new Players(); + + /** Model tests for Players */ + @Test + public void testPlayers() { + // TODO: test Players + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ProviderDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ProviderTest.java similarity index 72% rename from src/test/java/com/fireblocks/sdk/model/ProviderDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/ProviderTest.java index 8d0bc92..13abe62 100644 --- a/src/test/java/com/fireblocks/sdk/model/ProviderDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ProviderTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ProviderDto */ -public class ProviderDtoTest { - private final ProviderDto model = new ProviderDto(); +/** Model tests for Provider */ +public class ProviderTest { + private final Provider model = new Provider(); - /** Model tests for ProviderDto */ + /** Model tests for Provider */ @Test - public void testProviderDto() { - // TODO: test ProviderDto + public void testProvider() { + // TODO: test Provider } /** Test the property 'id' */ @@ -60,4 +60,16 @@ public void termsOfServiceUrlTest() { public void isTermsOfServiceApprovedTest() { // TODO: test isTermsOfServiceApproved } + + /** Test the property 'isPrivate' */ + @Test + public void isPrivateTest() { + // TODO: test isPrivate + } + + /** Test the property 'isLiquidStaking' */ + @Test + public void isLiquidStakingTest() { + // TODO: test isLiquidStaking + } } diff --git a/src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/RelatedRequestTest.java similarity index 77% rename from src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/RelatedRequestTest.java index 831ca19..bbf4b7f 100644 --- a/src/test/java/com/fireblocks/sdk/model/RelatedRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/RelatedRequestTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for RelatedRequestDto */ -public class RelatedRequestDtoTest { - private final RelatedRequestDto model = new RelatedRequestDto(); +/** Model tests for RelatedRequest */ +public class RelatedRequestTest { + private final RelatedRequest model = new RelatedRequest(); - /** Model tests for RelatedRequestDto */ + /** Model tests for RelatedRequest */ @Test - public void testRelatedRequestDto() { - // TODO: test RelatedRequestDto + public void testRelatedRequest() { + // TODO: test RelatedRequest } /** Test the property 'status' */ diff --git a/src/test/java/com/fireblocks/sdk/model/RelatedTransactionDtoTest.java b/src/test/java/com/fireblocks/sdk/model/RelatedTransactionTest.java similarity index 69% rename from src/test/java/com/fireblocks/sdk/model/RelatedTransactionDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/RelatedTransactionTest.java index 1984182..1bdfaf7 100644 --- a/src/test/java/com/fireblocks/sdk/model/RelatedTransactionDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/RelatedTransactionTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for RelatedTransactionDto */ -public class RelatedTransactionDtoTest { - private final RelatedTransactionDto model = new RelatedTransactionDto(); +/** Model tests for RelatedTransaction */ +public class RelatedTransactionTest { + private final RelatedTransaction model = new RelatedTransaction(); - /** Model tests for RelatedTransactionDto */ + /** Model tests for RelatedTransaction */ @Test - public void testRelatedTransactionDto() { - // TODO: test RelatedTransactionDto + public void testRelatedTransaction() { + // TODO: test RelatedTransaction } /** Test the property 'txId' */ diff --git a/src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataDtoTest.java b/src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataTest.java similarity index 55% rename from src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataTest.java index 2f94f93..d221fd7 100644 --- a/src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SolanaBlockchainDataTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for SolanaBlockchainDataDto */ -public class SolanaBlockchainDataDtoTest { - private final SolanaBlockchainDataDto model = new SolanaBlockchainDataDto(); +/** Model tests for SolanaBlockchainData */ +public class SolanaBlockchainDataTest { + private final SolanaBlockchainData model = new SolanaBlockchainData(); - /** Model tests for SolanaBlockchainDataDto */ + /** Model tests for SolanaBlockchainData */ @Test - public void testSolanaBlockchainDataDto() { - // TODO: test SolanaBlockchainDataDto + public void testSolanaBlockchainData() { + // TODO: test SolanaBlockchainData } /** Test the property 'stakeAccountAddress' */ @@ -30,4 +30,10 @@ public void testSolanaBlockchainDataDto() { public void stakeAccountAddressTest() { // TODO: test stakeAccountAddress } + + /** Test the property 'stakeAccountDerivationChangeValue' */ + @Test + public void stakeAccountDerivationChangeValueTest() { + // TODO: test stakeAccountDerivationChangeValue + } } diff --git a/src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/SplitRequestTest.java similarity index 78% rename from src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/SplitRequestTest.java index f330bb2..175487c 100644 --- a/src/test/java/com/fireblocks/sdk/model/UnstakeRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SplitRequestTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for UnstakeRequestDto */ -public class UnstakeRequestDtoTest { - private final UnstakeRequestDto model = new UnstakeRequestDto(); +/** Model tests for SplitRequest */ +public class SplitRequestTest { + private final SplitRequest model = new SplitRequest(); - /** Model tests for UnstakeRequestDto */ + /** Model tests for SplitRequest */ @Test - public void testUnstakeRequestDto() { - // TODO: test UnstakeRequestDto + public void testSplitRequest() { + // TODO: test SplitRequest } /** Test the property 'id' */ @@ -31,6 +31,12 @@ public void idTest() { // TODO: test id } + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + /** Test the property 'fee' */ @Test public void feeTest() { @@ -48,10 +54,4 @@ public void feeLevelTest() { public void txNoteTest() { // TODO: test txNote } - - /** Test the property 'amount' */ - @Test - public void amountTest() { - // TODO: test amount - } } diff --git a/src/test/java/com/fireblocks/sdk/model/StakeResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/SplitResponseTest.java similarity index 67% rename from src/test/java/com/fireblocks/sdk/model/StakeResponseDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/SplitResponseTest.java index d42862c..0a0d4c7 100644 --- a/src/test/java/com/fireblocks/sdk/model/StakeResponseDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/SplitResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for StakeResponseDto */ -public class StakeResponseDtoTest { - private final StakeResponseDto model = new StakeResponseDto(); +/** Model tests for SplitResponse */ +public class SplitResponseTest { + private final SplitResponse model = new SplitResponse(); - /** Model tests for StakeResponseDto */ + /** Model tests for SplitResponse */ @Test - public void testStakeResponseDto() { - // TODO: test StakeResponseDto + public void testSplitResponse() { + // TODO: test SplitResponse } /** Test the property 'id' */ diff --git a/src/test/java/com/fireblocks/sdk/model/StakeRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/StakeRequestTest.java similarity index 82% rename from src/test/java/com/fireblocks/sdk/model/StakeRequestDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/StakeRequestTest.java index 6eefce2..851ffdf 100644 --- a/src/test/java/com/fireblocks/sdk/model/StakeRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/StakeRequestTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for StakeRequestDto */ -public class StakeRequestDtoTest { - private final StakeRequestDto model = new StakeRequestDto(); +/** Model tests for StakeRequest */ +public class StakeRequestTest { + private final StakeRequest model = new StakeRequest(); - /** Model tests for StakeRequestDto */ + /** Model tests for StakeRequest */ @Test - public void testStakeRequestDto() { - // TODO: test StakeRequestDto + public void testStakeRequest() { + // TODO: test StakeRequest } /** Test the property 'vaultAccountId' */ diff --git a/src/test/java/com/fireblocks/sdk/model/ExecuteActionResponseTest.java b/src/test/java/com/fireblocks/sdk/model/StakeResponseTest.java similarity index 65% rename from src/test/java/com/fireblocks/sdk/model/ExecuteActionResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/StakeResponseTest.java index b70b1aa..34c826c 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExecuteActionResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/StakeResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ExecuteActionResponse */ -public class ExecuteActionResponseTest { - private final ExecuteActionResponse model = new ExecuteActionResponse(); +/** Model tests for StakeResponse */ +public class StakeResponseTest { + private final StakeResponse model = new StakeResponse(); - /** Model tests for ExecuteActionResponse */ + /** Model tests for StakeResponse */ @Test - public void testExecuteActionResponse() { - // TODO: test ExecuteActionResponse + public void testStakeResponse() { + // TODO: test StakeResponse } /** Test the property 'id' */ diff --git a/src/test/java/com/fireblocks/sdk/model/StakingProviderTest.java b/src/test/java/com/fireblocks/sdk/model/StakingProviderTest.java new file mode 100644 index 0000000..6535fb0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/StakingProviderTest.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 StakingProvider */ +public class StakingProviderTest { + /** Model tests for StakingProvider */ + @Test + public void testStakingProvider() { + // TODO: test StakingProvider + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/StatusTest.java b/src/test/java/com/fireblocks/sdk/model/StatusTest.java new file mode 100644 index 0000000..7a1177f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/StatusTest.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 Status */ +public class StatusTest { + private final Status model = new Status(); + + /** Model tests for Status */ + @Test + public void testStatus() { + // TODO: test Status + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.java new file mode 100644 index 0000000..4ba5460 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.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 TokenInfoNotFoundErrorResponse */ +public class TokenInfoNotFoundErrorResponseTest { + private final TokenInfoNotFoundErrorResponse model = new TokenInfoNotFoundErrorResponse(); + + /** Model tests for TokenInfoNotFoundErrorResponse */ + @Test + public void testTokenInfoNotFoundErrorResponse() { + // TODO: test TokenInfoNotFoundErrorResponse + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionReceiptResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionReceiptResponseTest.java new file mode 100644 index 0000000..226ae9d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransactionReceiptResponseTest.java @@ -0,0 +1,111 @@ +/* + * 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 TransactionReceiptResponse */ +public class TransactionReceiptResponseTest { + private final TransactionReceiptResponse model = new TransactionReceiptResponse(); + + /** Model tests for TransactionReceiptResponse */ + @Test + public void testTransactionReceiptResponse() { + // TODO: test TransactionReceiptResponse + } + + /** Test the property 'blockHash' */ + @Test + public void blockHashTest() { + // TODO: test blockHash + } + + /** Test the property 'blockNumber' */ + @Test + public void blockNumberTest() { + // TODO: test blockNumber + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'cumulativeGasUsed' */ + @Test + public void cumulativeGasUsedTest() { + // TODO: test cumulativeGasUsed + } + + /** Test the property 'effectiveGasPrice' */ + @Test + public void effectiveGasPriceTest() { + // TODO: test effectiveGasPrice + } + + /** Test the property 'from' */ + @Test + public void fromTest() { + // TODO: test from + } + + /** Test the property 'gasUsed' */ + @Test + public void gasUsedTest() { + // TODO: test gasUsed + } + + /** Test the property 'logs' */ + @Test + public void logsTest() { + // TODO: test logs + } + + /** Test the property 'logsBloom' */ + @Test + public void logsBloomTest() { + // TODO: test logsBloom + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'to' */ + @Test + public void toTest() { + // TODO: test to + } + + /** Test the property 'transactionHash' */ + @Test + public void transactionHashTest() { + // TODO: test transactionHash + } + + /** Test the property 'transactionIndex' */ + @Test + public void transactionIndexTest() { + // TODO: test transactionIndex + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TxLogTest.java b/src/test/java/com/fireblocks/sdk/model/TxLogTest.java new file mode 100644 index 0000000..d557d8f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TxLogTest.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 TxLog */ +public class TxLogTest { + private final TxLog model = new TxLog(); + + /** Model tests for TxLog */ + @Test + public void testTxLog() { + // TODO: test TxLog + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } + + /** Test the property 'topics' */ + @Test + public void topicsTest() { + // TODO: test topics + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'blockNumber' */ + @Test + public void blockNumberTest() { + // TODO: test blockNumber + } + + /** Test the property 'transactionHash' */ + @Test + public void transactionHashTest() { + // TODO: test transactionHash + } + + /** Test the property 'transactionIndex' */ + @Test + public void transactionIndexTest() { + // TODO: test transactionIndex + } + + /** Test the property 'blockHash' */ + @Test + public void blockHashTest() { + // TODO: test blockHash + } + + /** Test the property 'logIndex' */ + @Test + public void logIndexTest() { + // TODO: test logIndex + } + + /** Test the property 'removed' */ + @Test + public void removedTest() { + // TODO: test removed + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UnstakeRequestTest.java similarity index 59% rename from src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java rename to src/test/java/com/fireblocks/sdk/model/UnstakeRequestTest.java index 2f1ce4c..069c7a4 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExecuteActionRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UnstakeRequestTest.java @@ -15,38 +15,20 @@ import org.junit.Test; -/** Model tests for ExecuteActionRequest */ -public class ExecuteActionRequestTest { - private final ExecuteActionRequest model = new ExecuteActionRequest(); +/** Model tests for UnstakeRequest */ +public class UnstakeRequestTest { + private final UnstakeRequest model = new UnstakeRequest(); - /** Model tests for ExecuteActionRequest */ + /** Model tests for UnstakeRequest */ @Test - public void testExecuteActionRequest() { - // TODO: test ExecuteActionRequest + public void testUnstakeRequest() { + // TODO: test UnstakeRequest } - /** Test the property 'vaultAccountId' */ - @Test - public void vaultAccountIdTest() { - // TODO: test vaultAccountId - } - - /** Test the property 'providerId' */ - @Test - public void providerIdTest() { - // TODO: test providerId - } - - /** Test the property 'stakeAmount' */ - @Test - public void stakeAmountTest() { - // TODO: test stakeAmount - } - - /** Test the property 'txNote' */ + /** Test the property 'id' */ @Test - public void txNoteTest() { - // TODO: test txNote + public void idTest() { + // TODO: test id } /** Test the property 'fee' */ @@ -61,10 +43,10 @@ public void feeLevelTest() { // TODO: test feeLevel } - /** Test the property 'id' */ + /** Test the property 'txNote' */ @Test - public void idTest() { - // TODO: test id + public void txNoteTest() { + // TODO: test txNote } /** Test the property 'amount' */ diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.java new file mode 100644 index 0000000..4fb7744 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerRequestTest.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 UpdateCallbackHandlerRequest */ +public class UpdateCallbackHandlerRequestTest { + private final UpdateCallbackHandlerRequest model = new UpdateCallbackHandlerRequest(); + + /** Model tests for UpdateCallbackHandlerRequest */ + @Test + public void testUpdateCallbackHandlerRequest() { + // TODO: test UpdateCallbackHandlerRequest + } + + /** Test the property 'callbackHandler' */ + @Test + public void callbackHandlerTest() { + // TODO: test callbackHandler + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.java new file mode 100644 index 0000000..3266b65 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateCallbackHandlerResponseTest.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 UpdateCallbackHandlerResponse */ +public class UpdateCallbackHandlerResponseTest { + private final UpdateCallbackHandlerResponse model = new UpdateCallbackHandlerResponse(); + + /** Model tests for UpdateCallbackHandlerResponse */ + @Test + public void testUpdateCallbackHandlerResponse() { + // TODO: test UpdateCallbackHandlerResponse + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'callbackHandler' */ + @Test + public void callbackHandlerTest() { + // TODO: test callbackHandler + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.java new file mode 100644 index 0000000..ce3a244 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/UpdateWebhookRequestTest.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 UpdateWebhookRequest */ +public class UpdateWebhookRequestTest { + private final UpdateWebhookRequest model = new UpdateWebhookRequest(); + + /** Model tests for UpdateWebhookRequest */ + @Test + public void testUpdateWebhookRequest() { + // TODO: test UpdateWebhookRequest + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'enabled' */ + @Test + public void enabledTest() { + // TODO: test enabled + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ValidatorDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ValidatorTest.java similarity index 68% rename from src/test/java/com/fireblocks/sdk/model/ValidatorDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/ValidatorTest.java index 2762621..61bfe61 100644 --- a/src/test/java/com/fireblocks/sdk/model/ValidatorDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ValidatorTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ValidatorDto */ -public class ValidatorDtoTest { - private final ValidatorDto model = new ValidatorDto(); +/** Model tests for Validator */ +public class ValidatorTest { + private final Validator model = new Validator(); - /** Model tests for ValidatorDto */ + /** Model tests for Validator */ @Test - public void testValidatorDto() { - // TODO: test ValidatorDto + public void testValidator() { + // TODO: test Validator } /** Test the property 'chainDescriptor' */ @@ -36,4 +36,10 @@ public void chainDescriptorTest() { public void feePercentTest() { // TODO: test feePercent } + + /** Test the property 'isPrivate' */ + @Test + public void isPrivateTest() { + // TODO: test isPrivate + } } diff --git a/src/test/java/com/fireblocks/sdk/model/VersionTest.java b/src/test/java/com/fireblocks/sdk/model/VersionTest.java new file mode 100644 index 0000000..89da8e0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/VersionTest.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 Version */ +public class VersionTest { + private final Version model = new Version(); + + /** Model tests for Version */ + @Test + public void testVersion() { + // TODO: test Version + } + + /** Test the property 'hash' */ + @Test + public void hashTest() { + // TODO: test hash + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java b/src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java new file mode 100644 index 0000000..69cf012 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WebhookEventTest.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 WebhookEvent */ +public class WebhookEventTest { + /** Model tests for WebhookEvent */ + @Test + public void testWebhookEvent() { + // TODO: test WebhookEvent + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java new file mode 100644 index 0000000..8111f27 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.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 WebhookPaginatedResponse */ +public class WebhookPaginatedResponseTest { + private final WebhookPaginatedResponse model = new WebhookPaginatedResponse(); + + /** Model tests for WebhookPaginatedResponse */ + @Test + public void testWebhookPaginatedResponse() { + // TODO: test WebhookPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WebhookTest.java b/src/test/java/com/fireblocks/sdk/model/WebhookTest.java new file mode 100644 index 0000000..4cb6e66 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WebhookTest.java @@ -0,0 +1,69 @@ +/* + * 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 Webhook */ +public class WebhookTest { + private final Webhook model = new Webhook(); + + /** Model tests for Webhook */ + @Test + public void testWebhook() { + // TODO: test Webhook + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'url' */ + @Test + public void urlTest() { + // TODO: test url + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'createdAt' */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WithdrawRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/WithdrawRequestTest.java similarity index 76% rename from src/test/java/com/fireblocks/sdk/model/WithdrawRequestDtoTest.java rename to src/test/java/com/fireblocks/sdk/model/WithdrawRequestTest.java index ec8b3d3..e5ae396 100644 --- a/src/test/java/com/fireblocks/sdk/model/WithdrawRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/WithdrawRequestTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for WithdrawRequestDto */ -public class WithdrawRequestDtoTest { - private final WithdrawRequestDto model = new WithdrawRequestDto(); +/** Model tests for WithdrawRequest */ +public class WithdrawRequestTest { + private final WithdrawRequest model = new WithdrawRequest(); - /** Model tests for WithdrawRequestDto */ + /** Model tests for WithdrawRequest */ @Test - public void testWithdrawRequestDto() { - // TODO: test WithdrawRequestDto + public void testWithdrawRequest() { + // TODO: test WithdrawRequest } /** Test the property 'id' */