From 84719f3c7a85a87098b5527e3cc45fbd77de1df6 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Mon, 18 Aug 2025 13:55:06 +0000 Subject: [PATCH] Generated SDK #3302 --- .openapi-generator/FILES | 63 + README.md | 35 +- api/openapi.yaml | 1533 +++++++++++++++++ build.gradle | 2 +- docs/AdapterProcessingResult.md | 14 + docs/ChannelDvnConfigWithConfirmations.md | 14 + ...DvnConfigWithConfirmationsReceiveConfig.md | 16 + ...nelDvnConfigWithConfirmationsSendConfig.md | 16 + docs/DeployLayerZeroAdaptersRequest.md | 29 + docs/DvnConfig.md | 15 + docs/DvnConfigWithConfirmations.md | 16 + docs/FeeInfo.md | 1 + docs/GetLayerZeroDvnConfigResponse.md | 14 + docs/GetLayerZeroPeersResponse.md | 15 + docs/LayerZeroAdapterCreateParams.md | 16 + docs/PeerAdapterInfo.md | 15 + docs/RemoveLayerZeroAdapterFailedResult.md | 13 + docs/RemoveLayerZeroAdaptersRequest.md | 14 + docs/RemoveLayerZeroAdaptersResponse.md | 14 + docs/RemoveLayerZeroPeersRequest.md | 16 + docs/RemoveLayerZeroPeersResponse.md | 13 + docs/SetLayerZeroDvnConfigRequest.md | 17 + docs/SetLayerZeroDvnConfigResponse.md | 13 + docs/SetLayerZeroPeersRequest.md | 16 + docs/SetLayerZeroPeersResponse.md | 13 + docs/TokenizationApi.md | 1021 +++++++++-- docs/ValidateLayerZeroChannelResponse.md | 14 + pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../fireblocks/sdk/api/TokenizationApi.java | 880 +++++++++- .../sdk/model/AdapterProcessingResult.java | 185 ++ .../ChannelDvnConfigWithConfirmations.java | 171 ++ ...nConfigWithConfirmationsReceiveConfig.java | 318 ++++ ...lDvnConfigWithConfirmationsSendConfig.java | 316 ++++ .../model/DeployLayerZeroAdaptersRequest.java | 453 +++++ .../com/fireblocks/sdk/model/DvnConfig.java | 262 +++ .../sdk/model/DvnConfigWithConfirmations.java | 306 ++++ .../com/fireblocks/sdk/model/FeeInfo.java | 53 +- .../model/GetLayerZeroDvnConfigResponse.java | 216 +++ .../sdk/model/GetLayerZeroPeersResponse.java | 250 +++ .../model/LayerZeroAdapterCreateParams.java | 274 +++ .../fireblocks/sdk/model/PeerAdapterInfo.java | 230 +++ .../RemoveLayerZeroAdapterFailedResult.java | 145 ++ .../model/RemoveLayerZeroAdaptersRequest.java | 209 +++ .../RemoveLayerZeroAdaptersResponse.java | 221 +++ .../model/RemoveLayerZeroPeersRequest.java | 306 ++++ .../model/RemoveLayerZeroPeersResponse.java | 162 ++ .../model/SetLayerZeroDvnConfigRequest.java | 312 ++++ .../model/SetLayerZeroDvnConfigResponse.java | 158 ++ .../sdk/model/SetLayerZeroPeersRequest.java | 306 ++++ .../sdk/model/SetLayerZeroPeersResponse.java | 161 ++ .../ValidateLayerZeroChannelResponse.java | 200 +++ .../sdk/api/TokenizationApiTest.java | 143 ++ .../model/AdapterProcessingResultTest.java | 39 + ...figWithConfirmationsReceiveConfigTest.java | 52 + ...ConfigWithConfirmationsSendConfigTest.java | 52 + ...ChannelDvnConfigWithConfirmationsTest.java | 39 + .../DeployLayerZeroAdaptersRequestTest.java | 69 + .../fireblocks/sdk/model/DvnConfigTest.java | 45 + .../model/DvnConfigWithConfirmationsTest.java | 51 + .../com/fireblocks/sdk/model/FeeInfoTest.java | 6 + .../GetLayerZeroDvnConfigResponseTest.java | 39 + .../model/GetLayerZeroPeersResponseTest.java | 45 + .../LayerZeroAdapterCreateParamsTest.java | 51 + .../sdk/model/PeerAdapterInfoTest.java | 45 + ...emoveLayerZeroAdapterFailedResultTest.java | 34 + .../RemoveLayerZeroAdaptersRequestTest.java | 39 + .../RemoveLayerZeroAdaptersResponseTest.java | 39 + .../RemoveLayerZeroPeersRequestTest.java | 51 + .../RemoveLayerZeroPeersResponseTest.java | 33 + .../SetLayerZeroDvnConfigRequestTest.java | 57 + .../SetLayerZeroDvnConfigResponseTest.java | 33 + .../model/SetLayerZeroPeersRequestTest.java | 51 + .../model/SetLayerZeroPeersResponseTest.java | 33 + .../ValidateLayerZeroChannelResponseTest.java | 39 + 75 files changed, 9913 insertions(+), 248 deletions(-) create mode 100644 docs/AdapterProcessingResult.md create mode 100644 docs/ChannelDvnConfigWithConfirmations.md create mode 100644 docs/ChannelDvnConfigWithConfirmationsReceiveConfig.md create mode 100644 docs/ChannelDvnConfigWithConfirmationsSendConfig.md create mode 100644 docs/DeployLayerZeroAdaptersRequest.md create mode 100644 docs/DvnConfig.md create mode 100644 docs/DvnConfigWithConfirmations.md create mode 100644 docs/GetLayerZeroDvnConfigResponse.md create mode 100644 docs/GetLayerZeroPeersResponse.md create mode 100644 docs/LayerZeroAdapterCreateParams.md create mode 100644 docs/PeerAdapterInfo.md create mode 100644 docs/RemoveLayerZeroAdapterFailedResult.md create mode 100644 docs/RemoveLayerZeroAdaptersRequest.md create mode 100644 docs/RemoveLayerZeroAdaptersResponse.md create mode 100644 docs/RemoveLayerZeroPeersRequest.md create mode 100644 docs/RemoveLayerZeroPeersResponse.md create mode 100644 docs/SetLayerZeroDvnConfigRequest.md create mode 100644 docs/SetLayerZeroDvnConfigResponse.md create mode 100644 docs/SetLayerZeroPeersRequest.md create mode 100644 docs/SetLayerZeroPeersResponse.md create mode 100644 docs/ValidateLayerZeroChannelResponse.md create mode 100644 src/main/java/com/fireblocks/sdk/model/AdapterProcessingResult.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfig.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfig.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DvnConfig.java create mode 100644 src/main/java/com/fireblocks/sdk/model/DvnConfigWithConfirmations.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParams.java create mode 100644 src/main/java/com/fireblocks/sdk/model/PeerAdapterInfo.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResult.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponse.java create mode 100644 src/test/java/com/fireblocks/sdk/model/AdapterProcessingResultTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfigTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfigTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DvnConfigTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/DvnConfigWithConfirmationsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParamsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/PeerAdapterInfoTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResultTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponseTest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1102415b..b1627e1d 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/AdapterProcessingResult.md docs/AddAbiRequestDto.md docs/AddAssetToExternalWalletRequest.md docs/AddAssetToExternalWalletRequestOneOf.md @@ -82,6 +83,9 @@ docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md docs/ChainDescriptor.md docs/ChainInfoResponse.md +docs/ChannelDvnConfigWithConfirmations.md +docs/ChannelDvnConfigWithConfirmationsReceiveConfig.md +docs/ChannelDvnConfigWithConfirmationsSendConfig.md docs/ClaimRewardsRequest.md docs/CollectionBurnRequestDto.md docs/CollectionBurnResponseDto.md @@ -191,6 +195,7 @@ docs/Delegation.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md +docs/DeployLayerZeroAdaptersRequest.md docs/DeployableAddressResponse.md docs/DeployedContractNotFoundError.md docs/DeployedContractResponseDto.md @@ -221,6 +226,8 @@ docs/DraftResponse.md docs/DraftReviewAndValidationResponse.md docs/DropTransactionRequest.md docs/DropTransactionResponse.md +docs/DvnConfig.md +docs/DvnConfigWithConfirmations.md docs/EVMTokenCreateParamsDto.md docs/EditGasStationConfigurationResponse.md docs/EmbeddedWallet.md @@ -287,6 +294,8 @@ docs/GetConsoleUsersResponse.md docs/GetDeployableAddressRequest.md docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md +docs/GetLayerZeroDvnConfigResponse.md +docs/GetLayerZeroPeersResponse.md docs/GetLinkedCollectionsPaginatedResponse.md docs/GetMaxSpendableAmountResponse.md docs/GetMpcKeysResponse.md @@ -309,6 +318,7 @@ docs/JobCreated.md docs/JobManagementApi.md docs/KeyLinkBetaApi.md docs/KeysBetaApi.md +docs/LayerZeroAdapterCreateParams.md docs/LeanAbiFunction.md docs/LeanContractDto.md docs/LeanDeployedContractResponseDto.md @@ -376,6 +386,7 @@ docs/PayoutInstructionState.md docs/PayoutResponse.md docs/PayoutState.md docs/PayoutStatus.md +docs/PeerAdapterInfo.md docs/Players.md docs/PolicyAndValidationResponse.md docs/PolicyCheckResult.md @@ -419,6 +430,11 @@ docs/ReissueMultichainTokenRequest.md docs/RelatedRequest.md docs/RelatedTransaction.md docs/RemoveCollateralRequestBody.md +docs/RemoveLayerZeroAdapterFailedResult.md +docs/RemoveLayerZeroAdaptersRequest.md +docs/RemoveLayerZeroAdaptersResponse.md +docs/RemoveLayerZeroPeersRequest.md +docs/RemoveLayerZeroPeersResponse.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md docs/RescanTransaction.md @@ -457,6 +473,10 @@ docs/SetConfirmationsThresholdRequest.md docs/SetConfirmationsThresholdResponse.md docs/SetCustomerRefIdForAddressRequest.md docs/SetCustomerRefIdRequest.md +docs/SetLayerZeroDvnConfigRequest.md +docs/SetLayerZeroDvnConfigResponse.md +docs/SetLayerZeroPeersRequest.md +docs/SetLayerZeroPeersResponse.md docs/SetNetworkIdDiscoverabilityRequest.md docs/SetNetworkIdNameRequest.md docs/SetNetworkIdResponse.md @@ -641,6 +661,7 @@ docs/UserStatus.md docs/UserType.md docs/UsersApi.md docs/ValidateAddressResponse.md +docs/ValidateLayerZeroChannelResponse.md docs/ValidatedTransactionsForRescan.md docs/ValidationKeyDto.md docs/Validator.md @@ -747,6 +768,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/AdapterProcessingResult.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 @@ -813,6 +835,9 @@ src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/CancelTransactionResponse.java src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java +src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java +src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfig.java +src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfig.java src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java @@ -915,6 +940,7 @@ src/main/java/com/fireblocks/sdk/model/Delegation.java src/main/java/com/fireblocks/sdk/model/DelegationSummary.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java +src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java src/main/java/com/fireblocks/sdk/model/DeployableAddressResponse.java src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java @@ -944,6 +970,8 @@ src/main/java/com/fireblocks/sdk/model/DraftResponse.java src/main/java/com/fireblocks/sdk/model/DraftReviewAndValidationResponse.java src/main/java/com/fireblocks/sdk/model/DropTransactionRequest.java src/main/java/com/fireblocks/sdk/model/DropTransactionResponse.java +src/main/java/com/fireblocks/sdk/model/DvnConfig.java +src/main/java/com/fireblocks/sdk/model/DvnConfigWithConfirmations.java src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java src/main/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponse.java src/main/java/com/fireblocks/sdk/model/EmbeddedWallet.java @@ -1005,6 +1033,8 @@ src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequest.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/GetLayerZeroDvnConfigResponse.java +src/main/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponse.java src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java src/main/java/com/fireblocks/sdk/model/GetMpcKeysResponse.java @@ -1023,6 +1053,7 @@ src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java src/main/java/com/fireblocks/sdk/model/Job.java src/main/java/com/fireblocks/sdk/model/JobCreated.java +src/main/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParams.java src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java src/main/java/com/fireblocks/sdk/model/LeanContractDto.java src/main/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDto.java @@ -1085,6 +1116,7 @@ src/main/java/com/fireblocks/sdk/model/PayoutInstructionState.java src/main/java/com/fireblocks/sdk/model/PayoutResponse.java src/main/java/com/fireblocks/sdk/model/PayoutState.java src/main/java/com/fireblocks/sdk/model/PayoutStatus.java +src/main/java/com/fireblocks/sdk/model/PeerAdapterInfo.java src/main/java/com/fireblocks/sdk/model/Players.java src/main/java/com/fireblocks/sdk/model/PolicyAndValidationResponse.java src/main/java/com/fireblocks/sdk/model/PolicyCheckResult.java @@ -1127,6 +1159,11 @@ src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java src/main/java/com/fireblocks/sdk/model/RelatedRequest.java src/main/java/com/fireblocks/sdk/model/RelatedTransaction.java src/main/java/com/fireblocks/sdk/model/RemoveCollateralRequestBody.java +src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResult.java +src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequest.java +src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponse.java +src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequest.java +src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponse.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 @@ -1164,6 +1201,10 @@ src/main/java/com/fireblocks/sdk/model/SetConfirmationsThresholdRequest.java src/main/java/com/fireblocks/sdk/model/SetConfirmationsThresholdResponse.java src/main/java/com/fireblocks/sdk/model/SetCustomerRefIdForAddressRequest.java src/main/java/com/fireblocks/sdk/model/SetCustomerRefIdRequest.java +src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequest.java +src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponse.java +src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequest.java +src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponse.java src/main/java/com/fireblocks/sdk/model/SetNetworkIdDiscoverabilityRequest.java src/main/java/com/fireblocks/sdk/model/SetNetworkIdNameRequest.java src/main/java/com/fireblocks/sdk/model/SetNetworkIdResponse.java @@ -1339,6 +1380,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/ValidateLayerZeroChannelResponse.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/Validator.java @@ -1419,6 +1461,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/AdapterProcessingResultTest.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 @@ -1485,6 +1528,9 @@ src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java src/test/java/com/fireblocks/sdk/model/CancelTransactionResponseTest.java src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java +src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfigTest.java +src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfigTest.java +src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.java src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java @@ -1587,6 +1633,7 @@ src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java src/test/java/com/fireblocks/sdk/model/DelegationTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java +src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.java src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java @@ -1616,6 +1663,8 @@ src/test/java/com/fireblocks/sdk/model/DraftResponseTest.java src/test/java/com/fireblocks/sdk/model/DraftReviewAndValidationResponseTest.java src/test/java/com/fireblocks/sdk/model/DropTransactionRequestTest.java src/test/java/com/fireblocks/sdk/model/DropTransactionResponseTest.java +src/test/java/com/fireblocks/sdk/model/DvnConfigTest.java +src/test/java/com/fireblocks/sdk/model/DvnConfigWithConfirmationsTest.java src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java src/test/java/com/fireblocks/sdk/model/EditGasStationConfigurationResponseTest.java src/test/java/com/fireblocks/sdk/model/EmbeddedWalletAccountTest.java @@ -1677,6 +1726,8 @@ src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestTest.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/GetLayerZeroDvnConfigResponseTest.java +src/test/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.java @@ -1695,6 +1746,7 @@ src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java src/test/java/com/fireblocks/sdk/model/JobCreatedTest.java src/test/java/com/fireblocks/sdk/model/JobTest.java +src/test/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParamsTest.java src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/LeanContractDtoTest.java src/test/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDtoTest.java @@ -1757,6 +1809,7 @@ src/test/java/com/fireblocks/sdk/model/PayoutInstructionTest.java src/test/java/com/fireblocks/sdk/model/PayoutResponseTest.java src/test/java/com/fireblocks/sdk/model/PayoutStateTest.java src/test/java/com/fireblocks/sdk/model/PayoutStatusTest.java +src/test/java/com/fireblocks/sdk/model/PeerAdapterInfoTest.java src/test/java/com/fireblocks/sdk/model/PlayersTest.java src/test/java/com/fireblocks/sdk/model/PolicyAndValidationResponseTest.java src/test/java/com/fireblocks/sdk/model/PolicyCheckResultTest.java @@ -1799,6 +1852,11 @@ src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestTest.java src/test/java/com/fireblocks/sdk/model/RelatedRequestTest.java src/test/java/com/fireblocks/sdk/model/RelatedTransactionTest.java src/test/java/com/fireblocks/sdk/model/RemoveCollateralRequestBodyTest.java +src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResultTest.java +src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequestTest.java +src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponseTest.java +src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequestTest.java +src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponseTest.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 @@ -1836,6 +1894,10 @@ src/test/java/com/fireblocks/sdk/model/SetConfirmationsThresholdRequestTest.java src/test/java/com/fireblocks/sdk/model/SetConfirmationsThresholdResponseTest.java src/test/java/com/fireblocks/sdk/model/SetCustomerRefIdForAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/SetCustomerRefIdRequestTest.java +src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequestTest.java +src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponseTest.java +src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequestTest.java +src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponseTest.java src/test/java/com/fireblocks/sdk/model/SetNetworkIdDiscoverabilityRequestTest.java src/test/java/com/fireblocks/sdk/model/SetNetworkIdNameRequestTest.java src/test/java/com/fireblocks/sdk/model/SetNetworkIdResponseTest.java @@ -2011,6 +2073,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/ValidateLayerZeroChannelResponseTest.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/ValidatorTest.java diff --git a/README.md b/README.md index 3e5709be..bc3f9608 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 11.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:11.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-11.1.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -352,9 +352,13 @@ Class | Method | HTTP request | Description *TagsApi* | [**updateTag**](docs/TagsApi.md#updateTag) | **PATCH** /tags/{tagId} | Update a tag *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* | [**deactivateAndUnlinkAdapters**](docs/TokenizationApi.md#deactivateAndUnlinkAdapters) | **DELETE** /tokenization/multichain/bridge/layerzero | Remove LayerZero adapters +*TokenizationApi* | [**deployAndLinkAdapters**](docs/TokenizationApi.md#deployAndLinkAdapters) | **POST** /tokenization/multichain/bridge/layerzero | Deploy LayerZero adapters *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* | [**getDeployableAddress**](docs/TokenizationApi.md#getDeployableAddress) | **POST** /tokenization/multichain/deterministic_address | Get deterministic address for contract deployment +*TokenizationApi* | [**getLayerZeroDvnConfig**](docs/TokenizationApi.md#getLayerZeroDvnConfig) | **GET** /tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/dvns | Get LayerZero DVN configuration +*TokenizationApi* | [**getLayerZeroPeers**](docs/TokenizationApi.md#getLayerZeroPeers) | **GET** /tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/peers | Get LayerZero peers *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 @@ -363,8 +367,12 @@ Class | Method | HTTP request | Description *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* | [**reIssueTokenMultiChain**](docs/TokenizationApi.md#reIssueTokenMultiChain) | **POST** /tokenization/multichain/reissue/token/{tokenLinkId} | Reissue a multichain token +*TokenizationApi* | [**removeLayerZeroPeers**](docs/TokenizationApi.md#removeLayerZeroPeers) | **DELETE** /tokenization/multichain/bridge/layerzero/config/peers | Remove LayerZero peers +*TokenizationApi* | [**setLayerZeroDvnConfig**](docs/TokenizationApi.md#setLayerZeroDvnConfig) | **POST** /tokenization/multichain/bridge/layerzero/config/dvns | Set LayerZero DVN configuration +*TokenizationApi* | [**setLayerZeroPeers**](docs/TokenizationApi.md#setLayerZeroPeers) | **POST** /tokenization/multichain/bridge/layerzero/config/peers | Set LayerZero peers *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 +*TokenizationApi* | [**validateLayerZeroChannelConfig**](docs/TokenizationApi.md#validateLayerZeroChannelConfig) | **GET** /tokenization/multichain/bridge/layerzero/validate | Validate LayerZero channel configuration *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 @@ -449,6 +457,7 @@ Class | Method | HTTP request | Description - [AbiFunction](docs/AbiFunction.md) - [Account](docs/Account.md) - [AccountType](docs/AccountType.md) + - [AdapterProcessingResult](docs/AdapterProcessingResult.md) - [AddAbiRequestDto](docs/AddAbiRequestDto.md) - [AddAssetToExternalWalletRequest](docs/AddAssetToExternalWalletRequest.md) - [AddAssetToExternalWalletRequestOneOf](docs/AddAssetToExternalWalletRequestOneOf.md) @@ -515,6 +524,9 @@ Class | Method | HTTP request | Description - [CancelTransactionResponse](docs/CancelTransactionResponse.md) - [ChainDescriptor](docs/ChainDescriptor.md) - [ChainInfoResponse](docs/ChainInfoResponse.md) + - [ChannelDvnConfigWithConfirmations](docs/ChannelDvnConfigWithConfirmations.md) + - [ChannelDvnConfigWithConfirmationsReceiveConfig](docs/ChannelDvnConfigWithConfirmationsReceiveConfig.md) + - [ChannelDvnConfigWithConfirmationsSendConfig](docs/ChannelDvnConfigWithConfirmationsSendConfig.md) - [ClaimRewardsRequest](docs/ClaimRewardsRequest.md) - [CollectionBurnRequestDto](docs/CollectionBurnRequestDto.md) - [CollectionBurnResponseDto](docs/CollectionBurnResponseDto.md) @@ -617,6 +629,7 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) + - [DeployLayerZeroAdaptersRequest](docs/DeployLayerZeroAdaptersRequest.md) - [DeployableAddressResponse](docs/DeployableAddressResponse.md) - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) - [DeployedContractResponseDto](docs/DeployedContractResponseDto.md) @@ -646,6 +659,8 @@ Class | Method | HTTP request | Description - [DraftReviewAndValidationResponse](docs/DraftReviewAndValidationResponse.md) - [DropTransactionRequest](docs/DropTransactionRequest.md) - [DropTransactionResponse](docs/DropTransactionResponse.md) + - [DvnConfig](docs/DvnConfig.md) + - [DvnConfigWithConfirmations](docs/DvnConfigWithConfirmations.md) - [EVMTokenCreateParamsDto](docs/EVMTokenCreateParamsDto.md) - [EditGasStationConfigurationResponse](docs/EditGasStationConfigurationResponse.md) - [EmbeddedWallet](docs/EmbeddedWallet.md) @@ -707,6 +722,8 @@ Class | Method | HTTP request | Description - [GetDeployableAddressRequest](docs/GetDeployableAddressRequest.md) - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) + - [GetLayerZeroDvnConfigResponse](docs/GetLayerZeroDvnConfigResponse.md) + - [GetLayerZeroPeersResponse](docs/GetLayerZeroPeersResponse.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) - [GetMpcKeysResponse](docs/GetMpcKeysResponse.md) @@ -725,6 +742,7 @@ Class | Method | HTTP request | Description - [InvalidParamaterValueError](docs/InvalidParamaterValueError.md) - [Job](docs/Job.md) - [JobCreated](docs/JobCreated.md) + - [LayerZeroAdapterCreateParams](docs/LayerZeroAdapterCreateParams.md) - [LeanAbiFunction](docs/LeanAbiFunction.md) - [LeanContractDto](docs/LeanContractDto.md) - [LeanDeployedContractResponseDto](docs/LeanDeployedContractResponseDto.md) @@ -787,6 +805,7 @@ Class | Method | HTTP request | Description - [PayoutResponse](docs/PayoutResponse.md) - [PayoutState](docs/PayoutState.md) - [PayoutStatus](docs/PayoutStatus.md) + - [PeerAdapterInfo](docs/PeerAdapterInfo.md) - [Players](docs/Players.md) - [PolicyAndValidationResponse](docs/PolicyAndValidationResponse.md) - [PolicyCheckResult](docs/PolicyCheckResult.md) @@ -829,6 +848,11 @@ Class | Method | HTTP request | Description - [RelatedRequest](docs/RelatedRequest.md) - [RelatedTransaction](docs/RelatedTransaction.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) + - [RemoveLayerZeroAdapterFailedResult](docs/RemoveLayerZeroAdapterFailedResult.md) + - [RemoveLayerZeroAdaptersRequest](docs/RemoveLayerZeroAdaptersRequest.md) + - [RemoveLayerZeroAdaptersResponse](docs/RemoveLayerZeroAdaptersResponse.md) + - [RemoveLayerZeroPeersRequest](docs/RemoveLayerZeroPeersRequest.md) + - [RemoveLayerZeroPeersResponse](docs/RemoveLayerZeroPeersResponse.md) - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) - [RescanTransaction](docs/RescanTransaction.md) @@ -866,6 +890,10 @@ Class | Method | HTTP request | Description - [SetConfirmationsThresholdResponse](docs/SetConfirmationsThresholdResponse.md) - [SetCustomerRefIdForAddressRequest](docs/SetCustomerRefIdForAddressRequest.md) - [SetCustomerRefIdRequest](docs/SetCustomerRefIdRequest.md) + - [SetLayerZeroDvnConfigRequest](docs/SetLayerZeroDvnConfigRequest.md) + - [SetLayerZeroDvnConfigResponse](docs/SetLayerZeroDvnConfigResponse.md) + - [SetLayerZeroPeersRequest](docs/SetLayerZeroPeersRequest.md) + - [SetLayerZeroPeersResponse](docs/SetLayerZeroPeersResponse.md) - [SetNetworkIdDiscoverabilityRequest](docs/SetNetworkIdDiscoverabilityRequest.md) - [SetNetworkIdNameRequest](docs/SetNetworkIdNameRequest.md) - [SetNetworkIdResponse](docs/SetNetworkIdResponse.md) @@ -1041,6 +1069,7 @@ Class | Method | HTTP request | Description - [UserStatus](docs/UserStatus.md) - [UserType](docs/UserType.md) - [ValidateAddressResponse](docs/ValidateAddressResponse.md) + - [ValidateLayerZeroChannelResponse](docs/ValidateLayerZeroChannelResponse.md) - [ValidatedTransactionsForRescan](docs/ValidatedTransactionsForRescan.md) - [ValidationKeyDto](docs/ValidationKeyDto.md) - [Validator](docs/Validator.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8eebc7d7..a646168a 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -15434,6 +15434,907 @@ paths: \ token_link_id, idempotency_key);" x-content-type: application/json x-accepts: application/json + /tokenization/multichain/bridge/layerzero: + delete: + description: Remove LayerZero adapters by deactivating and unlinking them. This + endpoint revokes roles and deactivates the specified adapter contracts. + operationId: deactivateAndUnlinkAdapters + 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/RemoveLayerZeroAdaptersRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveLayerZeroAdaptersResponse' + description: LayerZero adapters removal process completed + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "409": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link processing + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link processing error + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Remove LayerZero adapters + tags: + - Tokenization + x-rate-limit-category: write + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + "vaultAccountId": "1", + "adapterTokenLinkIds": ["d290f1ee-6c54-4b01-90e6-d701748f0851", "e290f1ee-6c54-4b01-90e6-d701748f0852"] + } const removeResponse = await fireblocks.deactivateAndUnlinkAdapters(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.deactivateAndUnlinkAdapters(tokenizationApiDeactivateAndUnlinkAdaptersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().deactivateAndUnlinkAdapters(removeLayerZeroAdaptersRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.deactivate_and_unlink_adapters(remove_layer_zero_adapters_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.deactivateAndUnlinkAdapters(tokenizationApiDeactivateAndUnlinkAdaptersRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().deactivateAndUnlinkAdapters(removeLayerZeroAdaptersRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.deactivate_and_unlink_adapters(remove_layer_zero_adapters_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + post: + description: Deploy LayerZero adapters for multichain token bridging functionality. + This endpoint creates adapter contracts that enable cross-chain token transfers. + operationId: deployAndLinkAdapters + 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/DeployLayerZeroAdaptersRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployLayerZeroAdaptersResponse' + description: LayerZero adapters deployed successfully + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "409": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link preparation + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link preparation error + "422": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: The token link is not of fungible type + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link is not fungible + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Deploy LayerZero adapters + tags: + - Tokenization + x-rate-limit-category: write + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + "vaultAccountId": "0", + "createParams": [{ + "tokenLinkId": "123-432-1234-1234-123456789012", + "delegateAddress": "0xABCDEF123456789abcdef1234567890abcdef12345678", + "defaultAdminAddress": "0xABC123456789abcdef1234567890abcdef12345678", + "pauserAddress": "0xDEFABC123456789abcdef1234567890abcdef12345678" + }], + "displayName": "LayerZero", + "useGasless": true + } const deployResponse = await fireblocks.deployAndLinkAdapters(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.deployAndLinkAdapters(tokenizationApiDeployAndLinkAdaptersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response\ + \ = fireblocks.tokenization().deployAndLinkAdapters(deployLayerZeroAdaptersRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.deploy_and_link_adapters(deploy_layer_zero_adapters_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.deployAndLinkAdapters(tokenizationApiDeployAndLinkAdaptersRequest);" + - lang: Java + source: "CompletableFuture>> response\ + \ = fireblocks.tokenization().deployAndLinkAdapters(deployLayerZeroAdaptersRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.deploy_and_link_adapters(deploy_layer_zero_adapters_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/bridge/layerzero/config/peers: + delete: + description: Remove LayerZero peers to disconnect adapter contracts. This endpoint + removes peer relationships between LayerZero adapters. + operationId: removeLayerZeroPeers + 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/RemoveLayerZeroPeersRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveLayerZeroPeersResponse' + description: LayerZero peers removal process completed + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "409": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link processing + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link processing error + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Remove LayerZero peers + tags: + - Tokenization + x-rate-limit-category: write + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + "vaultAccountId": "0", + "sourceAdapterTokenLinkId": "123-432-1234-1234-123456789012", + "destinationAdapterTokenLinkIds": ["123-432-1234-1234-123456789012", "123-432-1234-1234-123456789012"], + "bidirectional": true + } const removePeersResponse = await fireblocks.removeLayerZeroPeers(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.removeLayerZeroPeers(tokenizationApiRemoveLayerZeroPeersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().removeLayerZeroPeers(removeLayerZeroPeersRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.remove_layer_zero_peers(remove_layer_zero_peers_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.removeLayerZeroPeers(tokenizationApiRemoveLayerZeroPeersRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().removeLayerZeroPeers(removeLayerZeroPeersRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.remove_layer_zero_peers(remove_layer_zero_peers_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + post: + description: "Set LayerZero peers to establish connections between adapter contracts.\ + \ This endpoint creates peer relationships that enable cross-chain communication.\ + \ It sets the destination adapter as a peer of the source adapter. If `bidirectional`\ + \ is true, it also sets the source adapter as a peer of the destination adapter(s)." + operationId: setLayerZeroPeers + 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/SetLayerZeroPeersRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SetLayerZeroPeersResponse' + description: LayerZero peers set successfully + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "409": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link preparation + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link preparation error + "422": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: The token link is not of fungible type + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link is not fungible + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Set LayerZero peers + tags: + - Tokenization + x-rate-limit-category: write + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + "vaultAccountId": "0", + "sourceAdapterTokenLinkId": "123-432-1234-1234-123456789012", + "destinationAdapterTokenLinkIds": ["123-432-1234-1234-123456789012", "123-432-1234-1234-123456789012"], + "bidirectional": true + } const setPeersResponse = await fireblocks.setLayerZeroPeers(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.setLayerZeroPeers(tokenizationApiSetLayerZeroPeersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().setLayerZeroPeers(setLayerZeroPeersRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.set_layer_zero_peers(set_layer_zero_peers_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.setLayerZeroPeers(tokenizationApiSetLayerZeroPeersRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().setLayerZeroPeers(setLayerZeroPeersRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.set_layer_zero_peers(set_layer_zero_peers_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/peers: + get: + description: Retrieve the LayerZero peers configured for a specific adapter. + Returns information about peer relationships for cross-chain communication. + operationId: getLayerZeroPeers + parameters: + - description: The token link id of the adapter token link + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: false + in: path + name: adapterTokenLinkId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetLayerZeroPeersResponse' + description: LayerZero peers retrieved successfully + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Get LayerZero peers + tags: + - Tokenization + x-rate-limit-category: read + x-readme: + code-samples: + - language: javascript + code: const adapterTokenLinkId = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; + const peersResponse = await fireblocks.getLayerZeroPeers(adapterTokenLinkId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.getLayerZeroPeers(tokenizationApiGetLayerZeroPeersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.tokenization().getLayerZeroPeers(adapterTokenLinkId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.tokenization.get_layer_zero_peers(adapter_token_link_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.getLayerZeroPeers(tokenizationApiGetLayerZeroPeersRequest);" + - lang: Java + source: CompletableFuture> response + = fireblocks.tokenization().getLayerZeroPeers(adapterTokenLinkId); + - lang: Python + source: response = fireblocks.tokenization.get_layer_zero_peers(adapter_token_link_id); + x-accepts: application/json + /tokenization/multichain/bridge/layerzero/config/dvns: + post: + description: Configure DVN settings for LayerZero adapters. This endpoint sets + up the DVN configuration for message verification between source and destination + adapters. + operationId: setLayerZeroDvnConfig + 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/SetLayerZeroDvnConfigRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SetLayerZeroDvnConfigResponse' + description: LayerZero DVN configuration set successfully + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "409": + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link preparation + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link preparation error + "422": + content: + application/json: + example: + error: + type: NOT_FOUND + message: Bridging to the specified blockchain is not supported + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bridging protocol blockchain metadata not found + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Set LayerZero DVN configuration + tags: + - Tokenization + x-rate-limit-category: write + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + "vaultAccountId": "0", + "sourceAdapterTokenLinkId": "b70701f4-d7b1-4795-a8ee-b09cdb5b850d", + "destinationAdapterTokenLinkId": "6add4f2a-b206-4114-8f94-2882618ffbb4", + "sendConfig": { + "dvnAddresses": ["0xABCDEF123456789abcdef1234567890abcdef12345678", "0xABC123456789abcdef1234567890abcdef12345678"], + "optionalDVNAddresses": ["0xDEFABC123456789abcdef1234567890abcdef12345678"], + "optionalThreshold": 2 + }, + "receiveConfig": { + "dvnAddresses": ["0xABCDEF123456789abcdef1234567890abcdef12345678", "0xABC123456789abcdef1234567890abcdef12345678"], + "optionalThreshold": 1 + } + } const dvnConfigResponse = await fireblocks.setLayerZeroDvnConfig(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.setLayerZeroDvnConfig(tokenizationApiSetLayerZeroDvnConfigRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().setLayerZeroDvnConfig(setLayerZeroDvnConfigRequest,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.set_layer_zero_dvn_config(set_layer_zero_dvn_config_request,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.setLayerZeroDvnConfig(tokenizationApiSetLayerZeroDvnConfigRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().setLayerZeroDvnConfig(setLayerZeroDvnConfigRequest,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.set_layer_zero_dvn_config(set_layer_zero_dvn_config_request,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/dvns: + get: + description: Retrieve the DVN (Data Verification Network) configuration for + a specific adapter. Returns DVN configurations for channels between the source + adapter and its peers. + operationId: getLayerZeroDvnConfig + parameters: + - description: The token link id of the adapter token link + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: false + in: path + name: adapterTokenLinkId + required: true + schema: + format: uuid + type: string + style: simple + - description: Optional peer adapter token link ID to filter results + example: 6add4f2a-b206-4114-8f94-2882618ffbb4 + explode: true + in: query + name: peerAdapterTokenLinkId + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetLayerZeroDvnConfigResponse' + description: LayerZero DVN configuration retrieved successfully + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Get LayerZero DVN configuration + tags: + - Tokenization + x-rate-limit-category: read + x-readme: + code-samples: + - language: javascript + code: "const adapterTokenLinkId = \"b70701f4-d7b1-4795-a8ee-b09cdb5b850d\"\ + ; const peerAdapterTokenLinkId = \"6add4f2a-b206-4114-8f94-2882618ffbb4\"\ + ; // optional const dvnConfigResponse = await fireblocks.getLayerZeroDvnConfig(adapterTokenLinkId,\ + \ { peerAdapterTokenLinkId });" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.getLayerZeroDvnConfig(tokenizationApiGetLayerZeroDvnConfigRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().getLayerZeroDvnConfig(adapterTokenLinkId,\ + \ peerAdapterTokenLinkId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.get_layer_zero_dvn_config(adapter_token_link_id,\ + \ peer_adapter_token_link_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.getLayerZeroDvnConfig(tokenizationApiGetLayerZeroDvnConfigRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().getLayerZeroDvnConfig(adapterTokenLinkId,\ + \ peerAdapterTokenLinkId);" + - lang: Python + source: "response = fireblocks.tokenization.get_layer_zero_dvn_config(adapter_token_link_id,\ + \ peer_adapter_token_link_id);" + x-accepts: application/json + /tokenization/multichain/bridge/layerzero/validate: + get: + description: Validate the LayerZero channel configuration between adapters. + This endpoint checks if the channel configuration is correct and returns any + validation errors. + operationId: validateLayerZeroChannelConfig + parameters: + - description: The token link ID of the adapter + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: true + in: query + name: adapterTokenLinkId + required: true + schema: + format: uuid + type: string + style: form + - description: Peer adapter token link ID to validate against + example: 6add4f2a-b206-4114-8f94-2882618ffbb4 + explode: true + in: query + name: peerAdapterTokenLinkId + required: true + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ValidateLayerZeroChannelResponse' + description: LayerZero channel configuration validation completed + "400": + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + "404": + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + "422": + content: + application/json: + example: + error: + type: NOT_FOUND + message: Bridging to the specified blockchain is not supported + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bridging protocol blockchain metadata not found + "500": + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try + again later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + summary: Validate LayerZero channel configuration + tags: + - Tokenization + x-rate-limit-category: read + x-readme: + code-samples: + - language: javascript + code: "const adapterTokenLinkId = \"b70701f4-d7b1-4795-a8ee-b09cdb5b850d\"\ + ; const peerAdapterTokenLinkId = \"6add4f2a-b206-4114-8f94-2882618ffbb4\"\ + ; const validationResponse = await fireblocks.validateLayerZeroChannelConfig({\ + \ \n adapterTokenLinkId,\n peerAdapterTokenLinkId \n});" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.validateLayerZeroChannelConfig(tokenizationApiValidateLayerZeroChannelConfigRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.tokenization().validateLayerZeroChannelConfig(adapterTokenLinkId,\ + \ peerAdapterTokenLinkId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.validate_layer_zero_channel_config(adapter_token_link_id,\ + \ peer_adapter_token_link_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.validateLayerZeroChannelConfig(tokenizationApiValidateLayerZeroChannelConfigRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.tokenization().validateLayerZeroChannelConfig(adapterTokenLinkId,\ + \ peerAdapterTokenLinkId);" + - lang: Python + source: "response = fireblocks.tokenization.validate_layer_zero_channel_config(adapter_token_link_id,\ + \ peer_adapter_token_link_id);" + x-accepts: application/json /tokenization/collections: get: description: Get collections (paginated) @@ -24451,6 +25352,77 @@ components: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' + BadRequestError: + content: + application/json: + example: + error: + type: VALIDATION + message: Invalid input data or parameters + schema: + $ref: '#/components/schemas/ErrorResponse' + description: "Bad request, invalid input data or parameters" + OriginalTokenLinkNotFoundError: + content: + application/json: + example: + error: + type: NOT_FOUND + message: The specified token link was not found + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link not found + TokenLinkPreparationError: + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link preparation + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link preparation error + OriginalTokenLinkNotFungibleError: + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: The token link is not of fungible type + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link is not fungible + InternalServerError: + content: + application/json: + example: + error: + type: INTERNAL + message: An unexpected error occurred during execution. Please try again + later. + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal server error + TokenLinkProcessingError: + content: + application/json: + example: + error: + type: UNPROCESSABLE_ENTITY + message: An error occurred during token link processing + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Token link processing error + BridgingProtocolBlockchainMetadataNotFoundError: + content: + application/json: + example: + error: + type: NOT_FOUND + message: Bridging to the specified blockchain is not supported + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bridging protocol blockchain metadata not found schemas: ErrorSchema: example: @@ -28704,6 +29676,7 @@ components: relayId: "1" networkFee: networkFee relayName: Tenant Name + feeUSD: "0.0013" gasPrice: gasPrice paidByRelay: true properties: @@ -28736,6 +29709,10 @@ components: description: "The name of the tenant, only for THIRD_PARTY relays" example: Tenant Name type: string + feeUSD: + description: The USD value of the fee + example: "0.0013" + type: string type: object RewardInfo: description: "This field is relevant only for Algorand transactions. Both `srcRewards`\ @@ -29111,6 +30088,7 @@ components: relayId: "1" networkFee: networkFee relayName: Tenant Name + feeUSD: "0.0013" gasPrice: gasPrice paidByRelay: true assetId: assetId @@ -40430,6 +41408,537 @@ components: - code - message type: object + LayerZeroAdapterCreateParams: + example: + pauserAddress: 0xDEFABC123456789abcdef1234567890abcdef12345678 + defaultAdminAddress: 0xABC123456789abcdef1234567890abcdef12345678 + delegateAddress: 0xABCDEF123456789abcdef1234567890abcdef12345678 + tokenLinkId: 123-432-1234-1234-123456789012 + properties: + tokenLinkId: + description: The token link id of the base token to deploy the adapters + for + example: 123-432-1234-1234-123456789012 + type: string + delegateAddress: + description: Address that will receive `CONTRACT_ADMIN_ROLE`. + example: 0xABCDEF123456789abcdef1234567890abcdef12345678 + type: string + defaultAdminAddress: + description: Address that will receive `DEFAULT_ADMIN_ROLE` on the adapter + contract. + example: 0xABC123456789abcdef1234567890abcdef12345678 + type: string + pauserAddress: + description: Address that will receive `PAUSER_ROLE`. + example: 0xDEFABC123456789abcdef1234567890abcdef12345678 + type: string + required: + - defaultAdminAddress + - delegateAddress + - pauserAddress + - tokenLinkId + type: object + DeployLayerZeroAdaptersRequest: + example: + salt: "123456789" + displayName: LayerZero Adapter + useGasless: false + fee: "2000" + vaultAccountId: "0" + feeLevel: MEDIUM + createParams: + - pauserAddress: 0xDEFABC123456789abcdef1234567890abcdef12345678 + defaultAdminAddress: 0xABC123456789abcdef1234567890abcdef12345678 + delegateAddress: 0xABCDEF123456789abcdef1234567890abcdef12345678 + tokenLinkId: 123-432-1234-1234-123456789012 + - pauserAddress: 0xDEFABC123456789abcdef1234567890abcdef12345678 + defaultAdminAddress: 0xABC123456789abcdef1234567890abcdef12345678 + delegateAddress: 0xABCDEF123456789abcdef1234567890abcdef12345678 + tokenLinkId: 123-432-1234-1234-123456789012 + properties: + vaultAccountId: + description: The id of the vault account that initiated the request to deploy + adapter for the token + example: "0" + type: string + createParams: + description: "Array of creation parameters for LayerZero adapters, one per\ + \ tokenLink." + items: + $ref: '#/components/schemas/LayerZeroAdapterCreateParams' + minItems: 1 + type: array + displayName: + description: The display name of the contract + example: LayerZero Adapter + type: string + useGasless: + description: Whether to use gasless deployment or not + example: false + type: boolean + feeLevel: + description: Fee level for the write function transaction. interchangeable + with the 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + fee: + description: Max fee amount for the write function transaction. interchangeable + with the 'feeLevel' field + example: "2000" + type: string + salt: + description: "The salt to calculate the deterministic address. Must be a\ + \ number between 0 and 2^256 -1, for it to fit in the bytes32 parameter" + example: "123456789" + type: string + required: + - createParams + - vaultAccountId + type: object + AdapterProcessingResult: + example: + inputTokenLinkId: inputTokenLinkId + adapterLinkId: adapterLinkId + properties: + inputTokenLinkId: + description: The input token link ID + type: string + adapterLinkId: + description: The adapter link ID + type: string + required: + - adapterLinkId + - inputTokenLinkId + type: object + DeployLayerZeroAdaptersResponse: + description: Array of adapter processing results + items: + $ref: '#/components/schemas/AdapterProcessingResult' + type: array + RemoveLayerZeroAdaptersRequest: + example: + adapterTokenLinkIds: + - d290f1ee-6c54-4b01-90e6-d701748f0851 + - e290f1ee-6c54-4b01-90e6-d701748f0852 + vaultAccountId: "1" + properties: + vaultAccountId: + description: The vault account ID to use for signing the role revocation + transactions. + example: "1" + type: string + adapterTokenLinkIds: + description: A list of adapter token link IDs to be deactivated and unlinked. + example: + - d290f1ee-6c54-4b01-90e6-d701748f0851 + - e290f1ee-6c54-4b01-90e6-d701748f0852 + items: + format: uuid + type: string + minItems: 1 + type: array + required: + - adapterTokenLinkIds + - vaultAccountId + type: object + RemoveLayerZeroAdapterFailedResult: + example: + adapterTokenLinkId: adapterTokenLinkId + properties: + adapterTokenLinkId: + description: The adapter token link ID that failed to be removed + type: string + required: + - adapterTokenLinkId + type: object + RemoveLayerZeroAdaptersResponse: + example: + failed: + - adapterTokenLinkId: adapterTokenLinkId + - adapterTokenLinkId: adapterTokenLinkId + deactivated: + - deactivated + - deactivated + properties: + deactivated: + description: List of successfully deactivated adapter token link IDs + items: + type: string + type: array + failed: + description: List of adapter token link IDs that failed to be removed + items: + $ref: '#/components/schemas/RemoveLayerZeroAdapterFailedResult' + type: array + required: + - deactivated + - failed + type: object + SetLayerZeroPeersRequest: + example: + bidirectional: true + destinationAdapterTokenLinkIds: + - 123-432-1234-1234-123456789012 + - 123-432-1234-1234-123456789012 + vaultAccountId: "0" + sourceAdapterTokenLinkId: 00000123-0432-1234-1234-123456789012 + properties: + vaultAccountId: + description: The id of the vault account that will be used to inititate + transactions ot set peers + example: "0" + type: string + sourceAdapterTokenLinkId: + description: '`token_link` ID of the source adapter contract' + example: 00000123-0432-1234-1234-123456789012 + format: uuid + type: string + destinationAdapterTokenLinkIds: + description: Array of `token_link` IDs for destination adapter contracts + example: + - 123-432-1234-1234-123456789012 + - 123-432-1234-1234-123456789012 + items: + format: uuid + type: string + minItems: 1 + type: array + bidirectional: + description: "If true, also sets peers from destination(s) back to source" + example: true + type: boolean + required: + - bidirectional + - destinationAdapterTokenLinkIds + - sourceAdapterTokenLinkId + - vaultAccountId + type: object + SetLayerZeroPeersResponse: + example: + txnIds: + - 123-432-1234-1234-123456789012 + - 123-432-1234-1234-123456789012 + properties: + txnIds: + description: "Array of fireblocks transaction IDs, each corresponding to\ + \ an on-chain transaction to set peers" + example: + - 123-432-1234-1234-123456789012 + - 123-432-1234-1234-123456789012 + items: + format: uuid + type: string + minItems: 1 + type: array + required: + - txnIds + type: object + RemoveLayerZeroPeersRequest: + allOf: + - $ref: '#/components/schemas/SetLayerZeroPeersRequest' + example: + bidirectional: true + destinationAdapterTokenLinkIds: + - 123-432-1234-1234-123456789012 + - 123-432-1234-1234-123456789012 + vaultAccountId: "0" + sourceAdapterTokenLinkId: 00000123-0432-1234-1234-123456789012 + RemoveLayerZeroPeersResponse: + allOf: + - $ref: '#/components/schemas/SetLayerZeroPeersResponse' + example: + txnIds: + - 123-432-1234-1234-123456789012 + - 123-432-1234-1234-123456789012 + PeerAdapterInfo: + properties: + adapterTokenLinkId: + description: The token link id of the adapter + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + format: uuid + type: string + adapterAddress: + description: The adapter address + example: 0x1234567890abcdef1234567890abcdef12345678 + type: string + baseAssetId: + description: The base asset id for the base asset that the adapter is deployed + on + example: ETH_TEST6 + type: string + required: + - adapterAddress + - adapterTokenLinkId + - baseAssetId + type: object + GetLayerZeroPeersResponse: + example: + adapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + adapterAddress: 0x1234567890abcdef1234567890abcdef12345678 + peers: + - adapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + adapterAddress: 0x1234567890abcdef1234567890abcdef12345678 + baseAssetId: ETH_TEST6 + - adapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + adapterAddress: 0x1234567890abcdef1234567890abcdef12345678 + baseAssetId: ETH_TEST5 + properties: + adapterTokenLinkId: + description: The token link id of the adapter + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + format: uuid + type: string + adapterAddress: + description: The adapter address + example: 0x1234567890abcdef1234567890abcdef12345678 + type: string + peers: + description: The peers for the adapter + example: + - adapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + adapterAddress: 0x1234567890abcdef1234567890abcdef12345678 + baseAssetId: ETH_TEST6 + - adapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + adapterAddress: 0x1234567890abcdef1234567890abcdef12345678 + baseAssetId: ETH_TEST5 + items: + $ref: '#/components/schemas/PeerAdapterInfo' + type: array + required: + - adapterAddress + - adapterTokenLinkId + - peers + type: object + DvnConfig: + example: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + optionalDVNAddresses: + - 1.334824162533763E54 + properties: + dvnAddresses: + description: Array of required DVN Ethereum addresses that sign ULN messages. + example: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + items: + type: string + minItems: 1 + type: array + optionalDVNAddresses: + description: Array of optional DVN Ethereum addresses that sign ULN messages. + example: + - 1.334824162533763E54 + items: + type: string + type: array + optionalThreshold: + description: Minimum number of DVN signatures required (M-of-N). + example: 2 + type: number + required: + - dvnAddresses + - optionalThreshold + type: object + SetLayerZeroDvnConfigRequest: + example: + sendConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + optionalDVNAddresses: + - 1.334824162533763E54 + vaultAccountId: "0" + sourceAdapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + receiveConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + optionalDVNAddresses: + - 1.334824162533763E54 + destinationAdapterTokenLinkId: 6add4f2a-b206-4114-8f94-2882618ffbb4 + properties: + vaultAccountId: + description: Vault account that pays gas + example: "0" + type: string + sourceAdapterTokenLinkId: + description: Source adapter TokenLink ID + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + destinationAdapterTokenLinkId: + description: Destination adapter TokenLink ID + example: 6add4f2a-b206-4114-8f94-2882618ffbb4 + type: string + sendConfig: + $ref: '#/components/schemas/DvnConfig' + receiveConfig: + $ref: '#/components/schemas/DvnConfig' + required: + - destinationAdapterTokenLinkId + - receiveConfig + - sendConfig + - sourceAdapterTokenLinkId + - vaultAccountId + type: object + SetLayerZeroDvnConfigResponse: + example: + txnIds: + - txnIds + - txnIds + properties: + txnIds: + description: Transaction IDs submitted to the network + items: + type: string + type: array + required: + - txnIds + type: object + DvnConfigWithConfirmations: + properties: + dvnAddresses: + description: Array of required DVN Ethereum addresses that sign ULN messages. + example: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + items: + type: string + minItems: 1 + type: array + optionalDVNAddresses: + description: Array of optional DVN Ethereum addresses that sign ULN messages. + example: + - 1.334824162533763E54 + items: + type: string + type: array + optionalThreshold: + description: Minimum number of DVN signatures required (M-of-N). + example: 2 + type: number + confirmations: + description: Number of block confirmations required + example: 12 + type: number + required: + - confirmations + - dvnAddresses + - optionalThreshold + type: object + ChannelDvnConfigWithConfirmations: + example: + sendConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + receiveConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + properties: + sendConfig: + $ref: '#/components/schemas/ChannelDvnConfigWithConfirmations_sendConfig' + receiveConfig: + $ref: '#/components/schemas/ChannelDvnConfigWithConfirmations_receiveConfig' + type: object + GetLayerZeroDvnConfigResponse: + example: + channelConfigs: + - sendConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + receiveConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + - sendConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + receiveConfig: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + sourceAdapterTokenLinkId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + properties: + sourceAdapterTokenLinkId: + description: Token-link ID of the adapter for which DVN configuration was + queried. + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + format: uuid + type: string + channelConfigs: + description: DVN configurations for each discovered (or explicitly requested) + channel between the source adapter and its peers. + items: + $ref: '#/components/schemas/ChannelDvnConfigWithConfirmations' + minItems: 1 + type: array + required: + - channelConfigs + - sourceAdapterTokenLinkId + type: object + ValidateLayerZeroChannelResponse: + example: + correct: true + errors: + - Adapter not found + - Adapter missing role + - Adapter is not a peer + properties: + correct: + description: Indicates whether the LayerZero channel configuration is valid. + example: true + type: boolean + errors: + description: List of errors found during validation. An empty array indicates + no errors. + example: + - Adapter not found + - Adapter missing role + - Adapter is not a peer + items: + type: string + type: array + required: + - correct + - errors + type: object CollectionType: description: The type of collection enum: @@ -51910,6 +53419,30 @@ components: CreateMultichainTokenRequest_createParams: oneOf: - $ref: '#/components/schemas/EVMTokenCreateParamsDto' + ChannelDvnConfigWithConfirmations_sendConfig: + allOf: + - $ref: '#/components/schemas/DvnConfigWithConfirmations' + - description: Outbound (source → peer) DVN config with confirmations. + example: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 + ChannelDvnConfigWithConfirmations_receiveConfig: + allOf: + - $ref: '#/components/schemas/DvnConfigWithConfirmations' + - description: Inbound (peer → source) DVN config with confirmations. + example: + optionalThreshold: 2 + dvnAddresses: + - 1.0284746938594775E54 + - 2.5101940177441514E50 + confirmations: 12 + optionalDVNAddresses: + - 1.334824162533763E54 ContractAbiResponseDto_abi_inner: oneOf: - $ref: '#/components/schemas/AbiFunction' diff --git a/build.gradle b/build.gradle index ca5b4cde..358eefb7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '11.1.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AdapterProcessingResult.md b/docs/AdapterProcessingResult.md new file mode 100644 index 00000000..7122c74a --- /dev/null +++ b/docs/AdapterProcessingResult.md @@ -0,0 +1,14 @@ + + +# AdapterProcessingResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**inputTokenLinkId** | **String** | The input token link ID | | +|**adapterLinkId** | **String** | The adapter link ID | | + + + diff --git a/docs/ChannelDvnConfigWithConfirmations.md b/docs/ChannelDvnConfigWithConfirmations.md new file mode 100644 index 00000000..f9f9495a --- /dev/null +++ b/docs/ChannelDvnConfigWithConfirmations.md @@ -0,0 +1,14 @@ + + +# ChannelDvnConfigWithConfirmations + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sendConfig** | [**ChannelDvnConfigWithConfirmationsSendConfig**](ChannelDvnConfigWithConfirmationsSendConfig.md) | | [optional] | +|**receiveConfig** | [**ChannelDvnConfigWithConfirmationsReceiveConfig**](ChannelDvnConfigWithConfirmationsReceiveConfig.md) | | [optional] | + + + diff --git a/docs/ChannelDvnConfigWithConfirmationsReceiveConfig.md b/docs/ChannelDvnConfigWithConfirmationsReceiveConfig.md new file mode 100644 index 00000000..c31e4195 --- /dev/null +++ b/docs/ChannelDvnConfigWithConfirmationsReceiveConfig.md @@ -0,0 +1,16 @@ + + +# ChannelDvnConfigWithConfirmationsReceiveConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dvnAddresses** | **List<String>** | Array of required DVN Ethereum addresses that sign ULN messages. | | +|**optionalDVNAddresses** | **List<String>** | Array of optional DVN Ethereum addresses that sign ULN messages. | [optional] | +|**optionalThreshold** | **BigDecimal** | Minimum number of DVN signatures required (M-of-N). | | +|**confirmations** | **BigDecimal** | Number of block confirmations required | | + + + diff --git a/docs/ChannelDvnConfigWithConfirmationsSendConfig.md b/docs/ChannelDvnConfigWithConfirmationsSendConfig.md new file mode 100644 index 00000000..4ec74ffc --- /dev/null +++ b/docs/ChannelDvnConfigWithConfirmationsSendConfig.md @@ -0,0 +1,16 @@ + + +# ChannelDvnConfigWithConfirmationsSendConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dvnAddresses** | **List<String>** | Array of required DVN Ethereum addresses that sign ULN messages. | | +|**optionalDVNAddresses** | **List<String>** | Array of optional DVN Ethereum addresses that sign ULN messages. | [optional] | +|**optionalThreshold** | **BigDecimal** | Minimum number of DVN signatures required (M-of-N). | | +|**confirmations** | **BigDecimal** | Number of block confirmations required | | + + + diff --git a/docs/DeployLayerZeroAdaptersRequest.md b/docs/DeployLayerZeroAdaptersRequest.md new file mode 100644 index 00000000..19f51ba2 --- /dev/null +++ b/docs/DeployLayerZeroAdaptersRequest.md @@ -0,0 +1,29 @@ + + +# DeployLayerZeroAdaptersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to deploy adapter for the token | | +|**createParams** | [**List<LayerZeroAdapterCreateParams>**](LayerZeroAdapterCreateParams.md) | Array of creation parameters for LayerZero adapters, one per tokenLink. | | +|**displayName** | **String** | The display name of the contract | [optional] | +|**useGasless** | **Boolean** | Whether to use gasless deployment or not | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | +|**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | +|**salt** | **String** | The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for it to fit in the bytes32 parameter | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/DvnConfig.md b/docs/DvnConfig.md new file mode 100644 index 00000000..5fddde54 --- /dev/null +++ b/docs/DvnConfig.md @@ -0,0 +1,15 @@ + + +# DvnConfig + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dvnAddresses** | **List<String>** | Array of required DVN Ethereum addresses that sign ULN messages. | | +|**optionalDVNAddresses** | **List<String>** | Array of optional DVN Ethereum addresses that sign ULN messages. | [optional] | +|**optionalThreshold** | **BigDecimal** | Minimum number of DVN signatures required (M-of-N). | | + + + diff --git a/docs/DvnConfigWithConfirmations.md b/docs/DvnConfigWithConfirmations.md new file mode 100644 index 00000000..f575304a --- /dev/null +++ b/docs/DvnConfigWithConfirmations.md @@ -0,0 +1,16 @@ + + +# DvnConfigWithConfirmations + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dvnAddresses** | **List<String>** | Array of required DVN Ethereum addresses that sign ULN messages. | | +|**optionalDVNAddresses** | **List<String>** | Array of optional DVN Ethereum addresses that sign ULN messages. | [optional] | +|**optionalThreshold** | **BigDecimal** | Minimum number of DVN signatures required (M-of-N). | | +|**confirmations** | **BigDecimal** | Number of block confirmations required | | + + + diff --git a/docs/FeeInfo.md b/docs/FeeInfo.md index c5b0c102..bbbbbf8c 100644 --- a/docs/FeeInfo.md +++ b/docs/FeeInfo.md @@ -15,6 +15,7 @@ Details of the transaction's fee. |**relayType** | [**RelayTypeEnum**](#RelayTypeEnum) | Wether the relay is the same tenant (LOCAL) or another tenant (THIRD_PARTY) | [optional] | |**relayId** | **String** | The vault account ID of the relay | [optional] | |**relayName** | **String** | The name of the tenant, only for THIRD_PARTY relays | [optional] | +|**feeUSD** | **String** | The USD value of the fee | [optional] | diff --git a/docs/GetLayerZeroDvnConfigResponse.md b/docs/GetLayerZeroDvnConfigResponse.md new file mode 100644 index 00000000..4ad9fade --- /dev/null +++ b/docs/GetLayerZeroDvnConfigResponse.md @@ -0,0 +1,14 @@ + + +# GetLayerZeroDvnConfigResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sourceAdapterTokenLinkId** | **UUID** | Token-link ID of the adapter for which DVN configuration was queried. | | +|**channelConfigs** | [**List<ChannelDvnConfigWithConfirmations>**](ChannelDvnConfigWithConfirmations.md) | DVN configurations for each discovered (or explicitly requested) channel between the source adapter and its peers. | | + + + diff --git a/docs/GetLayerZeroPeersResponse.md b/docs/GetLayerZeroPeersResponse.md new file mode 100644 index 00000000..6f7897ca --- /dev/null +++ b/docs/GetLayerZeroPeersResponse.md @@ -0,0 +1,15 @@ + + +# GetLayerZeroPeersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**adapterTokenLinkId** | **UUID** | The token link id of the adapter | | +|**adapterAddress** | **String** | The adapter address | | +|**peers** | [**List<PeerAdapterInfo>**](PeerAdapterInfo.md) | The peers for the adapter | | + + + diff --git a/docs/LayerZeroAdapterCreateParams.md b/docs/LayerZeroAdapterCreateParams.md new file mode 100644 index 00000000..e3f8a357 --- /dev/null +++ b/docs/LayerZeroAdapterCreateParams.md @@ -0,0 +1,16 @@ + + +# LayerZeroAdapterCreateParams + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tokenLinkId** | **String** | The token link id of the base token to deploy the adapters for | | +|**delegateAddress** | **String** | Address that will receive `CONTRACT_ADMIN_ROLE`. | | +|**defaultAdminAddress** | **String** | Address that will receive `DEFAULT_ADMIN_ROLE` on the adapter contract. | | +|**pauserAddress** | **String** | Address that will receive `PAUSER_ROLE`. | | + + + diff --git a/docs/PeerAdapterInfo.md b/docs/PeerAdapterInfo.md new file mode 100644 index 00000000..39e8e8bb --- /dev/null +++ b/docs/PeerAdapterInfo.md @@ -0,0 +1,15 @@ + + +# PeerAdapterInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**adapterTokenLinkId** | **UUID** | The token link id of the adapter | | +|**adapterAddress** | **String** | The adapter address | | +|**baseAssetId** | **String** | The base asset id for the base asset that the adapter is deployed on | | + + + diff --git a/docs/RemoveLayerZeroAdapterFailedResult.md b/docs/RemoveLayerZeroAdapterFailedResult.md new file mode 100644 index 00000000..ad899251 --- /dev/null +++ b/docs/RemoveLayerZeroAdapterFailedResult.md @@ -0,0 +1,13 @@ + + +# RemoveLayerZeroAdapterFailedResult + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**adapterTokenLinkId** | **String** | The adapter token link ID that failed to be removed | | + + + diff --git a/docs/RemoveLayerZeroAdaptersRequest.md b/docs/RemoveLayerZeroAdaptersRequest.md new file mode 100644 index 00000000..3b2ab4e5 --- /dev/null +++ b/docs/RemoveLayerZeroAdaptersRequest.md @@ -0,0 +1,14 @@ + + +# RemoveLayerZeroAdaptersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account ID to use for signing the role revocation transactions. | | +|**adapterTokenLinkIds** | **List<UUID>** | A list of adapter token link IDs to be deactivated and unlinked. | | + + + diff --git a/docs/RemoveLayerZeroAdaptersResponse.md b/docs/RemoveLayerZeroAdaptersResponse.md new file mode 100644 index 00000000..5a138e7a --- /dev/null +++ b/docs/RemoveLayerZeroAdaptersResponse.md @@ -0,0 +1,14 @@ + + +# RemoveLayerZeroAdaptersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deactivated** | **List<String>** | List of successfully deactivated adapter token link IDs | | +|**failed** | [**List<RemoveLayerZeroAdapterFailedResult>**](RemoveLayerZeroAdapterFailedResult.md) | List of adapter token link IDs that failed to be removed | | + + + diff --git a/docs/RemoveLayerZeroPeersRequest.md b/docs/RemoveLayerZeroPeersRequest.md new file mode 100644 index 00000000..47015996 --- /dev/null +++ b/docs/RemoveLayerZeroPeersRequest.md @@ -0,0 +1,16 @@ + + +# RemoveLayerZeroPeersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that will be used to inititate transactions ot set peers | | +|**sourceAdapterTokenLinkId** | **UUID** | `token_link` ID of the source adapter contract | | +|**destinationAdapterTokenLinkIds** | **List<UUID>** | Array of `token_link` IDs for destination adapter contracts | | +|**bidirectional** | **Boolean** | If true, also sets peers from destination(s) back to source | | + + + diff --git a/docs/RemoveLayerZeroPeersResponse.md b/docs/RemoveLayerZeroPeersResponse.md new file mode 100644 index 00000000..91a9aa37 --- /dev/null +++ b/docs/RemoveLayerZeroPeersResponse.md @@ -0,0 +1,13 @@ + + +# RemoveLayerZeroPeersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txnIds** | **List<UUID>** | Array of fireblocks transaction IDs, each corresponding to an on-chain transaction to set peers | | + + + diff --git a/docs/SetLayerZeroDvnConfigRequest.md b/docs/SetLayerZeroDvnConfigRequest.md new file mode 100644 index 00000000..e686c75b --- /dev/null +++ b/docs/SetLayerZeroDvnConfigRequest.md @@ -0,0 +1,17 @@ + + +# SetLayerZeroDvnConfigRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | Vault account that pays gas | | +|**sourceAdapterTokenLinkId** | **String** | Source adapter TokenLink ID | | +|**destinationAdapterTokenLinkId** | **String** | Destination adapter TokenLink ID | | +|**sendConfig** | [**DvnConfig**](DvnConfig.md) | | | +|**receiveConfig** | [**DvnConfig**](DvnConfig.md) | | | + + + diff --git a/docs/SetLayerZeroDvnConfigResponse.md b/docs/SetLayerZeroDvnConfigResponse.md new file mode 100644 index 00000000..152c6b19 --- /dev/null +++ b/docs/SetLayerZeroDvnConfigResponse.md @@ -0,0 +1,13 @@ + + +# SetLayerZeroDvnConfigResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txnIds** | **List<String>** | Transaction IDs submitted to the network | | + + + diff --git a/docs/SetLayerZeroPeersRequest.md b/docs/SetLayerZeroPeersRequest.md new file mode 100644 index 00000000..034eab08 --- /dev/null +++ b/docs/SetLayerZeroPeersRequest.md @@ -0,0 +1,16 @@ + + +# SetLayerZeroPeersRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that will be used to inititate transactions ot set peers | | +|**sourceAdapterTokenLinkId** | **UUID** | `token_link` ID of the source adapter contract | | +|**destinationAdapterTokenLinkIds** | **List<UUID>** | Array of `token_link` IDs for destination adapter contracts | | +|**bidirectional** | **Boolean** | If true, also sets peers from destination(s) back to source | | + + + diff --git a/docs/SetLayerZeroPeersResponse.md b/docs/SetLayerZeroPeersResponse.md new file mode 100644 index 00000000..5b3674ee --- /dev/null +++ b/docs/SetLayerZeroPeersResponse.md @@ -0,0 +1,13 @@ + + +# SetLayerZeroPeersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txnIds** | **List<UUID>** | Array of fireblocks transaction IDs, each corresponding to an on-chain transaction to set peers | | + + + diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md index eb813969..41d78183 100644 --- a/docs/TokenizationApi.md +++ b/docs/TokenizationApi.md @@ -6,9 +6,13 @@ All URIs are relative to https://developers.fireblocks.com/reference/ |------------- | ------------- | -------------| | [**burnCollectionToken**](TokenizationApi.md#burnCollectionToken) | **POST** /tokenization/collections/{id}/tokens/burn | Burn tokens | | [**createNewCollection**](TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection | +| [**deactivateAndUnlinkAdapters**](TokenizationApi.md#deactivateAndUnlinkAdapters) | **DELETE** /tokenization/multichain/bridge/layerzero | Remove LayerZero adapters | +| [**deployAndLinkAdapters**](TokenizationApi.md#deployAndLinkAdapters) | **POST** /tokenization/multichain/bridge/layerzero | Deploy LayerZero adapters | | [**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 | | [**getDeployableAddress**](TokenizationApi.md#getDeployableAddress) | **POST** /tokenization/multichain/deterministic_address | Get deterministic address for contract deployment | +| [**getLayerZeroDvnConfig**](TokenizationApi.md#getLayerZeroDvnConfig) | **GET** /tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/dvns | Get LayerZero DVN configuration | +| [**getLayerZeroPeers**](TokenizationApi.md#getLayerZeroPeers) | **GET** /tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/peers | Get LayerZero peers | | [**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 | @@ -17,8 +21,12 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**link**](TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a contract | | [**mintCollectionToken**](TokenizationApi.md#mintCollectionToken) | **POST** /tokenization/collections/{id}/tokens/mint | Mint tokens | | [**reIssueTokenMultiChain**](TokenizationApi.md#reIssueTokenMultiChain) | **POST** /tokenization/multichain/reissue/token/{tokenLinkId} | Reissue a multichain token | +| [**removeLayerZeroPeers**](TokenizationApi.md#removeLayerZeroPeers) | **DELETE** /tokenization/multichain/bridge/layerzero/config/peers | Remove LayerZero peers | +| [**setLayerZeroDvnConfig**](TokenizationApi.md#setLayerZeroDvnConfig) | **POST** /tokenization/multichain/bridge/layerzero/config/dvns | Set LayerZero DVN configuration | +| [**setLayerZeroPeers**](TokenizationApi.md#setLayerZeroPeers) | **POST** /tokenization/multichain/bridge/layerzero/config/peers | Set LayerZero peers | | [**unlink**](TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token | | [**unlinkCollection**](TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link | +| [**validateLayerZeroChannelConfig**](TokenizationApi.md#validateLayerZeroChannelConfig) | **GET** /tokenization/multichain/bridge/layerzero/validate | Validate LayerZero channel configuration | @@ -194,6 +202,183 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## deactivateAndUnlinkAdapters + +> CompletableFuture> deactivateAndUnlinkAdapters deactivateAndUnlinkAdapters(removeLayerZeroAdaptersRequest, idempotencyKey) + +Remove LayerZero adapters + +Remove LayerZero adapters by deactivating and unlinking them. This endpoint revokes roles and deactivates the specified adapter contracts. + +### 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); + + RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest = new RemoveLayerZeroAdaptersRequest(); // RemoveLayerZeroAdaptersRequest | + 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().deactivateAndUnlinkAdapters(removeLayerZeroAdaptersRequest, 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#deactivateAndUnlinkAdapters"); + 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#deactivateAndUnlinkAdapters"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **removeLayerZeroAdaptersRequest** | [**RemoveLayerZeroAdaptersRequest**](RemoveLayerZeroAdaptersRequest.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** | LayerZero adapters removal process completed | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **409** | Token link processing error | - | +| **500** | Internal server error | - | + + +## deployAndLinkAdapters + +> CompletableFuture>> deployAndLinkAdapters deployAndLinkAdapters(deployLayerZeroAdaptersRequest, idempotencyKey) + +Deploy LayerZero adapters + +Deploy LayerZero adapters for multichain token bridging functionality. This endpoint creates adapter contracts that enable cross-chain token transfers. + +### 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); + + DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest = new DeployLayerZeroAdaptersRequest(); // DeployLayerZeroAdaptersRequest | + 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().deployAndLinkAdapters(deployLayerZeroAdaptersRequest, 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#deployAndLinkAdapters"); + 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#deployAndLinkAdapters"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **deployLayerZeroAdaptersRequest** | [**DeployLayerZeroAdaptersRequest**](DeployLayerZeroAdaptersRequest.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** | LayerZero adapters deployed successfully | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **409** | Token link preparation error | - | +| **422** | Token link is not fungible | - | +| **500** | Internal server error | - | + + ## fetchCollectionTokenDetails > CompletableFuture> fetchCollectionTokenDetails fetchCollectionTokenDetails(id, tokenId) @@ -362,13 +547,529 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| -## getDeployableAddress +## getDeployableAddress + +> CompletableFuture> getDeployableAddress getDeployableAddress(getDeployableAddressRequest, idempotencyKey) + +Get deterministic address for contract deployment + +Get a deterministic address for contract deployment. The address is derived from the contract's bytecode and provided salt. This endpoint is used to get the address of a contract that will be deployed in the future. + +### 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); + + GetDeployableAddressRequest getDeployableAddressRequest = new GetDeployableAddressRequest(); // GetDeployableAddressRequest | + 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().getDeployableAddress(getDeployableAddressRequest, 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#getDeployableAddress"); + 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#getDeployableAddress"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **getDeployableAddressRequest** | [**GetDeployableAddressRequest**](GetDeployableAddressRequest.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** | Deterministic address for contract deployment | - | +| **400** | Invalid parameters or template has no bytecode | - | +| **409** | Address is already taken | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getLayerZeroDvnConfig + +> CompletableFuture> getLayerZeroDvnConfig getLayerZeroDvnConfig(adapterTokenLinkId, peerAdapterTokenLinkId) + +Get LayerZero DVN configuration + +Retrieve the DVN (Data Verification Network) configuration for a specific adapter. Returns DVN configurations for channels between the source adapter and its peers. + +### 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); + + UUID adapterTokenLinkId = UUID.fromString("b70701f4-d7b1-4795-a8ee-b09cdb5b850d"); // UUID | The token link id of the adapter token link + UUID peerAdapterTokenLinkId = UUID.fromString("6add4f2a-b206-4114-8f94-2882618ffbb4"); // UUID | Optional peer adapter token link ID to filter results + try { + CompletableFuture> response = fireblocks.tokenization().getLayerZeroDvnConfig(adapterTokenLinkId, peerAdapterTokenLinkId); + 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#getLayerZeroDvnConfig"); + 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#getLayerZeroDvnConfig"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **adapterTokenLinkId** | **UUID**| The token link id of the adapter token link | | +| **peerAdapterTokenLinkId** | **UUID**| Optional peer adapter token link ID to filter results | [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** | LayerZero DVN configuration retrieved successfully | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **500** | Internal server error | - | + + +## getLayerZeroPeers + +> CompletableFuture> getLayerZeroPeers getLayerZeroPeers(adapterTokenLinkId) + +Get LayerZero peers + +Retrieve the LayerZero peers configured for a specific adapter. Returns information about peer relationships for cross-chain communication. + +### 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); + + UUID adapterTokenLinkId = UUID.fromString("b70701f4-d7b1-4795-a8ee-b09cdb5b850d"); // UUID | The token link id of the adapter token link + try { + CompletableFuture> response = fireblocks.tokenization().getLayerZeroPeers(adapterTokenLinkId); + 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#getLayerZeroPeers"); + 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#getLayerZeroPeers"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **adapterTokenLinkId** | **UUID**| The token link id of the adapter token link | | + +### 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** | LayerZero peers retrieved successfully | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **500** | Internal server error | - | + + +## 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) + +Return a linked token + +Return a linked token, with its status and 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); + + String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + try { + CompletableFuture> response = fireblocks.tokenization().getLinkedToken(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#getLinkedToken"); + 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#getLinkedToken"); + 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** | Token fetched successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getLinkedTokens + +> CompletableFuture> getLinkedTokens getLinkedTokens(pageCursor, pageSize, status) + +List all linked tokens + +Return all linked tokens (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 = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items per page, requesting more then max will return max items + Object status = COMPLETED; // Object | A comma separated list of statuses to filter. Default is \"COMPLETED\" + try { + CompletableFuture> response = fireblocks.tokenization().getLinkedTokens(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#getLinkedTokens"); + 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#getLinkedTokens"); + 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 | [optional] | +| **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | +| **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** | | - | +| **0** | Error Response | * X-Request-ID -
| + + +## issueNewToken -> CompletableFuture> getDeployableAddress getDeployableAddress(getDeployableAddressRequest, idempotencyKey) +> CompletableFuture> issueNewToken issueNewToken(createTokenRequestDto, idempotencyKey) -Get deterministic address for contract deployment +Issue a new token -Get a deterministic address for contract deployment. The address is derived from the contract's bytecode and provided salt. This endpoint is used to get the address of a contract that will be deployed in the future. +Facilitates the creation of a new token, supporting both EVM-based and Stellar/Ripple platforms. For EVM, it deploys the corresponding contract template to the blockchain and links the token to the workspace. For Stellar/Ripple, it links a newly created token directly to the workspace without deploying a contract. Returns the token link with status \"PENDING\" until the token is deployed or \"SUCCESS\" if no deployment is needed. ### Example @@ -393,22 +1094,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - GetDeployableAddressRequest getDeployableAddressRequest = new GetDeployableAddressRequest(); // GetDeployableAddressRequest | + CreateTokenRequestDto createTokenRequestDto = new CreateTokenRequestDto(); // CreateTokenRequestDto | 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().getDeployableAddress(getDeployableAddressRequest, idempotencyKey); + CompletableFuture> response = fireblocks.tokenization().issueNewToken(createTokenRequestDto, 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#getDeployableAddress"); + System.err.println("Exception when calling TokenizationApi#issueNewToken"); 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#getDeployableAddress"); + System.err.println("Exception when calling TokenizationApi#issueNewToken"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -423,12 +1124,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **getDeployableAddressRequest** | [**GetDeployableAddressRequest**](GetDeployableAddressRequest.md)| | | +| **createTokenRequestDto** | [**CreateTokenRequestDto**](CreateTokenRequestDto.md)| | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -443,19 +1144,17 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Deterministic address for contract deployment | - | -| **400** | Invalid parameters or template has no bytecode | - | -| **409** | Address is already taken | - | -| **0** | Error Response | * X-Request-ID -
| +| **201** | Token was created successfully | - | +| **409** | Asset already exists | - | -## getLinkedCollections +## issueTokenMultiChain -> CompletableFuture> getLinkedCollections getLinkedCollections(pageCursor, pageSize, status) +> CompletableFuture>> issueTokenMultiChain issueTokenMultiChain(createMultichainTokenRequest, idempotencyKey) -Get collections +Issue a token on one or more blockchains -Get collections (paginated) +Facilitates the creation of a new token on one or more blockchains. ### Example @@ -480,23 +1179,22 @@ public class Example { .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\" + CreateMultichainTokenRequest createMultichainTokenRequest = new CreateMultichainTokenRequest(); // CreateMultichainTokenRequest | + 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().getLinkedCollections(pageCursor, pageSize, status); + CompletableFuture>> response = fireblocks.tokenization().issueTokenMultiChain(createMultichainTokenRequest, 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#getLinkedCollections"); + System.err.println("Exception when calling TokenizationApi#issueTokenMultiChain"); 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("Exception when calling TokenizationApi#issueTokenMultiChain"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -511,13 +1209,12 @@ public class Example { | 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] | +| **createMultichainTokenRequest** | [**CreateMultichainTokenRequest**](CreateMultichainTokenRequest.md)| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -526,23 +1223,24 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Collection fetched successfully | - | -| **0** | Error Response | * X-Request-ID -
| +| **201** | Tokens were created successfully | - | +| **400** | Invalid input. | - | +| **409** | Address is already taken. | - | -## getLinkedToken +## link -> CompletableFuture> getLinkedToken getLinkedToken(id) +> CompletableFuture> link link(tokenLinkRequestDto, idempotencyKey) -Return a linked token +Link a contract -Return a linked token, with its status and metadata. +Link an a contract ### Example @@ -567,21 +1265,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + TokenLinkRequestDto tokenLinkRequestDto = new TokenLinkRequestDto(); // TokenLinkRequestDto | + 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().getLinkedToken(id); + CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto, 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#getLinkedToken"); + System.err.println("Exception when calling TokenizationApi#link"); 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#getLinkedToken"); + System.err.println("Exception when calling TokenizationApi#link"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -596,7 +1295,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **id** | **String**| The token link id | | +| **tokenLinkRequestDto** | [**TokenLinkRequestDto**](TokenLinkRequestDto.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 @@ -609,23 +1309,26 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Token fetched successfully | - | +| **200** | Token linked successfully | - | +| **201** | | - | +| **404** | Could not find the underlying contract to link to | - | +| **409** | Token link for {refId} already exists | - | | **0** | Error Response | * X-Request-ID -
| -## getLinkedTokens +## mintCollectionToken -> CompletableFuture> getLinkedTokens getLinkedTokens(pageCursor, pageSize, status) +> CompletableFuture> mintCollectionToken mintCollectionToken(collectionMintRequestDto, id, idempotencyKey) -List all linked tokens +Mint tokens -Return all linked tokens (paginated) +Mint tokens and upload metadata ### Example @@ -650,23 +1353,23 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page - BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items per page, requesting more then max will return max items - Object status = COMPLETED; // Object | A comma separated list of statuses to filter. Default is \"COMPLETED\" + 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().getLinkedTokens(pageCursor, pageSize, status); + 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#getLinkedTokens"); + 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#getLinkedTokens"); + 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()); @@ -681,13 +1384,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageCursor** | **String**| Page cursor to get the next page | [optional] | -| **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | -| **status** | [**Object**](.md)| A comma separated list of statuses to filter. Default is \"COMPLETED\" | [optional] | +| **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> +CompletableFuture> ### Authorization @@ -696,23 +1399,23 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **202** | Tokens minted successfully | - | | **0** | Error Response | * X-Request-ID -
| -## issueNewToken +## reIssueTokenMultiChain -> CompletableFuture> issueNewToken issueNewToken(createTokenRequestDto, idempotencyKey) +> CompletableFuture>> reIssueTokenMultiChain reIssueTokenMultiChain(reissueMultichainTokenRequest, tokenLinkId, idempotencyKey) -Issue a new token +Reissue a multichain token -Facilitates the creation of a new token, supporting both EVM-based and Stellar/Ripple platforms. For EVM, it deploys the corresponding contract template to the blockchain and links the token to the workspace. For Stellar/Ripple, it links a newly created token directly to the workspace without deploying a contract. Returns the token link with status \"PENDING\" until the token is deployed or \"SUCCESS\" if no deployment is needed. +Reissue a multichain token. This endpoint allows you to reissue a token on one or more blockchains. The token must be initially issued using the issueTokenMultiChain endpoint. ### Example @@ -737,22 +1440,23 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - CreateTokenRequestDto createTokenRequestDto = new CreateTokenRequestDto(); // CreateTokenRequestDto | + ReissueMultichainTokenRequest reissueMultichainTokenRequest = new ReissueMultichainTokenRequest(); // ReissueMultichainTokenRequest | + String tokenLinkId = "tokenLinkId_example"; // String | The ID of the token link 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().issueNewToken(createTokenRequestDto, idempotencyKey); + CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequest, tokenLinkId, 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#issueNewToken"); + System.err.println("Exception when calling TokenizationApi#reIssueTokenMultiChain"); 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#issueNewToken"); + System.err.println("Exception when calling TokenizationApi#reIssueTokenMultiChain"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -767,12 +1471,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **createTokenRequestDto** | [**CreateTokenRequestDto**](CreateTokenRequestDto.md)| | | +| **reissueMultichainTokenRequest** | [**ReissueMultichainTokenRequest**](ReissueMultichainTokenRequest.md)| | | +| **tokenLinkId** | **String**| The ID of the token link | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -787,17 +1492,20 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Token was created successfully | - | -| **409** | Asset already exists | - | +| **201** | Successfully reissued multichain token | - | +| **400** | Invalid input | - | +| **404** | Deployed contract not found | - | +| **409** | Address is already taken | - | +| **0** | Error Response | * X-Request-ID -
| -## issueTokenMultiChain +## removeLayerZeroPeers -> CompletableFuture>> issueTokenMultiChain issueTokenMultiChain(createMultichainTokenRequest, idempotencyKey) +> CompletableFuture> removeLayerZeroPeers removeLayerZeroPeers(removeLayerZeroPeersRequest, idempotencyKey) -Issue a token on one or more blockchains +Remove LayerZero peers -Facilitates the creation of a new token on one or more blockchains. +Remove LayerZero peers to disconnect adapter contracts. This endpoint removes peer relationships between LayerZero adapters. ### Example @@ -822,22 +1530,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - CreateMultichainTokenRequest createMultichainTokenRequest = new CreateMultichainTokenRequest(); // CreateMultichainTokenRequest | + RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest = new RemoveLayerZeroPeersRequest(); // RemoveLayerZeroPeersRequest | 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().issueTokenMultiChain(createMultichainTokenRequest, idempotencyKey); + CompletableFuture> response = fireblocks.tokenization().removeLayerZeroPeers(removeLayerZeroPeersRequest, 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#issueTokenMultiChain"); + System.err.println("Exception when calling TokenizationApi#removeLayerZeroPeers"); 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#issueTokenMultiChain"); + System.err.println("Exception when calling TokenizationApi#removeLayerZeroPeers"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -852,12 +1560,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **createMultichainTokenRequest** | [**CreateMultichainTokenRequest**](CreateMultichainTokenRequest.md)| | | +| **removeLayerZeroPeersRequest** | [**RemoveLayerZeroPeersRequest**](RemoveLayerZeroPeersRequest.md)| | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -872,18 +1580,20 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Tokens were created successfully | - | -| **400** | Invalid input. | - | -| **409** | Address is already taken. | - | +| **200** | LayerZero peers removal process completed | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **409** | Token link processing error | - | +| **500** | Internal server error | - | -## link +## setLayerZeroDvnConfig -> CompletableFuture> link link(tokenLinkRequestDto, idempotencyKey) +> CompletableFuture> setLayerZeroDvnConfig setLayerZeroDvnConfig(setLayerZeroDvnConfigRequest, idempotencyKey) -Link a contract +Set LayerZero DVN configuration -Link an a contract +Configure DVN settings for LayerZero adapters. This endpoint sets up the DVN configuration for message verification between source and destination adapters. ### Example @@ -908,22 +1618,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - TokenLinkRequestDto tokenLinkRequestDto = new TokenLinkRequestDto(); // TokenLinkRequestDto | + SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest = new SetLayerZeroDvnConfigRequest(); // SetLayerZeroDvnConfigRequest | 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().link(tokenLinkRequestDto, idempotencyKey); + CompletableFuture> response = fireblocks.tokenization().setLayerZeroDvnConfig(setLayerZeroDvnConfigRequest, 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#link"); + System.err.println("Exception when calling TokenizationApi#setLayerZeroDvnConfig"); 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#link"); + System.err.println("Exception when calling TokenizationApi#setLayerZeroDvnConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -938,12 +1648,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **tokenLinkRequestDto** | [**TokenLinkRequestDto**](TokenLinkRequestDto.md)| | | +| **setLayerZeroDvnConfigRequest** | [**SetLayerZeroDvnConfigRequest**](SetLayerZeroDvnConfigRequest.md)| | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -958,20 +1668,21 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Token linked successfully | - | -| **201** | | - | -| **404** | Could not find the underlying contract to link to | - | -| **409** | Token link for {refId} already exists | - | -| **0** | Error Response | * X-Request-ID -
| +| **200** | LayerZero DVN configuration set successfully | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **409** | Token link preparation error | - | +| **422** | Bridging protocol blockchain metadata not found | - | +| **500** | Internal server error | - | -## mintCollectionToken +## setLayerZeroPeers -> CompletableFuture> mintCollectionToken mintCollectionToken(collectionMintRequestDto, id, idempotencyKey) +> CompletableFuture> setLayerZeroPeers setLayerZeroPeers(setLayerZeroPeersRequest, idempotencyKey) -Mint tokens +Set LayerZero peers -Mint tokens and upload metadata +Set LayerZero peers to establish connections between adapter contracts. This endpoint creates peer relationships that enable cross-chain communication. It sets the destination adapter as a peer of the source adapter. If `bidirectional` is true, it also sets the source adapter as a peer of the destination adapter(s). ### Example @@ -996,23 +1707,22 @@ public class Example { .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 + SetLayerZeroPeersRequest setLayerZeroPeersRequest = new SetLayerZeroPeersRequest(); // SetLayerZeroPeersRequest | 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); + CompletableFuture> response = fireblocks.tokenization().setLayerZeroPeers(setLayerZeroPeersRequest, 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("Exception when calling TokenizationApi#setLayerZeroPeers"); 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("Exception when calling TokenizationApi#setLayerZeroPeers"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -1027,13 +1737,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **collectionMintRequestDto** | [**CollectionMintRequestDto**](CollectionMintRequestDto.md)| | | -| **id** | **String**| The collection link id | | +| **setLayerZeroPeersRequest** | [**SetLayerZeroPeersRequest**](SetLayerZeroPeersRequest.md)| | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -1048,17 +1757,21 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | Tokens minted successfully | - | -| **0** | Error Response | * X-Request-ID -
| +| **200** | LayerZero peers set successfully | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **409** | Token link preparation error | - | +| **422** | Token link is not fungible | - | +| **500** | Internal server error | - | -## reIssueTokenMultiChain +## unlink -> CompletableFuture>> reIssueTokenMultiChain reIssueTokenMultiChain(reissueMultichainTokenRequest, tokenLinkId, idempotencyKey) +> CompletableFuture> unlink unlink(id) -Reissue a multichain token +Unlink a token -Reissue a multichain token. This endpoint allows you to reissue a token on one or more blockchains. The token must be initially issued using the issueTokenMultiChain endpoint. +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. ### Example @@ -1083,23 +1796,20 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - ReissueMultichainTokenRequest reissueMultichainTokenRequest = new ReissueMultichainTokenRequest(); // ReissueMultichainTokenRequest | - String tokenLinkId = "tokenLinkId_example"; // String | The ID of the token link - 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. + String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id try { - CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequest, tokenLinkId, idempotencyKey); + CompletableFuture> response = fireblocks.tokenization().unlink(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#reIssueTokenMultiChain"); + System.err.println("Exception when calling TokenizationApi#unlink"); 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#reIssueTokenMultiChain"); + System.err.println("Exception when calling TokenizationApi#unlink"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -1114,14 +1824,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **reissueMultichainTokenRequest** | [**ReissueMultichainTokenRequest**](ReissueMultichainTokenRequest.md)| | | -| **tokenLinkId** | **String**| The ID of the token link | | -| **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] | +| **id** | **String**| The token link id | | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -1129,26 +1837,25 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Successfully reissued multichain token | - | -| **400** | Invalid input | - | -| **404** | Deployed contract not found | - | -| **409** | Address is already taken | - | +| **200** | Token unlinked successfully | - | +| **204** | | - | +| **404** | Link did not exist | - | | **0** | Error Response | * X-Request-ID -
| -## unlink +## unlinkCollection -> CompletableFuture> unlink unlink(id) +> CompletableFuture> unlinkCollection unlinkCollection(id) -Unlink a token +Delete a collection link -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. +Delete a collection link ### Example @@ -1175,18 +1882,18 @@ public class Example { String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id try { - CompletableFuture> response = fireblocks.tokenization().unlink(id); + 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#unlink"); + 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#unlink"); + 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()); @@ -1220,19 +1927,18 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Token unlinked successfully | - | -| **204** | | - | -| **404** | Link did not exist | - | +| **204** | Collection unlinked successfully | - | +| **404** | Link for collection does not exist | - | | **0** | Error Response | * X-Request-ID -
| -## unlinkCollection +## validateLayerZeroChannelConfig -> CompletableFuture> unlinkCollection unlinkCollection(id) +> CompletableFuture> validateLayerZeroChannelConfig validateLayerZeroChannelConfig(adapterTokenLinkId, peerAdapterTokenLinkId) -Delete a collection link +Validate LayerZero channel configuration -Delete a collection link +Validate the LayerZero channel configuration between adapters. This endpoint checks if the channel configuration is correct and returns any validation errors. ### Example @@ -1257,20 +1963,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + UUID adapterTokenLinkId = UUID.fromString("b70701f4-d7b1-4795-a8ee-b09cdb5b850d"); // UUID | The token link ID of the adapter + UUID peerAdapterTokenLinkId = UUID.fromString("6add4f2a-b206-4114-8f94-2882618ffbb4"); // UUID | Peer adapter token link ID to validate against try { - CompletableFuture> response = fireblocks.tokenization().unlinkCollection(id); + CompletableFuture> response = fireblocks.tokenization().validateLayerZeroChannelConfig(adapterTokenLinkId, peerAdapterTokenLinkId); 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#unlinkCollection"); + System.err.println("Exception when calling TokenizationApi#validateLayerZeroChannelConfig"); 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("Exception when calling TokenizationApi#validateLayerZeroChannelConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -1285,12 +1993,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **id** | **String**| The token link id | | +| **adapterTokenLinkId** | **UUID**| The token link ID of the adapter | | +| **peerAdapterTokenLinkId** | **UUID**| Peer adapter token link ID to validate against | | ### Return type +CompletableFuture> -CompletableFuture> ### Authorization @@ -1304,7 +2013,9 @@ No authorization required ### 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 -
| +| **200** | LayerZero channel configuration validation completed | - | +| **400** | Bad request, invalid input data or parameters | - | +| **404** | Token link not found | - | +| **422** | Bridging protocol blockchain metadata not found | - | +| **500** | Internal server error | - | diff --git a/docs/ValidateLayerZeroChannelResponse.md b/docs/ValidateLayerZeroChannelResponse.md new file mode 100644 index 00000000..b41176fa --- /dev/null +++ b/docs/ValidateLayerZeroChannelResponse.md @@ -0,0 +1,14 @@ + + +# ValidateLayerZeroChannelResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**correct** | **Boolean** | Indicates whether the LayerZero channel configuration is valid. | | +|**errors** | **List<String>** | List of errors found during validation. An empty array indicates no errors. | | + + + diff --git a/pom.xml b/pom.xml index 8114e7fd..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 11.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 f6a9bdcf..9ec56d09 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "11.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/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java index 7da170cb..4ebe33fd 100644 --- a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -20,6 +20,7 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.AdapterProcessingResult; import com.fireblocks.sdk.model.CollectionBurnRequestDto; import com.fireblocks.sdk.model.CollectionBurnResponseDto; import com.fireblocks.sdk.model.CollectionDeployRequestDto; @@ -28,13 +29,25 @@ import com.fireblocks.sdk.model.CollectionMintResponseDto; import com.fireblocks.sdk.model.CreateMultichainTokenRequest; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.DeployLayerZeroAdaptersRequest; import com.fireblocks.sdk.model.DeployableAddressResponse; import com.fireblocks.sdk.model.GetDeployableAddressRequest; +import com.fireblocks.sdk.model.GetLayerZeroDvnConfigResponse; +import com.fireblocks.sdk.model.GetLayerZeroPeersResponse; import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; import com.fireblocks.sdk.model.ReissueMultichainTokenRequest; +import com.fireblocks.sdk.model.RemoveLayerZeroAdaptersRequest; +import com.fireblocks.sdk.model.RemoveLayerZeroAdaptersResponse; +import com.fireblocks.sdk.model.RemoveLayerZeroPeersRequest; +import com.fireblocks.sdk.model.RemoveLayerZeroPeersResponse; +import com.fireblocks.sdk.model.SetLayerZeroDvnConfigRequest; +import com.fireblocks.sdk.model.SetLayerZeroDvnConfigResponse; +import com.fireblocks.sdk.model.SetLayerZeroPeersRequest; +import com.fireblocks.sdk.model.SetLayerZeroPeersResponse; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; +import com.fireblocks.sdk.model.ValidateLayerZeroChannelResponse; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; @@ -46,6 +59,7 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; @@ -257,6 +271,185 @@ private HttpRequest.Builder createNewCollectionRequestBuilder( } return localVarRequestBuilder; } + /** + * Remove LayerZero adapters Remove LayerZero adapters by deactivating and unlinking them. This + * endpoint revokes roles and deactivates the specified adapter contracts. + * + * @param removeLayerZeroAdaptersRequest (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<RemoveLayerZeroAdaptersResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + deactivateAndUnlinkAdapters( + RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + deactivateAndUnlinkAdaptersRequestBuilder( + removeLayerZeroAdaptersRequest, 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( + "deactivateAndUnlinkAdapters", + 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< + RemoveLayerZeroAdaptersResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deactivateAndUnlinkAdaptersRequestBuilder( + RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "deactivateAndUnlinkAdapters", + "removeLayerZeroAdaptersRequest", + removeLayerZeroAdaptersRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/bridge/layerzero"; + + 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(removeLayerZeroAdaptersRequest); + localVarRequestBuilder.method( + "DELETE", 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; + } + /** + * Deploy LayerZero adapters Deploy LayerZero adapters for multichain token bridging + * functionality. This endpoint creates adapter contracts that enable cross-chain token + * transfers. + * + * @param deployLayerZeroAdaptersRequest (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<AdapterProcessingResult>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> deployAndLinkAdapters( + DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + deployAndLinkAdaptersRequestBuilder( + deployLayerZeroAdaptersRequest, 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( + "deployAndLinkAdapters", 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< + AdapterProcessingResult>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deployAndLinkAdaptersRequestBuilder( + DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "deployAndLinkAdapters", + "deployLayerZeroAdaptersRequest", + deployLayerZeroAdaptersRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/bridge/layerzero"; + + 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(deployLayerZeroAdaptersRequest); + 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 * @@ -481,23 +674,21 @@ private HttpRequest.Builder getDeployableAddressRequestBuilder( return localVarRequestBuilder; } /** - * Get collections Get collections (paginated) + * Get LayerZero DVN configuration Retrieve the DVN (Data Verification Network) configuration + * for a specific adapter. Returns DVN configurations for channels between the source adapter + * and its peers. * - * @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>> + * @param adapterTokenLinkId The token link id of the adapter token link (required) + * @param peerAdapterTokenLinkId Optional peer adapter token link ID to filter results + * (optional) + * @return CompletableFuture<ApiResponse<GetLayerZeroDvnConfigResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> - getLinkedCollections(String pageCursor, BigDecimal pageSize, Object status) - throws ApiException { + public CompletableFuture> getLayerZeroDvnConfig( + UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - getLinkedCollectionsRequestBuilder(pageCursor, pageSize, status); + getLayerZeroDvnConfigRequestBuilder(adapterTokenLinkId, peerAdapterTokenLinkId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -508,12 +699,12 @@ private HttpRequest.Builder getDeployableAddressRequestBuilder( if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( getApiException( - "getLinkedCollections", localVarResponse)); + "getLayerZeroDvnConfig", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -521,7 +712,7 @@ private HttpRequest.Builder getDeployableAddressRequestBuilder( : memberVarObjectMapper.readValue( responseBody, new TypeReference< - GetLinkedCollectionsPaginatedResponse>() {}))); + GetLayerZeroDvnConfigResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -531,22 +722,25 @@ private HttpRequest.Builder getDeployableAddressRequestBuilder( } } - private HttpRequest.Builder getLinkedCollectionsRequestBuilder( - String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + private HttpRequest.Builder getLayerZeroDvnConfigRequestBuilder( + UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getLayerZeroDvnConfig", "adapterTokenLinkId", adapterTokenLinkId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/tokenization/collections"; + String localVarPath = + "/tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/dvns" + .replace( + "{adapterTokenLinkId}", + ApiClient.urlEncode(adapterTokenLinkId.toString())); 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)); + localVarQueryParameterBaseName = "peerAdapterTokenLinkId"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("peerAdapterTokenLinkId", peerAdapterTokenLinkId)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -572,16 +766,18 @@ private HttpRequest.Builder getLinkedCollectionsRequestBuilder( return localVarRequestBuilder; } /** - * Return a linked token Return a linked token, with its status and metadata. + * Get LayerZero peers Retrieve the LayerZero peers configured for a specific adapter. Returns + * information about peer relationships for cross-chain communication. * - * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<TokenLinkDto>> + * @param adapterTokenLinkId The token link id of the adapter token link (required) + * @return CompletableFuture<ApiResponse<GetLayerZeroPeersResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getLinkedToken(String id) - throws ApiException { + public CompletableFuture> getLayerZeroPeers( + UUID adapterTokenLinkId) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = getLinkedTokenRequestBuilder(id); + HttpRequest.Builder localVarRequestBuilder = + getLayerZeroPeersRequestBuilder(adapterTokenLinkId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -591,12 +787,12 @@ public CompletableFuture> getLinkedToken(String id) } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("getLinkedToken", localVarResponse)); + getApiException("getLayerZeroPeers", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -604,7 +800,7 @@ public CompletableFuture> getLinkedToken(String id) : memberVarObjectMapper.readValue( responseBody, new TypeReference< - TokenLinkDto>() {}))); + GetLayerZeroPeersResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -614,13 +810,18 @@ public CompletableFuture> getLinkedToken(String id) } } - private HttpRequest.Builder getLinkedTokenRequestBuilder(String id) throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty("getLinkedToken", "id", id); + private HttpRequest.Builder getLayerZeroPeersRequestBuilder(UUID adapterTokenLinkId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getLayerZeroPeers", "adapterTokenLinkId", adapterTokenLinkId.toString()); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = - "/tokenization/tokens/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + "/tokenization/multichain/bridge/layerzero/config/{adapterTokenLinkId}/peers" + .replace( + "{adapterTokenLinkId}", + ApiClient.urlEncode(adapterTokenLinkId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -636,21 +837,23 @@ private HttpRequest.Builder getLinkedTokenRequestBuilder(String id) throws ApiEx return localVarRequestBuilder; } /** - * List all linked tokens Return all linked tokens (paginated) + * Get collections Get collections (paginated) * - * @param pageCursor Page cursor to get the next page (optional) - * @param pageSize Number of items per page, requesting more then max will return max items - * (optional) + * @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<TokensPaginatedResponse>> + * @return CompletableFuture<ApiResponse<GetLinkedCollectionsPaginatedResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getLinkedTokens( - String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + public CompletableFuture> + getLinkedCollections(String pageCursor, BigDecimal pageSize, Object status) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - getLinkedTokensRequestBuilder(pageCursor, pageSize, status); + getLinkedCollectionsRequestBuilder(pageCursor, pageSize, status); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -660,12 +863,13 @@ public CompletableFuture> getLinkedTokens( } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("getLinkedTokens", localVarResponse)); + getApiException( + "getLinkedCollections", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -673,7 +877,7 @@ public CompletableFuture> getLinkedTokens( : memberVarObjectMapper.readValue( responseBody, new TypeReference< - TokensPaginatedResponse>() {}))); + GetLinkedCollectionsPaginatedResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -683,12 +887,12 @@ public CompletableFuture> getLinkedTokens( } } - private HttpRequest.Builder getLinkedTokensRequestBuilder( + private HttpRequest.Builder getLinkedCollectionsRequestBuilder( String pageCursor, BigDecimal pageSize, Object status) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/tokenization/tokens"; + String localVarPath = "/tokenization/collections"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); @@ -724,26 +928,16 @@ private HttpRequest.Builder getLinkedTokensRequestBuilder( return localVarRequestBuilder; } /** - * Issue a new token Facilitates the creation of a new token, supporting both EVM-based and - * Stellar/Ripple platforms. For EVM, it deploys the corresponding contract template to the - * blockchain and links the token to the workspace. For Stellar/Ripple, it links a newly created - * token directly to the workspace without deploying a contract. Returns the token link with - * status \"PENDING\" until the token is deployed or \"SUCCESS\" if no - * deployment is needed. + * Return a linked token Return a linked token, with its status and metadata. * - * @param createTokenRequestDto (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) + * @param id The token link id (required) * @return CompletableFuture<ApiResponse<TokenLinkDto>> * @throws ApiException if fails to make API call */ - public CompletableFuture> issueNewToken( - CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) + public CompletableFuture> getLinkedToken(String id) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = - issueNewTokenRequestBuilder(createTokenRequestDto, idempotencyKey); + HttpRequest.Builder localVarRequestBuilder = getLinkedTokenRequestBuilder(id); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -753,7 +947,7 @@ public CompletableFuture> issueNewToken( } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("issueNewToken", localVarResponse)); + getApiException("getLinkedToken", localVarResponse)); } try { String responseBody = localVarResponse.body(); @@ -776,32 +970,19 @@ public CompletableFuture> issueNewToken( } } - private HttpRequest.Builder issueNewTokenRequestBuilder( - CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) - throws ApiException { - ValidationUtils.assertParamExists( - "issueNewToken", "createTokenRequestDto", createTokenRequestDto); + private HttpRequest.Builder getLinkedTokenRequestBuilder(String id) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getLinkedToken", "id", id); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/tokenization/tokens"; + String localVarPath = + "/tokenization/tokens/{id}".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(createTokenRequestDto); - localVarRequestBuilder.method( - "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); - } catch (IOException e) { - throw new ApiException(e); - } + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); if (memberVarReadTimeout != null) { localVarRequestBuilder.timeout(memberVarReadTimeout); } @@ -811,8 +992,183 @@ private HttpRequest.Builder issueNewTokenRequestBuilder( return localVarRequestBuilder; } /** - * Issue a token on one or more blockchains Facilitates the creation of a new token on one or - * more blockchains. + * List all linked tokens Return all linked tokens (paginated) + * + * @param pageCursor Page cursor to get the next page (optional) + * @param pageSize Number of items per page, requesting more then max will return max items + * (optional) + * @param status A comma separated list of statuses to filter. Default is + * \"COMPLETED\" (optional) + * @return CompletableFuture<ApiResponse<TokensPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getLinkedTokens( + String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getLinkedTokensRequestBuilder(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("getLinkedTokens", 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< + TokensPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getLinkedTokensRequestBuilder( + String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/tokens"; + + 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; + } + /** + * Issue a new token Facilitates the creation of a new token, supporting both EVM-based and + * Stellar/Ripple platforms. For EVM, it deploys the corresponding contract template to the + * blockchain and links the token to the workspace. For Stellar/Ripple, it links a newly created + * token directly to the workspace without deploying a contract. Returns the token link with + * status \"PENDING\" until the token is deployed or \"SUCCESS\" if no + * deployment is needed. + * + * @param createTokenRequestDto (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<TokenLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> issueNewToken( + CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + issueNewTokenRequestBuilder(createTokenRequestDto, 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("issueNewToken", 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< + TokenLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder issueNewTokenRequestBuilder( + CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "issueNewToken", "createTokenRequestDto", createTokenRequestDto); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/tokens"; + + 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(createTokenRequestDto); + 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; + } + /** + * Issue a token on one or more blockchains Facilitates the creation of a new token on one or + * more blockchains. * * @param createMultichainTokenRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -1161,6 +1517,263 @@ private HttpRequest.Builder reIssueTokenMultiChainRequestBuilder( } return localVarRequestBuilder; } + /** + * Remove LayerZero peers Remove LayerZero peers to disconnect adapter contracts. This endpoint + * removes peer relationships between LayerZero adapters. + * + * @param removeLayerZeroPeersRequest (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<RemoveLayerZeroPeersResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> removeLayerZeroPeers( + RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + removeLayerZeroPeersRequestBuilder(removeLayerZeroPeersRequest, 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( + "removeLayerZeroPeers", 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< + RemoveLayerZeroPeersResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder removeLayerZeroPeersRequestBuilder( + RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "removeLayerZeroPeers", "removeLayerZeroPeersRequest", removeLayerZeroPeersRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/bridge/layerzero/config/peers"; + + 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(removeLayerZeroPeersRequest); + localVarRequestBuilder.method( + "DELETE", 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 LayerZero DVN configuration Configure DVN settings for LayerZero adapters. This endpoint + * sets up the DVN configuration for message verification between source and destination + * adapters. + * + * @param setLayerZeroDvnConfigRequest (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<SetLayerZeroDvnConfigResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> setLayerZeroDvnConfig( + SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + setLayerZeroDvnConfigRequestBuilder( + setLayerZeroDvnConfigRequest, 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( + "setLayerZeroDvnConfig", 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< + SetLayerZeroDvnConfigResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder setLayerZeroDvnConfigRequestBuilder( + SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "setLayerZeroDvnConfig", + "setLayerZeroDvnConfigRequest", + setLayerZeroDvnConfigRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/bridge/layerzero/config/dvns"; + + 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(setLayerZeroDvnConfigRequest); + 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 LayerZero peers Set LayerZero peers to establish connections between adapter contracts. + * This endpoint creates peer relationships that enable cross-chain communication. It sets the + * destination adapter as a peer of the source adapter. If `bidirectional` is true, it + * also sets the source adapter as a peer of the destination adapter(s). + * + * @param setLayerZeroPeersRequest (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<SetLayerZeroPeersResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> setLayerZeroPeers( + SetLayerZeroPeersRequest setLayerZeroPeersRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + setLayerZeroPeersRequestBuilder(setLayerZeroPeersRequest, 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("setLayerZeroPeers", 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< + SetLayerZeroPeersResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder setLayerZeroPeersRequestBuilder( + SetLayerZeroPeersRequest setLayerZeroPeersRequest, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "setLayerZeroPeers", "setLayerZeroPeersRequest", setLayerZeroPeersRequest); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/bridge/layerzero/config/peers"; + + 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(setLayerZeroPeersRequest); + 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. @@ -1269,4 +1882,103 @@ private HttpRequest.Builder unlinkCollectionRequestBuilder(String id) throws Api } return localVarRequestBuilder; } + /** + * Validate LayerZero channel configuration Validate the LayerZero channel configuration between + * adapters. This endpoint checks if the channel configuration is correct and returns any + * validation errors. + * + * @param adapterTokenLinkId The token link ID of the adapter (required) + * @param peerAdapterTokenLinkId Peer adapter token link ID to validate against (required) + * @return CompletableFuture<ApiResponse<ValidateLayerZeroChannelResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + validateLayerZeroChannelConfig(UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + validateLayerZeroChannelConfigRequestBuilder( + adapterTokenLinkId, peerAdapterTokenLinkId); + 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( + "validateLayerZeroChannelConfig", + 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< + ValidateLayerZeroChannelResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder validateLayerZeroChannelConfigRequestBuilder( + UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "validateLayerZeroChannelConfig", + "adapterTokenLinkId", + adapterTokenLinkId.toString()); + ValidationUtils.assertParamExistsAndNotEmpty( + "validateLayerZeroChannelConfig", + "peerAdapterTokenLinkId", + peerAdapterTokenLinkId.toString()); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/bridge/layerzero/validate"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "adapterTokenLinkId"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("adapterTokenLinkId", adapterTokenLinkId)); + localVarQueryParameterBaseName = "peerAdapterTokenLinkId"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("peerAdapterTokenLinkId", peerAdapterTokenLinkId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } } diff --git a/src/main/java/com/fireblocks/sdk/model/AdapterProcessingResult.java b/src/main/java/com/fireblocks/sdk/model/AdapterProcessingResult.java new file mode 100644 index 00000000..28a4f28d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AdapterProcessingResult.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; + +/** AdapterProcessingResult */ +@JsonPropertyOrder({ + AdapterProcessingResult.JSON_PROPERTY_INPUT_TOKEN_LINK_ID, + AdapterProcessingResult.JSON_PROPERTY_ADAPTER_LINK_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdapterProcessingResult { + public static final String JSON_PROPERTY_INPUT_TOKEN_LINK_ID = "inputTokenLinkId"; + private String inputTokenLinkId; + + public static final String JSON_PROPERTY_ADAPTER_LINK_ID = "adapterLinkId"; + private String adapterLinkId; + + public AdapterProcessingResult() {} + + public AdapterProcessingResult inputTokenLinkId(String inputTokenLinkId) { + this.inputTokenLinkId = inputTokenLinkId; + return this; + } + + /** + * The input token link ID + * + * @return inputTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUT_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInputTokenLinkId() { + return inputTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_INPUT_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputTokenLinkId(String inputTokenLinkId) { + this.inputTokenLinkId = inputTokenLinkId; + } + + public AdapterProcessingResult adapterLinkId(String adapterLinkId) { + this.adapterLinkId = adapterLinkId; + return this; + } + + /** + * The adapter link ID + * + * @return adapterLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAdapterLinkId() { + return adapterLinkId; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterLinkId(String adapterLinkId) { + this.adapterLinkId = adapterLinkId; + } + + /** Return true if this AdapterProcessingResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdapterProcessingResult adapterProcessingResult = (AdapterProcessingResult) o; + return Objects.equals(this.inputTokenLinkId, adapterProcessingResult.inputTokenLinkId) + && Objects.equals(this.adapterLinkId, adapterProcessingResult.adapterLinkId); + } + + @Override + public int hashCode() { + return Objects.hash(inputTokenLinkId, adapterLinkId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdapterProcessingResult {\n"); + sb.append(" inputTokenLinkId: ").append(toIndentedString(inputTokenLinkId)).append("\n"); + sb.append(" adapterLinkId: ").append(toIndentedString(adapterLinkId)).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 `inputTokenLinkId` to the URL query string + if (getInputTokenLinkId() != null) { + joiner.add( + String.format( + "%sinputTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getInputTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `adapterLinkId` to the URL query string + if (getAdapterLinkId() != null) { + joiner.add( + String.format( + "%sadapterLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdapterLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java b/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java new file mode 100644 index 00000000..ef2020cb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java @@ -0,0 +1,171 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import java.util.StringJoiner; + +/** ChannelDvnConfigWithConfirmations */ +@JsonPropertyOrder({ + ChannelDvnConfigWithConfirmations.JSON_PROPERTY_SEND_CONFIG, + ChannelDvnConfigWithConfirmations.JSON_PROPERTY_RECEIVE_CONFIG +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChannelDvnConfigWithConfirmations { + public static final String JSON_PROPERTY_SEND_CONFIG = "sendConfig"; + private ChannelDvnConfigWithConfirmationsSendConfig sendConfig; + + public static final String JSON_PROPERTY_RECEIVE_CONFIG = "receiveConfig"; + private ChannelDvnConfigWithConfirmationsReceiveConfig receiveConfig; + + public ChannelDvnConfigWithConfirmations() {} + + public ChannelDvnConfigWithConfirmations sendConfig( + ChannelDvnConfigWithConfirmationsSendConfig sendConfig) { + this.sendConfig = sendConfig; + return this; + } + + /** + * Get sendConfig + * + * @return sendConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEND_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChannelDvnConfigWithConfirmationsSendConfig getSendConfig() { + return sendConfig; + } + + @JsonProperty(JSON_PROPERTY_SEND_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSendConfig(ChannelDvnConfigWithConfirmationsSendConfig sendConfig) { + this.sendConfig = sendConfig; + } + + public ChannelDvnConfigWithConfirmations receiveConfig( + ChannelDvnConfigWithConfirmationsReceiveConfig receiveConfig) { + this.receiveConfig = receiveConfig; + return this; + } + + /** + * Get receiveConfig + * + * @return receiveConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIVE_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ChannelDvnConfigWithConfirmationsReceiveConfig getReceiveConfig() { + return receiveConfig; + } + + @JsonProperty(JSON_PROPERTY_RECEIVE_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceiveConfig(ChannelDvnConfigWithConfirmationsReceiveConfig receiveConfig) { + this.receiveConfig = receiveConfig; + } + + /** Return true if this ChannelDvnConfigWithConfirmations object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelDvnConfigWithConfirmations channelDvnConfigWithConfirmations = + (ChannelDvnConfigWithConfirmations) o; + return Objects.equals(this.sendConfig, channelDvnConfigWithConfirmations.sendConfig) + && Objects.equals( + this.receiveConfig, channelDvnConfigWithConfirmations.receiveConfig); + } + + @Override + public int hashCode() { + return Objects.hash(sendConfig, receiveConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelDvnConfigWithConfirmations {\n"); + sb.append(" sendConfig: ").append(toIndentedString(sendConfig)).append("\n"); + sb.append(" receiveConfig: ").append(toIndentedString(receiveConfig)).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 `sendConfig` to the URL query string + if (getSendConfig() != null) { + joiner.add(getSendConfig().toUrlQueryString(prefix + "sendConfig" + suffix)); + } + + // add `receiveConfig` to the URL query string + if (getReceiveConfig() != null) { + joiner.add(getReceiveConfig().toUrlQueryString(prefix + "receiveConfig" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfig.java b/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfig.java new file mode 100644 index 00000000..af44dc32 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfig.java @@ -0,0 +1,318 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ChannelDvnConfigWithConfirmationsReceiveConfig */ +@JsonPropertyOrder({ + ChannelDvnConfigWithConfirmationsReceiveConfig.JSON_PROPERTY_DVN_ADDRESSES, + ChannelDvnConfigWithConfirmationsReceiveConfig.JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES, + ChannelDvnConfigWithConfirmationsReceiveConfig.JSON_PROPERTY_OPTIONAL_THRESHOLD, + ChannelDvnConfigWithConfirmationsReceiveConfig.JSON_PROPERTY_CONFIRMATIONS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChannelDvnConfigWithConfirmationsReceiveConfig { + public static final String JSON_PROPERTY_DVN_ADDRESSES = "dvnAddresses"; + private List dvnAddresses = new ArrayList<>(); + + public static final String JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES = "optionalDVNAddresses"; + private List optionalDVNAddresses; + + public static final String JSON_PROPERTY_OPTIONAL_THRESHOLD = "optionalThreshold"; + private BigDecimal optionalThreshold; + + public static final String JSON_PROPERTY_CONFIRMATIONS = "confirmations"; + private BigDecimal confirmations; + + public ChannelDvnConfigWithConfirmationsReceiveConfig() {} + + public ChannelDvnConfigWithConfirmationsReceiveConfig dvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + return this; + } + + public ChannelDvnConfigWithConfirmationsReceiveConfig addDvnAddressesItem( + String dvnAddressesItem) { + if (this.dvnAddresses == null) { + this.dvnAddresses = new ArrayList<>(); + } + this.dvnAddresses.add(dvnAddressesItem); + return this; + } + + /** + * Array of required DVN Ethereum addresses that sign ULN messages. + * + * @return dvnAddresses + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDvnAddresses() { + return dvnAddresses; + } + + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + } + + public ChannelDvnConfigWithConfirmationsReceiveConfig optionalDVNAddresses( + List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + return this; + } + + public ChannelDvnConfigWithConfirmationsReceiveConfig addOptionalDVNAddressesItem( + String optionalDVNAddressesItem) { + if (this.optionalDVNAddresses == null) { + this.optionalDVNAddresses = new ArrayList<>(); + } + this.optionalDVNAddresses.add(optionalDVNAddressesItem); + return this; + } + + /** + * Array of optional DVN Ethereum addresses that sign ULN messages. + * + * @return optionalDVNAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOptionalDVNAddresses() { + return optionalDVNAddresses; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOptionalDVNAddresses(List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + } + + public ChannelDvnConfigWithConfirmationsReceiveConfig optionalThreshold( + BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + return this; + } + + /** + * Minimum number of DVN signatures required (M-of-N). + * + * @return optionalThreshold + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getOptionalThreshold() { + return optionalThreshold; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptionalThreshold(BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + } + + public ChannelDvnConfigWithConfirmationsReceiveConfig confirmations(BigDecimal confirmations) { + this.confirmations = confirmations; + return this; + } + + /** + * Number of block confirmations required + * + * @return confirmations + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIRMATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getConfirmations() { + return confirmations; + } + + @JsonProperty(JSON_PROPERTY_CONFIRMATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfirmations(BigDecimal confirmations) { + this.confirmations = confirmations; + } + + /** Return true if this ChannelDvnConfigWithConfirmations_receiveConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelDvnConfigWithConfirmationsReceiveConfig + channelDvnConfigWithConfirmationsReceiveConfig = + (ChannelDvnConfigWithConfirmationsReceiveConfig) o; + return Objects.equals( + this.dvnAddresses, + channelDvnConfigWithConfirmationsReceiveConfig.dvnAddresses) + && Objects.equals( + this.optionalDVNAddresses, + channelDvnConfigWithConfirmationsReceiveConfig.optionalDVNAddresses) + && Objects.equals( + this.optionalThreshold, + channelDvnConfigWithConfirmationsReceiveConfig.optionalThreshold) + && Objects.equals( + this.confirmations, + channelDvnConfigWithConfirmationsReceiveConfig.confirmations); + } + + @Override + public int hashCode() { + return Objects.hash(dvnAddresses, optionalDVNAddresses, optionalThreshold, confirmations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelDvnConfigWithConfirmationsReceiveConfig {\n"); + sb.append(" dvnAddresses: ").append(toIndentedString(dvnAddresses)).append("\n"); + sb.append(" optionalDVNAddresses: ") + .append(toIndentedString(optionalDVNAddresses)) + .append("\n"); + sb.append(" optionalThreshold: ") + .append(toIndentedString(optionalThreshold)) + .append("\n"); + sb.append(" confirmations: ").append(toIndentedString(confirmations)).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 `dvnAddresses` to the URL query string + if (getDvnAddresses() != null) { + for (int i = 0; i < getDvnAddresses().size(); i++) { + joiner.add( + String.format( + "%sdvnAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDvnAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalDVNAddresses` to the URL query string + if (getOptionalDVNAddresses() != null) { + for (int i = 0; i < getOptionalDVNAddresses().size(); i++) { + joiner.add( + String.format( + "%soptionalDVNAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getOptionalDVNAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalThreshold` to the URL query string + if (getOptionalThreshold() != null) { + joiner.add( + String.format( + "%soptionalThreshold%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOptionalThreshold()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `confirmations` to the URL query string + if (getConfirmations() != null) { + joiner.add( + String.format( + "%sconfirmations%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConfirmations()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfig.java b/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfig.java new file mode 100644 index 00000000..87e9327a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfig.java @@ -0,0 +1,316 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ChannelDvnConfigWithConfirmationsSendConfig */ +@JsonPropertyOrder({ + ChannelDvnConfigWithConfirmationsSendConfig.JSON_PROPERTY_DVN_ADDRESSES, + ChannelDvnConfigWithConfirmationsSendConfig.JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES, + ChannelDvnConfigWithConfirmationsSendConfig.JSON_PROPERTY_OPTIONAL_THRESHOLD, + ChannelDvnConfigWithConfirmationsSendConfig.JSON_PROPERTY_CONFIRMATIONS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChannelDvnConfigWithConfirmationsSendConfig { + public static final String JSON_PROPERTY_DVN_ADDRESSES = "dvnAddresses"; + private List dvnAddresses = new ArrayList<>(); + + public static final String JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES = "optionalDVNAddresses"; + private List optionalDVNAddresses; + + public static final String JSON_PROPERTY_OPTIONAL_THRESHOLD = "optionalThreshold"; + private BigDecimal optionalThreshold; + + public static final String JSON_PROPERTY_CONFIRMATIONS = "confirmations"; + private BigDecimal confirmations; + + public ChannelDvnConfigWithConfirmationsSendConfig() {} + + public ChannelDvnConfigWithConfirmationsSendConfig dvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + return this; + } + + public ChannelDvnConfigWithConfirmationsSendConfig addDvnAddressesItem( + String dvnAddressesItem) { + if (this.dvnAddresses == null) { + this.dvnAddresses = new ArrayList<>(); + } + this.dvnAddresses.add(dvnAddressesItem); + return this; + } + + /** + * Array of required DVN Ethereum addresses that sign ULN messages. + * + * @return dvnAddresses + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDvnAddresses() { + return dvnAddresses; + } + + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + } + + public ChannelDvnConfigWithConfirmationsSendConfig optionalDVNAddresses( + List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + return this; + } + + public ChannelDvnConfigWithConfirmationsSendConfig addOptionalDVNAddressesItem( + String optionalDVNAddressesItem) { + if (this.optionalDVNAddresses == null) { + this.optionalDVNAddresses = new ArrayList<>(); + } + this.optionalDVNAddresses.add(optionalDVNAddressesItem); + return this; + } + + /** + * Array of optional DVN Ethereum addresses that sign ULN messages. + * + * @return optionalDVNAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOptionalDVNAddresses() { + return optionalDVNAddresses; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOptionalDVNAddresses(List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + } + + public ChannelDvnConfigWithConfirmationsSendConfig optionalThreshold( + BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + return this; + } + + /** + * Minimum number of DVN signatures required (M-of-N). + * + * @return optionalThreshold + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getOptionalThreshold() { + return optionalThreshold; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptionalThreshold(BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + } + + public ChannelDvnConfigWithConfirmationsSendConfig confirmations(BigDecimal confirmations) { + this.confirmations = confirmations; + return this; + } + + /** + * Number of block confirmations required + * + * @return confirmations + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIRMATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getConfirmations() { + return confirmations; + } + + @JsonProperty(JSON_PROPERTY_CONFIRMATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfirmations(BigDecimal confirmations) { + this.confirmations = confirmations; + } + + /** Return true if this ChannelDvnConfigWithConfirmations_sendConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChannelDvnConfigWithConfirmationsSendConfig channelDvnConfigWithConfirmationsSendConfig = + (ChannelDvnConfigWithConfirmationsSendConfig) o; + return Objects.equals( + this.dvnAddresses, channelDvnConfigWithConfirmationsSendConfig.dvnAddresses) + && Objects.equals( + this.optionalDVNAddresses, + channelDvnConfigWithConfirmationsSendConfig.optionalDVNAddresses) + && Objects.equals( + this.optionalThreshold, + channelDvnConfigWithConfirmationsSendConfig.optionalThreshold) + && Objects.equals( + this.confirmations, + channelDvnConfigWithConfirmationsSendConfig.confirmations); + } + + @Override + public int hashCode() { + return Objects.hash(dvnAddresses, optionalDVNAddresses, optionalThreshold, confirmations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChannelDvnConfigWithConfirmationsSendConfig {\n"); + sb.append(" dvnAddresses: ").append(toIndentedString(dvnAddresses)).append("\n"); + sb.append(" optionalDVNAddresses: ") + .append(toIndentedString(optionalDVNAddresses)) + .append("\n"); + sb.append(" optionalThreshold: ") + .append(toIndentedString(optionalThreshold)) + .append("\n"); + sb.append(" confirmations: ").append(toIndentedString(confirmations)).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 `dvnAddresses` to the URL query string + if (getDvnAddresses() != null) { + for (int i = 0; i < getDvnAddresses().size(); i++) { + joiner.add( + String.format( + "%sdvnAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDvnAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalDVNAddresses` to the URL query string + if (getOptionalDVNAddresses() != null) { + for (int i = 0; i < getOptionalDVNAddresses().size(); i++) { + joiner.add( + String.format( + "%soptionalDVNAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getOptionalDVNAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalThreshold` to the URL query string + if (getOptionalThreshold() != null) { + joiner.add( + String.format( + "%soptionalThreshold%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOptionalThreshold()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `confirmations` to the URL query string + if (getConfirmations() != null) { + joiner.add( + String.format( + "%sconfirmations%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConfirmations()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java b/src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java new file mode 100644 index 00000000..703b1de5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequest.java @@ -0,0 +1,453 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DeployLayerZeroAdaptersRequest */ +@JsonPropertyOrder({ + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_CREATE_PARAMS, + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_DISPLAY_NAME, + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_USE_GASLESS, + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_FEE_LEVEL, + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_FEE, + DeployLayerZeroAdaptersRequest.JSON_PROPERTY_SALT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployLayerZeroAdaptersRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CREATE_PARAMS = "createParams"; + private List createParams = new ArrayList<>(); + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + public static final String JSON_PROPERTY_SALT = "salt"; + private String salt; + + public DeployLayerZeroAdaptersRequest() {} + + public DeployLayerZeroAdaptersRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to deploy adapter for 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 DeployLayerZeroAdaptersRequest createParams( + List createParams) { + this.createParams = createParams; + return this; + } + + public DeployLayerZeroAdaptersRequest addCreateParamsItem( + LayerZeroAdapterCreateParams createParamsItem) { + if (this.createParams == null) { + this.createParams = new ArrayList<>(); + } + this.createParams.add(createParamsItem); + return this; + } + + /** + * Array of creation parameters for LayerZero adapters, one per tokenLink. + * + * @return createParams + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCreateParams() { + return createParams; + } + + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreateParams(List createParams) { + this.createParams = createParams; + } + + public DeployLayerZeroAdaptersRequest displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name of the contract + * + * @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 DeployLayerZeroAdaptersRequest useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Whether to use gasless deployment or not + * + * @return useGasless + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUseGasless() { + return useGasless; + } + + @JsonProperty(JSON_PROPERTY_USE_GASLESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUseGasless(Boolean useGasless) { + this.useGasless = useGasless; + } + + public DeployLayerZeroAdaptersRequest feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + + public DeployLayerZeroAdaptersRequest fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Max fee amount for the write function transaction. interchangeable with the + * 'feeLevel' field + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(String fee) { + this.fee = fee; + } + + public DeployLayerZeroAdaptersRequest salt(String salt) { + this.salt = salt; + return this; + } + + /** + * The salt to calculate the deterministic address. Must be a number between 0 and 2^256 -1, for + * it to fit in the bytes32 parameter + * + * @return salt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSalt() { + return salt; + } + + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSalt(String salt) { + this.salt = salt; + } + + /** Return true if this DeployLayerZeroAdaptersRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest = + (DeployLayerZeroAdaptersRequest) o; + return Objects.equals(this.vaultAccountId, deployLayerZeroAdaptersRequest.vaultAccountId) + && Objects.equals(this.createParams, deployLayerZeroAdaptersRequest.createParams) + && Objects.equals(this.displayName, deployLayerZeroAdaptersRequest.displayName) + && Objects.equals(this.useGasless, deployLayerZeroAdaptersRequest.useGasless) + && Objects.equals(this.feeLevel, deployLayerZeroAdaptersRequest.feeLevel) + && Objects.equals(this.fee, deployLayerZeroAdaptersRequest.fee) + && Objects.equals(this.salt, deployLayerZeroAdaptersRequest.salt); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, createParams, displayName, useGasless, feeLevel, fee, salt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployLayerZeroAdaptersRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" createParams: ").append(toIndentedString(createParams)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" salt: ").append(toIndentedString(salt)).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 `createParams` to the URL query string + if (getCreateParams() != null) { + for (int i = 0; i < getCreateParams().size(); i++) { + if (getCreateParams().get(i) != null) { + joiner.add( + getCreateParams() + .get(i) + .toUrlQueryString( + String.format( + "%screateParams%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // 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 `useGasless` to the URL query string + if (getUseGasless() != null) { + joiner.add( + String.format( + "%suseGasless%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getUseGasless()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `salt` to the URL query string + if (getSalt() != null) { + joiner.add( + String.format( + "%ssalt%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSalt()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DvnConfig.java b/src/main/java/com/fireblocks/sdk/model/DvnConfig.java new file mode 100644 index 00000000..f999f695 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DvnConfig.java @@ -0,0 +1,262 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DvnConfig */ +@JsonPropertyOrder({ + DvnConfig.JSON_PROPERTY_DVN_ADDRESSES, + DvnConfig.JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES, + DvnConfig.JSON_PROPERTY_OPTIONAL_THRESHOLD +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DvnConfig { + public static final String JSON_PROPERTY_DVN_ADDRESSES = "dvnAddresses"; + private List dvnAddresses = new ArrayList<>(); + + public static final String JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES = "optionalDVNAddresses"; + private List optionalDVNAddresses; + + public static final String JSON_PROPERTY_OPTIONAL_THRESHOLD = "optionalThreshold"; + private BigDecimal optionalThreshold; + + public DvnConfig() {} + + public DvnConfig dvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + return this; + } + + public DvnConfig addDvnAddressesItem(String dvnAddressesItem) { + if (this.dvnAddresses == null) { + this.dvnAddresses = new ArrayList<>(); + } + this.dvnAddresses.add(dvnAddressesItem); + return this; + } + + /** + * Array of required DVN Ethereum addresses that sign ULN messages. + * + * @return dvnAddresses + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDvnAddresses() { + return dvnAddresses; + } + + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + } + + public DvnConfig optionalDVNAddresses(List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + return this; + } + + public DvnConfig addOptionalDVNAddressesItem(String optionalDVNAddressesItem) { + if (this.optionalDVNAddresses == null) { + this.optionalDVNAddresses = new ArrayList<>(); + } + this.optionalDVNAddresses.add(optionalDVNAddressesItem); + return this; + } + + /** + * Array of optional DVN Ethereum addresses that sign ULN messages. + * + * @return optionalDVNAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOptionalDVNAddresses() { + return optionalDVNAddresses; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOptionalDVNAddresses(List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + } + + public DvnConfig optionalThreshold(BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + return this; + } + + /** + * Minimum number of DVN signatures required (M-of-N). + * + * @return optionalThreshold + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getOptionalThreshold() { + return optionalThreshold; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptionalThreshold(BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + } + + /** Return true if this DvnConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DvnConfig dvnConfig = (DvnConfig) o; + return Objects.equals(this.dvnAddresses, dvnConfig.dvnAddresses) + && Objects.equals(this.optionalDVNAddresses, dvnConfig.optionalDVNAddresses) + && Objects.equals(this.optionalThreshold, dvnConfig.optionalThreshold); + } + + @Override + public int hashCode() { + return Objects.hash(dvnAddresses, optionalDVNAddresses, optionalThreshold); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DvnConfig {\n"); + sb.append(" dvnAddresses: ").append(toIndentedString(dvnAddresses)).append("\n"); + sb.append(" optionalDVNAddresses: ") + .append(toIndentedString(optionalDVNAddresses)) + .append("\n"); + sb.append(" optionalThreshold: ") + .append(toIndentedString(optionalThreshold)) + .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 `dvnAddresses` to the URL query string + if (getDvnAddresses() != null) { + for (int i = 0; i < getDvnAddresses().size(); i++) { + joiner.add( + String.format( + "%sdvnAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDvnAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalDVNAddresses` to the URL query string + if (getOptionalDVNAddresses() != null) { + for (int i = 0; i < getOptionalDVNAddresses().size(); i++) { + joiner.add( + String.format( + "%soptionalDVNAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getOptionalDVNAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalThreshold` to the URL query string + if (getOptionalThreshold() != null) { + joiner.add( + String.format( + "%soptionalThreshold%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOptionalThreshold()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DvnConfigWithConfirmations.java b/src/main/java/com/fireblocks/sdk/model/DvnConfigWithConfirmations.java new file mode 100644 index 00000000..b31b0f01 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DvnConfigWithConfirmations.java @@ -0,0 +1,306 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** DvnConfigWithConfirmations */ +@JsonPropertyOrder({ + DvnConfigWithConfirmations.JSON_PROPERTY_DVN_ADDRESSES, + DvnConfigWithConfirmations.JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES, + DvnConfigWithConfirmations.JSON_PROPERTY_OPTIONAL_THRESHOLD, + DvnConfigWithConfirmations.JSON_PROPERTY_CONFIRMATIONS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DvnConfigWithConfirmations { + public static final String JSON_PROPERTY_DVN_ADDRESSES = "dvnAddresses"; + private List dvnAddresses = new ArrayList<>(); + + public static final String JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES = "optionalDVNAddresses"; + private List optionalDVNAddresses; + + public static final String JSON_PROPERTY_OPTIONAL_THRESHOLD = "optionalThreshold"; + private BigDecimal optionalThreshold; + + public static final String JSON_PROPERTY_CONFIRMATIONS = "confirmations"; + private BigDecimal confirmations; + + public DvnConfigWithConfirmations() {} + + public DvnConfigWithConfirmations dvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + return this; + } + + public DvnConfigWithConfirmations addDvnAddressesItem(String dvnAddressesItem) { + if (this.dvnAddresses == null) { + this.dvnAddresses = new ArrayList<>(); + } + this.dvnAddresses.add(dvnAddressesItem); + return this; + } + + /** + * Array of required DVN Ethereum addresses that sign ULN messages. + * + * @return dvnAddresses + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDvnAddresses() { + return dvnAddresses; + } + + @JsonProperty(JSON_PROPERTY_DVN_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDvnAddresses(List dvnAddresses) { + this.dvnAddresses = dvnAddresses; + } + + public DvnConfigWithConfirmations optionalDVNAddresses(List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + return this; + } + + public DvnConfigWithConfirmations addOptionalDVNAddressesItem(String optionalDVNAddressesItem) { + if (this.optionalDVNAddresses == null) { + this.optionalDVNAddresses = new ArrayList<>(); + } + this.optionalDVNAddresses.add(optionalDVNAddressesItem); + return this; + } + + /** + * Array of optional DVN Ethereum addresses that sign ULN messages. + * + * @return optionalDVNAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOptionalDVNAddresses() { + return optionalDVNAddresses; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_D_V_N_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOptionalDVNAddresses(List optionalDVNAddresses) { + this.optionalDVNAddresses = optionalDVNAddresses; + } + + public DvnConfigWithConfirmations optionalThreshold(BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + return this; + } + + /** + * Minimum number of DVN signatures required (M-of-N). + * + * @return optionalThreshold + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getOptionalThreshold() { + return optionalThreshold; + } + + @JsonProperty(JSON_PROPERTY_OPTIONAL_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setOptionalThreshold(BigDecimal optionalThreshold) { + this.optionalThreshold = optionalThreshold; + } + + public DvnConfigWithConfirmations confirmations(BigDecimal confirmations) { + this.confirmations = confirmations; + return this; + } + + /** + * Number of block confirmations required + * + * @return confirmations + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONFIRMATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getConfirmations() { + return confirmations; + } + + @JsonProperty(JSON_PROPERTY_CONFIRMATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConfirmations(BigDecimal confirmations) { + this.confirmations = confirmations; + } + + /** Return true if this DvnConfigWithConfirmations object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DvnConfigWithConfirmations dvnConfigWithConfirmations = (DvnConfigWithConfirmations) o; + return Objects.equals(this.dvnAddresses, dvnConfigWithConfirmations.dvnAddresses) + && Objects.equals( + this.optionalDVNAddresses, dvnConfigWithConfirmations.optionalDVNAddresses) + && Objects.equals( + this.optionalThreshold, dvnConfigWithConfirmations.optionalThreshold) + && Objects.equals(this.confirmations, dvnConfigWithConfirmations.confirmations); + } + + @Override + public int hashCode() { + return Objects.hash(dvnAddresses, optionalDVNAddresses, optionalThreshold, confirmations); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DvnConfigWithConfirmations {\n"); + sb.append(" dvnAddresses: ").append(toIndentedString(dvnAddresses)).append("\n"); + sb.append(" optionalDVNAddresses: ") + .append(toIndentedString(optionalDVNAddresses)) + .append("\n"); + sb.append(" optionalThreshold: ") + .append(toIndentedString(optionalThreshold)) + .append("\n"); + sb.append(" confirmations: ").append(toIndentedString(confirmations)).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 `dvnAddresses` to the URL query string + if (getDvnAddresses() != null) { + for (int i = 0; i < getDvnAddresses().size(); i++) { + joiner.add( + String.format( + "%sdvnAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDvnAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalDVNAddresses` to the URL query string + if (getOptionalDVNAddresses() != null) { + for (int i = 0; i < getOptionalDVNAddresses().size(); i++) { + joiner.add( + String.format( + "%soptionalDVNAddresses%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getOptionalDVNAddresses().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `optionalThreshold` to the URL query string + if (getOptionalThreshold() != null) { + joiner.add( + String.format( + "%soptionalThreshold%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getOptionalThreshold()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `confirmations` to the URL query string + if (getConfirmations() != null) { + joiner.add( + String.format( + "%sconfirmations%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getConfirmations()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FeeInfo.java b/src/main/java/com/fireblocks/sdk/model/FeeInfo.java index ec0f8ebf..77026175 100644 --- a/src/main/java/com/fireblocks/sdk/model/FeeInfo.java +++ b/src/main/java/com/fireblocks/sdk/model/FeeInfo.java @@ -31,7 +31,8 @@ FeeInfo.JSON_PROPERTY_PAID_BY_RELAY, FeeInfo.JSON_PROPERTY_RELAY_TYPE, FeeInfo.JSON_PROPERTY_RELAY_ID, - FeeInfo.JSON_PROPERTY_RELAY_NAME + FeeInfo.JSON_PROPERTY_RELAY_NAME, + FeeInfo.JSON_PROPERTY_FEE_U_S_D }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FeeInfo { @@ -89,6 +90,9 @@ public static RelayTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_RELAY_NAME = "relayName"; private String relayName; + public static final String JSON_PROPERTY_FEE_U_S_D = "feeUSD"; + private String feeUSD; + public FeeInfo() {} public FeeInfo networkFee(String networkFee) { @@ -253,6 +257,29 @@ public void setRelayName(String relayName) { this.relayName = relayName; } + public FeeInfo feeUSD(String feeUSD) { + this.feeUSD = feeUSD; + return this; + } + + /** + * The USD value of the fee + * + * @return feeUSD + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_U_S_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFeeUSD() { + return feeUSD; + } + + @JsonProperty(JSON_PROPERTY_FEE_U_S_D) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeUSD(String feeUSD) { + this.feeUSD = feeUSD; + } + /** Return true if this FeeInfo object is equal to o. */ @Override public boolean equals(Object o) { @@ -269,13 +296,21 @@ public boolean equals(Object o) { && Objects.equals(this.paidByRelay, feeInfo.paidByRelay) && Objects.equals(this.relayType, feeInfo.relayType) && Objects.equals(this.relayId, feeInfo.relayId) - && Objects.equals(this.relayName, feeInfo.relayName); + && Objects.equals(this.relayName, feeInfo.relayName) + && Objects.equals(this.feeUSD, feeInfo.feeUSD); } @Override public int hashCode() { return Objects.hash( - networkFee, serviceFee, gasPrice, paidByRelay, relayType, relayId, relayName); + networkFee, + serviceFee, + gasPrice, + paidByRelay, + relayType, + relayId, + relayName, + feeUSD); } @Override @@ -289,6 +324,7 @@ public String toString() { sb.append(" relayType: ").append(toIndentedString(relayType)).append("\n"); sb.append(" relayId: ").append(toIndentedString(relayId)).append("\n"); sb.append(" relayName: ").append(toIndentedString(relayName)).append("\n"); + sb.append(" feeUSD: ").append(toIndentedString(feeUSD)).append("\n"); sb.append("}"); return sb.toString(); } @@ -419,6 +455,17 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `feeUSD` to the URL query string + if (getFeeUSD() != null) { + joiner.add( + String.format( + "%sfeeUSD%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeUSD()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponse.java b/src/main/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponse.java new file mode 100644 index 00000000..91b3b5be --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponse.java @@ -0,0 +1,216 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** GetLayerZeroDvnConfigResponse */ +@JsonPropertyOrder({ + GetLayerZeroDvnConfigResponse.JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID, + GetLayerZeroDvnConfigResponse.JSON_PROPERTY_CHANNEL_CONFIGS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetLayerZeroDvnConfigResponse { + public static final String JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID = + "sourceAdapterTokenLinkId"; + private UUID sourceAdapterTokenLinkId; + + public static final String JSON_PROPERTY_CHANNEL_CONFIGS = "channelConfigs"; + private List channelConfigs = new ArrayList<>(); + + public GetLayerZeroDvnConfigResponse() {} + + public GetLayerZeroDvnConfigResponse sourceAdapterTokenLinkId(UUID sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + return this; + } + + /** + * Token-link ID of the adapter for which DVN configuration was queried. + * + * @return sourceAdapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSourceAdapterTokenLinkId() { + return sourceAdapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceAdapterTokenLinkId(UUID sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + } + + public GetLayerZeroDvnConfigResponse channelConfigs( + List channelConfigs) { + this.channelConfigs = channelConfigs; + return this; + } + + public GetLayerZeroDvnConfigResponse addChannelConfigsItem( + ChannelDvnConfigWithConfirmations channelConfigsItem) { + if (this.channelConfigs == null) { + this.channelConfigs = new ArrayList<>(); + } + this.channelConfigs.add(channelConfigsItem); + return this; + } + + /** + * DVN configurations for each discovered (or explicitly requested) channel between the source + * adapter and its peers. + * + * @return channelConfigs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHANNEL_CONFIGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChannelConfigs() { + return channelConfigs; + } + + @JsonProperty(JSON_PROPERTY_CHANNEL_CONFIGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChannelConfigs(List channelConfigs) { + this.channelConfigs = channelConfigs; + } + + /** Return true if this GetLayerZeroDvnConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLayerZeroDvnConfigResponse getLayerZeroDvnConfigResponse = + (GetLayerZeroDvnConfigResponse) o; + return Objects.equals( + this.sourceAdapterTokenLinkId, + getLayerZeroDvnConfigResponse.sourceAdapterTokenLinkId) + && Objects.equals( + this.channelConfigs, getLayerZeroDvnConfigResponse.channelConfigs); + } + + @Override + public int hashCode() { + return Objects.hash(sourceAdapterTokenLinkId, channelConfigs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetLayerZeroDvnConfigResponse {\n"); + sb.append(" sourceAdapterTokenLinkId: ") + .append(toIndentedString(sourceAdapterTokenLinkId)) + .append("\n"); + sb.append(" channelConfigs: ").append(toIndentedString(channelConfigs)).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 `sourceAdapterTokenLinkId` to the URL query string + if (getSourceAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%ssourceAdapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSourceAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `channelConfigs` to the URL query string + if (getChannelConfigs() != null) { + for (int i = 0; i < getChannelConfigs().size(); i++) { + if (getChannelConfigs().get(i) != null) { + joiner.add( + getChannelConfigs() + .get(i) + .toUrlQueryString( + String.format( + "%schannelConfigs%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/GetLayerZeroPeersResponse.java b/src/main/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponse.java new file mode 100644 index 00000000..5fc2ddd1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponse.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** GetLayerZeroPeersResponse */ +@JsonPropertyOrder({ + GetLayerZeroPeersResponse.JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID, + GetLayerZeroPeersResponse.JSON_PROPERTY_ADAPTER_ADDRESS, + GetLayerZeroPeersResponse.JSON_PROPERTY_PEERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetLayerZeroPeersResponse { + public static final String JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID = "adapterTokenLinkId"; + private UUID adapterTokenLinkId; + + public static final String JSON_PROPERTY_ADAPTER_ADDRESS = "adapterAddress"; + private String adapterAddress; + + public static final String JSON_PROPERTY_PEERS = "peers"; + private List peers = new ArrayList<>(); + + public GetLayerZeroPeersResponse() {} + + public GetLayerZeroPeersResponse adapterTokenLinkId(UUID adapterTokenLinkId) { + this.adapterTokenLinkId = adapterTokenLinkId; + return this; + } + + /** + * The token link id of the adapter + * + * @return adapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getAdapterTokenLinkId() { + return adapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterTokenLinkId(UUID adapterTokenLinkId) { + this.adapterTokenLinkId = adapterTokenLinkId; + } + + public GetLayerZeroPeersResponse adapterAddress(String adapterAddress) { + this.adapterAddress = adapterAddress; + return this; + } + + /** + * The adapter address + * + * @return adapterAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAdapterAddress() { + return adapterAddress; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterAddress(String adapterAddress) { + this.adapterAddress = adapterAddress; + } + + public GetLayerZeroPeersResponse peers(List peers) { + this.peers = peers; + return this; + } + + public GetLayerZeroPeersResponse addPeersItem(PeerAdapterInfo peersItem) { + if (this.peers == null) { + this.peers = new ArrayList<>(); + } + this.peers.add(peersItem); + return this; + } + + /** + * The peers for the adapter + * + * @return peers + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PEERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPeers() { + return peers; + } + + @JsonProperty(JSON_PROPERTY_PEERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPeers(List peers) { + this.peers = peers; + } + + /** Return true if this GetLayerZeroPeersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLayerZeroPeersResponse getLayerZeroPeersResponse = (GetLayerZeroPeersResponse) o; + return Objects.equals(this.adapterTokenLinkId, getLayerZeroPeersResponse.adapterTokenLinkId) + && Objects.equals(this.adapterAddress, getLayerZeroPeersResponse.adapterAddress) + && Objects.equals(this.peers, getLayerZeroPeersResponse.peers); + } + + @Override + public int hashCode() { + return Objects.hash(adapterTokenLinkId, adapterAddress, peers); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetLayerZeroPeersResponse {\n"); + sb.append(" adapterTokenLinkId: ") + .append(toIndentedString(adapterTokenLinkId)) + .append("\n"); + sb.append(" adapterAddress: ").append(toIndentedString(adapterAddress)).append("\n"); + sb.append(" peers: ").append(toIndentedString(peers)).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 `adapterTokenLinkId` to the URL query string + if (getAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%sadapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `adapterAddress` to the URL query string + if (getAdapterAddress() != null) { + joiner.add( + String.format( + "%sadapterAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdapterAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `peers` to the URL query string + if (getPeers() != null) { + for (int i = 0; i < getPeers().size(); i++) { + if (getPeers().get(i) != null) { + joiner.add( + getPeers() + .get(i) + .toUrlQueryString( + String.format( + "%speers%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/LayerZeroAdapterCreateParams.java b/src/main/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParams.java new file mode 100644 index 00000000..7f87c872 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParams.java @@ -0,0 +1,274 @@ +/* + * 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; + +/** LayerZeroAdapterCreateParams */ +@JsonPropertyOrder({ + LayerZeroAdapterCreateParams.JSON_PROPERTY_TOKEN_LINK_ID, + LayerZeroAdapterCreateParams.JSON_PROPERTY_DELEGATE_ADDRESS, + LayerZeroAdapterCreateParams.JSON_PROPERTY_DEFAULT_ADMIN_ADDRESS, + LayerZeroAdapterCreateParams.JSON_PROPERTY_PAUSER_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LayerZeroAdapterCreateParams { + public static final String JSON_PROPERTY_TOKEN_LINK_ID = "tokenLinkId"; + private String tokenLinkId; + + public static final String JSON_PROPERTY_DELEGATE_ADDRESS = "delegateAddress"; + private String delegateAddress; + + public static final String JSON_PROPERTY_DEFAULT_ADMIN_ADDRESS = "defaultAdminAddress"; + private String defaultAdminAddress; + + public static final String JSON_PROPERTY_PAUSER_ADDRESS = "pauserAddress"; + private String pauserAddress; + + public LayerZeroAdapterCreateParams() {} + + public LayerZeroAdapterCreateParams tokenLinkId(String tokenLinkId) { + this.tokenLinkId = tokenLinkId; + return this; + } + + /** + * The token link id of the base token to deploy the adapters for + * + * @return tokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTokenLinkId() { + return tokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTokenLinkId(String tokenLinkId) { + this.tokenLinkId = tokenLinkId; + } + + public LayerZeroAdapterCreateParams delegateAddress(String delegateAddress) { + this.delegateAddress = delegateAddress; + return this; + } + + /** + * Address that will receive `CONTRACT_ADMIN_ROLE`. + * + * @return delegateAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DELEGATE_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDelegateAddress() { + return delegateAddress; + } + + @JsonProperty(JSON_PROPERTY_DELEGATE_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDelegateAddress(String delegateAddress) { + this.delegateAddress = delegateAddress; + } + + public LayerZeroAdapterCreateParams defaultAdminAddress(String defaultAdminAddress) { + this.defaultAdminAddress = defaultAdminAddress; + return this; + } + + /** + * Address that will receive `DEFAULT_ADMIN_ROLE` on the adapter contract. + * + * @return defaultAdminAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEFAULT_ADMIN_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDefaultAdminAddress() { + return defaultAdminAddress; + } + + @JsonProperty(JSON_PROPERTY_DEFAULT_ADMIN_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDefaultAdminAddress(String defaultAdminAddress) { + this.defaultAdminAddress = defaultAdminAddress; + } + + public LayerZeroAdapterCreateParams pauserAddress(String pauserAddress) { + this.pauserAddress = pauserAddress; + return this; + } + + /** + * Address that will receive `PAUSER_ROLE`. + * + * @return pauserAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PAUSER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPauserAddress() { + return pauserAddress; + } + + @JsonProperty(JSON_PROPERTY_PAUSER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPauserAddress(String pauserAddress) { + this.pauserAddress = pauserAddress; + } + + /** Return true if this LayerZeroAdapterCreateParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LayerZeroAdapterCreateParams layerZeroAdapterCreateParams = + (LayerZeroAdapterCreateParams) o; + return Objects.equals(this.tokenLinkId, layerZeroAdapterCreateParams.tokenLinkId) + && Objects.equals( + this.delegateAddress, layerZeroAdapterCreateParams.delegateAddress) + && Objects.equals( + this.defaultAdminAddress, layerZeroAdapterCreateParams.defaultAdminAddress) + && Objects.equals(this.pauserAddress, layerZeroAdapterCreateParams.pauserAddress); + } + + @Override + public int hashCode() { + return Objects.hash(tokenLinkId, delegateAddress, defaultAdminAddress, pauserAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LayerZeroAdapterCreateParams {\n"); + sb.append(" tokenLinkId: ").append(toIndentedString(tokenLinkId)).append("\n"); + sb.append(" delegateAddress: ").append(toIndentedString(delegateAddress)).append("\n"); + sb.append(" defaultAdminAddress: ") + .append(toIndentedString(defaultAdminAddress)) + .append("\n"); + sb.append(" pauserAddress: ").append(toIndentedString(pauserAddress)).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 `tokenLinkId` to the URL query string + if (getTokenLinkId() != null) { + joiner.add( + String.format( + "%stokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `delegateAddress` to the URL query string + if (getDelegateAddress() != null) { + joiner.add( + String.format( + "%sdelegateAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDelegateAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `defaultAdminAddress` to the URL query string + if (getDefaultAdminAddress() != null) { + joiner.add( + String.format( + "%sdefaultAdminAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDefaultAdminAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `pauserAddress` to the URL query string + if (getPauserAddress() != null) { + joiner.add( + String.format( + "%spauserAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPauserAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PeerAdapterInfo.java b/src/main/java/com/fireblocks/sdk/model/PeerAdapterInfo.java new file mode 100644 index 00000000..fa750450 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PeerAdapterInfo.java @@ -0,0 +1,230 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** PeerAdapterInfo */ +@JsonPropertyOrder({ + PeerAdapterInfo.JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID, + PeerAdapterInfo.JSON_PROPERTY_ADAPTER_ADDRESS, + PeerAdapterInfo.JSON_PROPERTY_BASE_ASSET_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PeerAdapterInfo { + public static final String JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID = "adapterTokenLinkId"; + private UUID adapterTokenLinkId; + + public static final String JSON_PROPERTY_ADAPTER_ADDRESS = "adapterAddress"; + private String adapterAddress; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + private String baseAssetId; + + public PeerAdapterInfo() {} + + public PeerAdapterInfo adapterTokenLinkId(UUID adapterTokenLinkId) { + this.adapterTokenLinkId = adapterTokenLinkId; + return this; + } + + /** + * The token link id of the adapter + * + * @return adapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getAdapterTokenLinkId() { + return adapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterTokenLinkId(UUID adapterTokenLinkId) { + this.adapterTokenLinkId = adapterTokenLinkId; + } + + public PeerAdapterInfo adapterAddress(String adapterAddress) { + this.adapterAddress = adapterAddress; + return this; + } + + /** + * The adapter address + * + * @return adapterAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAdapterAddress() { + return adapterAddress; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterAddress(String adapterAddress) { + this.adapterAddress = adapterAddress; + } + + public PeerAdapterInfo baseAssetId(String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The base asset id for the base asset that the adapter is deployed on + * + * @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; + } + + /** Return true if this PeerAdapterInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PeerAdapterInfo peerAdapterInfo = (PeerAdapterInfo) o; + return Objects.equals(this.adapterTokenLinkId, peerAdapterInfo.adapterTokenLinkId) + && Objects.equals(this.adapterAddress, peerAdapterInfo.adapterAddress) + && Objects.equals(this.baseAssetId, peerAdapterInfo.baseAssetId); + } + + @Override + public int hashCode() { + return Objects.hash(adapterTokenLinkId, adapterAddress, baseAssetId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PeerAdapterInfo {\n"); + sb.append(" adapterTokenLinkId: ") + .append(toIndentedString(adapterTokenLinkId)) + .append("\n"); + sb.append(" adapterAddress: ").append(toIndentedString(adapterAddress)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).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 `adapterTokenLinkId` to the URL query string + if (getAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%sadapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `adapterAddress` to the URL query string + if (getAdapterAddress() != null) { + joiner.add( + String.format( + "%sadapterAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdapterAddress()), + 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"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResult.java b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResult.java new file mode 100644 index 00000000..4cddb9e3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResult.java @@ -0,0 +1,145 @@ +/* + * 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; + +/** RemoveLayerZeroAdapterFailedResult */ +@JsonPropertyOrder({RemoveLayerZeroAdapterFailedResult.JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RemoveLayerZeroAdapterFailedResult { + public static final String JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID = "adapterTokenLinkId"; + private String adapterTokenLinkId; + + public RemoveLayerZeroAdapterFailedResult() {} + + public RemoveLayerZeroAdapterFailedResult adapterTokenLinkId(String adapterTokenLinkId) { + this.adapterTokenLinkId = adapterTokenLinkId; + return this; + } + + /** + * The adapter token link ID that failed to be removed + * + * @return adapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAdapterTokenLinkId() { + return adapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterTokenLinkId(String adapterTokenLinkId) { + this.adapterTokenLinkId = adapterTokenLinkId; + } + + /** Return true if this RemoveLayerZeroAdapterFailedResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveLayerZeroAdapterFailedResult removeLayerZeroAdapterFailedResult = + (RemoveLayerZeroAdapterFailedResult) o; + return Objects.equals( + this.adapterTokenLinkId, removeLayerZeroAdapterFailedResult.adapterTokenLinkId); + } + + @Override + public int hashCode() { + return Objects.hash(adapterTokenLinkId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveLayerZeroAdapterFailedResult {\n"); + sb.append(" adapterTokenLinkId: ") + .append(toIndentedString(adapterTokenLinkId)) + .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 `adapterTokenLinkId` to the URL query string + if (getAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%sadapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequest.java b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequest.java new file mode 100644 index 00000000..fc206b58 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequest.java @@ -0,0 +1,209 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** RemoveLayerZeroAdaptersRequest */ +@JsonPropertyOrder({ + RemoveLayerZeroAdaptersRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + RemoveLayerZeroAdaptersRequest.JSON_PROPERTY_ADAPTER_TOKEN_LINK_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RemoveLayerZeroAdaptersRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_ADAPTER_TOKEN_LINK_IDS = "adapterTokenLinkIds"; + private List adapterTokenLinkIds = new ArrayList<>(); + + public RemoveLayerZeroAdaptersRequest() {} + + public RemoveLayerZeroAdaptersRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account ID to use for signing the role revocation transactions. + * + * @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 RemoveLayerZeroAdaptersRequest adapterTokenLinkIds(List adapterTokenLinkIds) { + this.adapterTokenLinkIds = adapterTokenLinkIds; + return this; + } + + public RemoveLayerZeroAdaptersRequest addAdapterTokenLinkIdsItem(UUID adapterTokenLinkIdsItem) { + if (this.adapterTokenLinkIds == null) { + this.adapterTokenLinkIds = new ArrayList<>(); + } + this.adapterTokenLinkIds.add(adapterTokenLinkIdsItem); + return this; + } + + /** + * A list of adapter token link IDs to be deactivated and unlinked. + * + * @return adapterTokenLinkIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAdapterTokenLinkIds() { + return adapterTokenLinkIds; + } + + @JsonProperty(JSON_PROPERTY_ADAPTER_TOKEN_LINK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAdapterTokenLinkIds(List adapterTokenLinkIds) { + this.adapterTokenLinkIds = adapterTokenLinkIds; + } + + /** Return true if this RemoveLayerZeroAdaptersRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest = + (RemoveLayerZeroAdaptersRequest) o; + return Objects.equals(this.vaultAccountId, removeLayerZeroAdaptersRequest.vaultAccountId) + && Objects.equals( + this.adapterTokenLinkIds, + removeLayerZeroAdaptersRequest.adapterTokenLinkIds); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, adapterTokenLinkIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveLayerZeroAdaptersRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" adapterTokenLinkIds: ") + .append(toIndentedString(adapterTokenLinkIds)) + .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 `adapterTokenLinkIds` to the URL query string + if (getAdapterTokenLinkIds() != null) { + for (int i = 0; i < getAdapterTokenLinkIds().size(); i++) { + if (getAdapterTokenLinkIds().get(i) != null) { + joiner.add( + String.format( + "%sadapterTokenLinkIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getAdapterTokenLinkIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponse.java b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponse.java new file mode 100644 index 00000000..eb2f7109 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponse.java @@ -0,0 +1,221 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** RemoveLayerZeroAdaptersResponse */ +@JsonPropertyOrder({ + RemoveLayerZeroAdaptersResponse.JSON_PROPERTY_DEACTIVATED, + RemoveLayerZeroAdaptersResponse.JSON_PROPERTY_FAILED +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RemoveLayerZeroAdaptersResponse { + public static final String JSON_PROPERTY_DEACTIVATED = "deactivated"; + private List deactivated = new ArrayList<>(); + + public static final String JSON_PROPERTY_FAILED = "failed"; + private List failed = new ArrayList<>(); + + public RemoveLayerZeroAdaptersResponse() {} + + public RemoveLayerZeroAdaptersResponse deactivated(List deactivated) { + this.deactivated = deactivated; + return this; + } + + public RemoveLayerZeroAdaptersResponse addDeactivatedItem(String deactivatedItem) { + if (this.deactivated == null) { + this.deactivated = new ArrayList<>(); + } + this.deactivated.add(deactivatedItem); + return this; + } + + /** + * List of successfully deactivated adapter token link IDs + * + * @return deactivated + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DEACTIVATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDeactivated() { + return deactivated; + } + + @JsonProperty(JSON_PROPERTY_DEACTIVATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDeactivated(List deactivated) { + this.deactivated = deactivated; + } + + public RemoveLayerZeroAdaptersResponse failed(List failed) { + this.failed = failed; + return this; + } + + public RemoveLayerZeroAdaptersResponse addFailedItem( + RemoveLayerZeroAdapterFailedResult failedItem) { + if (this.failed == null) { + this.failed = new ArrayList<>(); + } + this.failed.add(failedItem); + return this; + } + + /** + * List of adapter token link IDs that failed to be removed + * + * @return failed + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFailed() { + return failed; + } + + @JsonProperty(JSON_PROPERTY_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFailed(List failed) { + this.failed = failed; + } + + /** Return true if this RemoveLayerZeroAdaptersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveLayerZeroAdaptersResponse removeLayerZeroAdaptersResponse = + (RemoveLayerZeroAdaptersResponse) o; + return Objects.equals(this.deactivated, removeLayerZeroAdaptersResponse.deactivated) + && Objects.equals(this.failed, removeLayerZeroAdaptersResponse.failed); + } + + @Override + public int hashCode() { + return Objects.hash(deactivated, failed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveLayerZeroAdaptersResponse {\n"); + sb.append(" deactivated: ").append(toIndentedString(deactivated)).append("\n"); + sb.append(" failed: ").append(toIndentedString(failed)).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 `deactivated` to the URL query string + if (getDeactivated() != null) { + for (int i = 0; i < getDeactivated().size(); i++) { + joiner.add( + String.format( + "%sdeactivated%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getDeactivated().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `failed` to the URL query string + if (getFailed() != null) { + for (int i = 0; i < getFailed().size(); i++) { + if (getFailed().get(i) != null) { + joiner.add( + getFailed() + .get(i) + .toUrlQueryString( + String.format( + "%sfailed%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/RemoveLayerZeroPeersRequest.java b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequest.java new file mode 100644 index 00000000..61552916 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequest.java @@ -0,0 +1,306 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** RemoveLayerZeroPeersRequest */ +@JsonPropertyOrder({ + RemoveLayerZeroPeersRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + RemoveLayerZeroPeersRequest.JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID, + RemoveLayerZeroPeersRequest.JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS, + RemoveLayerZeroPeersRequest.JSON_PROPERTY_BIDIRECTIONAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RemoveLayerZeroPeersRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID = + "sourceAdapterTokenLinkId"; + private UUID sourceAdapterTokenLinkId; + + public static final String JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS = + "destinationAdapterTokenLinkIds"; + private List destinationAdapterTokenLinkIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_BIDIRECTIONAL = "bidirectional"; + private Boolean bidirectional; + + public RemoveLayerZeroPeersRequest() {} + + public RemoveLayerZeroPeersRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that will be used to inititate transactions ot set peers + * + * @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 RemoveLayerZeroPeersRequest sourceAdapterTokenLinkId(UUID sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + return this; + } + + /** + * `token_link` ID of the source adapter contract + * + * @return sourceAdapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSourceAdapterTokenLinkId() { + return sourceAdapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceAdapterTokenLinkId(UUID sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + } + + public RemoveLayerZeroPeersRequest destinationAdapterTokenLinkIds( + List destinationAdapterTokenLinkIds) { + this.destinationAdapterTokenLinkIds = destinationAdapterTokenLinkIds; + return this; + } + + public RemoveLayerZeroPeersRequest addDestinationAdapterTokenLinkIdsItem( + UUID destinationAdapterTokenLinkIdsItem) { + if (this.destinationAdapterTokenLinkIds == null) { + this.destinationAdapterTokenLinkIds = new ArrayList<>(); + } + this.destinationAdapterTokenLinkIds.add(destinationAdapterTokenLinkIdsItem); + return this; + } + + /** + * Array of `token_link` IDs for destination adapter contracts + * + * @return destinationAdapterTokenLinkIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDestinationAdapterTokenLinkIds() { + return destinationAdapterTokenLinkIds; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationAdapterTokenLinkIds(List destinationAdapterTokenLinkIds) { + this.destinationAdapterTokenLinkIds = destinationAdapterTokenLinkIds; + } + + public RemoveLayerZeroPeersRequest bidirectional(Boolean bidirectional) { + this.bidirectional = bidirectional; + return this; + } + + /** + * If true, also sets peers from destination(s) back to source + * + * @return bidirectional + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BIDIRECTIONAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBidirectional() { + return bidirectional; + } + + @JsonProperty(JSON_PROPERTY_BIDIRECTIONAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBidirectional(Boolean bidirectional) { + this.bidirectional = bidirectional; + } + + /** Return true if this RemoveLayerZeroPeersRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest = (RemoveLayerZeroPeersRequest) o; + return Objects.equals(this.vaultAccountId, removeLayerZeroPeersRequest.vaultAccountId) + && Objects.equals( + this.sourceAdapterTokenLinkId, + removeLayerZeroPeersRequest.sourceAdapterTokenLinkId) + && Objects.equals( + this.destinationAdapterTokenLinkIds, + removeLayerZeroPeersRequest.destinationAdapterTokenLinkIds) + && Objects.equals(this.bidirectional, removeLayerZeroPeersRequest.bidirectional); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, + sourceAdapterTokenLinkId, + destinationAdapterTokenLinkIds, + bidirectional); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveLayerZeroPeersRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" sourceAdapterTokenLinkId: ") + .append(toIndentedString(sourceAdapterTokenLinkId)) + .append("\n"); + sb.append(" destinationAdapterTokenLinkIds: ") + .append(toIndentedString(destinationAdapterTokenLinkIds)) + .append("\n"); + sb.append(" bidirectional: ").append(toIndentedString(bidirectional)).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 `sourceAdapterTokenLinkId` to the URL query string + if (getSourceAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%ssourceAdapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSourceAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `destinationAdapterTokenLinkIds` to the URL query string + if (getDestinationAdapterTokenLinkIds() != null) { + for (int i = 0; i < getDestinationAdapterTokenLinkIds().size(); i++) { + if (getDestinationAdapterTokenLinkIds().get(i) != null) { + joiner.add( + String.format( + "%sdestinationAdapterTokenLinkIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf( + getDestinationAdapterTokenLinkIds() + .get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `bidirectional` to the URL query string + if (getBidirectional() != null) { + joiner.add( + String.format( + "%sbidirectional%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBidirectional()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponse.java b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponse.java new file mode 100644 index 00000000..bba6a62a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponse.java @@ -0,0 +1,162 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** RemoveLayerZeroPeersResponse */ +@JsonPropertyOrder({RemoveLayerZeroPeersResponse.JSON_PROPERTY_TXN_IDS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RemoveLayerZeroPeersResponse { + public static final String JSON_PROPERTY_TXN_IDS = "txnIds"; + private List txnIds = new ArrayList<>(); + + public RemoveLayerZeroPeersResponse() {} + + public RemoveLayerZeroPeersResponse txnIds(List txnIds) { + this.txnIds = txnIds; + return this; + } + + public RemoveLayerZeroPeersResponse addTxnIdsItem(UUID txnIdsItem) { + if (this.txnIds == null) { + this.txnIds = new ArrayList<>(); + } + this.txnIds.add(txnIdsItem); + return this; + } + + /** + * Array of fireblocks transaction IDs, each corresponding to an on-chain transaction to set + * peers + * + * @return txnIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TXN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTxnIds() { + return txnIds; + } + + @JsonProperty(JSON_PROPERTY_TXN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxnIds(List txnIds) { + this.txnIds = txnIds; + } + + /** Return true if this RemoveLayerZeroPeersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveLayerZeroPeersResponse removeLayerZeroPeersResponse = + (RemoveLayerZeroPeersResponse) o; + return Objects.equals(this.txnIds, removeLayerZeroPeersResponse.txnIds); + } + + @Override + public int hashCode() { + return Objects.hash(txnIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveLayerZeroPeersResponse {\n"); + sb.append(" txnIds: ").append(toIndentedString(txnIds)).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 `txnIds` to the URL query string + if (getTxnIds() != null) { + for (int i = 0; i < getTxnIds().size(); i++) { + if (getTxnIds().get(i) != null) { + joiner.add( + String.format( + "%stxnIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTxnIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequest.java b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequest.java new file mode 100644 index 00000000..517150a4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequest.java @@ -0,0 +1,312 @@ +/* + * 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; + +/** SetLayerZeroDvnConfigRequest */ +@JsonPropertyOrder({ + SetLayerZeroDvnConfigRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + SetLayerZeroDvnConfigRequest.JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID, + SetLayerZeroDvnConfigRequest.JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_ID, + SetLayerZeroDvnConfigRequest.JSON_PROPERTY_SEND_CONFIG, + SetLayerZeroDvnConfigRequest.JSON_PROPERTY_RECEIVE_CONFIG +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetLayerZeroDvnConfigRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID = + "sourceAdapterTokenLinkId"; + private String sourceAdapterTokenLinkId; + + public static final String JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_ID = + "destinationAdapterTokenLinkId"; + private String destinationAdapterTokenLinkId; + + public static final String JSON_PROPERTY_SEND_CONFIG = "sendConfig"; + private DvnConfig sendConfig; + + public static final String JSON_PROPERTY_RECEIVE_CONFIG = "receiveConfig"; + private DvnConfig receiveConfig; + + public SetLayerZeroDvnConfigRequest() {} + + public SetLayerZeroDvnConfigRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * Vault account that pays gas + * + * @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 SetLayerZeroDvnConfigRequest sourceAdapterTokenLinkId(String sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + return this; + } + + /** + * Source adapter TokenLink ID + * + * @return sourceAdapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceAdapterTokenLinkId() { + return sourceAdapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceAdapterTokenLinkId(String sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + } + + public SetLayerZeroDvnConfigRequest destinationAdapterTokenLinkId( + String destinationAdapterTokenLinkId) { + this.destinationAdapterTokenLinkId = destinationAdapterTokenLinkId; + return this; + } + + /** + * Destination adapter TokenLink ID + * + * @return destinationAdapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDestinationAdapterTokenLinkId() { + return destinationAdapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationAdapterTokenLinkId(String destinationAdapterTokenLinkId) { + this.destinationAdapterTokenLinkId = destinationAdapterTokenLinkId; + } + + public SetLayerZeroDvnConfigRequest sendConfig(DvnConfig sendConfig) { + this.sendConfig = sendConfig; + return this; + } + + /** + * Get sendConfig + * + * @return sendConfig + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SEND_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DvnConfig getSendConfig() { + return sendConfig; + } + + @JsonProperty(JSON_PROPERTY_SEND_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSendConfig(DvnConfig sendConfig) { + this.sendConfig = sendConfig; + } + + public SetLayerZeroDvnConfigRequest receiveConfig(DvnConfig receiveConfig) { + this.receiveConfig = receiveConfig; + return this; + } + + /** + * Get receiveConfig + * + * @return receiveConfig + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECEIVE_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DvnConfig getReceiveConfig() { + return receiveConfig; + } + + @JsonProperty(JSON_PROPERTY_RECEIVE_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReceiveConfig(DvnConfig receiveConfig) { + this.receiveConfig = receiveConfig; + } + + /** Return true if this SetLayerZeroDvnConfigRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest = + (SetLayerZeroDvnConfigRequest) o; + return Objects.equals(this.vaultAccountId, setLayerZeroDvnConfigRequest.vaultAccountId) + && Objects.equals( + this.sourceAdapterTokenLinkId, + setLayerZeroDvnConfigRequest.sourceAdapterTokenLinkId) + && Objects.equals( + this.destinationAdapterTokenLinkId, + setLayerZeroDvnConfigRequest.destinationAdapterTokenLinkId) + && Objects.equals(this.sendConfig, setLayerZeroDvnConfigRequest.sendConfig) + && Objects.equals(this.receiveConfig, setLayerZeroDvnConfigRequest.receiveConfig); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, + sourceAdapterTokenLinkId, + destinationAdapterTokenLinkId, + sendConfig, + receiveConfig); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetLayerZeroDvnConfigRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" sourceAdapterTokenLinkId: ") + .append(toIndentedString(sourceAdapterTokenLinkId)) + .append("\n"); + sb.append(" destinationAdapterTokenLinkId: ") + .append(toIndentedString(destinationAdapterTokenLinkId)) + .append("\n"); + sb.append(" sendConfig: ").append(toIndentedString(sendConfig)).append("\n"); + sb.append(" receiveConfig: ").append(toIndentedString(receiveConfig)).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 `sourceAdapterTokenLinkId` to the URL query string + if (getSourceAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%ssourceAdapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSourceAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `destinationAdapterTokenLinkId` to the URL query string + if (getDestinationAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%sdestinationAdapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDestinationAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `sendConfig` to the URL query string + if (getSendConfig() != null) { + joiner.add(getSendConfig().toUrlQueryString(prefix + "sendConfig" + suffix)); + } + + // add `receiveConfig` to the URL query string + if (getReceiveConfig() != null) { + joiner.add(getReceiveConfig().toUrlQueryString(prefix + "receiveConfig" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponse.java b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponse.java new file mode 100644 index 00000000..bd0b4808 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponse.java @@ -0,0 +1,158 @@ +/* + * 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; + +/** SetLayerZeroDvnConfigResponse */ +@JsonPropertyOrder({SetLayerZeroDvnConfigResponse.JSON_PROPERTY_TXN_IDS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetLayerZeroDvnConfigResponse { + public static final String JSON_PROPERTY_TXN_IDS = "txnIds"; + private List txnIds = new ArrayList<>(); + + public SetLayerZeroDvnConfigResponse() {} + + public SetLayerZeroDvnConfigResponse txnIds(List txnIds) { + this.txnIds = txnIds; + return this; + } + + public SetLayerZeroDvnConfigResponse addTxnIdsItem(String txnIdsItem) { + if (this.txnIds == null) { + this.txnIds = new ArrayList<>(); + } + this.txnIds.add(txnIdsItem); + return this; + } + + /** + * Transaction IDs submitted to the network + * + * @return txnIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TXN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTxnIds() { + return txnIds; + } + + @JsonProperty(JSON_PROPERTY_TXN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxnIds(List txnIds) { + this.txnIds = txnIds; + } + + /** Return true if this SetLayerZeroDvnConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetLayerZeroDvnConfigResponse setLayerZeroDvnConfigResponse = + (SetLayerZeroDvnConfigResponse) o; + return Objects.equals(this.txnIds, setLayerZeroDvnConfigResponse.txnIds); + } + + @Override + public int hashCode() { + return Objects.hash(txnIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetLayerZeroDvnConfigResponse {\n"); + sb.append(" txnIds: ").append(toIndentedString(txnIds)).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 `txnIds` to the URL query string + if (getTxnIds() != null) { + for (int i = 0; i < getTxnIds().size(); i++) { + joiner.add( + String.format( + "%stxnIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTxnIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequest.java b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequest.java new file mode 100644 index 00000000..a3b7fb68 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequest.java @@ -0,0 +1,306 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** SetLayerZeroPeersRequest */ +@JsonPropertyOrder({ + SetLayerZeroPeersRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + SetLayerZeroPeersRequest.JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID, + SetLayerZeroPeersRequest.JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS, + SetLayerZeroPeersRequest.JSON_PROPERTY_BIDIRECTIONAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetLayerZeroPeersRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID = + "sourceAdapterTokenLinkId"; + private UUID sourceAdapterTokenLinkId; + + public static final String JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS = + "destinationAdapterTokenLinkIds"; + private List destinationAdapterTokenLinkIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_BIDIRECTIONAL = "bidirectional"; + private Boolean bidirectional; + + public SetLayerZeroPeersRequest() {} + + public SetLayerZeroPeersRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that will be used to inititate transactions ot set peers + * + * @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 SetLayerZeroPeersRequest sourceAdapterTokenLinkId(UUID sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + return this; + } + + /** + * `token_link` ID of the source adapter contract + * + * @return sourceAdapterTokenLinkId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSourceAdapterTokenLinkId() { + return sourceAdapterTokenLinkId; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ADAPTER_TOKEN_LINK_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceAdapterTokenLinkId(UUID sourceAdapterTokenLinkId) { + this.sourceAdapterTokenLinkId = sourceAdapterTokenLinkId; + } + + public SetLayerZeroPeersRequest destinationAdapterTokenLinkIds( + List destinationAdapterTokenLinkIds) { + this.destinationAdapterTokenLinkIds = destinationAdapterTokenLinkIds; + return this; + } + + public SetLayerZeroPeersRequest addDestinationAdapterTokenLinkIdsItem( + UUID destinationAdapterTokenLinkIdsItem) { + if (this.destinationAdapterTokenLinkIds == null) { + this.destinationAdapterTokenLinkIds = new ArrayList<>(); + } + this.destinationAdapterTokenLinkIds.add(destinationAdapterTokenLinkIdsItem); + return this; + } + + /** + * Array of `token_link` IDs for destination adapter contracts + * + * @return destinationAdapterTokenLinkIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDestinationAdapterTokenLinkIds() { + return destinationAdapterTokenLinkIds; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION_ADAPTER_TOKEN_LINK_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationAdapterTokenLinkIds(List destinationAdapterTokenLinkIds) { + this.destinationAdapterTokenLinkIds = destinationAdapterTokenLinkIds; + } + + public SetLayerZeroPeersRequest bidirectional(Boolean bidirectional) { + this.bidirectional = bidirectional; + return this; + } + + /** + * If true, also sets peers from destination(s) back to source + * + * @return bidirectional + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BIDIRECTIONAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBidirectional() { + return bidirectional; + } + + @JsonProperty(JSON_PROPERTY_BIDIRECTIONAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBidirectional(Boolean bidirectional) { + this.bidirectional = bidirectional; + } + + /** Return true if this SetLayerZeroPeersRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetLayerZeroPeersRequest setLayerZeroPeersRequest = (SetLayerZeroPeersRequest) o; + return Objects.equals(this.vaultAccountId, setLayerZeroPeersRequest.vaultAccountId) + && Objects.equals( + this.sourceAdapterTokenLinkId, + setLayerZeroPeersRequest.sourceAdapterTokenLinkId) + && Objects.equals( + this.destinationAdapterTokenLinkIds, + setLayerZeroPeersRequest.destinationAdapterTokenLinkIds) + && Objects.equals(this.bidirectional, setLayerZeroPeersRequest.bidirectional); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, + sourceAdapterTokenLinkId, + destinationAdapterTokenLinkIds, + bidirectional); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetLayerZeroPeersRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" sourceAdapterTokenLinkId: ") + .append(toIndentedString(sourceAdapterTokenLinkId)) + .append("\n"); + sb.append(" destinationAdapterTokenLinkIds: ") + .append(toIndentedString(destinationAdapterTokenLinkIds)) + .append("\n"); + sb.append(" bidirectional: ").append(toIndentedString(bidirectional)).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 `sourceAdapterTokenLinkId` to the URL query string + if (getSourceAdapterTokenLinkId() != null) { + joiner.add( + String.format( + "%ssourceAdapterTokenLinkId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSourceAdapterTokenLinkId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `destinationAdapterTokenLinkIds` to the URL query string + if (getDestinationAdapterTokenLinkIds() != null) { + for (int i = 0; i < getDestinationAdapterTokenLinkIds().size(); i++) { + if (getDestinationAdapterTokenLinkIds().get(i) != null) { + joiner.add( + String.format( + "%sdestinationAdapterTokenLinkIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf( + getDestinationAdapterTokenLinkIds() + .get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `bidirectional` to the URL query string + if (getBidirectional() != null) { + joiner.add( + String.format( + "%sbidirectional%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBidirectional()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponse.java b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponse.java new file mode 100644 index 00000000..83548f68 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponse.java @@ -0,0 +1,161 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** SetLayerZeroPeersResponse */ +@JsonPropertyOrder({SetLayerZeroPeersResponse.JSON_PROPERTY_TXN_IDS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetLayerZeroPeersResponse { + public static final String JSON_PROPERTY_TXN_IDS = "txnIds"; + private List txnIds = new ArrayList<>(); + + public SetLayerZeroPeersResponse() {} + + public SetLayerZeroPeersResponse txnIds(List txnIds) { + this.txnIds = txnIds; + return this; + } + + public SetLayerZeroPeersResponse addTxnIdsItem(UUID txnIdsItem) { + if (this.txnIds == null) { + this.txnIds = new ArrayList<>(); + } + this.txnIds.add(txnIdsItem); + return this; + } + + /** + * Array of fireblocks transaction IDs, each corresponding to an on-chain transaction to set + * peers + * + * @return txnIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TXN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTxnIds() { + return txnIds; + } + + @JsonProperty(JSON_PROPERTY_TXN_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxnIds(List txnIds) { + this.txnIds = txnIds; + } + + /** Return true if this SetLayerZeroPeersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetLayerZeroPeersResponse setLayerZeroPeersResponse = (SetLayerZeroPeersResponse) o; + return Objects.equals(this.txnIds, setLayerZeroPeersResponse.txnIds); + } + + @Override + public int hashCode() { + return Objects.hash(txnIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetLayerZeroPeersResponse {\n"); + sb.append(" txnIds: ").append(toIndentedString(txnIds)).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 `txnIds` to the URL query string + if (getTxnIds() != null) { + for (int i = 0; i < getTxnIds().size(); i++) { + if (getTxnIds().get(i) != null) { + joiner.add( + String.format( + "%stxnIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getTxnIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponse.java b/src/main/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponse.java new file mode 100644 index 00000000..09f2bbfc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponse.java @@ -0,0 +1,200 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ValidateLayerZeroChannelResponse */ +@JsonPropertyOrder({ + ValidateLayerZeroChannelResponse.JSON_PROPERTY_CORRECT, + ValidateLayerZeroChannelResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValidateLayerZeroChannelResponse { + public static final String JSON_PROPERTY_CORRECT = "correct"; + private Boolean correct; + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = new ArrayList<>(); + + public ValidateLayerZeroChannelResponse() {} + + public ValidateLayerZeroChannelResponse correct(Boolean correct) { + this.correct = correct; + return this; + } + + /** + * Indicates whether the LayerZero channel configuration is valid. + * + * @return correct + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CORRECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCorrect() { + return correct; + } + + @JsonProperty(JSON_PROPERTY_CORRECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCorrect(Boolean correct) { + this.correct = correct; + } + + public ValidateLayerZeroChannelResponse errors(List errors) { + this.errors = errors; + return this; + } + + public ValidateLayerZeroChannelResponse addErrorsItem(String errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * List of errors found during validation. An empty array indicates no errors. + * + * @return errors + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } + + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setErrors(List errors) { + this.errors = errors; + } + + /** Return true if this ValidateLayerZeroChannelResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateLayerZeroChannelResponse validateLayerZeroChannelResponse = + (ValidateLayerZeroChannelResponse) o; + return Objects.equals(this.correct, validateLayerZeroChannelResponse.correct) + && Objects.equals(this.errors, validateLayerZeroChannelResponse.errors); + } + + @Override + public int hashCode() { + return Objects.hash(correct, errors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidateLayerZeroChannelResponse {\n"); + sb.append(" correct: ").append(toIndentedString(correct)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).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 `correct` to the URL query string + if (getCorrect() != null) { + joiner.add( + String.format( + "%scorrect%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCorrect()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `errors` to the URL query string + if (getErrors() != null) { + for (int i = 0; i < getErrors().size(); i++) { + joiner.add( + String.format( + "%serrors%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getErrors().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java index 6de522fd..3e26e611 100644 --- a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java @@ -15,6 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AdapterProcessingResult; import com.fireblocks.sdk.model.CollectionBurnRequestDto; import com.fireblocks.sdk.model.CollectionBurnResponseDto; import com.fireblocks.sdk.model.CollectionDeployRequestDto; @@ -23,15 +24,28 @@ import com.fireblocks.sdk.model.CollectionMintResponseDto; import com.fireblocks.sdk.model.CreateMultichainTokenRequest; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.DeployLayerZeroAdaptersRequest; import com.fireblocks.sdk.model.DeployableAddressResponse; import com.fireblocks.sdk.model.GetDeployableAddressRequest; +import com.fireblocks.sdk.model.GetLayerZeroDvnConfigResponse; +import com.fireblocks.sdk.model.GetLayerZeroPeersResponse; import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; import com.fireblocks.sdk.model.ReissueMultichainTokenRequest; +import com.fireblocks.sdk.model.RemoveLayerZeroAdaptersRequest; +import com.fireblocks.sdk.model.RemoveLayerZeroAdaptersResponse; +import com.fireblocks.sdk.model.RemoveLayerZeroPeersRequest; +import com.fireblocks.sdk.model.RemoveLayerZeroPeersResponse; +import com.fireblocks.sdk.model.SetLayerZeroDvnConfigRequest; +import com.fireblocks.sdk.model.SetLayerZeroDvnConfigResponse; +import com.fireblocks.sdk.model.SetLayerZeroPeersRequest; +import com.fireblocks.sdk.model.SetLayerZeroPeersResponse; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; +import com.fireblocks.sdk.model.ValidateLayerZeroChannelResponse; import java.math.BigDecimal; import java.util.List; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -73,6 +87,38 @@ public void createNewCollectionTest() throws ApiException { api.createNewCollection(collectionDeployRequestDto, idempotencyKey); } + /** + * Remove LayerZero adapters + * + *

