From 542ab56a96115e11df105dfa5e0a8854b4767cf1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:01:38 +0300 Subject: [PATCH] Generated SDK #237 (#70) Co-authored-by: fireblocks_dx_team --- .openapi-generator/FILES | 54 +- README.md | 37 +- api/openapi.yaml | 1545 ++++++++++++++--- build.gradle | 2 +- docs/AddAbiRequestDto.md | 16 + docs/AssetDoesNotExistHttpError.md | 15 - docs/AuditLogsApi.md | 84 - docs/BlockchainsAssetsApi.md | 2 +- docs/CollectionBurnRequestDto.md | 15 + docs/CollectionBurnResponseDto.md | 13 + docs/CollectionDeployRequestDto.md | 19 + docs/CollectionLinkDto.md | 26 + docs/CollectionMintRequestDto.md | 18 + docs/CollectionMintResponseDto.md | 13 + docs/CollectionOwnershipResponse.md | 3 + docs/CollectionTokenMetadataAttributeDto.md | 15 + docs/CollectionTokenMetadataDto.md | 18 + docs/CollectionType.md | 13 + docs/ContractWithAbiDto.md | 19 + docs/CreateSigningKeyDto.md | 1 + docs/CreateSigningKeyDtoProofOfOwnership.md | 15 + docs/CreateVaultAccountRequest.md | 11 + docs/DeployedContractsApi.md | 174 ++ docs/ExchangeAsset.md | 1 + docs/FetchAbiRequestDto.md | 14 + docs/GetAuditLogsResponseDTO.md | 15 - docs/GetLinkedCollectionsPaginatedResponse.md | 14 + docs/NftsApi.md | 4 +- docs/RescanTransaction.md | 14 + docs/TokenLinkDto.md | 4 +- docs/TokenLinkRequestDto.md | 4 +- docs/TokenOwnershipResponse.md | 3 + docs/TokenResponse.md | 3 + docs/TokenizationApi.md | 612 ++++++- docs/TransactionRequest.md | 2 + docs/TransactionsApi.md | 86 + docs/ValidatedTransactionsForRescan.md | 15 + pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../com/fireblocks/sdk/api/AuditLogsApi.java | 79 - .../sdk/api/DeployedContractsApi.java | 160 ++ .../fireblocks/sdk/api/TokenizationApi.java | 551 +++++- .../fireblocks/sdk/api/TransactionsApi.java | 87 + .../sdk/model/AddAbiRequestDto.java | 286 +++ .../sdk/model/CollectionBurnRequestDto.java | 224 +++ .../sdk/model/CollectionBurnResponseDto.java | 139 ++ .../sdk/model/CollectionDeployRequestDto.java | 390 +++++ .../sdk/model/CollectionLinkDto.java | 337 ++++ .../sdk/model/CollectionMintRequestDto.java | 340 ++++ .../sdk/model/CollectionMintResponseDto.java | 139 ++ .../model/CollectionOwnershipResponse.java | 8 +- .../CollectionTokenMetadataAttributeDto.java | 226 +++ .../sdk/model/CollectionTokenMetadataDto.java | 371 ++++ .../fireblocks/sdk/model/CollectionType.java | 64 + .../sdk/model/ContractWithAbiDto.java | 409 +++++ .../sdk/model/CreateSigningKeyDto.java | 42 +- ... CreateSigningKeyDtoProofOfOwnership.java} | 116 +- .../sdk/model/CreateVaultAccountRequest.java | 131 +- .../fireblocks/sdk/model/ExchangeAsset.java | 46 +- .../sdk/model/FetchAbiRequestDto.java | 185 ++ ...GetLinkedCollectionsPaginatedResponse.java | 204 +++ .../sdk/model/ModifySigningKeyDto.java | 2 +- .../sdk/model/RescanTransaction.java | 181 ++ .../fireblocks/sdk/model/TokenLinkDto.java | 5 +- .../sdk/model/TokenLinkRequestDto.java | 96 +- .../sdk/model/TokenOwnershipResponse.java | 8 +- .../fireblocks/sdk/model/TokenResponse.java | 8 +- .../sdk/model/TransactionRequest.java | 92 +- ...va => ValidatedTransactionsForRescan.java} | 180 +- .../fireblocks/sdk/api/AuditLogsApiTest.java | 15 - .../sdk/api/DeployedContractsApiTest.java | 33 + .../sdk/api/TokenizationApiTest.java | 118 +- .../sdk/api/TransactionsApiTest.java | 19 + .../sdk/model/AddAbiRequestDtoTest.java | 51 + .../model/CollectionBurnRequestDtoTest.java | 45 + .../model/CollectionBurnResponseDtoTest.java | 33 + .../model/CollectionDeployRequestDtoTest.java | 69 + .../sdk/model/CollectionLinkDtoTest.java | 57 + .../model/CollectionMintRequestDtoTest.java | 63 + .../model/CollectionMintResponseDtoTest.java | 33 + ...llectionTokenMetadataAttributeDtoTest.java | 46 + .../model/CollectionTokenMetadataDtoTest.java | 63 + .../sdk/model/CollectionTypeTest.java | 25 + .../sdk/model/ContractWithAbiDtoTest.java | 69 + ...ateSigningKeyDtoProofOfOwnershipTest.java} | 25 +- .../sdk/model/CreateSigningKeyDtoTest.java | 6 + .../model/CreateVaultAccountRequestTest.java | 12 + .../sdk/model/ExchangeAssetTest.java | 6 + .../sdk/model/FetchAbiRequestDtoTest.java | 39 + ...nkedCollectionsPaginatedResponseTest.java} | 25 +- .../sdk/model/RescanTransactionTest.java | 39 + .../sdk/model/TokenLinkRequestDtoTest.java | 12 + .../sdk/model/TransactionRequestTest.java | 12 + .../ValidatedTransactionsForRescanTest.java | 45 + 94 files changed, 8314 insertions(+), 675 deletions(-) create mode 100644 docs/AddAbiRequestDto.md delete mode 100644 docs/AssetDoesNotExistHttpError.md create mode 100644 docs/CollectionBurnRequestDto.md create mode 100644 docs/CollectionBurnResponseDto.md create mode 100644 docs/CollectionDeployRequestDto.md create mode 100644 docs/CollectionLinkDto.md create mode 100644 docs/CollectionMintRequestDto.md create mode 100644 docs/CollectionMintResponseDto.md create mode 100644 docs/CollectionTokenMetadataAttributeDto.md create mode 100644 docs/CollectionTokenMetadataDto.md create mode 100644 docs/CollectionType.md create mode 100644 docs/ContractWithAbiDto.md create mode 100644 docs/CreateSigningKeyDtoProofOfOwnership.md create mode 100644 docs/FetchAbiRequestDto.md delete mode 100644 docs/GetAuditLogsResponseDTO.md create mode 100644 docs/GetLinkedCollectionsPaginatedResponse.md create mode 100644 docs/RescanTransaction.md create mode 100644 docs/ValidatedTransactionsForRescan.md create mode 100644 src/main/java/com/fireblocks/sdk/model/AddAbiRequestDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionDeployRequestDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionLinkDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionMintRequestDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionMintResponseDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/CollectionType.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ContractWithAbiDto.java rename src/main/java/com/fireblocks/sdk/model/{AssetDoesNotExistHttpError.java => CreateSigningKeyDtoProofOfOwnership.java} (53%) create mode 100644 src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RescanTransaction.java rename src/main/java/com/fireblocks/sdk/model/{GetAuditLogsResponseDTO.java => ValidatedTransactionsForRescan.java} (52%) create mode 100644 src/test/java/com/fireblocks/sdk/model/AddAbiRequestDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionDeployRequestDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionLinkDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionMintRequestDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionMintResponseDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ContractWithAbiDtoTest.java rename src/test/java/com/fireblocks/sdk/model/{AssetDoesNotExistHttpErrorTest.java => CreateSigningKeyDtoProofOfOwnershipTest.java} (51%) create mode 100644 src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.java rename src/test/java/com/fireblocks/sdk/model/{GetAuditLogsResponseDTOTest.java => GetLinkedCollectionsPaginatedResponseTest.java} (52%) create mode 100644 src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescanTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index eda45a6..fe52699 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -12,6 +12,7 @@ docs/APIUser.md docs/AbiFunction.md docs/Account.md docs/AccountType.md +docs/AddAbiRequestDto.md docs/AddAssetToExternalWalletRequest.md docs/AddAssetToExternalWalletRequestOneOf.md docs/AddAssetToExternalWalletRequestOneOf1.md @@ -34,7 +35,6 @@ docs/AssetAlreadyExistHttpError.md docs/AssetAmount.md docs/AssetBadRequestErrorResponse.md docs/AssetConflictErrorResponse.md -docs/AssetDoesNotExistHttpError.md docs/AssetForbiddenErrorResponse.md docs/AssetInternalServerErrorResponse.md docs/AssetMetadataDto.md @@ -57,8 +57,17 @@ docs/BlockInfo.md docs/BlockchainsAssetsApi.md docs/CancelTransactionResponse.md docs/ChainInfoResponseDto.md +docs/CollectionBurnRequestDto.md +docs/CollectionBurnResponseDto.md +docs/CollectionDeployRequestDto.md +docs/CollectionLinkDto.md docs/CollectionMetadataDto.md +docs/CollectionMintRequestDto.md +docs/CollectionMintResponseDto.md docs/CollectionOwnershipResponse.md +docs/CollectionTokenMetadataAttributeDto.md +docs/CollectionTokenMetadataDto.md +docs/CollectionType.md docs/ComplianceApi.md docs/ComplianceResult.md docs/ComplianceScreeningConfigurationApi.md @@ -82,6 +91,7 @@ docs/ContractMetadataDto.md docs/ContractTemplateDto.md docs/ContractTemplatesApi.md docs/ContractUploadRequest.md +docs/ContractWithAbiDto.md docs/ContractsApi.md docs/ConversionConfigOperation.md docs/ConversionOperationConfigParams.md @@ -118,6 +128,7 @@ docs/CreateNcwConnectionRequest.md docs/CreateNetworkIdRequest.md docs/CreatePayoutRequest.md docs/CreateSigningKeyDto.md +docs/CreateSigningKeyDtoProofOfOwnership.md docs/CreateTokenRequestDto.md docs/CreateTokenRequestDtoCreateParams.md docs/CreateTransactionResponse.md @@ -189,6 +200,7 @@ docs/ExecutionTransferOperation.md docs/ExternalWalletAsset.md docs/ExternalWalletsApi.md docs/FeeInfo.md +docs/FetchAbiRequestDto.md docs/FiatAccount.md docs/FiatAccountType.md docs/FiatAccountsApi.md @@ -202,11 +214,11 @@ docs/GasStationPropertiesResponse.md docs/GasStationsApi.md docs/GetAPIUsersResponse.md docs/GetAuditLogsResponse.md -docs/GetAuditLogsResponseDTO.md docs/GetConnectionsResponse.md docs/GetConsoleUsersResponse.md docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md +docs/GetLinkedCollectionsPaginatedResponse.md docs/GetMaxSpendableAmountResponse.md docs/GetNFTsResponse.md docs/GetOtaStatusResponse.md @@ -309,6 +321,7 @@ docs/RelatedTransactionDto.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md +docs/RescanTransaction.md docs/ResendTransactionWebhooksRequest.md docs/ResendWebhooksByTransactionIdResponse.md docs/ResendWebhooksResponse.md @@ -463,6 +476,7 @@ docs/UserStatus.md docs/UserType.md docs/UsersApi.md docs/ValidateAddressResponse.md +docs/ValidatedTransactionsForRescan.md docs/ValidationKeyDto.md docs/ValidatorDto.md docs/VaultAccount.md @@ -555,6 +569,7 @@ src/main/java/com/fireblocks/sdk/model/AbiFunction.java src/main/java/com/fireblocks/sdk/model/AbstractOpenApiSchema.java src/main/java/com/fireblocks/sdk/model/Account.java src/main/java/com/fireblocks/sdk/model/AccountType.java +src/main/java/com/fireblocks/sdk/model/AddAbiRequestDto.java src/main/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequest.java src/main/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf.java src/main/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf1.java @@ -576,7 +591,6 @@ 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/AssetConflictErrorResponse.java -src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.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/AssetMetadataDto.java @@ -596,8 +610,17 @@ 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/CancelTransactionResponse.java src/main/java/com/fireblocks/sdk/model/ChainInfoResponseDto.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 +src/main/java/com/fireblocks/sdk/model/CollectionLinkDto.java src/main/java/com/fireblocks/sdk/model/CollectionMetadataDto.java +src/main/java/com/fireblocks/sdk/model/CollectionMintRequestDto.java +src/main/java/com/fireblocks/sdk/model/CollectionMintResponseDto.java src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java +src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java +src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java +src/main/java/com/fireblocks/sdk/model/CollectionType.java src/main/java/com/fireblocks/sdk/model/ComplianceResult.java src/main/java/com/fireblocks/sdk/model/ComplianceScreeningResult.java src/main/java/com/fireblocks/sdk/model/ConfigChangeRequestStatus.java @@ -616,6 +639,7 @@ src/main/java/com/fireblocks/sdk/model/ContractDoc.java src/main/java/com/fireblocks/sdk/model/ContractMetadataDto.java src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java +src/main/java/com/fireblocks/sdk/model/ContractWithAbiDto.java src/main/java/com/fireblocks/sdk/model/ConversionConfigOperation.java src/main/java/com/fireblocks/sdk/model/ConversionOperationConfigParams.java src/main/java/com/fireblocks/sdk/model/ConversionOperationExecution.java @@ -650,6 +674,7 @@ src/main/java/com/fireblocks/sdk/model/CreateNcwConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java src/main/java/com/fireblocks/sdk/model/CreatePayoutRequest.java src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java +src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnership.java src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java src/main/java/com/fireblocks/sdk/model/CreateTransactionResponse.java @@ -718,6 +743,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/FetchAbiRequestDto.java src/main/java/com/fireblocks/sdk/model/FiatAccount.java src/main/java/com/fireblocks/sdk/model/FiatAccountType.java src/main/java/com/fireblocks/sdk/model/FiatAsset.java @@ -729,11 +755,11 @@ src/main/java/com/fireblocks/sdk/model/GasStationConfigurationResponse.java src/main/java/com/fireblocks/sdk/model/GasStationPropertiesResponse.java src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java -src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTO.java src/main/java/com/fireblocks/sdk/model/GetConnectionsResponse.java src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponse.java 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/GetNFTsResponse.java src/main/java/com/fireblocks/sdk/model/GetOtaStatusResponse.java @@ -827,6 +853,7 @@ src/main/java/com/fireblocks/sdk/model/RelatedTransactionDto.java src/main/java/com/fireblocks/sdk/model/RemoveCollateralRequestBody.java src/main/java/com/fireblocks/sdk/model/RenameCosigner.java src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java +src/main/java/com/fireblocks/sdk/model/RescanTransaction.java src/main/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequest.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksResponse.java @@ -973,6 +1000,7 @@ src/main/java/com/fireblocks/sdk/model/UserRole.java src/main/java/com/fireblocks/sdk/model/UserStatus.java 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/VaultAccount.java @@ -1040,6 +1068,7 @@ src/test/java/com/fireblocks/sdk/model/APIUserTest.java src/test/java/com/fireblocks/sdk/model/AbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/AccountTest.java src/test/java/com/fireblocks/sdk/model/AccountTypeTest.java +src/test/java/com/fireblocks/sdk/model/AddAbiRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf1Test.java src/test/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2Test.java src/test/java/com/fireblocks/sdk/model/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOfTest.java @@ -1061,7 +1090,6 @@ 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/AssetConflictErrorResponseTest.java -src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.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/AssetMetadataDtoTest.java @@ -1081,8 +1109,17 @@ 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/CancelTransactionResponseTest.java src/test/java/com/fireblocks/sdk/model/ChainInfoResponseDtoTest.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 +src/test/java/com/fireblocks/sdk/model/CollectionLinkDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionMetadataDtoTest.java +src/test/java/com/fireblocks/sdk/model/CollectionMintRequestDtoTest.java +src/test/java/com/fireblocks/sdk/model/CollectionMintResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionOwnershipResponseTest.java +src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java +src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java +src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultTest.java src/test/java/com/fireblocks/sdk/model/ComplianceScreeningResultTest.java src/test/java/com/fireblocks/sdk/model/ConfigChangeRequestStatusTest.java @@ -1101,6 +1138,7 @@ src/test/java/com/fireblocks/sdk/model/ContractDocTest.java src/test/java/com/fireblocks/sdk/model/ContractMetadataDtoTest.java src/test/java/com/fireblocks/sdk/model/ContractTemplateDtoTest.java src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java +src/test/java/com/fireblocks/sdk/model/ContractWithAbiDtoTest.java src/test/java/com/fireblocks/sdk/model/ConversionConfigOperationTest.java src/test/java/com/fireblocks/sdk/model/ConversionOperationConfigParamsTest.java src/test/java/com/fireblocks/sdk/model/ConversionOperationExecutionOutputTest.java @@ -1134,6 +1172,7 @@ src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNcwConnectionRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNetworkIdRequestTest.java src/test/java/com/fireblocks/sdk/model/CreatePayoutRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnershipTest.java src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java @@ -1203,6 +1242,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/FetchAbiRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/FiatAccountTest.java src/test/java/com/fireblocks/sdk/model/FiatAccountTypeTest.java src/test/java/com/fireblocks/sdk/model/FiatAssetTest.java @@ -1213,12 +1253,12 @@ src/test/java/com/fireblocks/sdk/model/GasStationConfigurationResponseTest.java src/test/java/com/fireblocks/sdk/model/GasStationConfigurationTest.java src/test/java/com/fireblocks/sdk/model/GasStationPropertiesResponseTest.java src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java -src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTOTest.java src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConnectionsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponseTest.java 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/GetNFTsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetOtaStatusResponseTest.java @@ -1312,6 +1352,7 @@ src/test/java/com/fireblocks/sdk/model/RelatedTransactionDtoTest.java src/test/java/com/fireblocks/sdk/model/RemoveCollateralRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java +src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.java src/test/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequestTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksResponseTest.java @@ -1458,6 +1499,7 @@ src/test/java/com/fireblocks/sdk/model/UserRoleTest.java src/test/java/com/fireblocks/sdk/model/UserStatusTest.java 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/VaultAccountTest.java diff --git a/README.md b/README.md index d7adc26..47bae68 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 3.1.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:3.1.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-3.1.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -145,7 +145,6 @@ Class | Method | HTTP request | Description *ApiUserApi* | [**getApiUsers**](docs/ApiUserApi.md#getApiUsers) | **GET** /management/api_users | Get Api users *AssetsApi* | [**createAssetsBulk**](docs/AssetsApi.md#createAssetsBulk) | **POST** /vault/assets/bulk | Bulk creation of wallets *AuditLogsApi* | [**getAuditLogs**](docs/AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs -*AuditLogsApi* | [**getAudits**](docs/AuditLogsApi.md#getAudits) | **GET** /audits | Get audit logs *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 @@ -182,6 +181,8 @@ Class | Method | HTTP request | Description *CosignersBetaApi* | [**getCosigner**](docs/CosignersBetaApi.md#getCosigner) | **GET** /cosigners/{cosignerId} | Get cosigner *CosignersBetaApi* | [**getCosigners**](docs/CosignersBetaApi.md#getCosigners) | **GET** /cosigners | Get all cosigners *CosignersBetaApi* | [**renameCosigner**](docs/CosignersBetaApi.md#renameCosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner +*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 @@ -294,11 +295,18 @@ Class | Method | HTTP request | Description *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 | +*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 +*TokenizationApi* | [**getCollectionById**](docs/TokenizationApi.md#getCollectionById) | **GET** /tokenization/collections/{id} | Get a collection by id +*TokenizationApi* | [**getLinkedCollections**](docs/TokenizationApi.md#getLinkedCollections) | **GET** /tokenization/collections | Get collections *TokenizationApi* | [**getLinkedToken**](docs/TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token *TokenizationApi* | [**getLinkedTokens**](docs/TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens *TokenizationApi* | [**issueNewToken**](docs/TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token -*TokenizationApi* | [**link**](docs/TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a token +*TokenizationApi* | [**link**](docs/TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a contract +*TokenizationApi* | [**mintCollectionToken**](docs/TokenizationApi.md#mintCollectionToken) | **POST** /tokenization/collections/{id}/tokens/mint | Mint tokens *TokenizationApi* | [**unlink**](docs/TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token +*TokenizationApi* | [**unlinkCollection**](docs/TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link *TransactionsApi* | [**cancelTransaction**](docs/TransactionsApi.md#cancelTransaction) | **POST** /transactions/{txId}/cancel | Cancel a transaction *TransactionsApi* | [**createTransaction**](docs/TransactionsApi.md#createTransaction) | **POST** /transactions | Create a new transaction *TransactionsApi* | [**dropTransaction**](docs/TransactionsApi.md#dropTransaction) | **POST** /transactions/{txId}/drop | Drop ETH transaction by ID @@ -308,6 +316,7 @@ Class | Method | HTTP request | Description *TransactionsApi* | [**getTransaction**](docs/TransactionsApi.md#getTransaction) | **GET** /transactions/{txId} | Find a specific transaction by Fireblocks transaction ID *TransactionsApi* | [**getTransactionByExternalId**](docs/TransactionsApi.md#getTransactionByExternalId) | **GET** /transactions/external_tx_id/{externalTxId} | Find a specific transaction by external transaction ID *TransactionsApi* | [**getTransactions**](docs/TransactionsApi.md#getTransactions) | **GET** /transactions | List transaction history +*TransactionsApi* | [**rescanTransactionsBeta**](docs/TransactionsApi.md#rescanTransactionsBeta) | **POST** /transactions/rescan | rescan array of transactions *TransactionsApi* | [**setConfirmationThresholdByTransactionHash**](docs/TransactionsApi.md#setConfirmationThresholdByTransactionHash) | **POST** /txHash/{txHash}/set_confirmation_threshold | Set confirmation threshold by transaction hash *TransactionsApi* | [**setTransactionConfirmationThreshold**](docs/TransactionsApi.md#setTransactionConfirmationThreshold) | **POST** /transactions/{txId}/set_confirmation_threshold | Set confirmation threshold by transaction ID *TransactionsApi* | [**unfreezeTransaction**](docs/TransactionsApi.md#unfreezeTransaction) | **POST** /transactions/{txId}/unfreeze | Unfreeze a transaction @@ -364,6 +373,7 @@ Class | Method | HTTP request | Description - [AbiFunction](docs/AbiFunction.md) - [Account](docs/Account.md) - [AccountType](docs/AccountType.md) + - [AddAbiRequestDto](docs/AddAbiRequestDto.md) - [AddAssetToExternalWalletRequest](docs/AddAssetToExternalWalletRequest.md) - [AddAssetToExternalWalletRequestOneOf](docs/AddAssetToExternalWalletRequestOneOf.md) - [AddAssetToExternalWalletRequestOneOf1](docs/AddAssetToExternalWalletRequestOneOf1.md) @@ -385,7 +395,6 @@ Class | Method | HTTP request | Description - [AssetAmount](docs/AssetAmount.md) - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) - - [AssetDoesNotExistHttpError](docs/AssetDoesNotExistHttpError.md) - [AssetForbiddenErrorResponse](docs/AssetForbiddenErrorResponse.md) - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) - [AssetMetadataDto](docs/AssetMetadataDto.md) @@ -405,8 +414,17 @@ Class | Method | HTTP request | Description - [BlockInfo](docs/BlockInfo.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) - [ChainInfoResponseDto](docs/ChainInfoResponseDto.md) + - [CollectionBurnRequestDto](docs/CollectionBurnRequestDto.md) + - [CollectionBurnResponseDto](docs/CollectionBurnResponseDto.md) + - [CollectionDeployRequestDto](docs/CollectionDeployRequestDto.md) + - [CollectionLinkDto](docs/CollectionLinkDto.md) - [CollectionMetadataDto](docs/CollectionMetadataDto.md) + - [CollectionMintRequestDto](docs/CollectionMintRequestDto.md) + - [CollectionMintResponseDto](docs/CollectionMintResponseDto.md) - [CollectionOwnershipResponse](docs/CollectionOwnershipResponse.md) + - [CollectionTokenMetadataAttributeDto](docs/CollectionTokenMetadataAttributeDto.md) + - [CollectionTokenMetadataDto](docs/CollectionTokenMetadataDto.md) + - [CollectionType](docs/CollectionType.md) - [ComplianceResult](docs/ComplianceResult.md) - [ComplianceScreeningResult](docs/ComplianceScreeningResult.md) - [ConfigChangeRequestStatus](docs/ConfigChangeRequestStatus.md) @@ -425,6 +443,7 @@ Class | Method | HTTP request | Description - [ContractMetadataDto](docs/ContractMetadataDto.md) - [ContractTemplateDto](docs/ContractTemplateDto.md) - [ContractUploadRequest](docs/ContractUploadRequest.md) + - [ContractWithAbiDto](docs/ContractWithAbiDto.md) - [ConversionConfigOperation](docs/ConversionConfigOperation.md) - [ConversionOperationConfigParams](docs/ConversionOperationConfigParams.md) - [ConversionOperationExecution](docs/ConversionOperationExecution.md) @@ -459,6 +478,7 @@ Class | Method | HTTP request | Description - [CreateNetworkIdRequest](docs/CreateNetworkIdRequest.md) - [CreatePayoutRequest](docs/CreatePayoutRequest.md) - [CreateSigningKeyDto](docs/CreateSigningKeyDto.md) + - [CreateSigningKeyDtoProofOfOwnership](docs/CreateSigningKeyDtoProofOfOwnership.md) - [CreateTokenRequestDto](docs/CreateTokenRequestDto.md) - [CreateTokenRequestDtoCreateParams](docs/CreateTokenRequestDtoCreateParams.md) - [CreateTransactionResponse](docs/CreateTransactionResponse.md) @@ -527,6 +547,7 @@ Class | Method | HTTP request | Description - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) - [FeeInfo](docs/FeeInfo.md) + - [FetchAbiRequestDto](docs/FetchAbiRequestDto.md) - [FiatAccount](docs/FiatAccount.md) - [FiatAccountType](docs/FiatAccountType.md) - [FiatAsset](docs/FiatAsset.md) @@ -538,11 +559,11 @@ Class | Method | HTTP request | Description - [GasStationPropertiesResponse](docs/GasStationPropertiesResponse.md) - [GetAPIUsersResponse](docs/GetAPIUsersResponse.md) - [GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - - [GetAuditLogsResponseDTO](docs/GetAuditLogsResponseDTO.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) - [GetConsoleUsersResponse](docs/GetConsoleUsersResponse.md) - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) + - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) - [GetNFTsResponse](docs/GetNFTsResponse.md) - [GetOtaStatusResponse](docs/GetOtaStatusResponse.md) @@ -636,6 +657,7 @@ Class | Method | HTTP request | Description - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) + - [RescanTransaction](docs/RescanTransaction.md) - [ResendTransactionWebhooksRequest](docs/ResendTransactionWebhooksRequest.md) - [ResendWebhooksByTransactionIdResponse](docs/ResendWebhooksByTransactionIdResponse.md) - [ResendWebhooksResponse](docs/ResendWebhooksResponse.md) @@ -782,6 +804,7 @@ Class | Method | HTTP request | Description - [UserStatus](docs/UserStatus.md) - [UserType](docs/UserType.md) - [ValidateAddressResponse](docs/ValidateAddressResponse.md) + - [ValidatedTransactionsForRescan](docs/ValidatedTransactionsForRescan.md) - [ValidationKeyDto](docs/ValidationKeyDto.md) - [ValidatorDto](docs/ValidatorDto.md) - [VaultAccount](docs/VaultAccount.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 4545f74..978418f 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -6628,6 +6628,8 @@ paths: - Blockchain is deprecated. Error code: 1006 - The asset's standard is not supported. Error code: 1007 + + - Unable to get expected metadata: decimals | name | symbol. Error code: 1010 "403": content: application/json: @@ -7823,6 +7825,82 @@ paths: - lang: Python source: "response = fireblocks.transactions.validate_address(asset_id, address);" x-accepts: application/json + /transactions/rescan: + post: + description: | + rescan transaction by running an async job.
+ **Note**: + - These endpoints are currently in beta and might be subject to changes. + - We limit the amount of the transaction to 16 per request. + operationId: rescanTransactionsBeta + 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/RescanTransactionRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ValidatedTransactionsForRescanResponse' + description: A array of validated transactions that were sent to rescan + 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: rescan array of transactions + tags: + - Transactions + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.transactions.rescanTransactionsBeta(transactionsApiRescanTransactionsBetaRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>>\ + \ response = fireblocks.transactions().rescanTransactionsBeta(rescanTransaction,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.transactions.rescan_transactions_beta(rescan_transaction,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.transactions.rescanTransactionsBeta(transactionsApiRescanTransactionsBetaRequest);" + - lang: Java + source: "CompletableFuture>>\ + \ response = fireblocks.transactions().rescanTransactionsBeta(rescanTransaction,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.transactions.rescan_transactions_beta(rescan_transaction,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json /txHash/{txHash}/set_confirmation_threshold: post: description: Overrides the required number of confirmations for transaction @@ -9237,67 +9315,6 @@ paths: - lang: Python source: response = fireblocks.users.get_users(); x-accepts: application/json - /audits: - get: - description: Get all audits - operationId: getAudits - parameters: - - description: The last time period to fetch audit logs - explode: true - in: query - name: timePeriod - required: false - schema: - enum: - - DAY - - WEEK - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetAuditLogsResponseDTO' - description: Audit logs from requested time period - 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 audit logs - tags: - - Audit Logs - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.auditLogs.getAudits(auditLogsApiGetAuditsRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = - fireblocks.auditLogs().getAudits(timePeriod); - name: Fireblocks SDK Java example - - language: python - code: response = fireblocks.audit_logs.get_audits(time_period); - name: Fireblocks SDK Python example - x-codeSamples: - - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.auditLogs.getAudits(auditLogsApiGetAuditsRequest);" - - lang: Java - source: CompletableFuture> response = - fireblocks.auditLogs().getAudits(timePeriod); - - lang: Python - source: response = fireblocks.audit_logs.get_audits(time_period); - x-accepts: application/json /management/audit_logs: get: description: Get all audits @@ -10630,6 +10647,144 @@ paths: source: "response = fireblocks.deployed_contracts.get_deployed_contract_by_address(contract_address,\ \ asset_id);" x-accepts: application/json + /tokenization/contracts/fetch_abi: + post: + description: Fetch the ABI. If not found fetch the ABI from the block explorer + operationId: fetchContractAbi + 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/FetchAbiRequestDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ContractWithAbiDto' + description: Contract ABI found. + "404": + description: Contract ABI not found + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Fetch the contract ABI + tags: + - Deployed Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.deployedContracts.fetchContractAbi(deployedContractsApiFetchContractAbiRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.deployedContracts().fetchContractAbi(fetchAbiRequestDto,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.deployed_contracts.fetch_contract_abi(fetch_abi_request_dto,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.deployedContracts.fetchContractAbi(deployedContractsApiFetchContractAbiRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.deployedContracts().fetchContractAbi(fetchAbiRequestDto,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.deployed_contracts.fetch_contract_abi(fetch_abi_request_dto,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/contracts/abi: + post: + description: Save contract ABI for the tenant + operationId: addContractABI + 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/AddAbiRequestDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ContractWithAbiDto' + description: Contract ABI created (or updated) for the tenant + "409": + description: Contract ABI already exists. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Save contract ABI + tags: + - Deployed Contracts + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.deployedContracts.addContractABI(deployedContractsApiAddContractABIRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.deployedContracts().addContractABI(addAbiRequestDto,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.deployed_contracts.add_contract_a_b_i(add_abi_request_dto,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.deployedContracts.addContractABI(deployedContractsApiAddContractABIRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.deployedContracts().addContractABI(addAbiRequestDto,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.deployed_contracts.add_contract_a_b_i(add_abi_request_dto,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json /tokenization/tokens: get: description: Return all linked tokens (paginated) @@ -10788,9 +10943,7 @@ paths: x-accepts: application/json /tokenization/tokens/link: post: - description: "Link an already existing token (by assetId, collectionId or contractId\ - \ as refId) to a workspace across EVM, Stellar, or Ripple platforms. The token\ - \ will be linked to the workspace if it does not already exist." + description: Link an a contract operationId: link parameters: - description: "A unique identifier for the request. If the request is sent\ @@ -10824,18 +10977,449 @@ paths: $ref: '#/components/schemas/TokenLinkDto' description: "" "404": + description: Could not find the underlying contract to link to + "409": content: application/json: schema: - $ref: '#/components/schemas/AssetDoesNotExistHttpError' - description: Could not find the underlying token identifier (refId) to link - the token to - "409": + $ref: '#/components/schemas/TokenLinkExistsHttpError' + description: "Token link for {refId} already exists" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Link a contract + tags: + - Tokenization + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.tokenization.link(tokenizationApiLinkRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.link(token_link_request_dto, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tokenization.link(tokenizationApiLinkRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.link(token_link_request_dto, idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/tokens/{id}: + delete: + description: "Unlink a token. The token will be unlinked from the workspace.\ + \ The token will not be deleted on chain nor the refId, only the link to the\ + \ workspace will be removed." + operationId: unlink + parameters: + - description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: {} + description: Token unlinked successfully + "204": + content: {} + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundException' + description: Link did not exist + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Unlink a token + tags: + - Tokenization + x-readme: + code-samples: + - language: python + code: token = fireblocks.unlink_token(token_id) + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: const token = await fireblocks.unlinkToken(tokenId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.tokenization.unlink(tokenizationApiUnlinkRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.tokenization().unlink(id); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tokenization.unlink(id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tokenization.unlink(tokenizationApiUnlinkRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.tokenization().unlink(id); + - lang: Python + source: response = fireblocks.tokenization.unlink(id); + x-accepts: application/json + get: + description: "Return a linked token, with its status and metadata." + operationId: getLinkedToken + parameters: + - description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkDto' + description: Token fetched successfully + 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 linked token + tags: + - Tokenization + x-readme: + code-samples: + - language: python + code: token = fireblocks.get_linked_token(token_id) + name: Fireblocks SDK Python example (Legacy) + - language: javascript + code: const token = await fireblocks.getLinkedToken(tokenId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise> = fireblocks.tokenization.getLinkedToken(tokenizationApiGetLinkedTokenRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.tokenization().getLinkedToken(id); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tokenization.get_linked_token(id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tokenization.getLinkedToken(tokenizationApiGetLinkedTokenRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.tokenization().getLinkedToken(id); + - lang: Python + source: response = fireblocks.tokenization.get_linked_token(id); + x-accepts: application/json + /tokenization/collections: + get: + description: Get collections (paginated) + operationId: getLinkedCollections + parameters: + - description: "Page cursor to get the next page, for example - \"MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==\"" + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: "Number of items per page (max 100), requesting more then 100\ + \ will return 100 items" + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 100 + maximum: 100 + minimum: 1 + type: number + style: form + - description: A comma separated list of statuses to filter. Default is "COMPLETED" + example: COMPLETED + explode: true + in: query + name: status + required: false + schema: {} + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetLinkedCollectionsPaginatedResponse' + description: Collection fetched 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 collections + tags: + - Tokenization + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.getLinkedCollections(tokenizationApiGetLinkedCollectionsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.tokenization().getLinkedCollections(pageCursor,\ + \ pageSize, status);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.get_linked_collections(page_cursor,\ + \ page_size, status);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.getLinkedCollections(tokenizationApiGetLinkedCollectionsRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.tokenization().getLinkedCollections(pageCursor,\ + \ pageSize, status);" + - lang: Python + source: "response = fireblocks.tokenization.get_linked_collections(page_cursor,\ + \ page_size, status);" + x-accepts: application/json + post: + description: Create a new collection and link it as a token + operationId: createNewCollection + 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/CollectionDeployRequestDto' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionLinkDto' + description: Collection was created successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Create a new collection + tags: + - Tokenization + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.tokenization.createNewCollection(tokenizationApiCreateNewCollectionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.tokenization().createNewCollection(collectionDeployRequestDto,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.create_new_collection(collection_deploy_request_dto,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.tokenization.createNewCollection(tokenizationApiCreateNewCollectionRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.tokenization().createNewCollection(collectionDeployRequestDto,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.create_new_collection(collection_deploy_request_dto,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/collections/{id}: + delete: + description: Delete a collection link + operationId: unlinkCollection + parameters: + - description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Collection unlinked successfully + "404": + description: Link for collection does not exist + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Delete a collection link + tags: + - Tokenization + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.tokenization.unlinkCollection(tokenizationApiUnlinkCollectionRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.tokenization().unlinkCollection(id); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tokenization.unlink_collection(id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.tokenization.unlinkCollection(tokenizationApiUnlinkCollectionRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.tokenization().unlinkCollection(id); + - lang: Python + source: response = fireblocks.tokenization.unlink_collection(id); + x-accepts: application/json + get: + description: Get a collection by id + operationId: getCollectionById + parameters: + - description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionLinkDto' + description: Collection fetched 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 a collection by id + tags: + - Tokenization + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.tokenization.getCollectionById(tokenizationApiGetCollectionByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.tokenization().getCollectionById(id); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tokenization.get_collection_by_id(id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.tokenization.getCollectionById(tokenizationApiGetCollectionByIdRequest);" + - lang: Java + source: CompletableFuture> response = fireblocks.tokenization().getCollectionById(id); + - lang: Python + source: response = fireblocks.tokenization.get_collection_by_id(id); + x-accepts: application/json + /tokenization/collections/{id}/tokens/{tokenId}: + get: + description: Get collection token details by id + operationId: fetchCollectionTokenDetails + parameters: + - description: The collection link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: The tokenId as it appears on the blockchain + example: "1" + explode: false + in: path + name: tokenId + required: true + schema: + type: string + style: simple + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/TokenLinkExistsHttpError' - description: "Token link for {refId} already exists" + $ref: '#/components/schemas/CollectionLinkDto' + description: Collection token details were fetched successfully default: content: application/json: @@ -10845,45 +11429,40 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Link a token + summary: Get collection token details tags: - Tokenization x-readme: code-samples: - - language: python - code: "token = fireblocks.link_token(\"FUNGIBLE_TOKEN\", ref_id)" - name: Fireblocks SDK Python example (Legacy) - - language: javascript - code: "const token = await fireblocks.linkToken(\"FUNGIBLE_TOKEN\", refId);" - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.tokenization.link(tokenizationApiLinkRequest);" + code: "const response: Promise> =\ + \ fireblocks.tokenization.fetchCollectionTokenDetails(tokenizationApiFetchCollectionTokenDetailsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto,\ - \ idempotencyKey);" + code: "CompletableFuture> response = fireblocks.tokenization().fetchCollectionTokenDetails(id,\ + \ tokenId);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.tokenization.link(token_link_request_dto, idempotency_key);" + code: "response = fireblocks.tokenization.fetch_collection_token_details(id,\ + \ token_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tokenization.link(tokenizationApiLinkRequest);" + source: "const response: Promise> =\ + \ fireblocks.tokenization.fetchCollectionTokenDetails(tokenizationApiFetchCollectionTokenDetailsRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto,\ - \ idempotencyKey);" + source: "CompletableFuture> response = fireblocks.tokenization().fetchCollectionTokenDetails(id,\ + \ tokenId);" - lang: Python - source: "response = fireblocks.tokenization.link(token_link_request_dto, idempotency_key);" - x-content-type: application/json + source: "response = fireblocks.tokenization.fetch_collection_token_details(id,\ + \ token_id);" x-accepts: application/json - /tokenization/tokens/{id}: - delete: - description: "Unlink a token. The token will be unlinked from the workspace.\ - \ The token will not be deleted on chain nor the refId, only the link to the\ - \ workspace will be removed." - operationId: unlink + /tokenization/collections/{id}/tokens/mint: + post: + description: Mint tokens and upload metadata + operationId: mintCollectionToken parameters: - - description: The token link id + - description: The collection link id example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb explode: false in: path @@ -10892,19 +11471,30 @@ paths: schema: type: string style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionMintRequestDto' + required: true responses: - "200": - content: {} - description: Token unlinked successfully - "204": - content: {} - description: "" - "404": + "202": content: application/json: schema: - $ref: '#/components/schemas/NotFoundException' - description: Link did not exist + $ref: '#/components/schemas/CollectionMintResponseDto' + description: Tokens minted successfully default: content: application/json: @@ -10914,39 +11504,43 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Unlink a token + summary: Mint tokens tags: - Tokenization x-readme: code-samples: - - language: python - code: token = fireblocks.unlink_token(token_id) - name: Fireblocks SDK Python example (Legacy) - - language: javascript - code: const token = await fireblocks.unlinkToken(tokenId); - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.tokenization.unlink(tokenizationApiUnlinkRequest);" + code: "const response: Promise>\ + \ = fireblocks.tokenization.mintCollectionToken(tokenizationApiMintCollectionTokenRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.tokenization().unlink(id); + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().mintCollectionToken(collectionMintRequestDto,\ + \ id, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.tokenization.unlink(id); + code: "response = fireblocks.tokenization.mint_collection_token(collection_mint_request_dto,\ + \ id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tokenization.unlink(tokenizationApiUnlinkRequest);" + source: "const response: Promise>\ + \ = fireblocks.tokenization.mintCollectionToken(tokenizationApiMintCollectionTokenRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.tokenization().unlink(id); + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().mintCollectionToken(collectionMintRequestDto,\ + \ id, idempotencyKey);" - lang: Python - source: response = fireblocks.tokenization.unlink(id); + source: "response = fireblocks.tokenization.mint_collection_token(collection_mint_request_dto,\ + \ id, idempotency_key);" + x-content-type: application/json x-accepts: application/json - get: - description: "Return a linked token, with its status and metadata." - operationId: getLinkedToken + /tokenization/collections/{id}/tokens/burn: + post: + description: Burn tokens in a collection + operationId: burnCollectionToken parameters: - - description: The token link id + - description: The collection link id example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb explode: false in: path @@ -10955,13 +11549,30 @@ paths: schema: type: string style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CollectionBurnRequestDto' + required: true responses: - "200": + "202": content: application/json: schema: - $ref: '#/components/schemas/TokenLinkDto' - description: Token fetched successfully + $ref: '#/components/schemas/CollectionBurnResponseDto' + description: Tokens burned successfully default: content: application/json: @@ -10971,33 +11582,36 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return a linked token + summary: Burn tokens tags: - Tokenization x-readme: code-samples: - - language: python - code: token = fireblocks.get_linked_token(token_id) - name: Fireblocks SDK Python example (Legacy) - - language: javascript - code: const token = await fireblocks.getLinkedToken(tokenId); - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.tokenization.getLinkedToken(tokenizationApiGetLinkedTokenRequest);" + code: "const response: Promise>\ + \ = fireblocks.tokenization.burnCollectionToken(tokenizationApiBurnCollectionTokenRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.tokenization().getLinkedToken(id); + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().burnCollectionToken(collectionBurnRequestDto,\ + \ id, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.tokenization.get_linked_token(id); + code: "response = fireblocks.tokenization.burn_collection_token(collection_burn_request_dto,\ + \ id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.tokenization.getLinkedToken(tokenizationApiGetLinkedTokenRequest);" + source: "const response: Promise>\ + \ = fireblocks.tokenization.burnCollectionToken(tokenizationApiBurnCollectionTokenRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.tokenization().getLinkedToken(id); + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().burnCollectionToken(collectionBurnRequestDto,\ + \ id, idempotencyKey);" - lang: Python - source: response = fireblocks.tokenization.get_linked_token(id); + source: "response = fireblocks.tokenization.burn_collection_token(collection_burn_request_dto,\ + \ id, idempotency_key);" + x-content-type: application/json x-accepts: application/json /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions: get: @@ -11886,6 +12500,9 @@ paths: - BASECHAIN_ETH_TEST3 - ETHERLINK - ETHERLINK_TEST + - MANTLE + - MANTLE_TEST + - GUN_GUNZILLA_TEST type: string style: form - description: A comma separated list of Vault Account IDs. Up to 100 are allowed @@ -12093,6 +12710,9 @@ paths: - BASECHAIN_ETH - ETHERLINK - ETHERLINK_TEST + - MANTLE + - MANTLE_TEST + - GUN_GUNZILLA_TEST type: string style: form - description: Vault account filter @@ -17167,6 +17787,8 @@ components: type: array CreateVaultAccountRequest: example: + vaultType: MPC + autoAssign: false hiddenOnUI: true name: name customerRefId: customerRefId @@ -17185,6 +17807,24 @@ components: autoFuel: description: Optional - Sets the autoFuel property of the vault account type: boolean + vaultType: + default: MPC + description: "Type of vault account. The default type will be set to MPC.
\ + \ If the workspace does not support the selected type, it will return\ + \ an error." + enum: + - MPC + - KEY_LINK + type: string + autoAssign: + default: false + description: "Applicable only when the vault account type is KEY_LINK. For\ + \ MPC, this parameter will be ignored.
If set to true and there are\ + \ available keys, random keys will be assigned to the newly created vault\ + \ account.
If set to true and there are no available keys to be assigned,\ + \ it will return an error.
If set to false, the vault account will\ + \ be created without any keys." + type: boolean type: object CreateMultipleAccountsRequest: example: @@ -17728,6 +18368,7 @@ components: balance: balance available: available id: id + credit: credit properties: id: type: string @@ -17739,6 +18380,8 @@ components: type: string available: type: string + credit: + type: string type: object ExchangeTradingAccount: example: @@ -17748,11 +18391,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type properties: @@ -17774,11 +18419,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type - assets: @@ -17787,11 +18434,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type isSubaccount: true @@ -17801,11 +18450,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit success: true name: name id: id @@ -17855,11 +18506,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type - assets: @@ -17868,11 +18521,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type isSubaccount: true @@ -17882,11 +18537,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit success: true name: name id: id @@ -17900,11 +18557,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type - assets: @@ -17913,11 +18572,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit name: name type: type isSubaccount: true @@ -17927,11 +18588,13 @@ components: balance: balance available: available id: id + credit: credit - total: total lockedAmount: lockedAmount balance: balance available: available id: id + credit: credit success: true name: name id: id @@ -18634,6 +19297,9 @@ components: example: signingDeviceKeyId: MyKey1 agentUserId: d18847b5-1df6-4c46-8f99-5cce47284529 + proofOfOwnership: + signature: signature + message: message signedCertPem: '-----BEGIN CERTIFICATE ... END CERTIFICATE-----' properties: signingDeviceKeyId: @@ -18653,6 +19319,8 @@ components: maxLength: 36 minLength: 36 type: string + proofOfOwnership: + $ref: '#/components/schemas/CreateSigningKeyDto_proofOfOwnership' required: - agentUserId - signedCertPem @@ -18664,7 +19332,7 @@ components: properties: vaultAccountId: example: 123 - minimum: 1 + minimum: 0 type: number required: - vaultAccountId @@ -20531,6 +21199,7 @@ components: failOnLowFee: true assetId: ETH feeLevel: MEDIUM + maxTotalFee: "88" gasPrice: TransactionRequest_gasPrice forceSweep: false amount: "0.02" @@ -20555,6 +21224,7 @@ components: subType: null id: id type: null + useGasless: true travelRuleMessage: originatorProof: "" originator: "" @@ -20654,6 +21324,11 @@ components: a numeric string for accurate precision. example: "120" type: string + maxTotalFee: + description: For BTC-based blockchains only. The maximum fee (in the units + of the fee-paying asset) that should be paid for the transaction. + example: "88" + type: string gasLimit: $ref: '#/components/schemas/TransactionRequest_gasLimit' gasPrice: @@ -20693,6 +21368,9 @@ components: $ref: '#/components/schemas/TransactionRequest_networkStaking' cpuStaking: $ref: '#/components/schemas/TransactionRequest_networkStaking' + useGasless: + description: '- Override the default gaslsess configuration by sending true\false' + type: boolean type: object CreateTransactionResponse: example: @@ -20866,6 +21544,49 @@ components: requiresTag: type: boolean type: object + RescanTransaction: + example: + assetId: BTC + txHash: 0x2446f1fd773fbb9f080e674b60c6a033c7ed7427b8b9413cf28a2a4a6da9b56c + properties: + txHash: + description: Blockchain TX hash + example: 0x2446f1fd773fbb9f080e674b60c6a033c7ed7427b8b9413cf28a2a4a6da9b56c + type: string + assetId: + description: "Asset symbol BTC,ETH)" + example: BTC + type: string + x-fb-entity: asset + type: object + RescanTransactionRequest: + items: + $ref: '#/components/schemas/RescanTransaction' + type: array + ValidatedTransactionsForRescan: + example: + baseAsset: baseAsset + txHashes: "['0x7b8b9413cf28a2a4a6da9b56c']" + networkProtocol: networkProtocol + properties: + baseAsset: + description: "Base asset symbol BTC_TEST, ETH_TEST5)" + type: string + x-fb-entity: asset + networkProtocol: + description: "Netowrk protocol of the blockchain (BTC, ETH)" + type: string + txHashes: + description: Blockchain TX hashes + example: "['0x7b8b9413cf28a2a4a6da9b56c']" + items: + type: string + type: array + type: object + ValidatedTransactionsForRescanResponse: + items: + $ref: '#/components/schemas/ValidatedTransactionsForRescan' + type: array NetworkFee: example: feePerByte: feePerByte @@ -22372,24 +23093,6 @@ components: items: $ref: '#/components/schemas/UserResponse' type: array - GetAuditLogsResponseDTO: - example: - cursor: cursor - total: 0.8008281904610115 - data: - - "{}" - - "{}" - properties: - data: - items: - type: object - type: array - total: - type: number - cursor: - nullable: true - type: string - type: object AuditLogData: example: createdAt: createdAt @@ -22495,6 +23198,7 @@ components: failOnLowFee: true assetId: ETH feeLevel: MEDIUM + maxTotalFee: "88" gasPrice: TransactionRequest_gasPrice forceSweep: false amount: "0.02" @@ -22519,6 +23223,7 @@ components: subType: null id: id type: null + useGasless: true travelRuleMessage: originatorProof: "" originator: "" @@ -22576,6 +23281,7 @@ components: failOnLowFee: true assetId: ETH feeLevel: MEDIUM + maxTotalFee: "88" gasPrice: TransactionRequest_gasPrice forceSweep: false amount: "0.02" @@ -22600,6 +23306,7 @@ components: subType: null id: id type: null + useGasless: true travelRuleMessage: originatorProof: "" originator: "" @@ -23666,47 +24373,181 @@ components: data: description: The data of the current page items: - $ref: '#/components/schemas/LeanDeployedContractResponseDto' + $ref: '#/components/schemas/LeanDeployedContractResponseDto' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + required: + - data + type: object + DeployedContractResponseDto: + example: + contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + vaultAccountId: "0" + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + blockchainId: blockchainId + properties: + id: + description: The deployed contract data identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + contractAddress: + description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + type: string + contractTemplateId: + description: The contract template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + vaultAccountId: + description: The vault account id this contract was deploy from + example: "0" + type: string + blockchainId: + type: string + required: + - blockchainId + - contractAddress + - contractTemplateId + - id + type: object + FetchAbiRequestDto: + example: + baseAssetId: ETH + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + properties: + baseAssetId: + description: The blockchain base assetId + example: ETH + type: string + contractAddress: + description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + type: string + required: + - baseAssetId + - contractAddress + type: object + ContractWithAbiDto: + example: + baseAssetId: ETH_TEST6 + implementation: 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 + name: WETH9 + contractAddress: 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 + abi: + - inputs: + - internalType: address + name: to + type: address + - internalType: uint256 + name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: mint + isPublic: true + isProxy: true + properties: + contractAddress: + description: The address of the contract + example: 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 + type: string + baseAssetId: + description: The blockchain base assetId + example: ETH_TEST6 + type: string + name: + description: The name of the contract + example: WETH9 + type: string + abi: + description: The ABI of the contract + example: + - inputs: + - internalType: address + name: to + type: address + - internalType: uint256 + name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: mint + items: + $ref: '#/components/schemas/AbiFunction' type: array - next: - description: The ID of the next page - example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 - nullable: true + isProxy: + description: Whether the contract is a proxy contract + example: true + type: boolean + implementation: + description: The implementation contract address + example: 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 type: string + isPublic: + description: Whether the contract ABI is public + example: true + type: boolean required: - - data + - abi + - baseAssetId + - contractAddress + - isPublic + - name type: object - DeployedContractResponseDto: + AddAbiRequestDto: example: - contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d - contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 - vaultAccountId: "0" - id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d - blockchainId: blockchainId + baseAssetId: ETH + name: MyContract + contractAddress: 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 + abi: + - inputs: + - internalType: address + name: to + type: address + - internalType: uint256 + name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: mint properties: - id: - description: The deployed contract data identifier - example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d - type: string contractAddress: - description: The contract's onchain address - example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 - type: string - contractTemplateId: - description: The contract template identifier - example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + description: The address of deployed contract + example: 0xfff9976782d46cc05630d1f6ebab18b2324d6b14 type: string - vaultAccountId: - description: The vault account id this contract was deploy from - example: "0" + baseAssetId: + description: The blockchain base assetId + example: ETH type: string - blockchainId: + abi: + description: The ABI of the contract + example: + - inputs: + - internalType: address + name: to + type: address + - internalType: uint256 + name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: mint + items: + $ref: '#/components/schemas/AbiFunction' + type: array + name: + description: The name of the contract + example: MyContract type: string required: - - blockchainId + - abi + - baseAssetId - contractAddress - - contractTemplateId - - id type: object AssetMetadataDto: example: @@ -23798,11 +24639,11 @@ components: type: string standard: description: Collection contract standard - example: ERC721 + example: "[\"ERC721\",\"ERC1155\",\"FA2\"]" type: string blockchainDescriptor: description: Collection's blockchain - example: ETH_TEST5 + example: ETH type: string contractAddress: description: Collection contract address @@ -23846,7 +24687,7 @@ components: displayName: My Simple ERC20 Token id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb refId: BQ5R_MY_TOKEN - type: FUNGIBLE_TOKEN + type: NON_FUNGIBLE_TOKEN tokenMetadata: symbol: MYT holdersCount: 6 @@ -23881,16 +24722,15 @@ components: - NON_FUNGIBLE_TOKEN - TOKEN_UTILITY - TOKEN_EXTENSION - example: FUNGIBLE_TOKEN + example: NON_FUNGIBLE_TOKEN type: string refId: - description: "The Fireblocks' reference id. Can be a Fireblocks' supported\ - \ asset, collectionId or contractId" + description: The Fireblocks' reference id example: BQ5R_MY_TOKEN type: string displayName: description: "The token display name. If was not provided, would be taken\ - \ from the contract template name" + \ from the contract template" example: My Simple ERC20 Token type: string tokenMetadata: @@ -23906,7 +24746,7 @@ components: - displayName: My Simple ERC20 Token id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb refId: BQ5R_MY_TOKEN - type: FUNGIBLE_TOKEN + type: NON_FUNGIBLE_TOKEN tokenMetadata: symbol: MYT holdersCount: 6 @@ -23925,7 +24765,7 @@ components: - displayName: My Simple ERC20 Token id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb refId: BQ5R_MY_TOKEN - type: FUNGIBLE_TOKEN + type: NON_FUNGIBLE_TOKEN tokenMetadata: symbol: MYT holdersCount: 6 @@ -24109,8 +24949,10 @@ components: type: object TokenLinkRequestDto: example: + baseAssetId: ETH_TEST3 displayName: My Simple ERC20 Token - refId: USDC_ETH_TEST5_1XF5 + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + refId: USDC_ETH_TEST3_1XF5 type: FUNGIBLE_TOKEN properties: type: @@ -24124,34 +24966,22 @@ components: refId: description: "The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC'\ \ if it's a fungible \n\t\t\t\t\tasset" - example: USDC_ETH_TEST5_1XF5 + example: USDC_ETH_TEST3_1XF5 type: string displayName: description: The token display name example: My Simple ERC20 Token type: string - required: - - refId - - type - type: object - AssetDoesNotExistHttpError: - example: - message: message - error: Not Found - statusCode: 404 - properties: - statusCode: - description: HTTP status code - example: 404 - format: int32 - type: integer - message: - description: Error message + baseAssetId: + description: The blockchain base assetId + example: ETH_TEST3 type: string - error: - description: Short description of the HTTP error - example: Not Found + contractAddress: + description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 type: string + required: + - type type: object TokenLinkExistsHttpError: example: @@ -24191,6 +25021,263 @@ components: example: Not Found type: string type: object + CollectionType: + description: The type of collection + enum: + - NON_FUNGIBLE_TOKEN + - SEMI_FUNGIBLE_TOKEN + type: string + CollectionLinkDto: + example: + collectionMetadata: "" + displayName: My Simple ERC721 Collection + id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: NON_FUNGIBLE_TOKEN + status: COMPLETED + properties: + id: + description: The collection id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: string + status: + description: The collection status + enum: + - PENDING + - COMPLETED + example: COMPLETED + type: string + type: + allOf: + - $ref: '#/components/schemas/CollectionType' + example: NON_FUNGIBLE_TOKEN + displayName: + description: "The display name of the collection. If was not provided, would\ + \ be taken from the contract template" + example: My Simple ERC721 Collection + type: string + collectionMetadata: + allOf: + - $ref: '#/components/schemas/CollectionMetadataDto' + description: The collection's metadata + required: + - id + - status + - type + type: object + GetLinkedCollectionsPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - collectionMetadata: "" + displayName: My Simple ERC721 Collection + id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: NON_FUNGIBLE_TOKEN + status: COMPLETED + - collectionMetadata: "" + displayName: My Simple ERC721 Collection + id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: NON_FUNGIBLE_TOKEN + status: COMPLETED + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/CollectionLinkDto' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + type: object + CollectionDeployRequestDto: + example: + baseAssetId: ETH + symbol: DAT + displayName: DigitalArtTokens + name: DigitalArtTokens + adminAddress: 0x5503766D27d1ED4525f5053222E18b29C38eDdB2 + vaultAccountId: "0" + type: NON_FUNGIBLE_TOKEN + properties: + baseAssetId: + description: The blockchain base assetId + example: ETH + type: string + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token + example: "0" + type: string + type: + allOf: + - $ref: '#/components/schemas/CollectionType' + example: NON_FUNGIBLE_TOKEN + name: + description: A string that represents the name of the collection + example: DigitalArtTokens + type: string + symbol: + description: A string that represents the symbol of the collection + example: DAT + type: string + adminAddress: + description: The EVM address of the user that will be set as the admin user + of the collection + example: 0x5503766D27d1ED4525f5053222E18b29C38eDdB2 + type: string + displayName: + description: A string to display as a name of the collection + example: DigitalArtTokens + type: string + required: + - adminAddress + - baseAssetId + - name + - symbol + - type + - vaultAccountId + type: object + CollectionTokenMetadataAttributeDto: + properties: + trait_type: + description: Name of the trait + example: project_start + type: string + value: + description: Value of the trait + example: "30102000" + type: string + display_type: + description: A field indicating how you would like trait to be displayed + example: date + type: string + required: + - trait_type + - value + type: object + CollectionTokenMetadataDto: + properties: + name: + description: Token's name + example: DigitalArtTokens + type: string + description: + description: Token's description + example: Digital representation of a piece of art + type: string + image: + description: Token's image URL + example: https://some_domain.com/image_filepath + type: string + animation_url: + description: Token's animation URL + example: https://some_domain.com/gif_filepath + type: string + external_url: + description: Token's external URL + example: https://some_domain.com/blob_filepath + type: string + attributes: + description: Token's metadata attributes + items: + $ref: '#/components/schemas/CollectionTokenMetadataAttributeDto' + type: array + required: + - description + - name + type: object + CollectionMintRequestDto: + example: + amount: "1" + metadata: + name: MYTOKEN + description: description of MYTOKEN + tokenId: "1" + vaultAccountId: "0" + to: 0x5503766D27d1ED4525f5053222E18b29C38eDdB2 + metadataURI: ipfs://QmP4P6f7mDHzikhdwLBVSCxCPEgmjwcWSVBHbtSyfBYzBC + properties: + vaultAccountId: + description: The id of the vault account that initiates the mint function. + example: "0" + type: string + to: + description: 'The EVM address to mint to ' + example: 0x5503766D27d1ED4525f5053222E18b29C38eDdB2 + type: string + tokenId: + description: "The token id, recommended to have numerical format and in\ + \ sequential order" + example: "1" + type: string + amount: + description: "For ERC721, amount is optional or should always be 1 and for\ + \ ERC1155, amount should be 1 or greater" + example: "1" + type: string + metadataURI: + description: "URL of metadata uploaded, skip uploading to IPFS if this field\ + \ is provided with any value" + example: ipfs://QmP4P6f7mDHzikhdwLBVSCxCPEgmjwcWSVBHbtSyfBYzBC + type: string + metadata: + allOf: + - $ref: '#/components/schemas/CollectionTokenMetadataDto' + description: Metadata to upload + example: + name: MYTOKEN + description: description of MYTOKEN + required: + - to + - tokenId + - vaultAccountId + type: object + CollectionMintResponseDto: + example: + txId: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + properties: + txId: + description: Transaction Id for the mint operation + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: string + required: + - txId + type: object + CollectionBurnRequestDto: + example: + amount: "1" + tokenId: "1" + vaultAccountId: "0" + properties: + vaultAccountId: + description: The id of the vault account that initiates the burn function + example: "0" + type: string + tokenId: + description: The token id + example: "1" + type: string + amount: + description: "For ERC721, amount is optional or should always be 1 and for\ + \ ERC1155, amount should be 1 or greater" + example: "1" + type: string + required: + - tokenId + - vaultAccountId + type: object + CollectionBurnResponseDto: + example: + txId: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + properties: + txId: + description: Transaction Id for the burn operation + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: string + required: + - txId + type: object ContractAbiResponseDto: example: abi: @@ -25250,6 +26337,9 @@ components: - BASECHAIN_ETH_TEST3 - ETHERLINK - ETHERLINK_TEST + - MANTLE + - MANTLE_TEST + - GUN_GUNZILLA_TEST type: string description: type: string @@ -25403,6 +26493,9 @@ components: - BASECHAIN_ETH_TEST3 - ETHERLINK - ETHERLINK_TEST + - MANTLE + - MANTLE_TEST + - GUN_GUNZILLA_TEST type: string description: type: string @@ -25494,6 +26587,9 @@ components: - BASECHAIN_ETH_TEST3 - ETHERLINK - ETHERLINK_TEST + - MANTLE + - MANTLE_TEST + - GUN_GUNZILLA_TEST type: string contractAddress: description: Collection contract standard @@ -29788,6 +30884,27 @@ components: oneOf: - $ref: '#/components/schemas/CustomRoutingDest' - $ref: '#/components/schemas/NoneNetworkRoutingDest' + CreateSigningKeyDto_proofOfOwnership: + description: An object containing proof of ownership for the signing key. + example: + signature: signature + message: message + properties: + message: + description: The message to be signed by the key as proof of ownership. + 64 to 1024 bytes in hexadecimal format. + maxLength: 2048 + minLength: 64 + type: string + signature: + description: The signature of the message. 64 bytes in hexadecimal format. + maxLength: 128 + minLength: 64 + type: string + required: + - message + - signature + type: object AddAssetToExternalWalletRequest_oneOf: example: address: address diff --git a/build.gradle b/build.gradle index 18b0ee5..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 = '3.1.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AddAbiRequestDto.md b/docs/AddAbiRequestDto.md new file mode 100644 index 0000000..8f539ef --- /dev/null +++ b/docs/AddAbiRequestDto.md @@ -0,0 +1,16 @@ + + +# AddAbiRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contractAddress** | **String** | The address of deployed contract | | +|**baseAssetId** | **String** | The blockchain base assetId | | +|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The ABI of the contract | | +|**name** | **String** | The name of the contract | [optional] | + + + diff --git a/docs/AssetDoesNotExistHttpError.md b/docs/AssetDoesNotExistHttpError.md deleted file mode 100644 index 3586ebe..0000000 --- a/docs/AssetDoesNotExistHttpError.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# AssetDoesNotExistHttpError - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**statusCode** | **Integer** | HTTP status code | [optional] | -|**message** | **String** | Error message | [optional] | -|**error** | **String** | Short description of the HTTP error | [optional] | - - - diff --git a/docs/AuditLogsApi.md b/docs/AuditLogsApi.md index 9666625..a47dbab 100644 --- a/docs/AuditLogsApi.md +++ b/docs/AuditLogsApi.md @@ -5,7 +5,6 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**getAuditLogs**](AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs | -| [**getAudits**](AuditLogsApi.md#getAudits) | **GET** /audits | Get audit logs | @@ -93,86 +92,3 @@ No authorization required | **200** | Audit logs from requested time period | * X-Request-ID -
| | **0** | Error Response | * X-Request-ID -
| - -## getAudits - -> CompletableFuture> getAudits getAudits(timePeriod) - -Get audit logs - -Get all audits - -### 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.AuditLogsApi; -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 timePeriod = "DAY"; // String | The last time period to fetch audit logs - try { - CompletableFuture> response = fireblocks.auditLogs().getAudits(timePeriod); - 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 AuditLogsApi#getAudits"); - 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 AuditLogsApi#getAudits"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **timePeriod** | **String**| The last time period to fetch audit logs | [optional] [enum: DAY, WEEK] | - -### 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** | Audit logs from requested time period | * X-Request-ID -
| -| **0** | Error Response | * X-Request-ID -
| - diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index 13f8579..db41467 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -171,7 +171,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | A new asset has been created successfully | - | -| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 - Blockchain is deprecated. Error code: 1006 - The asset's standard is not supported. Error code: 1007 | - | +| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 - Blockchain is deprecated. Error code: 1006 - The asset's standard is not supported. Error code: 1007 - Unable to get expected metadata: decimals | name | symbol. Error code: 1010 | - | | **403** | - The asset creation quota reached. Error code: 1005 - Tenant is not allowed to create testnet assets. Error code: 1008 - Tenant is not allowed to create mainnet assets. Error code: 1009 | - | | **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 | - | diff --git a/docs/CollectionBurnRequestDto.md b/docs/CollectionBurnRequestDto.md new file mode 100644 index 0000000..04791e6 --- /dev/null +++ b/docs/CollectionBurnRequestDto.md @@ -0,0 +1,15 @@ + + +# CollectionBurnRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiates the burn function | | +|**tokenId** | **String** | The token id | | +|**amount** | **String** | For ERC721, amount is optional or should always be 1 and for ERC1155, amount should be 1 or greater | [optional] | + + + diff --git a/docs/CollectionBurnResponseDto.md b/docs/CollectionBurnResponseDto.md new file mode 100644 index 0000000..f53cbe1 --- /dev/null +++ b/docs/CollectionBurnResponseDto.md @@ -0,0 +1,13 @@ + + +# CollectionBurnResponseDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txId** | **String** | Transaction Id for the burn operation | | + + + diff --git a/docs/CollectionDeployRequestDto.md b/docs/CollectionDeployRequestDto.md new file mode 100644 index 0000000..e95aebd --- /dev/null +++ b/docs/CollectionDeployRequestDto.md @@ -0,0 +1,19 @@ + + +# CollectionDeployRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseAssetId** | **String** | The blockchain base assetId | | +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | +|**type** | **CollectionType** | | | +|**name** | **String** | A string that represents the name of the collection | | +|**symbol** | **String** | A string that represents the symbol of the collection | | +|**adminAddress** | **String** | The EVM address of the user that will be set as the admin user of the collection | | +|**displayName** | **String** | A string to display as a name of the collection | [optional] | + + + diff --git a/docs/CollectionLinkDto.md b/docs/CollectionLinkDto.md new file mode 100644 index 0000000..8641264 --- /dev/null +++ b/docs/CollectionLinkDto.md @@ -0,0 +1,26 @@ + + +# CollectionLinkDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The collection id | | +|**status** | [**StatusEnum**](#StatusEnum) | The collection status | | +|**type** | **CollectionType** | | | +|**displayName** | **String** | The display name of the collection. If was not provided, would be taken from the contract template | [optional] | +|**collectionMetadata** | [**CollectionMetadataDto**](CollectionMetadataDto.md) | The collection's metadata | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| COMPLETED | "COMPLETED" | + + + diff --git a/docs/CollectionMintRequestDto.md b/docs/CollectionMintRequestDto.md new file mode 100644 index 0000000..58a60b2 --- /dev/null +++ b/docs/CollectionMintRequestDto.md @@ -0,0 +1,18 @@ + + +# CollectionMintRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiates the mint function. | | +|**to** | **String** | The EVM address to mint to | | +|**tokenId** | **String** | The token id, recommended to have numerical format and in sequential order | | +|**amount** | **String** | For ERC721, amount is optional or should always be 1 and for ERC1155, amount should be 1 or greater | [optional] | +|**metadataURI** | **String** | URL of metadata uploaded, skip uploading to IPFS if this field is provided with any value | [optional] | +|**metadata** | [**CollectionTokenMetadataDto**](CollectionTokenMetadataDto.md) | Metadata to upload | [optional] | + + + diff --git a/docs/CollectionMintResponseDto.md b/docs/CollectionMintResponseDto.md new file mode 100644 index 0000000..1a5411c --- /dev/null +++ b/docs/CollectionMintResponseDto.md @@ -0,0 +1,13 @@ + + +# CollectionMintResponseDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txId** | **String** | Transaction Id for the mint operation | | + + + diff --git a/docs/CollectionOwnershipResponse.md b/docs/CollectionOwnershipResponse.md index 2f36250..d474f20 100644 --- a/docs/CollectionOwnershipResponse.md +++ b/docs/CollectionOwnershipResponse.md @@ -33,6 +33,9 @@ | BASECHAIN_ETH_TEST3 | "BASECHAIN_ETH_TEST3" | | ETHERLINK | "ETHERLINK" | | ETHERLINK_TEST | "ETHERLINK_TEST" | +| MANTLE | "MANTLE" | +| MANTLE_TEST | "MANTLE_TEST" | +| GUN_GUNZILLA_TEST | "GUN_GUNZILLA_TEST" | diff --git a/docs/CollectionTokenMetadataAttributeDto.md b/docs/CollectionTokenMetadataAttributeDto.md new file mode 100644 index 0000000..b29f53a --- /dev/null +++ b/docs/CollectionTokenMetadataAttributeDto.md @@ -0,0 +1,15 @@ + + +# CollectionTokenMetadataAttributeDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**traitType** | **String** | Name of the trait | | +|**value** | **String** | Value of the trait | | +|**displayType** | **String** | A field indicating how you would like trait to be displayed | [optional] | + + + diff --git a/docs/CollectionTokenMetadataDto.md b/docs/CollectionTokenMetadataDto.md new file mode 100644 index 0000000..425683b --- /dev/null +++ b/docs/CollectionTokenMetadataDto.md @@ -0,0 +1,18 @@ + + +# CollectionTokenMetadataDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Token's name | | +|**description** | **String** | Token's description | | +|**image** | **String** | Token's image URL | [optional] | +|**animationUrl** | **String** | Token's animation URL | [optional] | +|**externalUrl** | **String** | Token's external URL | [optional] | +|**attributes** | [**List<CollectionTokenMetadataAttributeDto>**](CollectionTokenMetadataAttributeDto.md) | Token's metadata attributes | [optional] | + + + diff --git a/docs/CollectionType.md b/docs/CollectionType.md new file mode 100644 index 0000000..e17a77a --- /dev/null +++ b/docs/CollectionType.md @@ -0,0 +1,13 @@ + + +# CollectionType + +## Enum + + +* `NON_FUNGIBLE_TOKEN` (value: `"NON_FUNGIBLE_TOKEN"`) + +* `SEMI_FUNGIBLE_TOKEN` (value: `"SEMI_FUNGIBLE_TOKEN"`) + + + diff --git a/docs/ContractWithAbiDto.md b/docs/ContractWithAbiDto.md new file mode 100644 index 0000000..e1e9530 --- /dev/null +++ b/docs/ContractWithAbiDto.md @@ -0,0 +1,19 @@ + + +# ContractWithAbiDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contractAddress** | **String** | The address of the contract | | +|**baseAssetId** | **String** | The blockchain base assetId | | +|**name** | **String** | The name of the contract | | +|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The ABI of the contract | | +|**isProxy** | **Boolean** | Whether the contract is a proxy contract | [optional] | +|**implementation** | **String** | The implementation contract address | [optional] | +|**isPublic** | **Boolean** | Whether the contract ABI is public | | + + + diff --git a/docs/CreateSigningKeyDto.md b/docs/CreateSigningKeyDto.md index 5238851..a282839 100644 --- a/docs/CreateSigningKeyDto.md +++ b/docs/CreateSigningKeyDto.md @@ -10,6 +10,7 @@ |**signingDeviceKeyId** | **String** | The ID, name or label of the key specified on the customer's signing device. | | |**signedCertPem** | **String** | The signed certificate that includes the public key PEM of the signing key, signed by a validation key. | | |**agentUserId** | **String** | Id of user to which this key belongs | | +|**proofOfOwnership** | [**CreateSigningKeyDtoProofOfOwnership**](CreateSigningKeyDtoProofOfOwnership.md) | | [optional] | diff --git a/docs/CreateSigningKeyDtoProofOfOwnership.md b/docs/CreateSigningKeyDtoProofOfOwnership.md new file mode 100644 index 0000000..ab3487f --- /dev/null +++ b/docs/CreateSigningKeyDtoProofOfOwnership.md @@ -0,0 +1,15 @@ + + +# CreateSigningKeyDtoProofOfOwnership + +An object containing proof of ownership for the signing key. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | The message to be signed by the key as proof of ownership. 64 to 1024 bytes in hexadecimal format. | | +|**signature** | **String** | The signature of the message. 64 bytes in hexadecimal format. | | + + + diff --git a/docs/CreateVaultAccountRequest.md b/docs/CreateVaultAccountRequest.md index ecd19ce..dd7f824 100644 --- a/docs/CreateVaultAccountRequest.md +++ b/docs/CreateVaultAccountRequest.md @@ -11,6 +11,17 @@ |**hiddenOnUI** | **Boolean** | Optional - if true, the created account and all related transactions will not be shown on Fireblocks console | [optional] | |**customerRefId** | **String** | Optional - Sets a customer reference ID | [optional] | |**autoFuel** | **Boolean** | Optional - Sets the autoFuel property of the vault account | [optional] | +|**vaultType** | [**VaultTypeEnum**](#VaultTypeEnum) | Type of vault account. The default type will be set to MPC.<br/> If the workspace does not support the selected type, it will return an error. | [optional] | +|**autoAssign** | **Boolean** | Applicable only when the vault account type is KEY_LINK. For MPC, this parameter will be ignored.<br/> If set to true and there are available keys, random keys will be assigned to the newly created vault account.<br/> If set to true and there are no available keys to be assigned, it will return an error.<br/> If set to false, the vault account will be created without any keys. | [optional] | + + + +## Enum: VaultTypeEnum + +| Name | Value | +|---- | -----| +| MPC | "MPC" | +| KEY_LINK | "KEY_LINK" | diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md index 64f81db..4a7ac8a 100644 --- a/docs/DeployedContractsApi.md +++ b/docs/DeployedContractsApi.md @@ -4,12 +4,186 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**addContractABI**](DeployedContractsApi.md#addContractABI) | **POST** /tokenization/contracts/abi | Save contract ABI | +| [**fetchContractAbi**](DeployedContractsApi.md#fetchContractAbi) | **POST** /tokenization/contracts/fetch_abi | Fetch the contract ABI | | [**getDeployedContractByAddress**](DeployedContractsApi.md#getDeployedContractByAddress) | **GET** /tokenization/contracts/{assetId}/{contractAddress} | Return deployed contract data | | [**getDeployedContractById**](DeployedContractsApi.md#getDeployedContractById) | **GET** /tokenization/contracts/{id} | Return deployed contract data by id | | [**getDeployedContracts**](DeployedContractsApi.md#getDeployedContracts) | **GET** /tokenization/contracts | List deployed contracts data | +## addContractABI + +> CompletableFuture> addContractABI addContractABI(addAbiRequestDto, idempotencyKey) + +Save contract ABI + +Save contract ABI for the tenant + +### 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.DeployedContractsApi; +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); + + AddAbiRequestDto addAbiRequestDto = new AddAbiRequestDto(); // AddAbiRequestDto | + 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.deployedContracts().addContractABI(addAbiRequestDto, 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 DeployedContractsApi#addContractABI"); + 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 DeployedContractsApi#addContractABI"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **addAbiRequestDto** | [**AddAbiRequestDto**](AddAbiRequestDto.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 | +|-------------|-------------|------------------| +| **200** | Contract ABI created (or updated) for the tenant | - | +| **409** | Contract ABI already exists. | - | +| **0** | Error Response | * X-Request-ID -
| + + +## fetchContractAbi + +> CompletableFuture> fetchContractAbi fetchContractAbi(fetchAbiRequestDto, idempotencyKey) + +Fetch the contract ABI + +Fetch the ABI. If not found fetch the ABI from the block explorer + +### 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.DeployedContractsApi; +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); + + FetchAbiRequestDto fetchAbiRequestDto = new FetchAbiRequestDto(); // FetchAbiRequestDto | + 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.deployedContracts().fetchContractAbi(fetchAbiRequestDto, 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 DeployedContractsApi#fetchContractAbi"); + 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 DeployedContractsApi#fetchContractAbi"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **fetchAbiRequestDto** | [**FetchAbiRequestDto**](FetchAbiRequestDto.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 | +|-------------|-------------|------------------| +| **200** | Contract ABI found. | - | +| **404** | Contract ABI not found | - | +| **0** | Error Response | * X-Request-ID -
| + + ## getDeployedContractByAddress > CompletableFuture> getDeployedContractByAddress getDeployedContractByAddress(contractAddress, assetId) diff --git a/docs/ExchangeAsset.md b/docs/ExchangeAsset.md index a2c46dc..931d38a 100644 --- a/docs/ExchangeAsset.md +++ b/docs/ExchangeAsset.md @@ -12,6 +12,7 @@ |**lockedAmount** | **String** | | [optional] | |**total** | **String** | | [optional] | |**available** | **String** | | [optional] | +|**credit** | **String** | | [optional] | diff --git a/docs/FetchAbiRequestDto.md b/docs/FetchAbiRequestDto.md new file mode 100644 index 0000000..7fbb734 --- /dev/null +++ b/docs/FetchAbiRequestDto.md @@ -0,0 +1,14 @@ + + +# FetchAbiRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseAssetId** | **String** | The blockchain base assetId | | +|**contractAddress** | **String** | The contract's onchain address | | + + + diff --git a/docs/GetAuditLogsResponseDTO.md b/docs/GetAuditLogsResponseDTO.md deleted file mode 100644 index d78909c..0000000 --- a/docs/GetAuditLogsResponseDTO.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# GetAuditLogsResponseDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | **List<Object>** | | [optional] | -|**total** | **BigDecimal** | | [optional] | -|**cursor** | **String** | | [optional] | - - - diff --git a/docs/GetLinkedCollectionsPaginatedResponse.md b/docs/GetLinkedCollectionsPaginatedResponse.md new file mode 100644 index 0000000..ee74a2c --- /dev/null +++ b/docs/GetLinkedCollectionsPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# GetLinkedCollectionsPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<CollectionLinkDto>**](CollectionLinkDto.md) | The data of the current page | [optional] | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/NftsApi.md b/docs/NftsApi.md index 16e8a49..44e96a1 100644 --- a/docs/NftsApi.md +++ b/docs/NftsApi.md @@ -262,7 +262,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [optional] [enum: ETH, ETH_TEST3, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, XTZ, XTZ_TEST, BASECHAIN_ETH, BASECHAIN_ETH_TEST3, ETHERLINK, ETHERLINK_TEST] | +| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [optional] [enum: ETH, ETH_TEST3, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, XTZ, XTZ_TEST, BASECHAIN_ETH, BASECHAIN_ETH_TEST3, ETHERLINK, ETHERLINK_TEST, MANTLE, MANTLE_TEST, GUN_GUNZILLA_TEST] | | **vaultAccountIds** | **String**| A comma separated list of Vault Account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=END_USER_WALLET or ncwId is provided. | [optional] | | **ncwId** | **String**| Tenant's Non-Custodial Wallet ID | [optional] | | **ncwAccountIds** | **String**| A comma separated list of Non-Custodial account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=VAULT_ACCOUNT or ncwId is not provided. | [optional] | @@ -635,7 +635,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [enum: ETH, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, BASECHAIN_ETH, ETHERLINK, ETHERLINK_TEST] | +| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [enum: ETH, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, BASECHAIN_ETH, ETHERLINK, ETHERLINK_TEST, MANTLE, MANTLE_TEST, GUN_GUNZILLA_TEST] | | **vaultAccountId** | **String**| Vault account filter | | | **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] | diff --git a/docs/RescanTransaction.md b/docs/RescanTransaction.md new file mode 100644 index 0000000..35ede6d --- /dev/null +++ b/docs/RescanTransaction.md @@ -0,0 +1,14 @@ + + +# RescanTransaction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txHash** | **String** | Blockchain TX hash | [optional] | +|**assetId** | **String** | Asset symbol BTC,ETH) | [optional] | + + + diff --git a/docs/TokenLinkDto.md b/docs/TokenLinkDto.md index ed53481..06f29d5 100644 --- a/docs/TokenLinkDto.md +++ b/docs/TokenLinkDto.md @@ -10,8 +10,8 @@ |**id** | **String** | The token link id | | |**status** | [**StatusEnum**](#StatusEnum) | The token status | | |**type** | [**TypeEnum**](#TypeEnum) | The type of token | [optional] | -|**refId** | **String** | The Fireblocks' reference id. Can be a Fireblocks' supported asset, collectionId or contractId | [optional] | -|**displayName** | **String** | The token display name. If was not provided, would be taken from the contract template name | [optional] | +|**refId** | **String** | The Fireblocks' reference id | [optional] | +|**displayName** | **String** | The token display name. If was not provided, would be taken from the contract template | [optional] | |**tokenMetadata** | [**TokenLinkDtoTokenMetadata**](TokenLinkDtoTokenMetadata.md) | | [optional] | diff --git a/docs/TokenLinkRequestDto.md b/docs/TokenLinkRequestDto.md index f72d18c..e9f0c56 100644 --- a/docs/TokenLinkRequestDto.md +++ b/docs/TokenLinkRequestDto.md @@ -8,8 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | The type of token being linked | | -|**refId** | **String** | The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC' if it's a fungible asset | | +|**refId** | **String** | The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC' if it's a fungible asset | [optional] | |**displayName** | **String** | The token display name | [optional] | +|**baseAssetId** | **String** | The blockchain base assetId | [optional] | +|**contractAddress** | **String** | The contract's onchain address | [optional] | diff --git a/docs/TokenOwnershipResponse.md b/docs/TokenOwnershipResponse.md index 1f5cc2d..875064a 100644 --- a/docs/TokenOwnershipResponse.md +++ b/docs/TokenOwnershipResponse.md @@ -45,6 +45,9 @@ | BASECHAIN_ETH_TEST3 | "BASECHAIN_ETH_TEST3" | | ETHERLINK | "ETHERLINK" | | ETHERLINK_TEST | "ETHERLINK_TEST" | +| MANTLE | "MANTLE" | +| MANTLE_TEST | "MANTLE_TEST" | +| GUN_GUNZILLA_TEST | "GUN_GUNZILLA_TEST" | diff --git a/docs/TokenResponse.md b/docs/TokenResponse.md index f980f2b..caea7e4 100644 --- a/docs/TokenResponse.md +++ b/docs/TokenResponse.md @@ -38,6 +38,9 @@ | BASECHAIN_ETH_TEST3 | "BASECHAIN_ETH_TEST3" | | ETHERLINK | "ETHERLINK" | | ETHERLINK_TEST | "ETHERLINK_TEST" | +| MANTLE | "MANTLE" | +| MANTLE_TEST | "MANTLE_TEST" | +| GUN_GUNZILLA_TEST | "GUN_GUNZILLA_TEST" | diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md index 86ea9fa..48c2a72 100644 --- a/docs/TokenizationApi.md +++ b/docs/TokenizationApi.md @@ -4,14 +4,448 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**burnCollectionToken**](TokenizationApi.md#burnCollectionToken) | **POST** /tokenization/collections/{id}/tokens/burn | Burn tokens | +| [**createNewCollection**](TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection | +| [**fetchCollectionTokenDetails**](TokenizationApi.md#fetchCollectionTokenDetails) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details | +| [**getCollectionById**](TokenizationApi.md#getCollectionById) | **GET** /tokenization/collections/{id} | Get a collection by id | +| [**getLinkedCollections**](TokenizationApi.md#getLinkedCollections) | **GET** /tokenization/collections | Get collections | | [**getLinkedToken**](TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token | | [**getLinkedTokens**](TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens | | [**issueNewToken**](TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token | -| [**link**](TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a token | +| [**link**](TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a contract | +| [**mintCollectionToken**](TokenizationApi.md#mintCollectionToken) | **POST** /tokenization/collections/{id}/tokens/mint | Mint tokens | | [**unlink**](TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token | +| [**unlinkCollection**](TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link | +## burnCollectionToken + +> CompletableFuture> burnCollectionToken burnCollectionToken(collectionBurnRequestDto, id, idempotencyKey) + +Burn tokens + +Burn tokens in a collection + +### 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.TokenizationApi; +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); + + CollectionBurnRequestDto collectionBurnRequestDto = new CollectionBurnRequestDto(); // CollectionBurnRequestDto | + String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The collection link id + 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.tokenization().burnCollectionToken(collectionBurnRequestDto, 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 TokenizationApi#burnCollectionToken"); + 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 TokenizationApi#burnCollectionToken"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **collectionBurnRequestDto** | [**CollectionBurnRequestDto**](CollectionBurnRequestDto.md)| | | +| **id** | **String**| The collection link id | | +| **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** | Tokens burned successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## createNewCollection + +> CompletableFuture> createNewCollection createNewCollection(collectionDeployRequestDto, idempotencyKey) + +Create a new collection + +Create a new collection and link it as a token + +### 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.TokenizationApi; +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); + + CollectionDeployRequestDto collectionDeployRequestDto = new CollectionDeployRequestDto(); // CollectionDeployRequestDto | + 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.tokenization().createNewCollection(collectionDeployRequestDto, 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 TokenizationApi#createNewCollection"); + 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 TokenizationApi#createNewCollection"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **collectionDeployRequestDto** | [**CollectionDeployRequestDto**](CollectionDeployRequestDto.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** | Collection was created successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## fetchCollectionTokenDetails + +> CompletableFuture> fetchCollectionTokenDetails fetchCollectionTokenDetails(id, tokenId) + +Get collection token details + +Get collection token details by id + +### 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.TokenizationApi; +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 = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The collection link id + String tokenId = "1"; // String | The tokenId as it appears on the blockchain + try { + CompletableFuture> response = fireblocks.tokenization().fetchCollectionTokenDetails(id, tokenId); + 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 TokenizationApi#fetchCollectionTokenDetails"); + 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 TokenizationApi#fetchCollectionTokenDetails"); + 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 collection link id | | +| **tokenId** | **String**| The tokenId as it appears on 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** | Collection token details were fetched successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getCollectionById + +> CompletableFuture> getCollectionById getCollectionById(id) + +Get a collection by id + +Get a collection by id + +### 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.TokenizationApi; +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 = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + try { + CompletableFuture> response = fireblocks.tokenization().getCollectionById(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 TokenizationApi#getCollectionById"); + 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 TokenizationApi#getCollectionById"); + 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 token link id | | + +### 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** | Collection fetched successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getLinkedCollections + +> CompletableFuture> getLinkedCollections getLinkedCollections(pageCursor, pageSize, status) + +Get collections + +Get collections (paginated) + +### 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.TokenizationApi; +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 pageCursor = "pageCursor_example"; // String | Page cursor to get the next page, for example - \"MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==\" + BigDecimal pageSize = new BigDecimal("100"); // BigDecimal | Number of items per page (max 100), requesting more then 100 will return 100 items + Object status = COMPLETED; // Object | A comma separated list of statuses to filter. Default is \"COMPLETED\" + try { + CompletableFuture> response = fireblocks.tokenization().getLinkedCollections(pageCursor, pageSize, status); + 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 TokenizationApi#getLinkedCollections"); + 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 TokenizationApi#getLinkedCollections"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **pageCursor** | **String**| Page cursor to get the next page, for example - \"MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==\" | [optional] | +| **pageSize** | **BigDecimal**| Number of items per page (max 100), requesting more then 100 will return 100 items | [optional] [default to 100] | +| **status** | [**Object**](.md)| A comma separated list of statuses to filter. Default is \"COMPLETED\" | [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** | Collection fetched successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + ## getLinkedToken > CompletableFuture> getLinkedToken getLinkedToken(id) @@ -271,9 +705,9 @@ No authorization required > CompletableFuture> link link(tokenLinkRequestDto, idempotencyKey) -Link a token +Link a contract -Link an already existing token (by assetId, collectionId or contractId as refId) to a workspace across EVM, Stellar, or Ripple platforms. The token will be linked to the workspace if it does not already exist. +Link an a contract ### Example @@ -350,11 +784,98 @@ No authorization required |-------------|-------------|------------------| | **200** | Token linked successfully | - | | **201** | | - | -| **404** | Could not find the underlying token identifier (refId) to link the token to | - | +| **404** | Could not find the underlying contract to link to | - | | **409** | Token link for {refId} already exists | - | | **0** | Error Response | * X-Request-ID -
| +## mintCollectionToken + +> CompletableFuture> mintCollectionToken mintCollectionToken(collectionMintRequestDto, id, idempotencyKey) + +Mint tokens + +Mint tokens and upload metadata + +### 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.TokenizationApi; +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); + + CollectionMintRequestDto collectionMintRequestDto = new CollectionMintRequestDto(); // CollectionMintRequestDto | + String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The collection link id + 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.tokenization().mintCollectionToken(collectionMintRequestDto, 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 TokenizationApi#mintCollectionToken"); + 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 TokenizationApi#mintCollectionToken"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **collectionMintRequestDto** | [**CollectionMintRequestDto**](CollectionMintRequestDto.md)| | | +| **id** | **String**| The collection link id | | +| **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** | Tokens minted successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + ## unlink > CompletableFuture> unlink unlink(id) @@ -438,3 +959,86 @@ No authorization required | **404** | Link did not exist | - | | **0** | Error Response | * X-Request-ID -
| + +## unlinkCollection + +> CompletableFuture> unlinkCollection unlinkCollection(id) + +Delete a collection link + +Delete a collection link + +### 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.TokenizationApi; +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 = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + try { + CompletableFuture> response = fireblocks.tokenization().unlinkCollection(id); + 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 TokenizationApi#unlinkCollection"); + 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 TokenizationApi#unlinkCollection"); + 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 token link id | | + +### 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 | +|-------------|-------------|------------------| +| **204** | Collection unlinked successfully | - | +| **404** | Link for collection does not exist | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index 3fa0536..cb79744 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -22,6 +22,7 @@ |**priorityFee** | [**TransactionRequestPriorityFee**](TransactionRequestPriorityFee.md) | | [optional] | |**failOnLowFee** | **Boolean** | When set to `true`, in case the current `MEDIUM` fee level is higher than the one specified in the transaction, the transaction will fail to avoid getting stuck with no confirmations. | [optional] | |**maxFee** | **String** | The maximum fee (gas price or fee per byte) that should be payed for the transaction. In case the current value of the requested `feeLevel` is higher than this requested maximum fee. Represented by a numeric string for accurate precision. | [optional] | +|**maxTotalFee** | **String** | For BTC-based blockchains only. The maximum fee (in the units of the fee-paying asset) that should be paid for the transaction. | [optional] | |**gasLimit** | [**TransactionRequestGasLimit**](TransactionRequestGasLimit.md) | | [optional] | |**gasPrice** | [**TransactionRequestGasPrice**](TransactionRequestGasPrice.md) | | [optional] | |**networkFee** | [**TransactionRequestNetworkFee**](TransactionRequestNetworkFee.md) | | [optional] | @@ -32,6 +33,7 @@ |**autoStaking** | **Boolean** | This feature is no longer supported. | [optional] | |**networkStaking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] | |**cpuStaking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] | +|**useGasless** | **Boolean** | - Override the default gaslsess configuration by sending true\\false | [optional] | diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index d8cc1ef..d12e595 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -13,6 +13,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getTransaction**](TransactionsApi.md#getTransaction) | **GET** /transactions/{txId} | Find a specific transaction by Fireblocks transaction ID | | [**getTransactionByExternalId**](TransactionsApi.md#getTransactionByExternalId) | **GET** /transactions/external_tx_id/{externalTxId} | Find a specific transaction by external transaction ID | | [**getTransactions**](TransactionsApi.md#getTransactions) | **GET** /transactions | List transaction history | +| [**rescanTransactionsBeta**](TransactionsApi.md#rescanTransactionsBeta) | **POST** /transactions/rescan | rescan array of transactions | | [**setConfirmationThresholdByTransactionHash**](TransactionsApi.md#setConfirmationThresholdByTransactionHash) | **POST** /txHash/{txHash}/set_confirmation_threshold | Set confirmation threshold by transaction hash | | [**setTransactionConfirmationThreshold**](TransactionsApi.md#setTransactionConfirmationThreshold) | **POST** /transactions/{txId}/set_confirmation_threshold | Set confirmation threshold by transaction ID | | [**unfreezeTransaction**](TransactionsApi.md#unfreezeTransaction) | **POST** /transactions/{txId}/unfreeze | Unfreeze a transaction | @@ -813,6 +814,91 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## rescanTransactionsBeta + +> CompletableFuture>> rescanTransactionsBeta rescanTransactionsBeta(rescanTransaction, idempotencyKey) + +rescan array of transactions + +rescan transaction by running an async job. </br> **Note**: - These endpoints are currently in beta and might be subject to changes. - We limit the amount of the transaction to 16 per 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.TransactionsApi; +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); + + List rescanTransaction = Arrays.asList(); // List | + 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.transactions().rescanTransactionsBeta(rescanTransaction, 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 TransactionsApi#rescanTransactionsBeta"); + 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 TransactionsApi#rescanTransactionsBeta"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **rescanTransaction** | [**List<RescanTransaction>**](RescanTransaction.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 | +|-------------|-------------|------------------| +| **200** | A array of validated transactions that were sent to rescan | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## setConfirmationThresholdByTransactionHash > CompletableFuture> setConfirmationThresholdByTransactionHash setConfirmationThresholdByTransactionHash(txHash, setConfirmationsThresholdRequest, idempotencyKey) diff --git a/docs/ValidatedTransactionsForRescan.md b/docs/ValidatedTransactionsForRescan.md new file mode 100644 index 0000000..a482eae --- /dev/null +++ b/docs/ValidatedTransactionsForRescan.md @@ -0,0 +1,15 @@ + + +# ValidatedTransactionsForRescan + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseAsset** | **String** | Base asset symbol BTC_TEST, ETH_TEST5) | [optional] | +|**networkProtocol** | **String** | Netowrk protocol of the blockchain (BTC, ETH) | [optional] | +|**txHashes** | **List<String>** | Blockchain TX hashes | [optional] | + + + diff --git a/pom.xml b/pom.xml index 0285632..94938f5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 3.1.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index 535657c..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 = "3.1.0"; + public static final String VERSION = "0.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java index 5bee7fa..3ae1bc4 100644 --- a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java @@ -20,7 +20,6 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.model.GetAuditLogsResponse; -import com.fireblocks.sdk.model.GetAuditLogsResponseDTO; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -146,84 +145,6 @@ private HttpRequest.Builder getAuditLogsRequestBuilder(String timePeriod, String 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 audit logs Get all audits - * - * @param timePeriod The last time period to fetch audit logs (optional) - * @return CompletableFuture<ApiResponse<GetAuditLogsResponseDTO>> - * @throws ApiException if fails to make API call - */ - public CompletableFuture> getAudits(String timePeriod) - throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = getAuditsRequestBuilder(timePeriod); - 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("getAudits", 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< - GetAuditLogsResponseDTO>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder getAuditsRequestBuilder(String timePeriod) throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/audits"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "timePeriod"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("timePeriod", timePeriod)); - - 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); diff --git a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java index bc76f89..5e9614a 100644 --- a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java @@ -20,8 +20,11 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.AddAbiRequestDto; +import com.fireblocks.sdk.model.ContractWithAbiDto; import com.fireblocks.sdk.model.DeployedContractResponseDto; import com.fireblocks.sdk.model.DeployedContractsPaginatedResponse; +import com.fireblocks.sdk.model.FetchAbiRequestDto; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -74,6 +77,163 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Save contract ABI Save contract ABI for the tenant + * + * @param addAbiRequestDto (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<ContractWithAbiDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> addContractABI( + AddAbiRequestDto addAbiRequestDto, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + addContractABIRequestBuilder(addAbiRequestDto, 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("addContractABI", 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< + ContractWithAbiDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder addContractABIRequestBuilder( + AddAbiRequestDto addAbiRequestDto, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists("addContractABI", "addAbiRequestDto", addAbiRequestDto); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/contracts/abi"; + + 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(addAbiRequestDto); + 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; + } + /** + * Fetch the contract ABI Fetch the ABI. If not found fetch the ABI from the block explorer + * + * @param fetchAbiRequestDto (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<ContractWithAbiDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> fetchContractAbi( + FetchAbiRequestDto fetchAbiRequestDto, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + fetchContractAbiRequestBuilder(fetchAbiRequestDto, 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("fetchContractAbi", 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< + ContractWithAbiDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder fetchContractAbiRequestBuilder( + FetchAbiRequestDto fetchAbiRequestDto, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists( + "fetchContractAbi", "fetchAbiRequestDto", fetchAbiRequestDto); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/contracts/fetch_abi"; + + 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(fetchAbiRequestDto); + 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; + } /** * Return deployed contract data Return deployed contract data by blockchain native asset id and * contract address diff --git a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java index 2189480..285600f 100644 --- a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -20,7 +20,14 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.CollectionBurnRequestDto; +import com.fireblocks.sdk.model.CollectionBurnResponseDto; +import com.fireblocks.sdk.model.CollectionDeployRequestDto; +import com.fireblocks.sdk.model.CollectionLinkDto; +import com.fireblocks.sdk.model.CollectionMintRequestDto; +import com.fireblocks.sdk.model.CollectionMintResponseDto; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; @@ -76,6 +83,405 @@ private String formatExceptionMessage(String operationId, int statusCode, String return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Burn tokens Burn tokens in a collection + * + * @param collectionBurnRequestDto (required) + * @param id The collection link id (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<CollectionBurnResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> burnCollectionToken( + CollectionBurnRequestDto collectionBurnRequestDto, String id, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + burnCollectionTokenRequestBuilder(collectionBurnRequestDto, 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( + "burnCollectionToken", 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< + CollectionBurnResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder burnCollectionTokenRequestBuilder( + CollectionBurnRequestDto collectionBurnRequestDto, String id, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "burnCollectionToken", "collectionBurnRequestDto", collectionBurnRequestDto); + ValidationUtils.assertParamExistsAndNotEmpty("burnCollectionToken", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/collections/{id}/tokens/burn" + .replace("{id}", ApiClient.urlEncode(id.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(collectionBurnRequestDto); + 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; + } + /** + * Create a new collection Create a new collection and link it as a token + * + * @param collectionDeployRequestDto (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<CollectionLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> createNewCollection( + CollectionDeployRequestDto collectionDeployRequestDto, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + createNewCollectionRequestBuilder(collectionDeployRequestDto, 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( + "createNewCollection", 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< + CollectionLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder createNewCollectionRequestBuilder( + CollectionDeployRequestDto collectionDeployRequestDto, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "createNewCollection", "collectionDeployRequestDto", collectionDeployRequestDto); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/collections"; + + 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(collectionDeployRequestDto); + 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 collection token details Get collection token details by id + * + * @param id The collection link id (required) + * @param tokenId The tokenId as it appears on the blockchain (required) + * @return CompletableFuture<ApiResponse<CollectionLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> fetchCollectionTokenDetails( + String id, String tokenId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + fetchCollectionTokenDetailsRequestBuilder(id, tokenId); + 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( + "fetchCollectionTokenDetails", + 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< + CollectionLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder fetchCollectionTokenDetailsRequestBuilder(String id, String tokenId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("fetchCollectionTokenDetails", "id", id); + ValidationUtils.assertParamExistsAndNotEmpty( + "fetchCollectionTokenDetails", "tokenId", tokenId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/collections/{id}/tokens/{tokenId}" + .replace("{id}", ApiClient.urlEncode(id.toString())) + .replace("{tokenId}", ApiClient.urlEncode(tokenId.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 a collection by id Get a collection by id + * + * @param id The token link id (required) + * @return CompletableFuture<ApiResponse<CollectionLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getCollectionById(String id) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getCollectionByIdRequestBuilder(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("getCollectionById", 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< + CollectionLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getCollectionByIdRequestBuilder(String id) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getCollectionById", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/collections/{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; + } + /** + * Get collections Get collections (paginated) + * + * @param pageCursor Page cursor to get the next page, for example - + * \"MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==\" (optional) + * @param pageSize Number of items per page (max 100), requesting more then 100 will return 100 + * items (optional, default to 100) + * @param status A comma separated list of statuses to filter. Default is + * \"COMPLETED\" (optional) + * @return CompletableFuture<ApiResponse<GetLinkedCollectionsPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getLinkedCollections(String pageCursor, BigDecimal pageSize, Object status) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getLinkedCollectionsRequestBuilder(pageCursor, pageSize, status); + 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( + "getLinkedCollections", 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< + GetLinkedCollectionsPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getLinkedCollectionsRequestBuilder( + String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/collections"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + + 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; + } /** * Return a linked token Return a linked token, with its status and metadata. * @@ -316,9 +722,7 @@ private HttpRequest.Builder issueNewTokenRequestBuilder( return localVarRequestBuilder; } /** - * Link a token Link an already existing token (by assetId, collectionId or contractId as refId) - * to a workspace across EVM, Stellar, or Ripple platforms. The token will be linked to the - * workspace if it does not already exist. + * Link a contract Link an a contract * * @param tokenLinkRequestDto (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -395,6 +799,93 @@ private HttpRequest.Builder linkRequestBuilder( } return localVarRequestBuilder; } + /** + * Mint tokens Mint tokens and upload metadata + * + * @param collectionMintRequestDto (required) + * @param id The collection link id (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<CollectionMintResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> mintCollectionToken( + CollectionMintRequestDto collectionMintRequestDto, String id, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + mintCollectionTokenRequestBuilder(collectionMintRequestDto, 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( + "mintCollectionToken", 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< + CollectionMintResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder mintCollectionTokenRequestBuilder( + CollectionMintRequestDto collectionMintRequestDto, String id, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "mintCollectionToken", "collectionMintRequestDto", collectionMintRequestDto); + ValidationUtils.assertParamExistsAndNotEmpty("mintCollectionToken", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/collections/{id}/tokens/mint" + .replace("{id}", ApiClient.urlEncode(id.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(collectionMintRequestDto); + 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; + } /** * Unlink a token Unlink a token. The token will be unlinked from the workspace. The token will * not be deleted on chain nor the refId, only the link to the workspace will be removed. @@ -440,6 +931,60 @@ private HttpRequest.Builder unlinkRequestBuilder(String id) throws ApiException 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; + } + /** + * Delete a collection link Delete a collection link + * + * @param id The token link id (required) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> unlinkCollection(String id) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = unlinkCollectionRequestBuilder(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("unlinkCollection", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder unlinkCollectionRequestBuilder(String id) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("unlinkCollection", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/collections/{id}" + .replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); diff --git a/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java b/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java index a6ce74e..d6df835 100644 --- a/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java @@ -27,12 +27,14 @@ import com.fireblocks.sdk.model.EstimatedNetworkFeeResponse; import com.fireblocks.sdk.model.EstimatedTransactionFeeResponse; import com.fireblocks.sdk.model.FreezeTransactionResponse; +import com.fireblocks.sdk.model.RescanTransaction; import com.fireblocks.sdk.model.SetConfirmationsThresholdRequest; import com.fireblocks.sdk.model.SetConfirmationsThresholdResponse; import com.fireblocks.sdk.model.TransactionRequest; import com.fireblocks.sdk.model.TransactionResponse; import com.fireblocks.sdk.model.UnfreezeTransactionResponse; import com.fireblocks.sdk.model.ValidateAddressResponse; +import com.fireblocks.sdk.model.ValidatedTransactionsForRescan; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -888,6 +890,91 @@ private HttpRequest.Builder getTransactionsRequestBuilder( } return localVarRequestBuilder; } + /** + * rescan array of transactions rescan transaction by running an async job. </br> + * **Note**: - These endpoints are currently in beta and might be subject to changes. - We limit + * the amount of the transaction to 16 per request. + * + * @param rescanTransaction (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<List<ValidatedTransactionsForRescan>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> + rescanTransactionsBeta(List rescanTransaction, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + rescanTransactionsBetaRequestBuilder(rescanTransaction, 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( + "rescanTransactionsBeta", 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< + List< + ValidatedTransactionsForRescan>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder rescanTransactionsBetaRequestBuilder( + List rescanTransaction, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists( + "rescanTransactionsBeta", "rescanTransaction", rescanTransaction); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/transactions/rescan"; + + 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(rescanTransaction); + 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; + } /** * Set confirmation threshold by transaction hash Overrides the required number of confirmations * for transaction completion by transaction hash. diff --git a/src/main/java/com/fireblocks/sdk/model/AddAbiRequestDto.java b/src/main/java/com/fireblocks/sdk/model/AddAbiRequestDto.java new file mode 100644 index 0000000..20badef --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AddAbiRequestDto.java @@ -0,0 +1,286 @@ +/* + * 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; + +/** AddAbiRequestDto */ +@JsonPropertyOrder({ + AddAbiRequestDto.JSON_PROPERTY_CONTRACT_ADDRESS, + AddAbiRequestDto.JSON_PROPERTY_BASE_ASSET_ID, + AddAbiRequestDto.JSON_PROPERTY_ABI, + AddAbiRequestDto.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddAbiRequestDto { + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public static final String JSON_PROPERTY_ABI = "abi"; + private List abi = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public AddAbiRequestDto() {} + + public AddAbiRequestDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The address of deployed contract + * + * @return contractAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public AddAbiRequestDto baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The blockchain base assetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public AddAbiRequestDto abi(List abi) { + this.abi = abi; + return this; + } + + public AddAbiRequestDto addAbiItem(AbiFunction abiItem) { + if (this.abi == null) { + this.abi = new ArrayList<>(); + } + this.abi.add(abiItem); + return this; + } + + /** + * The ABI of the contract + * + * @return abi + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAbi() { + return abi; + } + + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbi(List abi) { + this.abi = abi; + } + + public AddAbiRequestDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + /** Return true if this AddAbiRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddAbiRequestDto addAbiRequestDto = (AddAbiRequestDto) o; + return Objects.equals(this.contractAddress, addAbiRequestDto.contractAddress) + && Objects.equals(this.baseAssetId, addAbiRequestDto.baseAssetId) + && Objects.equals(this.abi, addAbiRequestDto.abi) + && Objects.equals(this.name, addAbiRequestDto.name); + } + + @Override + public int hashCode() { + return Objects.hash(contractAddress, baseAssetId, abi, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddAbiRequestDto {\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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 `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 `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBaseAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `abi` to the URL query string + if (getAbi() != null) { + for (int i = 0; i < getAbi().size(); i++) { + if (getAbi().get(i) != null) { + joiner.add( + getAbi().get(i) + .toUrlQueryString( + String.format( + "%sabi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // 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"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java new file mode 100644 index 0000000..b861d99 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.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; + +/** CollectionBurnRequestDto */ +@JsonPropertyOrder({ + CollectionBurnRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CollectionBurnRequestDto.JSON_PROPERTY_TOKEN_ID, + CollectionBurnRequestDto.JSON_PROPERTY_AMOUNT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionBurnRequestDto { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_TOKEN_ID = "tokenId"; + private String tokenId; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public CollectionBurnRequestDto() {} + + public CollectionBurnRequestDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiates the burn function + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CollectionBurnRequestDto tokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } + + /** + * The token id + * + * @return tokenId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTokenId() { + return tokenId; + } + + @JsonProperty(JSON_PROPERTY_TOKEN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTokenId(String tokenId) { + this.tokenId = tokenId; + } + + public CollectionBurnRequestDto amount(String amount) { + this.amount = amount; + return this; + } + + /** + * For ERC721, amount is optional or should always be 1 and for ERC1155, amount should be 1 or + * greater + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + /** Return true if this CollectionBurnRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionBurnRequestDto collectionBurnRequestDto = (CollectionBurnRequestDto) o; + return Objects.equals(this.vaultAccountId, collectionBurnRequestDto.vaultAccountId) + && Objects.equals(this.tokenId, collectionBurnRequestDto.tokenId) + && Objects.equals(this.amount, collectionBurnRequestDto.amount); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, tokenId, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionBurnRequestDto {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `tokenId` to the URL query string + if (getTokenId() != null) { + joiner.add( + String.format( + "%stokenId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTokenId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java new file mode 100644 index 0000000..698784b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.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; + +/** CollectionBurnResponseDto */ +@JsonPropertyOrder({CollectionBurnResponseDto.JSON_PROPERTY_TX_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionBurnResponseDto { + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public CollectionBurnResponseDto() {} + + public CollectionBurnResponseDto txId(String txId) { + this.txId = txId; + return this; + } + + /** + * Transaction Id for the burn operation + * + * @return txId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxId(String txId) { + this.txId = txId; + } + + /** Return true if this CollectionBurnResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionBurnResponseDto collectionBurnResponseDto = (CollectionBurnResponseDto) o; + return Objects.equals(this.txId, collectionBurnResponseDto.txId); + } + + @Override + public int hashCode() { + return Objects.hash(txId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionBurnResponseDto {\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionDeployRequestDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionDeployRequestDto.java new file mode 100644 index 0000000..7f6c2fe --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionDeployRequestDto.java @@ -0,0 +1,390 @@ +/* + * 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; + +/** CollectionDeployRequestDto */ +@JsonPropertyOrder({ + CollectionDeployRequestDto.JSON_PROPERTY_BASE_ASSET_ID, + CollectionDeployRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CollectionDeployRequestDto.JSON_PROPERTY_TYPE, + CollectionDeployRequestDto.JSON_PROPERTY_NAME, + CollectionDeployRequestDto.JSON_PROPERTY_SYMBOL, + CollectionDeployRequestDto.JSON_PROPERTY_ADMIN_ADDRESS, + CollectionDeployRequestDto.JSON_PROPERTY_DISPLAY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionDeployRequestDto { + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CollectionType type; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_ADMIN_ADDRESS = "adminAddress"; + private String adminAddress; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public CollectionDeployRequestDto() {} + + public CollectionDeployRequestDto baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The blockchain base assetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public CollectionDeployRequestDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to issue the token + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CollectionDeployRequestDto type(CollectionType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CollectionType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(CollectionType type) { + this.type = type; + } + + public CollectionDeployRequestDto name(String name) { + this.name = name; + return this; + } + + /** + * A string that represents the name of the collection + * + * @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 CollectionDeployRequestDto symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * A string that represents the symbol of the collection + * + * @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 CollectionDeployRequestDto adminAddress(String adminAddress) { + this.adminAddress = adminAddress; + return this; + } + + /** + * The EVM address of the user that will be set as the admin user of the collection + * + * @return adminAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADMIN_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAdminAddress() { + return adminAddress; + } + + @JsonProperty(JSON_PROPERTY_ADMIN_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdminAddress(String adminAddress) { + this.adminAddress = adminAddress; + } + + public CollectionDeployRequestDto displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A string to display as a name of the collection + * + * @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; + } + + /** Return true if this CollectionDeployRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionDeployRequestDto collectionDeployRequestDto = (CollectionDeployRequestDto) o; + return Objects.equals(this.baseAssetId, collectionDeployRequestDto.baseAssetId) + && Objects.equals(this.vaultAccountId, collectionDeployRequestDto.vaultAccountId) + && Objects.equals(this.type, collectionDeployRequestDto.type) + && Objects.equals(this.name, collectionDeployRequestDto.name) + && Objects.equals(this.symbol, collectionDeployRequestDto.symbol) + && Objects.equals(this.adminAddress, collectionDeployRequestDto.adminAddress) + && Objects.equals(this.displayName, collectionDeployRequestDto.displayName); + } + + @Override + public int hashCode() { + return Objects.hash( + baseAssetId, vaultAccountId, type, name, symbol, adminAddress, displayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionDeployRequestDto {\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" adminAddress: ").append(toIndentedString(adminAddress)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).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 `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBaseAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + 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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `adminAddress` to the URL query string + if (getAdminAddress() != null) { + joiner.add( + String.format( + "%sadminAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdminAddress()), + 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"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionLinkDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionLinkDto.java new file mode 100644 index 0000000..eb613fc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionLinkDto.java @@ -0,0 +1,337 @@ +/* + * 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; + +/** CollectionLinkDto */ +@JsonPropertyOrder({ + CollectionLinkDto.JSON_PROPERTY_ID, + CollectionLinkDto.JSON_PROPERTY_STATUS, + CollectionLinkDto.JSON_PROPERTY_TYPE, + CollectionLinkDto.JSON_PROPERTY_DISPLAY_NAME, + CollectionLinkDto.JSON_PROPERTY_COLLECTION_METADATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionLinkDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** The collection status */ + public enum StatusEnum { + PENDING("PENDING"), + + 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; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CollectionType type; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_COLLECTION_METADATA = "collectionMetadata"; + private CollectionMetadataDto collectionMetadata; + + public CollectionLinkDto() {} + + public CollectionLinkDto id(String id) { + this.id = id; + return this; + } + + /** + * The collection id + * + * @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 CollectionLinkDto status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The collection status + * + * @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 CollectionLinkDto type(CollectionType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CollectionType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(CollectionType type) { + this.type = type; + } + + public CollectionLinkDto displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the collection. If was not provided, would be taken from the contract + * template + * + * @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 CollectionLinkDto collectionMetadata(CollectionMetadataDto collectionMetadata) { + this.collectionMetadata = collectionMetadata; + return this; + } + + /** + * The collection's metadata + * + * @return collectionMetadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLLECTION_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CollectionMetadataDto getCollectionMetadata() { + return collectionMetadata; + } + + @JsonProperty(JSON_PROPERTY_COLLECTION_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCollectionMetadata(CollectionMetadataDto collectionMetadata) { + this.collectionMetadata = collectionMetadata; + } + + /** Return true if this CollectionLinkDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionLinkDto collectionLinkDto = (CollectionLinkDto) o; + return Objects.equals(this.id, collectionLinkDto.id) + && Objects.equals(this.status, collectionLinkDto.status) + && Objects.equals(this.type, collectionLinkDto.type) + && Objects.equals(this.displayName, collectionLinkDto.displayName) + && Objects.equals(this.collectionMetadata, collectionLinkDto.collectionMetadata); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, type, displayName, collectionMetadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionLinkDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" collectionMetadata: ") + .append(toIndentedString(collectionMetadata)) + .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 `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"))); + } + + // 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 `collectionMetadata` to the URL query string + if (getCollectionMetadata() != null) { + joiner.add( + getCollectionMetadata() + .toUrlQueryString(prefix + "collectionMetadata" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionMintRequestDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionMintRequestDto.java new file mode 100644 index 0000000..c147c8c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionMintRequestDto.java @@ -0,0 +1,340 @@ +/* + * 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; + +/** CollectionMintRequestDto */ +@JsonPropertyOrder({ + CollectionMintRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CollectionMintRequestDto.JSON_PROPERTY_TO, + CollectionMintRequestDto.JSON_PROPERTY_TOKEN_ID, + CollectionMintRequestDto.JSON_PROPERTY_AMOUNT, + CollectionMintRequestDto.JSON_PROPERTY_METADATA_U_R_I, + CollectionMintRequestDto.JSON_PROPERTY_METADATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionMintRequestDto { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_TO = "to"; + private String to; + + public static final String JSON_PROPERTY_TOKEN_ID = "tokenId"; + private String tokenId; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + public static final String JSON_PROPERTY_METADATA_U_R_I = "metadataURI"; + private String metadataURI; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private CollectionTokenMetadataDto metadata; + + public CollectionMintRequestDto() {} + + public CollectionMintRequestDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiates the mint function. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CollectionMintRequestDto to(String to) { + this.to = to; + return this; + } + + /** + * The EVM address to mint to + * + * @return to + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTo() { + return to; + } + + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTo(String to) { + this.to = to; + } + + public CollectionMintRequestDto tokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } + + /** + * The token id, recommended to have numerical format and in sequential order + * + * @return tokenId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTokenId() { + return tokenId; + } + + @JsonProperty(JSON_PROPERTY_TOKEN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTokenId(String tokenId) { + this.tokenId = tokenId; + } + + public CollectionMintRequestDto amount(String amount) { + this.amount = amount; + return this; + } + + /** + * For ERC721, amount is optional or should always be 1 and for ERC1155, amount should be 1 or + * greater + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public CollectionMintRequestDto metadataURI(String metadataURI) { + this.metadataURI = metadataURI; + return this; + } + + /** + * URL of metadata uploaded, skip uploading to IPFS if this field is provided with any value + * + * @return metadataURI + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA_U_R_I) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMetadataURI() { + return metadataURI; + } + + @JsonProperty(JSON_PROPERTY_METADATA_U_R_I) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadataURI(String metadataURI) { + this.metadataURI = metadataURI; + } + + public CollectionMintRequestDto metadata(CollectionTokenMetadataDto metadata) { + this.metadata = metadata; + return this; + } + + /** + * Metadata to upload + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CollectionTokenMetadataDto getMetadata() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMetadata(CollectionTokenMetadataDto metadata) { + this.metadata = metadata; + } + + /** Return true if this CollectionMintRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMintRequestDto collectionMintRequestDto = (CollectionMintRequestDto) o; + return Objects.equals(this.vaultAccountId, collectionMintRequestDto.vaultAccountId) + && Objects.equals(this.to, collectionMintRequestDto.to) + && Objects.equals(this.tokenId, collectionMintRequestDto.tokenId) + && Objects.equals(this.amount, collectionMintRequestDto.amount) + && Objects.equals(this.metadataURI, collectionMintRequestDto.metadataURI) + && Objects.equals(this.metadata, collectionMintRequestDto.metadata); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, to, tokenId, amount, metadataURI, metadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMintRequestDto {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" metadataURI: ").append(toIndentedString(metadataURI)).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 `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + 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 `tokenId` to the URL query string + if (getTokenId() != null) { + joiner.add( + String.format( + "%stokenId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTokenId()), 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 `metadataURI` to the URL query string + if (getMetadataURI() != null) { + joiner.add( + String.format( + "%smetadataURI%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getMetadataURI()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // 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/CollectionMintResponseDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionMintResponseDto.java new file mode 100644 index 0000000..430af77 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionMintResponseDto.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; + +/** CollectionMintResponseDto */ +@JsonPropertyOrder({CollectionMintResponseDto.JSON_PROPERTY_TX_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionMintResponseDto { + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public CollectionMintResponseDto() {} + + public CollectionMintResponseDto txId(String txId) { + this.txId = txId; + return this; + } + + /** + * Transaction Id for the mint operation + * + * @return txId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxId(String txId) { + this.txId = txId; + } + + /** Return true if this CollectionMintResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMintResponseDto collectionMintResponseDto = (CollectionMintResponseDto) o; + return Objects.equals(this.txId, collectionMintResponseDto.txId); + } + + @Override + public int hashCode() { + return Objects.hash(txId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMintResponseDto {\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java b/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java index 9c9cfef..2cb253a 100644 --- a/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java @@ -72,7 +72,13 @@ public enum BlockchainDescriptorEnum { ETHERLINK("ETHERLINK"), - ETHERLINK_TEST("ETHERLINK_TEST"); + ETHERLINK_TEST("ETHERLINK_TEST"), + + MANTLE("MANTLE"), + + MANTLE_TEST("MANTLE_TEST"), + + GUN_GUNZILLA_TEST("GUN_GUNZILLA_TEST"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java new file mode 100644 index 0000000..ac51336 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.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; + +/** CollectionTokenMetadataAttributeDto */ +@JsonPropertyOrder({ + CollectionTokenMetadataAttributeDto.JSON_PROPERTY_TRAIT_TYPE, + CollectionTokenMetadataAttributeDto.JSON_PROPERTY_VALUE, + CollectionTokenMetadataAttributeDto.JSON_PROPERTY_DISPLAY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionTokenMetadataAttributeDto { + public static final String JSON_PROPERTY_TRAIT_TYPE = "trait_type"; + private String traitType; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_DISPLAY_TYPE = "display_type"; + private String displayType; + + public CollectionTokenMetadataAttributeDto() {} + + public CollectionTokenMetadataAttributeDto traitType(String traitType) { + this.traitType = traitType; + return this; + } + + /** + * Name of the trait + * + * @return traitType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TRAIT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTraitType() { + return traitType; + } + + @JsonProperty(JSON_PROPERTY_TRAIT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTraitType(String traitType) { + this.traitType = traitType; + } + + public CollectionTokenMetadataAttributeDto value(String value) { + this.value = value; + return this; + } + + /** + * Value of the trait + * + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(String value) { + this.value = value; + } + + public CollectionTokenMetadataAttributeDto displayType(String displayType) { + this.displayType = displayType; + return this; + } + + /** + * A field indicating how you would like trait to be displayed + * + * @return displayType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayType() { + return displayType; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayType(String displayType) { + this.displayType = displayType; + } + + /** Return true if this CollectionTokenMetadataAttributeDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionTokenMetadataAttributeDto collectionTokenMetadataAttributeDto = + (CollectionTokenMetadataAttributeDto) o; + return Objects.equals(this.traitType, collectionTokenMetadataAttributeDto.traitType) + && Objects.equals(this.value, collectionTokenMetadataAttributeDto.value) + && Objects.equals( + this.displayType, collectionTokenMetadataAttributeDto.displayType); + } + + @Override + public int hashCode() { + return Objects.hash(traitType, value, displayType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionTokenMetadataAttributeDto {\n"); + sb.append(" traitType: ").append(toIndentedString(traitType)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" displayType: ").append(toIndentedString(displayType)).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 `trait_type` to the URL query string + if (getTraitType() != null) { + joiner.add( + String.format( + "%strait_type%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTraitType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add( + String.format( + "%svalue%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getValue()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `display_type` to the URL query string + if (getDisplayType() != null) { + joiner.add( + String.format( + "%sdisplay_type%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java new file mode 100644 index 0000000..5f9a8ed --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java @@ -0,0 +1,371 @@ +/* + * 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; + +/** CollectionTokenMetadataDto */ +@JsonPropertyOrder({ + CollectionTokenMetadataDto.JSON_PROPERTY_NAME, + CollectionTokenMetadataDto.JSON_PROPERTY_DESCRIPTION, + CollectionTokenMetadataDto.JSON_PROPERTY_IMAGE, + CollectionTokenMetadataDto.JSON_PROPERTY_ANIMATION_URL, + CollectionTokenMetadataDto.JSON_PROPERTY_EXTERNAL_URL, + CollectionTokenMetadataDto.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionTokenMetadataDto { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IMAGE = "image"; + private String image; + + public static final String JSON_PROPERTY_ANIMATION_URL = "animation_url"; + private String animationUrl; + + public static final String JSON_PROPERTY_EXTERNAL_URL = "external_url"; + private String externalUrl; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private List attributes; + + public CollectionTokenMetadataDto() {} + + public CollectionTokenMetadataDto name(String name) { + this.name = name; + return this; + } + + /** + * Token's 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 CollectionTokenMetadataDto description(String description) { + this.description = description; + return this; + } + + /** + * Token's description + * + * @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 CollectionTokenMetadataDto image(String image) { + this.image = image; + return this; + } + + /** + * Token's image URL + * + * @return image + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getImage() { + return image; + } + + @JsonProperty(JSON_PROPERTY_IMAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImage(String image) { + this.image = image; + } + + public CollectionTokenMetadataDto animationUrl(String animationUrl) { + this.animationUrl = animationUrl; + return this; + } + + /** + * Token's animation URL + * + * @return animationUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANIMATION_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAnimationUrl() { + return animationUrl; + } + + @JsonProperty(JSON_PROPERTY_ANIMATION_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAnimationUrl(String animationUrl) { + this.animationUrl = animationUrl; + } + + public CollectionTokenMetadataDto externalUrl(String externalUrl) { + this.externalUrl = externalUrl; + return this; + } + + /** + * Token's external URL + * + * @return externalUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExternalUrl() { + return externalUrl; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExternalUrl(String externalUrl) { + this.externalUrl = externalUrl; + } + + public CollectionTokenMetadataDto attributes( + List attributes) { + this.attributes = attributes; + return this; + } + + public CollectionTokenMetadataDto addAttributesItem( + CollectionTokenMetadataAttributeDto attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + return this; + } + + /** + * Token's metadata attributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttributes() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(List attributes) { + this.attributes = attributes; + } + + /** Return true if this CollectionTokenMetadataDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionTokenMetadataDto collectionTokenMetadataDto = (CollectionTokenMetadataDto) o; + return Objects.equals(this.name, collectionTokenMetadataDto.name) + && Objects.equals(this.description, collectionTokenMetadataDto.description) + && Objects.equals(this.image, collectionTokenMetadataDto.image) + && Objects.equals(this.animationUrl, collectionTokenMetadataDto.animationUrl) + && Objects.equals(this.externalUrl, collectionTokenMetadataDto.externalUrl) + && Objects.equals(this.attributes, collectionTokenMetadataDto.attributes); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, image, animationUrl, externalUrl, attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionTokenMetadataDto {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" animationUrl: ").append(toIndentedString(animationUrl)).append("\n"); + sb.append(" externalUrl: ").append(toIndentedString(externalUrl)).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 `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 `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 `image` to the URL query string + if (getImage() != null) { + joiner.add( + String.format( + "%simage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getImage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `animation_url` to the URL query string + if (getAnimationUrl() != null) { + joiner.add( + String.format( + "%sanimation_url%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAnimationUrl()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `external_url` to the URL query string + if (getExternalUrl() != null) { + joiner.add( + String.format( + "%sexternal_url%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getExternalUrl()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (int i = 0; i < getAttributes().size(); i++) { + if (getAttributes().get(i) != null) { + joiner.add( + getAttributes() + .get(i) + .toUrlQueryString( + String.format( + "%sattributes%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/CollectionType.java b/src/main/java/com/fireblocks/sdk/model/CollectionType.java new file mode 100644 index 0000000..fb92340 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionType.java @@ -0,0 +1,64 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The type of collection */ +public enum CollectionType { + NON_FUNGIBLE_TOKEN("NON_FUNGIBLE_TOKEN"), + + SEMI_FUNGIBLE_TOKEN("SEMI_FUNGIBLE_TOKEN"); + + private String value; + + CollectionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CollectionType fromValue(String value) { + for (CollectionType b : CollectionType.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/ContractWithAbiDto.java b/src/main/java/com/fireblocks/sdk/model/ContractWithAbiDto.java new file mode 100644 index 0000000..20fbca0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractWithAbiDto.java @@ -0,0 +1,409 @@ +/* + * 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; + +/** ContractWithAbiDto */ +@JsonPropertyOrder({ + ContractWithAbiDto.JSON_PROPERTY_CONTRACT_ADDRESS, + ContractWithAbiDto.JSON_PROPERTY_BASE_ASSET_ID, + ContractWithAbiDto.JSON_PROPERTY_NAME, + ContractWithAbiDto.JSON_PROPERTY_ABI, + ContractWithAbiDto.JSON_PROPERTY_IS_PROXY, + ContractWithAbiDto.JSON_PROPERTY_IMPLEMENTATION, + ContractWithAbiDto.JSON_PROPERTY_IS_PUBLIC +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractWithAbiDto { + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ABI = "abi"; + private List abi = new ArrayList<>(); + + public static final String JSON_PROPERTY_IS_PROXY = "isProxy"; + private Boolean isProxy; + + public static final String JSON_PROPERTY_IMPLEMENTATION = "implementation"; + private String implementation; + + public static final String JSON_PROPERTY_IS_PUBLIC = "isPublic"; + private Boolean isPublic; + + public ContractWithAbiDto() {} + + public ContractWithAbiDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The address of the contract + * + * @return contractAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public ContractWithAbiDto baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The blockchain base assetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public ContractWithAbiDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract + * + * @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 ContractWithAbiDto abi(List abi) { + this.abi = abi; + return this; + } + + public ContractWithAbiDto addAbiItem(AbiFunction abiItem) { + if (this.abi == null) { + this.abi = new ArrayList<>(); + } + this.abi.add(abiItem); + return this; + } + + /** + * The ABI of the contract + * + * @return abi + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAbi() { + return abi; + } + + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbi(List abi) { + this.abi = abi; + } + + public ContractWithAbiDto isProxy(Boolean isProxy) { + this.isProxy = isProxy; + return this; + } + + /** + * Whether the contract is a proxy contract + * + * @return isProxy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_PROXY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsProxy() { + return isProxy; + } + + @JsonProperty(JSON_PROPERTY_IS_PROXY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsProxy(Boolean isProxy) { + this.isProxy = isProxy; + } + + public ContractWithAbiDto implementation(String implementation) { + this.implementation = implementation; + return this; + } + + /** + * The implementation contract address + * + * @return implementation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPLEMENTATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getImplementation() { + return implementation; + } + + @JsonProperty(JSON_PROPERTY_IMPLEMENTATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImplementation(String implementation) { + this.implementation = implementation; + } + + public ContractWithAbiDto isPublic(Boolean isPublic) { + this.isPublic = isPublic; + return this; + } + + /** + * Whether the contract ABI is public + * + * @return isPublic + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_PUBLIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsPublic() { + return isPublic; + } + + @JsonProperty(JSON_PROPERTY_IS_PUBLIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsPublic(Boolean isPublic) { + this.isPublic = isPublic; + } + + /** Return true if this ContractWithAbiDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractWithAbiDto contractWithAbiDto = (ContractWithAbiDto) o; + return Objects.equals(this.contractAddress, contractWithAbiDto.contractAddress) + && Objects.equals(this.baseAssetId, contractWithAbiDto.baseAssetId) + && Objects.equals(this.name, contractWithAbiDto.name) + && Objects.equals(this.abi, contractWithAbiDto.abi) + && Objects.equals(this.isProxy, contractWithAbiDto.isProxy) + && Objects.equals(this.implementation, contractWithAbiDto.implementation) + && Objects.equals(this.isPublic, contractWithAbiDto.isPublic); + } + + @Override + public int hashCode() { + return Objects.hash( + contractAddress, baseAssetId, name, abi, isProxy, implementation, isPublic); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractWithAbiDto {\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); + sb.append(" isProxy: ").append(toIndentedString(isProxy)).append("\n"); + sb.append(" implementation: ").append(toIndentedString(implementation)).append("\n"); + sb.append(" isPublic: ").append(toIndentedString(isPublic)).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 `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 `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBaseAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `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 `abi` to the URL query string + if (getAbi() != null) { + for (int i = 0; i < getAbi().size(); i++) { + if (getAbi().get(i) != null) { + joiner.add( + getAbi().get(i) + .toUrlQueryString( + String.format( + "%sabi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `isProxy` to the URL query string + if (getIsProxy() != null) { + joiner.add( + String.format( + "%sisProxy%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getIsProxy()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `implementation` to the URL query string + if (getImplementation() != null) { + joiner.add( + String.format( + "%simplementation%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getImplementation()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `isPublic` to the URL query string + if (getIsPublic() != null) { + joiner.add( + String.format( + "%sisPublic%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getIsPublic()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java b/src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java index f4c2bf1..8bb850f 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java @@ -25,7 +25,8 @@ @JsonPropertyOrder({ CreateSigningKeyDto.JSON_PROPERTY_SIGNING_DEVICE_KEY_ID, CreateSigningKeyDto.JSON_PROPERTY_SIGNED_CERT_PEM, - CreateSigningKeyDto.JSON_PROPERTY_AGENT_USER_ID + CreateSigningKeyDto.JSON_PROPERTY_AGENT_USER_ID, + CreateSigningKeyDto.JSON_PROPERTY_PROOF_OF_OWNERSHIP }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateSigningKeyDto { @@ -38,6 +39,9 @@ public class CreateSigningKeyDto { public static final String JSON_PROPERTY_AGENT_USER_ID = "agentUserId"; private String agentUserId; + public static final String JSON_PROPERTY_PROOF_OF_OWNERSHIP = "proofOfOwnership"; + private CreateSigningKeyDtoProofOfOwnership proofOfOwnership; + public CreateSigningKeyDto() {} public CreateSigningKeyDto signingDeviceKeyId(String signingDeviceKeyId) { @@ -110,6 +114,30 @@ public void setAgentUserId(String agentUserId) { this.agentUserId = agentUserId; } + public CreateSigningKeyDto proofOfOwnership( + CreateSigningKeyDtoProofOfOwnership proofOfOwnership) { + this.proofOfOwnership = proofOfOwnership; + return this; + } + + /** + * Get proofOfOwnership + * + * @return proofOfOwnership + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROOF_OF_OWNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateSigningKeyDtoProofOfOwnership getProofOfOwnership() { + return proofOfOwnership; + } + + @JsonProperty(JSON_PROPERTY_PROOF_OF_OWNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProofOfOwnership(CreateSigningKeyDtoProofOfOwnership proofOfOwnership) { + this.proofOfOwnership = proofOfOwnership; + } + /** Return true if this CreateSigningKeyDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -122,12 +150,13 @@ public boolean equals(Object o) { CreateSigningKeyDto createSigningKeyDto = (CreateSigningKeyDto) o; return Objects.equals(this.signingDeviceKeyId, createSigningKeyDto.signingDeviceKeyId) && Objects.equals(this.signedCertPem, createSigningKeyDto.signedCertPem) - && Objects.equals(this.agentUserId, createSigningKeyDto.agentUserId); + && Objects.equals(this.agentUserId, createSigningKeyDto.agentUserId) + && Objects.equals(this.proofOfOwnership, createSigningKeyDto.proofOfOwnership); } @Override public int hashCode() { - return Objects.hash(signingDeviceKeyId, signedCertPem, agentUserId); + return Objects.hash(signingDeviceKeyId, signedCertPem, agentUserId, proofOfOwnership); } @Override @@ -139,6 +168,7 @@ public String toString() { .append("\n"); sb.append(" signedCertPem: ").append(toIndentedString(signedCertPem)).append("\n"); sb.append(" agentUserId: ").append(toIndentedString(agentUserId)).append("\n"); + sb.append(" proofOfOwnership: ").append(toIndentedString(proofOfOwnership)).append("\n"); sb.append("}"); return sb.toString(); } @@ -225,6 +255,12 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `proofOfOwnership` to the URL query string + if (getProofOfOwnership() != null) { + joiner.add( + getProofOfOwnership().toUrlQueryString(prefix + "proofOfOwnership" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.java b/src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnership.java similarity index 53% rename from src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.java rename to src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnership.java index c73e03b..ec41886 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnership.java @@ -21,95 +21,69 @@ import java.util.Objects; import java.util.StringJoiner; -/** AssetDoesNotExistHttpError */ +/** An object containing proof of ownership for the signing key. */ @JsonPropertyOrder({ - AssetDoesNotExistHttpError.JSON_PROPERTY_STATUS_CODE, - AssetDoesNotExistHttpError.JSON_PROPERTY_MESSAGE, - AssetDoesNotExistHttpError.JSON_PROPERTY_ERROR + CreateSigningKeyDtoProofOfOwnership.JSON_PROPERTY_MESSAGE, + CreateSigningKeyDtoProofOfOwnership.JSON_PROPERTY_SIGNATURE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AssetDoesNotExistHttpError { - public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; - private Integer statusCode; - +public class CreateSigningKeyDtoProofOfOwnership { public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; - public static final String JSON_PROPERTY_ERROR = "error"; - private String error; - - public AssetDoesNotExistHttpError() {} - - public AssetDoesNotExistHttpError statusCode(Integer statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * HTTP status code - * - * @return statusCode - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getStatusCode() { - return statusCode; - } + public static final String JSON_PROPERTY_SIGNATURE = "signature"; + private String signature; - @JsonProperty(JSON_PROPERTY_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatusCode(Integer statusCode) { - this.statusCode = statusCode; - } + public CreateSigningKeyDtoProofOfOwnership() {} - public AssetDoesNotExistHttpError message(String message) { + public CreateSigningKeyDtoProofOfOwnership message(String message) { this.message = message; return this; } /** - * Error message + * The message to be signed by the key as proof of ownership. 64 to 1024 bytes in hexadecimal + * format. * * @return message */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getMessage() { return message; } @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setMessage(String message) { this.message = message; } - public AssetDoesNotExistHttpError error(String error) { - this.error = error; + public CreateSigningKeyDtoProofOfOwnership signature(String signature) { + this.signature = signature; return this; } /** - * Short description of the HTTP error + * The signature of the message. 64 bytes in hexadecimal format. * - * @return error + * @return signature */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getError() { - return error; + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSignature() { + return signature; } - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(String error) { - this.error = error; + @JsonProperty(JSON_PROPERTY_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSignature(String signature) { + this.signature = signature; } - /** Return true if this AssetDoesNotExistHttpError object is equal to o. */ + /** Return true if this CreateSigningKeyDto_proofOfOwnership object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,24 +92,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetDoesNotExistHttpError assetDoesNotExistHttpError = (AssetDoesNotExistHttpError) o; - return Objects.equals(this.statusCode, assetDoesNotExistHttpError.statusCode) - && Objects.equals(this.message, assetDoesNotExistHttpError.message) - && Objects.equals(this.error, assetDoesNotExistHttpError.error); + CreateSigningKeyDtoProofOfOwnership createSigningKeyDtoProofOfOwnership = + (CreateSigningKeyDtoProofOfOwnership) o; + return Objects.equals(this.message, createSigningKeyDtoProofOfOwnership.message) + && Objects.equals(this.signature, createSigningKeyDtoProofOfOwnership.signature); } @Override public int hashCode() { - return Objects.hash(statusCode, message, error); + return Objects.hash(message, signature); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssetDoesNotExistHttpError {\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append("class CreateSigningKeyDtoProofOfOwnership {\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -183,18 +156,6 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `statusCode` to the URL query string - if (getStatusCode() != null) { - joiner.add( - String.format( - "%sstatusCode%s=%s", - prefix, - suffix, - URLEncoder.encode( - String.valueOf(getStatusCode()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - // add `message` to the URL query string if (getMessage() != null) { joiner.add( @@ -206,14 +167,15 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } - // add `error` to the URL query string - if (getError() != null) { + // add `signature` to the URL query string + if (getSignature() != null) { joiner.add( String.format( - "%serror%s=%s", + "%ssignature%s=%s", prefix, suffix, - URLEncoder.encode(String.valueOf(getError()), StandardCharsets.UTF_8) + URLEncoder.encode( + String.valueOf(getSignature()), StandardCharsets.UTF_8) .replaceAll("\\+", "%20"))); } diff --git a/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.java index db7967a..7d66f76 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountRequest.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 @@ CreateVaultAccountRequest.JSON_PROPERTY_NAME, CreateVaultAccountRequest.JSON_PROPERTY_HIDDEN_ON_U_I, CreateVaultAccountRequest.JSON_PROPERTY_CUSTOMER_REF_ID, - CreateVaultAccountRequest.JSON_PROPERTY_AUTO_FUEL + CreateVaultAccountRequest.JSON_PROPERTY_AUTO_FUEL, + CreateVaultAccountRequest.JSON_PROPERTY_VAULT_TYPE, + CreateVaultAccountRequest.JSON_PROPERTY_AUTO_ASSIGN }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateVaultAccountRequest { @@ -42,6 +46,48 @@ public class CreateVaultAccountRequest { public static final String JSON_PROPERTY_AUTO_FUEL = "autoFuel"; private Boolean autoFuel; + /** + * Type of vault account. The default type will be set to MPC.<br/> If the workspace does + * not support the selected type, it will return an error. + */ + public enum VaultTypeEnum { + MPC("MPC"), + + KEY_LINK("KEY_LINK"); + + private String value; + + VaultTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VaultTypeEnum fromValue(String value) { + for (VaultTypeEnum b : VaultTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_VAULT_TYPE = "vaultType"; + private VaultTypeEnum vaultType = VaultTypeEnum.MPC; + + public static final String JSON_PROPERTY_AUTO_ASSIGN = "autoAssign"; + private Boolean autoAssign = false; + public CreateVaultAccountRequest() {} public CreateVaultAccountRequest name(String name) { @@ -137,6 +183,57 @@ public void setAutoFuel(Boolean autoFuel) { this.autoFuel = autoFuel; } + public CreateVaultAccountRequest vaultType(VaultTypeEnum vaultType) { + this.vaultType = vaultType; + return this; + } + + /** + * Type of vault account. The default type will be set to MPC.<br/> If the workspace does + * not support the selected type, it will return an error. + * + * @return vaultType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VaultTypeEnum getVaultType() { + return vaultType; + } + + @JsonProperty(JSON_PROPERTY_VAULT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultType(VaultTypeEnum vaultType) { + this.vaultType = vaultType; + } + + public CreateVaultAccountRequest autoAssign(Boolean autoAssign) { + this.autoAssign = autoAssign; + return this; + } + + /** + * Applicable only when the vault account type is KEY_LINK. For MPC, this parameter will be + * ignored.<br/> If set to true and there are available keys, random keys will be assigned + * to the newly created vault account.<br/> If set to true and there are no available keys + * to be assigned, it will return an error.<br/> If set to false, the vault account will + * be created without any keys. + * + * @return autoAssign + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTO_ASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutoAssign() { + return autoAssign; + } + + @JsonProperty(JSON_PROPERTY_AUTO_ASSIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutoAssign(Boolean autoAssign) { + this.autoAssign = autoAssign; + } + /** Return true if this CreateVaultAccountRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -150,12 +247,14 @@ public boolean equals(Object o) { return Objects.equals(this.name, createVaultAccountRequest.name) && Objects.equals(this.hiddenOnUI, createVaultAccountRequest.hiddenOnUI) && Objects.equals(this.customerRefId, createVaultAccountRequest.customerRefId) - && Objects.equals(this.autoFuel, createVaultAccountRequest.autoFuel); + && Objects.equals(this.autoFuel, createVaultAccountRequest.autoFuel) + && Objects.equals(this.vaultType, createVaultAccountRequest.vaultType) + && Objects.equals(this.autoAssign, createVaultAccountRequest.autoAssign); } @Override public int hashCode() { - return Objects.hash(name, hiddenOnUI, customerRefId, autoFuel); + return Objects.hash(name, hiddenOnUI, customerRefId, autoFuel, vaultType, autoAssign); } @Override @@ -166,6 +265,8 @@ public String toString() { sb.append(" hiddenOnUI: ").append(toIndentedString(hiddenOnUI)).append("\n"); sb.append(" customerRefId: ").append(toIndentedString(customerRefId)).append("\n"); sb.append(" autoFuel: ").append(toIndentedString(autoFuel)).append("\n"); + sb.append(" vaultType: ").append(toIndentedString(vaultType)).append("\n"); + sb.append(" autoAssign: ").append(toIndentedString(autoAssign)).append("\n"); sb.append("}"); return sb.toString(); } @@ -260,6 +361,30 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `vaultType` to the URL query string + if (getVaultType() != null) { + joiner.add( + String.format( + "%svaultType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `autoAssign` to the URL query string + if (getAutoAssign() != null) { + joiner.add( + String.format( + "%sautoAssign%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAutoAssign()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java b/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java index b031cc4..4be5887 100644 --- a/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java +++ b/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java @@ -27,7 +27,8 @@ ExchangeAsset.JSON_PROPERTY_BALANCE, ExchangeAsset.JSON_PROPERTY_LOCKED_AMOUNT, ExchangeAsset.JSON_PROPERTY_TOTAL, - ExchangeAsset.JSON_PROPERTY_AVAILABLE + ExchangeAsset.JSON_PROPERTY_AVAILABLE, + ExchangeAsset.JSON_PROPERTY_CREDIT }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ExchangeAsset { @@ -46,6 +47,9 @@ public class ExchangeAsset { public static final String JSON_PROPERTY_AVAILABLE = "available"; private String available; + public static final String JSON_PROPERTY_CREDIT = "credit"; + private String credit; + public ExchangeAsset() {} public ExchangeAsset id(String id) { @@ -163,6 +167,29 @@ public void setAvailable(String available) { this.available = available; } + public ExchangeAsset credit(String credit) { + this.credit = credit; + return this; + } + + /** + * Get credit + * + * @return credit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREDIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCredit() { + return credit; + } + + @JsonProperty(JSON_PROPERTY_CREDIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCredit(String credit) { + this.credit = credit; + } + /** Return true if this ExchangeAsset object is equal to o. */ @Override public boolean equals(Object o) { @@ -177,12 +204,13 @@ public boolean equals(Object o) { && Objects.equals(this.balance, exchangeAsset.balance) && Objects.equals(this.lockedAmount, exchangeAsset.lockedAmount) && Objects.equals(this.total, exchangeAsset.total) - && Objects.equals(this.available, exchangeAsset.available); + && Objects.equals(this.available, exchangeAsset.available) + && Objects.equals(this.credit, exchangeAsset.credit); } @Override public int hashCode() { - return Objects.hash(id, balance, lockedAmount, total, available); + return Objects.hash(id, balance, lockedAmount, total, available, credit); } @Override @@ -194,6 +222,7 @@ public String toString() { sb.append(" lockedAmount: ").append(toIndentedString(lockedAmount)).append("\n"); sb.append(" total: ").append(toIndentedString(total)).append("\n"); sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" credit: ").append(toIndentedString(credit)).append("\n"); sb.append("}"); return sb.toString(); } @@ -299,6 +328,17 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `credit` to the URL query string + if (getCredit() != null) { + joiner.add( + String.format( + "%scredit%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCredit()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java b/src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java new file mode 100644 index 0000000..25303f3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java @@ -0,0 +1,185 @@ +/* + * 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; + +/** FetchAbiRequestDto */ +@JsonPropertyOrder({ + FetchAbiRequestDto.JSON_PROPERTY_BASE_ASSET_ID, + FetchAbiRequestDto.JSON_PROPERTY_CONTRACT_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FetchAbiRequestDto { + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public FetchAbiRequestDto() {} + + public FetchAbiRequestDto baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The blockchain base assetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public FetchAbiRequestDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The contract's onchain address + * + * @return contractAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + /** Return true if this FetchAbiRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchAbiRequestDto fetchAbiRequestDto = (FetchAbiRequestDto) o; + return Objects.equals(this.baseAssetId, fetchAbiRequestDto.baseAssetId) + && Objects.equals(this.contractAddress, fetchAbiRequestDto.contractAddress); + } + + @Override + public int hashCode() { + return Objects.hash(baseAssetId, contractAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FetchAbiRequestDto {\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).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 `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBaseAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `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"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java new file mode 100644 index 0000000..103826b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.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; + +/** GetLinkedCollectionsPaginatedResponse */ +@JsonPropertyOrder({ + GetLinkedCollectionsPaginatedResponse.JSON_PROPERTY_DATA, + GetLinkedCollectionsPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetLinkedCollectionsPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public GetLinkedCollectionsPaginatedResponse() {} + + public GetLinkedCollectionsPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public GetLinkedCollectionsPaginatedResponse addDataItem(CollectionLinkDto 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.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + public GetLinkedCollectionsPaginatedResponse 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 GetLinkedCollectionsPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLinkedCollectionsPaginatedResponse getLinkedCollectionsPaginatedResponse = + (GetLinkedCollectionsPaginatedResponse) o; + return Objects.equals(this.data, getLinkedCollectionsPaginatedResponse.data) + && Objects.equals(this.next, getLinkedCollectionsPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetLinkedCollectionsPaginatedResponse {\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/ModifySigningKeyDto.java b/src/main/java/com/fireblocks/sdk/model/ModifySigningKeyDto.java index b7ec7f1..1d0e507 100644 --- a/src/main/java/com/fireblocks/sdk/model/ModifySigningKeyDto.java +++ b/src/main/java/com/fireblocks/sdk/model/ModifySigningKeyDto.java @@ -37,7 +37,7 @@ public ModifySigningKeyDto vaultAccountId(BigDecimal vaultAccountId) { } /** - * Get vaultAccountId minimum: 1 + * Get vaultAccountId minimum: 0 * * @return vaultAccountId */ diff --git a/src/main/java/com/fireblocks/sdk/model/RescanTransaction.java b/src/main/java/com/fireblocks/sdk/model/RescanTransaction.java new file mode 100644 index 0000000..1c7153b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RescanTransaction.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** RescanTransaction */ +@JsonPropertyOrder({ + RescanTransaction.JSON_PROPERTY_TX_HASH, + RescanTransaction.JSON_PROPERTY_ASSET_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RescanTransaction { + public static final String JSON_PROPERTY_TX_HASH = "txHash"; + private String txHash; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public RescanTransaction() {} + + public RescanTransaction txHash(String txHash) { + this.txHash = txHash; + return this; + } + + /** + * Blockchain TX hash + * + * @return txHash + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxHash() { + return txHash; + } + + @JsonProperty(JSON_PROPERTY_TX_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxHash(String txHash) { + this.txHash = txHash; + } + + public RescanTransaction assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Asset symbol BTC,ETH) + * + * @return assetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + /** Return true if this RescanTransaction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RescanTransaction rescanTransaction = (RescanTransaction) o; + return Objects.equals(this.txHash, rescanTransaction.txHash) + && Objects.equals(this.assetId, rescanTransaction.assetId); + } + + @Override + public int hashCode() { + return Objects.hash(txHash, assetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RescanTransaction {\n"); + sb.append(" txHash: ").append(toIndentedString(txHash)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).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 `txHash` to the URL query string + if (getTxHash() != null) { + joiner.add( + String.format( + "%stxHash%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxHash()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java index ae0fce5..c783a97 100644 --- a/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java @@ -199,8 +199,7 @@ public TokenLinkDto refId(String refId) { } /** - * The Fireblocks' reference id. Can be a Fireblocks' supported asset, collectionId or - * contractId + * The Fireblocks' reference id * * @return refId */ @@ -223,7 +222,7 @@ public TokenLinkDto displayName(String displayName) { } /** - * The token display name. If was not provided, would be taken from the contract template name + * The token display name. If was not provided, would be taken from the contract template * * @return displayName */ diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java index 0b719bc..e61ba33 100644 --- a/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java @@ -27,7 +27,9 @@ @JsonPropertyOrder({ TokenLinkRequestDto.JSON_PROPERTY_TYPE, TokenLinkRequestDto.JSON_PROPERTY_REF_ID, - TokenLinkRequestDto.JSON_PROPERTY_DISPLAY_NAME + TokenLinkRequestDto.JSON_PROPERTY_DISPLAY_NAME, + TokenLinkRequestDto.JSON_PROPERTY_BASE_ASSET_ID, + TokenLinkRequestDto.JSON_PROPERTY_CONTRACT_ADDRESS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TokenLinkRequestDto { @@ -77,6 +79,12 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; private String displayName; + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + public TokenLinkRequestDto() {} public TokenLinkRequestDto type(TypeEnum type) { @@ -113,15 +121,15 @@ public TokenLinkRequestDto refId(String refId) { * * @return refId */ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_REF_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getRefId() { return refId; } @JsonProperty(JSON_PROPERTY_REF_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setRefId(String refId) { this.refId = refId; } @@ -149,6 +157,52 @@ public void setDisplayName(String displayName) { this.displayName = displayName; } + public TokenLinkRequestDto baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The blockchain base assetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public TokenLinkRequestDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The contract's onchain address + * + * @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; + } + /** Return true if this TokenLinkRequestDto object is equal to o. */ @Override public boolean equals(Object o) { @@ -161,12 +215,14 @@ public boolean equals(Object o) { TokenLinkRequestDto tokenLinkRequestDto = (TokenLinkRequestDto) o; return Objects.equals(this.type, tokenLinkRequestDto.type) && Objects.equals(this.refId, tokenLinkRequestDto.refId) - && Objects.equals(this.displayName, tokenLinkRequestDto.displayName); + && Objects.equals(this.displayName, tokenLinkRequestDto.displayName) + && Objects.equals(this.baseAssetId, tokenLinkRequestDto.baseAssetId) + && Objects.equals(this.contractAddress, tokenLinkRequestDto.contractAddress); } @Override public int hashCode() { - return Objects.hash(type, refId, displayName); + return Objects.hash(type, refId, displayName, baseAssetId, contractAddress); } @Override @@ -176,6 +232,8 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" refId: ").append(toIndentedString(refId)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); sb.append("}"); return sb.toString(); } @@ -258,6 +316,32 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBaseAssetId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `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"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java b/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java index 280915c..4da6476 100644 --- a/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java @@ -111,7 +111,13 @@ public enum BlockchainDescriptorEnum { ETHERLINK("ETHERLINK"), - ETHERLINK_TEST("ETHERLINK_TEST"); + ETHERLINK_TEST("ETHERLINK_TEST"), + + MANTLE("MANTLE"), + + MANTLE_TEST("MANTLE_TEST"), + + GUN_GUNZILLA_TEST("GUN_GUNZILLA_TEST"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/TokenResponse.java b/src/main/java/com/fireblocks/sdk/model/TokenResponse.java index 8977e59..ccc400d 100644 --- a/src/main/java/com/fireblocks/sdk/model/TokenResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TokenResponse.java @@ -91,7 +91,13 @@ public enum BlockchainDescriptorEnum { ETHERLINK("ETHERLINK"), - ETHERLINK_TEST("ETHERLINK_TEST"); + ETHERLINK_TEST("ETHERLINK_TEST"), + + MANTLE("MANTLE"), + + MANTLE_TEST("MANTLE_TEST"), + + GUN_GUNZILLA_TEST("GUN_GUNZILLA_TEST"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java index ca07971..dbd6b66 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java @@ -42,6 +42,7 @@ TransactionRequest.JSON_PROPERTY_PRIORITY_FEE, TransactionRequest.JSON_PROPERTY_FAIL_ON_LOW_FEE, TransactionRequest.JSON_PROPERTY_MAX_FEE, + TransactionRequest.JSON_PROPERTY_MAX_TOTAL_FEE, TransactionRequest.JSON_PROPERTY_GAS_LIMIT, TransactionRequest.JSON_PROPERTY_GAS_PRICE, TransactionRequest.JSON_PROPERTY_NETWORK_FEE, @@ -51,7 +52,8 @@ TransactionRequest.JSON_PROPERTY_TRAVEL_RULE_MESSAGE, TransactionRequest.JSON_PROPERTY_AUTO_STAKING, TransactionRequest.JSON_PROPERTY_NETWORK_STAKING, - TransactionRequest.JSON_PROPERTY_CPU_STAKING + TransactionRequest.JSON_PROPERTY_CPU_STAKING, + TransactionRequest.JSON_PROPERTY_USE_GASLESS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TransactionRequest { @@ -138,6 +140,9 @@ public static FeeLevelEnum fromValue(String value) { public static final String JSON_PROPERTY_MAX_FEE = "maxFee"; private String maxFee; + public static final String JSON_PROPERTY_MAX_TOTAL_FEE = "maxTotalFee"; + private String maxTotalFee; + public static final String JSON_PROPERTY_GAS_LIMIT = "gasLimit"; private TransactionRequestGasLimit gasLimit; @@ -168,6 +173,9 @@ public static FeeLevelEnum fromValue(String value) { public static final String JSON_PROPERTY_CPU_STAKING = "cpuStaking"; private TransactionRequestNetworkStaking cpuStaking; + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + public TransactionRequest() {} public TransactionRequest operation(TransactionOperation operation) { @@ -545,6 +553,30 @@ public void setMaxFee(String maxFee) { this.maxFee = maxFee; } + public TransactionRequest maxTotalFee(String maxTotalFee) { + this.maxTotalFee = maxTotalFee; + return this; + } + + /** + * For BTC-based blockchains only. The maximum fee (in the units of the fee-paying asset) that + * should be paid for the transaction. + * + * @return maxTotalFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_TOTAL_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMaxTotalFee() { + return maxTotalFee; + } + + @JsonProperty(JSON_PROPERTY_MAX_TOTAL_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxTotalFee(String maxTotalFee) { + this.maxTotalFee = maxTotalFee; + } + public TransactionRequest gasLimit(TransactionRequestGasLimit gasLimit) { this.gasLimit = gasLimit; return this; @@ -797,6 +829,29 @@ public void setCpuStaking(TransactionRequestNetworkStaking cpuStaking) { this.cpuStaking = cpuStaking; } + public TransactionRequest useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * - Override the default gaslsess configuration by sending true\\false + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + /** Return true if this TransactionRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -822,6 +877,7 @@ public boolean equals(Object o) { && Objects.equals(this.priorityFee, transactionRequest.priorityFee) && Objects.equals(this.failOnLowFee, transactionRequest.failOnLowFee) && Objects.equals(this.maxFee, transactionRequest.maxFee) + && Objects.equals(this.maxTotalFee, transactionRequest.maxTotalFee) && Objects.equals(this.gasLimit, transactionRequest.gasLimit) && Objects.equals(this.gasPrice, transactionRequest.gasPrice) && Objects.equals(this.networkFee, transactionRequest.networkFee) @@ -831,7 +887,8 @@ public boolean equals(Object o) { && Objects.equals(this.travelRuleMessage, transactionRequest.travelRuleMessage) && Objects.equals(this.autoStaking, transactionRequest.autoStaking) && Objects.equals(this.networkStaking, transactionRequest.networkStaking) - && Objects.equals(this.cpuStaking, transactionRequest.cpuStaking); + && Objects.equals(this.cpuStaking, transactionRequest.cpuStaking) + && Objects.equals(this.useGasless, transactionRequest.useGasless); } @Override @@ -852,6 +909,7 @@ public int hashCode() { priorityFee, failOnLowFee, maxFee, + maxTotalFee, gasLimit, gasPrice, networkFee, @@ -861,7 +919,8 @@ public int hashCode() { travelRuleMessage, autoStaking, networkStaking, - cpuStaking); + cpuStaking, + useGasless); } @Override @@ -885,6 +944,7 @@ public String toString() { sb.append(" priorityFee: ").append(toIndentedString(priorityFee)).append("\n"); sb.append(" failOnLowFee: ").append(toIndentedString(failOnLowFee)).append("\n"); sb.append(" maxFee: ").append(toIndentedString(maxFee)).append("\n"); + sb.append(" maxTotalFee: ").append(toIndentedString(maxTotalFee)).append("\n"); sb.append(" gasLimit: ").append(toIndentedString(gasLimit)).append("\n"); sb.append(" gasPrice: ").append(toIndentedString(gasPrice)).append("\n"); sb.append(" networkFee: ").append(toIndentedString(networkFee)).append("\n"); @@ -897,6 +957,7 @@ public String toString() { sb.append(" autoStaking: ").append(toIndentedString(autoStaking)).append("\n"); sb.append(" networkStaking: ").append(toIndentedString(networkStaking)).append("\n"); sb.append(" cpuStaking: ").append(toIndentedString(cpuStaking)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1099,6 +1160,19 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `maxTotalFee` to the URL query string + if (getMaxTotalFee() != null) { + joiner.add( + String.format( + "%smaxTotalFee%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getMaxTotalFee()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `gasLimit` to the URL query string if (getGasLimit() != null) { joiner.add(getGasLimit().toUrlQueryString(prefix + "gasLimit" + suffix)); @@ -1182,6 +1256,18 @@ public String toUrlQueryString(String prefix) { joiner.add(getCpuStaking().toUrlQueryString(prefix + "cpuStaking" + suffix)); } + // add `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTO.java b/src/main/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescan.java similarity index 52% rename from src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTO.java rename to src/main/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescan.java index 7af238f..44e3573 100644 --- a/src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTO.java +++ b/src/main/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescan.java @@ -16,7 +16,6 @@ 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; @@ -24,103 +23,103 @@ import java.util.Objects; import java.util.StringJoiner; -/** GetAuditLogsResponseDTO */ +/** ValidatedTransactionsForRescan */ @JsonPropertyOrder({ - GetAuditLogsResponseDTO.JSON_PROPERTY_DATA, - GetAuditLogsResponseDTO.JSON_PROPERTY_TOTAL, - GetAuditLogsResponseDTO.JSON_PROPERTY_CURSOR + ValidatedTransactionsForRescan.JSON_PROPERTY_BASE_ASSET, + ValidatedTransactionsForRescan.JSON_PROPERTY_NETWORK_PROTOCOL, + ValidatedTransactionsForRescan.JSON_PROPERTY_TX_HASHES }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GetAuditLogsResponseDTO { - public static final String JSON_PROPERTY_DATA = "data"; - private List data; +public class ValidatedTransactionsForRescan { + public static final String JSON_PROPERTY_BASE_ASSET = "baseAsset"; + private String baseAsset; - public static final String JSON_PROPERTY_TOTAL = "total"; - private BigDecimal total; + public static final String JSON_PROPERTY_NETWORK_PROTOCOL = "networkProtocol"; + private String networkProtocol; - public static final String JSON_PROPERTY_CURSOR = "cursor"; - private String cursor; + public static final String JSON_PROPERTY_TX_HASHES = "txHashes"; + private List txHashes; - public GetAuditLogsResponseDTO() {} + public ValidatedTransactionsForRescan() {} - public GetAuditLogsResponseDTO data(List data) { - this.data = data; - return this; - } - - public GetAuditLogsResponseDTO addDataItem(Object dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); + public ValidatedTransactionsForRescan baseAsset(String baseAsset) { + this.baseAsset = baseAsset; return this; } /** - * Get data + * Base asset symbol BTC_TEST, ETH_TEST5) * - * @return data + * @return baseAsset */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA) + @JsonProperty(JSON_PROPERTY_BASE_ASSET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { - return data; + public String getBaseAsset() { + return baseAsset; } - @JsonProperty(JSON_PROPERTY_DATA) + @JsonProperty(JSON_PROPERTY_BASE_ASSET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setData(List data) { - this.data = data; + public void setBaseAsset(String baseAsset) { + this.baseAsset = baseAsset; } - public GetAuditLogsResponseDTO total(BigDecimal total) { - this.total = total; + public ValidatedTransactionsForRescan networkProtocol(String networkProtocol) { + this.networkProtocol = networkProtocol; return this; } /** - * Get total + * Netowrk protocol of the blockchain (BTC, ETH) * - * @return total + * @return networkProtocol */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonProperty(JSON_PROPERTY_NETWORK_PROTOCOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getTotal() { - return total; + public String getNetworkProtocol() { + return networkProtocol; } - @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonProperty(JSON_PROPERTY_NETWORK_PROTOCOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotal(BigDecimal total) { - this.total = total; + public void setNetworkProtocol(String networkProtocol) { + this.networkProtocol = networkProtocol; } - public GetAuditLogsResponseDTO cursor(String cursor) { - this.cursor = cursor; + public ValidatedTransactionsForRescan txHashes(List txHashes) { + this.txHashes = txHashes; + return this; + } + + public ValidatedTransactionsForRescan addTxHashesItem(String txHashesItem) { + if (this.txHashes == null) { + this.txHashes = new ArrayList<>(); + } + this.txHashes.add(txHashesItem); return this; } /** - * Get cursor + * Blockchain TX hashes * - * @return cursor + * @return txHashes */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonProperty(JSON_PROPERTY_TX_HASHES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCursor() { - return cursor; + public List getTxHashes() { + return txHashes; } - @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonProperty(JSON_PROPERTY_TX_HASHES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCursor(String cursor) { - this.cursor = cursor; + public void setTxHashes(List txHashes) { + this.txHashes = txHashes; } - /** Return true if this GetAuditLogsResponseDTO object is equal to o. */ + /** Return true if this ValidatedTransactionsForRescan object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -129,24 +128,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetAuditLogsResponseDTO getAuditLogsResponseDTO = (GetAuditLogsResponseDTO) o; - return Objects.equals(this.data, getAuditLogsResponseDTO.data) - && Objects.equals(this.total, getAuditLogsResponseDTO.total) - && Objects.equals(this.cursor, getAuditLogsResponseDTO.cursor); + ValidatedTransactionsForRescan validatedTransactionsForRescan = + (ValidatedTransactionsForRescan) o; + return Objects.equals(this.baseAsset, validatedTransactionsForRescan.baseAsset) + && Objects.equals( + this.networkProtocol, validatedTransactionsForRescan.networkProtocol) + && Objects.equals(this.txHashes, validatedTransactionsForRescan.txHashes); } @Override public int hashCode() { - return Objects.hash(data, total, cursor); + return Objects.hash(baseAsset, networkProtocol, txHashes); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetAuditLogsResponseDTO {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); + sb.append("class ValidatedTransactionsForRescan {\n"); + sb.append(" baseAsset: ").append(toIndentedString(baseAsset)).append("\n"); + sb.append(" networkProtocol: ").append(toIndentedString(networkProtocol)).append("\n"); + sb.append(" txHashes: ").append(toIndentedString(txHashes)).append("\n"); sb.append("}"); return sb.toString(); } @@ -194,47 +195,50 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `data` to the URL query string - if (getData() != null) { - for (int i = 0; i < getData().size(); i++) { - joiner.add( - String.format( - "%sdata%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getData().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - } - - // add `total` to the URL query string - if (getTotal() != null) { + // add `baseAsset` to the URL query string + if (getBaseAsset() != null) { joiner.add( String.format( - "%stotal%s=%s", + "%sbaseAsset%s=%s", prefix, suffix, - URLEncoder.encode(String.valueOf(getTotal()), StandardCharsets.UTF_8) + URLEncoder.encode( + String.valueOf(getBaseAsset()), StandardCharsets.UTF_8) .replaceAll("\\+", "%20"))); } - // add `cursor` to the URL query string - if (getCursor() != null) { + // add `networkProtocol` to the URL query string + if (getNetworkProtocol() != null) { joiner.add( String.format( - "%scursor%s=%s", + "%snetworkProtocol%s=%s", prefix, suffix, - URLEncoder.encode(String.valueOf(getCursor()), StandardCharsets.UTF_8) + URLEncoder.encode( + String.valueOf(getNetworkProtocol()), + StandardCharsets.UTF_8) .replaceAll("\\+", "%20"))); } + // add `txHashes` to the URL query string + if (getTxHashes() != null) { + for (int i = 0; i < getTxHashes().size(); i++) { + joiner.add( + String.format( + "%stxHashes%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTxHashes().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + return joiner.toString(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java b/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java index 43289c1..d84e927 100644 --- a/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java @@ -16,7 +16,6 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetAuditLogsResponse; -import com.fireblocks.sdk.model.GetAuditLogsResponseDTO; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -41,18 +40,4 @@ public void getAuditLogsTest() throws ApiException { CompletableFuture> response = api.getAuditLogs(timePeriod, cursor); } - - /** - * Get audit logs - * - *

Get all audits - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAuditsTest() throws ApiException { - String timePeriod = null; - CompletableFuture> response = - api.getAudits(timePeriod); - } } diff --git a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java index 11e0dcf..eb3ffa2 100644 --- a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java @@ -15,8 +15,11 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AddAbiRequestDto; +import com.fireblocks.sdk.model.ContractWithAbiDto; import com.fireblocks.sdk.model.DeployedContractResponseDto; import com.fireblocks.sdk.model.DeployedContractsPaginatedResponse; +import com.fireblocks.sdk.model.FetchAbiRequestDto; import java.math.BigDecimal; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -28,6 +31,36 @@ public class DeployedContractsApiTest { private final DeployedContractsApi api = new DeployedContractsApi(); + /** + * Save contract ABI + * + *

Save contract ABI for the tenant + * + * @throws ApiException if the Api call fails + */ + @Test + public void addContractABITest() throws ApiException { + AddAbiRequestDto addAbiRequestDto = null; + String idempotencyKey = null; + CompletableFuture> response = + api.addContractABI(addAbiRequestDto, idempotencyKey); + } + + /** + * Fetch the contract ABI + * + *

Fetch the ABI. If not found fetch the ABI from the block explorer + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchContractAbiTest() throws ApiException { + FetchAbiRequestDto fetchAbiRequestDto = null; + String idempotencyKey = null; + CompletableFuture> response = + api.fetchContractAbi(fetchAbiRequestDto, idempotencyKey); + } + /** * Return deployed contract data * diff --git a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java index 6c47591..fdc0735 100644 --- a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java @@ -15,7 +15,14 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CollectionBurnRequestDto; +import com.fireblocks.sdk.model.CollectionBurnResponseDto; +import com.fireblocks.sdk.model.CollectionDeployRequestDto; +import com.fireblocks.sdk.model.CollectionLinkDto; +import com.fireblocks.sdk.model.CollectionMintRequestDto; +import com.fireblocks.sdk.model.CollectionMintResponseDto; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; @@ -30,6 +37,81 @@ public class TokenizationApiTest { private final TokenizationApi api = new TokenizationApi(); + /** + * Burn tokens + * + *

Burn tokens in a collection + * + * @throws ApiException if the Api call fails + */ + @Test + public void burnCollectionTokenTest() throws ApiException { + CollectionBurnRequestDto collectionBurnRequestDto = null; + String id = null; + String idempotencyKey = null; + CompletableFuture> response = + api.burnCollectionToken(collectionBurnRequestDto, id, idempotencyKey); + } + + /** + * Create a new collection + * + *

Create a new collection and link it as a token + * + * @throws ApiException if the Api call fails + */ + @Test + public void createNewCollectionTest() throws ApiException { + CollectionDeployRequestDto collectionDeployRequestDto = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createNewCollection(collectionDeployRequestDto, idempotencyKey); + } + + /** + * Get collection token details + * + *

Get collection token details by id + * + * @throws ApiException if the Api call fails + */ + @Test + public void fetchCollectionTokenDetailsTest() throws ApiException { + String id = null; + String tokenId = null; + CompletableFuture> response = + api.fetchCollectionTokenDetails(id, tokenId); + } + + /** + * Get a collection by id + * + *

Get a collection by id + * + * @throws ApiException if the Api call fails + */ + @Test + public void getCollectionByIdTest() throws ApiException { + String id = null; + CompletableFuture> response = api.getCollectionById(id); + } + + /** + * Get collections + * + *

Get collections (paginated) + * + * @throws ApiException if the Api call fails + */ + @Test + public void getLinkedCollectionsTest() throws ApiException { + String pageCursor = null; + BigDecimal pageSize = null; + Object status = null; + CompletableFuture> response = + api.getLinkedCollections(pageCursor, pageSize, status); + } + /** * Return a linked token * @@ -80,11 +162,9 @@ public void issueNewTokenTest() throws ApiException { } /** - * Link a token + * Link a contract * - *

Link an already existing token (by assetId, collectionId or contractId as refId) to a - * workspace across EVM, Stellar, or Ripple platforms. The token will be linked to the workspace - * if it does not already exist. + *

Link an a contract * * @throws ApiException if the Api call fails */ @@ -96,6 +176,22 @@ public void linkTest() throws ApiException { api.link(tokenLinkRequestDto, idempotencyKey); } + /** + * Mint tokens + * + *

Mint tokens and upload metadata + * + * @throws ApiException if the Api call fails + */ + @Test + public void mintCollectionTokenTest() throws ApiException { + CollectionMintRequestDto collectionMintRequestDto = null; + String id = null; + String idempotencyKey = null; + CompletableFuture> response = + api.mintCollectionToken(collectionMintRequestDto, id, idempotencyKey); + } + /** * Unlink a token * @@ -110,4 +206,18 @@ public void unlinkTest() throws ApiException { CompletableFuture> response = api.unlink(id); } + + /** + * Delete a collection link + * + *

Delete a collection link + * + * @throws ApiException if the Api call fails + */ + @Test + public void unlinkCollectionTest() throws ApiException { + String id = null; + + CompletableFuture> response = api.unlinkCollection(id); + } } diff --git a/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java index d516fa2..894b3fa 100644 --- a/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java @@ -22,12 +22,14 @@ import com.fireblocks.sdk.model.EstimatedNetworkFeeResponse; import com.fireblocks.sdk.model.EstimatedTransactionFeeResponse; import com.fireblocks.sdk.model.FreezeTransactionResponse; +import com.fireblocks.sdk.model.RescanTransaction; import com.fireblocks.sdk.model.SetConfirmationsThresholdRequest; import com.fireblocks.sdk.model.SetConfirmationsThresholdResponse; import com.fireblocks.sdk.model.TransactionRequest; import com.fireblocks.sdk.model.TransactionResponse; import com.fireblocks.sdk.model.UnfreezeTransactionResponse; import com.fireblocks.sdk.model.ValidateAddressResponse; +import com.fireblocks.sdk.model.ValidatedTransactionsForRescan; import java.util.List; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -205,6 +207,23 @@ public void getTransactionsTest() throws ApiException { destWalletId); } + /** + * rescan array of transactions + * + *

rescan transaction by running an async job. </br> **Note**: - These endpoints are + * currently in beta and might be subject to changes. - We limit the amount of the transaction + * to 16 per request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void rescanTransactionsBetaTest() throws ApiException { + List rescanTransaction = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.rescanTransactionsBeta(rescanTransaction, idempotencyKey); + } + /** * Set confirmation threshold by transaction hash * diff --git a/src/test/java/com/fireblocks/sdk/model/AddAbiRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/AddAbiRequestDtoTest.java new file mode 100644 index 0000000..9ed3ebc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AddAbiRequestDtoTest.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 AddAbiRequestDto */ +public class AddAbiRequestDtoTest { + private final AddAbiRequestDto model = new AddAbiRequestDto(); + + /** Model tests for AddAbiRequestDto */ + @Test + public void testAddAbiRequestDto() { + // TODO: test AddAbiRequestDto + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'abi' */ + @Test + public void abiTest() { + // TODO: test abi + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java new file mode 100644 index 0000000..e14c95c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.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 CollectionBurnRequestDto */ +public class CollectionBurnRequestDtoTest { + private final CollectionBurnRequestDto model = new CollectionBurnRequestDto(); + + /** Model tests for CollectionBurnRequestDto */ + @Test + public void testCollectionBurnRequestDto() { + // TODO: test CollectionBurnRequestDto + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'tokenId' */ + @Test + public void tokenIdTest() { + // TODO: test tokenId + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java new file mode 100644 index 0000000..b52fb64 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.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 CollectionBurnResponseDto */ +public class CollectionBurnResponseDtoTest { + private final CollectionBurnResponseDto model = new CollectionBurnResponseDto(); + + /** Model tests for CollectionBurnResponseDto */ + @Test + public void testCollectionBurnResponseDto() { + // TODO: test CollectionBurnResponseDto + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionDeployRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionDeployRequestDtoTest.java new file mode 100644 index 0000000..c68a77e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionDeployRequestDtoTest.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 CollectionDeployRequestDto */ +public class CollectionDeployRequestDtoTest { + private final CollectionDeployRequestDto model = new CollectionDeployRequestDto(); + + /** Model tests for CollectionDeployRequestDto */ + @Test + public void testCollectionDeployRequestDto() { + // TODO: test CollectionDeployRequestDto + } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'adminAddress' */ + @Test + public void adminAddressTest() { + // TODO: test adminAddress + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionLinkDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionLinkDtoTest.java new file mode 100644 index 0000000..75667e7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionLinkDtoTest.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 CollectionLinkDto */ +public class CollectionLinkDtoTest { + private final CollectionLinkDto model = new CollectionLinkDto(); + + /** Model tests for CollectionLinkDto */ + @Test + public void testCollectionLinkDto() { + // TODO: test CollectionLinkDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'collectionMetadata' */ + @Test + public void collectionMetadataTest() { + // TODO: test collectionMetadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionMintRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionMintRequestDtoTest.java new file mode 100644 index 0000000..0cbf24b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionMintRequestDtoTest.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 CollectionMintRequestDto */ +public class CollectionMintRequestDtoTest { + private final CollectionMintRequestDto model = new CollectionMintRequestDto(); + + /** Model tests for CollectionMintRequestDto */ + @Test + public void testCollectionMintRequestDto() { + // TODO: test CollectionMintRequestDto + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'to' */ + @Test + public void toTest() { + // TODO: test to + } + + /** Test the property 'tokenId' */ + @Test + public void tokenIdTest() { + // TODO: test tokenId + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'metadataURI' */ + @Test + public void metadataURITest() { + // TODO: test metadataURI + } + + /** Test the property 'metadata' */ + @Test + public void metadataTest() { + // TODO: test metadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionMintResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionMintResponseDtoTest.java new file mode 100644 index 0000000..39dc24c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionMintResponseDtoTest.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 CollectionMintResponseDto */ +public class CollectionMintResponseDtoTest { + private final CollectionMintResponseDto model = new CollectionMintResponseDto(); + + /** Model tests for CollectionMintResponseDto */ + @Test + public void testCollectionMintResponseDto() { + // TODO: test CollectionMintResponseDto + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java new file mode 100644 index 0000000..df0237a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java @@ -0,0 +1,46 @@ +/* + * 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 CollectionTokenMetadataAttributeDto */ +public class CollectionTokenMetadataAttributeDtoTest { + private final CollectionTokenMetadataAttributeDto model = + new CollectionTokenMetadataAttributeDto(); + + /** Model tests for CollectionTokenMetadataAttributeDto */ + @Test + public void testCollectionTokenMetadataAttributeDto() { + // TODO: test CollectionTokenMetadataAttributeDto + } + + /** Test the property 'traitType' */ + @Test + public void traitTypeTest() { + // TODO: test traitType + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } + + /** Test the property 'displayType' */ + @Test + public void displayTypeTest() { + // TODO: test displayType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java new file mode 100644 index 0000000..a53a9b1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.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 CollectionTokenMetadataDto */ +public class CollectionTokenMetadataDtoTest { + private final CollectionTokenMetadataDto model = new CollectionTokenMetadataDto(); + + /** Model tests for CollectionTokenMetadataDto */ + @Test + public void testCollectionTokenMetadataDto() { + // TODO: test CollectionTokenMetadataDto + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'image' */ + @Test + public void imageTest() { + // TODO: test image + } + + /** Test the property 'animationUrl' */ + @Test + public void animationUrlTest() { + // TODO: test animationUrl + } + + /** Test the property 'externalUrl' */ + @Test + public void externalUrlTest() { + // TODO: test externalUrl + } + + /** Test the property 'attributes' */ + @Test + public void attributesTest() { + // TODO: test attributes + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java new file mode 100644 index 0000000..67908f1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.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 CollectionType */ +public class CollectionTypeTest { + /** Model tests for CollectionType */ + @Test + public void testCollectionType() { + // TODO: test CollectionType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractWithAbiDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ContractWithAbiDtoTest.java new file mode 100644 index 0000000..cdfc9f6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractWithAbiDtoTest.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 ContractWithAbiDto */ +public class ContractWithAbiDtoTest { + private final ContractWithAbiDto model = new ContractWithAbiDto(); + + /** Model tests for ContractWithAbiDto */ + @Test + public void testContractWithAbiDto() { + // TODO: test ContractWithAbiDto + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'abi' */ + @Test + public void abiTest() { + // TODO: test abi + } + + /** Test the property 'isProxy' */ + @Test + public void isProxyTest() { + // TODO: test isProxy + } + + /** Test the property 'implementation' */ + @Test + public void implementationTest() { + // TODO: test implementation + } + + /** Test the property 'isPublic' */ + @Test + public void isPublicTest() { + // TODO: test isPublic + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.java b/src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnershipTest.java similarity index 51% rename from src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.java rename to src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnershipTest.java index 929f137..6f7a16a 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnershipTest.java @@ -15,20 +15,15 @@ import org.junit.Test; -/** Model tests for AssetDoesNotExistHttpError */ -public class AssetDoesNotExistHttpErrorTest { - private final AssetDoesNotExistHttpError model = new AssetDoesNotExistHttpError(); +/** Model tests for CreateSigningKeyDtoProofOfOwnership */ +public class CreateSigningKeyDtoProofOfOwnershipTest { + private final CreateSigningKeyDtoProofOfOwnership model = + new CreateSigningKeyDtoProofOfOwnership(); - /** Model tests for AssetDoesNotExistHttpError */ + /** Model tests for CreateSigningKeyDtoProofOfOwnership */ @Test - public void testAssetDoesNotExistHttpError() { - // TODO: test AssetDoesNotExistHttpError - } - - /** Test the property 'statusCode' */ - @Test - public void statusCodeTest() { - // TODO: test statusCode + public void testCreateSigningKeyDtoProofOfOwnership() { + // TODO: test CreateSigningKeyDtoProofOfOwnership } /** Test the property 'message' */ @@ -37,9 +32,9 @@ public void messageTest() { // TODO: test message } - /** Test the property 'error' */ + /** Test the property 'signature' */ @Test - public void errorTest() { - // TODO: test error + public void signatureTest() { + // TODO: test signature } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java index 9e03960..dfa752a 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java @@ -42,4 +42,10 @@ public void signedCertPemTest() { public void agentUserIdTest() { // TODO: test agentUserId } + + /** Test the property 'proofOfOwnership' */ + @Test + public void proofOfOwnershipTest() { + // TODO: test proofOfOwnership + } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java index a74aacb..cf290d3 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateVaultAccountRequestTest.java @@ -48,4 +48,16 @@ public void customerRefIdTest() { public void autoFuelTest() { // TODO: test autoFuel } + + /** Test the property 'vaultType' */ + @Test + public void vaultTypeTest() { + // TODO: test vaultType + } + + /** Test the property 'autoAssign' */ + @Test + public void autoAssignTest() { + // TODO: test autoAssign + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java b/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java index af9d823..5344f72 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java @@ -54,4 +54,10 @@ public void totalTest() { public void availableTest() { // TODO: test available } + + /** Test the property 'credit' */ + @Test + public void creditTest() { + // TODO: test credit + } } diff --git a/src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.java new file mode 100644 index 0000000..5183723 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.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 FetchAbiRequestDto */ +public class FetchAbiRequestDtoTest { + private final FetchAbiRequestDto model = new FetchAbiRequestDto(); + + /** Model tests for FetchAbiRequestDto */ + @Test + public void testFetchAbiRequestDto() { + // TODO: test FetchAbiRequestDto + } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTOTest.java b/src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java similarity index 52% rename from src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTOTest.java rename to src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java index 5620df9..3b0f974 100644 --- a/src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseDTOTest.java +++ b/src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java @@ -15,14 +15,15 @@ import org.junit.Test; -/** Model tests for GetAuditLogsResponseDTO */ -public class GetAuditLogsResponseDTOTest { - private final GetAuditLogsResponseDTO model = new GetAuditLogsResponseDTO(); +/** Model tests for GetLinkedCollectionsPaginatedResponse */ +public class GetLinkedCollectionsPaginatedResponseTest { + private final GetLinkedCollectionsPaginatedResponse model = + new GetLinkedCollectionsPaginatedResponse(); - /** Model tests for GetAuditLogsResponseDTO */ + /** Model tests for GetLinkedCollectionsPaginatedResponse */ @Test - public void testGetAuditLogsResponseDTO() { - // TODO: test GetAuditLogsResponseDTO + public void testGetLinkedCollectionsPaginatedResponse() { + // TODO: test GetLinkedCollectionsPaginatedResponse } /** Test the property 'data' */ @@ -31,15 +32,9 @@ public void dataTest() { // TODO: test data } - /** Test the property 'total' */ + /** Test the property 'next' */ @Test - public void totalTest() { - // TODO: test total - } - - /** Test the property 'cursor' */ - @Test - public void cursorTest() { - // TODO: test cursor + public void nextTest() { + // TODO: test next } } diff --git a/src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.java b/src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.java new file mode 100644 index 0000000..f097080 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.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 RescanTransaction */ +public class RescanTransactionTest { + private final RescanTransaction model = new RescanTransaction(); + + /** Model tests for RescanTransaction */ + @Test + public void testRescanTransaction() { + // TODO: test RescanTransaction + } + + /** Test the property 'txHash' */ + @Test + public void txHashTest() { + // TODO: test txHash + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java index 465a4ad..9445f09 100644 --- a/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java @@ -42,4 +42,16 @@ public void refIdTest() { public void displayNameTest() { // TODO: test displayName } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } } diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java index 5653bdd..0139b4b 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java @@ -115,6 +115,12 @@ public void maxFeeTest() { // TODO: test maxFee } + /** Test the property 'maxTotalFee' */ + @Test + public void maxTotalFeeTest() { + // TODO: test maxTotalFee + } + /** Test the property 'gasLimit' */ @Test public void gasLimitTest() { @@ -174,4 +180,10 @@ public void networkStakingTest() { public void cpuStakingTest() { // TODO: test cpuStaking } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescanTest.java b/src/test/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescanTest.java new file mode 100644 index 0000000..682d671 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ValidatedTransactionsForRescanTest.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 ValidatedTransactionsForRescan */ +public class ValidatedTransactionsForRescanTest { + private final ValidatedTransactionsForRescan model = new ValidatedTransactionsForRescan(); + + /** Model tests for ValidatedTransactionsForRescan */ + @Test + public void testValidatedTransactionsForRescan() { + // TODO: test ValidatedTransactionsForRescan + } + + /** Test the property 'baseAsset' */ + @Test + public void baseAssetTest() { + // TODO: test baseAsset + } + + /** Test the property 'networkProtocol' */ + @Test + public void networkProtocolTest() { + // TODO: test networkProtocol + } + + /** Test the property 'txHashes' */ + @Test + public void txHashesTest() { + // TODO: test txHashes + } +}