diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5181c34a..79f6ece5 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -27,6 +27,7 @@ docs/AddCosignerResponse.md docs/AddExchangeAccountRequest.md docs/AddExchangeAccountResponse.md docs/AdditionalInfo.md +docs/AddressNotAvailableError.md docs/AmlRegistrationResult.md docs/AmlRegistrationResultFullPayload.md docs/AmlScreeningResult.md @@ -147,6 +148,8 @@ docs/CreateConversionConfigOperationRequest.md docs/CreateDisbursementConfigOperationRequest.md docs/CreateInternalTransferRequest.md docs/CreateInternalWalletAssetRequest.md +docs/CreateMultichainTokenRequestDto.md +docs/CreateMultichainTokenRequestDtoCreateParams.md docs/CreateMultipleAccountsRequest.md docs/CreateNcwConnectionRequest.md docs/CreateNetworkIdRequest.md @@ -172,6 +175,8 @@ docs/Delegation.md docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md +docs/DeployableAddressResponseDto.md +docs/DeployedContractNotFoundError.md docs/DeployedContractResponseDto.md docs/DeployedContractsApi.md docs/DeployedContractsPaginatedResponse.md @@ -241,6 +246,7 @@ docs/GetAPIUsersResponse.md docs/GetAuditLogsResponse.md docs/GetConnectionsResponse.md docs/GetConsoleUsersResponse.md +docs/GetDeployableAddressRequestDto.md docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md docs/GetLinkedCollectionsPaginatedResponse.md @@ -258,6 +264,7 @@ docs/HttpContractDoesNotExistError.md docs/InstructionAmount.md docs/InternalTransferResponse.md docs/InternalWalletsApi.md +docs/InvalidParamaterValueError.md docs/Job.md docs/JobCreated.md docs/JobManagementApi.md @@ -356,6 +363,7 @@ docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md +docs/ReissueMultichainTokenRequestDto.md docs/RelatedRequest.md docs/RelatedTransaction.md docs/RemoveCollateralRequestBody.md @@ -456,6 +464,7 @@ docs/TokenInfoNotFoundErrorResponse.md docs/TokenLinkDto.md docs/TokenLinkDtoTokenMetadata.md docs/TokenLinkExistsHttpError.md +docs/TokenLinkNotMultichainCompatibleHttpError.md docs/TokenLinkRequestDto.md docs/TokenOwnershipResponse.md docs/TokenOwnershipSpamUpdatePayload.md @@ -669,6 +678,7 @@ src/main/java/com/fireblocks/sdk/model/AddCosignerResponse.java src/main/java/com/fireblocks/sdk/model/AddExchangeAccountRequest.java src/main/java/com/fireblocks/sdk/model/AddExchangeAccountResponse.java src/main/java/com/fireblocks/sdk/model/AdditionalInfo.java +src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java src/main/java/com/fireblocks/sdk/model/AmlRegistrationResult.java src/main/java/com/fireblocks/sdk/model/AmlRegistrationResultFullPayload.java src/main/java/com/fireblocks/sdk/model/AmlScreeningResult.java @@ -778,6 +788,8 @@ src/main/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequest.ja src/main/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequest.java src/main/java/com/fireblocks/sdk/model/CreateInternalTransferRequest.java src/main/java/com/fireblocks/sdk/model/CreateInternalWalletAssetRequest.java +src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDto.java +src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParams.java src/main/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequest.java src/main/java/com/fireblocks/sdk/model/CreateNcwConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java @@ -803,6 +815,8 @@ 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/DeployableAddressResponseDto.java +src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java src/main/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponse.java @@ -866,6 +880,7 @@ src/main/java/com/fireblocks/sdk/model/GetAPIUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetAuditLogsResponse.java src/main/java/com/fireblocks/sdk/model/GetConnectionsResponse.java src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java +src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDto.java src/main/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponse.java src/main/java/com/fireblocks/sdk/model/GetFilterParameter.java src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java @@ -882,6 +897,7 @@ src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.java src/main/java/com/fireblocks/sdk/model/InstructionAmount.java 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/LeanAbiFunction.java @@ -971,6 +987,7 @@ src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java +src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDto.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 @@ -1068,6 +1085,7 @@ src/main/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java src/main/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadata.java src/main/java/com/fireblocks/sdk/model/TokenLinkExistsHttpError.java +src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java src/main/java/com/fireblocks/sdk/model/TokenOwnershipSpamUpdatePayload.java @@ -1250,6 +1268,7 @@ src/test/java/com/fireblocks/sdk/model/AddCosignerResponseTest.java src/test/java/com/fireblocks/sdk/model/AddExchangeAccountRequestTest.java src/test/java/com/fireblocks/sdk/model/AddExchangeAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/AdditionalInfoTest.java +src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.java src/test/java/com/fireblocks/sdk/model/AmlRegistrationResultFullPayloadTest.java src/test/java/com/fireblocks/sdk/model/AmlRegistrationResultTest.java src/test/java/com/fireblocks/sdk/model/AmlScreeningResultTest.java @@ -1359,6 +1378,8 @@ src/test/java/com/fireblocks/sdk/model/CreateConversionConfigOperationRequestTes src/test/java/com/fireblocks/sdk/model/CreateDisbursementConfigOperationRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateInternalTransferRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateInternalWalletAssetRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParamsTest.java +src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/CreateMultipleAccountsRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNcwConnectionRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNetworkIdRequestTest.java @@ -1384,6 +1405,8 @@ 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/DeployableAddressResponseDtoTest.java +src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java src/test/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/DepositFundsFromLinkedDDAResponseTest.java @@ -1447,6 +1470,7 @@ src/test/java/com/fireblocks/sdk/model/GetAPIUsersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetAuditLogsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConnectionsResponseTest.java src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java +src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/GetFilterParameterTest.java src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java @@ -1463,6 +1487,7 @@ src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.java src/test/java/com/fireblocks/sdk/model/InstructionAmountTest.java 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/LeanAbiFunctionTest.java @@ -1552,6 +1577,7 @@ src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java +src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDtoTest.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 @@ -1649,6 +1675,7 @@ src/test/java/com/fireblocks/sdk/model/TokenInfoNotFoundErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadataTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkExistsHttpErrorTest.java +src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/TokenOwnershipResponseTest.java src/test/java/com/fireblocks/sdk/model/TokenOwnershipSpamUpdatePayloadTest.java diff --git a/README.md b/README.md index f90e4467..7196db4e 100644 --- a/README.md +++ b/README.md @@ -326,12 +326,15 @@ Class | Method | HTTP request | Description *TokenizationApi* | [**createNewCollection**](docs/TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection *TokenizationApi* | [**fetchCollectionTokenDetails**](docs/TokenizationApi.md#fetchCollectionTokenDetails) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details *TokenizationApi* | [**getCollectionById**](docs/TokenizationApi.md#getCollectionById) | **GET** /tokenization/collections/{id} | Get a collection by id +*TokenizationApi* | [**getDeployableAddress**](docs/TokenizationApi.md#getDeployableAddress) | **POST** /tokenization/multichain/deterministic_address | Get deterministic address for contract deployment *TokenizationApi* | [**getLinkedCollections**](docs/TokenizationApi.md#getLinkedCollections) | **GET** /tokenization/collections | Get collections *TokenizationApi* | [**getLinkedToken**](docs/TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token *TokenizationApi* | [**getLinkedTokens**](docs/TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens *TokenizationApi* | [**issueNewToken**](docs/TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token +*TokenizationApi* | [**issueTokenMultiChain**](docs/TokenizationApi.md#issueTokenMultiChain) | **POST** /tokenization/multichain/tokens | Issue a token on one or more blockchains *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/token/{tokenLinkId} | Reissue a multichain token *TokenizationApi* | [**unlink**](docs/TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token *TokenizationApi* | [**unlinkCollection**](docs/TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link *TransactionsApi* | [**cancelTransaction**](docs/TransactionsApi.md#cancelTransaction) | **POST** /transactions/{txId}/cancel | Cancel a transaction @@ -424,6 +427,7 @@ Class | Method | HTTP request | Description - [AddExchangeAccountRequest](docs/AddExchangeAccountRequest.md) - [AddExchangeAccountResponse](docs/AddExchangeAccountResponse.md) - [AdditionalInfo](docs/AdditionalInfo.md) + - [AddressNotAvailableError](docs/AddressNotAvailableError.md) - [AmlRegistrationResult](docs/AmlRegistrationResult.md) - [AmlRegistrationResultFullPayload](docs/AmlRegistrationResultFullPayload.md) - [AmlScreeningResult](docs/AmlScreeningResult.md) @@ -533,6 +537,8 @@ Class | Method | HTTP request | Description - [CreateDisbursementConfigOperationRequest](docs/CreateDisbursementConfigOperationRequest.md) - [CreateInternalTransferRequest](docs/CreateInternalTransferRequest.md) - [CreateInternalWalletAssetRequest](docs/CreateInternalWalletAssetRequest.md) + - [CreateMultichainTokenRequestDto](docs/CreateMultichainTokenRequestDto.md) + - [CreateMultichainTokenRequestDtoCreateParams](docs/CreateMultichainTokenRequestDtoCreateParams.md) - [CreateMultipleAccountsRequest](docs/CreateMultipleAccountsRequest.md) - [CreateNcwConnectionRequest](docs/CreateNcwConnectionRequest.md) - [CreateNetworkIdRequest](docs/CreateNetworkIdRequest.md) @@ -558,6 +564,8 @@ Class | Method | HTTP request | Description - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) + - [DeployableAddressResponseDto](docs/DeployableAddressResponseDto.md) + - [DeployedContractNotFoundError](docs/DeployedContractNotFoundError.md) - [DeployedContractResponseDto](docs/DeployedContractResponseDto.md) - [DeployedContractsPaginatedResponse](docs/DeployedContractsPaginatedResponse.md) - [DepositFundsFromLinkedDDAResponse](docs/DepositFundsFromLinkedDDAResponse.md) @@ -621,6 +629,7 @@ Class | Method | HTTP request | Description - [GetAuditLogsResponse](docs/GetAuditLogsResponse.md) - [GetConnectionsResponse](docs/GetConnectionsResponse.md) - [GetConsoleUsersResponse](docs/GetConsoleUsersResponse.md) + - [GetDeployableAddressRequestDto](docs/GetDeployableAddressRequestDto.md) - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) @@ -637,6 +646,7 @@ Class | Method | HTTP request | Description - [HttpContractDoesNotExistError](docs/HttpContractDoesNotExistError.md) - [InstructionAmount](docs/InstructionAmount.md) - [InternalTransferResponse](docs/InternalTransferResponse.md) + - [InvalidParamaterValueError](docs/InvalidParamaterValueError.md) - [Job](docs/Job.md) - [JobCreated](docs/JobCreated.md) - [LeanAbiFunction](docs/LeanAbiFunction.md) @@ -726,6 +736,7 @@ Class | Method | HTTP request | Description - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) + - [ReissueMultichainTokenRequestDto](docs/ReissueMultichainTokenRequestDto.md) - [RelatedRequest](docs/RelatedRequest.md) - [RelatedTransaction](docs/RelatedTransaction.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) @@ -823,6 +834,7 @@ Class | Method | HTTP request | Description - [TokenLinkDto](docs/TokenLinkDto.md) - [TokenLinkDtoTokenMetadata](docs/TokenLinkDtoTokenMetadata.md) - [TokenLinkExistsHttpError](docs/TokenLinkExistsHttpError.md) + - [TokenLinkNotMultichainCompatibleHttpError](docs/TokenLinkNotMultichainCompatibleHttpError.md) - [TokenLinkRequestDto](docs/TokenLinkRequestDto.md) - [TokenOwnershipResponse](docs/TokenOwnershipResponse.md) - [TokenOwnershipSpamUpdatePayload](docs/TokenOwnershipSpamUpdatePayload.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index c15fb77e..d1e43a9c 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12940,6 +12940,306 @@ paths: - lang: Python source: response = fireblocks.tokenization.get_linked_token(id); x-accepts: application/json + /tokenization/multichain/deterministic_address: + post: + description: 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. + operationId: getDeployableAddress + 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/GetDeployableAddressRequestDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployableAddressResponseDto' + description: Deterministic address for contract deployment + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidParamaterValueError' + description: Invalid parameters or template has no bytecode + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AddressNotAvailableError' + description: Address is already taken + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get deterministic address for contract deployment + tags: + - Tokenization + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + chainDescriptor: "ETH", + templateId: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d", + initParams: [ + { name: "name", type: "string", value: "TokenName" }, + { name: "symbol", type: "string", value: "TokenSymbol" }, + { + name: "customConfigProps", + type: "tuple", + components: [ + { name: "_isMintable", type: "bool" } + ], + value: [{ _isMintable: false }] + } + ], + salt: "123456789" + }; const address = await fireblocks.getDeterministicAddress(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.getDeployableAddress(tokenizationApiGetDeployableAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().getDeployableAddress(getDeployableAddressRequestDto,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.get_deployable_address(get_deployable_address_request_dto,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.getDeployableAddress(tokenizationApiGetDeployableAddressRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.tokenization().getDeployableAddress(getDeployableAddressRequestDto,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.get_deployable_address(get_deployable_address_request_dto,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/tokens: + post: + description: Facilitates the creation of a new token on one or more blockchains. + operationId: issueTokenMultiChain + 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/CreateMultichainTokenRequestDto' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/IssueTokenMultichainResponse' + description: Tokens were created successfully + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidParamaterValueError' + description: Invalid input. + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AddressNotAvailableError' + description: Address is already taken. + summary: Issue a token on one or more blockchains + tags: + - Tokenization + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + vaultAccountId: "0", + createParams: { + contractId: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d", + deployFunctionParams: [ + { name: "name", type: "string", value: "TokenName" }, + { name: "symbol", type: "string", value: "TokenSymbol" }, + { + name: "customConfigProps", + type: "tuple", + components: [ + { name: "_isMintable", type: "bool" } + ], + value: [{ _isMintable: false }] + }, + ], + }, + salt: "123456789", + chains: ["ETH", "POLYGON"] + }; const token = await fireblocks.issueTokenMultiChain(payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.issueTokenMultiChain(tokenizationApiIssueTokenMultiChainRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response = fireblocks.tokenization().issueTokenMultiChain(createMultichainTokenRequestDto,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.issue_token_multi_chain(create_multichain_token_request_dto,\ + \ idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.issueTokenMultiChain(tokenizationApiIssueTokenMultiChainRequest);" + - lang: Java + source: "CompletableFuture>> response = fireblocks.tokenization().issueTokenMultiChain(createMultichainTokenRequestDto,\ + \ idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.issue_token_multi_chain(create_multichain_token_request_dto,\ + \ idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /tokenization/multichain/token/{tokenLinkId}: + post: + description: 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. + operationId: reIssueTokenMultiChain + 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 + - description: The ID of the token link + explode: false + in: path + name: tokenLinkId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReissueMultichainTokenRequestDto' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/IssueTokenMultichainResponse' + description: Successfully reissued multichain token + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkNotMultichainCompatibleHttpError' + description: Invalid input + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployedContractNotFoundError' + description: Deployed contract not found + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AddressNotAvailableError' + description: Address is already taken + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Reissue a multichain token + tags: + - Tokenization + x-readme: + code-samples: + - language: javascript + code: |- + const payload = { + vaultAccountId: "0", + chains: "ETH", + salt: "123456789", + chains: ["ETH", "POLYGON"] + }; const token = await fireblocks.reIssueTokenMultiChain(tokenLinkId, payload); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.tokenization.reIssueTokenMultiChain(tokenizationApiReIssueTokenMultiChainRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequestDto,\ + \ tokenLinkId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.tokenization.re_issue_token_multi_chain(reissue_multichain_token_request_dto,\ + \ token_link_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.tokenization.reIssueTokenMultiChain(tokenizationApiReIssueTokenMultiChainRequest);" + - lang: Java + source: "CompletableFuture>> response = fireblocks.tokenization().reIssueTokenMultiChain(reissueMultichainTokenRequestDto,\ + \ tokenLinkId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.tokenization.re_issue_token_multi_chain(reissue_multichain_token_request_dto,\ + \ token_link_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json /tokenization/collections: get: description: Get collections (paginated) @@ -35193,6 +35493,291 @@ components: example: Not Found type: string type: object + GetDeployableAddressRequestDto: + description: Request body for calculating deterministic address + example: + chainDescriptor: ETH + initParams: + - internalType: string + name: name + type: string + value: name + - internalType: string + name: symbol + type: string + value: symbol + - components: + - internalType: bool + name: _isMintable + type: bool + internalType: struct MyStruct + value: + - internalType: bool + name: _isMintable + type: bool + value: false + salt: "123456789" + templateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + properties: + chainDescriptor: + description: The base asset identifier of the blockchain (legacyId) to calculate + deterministic address + example: ETH + type: string + templateId: + description: The template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + format: uuid + type: string + initParams: + description: The deploy function parameters and values of the contract template + example: + - internalType: string + name: name + type: string + value: name + - internalType: string + name: symbol + type: string + value: symbol + - components: + - internalType: bool + name: _isMintable + type: bool + internalType: struct MyStruct + value: + - internalType: bool + name: _isMintable + type: bool + value: false + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + 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: + - chainDescriptor + - initParams + - salt + - templateId + type: object + DeployableAddressResponseDto: + description: Response DTO containing a deployable address + example: + address: 0x1234567890abcdef1234567890abcdef12345678 + properties: + address: + description: The deployable address + type: string + required: + - address + type: object + InvalidParamaterValueError: + example: + code: 400 + message: Invalid initParams. + properties: + message: + description: Bad request error message + example: Invalid initParams. + type: string + code: + description: Error code + example: 400 + type: number + required: + - code + - message + type: object + AddressNotAvailableError: + example: + code: 409 + message: Address is already taken + properties: + message: + description: Conflict error message + example: Address is already taken + type: string + code: + description: Error code + example: 409 + type: number + required: + - code + - message + type: object + CreateMultichainTokenRequestDto: + example: + salt: "123456789" + chains: + - ETH + - POLYGON + displayName: displayName + useGasless: false + fee: "2000" + vaultAccountId: "0" + feeLevel: MEDIUM + createParams: + deployFunctionParams: + - internalType: string + name: name + type: string + value: name + - internalType: string + name: symbol + type: string + value: symbol + - components: + - internalType: bool + name: _isMintable + type: bool + internalType: struct MyStruct + name: customConfigProps + type: tuple + value: + - internalType: bool + name: _isMintable + type: bool + value: false + contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + properties: + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token + example: "0" + type: string + createParams: + $ref: '#/components/schemas/CreateMultichainTokenRequestDto_createParams' + 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 + chains: + description: The base asset identifiers of the blockchains (legacyId) to + calculate deterministic addresses + example: + - ETH + - POLYGON + items: + type: string + type: array + displayName: + type: string + useGasless: + description: "Indicates whether the token should be created in a gasless\ + \ manner, utilizing the ERC-2771 standard. When set to true, the transaction\ + \ will be relayed by a designated relayer. The workspace must be configured\ + \ to use Fireblocks gasless relay." + example: false + type: boolean + fee: + description: Max fee amount for the write function transaction. interchangeable + with the 'feeLevel' field + example: "2000" + type: string + feeLevel: + description: Fee level for the write function transaction. interchangeable + with the 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + required: + - chains + - createParams + - vaultAccountId + type: object + IssueTokenMultichainResponse: + description: Response schema for issuing tokens across multiple chains + items: + $ref: '#/components/schemas/TokenLinkDto' + type: array + ReissueMultichainTokenRequestDto: + example: + chains: + - ETH + - POLYGON + useGasless: true + fee: "2000" + vaultAccountId: "0" + feeLevel: MEDIUM + properties: + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token + example: "0" + type: string + chains: + description: The base asset identifiers of the blockchains you want to deploy + to + example: + - ETH + - POLYGON + items: + type: string + type: array + useGasless: + description: Whether to use gasless deployment or not + example: true + type: boolean + fee: + description: Max fee amount for the deploy request. Interchangeable with + the 'feeLevel' field + example: "2000" + type: string + feeLevel: + description: Fee level for the deploy request. Interchangeable with the + 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + required: + - chains + - vaultAccountId + type: object + TokenLinkNotMultichainCompatibleHttpError: + example: + code: 400 + message: Token link is not multichain compatible. + properties: + message: + description: Bad request error message + example: Token link is not multichain compatible. + type: string + code: + description: Error code + example: 400 + type: number + required: + - code + - message + type: object + DeployedContractNotFoundError: + example: + code: 404 + message: Deployed contract not found + properties: + message: + description: Not Found error message + example: Deployed contract not found + type: string + code: + description: Error code + example: 404 + type: number + required: + - code + - message + type: object CollectionType: description: The type of collection enum: @@ -45471,6 +46056,9 @@ components: oneOf: - $ref: '#/components/schemas/EVMTokenCreateParamsDto' - $ref: '#/components/schemas/StellarRippleCreateParamsDto' + CreateMultichainTokenRequestDto_createParams: + oneOf: + - $ref: '#/components/schemas/EVMTokenCreateParamsDto' SetOtaStatusResponse_oneOf: example: message: No change needed. The current status is false diff --git a/docs/AddressNotAvailableError.md b/docs/AddressNotAvailableError.md new file mode 100644 index 00000000..d1bcb510 --- /dev/null +++ b/docs/AddressNotAvailableError.md @@ -0,0 +1,14 @@ + + +# AddressNotAvailableError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Conflict error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/CreateMultichainTokenRequestDto.md b/docs/CreateMultichainTokenRequestDto.md new file mode 100644 index 00000000..c3f19ddf --- /dev/null +++ b/docs/CreateMultichainTokenRequestDto.md @@ -0,0 +1,30 @@ + + +# CreateMultichainTokenRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | +|**createParams** | [**CreateMultichainTokenRequestDtoCreateParams**](CreateMultichainTokenRequestDtoCreateParams.md) | | | +|**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] | +|**chains** | **List<String>** | The base asset identifiers of the blockchains (legacyId) to calculate deterministic addresses | | +|**displayName** | **String** | | [optional] | +|**useGasless** | **Boolean** | Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 standard. When set to true, the transaction will be relayed by a designated relayer. The workspace must be configured to use Fireblocks gasless relay. | [optional] | +|**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/CreateMultichainTokenRequestDtoCreateParams.md b/docs/CreateMultichainTokenRequestDtoCreateParams.md new file mode 100644 index 00000000..185a2c2d --- /dev/null +++ b/docs/CreateMultichainTokenRequestDtoCreateParams.md @@ -0,0 +1,28 @@ + + +# CreateMultichainTokenRequestDtoCreateParams + +## oneOf schemas +* [EVMTokenCreateParamsDto](EVMTokenCreateParamsDto.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateMultichainTokenRequestDtoCreateParams; +import com.fireblocks.sdk.model.EVMTokenCreateParamsDto; + +public class Example { + public static void main(String[] args) { + CreateMultichainTokenRequestDtoCreateParams exampleCreateMultichainTokenRequestDtoCreateParams = new CreateMultichainTokenRequestDtoCreateParams(); + + // create a new EVMTokenCreateParamsDto + EVMTokenCreateParamsDto exampleEVMTokenCreateParamsDto = new EVMTokenCreateParamsDto(); + // set CreateMultichainTokenRequestDtoCreateParams to EVMTokenCreateParamsDto + exampleCreateMultichainTokenRequestDtoCreateParams.setActualInstance(exampleEVMTokenCreateParamsDto); + // to get back the EVMTokenCreateParamsDto set earlier + EVMTokenCreateParamsDto testEVMTokenCreateParamsDto = (EVMTokenCreateParamsDto) exampleCreateMultichainTokenRequestDtoCreateParams.getActualInstance(); + } +} +``` + + diff --git a/docs/DeployableAddressResponseDto.md b/docs/DeployableAddressResponseDto.md new file mode 100644 index 00000000..a5ddefbd --- /dev/null +++ b/docs/DeployableAddressResponseDto.md @@ -0,0 +1,14 @@ + + +# DeployableAddressResponseDto + +Response DTO containing a deployable address + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**address** | **String** | The deployable address | | + + + diff --git a/docs/DeployedContractNotFoundError.md b/docs/DeployedContractNotFoundError.md new file mode 100644 index 00000000..6eb85f11 --- /dev/null +++ b/docs/DeployedContractNotFoundError.md @@ -0,0 +1,14 @@ + + +# DeployedContractNotFoundError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Not Found error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/GetDeployableAddressRequestDto.md b/docs/GetDeployableAddressRequestDto.md new file mode 100644 index 00000000..4de2d1bd --- /dev/null +++ b/docs/GetDeployableAddressRequestDto.md @@ -0,0 +1,17 @@ + + +# GetDeployableAddressRequestDto + +Request body for calculating deterministic address + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**chainDescriptor** | **String** | The base asset identifier of the blockchain (legacyId) to calculate deterministic address | | +|**templateId** | **UUID** | The template identifier | | +|**initParams** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The deploy function parameters and values of the contract template | | +|**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 | | + + + diff --git a/docs/InvalidParamaterValueError.md b/docs/InvalidParamaterValueError.md new file mode 100644 index 00000000..f4b29447 --- /dev/null +++ b/docs/InvalidParamaterValueError.md @@ -0,0 +1,14 @@ + + +# InvalidParamaterValueError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Bad request error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/ReissueMultichainTokenRequestDto.md b/docs/ReissueMultichainTokenRequestDto.md new file mode 100644 index 00000000..926f5e9a --- /dev/null +++ b/docs/ReissueMultichainTokenRequestDto.md @@ -0,0 +1,27 @@ + + +# ReissueMultichainTokenRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | +|**chains** | **List<String>** | The base asset identifiers of the blockchains you want to deploy to | | +|**useGasless** | **Boolean** | Whether to use gasless deployment or not | [optional] | +|**fee** | **String** | Max fee amount for the deploy request. Interchangeable with the 'feeLevel' field | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the deploy request. Interchangeable with the 'fee' field | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/TokenLinkNotMultichainCompatibleHttpError.md b/docs/TokenLinkNotMultichainCompatibleHttpError.md new file mode 100644 index 00000000..ca4cbf98 --- /dev/null +++ b/docs/TokenLinkNotMultichainCompatibleHttpError.md @@ -0,0 +1,14 @@ + + +# TokenLinkNotMultichainCompatibleHttpError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Bad request error message | | +|**code** | **BigDecimal** | Error code | | + + + diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md index 48c2a728..39bae766 100644 --- a/docs/TokenizationApi.md +++ b/docs/TokenizationApi.md @@ -8,12 +8,15 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**createNewCollection**](TokenizationApi.md#createNewCollection) | **POST** /tokenization/collections | Create a new collection | | [**fetchCollectionTokenDetails**](TokenizationApi.md#fetchCollectionTokenDetails) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details | | [**getCollectionById**](TokenizationApi.md#getCollectionById) | **GET** /tokenization/collections/{id} | Get a collection by id | +| [**getDeployableAddress**](TokenizationApi.md#getDeployableAddress) | **POST** /tokenization/multichain/deterministic_address | Get deterministic address for contract deployment | | [**getLinkedCollections**](TokenizationApi.md#getLinkedCollections) | **GET** /tokenization/collections | Get collections | | [**getLinkedToken**](TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token | | [**getLinkedTokens**](TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens | | [**issueNewToken**](TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token | +| [**issueTokenMultiChain**](TokenizationApi.md#issueTokenMultiChain) | **POST** /tokenization/multichain/tokens | Issue a token on one or more blockchains | | [**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/token/{tokenLinkId} | Reissue a multichain token | | [**unlink**](TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token | | [**unlinkCollection**](TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link | @@ -359,6 +362,93 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getDeployableAddress + +> CompletableFuture> getDeployableAddress getDeployableAddress(getDeployableAddressRequestDto, 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); + + GetDeployableAddressRequestDto getDeployableAddressRequestDto = new GetDeployableAddressRequestDto(); // GetDeployableAddressRequestDto | + 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(getDeployableAddressRequestDto, 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 | +|------------- | ------------- | ------------- | -------------| +| **getDeployableAddressRequestDto** | [**GetDeployableAddressRequestDto**](GetDeployableAddressRequestDto.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 -
| + + ## getLinkedCollections > CompletableFuture> getLinkedCollections getLinkedCollections(pageCursor, pageSize, status) @@ -701,6 +791,92 @@ No authorization required | **409** | Asset already exists | - | +## issueTokenMultiChain + +> CompletableFuture>> issueTokenMultiChain issueTokenMultiChain(createMultichainTokenRequestDto, idempotencyKey) + +Issue a token on one or more blockchains + +Facilitates the creation of a new token on one or more blockchains. + +### 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); + + CreateMultichainTokenRequestDto createMultichainTokenRequestDto = new CreateMultichainTokenRequestDto(); // CreateMultichainTokenRequestDto | + 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(createMultichainTokenRequestDto, 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("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("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createMultichainTokenRequestDto** | [**CreateMultichainTokenRequestDto**](CreateMultichainTokenRequestDto.md)| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Tokens were created successfully | - | +| **400** | Invalid input. | - | +| **409** | Address is already taken. | - | + + ## link > CompletableFuture> link link(tokenLinkRequestDto, idempotencyKey) @@ -876,6 +1052,96 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## reIssueTokenMultiChain + +> CompletableFuture>> reIssueTokenMultiChain reIssueTokenMultiChain(reissueMultichainTokenRequestDto, tokenLinkId, idempotencyKey) + +Reissue a multichain 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. + +### 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); + + ReissueMultichainTokenRequestDto reissueMultichainTokenRequestDto = new ReissueMultichainTokenRequestDto(); // ReissueMultichainTokenRequestDto | + 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().reIssueTokenMultiChain(reissueMultichainTokenRequestDto, 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#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#reIssueTokenMultiChain"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **reissueMultichainTokenRequestDto** | [**ReissueMultichainTokenRequestDto**](ReissueMultichainTokenRequestDto.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> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **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 | - | +| **0** | Error Response | * X-Request-ID -
| + + ## unlink > CompletableFuture> unlink unlink(id) diff --git a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java index 285600f5..0d27766c 100644 --- a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -26,8 +26,12 @@ import com.fireblocks.sdk.model.CollectionLinkDto; import com.fireblocks.sdk.model.CollectionMintRequestDto; import com.fireblocks.sdk.model.CollectionMintResponseDto; +import com.fireblocks.sdk.model.CreateMultichainTokenRequestDto; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.DeployableAddressResponseDto; +import com.fireblocks.sdk.model.GetDeployableAddressRequestDto; import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; +import com.fireblocks.sdk.model.ReissueMultichainTokenRequestDto; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; @@ -391,6 +395,94 @@ private HttpRequest.Builder getCollectionByIdRequestBuilder(String id) throws Ap } return localVarRequestBuilder; } + /** + * 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. + * + * @param getDeployableAddressRequestDto (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<DeployableAddressResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getDeployableAddress( + GetDeployableAddressRequestDto getDeployableAddressRequestDto, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getDeployableAddressRequestBuilder( + getDeployableAddressRequestDto, 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( + "getDeployableAddress", 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< + DeployableAddressResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getDeployableAddressRequestBuilder( + GetDeployableAddressRequestDto getDeployableAddressRequestDto, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "getDeployableAddress", + "getDeployableAddressRequestDto", + getDeployableAddressRequestDto); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/deterministic_address"; + + 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(getDeployableAddressRequestDto); + 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 collections Get collections (paginated) * @@ -721,6 +813,94 @@ 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. + * + * @param createMultichainTokenRequestDto (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<TokenLinkDto>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> issueTokenMultiChain( + CreateMultichainTokenRequestDto createMultichainTokenRequestDto, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + issueTokenMultiChainRequestBuilder( + createMultichainTokenRequestDto, 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( + "issueTokenMultiChain", 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< + TokenLinkDto>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder issueTokenMultiChainRequestBuilder( + CreateMultichainTokenRequestDto createMultichainTokenRequestDto, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "issueTokenMultiChain", + "createMultichainTokenRequestDto", + createMultichainTokenRequestDto); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/multichain/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(createMultichainTokenRequestDto); + 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; + } /** * Link a contract Link an a contract * @@ -886,6 +1066,104 @@ private HttpRequest.Builder mintCollectionTokenRequestBuilder( } return localVarRequestBuilder; } + /** + * Reissue a multichain 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. + * + * @param reissueMultichainTokenRequestDto (required) + * @param tokenLinkId The ID of the token link (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<TokenLinkDto>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> reIssueTokenMultiChain( + ReissueMultichainTokenRequestDto reissueMultichainTokenRequestDto, + String tokenLinkId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + reIssueTokenMultiChainRequestBuilder( + reissueMultichainTokenRequestDto, tokenLinkId, 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( + "reIssueTokenMultiChain", 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< + TokenLinkDto>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder reIssueTokenMultiChainRequestBuilder( + ReissueMultichainTokenRequestDto reissueMultichainTokenRequestDto, + String tokenLinkId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "reIssueTokenMultiChain", + "reissueMultichainTokenRequestDto", + reissueMultichainTokenRequestDto); + ValidationUtils.assertParamExistsAndNotEmpty( + "reIssueTokenMultiChain", "tokenLinkId", tokenLinkId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/multichain/token/{tokenLinkId}" + .replace("{tokenLinkId}", ApiClient.urlEncode(tokenLinkId.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(reissueMultichainTokenRequestDto); + 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. diff --git a/src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java b/src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java new file mode 100644 index 00000000..536565ee --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AddressNotAvailableError.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AddressNotAvailableError */ +@JsonPropertyOrder({ + AddressNotAvailableError.JSON_PROPERTY_MESSAGE, + AddressNotAvailableError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddressNotAvailableError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public AddressNotAvailableError() {} + + public AddressNotAvailableError message(String message) { + this.message = message; + return this; + } + + /** + * Conflict error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AddressNotAvailableError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this AddressNotAvailableError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddressNotAvailableError addressNotAvailableError = (AddressNotAvailableError) o; + return Objects.equals(this.message, addressNotAvailableError.message) + && Objects.equals(this.code, addressNotAvailableError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddressNotAvailableError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDto.java b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDto.java new file mode 100644 index 00000000..d093262a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDto.java @@ -0,0 +1,484 @@ +/* + * 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; + +/** CreateMultichainTokenRequestDto */ +@JsonPropertyOrder({ + CreateMultichainTokenRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CreateMultichainTokenRequestDto.JSON_PROPERTY_CREATE_PARAMS, + CreateMultichainTokenRequestDto.JSON_PROPERTY_SALT, + CreateMultichainTokenRequestDto.JSON_PROPERTY_CHAINS, + CreateMultichainTokenRequestDto.JSON_PROPERTY_DISPLAY_NAME, + CreateMultichainTokenRequestDto.JSON_PROPERTY_USE_GASLESS, + CreateMultichainTokenRequestDto.JSON_PROPERTY_FEE, + CreateMultichainTokenRequestDto.JSON_PROPERTY_FEE_LEVEL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateMultichainTokenRequestDto { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CREATE_PARAMS = "createParams"; + private CreateMultichainTokenRequestDtoCreateParams createParams; + + public static final String JSON_PROPERTY_SALT = "salt"; + private String salt; + + public static final String JSON_PROPERTY_CHAINS = "chains"; + private List chains = 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; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** + * 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 CreateMultichainTokenRequestDto() {} + + public CreateMultichainTokenRequestDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to issue the token + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CreateMultichainTokenRequestDto createParams( + CreateMultichainTokenRequestDtoCreateParams createParams) { + this.createParams = createParams; + return this; + } + + /** + * Get createParams + * + * @return createParams + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateMultichainTokenRequestDtoCreateParams getCreateParams() { + return createParams; + } + + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreateParams(CreateMultichainTokenRequestDtoCreateParams createParams) { + this.createParams = createParams; + } + + public CreateMultichainTokenRequestDto 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; + } + + public CreateMultichainTokenRequestDto chains(List chains) { + this.chains = chains; + return this; + } + + public CreateMultichainTokenRequestDto addChainsItem(String chainsItem) { + if (this.chains == null) { + this.chains = new ArrayList<>(); + } + this.chains.add(chainsItem); + return this; + } + + /** + * The base asset identifiers of the blockchains (legacyId) to calculate deterministic addresses + * + * @return chains + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChains() { + return chains; + } + + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChains(List chains) { + this.chains = chains; + } + + public CreateMultichainTokenRequestDto displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get displayName + * + * @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 CreateMultichainTokenRequestDto useGasless(Boolean useGasless) { + this.useGasless = useGasless; + return this; + } + + /** + * Indicates whether the token should be created in a gasless manner, utilizing the ERC-2771 + * standard. When set to true, the transaction will be relayed by a designated relayer. The + * workspace must be configured to use Fireblocks gasless relay. + * + * @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 CreateMultichainTokenRequestDto 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 CreateMultichainTokenRequestDto 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; + } + + /** Return true if this CreateMultichainTokenRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMultichainTokenRequestDto createMultichainTokenRequestDto = + (CreateMultichainTokenRequestDto) o; + return Objects.equals(this.vaultAccountId, createMultichainTokenRequestDto.vaultAccountId) + && Objects.equals(this.createParams, createMultichainTokenRequestDto.createParams) + && Objects.equals(this.salt, createMultichainTokenRequestDto.salt) + && Objects.equals(this.chains, createMultichainTokenRequestDto.chains) + && Objects.equals(this.displayName, createMultichainTokenRequestDto.displayName) + && Objects.equals(this.useGasless, createMultichainTokenRequestDto.useGasless) + && Objects.equals(this.fee, createMultichainTokenRequestDto.fee) + && Objects.equals(this.feeLevel, createMultichainTokenRequestDto.feeLevel); + } + + @Override + public int hashCode() { + return Objects.hash( + vaultAccountId, createParams, salt, chains, displayName, useGasless, fee, feeLevel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateMultichainTokenRequestDto {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" createParams: ").append(toIndentedString(createParams)).append("\n"); + sb.append(" salt: ").append(toIndentedString(salt)).append("\n"); + sb.append(" chains: ").append(toIndentedString(chains)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).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) { + joiner.add(getCreateParams().toUrlQueryString(prefix + "createParams" + suffix)); + } + + // 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"))); + } + + // add `chains` to the URL query string + if (getChains() != null) { + for (int i = 0; i < getChains().size(); i++) { + joiner.add( + String.format( + "%schains%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getChains().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `displayName` to the URL query string + if (getDisplayName() != null) { + joiner.add( + String.format( + "%sdisplayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayName()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `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 `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParams.java b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParams.java new file mode 100644 index 00000000..63c87909 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParams.java @@ -0,0 +1,266 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize( + using = + CreateMultichainTokenRequestDtoCreateParams + .CreateMultichainTokenRequestDtoCreateParamsDeserializer.class) +@JsonSerialize( + using = + CreateMultichainTokenRequestDtoCreateParams + .CreateMultichainTokenRequestDtoCreateParamsSerializer.class) +public class CreateMultichainTokenRequestDtoCreateParams extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(CreateMultichainTokenRequestDtoCreateParams.class.getName()); + + public static class CreateMultichainTokenRequestDtoCreateParamsSerializer + extends StdSerializer { + public CreateMultichainTokenRequestDtoCreateParamsSerializer( + Class t) { + super(t); + } + + public CreateMultichainTokenRequestDtoCreateParamsSerializer() { + this(null); + } + + @Override + public void serialize( + CreateMultichainTokenRequestDtoCreateParams value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateMultichainTokenRequestDtoCreateParamsDeserializer + extends StdDeserializer { + public CreateMultichainTokenRequestDtoCreateParamsDeserializer() { + this(CreateMultichainTokenRequestDtoCreateParams.class); + } + + public CreateMultichainTokenRequestDtoCreateParamsDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateMultichainTokenRequestDtoCreateParams deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize EVMTokenCreateParamsDto + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EVMTokenCreateParamsDto.class.equals(Integer.class) + || EVMTokenCreateParamsDto.class.equals(Long.class) + || EVMTokenCreateParamsDto.class.equals(Float.class) + || EVMTokenCreateParamsDto.class.equals(Double.class) + || EVMTokenCreateParamsDto.class.equals(Boolean.class) + || EVMTokenCreateParamsDto.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((EVMTokenCreateParamsDto.class.equals(Integer.class) + || EVMTokenCreateParamsDto.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((EVMTokenCreateParamsDto.class.equals(Float.class) + || EVMTokenCreateParamsDto.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (EVMTokenCreateParamsDto.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (EVMTokenCreateParamsDto.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(EVMTokenCreateParamsDto.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'EVMTokenCreateParamsDto'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'EVMTokenCreateParamsDto'", + e); + } + + if (match == 1) { + CreateMultichainTokenRequestDtoCreateParams ret = + new CreateMultichainTokenRequestDtoCreateParams(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for" + + " CreateMultichainTokenRequestDtoCreateParams: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public CreateMultichainTokenRequestDtoCreateParams getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateMultichainTokenRequestDtoCreateParams cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateMultichainTokenRequestDtoCreateParams() { + super("oneOf", Boolean.FALSE); + } + + public CreateMultichainTokenRequestDtoCreateParams(EVMTokenCreateParamsDto o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("EVMTokenCreateParamsDto", EVMTokenCreateParamsDto.class); + JSON.registerDescendants( + CreateMultichainTokenRequestDtoCreateParams.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateMultichainTokenRequestDtoCreateParams.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: EVMTokenCreateParamsDto + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(EVMTokenCreateParamsDto.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be EVMTokenCreateParamsDto"); + } + + /** + * Get the actual instance, which can be the following: EVMTokenCreateParamsDto + * + * @return The actual instance (EVMTokenCreateParamsDto) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `EVMTokenCreateParamsDto`. If the actual instance is not + * `EVMTokenCreateParamsDto`, the ClassCastException will be thrown. + * + * @return The actual instance of `EVMTokenCreateParamsDto` + * @throws ClassCastException if the instance is not `EVMTokenCreateParamsDto` + */ + public EVMTokenCreateParamsDto getEVMTokenCreateParamsDto() throws ClassCastException { + return (EVMTokenCreateParamsDto) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof EVMTokenCreateParamsDto) { + if (getActualInstance() != null) { + joiner.add( + ((EVMTokenCreateParamsDto) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeployableAddressResponseDto.java b/src/main/java/com/fireblocks/sdk/model/DeployableAddressResponseDto.java new file mode 100644 index 00000000..b9df4fc3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployableAddressResponseDto.java @@ -0,0 +1,140 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Response DTO containing a deployable address */ +@JsonPropertyOrder({DeployableAddressResponseDto.JSON_PROPERTY_ADDRESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployableAddressResponseDto { + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public DeployableAddressResponseDto() {} + + public DeployableAddressResponseDto address(String address) { + this.address = address; + return this; + } + + /** + * The deployable address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(String address) { + this.address = address; + } + + /** Return true if this DeployableAddressResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployableAddressResponseDto deployableAddressResponseDto = + (DeployableAddressResponseDto) o; + return Objects.equals(this.address, deployableAddressResponseDto.address); + } + + @Override + public int hashCode() { + return Objects.hash(address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployableAddressResponseDto {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAddress()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java b/src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java new file mode 100644 index 00000000..9c6967fd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployedContractNotFoundError.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DeployedContractNotFoundError */ +@JsonPropertyOrder({ + DeployedContractNotFoundError.JSON_PROPERTY_MESSAGE, + DeployedContractNotFoundError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployedContractNotFoundError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public DeployedContractNotFoundError() {} + + public DeployedContractNotFoundError message(String message) { + this.message = message; + return this; + } + + /** + * Not Found error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public DeployedContractNotFoundError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this DeployedContractNotFoundError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployedContractNotFoundError deployedContractNotFoundError = + (DeployedContractNotFoundError) o; + return Objects.equals(this.message, deployedContractNotFoundError.message) + && Objects.equals(this.code, deployedContractNotFoundError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployedContractNotFoundError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDto.java b/src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDto.java new file mode 100644 index 00000000..93de525b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDto.java @@ -0,0 +1,289 @@ +/* + * 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; + +/** Request body for calculating deterministic address */ +@JsonPropertyOrder({ + GetDeployableAddressRequestDto.JSON_PROPERTY_CHAIN_DESCRIPTOR, + GetDeployableAddressRequestDto.JSON_PROPERTY_TEMPLATE_ID, + GetDeployableAddressRequestDto.JSON_PROPERTY_INIT_PARAMS, + GetDeployableAddressRequestDto.JSON_PROPERTY_SALT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetDeployableAddressRequestDto { + public static final String JSON_PROPERTY_CHAIN_DESCRIPTOR = "chainDescriptor"; + private String chainDescriptor; + + public static final String JSON_PROPERTY_TEMPLATE_ID = "templateId"; + private UUID templateId; + + public static final String JSON_PROPERTY_INIT_PARAMS = "initParams"; + private List initParams = new ArrayList<>(); + + public static final String JSON_PROPERTY_SALT = "salt"; + private String salt; + + public GetDeployableAddressRequestDto() {} + + public GetDeployableAddressRequestDto chainDescriptor(String chainDescriptor) { + this.chainDescriptor = chainDescriptor; + return this; + } + + /** + * The base asset identifier of the blockchain (legacyId) to calculate deterministic address + * + * @return chainDescriptor + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHAIN_DESCRIPTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChainDescriptor() { + return chainDescriptor; + } + + @JsonProperty(JSON_PROPERTY_CHAIN_DESCRIPTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChainDescriptor(String chainDescriptor) { + this.chainDescriptor = chainDescriptor; + } + + public GetDeployableAddressRequestDto templateId(UUID templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template identifier + * + * @return templateId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getTemplateId() { + return templateId; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTemplateId(UUID templateId) { + this.templateId = templateId; + } + + public GetDeployableAddressRequestDto initParams(List initParams) { + this.initParams = initParams; + return this; + } + + public GetDeployableAddressRequestDto addInitParamsItem(ParameterWithValue initParamsItem) { + if (this.initParams == null) { + this.initParams = new ArrayList<>(); + } + this.initParams.add(initParamsItem); + return this; + } + + /** + * The deploy function parameters and values of the contract template + * + * @return initParams + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInitParams() { + return initParams; + } + + @JsonProperty(JSON_PROPERTY_INIT_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInitParams(List initParams) { + this.initParams = initParams; + } + + public GetDeployableAddressRequestDto 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.Nonnull + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSalt() { + return salt; + } + + @JsonProperty(JSON_PROPERTY_SALT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSalt(String salt) { + this.salt = salt; + } + + /** Return true if this GetDeployableAddressRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDeployableAddressRequestDto getDeployableAddressRequestDto = + (GetDeployableAddressRequestDto) o; + return Objects.equals(this.chainDescriptor, getDeployableAddressRequestDto.chainDescriptor) + && Objects.equals(this.templateId, getDeployableAddressRequestDto.templateId) + && Objects.equals(this.initParams, getDeployableAddressRequestDto.initParams) + && Objects.equals(this.salt, getDeployableAddressRequestDto.salt); + } + + @Override + public int hashCode() { + return Objects.hash(chainDescriptor, templateId, initParams, salt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDeployableAddressRequestDto {\n"); + sb.append(" chainDescriptor: ").append(toIndentedString(chainDescriptor)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" initParams: ").append(toIndentedString(initParams)).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 `chainDescriptor` to the URL query string + if (getChainDescriptor() != null) { + joiner.add( + String.format( + "%schainDescriptor%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getChainDescriptor()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `templateId` to the URL query string + if (getTemplateId() != null) { + joiner.add( + String.format( + "%stemplateId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTemplateId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `initParams` to the URL query string + if (getInitParams() != null) { + for (int i = 0; i < getInitParams().size(); i++) { + if (getInitParams().get(i) != null) { + joiner.add( + getInitParams() + .get(i) + .toUrlQueryString( + String.format( + "%sinitParams%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `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/InvalidParamaterValueError.java b/src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java new file mode 100644 index 00000000..5725df14 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** InvalidParamaterValueError */ +@JsonPropertyOrder({ + InvalidParamaterValueError.JSON_PROPERTY_MESSAGE, + InvalidParamaterValueError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InvalidParamaterValueError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public InvalidParamaterValueError() {} + + public InvalidParamaterValueError message(String message) { + this.message = message; + return this; + } + + /** + * Bad request error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public InvalidParamaterValueError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this InvalidParamaterValueError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InvalidParamaterValueError invalidParamaterValueError = (InvalidParamaterValueError) o; + return Objects.equals(this.message, invalidParamaterValueError.message) + && Objects.equals(this.code, invalidParamaterValueError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InvalidParamaterValueError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDto.java b/src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDto.java new file mode 100644 index 00000000..8c094eab --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDto.java @@ -0,0 +1,360 @@ +/* + * 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; + +/** ReissueMultichainTokenRequestDto */ +@JsonPropertyOrder({ + ReissueMultichainTokenRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + ReissueMultichainTokenRequestDto.JSON_PROPERTY_CHAINS, + ReissueMultichainTokenRequestDto.JSON_PROPERTY_USE_GASLESS, + ReissueMultichainTokenRequestDto.JSON_PROPERTY_FEE, + ReissueMultichainTokenRequestDto.JSON_PROPERTY_FEE_LEVEL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReissueMultichainTokenRequestDto { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CHAINS = "chains"; + private List chains = new ArrayList<>(); + + public static final String JSON_PROPERTY_USE_GASLESS = "useGasless"; + private Boolean useGasless; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + /** Fee level for the deploy request. 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 ReissueMultichainTokenRequestDto() {} + + public ReissueMultichainTokenRequestDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to issue the token + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public ReissueMultichainTokenRequestDto chains(List chains) { + this.chains = chains; + return this; + } + + public ReissueMultichainTokenRequestDto addChainsItem(String chainsItem) { + if (this.chains == null) { + this.chains = new ArrayList<>(); + } + this.chains.add(chainsItem); + return this; + } + + /** + * The base asset identifiers of the blockchains you want to deploy to + * + * @return chains + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChains() { + return chains; + } + + @JsonProperty(JSON_PROPERTY_CHAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setChains(List chains) { + this.chains = chains; + } + + public ReissueMultichainTokenRequestDto 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 ReissueMultichainTokenRequestDto fee(String fee) { + this.fee = fee; + return this; + } + + /** + * Max fee amount for the deploy request. 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 ReissueMultichainTokenRequestDto feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the deploy request. 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; + } + + /** Return true if this ReissueMultichainTokenRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReissueMultichainTokenRequestDto reissueMultichainTokenRequestDto = + (ReissueMultichainTokenRequestDto) o; + return Objects.equals(this.vaultAccountId, reissueMultichainTokenRequestDto.vaultAccountId) + && Objects.equals(this.chains, reissueMultichainTokenRequestDto.chains) + && Objects.equals(this.useGasless, reissueMultichainTokenRequestDto.useGasless) + && Objects.equals(this.fee, reissueMultichainTokenRequestDto.fee) + && Objects.equals(this.feeLevel, reissueMultichainTokenRequestDto.feeLevel); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, chains, useGasless, fee, feeLevel); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReissueMultichainTokenRequestDto {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" chains: ").append(toIndentedString(chains)).append("\n"); + sb.append(" useGasless: ").append(toIndentedString(useGasless)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).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 `chains` to the URL query string + if (getChains() != null) { + for (int i = 0; i < getChains().size(); i++) { + joiner.add( + String.format( + "%schains%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getChains().get(i)), + 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 `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java new file mode 100644 index 00000000..e67798f5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpError.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokenLinkNotMultichainCompatibleHttpError */ +@JsonPropertyOrder({ + TokenLinkNotMultichainCompatibleHttpError.JSON_PROPERTY_MESSAGE, + TokenLinkNotMultichainCompatibleHttpError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenLinkNotMultichainCompatibleHttpError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private BigDecimal code; + + public TokenLinkNotMultichainCompatibleHttpError() {} + + public TokenLinkNotMultichainCompatibleHttpError message(String message) { + this.message = message; + return this; + } + + /** + * Bad request error message + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public TokenLinkNotMultichainCompatibleHttpError code(BigDecimal code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(BigDecimal code) { + this.code = code; + } + + /** Return true if this TokenLinkNotMultichainCompatibleHttpError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenLinkNotMultichainCompatibleHttpError tokenLinkNotMultichainCompatibleHttpError = + (TokenLinkNotMultichainCompatibleHttpError) o; + return Objects.equals(this.message, tokenLinkNotMultichainCompatibleHttpError.message) + && Objects.equals(this.code, tokenLinkNotMultichainCompatibleHttpError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenLinkNotMultichainCompatibleHttpError {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `code` to the URL query string + if (getCode() != null) { + joiner.add( + String.format( + "%scode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java index fdc07355..b2a0d6e9 100644 --- a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java @@ -21,12 +21,17 @@ import com.fireblocks.sdk.model.CollectionLinkDto; import com.fireblocks.sdk.model.CollectionMintRequestDto; import com.fireblocks.sdk.model.CollectionMintResponseDto; +import com.fireblocks.sdk.model.CreateMultichainTokenRequestDto; import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.DeployableAddressResponseDto; +import com.fireblocks.sdk.model.GetDeployableAddressRequestDto; import com.fireblocks.sdk.model.GetLinkedCollectionsPaginatedResponse; +import com.fireblocks.sdk.model.ReissueMultichainTokenRequestDto; import com.fireblocks.sdk.model.TokenLinkDto; import com.fireblocks.sdk.model.TokenLinkRequestDto; import com.fireblocks.sdk.model.TokensPaginatedResponse; import java.math.BigDecimal; +import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -96,6 +101,23 @@ public void getCollectionByIdTest() throws ApiException { CompletableFuture> response = api.getCollectionById(id); } + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDeployableAddressTest() throws ApiException { + GetDeployableAddressRequestDto getDeployableAddressRequestDto = null; + String idempotencyKey = null; + CompletableFuture> response = + api.getDeployableAddress(getDeployableAddressRequestDto, idempotencyKey); + } + /** * Get collections * @@ -161,6 +183,21 @@ public void issueNewTokenTest() throws ApiException { api.issueNewToken(createTokenRequestDto, idempotencyKey); } + /** + * Issue a token on one or more blockchains + * + *

Facilitates the creation of a new token on one or more blockchains. + * + * @throws ApiException if the Api call fails + */ + @Test + public void issueTokenMultiChainTest() throws ApiException { + CreateMultichainTokenRequestDto createMultichainTokenRequestDto = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.issueTokenMultiChain(createMultichainTokenRequestDto, idempotencyKey); + } + /** * Link a contract * @@ -192,6 +229,24 @@ public void mintCollectionTokenTest() throws ApiException { api.mintCollectionToken(collectionMintRequestDto, id, idempotencyKey); } + /** + * Reissue a multichain 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void reIssueTokenMultiChainTest() throws ApiException { + ReissueMultichainTokenRequestDto reissueMultichainTokenRequestDto = null; + String tokenLinkId = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.reIssueTokenMultiChain( + reissueMultichainTokenRequestDto, tokenLinkId, idempotencyKey); + } + /** * Unlink a token * diff --git a/src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.java b/src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.java new file mode 100644 index 00000000..c490d0e7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AddressNotAvailableErrorTest.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 AddressNotAvailableError */ +public class AddressNotAvailableErrorTest { + private final AddressNotAvailableError model = new AddressNotAvailableError(); + + /** Model tests for AddressNotAvailableError */ + @Test + public void testAddressNotAvailableError() { + // TODO: test AddressNotAvailableError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParamsTest.java new file mode 100644 index 00000000..1eeccef6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoCreateParamsTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for CreateMultichainTokenRequestDtoCreateParams */ +public class CreateMultichainTokenRequestDtoCreateParamsTest { + private final CreateMultichainTokenRequestDtoCreateParams model = + new CreateMultichainTokenRequestDtoCreateParams(); + + /** Model tests for CreateMultichainTokenRequestDtoCreateParams */ + @Test + public void testCreateMultichainTokenRequestDtoCreateParams() { + // TODO: test CreateMultichainTokenRequestDtoCreateParams + } + + /** Test the property 'contractId' */ + @Test + public void contractIdTest() { + // TODO: test contractId + } + + /** Test the property 'deployFunctionParams' */ + @Test + public void deployFunctionParamsTest() { + // TODO: test deployFunctionParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoTest.java new file mode 100644 index 00000000..2c7d180d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateMultichainTokenRequestDtoTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for CreateMultichainTokenRequestDto */ +public class CreateMultichainTokenRequestDtoTest { + private final CreateMultichainTokenRequestDto model = new CreateMultichainTokenRequestDto(); + + /** Model tests for CreateMultichainTokenRequestDto */ + @Test + public void testCreateMultichainTokenRequestDto() { + // TODO: test CreateMultichainTokenRequestDto + } + + /** 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 'salt' */ + @Test + public void saltTest() { + // TODO: test salt + } + + /** Test the property 'chains' */ + @Test + public void chainsTest() { + // TODO: test chains + } + + /** 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 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseDtoTest.java new file mode 100644 index 00000000..25ee0f4e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployableAddressResponseDtoTest.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 DeployableAddressResponseDto */ +public class DeployableAddressResponseDtoTest { + private final DeployableAddressResponseDto model = new DeployableAddressResponseDto(); + + /** Model tests for DeployableAddressResponseDto */ + @Test + public void testDeployableAddressResponseDto() { + // TODO: test DeployableAddressResponseDto + } + + /** Test the property 'address' */ + @Test + public void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java b/src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.java new file mode 100644 index 00000000..8c292bdf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployedContractNotFoundErrorTest.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 DeployedContractNotFoundError */ +public class DeployedContractNotFoundErrorTest { + private final DeployedContractNotFoundError model = new DeployedContractNotFoundError(); + + /** Model tests for DeployedContractNotFoundError */ + @Test + public void testDeployedContractNotFoundError() { + // TODO: test DeployedContractNotFoundError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDtoTest.java new file mode 100644 index 00000000..4de10cb7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestDtoTest.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 GetDeployableAddressRequestDto */ +public class GetDeployableAddressRequestDtoTest { + private final GetDeployableAddressRequestDto model = new GetDeployableAddressRequestDto(); + + /** Model tests for GetDeployableAddressRequestDto */ + @Test + public void testGetDeployableAddressRequestDto() { + // TODO: test GetDeployableAddressRequestDto + } + + /** Test the property 'chainDescriptor' */ + @Test + public void chainDescriptorTest() { + // TODO: test chainDescriptor + } + + /** Test the property 'templateId' */ + @Test + public void templateIdTest() { + // TODO: test templateId + } + + /** Test the property 'initParams' */ + @Test + public void initParamsTest() { + // TODO: test initParams + } + + /** Test the property 'salt' */ + @Test + public void saltTest() { + // TODO: test salt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java b/src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java new file mode 100644 index 00000000..7ae59b88 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.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 InvalidParamaterValueError */ +public class InvalidParamaterValueErrorTest { + private final InvalidParamaterValueError model = new InvalidParamaterValueError(); + + /** Model tests for InvalidParamaterValueError */ + @Test + public void testInvalidParamaterValueError() { + // TODO: test InvalidParamaterValueError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDtoTest.java new file mode 100644 index 00000000..a28d267e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestDtoTest.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 ReissueMultichainTokenRequestDto */ +public class ReissueMultichainTokenRequestDtoTest { + private final ReissueMultichainTokenRequestDto model = new ReissueMultichainTokenRequestDto(); + + /** Model tests for ReissueMultichainTokenRequestDto */ + @Test + public void testReissueMultichainTokenRequestDto() { + // TODO: test ReissueMultichainTokenRequestDto + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'chains' */ + @Test + public void chainsTest() { + // TODO: test chains + } + + /** Test the property 'useGasless' */ + @Test + public void useGaslessTest() { + // TODO: test useGasless + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java new file mode 100644 index 00000000..66a315a9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkNotMultichainCompatibleHttpErrorTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for TokenLinkNotMultichainCompatibleHttpError */ +public class TokenLinkNotMultichainCompatibleHttpErrorTest { + private final TokenLinkNotMultichainCompatibleHttpError model = + new TokenLinkNotMultichainCompatibleHttpError(); + + /** Model tests for TokenLinkNotMultichainCompatibleHttpError */ + @Test + public void testTokenLinkNotMultichainCompatibleHttpError() { + // TODO: test TokenLinkNotMultichainCompatibleHttpError + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'code' */ + @Test + public void codeTest() { + // TODO: test code + } +}