Remove LayerZero adapters by deactivating and unlinking them. This endpoint revokes roles + * and deactivates the specified adapter contracts. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deactivateAndUnlinkAdaptersTest() throws ApiException { + RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.deactivateAndUnlinkAdapters(removeLayerZeroAdaptersRequest, idempotencyKey); + } + + /** + * Deploy LayerZero adapters + * + *

Deploy LayerZero adapters for multichain token bridging functionality. This endpoint + * creates adapter contracts that enable cross-chain token transfers. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deployAndLinkAdaptersTest() throws ApiException { + DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.deployAndLinkAdapters(deployLayerZeroAdaptersRequest, idempotencyKey); + } + /** * Get collection token details * @@ -118,6 +164,37 @@ public void getDeployableAddressTest() throws ApiException { api.getDeployableAddress(getDeployableAddressRequest, idempotencyKey); } + /** + * Get LayerZero DVN configuration + * + *

Retrieve the DVN (Data Verification Network) configuration for a specific adapter. Returns + * DVN configurations for channels between the source adapter and its peers. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getLayerZeroDvnConfigTest() throws ApiException { + UUID adapterTokenLinkId = null; + UUID peerAdapterTokenLinkId = null; + CompletableFuture> response = + api.getLayerZeroDvnConfig(adapterTokenLinkId, peerAdapterTokenLinkId); + } + + /** + * Get LayerZero peers + * + *

Retrieve the LayerZero peers configured for a specific adapter. Returns information about + * peer relationships for cross-chain communication. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getLayerZeroPeersTest() throws ApiException { + UUID adapterTokenLinkId = null; + CompletableFuture> response = + api.getLayerZeroPeers(adapterTokenLinkId); + } + /** * Get collections * @@ -247,6 +324,56 @@ public void reIssueTokenMultiChainTest() throws ApiException { reissueMultichainTokenRequest, tokenLinkId, idempotencyKey); } + /** + * Remove LayerZero peers + * + *

Remove LayerZero peers to disconnect adapter contracts. This endpoint removes peer + * relationships between LayerZero adapters. + * + * @throws ApiException if the Api call fails + */ + @Test + public void removeLayerZeroPeersTest() throws ApiException { + RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.removeLayerZeroPeers(removeLayerZeroPeersRequest, idempotencyKey); + } + + /** + * Set LayerZero DVN configuration + * + *

Configure DVN settings for LayerZero adapters. This endpoint sets up the DVN configuration + * for message verification between source and destination adapters. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setLayerZeroDvnConfigTest() throws ApiException { + SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.setLayerZeroDvnConfig(setLayerZeroDvnConfigRequest, idempotencyKey); + } + + /** + * Set LayerZero peers + * + *

Set LayerZero peers to establish connections between adapter contracts. This endpoint + * creates peer relationships that enable cross-chain communication. It sets the destination + * adapter as a peer of the source adapter. If `bidirectional` is true, it also sets + * the source adapter as a peer of the destination adapter(s). + * + * @throws ApiException if the Api call fails + */ + @Test + public void setLayerZeroPeersTest() throws ApiException { + SetLayerZeroPeersRequest setLayerZeroPeersRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.setLayerZeroPeers(setLayerZeroPeersRequest, idempotencyKey); + } + /** * Unlink a token * @@ -275,4 +402,20 @@ public void unlinkCollectionTest() throws ApiException { CompletableFuture> response = api.unlinkCollection(id); } + + /** + * Validate LayerZero channel configuration + * + *

Validate the LayerZero channel configuration between adapters. This endpoint checks if the + * channel configuration is correct and returns any validation errors. + * + * @throws ApiException if the Api call fails + */ + @Test + public void validateLayerZeroChannelConfigTest() throws ApiException { + UUID adapterTokenLinkId = null; + UUID peerAdapterTokenLinkId = null; + CompletableFuture> response = + api.validateLayerZeroChannelConfig(adapterTokenLinkId, peerAdapterTokenLinkId); + } } diff --git a/src/test/java/com/fireblocks/sdk/model/AdapterProcessingResultTest.java b/src/test/java/com/fireblocks/sdk/model/AdapterProcessingResultTest.java new file mode 100644 index 00000000..89f3a7e0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AdapterProcessingResultTest.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 AdapterProcessingResult */ +public class AdapterProcessingResultTest { + private final AdapterProcessingResult model = new AdapterProcessingResult(); + + /** Model tests for AdapterProcessingResult */ + @Test + public void testAdapterProcessingResult() { + // TODO: test AdapterProcessingResult + } + + /** Test the property 'inputTokenLinkId' */ + @Test + public void inputTokenLinkIdTest() { + // TODO: test inputTokenLinkId + } + + /** Test the property 'adapterLinkId' */ + @Test + public void adapterLinkIdTest() { + // TODO: test adapterLinkId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfigTest.java b/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfigTest.java new file mode 100644 index 00000000..5bee526e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsReceiveConfigTest.java @@ -0,0 +1,52 @@ +/* + * 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 ChannelDvnConfigWithConfirmationsReceiveConfig */ +public class ChannelDvnConfigWithConfirmationsReceiveConfigTest { + private final ChannelDvnConfigWithConfirmationsReceiveConfig model = + new ChannelDvnConfigWithConfirmationsReceiveConfig(); + + /** Model tests for ChannelDvnConfigWithConfirmationsReceiveConfig */ + @Test + public void testChannelDvnConfigWithConfirmationsReceiveConfig() { + // TODO: test ChannelDvnConfigWithConfirmationsReceiveConfig + } + + /** Test the property 'dvnAddresses' */ + @Test + public void dvnAddressesTest() { + // TODO: test dvnAddresses + } + + /** Test the property 'optionalDVNAddresses' */ + @Test + public void optionalDVNAddressesTest() { + // TODO: test optionalDVNAddresses + } + + /** Test the property 'optionalThreshold' */ + @Test + public void optionalThresholdTest() { + // TODO: test optionalThreshold + } + + /** Test the property 'confirmations' */ + @Test + public void confirmationsTest() { + // TODO: test confirmations + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfigTest.java b/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfigTest.java new file mode 100644 index 00000000..86677eb2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsSendConfigTest.java @@ -0,0 +1,52 @@ +/* + * 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 ChannelDvnConfigWithConfirmationsSendConfig */ +public class ChannelDvnConfigWithConfirmationsSendConfigTest { + private final ChannelDvnConfigWithConfirmationsSendConfig model = + new ChannelDvnConfigWithConfirmationsSendConfig(); + + /** Model tests for ChannelDvnConfigWithConfirmationsSendConfig */ + @Test + public void testChannelDvnConfigWithConfirmationsSendConfig() { + // TODO: test ChannelDvnConfigWithConfirmationsSendConfig + } + + /** Test the property 'dvnAddresses' */ + @Test + public void dvnAddressesTest() { + // TODO: test dvnAddresses + } + + /** Test the property 'optionalDVNAddresses' */ + @Test + public void optionalDVNAddressesTest() { + // TODO: test optionalDVNAddresses + } + + /** Test the property 'optionalThreshold' */ + @Test + public void optionalThresholdTest() { + // TODO: test optionalThreshold + } + + /** Test the property 'confirmations' */ + @Test + public void confirmationsTest() { + // TODO: test confirmations + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.java b/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.java new file mode 100644 index 00000000..d2dae4a8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.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 ChannelDvnConfigWithConfirmations */ +public class ChannelDvnConfigWithConfirmationsTest { + private final ChannelDvnConfigWithConfirmations model = new ChannelDvnConfigWithConfirmations(); + + /** Model tests for ChannelDvnConfigWithConfirmations */ + @Test + public void testChannelDvnConfigWithConfirmations() { + // TODO: test ChannelDvnConfigWithConfirmations + } + + /** Test the property 'sendConfig' */ + @Test + public void sendConfigTest() { + // TODO: test sendConfig + } + + /** Test the property 'receiveConfig' */ + @Test + public void receiveConfigTest() { + // TODO: test receiveConfig + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.java b/src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.java new file mode 100644 index 00000000..07fe2f0c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployLayerZeroAdaptersRequestTest.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 DeployLayerZeroAdaptersRequest */ +public class DeployLayerZeroAdaptersRequestTest { + private final DeployLayerZeroAdaptersRequest model = new DeployLayerZeroAdaptersRequest(); + + /** Model tests for DeployLayerZeroAdaptersRequest */ + @Test + public void testDeployLayerZeroAdaptersRequest() { + // TODO: test DeployLayerZeroAdaptersRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'createParams' */ + @Test + public void createParamsTest() { + // TODO: test createParams + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'salt' */ + @Test + public void saltTest() { + // TODO: test salt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DvnConfigTest.java b/src/test/java/com/fireblocks/sdk/model/DvnConfigTest.java new file mode 100644 index 00000000..bfd6d342 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DvnConfigTest.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 DvnConfig */ +public class DvnConfigTest { + private final DvnConfig model = new DvnConfig(); + + /** Model tests for DvnConfig */ + @Test + public void testDvnConfig() { + // TODO: test DvnConfig + } + + /** Test the property 'dvnAddresses' */ + @Test + public void dvnAddressesTest() { + // TODO: test dvnAddresses + } + + /** Test the property 'optionalDVNAddresses' */ + @Test + public void optionalDVNAddressesTest() { + // TODO: test optionalDVNAddresses + } + + /** Test the property 'optionalThreshold' */ + @Test + public void optionalThresholdTest() { + // TODO: test optionalThreshold + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DvnConfigWithConfirmationsTest.java b/src/test/java/com/fireblocks/sdk/model/DvnConfigWithConfirmationsTest.java new file mode 100644 index 00000000..406aa7af --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DvnConfigWithConfirmationsTest.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 DvnConfigWithConfirmations */ +public class DvnConfigWithConfirmationsTest { + private final DvnConfigWithConfirmations model = new DvnConfigWithConfirmations(); + + /** Model tests for DvnConfigWithConfirmations */ + @Test + public void testDvnConfigWithConfirmations() { + // TODO: test DvnConfigWithConfirmations + } + + /** Test the property 'dvnAddresses' */ + @Test + public void dvnAddressesTest() { + // TODO: test dvnAddresses + } + + /** Test the property 'optionalDVNAddresses' */ + @Test + public void optionalDVNAddressesTest() { + // TODO: test optionalDVNAddresses + } + + /** Test the property 'optionalThreshold' */ + @Test + public void optionalThresholdTest() { + // TODO: test optionalThreshold + } + + /** Test the property 'confirmations' */ + @Test + public void confirmationsTest() { + // TODO: test confirmations + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java b/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java index 98cb303c..2b416be5 100644 --- a/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java @@ -66,4 +66,10 @@ public void relayIdTest() { public void relayNameTest() { // TODO: test relayName } + + /** Test the property 'feeUSD' */ + @Test + public void feeUSDTest() { + // TODO: test feeUSD + } } diff --git a/src/test/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponseTest.java new file mode 100644 index 00000000..5e793392 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponseTest.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 GetLayerZeroDvnConfigResponse */ +public class GetLayerZeroDvnConfigResponseTest { + private final GetLayerZeroDvnConfigResponse model = new GetLayerZeroDvnConfigResponse(); + + /** Model tests for GetLayerZeroDvnConfigResponse */ + @Test + public void testGetLayerZeroDvnConfigResponse() { + // TODO: test GetLayerZeroDvnConfigResponse + } + + /** Test the property 'sourceAdapterTokenLinkId' */ + @Test + public void sourceAdapterTokenLinkIdTest() { + // TODO: test sourceAdapterTokenLinkId + } + + /** Test the property 'channelConfigs' */ + @Test + public void channelConfigsTest() { + // TODO: test channelConfigs + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponseTest.java new file mode 100644 index 00000000..d791e728 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponseTest.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 GetLayerZeroPeersResponse */ +public class GetLayerZeroPeersResponseTest { + private final GetLayerZeroPeersResponse model = new GetLayerZeroPeersResponse(); + + /** Model tests for GetLayerZeroPeersResponse */ + @Test + public void testGetLayerZeroPeersResponse() { + // TODO: test GetLayerZeroPeersResponse + } + + /** Test the property 'adapterTokenLinkId' */ + @Test + public void adapterTokenLinkIdTest() { + // TODO: test adapterTokenLinkId + } + + /** Test the property 'adapterAddress' */ + @Test + public void adapterAddressTest() { + // TODO: test adapterAddress + } + + /** Test the property 'peers' */ + @Test + public void peersTest() { + // TODO: test peers + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParamsTest.java new file mode 100644 index 00000000..bd5553c9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/LayerZeroAdapterCreateParamsTest.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 LayerZeroAdapterCreateParams */ +public class LayerZeroAdapterCreateParamsTest { + private final LayerZeroAdapterCreateParams model = new LayerZeroAdapterCreateParams(); + + /** Model tests for LayerZeroAdapterCreateParams */ + @Test + public void testLayerZeroAdapterCreateParams() { + // TODO: test LayerZeroAdapterCreateParams + } + + /** Test the property 'tokenLinkId' */ + @Test + public void tokenLinkIdTest() { + // TODO: test tokenLinkId + } + + /** Test the property 'delegateAddress' */ + @Test + public void delegateAddressTest() { + // TODO: test delegateAddress + } + + /** Test the property 'defaultAdminAddress' */ + @Test + public void defaultAdminAddressTest() { + // TODO: test defaultAdminAddress + } + + /** Test the property 'pauserAddress' */ + @Test + public void pauserAddressTest() { + // TODO: test pauserAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PeerAdapterInfoTest.java b/src/test/java/com/fireblocks/sdk/model/PeerAdapterInfoTest.java new file mode 100644 index 00000000..5369411f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PeerAdapterInfoTest.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 PeerAdapterInfo */ +public class PeerAdapterInfoTest { + private final PeerAdapterInfo model = new PeerAdapterInfo(); + + /** Model tests for PeerAdapterInfo */ + @Test + public void testPeerAdapterInfo() { + // TODO: test PeerAdapterInfo + } + + /** Test the property 'adapterTokenLinkId' */ + @Test + public void adapterTokenLinkIdTest() { + // TODO: test adapterTokenLinkId + } + + /** Test the property 'adapterAddress' */ + @Test + public void adapterAddressTest() { + // TODO: test adapterAddress + } + + /** Test the property 'baseAssetId' */ + @Test + public void baseAssetIdTest() { + // TODO: test baseAssetId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResultTest.java b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResultTest.java new file mode 100644 index 00000000..832d8360 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdapterFailedResultTest.java @@ -0,0 +1,34 @@ +/* + * 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 RemoveLayerZeroAdapterFailedResult */ +public class RemoveLayerZeroAdapterFailedResultTest { + private final RemoveLayerZeroAdapterFailedResult model = + new RemoveLayerZeroAdapterFailedResult(); + + /** Model tests for RemoveLayerZeroAdapterFailedResult */ + @Test + public void testRemoveLayerZeroAdapterFailedResult() { + // TODO: test RemoveLayerZeroAdapterFailedResult + } + + /** Test the property 'adapterTokenLinkId' */ + @Test + public void adapterTokenLinkIdTest() { + // TODO: test adapterTokenLinkId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequestTest.java b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequestTest.java new file mode 100644 index 00000000..3e2dcf6f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersRequestTest.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 RemoveLayerZeroAdaptersRequest */ +public class RemoveLayerZeroAdaptersRequestTest { + private final RemoveLayerZeroAdaptersRequest model = new RemoveLayerZeroAdaptersRequest(); + + /** Model tests for RemoveLayerZeroAdaptersRequest */ + @Test + public void testRemoveLayerZeroAdaptersRequest() { + // TODO: test RemoveLayerZeroAdaptersRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'adapterTokenLinkIds' */ + @Test + public void adapterTokenLinkIdsTest() { + // TODO: test adapterTokenLinkIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponseTest.java b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponseTest.java new file mode 100644 index 00000000..103e90ea --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroAdaptersResponseTest.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 RemoveLayerZeroAdaptersResponse */ +public class RemoveLayerZeroAdaptersResponseTest { + private final RemoveLayerZeroAdaptersResponse model = new RemoveLayerZeroAdaptersResponse(); + + /** Model tests for RemoveLayerZeroAdaptersResponse */ + @Test + public void testRemoveLayerZeroAdaptersResponse() { + // TODO: test RemoveLayerZeroAdaptersResponse + } + + /** Test the property 'deactivated' */ + @Test + public void deactivatedTest() { + // TODO: test deactivated + } + + /** Test the property 'failed' */ + @Test + public void failedTest() { + // TODO: test failed + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequestTest.java b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequestTest.java new file mode 100644 index 00000000..71a8371b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersRequestTest.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 RemoveLayerZeroPeersRequest */ +public class RemoveLayerZeroPeersRequestTest { + private final RemoveLayerZeroPeersRequest model = new RemoveLayerZeroPeersRequest(); + + /** Model tests for RemoveLayerZeroPeersRequest */ + @Test + public void testRemoveLayerZeroPeersRequest() { + // TODO: test RemoveLayerZeroPeersRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'sourceAdapterTokenLinkId' */ + @Test + public void sourceAdapterTokenLinkIdTest() { + // TODO: test sourceAdapterTokenLinkId + } + + /** Test the property 'destinationAdapterTokenLinkIds' */ + @Test + public void destinationAdapterTokenLinkIdsTest() { + // TODO: test destinationAdapterTokenLinkIds + } + + /** Test the property 'bidirectional' */ + @Test + public void bidirectionalTest() { + // TODO: test bidirectional + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponseTest.java b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponseTest.java new file mode 100644 index 00000000..709126b3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RemoveLayerZeroPeersResponseTest.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 RemoveLayerZeroPeersResponse */ +public class RemoveLayerZeroPeersResponseTest { + private final RemoveLayerZeroPeersResponse model = new RemoveLayerZeroPeersResponse(); + + /** Model tests for RemoveLayerZeroPeersResponse */ + @Test + public void testRemoveLayerZeroPeersResponse() { + // TODO: test RemoveLayerZeroPeersResponse + } + + /** Test the property 'txnIds' */ + @Test + public void txnIdsTest() { + // TODO: test txnIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequestTest.java b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequestTest.java new file mode 100644 index 00000000..c421bd1c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigRequestTest.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 SetLayerZeroDvnConfigRequest */ +public class SetLayerZeroDvnConfigRequestTest { + private final SetLayerZeroDvnConfigRequest model = new SetLayerZeroDvnConfigRequest(); + + /** Model tests for SetLayerZeroDvnConfigRequest */ + @Test + public void testSetLayerZeroDvnConfigRequest() { + // TODO: test SetLayerZeroDvnConfigRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'sourceAdapterTokenLinkId' */ + @Test + public void sourceAdapterTokenLinkIdTest() { + // TODO: test sourceAdapterTokenLinkId + } + + /** Test the property 'destinationAdapterTokenLinkId' */ + @Test + public void destinationAdapterTokenLinkIdTest() { + // TODO: test destinationAdapterTokenLinkId + } + + /** Test the property 'sendConfig' */ + @Test + public void sendConfigTest() { + // TODO: test sendConfig + } + + /** Test the property 'receiveConfig' */ + @Test + public void receiveConfigTest() { + // TODO: test receiveConfig + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponseTest.java b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponseTest.java new file mode 100644 index 00000000..24a004ae --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroDvnConfigResponseTest.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 SetLayerZeroDvnConfigResponse */ +public class SetLayerZeroDvnConfigResponseTest { + private final SetLayerZeroDvnConfigResponse model = new SetLayerZeroDvnConfigResponse(); + + /** Model tests for SetLayerZeroDvnConfigResponse */ + @Test + public void testSetLayerZeroDvnConfigResponse() { + // TODO: test SetLayerZeroDvnConfigResponse + } + + /** Test the property 'txnIds' */ + @Test + public void txnIdsTest() { + // TODO: test txnIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequestTest.java b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequestTest.java new file mode 100644 index 00000000..4f1a6444 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersRequestTest.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 SetLayerZeroPeersRequest */ +public class SetLayerZeroPeersRequestTest { + private final SetLayerZeroPeersRequest model = new SetLayerZeroPeersRequest(); + + /** Model tests for SetLayerZeroPeersRequest */ + @Test + public void testSetLayerZeroPeersRequest() { + // TODO: test SetLayerZeroPeersRequest + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'sourceAdapterTokenLinkId' */ + @Test + public void sourceAdapterTokenLinkIdTest() { + // TODO: test sourceAdapterTokenLinkId + } + + /** Test the property 'destinationAdapterTokenLinkIds' */ + @Test + public void destinationAdapterTokenLinkIdsTest() { + // TODO: test destinationAdapterTokenLinkIds + } + + /** Test the property 'bidirectional' */ + @Test + public void bidirectionalTest() { + // TODO: test bidirectional + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponseTest.java b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponseTest.java new file mode 100644 index 00000000..d1110bc0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetLayerZeroPeersResponseTest.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 SetLayerZeroPeersResponse */ +public class SetLayerZeroPeersResponseTest { + private final SetLayerZeroPeersResponse model = new SetLayerZeroPeersResponse(); + + /** Model tests for SetLayerZeroPeersResponse */ + @Test + public void testSetLayerZeroPeersResponse() { + // TODO: test SetLayerZeroPeersResponse + } + + /** Test the property 'txnIds' */ + @Test + public void txnIdsTest() { + // TODO: test txnIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponseTest.java new file mode 100644 index 00000000..3bbb3b73 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ValidateLayerZeroChannelResponseTest.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 ValidateLayerZeroChannelResponse */ +public class ValidateLayerZeroChannelResponseTest { + private final ValidateLayerZeroChannelResponse model = new ValidateLayerZeroChannelResponse(); + + /** Model tests for ValidateLayerZeroChannelResponse */ + @Test + public void testValidateLayerZeroChannelResponse() { + // TODO: test ValidateLayerZeroChannelResponse + } + + /** Test the property 'correct' */ + @Test + public void correctTest() { + // TODO: test correct + } + + /** Test the property 'errors' */ + @Test + public void errorsTest() { + // TODO: test errors + } +}