diff --git a/README.md b/README.md index ef6d8e3..4fd5332 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 1.1.0 + 2.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:1.1.0" +compile "com.fireblocks.sdk:fireblocks-sdk:2.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-1.1.0.jar` +- `target/fireblocks-sdk-2.0.0.jar` - `target/lib/*.jar` @@ -141,8 +141,8 @@ All URIs are relative to *https://api.fireblocks.io/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ApiUserApi* | [**createApiUser**](docs/ApiUserApi.md#createApiUser) | **POST** /management/api_users | create api user -*ApiUserApi* | [**getApiUsers**](docs/ApiUserApi.md#getApiUsers) | **GET** /management/api_users | get api users +*ApiUserApi* | [**createApiUser**](docs/ApiUserApi.md#createApiUser) | **POST** /management/api_users | Create Api user +*ApiUserApi* | [**getApiUsers**](docs/ApiUserApi.md#getApiUsers) | **GET** /management/api_users | Get Api users *AssetsApi* | [**createAssetsBulk**](docs/AssetsApi.md#createAssetsBulk) | **POST** /vault/assets/bulk | Bulk creation of wallets *AuditLogsApi* | [**getAuditLogs**](docs/AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs *AuditLogsApi* | [**getAudits**](docs/AuditLogsApi.md#getAudits) | **GET** /audits | Get audit logs @@ -157,8 +157,18 @@ Class | Method | HTTP request | Description *ComplianceApi* | [**updateTravelRuleConfig**](docs/ComplianceApi.md#updateTravelRuleConfig) | **PUT** /screening/travel_rule/policy_configuration | Update Travel Rule Configuration *ComplianceScreeningConfigurationApi* | [**getAmlScreeningConfiguration**](docs/ComplianceScreeningConfigurationApi.md#getAmlScreeningConfiguration) | **GET** /screening/aml/policy_configuration | Get AML Screening Policy Configuration *ComplianceScreeningConfigurationApi* | [**getScreeningConfiguration**](docs/ComplianceScreeningConfigurationApi.md#getScreeningConfiguration) | **GET** /screening/travel_rule/policy_configuration | Get Travel Rule Screening Policy Configuration -*ConsoleUserApi* | [**createConsoleUser**](docs/ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | create console user -*ConsoleUserApi* | [**getConsoleUsers**](docs/ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | get console users +*ConsoleUserApi* | [**createConsoleUser**](docs/ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | Create console user +*ConsoleUserApi* | [**getConsoleUsers**](docs/ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | Get console users +*ContractInteractionsApi* | [**getDeployedContractAbi**](docs/ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI +*ContractInteractionsApi* | [**readCallFunction**](docs/ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract +*ContractInteractionsApi* | [**writeCallFunction**](docs/ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract +*ContractTemplatesApi* | [**deleteContractTemplateById**](docs/ContractTemplatesApi.md#deleteContractTemplateById) | **DELETE** /tokenization/templates/{contractTemplateId} | Delete a contract template by id +*ContractTemplatesApi* | [**deployContract**](docs/ContractTemplatesApi.md#deployContract) | **POST** /tokenization/templates/{contractTemplateId}/deploy | Deploy contract +*ContractTemplatesApi* | [**getConstructorByContractTemplateId**](docs/ContractTemplatesApi.md#getConstructorByContractTemplateId) | **GET** /tokenization/templates/{contractTemplateId}/constructor | Return contract template's constructor +*ContractTemplatesApi* | [**getContractTemplateById**](docs/ContractTemplatesApi.md#getContractTemplateById) | **GET** /tokenization/templates/{contractTemplateId} | Return contract template by id +*ContractTemplatesApi* | [**getContractTemplates**](docs/ContractTemplatesApi.md#getContractTemplates) | **GET** /tokenization/templates | List all contract templates +*ContractTemplatesApi* | [**getFunctionAbiByContractTemplateId**](docs/ContractTemplatesApi.md#getFunctionAbiByContractTemplateId) | **GET** /tokenization/templates/{contractTemplateId}/function | Return contract template's function +*ContractTemplatesApi* | [**uploadContractTemplate**](docs/ContractTemplatesApi.md#uploadContractTemplate) | **POST** /tokenization/templates | Upload contract template *ContractsApi* | [**addContractAsset**](docs/ContractsApi.md#addContractAsset) | **POST** /contracts/{contractId}/{assetId} | Add an asset to a contract *ContractsApi* | [**createContract**](docs/ContractsApi.md#createContract) | **POST** /contracts | Create a contract *ContractsApi* | [**deleteContract**](docs/ContractsApi.md#deleteContract) | **DELETE** /contracts/{contractId} | Delete a contract @@ -171,6 +181,9 @@ Class | Method | HTTP request | Description *CosignersBetaApi* | [**getCosigner**](docs/CosignersBetaApi.md#getCosigner) | **GET** /cosigners/{cosignerId} | Get cosigner *CosignersBetaApi* | [**getCosigners**](docs/CosignersBetaApi.md#getCosigners) | **GET** /cosigners | Get all cosigners *CosignersBetaApi* | [**renameCosigner**](docs/CosignersBetaApi.md#renameCosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner +*DeployedContractsApi* | [**getDeployedContractByAddress**](docs/DeployedContractsApi.md#getDeployedContractByAddress) | **GET** /tokenization/contracts/{assetId}/{contractAddress} | Return deployed contract data +*DeployedContractsApi* | [**getDeployedContractById**](docs/DeployedContractsApi.md#getDeployedContractById) | **GET** /tokenization/contracts/{id} | Return deployed contract data by id +*DeployedContractsApi* | [**getDeployedContracts**](docs/DeployedContractsApi.md#getDeployedContracts) | **GET** /tokenization/contracts | List deployed contracts data *ExchangeAccountsApi* | [**convertAssets**](docs/ExchangeAccountsApi.md#convertAssets) | **POST** /exchange_accounts/{exchangeAccountId}/convert | Convert exchange account funds from the source asset to the destination asset. *ExchangeAccountsApi* | [**getExchangeAccount**](docs/ExchangeAccountsApi.md#getExchangeAccount) | **GET** /exchange_accounts/{exchangeAccountId} | Find a specific exchange account *ExchangeAccountsApi* | [**getExchangeAccountAsset**](docs/ExchangeAccountsApi.md#getExchangeAccountAsset) | **GET** /exchange_accounts/{exchangeAccountId}/{assetId} | Find an asset for an exchange account @@ -215,6 +228,7 @@ Class | Method | HTTP request | Description *NetworkConnectionsApi* | [**getNetworkConnections**](docs/NetworkConnectionsApi.md#getNetworkConnections) | **GET** /network_connections | List network connections *NetworkConnectionsApi* | [**getNetworkId**](docs/NetworkConnectionsApi.md#getNetworkId) | **GET** /network_ids/{networkId} | Returns specific network ID. *NetworkConnectionsApi* | [**getNetworkIds**](docs/NetworkConnectionsApi.md#getNetworkIds) | **GET** /network_ids | Returns all network IDs, both local IDs and discoverable remote IDs +*NetworkConnectionsApi* | [**getRoutingPolicyAssetGroups**](docs/NetworkConnectionsApi.md#getRoutingPolicyAssetGroups) | **GET** /network_ids/routing_policy_asset_groups | Returns all enabled routing policy asset groups *NetworkConnectionsApi* | [**setNetworkIdDiscoverability**](docs/NetworkConnectionsApi.md#setNetworkIdDiscoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID's discoverability. *NetworkConnectionsApi* | [**setNetworkIdName**](docs/NetworkConnectionsApi.md#setNetworkIdName) | **PATCH** /network_ids/{networkId}/set_name | Update network ID's name. *NetworkConnectionsApi* | [**setNetworkIdRoutingPolicy**](docs/NetworkConnectionsApi.md#setNetworkIdRoutingPolicy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy. @@ -244,7 +258,7 @@ Class | Method | HTTP request | Description *PolicyEditorBetaApi* | [**publishDraft**](docs/PolicyEditorBetaApi.md#publishDraft) | **POST** /tap/draft | Send publish request for a certain draft id *PolicyEditorBetaApi* | [**publishPolicyRules**](docs/PolicyEditorBetaApi.md#publishPolicyRules) | **POST** /tap/publish | Send publish request for a set of policy rules *PolicyEditorBetaApi* | [**updateDraft**](docs/PolicyEditorBetaApi.md#updateDraft) | **PUT** /tap/draft | Update the draft with a new set of rules -*ResetDeviceApi* | [**resetDevice**](docs/ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | resets device +*ResetDeviceApi* | [**resetDevice**](docs/ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | Resets device *SmartTransferApi* | [**cancelTicket**](docs/SmartTransferApi.md#cancelTicket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket *SmartTransferApi* | [**createTicket**](docs/SmartTransferApi.md#createTicket) | **POST** /smart-transfers | Create Ticket *SmartTransferApi* | [**createTicketTerm**](docs/SmartTransferApi.md#createTicketTerm) | **POST** /smart-transfers/{ticketId}/terms | Create leg (term) @@ -270,6 +284,11 @@ Class | Method | HTTP request | Description *StakingBetaApi* | [**getProviders**](docs/StakingBetaApi.md#getProviders) | **GET** /staking/providers | *StakingBetaApi* | [**getSummary**](docs/StakingBetaApi.md#getSummary) | **GET** /staking/positions/summary | *StakingBetaApi* | [**getSummaryByVault**](docs/StakingBetaApi.md#getSummaryByVault) | **GET** /staking/positions/summary/vaults | +*TokenizationApi* | [**getLinkedToken**](docs/TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token +*TokenizationApi* | [**getLinkedTokens**](docs/TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens +*TokenizationApi* | [**issueNewToken**](docs/TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token +*TokenizationApi* | [**link**](docs/TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a token +*TokenizationApi* | [**unlink**](docs/TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token *TransactionsApi* | [**cancelTransaction**](docs/TransactionsApi.md#cancelTransaction) | **POST** /transactions/{txId}/cancel | Cancel a transaction *TransactionsApi* | [**createTransaction**](docs/TransactionsApi.md#createTransaction) | **POST** /transactions | Create a new transaction *TransactionsApi* | [**dropTransaction**](docs/TransactionsApi.md#dropTransaction) | **POST** /transactions/{txId}/drop | Drop ETH transaction by ID @@ -325,13 +344,14 @@ Class | Method | HTTP request | Description *Web3ConnectionsApi* | [**submit**](docs/Web3ConnectionsApi.md#submit) | **PUT** /connections/wc/{id} | Respond to a pending Web3 connection request. *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend failed webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks -*WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | gets ip addresses +*WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status ## Documentation for Models - [APIUser](docs/APIUser.md) + - [AbiFunction](docs/AbiFunction.md) - [Account](docs/Account.md) - [AccountType](docs/AccountType.md) - [AddAssetToExternalWalletRequest](docs/AddAssetToExternalWalletRequest.md) @@ -351,10 +371,14 @@ Class | Method | HTTP request | Description - [AmountInfo](docs/AmountInfo.md) - [ApiKey](docs/ApiKey.md) - [ApiKeysPaginatedResponse](docs/ApiKeysPaginatedResponse.md) + - [AssetAlreadyExistHttpError](docs/AssetAlreadyExistHttpError.md) - [AssetAmount](docs/AssetAmount.md) - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) + - [AssetDoesNotExistHttpError](docs/AssetDoesNotExistHttpError.md) + - [AssetForbiddenErrorResponse](docs/AssetForbiddenErrorResponse.md) - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) + - [AssetMetadataDto](docs/AssetMetadataDto.md) - [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md) - [AssetResponse](docs/AssetResponse.md) - [AssetResponseMetadata](docs/AssetResponseMetadata.md) @@ -362,11 +386,13 @@ Class | Method | HTTP request | Description - [AssetTypeResponse](docs/AssetTypeResponse.md) - [AssetWallet](docs/AssetWallet.md) - [AuditLogData](docs/AuditLogData.md) + - [AuditorData](docs/AuditorData.md) - [AuthorizationGroups](docs/AuthorizationGroups.md) - [AuthorizationInfo](docs/AuthorizationInfo.md) - [BlockInfo](docs/BlockInfo.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) - [ChainInfoResponseDto](docs/ChainInfoResponseDto.md) + - [CollectionMetadataDto](docs/CollectionMetadataDto.md) - [CollectionOwnershipResponse](docs/CollectionOwnershipResponse.md) - [ComplianceResult](docs/ComplianceResult.md) - [ComplianceScreeningResult](docs/ComplianceScreeningResult.md) @@ -378,6 +404,14 @@ Class | Method | HTTP request | Description - [ConfigOperationStatus](docs/ConfigOperationStatus.md) - [ConfigTransferOperationSnapshot](docs/ConfigTransferOperationSnapshot.md) - [ConsoleUser](docs/ConsoleUser.md) + - [ContractAbiResponseDto](docs/ContractAbiResponseDto.md) + - [ContractAttributes](docs/ContractAttributes.md) + - [ContractDeployRequest](docs/ContractDeployRequest.md) + - [ContractDeployResponse](docs/ContractDeployResponse.md) + - [ContractDoc](docs/ContractDoc.md) + - [ContractMetadataDto](docs/ContractMetadataDto.md) + - [ContractTemplateDto](docs/ContractTemplateDto.md) + - [ContractUploadRequest](docs/ContractUploadRequest.md) - [ConversionConfigOperation](docs/ConversionConfigOperation.md) - [ConversionOperationConfigParams](docs/ConversionOperationConfigParams.md) - [ConversionOperationExecution](docs/ConversionOperationExecution.md) @@ -411,10 +445,12 @@ Class | Method | HTTP request | Description - [CreateNcwConnectionRequest](docs/CreateNcwConnectionRequest.md) - [CreateNetworkIdRequest](docs/CreateNetworkIdRequest.md) - [CreatePayoutRequest](docs/CreatePayoutRequest.md) - - [CreateRequest](docs/CreateRequest.md) + - [CreateTokenRequestDto](docs/CreateTokenRequestDto.md) + - [CreateTokenRequestDtoCreateParams](docs/CreateTokenRequestDtoCreateParams.md) - [CreateTransactionResponse](docs/CreateTransactionResponse.md) - [CreateTransferConfigOperationRequest](docs/CreateTransferConfigOperationRequest.md) - [CreateUserGroupResponse](docs/CreateUserGroupResponse.md) + - [CreateVaultAccountConnectionRequest](docs/CreateVaultAccountConnectionRequest.md) - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) @@ -423,6 +459,10 @@ Class | Method | HTTP request | Description - [DefaultNetworkRoutingDest](docs/DefaultNetworkRoutingDest.md) - [DelegationDto](docs/DelegationDto.md) - [DelegationSummaryDto](docs/DelegationSummaryDto.md) + - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) + - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) + - [DeployedContractResponseDto](docs/DeployedContractResponseDto.md) + - [DeployedContractsPaginatedResponse](docs/DeployedContractsPaginatedResponse.md) - [DepositFundsFromLinkedDDAResponse](docs/DepositFundsFromLinkedDDAResponse.md) - [Destination](docs/Destination.md) - [DestinationTransferPeerPath](docs/DestinationTransferPeerPath.md) @@ -448,6 +488,7 @@ Class | Method | HTTP request | Description - [DraftReviewAndValidationResponse](docs/DraftReviewAndValidationResponse.md) - [DropTransactionRequest](docs/DropTransactionRequest.md) - [DropTransactionResponse](docs/DropTransactionResponse.md) + - [EVMTokenCreateParamsDto](docs/EVMTokenCreateParamsDto.md) - [EditGasStationConfigurationResponse](docs/EditGasStationConfigurationResponse.md) - [ErrorResponse](docs/ErrorResponse.md) - [ErrorResponseError](docs/ErrorResponseError.md) @@ -474,6 +515,7 @@ Class | Method | HTTP request | Description - [FiatAccountType](docs/FiatAccountType.md) - [FiatAsset](docs/FiatAsset.md) - [FreezeTransactionResponse](docs/FreezeTransactionResponse.md) + - [FunctionDoc](docs/FunctionDoc.md) - [Funds](docs/Funds.md) - [GasStationConfiguration](docs/GasStationConfiguration.md) - [GasStationConfigurationResponse](docs/GasStationConfigurationResponse.md) @@ -485,17 +527,22 @@ Class | Method | HTTP request | Description - [GetConsoleUsersResponse](docs/GetConsoleUsersResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) - - [GetOtaStatus200Response](docs/GetOtaStatus200Response.md) - - [GetOwnershipTokens200Response](docs/GetOwnershipTokens200Response.md) + - [GetNFTsResponse](docs/GetNFTsResponse.md) + - [GetOtaStatusResponse](docs/GetOtaStatusResponse.md) + - [GetOwnershipTokensResponse](docs/GetOwnershipTokensResponse.md) - [GetTransactionOperation](docs/GetTransactionOperation.md) - [GetWhitelistIpAddressesResponse](docs/GetWhitelistIpAddressesResponse.md) - - [GetWorkspaceStatus200Response](docs/GetWorkspaceStatus200Response.md) + - [GetWorkspaceStatusResponse](docs/GetWorkspaceStatusResponse.md) + - [HttpContractDoesNotExistError](docs/HttpContractDoesNotExistError.md) - [InstructionAmount](docs/InstructionAmount.md) - [InternalTransferResponse](docs/InternalTransferResponse.md) - [Job](docs/Job.md) - [JobCreated](docs/JobCreated.md) - - [ListOwnedCollections200Response](docs/ListOwnedCollections200Response.md) - - [ListOwnedTokens200Response](docs/ListOwnedTokens200Response.md) + - [LeanAbiFunction](docs/LeanAbiFunction.md) + - [LeanContractDto](docs/LeanContractDto.md) + - [LeanDeployedContractResponseDto](docs/LeanDeployedContractResponseDto.md) + - [ListOwnedCollectionsResponse](docs/ListOwnedCollectionsResponse.md) + - [ListOwnedTokensResponse](docs/ListOwnedTokensResponse.md) - [MediaEntityResponse](docs/MediaEntityResponse.md) - [NetworkChannel](docs/NetworkChannel.md) - [NetworkConnection](docs/NetworkConnection.md) @@ -508,6 +555,7 @@ Class | Method | HTTP request | Description - [NetworkIdRoutingPolicyValue](docs/NetworkIdRoutingPolicyValue.md) - [NetworkRecord](docs/NetworkRecord.md) - [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md) + - [NotFoundException](docs/NotFoundException.md) - [OneTimeAddress](docs/OneTimeAddress.md) - [OneTimeAddressAccount](docs/OneTimeAddressAccount.md) - [OperationExecutionFailure](docs/OperationExecutionFailure.md) @@ -516,6 +564,8 @@ Class | Method | HTTP request | Description - [PaginatedAssetWalletResponse](docs/PaginatedAssetWalletResponse.md) - [PaginatedAssetWalletResponsePaging](docs/PaginatedAssetWalletResponsePaging.md) - [Paging](docs/Paging.md) + - [Parameter](docs/Parameter.md) + - [ParameterWithValue](docs/ParameterWithValue.md) - [PayeeAccount](docs/PayeeAccount.md) - [PayeeAccountResponse](docs/PayeeAccountResponse.md) - [PayeeAccountType](docs/PayeeAccountType.md) @@ -556,6 +606,8 @@ Class | Method | HTTP request | Description - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) + - [ReadAbiFunction](docs/ReadAbiFunction.md) + - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - [RelatedTransactionDto](docs/RelatedTransactionDto.md) @@ -595,8 +647,8 @@ Class | Method | HTTP request | Description - [SetOtaStatusRequest](docs/SetOtaStatusRequest.md) - [SetOtaStatusResponse](docs/SetOtaStatusResponse.md) - [SetOtaStatusResponseOneOf](docs/SetOtaStatusResponseOneOf.md) - - [SetRoutingPolicy200Response](docs/SetRoutingPolicy200Response.md) - [SetRoutingPolicyRequest](docs/SetRoutingPolicyRequest.md) + - [SetRoutingPolicyResponse](docs/SetRoutingPolicyResponse.md) - [SettlementRequestBody](docs/SettlementRequestBody.md) - [SettlementResponse](docs/SettlementResponse.md) - [SignedMessage](docs/SignedMessage.md) @@ -628,16 +680,23 @@ Class | Method | HTTP request | Description - [SrcOrDestAttributesInner](docs/SrcOrDestAttributesInner.md) - [StakeRequestDto](docs/StakeRequestDto.md) - [StakeResponseDto](docs/StakeResponseDto.md) + - [StellarRippleCreateParamsDto](docs/StellarRippleCreateParamsDto.md) - [SystemMessageInfo](docs/SystemMessageInfo.md) - [Task](docs/Task.md) + - [TemplatesPaginatedResponse](docs/TemplatesPaginatedResponse.md) - [ThirdPartyRouting](docs/ThirdPartyRouting.md) - [ToCollateralTransaction](docs/ToCollateralTransaction.md) - [ToExchangeTransaction](docs/ToExchangeTransaction.md) - [TokenCollectionResponse](docs/TokenCollectionResponse.md) + - [TokenLinkDto](docs/TokenLinkDto.md) + - [TokenLinkDtoTokenMetadata](docs/TokenLinkDtoTokenMetadata.md) + - [TokenLinkExistsHttpError](docs/TokenLinkExistsHttpError.md) + - [TokenLinkRequestDto](docs/TokenLinkRequestDto.md) - [TokenOwnershipResponse](docs/TokenOwnershipResponse.md) - [TokenOwnershipSpamUpdatePayload](docs/TokenOwnershipSpamUpdatePayload.md) - [TokenOwnershipStatusUpdatePayload](docs/TokenOwnershipStatusUpdatePayload.md) - [TokenResponse](docs/TokenResponse.md) + - [TokensPaginatedResponse](docs/TokensPaginatedResponse.md) - [TradingAccountType](docs/TradingAccountType.md) - [Transaction](docs/Transaction.md) - [TransactionFee](docs/TransactionFee.md) @@ -706,12 +765,16 @@ Class | Method | HTTP request | Description - [VaultActionStatus](docs/VaultActionStatus.md) - [VaultAsset](docs/VaultAsset.md) - [VaultWalletAddress](docs/VaultWalletAddress.md) + - [VendorDto](docs/VendorDto.md) - [WalletAsset](docs/WalletAsset.md) - [WalletAssetAdditionalInfo](docs/WalletAssetAdditionalInfo.md) - [WithdrawRequestDto](docs/WithdrawRequestDto.md) - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) - [WorkflowConfigurationId](docs/WorkflowConfigurationId.md) - [WorkflowExecutionOperation](docs/WorkflowExecutionOperation.md) + - [WriteAbiFunction](docs/WriteAbiFunction.md) + - [WriteCallFunctionDto](docs/WriteCallFunctionDto.md) + - [WriteCallFunctionResponseDto](docs/WriteCallFunctionResponseDto.md) ## Author diff --git a/api/openapi.yaml b/api/openapi.yaml index 9240b8a..0af58e2 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -46,9 +46,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/VaultAccount' - type: array + $ref: '#/components/schemas/GetVaultAccountsResponse' description: A list of vault accounts headers: X-Request-ID: @@ -1117,9 +1115,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/VaultWalletAddress' - type: array + $ref: '#/components/schemas/GetVaultAccountAssetAddressesResponse' description: A list of deposit addresses headers: X-Request-ID: @@ -1448,7 +1444,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/updateVaultAccountAssetAddress_request' + $ref: '#/components/schemas/UpdateVaultAccountAssetAddressRequest' required: false responses: "201": @@ -1540,7 +1536,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/setCustomerRefIdForAddress_request' + $ref: '#/components/schemas/SetCustomerRefIdForAddressRequest' required: true responses: "201": @@ -1690,9 +1686,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/UnspentInputsResponse' - type: array + $ref: '#/components/schemas/GetUnspentInputsResponse' description: List of Unspent information per input headers: X-Request-ID: @@ -1719,11 +1713,12 @@ paths: \ assetId);" name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.vaults.getUnspentInputs(vaultsApiGetUnspentInputsRequest);" + code: "const response: Promise>\ + \ = fireblocks.vaults.getUnspentInputs(vaultsApiGetUnspentInputsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.vaults().getUnspentInputs(vaultAccountId,\ - \ assetId);" + code: "CompletableFuture>> response\ + \ = fireblocks.vaults().getUnspentInputs(vaultAccountId, assetId);" name: Fireblocks SDK Java example x-accepts: application/json /vault/public_key_info: @@ -1902,9 +1897,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/VaultAsset' - type: array + $ref: '#/components/schemas/GetVaultAssetsResponse' description: Amount by asset headers: X-Request-ID: @@ -1932,10 +1925,11 @@ paths: \ accountNameSuffix);" name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.vaults.getVaultAssets(vaultsApiGetVaultAssetsRequest);" + code: "const response: Promise>\ + \ = fireblocks.vaults.getVaultAssets(vaultsApiGetVaultAssetsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.vaults().getVaultAssets(accountNamePrefix,\ + code: "CompletableFuture>> response = fireblocks.vaults().getVaultAssets(accountNamePrefix,\ \ accountNameSuffix);" name: Fireblocks SDK Java example x-accepts: application/json @@ -2100,9 +2094,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/ExchangeAccount' - type: array + $ref: '#/components/schemas/GetExchangeAccountsResponse' description: An ExchangeAccount object headers: X-Request-ID: @@ -2164,9 +2156,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/ExchangeAccountsPaged' - type: array + $ref: '#/components/schemas/GetPagedExchangeAccountsResponse' description: An ExchangeAccount object headers: X-Request-ID: @@ -2192,11 +2182,13 @@ paths: code: exchangeAccounts = fireblocks.get_exchange_accounts_paged() name: Fireblocks SDK Python example - language: typescript - code: "const response: Promise> = fireblocks.exchangeAccounts.getPagedExchangeAccounts(exchangeAccountsApiGetPagedExchangeAccountsRequest);" + code: "const response: Promise>\ + \ = fireblocks.exchangeAccounts.getPagedExchangeAccounts(exchangeAccountsApiGetPagedExchangeAccountsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.exchangeAccounts().getPagedExchangeAccounts(limit,\ - \ before, after);" + code: "CompletableFuture>> response\ + \ = fireblocks.exchangeAccounts().getPagedExchangeAccounts(limit, before,\ + \ after);" name: Fireblocks SDK Java example x-accepts: application/json /exchange_accounts/{exchangeAccountId}: @@ -2452,9 +2444,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/FiatAccount' - type: array + $ref: '#/components/schemas/GetFiatAccountsResponse' description: A fiat account object headers: X-Request-ID: @@ -2480,10 +2470,11 @@ paths: code: const transactions = await fireblocks.getFiatAccounts(); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.fiatAccounts.getFiatAccounts();" + code: "const response: Promise>\ + \ = fireblocks.fiatAccounts.getFiatAccounts();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.fiatAccounts().getFiatAccounts(); + code: CompletableFuture>> response = fireblocks.fiatAccounts().getFiatAccounts(); name: Fireblocks SDK Java example x-accepts: application/json /fiat_accounts/{accountId}: @@ -2704,9 +2695,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/NetworkConnectionResponse' - type: array + $ref: '#/components/schemas/GetNetworkConnectionsResponse' description: A list of network connections headers: X-Request-ID: @@ -2732,10 +2721,12 @@ paths: code: const networkConnections = await fireblocks.getNetworkConnections(); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.networkConnections.getNetworkConnections();" + code: "const response: Promise>\ + \ = fireblocks.networkConnections.getNetworkConnections();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.networkConnections().getNetworkConnections(); + code: CompletableFuture>> response + = fireblocks.networkConnections().getNetworkConnections(); name: Fireblocks SDK Java example x-accepts: application/json post: @@ -2756,7 +2747,7 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: createNetworkConnection @@ -2831,7 +2822,7 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: setRoutingPolicy @@ -2854,7 +2845,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/setRoutingPolicy_200_response' + $ref: '#/components/schemas/SetRoutingPolicyResponse' description: Network ID headers: X-Request-ID: @@ -2874,11 +2865,12 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.networkConnections.setRoutingPolicy(networkConnectionsApiSetRoutingPolicyRequest);" + code: "const response: Promise>\ + \ = fireblocks.networkConnections.setRoutingPolicy(networkConnectionsApiSetRoutingPolicyRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.networkConnections().setRoutingPolicy(connectionId,\ - \ setRoutingPolicyRequest);" + code: "CompletableFuture> response\ + \ = fireblocks.networkConnections().setRoutingPolicy(connectionId, setRoutingPolicyRequest);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json @@ -2974,7 +2966,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/setRoutingPolicy_200_response' + $ref: '#/components/schemas/DeleteNetworkConnectionResponse' description: Network ID headers: X-Request-ID: @@ -2994,10 +2986,12 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.networkConnections.deleteNetworkConnection(networkConnectionsApiDeleteNetworkConnectionRequest);" + code: "const response: Promise>\ + \ = fireblocks.networkConnections.deleteNetworkConnection(networkConnectionsApiDeleteNetworkConnectionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.networkConnections().deleteNetworkConnection(connectionId); + code: CompletableFuture> response + = fireblocks.networkConnections().deleteNetworkConnection(connectionId); name: Fireblocks SDK Java example x-accepts: application/json get: @@ -3094,10 +3088,7 @@ paths: content: application/json: schema: - items: - allOf: - - $ref: '#/components/schemas/NetworkIdResponse' - type: array + $ref: '#/components/schemas/GetNetworkIdsResponse' description: A list of network IDs headers: X-Request-ID: @@ -3117,10 +3108,11 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.networkConnections.getNetworkIds();" + code: "const response: Promise>\ + \ = fireblocks.networkConnections.getNetworkIds();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.networkConnections().getNetworkIds(); + code: CompletableFuture>> response = fireblocks.networkConnections().getNetworkIds(); name: Fireblocks SDK Java example x-accepts: application/json post: @@ -3141,7 +3133,7 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: createNetworkId @@ -3196,19 +3188,19 @@ paths: name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /enabled_routing_policy_asset_groups: + /network_ids/routing_policy_asset_groups: get: description: | Retrieves a list of all enabled routing policy asset groups. Your routing policy defines how your transactions are routed. You can use one or more enabled routing policy asset groups to describe connection or network id routing policy. - operationId: getEnabledRoutingPolicyAssetGroups + operationId: getRoutingPolicyAssetGroups responses: "200": content: application/json: schema: - $ref: '#/components/schemas/GetEnabledRoutingPolicyAssetGroupsResponse' + $ref: '#/components/schemas/GetRoutingPolicyAssetGroupsResponse' description: A list of enabled routing policy asset groups headers: X-Request-ID: @@ -3225,7 +3217,15 @@ paths: summary: Returns all enabled routing policy asset groups tags: - Network connections - x-internal: true + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.networkConnections.getRoutingPolicyAssetGroups();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture>> response = fireblocks.networkConnections().getRoutingPolicyAssetGroups(); + name: Fireblocks SDK Java example x-accepts: application/json /network_ids/{networkId}: delete: @@ -3262,7 +3262,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/setRoutingPolicy_200_response' + $ref: '#/components/schemas/DeleteNetworkIdResponse' description: Network ID default: content: @@ -3279,10 +3279,12 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.networkConnections.deleteNetworkId(networkConnectionsApiDeleteNetworkIdRequest);" + code: "const response: Promise>\ + \ = fireblocks.networkConnections.deleteNetworkId(networkConnectionsApiDeleteNetworkIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.networkConnections().deleteNetworkId(networkId); + code: CompletableFuture> response = + fireblocks.networkConnections().deleteNetworkId(networkId); name: Fireblocks SDK Java example x-accepts: application/json get: @@ -3365,7 +3367,7 @@ paths: - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** - Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` + Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). operationId: setNetworkIdRoutingPolicy @@ -3569,9 +3571,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/UnmanagedWallet' - type: array + $ref: '#/components/schemas/GetInternalWalletsResponse' description: A list of internal wallets headers: X-Request-ID: @@ -3591,10 +3591,11 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.internalWallets.getInternalWallets();" + code: "const response: Promise>\ + \ = fireblocks.internalWallets.getInternalWallets();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.internalWallets().getInternalWallets(); + code: CompletableFuture>> response = fireblocks.internalWallets().getInternalWallets(); name: Fireblocks SDK Java example x-accepts: application/json post: @@ -4025,9 +4026,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/UnmanagedWallet' - type: array + $ref: '#/components/schemas/GetExternalWalletsResponse' description: A list of external wallets headers: X-Request-ID: @@ -4053,10 +4052,11 @@ paths: code: const externalWallets = await fireblocks.getExternalWallets(); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.externalWallets.getExternalWallets();" + code: "const response: Promise>\ + \ = fireblocks.externalWallets.getExternalWallets();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.externalWallets().getExternalWallets(); + code: CompletableFuture>> response = fireblocks.externalWallets().getExternalWallets(); name: Fireblocks SDK Java example x-accepts: application/json post: @@ -4489,9 +4489,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/UnmanagedWallet' - type: array + $ref: '#/components/schemas/GetContractsResponse' description: A list of contracts headers: X-Request-ID: @@ -4511,10 +4509,11 @@ paths: x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.contracts.getContracts();" + code: "const response: Promise>\ + \ = fireblocks.contracts.getContracts();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.contracts().getContracts(); + code: CompletableFuture>> response = fireblocks.contracts().getContracts(); name: Fireblocks SDK Java example x-accepts: application/json post: @@ -4837,9 +4836,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/AssetTypeResponse' - type: array + $ref: '#/components/schemas/GetSupportedAssetsResponse' description: A Transaction object headers: X-Request-ID: @@ -4865,10 +4862,12 @@ paths: code: const supportedAssets = await fireblocks.getSupportedAssets(); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.blockchainsAssets.getSupportedAssets();" + code: "const response: Promise>\ + \ = fireblocks.blockchainsAssets.getSupportedAssets();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.blockchainsAssets().getSupportedAssets(); + code: CompletableFuture>> response = + fireblocks.blockchainsAssets().getSupportedAssets(); name: Fireblocks SDK Java example x-accepts: application/json /assets: @@ -4908,23 +4907,32 @@ paths: description: | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - - The asset address is invalid. Error code: 1004 + - The asset address is invalid. Error code: 1003 + + - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetForbiddenErrorResponse' + description: | + - The asset creation quota reached. Error code: 1005 "404": content: application/json: schema: $ref: '#/components/schemas/AssetNotFoundErrorResponse' description: | - - Invalid address, could not get asset information. Error code 1004 + - Invalid address, could not get asset information. Error code 1003 "409": content: application/json: schema: $ref: '#/components/schemas/AssetConflictErrorResponse' description: | - - The asset is already supported globally. Error code: 1002 + - The asset is already supported globally. Error code: 1001 - - The asset has already been added to this workspace. Error code: 1003 + - The asset has already been added to this workspace. Error code: 1002 "500": content: application/json: @@ -5114,9 +5122,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/TransactionResponse' - type: array + $ref: '#/components/schemas/GetTransactionsResponse' description: A list of transactions headers: X-Request-ID: @@ -5149,12 +5155,14 @@ paths: after: from }); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.transactions.getTransactions(transactionsApiGetTransactionsRequest);" + code: "const response: Promise>\ + \ = fireblocks.transactions.getTransactions(transactionsApiGetTransactionsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.transactions().getTransactions(before,\ - \ after, status, orderBy, sort, limit, sourceType, sourceId, destType,\ - \ destId, assets, txHash, sourceWalletId, destWalletId);" + code: "CompletableFuture>> response\ + \ = fireblocks.transactions().getTransactions(before, after, status, orderBy,\ + \ sort, limit, sourceType, sourceId, destType, destId, assets, txHash,\ + \ sourceWalletId, destWalletId);" name: Fireblocks SDK Java example x-accepts: application/json post: @@ -6777,7 +6785,8 @@ paths: \ fireblocks.userGroupsBeta.getUserGroups();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.userGroupsBeta().getUserGroups(); + code: CompletableFuture>> response = + fireblocks.userGroupsBeta().getUserGroups(); name: Fireblocks SDK Java example x-accepts: application/json post: @@ -7045,7 +7054,7 @@ paths: code: "const response: Promise> = fireblocks.users.getUsers();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.users().getUsers(); + code: CompletableFuture>> response = fireblocks.users().getUsers(); name: Fireblocks SDK Java example x-accepts: application/json /audits: @@ -7526,105 +7535,120 @@ paths: name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /staking/chains: - get: - description: Return an alphabetical list of supported chains. - operationId: getChains - parameters: [] - responses: - "200": - content: - application/json: - example: - - ETH - - SOL - schema: - items: - type: string - type: array - description: "" - summary: "" - tags: - - Staking (Beta) - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.stakingBeta.getChains();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getChains(); - name: Fireblocks SDK Java example - x-accepts: application/json - /staking/chains/{chainDescriptor}/chainInfo: + /tokenization/templates: get: - description: "Return chain-specific, staking-related information summary (e.g.\ - \ epoch details, lockup durations, estimated rewards, etc.)" - operationId: getChainInfo + description: Return minimal representation of all the contract templates available + for the workspace + operationId: getContractTemplates parameters: - - description: The protocol identifier (e.g. "ETH"/"SOL") to use - explode: false - in: path - name: chainDescriptor - required: true + - description: Items per page (max 100) + explode: true + in: query + name: limit + required: false + schema: + default: 100 + maximum: 100 + minimum: 1 + type: number + style: form + - description: Paging offset + explode: true + in: query + name: offset + required: false + schema: + default: 0 + minimum: 0 + type: number + style: form + - description: Page cursor to get the next page + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: "Number of items per page, requesting more then max will return\ + \ max items" + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 + minimum: 1 + type: number + style: form + - description: "The type of the contract templates you wish to retrieve. Can\ + \ accept one type, more or none" + example: FUNGIBLE_TOKEN + explode: true + in: query + name: type + required: false schema: enum: - - ETH - - SOL - - ETH_TEST3 - - SOL_TEST + - FUNGIBLE_TOKEN + - NON_FUNGIBLE_TOKEN + - TOKEN_UTILITY type: string - style: simple + style: form + - explode: true + in: query + name: initializationPhase + required: false + schema: + enum: + - ON_DEPLOYMENT + - POST_DEPLOYMENT + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ChainInfoResponseDto' - description: Chain specific info summary was returned successfully - summary: "" + $ref: '#/components/schemas/TemplatesPaginatedResponse' + description: List of contract templates was returned successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List all contract templates tags: - - Staking (Beta) + - Contract Templates x-readme: code-samples: + - language: python + code: contract_templates = fireblocks.get_contract_templates() + name: Fireblocks SDK Python example + - language: javascript + code: const contractTemplates = await fireblocks.getContractTemplates(); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getChainInfo(stakingBetaApiGetChainInfoRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractTemplates.getContractTemplates(contractTemplatesApiGetContractTemplatesRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); + code: "CompletableFuture> response\ + \ = fireblocks.contractTemplates().getContractTemplates(limit, offset,\ + \ pageCursor, pageSize, type, initializationPhase);" name: Fireblocks SDK Java example x-accepts: application/json - /staking/chains/{chainDescriptor}/{actionId}: post: - description: "Perform a chain-specific staking action (e.g. stake, unstake,\ - \ withdraw)." - operationId: executeAction + description: Upload a new contract template. This contract template will be + available for the workspace + operationId: uploadContractTemplate parameters: - - description: The protocol identifier (e.g. "ETH"/"SOL") to use - explode: false - in: path - name: chainDescriptor - required: true - schema: - enum: - - ETH - - SOL - - ETH_TEST3 - - SOL_TEST - type: string - style: simple - - description: The operation that can be executed on a vault/position - explode: false - in: path - name: actionId - required: true - schema: - enum: - - stake - - unstake - - withdraw - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -7639,324 +7663,286 @@ paths: requestBody: content: application/json: - examples: - stake: - value: - vaultAccountId: "22" - providerId: kiln - stakeAmount: "32" - chainDescriptor: ETH - txNote: stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 - of 32ETH created on 02.04.23 - feeLevel: MEDIUM - unstake: - value: - id: b70701f4-d7b1-4795-a8ee-b09cdb5b850b - txNote: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ - \ #ETH" - feeLevel: MEDIUM - withdraw: - value: - id: b70701f4-d7b1-4795-a8ee-b09cdb5b850c - txNote: "withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ - \ #ETH" - feeLevel: MEDIUM schema: - $ref: '#/components/schemas/ExecuteActionRequest' + $ref: '#/components/schemas/ContractUploadRequest' required: true responses: "201": content: application/json: - examples: - stake: - value: - id: afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8 - unstake: - value: {} - withdraw: - value: {} schema: - $ref: '#/components/schemas/ExecuteActionResponse' - description: A chain-specific action has been executed successfully on vault/position - and is associated with 201 status code. - summary: "" + $ref: '#/components/schemas/ContractTemplateDto' + description: Contract was uploaded successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Upload contract template tags: - - Staking (Beta) + - Contract Templates x-readme: code-samples: + - language: python + code: template = fireblocks.upload_contract_template(upload_request) + name: Fireblocks SDK Python example + - language: javascript + code: const contractTemplate = await fireblocks.uploadContractTemplate(uploadRequest); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.executeAction(stakingBetaApiExecuteActionRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractTemplates.uploadContractTemplate(contractTemplatesApiUploadContractTemplateRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response =\ - \ fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor,\ - \ actionId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.contractTemplates().uploadContractTemplate(contractUploadRequest,\ + \ idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /staking/positions: - get: - description: "Return detailed information on all staking positions, including\ - \ the staked amount, rewards, status and more." - operationId: getAllDelegations + /tokenization/templates/{contractTemplateId}: + delete: + description: "Delete a contract by id. allowed only for private contract templates.\ + \ Notice: it is irreversible!" + operationId: deleteContractTemplateById parameters: - - description: Use "ETH" / "SOL" in order to obtain information related to the - specific blockchain network or retrieve information about all chains that - have data available by providing no argument. - explode: true - in: query - name: chainDescriptor - required: false + - description: The Contract Template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: false + in: path + name: contractTemplateId + required: true schema: type: string - style: form + style: simple responses: - "200": + "204": + description: Contract was deleted successfully + "404": content: application/json: schema: - items: - $ref: '#/components/schemas/DelegationDto' - type: array - description: An array of position data was returned successfully - summary: "" + $ref: '#/components/schemas/HttpContractDoesNotExistError' + description: Could not find contract. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Delete a contract template by id tags: - - Staking (Beta) + - Contract Templates x-readme: code-samples: + - language: python + code: fireblocks.deleteContractTemplate(contract_id) + name: Fireblocks SDK Python example + - language: javascript + code: await fireblocks.getContractTemplate(contractId); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.stakingBeta.getAllDelegations(stakingBetaApiGetAllDelegationsRequest);" + code: "const response: Promise> = fireblocks.contractTemplates.deleteContractTemplateById(contractTemplatesApiDeleteContractTemplateByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); + code: CompletableFuture> response = fireblocks.contractTemplates().deleteContractTemplateById(contractTemplateId); name: Fireblocks SDK Java example x-accepts: application/json - /staking/positions/summary: get: - description: "Return a summary of all vaults, categorized by their status (active,\ - \ inactive), the total amounts staked and total rewards per-chain." - operationId: getSummary - parameters: [] + description: Return detailed information about the contract template + operationId: getContractTemplateById + parameters: + - description: The Contract Template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: false + in: path + name: contractTemplateId + required: true + schema: + type: string + style: simple responses: "200": content: application/json: - example: - active: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.077345939" - inactive: - - chainDescriptor: ETH - amount: "0" - - chainDescriptor: SOL - amount: "0" - rewardsAmount: - - chainDescriptor: ETH - amount: "0.036604667" - - chainDescriptor: SOL - amount: "0.001345939" - totalStaked: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.077345939" schema: - $ref: '#/components/schemas/DelegationSummaryDto' - description: A summary for all vaults were returned successfully - summary: "" - tags: - - Staking (Beta) - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.getSummary();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getSummary(); - name: Fireblocks SDK Java example - x-accepts: application/json - /staking/positions/summary/vaults: - get: - description: "Return a summary for each vault, categorized by their status (active,\ - \ inactive), the total amounts staked and total rewards per-chain." - operationId: getSummaryByVault - parameters: [] - responses: - "200": + $ref: '#/components/schemas/ContractTemplateDto' + description: Contract template was returned successfully + "404": content: application/json: - example: - "0": - active: - - chainDescriptor: SOL - amount: "0.015202376" - inactive: - - chainDescriptor: SOL - amount: "0" - rewardsAmount: - - chainDescriptor: SOL - amount: "0.000202376" - totalStaked: - - chainDescriptor: SOL - amount: "0.015202376" - "1": - active: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.011191566" - inactive: - - chainDescriptor: ETH - amount: "0" - - chainDescriptor: SOL - amount: "0" - rewardsAmount: - - chainDescriptor: ETH - amount: "0.036604667" - - chainDescriptor: SOL - amount: "0.000191566" - totalStaked: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.011191566" schema: - additionalProperties: - $ref: '#/components/schemas/DelegationSummaryDto' - type: object - description: A summary for each vault were returned successfully - summary: "" + $ref: '#/components/schemas/HttpContractDoesNotExistError' + description: Could not find contract. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return contract template by id tags: - - Staking (Beta) + - Contract Templates x-readme: code-samples: + - language: python + code: contract_template = fireblocks.get_contract_template(contract_id) + name: Fireblocks SDK Python example + - language: javascript + code: const contractTemplate = await fireblocks.getContractTemplate(contractId); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.stakingBeta.getSummaryByVault();" + code: "const response: Promise>\ + \ = fireblocks.contractTemplates.getContractTemplateById(contractTemplatesApiGetContractTemplateByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getSummaryByVault(); + code: CompletableFuture> response = fireblocks.contractTemplates().getContractTemplateById(contractTemplateId); name: Fireblocks SDK Java example x-accepts: application/json - /staking/positions/{id}: + /tokenization/templates/{contractTemplateId}/constructor: get: - description: "Return detailed information on a staking position, including the\ - \ staked amount, rewards, status and more." - operationId: getDelegationById + description: Return contract template's constructor ABI + operationId: getConstructorByContractTemplateId parameters: - - description: The unique identifier of the staking position + - description: The Contract Template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d explode: false in: path - name: id + name: contractTemplateId required: true schema: type: string style: simple + - description: true if you want to get the abi with its docs + explode: true + in: query + name: withDocs + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DelegationDto' - description: Position data was returned successfully - summary: "" - tags: - - Staking (Beta) - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.stakingBeta.getDelegationById(stakingBetaApiGetDelegationByIdRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); - name: Fireblocks SDK Java example - x-accepts: application/json - /staking/providers: - get: - description: Return information on all the available staking providers. - operationId: getProviders - parameters: [] - responses: - "200": + $ref: '#/components/schemas/AbiFunction' + description: Contract template's constructor ABI was returned successfully + "404": content: application/json: schema: - items: - $ref: '#/components/schemas/ProviderDto' - type: array - description: An array of supported providers was returned successfully - summary: "" + $ref: '#/components/schemas/HttpContractDoesNotExistError' + description: Could not find contract. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return contract template's constructor tags: - - Staking (Beta) + - Contract Templates x-readme: code-samples: + - language: python + code: contract_constructor_abi = fireblocks.get_contract_template_constructor(contract_id) + name: Fireblocks SDK Python example + - language: javascript + code: const contractConstructorAbi = await fireblocks.getContractTemplateConstructor(contractId); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.stakingBeta.getProviders();" + code: "const response: Promise> = fireblocks.contractTemplates.getConstructorByContractTemplateId(contractTemplatesApiGetConstructorByContractTemplateIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.stakingBeta().getProviders(); + code: "CompletableFuture> response = fireblocks.contractTemplates().getConstructorByContractTemplateId(contractTemplateId,\ + \ withDocs);" name: Fireblocks SDK Java example x-accepts: application/json - /staking/providers/{providerId}/approveTermsOfService: - post: - description: |- - Approve the terms of service of the staking provider. - This must be called before performing a staking action for the first time with this provider. - operationId: approveTermsOfServiceByProviderId + /tokenization/templates/{contractTemplateId}/function: + get: + description: Return contract template`s function ABI by signature + operationId: getFunctionAbiByContractTemplateId parameters: - - description: The unique identifier of the staking provider + - description: The Contract Template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d explode: false in: path - name: providerId + name: contractTemplateId required: true schema: - enum: - - kiln - - figment type: string style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false + - explode: true + in: query + name: functionSignature + required: true schema: type: string - style: simple + style: form responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/ProvidersResponseDto' - description: The terms of service have been successfully approved and is - associated with 201 status code. - summary: "" + $ref: '#/components/schemas/AbiFunction' + description: Contract template`s function ABI was returned successfully + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/HttpContractDoesNotExistError' + description: Could not find contract. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return contract template's function tags: - - Staking (Beta) + - Contract Templates x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.stakingBeta.approveTermsOfServiceByProviderId(stakingBetaApiApproveTermsOfServiceByProviderIdRequest);" + code: "const response: Promise> = fireblocks.contractTemplates.getFunctionAbiByContractTemplateId(contractTemplatesApiGetFunctionAbiByContractTemplateIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId,\ - \ idempotencyKey);" + code: "CompletableFuture> response = fireblocks.contractTemplates().getFunctionAbiByContractTemplateId(contractTemplateId,\ + \ functionSignature);" name: Fireblocks SDK Java example x-accepts: application/json - /admin_quorum: - put: - description: Update admin quorum threshold - operationId: setAdminQuorumThreshold + /tokenization/templates/{contractTemplateId}/deploy: + post: + description: "Deploy a new contract by contract template id. If you wish to\ + \ deploy a token (ERC20, ERC721 etc), and create asset please use POST /tokenization" + operationId: deployContract parameters: + - description: The Contract Template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: false + in: path + name: contractTemplateId + required: true + schema: + type: string + style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -7972,18 +7958,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SetAdminQuorumThresholdRequest' + $ref: '#/components/schemas/ContractDeployRequest' required: true responses: "202": content: application/json: schema: - $ref: '#/components/schemas/SetAdminQuorumThresholdResponse' - description: OK - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' + $ref: '#/components/schemas/ContractDeployResponse' + description: Contract was deployed successfully + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/HttpContractDoesNotExistError' + description: Could not find contract. default: content: application/json: @@ -7993,102 +7982,233 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Update admin quorum threshold + summary: Deploy contract tags: - - Admin Quorum - x-internal: true + - Contract Templates x-readme: code-samples: - language: python - code: result = fireblocks.set_admin_quorum_threshold(adminQuorumThreshold) + code: "response = fireblocks.deploy_contract(contract_id, contract_deploy_request)" name: Fireblocks SDK Python example - language: javascript - code: const result = await fireblocks.setAdminQuorumThreshold(adminQuorumThreshold) + code: "const { txId } = await fireblocks.deployContract(contractId, contractDeployRequest);" name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.contractTemplates.deployContract(contractTemplatesApiDeployContractRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response =\ + \ fireblocks.contractTemplates().deployContract(contractDeployRequest,\ + \ contractTemplateId, idempotencyKey);" + name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /nfts/ownership/tokens: + /tokenization/contracts: get: - description: | - Returns all tokens and their data in your workspace. - operationId: getOwnershipTokens + description: Return a filtered lean representation of the deployed contracts + data on all blockchains (paginated) + operationId: getDeployedContracts parameters: - - description: Blockchain descriptor filter + - description: Page cursor to get the next page + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== explode: true in: query - name: blockchainDescriptor + name: pageCursor required: false schema: - enum: - - ETH - - ETH_TEST3 - - ETH_TEST5 - - POLYGON - - POLYGON_TEST_MUMBAI - - XTZ - - XTZ_TEST - - BASECHAIN_ETH type: string style: form - - description: A comma separated list of Vault Account IDs. Up to 100 are allowed - in a single request. This field will be ignored when walletType=END_USER_WALLET - or ncwId is provided. + - description: "Number of items per page, requesting more then max will return\ + \ max items" + example: 10 explode: true in: query - name: vaultAccountIds + name: pageSize required: false schema: - type: string + maximum: 100 + minimum: 1 + type: number style: form - - description: Tenant's Non-Custodial Wallet ID + - description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 explode: true in: query - name: ncwId + name: contractAddress required: false schema: type: string style: form - - description: A comma separated list of Non-Custodial account IDs. Up to 100 - are allowed in a single request. This field will be ignored when walletType=VAULT_ACCOUNT - or ncwId is not provided. - explode: true + - explode: true in: query - name: ncwAccountIds + name: assetId required: false schema: type: string style: form - - description: "Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`" - explode: true + - explode: true in: query - name: walletType + name: templateId required: false schema: - default: VAULT_ACCOUNT - enum: - - VAULT_ACCOUNT - - END_USER_WALLET type: string style: form - - description: A comma separated list of NFT IDs. Up to 100 are allowed in a - single request. - explode: true - in: query - name: ids - required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployedContractsPaginatedResponse' + description: Deployed contracts fetched successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List deployed contracts data + tags: + - Deployed Contracts + x-readme: + code-samples: + - language: python + code: deployed_contracts = fireblocks.get_contracts_by_filter(template_id) + name: Fireblocks SDK Python example + - language: javascript + code: const deployedContracts = await fireblocks.getContractsByFilter(templateId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.deployedContracts.getDeployedContracts(deployedContractsApiGetDeployedContractsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.deployedContracts().getDeployedContracts(pageCursor,\ + \ pageSize, contractAddress, assetId, templateId);" + name: Fireblocks SDK Java example + x-accepts: application/json + /tokenization/contracts/{id}: + get: + description: Return deployed contract data by id + operationId: getDeployedContractById + parameters: + - description: The deployed contract data identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + explode: false + in: path + name: id + required: true schema: type: string - style: form - - description: A comma separated list of collection IDs. Up to 100 are allowed - in a single request. - explode: true - in: query - name: collectionIds - required: false + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployedContractResponseDto' + description: "" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return deployed contract data by id + tags: + - Deployed Contracts + x-readme: + code-samples: + - language: python + code: deployed_contracts = fireblocks.get_contract_by_id(contract_id) + name: Fireblocks SDK Python example + - language: javascript + code: const deployedContracts = await fireblocks.getContractById(contractId); + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.deployedContracts.getDeployedContractById(deployedContractsApiGetDeployedContractByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.deployedContracts().getDeployedContractById(id); + name: Fireblocks SDK Java example + x-accepts: application/json + /tokenization/contracts/{assetId}/{contractAddress}: + get: + description: Return deployed contract data by blockchain native asset id and + contract address + operationId: getDeployedContractByAddress + parameters: + - description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + explode: false + in: path + name: contractAddress + required: true schema: type: string - style: form - - description: Page cursor to fetch + style: simple + - explode: false + in: path + name: assetId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployedContractResponseDto' + description: "" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return deployed contract data + tags: + - Deployed Contracts + x-readme: + code-samples: + - language: python + code: "deployed_contract = fireblocks.get_contract_by_address(base_asset_id,\ + \ contract_address)" + name: Fireblocks SDK Python example + - language: javascript + code: "const deployedContract = await fireblocks.getContractByAddress(baseAssetId,\ + \ contractAddress);" + name: Fireblocks SDK Javascript example + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.deployedContracts.getDeployedContractByAddress(deployedContractsApiGetDeployedContractByAddressRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.deployedContracts().getDeployedContractByAddress(contractAddress,\ + \ assetId);" + name: Fireblocks SDK Java example + x-accepts: application/json + /tokenization/tokens: + get: + description: Return all linked tokens (paginated) + operationId: getLinkedTokens + parameters: + - description: Page cursor to get the next page + example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA== explode: true in: query name: pageCursor @@ -8096,7 +8216,9 @@ paths: schema: type: string style: form - - description: Items per page (max 100) + - description: "Number of items per page, requesting more then max will return\ + \ max items" + example: 10 explode: true in: query name: pageSize @@ -8106,122 +8228,59 @@ paths: minimum: 1 type: number style: form - - description: "Sort by param, it can be one param or a list of params separated\ - \ by comma" - explode: true - in: query - name: sort - required: false - schema: - items: - enum: - - ownershipLastUpdateTime - - name - - collection.name - - blockchainDescriptor - type: string - type: array - style: form - - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ - \ descending" - explode: true - in: query - name: order - required: false - schema: - default: ASC - enum: - - DESC - - ASC - type: string - style: form - - description: Token ownership status + - description: A comma separated list of statuses to filter. Default is "COMPLETED" + example: COMPLETED explode: true in: query name: status required: false - schema: - default: LISTED - enum: - - LISTED - - ARCHIVED - type: string - style: form - - description: "Search owned tokens and their collections. Possible criteria\ - \ for search: token name and id within the contract/collection, collection\ - \ name, blockchain descriptor and name." - explode: true - in: query - name: search - required: false - schema: - maximum: 100 - type: string - style: form - - description: Token ownership spam status. - explode: true - in: query - name: spam - required: false - schema: - enum: - - "true" - - "false" - - all - type: string + schema: {} style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/getOwnershipTokens_200_response' + $ref: '#/components/schemas/TokensPaginatedResponse' description: "" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: List all owned tokens (paginated) + summary: List all linked tokens tags: - - NFTs + - Tokenization x-readme: code-samples: + - language: python + code: linked_tokens = fireblocks.get_linked_tokens(payload) + name: Fireblocks SDK Python example + - language: javascript + code: const linkedTokens = await fireblocks.getLinkedTokens(payload); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.getOwnershipTokens(nFTsApiGetOwnershipTokensRequest);" + code: "const response: Promise>\ + \ = fireblocks.tokenization.getLinkedTokens(tokenizationApiGetLinkedTokensRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().getOwnershipTokens(blockchainDescriptor,\ - \ vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds,\ - \ pageCursor, pageSize, sort, order, status, search, spam);" + code: "CompletableFuture> response\ + \ = fireblocks.tokenization().getLinkedTokens(pageCursor, pageSize, status);" name: Fireblocks SDK Java example x-accepts: application/json - put: - description: | - Updates all tokens and balances per blockchain and vault account. - operationId: updateOwnershipTokens + post: + description: "Facilitates the creation of a new token, supporting both EVM-based\ + \ and Stellar/Ripple platforms. For EVM, it deploys the corresponding contract\ + \ template to the blockchain and links the token to the workspace. For Stellar/Ripple,\ + \ it links a newly created token directly to the workspace without deploying\ + \ a contract. Returns the token link with status \"PENDING\" until the token\ + \ is deployed or \"SUCCESS\" if no deployment is needed." + operationId: issueNewToken parameters: - - description: Blockchain descriptor filter - explode: true - in: query - name: blockchainDescriptor - required: true - schema: - enum: - - ETH - - ETH_TEST3 - - ETH_TEST5 - - POLYGON - - POLYGON_TEST_MUMBAI - - BASECHAIN_ETH - type: string - style: form - - description: Vault account filter - explode: true - in: query - name: vaultAccountId - required: true - schema: - type: string - style: form - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -8233,274 +8292,186 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTokenRequestDto' + required: true responses: - "202": - description: "" - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Refresh vault account tokens + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkDto' + description: Token was created successfully + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetAlreadyExistHttpError' + description: Asset already exists + summary: Issue a new token tags: - - NFTs + - Tokenization x-readme: code-samples: + - language: python + code: token = fireblocks.issue_new_token(payload) + name: Fireblocks SDK Python example + - language: javascript + code: const token = await fireblocks.issueNewToken(payload); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.updateOwnershipTokens(nFTsApiUpdateOwnershipTokensRequest);" + code: "const response: Promise> = fireblocks.tokenization.issueNewToken(tokenizationApiIssueNewTokenRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().updateOwnershipTokens(blockchainDescriptor,\ - \ vaultAccountId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.tokenization().issueNewToken(createTokenRequestDto,\ + \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /nfts/ownership/assets: - get: - description: | - Returns all owned distinct tokens (for your tenant) and their data in your workspace. - operationId: listOwnedTokens + /tokenization/tokens/link: + post: + description: "Link an already existing token (by assetId, collectionId or contractId\ + \ as refId) to a workspace across EVM, Stellar, or Ripple platforms. The token\ + \ will be linked to the workspace if it does not already exist." + operationId: link parameters: - - description: Tenant's Non-Custodial Wallet ID - explode: true - in: query - name: ncwId - required: false - schema: - type: string - style: form - - description: "Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`" - explode: true - in: query - name: walletType - required: false - schema: - default: VAULT_ACCOUNT - enum: - - VAULT_ACCOUNT - - END_USER_WALLET - type: string - style: form - - description: Page cursor to fetch - explode: true - in: query - name: pageCursor - required: false - schema: - type: string - style: form - - description: Items per page (max 100) - explode: true - in: query - name: pageSize - required: false - schema: - maximum: 100 - minimum: 1 - type: number - style: form - - description: "Sort by param, it can be one param or a list of params separated\ - \ by comma" - explode: true - in: query - name: sort - required: false - schema: - items: - enum: - - name - type: string - type: array - style: form - - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ - \ descending" - explode: true - in: query - name: order - required: false - schema: - default: ASC - enum: - - DESC - - ASC - type: string - style: form - - description: Token ownership status - explode: true - in: query - name: status - required: false - schema: - default: LISTED - enum: - - LISTED - - ARCHIVED - type: string - style: form - - description: Search owned tokens by token name - explode: true - in: query - name: search - required: false - schema: - maximum: 100 - type: string - style: form - - description: Token ownership spam status. - explode: true - in: query - name: spam + - 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: - enum: - - "true" - - "false" - - all type: string - style: form + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkRequestDto' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/listOwnedTokens_200_response' + $ref: '#/components/schemas/TokenLinkDto' + description: Token linked successfully + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkDto' description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/AssetDoesNotExistHttpError' + description: Could not find the underlying token identifier (refId) to link + the token to + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/TokenLinkExistsHttpError' + description: "Token link for {refId} already exists" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: List all distinct owned tokens (paginated) + summary: Link a token tags: - - NFTs + - Tokenization x-readme: code-samples: + - language: python + code: "token = fireblocks.link_token(\"FUNGIBLE_TOKEN\", ref_id)" + name: Fireblocks SDK Python example + - language: javascript + code: "const token = await fireblocks.linkToken(\"FUNGIBLE_TOKEN\", refId);" + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.listOwnedTokens(nFTsApiListOwnedTokensRequest);" + code: "const response: Promise> = fireblocks.tokenization.link(tokenizationApiLinkRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().listOwnedTokens(ncwId,\ - \ walletType, pageCursor, pageSize, sort, order, status, search, spam);" + code: "CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto,\ + \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /nfts/ownership/collections: - get: - description: | - Returns all collections in your workspace - operationId: listOwnedCollections + /tokenization/tokens/{id}: + delete: + description: "Unlink a token. The token will be unlinked from the workspace.\ + \ The token will not be deleted on chain nor the refId, only the link to the\ + \ workspace will be removed." + operationId: unlink parameters: - - description: Tenant's Non-Custodial Wallet ID - explode: true - in: query - name: ncwId - required: false - schema: - type: string - style: form - - description: "Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`" - explode: true - in: query - name: walletType - required: false - schema: - default: VAULT_ACCOUNT - enum: - - VAULT_ACCOUNT - - END_USER_WALLET - type: string - style: form - - description: "Search owned collections. Possible criteria for search: collection\ - \ name, collection contract address." - explode: true - in: query - name: search - required: false - schema: - maximum: 100 - type: string - style: form - - description: Page cursor to fetch - explode: true - in: query - name: pageCursor - required: false - schema: - type: string - style: form - - description: Items per page (max 100) - explode: true - in: query - name: pageSize - required: false - schema: - maximum: 100 - minimum: 1 - type: number - style: form - - description: "Sort by param, it can be one param or a list of params separated\ - \ by comma" - explode: true - in: query - name: sort - required: false - schema: - items: - enum: - - name - type: string - type: array - style: form - - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ - \ descending" - explode: true - in: query - name: order - required: false - schema: - default: ASC - enum: - - DESC - - ASC - type: string - style: form - - description: Token ownership status - explode: true - in: query - name: status - required: false + - description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + explode: false + in: path + name: id + required: true schema: - default: LISTED - enum: - - LISTED - - ARCHIVED type: string - style: form + style: simple responses: "200": + content: {} + description: Token unlinked successfully + "204": + content: {} + description: "" + "404": content: application/json: schema: - $ref: '#/components/schemas/listOwnedCollections_200_response' - description: "" + $ref: '#/components/schemas/NotFoundException' + description: Link did not exist + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: List owned collections (paginated) + summary: Unlink a token tags: - - NFTs + - Tokenization x-readme: code-samples: + - language: python + code: token = fireblocks.unlink_token(token_id) + name: Fireblocks SDK Python example + - language: javascript + code: const token = await fireblocks.unlinkToken(tokenId); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.listOwnedCollections(nFTsApiListOwnedCollectionsRequest);" + code: "const response: Promise> = fireblocks.tokenization.unlink(tokenizationApiUnlinkRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().listOwnedCollections(ncwId,\ - \ walletType, search, pageCursor, pageSize, sort, order, status);" + code: CompletableFuture> response = fireblocks.tokenization().unlink(id); name: Fireblocks SDK Java example x-accepts: application/json - /nfts/tokens/{id}: get: - description: | - Returns the requested token data. - operationId: getNFT + description: "Return a linked token, with its status and metadata." + operationId: getLinkedToken parameters: - - description: NFT ID - example: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd + - description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb explode: false in: path name: id @@ -8513,37 +8484,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TokenResponse' - description: "" + $ref: '#/components/schemas/TokenLinkDto' + description: Token fetched successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: List token data by ID + summary: Return a linked token tags: - - NFTs + - Tokenization x-readme: code-samples: + - language: python + code: token = fireblocks.get_linked_token(token_id) + name: Fireblocks SDK Python example + - language: javascript + code: const token = await fireblocks.getLinkedToken(tokenId); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.getNFT(nFTsApiGetNFTRequest);" + code: "const response: Promise> = fireblocks.tokenization.getLinkedToken(tokenizationApiGetLinkedTokenRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.nFTs().getNFT(id); + code: CompletableFuture> response = fireblocks.tokenization().getLinkedToken(id); name: Fireblocks SDK Java example x-accepts: application/json - put: - description: | - Updates the latest token metadata. - operationId: refreshNFTMetadata + /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions: + get: + description: Return deployed contract's ABI by blockchain native asset id and + contract address + operationId: getDeployedContractAbi parameters: - - description: NFT ID - example: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd - explode: false - in: path - name: id - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -8555,124 +8530,67 @@ paths: schema: type: string style: simple - responses: - "202": - description: "" - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Refresh token metadata - tags: - - NFTs - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.nFTs.refreshNFTMetadata(nFTsApiRefreshNFTMetadataRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response = fireblocks.nFTs().refreshNFTMetadata(id,\ - \ idempotencyKey);" - name: Fireblocks SDK Java example - x-accepts: application/json - /nfts/tokens: - get: - description: | - Returns the requested tokens data. - operationId: getNFTs - parameters: - - description: A comma separated list of NFT IDs. Up to 100 are allowed in a - single request. - explode: true - in: query - name: ids + - description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + explode: false + in: path + name: contractAddress required: true schema: type: string - style: form - - description: Page cursor to fetch - explode: true - in: query - name: pageCursor - required: false - schema: - type: string - style: form - - description: Items per page (max 100) - explode: true - in: query - name: pageSize - required: false - schema: - maximum: 100 - minimum: 1 - type: number - style: form - - description: "Sort by param, it can be one param or a list of params separated\ - \ by comma" - explode: true - in: query - name: sort - required: false - schema: - items: - enum: - - collection.name - - name - - blockchainDescriptor - type: string - type: array - style: form - - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ - \ descending" - explode: true - in: query - name: order - required: false + style: simple + - explode: false + in: path + name: assetId + required: true schema: - default: ASC - enum: - - DESC - - ASC type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/listOwnedTokens_200_response' + $ref: '#/components/schemas/ContractAbiResponseDto' description: "" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: List tokens by IDs + summary: Return deployed contract's ABI tags: - - NFTs + - Contract Interactions x-readme: code-samples: + - language: python + code: "deployed_contract_abi = fireblocks.get_contracts_abi(base_asset_id,\ + \ contract_address)" + name: Fireblocks SDK Python example + - language: javascript + code: "const deployedContractAbi = await fireblocks.getContractAbi(baseAssetId,\ + \ contractAddress);" + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.getNFTs(nFTsApiGetNFTsRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.getDeployedContractAbi(contractInteractionsApiGetDeployedContractAbiRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().getNFTs(ids,\ - \ pageCursor, pageSize, sort, order);" + code: "CompletableFuture> response =\ + \ fireblocks.contractInteractions().getDeployedContractAbi(contractAddress,\ + \ assetId, idempotencyKey);" name: Fireblocks SDK Java example x-accepts: application/json - /nfts/ownership/tokens/{id}/status: - put: - description: | - Updates token status for a tenant, in all tenant vaults. - operationId: updateTokenOwnershipStatus + /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read: + post: + description: Call a read function on a deployed contract by blockchain native + asset id and contract address + operationId: readCallFunction parameters: - - description: NFT ID - example: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd - explode: false - in: path - name: id - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -8684,36 +8602,75 @@ paths: schema: type: string style: simple + - description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + explode: false + in: path + name: contractAddress + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: assetId + required: true + schema: + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/UpdateTokenOwnershipStatusDto' + $ref: '#/components/schemas/ReadCallFunctionDto' required: true responses: "200": - description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/ParameterWithValueList' + description: Read Call Retrieved Successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Update token ownership status + summary: Call a read function on a deployed contract tags: - - NFTs + - Contract Interactions x-readme: code-samples: + - language: python + code: "read_response = fireblocks.read_contract_call_function(base_asset_id,\ + \ contract_address, payload)" + name: Fireblocks SDK Python example + - language: javascript + code: "const readResponse= await fireblocks.readContractCallFunction(baseAssetId,\ + \ contractAddress, payload);" + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.updateTokenOwnershipStatus(nFTsApiUpdateTokenOwnershipStatusRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.readCallFunction(contractInteractionsApiReadCallFunctionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().updateTokenOwnershipStatus(updateTokenOwnershipStatusDto,\ - \ id, idempotencyKey);" + code: "CompletableFuture>> response\ + \ = fireblocks.contractInteractions().readCallFunction(readCallFunctionDto,\ + \ contractAddress, assetId, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /nfts/ownership/tokens/status: - put: - description: "Updates tokens status for a tenant, in all tenant vaults." - operationId: updateTokensOwnershipStatus + /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write: + post: + description: "Call a write function on a deployed contract by blockchain native\ + \ asset id and contract address. This creates an onchain transaction, thus\ + \ it is an async operation. It returns a transaction id that can be polled\ + \ for status check" + operationId: writeCallFunction 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\ @@ -8726,220 +8683,166 @@ paths: schema: type: string style: simple + - description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + explode: false + in: path + name: contractAddress + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: assetId + required: true + schema: + type: string + style: simple requestBody: content: application/json: schema: - items: - $ref: '#/components/schemas/TokenOwnershipStatusUpdatePayload' - type: array + $ref: '#/components/schemas/WriteCallFunctionDto' required: true responses: - "200": - description: All token statuses have been updated - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "400": - description: Invalid data sent - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "404": - description: When ownership for token ID is not found + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/WriteCallFunctionResponseDto' + description: "" + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Update tokens ownership status + summary: Call a write function on a deployed contract tags: - - NFTs + - Contract Interactions x-readme: code-samples: + - language: python + code: "write_function_response = fireblocks.write_contract_call_function(base_asset_id,\ + \ contract_address, payload)" + name: Fireblocks SDK Python example + - language: javascript + code: "const writeFunctionResponse = await fireblocks.writeContractCallFunction(baseAssetId,\ + \ contractAddress, payload);" + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.nFTs.updateTokensOwnershipStatus(nFTsApiUpdateTokensOwnershipStatusRequest);" + code: "const response: Promise>\ + \ = fireblocks.contractInteractions.writeCallFunction(contractInteractionsApiWriteCallFunctionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().updateTokensOwnershipStatus(updateTokensOwnershipStatusRequest,\ - \ idempotencyKey);" + code: "CompletableFuture> response\ + \ = fireblocks.contractInteractions().writeCallFunction(writeCallFunctionDto,\ + \ contractAddress, assetId, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /nfts/ownership/tokens/spam: - put: - description: "Updates tokens spam property for a tenant's token ownerships,\ - \ in all tenant vaults." - operationId: updateTokensOwnershipSpam - 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: - items: - $ref: '#/components/schemas/TokenOwnershipSpamUpdatePayload' - type: array - required: true + /staking/chains: + get: + description: Return an alphabetical list of supported chains. + operationId: getChains + parameters: [] responses: "200": - description: All token spam properties have been updated - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "400": - description: Invalid data sent - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "404": - description: When ownership for token ID is not found - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Update tokens ownership spam property + content: + application/json: + example: + - ETH + - SOL + schema: + $ref: '#/components/schemas/StakingGetChainsResponse' + description: "" + summary: "" tags: - - NFTs + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.nFTs.updateTokensOwnershipSpam(nFTsApiUpdateTokensOwnershipSpamRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getChains();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.nFTs().updateTokensOwnershipSpam(updateTokensOwnershipSpamRequest,\ - \ idempotencyKey);" + code: CompletableFuture>> response = fireblocks.stakingBeta().getChains(); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /connections: + /staking/chains/{chainDescriptor}/chainInfo: get: - description: Get open Web3 connections. - operationId: get + description: "Return chain-specific, staking-related information summary (e.g.\ + \ epoch details, lockup durations, estimated rewards, etc.)" + operationId: getChainInfo parameters: - - description: List order; ascending or descending. - explode: true - in: query - name: order - required: false - schema: - default: ASC - enum: - - ASC - - DESC - type: string - style: form - - description: Parsed filter object - examples: - object: - description: "" - summary: The filter object - value: - id: string - userId: string - vaultAccountId: number - connectionMethod: string - feeLevel: string - appUrl: string - appName: string - stringified: - description: |- - About stringified parsed objects: - - * Each key-value pair is separated by '=', and each pair is separated by ',' (you can use [`qs`](https://www.npmjs.com/package/qs) package for this) - summary: The stringified parsed object - value: "id=string,userId=string,vaultAccountId=number,connectionMethod=string,feeLevel=string,appUrl=string,appName=string" - explode: true - in: query - name: filter - required: false - schema: - $ref: '#/components/schemas/get_filter_parameter' - style: form - - description: Property to sort Web3 connections by. - explode: true - in: query - name: sort - required: false + - description: The protocol identifier (e.g. "ETH"/"SOL") to use + explode: false + in: path + name: chainDescriptor + required: true schema: - default: createdAt enum: - - id - - userId - - vaultAccountId - - createdAt - - feeLevel - - appUrl - - appName - type: string - style: form - - description: Amount of results to return in the next page. - explode: true - in: query - name: pageSize - required: false - schema: - default: 10 - maximum: 50 - type: number - style: form - - description: Cursor to the next page - explode: true - in: query - name: next - required: false - schema: + - ETH + - SOL + - ETH_TEST3 + - SOL_TEST type: string - style: form + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/GetConnectionsResponse' - description: "" - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "400": - description: Query parameters were invalid - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "500": - description: Something went wrong - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: List all open Web3 connections. + $ref: '#/components/schemas/ChainInfoResponseDto' + description: Chain specific info summary was returned successfully + summary: "" tags: - - Web3 connections + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.web3Connections.get(web3ConnectionsApiGetRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getChainInfo(stakingBetaApiGetChainInfoRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response =\ - \ fireblocks.web3Connections().get(order, filter, sort, pageSize, next);" + code: CompletableFuture> response = fireblocks.stakingBeta().getChainInfo(chainDescriptor); name: Fireblocks SDK Java example x-accepts: application/json - /connections/wc: + /staking/chains/{chainDescriptor}/{actionId}: post: - description: |- - Initiate a new Web3 connection. - - * Note: After this succeeds, make a request to `PUT /v1/connections/wc/{id}` (below) to approve or reject the new Web3 connection. - operationId: create + description: "Perform a chain-specific staking action (e.g. stake, unstake,\ + \ withdraw)." + operationId: executeAction parameters: + - description: The protocol identifier (e.g. "ETH"/"SOL") to use + explode: false + in: path + name: chainDescriptor + required: true + schema: + enum: + - ETH + - SOL + - ETH_TEST3 + - SOL_TEST + type: string + style: simple + - description: The operation that can be executed on a vault/position + explode: false + in: path + name: actionId + required: true + schema: + enum: + - stake + - unstake + - withdraw + type: string + style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -8954,394 +8857,321 @@ paths: requestBody: content: application/json: + examples: + stake: + value: + vaultAccountId: "22" + providerId: kiln + stakeAmount: "32" + chainDescriptor: ETH + txNote: stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 + of 32ETH created on 02.04.23 + feeLevel: MEDIUM + unstake: + value: + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850b + txNote: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ + \ #ETH" + feeLevel: MEDIUM + withdraw: + value: + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850c + txNote: "withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d\ + \ #ETH" + feeLevel: MEDIUM schema: - $ref: '#/components/schemas/create_request' + $ref: '#/components/schemas/ExecuteActionRequest' required: true responses: "201": content: application/json: + examples: + stake: + value: + id: afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8 + unstake: + value: {} + withdraw: + value: {} schema: - $ref: '#/components/schemas/CreateConnectionResponse' - description: Web3 connection initiated successfully - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "400": - description: Invalid data sent - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "500": - description: Something went wrong - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Create a new Web3 connection. + $ref: '#/components/schemas/ExecuteActionResponse' + description: A chain-specific action has been executed successfully on vault/position + and is associated with 201 status code. + summary: "" tags: - - Web3 connections + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.web3Connections.create(web3ConnectionsApiCreateRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.executeAction(stakingBetaApiExecuteActionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.web3Connections().create(createRequest, idempotencyKey);" + code: "CompletableFuture> response =\ + \ fireblocks.stakingBeta().executeAction(executeActionRequest, chainDescriptor,\ + \ actionId, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /connections/wc/{id}: - delete: - description: Remove a Web3 connection - operationId: remove + /staking/positions: + get: + description: "Return detailed information on all staking positions, including\ + \ the staked amount, rewards, status and more." + operationId: getAllDelegations parameters: - - description: The ID of the existing Web3 connection to remove. - explode: false - in: path - name: id - required: true + - description: Use "ETH" / "SOL" in order to obtain information related to the + specific blockchain network or retrieve information about all chains that + have data available by providing no argument. + explode: true + in: query + name: chainDescriptor + required: false schema: type: string - style: simple + style: form responses: "200": - description: Connection removed successfully - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "404": - description: Connection not found - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "500": - description: Something went wrong - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Remove an existing Web3 connection. + content: + application/json: + schema: + $ref: '#/components/schemas/StakingGetAllDelegationsResponse' + description: An array of position data was returned successfully + summary: "" tags: - - Web3 connections + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.web3Connections.remove(web3ConnectionsApiRemoveRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getAllDelegations(stakingBetaApiGetAllDelegationsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.web3Connections().remove(id); + code: CompletableFuture>> response = fireblocks.stakingBeta().getAllDelegations(chainDescriptor); name: Fireblocks SDK Java example x-accepts: application/json - put: - description: |- - Submit a response to *approve* or *reject* an initiated Web3 connection. - * Note: This call is used to complete your `POST /v1/connections/wc/` request. - - After this succeeds, your new Web3 connection is created and functioning. - operationId: submit - parameters: - - description: The ID of the initiated Web3 connection to approve. - explode: false - in: path - name: id - required: true - schema: - type: string - style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RespondToConnectionRequest' - required: true + /staking/positions/summary: + get: + description: "Return a summary of all vaults, categorized by their status (active,\ + \ inactive), the total amounts staked and total rewards per-chain." + operationId: getSummary + parameters: [] responses: "200": - description: Connection submitted successfully - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "400": - description: Invalid data sent - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "404": - description: Connection not found - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "500": - description: Something went wrong - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Respond to a pending Web3 connection request. + content: + application/json: + example: + active: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.077345939" + inactive: + - chainDescriptor: ETH + amount: "0" + - chainDescriptor: SOL + amount: "0" + rewardsAmount: + - chainDescriptor: ETH + amount: "0.036604667" + - chainDescriptor: SOL + amount: "0.001345939" + totalStaked: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.077345939" + schema: + $ref: '#/components/schemas/DelegationSummaryDto' + description: A summary for all vaults were returned successfully + summary: "" tags: - - Web3 connections + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.web3Connections.submit(web3ConnectionsApiSubmitRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getSummary();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.web3Connections().submit(respondToConnectionRequest,\ - \ id, idempotencyKey);" + code: CompletableFuture> response = fireblocks.stakingBeta().getSummary(); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /screening/travel_rule/transaction/validate: - post: - description: |- - Validate Travel Rule transactions. - - Checks what beneficiary VASP details are required by your jurisdiction and the beneficiary's jurisdiction. - - **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. - - To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). - operationId: validateTravelRuleTransaction - 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/TravelRuleValidateTransactionRequest' - required: true + /staking/positions/summary/vaults: + get: + description: "Return a summary for each vault, categorized by their status (active,\ + \ inactive), the total amounts staked and total rewards per-chain." + operationId: getSummaryByVault + parameters: [] responses: "200": content: application/json: + example: + "0": + active: + - chainDescriptor: SOL + amount: "0.015202376" + inactive: + - chainDescriptor: SOL + amount: "0" + rewardsAmount: + - chainDescriptor: SOL + amount: "0.000202376" + totalStaked: + - chainDescriptor: SOL + amount: "0.015202376" + "1": + active: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.011191566" + inactive: + - chainDescriptor: ETH + amount: "0" + - chainDescriptor: SOL + amount: "0" + rewardsAmount: + - chainDescriptor: ETH + amount: "0.036604667" + - chainDescriptor: SOL + amount: "0.000191566" + totalStaked: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.011191566" schema: - $ref: '#/components/schemas/TravelRuleValidateTransactionResponse' - description: Transaction validated successfully - "400": - description: Invalid request body - "500": - description: Internal server error - summary: Validate Travel Rule Transaction + $ref: '#/components/schemas/StakingGetSummaryByVaultResponse' + description: A summary for each vault were returned successfully + summary: "" tags: - - Travel Rule (Beta) + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.travelRuleBeta.validateTravelRuleTransaction(travelRuleBetaApiValidateTravelRuleTransactionRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getSummaryByVault();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture>\ - \ response = fireblocks.travelRuleBeta().validateTravelRuleTransaction(travelRuleValidateTransactionRequest,\ - \ idempotencyKey);" + code: CompletableFuture> response + = fireblocks.stakingBeta().getSummaryByVault(); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /screening/travel_rule/transaction/validate/full: - post: - description: |- - Validate Full Travel Rule transactions. - - Checks for all required information on the originator and beneficiary VASPs. - - **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. - - To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). - operationId: validateFullTravelRuleTransaction + /staking/positions/{id}: + get: + description: "Return detailed information on a staking position, including the\ + \ staked amount, rewards, status and more." + operationId: getDelegationById 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." + - description: The unique identifier of the staking position explode: false - in: header - name: Idempotency-Key - required: false + in: path + name: id + required: true schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TravelRuleValidateFullTransactionRequest' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/TravelRuleValidateTransactionResponse' - description: Transaction validated successfully - "400": - description: Invalid request body - "500": - description: Internal server error - summary: Validate Full Travel Rule Transaction + $ref: '#/components/schemas/DelegationDto' + description: Position data was returned successfully + summary: "" tags: - - Travel Rule (Beta) + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.travelRuleBeta.validateFullTravelRuleTransaction(travelRuleBetaApiValidateFullTravelRuleTransactionRequest);" + code: "const response: Promise> = fireblocks.stakingBeta.getDelegationById(stakingBetaApiGetDelegationByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture>\ - \ response = fireblocks.travelRuleBeta().validateFullTravelRuleTransaction(travelRuleValidateFullTransactionRequest,\ - \ idempotencyKey);" + code: CompletableFuture> response = fireblocks.stakingBeta().getDelegationById(id); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /screening/travel_rule/vasp/{did}: + /staking/providers: get: - description: |- - Get VASP Details. - - Returns information about a VASP that has the specified DID. - - **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. - - To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). - operationId: getVASPByDID - parameters: - - explode: false - in: path - name: did - required: true - schema: - type: string - style: simple - - description: "CSV of fields to return (all, \"blank\" or see list of all field\ - \ names below)" - explode: true - in: query - name: fields - required: false - schema: - type: string - style: form + description: Return information on all the available staking providers. + operationId: getProviders + parameters: [] responses: "200": content: application/json: schema: - $ref: '#/components/schemas/TravelRuleVASP' - description: Transaction validated successfully - "400": - description: Invalid request body - "500": - description: Internal server error - summary: Get VASP details + $ref: '#/components/schemas/StakingGetProvidersResponse' + description: An array of supported providers was returned successfully + summary: "" tags: - - Travel Rule (Beta) + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.travelRuleBeta.getVASPByDID(travelRuleBetaApiGetVASPByDIDRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.getProviders();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.travelRuleBeta().getVASPByDID(did,\ - \ fields);" + code: CompletableFuture>> response = fireblocks.stakingBeta().getProviders(); name: Fireblocks SDK Java example x-accepts: application/json - /screening/travel_rule/vasp: - get: + /staking/providers/{providerId}/approveTermsOfService: + post: description: |- - Get All VASPs. - - Returns a list of VASPs. VASPs can be searched and sorted and results are paginated. - - **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. - - To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). - operationId: getVASPs + Approve the terms of service of the staking provider. + This must be called before performing a staking action for the first time with this provider. + operationId: approveTermsOfServiceByProviderId parameters: - - description: Field to order by - explode: true - in: query - name: order - required: false + - description: The unique identifier of the staking provider + explode: false + in: path + name: providerId + required: true schema: + enum: + - kiln + - figment type: string - style: form - - description: Records per page - explode: true - in: query - name: per_page - required: false - schema: - type: number - style: form - - description: Page number - explode: true - in: query - name: page - required: false - schema: - type: number - style: form - - description: "CSV of fields to return (all, \"blank\" or see list of all field\ - \ names below)" - explode: true - in: query - name: fields + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key required: false schema: type: string - style: form + style: simple responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/TravelRuleGetAllVASPsResponse' - description: Get all VASPs - summary: Get All VASPs + $ref: '#/components/schemas/ProvidersResponseDto' + description: The terms of service have been successfully approved and is + associated with 201 status code. + summary: "" tags: - - Travel Rule (Beta) + - Staking (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.travelRuleBeta.getVASPs(travelRuleBetaApiGetVASPsRequest);" + code: "const response: Promise>\ + \ = fireblocks.stakingBeta.approveTermsOfServiceByProviderId(stakingBetaApiApproveTermsOfServiceByProviderIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.travelRuleBeta().getVASPs(order, perPage, page, fields);" + code: "CompletableFuture> response = fireblocks.stakingBeta().approveTermsOfServiceByProviderId(providerId,\ + \ idempotencyKey);" name: Fireblocks SDK Java example x-accepts: application/json - /screening/travel_rule/vasp/update: + /admin_quorum: put: - description: |- - Update VASP Details. - - Updates a VASP with the provided parameters. Use this endpoint to add your public jsonDIDkey generated by Notabene. - - **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. - - To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). - operationId: updateVasp + description: Update admin quorum threshold + operationId: setAdminQuorumThreshold 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\ @@ -9358,181 +9188,262 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TravelRuleUpdateVASPDetails' + $ref: '#/components/schemas/SetAdminQuorumThresholdRequest' required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TravelRuleUpdateVASPDetails' - description: VASP updated successfully - "400": - description: Invalid request body - "500": - description: Internal server error - summary: Add jsonDidKey to VASP details - tags: - - Travel Rule (Beta) - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.travelRuleBeta.updateVasp(travelRuleBetaApiUpdateVaspRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response\ - \ = fireblocks.travelRuleBeta().updateVasp(travelRuleUpdateVASPDetails,\ - \ idempotencyKey);" - name: Fireblocks SDK Java example - x-content-type: application/json - x-accepts: application/json - /screening/travel_rule/post_screening_policy: - get: - description: Get the post-screening policy for Travel Rule. - operationId: getPostScreeningPolicy - parameters: [] - responses: - "200": + "202": content: application/json: schema: - $ref: '#/components/schemas/ScreeningPolicyResponse' - description: Post-screening policy retrieved successfully. - summary: Travel Rule - View Post-Screening Policy - tags: - - Compliance - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.getPostScreeningPolicy();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = - fireblocks.compliance().getPostScreeningPolicy(); - name: Fireblocks SDK Java example - x-accepts: application/json - /screening/travel_rule/screening_policy: - get: - description: Get the screening policy for Travel Rule. - operationId: getScreeningPolicy - parameters: [] - responses: - "200": + $ref: '#/components/schemas/SetAdminQuorumThresholdResponse' + description: OK + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/ScreeningProviderRulesConfigurationResponse' - description: Screening policy retrieved successfully. - summary: Travel Rule - View Screening Policy + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update admin quorum threshold tags: - - Compliance + - Admin Quorum + x-internal: true x-readme: code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.getScreeningPolicy();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> - response = fireblocks.compliance().getScreeningPolicy(); - name: Fireblocks SDK Java example + - language: python + code: result = fireblocks.set_admin_quorum_threshold(adminQuorumThreshold) + name: Fireblocks SDK Python example + - language: javascript + code: const result = await fireblocks.setAdminQuorumThreshold(adminQuorumThreshold) + name: Fireblocks SDK Javascript example + x-content-type: application/json x-accepts: application/json - /screening/travel_rule/policy_configuration: + /nfts/ownership/tokens: get: - description: Retrieves the configuration for Travel Rule screening policy. - operationId: getScreeningConfiguration - parameters: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ScreeningConfigurationsRequest' - description: Screening policy configuration retrieved successfully. - summary: Get Travel Rule Screening Policy Configuration - tags: - - Compliance Screening Configuration - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.complianceScreeningConfiguration.getScreeningConfiguration();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response - = fireblocks.complianceScreeningConfiguration().getScreeningConfiguration(); - name: Fireblocks SDK Java example - x-accepts: application/json - put: - description: "Updates bypass screening, inbound delay, or outbound delay configurations\ - \ for Travel Rule." - operationId: updateTravelRuleConfig + description: | + Returns all tokens and their data in your workspace. + operationId: getOwnershipTokens 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 + - description: Blockchain descriptor filter + explode: true + in: query + name: blockchainDescriptor required: false schema: + enum: + - ETH + - ETH_TEST3 + - ETH_TEST5 + - ETH_TEST6 + - POLYGON + - POLYGON_TEST_MUMBAI + - AMOY_POLYGON_TEST + - XTZ + - XTZ_TEST + - BASECHAIN_ETH type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ScreeningConfigurationsRequest' - description: Configuration updated successfully. - summary: Update Travel Rule Configuration - tags: - - Compliance - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.updateTravelRuleConfig(complianceApiUpdateTravelRuleConfigRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response - = fireblocks.compliance().updateTravelRuleConfig(idempotencyKey); - name: Fireblocks SDK Java example - x-accepts: application/json - /screening/aml/policy_configuration: - get: - description: Retrieves the configuration for Travel Rule screening policy. - operationId: getAmlScreeningConfiguration - parameters: [] + style: form + - description: A comma separated list of Vault Account IDs. Up to 100 are allowed + in a single request. This field will be ignored when walletType=END_USER_WALLET + or ncwId is provided. + explode: true + in: query + name: vaultAccountIds + required: false + schema: + type: string + style: form + - description: Tenant's Non-Custodial Wallet ID + explode: true + in: query + name: ncwId + required: false + schema: + type: string + style: form + - description: A comma separated list of Non-Custodial account IDs. Up to 100 + are allowed in a single request. This field will be ignored when walletType=VAULT_ACCOUNT + or ncwId is not provided. + explode: true + in: query + name: ncwAccountIds + required: false + schema: + type: string + style: form + - description: "Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`" + explode: true + in: query + name: walletType + required: false + schema: + default: VAULT_ACCOUNT + enum: + - VAULT_ACCOUNT + - END_USER_WALLET + type: string + style: form + - description: A comma separated list of NFT IDs. Up to 100 are allowed in a + single request. + explode: true + in: query + name: ids + required: false + schema: + type: string + style: form + - description: A comma separated list of collection IDs. Up to 100 are allowed + in a single request. + explode: true + in: query + name: collectionIds + required: false + schema: + type: string + style: form + - description: Page cursor to fetch + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Items per page (max 100) + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 + minimum: 1 + type: number + style: form + - description: "Sort by param, it can be one param or a list of params separated\ + \ by comma" + explode: true + in: query + name: sort + required: false + schema: + items: + enum: + - ownershipLastUpdateTime + - name + - collection.name + - blockchainDescriptor + type: string + type: array + style: form + - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ + \ descending" + explode: true + in: query + name: order + required: false + schema: + default: ASC + enum: + - DESC + - ASC + type: string + style: form + - description: Token ownership status + explode: true + in: query + name: status + required: false + schema: + default: LISTED + enum: + - LISTED + - ARCHIVED + type: string + style: form + - description: "Search owned tokens and their collections. Possible criteria\ + \ for search: token name and id within the contract/collection, collection\ + \ name, blockchain descriptor and name." + explode: true + in: query + name: search + required: false + schema: + maximum: 100 + type: string + style: form + - description: Token ownership spam status. + explode: true + in: query + name: spam + required: false + schema: + enum: + - "true" + - "false" + - all + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ScreeningConfigurationsRequest' - description: Screening policy configuration retrieved successfully. - summary: Get AML Screening Policy Configuration + $ref: '#/components/schemas/GetOwnershipTokensResponse' + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List all owned tokens (paginated) tags: - - Compliance Screening Configuration + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.complianceScreeningConfiguration.getAmlScreeningConfiguration();" + code: "const response: Promise>\ + \ = fireblocks.nFTs.getOwnershipTokens(nFTsApiGetOwnershipTokensRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response - = fireblocks.complianceScreeningConfiguration().getAmlScreeningConfiguration(); + code: "CompletableFuture> response\ + \ = fireblocks.nFTs().getOwnershipTokens(blockchainDescriptor, vaultAccountIds,\ + \ ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize,\ + \ sort, order, status, search, spam);" name: Fireblocks SDK Java example x-accepts: application/json put: - description: "Updates bypass screening, inbound delay, or outbound delay configurations\ - \ for AML." - operationId: updateAmlScreeningConfiguration + description: | + Updates all tokens and balances per blockchain and vault account. + operationId: updateOwnershipTokens parameters: + - description: Blockchain descriptor filter + explode: true + in: query + name: blockchainDescriptor + required: true + schema: + enum: + - ETH + - ETH_TEST3 + - ETH_TEST5 + - ETH_TEST6 + - POLYGON + - POLYGON_TEST_MUMBAI + - AMOY_POLYGON_TEST + - BASECHAIN_ETH + type: string + style: form + - description: Vault account filter + explode: true + in: query + name: vaultAccountId + required: true + schema: + type: string + style: form - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -9545,144 +9456,449 @@ paths: type: string style: simple responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ScreeningConfigurationsRequest' - description: Configuration updated successfully. - summary: Update AML Configuration + "202": + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Refresh vault account tokens tags: - - Compliance + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.updateAmlScreeningConfiguration(complianceApiUpdateAmlScreeningConfigurationRequest);" + code: "const response: Promise> = fireblocks.nFTs.updateOwnershipTokens(nFTsApiUpdateOwnershipTokensRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response - = fireblocks.compliance().updateAmlScreeningConfiguration(idempotencyKey); + code: "CompletableFuture> response = fireblocks.nFTs().updateOwnershipTokens(blockchainDescriptor,\ + \ vaultAccountId, idempotencyKey);" name: Fireblocks SDK Java example x-accepts: application/json - /screening/aml/screening_policy: + /nfts/ownership/assets: get: - description: Get the screening policy for AML. - operationId: getAmlScreeningPolicy - parameters: [] + description: | + Returns all owned distinct tokens (for your tenant) and their data in your workspace. + operationId: listOwnedTokens + parameters: + - description: Tenant's Non-Custodial Wallet ID + explode: true + in: query + name: ncwId + required: false + schema: + type: string + style: form + - description: "Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`" + explode: true + in: query + name: walletType + required: false + schema: + default: VAULT_ACCOUNT + enum: + - VAULT_ACCOUNT + - END_USER_WALLET + type: string + style: form + - description: Page cursor to fetch + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Items per page (max 100) + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 + minimum: 1 + type: number + style: form + - description: "Sort by param, it can be one param or a list of params separated\ + \ by comma" + explode: true + in: query + name: sort + required: false + schema: + items: + enum: + - name + type: string + type: array + style: form + - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ + \ descending" + explode: true + in: query + name: order + required: false + schema: + default: ASC + enum: + - DESC + - ASC + type: string + style: form + - description: Token ownership status + explode: true + in: query + name: status + required: false + schema: + default: LISTED + enum: + - LISTED + - ARCHIVED + type: string + style: form + - description: Search owned tokens by token name + explode: true + in: query + name: search + required: false + schema: + maximum: 100 + type: string + style: form + - description: Token ownership spam status. + explode: true + in: query + name: spam + required: false + schema: + enum: + - "true" + - "false" + - all + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ScreeningProviderRulesConfigurationResponse' - description: Screening policy retrieved successfully. - summary: AML - View Screening Policy + $ref: '#/components/schemas/ListOwnedTokensResponse' + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List all distinct owned tokens (paginated) tags: - - Compliance + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.getAmlScreeningPolicy();" + code: "const response: Promise>\ + \ = fireblocks.nFTs.listOwnedTokens(nFTsApiListOwnedTokensRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> - response = fireblocks.compliance().getAmlScreeningPolicy(); + code: "CompletableFuture> response\ + \ = fireblocks.nFTs().listOwnedTokens(ncwId, walletType, pageCursor, pageSize,\ + \ sort, order, status, search, spam);" name: Fireblocks SDK Java example x-accepts: application/json - /screening/aml/post_screening_policy: + /nfts/ownership/collections: get: - description: Get the post-screening policy for AML. - operationId: getAmlPostScreeningPolicy - parameters: [] + description: | + Returns all collections in your workspace + operationId: listOwnedCollections + parameters: + - description: Tenant's Non-Custodial Wallet ID + explode: true + in: query + name: ncwId + required: false + schema: + type: string + style: form + - description: "Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`" + explode: true + in: query + name: walletType + required: false + schema: + default: VAULT_ACCOUNT + enum: + - VAULT_ACCOUNT + - END_USER_WALLET + type: string + style: form + - description: "Search owned collections. Possible criteria for search: collection\ + \ name, collection contract address." + explode: true + in: query + name: search + required: false + schema: + maximum: 100 + type: string + style: form + - description: Page cursor to fetch + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Items per page (max 100) + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 + minimum: 1 + type: number + style: form + - description: "Sort by param, it can be one param or a list of params separated\ + \ by comma" + explode: true + in: query + name: sort + required: false + schema: + items: + enum: + - name + type: string + type: array + style: form + - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ + \ descending" + explode: true + in: query + name: order + required: false + schema: + default: ASC + enum: + - DESC + - ASC + type: string + style: form + - description: Token ownership status + explode: true + in: query + name: status + required: false + schema: + default: LISTED + enum: + - LISTED + - ARCHIVED + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ScreeningPolicyResponse' - description: Post-screening policy retrieved successfully. - summary: AML - View Post-Screening Policy + $ref: '#/components/schemas/ListOwnedCollectionsResponse' + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List owned collections (paginated) tags: - - Compliance + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.getAmlPostScreeningPolicy();" + code: "const response: Promise>\ + \ = fireblocks.nFTs.listOwnedCollections(nFTsApiListOwnedCollectionsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = - fireblocks.compliance().getAmlPostScreeningPolicy(); + code: "CompletableFuture> response\ + \ = fireblocks.nFTs().listOwnedCollections(ncwId, walletType, search,\ + \ pageCursor, pageSize, sort, order, status);" name: Fireblocks SDK Java example x-accepts: application/json - /screening/configurations: - put: - description: Update tenant screening configuration. - operationId: updateScreeningConfiguration + /nfts/tokens/{id}: + get: + description: | + Returns the requested token data. + operationId: getNFT 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." + - description: NFT ID + example: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string + in: path + name: id + required: true + schema: + type: string style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ScreeningUpdateConfigurationsRequest' - description: Tenant Screening configuration updated successfully. - summary: Tenant - Screening Configuration + $ref: '#/components/schemas/TokenResponse' + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List token data by ID tags: - - Compliance + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.compliance.updateScreeningConfiguration(complianceApiUpdateScreeningConfigurationRequest);" + code: "const response: Promise> = fireblocks.nFTs.getNFT(nFTsApiGetNFTRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> - response = fireblocks.compliance().updateScreeningConfiguration(idempotencyKey); + code: CompletableFuture> response = fireblocks.nFTs().getNFT(id); name: Fireblocks SDK Java example x-accepts: application/json - /management/ota: + put: + description: | + Updates the latest token metadata. + operationId: refreshNFTMetadata + parameters: + - description: NFT ID + example: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "202": + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Refresh token metadata + tags: + - NFTs + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.nFTs.refreshNFTMetadata(nFTsApiRefreshNFTMetadataRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.nFTs().refreshNFTMetadata(id,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /nfts/tokens: get: - description: Returns current OTA status - operationId: getOtaStatus + description: | + Returns the requested tokens data. + operationId: getNFTs + parameters: + - description: A comma separated list of NFT IDs. Up to 100 are allowed in a + single request. + explode: true + in: query + name: ids + required: true + schema: + type: string + style: form + - description: Page cursor to fetch + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Items per page (max 100) + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 + minimum: 1 + type: number + style: form + - description: "Sort by param, it can be one param or a list of params separated\ + \ by comma" + explode: true + in: query + name: sort + required: false + schema: + items: + enum: + - collection.name + - name + - blockchainDescriptor + type: string + type: array + style: form + - description: "Order direction, it can be `ASC` for ascending or `DESC` for\ + \ descending" + explode: true + in: query + name: order + required: false + schema: + default: ASC + enum: + - DESC + - ASC + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/getOtaStatus_200_response' - description: Current OTA status - "404": - description: Configuration not found for tenant - summary: Returns current OTA status + $ref: '#/components/schemas/GetNFTsResponse' + description: "" + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List tokens by IDs tags: - - OTA (Beta) + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.oTABeta.getOtaStatus();" + code: "const response: Promise> = fireblocks.nFTs.getNFTs(nFTsApiGetNFTsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.oTABeta().getOtaStatus(); + code: "CompletableFuture> response = fireblocks.nFTs().getNFTs(ids,\ + \ pageCursor, pageSize, sort, order);" name: Fireblocks SDK Java example x-accepts: application/json + /nfts/ownership/tokens/{id}/status: put: - description: Enable or disable transactions to OTA - operationId: setOtaStatus + description: | + Updates token status for a tenant, in all tenant vaults. + operationId: updateTokenOwnershipStatus parameters: + - description: NFT ID + example: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -9698,162 +9914,85 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SetOtaStatusRequest' + $ref: '#/components/schemas/UpdateTokenOwnershipStatusDto' required: true responses: - "202": - content: - application/json: - schema: - $ref: '#/components/schemas/SetOtaStatusResponse' - description: Successfully updated OTA status + "200": + description: "" headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - "400": - description: Bad request - "409": - description: Similar request already pending - "500": - description: Internal server error - summary: Enable or disable transactions to OTA + summary: Update token ownership status tags: - - OTA (Beta) + - NFTs x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.oTABeta.setOtaStatus(oTABetaApiSetOtaStatusRequest);" + code: "const response: Promise> = fireblocks.nFTs.updateTokenOwnershipStatus(nFTsApiUpdateTokenOwnershipStatusRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.oTABeta().setOtaStatus(setOtaStatusRequest,\ - \ idempotencyKey);" + code: "CompletableFuture> response = fireblocks.nFTs().updateTokenOwnershipStatus(updateTokenOwnershipStatusDto,\ + \ id, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /management/workspace_status: - get: - description: Returns current workspace status - operationId: getWorkspaceStatus - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getWorkspaceStatus_200_response' - description: Current workspace status - "404": - description: Workspace not found - summary: Returns current workspace status - tags: - - Workspace Status (Beta) - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.workspaceStatusBeta.getWorkspaceStatus();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = fireblocks.workspaceStatusBeta().getWorkspaceStatus(); - name: Fireblocks SDK Java example - x-accepts: application/json - /tap/active_policy: - get: - description: | - Returns the active policy and its validation.
- **Note:** These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - operationId: getActivePolicy + /nfts/ownership/tokens/status: + put: + description: "Updates tokens status for a tenant, in all tenant vaults." + operationId: updateTokensOwnershipStatus + 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/UpdateTokensOwnershipStatusRequest' + required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyAndValidationResponse' - description: A policy object + description: All token statuses have been updated headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + "400": + description: Invalid data sent headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get the active policy and its validation + "404": + description: When ownership for token ID is not found + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update tokens ownership status tags: - - Policy Editor (Beta) + - NFTs x-readme: code-samples: - - language: python - code: policy = fireblocks.get_active_policy() - name: Fireblocks SDK Python example - - language: javascript - code: const policy = await fireblocks.getActivePolicy(); - name: Fireblocks SDK Javascript example - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.policyEditorBeta.getActivePolicy();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response - = fireblocks.policyEditorBeta().getActivePolicy(); - name: Fireblocks SDK Java example - x-accepts: application/json - /tap/draft: - get: - description: | - Returns the active draft and its validation.
- **Note:** These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - operationId: getDraft - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DraftReviewAndValidationResponse' - description: A draft validation response object - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get the active draft - tags: - - Policy Editor (Beta) - x-readme: - code-samples: - - language: python - code: policy = fireblocks.get_draft() - name: Fireblocks SDK Python example - - language: javascript - code: const policy = await fireblocks.getDraft(); - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.policyEditorBeta.getDraft();" + code: "const response: Promise> = fireblocks.nFTs.updateTokensOwnershipStatus(nFTsApiUpdateTokensOwnershipStatusRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response - = fireblocks.policyEditorBeta().getDraft(); + code: "CompletableFuture> response = fireblocks.nFTs().updateTokensOwnershipStatus(tokenOwnershipStatusUpdatePayload,\ + \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - post: - description: | - Send publish request of certain draft id and returns the response.
- **Note:** These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - operationId: publishDraft + /nfts/ownership/tokens/spam: + put: + description: "Updates tokens spam property for a tenant's token ownerships,\ + \ in all tenant vaults." + operationId: updateTokensOwnershipSpam 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\ @@ -9870,118 +10009,158 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PublishDraftRequest' + $ref: '#/components/schemas/UpdateTokensOwnershipSpamRequest' required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/PublishResult' - description: A policy publish result object + "200": + description: All token spam properties have been updated headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + "400": + description: Invalid data sent headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Send publish request for a certain draft id + "404": + description: When ownership for token ID is not found + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update tokens ownership spam property tags: - - Policy Editor (Beta) + - NFTs x-readme: code-samples: - - language: python - code: policy = fireblocks.publish_draft() - name: Fireblocks SDK Python example - - language: javascript - code: const policy = await fireblocks.publishDraft(); - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.policyEditorBeta.publishDraft(policyEditorBetaApiPublishDraftRequest);" + code: "const response: Promise> = fireblocks.nFTs.updateTokensOwnershipSpam(nFTsApiUpdateTokensOwnershipSpamRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.policyEditorBeta().publishDraft(publishDraftRequest,\ + code: "CompletableFuture> response = fireblocks.nFTs().updateTokensOwnershipSpam(tokenOwnershipSpamUpdatePayload,\ \ idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - put: - description: | - Update the draft and return its validation.
- **Note:** These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - operationId: updateDraft + /connections: + get: + description: Get open Web3 connections. + operationId: get 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 + - description: List order; ascending or descending. + explode: true + in: query + name: order + required: false + schema: + default: ASC + enum: + - ASC + - DESC + type: string + style: form + - description: Parsed filter object + examples: + object: + description: "" + summary: The filter object + value: + id: string + userId: string + vaultAccountId: number + connectionMethod: string + feeLevel: string + appUrl: string + appName: string + stringified: + description: |- + About stringified parsed objects: + + * Each key-value pair is separated by '=', and each pair is separated by ',' (you can use [`qs`](https://www.npmjs.com/package/qs) package for this) + summary: The stringified parsed object + value: "id=string,userId=string,vaultAccountId=number,connectionMethod=string,feeLevel=string,appUrl=string,appName=string" + explode: true + in: query + name: filter + required: false + schema: + $ref: '#/components/schemas/get_filter_parameter' + style: form + - description: Property to sort Web3 connections by. + explode: true + in: query + name: sort required: false schema: + default: createdAt + enum: + - id + - userId + - vaultAccountId + - createdAt + - feeLevel + - appUrl + - appName type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PolicyRules' - required: true + style: form + - description: Amount of results to return in the next page. + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 50 + type: number + style: form + - description: Cursor to the next page + explode: true + in: query + name: next + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DraftReviewAndValidationResponse' - description: A draft validation response object + $ref: '#/components/schemas/GetConnectionsResponse' + description: "" headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + "400": + description: Query parameters were invalid headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Update the draft with a new set of rules + "500": + description: Something went wrong + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: List all open Web3 connections. tags: - - Policy Editor (Beta) + - Web3 connections x-readme: code-samples: - - language: python - code: policy = fireblocks.update_draft() - name: Fireblocks SDK Python example - - language: javascript - code: const policy = await fireblocks.updateDraft(); - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.policyEditorBeta.updateDraft(policyEditorBetaApiUpdateDraftRequest);" + code: "const response: Promise>\ + \ = fireblocks.web3Connections.get(web3ConnectionsApiGetRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture>\ - \ response = fireblocks.policyEditorBeta().updateDraft(policyRules, idempotencyKey);" + code: "CompletableFuture> response =\ + \ fireblocks.web3Connections().get(order, filter, sort, pageSize, next);" name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /tap/publish: + /connections/wc: post: - description: | - Send publish request of set of policy rules and returns the response.
- **Note:** These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - operationId: publishPolicyRules + description: |- + Initiate a new Web3 connection. + + * Note: After this succeeds, make a request to `PUT /v1/connections/wc/{id}` (below) to approve or reject the new Web3 connection. + operationId: create 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\ @@ -9998,116 +10177,100 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PolicyRules' + $ref: '#/components/schemas/CreateConnectionRequest' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/PublishResult' - description: A policy publish result object + $ref: '#/components/schemas/CreateConnectionResponse' + description: Web3 connection initiated successfully headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + "400": + description: Invalid data sent headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Send publish request for a set of policy rules + "500": + description: Something went wrong + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Create a new Web3 connection. tags: - - Policy Editor (Beta) + - Web3 connections x-readme: code-samples: - - language: python - code: policy = fireblocks.publish_rules() - name: Fireblocks SDK Python example - - language: javascript - code: const policy = await fireblocks.publishRules(); - name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.policyEditorBeta.publishPolicyRules(policyEditorBetaApiPublishPolicyRulesRequest);" + code: "const response: Promise>\ + \ = fireblocks.web3Connections.create(web3ConnectionsApiCreateRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.policyEditorBeta().publishPolicyRules(policyRules,\ - \ idempotencyKey);" + code: "CompletableFuture> response\ + \ = fireblocks.web3Connections().create(createConnectionRequest, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /management/users: - get: - description: get console users from the current tenant - operationId: getConsoleUsers + /connections/wc/{id}: + delete: + description: Remove a Web3 connection + operationId: remove + parameters: + - description: The ID of the existing Web3 connection to remove. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetConsoleUsersResponse' - description: got console users - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Unauthorized. Missing / invalid JWT token in Authorization - header. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Lacking permissions. + description: Connection removed successfully headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Internal error. + "404": + description: Connection not found headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + "500": + description: Something went wrong headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: get console users + summary: Remove an existing Web3 connection. tags: - - Console User + - Web3 connections x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.consoleUser.getConsoleUsers();" + code: "const response: Promise> = fireblocks.web3Connections.remove(web3ConnectionsApiRemoveRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = - fireblocks.consoleUser().getConsoleUsers(); + code: CompletableFuture> response = fireblocks.web3Connections().remove(id); name: Fireblocks SDK Java example x-accepts: application/json - post: - description: creates fireblocks console user - operationId: createConsoleUser + put: + description: |- + Submit a response to *approve* or *reject* an initiated Web3 connection. + * Note: This call is used to complete your `POST /v1/connections/wc/` request. + + After this succeeds, your new Web3 connection is created and functioning. + operationId: submit parameters: + - description: The ID of the initiated Web3 connection to approve. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -10123,136 +10286,54 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateConsoleUser' + $ref: '#/components/schemas/RespondToConnectionRequest' + required: true responses: "200": - description: Users sent for creation + description: Connection submitted successfully headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' "400": - description: bad request - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Unauthorized. Missing / invalid JWT token in Authorization - header. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Lacking permissions. + description: Invalid data sent headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Internal error. + "404": + description: Connection not found headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + "500": + description: Something went wrong headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: create console user + summary: Respond to a pending Web3 connection request. tags: - - Console User + - Web3 connections x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.consoleUser.createConsoleUser(consoleUserApiCreateConsoleUserRequest);" + code: "const response: Promise> = fireblocks.web3Connections.submit(web3ConnectionsApiSubmitRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.consoleUser().createConsoleUser(createConsoleUser,\ - \ idempotencyKey);" + code: "CompletableFuture> response = fireblocks.web3Connections().submit(respondToConnectionRequest,\ + \ id, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /management/api_users: - get: - description: get api users from the current tenant - operationId: getApiUsers - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GetAPIUsersResponse' - description: got api users - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Unauthorized. Missing / invalid JWT token in Authorization - header. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Lacking permissions. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Internal error. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: get api users - tags: - - Api User - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.apiUser.getApiUsers();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = fireblocks.apiUser().getApiUsers(); - name: Fireblocks SDK Java example - x-accepts: application/json + /screening/travel_rule/transaction/validate: post: - description: creates api user - operationId: createApiUser + description: |- + Validate Travel Rule transactions. + + Checks what beneficiary VASP details are required by your jurisdiction and the beneficiary's jurisdiction. + + **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. + + To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). + operationId: validateTravelRuleTransaction 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\ @@ -10269,77 +10350,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateAPIUser' + $ref: '#/components/schemas/TravelRuleValidateTransactionRequest' + required: true responses: "200": - description: User sent for creation - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Unauthorized. Missing / invalid JWT token in Authorization - header. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "403": content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' - description: Lacking permissions. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Internal error. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: create api user + $ref: '#/components/schemas/TravelRuleValidateTransactionResponse' + description: Transaction validated successfully + "400": + description: Invalid request body + "500": + description: Internal server error + summary: Validate Travel Rule Transaction tags: - - Api User + - Travel Rule (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.apiUser.createApiUser(apiUserApiCreateApiUserRequest);" + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.validateTravelRuleTransaction(travelRuleBetaApiValidateTravelRuleTransactionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.apiUser().createApiUser(createAPIUser,\ + code: "CompletableFuture>\ + \ response = fireblocks.travelRuleBeta().validateTravelRuleTransaction(travelRuleValidateTransactionRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /management/users/{id}/reset_device: + /screening/travel_rule/transaction/validate/full: post: - description: resets device - operationId: resetDevice + description: |- + Validate Full Travel Rule transactions. + + Checks for all required information on the originator and beneficiary VASPs. + + **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. + + To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). + operationId: validateFullTravelRuleTransaction parameters: - - description: The ID of the user - explode: false - in: path - name: id - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -10351,277 +10402,168 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TravelRuleValidateFullTransactionRequest' + required: true responses: "200": - description: User sent for creation - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Unauthorized. Missing / invalid JWT token in Authorization - header. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Lacking permissions. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Internal error. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: resets device + $ref: '#/components/schemas/TravelRuleValidateTransactionResponse' + description: Transaction validated successfully + "400": + description: Invalid request body + "500": + description: Internal server error + summary: Validate Full Travel Rule Transaction tags: - - Reset device + - Travel Rule (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.resetDevice.resetDevice(resetDeviceApiResetDeviceRequest);" + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.validateFullTravelRuleTransaction(travelRuleBetaApiValidateFullTravelRuleTransactionRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.resetDevice().resetDevice(id,\ + code: "CompletableFuture>\ + \ response = fireblocks.travelRuleBeta().validateFullTravelRuleTransaction(travelRuleValidateFullTransactionRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /management/api_users/{userId}/whitelist_ip_addresses: + /screening/travel_rule/vasp/{did}: get: - description: gets ip addresses - operationId: getWhitelistIpAddresses + description: |- + Get VASP Details. + + Returns information about a VASP that has the specified DID. + + **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. + + To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). + operationId: getVASPByDID parameters: - - description: The ID of the user - explode: false + - explode: false in: path - name: userId + name: did required: true schema: type: string style: simple + - description: "CSV of fields to return (all, \"blank\" or see list of all field\ + \ names below)" + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/GetWhitelistIpAddressesResponse' - description: successfully whitelisted - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Unauthorized. Missing / invalid JWT token in Authorization - header. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Lacking permissions. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - "5XX": - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: Internal error. - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: gets ip addresses + $ref: '#/components/schemas/TravelRuleVASP' + description: Transaction validated successfully + "400": + description: Invalid request body + "500": + description: Internal server error + summary: Get VASP details tags: - - whitelist ip addresses + - Travel Rule (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.whitelistIpAddresses.getWhitelistIpAddresses(whitelistIpAddressesApiGetWhitelistIpAddressesRequest);" + code: "const response: Promise> = fireblocks.travelRuleBeta.getVASPByDID(travelRuleBetaApiGetVASPByDIDRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response - = fireblocks.whitelistIpAddresses().getWhitelistIpAddresses(userId); + code: "CompletableFuture> response = fireblocks.travelRuleBeta().getVASPByDID(did,\ + \ fields);" name: Fireblocks SDK Java example x-accepts: application/json - /smart-transfers: + /screening/travel_rule/vasp: get: - description: Finds Smart Transfer tickets that match the submitted criteria - operationId: searchTickets + description: |- + Get All VASPs. + + Returns a list of VASPs. VASPs can be searched and sorted and results are paginated. + + **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. + + To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). + operationId: getVASPs parameters: - - description: Search string - counterparty name or asset or ticketId. Optional + - description: Field to order by explode: true in: query - name: q + name: order required: false schema: - minLength: 1 type: string style: form - - description: Ticket statuses for Smart Transfer tickets. Optional - example: - - DRAFT - - OPEN - explode: true - in: query - name: statuses - required: false - schema: - default: [] - items: - enum: - - DRAFT - - PENDING_APPROVAL - - OPEN - - IN_SETTLEMENT - - FULFILLED - - EXPIRED - - CANCELED - type: string - type: array - style: form - - description: "NetworkId that is used in the ticket\t. Optional" + - description: Records per page explode: true in: query - name: networkId + name: per_page required: false schema: - type: string + type: number style: form - - description: Filter created tickets by created by self or by others. Optional + - description: Page number explode: true in: query - name: createdByMe + name: page required: false schema: - type: boolean + type: number style: form - - description: Lower bound of search range. Optional + - description: "CSV of fields to return (all, \"blank\" or see list of all field\ + \ names below)" explode: true in: query - name: expiresAfter + name: fields required: false schema: - format: date-time type: string style: form - - description: Upper bound of search range. Optional - explode: true - in: query - name: expiresBefore - required: false - schema: - format: date-time - type: string - style: form - - description: "Type of transfer. ASYNC executes transfers as they are funded,\ - \ ATOMIC executes all terms (legs) as one atomic transfer" - explode: true - in: query - name: type - required: false - schema: - enum: - - ASYNC - type: string - style: form - - description: External ref. ID that workspace can use to identify ticket outside - of Fireblocks system. - explode: true - in: query - name: externalRefId - required: false - schema: - maxLength: 64 - minLength: 1 - type: string - style: form - - description: ID of the record after which to fetch $limit records - explode: true - in: query - name: after - required: false - schema: - type: string - style: form - - description: "Number of records to fetch. By default, it is 100" - explode: true - in: query - name: limit - required: false - schema: - minimum: 1 - type: number - style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketFilteredResponse' - description: Smart Transfer tickets were returned successfully - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - summary: Find Ticket + $ref: '#/components/schemas/TravelRuleGetAllVASPsResponse' + description: Get all VASPs + summary: Get All VASPs tags: - - Smart Transfer + - Travel Rule (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.searchTickets(smartTransferApiSearchTicketsRequest);" + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.getVASPs(travelRuleBetaApiGetVASPsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture>\ - \ response = fireblocks.smartTransfer().searchTickets(q, statuses, networkId,\ - \ createdByMe, expiresAfter, expiresBefore, type, externalRefId, after,\ - \ limit);" + code: "CompletableFuture> response\ + \ = fireblocks.travelRuleBeta().getVASPs(order, perPage, page, fields);" name: Fireblocks SDK Java example x-accepts: application/json - post: - description: Creates new Smart Transfer ticket - operationId: createTicket + /screening/travel_rule/vasp/update: + put: + description: |- + Update VASP Details. + + Updates a VASP with the provided parameters. Use this endpoint to add your public jsonDIDkey generated by Notabene. + + **Note:** The reference content in this section documents the Travel Rule beta endpoint. The beta endpoint includes APIs that are currently in preview and aren't yet generally available. + + To enroll in the beta and enable this endpoint, contact your Fireblocks Customer Success Manager or send an email to [CSM@fireblocks.com](mailto:CSM@fireblocks.com). + operationId: updateVasp 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\ @@ -10638,100 +10580,118 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferCreateTicket' + $ref: '#/components/schemas/TravelRuleUpdateVASPDetails' required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Smart Transfer ticket was created successfully - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "422": + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Create Ticket + $ref: '#/components/schemas/TravelRuleUpdateVASPDetails' + description: VASP updated successfully + "400": + description: Invalid request body + "500": + description: Internal server error + summary: Add jsonDidKey to VASP details tags: - - Smart Transfer + - Travel Rule (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.createTicket(smartTransferApiCreateTicketRequest);" + code: "const response: Promise>\ + \ = fireblocks.travelRuleBeta.updateVasp(travelRuleBetaApiUpdateVaspRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().createTicket(smartTransferCreateTicket,\ + code: "CompletableFuture> response\ + \ = fireblocks.travelRuleBeta().updateVasp(travelRuleUpdateVASPDetails,\ \ idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}: + /screening/travel_rule/post_screening_policy: get: - description: Find Smart Transfer ticket by id - operationId: findTicketById - parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple + description: Get the post-screening policy for Travel Rule. + operationId: getPostScreeningPolicy + parameters: [] responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Smart Transfer ticket returned successfully - "403": + $ref: '#/components/schemas/ScreeningPolicyResponse' + description: Post-screening policy retrieved successfully. + summary: Travel Rule - View Post-Screening Policy + tags: + - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getPostScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = + fireblocks.compliance().getPostScreeningPolicy(); + name: Fireblocks SDK Java example + x-accepts: application/json + /screening/travel_rule/screening_policy: + get: + description: Get the screening policy for Travel Rule. + operationId: getScreeningPolicy + parameters: [] + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": + $ref: '#/components/schemas/ScreeningProviderRulesConfigurationResponse' + description: Screening policy retrieved successfully. + summary: Travel Rule - View Screening Policy + tags: + - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.compliance().getScreeningPolicy(); + name: Fireblocks SDK Java example + x-accepts: application/json + /screening/travel_rule/policy_configuration: + get: + description: Retrieves the configuration for Travel Rule screening policy. + operationId: getScreeningConfiguration + parameters: [] + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - summary: Search Tickets by ID + $ref: '#/components/schemas/ScreeningConfigurationsRequest' + description: Screening policy configuration retrieved successfully. + summary: Get Travel Rule Screening Policy Configuration tags: - - Smart Transfer + - Compliance Screening Configuration x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.findTicketById(smartTransferApiFindTicketByIdRequest);" + code: "const response: Promise>\ + \ = fireblocks.complianceScreeningConfiguration.getScreeningConfiguration();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response - = fireblocks.smartTransfer().findTicketById(ticketId); + code: CompletableFuture> response + = fireblocks.complianceScreeningConfiguration().getScreeningConfiguration(); name: Fireblocks SDK Java example x-accepts: application/json - /smart-transfers/{ticketId}/expires-in: put: - description: Set expiration date on Smart Transfer ticket - operationId: setTicketExpiration + description: "Updates bypass screening, inbound delay, or outbound delay configurations\ + \ for Travel Rule." + operationId: updateTravelRuleConfig parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -10743,136 +10703,58 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferSetTicketExpiration' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Successfully set expiration date on Smart Transfer ticket - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Set expiration + $ref: '#/components/schemas/ScreeningConfigurationsRequest' + description: Configuration updated successfully. + summary: Update Travel Rule Configuration tags: - - Smart Transfer + - Compliance x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.setTicketExpiration(smartTransferApiSetTicketExpirationRequest);" + code: "const response: Promise>\ + \ = fireblocks.compliance.updateTravelRuleConfig(complianceApiUpdateTravelRuleConfigRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().setTicketExpiration(smartTransferSetTicketExpiration,\ - \ ticketId, idempotencyKey);" + code: CompletableFuture> response + = fireblocks.compliance().updateTravelRuleConfig(idempotencyKey); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/external-id: - put: - description: Set external id Smart Transfer ticket - operationId: setExternalRefId - parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferSetTicketExternalId' - required: true + /screening/aml/policy_configuration: + get: + description: Retrieves the configuration for Travel Rule screening policy. + operationId: getAmlScreeningConfiguration + parameters: [] responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Successfully set external id on Smart Transfer ticket - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Add external ref. ID + $ref: '#/components/schemas/ScreeningConfigurationsRequest' + description: Screening policy configuration retrieved successfully. + summary: Get AML Screening Policy Configuration tags: - - Smart Transfer + - Compliance Screening Configuration x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.setExternalRefId(smartTransferApiSetExternalRefIdRequest);" + code: "const response: Promise>\ + \ = fireblocks.complianceScreeningConfiguration.getAmlScreeningConfiguration();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().setExternalRefId(smartTransferSetTicketExternalId,\ - \ ticketId, idempotencyKey);" + code: CompletableFuture> response + = fireblocks.complianceScreeningConfiguration().getAmlScreeningConfiguration(); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/submit: put: - description: "Submit Smart Transfer ticket - change status into ready for approval\ - \ if auto approval is not turned on, or OPEN if auto approval is on" - operationId: submitTicket + description: "Updates bypass screening, inbound delay, or outbound delay configurations\ + \ for AML." + operationId: updateAmlScreeningConfiguration parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -10884,66 +10766,84 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferSubmitTicket' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Successfully submitted Smart Transfer ticket - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": + $ref: '#/components/schemas/ScreeningConfigurationsRequest' + description: Configuration updated successfully. + summary: Update AML Configuration + tags: + - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.updateAmlScreeningConfiguration(complianceApiUpdateAmlScreeningConfigurationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.compliance().updateAmlScreeningConfiguration(idempotencyKey); + name: Fireblocks SDK Java example + x-accepts: application/json + /screening/aml/screening_policy: + get: + description: Get the screening policy for AML. + operationId: getAmlScreeningPolicy + parameters: [] + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": + $ref: '#/components/schemas/ScreeningProviderRulesConfigurationResponse' + description: Screening policy retrieved successfully. + summary: AML - View Screening Policy + tags: + - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.getAmlScreeningPolicy();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.compliance().getAmlScreeningPolicy(); + name: Fireblocks SDK Java example + x-accepts: application/json + /screening/aml/post_screening_policy: + get: + description: Get the post-screening policy for AML. + operationId: getAmlPostScreeningPolicy + parameters: [] + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Submit ticket + $ref: '#/components/schemas/ScreeningPolicyResponse' + description: Post-screening policy retrieved successfully. + summary: AML - View Post-Screening Policy tags: - - Smart Transfer + - Compliance x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.submitTicket(smartTransferApiSubmitTicketRequest);" + code: "const response: Promise>\ + \ = fireblocks.compliance.getAmlPostScreeningPolicy();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().submitTicket(smartTransferSubmitTicket,\ - \ ticketId, idempotencyKey);" + code: CompletableFuture> response = + fireblocks.compliance().getAmlPostScreeningPolicy(); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/fulfill: + /screening/configurations: put: - description: "Manually fulfill ticket, in case when all terms (legs) are funded\ - \ manually" - operationId: fulfillTicket + description: Update tenant screening configuration. + operationId: updateScreeningConfiguration parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -10960,52 +10860,52 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Successfully fulfilled on Smart Transfer ticket - "403": + $ref: '#/components/schemas/ScreeningUpdateConfigurationsRequest' + description: Tenant Screening configuration updated successfully. + summary: Tenant - Screening Configuration + tags: + - Compliance + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.compliance.updateScreeningConfiguration(complianceApiUpdateScreeningConfigurationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> + response = fireblocks.compliance().updateScreeningConfiguration(idempotencyKey); + name: Fireblocks SDK Java example + x-accepts: application/json + /management/ota: + get: + description: Returns current OTA status + operationId: getOtaStatus + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized + $ref: '#/components/schemas/GetOtaStatusResponse' + description: Current OTA status "404": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Fund ticket manually + description: Configuration not found for tenant + summary: Returns current OTA status tags: - - Smart Transfer + - OTA (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + code: "const response: Promise>\ + \ = fireblocks.oTABeta.getOtaStatus();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" + code: CompletableFuture> response = fireblocks.oTABeta().getOtaStatus(); name: Fireblocks SDK Java example x-accepts: application/json - /smart-transfers/{ticketId}/cancel: put: - description: Cancel Smart Transfer ticket - operationId: cancelTicket + description: Enable or disable transactions to OTA + operationId: setOtaStatus parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -11017,226 +10917,169 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetOtaStatusRequest' + required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferTicketResponse' - description: Smart Transfer ticket successfully canceled - "403": + "202": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Cancel Ticket + $ref: '#/components/schemas/SetOtaStatusResponse' + description: Successfully updated OTA status + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "400": + description: Bad request + "409": + description: Similar request already pending + "500": + description: Internal server error + summary: Enable or disable transactions to OTA tags: - - Smart Transfer + - OTA (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.cancelTicket(smartTransferApiCancelTicketRequest);" + code: "const response: Promise>\ + \ = fireblocks.oTABeta.setOtaStatus(oTABetaApiSetOtaStatusRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().cancelTicket(ticketId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.oTABeta().setOtaStatus(setOtaStatusRequest,\ + \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/terms: - post: - description: Creates new smart transfer ticket term (when the ticket status - is DRAFT) - operationId: createTicketTerm - parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferCreateTicketTerm' - required: true + /management/workspace_status: + get: + description: Returns current workspace status + operationId: getWorkspaceStatus responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferTicketTermResponse' - description: Smart Transfer ticket term was created successfully - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "422": + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Create leg (term) + $ref: '#/components/schemas/GetWorkspaceStatusResponse' + description: Current workspace status + "404": + description: Workspace not found + summary: Returns current workspace status tags: - - Smart Transfer + - Workspace Status (Beta) x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.createTicketTerm(smartTransferApiCreateTicketTermRequest);" + code: "const response: Promise>\ + \ = fireblocks.workspaceStatusBeta.getWorkspaceStatus();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().createTicketTerm(smartTransferCreateTicketTerm,\ - \ ticketId, idempotencyKey);" + code: CompletableFuture> response + = fireblocks.workspaceStatusBeta().getWorkspaceStatus(); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/terms/{termId}: - delete: - description: Delete ticket term when ticket is in DRAFT status - operationId: removeTicketTerm - parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: termId - required: true - schema: - type: string - style: simple + /tap/active_policy: + get: + description: | + Returns the active policy and its validation.
+ **Note:** These endpoints are currently in beta and might be subject to changes. + If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + operationId: getActivePolicy responses: - "204": - description: Smart Transfer ticket term successfully removed - "403": + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": + $ref: '#/components/schemas/PolicyAndValidationResponse' + description: A policy object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - summary: Delete ticket leg (term) + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get the active policy and its validation tags: - - Smart Transfer + - Policy Editor (Beta) x-readme: code-samples: + - language: python + code: policy = fireblocks.get_active_policy() + name: Fireblocks SDK Python example + - language: javascript + code: const policy = await fireblocks.getActivePolicy(); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> = fireblocks.smartTransfer.removeTicketTerm(smartTransferApiRemoveTicketTermRequest);" + code: "const response: Promise>\ + \ = fireblocks.policyEditorBeta.getActivePolicy();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.smartTransfer().removeTicketTerm(ticketId,\ - \ termId);" + code: CompletableFuture> response + = fireblocks.policyEditorBeta().getActivePolicy(); name: Fireblocks SDK Java example x-accepts: application/json + /tap/draft: get: - description: Find Smart Transfer ticket term by id - operationId: findTicketTermById - parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: termId - required: true - schema: - type: string - style: simple + description: | + Returns the active draft and its validation.
+ **Note:** These endpoints are currently in beta and might be subject to changes. + If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + operationId: getDraft responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketTermResponse' - description: Smart Transfer ticket term returned successfully - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": + $ref: '#/components/schemas/DraftReviewAndValidationResponse' + description: A draft validation response object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - summary: Search ticket by leg (term) ID + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get the active draft tags: - - Smart Transfer + - Policy Editor (Beta) x-readme: code-samples: + - language: python + code: policy = fireblocks.get_draft() + name: Fireblocks SDK Python example + - language: javascript + code: const policy = await fireblocks.getDraft(); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.findTicketTermById(smartTransferApiFindTicketTermByIdRequest);" + code: "const response: Promise>\ + \ = fireblocks.policyEditorBeta.getDraft();" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().findTicketTermById(ticketId, termId);" + code: CompletableFuture> response + = fireblocks.policyEditorBeta().getDraft(); name: Fireblocks SDK Java example x-accepts: application/json - put: - description: Update ticket term (when ticket status is DRAFT) - operationId: updateTicketTerm + post: + description: | + Send publish request of certain draft id and returns the response.
+ **Note:** These endpoints are currently in beta and might be subject to changes. + If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + operationId: publishDraft parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: termId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -11252,63 +11095,54 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferUpdateTicketTerm' + $ref: '#/components/schemas/PublishDraftRequest' required: true responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferTicketTermResponse' - description: Smart Transfer ticket term updated successfully - "403": + "201": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": + $ref: '#/components/schemas/PublishResult' + description: A policy publish result object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - summary: Update ticket leg (term) + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Send publish request for a certain draft id tags: - - Smart Transfer + - Policy Editor (Beta) x-readme: code-samples: + - language: python + code: policy = fireblocks.publish_draft() + name: Fireblocks SDK Python example + - language: javascript + code: const policy = await fireblocks.publishDraft(); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.updateTicketTerm(smartTransferApiUpdateTicketTermRequest);" + code: "const response: Promise> = fireblocks.policyEditorBeta.publishDraft(policyEditorBetaApiPublishDraftRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().updateTicketTerm(smartTransferUpdateTicketTerm,\ - \ ticketId, termId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.policyEditorBeta().publishDraft(publishDraftRequest,\ + \ idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/terms/{termId}/fund: put: - description: "Set funding source for ticket term (in case of ASYNC tickets,\ - \ this will execute transfer immediately)" - operationId: fundTicketTerm + description: | + Update the draft and return its validation.
+ **Note:** These endpoints are currently in beta and might be subject to changes. + If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + operationId: updateDraft parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: termId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -11324,68 +11158,56 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferFundTerm' + $ref: '#/components/schemas/PolicyRules' required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferTicketTermResponse' - description: Funding source for ticket term successfully done - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": + "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": + $ref: '#/components/schemas/DraftReviewAndValidationResponse' + description: A draft validation response object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Define funding source + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Update the draft with a new set of rules tags: - - Smart Transfer + - Policy Editor (Beta) x-readme: code-samples: + - language: python + code: policy = fireblocks.update_draft() + name: Fireblocks SDK Python example + - language: javascript + code: const policy = await fireblocks.updateDraft(); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.fundTicketTerm(smartTransferApiFundTicketTermRequest);" + code: "const response: Promise>\ + \ = fireblocks.policyEditorBeta.updateDraft(policyEditorBetaApiUpdateDraftRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().fundTicketTerm(smartTransferFundTerm, ticketId,\ - \ termId, idempotencyKey);" + code: "CompletableFuture>\ + \ response = fireblocks.policyEditorBeta().updateDraft(policyRules, idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /smart-transfers/{ticketId}/terms/{termId}/manually-fund: - put: - description: Manually set ticket term transaction - operationId: manuallyFundTicketTerm + /tap/publish: + post: + description: | + Send publish request of set of policy rules and returns the response.
+ **Note:** These endpoints are currently in beta and might be subject to changes. + If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + operationId: publishPolicyRules parameters: - - explode: false - in: path - name: ticketId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: termId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -11401,90 +11223,121 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferManuallyFundTerm' + $ref: '#/components/schemas/PolicyRules' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferTicketTermResponse' - description: Successfully manually set ticket term transaction - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferNotFoundResponse' - description: Not found - "422": + $ref: '#/components/schemas/PublishResult' + description: A policy publish result object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Manually add term transaction + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Send publish request for a set of policy rules tags: - - Smart Transfer + - Policy Editor (Beta) x-readme: code-samples: + - language: python + code: policy = fireblocks.publish_rules() + name: Fireblocks SDK Python example + - language: javascript + code: const policy = await fireblocks.publishRules(); + name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.manuallyFundTicketTerm(smartTransferApiManuallyFundTicketTermRequest);" + code: "const response: Promise> = fireblocks.policyEditorBeta.publishPolicyRules(policyEditorBetaApiPublishPolicyRulesRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().manuallyFundTicketTerm(smartTransferManuallyFundTerm,\ - \ ticketId, termId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.policyEditorBeta().publishPolicyRules(policyRules,\ + \ idempotencyKey);" name: Fireblocks SDK Java example x-content-type: application/json x-accepts: application/json - /smart-transfers/settings/user-groups: + /management/users: get: - description: Get Smart Transfer user groups - operationId: getSmartTransferUserGroups - parameters: [] + description: Get console users for your tenant + operationId: getConsoleUsers responses: "200": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferUserGroupsResponse' - description: User group settings were returned successfully + $ref: '#/components/schemas/GetConsoleUsersResponse' + description: got console users + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' "403": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "422": + $ref: '#/components/schemas/ErrorResponse' + description: Lacking permissions. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "5XX": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Get user group + $ref: '#/components/schemas/ErrorResponse' + description: Internal error. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get console users tags: - - Smart Transfer + - Console User x-readme: code-samples: + - language: javascript + code: const consoleUsers = await fireblocks.getConsoleUsers(); + name: Fireblocks SDK Javascript example + - language: python + code: consoleUsers = fireblocks.get_console_users() + name: Fireblocks SDK Python example - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.getSmartTransferUserGroups();" + code: "const response: Promise>\ + \ = fireblocks.consoleUser.getConsoleUsers();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response - = fireblocks.smartTransfer().getSmartTransferUserGroups(); + code: CompletableFuture> response = + fireblocks.consoleUser().getConsoleUsers(); name: Fireblocks SDK Java example x-accepts: application/json post: - description: Set Smart Transfer user group - operationId: setUserGroups + description: Creates console user in your tenant + operationId: createConsoleUser 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\ @@ -11501,72 +11354,43 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SmartTransferSetUserGroups' - required: true + $ref: '#/components/schemas/CreateConsoleUser' responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/SmartTransferUserGroupsResponse' - description: User group settings were set successfully - "403": + "200": + description: User creation approval request has been sent + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "400": + description: bad request + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "401": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferForbiddenResponse' - description: Unauthorized - "422": + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "403": content: application/json: schema: - $ref: '#/components/schemas/SmartTransferBadRequestResponse' - description: Bad Request - summary: Set user group - tags: - - Smart Transfer - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.smartTransfer.setUserGroups(smartTransferApiSetUserGroupsRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response\ - \ = fireblocks.smartTransfer().setUserGroups(smartTransferSetUserGroups,\ - \ idempotencyKey);" - name: Fireblocks SDK Java example - x-content-type: application/json - x-accepts: application/json - /batch/jobs: - get: - description: "Get an array of objects including all active, paused, canceled,\ - \ and complete jobs in a workspace." - operationId: getJobs - parameters: - - description: Start of time range in ms since 1970 - explode: true - in: query - name: fromTime - required: false - schema: - type: integer - style: form - - description: End of time range in ms since 1970 - explode: true - in: query - name: toTime - required: false - schema: - type: integer - style: form - responses: - "200": + $ref: '#/components/schemas/ErrorResponse' + description: Lacking permissions. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "5XX": content: application/json: schema: - $ref: '#/components/schemas/Jobs' - description: An array of jobs + $ref: '#/components/schemas/ErrorResponse' + description: Internal error. headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -11579,39 +11403,67 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return a list of jobs belonging to tenant + summary: Create console user tags: - - Job Management + - Console User x-readme: code-samples: + - language: javascript + code: "const res = await fireblocks.createConsoleUser(firstName, lastName,\ + \ email, role);" + name: Fireblocks SDK Javascript example + - language: python + code: "res = fireblocks.create_console_user(first_name, last_name, email,\ + \ role)" + name: Fireblocks SDK Python example - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.getJobs(jobManagementApiGetJobsRequest);" + code: "const response: Promise> = fireblocks.consoleUser.createConsoleUser(consoleUserApiCreateConsoleUserRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.jobManagement().getJobs(fromTime,\ - \ toTime);" + code: "CompletableFuture> response = fireblocks.consoleUser().createConsoleUser(createConsoleUser,\ + \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /batch/{jobId}: + /management/api_users: get: - description: Get an object describing the given job - operationId: getJob - parameters: - - description: The requested job id - explode: false - in: path - name: jobId - required: true - schema: - type: string - style: simple + description: Get Api users of your tenant + operationId: getApiUsers responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Job' - description: A JSON object that describes the job + $ref: '#/components/schemas/GetAPIUsersResponse' + description: got api users + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Lacking permissions. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error. headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -11624,32 +11476,29 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Get job details + summary: Get Api users tags: - - Job Management + - Api User x-readme: code-samples: + - language: javascript + code: const apiUsers = await fireblocks.getApiUsers(); + name: Fireblocks SDK Javascript example + - language: python + code: apiUsers = fireblocks.get_api_users() + name: Fireblocks SDK Python example - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.getJob(jobManagementApiGetJobRequest);" + code: "const response: Promise>\ + \ = fireblocks.apiUser.getApiUsers();" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.jobManagement().getJob(jobId); + code: CompletableFuture> response = fireblocks.apiUser().getApiUsers(); name: Fireblocks SDK Java example x-accepts: application/json - /batch/{jobId}/pause: post: - description: "Pause the given job, after the current task is done. A paused\ - \ job can later be resumed by calling ‘continue’, or canceled." - operationId: pauseJob + description: Creates Api user in your tenant + operationId: createApiUser parameters: - - description: The requested job id - explode: false - in: path - name: jobId - required: true - schema: - type: string - style: simple - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ \ same response as the first request. The idempotency key is valid for 24\ @@ -11661,9 +11510,50 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAPIUser' responses: "200": - description: paused successfully + description: User creation approval request has been sent + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "400": + description: bad request + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Lacking permissions. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' default: content: application/json: @@ -11673,28 +11563,38 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Pause a job + summary: Create Api user tags: - - Job Management + - Api User x-readme: code-samples: + - language: javascript + code: "const res = await fireblocks.createApiUser(name, role, csrForNewUser,\ + \ coSignerType, isFirstUser);" + name: Fireblocks SDK Javascript example + - language: python + code: "res = fireblocks.create_api_user(name, role, csr_pem, co_signer_setup,\ + \ co_signer_setup_is_first_user)" + name: Fireblocks SDK Python example - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.pauseJob(jobManagementApiPauseJobRequest);" + code: "const response: Promise> = fireblocks.apiUser.createApiUser(apiUserApiCreateApiUserRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.jobManagement().pauseJob(jobId,\ + code: "CompletableFuture> response = fireblocks.apiUser().createApiUser(createAPIUser,\ \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /batch/{jobId}/continue: + /management/users/{id}/reset_device: post: - description: Continue the given paused job. - operationId: continueJob + description: "Resets mobile device for given console user, that user will need\ + \ to do mobile onboarding again." + operationId: resetDevice parameters: - - description: The requested job id + - description: The ID of the console user explode: false in: path - name: jobId + name: id required: true schema: type: string @@ -11712,7 +11612,38 @@ paths: style: simple responses: "200": - description: continued successfully + description: Reset device approval request has been sent + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Lacking permissions. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' default: content: application/json: @@ -11722,90 +11653,73 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Continue a paused job + summary: Resets device tags: - - Job Management + - Reset device x-readme: code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.continueJob(jobManagementApiContinueJobRequest);" - name: Fireblocks SDK TypeScript example + - language: javascript + code: const res = await fireblocks.resetDeviceRequest(consoleUserId); + name: Fireblocks SDK Javascript example + - language: python + code: res = fireblocks.reset_device_request(console_user_id) + name: Fireblocks SDK Python example + - language: typescript + code: "const response: Promise> = fireblocks.resetDevice.resetDevice(resetDeviceApiResetDeviceRequest);" + name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.jobManagement().continueJob(jobId,\ + code: "CompletableFuture> response = fireblocks.resetDevice().resetDevice(id,\ \ idempotencyKey);" name: Fireblocks SDK Java example x-accepts: application/json - /batch/{jobId}/cancel: - post: - description: "Stop the given job immediately. If the job is in the ‘Active’\ - \ state, the job will be canceled after completing the current task. Vault\ - \ accounts and Wallets that are already created will not be affected." - operationId: cancelJob + /management/api_users/{userId}/whitelist_ip_addresses: + get: + description: Gets whitelisted ip addresses for given Api user. + operationId: getWhitelistIpAddresses parameters: - - description: The requested job id + - description: The ID of the api user explode: false in: path - name: jobId + name: userId required: true schema: type: string style: simple - - description: "A unique identifier for the request. If the request is sent\ - \ multiple times with the same idempotency key, the server will return the\ - \ same response as the first request. The idempotency key is valid for 24\ - \ hours." - explode: false - in: header - name: Idempotency-Key - required: false - schema: - type: string - style: simple responses: "200": - description: canceled successfully - default: content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response + $ref: '#/components/schemas/GetWhitelistIpAddressesResponse' + description: successfully got whitelisted ip addresses headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Cancel a running job - tags: - - Job Management - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.cancelJob(jobManagementApiCancelJobRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response = fireblocks.jobManagement().cancelJob(jobId,\ - \ idempotencyKey);" - name: Fireblocks SDK Java example - x-accepts: application/json - /batch/{jobId}/tasks: - get: - description: Return a list of tasks for given job - operationId: getJobTasks - parameters: - - description: The requested job id - explode: false - in: path - name: jobId - required: true - schema: - type: string - style: simple - responses: - "200": + "401": content: application/json: schema: - $ref: '#/components/schemas/Tasks' - description: An array of tasks + $ref: '#/components/schemas/ErrorResponse' + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Lacking permissions. + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "5XX": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Internal error. headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' @@ -11818,55 +11732,132 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: Return a list of tasks for given job + summary: Gets whitelisted ip addresses tags: - - Job Management + - whitelist ip addresses x-readme: code-samples: + - language: javascript + code: const whitelistedAddresses = await fireblocks.getWhitelistedAddresses(apiUserId); + name: Fireblocks SDK Javascript example + - language: python + code: whitelisted_addresses = fireblocks.get_whitelisted_ip_addresses(api_user_id) + name: Fireblocks SDK Python example - language: typescript - code: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + code: "const response: Promise>\ + \ = fireblocks.whitelistIpAddresses.getWhitelistIpAddresses(whitelistIpAddressesApiGetWhitelistIpAddressesRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.jobManagement().getJobTasks(jobId); + code: CompletableFuture> response + = fireblocks.whitelistIpAddresses().getWhitelistIpAddresses(userId); name: Fireblocks SDK Java example x-accepts: application/json - /cosigners: + /smart-transfers: get: - description: | - Get all workspace cosigners (paginated) - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getCosigners + description: Finds Smart Transfer tickets that match the submitted criteria + operationId: searchTickets parameters: - - description: ASC / DESC ordering (default DESC) - example: ASC + - description: Search string - counterparty name or asset or ticketId. Optional explode: true in: query - name: order + name: q + required: false + schema: + minLength: 1 + type: string + style: form + - description: Ticket statuses for Smart Transfer tickets. Optional + example: + - DRAFT + - OPEN + explode: true + in: query + name: statuses + required: false + schema: + default: [] + items: + enum: + - DRAFT + - PENDING_APPROVAL + - OPEN + - IN_SETTLEMENT + - FULFILLED + - EXPIRED + - CANCELED + type: string + type: array + style: form + - description: "NetworkId that is used in the ticket\t. Optional" + explode: true + in: query + name: networkId + required: false + schema: + type: string + style: form + - description: Filter created tickets by created by self or by others. Optional + explode: true + in: query + name: createdByMe + required: false + schema: + type: boolean + style: form + - description: Lower bound of search range. Optional + explode: true + in: query + name: expiresAfter + required: false + schema: + format: date-time + type: string + style: form + - description: Upper bound of search range. Optional + explode: true + in: query + name: expiresBefore + required: false + schema: + format: date-time + type: string + style: form + - description: "Type of transfer. ASYNC executes transfers as they are funded,\ + \ ATOMIC executes all terms (legs) as one atomic transfer" + explode: true + in: query + name: type required: false schema: - default: DESC enum: - - ASC - - DESC + - ASYNC type: string style: form - - description: Cursor of the required page + - description: External ref. ID that workspace can use to identify ticket outside + of Fireblocks system. explode: true in: query - name: pageCursor + name: externalRefId required: false schema: + maxLength: 64 + minLength: 1 type: string style: form - - description: Maximum number of items in the page - example: 10 + - description: ID of the record after which to fetch $limit records explode: true in: query - name: pageSize + name: after + required: false + schema: + type: string + style: form + - description: "Number of records to fetch. By default, it is 100" + explode: true + in: query + name: limit required: false schema: - default: 10 - maximum: 100 minimum: 1 type: number style: form @@ -11875,422 +11866,1702 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CosignersPaginatedResponse' - description: A paginated response containing Cosigner objects - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/SmartTransferTicketFilteredResponse' + description: Smart Transfer tickets were returned successfully + "403": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get all cosigners + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + summary: Find Ticket tags: - - Cosigners (Beta) + - Smart Transfer x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.searchTickets(smartTransferApiSearchTicketsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + code: "CompletableFuture>\ + \ response = fireblocks.smartTransfer().searchTickets(q, statuses, networkId,\ + \ createdByMe, expiresAfter, expiresBefore, type, externalRefId, after,\ + \ limit);" name: Fireblocks SDK Java example x-accepts: application/json - /cosigners/{cosignerId}: - get: - description: | - Get a cosigner by ID - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getCosigner + post: + description: Creates new Smart Transfer ticket + operationId: createTicket parameters: - - description: The unique identifier of the cosigner - example: 44fcead0-7053-4831-a53a-df7fb90d440f + - 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: path - name: cosignerId - required: true - schema: - format: uuid + in: header + name: Idempotency-Key + required: false + schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferCreateTicket' + required: true responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/Cosigner' - description: A cosigner object - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Smart Transfer ticket was created successfully + "403": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get cosigner + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Create Ticket tags: - - Cosigners (Beta) + - Smart Transfer x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.createTicket(smartTransferApiCreateTicketRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().createTicket(smartTransferCreateTicket,\ + \ idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - patch: - description: | - Rename a cosigner by ID - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: renameCosigner + /smart-transfers/{ticketId}: + get: + description: Find Smart Transfer ticket by id + operationId: findTicketById parameters: - - description: The unique identifier of the cosigner - example: 44fcead0-7053-4831-a53a-df7fb90d440f - explode: false + - explode: false in: path - name: cosignerId + name: ticketId required: true schema: - format: uuid type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RenameCosigner' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Cosigner' - description: A cosigner object - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Smart Transfer ticket returned successfully + "403": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Rename cosigner + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + summary: Search Tickets by ID tags: - - Cosigners (Beta) + - Smart Transfer x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.findTicketById(smartTransferApiFindTicketByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ - \ cosignerId);" + code: CompletableFuture> response + = fireblocks.smartTransfer().findTicketById(ticketId); name: Fireblocks SDK Java example - x-content-type: application/json x-accepts: application/json - /cosigners/{cosignerId}/api_keys: - get: - description: | - Get all cosigner paired API keys (paginated) - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getApiKeys + /smart-transfers/{ticketId}/expires-in: + put: + description: Set expiration date on Smart Transfer ticket + operationId: setTicketExpiration parameters: - - description: The unique identifier of the cosigner - example: 44fcead0-7053-4831-a53a-df7fb90d440f - explode: false + - explode: false in: path - name: cosignerId + name: ticketId required: true schema: - format: uuid type: string style: simple - - description: ASC / DESC ordering (default DESC) - example: ASC - explode: true - in: query - name: order - required: false - schema: - default: DESC - enum: - - ASC - - DESC - type: string - style: form - - description: Cursor of the required page - explode: true - in: query - name: pageCursor + - 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: form - - description: Maximum number of items in the page - example: 10 - explode: true - in: query - name: pageSize - required: false - schema: - default: 10 - maximum: 100 - minimum: 1 - type: number - style: form + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferSetTicketExpiration' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ApiKeysPaginatedResponse' - description: A paginated response containing ApiKey objects - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Successfully set expiration date on Smart Transfer ticket + "403": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get all API keys + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Set expiration tags: - - Cosigners (Beta) + - Smart Transfer x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.setTicketExpiration(smartTransferApiSetTicketExpirationRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ - \ pageSize);" + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().setTicketExpiration(smartTransferSetTicketExpiration,\ + \ ticketId, idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json - /cosigners/{cosignerId}/api_keys/{apiKeyId}: - get: - description: | - Get an API key by ID - **Note:** These endpoints are currently in beta and might be subject to changes. - operationId: getApiKey + /smart-transfers/{ticketId}/external-id: + put: + description: Set external id Smart Transfer ticket + operationId: setExternalRefId parameters: - - description: The unique identifier of the cosigner - example: 44fcead0-7053-4831-a53a-df7fb90d440f - explode: false + - explode: false in: path - name: cosignerId + name: ticketId required: true schema: - format: uuid type: string style: simple - - description: The unique identifier of the API key - example: 44fcead0-7053-4831-a53a-df7fb90d440f + - 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: path - name: apiKeyId - required: true + in: header + name: Idempotency-Key + required: false schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferSetTicketExternalId' + required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ApiKey' - description: An ApiKey object - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - default: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Successfully set external id on Smart Transfer ticket + "403": content: application/json: schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - summary: Get API key + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Add external ref. ID tags: - - Cosigners (Beta) + - Smart Transfer x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.setExternalRefId(smartTransferApiSetExternalRefIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ - \ apiKeyId);" + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().setExternalRefId(smartTransferSetTicketExternalId,\ + \ ticketId, idempotencyKey);" name: Fireblocks SDK Java example + x-content-type: application/json x-accepts: application/json -components: - headers: - X-Request-ID: - description: Unique ID correlated to the API request. Please provide it in any - support ticket you create or on Github issues related to Fireblocks SDKs - explode: false - schema: - type: string - style: simple - next-page: - description: URL representing a new request to this API endpoint to receive - the next page of results. - explode: false - schema: - type: string - style: simple - prev-page: - description: URL representing a new request to this API endpoint to receive - the previous page of results. - explode: false - schema: - type: string - style: simple - parameters: - X-Idempotency-Key: - 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 - X-End-User-Wallet-Id: - description: Unique ID of the End-User wallet to the API request. Required for - end-user wallet operations. - explode: false - in: header - name: X-End-User-Wallet-Id - required: false - schema: - format: uuid - type: string - style: simple - responses: - Error: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorSchema' - description: Error Response - headers: - X-Request-ID: - $ref: '#/components/headers/X-Request-ID' - schemas: - ErrorSchema: - example: - code: 6.027456183070403 - message: message - properties: - message: - type: string - code: - type: number - type: object - RewardsInfo: - example: - pendingRewards: pendingRewards - properties: - pendingRewards: - description: Amount that is pending for rewards - type: string - type: object - VaultAsset: - example: - totalStakedCPU: 0.8008281904610115 - blockHash: blockHash - pendingRefundNetwork: pendingRefundNetwork - lockedAmount: lockedAmount - pending: pending - staked: staked - rewardsInfo: - pendingRewards: pendingRewards - available: available - frozen: frozen - selfStakedCPU: selfStakedCPU - totalStakedNetwork: totalStakedNetwork - total: total - balance: balance - blockHeight: blockHeight - selfStakedNetwork: selfStakedNetwork - pendingRefundCPU: pendingRefundCPU - id: id - properties: - id: - type: string - total: - description: "The total wallet balance. In EOS this value includes the network\ - \ balance, self staking and pending refund. For all other coins it is\ - \ the balance as it appears on the blockchain." - type: string - balance: - deprecated: true - description: Deprecated - replaced by "total" - type: string - available: - description: Funds available for transfer. Equals the blockchain balance - minus any locked amounts - type: string - pending: - description: The cumulative balance of all transactions pending to be cleared - type: string - frozen: - description: The cumulative frozen balance - type: string - lockedAmount: - description: Funds in outgoing transactions that are not yet published to - the network - type: string - staked: - description: Staked balance - type: string - totalStakedCPU: - description: Deprecated - type: number - totalStakedNetwork: - description: Deprecated - type: string - selfStakedCPU: - description: Deprecated - type: string - selfStakedNetwork: - description: Deprecated + /smart-transfers/{ticketId}/submit: + put: + description: "Submit Smart Transfer ticket - change status into ready for approval\ + \ if auto approval is not turned on, or OPEN if auto approval is on" + operationId: submitTicket + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: type: string - pendingRefundCPU: - description: Deprecated + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: type: string - pendingRefundNetwork: - description: Deprecated + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferSubmitTicket' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Successfully submitted Smart Transfer ticket + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Submit ticket + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.submitTicket(smartTransferApiSubmitTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().submitTicket(smartTransferSubmitTicket,\ + \ ticketId, idempotencyKey);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /smart-transfers/{ticketId}/fulfill: + put: + description: "Manually fulfill ticket, in case when all terms (legs) are funded\ + \ manually" + operationId: fulfillTicket + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: type: string - blockHeight: + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Successfully fulfilled on Smart Transfer ticket + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Fund ticket manually + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.fulfillTicket(smartTransferApiFulfillTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().fulfillTicket(ticketId, idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /smart-transfers/{ticketId}/cancel: + put: + description: Cancel Smart Transfer ticket + operationId: cancelTicket + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketResponse' + description: Smart Transfer ticket successfully canceled + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Cancel Ticket + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.cancelTicket(smartTransferApiCancelTicketRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().cancelTicket(ticketId, idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /smart-transfers/{ticketId}/terms: + post: + description: Creates new smart transfer ticket term (when the ticket status + is DRAFT) + operationId: createTicketTerm + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferCreateTicketTerm' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketTermResponse' + description: Smart Transfer ticket term was created successfully + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Create leg (term) + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.createTicketTerm(smartTransferApiCreateTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().createTicketTerm(smartTransferCreateTicketTerm,\ + \ ticketId, idempotencyKey);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /smart-transfers/{ticketId}/terms/{termId}: + delete: + description: Delete ticket term when ticket is in DRAFT status + operationId: removeTicketTerm + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: termId + required: true + schema: + type: string + style: simple + responses: + "204": + description: Smart Transfer ticket term successfully removed + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + summary: Delete ticket leg (term) + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.smartTransfer.removeTicketTerm(smartTransferApiRemoveTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.smartTransfer().removeTicketTerm(ticketId,\ + \ termId);" + name: Fireblocks SDK Java example + x-accepts: application/json + get: + description: Find Smart Transfer ticket term by id + operationId: findTicketTermById + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: termId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketTermResponse' + description: Smart Transfer ticket term returned successfully + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + summary: Search ticket by leg (term) ID + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.findTicketTermById(smartTransferApiFindTicketTermByIdRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().findTicketTermById(ticketId, termId);" + name: Fireblocks SDK Java example + x-accepts: application/json + put: + description: Update ticket term (when ticket status is DRAFT) + operationId: updateTicketTerm + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: termId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferUpdateTicketTerm' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketTermResponse' + description: Smart Transfer ticket term updated successfully + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + summary: Update ticket leg (term) + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.updateTicketTerm(smartTransferApiUpdateTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().updateTicketTerm(smartTransferUpdateTicketTerm,\ + \ ticketId, termId, idempotencyKey);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /smart-transfers/{ticketId}/terms/{termId}/fund: + put: + description: "Set funding source for ticket term (in case of ASYNC tickets,\ + \ this will execute transfer immediately)" + operationId: fundTicketTerm + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: termId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferFundTerm' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketTermResponse' + description: Funding source for ticket term successfully done + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Define funding source + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.fundTicketTerm(smartTransferApiFundTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().fundTicketTerm(smartTransferFundTerm, ticketId,\ + \ termId, idempotencyKey);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /smart-transfers/{ticketId}/terms/{termId}/manually-fund: + put: + description: Manually set ticket term transaction + operationId: manuallyFundTicketTerm + parameters: + - explode: false + in: path + name: ticketId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: termId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferManuallyFundTerm' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferTicketTermResponse' + description: Successfully manually set ticket term transaction + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferNotFoundResponse' + description: Not found + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Manually add term transaction + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.manuallyFundTicketTerm(smartTransferApiManuallyFundTicketTermRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().manuallyFundTicketTerm(smartTransferManuallyFundTerm,\ + \ ticketId, termId, idempotencyKey);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /smart-transfers/settings/user-groups: + get: + description: Get Smart Transfer user groups + operationId: getSmartTransferUserGroups + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferUserGroupsResponse' + description: User group settings were returned successfully + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Get user group + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.getSmartTransferUserGroups();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.smartTransfer().getSmartTransferUserGroups(); + name: Fireblocks SDK Java example + x-accepts: application/json + post: + description: Set Smart Transfer user group + operationId: setUserGroups + 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/SmartTransferSetUserGroups' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferUserGroupsResponse' + description: User group settings were set successfully + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferForbiddenResponse' + description: Unauthorized + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/SmartTransferBadRequestResponse' + description: Bad Request + summary: Set user group + tags: + - Smart Transfer + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.smartTransfer.setUserGroups(smartTransferApiSetUserGroupsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.smartTransfer().setUserGroups(smartTransferSetUserGroups,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /batch/jobs: + get: + description: "Get an array of objects including all active, paused, canceled,\ + \ and complete jobs in a workspace." + operationId: getJobs + parameters: + - description: Start of time range in ms since 1970 + explode: true + in: query + name: fromTime + required: false + schema: + type: integer + style: form + - description: End of time range in ms since 1970 + explode: true + in: query + name: toTime + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Jobs' + description: An array of jobs + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return a list of jobs belonging to tenant + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJobs(jobManagementApiGetJobsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>> response = fireblocks.jobManagement().getJobs(fromTime,\ + \ toTime);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}: + get: + description: Get an object describing the given job + operationId: getJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Job' + description: A JSON object that describes the job + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get job details + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJob(jobManagementApiGetJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.jobManagement().getJob(jobId); + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/pause: + post: + description: "Pause the given job, after the current task is done. A paused\ + \ job can later be resumed by calling ‘continue’, or canceled." + operationId: pauseJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + description: paused successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Pause a job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.pauseJob(jobManagementApiPauseJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().pauseJob(jobId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/continue: + post: + description: Continue the given paused job. + operationId: continueJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + description: continued successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Continue a paused job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.continueJob(jobManagementApiContinueJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().continueJob(jobId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/cancel: + post: + description: "Stop the given job immediately. If the job is in the ‘Active’\ + \ state, the job will be canceled after completing the current task. Vault\ + \ accounts and Wallets that are already created will not be affected." + operationId: cancelJob + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + - description: "A unique identifier for the request. If the request is sent\ + \ multiple times with the same idempotency key, the server will return the\ + \ same response as the first request. The idempotency key is valid for 24\ + \ hours." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + responses: + "200": + description: canceled successfully + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Cancel a running job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.cancelJob(jobManagementApiCancelJobRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.jobManagement().cancelJob(jobId,\ + \ idempotencyKey);" + name: Fireblocks SDK Java example + x-accepts: application/json + /batch/{jobId}/tasks: + get: + description: Return a list of tasks for given job + operationId: getJobTasks + parameters: + - description: The requested job id + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Tasks' + description: An array of tasks + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Return a list of tasks for given job + tags: + - Job Management + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.jobManagement.getJobTasks(jobManagementApiGetJobTasksRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture>> response = fireblocks.jobManagement().getJobTasks(jobId); + name: Fireblocks SDK Java example + x-accepts: application/json + /cosigners: + get: + description: | + Get all workspace cosigners (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getCosigners + parameters: + - description: ASC / DESC ordering (default DESC) + example: ASC + explode: true + in: query + name: order + required: false + schema: + default: DESC + enum: + - ASC + - DESC + type: string + style: form + - description: Cursor of the required page + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Maximum number of items in the page + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CosignersPaginatedResponse' + description: A paginated response containing Cosigner objects + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get all cosigners + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getCosigners(cosignersBetaApiGetCosignersRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getCosigners(order, pageCursor, pageSize);" + name: Fireblocks SDK Java example + x-accepts: application/json + /cosigners/{cosignerId}: + get: + description: | + Get a cosigner by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getCosigner + parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cosigner' + description: A cosigner object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get cosigner + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.getCosigner(cosignersBetaApiGetCosignerRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.cosignersBeta().getCosigner(cosignerId); + name: Fireblocks SDK Java example + x-accepts: application/json + patch: + description: | + Rename a cosigner by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: renameCosigner + parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RenameCosigner' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Cosigner' + description: A cosigner object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Rename cosigner + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.renameCosigner(cosignersBetaApiRenameCosignerRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.cosignersBeta().renameCosigner(renameCosigner,\ + \ cosignerId);" + name: Fireblocks SDK Java example + x-content-type: application/json + x-accepts: application/json + /cosigners/{cosignerId}/api_keys: + get: + description: | + Get all cosigner paired API keys (paginated) + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getApiKeys + parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + - description: ASC / DESC ordering (default DESC) + example: ASC + explode: true + in: query + name: order + required: false + schema: + default: DESC + enum: + - ASC + - DESC + type: string + style: form + - description: Cursor of the required page + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Maximum number of items in the page + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeysPaginatedResponse' + description: A paginated response containing ApiKey objects + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get all API keys + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.cosignersBeta.getApiKeys(cosignersBetaApiGetApiKeysRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.cosignersBeta().getApiKeys(cosignerId, order, pageCursor,\ + \ pageSize);" + name: Fireblocks SDK Java example + x-accepts: application/json + /cosigners/{cosignerId}/api_keys/{apiKeyId}: + get: + description: | + Get an API key by ID + **Note:** These endpoints are currently in beta and might be subject to changes. + operationId: getApiKey + parameters: + - description: The unique identifier of the cosigner + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: cosignerId + required: true + schema: + format: uuid + type: string + style: simple + - description: The unique identifier of the API key + example: 44fcead0-7053-4831-a53a-df7fb90d440f + explode: false + in: path + name: apiKeyId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + description: An ApiKey object + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get API key + tags: + - Cosigners (Beta) + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.cosignersBeta.getApiKey(cosignersBetaApiGetApiKeyRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.cosignersBeta().getApiKey(cosignerId,\ + \ apiKeyId);" + name: Fireblocks SDK Java example + x-accepts: application/json +components: + headers: + X-Request-ID: + description: Unique ID correlated to the API request. Please provide it in any + support ticket you create or on Github issues related to Fireblocks SDKs + explode: false + schema: + type: string + style: simple + next-page: + description: URL representing a new request to this API endpoint to receive + the next page of results. + explode: false + schema: + type: string + style: simple + prev-page: + description: URL representing a new request to this API endpoint to receive + the previous page of results. + explode: false + schema: + type: string + style: simple + parameters: + X-Idempotency-Key: + 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 + X-End-User-Wallet-Id: + description: Unique ID of the End-User wallet to the API request. Required for + end-user wallet operations. + explode: false + in: header + name: X-End-User-Wallet-Id + required: false + schema: + format: uuid + type: string + style: simple + responses: + Error: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + schemas: + ErrorSchema: + example: + code: 6.027456183070403 + message: message + properties: + message: + type: string + code: + type: number + type: object + RewardsInfo: + example: + pendingRewards: pendingRewards + properties: + pendingRewards: + description: Amount that is pending for rewards + type: string + type: object + VaultAsset: + example: + totalStakedCPU: 0.8008281904610115 + blockHash: blockHash + pendingRefundNetwork: pendingRefundNetwork + lockedAmount: lockedAmount + pending: pending + staked: staked + rewardsInfo: + pendingRewards: pendingRewards + available: available + frozen: frozen + selfStakedCPU: selfStakedCPU + totalStakedNetwork: totalStakedNetwork + total: total + balance: balance + blockHeight: blockHeight + selfStakedNetwork: selfStakedNetwork + pendingRefundCPU: pendingRefundCPU + id: id + properties: + id: + type: string + total: + description: "The total wallet balance. In EOS this value includes the network\ + \ balance, self staking and pending refund. For all other coins it is\ + \ the balance as it appears on the blockchain." + type: string + balance: + deprecated: true + description: Deprecated - replaced by "total" + type: string + available: + description: Funds available for transfer. Equals the blockchain balance + minus any locked amounts + type: string + pending: + description: The cumulative balance of all transactions pending to be cleared + type: string + frozen: + description: The cumulative frozen balance + type: string + lockedAmount: + description: Funds in outgoing transactions that are not yet published to + the network + type: string + staked: + description: Staked balance + type: string + totalStakedCPU: + description: Deprecated + type: number + totalStakedNetwork: + description: Deprecated + type: string + selfStakedCPU: + description: Deprecated + type: string + selfStakedNetwork: + description: Deprecated + type: string + pendingRefundCPU: + description: Deprecated + type: string + pendingRefundNetwork: + description: Deprecated + type: string + blockHeight: type: string blockHash: type: string @@ -12357,6 +13628,10 @@ components: autoFuel: type: boolean type: object + GetVaultAccountsResponse: + items: + $ref: '#/components/schemas/VaultAccount' + type: array CreateVaultAccountRequest: example: hiddenOnUI: true @@ -12717,6 +13992,10 @@ components: userDefined: type: boolean type: object + GetVaultAccountAssetAddressesResponse: + items: + $ref: '#/components/schemas/VaultWalletAddress' + type: array CreateAddressRequest: example: description: description @@ -12792,6 +14071,22 @@ components: description: The maximum amount that can be spent from the vault account type: string type: object + UpdateVaultAccountAssetAddressRequest: + example: + description: description + properties: + description: + description: The address description + type: string + type: object + SetCustomerRefIdForAddressRequest: + example: + customerRefId: customerRefId + properties: + customerRefId: + description: Customer reference ID + type: string + type: object UnspentInput: example: index: 0.8008281904610115 @@ -12823,6 +14118,10 @@ components: status: type: string type: object + GetUnspentInputsResponse: + items: + $ref: '#/components/schemas/UnspentInputsResponse' + type: array PublicKeyInformation: example: derivationPath: @@ -12840,6 +14139,10 @@ components: publicKey: type: string type: object + GetVaultAssetsResponse: + items: + $ref: '#/components/schemas/VaultAsset' + type: array CreateAssetsBulkRequest: example: assetId: assetId @@ -13004,6 +14307,10 @@ components: description: "if the account is a sub-account, the ID of the main account" type: string type: object + GetExchangeAccountsResponse: + items: + $ref: '#/components/schemas/ExchangeAccount' + type: array ExchangeAccountsPaged: example: prevUrl: prevUrl @@ -13114,6 +14421,10 @@ components: nextUrl: type: string type: object + GetPagedExchangeAccountsResponse: + items: + $ref: '#/components/schemas/ExchangeAccountsPaged' + type: array TradingAccountType: enum: - COIN_FUTURES @@ -13232,6 +14543,10 @@ components: $ref: '#/components/schemas/FiatAsset' type: array type: object + GetFiatAccountsResponse: + items: + $ref: '#/components/schemas/FiatAccount' + type: array Funds: example: amount: 0.8008281904610115 @@ -13392,6 +14707,10 @@ components: - routingPolicy - status type: object + GetNetworkConnectionsResponse: + items: + $ref: '#/components/schemas/NetworkConnectionResponse' + type: array NetworkConnection: example: localNetworkId: localNetworkId @@ -13431,6 +14750,15 @@ components: required: - routingPolicy type: object + SetRoutingPolicyResponse: + example: + success: true + properties: + success: + type: boolean + required: + - success + type: object ThirdPartyRouting: example: isThirdPartyRouting: true @@ -13438,8 +14766,17 @@ components: properties: isThirdPartyRouting: type: boolean - description: - type: string + description: + type: string + type: object + DeleteNetworkConnectionResponse: + example: + success: true + properties: + success: + type: boolean + required: + - success type: object NetworkIdRoutingPolicy: additionalProperties: @@ -13460,6 +14797,11 @@ components: isDiscoverable: true id: id routingPolicy: null + GetNetworkIdsResponse: + items: + allOf: + - $ref: '#/components/schemas/NetworkIdResponse' + type: array CreateNetworkIdRequest: example: name: name @@ -13478,10 +14820,19 @@ components: required: - name type: object - GetEnabledRoutingPolicyAssetGroupsResponse: + GetRoutingPolicyAssetGroupsResponse: items: type: string type: array + DeleteNetworkIdResponse: + example: + success: true + properties: + success: + type: boolean + required: + - success + type: object SetNetworkIdRoutingPolicyRequest: example: routingPolicy: @@ -13593,6 +14944,10 @@ components: - id - name type: object + GetInternalWalletsResponse: + items: + $ref: '#/components/schemas/UnmanagedWallet' + type: array CreateWalletRequest: example: name: name @@ -13620,6 +14975,10 @@ components: required: - address type: object + GetExternalWalletsResponse: + items: + $ref: '#/components/schemas/UnmanagedWallet' + type: array WalletAssetAdditionalInfo: example: accountHolderCity: accountHolderCity @@ -13738,6 +15097,10 @@ components: oneOf: - $ref: '#/components/schemas/AddAssetToExternalWalletRequest_oneOf' - $ref: '#/components/schemas/AddAssetToExternalWalletRequest_oneOf_1' + GetContractsResponse: + items: + $ref: '#/components/schemas/UnmanagedWallet' + type: array CreateContractRequest: example: name: name @@ -13786,6 +15149,10 @@ components: - name - type type: object + GetSupportedAssetsResponse: + items: + $ref: '#/components/schemas/AssetTypeResponse' + type: array RegisterNewAssetRequest: example: symbol: TST3 @@ -13860,6 +15227,23 @@ components: - code - message type: object + AssetForbiddenErrorResponse: + example: + code: "3006" + message: Asset creation quota reached + properties: + message: + description: Forbidden error code + example: Asset creation quota reached + type: string + code: + description: Error code + example: "3006" + type: string + required: + - code + - message + type: object AssetNotFoundErrorResponse: example: code: "3009" @@ -14921,6 +16305,10 @@ components: when `subStatus` = 'SMART_CONTRACT_EXECUTION_FAILED'. type: string type: object + GetTransactionsResponse: + items: + $ref: '#/components/schemas/TransactionResponse' + type: array TransactionOperation: default: TRANSFER description: | @@ -15235,917 +16623,1331 @@ components: operation: null replaceTxByHash: 00000000-0000-0000-0000-000000000000 properties: - operation: - $ref: '#/components/schemas/TransactionOperation' - note: - description: "Custom note, not sent to the blockchain, to describe the transaction\ - \ at your Fireblocks workspace." - example: Ticket 123 + operation: + $ref: '#/components/schemas/TransactionOperation' + note: + description: "Custom note, not sent to the blockchain, to describe the transaction\ + \ at your Fireblocks workspace." + example: Ticket 123 + type: string + externalTxId: + description: "An optional but highly recommended parameter. Fireblocks will\ + \ reject future transactions with same ID. \nYou should set this to a\ + \ unique ID representing the transaction, to avoid submitting the same\ + \ transaction twice. This helps with cases where submitting the transaction\ + \ responds with an error code due to Internet interruptions, but the transaction\ + \ was actually sent and processed. To validate whether a transaction has\ + \ been processed, [Find a specific transaction by external transaction\ + \ ID](https://developers.fireblocks.com/reference/get_transactions-external-tx-id-externaltxid).\n\ + There is no specific format required for this parameter." + example: 00000000-0000-0000-0000-000000000000 + type: string + assetId: + description: "The ID of the asset to transfer, for `TRANSFER`, `MINT` or\ + \ `BURN` operations. [See the list of supported assets and their IDs on\ + \ Fireblocks.](https://developers.fireblocks.com/reference/get_supported-assets)" + example: ETH + type: string + x-fb-entity: asset + source: + $ref: '#/components/schemas/SourceTransferPeerPath' + destination: + $ref: '#/components/schemas/DestinationTransferPeerPath' + destinations: + description: "For UTXO based blockchains, you can send a single transaction\ + \ to multiple destinations." + items: + $ref: '#/components/schemas/TransactionRequestDestination' + type: array + amount: + $ref: '#/components/schemas/TransactionRequest_amount' + treatAsGrossAmount: + description: |- + "When set to `true`, the fee will be deducted from the requested amount." + + **Note**: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account. + example: false + type: boolean + forceSweep: + description: |- + For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. + + **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. + example: false + type: boolean + feeLevel: + description: "For UTXO or EVM-based blockchains only. Defines the blockchain\ + \ fee level which will be payed for the transaction. Alternatively, specific\ + \ fee estimation parameters exist below." + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + fee: + $ref: '#/components/schemas/TransactionRequest_fee' + priorityFee: + $ref: '#/components/schemas/TransactionRequest_priorityFee' + failOnLowFee: + description: "When set to `true`, in case the current `MEDIUM` fee level\ + \ is higher than the one specified in the transaction, the transaction\ + \ will fail to avoid getting stuck with no confirmations." + type: boolean + maxFee: + description: The maximum fee (gas price or fee per byte) that should be + payed for the transaction. In case the current value of the requested + `feeLevel` is higher than this requested maximum fee. Represented by + a numeric string for accurate precision. + example: "120" + type: string + gasLimit: + $ref: '#/components/schemas/TransactionRequest_gasLimit' + gasPrice: + $ref: '#/components/schemas/TransactionRequest_gasPrice' + networkFee: + $ref: '#/components/schemas/TransactionRequest_networkFee' + replaceTxByHash: + description: "For EVM-based blockchains only. In case a transaction is stuck,\ + \ specify the hash of the stuck transaction to replace it by this transaction\ + \ with a higher fee, or to replace it with this transaction with a zero\ + \ fee and drop it from the blockchain." + example: 00000000-0000-0000-0000-000000000000 + type: string + extraParameters: + description: | + Additional protocol / operation specific key-value parameters: + + For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) + + For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) + + For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. + properties: {} + type: object + customerRefId: + description: The ID for AML providers to associate the owner of funds with + transactions. + example: abcdef + type: string + travelRuleMessage: + $ref: '#/components/schemas/TravelRuleCreateTransactionRequest' + autoStaking: + deprecated: true + description: This feature is no longer supported. + type: boolean + networkStaking: + $ref: '#/components/schemas/TransactionRequest_networkStaking' + cpuStaking: + $ref: '#/components/schemas/TransactionRequest_networkStaking' + type: object + CreateTransactionResponse: + example: + systemMessages: + type: WARN + message: Slow transaction processing. Outgoing transactions might be stuck. + id: id + status: status + properties: + id: + description: The ID of the transaction. + type: string + status: + description: "The primary status of the transaction. For details, see [Primary\ + \ transaction statuses.] (https://developers.fireblocks.com/reference/primary-transaction-statuses)" + type: string + systemMessages: + $ref: '#/components/schemas/SystemMessageInfo' + type: object + TransactionFee: + example: + gasLimit: gasLimit + feePerByte: feePerByte + networkFee: networkFee + priorityFee: 1.4658129805029452 + l1Fee: l1Fee + baseFee: 6.027456183070403 + gasPrice: 0.8008281904610115 + maxFeePerGasDelta: maxFeePerGasDelta + properties: + feePerByte: + type: string + gasPrice: + type: number + gasLimit: + type: string + networkFee: + type: string + baseFee: + description: (optional) Base Fee according to EIP-1559 (ETH assets) + type: number + priorityFee: + description: (optional) Priority Fee according to EIP-1559 (ETH assets) + type: number + maxFeePerGasDelta: + description: Max Fee Per Gas Delta added only for EIP-1559 (ETH assets) + type: string + l1Fee: + description: Layer 1 fee for Layer 2 chains + type: string + type: object + EstimatedTransactionFeeResponse: + example: + high: + gasLimit: gasLimit + feePerByte: feePerByte + networkFee: networkFee + priorityFee: 1.4658129805029452 + l1Fee: l1Fee + baseFee: 6.027456183070403 + gasPrice: 0.8008281904610115 + maxFeePerGasDelta: maxFeePerGasDelta + low: + gasLimit: gasLimit + feePerByte: feePerByte + networkFee: networkFee + priorityFee: 1.4658129805029452 + l1Fee: l1Fee + baseFee: 6.027456183070403 + gasPrice: 0.8008281904610115 + maxFeePerGasDelta: maxFeePerGasDelta + medium: + gasLimit: gasLimit + feePerByte: feePerByte + networkFee: networkFee + priorityFee: 1.4658129805029452 + l1Fee: l1Fee + baseFee: 6.027456183070403 + gasPrice: 0.8008281904610115 + maxFeePerGasDelta: maxFeePerGasDelta + properties: + low: + $ref: '#/components/schemas/TransactionFee' + medium: + $ref: '#/components/schemas/TransactionFee' + high: + $ref: '#/components/schemas/TransactionFee' + required: + - high + - low + - medium + type: object + SetConfirmationsThresholdRequest: + example: + numOfConfirmations: 0.8008281904610115 + properties: + numOfConfirmations: + type: number + type: object + SetConfirmationsThresholdResponse: + example: + success: true + transactions: + - transactions + - transactions + properties: + success: + type: boolean + transactions: + items: + type: string + type: array + type: object + DropTransactionRequest: + example: + txId: txId + feeLevel: feeLevel + gasPrice: gasPrice + properties: + txId: type: string - externalTxId: - description: "An optional but highly recommended parameter. Fireblocks will\ - \ reject future transactions with same ID. \nYou should set this to a\ - \ unique ID representing the transaction, to avoid submitting the same\ - \ transaction twice. This helps with cases where submitting the transaction\ - \ responds with an error code due to Internet interruptions, but the transaction\ - \ was actually sent and processed. To validate whether a transaction has\ - \ been processed, [Find a specific transaction by external transaction\ - \ ID](https://developers.fireblocks.com/reference/get_transactions-external-tx-id-externaltxid).\n\ - There is no specific format required for this parameter." - example: 00000000-0000-0000-0000-000000000000 + feeLevel: type: string - assetId: - description: "The ID of the asset to transfer, for `TRANSFER`, `MINT` or\ - \ `BURN` operations. [See the list of supported assets and their IDs on\ - \ Fireblocks.](https://developers.fireblocks.com/reference/get_supported-assets)" - example: ETH + gasPrice: type: string - x-fb-entity: asset - source: - $ref: '#/components/schemas/SourceTransferPeerPath' - destination: - $ref: '#/components/schemas/DestinationTransferPeerPath' - destinations: - description: "For UTXO based blockchains, you can send a single transaction\ - \ to multiple destinations." - items: - $ref: '#/components/schemas/TransactionRequestDestination' - type: array - amount: - $ref: '#/components/schemas/TransactionRequest_amount' - treatAsGrossAmount: - description: |- - "When set to `true`, the fee will be deducted from the requested amount." - - **Note**: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account. - example: false + type: object + DropTransactionResponse: + example: + txStatus: txStatus + txId: txId + replacedTxHash: replacedTxHash + properties: + txStatus: + type: string + txId: + type: string + replacedTxHash: + type: string + type: object + CancelTransactionResponse: + example: + success: true + properties: + success: type: boolean - forceSweep: - description: |- - For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. - - **Note:** If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation. - example: false + type: object + FreezeTransactionResponse: + example: + success: true + properties: + success: type: boolean - feeLevel: - description: "For UTXO or EVM-based blockchains only. Defines the blockchain\ - \ fee level which will be payed for the transaction. Alternatively, specific\ - \ fee estimation parameters exist below." - enum: - - LOW - - MEDIUM - - HIGH - example: MEDIUM - type: string - fee: - $ref: '#/components/schemas/TransactionRequest_fee' - priorityFee: - $ref: '#/components/schemas/TransactionRequest_priorityFee' - failOnLowFee: - description: "When set to `true`, in case the current `MEDIUM` fee level\ - \ is higher than the one specified in the transaction, the transaction\ - \ will fail to avoid getting stuck with no confirmations." + type: object + UnfreezeTransactionResponse: + example: + success: true + properties: + success: type: boolean - maxFee: - description: The maximum fee (gas price or fee per byte) that should be - payed for the transaction. In case the current value of the requested - `feeLevel` is higher than this requested maximum fee. Represented by - a numeric string for accurate precision. - example: "120" + type: object + ValidateAddressResponse: + example: + isValid: true + requiresTag: true + isActive: true + properties: + isValid: + type: boolean + isActive: + type: boolean + requiresTag: + type: boolean + type: object + NetworkFee: + example: + feePerByte: feePerByte + networkFee: networkFee + priorityFee: priorityFee + baseFee: baseFee + gasPrice: gasPrice + properties: + feePerByte: type: string - gasLimit: - $ref: '#/components/schemas/TransactionRequest_gasLimit' gasPrice: - $ref: '#/components/schemas/TransactionRequest_gasPrice' + type: string networkFee: - $ref: '#/components/schemas/TransactionRequest_networkFee' - replaceTxByHash: - description: "For EVM-based blockchains only. In case a transaction is stuck,\ - \ specify the hash of the stuck transaction to replace it by this transaction\ - \ with a higher fee, or to replace it with this transaction with a zero\ - \ fee and drop it from the blockchain." - example: 00000000-0000-0000-0000-000000000000 type: string - extraParameters: - description: | - Additional protocol / operation specific key-value parameters: - - For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) - - For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) - - For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. - properties: {} - type: object - customerRefId: - description: The ID for AML providers to associate the owner of funds with - transactions. - example: abcdef + baseFee: + description: (optional) Base Fee according to EIP-1559 (ETH assets) type: string - travelRuleMessage: - $ref: '#/components/schemas/TravelRuleCreateTransactionRequest' - autoStaking: - deprecated: true - description: This feature is no longer supported. - type: boolean - networkStaking: - $ref: '#/components/schemas/TransactionRequest_networkStaking' - cpuStaking: - $ref: '#/components/schemas/TransactionRequest_networkStaking' + priorityFee: + description: (optional) Priority Fee according to EIP-1559 (ETH assets) + type: string + type: object + EstimatedNetworkFeeResponse: + example: + high: + feePerByte: feePerByte + networkFee: networkFee + priorityFee: priorityFee + baseFee: baseFee + gasPrice: gasPrice + low: + feePerByte: feePerByte + networkFee: networkFee + priorityFee: priorityFee + baseFee: baseFee + gasPrice: gasPrice + medium: + feePerByte: feePerByte + networkFee: networkFee + priorityFee: priorityFee + baseFee: baseFee + gasPrice: gasPrice + properties: + low: + $ref: '#/components/schemas/NetworkFee' + medium: + $ref: '#/components/schemas/NetworkFee' + high: + $ref: '#/components/schemas/NetworkFee' + required: + - high + - low + - medium + type: object + PaymentAccountType: + enum: + - VAULT_ACCOUNT + - EXCHANGE_ACCOUNT + - FIAT_ACCOUNT + type: string + PaymentAccount: + example: + id: id + type: null + properties: + id: + type: string + type: + $ref: '#/components/schemas/PaymentAccountType' + required: + - id + - type + type: object + PayeeAccountType: + description: "- VAULT_ACCOUNT \ta native Fireblocks vault account\n- EXCHANGE_ACCOUNT\ + \ \ta third-party exchange account\n- INTERNAL_WALLET \ta whitelisted address\ + \ marked as internal to the workspace/organization\n- EXTERNAL_WALLET\ta whitelisted\ + \ address marked as external\n- NETWORK_CONNECTION\ta member of the Fireblocks\ + \ network\n- FIAT_ACCOUNT\ta third-party account of a fiat bank (Signature,\ + \ BCB, etc)\n" + enum: + - VAULT_ACCOUNT + - EXCHANGE_ACCOUNT + - INTERNAL_WALLET + - EXTERNAL_WALLET + - NETWORK_CONNECTION + - FIAT_ACCOUNT + type: string + PayeeAccount: + example: + id: id + type: null + properties: + id: + type: string + type: + $ref: '#/components/schemas/PayeeAccountType' + required: + - id + - type + type: object + InstructionAmount: + example: + amount: amount + assetId: assetId + properties: + amount: + type: string + assetId: + type: string + required: + - amount + - assetId type: object - CreateTransactionResponse: + PayoutInstruction: example: - systemMessages: - type: WARN - message: Slow transaction processing. Outgoing transactions might be stuck. + amount: + amount: amount + assetId: assetId id: id - status: status + payeeAccount: + id: id + type: null properties: id: - description: The ID of the transaction. - type: string - status: - description: "The primary status of the transaction. For details, see [Primary\ - \ transaction statuses.] (https://developers.fireblocks.com/reference/primary-transaction-statuses)" type: string - systemMessages: - $ref: '#/components/schemas/SystemMessageInfo' + payeeAccount: + $ref: '#/components/schemas/PayeeAccount' + amount: + $ref: '#/components/schemas/InstructionAmount' + required: + - amount + - payeeAccount type: object - TransactionFee: + CreatePayoutRequest: example: - gasLimit: gasLimit - feePerByte: feePerByte - networkFee: networkFee - priorityFee: 1.4658129805029452 - baseFee: 6.027456183070403 - gasPrice: 0.8008281904610115 + instructionSet: + - amount: + amount: amount + assetId: assetId + id: id + payeeAccount: + id: id + type: null + - amount: + amount: amount + assetId: assetId + id: id + payeeAccount: + id: id + type: null + paymentAccount: + id: id + type: null properties: - feePerByte: - type: string - gasPrice: - type: number - gasLimit: - type: string - networkFee: + paymentAccount: + $ref: '#/components/schemas/PaymentAccount' + instructionSet: + items: + $ref: '#/components/schemas/PayoutInstruction' + type: array + required: + - instructionSet + - paymentAccount + type: object + PaymentAccountResponse: + example: + id: id + type: null + properties: + id: type: string - baseFee: - description: (optional) Base Fee according to EIP-1559 (ETH assets) - type: number - priorityFee: - description: (optional) Priority Fee according to EIP-1559 (ETH assets) - type: number + type: + $ref: '#/components/schemas/PaymentAccountType' type: object - EstimatedTransactionFeeResponse: + PayoutState: + description: | + - CREATED - payout instruction set created with all its details + - FILE_FOUND - new file found in the FTP + - REQUESTED - payout requested with all its details + - TRANSLATED - payout instruction account IDs identified and translated + - PROCESSING - payout instruction set executed and is processing + - SUBMITTED - transactions submitted for payout instructions + - FINALIZED - payout finished processing, all transactions processed successfully + - INSUFFICIENT_BALANCE - insufficient balance in the payment account (can be a temporary state) + - FAILED - one or more of the payout instructions failed + enum: + - CREATED + - FILE_FOUND + - REQUESTED + - TRANSLATED + - PROCESSING + - SUBMITTED + - FINALIZED + - INSUFFICIENT_BALANCE + - FAILED + type: string + PayoutStatus: + description: "- REQUESTED\tpayout requested with all its details\n- VERIFIED\t\ + payout instruction set details were verified\n- PROCESSING\tpayout instruction\ + \ set executed and is processing\n- FINALIZED\tpayout done (all payout instructions\ + \ completed successfully)\n- INSUFFICIENT_BALANCE\tinsufficient balance in\ + \ the payment account (can be a temporary state)\n- FAILED\tone or more of\ + \ the payout instructions failed\n" + enum: + - REGISTERED + - VERIFYING + - IN_PROGRESS + - DONE + - INSUFFICIENT_BALANCE + - FAILED + type: string + PayoutInitMethod: + enum: + - FILE + - API + type: string + PayeeAccountResponse: example: - high: - gasLimit: gasLimit - feePerByte: feePerByte - networkFee: networkFee - priorityFee: 1.4658129805029452 - baseFee: 6.027456183070403 - gasPrice: 0.8008281904610115 - low: - gasLimit: gasLimit - feePerByte: feePerByte - networkFee: networkFee - priorityFee: 1.4658129805029452 - baseFee: 6.027456183070403 - gasPrice: 0.8008281904610115 - medium: - gasLimit: gasLimit - feePerByte: feePerByte - networkFee: networkFee - priorityFee: 1.4658129805029452 - baseFee: 6.027456183070403 - gasPrice: 0.8008281904610115 + id: id + type: null properties: - low: - $ref: '#/components/schemas/TransactionFee' - medium: - $ref: '#/components/schemas/TransactionFee' - high: - $ref: '#/components/schemas/TransactionFee' - required: - - high - - low - - medium + id: + type: string + type: + $ref: '#/components/schemas/PayeeAccountType' type: object - SetConfirmationsThresholdRequest: + PayoutInstructionState: + description: "- NOT_STARTED\t- waiting to start\n- TRANSACTION_SENT - an underlying\ + \ transaction was sent\n- COMPLETED\t- completed successfully\n- FAILED -\ + \ failed\n- TRANSLATION_ERROR -lookup of the destination failed (due to changes\ + \ in the underlying whitelisted external wallet or similar)\n- SKIPPED- no\ + \ transaction(s) created for this instruction\n" + enum: + - NOT_STARTED + - TRANSACTION_SENT + - COMPLETED + - FAILED + - TRANSLATION_ERROR + - SKIPPED + type: string + Transaction: example: - numOfConfirmations: 0.8008281904610115 + instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 properties: - numOfConfirmations: + id: + type: string + state: + enum: + - SUBMITTED + - QUEUED + - PENDING_AUTHORIZATION + - PENDING_SIGNATURE + - BROADCASTING + - PENDING_3RD_PARTY_MANUAL_APPROVAL + - PENDING_3RD_PARTY + - PENDING + - CONFIRMING + - CONFIRMED + - COMPLETED + - PARTIALLY_COMPLETED + - PENDING_AML_SCREENING + - CANCELLING + - CANCELLED + - REJECTED + - BLOCKED + - FAILED + - TIMEOUT + type: string + timestamp: + format: date-time type: number + instructionId: + type: string + required: + - id + - state type: object - SetConfirmationsThresholdResponse: + PayoutInstructionResponse: example: - success: true + amount: + amount: amount + assetId: assetId + id: id + state: null + payeeAccount: + id: id + type: null transactions: - - transactions - - transactions + - instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 + - instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 properties: - success: - type: boolean + id: + type: string + payeeAccount: + $ref: '#/components/schemas/PayeeAccountResponse' + amount: + $ref: '#/components/schemas/InstructionAmount' + state: + $ref: '#/components/schemas/PayoutInstructionState' transactions: items: - type: string + $ref: '#/components/schemas/Transaction' type: array + required: + - amount + - payeeAccount + - state + - transactions type: object - DropTransactionRequest: + PayoutResponse: example: - txId: txId - feeLevel: feeLevel - gasPrice: gasPrice + createdAt: 0.8008281904610115 + initMethod: null + reasonOfFailure: reasonOfFailure + instructionSet: + - amount: + amount: amount + assetId: assetId + id: id + state: null + payeeAccount: + id: id + type: null + transactions: + - instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 + - instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 + - amount: + amount: amount + assetId: assetId + id: id + state: null + payeeAccount: + id: id + type: null + transactions: + - instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 + - instructionId: instructionId + id: id + state: SUBMITTED + timestamp: 6.027456183070403 + state: null + reportUrl: reportUrl + payoutId: payoutId + paymentAccount: + id: id + type: null + status: null properties: - txId: - type: string - feeLevel: + payoutId: type: string - gasPrice: + paymentAccount: + $ref: '#/components/schemas/PaymentAccountResponse' + createdAt: + type: number + state: + $ref: '#/components/schemas/PayoutState' + status: + $ref: '#/components/schemas/PayoutStatus' + reasonOfFailure: + description: "
    \n
  • INSUFFICIENT_BALANCE
  • \n
  • SOURCE_TRANSLATION
  • \n\ +
  • SOURCE_NOT_UNIQUE
  • \n
  • SOURCE_NOT_FOUND
  • \n
  • SOURCE_TYPE_NOT_SUPPORTED
  • \n\ +
  • EMPTY_SOURCE
  • \n
  • DESTINATION_TRANSLATION
  • \n
  • DESTINATION_NOT_UNIQUE
  • \n\ +
  • DESTINATION_NOT_FOUND
  • \n
  • EMPTY_DESTINATION
  • \n
  • PARSING\ + \
  • \n
  • UNKNOWN
  • \n
  • FIREBLOCKS_CLIENT
  • \n
  • TRANSACTION_SUBMISSION
  • \n\ +
\n" type: string - type: object - DropTransactionResponse: - example: - success: true - transactions: - - transactions - - transactions - properties: - success: - type: boolean - transactions: + initMethod: + $ref: '#/components/schemas/PayoutInitMethod' + instructionSet: items: - type: string + $ref: '#/components/schemas/PayoutInstructionResponse' type: array + reportUrl: + type: string + required: + - createdAt + - instructionSet + - paymentAccount + - payoutId + - state + - status type: object - CancelTransactionResponse: - example: - success: true - properties: - success: - type: boolean - type: object - FreezeTransactionResponse: + ErrorResponse: example: - success: true + error: + type: INTERNAL + message: message properties: - success: - type: boolean + error: + $ref: '#/components/schemas/ErrorResponse_error' + required: + - error type: object - UnfreezeTransactionResponse: + DispatchPayoutResponse: example: - success: true + payoutId: payoutId properties: - success: - type: boolean + payoutId: + type: string + required: + - payoutId type: object - ValidateAddressResponse: - example: - isValid: true - requiresTag: true - isActive: true + PreScreening: properties: - isValid: - type: boolean - isActive: - type: boolean - requiresTag: + enabled: type: boolean + required: + - enabled type: object - NetworkFee: - example: - feePerByte: feePerByte - networkFee: networkFee - priorityFee: priorityFee - baseFee: baseFee - gasPrice: gasPrice + ConversionOperationType: + enum: + - CONVERSION + type: string + ConversionOperationConfigParams: properties: - feePerByte: - type: string - gasPrice: + amount: type: string - networkFee: + accountId: type: string - baseFee: - description: (optional) Base Fee according to EIP-1559 (ETH assets) + srcAssetId: type: string - priorityFee: - description: (optional) Priority Fee according to EIP-1559 (ETH assets) + destAssetId: type: string + slippageBasisPoints: + maximum: 10000 + minimum: 0 + type: integer + required: + - destAssetId type: object - EstimatedNetworkFeeResponse: - example: - high: - feePerByte: feePerByte - networkFee: networkFee - priorityFee: priorityFee - baseFee: baseFee - gasPrice: gasPrice - low: - feePerByte: feePerByte - networkFee: networkFee - priorityFee: priorityFee - baseFee: baseFee - gasPrice: gasPrice - medium: - feePerByte: feePerByte - networkFee: networkFee - priorityFee: priorityFee - baseFee: baseFee - gasPrice: gasPrice + CreateConversionConfigOperationRequest: properties: - low: - $ref: '#/components/schemas/NetworkFee' - medium: - $ref: '#/components/schemas/NetworkFee' - high: - $ref: '#/components/schemas/NetworkFee' + type: + $ref: '#/components/schemas/ConversionOperationType' + params: + $ref: '#/components/schemas/ConversionOperationConfigParams' required: - - high - - low - - medium + - params + - type type: object - PaymentAccountType: + TransferOperationType: + enum: + - TRANSFER + type: string + AccountType: enum: - - VAULT_ACCOUNT - EXCHANGE_ACCOUNT + - UNMANAGED_WALLET + - VAULT_ACCOUNT + - NETWORK_CONNECTION - FIAT_ACCOUNT type: string - PaymentAccount: - example: - id: id - type: null + Account: + properties: + accountId: + type: string + accountType: + $ref: '#/components/schemas/AccountType' + required: + - accountId + - accountType + type: object + OneTimeAddressAccount: + properties: + oneTimeAddress: + type: string + tag: + type: string + required: + - oneTimeAddress + type: object + Destination: + oneOf: + - $ref: '#/components/schemas/Account' + - $ref: '#/components/schemas/OneTimeAddressAccount' + TransferOperationConfigParams: + properties: + amount: + type: string + assetId: + type: string + source: + $ref: '#/components/schemas/Account' + destination: + $ref: '#/components/schemas/Destination' + required: + - destination + type: object + CreateTransferConfigOperationRequest: properties: - id: - type: string type: - $ref: '#/components/schemas/PaymentAccountType' + $ref: '#/components/schemas/TransferOperationType' + params: + $ref: '#/components/schemas/TransferOperationConfigParams' required: - - id + - params - type type: object - PayeeAccountType: - description: "- VAULT_ACCOUNT \ta native Fireblocks vault account\n- EXCHANGE_ACCOUNT\ - \ \ta third-party exchange account\n- INTERNAL_WALLET \ta whitelisted address\ - \ marked as internal to the workspace/organization\n- EXTERNAL_WALLET\ta whitelisted\ - \ address marked as external\n- NETWORK_CONNECTION\ta member of the Fireblocks\ - \ network\n- FIAT_ACCOUNT\ta third-party account of a fiat bank (Signature,\ - \ BCB, etc)\n" + DisbursementOperationType: enum: - - VAULT_ACCOUNT - - EXCHANGE_ACCOUNT - - INTERNAL_WALLET - - EXTERNAL_WALLET - - NETWORK_CONNECTION - - FIAT_ACCOUNT + - DISBURSEMENT type: string - PayeeAccount: - example: - id: id - type: null + DisbursementAmountInstruction: properties: - id: + payeeAccount: + $ref: '#/components/schemas/Destination' + assetId: type: string - type: - $ref: '#/components/schemas/PayeeAccountType' - required: - - id - - type - type: object - InstructionAmount: - example: - amount: amount - assetId: assetId - properties: amount: type: string - assetId: - type: string required: - amount - assetId + - payeeAccount type: object - PayoutInstruction: - example: - amount: - amount: amount - assetId: assetId - id: id - payeeAccount: - id: id - type: null + DisbursementPercentageInstruction: properties: - id: - type: string payeeAccount: - $ref: '#/components/schemas/PayeeAccount' - amount: - $ref: '#/components/schemas/InstructionAmount' + $ref: '#/components/schemas/Destination' + assetId: + type: string + percentage: + type: string required: - - amount + - assetId - payeeAccount + - percentage type: object - CreatePayoutRequest: - example: - instructionSet: - - amount: - amount: amount - assetId: assetId - id: id - payeeAccount: - id: id - type: null - - amount: - amount: amount - assetId: assetId - id: id - payeeAccount: - id: id - type: null - paymentAccount: - id: id - type: null + DisbursementInstruction: + oneOf: + - $ref: '#/components/schemas/DisbursementAmountInstruction' + - $ref: '#/components/schemas/DisbursementPercentageInstruction' + DisbursementOperationConfigParams: properties: paymentAccount: - $ref: '#/components/schemas/PaymentAccount' + $ref: '#/components/schemas/Account' instructionSet: items: - $ref: '#/components/schemas/PayoutInstruction' + $ref: '#/components/schemas/DisbursementInstruction' type: array required: - instructionSet - - paymentAccount type: object - PaymentAccountResponse: - example: - id: id - type: null + CreateDisbursementConfigOperationRequest: properties: - id: - type: string type: - $ref: '#/components/schemas/PaymentAccountType' + $ref: '#/components/schemas/DisbursementOperationType' + params: + $ref: '#/components/schemas/DisbursementOperationConfigParams' + required: + - params + - type type: object - PayoutState: - description: | - - CREATED - payout instruction set created with all its details - - FILE_FOUND - new file found in the FTP - - REQUESTED - payout requested with all its details - - TRANSLATED - payout instruction account IDs identified and translated - - PROCESSING - payout instruction set executed and is processing - - SUBMITTED - transactions submitted for payout instructions - - FINALIZED - payout finished processing, all transactions processed successfully - - INSUFFICIENT_BALANCE - insufficient balance in the payment account (can be a temporary state) - - FAILED - one or more of the payout instructions failed - enum: - - CREATED - - FILE_FOUND - - REQUESTED - - TRANSLATED - - PROCESSING - - SUBMITTED - - FINALIZED - - INSUFFICIENT_BALANCE - - FAILED - type: string - PayoutStatus: - description: "- REQUESTED\tpayout requested with all its details\n- VERIFIED\t\ - payout instruction set details were verified\n- PROCESSING\tpayout instruction\ - \ set executed and is processing\n- FINALIZED\tpayout done (all payout instructions\ - \ completed successfully)\n- INSUFFICIENT_BALANCE\tinsufficient balance in\ - \ the payment account (can be a temporary state)\n- FAILED\tone or more of\ - \ the payout instructions failed\n" + CreateConfigOperationRequest: + oneOf: + - $ref: '#/components/schemas/CreateConversionConfigOperationRequest' + - $ref: '#/components/schemas/CreateTransferConfigOperationRequest' + - $ref: '#/components/schemas/CreateDisbursementConfigOperationRequest' + CorrelationData: + oneOf: + - additionalProperties: + type: string + type: object + - type: string + x-internal: true + CreateWorkflowConfigurationRequest: + properties: + configName: + type: string + preScreening: + $ref: '#/components/schemas/PreScreening' + configOperations: + items: + $ref: '#/components/schemas/CreateConfigOperationRequest' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' + required: + - configName + - configOperations + type: object + x-internal: true + WorkflowConfigStatus: enum: - - REGISTERED - - VERIFYING - - IN_PROGRESS - - DONE - - INSUFFICIENT_BALANCE - - FAILED + - PENDING + - VALIDATION_IN_PROGRESS + - VALIDATION_FAILED + - READY_FOR_EXECUTION type: string - PayoutInitMethod: + ConfigOperationStatus: enum: - - FILE - - API + - PENDING + - VALIDATION_IN_PROGRESS + - READY_FOR_EXECUTION + - VALIDATION_FAILED type: string - PayeeAccountResponse: - example: - id: id - type: null + ConversionValidationFailure: + properties: + reason: + enum: + - ACCOUNT_NOT_FOUND + - ACCOUNT_TYPE_NOT_SUPPORTED + - INSUFFICIENT_BALANCE + - ASSET_NOT_FOUND + - ASSETS_CONTINUITY_MISMATCH + - EXCHANGE_BASKETS_MISMATCH + - ACCOUNTS_CONTINUITY_MISMATCH + - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED + - EQUAL_ACCOUNTS_NOT_ALLOWED + - EQUAL_ASSETS_NOT_ALLOWED + - INVALID_AMOUNT + - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED + - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + - ACCOUNT_IS_NOT_EXCHANGE + - UNSUPPORTED_TRADING_METHOD + - ASSETS_CAN_NOT_CONVERTED + type: string + data: + additionalProperties: {} + type: object + required: + - reason + type: object + ConversionConfigOperation: + properties: + operationId: + type: string + type: + $ref: '#/components/schemas/ConversionOperationType' + params: + $ref: '#/components/schemas/ConversionOperationConfigParams' + status: + $ref: '#/components/schemas/ConfigOperationStatus' + validationFailure: + $ref: '#/components/schemas/ConversionValidationFailure' + required: + - operationId + - params + - status + - type + type: object + TransferValidationFailure: + properties: + reason: + enum: + - ACCOUNT_NOT_FOUND + - ACCOUNT_TYPE_NOT_SUPPORTED + - INSUFFICIENT_BALANCE + - ASSET_NOT_FOUND + - ASSETS_CONTINUITY_MISMATCH + - EXCHANGE_BASKETS_MISMATCH + - ACCOUNTS_CONTINUITY_MISMATCH + - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED + - EQUAL_ACCOUNTS_NOT_ALLOWED + - EQUAL_ASSETS_NOT_ALLOWED + - INVALID_AMOUNT + - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED + - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + type: string + data: + additionalProperties: true + type: object + required: + - reason + type: object + TransferConfigOperation: properties: - id: + operationId: type: string type: - $ref: '#/components/schemas/PayeeAccountType' + $ref: '#/components/schemas/TransferOperationType' + params: + $ref: '#/components/schemas/TransferOperationConfigParams' + status: + $ref: '#/components/schemas/ConfigOperationStatus' + validationFailure: + $ref: '#/components/schemas/TransferValidationFailure' + required: + - operationId + - params + - status + - type type: object - PayoutInstructionState: - description: "- NOT_STARTED\t- waiting to start\n- TRANSACTION_SENT - an underlying\ - \ transaction was sent\n- COMPLETED\t- completed successfully\n- FAILED -\ - \ failed\n- TRANSLATION_ERROR -lookup of the destination failed (due to changes\ - \ in the underlying whitelisted external wallet or similar)\n- SKIPPED- no\ - \ transaction(s) created for this instruction\n" - enum: - - NOT_STARTED - - TRANSACTION_SENT - - COMPLETED - - FAILED - - TRANSLATION_ERROR - - SKIPPED - type: string - Transaction: - example: - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 + DisbursementValidationFailure: properties: - id: - type: string - state: + reason: enum: - - SUBMITTED - - QUEUED - - PENDING_AUTHORIZATION - - PENDING_SIGNATURE - - BROADCASTING - - PENDING_3RD_PARTY_MANUAL_APPROVAL - - PENDING_3RD_PARTY - - PENDING - - CONFIRMING - - CONFIRMED - - COMPLETED - - PARTIALLY_COMPLETED - - PENDING_AML_SCREENING - - CANCELLING - - CANCELLED - - REJECTED - - BLOCKED - - FAILED - - TIMEOUT - type: string - timestamp: - format: date-time - type: number - instructionId: + - ACCOUNT_NOT_FOUND + - ACCOUNT_TYPE_NOT_SUPPORTED + - INSUFFICIENT_BALANCE + - ASSET_NOT_FOUND + - ASSETS_CONTINUITY_MISMATCH + - EXCHANGE_BASKETS_MISMATCH + - ACCOUNTS_CONTINUITY_MISMATCH + - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED + - EQUAL_ACCOUNTS_NOT_ALLOWED + - EQUAL_ASSETS_NOT_ALLOWED + - INVALID_AMOUNT + - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED + - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + - INSTRUCTIONS_EXCEED_HUNDRED_PERCENT + - INSTRUCTIONS_ARRAY_EMPTY type: string + data: + additionalProperties: {} + type: object required: - - id - - state + - reason type: object - PayoutInstructionResponse: - example: - amount: - amount: amount - assetId: assetId - id: id - state: null - payeeAccount: - id: id - type: null - transactions: - - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 - - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 + DisbursementConfigOperation: properties: - id: + operationId: type: string - payeeAccount: - $ref: '#/components/schemas/PayeeAccountResponse' - amount: - $ref: '#/components/schemas/InstructionAmount' - state: - $ref: '#/components/schemas/PayoutInstructionState' - transactions: - items: - $ref: '#/components/schemas/Transaction' - type: array + type: + $ref: '#/components/schemas/DisbursementOperationType' + params: + $ref: '#/components/schemas/DisbursementOperationConfigParams' + status: + $ref: '#/components/schemas/ConfigOperationStatus' + validationFailure: + $ref: '#/components/schemas/DisbursementValidationFailure' required: - - amount - - payeeAccount - - state - - transactions + - operationId + - params + - status + - type type: object - PayoutResponse: - example: - createdAt: 0.8008281904610115 - initMethod: null - reasonOfFailure: reasonOfFailure - instructionSet: - - amount: - amount: amount - assetId: assetId - id: id - state: null - payeeAccount: - id: id - type: null - transactions: - - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 - - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 - - amount: - amount: amount - assetId: assetId - id: id - state: null - payeeAccount: - id: id - type: null - transactions: - - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 - - instructionId: instructionId - id: id - state: SUBMITTED - timestamp: 6.027456183070403 - state: null - reportUrl: reportUrl - payoutId: payoutId - paymentAccount: - id: id - type: null - status: null + ConfigOperation: + oneOf: + - $ref: '#/components/schemas/ConversionConfigOperation' + - $ref: '#/components/schemas/TransferConfigOperation' + - $ref: '#/components/schemas/DisbursementConfigOperation' + WorkflowConfiguration: properties: - payoutId: + configId: type: string - paymentAccount: - $ref: '#/components/schemas/PaymentAccountResponse' + configName: + type: string + preScreening: + $ref: '#/components/schemas/PreScreening' + status: + $ref: '#/components/schemas/WorkflowConfigStatus' createdAt: type: number - state: - $ref: '#/components/schemas/PayoutState' - status: - $ref: '#/components/schemas/PayoutStatus' - reasonOfFailure: - description: "
    \n
  • INSUFFICIENT_BALANCE
  • \n
  • SOURCE_TRANSLATION
  • \n\ -
  • SOURCE_NOT_UNIQUE
  • \n
  • SOURCE_NOT_FOUND
  • \n
  • SOURCE_TYPE_NOT_SUPPORTED
  • \n\ -
  • EMPTY_SOURCE
  • \n
  • DESTINATION_TRANSLATION
  • \n
  • DESTINATION_NOT_UNIQUE
  • \n\ -
  • DESTINATION_NOT_FOUND
  • \n
  • EMPTY_DESTINATION
  • \n
  • PARSING\ - \
  • \n
  • UNKNOWN
  • \n
  • FIREBLOCKS_CLIENT
  • \n
  • TRANSACTION_SUBMISSION
  • \n\ -
\n" - type: string - initMethod: - $ref: '#/components/schemas/PayoutInitMethod' - instructionSet: + configOperations: items: - $ref: '#/components/schemas/PayoutInstructionResponse' + $ref: '#/components/schemas/ConfigOperation' type: array - reportUrl: - type: string + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' required: + - configId + - configName + - configOperations - createdAt - - instructionSet - - paymentAccount - - payoutId - - state - status type: object - ErrorResponse: - example: - error: - type: INTERNAL - message: message + x-internal: true + WorkflowConfigurationId: properties: - error: - $ref: '#/components/schemas/ErrorResponse_error' + configId: + type: string + required: + - configId + type: object + ConversionOperationExecutionParams: + properties: + configOperationId: + type: string + executionParams: + $ref: '#/components/schemas/ConversionOperationExecutionParams_executionParams' required: - - error + - configOperationId type: object - DispatchPayoutResponse: - example: - payoutId: payoutId + TransferOperationExecutionParams: properties: - payoutId: + configOperationId: type: string + executionParams: + $ref: '#/components/schemas/TransferOperationExecutionParams_executionParams' required: - - payoutId + - configOperationId type: object - PreScreening: + DisbursementOperationExecutionParams: properties: - enabled: - type: boolean + configOperationId: + type: string + executionParams: + $ref: '#/components/schemas/DisbursementOperationExecutionParams_executionParams' required: - - enabled + - configOperationId type: object - ConversionOperationType: - enum: - - CONVERSION - type: string - ConversionOperationConfigParams: + CreateWorkflowExecutionRequest: properties: - amount: - type: string - accountId: - type: string - srcAssetId: - type: string - destAssetId: + configId: type: string - slippageBasisPoints: - maximum: 10000 - minimum: 0 - type: integer + preScreening: + $ref: '#/components/schemas/PreScreening' + params: + items: + $ref: '#/components/schemas/CreateWorkflowExecutionRequest_params_inner' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' required: - - destAssetId + - configId + - params type: object - CreateConversionConfigOperationRequest: + x-internal: true + ConfigConversionOperationSnapshot: properties: + operationId: + type: string type: $ref: '#/components/schemas/ConversionOperationType' params: $ref: '#/components/schemas/ConversionOperationConfigParams' required: + - operationId - params - type type: object - TransferOperationType: - enum: - - TRANSFER - type: string - AccountType: - enum: - - EXCHANGE_ACCOUNT - - UNMANAGED_WALLET - - VAULT_ACCOUNT - - NETWORK_CONNECTION - - FIAT_ACCOUNT - type: string - Account: + ConfigTransferOperationSnapshot: properties: - accountId: + operationId: type: string - accountType: - $ref: '#/components/schemas/AccountType' + type: + $ref: '#/components/schemas/TransferOperationType' + params: + $ref: '#/components/schemas/TransferOperationConfigParams' required: - - accountId - - accountType + - operationId + - params + - type type: object - OneTimeAddressAccount: + ConfigDisbursementOperationSnapshot: properties: - oneTimeAddress: - type: string - tag: + operationId: type: string + type: + $ref: '#/components/schemas/DisbursementOperationType' + params: + $ref: '#/components/schemas/DisbursementOperationConfigParams' required: - - oneTimeAddress + - operationId + - params + - type type: object - Destination: + ConfigOperationSnapshot: oneOf: - - $ref: '#/components/schemas/Account' - - $ref: '#/components/schemas/OneTimeAddressAccount' - TransferOperationConfigParams: + - $ref: '#/components/schemas/ConfigConversionOperationSnapshot' + - $ref: '#/components/schemas/ConfigTransferOperationSnapshot' + - $ref: '#/components/schemas/ConfigDisbursementOperationSnapshot' + WorkflowConfigurationSnapshot: properties: - amount: + configId: type: string - assetId: + configName: type: string - source: - $ref: '#/components/schemas/Account' - destination: - $ref: '#/components/schemas/Destination' + createdAt: + type: number + configOperations: + items: + $ref: '#/components/schemas/ConfigOperationSnapshot' + type: array + externalCorrelationData: + $ref: '#/components/schemas/CorrelationData' required: - - destination + - configId + - configName + - configOperations + - createdAt type: object - CreateTransferConfigOperationRequest: + x-internal: true + ExecutionOperationStatus: + enum: + - PENDING + - VALIDATION_IN_PROGRESS + - VALIDATION_FAILED + - VALIDATION_COMPLETED + - PREVIEW_REQUESTED + - PREVIEW_IN_PROGRESS + - PREVIEW_FAILED + - READY_FOR_LAUNCH + - EXECUTION_REQUESTED + - EXECUTION_IN_PROGRESS + - EXECUTION_COMPLETED + - EXECUTION_FAILED + type: string + ScreeningOperationType: + enum: + - SCREENING + type: string + ScreeningValidationFailure: properties: - type: - $ref: '#/components/schemas/TransferOperationType' - params: - $ref: '#/components/schemas/TransferOperationConfigParams' + reason: + enum: + - SCREENING_DISABLED_IN_TENANT + type: string + data: + additionalProperties: {} + type: object required: - - params - - type + - reason type: object - DisbursementOperationType: - enum: - - DISBURSEMENT - type: string - DisbursementAmountInstruction: + ScreeningVerdict: properties: - payeeAccount: + verdict: + enum: + - PASSED + - PASSED_WITH_ALERT + - REJECTED + - FAILED + - BYPASSED + type: string + executionOperationId: + type: string + account: $ref: '#/components/schemas/Destination' assetId: type: string amount: type: string + matchedRule: + $ref: '#/components/schemas/ScreeningVerdict_matchedRule' required: + - account - amount - assetId - - payeeAccount + - executionOperationId + - verdict type: object - DisbursementPercentageInstruction: + ScreeningOperationExecutionOutput: properties: - payeeAccount: - $ref: '#/components/schemas/Destination' - assetId: - type: string - percentage: + verdicts: + items: + $ref: '#/components/schemas/ScreeningVerdict' + type: array + required: + - verdicts + type: object + ScreeningOperationFailure: + properties: + reason: + enum: + - AML_PROCESS_FAILED + - SCREENING_REJECTED type: string + data: + $ref: '#/components/schemas/ScreeningOperationExecutionOutput' required: - - assetId - - payeeAccount - - percentage + - reason type: object - DisbursementInstruction: - oneOf: - - $ref: '#/components/schemas/DisbursementAmountInstruction' - - $ref: '#/components/schemas/DisbursementPercentageInstruction' - DisbursementOperationConfigParams: + ScreeningOperationExecution: properties: - paymentAccount: - $ref: '#/components/schemas/Account' - instructionSet: - items: - $ref: '#/components/schemas/DisbursementInstruction' - type: array + output: + $ref: '#/components/schemas/ScreeningOperationExecutionOutput' + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/ScreeningOperationFailure' required: - - instructionSet + - startedAt type: object - CreateDisbursementConfigOperationRequest: + ExecutionScreeningOperation: properties: - type: - $ref: '#/components/schemas/DisbursementOperationType' - params: - $ref: '#/components/schemas/DisbursementOperationConfigParams' + operationId: + type: string + status: + $ref: '#/components/schemas/ExecutionOperationStatus' + operationType: + $ref: '#/components/schemas/ScreeningOperationType' + validationFailure: + $ref: '#/components/schemas/ScreeningValidationFailure' + execution: + $ref: '#/components/schemas/ScreeningOperationExecution' required: - - params - - type + - operationId + - operationType + - status type: object - CreateConfigOperationRequest: - oneOf: - - $ref: '#/components/schemas/CreateConversionConfigOperationRequest' - - $ref: '#/components/schemas/CreateTransferConfigOperationRequest' - - $ref: '#/components/schemas/CreateDisbursementConfigOperationRequest' - CorrelationData: - oneOf: - - additionalProperties: + AssetAmount: + properties: + amount: type: string - type: object - - type: string - x-internal: true - CreateWorkflowConfigurationRequest: + assetId: + type: string + required: + - amount + - assetId + type: object + ConversionOperationPreviewOutput: properties: - configName: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + conversionRate: type: string - preScreening: - $ref: '#/components/schemas/PreScreening' - configOperations: - items: - $ref: '#/components/schemas/CreateConfigOperationRequest' - type: array - externalCorrelationData: - $ref: '#/components/schemas/CorrelationData' + timeSeconds: + type: number required: - - configName - - configOperations + - amount + - conversionRate + - fee + - timeSeconds type: object - x-internal: true - WorkflowConfigStatus: - enum: - - PENDING - - VALIDATION_IN_PROGRESS - - VALIDATION_FAILED - - READY_FOR_EXECUTION - type: string - ConfigOperationStatus: - enum: - - PENDING - - VALIDATION_IN_PROGRESS - - READY_FOR_EXECUTION - - VALIDATION_FAILED - type: string - ConversionValidationFailure: + ConversionOperationFailure: properties: reason: enum: - - ACCOUNT_NOT_FOUND - - ACCOUNT_TYPE_NOT_SUPPORTED - - INSUFFICIENT_BALANCE - - ASSET_NOT_FOUND - - ASSETS_CONTINUITY_MISMATCH - - EXCHANGE_BASKETS_MISMATCH - - ACCOUNTS_CONTINUITY_MISMATCH - - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED - - EQUAL_ACCOUNTS_NOT_ALLOWED - - EQUAL_ASSETS_NOT_ALLOWED - INVALID_AMOUNT - - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED - - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA - - ACCOUNT_IS_NOT_EXCHANGE - - UNSUPPORTED_TRADING_METHOD - - ASSETS_CAN_NOT_CONVERTED + - SLIPPAGE_EXCEEDED + - AMOUNT_TOO_SMALL + - INSUFFICIENT_FUNDS type: string data: additionalProperties: {} @@ -16153,85 +17955,191 @@ components: required: - reason type: object - ConversionConfigOperation: + ConversionOperationPreview: properties: - operationId: + input: + $ref: '#/components/schemas/ConversionOperationConfigParams' + output: + $ref: '#/components/schemas/ConversionOperationPreviewOutput' + failure: + $ref: '#/components/schemas/ConversionOperationFailure' + required: + - input + type: object + ConversionOperationExecutionOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + conversionRate: type: string - type: - $ref: '#/components/schemas/ConversionOperationType' - params: + required: + - amount + - conversionRate + - fee + type: object + ConversionOperationExecution: + properties: + input: $ref: '#/components/schemas/ConversionOperationConfigParams' + output: + $ref: '#/components/schemas/ConversionOperationExecutionOutput' + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/ConversionOperationFailure' + required: + - input + - startedAt + type: object + ExecutionConversionOperation: + properties: + operationId: + type: string status: - $ref: '#/components/schemas/ConfigOperationStatus' + $ref: '#/components/schemas/ExecutionOperationStatus' validationFailure: $ref: '#/components/schemas/ConversionValidationFailure' + operationType: + $ref: '#/components/schemas/ConversionOperationType' + preview: + $ref: '#/components/schemas/ConversionOperationPreview' + execution: + $ref: '#/components/schemas/ConversionOperationExecution' required: - operationId - - params + - operationType - status - - type type: object - TransferValidationFailure: + TransferOperationPreviewOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + isSignRequired: + type: boolean + timeSeconds: + type: number + required: + - amount + - fee + - isSignRequired + - timeSeconds + type: object + TransferOperationFailure: properties: reason: enum: - - ACCOUNT_NOT_FOUND - - ACCOUNT_TYPE_NOT_SUPPORTED - - INSUFFICIENT_BALANCE - - ASSET_NOT_FOUND - - ASSETS_CONTINUITY_MISMATCH - - EXCHANGE_BASKETS_MISMATCH - - ACCOUNTS_CONTINUITY_MISMATCH - - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED - - EQUAL_ACCOUNTS_NOT_ALLOWED - - EQUAL_ASSETS_NOT_ALLOWED - INVALID_AMOUNT - - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED - - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA + - SUBMISSION_FAILED + - TRANSACTION_FAILED type: string data: - additionalProperties: true - type: object + $ref: '#/components/schemas/TransferOperationFailure_data' required: - reason type: object - TransferConfigOperation: + TransferOperationPreview: + properties: + input: + $ref: '#/components/schemas/TransferOperationConfigParams' + output: + $ref: '#/components/schemas/TransferOperationPreviewOutput' + failure: + $ref: '#/components/schemas/TransferOperationFailure' + required: + - input + type: object + TransferOperationExecutionOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + required: + - amount + - fee + type: object + TransferOperationExecution: + properties: + input: + $ref: '#/components/schemas/TransferOperationConfigParams' + output: + $ref: '#/components/schemas/TransferOperationExecutionOutput' + txId: + type: string + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/TransferOperationFailure' + required: + - input + - startedAt + type: object + ExecutionTransferOperation: properties: operationId: type: string - type: - $ref: '#/components/schemas/TransferOperationType' - params: - $ref: '#/components/schemas/TransferOperationConfigParams' status: - $ref: '#/components/schemas/ConfigOperationStatus' + $ref: '#/components/schemas/ExecutionOperationStatus' validationFailure: $ref: '#/components/schemas/TransferValidationFailure' + operationType: + $ref: '#/components/schemas/TransferOperationType' + preview: + $ref: '#/components/schemas/TransferOperationPreview' + execution: + $ref: '#/components/schemas/TransferOperationExecution' + required: + - operationId + - operationType + - status + type: object + DisbursementOperationInput: + properties: + amount: + type: string + paymentAccount: + $ref: '#/components/schemas/Account' + instructionSet: + items: + $ref: '#/components/schemas/DisbursementInstruction' + type: array + required: + - instructionSet + - paymentAccount + type: object + DisbursementInstructionOutput: + properties: + amount: + $ref: '#/components/schemas/AssetAmount' + fee: + $ref: '#/components/schemas/AssetAmount' + payeeAccount: + $ref: '#/components/schemas/Destination' + required: + - amount + - fee + - payeeAccount + type: object + DisbursementOperationPreviewOutput: + properties: + instructionSet: + items: + $ref: '#/components/schemas/DisbursementOperationPreviewOutput_instructionSet_inner' + type: array required: - - operationId - - params - - status - - type + - instructionSet type: object - DisbursementValidationFailure: + OperationExecutionFailure: properties: reason: - enum: - - ACCOUNT_NOT_FOUND - - ACCOUNT_TYPE_NOT_SUPPORTED - - INSUFFICIENT_BALANCE - - ASSET_NOT_FOUND - - ASSETS_CONTINUITY_MISMATCH - - EXCHANGE_BASKETS_MISMATCH - - ACCOUNTS_CONTINUITY_MISMATCH - - ONE_TIME_ADDRESS_CONTINUITY_NOT_ALLOWED - - EQUAL_ACCOUNTS_NOT_ALLOWED - - EQUAL_ASSETS_NOT_ALLOWED - - INVALID_AMOUNT - - UNMANAGED_WALLET_AS_SOURCE_NOT_ALLOWED - - MANAGED_OPERATION_PARAMS_INVALID_SCHEMA - - INSTRUCTIONS_EXCEED_HUNDRED_PERCENT - - INSTRUCTIONS_ARRAY_EMPTY type: string data: additionalProperties: {} @@ -16239,1184 +18147,2323 @@ components: required: - reason type: object - DisbursementConfigOperation: + DisbursementOperationPreview: + properties: + input: + $ref: '#/components/schemas/DisbursementOperationInput' + output: + $ref: '#/components/schemas/DisbursementOperationPreviewOutput' + failure: + $ref: '#/components/schemas/OperationExecutionFailure' + required: + - input + type: object + DisbursementOperationExecutionOutput: + properties: + instructionSet: + items: + $ref: '#/components/schemas/DisbursementInstructionOutput' + type: array + required: + - instructionSet + type: object + DisbursementOperationExecution: + properties: + input: + $ref: '#/components/schemas/DisbursementOperationInput' + output: + $ref: '#/components/schemas/DisbursementOperationExecutionOutput' + payoutId: + type: string + startedAt: + type: number + finishedAt: + type: number + failure: + $ref: '#/components/schemas/OperationExecutionFailure' + required: + - input + - startedAt + type: object + ExecutionDisbursementOperation: properties: operationId: type: string - type: - $ref: '#/components/schemas/DisbursementOperationType' - params: - $ref: '#/components/schemas/DisbursementOperationConfigParams' status: - $ref: '#/components/schemas/ConfigOperationStatus' + $ref: '#/components/schemas/ExecutionOperationStatus' validationFailure: $ref: '#/components/schemas/DisbursementValidationFailure' + operationType: + $ref: '#/components/schemas/DisbursementOperationType' + preview: + $ref: '#/components/schemas/DisbursementOperationPreview' + execution: + $ref: '#/components/schemas/DisbursementOperationExecution' required: - operationId - - params + - operationType - status - - type type: object - ConfigOperation: + WorkflowExecutionOperation: oneOf: - - $ref: '#/components/schemas/ConversionConfigOperation' - - $ref: '#/components/schemas/TransferConfigOperation' - - $ref: '#/components/schemas/DisbursementConfigOperation' - WorkflowConfiguration: + - $ref: '#/components/schemas/ExecutionScreeningOperation' + - $ref: '#/components/schemas/ExecutionConversionOperation' + - $ref: '#/components/schemas/ExecutionTransferOperation' + - $ref: '#/components/schemas/ExecutionDisbursementOperation' + WorkflowExecution: properties: - configId: - type: string - configName: + executionId: type: string preScreening: $ref: '#/components/schemas/PreScreening' - status: - $ref: '#/components/schemas/WorkflowConfigStatus' - createdAt: - type: number - configOperations: + configSnapshot: + $ref: '#/components/schemas/WorkflowConfigurationSnapshot' + executionOperations: items: - $ref: '#/components/schemas/ConfigOperation' + $ref: '#/components/schemas/WorkflowExecutionOperation' type: array + status: + enum: + - PENDING + - VALIDATION_IN_PROGRESS + - VALIDATION_FAILED + - VALIDATION_COMPLETED + - PREVIEW_IN_PROGRESS + - PREVIEW_FAILED + - READY_FOR_LAUNCH + - EXECUTION_IN_PROGRESS + - EXECUTION_COMPLETED + - EXECUTION_FAILED + type: string + triggeredBy: + type: string + triggeredAt: + type: number + finishedAt: + type: number externalCorrelationData: $ref: '#/components/schemas/CorrelationData' required: - - configId - - configName - - configOperations - - createdAt + - configSnapshot + - executionId + - executionOperations - status type: object x-internal: true - WorkflowConfigurationId: + GasStationConfigurationResponse: + example: + gasThreshold: gasThreshold + maxGasPrice: maxGasPrice + gasCap: gasCap properties: - configId: + gasThreshold: type: string - required: - - configId - type: object - ConversionOperationExecutionParams: - properties: - configOperationId: + gasCap: type: string - executionParams: - $ref: '#/components/schemas/ConversionOperationExecutionParams_executionParams' - required: - - configOperationId - type: object - TransferOperationExecutionParams: - properties: - configOperationId: + maxGasPrice: + nullable: true type: string - executionParams: - $ref: '#/components/schemas/TransferOperationExecutionParams_executionParams' - required: - - configOperationId type: object - DisbursementOperationExecutionParams: + GasStationPropertiesResponse: + example: + balance: "{}" + configuration: + gasThreshold: gasThreshold + maxGasPrice: maxGasPrice + gasCap: gasCap properties: - configOperationId: - type: string - executionParams: - $ref: '#/components/schemas/DisbursementOperationExecutionParams_executionParams' - required: - - configOperationId + balance: + type: object + configuration: + $ref: '#/components/schemas/GasStationConfigurationResponse' type: object - CreateWorkflowExecutionRequest: + GasStationConfiguration: + example: + gasThreshold: gasThreshold + maxGasPrice: maxGasPrice + gasCap: gasCap properties: - configId: + gasThreshold: type: string - preScreening: - $ref: '#/components/schemas/PreScreening' - params: - items: - $ref: '#/components/schemas/CreateWorkflowExecutionRequest_params_inner' - type: array - externalCorrelationData: - $ref: '#/components/schemas/CorrelationData' - required: - - configId - - params - type: object - x-internal: true - ConfigConversionOperationSnapshot: - properties: - operationId: + gasCap: type: string - type: - $ref: '#/components/schemas/ConversionOperationType' - params: - $ref: '#/components/schemas/ConversionOperationConfigParams' - required: - - operationId - - params - - type - type: object - ConfigTransferOperationSnapshot: - properties: - operationId: + maxGasPrice: type: string - type: - $ref: '#/components/schemas/TransferOperationType' - params: - $ref: '#/components/schemas/TransferOperationConfigParams' - required: - - operationId - - params - - type type: object - ConfigDisbursementOperationSnapshot: + EditGasStationConfigurationResponse: + example: + success: true properties: - operationId: - type: string - type: - $ref: '#/components/schemas/DisbursementOperationType' - params: - $ref: '#/components/schemas/DisbursementOperationConfigParams' + success: + description: Indicates whether editing the gas station configuration was + successful + type: boolean required: - - operationId - - params - - type + - success type: object - ConfigOperationSnapshot: - oneOf: - - $ref: '#/components/schemas/ConfigConversionOperationSnapshot' - - $ref: '#/components/schemas/ConfigTransferOperationSnapshot' - - $ref: '#/components/schemas/ConfigDisbursementOperationSnapshot' - WorkflowConfigurationSnapshot: + UserGroupResponse: + example: + name: name + id: id + memberIds: + - memberIds + - memberIds + status: status properties: - configId: + id: type: string - configName: + name: type: string - createdAt: - type: number - configOperations: + status: + type: string + memberIds: items: - $ref: '#/components/schemas/ConfigOperationSnapshot' + type: string type: array - externalCorrelationData: - $ref: '#/components/schemas/CorrelationData' - required: - - configId - - configName - - configOperations - - createdAt type: object - x-internal: true - ExecutionOperationStatus: - enum: - - PENDING - - VALIDATION_IN_PROGRESS - - VALIDATION_FAILED - - VALIDATION_COMPLETED - - PREVIEW_REQUESTED - - PREVIEW_IN_PROGRESS - - PREVIEW_FAILED - - READY_FOR_LAUNCH - - EXECUTION_REQUESTED - - EXECUTION_IN_PROGRESS - - EXECUTION_COMPLETED - - EXECUTION_FAILED - type: string - ScreeningOperationType: - enum: - - SCREENING - type: string - ScreeningValidationFailure: + UserGroupsResponse: + items: + $ref: '#/components/schemas/UserGroupResponse' + type: array + UserGroupCreateRequest: + example: + groupName: groupName + memberIds: + - memberIds + - memberIds properties: - reason: - enum: - - SCREENING_DISABLED_IN_TENANT + groupName: type: string - data: - additionalProperties: {} - type: object - required: - - reason + memberIds: + items: + type: string + type: array type: object - ScreeningVerdict: + CreateUserGroupResponse: + example: + name: name + id: id + memberIds: + - memberIds + - memberIds + status: status properties: - verdict: - enum: - - PASSED - - PASSED_WITH_ALERT - - REJECTED - - FAILED - - BYPASSED - type: string - executionOperationId: + id: type: string - account: - $ref: '#/components/schemas/Destination' - assetId: + name: type: string - amount: + memberIds: + items: + type: string + type: array + status: type: string - matchedRule: - $ref: '#/components/schemas/ScreeningVerdict_matchedRule' - required: - - account - - amount - - assetId - - executionOperationId - - verdict type: object - ScreeningOperationExecutionOutput: + UserGroupUpdateRequest: + example: + groupName: groupName + memberIds: + - memberIds + - memberIds properties: - verdicts: + groupName: + type: string + memberIds: items: - $ref: '#/components/schemas/ScreeningVerdict' + type: string type: array - required: - - verdicts type: object - ScreeningOperationFailure: + UserGroupCreateResponse: + example: + name: name + id: id + memberIds: + - memberIds + - memberIds + status: status properties: - reason: - enum: - - AML_PROCESS_FAILED - - SCREENING_REJECTED + name: + type: string + id: + type: string + memberIds: + items: + type: string + type: array + status: type: string - data: - $ref: '#/components/schemas/ScreeningOperationExecutionOutput' - required: - - reason type: object - ScreeningOperationExecution: + UserResponse: + example: + firstName: firstName + lastName: lastName + role: role + id: id + email: email + enabled: true properties: - output: - $ref: '#/components/schemas/ScreeningOperationExecutionOutput' - startedAt: - type: number - finishedAt: - type: number - failure: - $ref: '#/components/schemas/ScreeningOperationFailure' - required: - - startedAt + id: + type: string + firstName: + type: string + lastName: + type: string + role: + type: string + email: + type: string + enabled: + type: boolean type: object - ExecutionScreeningOperation: + GetUsersResponse: + items: + $ref: '#/components/schemas/UserResponse' + type: array + GetAuditLogsResponseDTO: + example: + cursor: cursor + total: 0.8008281904610115 + data: + - "{}" + - "{}" properties: - operationId: + data: + items: + type: object + type: array + total: + type: number + cursor: + nullable: true type: string - status: - $ref: '#/components/schemas/ExecutionOperationStatus' - operationType: - $ref: '#/components/schemas/ScreeningOperationType' - validationFailure: - $ref: '#/components/schemas/ScreeningValidationFailure' - execution: - $ref: '#/components/schemas/ScreeningOperationExecution' - required: - - operationId - - operationType - - status type: object - AssetAmount: + AuditLogData: + example: + createdAt: createdAt + subject: subject + tenantId: tenantId + id: id + event: event + user: user + userId: userId + timestamp: timestamp properties: - amount: + id: + description: The unique identifier of the audit log type: string - assetId: + timestamp: + description: The timestamp of the audit log type: string - required: - - amount - - assetId - type: object - ConversionOperationPreviewOutput: - properties: - amount: - $ref: '#/components/schemas/AssetAmount' - fee: - $ref: '#/components/schemas/AssetAmount' - conversionRate: + createdAt: + description: The timestamp of the audit log creation + type: string + user: + description: The user who performed the action + type: string + subject: + description: The subject of the action + type: string + event: + description: The event that was performed + type: string + tenantId: + description: The tenant ID of the audit log + type: string + userId: + description: The user ID of the audit log type: string - timeSeconds: - type: number - required: - - amount - - conversionRate - - fee - - timeSeconds type: object - ConversionOperationFailure: - properties: - reason: - enum: - - INVALID_AMOUNT - - SLIPPAGE_EXCEEDED - - AMOUNT_TOO_SMALL - - INSUFFICIENT_FUNDS - type: string + AuditLogsData: + items: + $ref: '#/components/schemas/AuditLogData' + type: array + GetAuditLogsResponse: + example: + cursor: cursor + total: 0.8008281904610115 data: - additionalProperties: {} - type: object - required: - - reason - type: object - ConversionOperationPreview: - properties: - input: - $ref: '#/components/schemas/ConversionOperationConfigParams' - output: - $ref: '#/components/schemas/ConversionOperationPreviewOutput' - failure: - $ref: '#/components/schemas/ConversionOperationFailure' - required: - - input - type: object - ConversionOperationExecutionOutput: + - createdAt: createdAt + subject: subject + tenantId: tenantId + id: id + event: event + user: user + userId: userId + timestamp: timestamp + - createdAt: createdAt + subject: subject + tenantId: tenantId + id: id + event: event + user: user + userId: userId + timestamp: timestamp properties: - amount: - $ref: '#/components/schemas/AssetAmount' - fee: - $ref: '#/components/schemas/AssetAmount' - conversionRate: + data: + items: + $ref: '#/components/schemas/AuditLogData' + type: array + cursor: + description: The next id to start fetch audit logs from + nullable: true type: string - required: - - amount - - conversionRate - - fee - type: object - ConversionOperationExecution: - properties: - input: - $ref: '#/components/schemas/ConversionOperationConfigParams' - output: - $ref: '#/components/schemas/ConversionOperationExecutionOutput' - startedAt: - type: number - finishedAt: + total: + description: The total number of audit logs type: number - failure: - $ref: '#/components/schemas/ConversionOperationFailure' - required: - - input - - startedAt type: object - ExecutionConversionOperation: + AddCollateralRequestBody: + example: + isSrcCollateral: true + transactionRequest: + note: Ticket 123 + priorityFee: "2" + networkFee: TransactionRequest_networkFee + fee: TransactionRequest_fee + destination: + oneTimeAddress: + address: address + tag: tag + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + extraParameters: "{}" + source: + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + maxFee: "120" + externalTxId: 00000000-0000-0000-0000-000000000000 + cpuStaking: null + gasLimit: "21000" + failOnLowFee: true + assetId: ETH + feeLevel: MEDIUM + gasPrice: TransactionRequest_gasPrice + forceSweep: false + amount: "0.02" + destinations: + - amount: amount + destination: + oneTimeAddress: + address: address + tag: tag + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + - amount: amount + destination: + oneTimeAddress: + address: address + tag: tag + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + travelRuleMessage: + originatorProof: "" + originator: "" + beneficiaryVASPname: beneficiaryVASPname + pii: "" + protocol: protocol + skipBeneficiaryDataValidation: true + beneficiary: "" + encrypted: encrypted + travelRuleBehavior: true + transactionBlockchainInfo: "" + beneficiaryProof: "" + originatorVASPdid: originatorVASPdid + beneficiaryVASPdid: beneficiaryVASPdid + customerRefId: abcdef + treatAsGrossAmount: false + networkStaking: TransactionRequest_networkStaking + autoStaking: true + operation: null + replaceTxByHash: 00000000-0000-0000-0000-000000000000 properties: - operationId: - type: string - status: - $ref: '#/components/schemas/ExecutionOperationStatus' - validationFailure: - $ref: '#/components/schemas/ConversionValidationFailure' - operationType: - $ref: '#/components/schemas/ConversionOperationType' - preview: - $ref: '#/components/schemas/ConversionOperationPreview' - execution: - $ref: '#/components/schemas/ConversionOperationExecution' - required: - - operationId - - operationType - - status + transactionRequest: + $ref: '#/components/schemas/TransactionRequest' + isSrcCollateral: + description: optional + type: boolean type: object - TransferOperationPreviewOutput: + RemoveCollateralRequestBody: + example: + transactionRequest: + note: Ticket 123 + priorityFee: "2" + networkFee: TransactionRequest_networkFee + fee: TransactionRequest_fee + destination: + oneTimeAddress: + address: address + tag: tag + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + extraParameters: "{}" + source: + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + maxFee: "120" + externalTxId: 00000000-0000-0000-0000-000000000000 + cpuStaking: null + gasLimit: "21000" + failOnLowFee: true + assetId: ETH + feeLevel: MEDIUM + gasPrice: TransactionRequest_gasPrice + forceSweep: false + amount: "0.02" + destinations: + - amount: amount + destination: + oneTimeAddress: + address: address + tag: tag + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + - amount: amount + destination: + oneTimeAddress: + address: address + tag: tag + walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + subType: null + id: id + type: null + travelRuleMessage: + originatorProof: "" + originator: "" + beneficiaryVASPname: beneficiaryVASPname + pii: "" + protocol: protocol + skipBeneficiaryDataValidation: true + beneficiary: "" + encrypted: encrypted + travelRuleBehavior: true + transactionBlockchainInfo: "" + beneficiaryProof: "" + originatorVASPdid: originatorVASPdid + beneficiaryVASPdid: beneficiaryVASPdid + customerRefId: abcdef + treatAsGrossAmount: false + networkStaking: TransactionRequest_networkStaking + autoStaking: true + operation: null + replaceTxByHash: 00000000-0000-0000-0000-000000000000 + isDstCollateral: true properties: - amount: - $ref: '#/components/schemas/AssetAmount' - fee: - $ref: '#/components/schemas/AssetAmount' - isSignRequired: + transactionRequest: + $ref: '#/components/schemas/TransactionRequest' + isDstCollateral: + description: optional type: boolean - timeSeconds: - type: number - required: - - amount - - fee - - isSignRequired - - timeSeconds type: object - TransferOperationFailure: + SettlementRequestBody: + example: + mainExchangeAccountId: mainExchangeAccountId properties: - reason: - enum: - - INVALID_AMOUNT - - SUBMISSION_FAILED - - TRANSACTION_FAILED + mainExchangeAccountId: type: string - data: - $ref: '#/components/schemas/TransferOperationFailure_data' - required: - - reason - type: object - TransferOperationPreview: - properties: - input: - $ref: '#/components/schemas/TransferOperationConfigParams' - output: - $ref: '#/components/schemas/TransferOperationPreviewOutput' - failure: - $ref: '#/components/schemas/TransferOperationFailure' - required: - - input type: object - TransferOperationExecutionOutput: + ToExchangeTransaction: + example: + amount: amount + assetId: assetId + dstAddress: dstAddress + dstTag: dstTag properties: + assetId: + type: string amount: - $ref: '#/components/schemas/AssetAmount' - fee: - $ref: '#/components/schemas/AssetAmount' - required: - - amount - - fee - type: object - TransferOperationExecution: - properties: - input: - $ref: '#/components/schemas/TransferOperationConfigParams' - output: - $ref: '#/components/schemas/TransferOperationExecutionOutput' - txId: type: string - startedAt: - type: number - finishedAt: - type: number - failure: - $ref: '#/components/schemas/TransferOperationFailure' - required: - - input - - startedAt - type: object - ExecutionTransferOperation: - properties: - operationId: + dstAddress: type: string - status: - $ref: '#/components/schemas/ExecutionOperationStatus' - validationFailure: - $ref: '#/components/schemas/TransferValidationFailure' - operationType: - $ref: '#/components/schemas/TransferOperationType' - preview: - $ref: '#/components/schemas/TransferOperationPreview' - execution: - $ref: '#/components/schemas/TransferOperationExecution' - required: - - operationId - - operationType - - status - type: object - DisbursementOperationInput: - properties: - amount: + dstTag: + description: optional type: string - paymentAccount: - $ref: '#/components/schemas/Account' - instructionSet: - items: - $ref: '#/components/schemas/DisbursementInstruction' - type: array - required: - - instructionSet - - paymentAccount type: object - DisbursementInstructionOutput: + ToCollateralTransaction: + example: + amount: amount + srcTag: srcTag + fee: fee + srcAddress: srcAddress + asset: asset properties: + asset: + type: string amount: - $ref: '#/components/schemas/AssetAmount' + type: string + srcAddress: + type: string + srcTag: + description: optional + type: string fee: - $ref: '#/components/schemas/AssetAmount' - payeeAccount: - $ref: '#/components/schemas/Destination' - required: - - amount - - fee - - payeeAccount + description: optional + type: string type: object - DisbursementOperationPreviewOutput: + ExchangeSettlementTransactionsResponse: + example: + toCollateral: + - amount: amount + srcTag: srcTag + fee: fee + srcAddress: srcAddress + asset: asset + - amount: amount + srcTag: srcTag + fee: fee + srcAddress: srcAddress + asset: asset + toExchange: + - amount: amount + assetId: assetId + dstAddress: dstAddress + dstTag: dstTag + - amount: amount + assetId: assetId + dstAddress: dstAddress + dstTag: dstTag properties: - instructionSet: + toExchange: items: - $ref: '#/components/schemas/DisbursementOperationPreviewOutput_instructionSet_inner' + $ref: '#/components/schemas/ToExchangeTransaction' + type: array + toCollateral: + items: + $ref: '#/components/schemas/ToCollateralTransaction' type: array - required: - - instructionSet type: object - OperationExecutionFailure: + SettlementResponse: + example: + fireblocksInitiatedTransactions: "{}" + initiator: initiator + exchangeRequestedTransactions: + toCollateral: + - amount: amount + srcTag: srcTag + fee: fee + srcAddress: srcAddress + asset: asset + - amount: amount + srcTag: srcTag + fee: fee + srcAddress: srcAddress + asset: asset + toExchange: + - amount: amount + assetId: assetId + dstAddress: dstAddress + dstTag: dstTag + - amount: amount + assetId: assetId + dstAddress: dstAddress + dstTag: dstTag + id: id + exchangeReply: exchangeReply properties: - reason: + id: type: string - data: - additionalProperties: {} + initiator: + type: string + exchangeReply: + type: string + fireblocksInitiatedTransactions: type: object + exchangeRequestedTransactions: + $ref: '#/components/schemas/ExchangeSettlementTransactionsResponse' + type: object + ResendWebhooksResponse: + example: + messagesCount: 0.8008281904610115 + properties: + messagesCount: + type: number + type: object + ResendTransactionWebhooksRequest: + example: + resendCreated: true + resendStatusUpdated: true + properties: + resendCreated: + type: boolean + resendStatusUpdated: + type: boolean + type: object + ResendWebhooksByTransactionIdResponse: + example: + success: true + properties: + success: + description: Indicates whether the webhooks were successfully resent + type: boolean required: - - reason + - success type: object - DisbursementOperationPreview: + AuditorData: properties: - input: - $ref: '#/components/schemas/DisbursementOperationInput' - output: - $ref: '#/components/schemas/DisbursementOperationPreviewOutput' - failure: - $ref: '#/components/schemas/OperationExecutionFailure' + name: + type: string + imageURL: + type: string + link: + type: string required: - - input + - imageURL + - link + - name type: object - DisbursementOperationExecutionOutput: + ContractAttributes: properties: - instructionSet: + useCases: + items: + type: string + type: array + standards: items: - $ref: '#/components/schemas/DisbursementInstructionOutput' + type: string type: array + auditor: + $ref: '#/components/schemas/AuditorData' required: - - instructionSet + - auditor + - standards + - useCases type: object - DisbursementOperationExecution: + VendorDto: properties: - input: - $ref: '#/components/schemas/DisbursementOperationInput' - output: - $ref: '#/components/schemas/DisbursementOperationExecutionOutput' - payoutId: + id: + description: The unique identifier of the vendor of this contract template + example: b70701f4-d7b1-4795-a8ee-b09cdb5b4453 + type: string + name: + description: The name of the vendor of this contract template + example: Fireblocks type: string - startedAt: - type: number - finishedAt: - type: number - failure: - $ref: '#/components/schemas/OperationExecutionFailure' required: - - input - - startedAt + - id + - name type: object - ExecutionDisbursementOperation: + LeanContractDto: + example: + owner: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + canDeploy: true + vendor: "" + name: My Contract + description: an ERC20 implementation + isPublic: true + attributes: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: FUNGIBLE_TOKEN properties: - operationId: + id: + description: The unique identifier of the contract template + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + name: + description: The name of the contract template + example: My Contract + type: string + description: + description: A short description of the contract template + example: an ERC20 implementation + type: string + attributes: + allOf: + - $ref: '#/components/schemas/ContractAttributes' + description: The attributes related to this contract template. It will be + displayed in the tokenization page + example: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + isPublic: + description: Is this a contract that is viewable by all fireblocks's users + or is it visible only for this workspace + example: true + type: boolean + canDeploy: + description: "True if the workspace allowed to deploy this contract, false\ + \ otherwise" + example: true + type: boolean + owner: + description: "The workspace id of the owner of this contract template. If\ + \ it's a private contract, only this workspace will be allowed to deploy\ + \ it" + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + vendor: + allOf: + - $ref: '#/components/schemas/VendorDto' + description: The details of the vendor of this contract template. Applicable + only for public contract templates + type: + enum: + - FUNGIBLE_TOKEN + - NON_FUNGIBLE_TOKEN + - NON_TOKEN + - TOKEN_EXTENSION + - TOKEN_UTILITY type: string - status: - $ref: '#/components/schemas/ExecutionOperationStatus' - validationFailure: - $ref: '#/components/schemas/DisbursementValidationFailure' - operationType: - $ref: '#/components/schemas/DisbursementOperationType' - preview: - $ref: '#/components/schemas/DisbursementOperationPreview' - execution: - $ref: '#/components/schemas/DisbursementOperationExecution' required: - - operationId - - operationType - - status + - description + - id + - isPublic + - name type: object - WorkflowExecutionOperation: - oneOf: - - $ref: '#/components/schemas/ExecutionScreeningOperation' - - $ref: '#/components/schemas/ExecutionConversionOperation' - - $ref: '#/components/schemas/ExecutionTransferOperation' - - $ref: '#/components/schemas/ExecutionDisbursementOperation' - WorkflowExecution: + TemplatesPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - owner: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + canDeploy: true + vendor: "" + name: My Contract + description: an ERC20 implementation + isPublic: true + attributes: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: FUNGIBLE_TOKEN + - owner: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + canDeploy: true + vendor: "" + name: My Contract + description: an ERC20 implementation + isPublic: true + attributes: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: FUNGIBLE_TOKEN properties: - executionId: - type: string - preScreening: - $ref: '#/components/schemas/PreScreening' - configSnapshot: - $ref: '#/components/schemas/WorkflowConfigurationSnapshot' - executionOperations: + data: + description: The data of the current page items: - $ref: '#/components/schemas/WorkflowExecutionOperation' + $ref: '#/components/schemas/LeanContractDto' type: array - status: - enum: - - PENDING - - VALIDATION_IN_PROGRESS - - VALIDATION_FAILED - - VALIDATION_COMPLETED - - PREVIEW_IN_PROGRESS - - PREVIEW_FAILED - - READY_FOR_LAUNCH - - EXECUTION_IN_PROGRESS - - EXECUTION_COMPLETED - - EXECUTION_FAILED - type: string - triggeredBy: + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true type: string - triggeredAt: - type: number - finishedAt: - type: number - externalCorrelationData: - $ref: '#/components/schemas/CorrelationData' required: - - configSnapshot - - executionId - - executionOperations - - status + - data type: object - x-internal: true - GasStationConfigurationResponse: - example: - gasThreshold: gasThreshold - maxGasPrice: maxGasPrice - gasCap: gasCap + FunctionDoc: properties: - gasThreshold: + details: + description: A description of the function type: string - gasCap: + params: + additionalProperties: + type: string + description: A description of the function parameters + type: object + returns: + additionalProperties: + type: string + description: A description of the function return values. only for read + functions + type: object + type: object + ContractDoc: + properties: + details: + description: A description of the contract + example: A token that can be minted and burned type: string - maxGasPrice: - nullable: true + events: + description: A description of the contract`s events + example: "Upgraded(address): {\"details\": \"Emitted when the implementation\ + \ is upgraded.\"}" + type: string + kind: + description: Is it devdoc or userdoc + example: dev + type: string + methods: + additionalProperties: + $ref: '#/components/schemas/FunctionDoc' + description: The description of the contract functions + example: + constructor: + details: Initializes the contract + type: object + version: + description: The version of the contract + example: "1" type: string + required: + - kind + - methods + - version type: object - GasStationPropertiesResponse: + Parameter: example: - balance: "{}" - configuration: - gasThreshold: gasThreshold - maxGasPrice: maxGasPrice - gasCap: gasCap + components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string properties: - balance: - type: object - configuration: - $ref: '#/components/schemas/GasStationConfigurationResponse' + name: + description: The name of the parameter as it appears in the ABI + example: _name + type: string + description: + description: "A description of the parameter, fetched from the devdoc of\ + \ this contract" + example: The name of the token + type: string + internalType: + description: The internal type of the parameter as it appears in the ABI + example: string + type: string + type: + description: The type of the parameter as it appears in the ABI + example: string + type: string + components: + items: + $ref: '#/components/schemas/Parameter' + type: array + required: + - name + - type type: object - GasStationConfiguration: + AbiFunction: example: - gasThreshold: gasThreshold - maxGasPrice: maxGasPrice - gasCap: gasCap + outputs: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + inputs: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: mint + stateMutability: pure + description: description + type: constructor properties: - gasThreshold: + name: + description: The name of the contract function as it appears in the ABI + example: mint type: string - gasCap: + stateMutability: + description: The state mutability of the contract function as it appears + in the ABI + enum: + - pure + - view + - nonpayable + - payable + example: pure type: string - maxGasPrice: + type: + description: The type if the function + enum: + - function + - constructor + example: constructor + type: string + inputs: + description: The parameters that this function/constructor posses + items: + $ref: '#/components/schemas/Parameter' + type: array + outputs: + description: The parameters that this 'read' function returns + items: + $ref: '#/components/schemas/Parameter' + type: array + description: + description: The documentation of this function (if has any) type: string + required: + - inputs + - type type: object - EditGasStationConfigurationResponse: + ContractUploadRequest: example: - success: true + longDescription: | + a full ERC20 implementation, containing the following: + + - mint + - burn + bytecode: bytecode + docs: + details: "This contract implements an upgradeable proxy. It is upgradeable\ + \ because calls are delegated to an implementation address that can be\ + \ changed. This address is stored in storage in the location specified\ + \ by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't\ + \ conflict with the storage layout of the implementation behind the proxy." + errors: + ERC1967NonPayable(): + - details: An upgrade function sees `msg.value > 0` that may be lost. + events: + Upgraded(address): + details: Emitted when the implementation is upgraded. + kind: dev + methods: + constructor: + details: "Initializes the upgradeable proxy with an initial implementation\ + \ specified by `implementation`. If `_data` is nonempty, it's used\ + \ as data in a delegate call to `implementation`. This will typically\ + \ be an encoded function call, and allows initializing the storage\ + \ of the proxy like a Solidity constructor. Requirements: - If `data`\ + \ is empty, `msg.value` must be zero." + version: 1 + name: My Contract + description: an ERC20 implementation + abi: + - - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor + - - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor + attributes: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + type: FUNGIBLE_TOKEN + sourcecode: sourcecode properties: - success: - description: Indicates whether editing the gas station configuration was - successful - type: boolean + name: + description: The name of the contract template + example: My Contract + type: string + description: + description: A short description of the contract template + example: an ERC20 implementation + type: string + longDescription: + description: "A full description of the contract template. May contain \n\ + \ to break the lines" + example: | + a full ERC20 implementation, containing the following: + + - mint + - burn + type: string + bytecode: + description: The compiled artifact of this smart contract. Used for deployment + of this contract template + type: string + sourcecode: + description: The source code of the contract. Optional. + type: string + type: + description: The type of the contract template + enum: + - FUNGIBLE_TOKEN + - NON_FUNGIBLE_TOKEN + - NON_TOKEN + - TOKEN_EXTENSION + - TOKEN_UTILITY + example: FUNGIBLE_TOKEN + type: string + docs: + allOf: + - $ref: '#/components/schemas/ContractDoc' + description: A `natspec` compliant documentation json. Can be retrieved + from the output json after compilation + example: + details: "This contract implements an upgradeable proxy. It is upgradeable\ + \ because calls are delegated to an implementation address that can\ + \ be changed. This address is stored in storage in the location specified\ + \ by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't\ + \ conflict with the storage layout of the implementation behind the\ + \ proxy." + errors: + ERC1967NonPayable(): + - details: An upgrade function sees `msg.value > 0` that may be lost. + events: + Upgraded(address): + details: Emitted when the implementation is upgraded. + kind: dev + methods: + constructor: + details: "Initializes the upgradeable proxy with an initial implementation\ + \ specified by `implementation`. If `_data` is nonempty, it's used\ + \ as data in a delegate call to `implementation`. This will typically\ + \ be an encoded function call, and allows initializing the storage\ + \ of the proxy like a Solidity constructor. Requirements: - If `data`\ + \ is empty, `msg.value` must be zero." + version: 1 + abi: + items: + description: The abi of the contract template. Necessary for displaying + and for after deployment encoding + example: + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor + items: + $ref: '#/components/schemas/AbiFunction' + type: array + type: array + attributes: + allOf: + - $ref: '#/components/schemas/ContractAttributes' + description: The attributes related to this contract template. It will be + displayed in the tokenization page + example: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report required: - - success + - abi + - bytecode + - description + - name type: object - UserGroupResponse: + ContractTemplateDto: example: - name: name - id: id - memberIds: - - memberIds - - memberIds - status: status + longDescription: | + a full ERC20 implementation, containing the following: + + - mint + - burn + owner: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + description: an ERC20 implementation + abi: + - - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor + - - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor + initializationPhase: ON_DEPLOYMENT + type: FUNGIBLE_TOKEN + docs: + details: "This contract implements an upgradeable proxy. It is upgradeable\ + \ because calls are delegated to an implementation address that can be\ + \ changed. This address is stored in storage in the location specified\ + \ by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't\ + \ conflict with the storage layout of the implementation behind the proxy." + errors: + ERC1967NonPayable(): + - details: An upgrade function sees `msg.value > 0` that may be lost. + events: + Upgraded(address): + details: Emitted when the implementation is upgraded. + kind: dev + methods: + constructor: + details: "Initializes the upgradeable proxy with an initial implementation\ + \ specified by `implementation`. If `_data` is nonempty, it's used\ + \ as data in a delegate call to `implementation`. This will typically\ + \ be an encoded function call, and allows initializing the storage\ + \ of the proxy like a Solidity constructor. Requirements: - If `data`\ + \ is empty, `msg.value` must be zero." + version: 1 + canDeploy: true + vendor: "" + name: My Contract + implementationContractId: implementationContractId + isPublic: true + attributes: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d properties: id: + description: The unique identifier of the contract template + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string name: + description: The name of the contract template + example: My Contract type: string - status: + description: + description: A short description of the contract template + example: an ERC20 implementation + type: string + longDescription: + description: "A full description of the contract template. May contain \n\ + \ to break the lines" + example: | + a full ERC20 implementation, containing the following: + + - mint + - burn type: string - memberIds: + abi: items: - type: string + description: The abi of the contract template. Necessary for displaying + and for after deployment encoding + example: + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: payable + type: constructor + items: + $ref: '#/components/schemas/AbiFunction' + type: array type: array + attributes: + allOf: + - $ref: '#/components/schemas/ContractAttributes' + description: The attributes related to this contract template. It will be + displayed in the tokenization page + example: + useCases: + - Stablecoin + - CBDC + standards: + - ERC-20 + - ERC-1400 + auditor: + name: MyAuditor + imageURL: https://my-images.com/my-image.jpg + link: https://my-auditor.com/my-audit-report + docs: + allOf: + - $ref: '#/components/schemas/ContractDoc' + description: A `natspec` compliant documentation json. Can be retrieved + from the output json after compilation + example: + details: "This contract implements an upgradeable proxy. It is upgradeable\ + \ because calls are delegated to an implementation address that can\ + \ be changed. This address is stored in storage in the location specified\ + \ by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't\ + \ conflict with the storage layout of the implementation behind the\ + \ proxy." + errors: + ERC1967NonPayable(): + - details: An upgrade function sees `msg.value > 0` that may be lost. + events: + Upgraded(address): + details: Emitted when the implementation is upgraded. + kind: dev + methods: + constructor: + details: "Initializes the upgradeable proxy with an initial implementation\ + \ specified by `implementation`. If `_data` is nonempty, it's used\ + \ as data in a delegate call to `implementation`. This will typically\ + \ be an encoded function call, and allows initializing the storage\ + \ of the proxy like a Solidity constructor. Requirements: - If `data`\ + \ is empty, `msg.value` must be zero." + version: 1 + owner: + description: "The workspace id of the owner of this contract template. If\ + \ it's a private contract, only this workspace will be allowed to deploy\ + \ it" + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + vendor: + allOf: + - $ref: '#/components/schemas/VendorDto' + description: The details of the vendor of this contract template. Applicable + only for public contract templates + isPublic: + description: Is this a contract that is viewable by all fireblocks's users + or is it visible only for this workspace + example: true + type: boolean + canDeploy: + description: "True if the workspace allowed to deploy this contract, false\ + \ otherwise" + example: true + type: boolean + type: + description: The type of the contract template + enum: + - FUNGIBLE_TOKEN + - NON_FUNGIBLE_TOKEN + - NON_TOKEN + - TOKEN_EXTENSION + - TOKEN_UTILITY + example: FUNGIBLE_TOKEN + type: string + implementationContractId: + type: string + initializationPhase: + enum: + - ON_DEPLOYMENT + - POST_DEPLOYMENT + type: string + required: + - abi + - description + - id + - initializationPhase + - isPublic + - name type: object - UserGroupsResponse: - items: - $ref: '#/components/schemas/UserGroupResponse' - type: array - UserGroupCreateRequest: + HttpContractDoesNotExistError: example: - groupName: groupName - memberIds: - - memberIds - - memberIds + code: "404" + message: Contract does not exist properties: - groupName: + message: + description: Not Found error code + example: Contract does not exist + type: string + code: + description: Error code + example: "404" type: string - memberIds: - items: - type: string - type: array type: object - CreateUserGroupResponse: + ParameterWithValue: example: - name: name - id: id - memberIds: - - memberIds - - memberIds - status: status - properties: - id: + components: + - components: + - null + - null + name: _name + description: The name of the token + internalType: string type: string + - components: + - null + - null + name: _name + description: The name of the token + internalType: string + type: string + name: _name + description: The name of the token + functionValue: "" + internalType: string + type: string + value: "true" + properties: name: + description: The name of the parameter as it appears in the ABI + example: _name type: string - memberIds: + description: + description: "A description of the parameter, fetched from the devdoc of\ + \ this contract" + example: The name of the token + type: string + internalType: + description: The internal type of the parameter as it appears in the ABI + example: string + type: string + type: + description: The type of the parameter as it appears in the ABI + example: string + type: string + components: items: - type: string + $ref: '#/components/schemas/Parameter' type: array - status: + value: + description: The value of the parameter. can also be ParameterWithValue + example: "true" type: string + functionValue: + allOf: + - $ref: '#/components/schemas/LeanAbiFunction' + description: "The function value of this param (if has one). If this is\ + \ set, the `value` shouldn`t be. Used for proxies" + required: + - name + - type type: object - UserGroupUpdateRequest: - example: - groupName: groupName - memberIds: - - memberIds - - memberIds + LeanAbiFunction: properties: - groupName: + name: + description: The function name + example: initialize type: string - memberIds: + inputs: + description: The function inputs items: - type: string + $ref: '#/components/schemas/ParameterWithValue' type: array + required: + - inputs type: object - UserGroupCreateResponse: + ContractDeployRequest: example: - name: name - id: id - memberIds: - - memberIds - - memberIds - status: status + assetId: ETH_TEST5 + constructorParameters: + - internalType: string + name: name_ + type: string + value: TokenName + - internalType: string + name: symbol_ + type: string + value: TokenSymbol + vaultAccountId: "0" properties: - name: + assetId: + description: The base asset identifier of the blockchain you want to deploy + to + example: ETH_TEST5 type: string - id: + vaultAccountId: + description: The vault account id you wish to deploy from + example: "0" type: string - memberIds: - items: + constructorParameters: + description: The constructor parameters of this contract + example: + - internalType: string + name: name_ type: string + value: TokenName + - internalType: string + name: symbol_ + type: string + value: TokenSymbol + items: + $ref: '#/components/schemas/ParameterWithValue' type: array - status: + required: + - assetId + - vaultAccountId + type: object + ContractDeployResponse: + example: + txId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + properties: + txId: + description: The transaction id of the deployment request + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string + required: + - txId type: object - UserResponse: + LeanDeployedContractResponseDto: example: - firstName: firstName - lastName: lastName - role: role - id: id - email: email - enabled: true + contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + blockchainId: blockchainId properties: id: + description: The deployed contract data identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string - firstName: - type: string - lastName: + contractAddress: + description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 type: string - role: + contractTemplateId: + description: The contract template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string - email: + blockchainId: type: string - enabled: - type: boolean + required: + - blockchainId + - contractAddress + - contractTemplateId + - id type: object - GetUsersResponse: - items: - $ref: '#/components/schemas/UserResponse' - type: array - GetAuditLogsResponseDTO: + DeployedContractsPaginatedResponse: example: - cursor: cursor - total: 0.8008281904610115 + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 data: - - "{}" - - "{}" + - contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + blockchainId: blockchainId + - contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + blockchainId: blockchainId properties: data: + description: The data of the current page items: - type: object + $ref: '#/components/schemas/LeanDeployedContractResponseDto' type: array - total: - type: number - cursor: + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 nullable: true type: string + required: + - data type: object - AuditLogData: + DeployedContractResponseDto: example: - createdAt: createdAt - subject: subject - tenantId: tenantId - id: id - event: event - user: user - userId: userId - timestamp: timestamp + contractTemplateId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + contractAddress: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + vaultAccountId: "0" + id: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + blockchainId: blockchainId properties: id: - description: The unique identifier of the audit log + description: The deployed contract data identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string - timestamp: - description: The timestamp of the audit log + contractAddress: + description: The contract's onchain address + example: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 type: string - createdAt: - description: The timestamp of the audit log creation + contractTemplateId: + description: The contract template identifier + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d type: string - user: - description: The user who performed the action + vaultAccountId: + description: The vault account id this contract was deploy from + example: "0" type: string - subject: - description: The subject of the action + blockchainId: type: string - event: - description: The event that was performed + required: + - blockchainId + - contractAddress + - contractTemplateId + - id + type: object + AssetMetadataDto: + example: + symbol: MYT + holdersCount: 6 + totalSupply: "1000000000000000" + contractAddress: 0x1234567890abcdef1234567890abcdef12345678 + vaultAccountId: "0" + type: ERC20 + blockchain: ETH_TEST5 + assetId: BQ5R_MY_TOKEN + issuerAddress: rGyXjc5d7s17vvt3NtKKascvJrnSxV21kQ + decimals: 18 + name: MyToken + testnet: true + networkProtocol: ETH + properties: + assetId: + description: The Fireblocks` asset id + example: BQ5R_MY_TOKEN type: string - tenantId: - description: The tenant ID of the audit log + name: + description: The name of the token + example: MyToken type: string - userId: - description: The user ID of the audit log + symbol: + description: The symbol of the token + example: MYT + type: string + networkProtocol: + description: The network protocol of the token + example: ETH + type: string + totalSupply: + description: The total supply of the token + example: "1000000000000000" + type: string + holdersCount: + description: The number of holders of the token + example: 6 + type: number + type: + description: The type of the token + example: ERC20 + type: string + contractAddress: + description: The address of the token contract + example: 0x1234567890abcdef1234567890abcdef12345678 + type: string + issuerAddress: + description: "In case of Stellar or Ripple, the address of the issuer of\ + \ the token" + example: rGyXjc5d7s17vvt3NtKKascvJrnSxV21kQ + type: string + testnet: + description: Is it deployed on testnet or to mainnet + example: true + type: boolean + blockchain: + description: The blockchain native asset id which the token is deployed + on + example: ETH_TEST5 + type: string + decimals: + description: The number of decimals of the token + example: 18 + type: number + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token. Will be empty if token was issued outside of Fireblocks. + example: "0" + type: string + required: + - assetId + type: object + CollectionMetadataDto: + properties: + fbCollectionId: + description: Fireblocks collection id + example: 911fe739f0d4d123c98fd366c3bed35c6e30c00e + type: string + name: + description: Collection name + example: Rarible + type: string + symbol: + description: Collection symbol + example: RARI + type: string + standard: + description: Collection contract standard + example: ERC721 + type: string + blockchainDescriptor: + description: Collection's blockchain + example: ETH_TEST5 type: string + contractAddress: + description: Collection contract address + example: 0x1723017329a804564bC8d215496C89eaBf1F3211 + type: string + required: + - blockchainDescriptor + - fbCollectionId type: object - AuditLogsData: - items: - $ref: '#/components/schemas/AuditLogData' - type: array - GetAuditLogsResponse: + ContractMetadataDto: + properties: + id: + description: The deployed contract ID + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: string + blockchainId: + description: The blockchain ID + example: B7QG017M + type: string + contractAddress: + description: The address of the token contract + example: 0x1234567890abcdef1234567890abcdef12345678 + type: string + contractTemplateId: + description: The contract template ID + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + vaultAccountId: + description: The vault account ID that initiated the request to issue the + token + example: "0" + type: string + required: + - blockchainId + - contractAddress + - contractTemplateId + - id + type: object + TokenLinkDto: example: - cursor: cursor - total: 0.8008281904610115 - data: - - createdAt: createdAt - subject: subject - tenantId: tenantId - id: id - event: event - user: user - userId: userId - timestamp: timestamp - - createdAt: createdAt - subject: subject - tenantId: tenantId - id: id - event: event - user: user - userId: userId - timestamp: timestamp + displayName: My Simple ERC20 Token + id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + refId: BQ5R_MY_TOKEN + type: FUNGIBLE_TOKEN + tokenMetadata: + symbol: MYT + holdersCount: 6 + totalSupply: "1000000000000000" + contractAddress: 0x1234567890abcdef1234567890abcdef12345678 + vaultAccountId: "0" + type: ERC20 + blockchain: ETH_TEST5 + assetId: BQ5R_MY_TOKEN + issuerAddress: rGyXjc5d7s17vvt3NtKKascvJrnSxV21kQ + decimals: 18 + name: MyToken + testnet: true + networkProtocol: ETH + status: COMPLETED + properties: + id: + description: The token link id + example: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + type: string + status: + description: The token status + enum: + - PENDING + - COMPLETED + example: COMPLETED + type: string + type: + description: The type of token + enum: + - FUNGIBLE_TOKEN + - NON_FUNGIBLE_TOKEN + - TOKEN_UTILITY + - TOKEN_EXTENSION + example: FUNGIBLE_TOKEN + type: string + refId: + description: "The Fireblocks' reference id. Can be a Fireblocks' supported\ + \ asset, collectionId or contractId" + example: BQ5R_MY_TOKEN + type: string + displayName: + description: "The token display name. If was not provided, would be taken\ + \ from the contract template name" + example: My Simple ERC20 Token + type: string + tokenMetadata: + $ref: '#/components/schemas/TokenLinkDto_tokenMetadata' + required: + - id + - status + type: object + TokensPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - displayName: My Simple ERC20 Token + id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + refId: BQ5R_MY_TOKEN + type: FUNGIBLE_TOKEN + tokenMetadata: + symbol: MYT + holdersCount: 6 + totalSupply: "1000000000000000" + contractAddress: 0x1234567890abcdef1234567890abcdef12345678 + vaultAccountId: "0" + type: ERC20 + blockchain: ETH_TEST5 + assetId: BQ5R_MY_TOKEN + issuerAddress: rGyXjc5d7s17vvt3NtKKascvJrnSxV21kQ + decimals: 18 + name: MyToken + testnet: true + networkProtocol: ETH + status: COMPLETED + - displayName: My Simple ERC20 Token + id: fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb + refId: BQ5R_MY_TOKEN + type: FUNGIBLE_TOKEN + tokenMetadata: + symbol: MYT + holdersCount: 6 + totalSupply: "1000000000000000" + contractAddress: 0x1234567890abcdef1234567890abcdef12345678 + vaultAccountId: "0" + type: ERC20 + blockchain: ETH_TEST5 + assetId: BQ5R_MY_TOKEN + issuerAddress: rGyXjc5d7s17vvt3NtKKascvJrnSxV21kQ + decimals: 18 + name: MyToken + testnet: true + networkProtocol: ETH + status: COMPLETED properties: data: + description: The data of the current page items: - $ref: '#/components/schemas/AuditLogData' + $ref: '#/components/schemas/TokenLinkDto' type: array - cursor: - description: The next id to start fetch audit logs from + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 nullable: true type: string - total: - description: The total number of audit logs - type: number + required: + - data type: object - AddCollateralRequestBody: + EVMTokenCreateParamsDto: example: - isSrcCollateral: true - transactionRequest: - note: Ticket 123 - priorityFee: "2" - networkFee: TransactionRequest_networkFee - fee: TransactionRequest_fee - destination: - oneTimeAddress: - address: address - tag: tag - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - subType: null - id: id - type: null - extraParameters: "{}" - source: - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + constructorParams: + - 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 + properties: + contractId: + description: The id of the contract template that will be used to create + the token + example: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + type: string + constructorParams: + description: The constructor parameters and values of the contract template + example: + - internalType: string name: name - subType: null - id: id - type: null - maxFee: "120" - externalTxId: 00000000-0000-0000-0000-000000000000 - cpuStaking: null - gasLimit: "21000" - failOnLowFee: true - assetId: ETH - feeLevel: MEDIUM - gasPrice: TransactionRequest_gasPrice - forceSweep: false - amount: "0.02" - destinations: - - amount: amount - destination: - oneTimeAddress: - address: address - tag: tag - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - subType: null - id: id - type: null - - amount: amount - destination: - oneTimeAddress: - address: address - tag: tag - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - subType: null - id: id - type: null - travelRuleMessage: - originatorProof: "" - originator: "" - beneficiaryVASPname: beneficiaryVASPname - pii: "" - protocol: protocol - skipBeneficiaryDataValidation: true - beneficiary: "" - encrypted: encrypted - travelRuleBehavior: true - transactionBlockchainInfo: "" - beneficiaryProof: "" - originatorVASPdid: originatorVASPdid - beneficiaryVASPdid: beneficiaryVASPdid - customerRefId: abcdef - treatAsGrossAmount: false - networkStaking: TransactionRequest_networkStaking - autoStaking: true - operation: null - replaceTxByHash: 00000000-0000-0000-0000-000000000000 + 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 + items: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + type: array + required: + - contractId + type: object + StellarRippleCreateParamsDto: properties: - transactionRequest: - $ref: '#/components/schemas/TransactionRequest' - isSrcCollateral: - description: optional - type: boolean + symbol: + description: The symbol of the token + example: MyUSDT + type: string + name: + description: The name of the token + example: My USD Tether + type: string + issuerAddress: + description: The address of the issuer of this token. Will be part of the + identifier of this token on chain. + example: rnDV4JiwgRNhudPY2sm65AzECpRXaasL4r + type: string + required: + - issuerAddress + - name + - symbol type: object - RemoveCollateralRequestBody: + CreateTokenRequestDto: example: - transactionRequest: - note: Ticket 123 - priorityFee: "2" - networkFee: TransactionRequest_networkFee - fee: TransactionRequest_fee - destination: - oneTimeAddress: - address: address - tag: tag - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + assetId: ETH_TEST5 + displayName: displayName + vaultAccountId: "0" + blockchainId: B7QG017M + createParams: + contractId: b70701f4-d7b1-4795-a8ee-b09cdb5b850d + constructorParams: + - internalType: string name: name - subType: null - id: id - type: null - extraParameters: "{}" - source: - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - subType: null - id: id - type: null - maxFee: "120" - externalTxId: 00000000-0000-0000-0000-000000000000 - cpuStaking: null - gasLimit: "21000" - failOnLowFee: true - assetId: ETH - feeLevel: MEDIUM - gasPrice: TransactionRequest_gasPrice - forceSweep: false - amount: "0.02" - destinations: - - amount: amount - destination: - oneTimeAddress: - address: address - tag: tag - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - subType: null - id: id - type: null - - amount: amount - destination: - oneTimeAddress: - address: address - tag: tag - walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - name: name - subType: null - id: id - type: null - travelRuleMessage: - originatorProof: "" - originator: "" - beneficiaryVASPname: beneficiaryVASPname - pii: "" - protocol: protocol - skipBeneficiaryDataValidation: true - beneficiary: "" - encrypted: encrypted - travelRuleBehavior: true - transactionBlockchainInfo: "" - beneficiaryProof: "" - originatorVASPdid: originatorVASPdid - beneficiaryVASPdid: beneficiaryVASPdid - customerRefId: abcdef - treatAsGrossAmount: false - networkStaking: TransactionRequest_networkStaking - autoStaking: true - operation: null - replaceTxByHash: 00000000-0000-0000-0000-000000000000 - isDstCollateral: true + 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 properties: - transactionRequest: - $ref: '#/components/schemas/TransactionRequest' - isDstCollateral: - description: optional - type: boolean + blockchainId: + description: The id of the blockchain the request was initiated on + example: B7QG017M + type: string + assetId: + description: The base asset identifier of the blockchain you want to deploy + to + example: ETH_TEST5 + type: string + vaultAccountId: + description: The id of the vault account that initiated the request to issue + the token + example: "0" + type: string + createParams: + $ref: '#/components/schemas/CreateTokenRequestDto_createParams' + displayName: + type: string + required: + - createParams + - vaultAccountId type: object - SettlementRequestBody: + AssetAlreadyExistHttpError: example: - mainExchangeAccountId: mainExchangeAccountId + message: message + error: Conflict + statusCode: 409 properties: - mainExchangeAccountId: + statusCode: + description: HTTP status code + example: 409 + format: int32 + type: integer + message: + description: Error message + type: string + error: + description: Short description of the HTTP error + example: Conflict type: string type: object - ToExchangeTransaction: + TokenLinkRequestDto: example: - amount: amount - assetId: assetId - dstAddress: dstAddress - dstTag: dstTag + displayName: My Simple ERC20 Token + refId: USDC_ETH_TEST5_1XF5 + type: FUNGIBLE_TOKEN properties: - assetId: + type: + description: The type of token being linked + enum: + - FUNGIBLE_TOKEN + - NON_FUNGIBLE_TOKEN + - TOKEN_UTILITY + - TOKEN_EXTENSION type: string - amount: + refId: + description: "The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC'\ + \ if it's a fungible \n\t\t\t\t\tasset" + example: USDC_ETH_TEST5_1XF5 type: string - dstAddress: + displayName: + description: The token display name + example: My Simple ERC20 Token type: string - dstTag: - description: optional + required: + - refId + - type + type: object + AssetDoesNotExistHttpError: + example: + message: message + error: Not Found + statusCode: 404 + properties: + statusCode: + description: HTTP status code + example: 404 + format: int32 + type: integer + message: + description: Error message + type: string + error: + description: Short description of the HTTP error + example: Not Found + type: string + type: object + TokenLinkExistsHttpError: + example: + message: message + error: Conflict + statusCode: 409 + properties: + statusCode: + description: HTTP status code + example: 409 + format: int32 + type: integer + message: + description: Error message + type: string + error: + description: Short description of the HTTP error + example: Conflict type: string type: object - ToCollateralTransaction: + NotFoundException: example: - amount: amount - srcTag: srcTag - fee: fee - srcAddress: srcAddress - asset: asset + message: message + error: Not Found + statusCode: 404 properties: - asset: - type: string - amount: - type: string - srcAddress: - type: string - srcTag: - description: optional + statusCode: + description: HTTP status code + example: 404 + format: int32 + type: integer + message: + description: Error message type: string - fee: - description: optional + error: + description: Short description of the HTTP error + example: Not Found type: string type: object - ExchangeSettlementTransactionsResponse: + ContractAbiResponseDto: example: - toCollateral: - - amount: amount - srcTag: srcTag - fee: fee - srcAddress: srcAddress - asset: asset - - amount: amount - srcTag: srcTag - fee: fee - srcAddress: srcAddress - asset: asset - toExchange: - - amount: amount - assetId: assetId - dstAddress: dstAddress - dstTag: dstTag - - amount: amount - assetId: assetId - dstAddress: dstAddress - dstTag: dstTag - properties: - toExchange: + abi: + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: nonpayable + type: constructor + implementationAbi: + - inputs: + - internalType: address + name: to + type: address + - internalType: uint256 + name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: mint + properties: + abi: + description: The abi of the contract + example: + - inputs: + - internalType: address + name: implementation + type: address + - internalType: bytes + name: _data + type: bytes + stateMutability: nonpayable + type: constructor items: - $ref: '#/components/schemas/ToExchangeTransaction' + $ref: '#/components/schemas/AbiFunction' type: array - toCollateral: + implementationAbi: + description: The abi of the implementation contract if exists. Relevant + only for proxy patterns + example: + - inputs: + - internalType: address + name: to + type: address + - internalType: uint256 + name: amount + type: uint256 + stateMutability: nonpayable + type: function + name: mint items: - $ref: '#/components/schemas/ToCollateralTransaction' + $ref: '#/components/schemas/AbiFunction' type: array + required: + - abi type: object - SettlementResponse: - example: - fireblocksInitiatedTransactions: "{}" - initiator: initiator - exchangeRequestedTransactions: - toCollateral: - - amount: amount - srcTag: srcTag - fee: fee - srcAddress: srcAddress - asset: asset - - amount: amount - srcTag: srcTag - fee: fee - srcAddress: srcAddress - asset: asset - toExchange: - - amount: amount - assetId: assetId - dstAddress: dstAddress - dstTag: dstTag - - amount: amount - assetId: assetId - dstAddress: dstAddress - dstTag: dstTag - id: id - exchangeReply: exchangeReply + ReadAbiFunction: properties: - id: + stateMutability: + enum: + - pure + - view + example: pure type: string - initiator: + outputs: + items: + $ref: '#/components/schemas/Parameter' + type: array + name: type: string - exchangeReply: + type: type: string - fireblocksInitiatedTransactions: - type: object - exchangeRequestedTransactions: - $ref: '#/components/schemas/ExchangeSettlementTransactionsResponse' + inputs: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + description: + type: string + required: + - inputs + - stateMutability + - type type: object - ResendWebhooksResponse: + ReadCallFunctionDto: example: - messagesCount: 0.8008281904610115 + abiFunction: + - inputs: [] + stateMutability: view + type: function + name: decimals + outputs: + - name: "" + type: uint8 + internalType: uint8 + properties: + abiFunction: + description: The abi of the read function you wish to call + example: + - inputs: [] + stateMutability: view + type: function + name: decimals + outputs: + - name: "" + type: uint8 + internalType: uint8 + items: + $ref: '#/components/schemas/ReadAbiFunction' + type: array + required: + - abiFunction + type: object + ParameterWithValueList: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + WriteAbiFunction: properties: - messagesCount: - type: number + stateMutability: + enum: + - payable + - nonpayable + example: nonpayable + type: string + outputs: + items: + $ref: '#/components/schemas/Parameter' + type: array + type: + enum: + - function + type: string + name: + type: string + inputs: + items: + $ref: '#/components/schemas/ParameterWithValue' + type: array + description: + type: string + required: + - inputs + - stateMutability + - type type: object - ResendTransactionWebhooksRequest: + WriteCallFunctionDto: example: - resendCreated: true - resendStatusUpdated: true + abiFunction: + - inputs: + - name: to + type: address + internalType: address + value: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + - name: amount + type: uint256 + internalType: uint256 + value: 1000000 + stateMutability: nonpayable + type: function + name: mint + note: note + amount: "12.345" + fee: "2000" + vaultAccountId: "0" + feeLevel: MEDIUM properties: - resendCreated: - type: boolean - resendStatusUpdated: - type: boolean + vaultAccountId: + description: The vault account id this contract was deploy from + example: "0" + type: string + abiFunction: + description: The abi of the read function you wish to call + example: + - inputs: + - name: to + type: address + internalType: address + value: 0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66 + - name: amount + type: uint256 + internalType: uint256 + value: 1000000 + stateMutability: nonpayable + type: function + name: mint + items: + $ref: '#/components/schemas/WriteAbiFunction' + type: array + amount: + description: Amount in base asset. Being used in payable functions + example: "12.345" + type: string + feeLevel: + description: Fee level for the write function transaction. interchangeable + with the 'fee' field + enum: + - LOW + - MEDIUM + - HIGH + example: MEDIUM + type: string + fee: + description: Max fee amount for the write function transaction. interchangeable + with the 'feeLevel' field + example: "2000" + type: string + note: + description: "Custom note, not sent to the blockchain, that describes the\ + \ transaction at your Fireblocks workspace" + type: string + required: + - abiFunction + - vaultAccountId type: object - ResendWebhooksByTransactionIdResponse: + WriteCallFunctionResponseDto: example: - success: true + txId: txId properties: - success: - description: Indicates whether the webhooks were successfully resent - type: boolean + txId: + type: string required: - - success + - txId type: object + StakingGetChainsResponse: + items: + type: string + type: array AdditionalInfoDto: properties: estimatedAnnualReward: @@ -17740,6 +20787,10 @@ components: - validatorName - vaultAccountId type: object + StakingGetAllDelegationsResponse: + items: + $ref: '#/components/schemas/DelegationDto' + type: array AmountAndChainDescriptor: example: chainDescriptor: ETH @@ -17811,6 +20862,10 @@ components: - rewardsAmount - totalStaked type: object + StakingGetSummaryByVaultResponse: + additionalProperties: + $ref: '#/components/schemas/DelegationSummaryDto' + type: object ValidatorDto: properties: chainDescriptor: @@ -17877,6 +20932,10 @@ components: - termsOfServiceUrl - validators type: object + StakingGetProvidersResponse: + items: + $ref: '#/components/schemas/ProviderDto' + type: array ProvidersResponseDto: properties: {} type: object @@ -18022,8 +21081,10 @@ components: - ETH - ETH_TEST3 - ETH_TEST5 + - ETH_TEST6 - POLYGON - POLYGON_TEST_MUMBAI + - AMOY_POLYGON_TEST - XTZ - XTZ_TEST - BASECHAIN_ETH @@ -18054,6 +21115,63 @@ components: - status - tokenId type: object + GetOwnershipTokensResponse: + example: + data: + - standard: standard + ncwId: ncwId + tokenId: tokenId + cachedMetadataURI: cachedMetadataURI + vaultAccountId: vaultAccountId + description: description + media: + - contentType: IMAGE + url: url + - contentType: IMAGE + url: url + collection: "" + metadataURI: metadataURI + ownershipLastUpdateTime: 6.027456183070403 + blockchainDescriptor: ETH + ncwAccountId: ncwAccountId + balance: balance + ownershipStartTime: 0.8008281904610115 + name: name + id: id + spam: "" + status: LISTED + - standard: standard + ncwId: ncwId + tokenId: tokenId + cachedMetadataURI: cachedMetadataURI + vaultAccountId: vaultAccountId + description: description + media: + - contentType: IMAGE + url: url + - contentType: IMAGE + url: url + collection: "" + metadataURI: metadataURI + ownershipLastUpdateTime: 6.027456183070403 + blockchainDescriptor: ETH + ncwAccountId: ncwAccountId + balance: balance + ownershipStartTime: 0.8008281904610115 + name: name + id: id + spam: "" + status: LISTED + paging: + next: next + properties: + paging: + $ref: '#/components/schemas/Paging' + data: + items: + $ref: '#/components/schemas/TokenOwnershipResponse' + type: array + type: object SpamTokenResponse: properties: result: @@ -18113,8 +21231,10 @@ components: - ETH - ETH_TEST3 - ETH_TEST5 + - ETH_TEST6 - POLYGON - POLYGON_TEST_MUMBAI + - AMOY_POLYGON_TEST - XTZ - XTZ_TEST - BASECHAIN_ETH @@ -18129,6 +21249,49 @@ components: - standard - tokenId type: object + ListOwnedTokensResponse: + example: + data: + - standard: standard + blockchainDescriptor: ETH + tokenId: tokenId + cachedMetadataURI: cachedMetadataURI + name: name + description: description + id: id + media: + - contentType: IMAGE + url: url + - contentType: IMAGE + url: url + collection: "" + spam: "" + metadataURI: metadataURI + - standard: standard + blockchainDescriptor: ETH + tokenId: tokenId + cachedMetadataURI: cachedMetadataURI + name: name + description: description + id: id + media: + - contentType: IMAGE + url: url + - contentType: IMAGE + url: url + collection: "" + spam: "" + metadataURI: metadataURI + paging: + next: next + properties: + paging: + $ref: '#/components/schemas/Paging' + data: + items: + $ref: '#/components/schemas/TokenResponse' + type: array + type: object CollectionOwnershipResponse: example: standard: standard @@ -18156,8 +21319,10 @@ components: - ETH - ETH_TEST3 - ETH_TEST5 + - ETH_TEST6 - POLYGON - POLYGON_TEST_MUMBAI + - AMOY_POLYGON_TEST - XTZ - XTZ_TEST - BASECHAIN_ETH @@ -18169,6 +21334,74 @@ components: - blockchainDescriptor - id type: object + ListOwnedCollectionsResponse: + example: + data: + - standard: standard + symbol: symbol + blockchainDescriptor: ETH + name: name + contractAddress: contractAddress + id: id + - standard: standard + symbol: symbol + blockchainDescriptor: ETH + name: name + contractAddress: contractAddress + id: id + paging: + next: next + properties: + paging: + $ref: '#/components/schemas/Paging' + data: + items: + $ref: '#/components/schemas/CollectionOwnershipResponse' + type: array + type: object + GetNFTsResponse: + example: + data: + - standard: standard + blockchainDescriptor: ETH + tokenId: tokenId + cachedMetadataURI: cachedMetadataURI + name: name + description: description + id: id + media: + - contentType: IMAGE + url: url + - contentType: IMAGE + url: url + collection: "" + spam: "" + metadataURI: metadataURI + - standard: standard + blockchainDescriptor: ETH + tokenId: tokenId + cachedMetadataURI: cachedMetadataURI + name: name + description: description + id: id + media: + - contentType: IMAGE + url: url + - contentType: IMAGE + url: url + collection: "" + spam: "" + metadataURI: metadataURI + paging: + next: next + properties: + paging: + $ref: '#/components/schemas/Paging' + data: + items: + $ref: '#/components/schemas/TokenResponse' + type: array + type: object UpdateTokenOwnershipStatusDto: example: status: LISTED @@ -18202,6 +21435,10 @@ components: - assetId - status type: object + UpdateTokensOwnershipStatusRequest: + items: + $ref: '#/components/schemas/TokenOwnershipStatusUpdatePayload' + type: array TokenOwnershipSpamUpdatePayload: example: assetId: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd @@ -18220,6 +21457,10 @@ components: - assetId - spam type: object + UpdateTokensOwnershipSpamRequest: + items: + $ref: '#/components/schemas/TokenOwnershipSpamUpdatePayload' + type: array SessionMetadata: properties: appUrl: @@ -18348,7 +21589,13 @@ components: required: - data type: object - CreateConnectionRequest: + CreateVaultAccountConnectionRequest: + example: + vaultAccountId: 1 + chainIds: + - ETH + feeLevel: MEDIUM + uri: wc:77752975-906f-48f5-b59f-047826ee947e@1?bridge=https%3A%2F%2F0.bridge.walletconnect.org&key=64be99adc6086b7a729b0ec8c7e1f174927ab92e84f5c6f9527050225344a637 properties: vaultAccountId: description: The ID of the vault to connect to the dApp. @@ -18413,6 +21660,10 @@ components: - ncwId - uri type: object + CreateConnectionRequest: + oneOf: + - $ref: '#/components/schemas/CreateVaultAccountConnectionRequest' + - $ref: '#/components/schemas/CreateNcwConnectionRequest' CreateConnectionResponse: example: sessionMetadata: "" @@ -19325,6 +22576,14 @@ components: policy rule on tenant configuration. type: boolean type: object + GetOtaStatusResponse: + example: + enabled: true + properties: + enabled: + description: Current OTA status + type: boolean + type: object SetOtaStatusRequest: example: enabled: true @@ -19340,6 +22599,14 @@ components: successfully updated example: Accepted type: string + GetWorkspaceStatusResponse: + example: + status: status + properties: + status: + description: Current workspace status + type: string + type: object PolicySrcOrDestType: description: | * EXCHANGE - A third-party exchange account connected to your workspace @@ -21111,12 +24378,16 @@ components: email: email properties: firstName: + description: users firstName type: string lastName: + description: users lastName type: string role: + description: users role type: string email: + description: valid email address type: string required: - email @@ -21180,26 +24451,30 @@ components: example: role: role name: name - coSignerSetupType: coSignerSetupType - csrPem: csrPem + coSignerSetupType: SGX_MACHINE + csrPem: '-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----' coSignerSetupIsFirstUser: true properties: role: - description: User role + description: Users role type: string name: - description: users name + description: Users name type: string csrPem: - description: only for user with signing capabilities + description: CSR file that is used to verify API requests. read more https://developers.fireblocks.com/docs/quickstart + example: '-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----' type: string coSignerSetupType: - description: cosigner setup type + description: "Different environments allow for different setup options,\ + \ field is required for management/signer role" + example: SGX_MACHINE type: string coSignerSetupIsFirstUser: - description: is first? + description: pass as true if this is the first user on the coSigner machine type: boolean required: + - csrPem - name - role type: object @@ -22265,146 +25540,6 @@ components: required: - data type: object - updateVaultAccountAssetAddress_request: - properties: - description: - description: The address description - type: string - setCustomerRefIdForAddress_request: - properties: - customerRefId: - description: Customer reference ID - type: string - setRoutingPolicy_200_response: - example: - success: true - properties: - success: - type: boolean - required: - - success - getOwnershipTokens_200_response: - example: - data: - - standard: standard - ncwId: ncwId - tokenId: tokenId - cachedMetadataURI: cachedMetadataURI - vaultAccountId: vaultAccountId - description: description - media: - - contentType: IMAGE - url: url - - contentType: IMAGE - url: url - collection: "" - metadataURI: metadataURI - ownershipLastUpdateTime: 6.027456183070403 - blockchainDescriptor: ETH - ncwAccountId: ncwAccountId - balance: balance - ownershipStartTime: 0.8008281904610115 - name: name - id: id - spam: "" - status: LISTED - - standard: standard - ncwId: ncwId - tokenId: tokenId - cachedMetadataURI: cachedMetadataURI - vaultAccountId: vaultAccountId - description: description - media: - - contentType: IMAGE - url: url - - contentType: IMAGE - url: url - collection: "" - metadataURI: metadataURI - ownershipLastUpdateTime: 6.027456183070403 - blockchainDescriptor: ETH - ncwAccountId: ncwAccountId - balance: balance - ownershipStartTime: 0.8008281904610115 - name: name - id: id - spam: "" - status: LISTED - paging: - next: next - properties: - paging: - $ref: '#/components/schemas/Paging' - data: - items: - $ref: '#/components/schemas/TokenOwnershipResponse' - type: array - listOwnedTokens_200_response: - example: - data: - - standard: standard - blockchainDescriptor: ETH - tokenId: tokenId - cachedMetadataURI: cachedMetadataURI - name: name - description: description - id: id - media: - - contentType: IMAGE - url: url - - contentType: IMAGE - url: url - collection: "" - spam: "" - metadataURI: metadataURI - - standard: standard - blockchainDescriptor: ETH - tokenId: tokenId - cachedMetadataURI: cachedMetadataURI - name: name - description: description - id: id - media: - - contentType: IMAGE - url: url - - contentType: IMAGE - url: url - collection: "" - spam: "" - metadataURI: metadataURI - paging: - next: next - properties: - paging: - $ref: '#/components/schemas/Paging' - data: - items: - $ref: '#/components/schemas/TokenResponse' - type: array - listOwnedCollections_200_response: - example: - data: - - standard: standard - symbol: symbol - blockchainDescriptor: ETH - name: name - contractAddress: contractAddress - id: id - - standard: standard - symbol: symbol - blockchainDescriptor: ETH - name: name - contractAddress: contractAddress - id: id - paging: - next: next - properties: - paging: - $ref: '#/components/schemas/Paging' - data: - items: - $ref: '#/components/schemas/CollectionOwnershipResponse' - type: array get_filter_parameter: properties: id: @@ -22422,24 +25557,6 @@ components: appName: type: string type: object - create_request: - oneOf: - - $ref: '#/components/schemas/CreateConnectionRequest' - - $ref: '#/components/schemas/CreateNcwConnectionRequest' - getOtaStatus_200_response: - example: - enabled: true - properties: - enabled: - description: Current OTA status - type: boolean - getWorkspaceStatus_200_response: - example: - status: status - properties: - status: - description: Current workspace status - type: string VaultAccountsPagedResponse_paging: example: before: before @@ -22862,6 +25979,16 @@ components: required: - timeSeconds type: object + TokenLinkDto_tokenMetadata: + description: The token's metadata + oneOf: + - $ref: '#/components/schemas/AssetMetadataDto' + - $ref: '#/components/schemas/CollectionMetadataDto' + - $ref: '#/components/schemas/ContractMetadataDto' + CreateTokenRequestDto_createParams: + oneOf: + - $ref: '#/components/schemas/EVMTokenCreateParamsDto' + - $ref: '#/components/schemas/StellarRippleCreateParamsDto' SetOtaStatusResponse_oneOf: example: message: No change needed. The current status is false diff --git a/build.gradle b/build.gradle index 375421c..9be404f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '1.1.0' +version = '2.0.0' buildscript { repositories { diff --git a/docs/AbiFunction.md b/docs/AbiFunction.md new file mode 100644 index 0000000..cbbd131 --- /dev/null +++ b/docs/AbiFunction.md @@ -0,0 +1,38 @@ + + +# AbiFunction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the contract function as it appears in the ABI | [optional] | +|**stateMutability** | [**StateMutabilityEnum**](#StateMutabilityEnum) | The state mutability of the contract function as it appears in the ABI | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type if the function | | +|**inputs** | [**List<Parameter>**](Parameter.md) | The parameters that this function/constructor posses | | +|**outputs** | [**List<Parameter>**](Parameter.md) | The parameters that this 'read' function returns | [optional] | +|**description** | **String** | The documentation of this function (if has any) | [optional] | + + + +## Enum: StateMutabilityEnum + +| Name | Value | +|---- | -----| +| PURE | "pure" | +| VIEW | "view" | +| NONPAYABLE | "nonpayable" | +| PAYABLE | "payable" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNCTION | "function" | +| CONSTRUCTOR | "constructor" | + + + diff --git a/docs/ApiUserApi.md b/docs/ApiUserApi.md index ff14983..d9359c7 100644 --- a/docs/ApiUserApi.md +++ b/docs/ApiUserApi.md @@ -4,8 +4,8 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createApiUser**](ApiUserApi.md#createApiUser) | **POST** /management/api_users | create api user | -| [**getApiUsers**](ApiUserApi.md#getApiUsers) | **GET** /management/api_users | get api users | +| [**createApiUser**](ApiUserApi.md#createApiUser) | **POST** /management/api_users | Create Api user | +| [**getApiUsers**](ApiUserApi.md#getApiUsers) | **GET** /management/api_users | Get Api users | @@ -13,9 +13,9 @@ All URIs are relative to https://developers.fireblocks.com/reference/ > CompletableFuture> createApiUser createApiUser(createAPIUser, idempotencyKey) -create api user +Create Api user -creates api user +Creates Api user in your tenant ### Example @@ -89,7 +89,8 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | User sent for creation | * X-Request-ID -
| +| **200** | User creation approval request has been sent | * X-Request-ID -
| +| **400** | bad request | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| | **5XX** | Internal error. | * X-Request-ID -
| @@ -100,9 +101,9 @@ No authorization required > CompletableFuture> getApiUsers getApiUsers() -get api users +Get Api users -get api users from the current tenant +Get Api users of your tenant ### Example diff --git a/docs/AssetAlreadyExistHttpError.md b/docs/AssetAlreadyExistHttpError.md new file mode 100644 index 0000000..4ae0a1e --- /dev/null +++ b/docs/AssetAlreadyExistHttpError.md @@ -0,0 +1,15 @@ + + +# AssetAlreadyExistHttpError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**statusCode** | **Integer** | HTTP status code | [optional] | +|**message** | **String** | Error message | [optional] | +|**error** | **String** | Short description of the HTTP error | [optional] | + + + diff --git a/docs/AssetDoesNotExistHttpError.md b/docs/AssetDoesNotExistHttpError.md new file mode 100644 index 0000000..3586ebe --- /dev/null +++ b/docs/AssetDoesNotExistHttpError.md @@ -0,0 +1,15 @@ + + +# AssetDoesNotExistHttpError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**statusCode** | **Integer** | HTTP status code | [optional] | +|**message** | **String** | Error message | [optional] | +|**error** | **String** | Short description of the HTTP error | [optional] | + + + diff --git a/docs/AssetForbiddenErrorResponse.md b/docs/AssetForbiddenErrorResponse.md new file mode 100644 index 0000000..f92b9d2 --- /dev/null +++ b/docs/AssetForbiddenErrorResponse.md @@ -0,0 +1,14 @@ + + +# AssetForbiddenErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Forbidden error code | | +|**code** | **String** | Error code | | + + + diff --git a/docs/AssetMetadataDto.md b/docs/AssetMetadataDto.md new file mode 100644 index 0000000..809aedb --- /dev/null +++ b/docs/AssetMetadataDto.md @@ -0,0 +1,25 @@ + + +# AssetMetadataDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetId** | **String** | The Fireblocks` asset id | | +|**name** | **String** | The name of the token | [optional] | +|**symbol** | **String** | The symbol of the token | [optional] | +|**networkProtocol** | **String** | The network protocol of the token | [optional] | +|**totalSupply** | **String** | The total supply of the token | [optional] | +|**holdersCount** | **BigDecimal** | The number of holders of the token | [optional] | +|**type** | **String** | The type of the token | [optional] | +|**contractAddress** | **String** | The address of the token contract | [optional] | +|**issuerAddress** | **String** | In case of Stellar or Ripple, the address of the issuer of the token | [optional] | +|**testnet** | **Boolean** | Is it deployed on testnet or to mainnet | [optional] | +|**blockchain** | **String** | The blockchain native asset id which the token is deployed on | [optional] | +|**decimals** | **BigDecimal** | The number of decimals of the token | [optional] | +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token. Will be empty if token was issued outside of Fireblocks. | [optional] | + + + diff --git a/docs/AuditorData.md b/docs/AuditorData.md new file mode 100644 index 0000000..2881af0 --- /dev/null +++ b/docs/AuditorData.md @@ -0,0 +1,15 @@ + + +# AuditorData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | | +|**imageURL** | **String** | | | +|**link** | **String** | | | + + + diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index 59ce410..225f188 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -170,8 +170,9 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | A new asset has been created successfully | - | -| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1004 | - | -| **404** | - Invalid address, could not get asset information. Error code 1004 | - | -| **409** | - The asset is already supported globally. Error code: 1002 - The asset has already been added to this workspace. Error code: 1003 | - | +| **400** | - Listing an asset on the requested blockchain is not supported. Error code: 1000 - The asset address is invalid. Error code: 1003 - Self serve listing an asset on the requested blockchain is currently not supported, please contact support. Error code: 1004 | - | +| **403** | - The asset creation quota reached. Error code: 1005 | - | +| **404** | - Invalid address, could not get asset information. Error code 1003 | - | +| **409** | - The asset is already supported globally. Error code: 1001 - The asset has already been added to this workspace. Error code: 1002 | - | | **500** | Failed to create asset | - | diff --git a/docs/CollectionMetadataDto.md b/docs/CollectionMetadataDto.md new file mode 100644 index 0000000..8d175d6 --- /dev/null +++ b/docs/CollectionMetadataDto.md @@ -0,0 +1,18 @@ + + +# CollectionMetadataDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**fbCollectionId** | **String** | Fireblocks collection id | | +|**name** | **String** | Collection name | [optional] | +|**symbol** | **String** | Collection symbol | [optional] | +|**standard** | **String** | Collection contract standard | [optional] | +|**blockchainDescriptor** | **String** | Collection's blockchain | | +|**contractAddress** | **String** | Collection contract address | [optional] | + + + diff --git a/docs/CollectionOwnershipResponse.md b/docs/CollectionOwnershipResponse.md index 1fce08a..2c6f32d 100644 --- a/docs/CollectionOwnershipResponse.md +++ b/docs/CollectionOwnershipResponse.md @@ -23,8 +23,10 @@ | ETH | "ETH" | | ETH_TEST3 | "ETH_TEST3" | | ETH_TEST5 | "ETH_TEST5" | +| ETH_TEST6 | "ETH_TEST6" | | POLYGON | "POLYGON" | | POLYGON_TEST_MUMBAI | "POLYGON_TEST_MUMBAI" | +| AMOY_POLYGON_TEST | "AMOY_POLYGON_TEST" | | XTZ | "XTZ" | | XTZ_TEST | "XTZ_TEST" | | BASECHAIN_ETH | "BASECHAIN_ETH" | diff --git a/docs/ConsoleUserApi.md b/docs/ConsoleUserApi.md index b18df61..9ccd3d1 100644 --- a/docs/ConsoleUserApi.md +++ b/docs/ConsoleUserApi.md @@ -4,8 +4,8 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createConsoleUser**](ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | create console user | -| [**getConsoleUsers**](ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | get console users | +| [**createConsoleUser**](ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | Create console user | +| [**getConsoleUsers**](ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | Get console users | @@ -13,9 +13,9 @@ All URIs are relative to https://developers.fireblocks.com/reference/ > CompletableFuture> createConsoleUser createConsoleUser(createConsoleUser, idempotencyKey) -create console user +Create console user -creates fireblocks console user +Creates console user in your tenant ### Example @@ -89,7 +89,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Users sent for creation | * X-Request-ID -
| +| **200** | User creation approval request has been sent | * X-Request-ID -
| | **400** | bad request | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| @@ -101,9 +101,9 @@ No authorization required > CompletableFuture> getConsoleUsers getConsoleUsers() -get console users +Get console users -get console users from the current tenant +Get console users for your tenant ### Example diff --git a/docs/ContractAbiResponseDto.md b/docs/ContractAbiResponseDto.md new file mode 100644 index 0000000..901458c --- /dev/null +++ b/docs/ContractAbiResponseDto.md @@ -0,0 +1,14 @@ + + +# ContractAbiResponseDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**abi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the contract | | +|**implementationAbi** | [**List<AbiFunction>**](AbiFunction.md) | The abi of the implementation contract if exists. Relevant only for proxy patterns | [optional] | + + + diff --git a/docs/ContractAttributes.md b/docs/ContractAttributes.md new file mode 100644 index 0000000..91654e2 --- /dev/null +++ b/docs/ContractAttributes.md @@ -0,0 +1,15 @@ + + +# ContractAttributes + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**useCases** | **List<String>** | | | +|**standards** | **List<String>** | | | +|**auditor** | [**AuditorData**](AuditorData.md) | | | + + + diff --git a/docs/ContractDeployRequest.md b/docs/ContractDeployRequest.md new file mode 100644 index 0000000..309d78d --- /dev/null +++ b/docs/ContractDeployRequest.md @@ -0,0 +1,15 @@ + + +# ContractDeployRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetId** | **String** | The base asset identifier of the blockchain you want to deploy to | | +|**vaultAccountId** | **String** | The vault account id you wish to deploy from | | +|**constructorParameters** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The constructor parameters of this contract | [optional] | + + + diff --git a/docs/ContractDeployResponse.md b/docs/ContractDeployResponse.md new file mode 100644 index 0000000..a43a596 --- /dev/null +++ b/docs/ContractDeployResponse.md @@ -0,0 +1,13 @@ + + +# ContractDeployResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txId** | **String** | The transaction id of the deployment request | | + + + diff --git a/docs/ContractDoc.md b/docs/ContractDoc.md new file mode 100644 index 0000000..5a9873b --- /dev/null +++ b/docs/ContractDoc.md @@ -0,0 +1,17 @@ + + +# ContractDoc + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**details** | **String** | A description of the contract | [optional] | +|**events** | **String** | A description of the contract`s events | [optional] | +|**kind** | **String** | Is it devdoc or userdoc | | +|**methods** | [**Map<String, FunctionDoc>**](FunctionDoc.md) | The description of the contract functions | | +|**version** | **String** | The version of the contract | | + + + diff --git a/docs/ContractInteractionsApi.md b/docs/ContractInteractionsApi.md new file mode 100644 index 0000000..36e336e --- /dev/null +++ b/docs/ContractInteractionsApi.md @@ -0,0 +1,276 @@ +# ContractInteractionsApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getDeployedContractAbi**](ContractInteractionsApi.md#getDeployedContractAbi) | **GET** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions | Return deployed contract's ABI | +| [**readCallFunction**](ContractInteractionsApi.md#readCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read | Call a read function on a deployed contract | +| [**writeCallFunction**](ContractInteractionsApi.md#writeCallFunction) | **POST** /contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write | Call a write function on a deployed contract | + + + +## getDeployedContractAbi + +> CompletableFuture> getDeployedContractAbi getDeployedContractAbi(contractAddress, assetId, idempotencyKey) + +Return deployed contract's ABI + +Return deployed contract's ABI by blockchain native asset id and contract address + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ContractInteractionsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address + String assetId = "assetId_example"; // String | + 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.contractInteractions().getDeployedContractAbi(contractAddress, assetId, 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 ContractInteractionsApi#getDeployedContractAbi"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling ContractInteractionsApi#getDeployedContractAbi"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractAddress** | **String**| The contract's onchain address | | +| **assetId** | **String**| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | +| **0** | Error Response | * X-Request-ID -
| + + +## readCallFunction + +> CompletableFuture>> readCallFunction readCallFunction(readCallFunctionDto, contractAddress, assetId, idempotencyKey) + +Call a read function on a deployed contract + +Call a read function on a deployed contract by blockchain native asset id and contract address + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ContractInteractionsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + ReadCallFunctionDto readCallFunctionDto = new ReadCallFunctionDto(); // ReadCallFunctionDto | + String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address + String assetId = "assetId_example"; // String | + 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.contractInteractions().readCallFunction(readCallFunctionDto, contractAddress, assetId, 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 ContractInteractionsApi#readCallFunction"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling ContractInteractionsApi#readCallFunction"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **readCallFunctionDto** | [**ReadCallFunctionDto**](ReadCallFunctionDto.md)| | | +| **contractAddress** | **String**| The contract's onchain address | | +| **assetId** | **String**| | | +| **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** | Read Call Retrieved Successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## writeCallFunction + +> CompletableFuture> writeCallFunction writeCallFunction(writeCallFunctionDto, contractAddress, assetId, idempotencyKey) + +Call a write function on a deployed contract + +Call a write function on a deployed contract by blockchain native asset id and contract address. This creates an onchain transaction, thus it is an async operation. It returns a transaction id that can be polled for status check + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.ContractInteractionsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + WriteCallFunctionDto writeCallFunctionDto = new WriteCallFunctionDto(); // WriteCallFunctionDto | + String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address + String assetId = "assetId_example"; // String | + 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.contractInteractions().writeCallFunction(writeCallFunctionDto, contractAddress, assetId, 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 ContractInteractionsApi#writeCallFunction"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling ContractInteractionsApi#writeCallFunction"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **writeCallFunctionDto** | [**WriteCallFunctionDto**](WriteCallFunctionDto.md)| | | +| **contractAddress** | **String**| The contract's onchain address | | +| **assetId** | **String**| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ContractMetadataDto.md b/docs/ContractMetadataDto.md new file mode 100644 index 0000000..31a9000 --- /dev/null +++ b/docs/ContractMetadataDto.md @@ -0,0 +1,17 @@ + + +# ContractMetadataDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The deployed contract ID | | +|**blockchainId** | **String** | The blockchain ID | | +|**contractAddress** | **String** | The address of the token contract | | +|**contractTemplateId** | **String** | The contract template ID | | +|**vaultAccountId** | **String** | The vault account ID that initiated the request to issue the token | [optional] | + + + diff --git a/docs/ContractTemplateDto.md b/docs/ContractTemplateDto.md new file mode 100644 index 0000000..48b46bb --- /dev/null +++ b/docs/ContractTemplateDto.md @@ -0,0 +1,47 @@ + + +# ContractTemplateDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the contract template | | +|**name** | **String** | The name of the contract template | | +|**description** | **String** | A short description of the contract template | | +|**longDescription** | **String** | A full description of the contract template. May contain to break the lines | [optional] | +|**abi** | **List<List<AbiFunction>>** | | | +|**attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] | +|**docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] | +|**owner** | **String** | The workspace id of the owner of this contract template. If it's a private contract, only this workspace will be allowed to deploy it | [optional] | +|**vendor** | [**VendorDto**](VendorDto.md) | The details of the vendor of this contract template. Applicable only for public contract templates | [optional] | +|**isPublic** | **Boolean** | Is this a contract that is viewable by all fireblocks's users or is it visible only for this workspace | | +|**canDeploy** | **Boolean** | True if the workspace allowed to deploy this contract, false otherwise | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type of the contract template | [optional] | +|**implementationContractId** | **String** | | [optional] | +|**initializationPhase** | [**InitializationPhaseEnum**](#InitializationPhaseEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNGIBLE_TOKEN | "FUNGIBLE_TOKEN" | +| NON_FUNGIBLE_TOKEN | "NON_FUNGIBLE_TOKEN" | +| NON_TOKEN | "NON_TOKEN" | +| TOKEN_EXTENSION | "TOKEN_EXTENSION" | +| TOKEN_UTILITY | "TOKEN_UTILITY" | + + + +## Enum: InitializationPhaseEnum + +| Name | Value | +|---- | -----| +| ON_DEPLOYMENT | "ON_DEPLOYMENT" | +| POST_DEPLOYMENT | "POST_DEPLOYMENT" | + + + diff --git a/docs/ContractTemplatesApi.md b/docs/ContractTemplatesApi.md new file mode 100644 index 0000000..cd71307 --- /dev/null +++ b/docs/ContractTemplatesApi.md @@ -0,0 +1,620 @@ +# ContractTemplatesApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**deleteContractTemplateById**](ContractTemplatesApi.md#deleteContractTemplateById) | **DELETE** /tokenization/templates/{contractTemplateId} | Delete a contract template by id | +| [**deployContract**](ContractTemplatesApi.md#deployContract) | **POST** /tokenization/templates/{contractTemplateId}/deploy | Deploy contract | +| [**getConstructorByContractTemplateId**](ContractTemplatesApi.md#getConstructorByContractTemplateId) | **GET** /tokenization/templates/{contractTemplateId}/constructor | Return contract template's constructor | +| [**getContractTemplateById**](ContractTemplatesApi.md#getContractTemplateById) | **GET** /tokenization/templates/{contractTemplateId} | Return contract template by id | +| [**getContractTemplates**](ContractTemplatesApi.md#getContractTemplates) | **GET** /tokenization/templates | List all contract templates | +| [**getFunctionAbiByContractTemplateId**](ContractTemplatesApi.md#getFunctionAbiByContractTemplateId) | **GET** /tokenization/templates/{contractTemplateId}/function | Return contract template's function | +| [**uploadContractTemplate**](ContractTemplatesApi.md#uploadContractTemplate) | **POST** /tokenization/templates | Upload contract template | + + + +## deleteContractTemplateById + +> CompletableFuture> deleteContractTemplateById deleteContractTemplateById(contractTemplateId) + +Delete a contract template by id + +Delete a contract by id. allowed only for private contract templates. Notice: it is irreversible! + +### 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.ContractTemplatesApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String contractTemplateId = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; // String | The Contract Template identifier + try { + CompletableFuture> response = fireblocks.contractTemplates().deleteContractTemplateById(contractTemplateId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling ContractTemplatesApi#deleteContractTemplateById"); + 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 ContractTemplatesApi#deleteContractTemplateById"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractTemplateId** | **String**| The Contract Template identifier | | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Contract was deleted successfully | - | +| **404** | Could not find contract. | - | +| **0** | Error Response | * X-Request-ID -
| + + +## deployContract + +> CompletableFuture> deployContract deployContract(contractDeployRequest, contractTemplateId, idempotencyKey) + +Deploy contract + +Deploy a new contract by contract template id. If you wish to deploy a token (ERC20, ERC721 etc), and create asset please use POST /tokenization + +### 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.ContractTemplatesApi; +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); + + ContractDeployRequest contractDeployRequest = new ContractDeployRequest(); // ContractDeployRequest | + String contractTemplateId = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; // String | The Contract Template identifier + 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.contractTemplates().deployContract(contractDeployRequest, contractTemplateId, 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 ContractTemplatesApi#deployContract"); + 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 ContractTemplatesApi#deployContract"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractDeployRequest** | [**ContractDeployRequest**](ContractDeployRequest.md)| | | +| **contractTemplateId** | **String**| The Contract Template identifier | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Contract was deployed successfully | - | +| **404** | Could not find contract. | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getConstructorByContractTemplateId + +> CompletableFuture> getConstructorByContractTemplateId getConstructorByContractTemplateId(contractTemplateId, withDocs) + +Return contract template's constructor + +Return contract template's constructor ABI + +### 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.ContractTemplatesApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String contractTemplateId = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; // String | The Contract Template identifier + Boolean withDocs = false; // Boolean | true if you want to get the abi with its docs + try { + CompletableFuture> response = fireblocks.contractTemplates().getConstructorByContractTemplateId(contractTemplateId, withDocs); + 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 ContractTemplatesApi#getConstructorByContractTemplateId"); + 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 ContractTemplatesApi#getConstructorByContractTemplateId"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractTemplateId** | **String**| The Contract Template identifier | | +| **withDocs** | **Boolean**| true if you want to get the abi with its docs | [optional] [default to false] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Contract template's constructor ABI was returned successfully | - | +| **404** | Could not find contract. | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getContractTemplateById + +> CompletableFuture> getContractTemplateById getContractTemplateById(contractTemplateId) + +Return contract template by id + +Return detailed information about the contract template + +### 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.ContractTemplatesApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String contractTemplateId = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; // String | The Contract Template identifier + try { + CompletableFuture> response = fireblocks.contractTemplates().getContractTemplateById(contractTemplateId); + 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 ContractTemplatesApi#getContractTemplateById"); + 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 ContractTemplatesApi#getContractTemplateById"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractTemplateId** | **String**| The Contract Template identifier | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Contract template was returned successfully | - | +| **404** | Could not find contract. | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getContractTemplates + +> CompletableFuture> getContractTemplates getContractTemplates(limit, offset, pageCursor, pageSize, type, initializationPhase) + +List all contract templates + +Return minimal representation of all the contract templates available for the workspace + +### 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.ContractTemplatesApi; +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); + + BigDecimal limit = new BigDecimal("100"); // BigDecimal | Items per page (max 100) + BigDecimal offset = new BigDecimal("0"); // BigDecimal | Paging offset + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items per page, requesting more then max will return max items + String type = "FUNGIBLE_TOKEN"; // String | The type of the contract templates you wish to retrieve. Can accept one type, more or none + String initializationPhase = "ON_DEPLOYMENT"; // String | + try { + CompletableFuture> response = fireblocks.contractTemplates().getContractTemplates(limit, offset, pageCursor, pageSize, type, initializationPhase); + 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 ContractTemplatesApi#getContractTemplates"); + 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 ContractTemplatesApi#getContractTemplates"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **limit** | **BigDecimal**| Items per page (max 100) | [optional] [default to 100] | +| **offset** | **BigDecimal**| Paging offset | [optional] [default to 0] | +| **pageCursor** | **String**| Page cursor to get the next page | [optional] | +| **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | +| **type** | **String**| The type of the contract templates you wish to retrieve. Can accept one type, more or none | [optional] [enum: FUNGIBLE_TOKEN, NON_FUNGIBLE_TOKEN, TOKEN_UTILITY] | +| **initializationPhase** | **String**| | [optional] [enum: ON_DEPLOYMENT, POST_DEPLOYMENT] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of contract templates was returned successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getFunctionAbiByContractTemplateId + +> CompletableFuture> getFunctionAbiByContractTemplateId getFunctionAbiByContractTemplateId(contractTemplateId, functionSignature) + +Return contract template's function + +Return contract template`s function ABI by signature + +### 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.ContractTemplatesApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String contractTemplateId = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; // String | The Contract Template identifier + String functionSignature = "functionSignature_example"; // String | + try { + CompletableFuture> response = fireblocks.contractTemplates().getFunctionAbiByContractTemplateId(contractTemplateId, functionSignature); + 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 ContractTemplatesApi#getFunctionAbiByContractTemplateId"); + 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 ContractTemplatesApi#getFunctionAbiByContractTemplateId"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractTemplateId** | **String**| The Contract Template identifier | | +| **functionSignature** | **String**| | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Contract template`s function ABI was returned successfully | - | +| **404** | Could not find contract. | - | +| **0** | Error Response | * X-Request-ID -
| + + +## uploadContractTemplate + +> CompletableFuture> uploadContractTemplate uploadContractTemplate(contractUploadRequest, idempotencyKey) + +Upload contract template + +Upload a new contract template. This contract template will be available for the workspace + +### 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.ContractTemplatesApi; +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); + + ContractUploadRequest contractUploadRequest = new ContractUploadRequest(); // ContractUploadRequest | + 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.contractTemplates().uploadContractTemplate(contractUploadRequest, 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 ContractTemplatesApi#uploadContractTemplate"); + 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 ContractTemplatesApi#uploadContractTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractUploadRequest** | [**ContractUploadRequest**](ContractUploadRequest.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** | Contract was uploaded successfully | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ContractUploadRequest.md b/docs/ContractUploadRequest.md new file mode 100644 index 0000000..85603dd --- /dev/null +++ b/docs/ContractUploadRequest.md @@ -0,0 +1,33 @@ + + +# ContractUploadRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the contract template | | +|**description** | **String** | A short description of the contract template | | +|**longDescription** | **String** | A full description of the contract template. May contain to break the lines | [optional] | +|**bytecode** | **String** | The compiled artifact of this smart contract. Used for deployment of this contract template | | +|**sourcecode** | **String** | The source code of the contract. Optional. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The type of the contract template | [optional] | +|**docs** | [**ContractDoc**](ContractDoc.md) | A `natspec` compliant documentation json. Can be retrieved from the output json after compilation | [optional] | +|**abi** | **List<List<AbiFunction>>** | | | +|**attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNGIBLE_TOKEN | "FUNGIBLE_TOKEN" | +| NON_FUNGIBLE_TOKEN | "NON_FUNGIBLE_TOKEN" | +| NON_TOKEN | "NON_TOKEN" | +| TOKEN_EXTENSION | "TOKEN_EXTENSION" | +| TOKEN_UTILITY | "TOKEN_UTILITY" | + + + diff --git a/docs/CreateAPIUser.md b/docs/CreateAPIUser.md index f505479..d25eddb 100644 --- a/docs/CreateAPIUser.md +++ b/docs/CreateAPIUser.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**role** | **String** | User role | | -|**name** | **String** | users name | | -|**csrPem** | **String** | only for user with signing capabilities | [optional] | -|**coSignerSetupType** | **String** | cosigner setup type | [optional] | -|**coSignerSetupIsFirstUser** | **Boolean** | is first? | [optional] | +|**role** | **String** | Users role | | +|**name** | **String** | Users name | | +|**csrPem** | **String** | CSR file that is used to verify API requests. read more https://developers.fireblocks.com/docs/quickstart | | +|**coSignerSetupType** | **String** | Different environments allow for different setup options, field is required for management/signer role | [optional] | +|**coSignerSetupIsFirstUser** | **Boolean** | pass as true if this is the first user on the coSigner machine | [optional] | diff --git a/docs/CreateConnectionRequest.md b/docs/CreateConnectionRequest.md index 1486c58..9c7fc5e 100644 --- a/docs/CreateConnectionRequest.md +++ b/docs/CreateConnectionRequest.md @@ -2,24 +2,36 @@ # CreateConnectionRequest - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**vaultAccountId** | **BigDecimal** | The ID of the vault to connect to the dApp. | | -|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | The default fee level. Valid values are `MEDIUM` and `HIGH`. | | -|**uri** | **String** | The WalletConnect uri provided by the dapp. | | -|**chainIds** | **List<String>** | The IDs of the blockchain networks used in the Web3 connection (Currently required in V1 connections only). | [optional] | - - - -## Enum: FeeLevelEnum - -| Name | Value | -|---- | -----| -| MEDIUM | "MEDIUM" | -| HIGH | "HIGH" | - +## oneOf schemas +* [CreateNcwConnectionRequest](CreateNcwConnectionRequest.md) +* [CreateVaultAccountConnectionRequest](CreateVaultAccountConnectionRequest.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateConnectionRequest; +import com.fireblocks.sdk.model.CreateNcwConnectionRequest; +import com.fireblocks.sdk.model.CreateVaultAccountConnectionRequest; + +public class Example { + public static void main(String[] args) { + CreateConnectionRequest exampleCreateConnectionRequest = new CreateConnectionRequest(); + + // create a new CreateNcwConnectionRequest + CreateNcwConnectionRequest exampleCreateNcwConnectionRequest = new CreateNcwConnectionRequest(); + // set CreateConnectionRequest to CreateNcwConnectionRequest + exampleCreateConnectionRequest.setActualInstance(exampleCreateNcwConnectionRequest); + // to get back the CreateNcwConnectionRequest set earlier + CreateNcwConnectionRequest testCreateNcwConnectionRequest = (CreateNcwConnectionRequest) exampleCreateConnectionRequest.getActualInstance(); + + // create a new CreateVaultAccountConnectionRequest + CreateVaultAccountConnectionRequest exampleCreateVaultAccountConnectionRequest = new CreateVaultAccountConnectionRequest(); + // set CreateConnectionRequest to CreateVaultAccountConnectionRequest + exampleCreateConnectionRequest.setActualInstance(exampleCreateVaultAccountConnectionRequest); + // to get back the CreateVaultAccountConnectionRequest set earlier + CreateVaultAccountConnectionRequest testCreateVaultAccountConnectionRequest = (CreateVaultAccountConnectionRequest) exampleCreateConnectionRequest.getActualInstance(); + } +} +``` diff --git a/docs/CreateConsoleUser.md b/docs/CreateConsoleUser.md index 41865cd..e516709 100644 --- a/docs/CreateConsoleUser.md +++ b/docs/CreateConsoleUser.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**firstName** | **String** | | | -|**lastName** | **String** | | | -|**role** | **String** | | | -|**email** | **String** | | | +|**firstName** | **String** | users firstName | | +|**lastName** | **String** | users lastName | | +|**role** | **String** | users role | | +|**email** | **String** | valid email address | | diff --git a/docs/CreateRequest.md b/docs/CreateRequest.md deleted file mode 100644 index 32a7002..0000000 --- a/docs/CreateRequest.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# CreateRequest - -## oneOf schemas -* [CreateConnectionRequest](CreateConnectionRequest.md) -* [CreateNcwConnectionRequest](CreateNcwConnectionRequest.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.CreateRequest; -import com.fireblocks.sdk.model.CreateConnectionRequest; -import com.fireblocks.sdk.model.CreateNcwConnectionRequest; - -public class Example { - public static void main(String[] args) { - CreateRequest exampleCreateRequest = new CreateRequest(); - - // create a new CreateConnectionRequest - CreateConnectionRequest exampleCreateConnectionRequest = new CreateConnectionRequest(); - // set CreateRequest to CreateConnectionRequest - exampleCreateRequest.setActualInstance(exampleCreateConnectionRequest); - // to get back the CreateConnectionRequest set earlier - CreateConnectionRequest testCreateConnectionRequest = (CreateConnectionRequest) exampleCreateRequest.getActualInstance(); - - // create a new CreateNcwConnectionRequest - CreateNcwConnectionRequest exampleCreateNcwConnectionRequest = new CreateNcwConnectionRequest(); - // set CreateRequest to CreateNcwConnectionRequest - exampleCreateRequest.setActualInstance(exampleCreateNcwConnectionRequest); - // to get back the CreateNcwConnectionRequest set earlier - CreateNcwConnectionRequest testCreateNcwConnectionRequest = (CreateNcwConnectionRequest) exampleCreateRequest.getActualInstance(); - } -} -``` - - diff --git a/docs/CreateTokenRequestDto.md b/docs/CreateTokenRequestDto.md new file mode 100644 index 0000000..96c6cbc --- /dev/null +++ b/docs/CreateTokenRequestDto.md @@ -0,0 +1,17 @@ + + +# CreateTokenRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**blockchainId** | **String** | The id of the blockchain the request was initiated on | [optional] | +|**assetId** | **String** | The base asset identifier of the blockchain you want to deploy to | [optional] | +|**vaultAccountId** | **String** | The id of the vault account that initiated the request to issue the token | | +|**createParams** | [**CreateTokenRequestDtoCreateParams**](CreateTokenRequestDtoCreateParams.md) | | | +|**displayName** | **String** | | [optional] | + + + diff --git a/docs/CreateTokenRequestDtoCreateParams.md b/docs/CreateTokenRequestDtoCreateParams.md new file mode 100644 index 0000000..de35004 --- /dev/null +++ b/docs/CreateTokenRequestDtoCreateParams.md @@ -0,0 +1,37 @@ + + +# CreateTokenRequestDtoCreateParams + +## oneOf schemas +* [EVMTokenCreateParamsDto](EVMTokenCreateParamsDto.md) +* [StellarRippleCreateParamsDto](StellarRippleCreateParamsDto.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateTokenRequestDtoCreateParams; +import com.fireblocks.sdk.model.EVMTokenCreateParamsDto; +import com.fireblocks.sdk.model.StellarRippleCreateParamsDto; + +public class Example { + public static void main(String[] args) { + CreateTokenRequestDtoCreateParams exampleCreateTokenRequestDtoCreateParams = new CreateTokenRequestDtoCreateParams(); + + // create a new EVMTokenCreateParamsDto + EVMTokenCreateParamsDto exampleEVMTokenCreateParamsDto = new EVMTokenCreateParamsDto(); + // set CreateTokenRequestDtoCreateParams to EVMTokenCreateParamsDto + exampleCreateTokenRequestDtoCreateParams.setActualInstance(exampleEVMTokenCreateParamsDto); + // to get back the EVMTokenCreateParamsDto set earlier + EVMTokenCreateParamsDto testEVMTokenCreateParamsDto = (EVMTokenCreateParamsDto) exampleCreateTokenRequestDtoCreateParams.getActualInstance(); + + // create a new StellarRippleCreateParamsDto + StellarRippleCreateParamsDto exampleStellarRippleCreateParamsDto = new StellarRippleCreateParamsDto(); + // set CreateTokenRequestDtoCreateParams to StellarRippleCreateParamsDto + exampleCreateTokenRequestDtoCreateParams.setActualInstance(exampleStellarRippleCreateParamsDto); + // to get back the StellarRippleCreateParamsDto set earlier + StellarRippleCreateParamsDto testStellarRippleCreateParamsDto = (StellarRippleCreateParamsDto) exampleCreateTokenRequestDtoCreateParams.getActualInstance(); + } +} +``` + + diff --git a/docs/CreateVaultAccountConnectionRequest.md b/docs/CreateVaultAccountConnectionRequest.md new file mode 100644 index 0000000..4a4cf1a --- /dev/null +++ b/docs/CreateVaultAccountConnectionRequest.md @@ -0,0 +1,25 @@ + + +# CreateVaultAccountConnectionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **BigDecimal** | The ID of the vault to connect to the dApp. | | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | The default fee level. Valid values are `MEDIUM` and `HIGH`. | | +|**uri** | **String** | The WalletConnect uri provided by the dapp. | | +|**chainIds** | **List<String>** | The IDs of the blockchain networks used in the Web3 connection (Currently required in V1 connections only). | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/DeleteNetworkConnectionResponse.md b/docs/DeleteNetworkConnectionResponse.md new file mode 100644 index 0000000..f3ef914 --- /dev/null +++ b/docs/DeleteNetworkConnectionResponse.md @@ -0,0 +1,13 @@ + + +# DeleteNetworkConnectionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | | | + + + diff --git a/docs/SetRoutingPolicy200Response.md b/docs/DeleteNetworkIdResponse.md similarity index 84% rename from docs/SetRoutingPolicy200Response.md rename to docs/DeleteNetworkIdResponse.md index 179079e..4f2227d 100644 --- a/docs/SetRoutingPolicy200Response.md +++ b/docs/DeleteNetworkIdResponse.md @@ -1,6 +1,6 @@ -# SetRoutingPolicy200Response +# DeleteNetworkIdResponse ## Properties diff --git a/docs/DeployedContractResponseDto.md b/docs/DeployedContractResponseDto.md new file mode 100644 index 0000000..a506f50 --- /dev/null +++ b/docs/DeployedContractResponseDto.md @@ -0,0 +1,17 @@ + + +# DeployedContractResponseDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The deployed contract data identifier | | +|**contractAddress** | **String** | The contract's onchain address | | +|**contractTemplateId** | **String** | The contract template identifier | | +|**vaultAccountId** | **String** | The vault account id this contract was deploy from | [optional] | +|**blockchainId** | **String** | | | + + + diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md new file mode 100644 index 0000000..64f81db --- /dev/null +++ b/docs/DeployedContractsApi.md @@ -0,0 +1,270 @@ +# DeployedContractsApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getDeployedContractByAddress**](DeployedContractsApi.md#getDeployedContractByAddress) | **GET** /tokenization/contracts/{assetId}/{contractAddress} | Return deployed contract data | +| [**getDeployedContractById**](DeployedContractsApi.md#getDeployedContractById) | **GET** /tokenization/contracts/{id} | Return deployed contract data by id | +| [**getDeployedContracts**](DeployedContractsApi.md#getDeployedContracts) | **GET** /tokenization/contracts | List deployed contracts data | + + + +## getDeployedContractByAddress + +> CompletableFuture> getDeployedContractByAddress getDeployedContractByAddress(contractAddress, assetId) + +Return deployed contract data + +Return deployed contract data by blockchain native asset id and contract address + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.DeployedContractsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address + String assetId = "assetId_example"; // String | + try { + CompletableFuture> response = fireblocks.deployedContracts().getDeployedContractByAddress(contractAddress, assetId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling DeployedContractsApi#getDeployedContractByAddress"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling DeployedContractsApi#getDeployedContractByAddress"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **contractAddress** | **String**| The contract's onchain address | | +| **assetId** | **String**| | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getDeployedContractById + +> CompletableFuture> getDeployedContractById getDeployedContractById(id) + +Return deployed contract data by id + +Return deployed contract data by id + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.DeployedContractsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String id = "b70701f4-d7b1-4795-a8ee-b09cdb5b850d"; // String | The deployed contract data identifier + try { + CompletableFuture> response = fireblocks.deployedContracts().getDeployedContractById(id); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling DeployedContractsApi#getDeployedContractById"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling DeployedContractsApi#getDeployedContractById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The deployed contract data identifier | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getDeployedContracts + +> CompletableFuture> getDeployedContracts getDeployedContracts(pageCursor, pageSize, contractAddress, assetId, templateId) + +List deployed contracts data + +Return a filtered lean representation of the deployed contracts data on all blockchains (paginated) + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.DeployedContractsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items per page, requesting more then max will return max items + String contractAddress = "0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66"; // String | The contract's onchain address + String assetId = "assetId_example"; // String | + String templateId = "templateId_example"; // String | + try { + CompletableFuture> response = fireblocks.deployedContracts().getDeployedContracts(pageCursor, pageSize, contractAddress, assetId, templateId); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling DeployedContractsApi#getDeployedContracts"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling DeployedContractsApi#getDeployedContracts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageCursor** | **String**| Page cursor to get the next page | [optional] | +| **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | +| **contractAddress** | **String**| The contract's onchain address | [optional] | +| **assetId** | **String**| | [optional] | +| **templateId** | **String**| | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Deployed contracts fetched successfully | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/DeployedContractsPaginatedResponse.md b/docs/DeployedContractsPaginatedResponse.md new file mode 100644 index 0000000..7098f65 --- /dev/null +++ b/docs/DeployedContractsPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# DeployedContractsPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<LeanDeployedContractResponseDto>**](LeanDeployedContractResponseDto.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/DropTransactionResponse.md b/docs/DropTransactionResponse.md index 475f9bc..4b8d22d 100644 --- a/docs/DropTransactionResponse.md +++ b/docs/DropTransactionResponse.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**success** | **Boolean** | | [optional] | -|**transactions** | **List<String>** | | [optional] | +|**txStatus** | **String** | | [optional] | +|**txId** | **String** | | [optional] | +|**replacedTxHash** | **String** | | [optional] | diff --git a/docs/EVMTokenCreateParamsDto.md b/docs/EVMTokenCreateParamsDto.md new file mode 100644 index 0000000..72d59a1 --- /dev/null +++ b/docs/EVMTokenCreateParamsDto.md @@ -0,0 +1,14 @@ + + +# EVMTokenCreateParamsDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**contractId** | **String** | The id of the contract template that will be used to create the token | | +|**constructorParams** | **List<List<ParameterWithValue>>** | The constructor parameters and values of the contract template | [optional] | + + + diff --git a/docs/FunctionDoc.md b/docs/FunctionDoc.md new file mode 100644 index 0000000..395acbc --- /dev/null +++ b/docs/FunctionDoc.md @@ -0,0 +1,15 @@ + + +# FunctionDoc + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**details** | **String** | A description of the function | [optional] | +|**params** | **Map<String, String>** | A description of the function parameters | [optional] | +|**returns** | **Map<String, String>** | A description of the function return values. only for read functions | [optional] | + + + diff --git a/docs/ListOwnedTokens200Response.md b/docs/GetNFTsResponse.md similarity index 90% rename from docs/ListOwnedTokens200Response.md rename to docs/GetNFTsResponse.md index ff3933c..89c2b96 100644 --- a/docs/ListOwnedTokens200Response.md +++ b/docs/GetNFTsResponse.md @@ -1,6 +1,6 @@ -# ListOwnedTokens200Response +# GetNFTsResponse ## Properties diff --git a/docs/GetOtaStatus200Response.md b/docs/GetOtaStatusResponse.md similarity index 87% rename from docs/GetOtaStatus200Response.md rename to docs/GetOtaStatusResponse.md index e6e95a6..98956d6 100644 --- a/docs/GetOtaStatus200Response.md +++ b/docs/GetOtaStatusResponse.md @@ -1,6 +1,6 @@ -# GetOtaStatus200Response +# GetOtaStatusResponse ## Properties diff --git a/docs/GetOwnershipTokens200Response.md b/docs/GetOwnershipTokensResponse.md similarity index 89% rename from docs/GetOwnershipTokens200Response.md rename to docs/GetOwnershipTokensResponse.md index 00afb5e..a72da40 100644 --- a/docs/GetOwnershipTokens200Response.md +++ b/docs/GetOwnershipTokensResponse.md @@ -1,6 +1,6 @@ -# GetOwnershipTokens200Response +# GetOwnershipTokensResponse ## Properties diff --git a/docs/GetWorkspaceStatus200Response.md b/docs/GetWorkspaceStatusResponse.md similarity index 85% rename from docs/GetWorkspaceStatus200Response.md rename to docs/GetWorkspaceStatusResponse.md index d599ebd..3b80cb8 100644 --- a/docs/GetWorkspaceStatus200Response.md +++ b/docs/GetWorkspaceStatusResponse.md @@ -1,6 +1,6 @@ -# GetWorkspaceStatus200Response +# GetWorkspaceStatusResponse ## Properties diff --git a/docs/HttpContractDoesNotExistError.md b/docs/HttpContractDoesNotExistError.md new file mode 100644 index 0000000..89affd6 --- /dev/null +++ b/docs/HttpContractDoesNotExistError.md @@ -0,0 +1,14 @@ + + +# HttpContractDoesNotExistError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Not Found error code | [optional] | +|**code** | **String** | Error code | [optional] | + + + diff --git a/docs/LeanAbiFunction.md b/docs/LeanAbiFunction.md new file mode 100644 index 0000000..f9fc415 --- /dev/null +++ b/docs/LeanAbiFunction.md @@ -0,0 +1,14 @@ + + +# LeanAbiFunction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The function name | [optional] | +|**inputs** | [**List<ParameterWithValue>**](ParameterWithValue.md) | The function inputs | | + + + diff --git a/docs/LeanContractDto.md b/docs/LeanContractDto.md new file mode 100644 index 0000000..a9f03a8 --- /dev/null +++ b/docs/LeanContractDto.md @@ -0,0 +1,33 @@ + + +# LeanContractDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the contract template | | +|**name** | **String** | The name of the contract template | | +|**description** | **String** | A short description of the contract template | | +|**attributes** | [**ContractAttributes**](ContractAttributes.md) | The attributes related to this contract template. It will be displayed in the tokenization page | [optional] | +|**isPublic** | **Boolean** | Is this a contract that is viewable by all fireblocks's users or is it visible only for this workspace | | +|**canDeploy** | **Boolean** | True if the workspace allowed to deploy this contract, false otherwise | [optional] | +|**owner** | **String** | The workspace id of the owner of this contract template. If it's a private contract, only this workspace will be allowed to deploy it | [optional] | +|**vendor** | [**VendorDto**](VendorDto.md) | The details of the vendor of this contract template. Applicable only for public contract templates | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNGIBLE_TOKEN | "FUNGIBLE_TOKEN" | +| NON_FUNGIBLE_TOKEN | "NON_FUNGIBLE_TOKEN" | +| NON_TOKEN | "NON_TOKEN" | +| TOKEN_EXTENSION | "TOKEN_EXTENSION" | +| TOKEN_UTILITY | "TOKEN_UTILITY" | + + + diff --git a/docs/LeanDeployedContractResponseDto.md b/docs/LeanDeployedContractResponseDto.md new file mode 100644 index 0000000..6f1d651 --- /dev/null +++ b/docs/LeanDeployedContractResponseDto.md @@ -0,0 +1,16 @@ + + +# LeanDeployedContractResponseDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The deployed contract data identifier | | +|**contractAddress** | **String** | The contract's onchain address | | +|**contractTemplateId** | **String** | The contract template identifier | | +|**blockchainId** | **String** | | | + + + diff --git a/docs/ListOwnedCollections200Response.md b/docs/ListOwnedCollectionsResponse.md similarity index 89% rename from docs/ListOwnedCollections200Response.md rename to docs/ListOwnedCollectionsResponse.md index aa2c415..aa6598e 100644 --- a/docs/ListOwnedCollections200Response.md +++ b/docs/ListOwnedCollectionsResponse.md @@ -1,6 +1,6 @@ -# ListOwnedCollections200Response +# ListOwnedCollectionsResponse ## Properties diff --git a/docs/ListOwnedTokensResponse.md b/docs/ListOwnedTokensResponse.md new file mode 100644 index 0000000..cda7835 --- /dev/null +++ b/docs/ListOwnedTokensResponse.md @@ -0,0 +1,14 @@ + + +# ListOwnedTokensResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**paging** | [**Paging**](Paging.md) | | [optional] | +|**data** | [**List<TokenResponse>**](TokenResponse.md) | | [optional] | + + + diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md index c288a92..536f365 100644 --- a/docs/NetworkConnectionsApi.md +++ b/docs/NetworkConnectionsApi.md @@ -13,6 +13,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | [**getNetworkConnections**](NetworkConnectionsApi.md#getNetworkConnections) | **GET** /network_connections | List network connections | | [**getNetworkId**](NetworkConnectionsApi.md#getNetworkId) | **GET** /network_ids/{networkId} | Returns specific network ID. | | [**getNetworkIds**](NetworkConnectionsApi.md#getNetworkIds) | **GET** /network_ids | Returns all network IDs, both local IDs and discoverable remote IDs | +| [**getRoutingPolicyAssetGroups**](NetworkConnectionsApi.md#getRoutingPolicyAssetGroups) | **GET** /network_ids/routing_policy_asset_groups | Returns all enabled routing policy asset groups | | [**setNetworkIdDiscoverability**](NetworkConnectionsApi.md#setNetworkIdDiscoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID's discoverability. | | [**setNetworkIdName**](NetworkConnectionsApi.md#setNetworkIdName) | **PATCH** /network_ids/{networkId}/set_name | Update network ID's name. | | [**setNetworkIdRoutingPolicy**](NetworkConnectionsApi.md#setNetworkIdRoutingPolicy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy. | @@ -111,7 +112,7 @@ No authorization required Creates a new network connection -Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -196,7 +197,7 @@ No authorization required Creates a new Network ID -Creates a new Network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Creates a new Network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -277,7 +278,7 @@ No authorization required ## deleteNetworkConnection -> CompletableFuture> deleteNetworkConnection deleteNetworkConnection(connectionId) +> CompletableFuture> deleteNetworkConnection deleteNetworkConnection(connectionId) Deletes a network connection by ID @@ -308,7 +309,7 @@ public class Example { String connectionId = "connectionId_example"; // String | The ID of the network connection to delete try { - CompletableFuture> response = fireblocks.networkConnections().deleteNetworkConnection(connectionId); + CompletableFuture> response = fireblocks.networkConnections().deleteNetworkConnection(connectionId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -339,7 +340,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -360,7 +361,7 @@ No authorization required ## deleteNetworkId -> CompletableFuture> deleteNetworkId deleteNetworkId(networkId) +> CompletableFuture> deleteNetworkId deleteNetworkId(networkId) Deletes specific network ID. @@ -391,7 +392,7 @@ public class Example { String networkId = "networkId_example"; // String | The ID of the network try { - CompletableFuture> response = fireblocks.networkConnections().deleteNetworkId(networkId); + CompletableFuture> response = fireblocks.networkConnections().deleteNetworkId(networkId); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -422,7 +423,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -765,6 +766,85 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getRoutingPolicyAssetGroups + +> CompletableFuture>> getRoutingPolicyAssetGroups getRoutingPolicyAssetGroups() + +Returns all enabled routing policy asset groups + +Retrieves a list of all enabled routing policy asset groups. Your routing policy defines how your transactions are routed. You can use one or more enabled routing policy asset groups to describe connection or network id routing policy. + +### 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.NetworkConnectionsApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + try { + CompletableFuture>> response = fireblocks.networkConnections().getRoutingPolicyAssetGroups(); + 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 NetworkConnectionsApi#getRoutingPolicyAssetGroups"); + 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 NetworkConnectionsApi#getRoutingPolicyAssetGroups"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A list of enabled routing policy asset groups | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## setNetworkIdDiscoverability > CompletableFuture> setNetworkIdDiscoverability setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest, networkId) @@ -941,7 +1021,7 @@ No authorization required Update network id routing policy. -Updates the routing policy of a specified network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Updates the routing policy of a specified network ID. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -1022,11 +1102,11 @@ No authorization required ## setRoutingPolicy -> CompletableFuture> setRoutingPolicy setRoutingPolicy(connectionId, setRoutingPolicyRequest) +> CompletableFuture> setRoutingPolicy setRoutingPolicy(connectionId, setRoutingPolicyRequest) Update network connection routing policy. -Updates an existing network connection's routing policy. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). +Updates an existing network connection's routing policy. **Note:** This API call is subject to Flexible Routing Schemes. Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type: - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail. - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one. - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). ### Example @@ -1054,7 +1134,7 @@ public class Example { String connectionId = "connectionId_example"; // String | The ID of the network connection SetRoutingPolicyRequest setRoutingPolicyRequest = new SetRoutingPolicyRequest(); // SetRoutingPolicyRequest | try { - CompletableFuture> response = fireblocks.networkConnections().setRoutingPolicy(connectionId, setRoutingPolicyRequest); + CompletableFuture> response = fireblocks.networkConnections().setRoutingPolicy(connectionId, setRoutingPolicyRequest); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1086,7 +1166,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization diff --git a/docs/NftsApi.md b/docs/NftsApi.md index 55f2a4a..56548ec 100644 --- a/docs/NftsApi.md +++ b/docs/NftsApi.md @@ -101,7 +101,7 @@ No authorization required ## getNFTs -> CompletableFuture> getNFTs getNFTs(ids, pageCursor, pageSize, sort, order) +> CompletableFuture> getNFTs getNFTs(ids, pageCursor, pageSize, sort, order) List tokens by IDs @@ -136,7 +136,7 @@ public class Example { List sort = Arrays.asList(); // List | Sort by param, it can be one param or a list of params separated by comma String order = "DESC"; // String | Order direction, it can be `ASC` for ascending or `DESC` for descending try { - CompletableFuture> response = fireblocks.nfts().getNFTs(ids, pageCursor, pageSize, sort, order); + CompletableFuture> response = fireblocks.nfts().getNFTs(ids, pageCursor, pageSize, sort, order); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -171,7 +171,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -191,7 +191,7 @@ No authorization required ## getOwnershipTokens -> CompletableFuture> getOwnershipTokens getOwnershipTokens(blockchainDescriptor, vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize, sort, order, status, search, spam) +> CompletableFuture> getOwnershipTokens getOwnershipTokens(blockchainDescriptor, vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize, sort, order, status, search, spam) List all owned tokens (paginated) @@ -235,7 +235,7 @@ public class Example { String search = "search_example"; // String | Search owned tokens and their collections. Possible criteria for search: token name and id within the contract/collection, collection name, blockchain descriptor and name. String spam = "true"; // String | Token ownership spam status. try { - CompletableFuture> response = fireblocks.nfts().getOwnershipTokens(blockchainDescriptor, vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize, sort, order, status, search, spam); + CompletableFuture> response = fireblocks.nfts().getOwnershipTokens(blockchainDescriptor, vaultAccountIds, ncwId, ncwAccountIds, walletType, ids, collectionIds, pageCursor, pageSize, sort, order, status, search, spam); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -262,7 +262,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [optional] [enum: ETH, ETH_TEST3, ETH_TEST5, POLYGON, POLYGON_TEST_MUMBAI, XTZ, XTZ_TEST, BASECHAIN_ETH] | +| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [optional] [enum: ETH, ETH_TEST3, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, XTZ, XTZ_TEST, BASECHAIN_ETH] | | **vaultAccountIds** | **String**| A comma separated list of Vault Account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=END_USER_WALLET or ncwId is provided. | [optional] | | **ncwId** | **String**| Tenant's Non-Custodial Wallet ID | [optional] | | **ncwAccountIds** | **String**| A comma separated list of Non-Custodial account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=VAULT_ACCOUNT or ncwId is not provided. | [optional] | @@ -279,7 +279,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -299,7 +299,7 @@ No authorization required ## listOwnedCollections -> CompletableFuture> listOwnedCollections listOwnedCollections(ncwId, walletType, search, pageCursor, pageSize, sort, order, status) +> CompletableFuture> listOwnedCollections listOwnedCollections(ncwId, walletType, search, pageCursor, pageSize, sort, order, status) List owned collections (paginated) @@ -337,7 +337,7 @@ public class Example { String order = "DESC"; // String | Order direction, it can be `ASC` for ascending or `DESC` for descending String status = "LISTED"; // String | Token ownership status try { - CompletableFuture> response = fireblocks.nfts().listOwnedCollections(ncwId, walletType, search, pageCursor, pageSize, sort, order, status); + CompletableFuture> response = fireblocks.nfts().listOwnedCollections(ncwId, walletType, search, pageCursor, pageSize, sort, order, status); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -375,7 +375,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -395,7 +395,7 @@ No authorization required ## listOwnedTokens -> CompletableFuture> listOwnedTokens listOwnedTokens(ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam) +> CompletableFuture> listOwnedTokens listOwnedTokens(ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam) List all distinct owned tokens (paginated) @@ -434,7 +434,7 @@ public class Example { String search = "search_example"; // String | Search owned tokens by token name String spam = "true"; // String | Token ownership spam status. try { - CompletableFuture> response = fireblocks.nfts().listOwnedTokens(ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam); + CompletableFuture> response = fireblocks.nfts().listOwnedTokens(ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -473,7 +473,7 @@ public class Example { ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -635,7 +635,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [enum: ETH, ETH_TEST3, ETH_TEST5, POLYGON, POLYGON_TEST_MUMBAI, BASECHAIN_ETH] | +| **blockchainDescriptor** | **String**| Blockchain descriptor filter | [enum: ETH, ETH_TEST3, ETH_TEST5, ETH_TEST6, POLYGON, POLYGON_TEST_MUMBAI, AMOY_POLYGON_TEST, BASECHAIN_ETH] | | **vaultAccountId** | **String**| Vault account filter | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | diff --git a/docs/NotFoundException.md b/docs/NotFoundException.md new file mode 100644 index 0000000..da54fdd --- /dev/null +++ b/docs/NotFoundException.md @@ -0,0 +1,15 @@ + + +# NotFoundException + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**statusCode** | **Integer** | HTTP status code | [optional] | +|**message** | **String** | Error message | [optional] | +|**error** | **String** | Short description of the HTTP error | [optional] | + + + diff --git a/docs/OtaBetaApi.md b/docs/OtaBetaApi.md index f870071..bd369e4 100644 --- a/docs/OtaBetaApi.md +++ b/docs/OtaBetaApi.md @@ -11,7 +11,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ ## getOtaStatus -> CompletableFuture> getOtaStatus getOtaStatus() +> CompletableFuture> getOtaStatus getOtaStatus() Returns current OTA status @@ -41,7 +41,7 @@ public class Example { Fireblocks fireblocks = new Fireblocks(configurationOptions); try { - CompletableFuture> response = fireblocks.otaBeta().getOtaStatus(); + CompletableFuture> response = fireblocks.otaBeta().getOtaStatus(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -69,7 +69,7 @@ This endpoint does not need any parameter. ### Return type -CompletableFuture> +CompletableFuture> ### Authorization diff --git a/docs/Parameter.md b/docs/Parameter.md new file mode 100644 index 0000000..6648d44 --- /dev/null +++ b/docs/Parameter.md @@ -0,0 +1,17 @@ + + +# Parameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the parameter as it appears in the ABI | | +|**description** | **String** | A description of the parameter, fetched from the devdoc of this contract | [optional] | +|**internalType** | **String** | The internal type of the parameter as it appears in the ABI | [optional] | +|**type** | **String** | The type of the parameter as it appears in the ABI | | +|**components** | [**List<Parameter>**](Parameter.md) | | [optional] | + + + diff --git a/docs/ParameterWithValue.md b/docs/ParameterWithValue.md new file mode 100644 index 0000000..272888b --- /dev/null +++ b/docs/ParameterWithValue.md @@ -0,0 +1,19 @@ + + +# ParameterWithValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the parameter as it appears in the ABI | | +|**description** | **String** | A description of the parameter, fetched from the devdoc of this contract | [optional] | +|**internalType** | **String** | The internal type of the parameter as it appears in the ABI | [optional] | +|**type** | **String** | The type of the parameter as it appears in the ABI | | +|**components** | [**List<Parameter>**](Parameter.md) | | [optional] | +|**value** | **String** | The value of the parameter. can also be ParameterWithValue | [optional] | +|**functionValue** | [**LeanAbiFunction**](LeanAbiFunction.md) | The function value of this param (if has one). If this is set, the `value` shouldn`t be. Used for proxies | [optional] | + + + diff --git a/docs/ReadAbiFunction.md b/docs/ReadAbiFunction.md new file mode 100644 index 0000000..b67abb0 --- /dev/null +++ b/docs/ReadAbiFunction.md @@ -0,0 +1,27 @@ + + +# ReadAbiFunction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stateMutability** | [**StateMutabilityEnum**](#StateMutabilityEnum) | | | +|**outputs** | [**List<Parameter>**](Parameter.md) | | [optional] | +|**name** | **String** | | [optional] | +|**type** | **String** | | | +|**inputs** | [**List<ParameterWithValue>**](ParameterWithValue.md) | | | +|**description** | **String** | | [optional] | + + + +## Enum: StateMutabilityEnum + +| Name | Value | +|---- | -----| +| PURE | "pure" | +| VIEW | "view" | + + + diff --git a/docs/ReadCallFunctionDto.md b/docs/ReadCallFunctionDto.md new file mode 100644 index 0000000..5a5cc6d --- /dev/null +++ b/docs/ReadCallFunctionDto.md @@ -0,0 +1,13 @@ + + +# ReadCallFunctionDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**abiFunction** | [**List<ReadAbiFunction>**](ReadAbiFunction.md) | The abi of the read function you wish to call | | + + + diff --git a/docs/ResetDeviceApi.md b/docs/ResetDeviceApi.md index 5b36806..98ff2c5 100644 --- a/docs/ResetDeviceApi.md +++ b/docs/ResetDeviceApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**resetDevice**](ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | resets device | +| [**resetDevice**](ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | Resets device | @@ -12,9 +12,9 @@ All URIs are relative to https://developers.fireblocks.com/reference/ > CompletableFuture> resetDevice resetDevice(id, idempotencyKey) -resets device +Resets device -resets device +Resets mobile device for given console user, that user will need to do mobile onboarding again. ### Example @@ -39,7 +39,7 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String id = "id_example"; // String | The ID of the user + String id = "id_example"; // String | The ID of the console user 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.resetDevice().resetDevice(id, idempotencyKey); @@ -68,7 +68,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **id** | **String**| The ID of the user | | +| **id** | **String**| The ID of the console user | | | **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 @@ -88,7 +88,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | User sent for creation | * X-Request-ID -
| +| **200** | Reset device approval request has been sent | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| | **5XX** | Internal error. | * X-Request-ID -
| diff --git a/docs/SetRoutingPolicyResponse.md b/docs/SetRoutingPolicyResponse.md new file mode 100644 index 0000000..2cd8bf3 --- /dev/null +++ b/docs/SetRoutingPolicyResponse.md @@ -0,0 +1,13 @@ + + +# SetRoutingPolicyResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**success** | **Boolean** | | | + + + diff --git a/docs/StellarRippleCreateParamsDto.md b/docs/StellarRippleCreateParamsDto.md new file mode 100644 index 0000000..f4340b3 --- /dev/null +++ b/docs/StellarRippleCreateParamsDto.md @@ -0,0 +1,15 @@ + + +# StellarRippleCreateParamsDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**symbol** | **String** | The symbol of the token | | +|**name** | **String** | The name of the token | | +|**issuerAddress** | **String** | The address of the issuer of this token. Will be part of the identifier of this token on chain. | | + + + diff --git a/docs/TemplatesPaginatedResponse.md b/docs/TemplatesPaginatedResponse.md new file mode 100644 index 0000000..dcf85ef --- /dev/null +++ b/docs/TemplatesPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# TemplatesPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<LeanContractDto>**](LeanContractDto.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/TokenLinkDto.md b/docs/TokenLinkDto.md new file mode 100644 index 0000000..ed53481 --- /dev/null +++ b/docs/TokenLinkDto.md @@ -0,0 +1,38 @@ + + +# TokenLinkDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The token link id | | +|**status** | [**StatusEnum**](#StatusEnum) | The token status | | +|**type** | [**TypeEnum**](#TypeEnum) | The type of token | [optional] | +|**refId** | **String** | The Fireblocks' reference id. Can be a Fireblocks' supported asset, collectionId or contractId | [optional] | +|**displayName** | **String** | The token display name. If was not provided, would be taken from the contract template name | [optional] | +|**tokenMetadata** | [**TokenLinkDtoTokenMetadata**](TokenLinkDtoTokenMetadata.md) | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| PENDING | "PENDING" | +| COMPLETED | "COMPLETED" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNGIBLE_TOKEN | "FUNGIBLE_TOKEN" | +| NON_FUNGIBLE_TOKEN | "NON_FUNGIBLE_TOKEN" | +| TOKEN_UTILITY | "TOKEN_UTILITY" | +| TOKEN_EXTENSION | "TOKEN_EXTENSION" | + + + diff --git a/docs/TokenLinkDtoTokenMetadata.md b/docs/TokenLinkDtoTokenMetadata.md new file mode 100644 index 0000000..d87580a --- /dev/null +++ b/docs/TokenLinkDtoTokenMetadata.md @@ -0,0 +1,48 @@ + + +# TokenLinkDtoTokenMetadata + +The token's metadata + +## oneOf schemas +* [AssetMetadataDto](AssetMetadataDto.md) +* [CollectionMetadataDto](CollectionMetadataDto.md) +* [ContractMetadataDto](ContractMetadataDto.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.TokenLinkDtoTokenMetadata; +import com.fireblocks.sdk.model.AssetMetadataDto; +import com.fireblocks.sdk.model.CollectionMetadataDto; +import com.fireblocks.sdk.model.ContractMetadataDto; + +public class Example { + public static void main(String[] args) { + TokenLinkDtoTokenMetadata exampleTokenLinkDtoTokenMetadata = new TokenLinkDtoTokenMetadata(); + + // create a new AssetMetadataDto + AssetMetadataDto exampleAssetMetadataDto = new AssetMetadataDto(); + // set TokenLinkDtoTokenMetadata to AssetMetadataDto + exampleTokenLinkDtoTokenMetadata.setActualInstance(exampleAssetMetadataDto); + // to get back the AssetMetadataDto set earlier + AssetMetadataDto testAssetMetadataDto = (AssetMetadataDto) exampleTokenLinkDtoTokenMetadata.getActualInstance(); + + // create a new CollectionMetadataDto + CollectionMetadataDto exampleCollectionMetadataDto = new CollectionMetadataDto(); + // set TokenLinkDtoTokenMetadata to CollectionMetadataDto + exampleTokenLinkDtoTokenMetadata.setActualInstance(exampleCollectionMetadataDto); + // to get back the CollectionMetadataDto set earlier + CollectionMetadataDto testCollectionMetadataDto = (CollectionMetadataDto) exampleTokenLinkDtoTokenMetadata.getActualInstance(); + + // create a new ContractMetadataDto + ContractMetadataDto exampleContractMetadataDto = new ContractMetadataDto(); + // set TokenLinkDtoTokenMetadata to ContractMetadataDto + exampleTokenLinkDtoTokenMetadata.setActualInstance(exampleContractMetadataDto); + // to get back the ContractMetadataDto set earlier + ContractMetadataDto testContractMetadataDto = (ContractMetadataDto) exampleTokenLinkDtoTokenMetadata.getActualInstance(); + } +} +``` + + diff --git a/docs/TokenLinkExistsHttpError.md b/docs/TokenLinkExistsHttpError.md new file mode 100644 index 0000000..c2cc8a8 --- /dev/null +++ b/docs/TokenLinkExistsHttpError.md @@ -0,0 +1,15 @@ + + +# TokenLinkExistsHttpError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**statusCode** | **Integer** | HTTP status code | [optional] | +|**message** | **String** | Error message | [optional] | +|**error** | **String** | Short description of the HTTP error | [optional] | + + + diff --git a/docs/TokenLinkRequestDto.md b/docs/TokenLinkRequestDto.md new file mode 100644 index 0000000..f72d18c --- /dev/null +++ b/docs/TokenLinkRequestDto.md @@ -0,0 +1,26 @@ + + +# TokenLinkRequestDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The type of token being linked | | +|**refId** | **String** | The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC' if it's a fungible asset | | +|**displayName** | **String** | The token display name | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNGIBLE_TOKEN | "FUNGIBLE_TOKEN" | +| NON_FUNGIBLE_TOKEN | "NON_FUNGIBLE_TOKEN" | +| TOKEN_UTILITY | "TOKEN_UTILITY" | +| TOKEN_EXTENSION | "TOKEN_EXTENSION" | + + + diff --git a/docs/TokenOwnershipResponse.md b/docs/TokenOwnershipResponse.md index daff6f0..c00637c 100644 --- a/docs/TokenOwnershipResponse.md +++ b/docs/TokenOwnershipResponse.md @@ -35,8 +35,10 @@ | ETH | "ETH" | | ETH_TEST3 | "ETH_TEST3" | | ETH_TEST5 | "ETH_TEST5" | +| ETH_TEST6 | "ETH_TEST6" | | POLYGON | "POLYGON" | | POLYGON_TEST_MUMBAI | "POLYGON_TEST_MUMBAI" | +| AMOY_POLYGON_TEST | "AMOY_POLYGON_TEST" | | XTZ | "XTZ" | | XTZ_TEST | "XTZ_TEST" | | BASECHAIN_ETH | "BASECHAIN_ETH" | diff --git a/docs/TokenResponse.md b/docs/TokenResponse.md index 979ef64..1f5ec45 100644 --- a/docs/TokenResponse.md +++ b/docs/TokenResponse.md @@ -28,8 +28,10 @@ | ETH | "ETH" | | ETH_TEST3 | "ETH_TEST3" | | ETH_TEST5 | "ETH_TEST5" | +| ETH_TEST6 | "ETH_TEST6" | | POLYGON | "POLYGON" | | POLYGON_TEST_MUMBAI | "POLYGON_TEST_MUMBAI" | +| AMOY_POLYGON_TEST | "AMOY_POLYGON_TEST" | | XTZ | "XTZ" | | XTZ_TEST | "XTZ_TEST" | | BASECHAIN_ETH | "BASECHAIN_ETH" | diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md new file mode 100644 index 0000000..86ea9fa --- /dev/null +++ b/docs/TokenizationApi.md @@ -0,0 +1,440 @@ +# TokenizationApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getLinkedToken**](TokenizationApi.md#getLinkedToken) | **GET** /tokenization/tokens/{id} | Return a linked token | +| [**getLinkedTokens**](TokenizationApi.md#getLinkedTokens) | **GET** /tokenization/tokens | List all linked tokens | +| [**issueNewToken**](TokenizationApi.md#issueNewToken) | **POST** /tokenization/tokens | Issue a new token | +| [**link**](TokenizationApi.md#link) | **POST** /tokenization/tokens/link | Link a token | +| [**unlink**](TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token | + + + +## getLinkedToken + +> CompletableFuture> getLinkedToken getLinkedToken(id) + +Return a linked token + +Return a linked token, with its status and metadata. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.TokenizationApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + try { + CompletableFuture> response = fireblocks.tokenization().getLinkedToken(id); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling TokenizationApi#getLinkedToken"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling TokenizationApi#getLinkedToken"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The token link id | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token fetched successfully | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getLinkedTokens + +> CompletableFuture> getLinkedTokens getLinkedTokens(pageCursor, pageSize, status) + +List all linked tokens + +Return all linked tokens (paginated) + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.TokenizationApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to get the next page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items per page, requesting more then max will return max items + Object status = COMPLETED; // Object | A comma separated list of statuses to filter. Default is \"COMPLETED\" + try { + CompletableFuture> response = fireblocks.tokenization().getLinkedTokens(pageCursor, pageSize, status); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling TokenizationApi#getLinkedTokens"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling TokenizationApi#getLinkedTokens"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageCursor** | **String**| Page cursor to get the next page | [optional] | +| **pageSize** | **BigDecimal**| Number of items per page, requesting more then max will return max items | [optional] | +| **status** | [**Object**](.md)| A comma separated list of statuses to filter. Default is \"COMPLETED\" | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | | - | +| **0** | Error Response | * X-Request-ID -
| + + +## issueNewToken + +> CompletableFuture> issueNewToken issueNewToken(createTokenRequestDto, idempotencyKey) + +Issue a new token + +Facilitates the creation of a new token, supporting both EVM-based and Stellar/Ripple platforms. For EVM, it deploys the corresponding contract template to the blockchain and links the token to the workspace. For Stellar/Ripple, it links a newly created token directly to the workspace without deploying a contract. Returns the token link with status \"PENDING\" until the token is deployed or \"SUCCESS\" if no deployment is needed. + +### 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); + + CreateTokenRequestDto createTokenRequestDto = new CreateTokenRequestDto(); // CreateTokenRequestDto | + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.tokenization().issueNewToken(createTokenRequestDto, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling TokenizationApi#issueNewToken"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling TokenizationApi#issueNewToken"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **createTokenRequestDto** | [**CreateTokenRequestDto**](CreateTokenRequestDto.md)| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Token was created successfully | - | +| **409** | Asset already exists | - | + + +## link + +> CompletableFuture> link link(tokenLinkRequestDto, idempotencyKey) + +Link a token + +Link an already existing token (by assetId, collectionId or contractId as refId) to a workspace across EVM, Stellar, or Ripple platforms. The token will be linked to the workspace if it does not already exist. + +### 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); + + TokenLinkRequestDto tokenLinkRequestDto = new TokenLinkRequestDto(); // TokenLinkRequestDto | + String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + try { + CompletableFuture> response = fireblocks.tokenization().link(tokenLinkRequestDto, idempotencyKey); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling TokenizationApi#link"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling TokenizationApi#link"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **tokenLinkRequestDto** | [**TokenLinkRequestDto**](TokenLinkRequestDto.md)| | | +| **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token linked successfully | - | +| **201** | | - | +| **404** | Could not find the underlying token identifier (refId) to link the token to | - | +| **409** | Token link for {refId} already exists | - | +| **0** | Error Response | * X-Request-ID -
| + + +## unlink + +> CompletableFuture> unlink unlink(id) + +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. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.TokenizationApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String id = "fbfbfbfb-fbfb-fbfb-fbfb-fbfbfbfbfbfb"; // String | The token link id + try { + CompletableFuture> response = fireblocks.tokenization().unlink(id); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling TokenizationApi#unlink"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling TokenizationApi#unlink"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The token link id | | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Token unlinked successfully | - | +| **204** | | - | +| **404** | Link did not exist | - | +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/TokensPaginatedResponse.md b/docs/TokensPaginatedResponse.md new file mode 100644 index 0000000..81023b9 --- /dev/null +++ b/docs/TokensPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# TokensPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<TokenLinkDto>**](TokenLinkDto.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/TransactionFee.md b/docs/TransactionFee.md index 092d6ad..85ac0cf 100644 --- a/docs/TransactionFee.md +++ b/docs/TransactionFee.md @@ -13,6 +13,8 @@ |**networkFee** | **String** | | [optional] | |**baseFee** | **BigDecimal** | (optional) Base Fee according to EIP-1559 (ETH assets) | [optional] | |**priorityFee** | **BigDecimal** | (optional) Priority Fee according to EIP-1559 (ETH assets) | [optional] | +|**maxFeePerGasDelta** | **String** | Max Fee Per Gas Delta added only for EIP-1559 (ETH assets) | [optional] | +|**l1Fee** | **String** | Layer 1 fee for Layer 2 chains | [optional] | diff --git a/docs/VendorDto.md b/docs/VendorDto.md new file mode 100644 index 0000000..358683b --- /dev/null +++ b/docs/VendorDto.md @@ -0,0 +1,14 @@ + + +# VendorDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the vendor of this contract template | | +|**name** | **String** | The name of the vendor of this contract template | | + + + diff --git a/docs/Web3ConnectionsApi.md b/docs/Web3ConnectionsApi.md index d62c7dd..a35ac70 100644 --- a/docs/Web3ConnectionsApi.md +++ b/docs/Web3ConnectionsApi.md @@ -13,7 +13,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ ## create -> CompletableFuture> create create(createRequest, idempotencyKey) +> CompletableFuture> create create(createConnectionRequest, idempotencyKey) Create a new Web3 connection. @@ -42,10 +42,10 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - CreateRequest createRequest = new CreateRequest(); // CreateRequest | + CreateConnectionRequest createConnectionRequest = new CreateConnectionRequest(); // CreateConnectionRequest | 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.web3Connections().create(createRequest, idempotencyKey); + CompletableFuture> response = fireblocks.web3Connections().create(createConnectionRequest, 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()); @@ -72,7 +72,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **createRequest** | [**CreateRequest**](CreateRequest.md)| | | +| **createConnectionRequest** | [**CreateConnectionRequest**](CreateConnectionRequest.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 diff --git a/docs/WhitelistIpAddressesApi.md b/docs/WhitelistIpAddressesApi.md index 02601d6..8b6adce 100644 --- a/docs/WhitelistIpAddressesApi.md +++ b/docs/WhitelistIpAddressesApi.md @@ -4,7 +4,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getWhitelistIpAddresses**](WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | gets ip addresses | +| [**getWhitelistIpAddresses**](WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses | @@ -12,9 +12,9 @@ All URIs are relative to https://developers.fireblocks.com/reference/ > CompletableFuture> getWhitelistIpAddresses getWhitelistIpAddresses(userId) -gets ip addresses +Gets whitelisted ip addresses -gets ip addresses +Gets whitelisted ip addresses for given Api user. ### Example @@ -39,7 +39,7 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String userId = "userId_example"; // String | The ID of the user + String userId = "userId_example"; // String | The ID of the api user try { CompletableFuture> response = fireblocks.whitelistIpAddresses().getWhitelistIpAddresses(userId); System.out.println("Status code: " + response.get().getStatusCode()); @@ -68,7 +68,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **userId** | **String**| The ID of the user | | +| **userId** | **String**| The ID of the api user | | ### Return type @@ -87,7 +87,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successfully whitelisted | * X-Request-ID -
| +| **200** | successfully got whitelisted ip addresses | * X-Request-ID -
| | **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| | **403** | Lacking permissions. | * X-Request-ID -
| | **5XX** | Internal error. | * X-Request-ID -
| diff --git a/docs/WorkspaceStatusBetaApi.md b/docs/WorkspaceStatusBetaApi.md index 38a7703..ac7da3c 100644 --- a/docs/WorkspaceStatusBetaApi.md +++ b/docs/WorkspaceStatusBetaApi.md @@ -10,7 +10,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ ## getWorkspaceStatus -> CompletableFuture> getWorkspaceStatus getWorkspaceStatus() +> CompletableFuture> getWorkspaceStatus getWorkspaceStatus() Returns current workspace status @@ -40,7 +40,7 @@ public class Example { Fireblocks fireblocks = new Fireblocks(configurationOptions); try { - CompletableFuture> response = fireblocks.workspaceStatusBeta().getWorkspaceStatus(); + CompletableFuture> response = fireblocks.workspaceStatusBeta().getWorkspaceStatus(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -68,7 +68,7 @@ This endpoint does not need any parameter. ### Return type -CompletableFuture> +CompletableFuture> ### Authorization diff --git a/docs/WriteAbiFunction.md b/docs/WriteAbiFunction.md new file mode 100644 index 0000000..d049728 --- /dev/null +++ b/docs/WriteAbiFunction.md @@ -0,0 +1,35 @@ + + +# WriteAbiFunction + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**stateMutability** | [**StateMutabilityEnum**](#StateMutabilityEnum) | | | +|**outputs** | [**List<Parameter>**](Parameter.md) | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**name** | **String** | | [optional] | +|**inputs** | [**List<ParameterWithValue>**](ParameterWithValue.md) | | | +|**description** | **String** | | [optional] | + + + +## Enum: StateMutabilityEnum + +| Name | Value | +|---- | -----| +| PAYABLE | "payable" | +| NONPAYABLE | "nonpayable" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FUNCTION | "function" | + + + diff --git a/docs/WriteCallFunctionDto.md b/docs/WriteCallFunctionDto.md new file mode 100644 index 0000000..9f0b241 --- /dev/null +++ b/docs/WriteCallFunctionDto.md @@ -0,0 +1,28 @@ + + +# WriteCallFunctionDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**vaultAccountId** | **String** | The vault account id this contract was deploy from | | +|**abiFunction** | [**List<WriteAbiFunction>**](WriteAbiFunction.md) | The abi of the read function you wish to call | | +|**amount** | **String** | Amount in base asset. Being used in payable functions | [optional] | +|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | Fee level for the write function transaction. interchangeable with the 'fee' field | [optional] | +|**fee** | **String** | Max fee amount for the write function transaction. interchangeable with the 'feeLevel' field | [optional] | +|**note** | **String** | Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks workspace | [optional] | + + + +## Enum: FeeLevelEnum + +| Name | Value | +|---- | -----| +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + diff --git a/docs/WriteCallFunctionResponseDto.md b/docs/WriteCallFunctionResponseDto.md new file mode 100644 index 0000000..2e40e30 --- /dev/null +++ b/docs/WriteCallFunctionResponseDto.md @@ -0,0 +1,13 @@ + + +# WriteCallFunctionResponseDto + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**txId** | **String** | | | + + + diff --git a/pom.xml b/pom.xml index d6149f3..ff9490f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 1.1.0 + 2.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index c9e236d..2a61192 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "1.1.0"; + public static final String VERSION = "2.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index 5abedc1..488419b 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -43,8 +43,11 @@ public class Fireblocks { private ComplianceApi compliance; private ComplianceScreeningConfigurationApi complianceScreeningConfiguration; private ConsoleUserApi consoleUser; + private ContractInteractionsApi contractInteractions; + private ContractTemplatesApi contractTemplates; private ContractsApi contracts; private CosignersBetaApi cosignersBeta; + private DeployedContractsApi deployedContracts; private ExchangeAccountsApi exchangeAccounts; private ExternalWalletsApi externalWallets; private FiatAccountsApi fiatAccounts; @@ -60,6 +63,7 @@ public class Fireblocks { private ResetDeviceApi resetDevice; private SmartTransferApi smartTransfer; private StakingBetaApi stakingBeta; + private TokenizationApi tokenization; private TransactionsApi transactions; private TravelRuleBetaApi travelRuleBeta; private UserGroupsBetaApi userGroupsBeta; @@ -257,6 +261,20 @@ public ConsoleUserApi consoleUser() { return consoleUser; } + public ContractInteractionsApi contractInteractions() { + if (contractInteractions == null) { + contractInteractions = new ContractInteractionsApi(apiClient); + } + return contractInteractions; + } + + public ContractTemplatesApi contractTemplates() { + if (contractTemplates == null) { + contractTemplates = new ContractTemplatesApi(apiClient); + } + return contractTemplates; + } + public ContractsApi contracts() { if (contracts == null) { contracts = new ContractsApi(apiClient); @@ -271,6 +289,13 @@ public CosignersBetaApi cosignersBeta() { return cosignersBeta; } + public DeployedContractsApi deployedContracts() { + if (deployedContracts == null) { + deployedContracts = new DeployedContractsApi(apiClient); + } + return deployedContracts; + } + public ExchangeAccountsApi exchangeAccounts() { if (exchangeAccounts == null) { exchangeAccounts = new ExchangeAccountsApi(apiClient); @@ -376,6 +401,13 @@ public StakingBetaApi stakingBeta() { return stakingBeta; } + public TokenizationApi tokenization() { + if (tokenization == null) { + tokenization = new TokenizationApi(apiClient); + } + return tokenization; + } + public TransactionsApi transactions() { if (transactions == null) { transactions = new TransactionsApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/UserAgentUtil.java b/src/main/java/com/fireblocks/sdk/UserAgentUtil.java index 9660c02..c7891c8 100644 --- a/src/main/java/com/fireblocks/sdk/UserAgentUtil.java +++ b/src/main/java/com/fireblocks/sdk/UserAgentUtil.java @@ -18,7 +18,7 @@ public class UserAgentUtil { public static String getUserAgent(AdditionalOptions additionalOptions) { - String sdkVersion = "1.1.0"; + String sdkVersion = "2.0.0"; String userAgent = "fireblocks/sdk/java/" + sdkVersion; if (!Optional.ofNullable(additionalOptions) .map(AdditionalOptions::isAnonymousPlatform) diff --git a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java index 3002969..554d12f 100644 --- a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java @@ -69,7 +69,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * create api user creates api user + * Create Api user Creates Api user in your tenant * * @param createAPIUser (optional) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -136,7 +136,7 @@ private HttpRequest.Builder createApiUserRequestBuilder( return localVarRequestBuilder; } /** - * get api users get api users from the current tenant + * Get Api users Get Api users of your tenant * * @return CompletableFuture<ApiResponse<GetAPIUsersResponse>> * @throws ApiException if fails to make API call diff --git a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java index 5da3b6c..bf2345d 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java @@ -69,7 +69,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * create console user creates fireblocks console user + * Create console user Creates console user in your tenant * * @param createConsoleUser (optional) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -136,7 +136,7 @@ private HttpRequest.Builder createConsoleUserRequestBuilder( return localVarRequestBuilder; } /** - * get console users get console users from the current tenant + * Get console users Get console users for your tenant * * @return CompletableFuture<ApiResponse<GetConsoleUsersResponse>> * @throws ApiException if fails to make API call diff --git a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java new file mode 100644 index 0000000..5cc7d19 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java @@ -0,0 +1,394 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.ContractAbiResponseDto; +import com.fireblocks.sdk.model.ParameterWithValue; +import com.fireblocks.sdk.model.ReadCallFunctionDto; +import com.fireblocks.sdk.model.WriteCallFunctionDto; +import com.fireblocks.sdk.model.WriteCallFunctionResponseDto; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractInteractionsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ContractInteractionsApi() { + this(new ApiClient()); + } + + public ContractInteractionsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Return deployed contract's ABI Return deployed contract's ABI by blockchain native + * asset id and contract address + * + * @param contractAddress The contract's onchain address (required) + * @param assetId (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<ContractAbiResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getDeployedContractAbi( + String contractAddress, String assetId, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getDeployedContractAbiRequestBuilder(contractAddress, assetId, 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( + "getDeployedContractAbi", 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< + ContractAbiResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getDeployedContractAbiRequestBuilder( + String contractAddress, String assetId, String idempotencyKey) throws ApiException { + // verify the required parameter 'contractAddress' is set + if (contractAddress == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractAddress' when calling" + + " getDeployedContractAbi"); + } + // verify the required parameter 'assetId' is set + if (assetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'assetId' when calling getDeployedContractAbi"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions" + .replace( + "{contractAddress}", + ApiClient.urlEncode(contractAddress.toString())) + .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Call a read function on a deployed contract Call a read function on a deployed contract by + * blockchain native asset id and contract address + * + * @param readCallFunctionDto (required) + * @param contractAddress The contract's onchain address (required) + * @param assetId (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<ParameterWithValue>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> readCallFunction( + ReadCallFunctionDto readCallFunctionDto, + String contractAddress, + String assetId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + readCallFunctionRequestBuilder( + readCallFunctionDto, contractAddress, assetId, 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("readCallFunction", 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< + ParameterWithValue>>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder readCallFunctionRequestBuilder( + ReadCallFunctionDto readCallFunctionDto, + String contractAddress, + String assetId, + String idempotencyKey) + throws ApiException { + // verify the required parameter 'readCallFunctionDto' is set + if (readCallFunctionDto == null) { + throw new ApiException( + 400, + "Missing the required parameter 'readCallFunctionDto' when calling" + + " readCallFunction"); + } + // verify the required parameter 'contractAddress' is set + if (contractAddress == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractAddress' when calling" + + " readCallFunction"); + } + // verify the required parameter 'assetId' is set + if (assetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'assetId' when calling readCallFunction"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/read" + .replace( + "{contractAddress}", + ApiClient.urlEncode(contractAddress.toString())) + .replace("{assetId}", ApiClient.urlEncode(assetId.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(readCallFunctionDto); + 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; + } + /** + * Call a write function on a deployed contract Call a write function on a deployed contract by + * blockchain native asset id and contract address. This creates an onchain transaction, thus it + * is an async operation. It returns a transaction id that can be polled for status check + * + * @param writeCallFunctionDto (required) + * @param contractAddress The contract's onchain address (required) + * @param assetId (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<WriteCallFunctionResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> writeCallFunction( + WriteCallFunctionDto writeCallFunctionDto, + String contractAddress, + String assetId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + writeCallFunctionRequestBuilder( + writeCallFunctionDto, contractAddress, assetId, 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("writeCallFunction", 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< + WriteCallFunctionResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder writeCallFunctionRequestBuilder( + WriteCallFunctionDto writeCallFunctionDto, + String contractAddress, + String assetId, + String idempotencyKey) + throws ApiException { + // verify the required parameter 'writeCallFunctionDto' is set + if (writeCallFunctionDto == null) { + throw new ApiException( + 400, + "Missing the required parameter 'writeCallFunctionDto' when calling" + + " writeCallFunction"); + } + // verify the required parameter 'contractAddress' is set + if (contractAddress == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractAddress' when calling" + + " writeCallFunction"); + } + // verify the required parameter 'assetId' is set + if (assetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'assetId' when calling writeCallFunction"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/contract_interactions/base_asset_id/{assetId}/contract_address/{contractAddress}/functions/write" + .replace( + "{contractAddress}", + ApiClient.urlEncode(contractAddress.toString())) + .replace("{assetId}", ApiClient.urlEncode(assetId.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(writeCallFunctionDto); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java b/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java new file mode 100644 index 0000000..e5e3ff5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java @@ -0,0 +1,729 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.AbiFunction; +import com.fireblocks.sdk.model.ContractDeployRequest; +import com.fireblocks.sdk.model.ContractDeployResponse; +import com.fireblocks.sdk.model.ContractTemplateDto; +import com.fireblocks.sdk.model.ContractUploadRequest; +import com.fireblocks.sdk.model.TemplatesPaginatedResponse; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractTemplatesApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public ContractTemplatesApi() { + this(new ApiClient()); + } + + public ContractTemplatesApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Delete a contract template by id Delete a contract by id. allowed only for private contract + * templates. Notice: it is irreversible! + * + * @param contractTemplateId The Contract Template identifier (required) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> deleteContractTemplateById( + String contractTemplateId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + deleteContractTemplateByIdRequestBuilder(contractTemplateId); + 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( + "deleteContractTemplateById", + localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deleteContractTemplateByIdRequestBuilder(String contractTemplateId) + throws ApiException { + // verify the required parameter 'contractTemplateId' is set + if (contractTemplateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractTemplateId' when calling" + + " deleteContractTemplateById"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/templates/{contractTemplateId}" + .replace( + "{contractTemplateId}", + ApiClient.urlEncode(contractTemplateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Deploy contract Deploy a new contract by contract template id. If you wish to deploy a token + * (ERC20, ERC721 etc), and create asset please use POST /tokenization + * + * @param contractDeployRequest (required) + * @param contractTemplateId The Contract Template identifier (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<ContractDeployResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> deployContract( + ContractDeployRequest contractDeployRequest, + String contractTemplateId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + deployContractRequestBuilder( + contractDeployRequest, contractTemplateId, 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("deployContract", 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< + ContractDeployResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deployContractRequestBuilder( + ContractDeployRequest contractDeployRequest, + String contractTemplateId, + String idempotencyKey) + throws ApiException { + // verify the required parameter 'contractDeployRequest' is set + if (contractDeployRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractDeployRequest' when calling" + + " deployContract"); + } + // verify the required parameter 'contractTemplateId' is set + if (contractTemplateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractTemplateId' when calling" + + " deployContract"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/templates/{contractTemplateId}/deploy" + .replace( + "{contractTemplateId}", + ApiClient.urlEncode(contractTemplateId.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(contractDeployRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Return contract template's constructor Return contract template's constructor ABI + * + * @param contractTemplateId The Contract Template identifier (required) + * @param withDocs true if you want to get the abi with its docs (optional, default to false) + * @return CompletableFuture<ApiResponse<AbiFunction>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getConstructorByContractTemplateId( + String contractTemplateId, Boolean withDocs) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getConstructorByContractTemplateIdRequestBuilder(contractTemplateId, withDocs); + 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( + "getConstructorByContractTemplateId", + 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< + AbiFunction>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getConstructorByContractTemplateIdRequestBuilder( + String contractTemplateId, Boolean withDocs) throws ApiException { + // verify the required parameter 'contractTemplateId' is set + if (contractTemplateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractTemplateId' when calling" + + " getConstructorByContractTemplateId"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/templates/{contractTemplateId}/constructor" + .replace( + "{contractTemplateId}", + ApiClient.urlEncode(contractTemplateId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "withDocs"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("withDocs", withDocs)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Return contract template by id Return detailed information about the contract template + * + * @param contractTemplateId The Contract Template identifier (required) + * @return CompletableFuture<ApiResponse<ContractTemplateDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getContractTemplateById( + String contractTemplateId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getContractTemplateByIdRequestBuilder(contractTemplateId); + 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( + "getContractTemplateById", 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< + ContractTemplateDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getContractTemplateByIdRequestBuilder(String contractTemplateId) + throws ApiException { + // verify the required parameter 'contractTemplateId' is set + if (contractTemplateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractTemplateId' when calling" + + " getContractTemplateById"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/templates/{contractTemplateId}" + .replace( + "{contractTemplateId}", + ApiClient.urlEncode(contractTemplateId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * List all contract templates Return minimal representation of all the contract templates + * available for the workspace + * + * @param limit Items per page (max 100) (optional, default to 100) + * @param offset Paging offset (optional, default to 0) + * @param pageCursor Page cursor to get the next page (optional) + * @param pageSize Number of items per page, requesting more then max will return max items + * (optional) + * @param type The type of the contract templates you wish to retrieve. Can accept one type, + * more or none (optional) + * @param initializationPhase (optional) + * @return CompletableFuture<ApiResponse<TemplatesPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getContractTemplates( + BigDecimal limit, + BigDecimal offset, + String pageCursor, + BigDecimal pageSize, + String type, + String initializationPhase) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getContractTemplatesRequestBuilder( + limit, offset, pageCursor, pageSize, type, initializationPhase); + 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( + "getContractTemplates", 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< + TemplatesPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getContractTemplatesRequestBuilder( + BigDecimal limit, + BigDecimal offset, + String pageCursor, + BigDecimal pageSize, + String type, + String initializationPhase) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/templates"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "limit"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("limit", limit)); + localVarQueryParameterBaseName = "offset"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("offset", offset)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "type"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("type", type)); + localVarQueryParameterBaseName = "initializationPhase"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("initializationPhase", initializationPhase)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Return contract template's function Return contract template`s function ABI by + * signature + * + * @param contractTemplateId The Contract Template identifier (required) + * @param functionSignature (required) + * @return CompletableFuture<ApiResponse<AbiFunction>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getFunctionAbiByContractTemplateId( + String contractTemplateId, String functionSignature) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getFunctionAbiByContractTemplateIdRequestBuilder( + contractTemplateId, functionSignature); + 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( + "getFunctionAbiByContractTemplateId", + 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< + AbiFunction>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getFunctionAbiByContractTemplateIdRequestBuilder( + String contractTemplateId, String functionSignature) throws ApiException { + // verify the required parameter 'contractTemplateId' is set + if (contractTemplateId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractTemplateId' when calling" + + " getFunctionAbiByContractTemplateId"); + } + // verify the required parameter 'functionSignature' is set + if (functionSignature == null) { + throw new ApiException( + 400, + "Missing the required parameter 'functionSignature' when calling" + + " getFunctionAbiByContractTemplateId"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/templates/{contractTemplateId}/function" + .replace( + "{contractTemplateId}", + ApiClient.urlEncode(contractTemplateId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "functionSignature"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("functionSignature", functionSignature)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Upload contract template Upload a new contract template. This contract template will be + * available for the workspace + * + * @param contractUploadRequest (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<ContractTemplateDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> uploadContractTemplate( + ContractUploadRequest contractUploadRequest, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + uploadContractTemplateRequestBuilder(contractUploadRequest, 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( + "uploadContractTemplate", 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< + ContractTemplateDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder uploadContractTemplateRequestBuilder( + ContractUploadRequest contractUploadRequest, String idempotencyKey) + throws ApiException { + // verify the required parameter 'contractUploadRequest' is set + if (contractUploadRequest == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractUploadRequest' when calling" + + " uploadContractTemplate"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/templates"; + + 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(contractUploadRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java new file mode 100644 index 0000000..f78dcf2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java @@ -0,0 +1,340 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.DeployedContractResponseDto; +import com.fireblocks.sdk.model.DeployedContractsPaginatedResponse; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployedContractsApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DeployedContractsApi() { + this(new ApiClient()); + } + + public DeployedContractsApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Return deployed contract data Return deployed contract data by blockchain native asset id and + * contract address + * + * @param contractAddress The contract's onchain address (required) + * @param assetId (required) + * @return CompletableFuture<ApiResponse<DeployedContractResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getDeployedContractByAddress( + String contractAddress, String assetId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getDeployedContractByAddressRequestBuilder(contractAddress, assetId); + 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( + "getDeployedContractByAddress", + 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< + DeployedContractResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getDeployedContractByAddressRequestBuilder( + String contractAddress, String assetId) throws ApiException { + // verify the required parameter 'contractAddress' is set + if (contractAddress == null) { + throw new ApiException( + 400, + "Missing the required parameter 'contractAddress' when calling" + + " getDeployedContractByAddress"); + } + // verify the required parameter 'assetId' is set + if (assetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'assetId' when calling" + + " getDeployedContractByAddress"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/contracts/{assetId}/{contractAddress}" + .replace( + "{contractAddress}", + ApiClient.urlEncode(contractAddress.toString())) + .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Return deployed contract data by id Return deployed contract data by id + * + * @param id The deployed contract data identifier (required) + * @return CompletableFuture<ApiResponse<DeployedContractResponseDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getDeployedContractById( + String id) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getDeployedContractByIdRequestBuilder(id); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getDeployedContractById", 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< + DeployedContractResponseDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getDeployedContractByIdRequestBuilder(String id) + throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, + "Missing the required parameter 'id' when calling getDeployedContractById"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/contracts/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * List deployed contracts data Return a filtered lean representation of the deployed contracts + * data on all blockchains (paginated) + * + * @param pageCursor Page cursor to get the next page (optional) + * @param pageSize Number of items per page, requesting more then max will return max items + * (optional) + * @param contractAddress The contract's onchain address (optional) + * @param assetId (optional) + * @param templateId (optional) + * @return CompletableFuture<ApiResponse<DeployedContractsPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getDeployedContracts( + String pageCursor, + BigDecimal pageSize, + String contractAddress, + String assetId, + String templateId) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getDeployedContractsRequestBuilder( + pageCursor, pageSize, contractAddress, assetId, templateId); + 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( + "getDeployedContracts", 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< + DeployedContractsPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getDeployedContractsRequestBuilder( + String pageCursor, + BigDecimal pageSize, + String contractAddress, + String assetId, + String templateId) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/contracts"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "contractAddress"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("contractAddress", contractAddress)); + localVarQueryParameterBaseName = "assetId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("assetId", assetId)); + localVarQueryParameterBaseName = "templateId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("templateId", templateId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java index f40352f..ca1728b 100644 --- a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java @@ -19,6 +19,8 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateNetworkIdRequest; +import com.fireblocks.sdk.model.DeleteNetworkConnectionResponse; +import com.fireblocks.sdk.model.DeleteNetworkIdResponse; import com.fireblocks.sdk.model.NetworkConnection; import com.fireblocks.sdk.model.NetworkConnectionResponse; import com.fireblocks.sdk.model.NetworkIdResponse; @@ -26,8 +28,8 @@ import com.fireblocks.sdk.model.SetNetworkIdNameRequest; import com.fireblocks.sdk.model.SetNetworkIdResponse; import com.fireblocks.sdk.model.SetNetworkIdRoutingPolicyRequest; -import com.fireblocks.sdk.model.SetRoutingPolicy200Response; import com.fireblocks.sdk.model.SetRoutingPolicyRequest; +import com.fireblocks.sdk.model.SetRoutingPolicyResponse; import com.fireblocks.sdk.model.ThirdPartyRouting; import java.io.IOException; import java.io.InputStream; @@ -176,7 +178,7 @@ private HttpRequest.Builder checkThirdPartyRoutingRequestBuilder( * Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → * **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * Supported asset groups for routing police can be found at - * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing * scheme uses (`dstId` = `0`, `dstType` = * `VAULT`). * @@ -267,7 +269,7 @@ private HttpRequest.Builder createNetworkConnectionRequestBuilder( * Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported * asset groups for routing police can be found at - * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing * scheme uses (`dstId` = `0`, `dstType` = * `VAULT`). * @@ -364,10 +366,10 @@ private HttpRequest.Builder createNetworkIdRequestBuilder( * `VAULT`). * * @param connectionId The ID of the network connection to delete (required) - * @return CompletableFuture<ApiResponse<SetRoutingPolicy200Response>> + * @return CompletableFuture<ApiResponse<DeleteNetworkConnectionResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> deleteNetworkConnection( + public CompletableFuture> deleteNetworkConnection( String connectionId) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = @@ -387,7 +389,7 @@ public CompletableFuture> deleteNetwork try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -395,7 +397,7 @@ public CompletableFuture> deleteNetwork : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SetRoutingPolicy200Response>() {}))); + DeleteNetworkConnectionResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -449,11 +451,11 @@ private HttpRequest.Builder deleteNetworkConnectionRequestBuilder(String connect * `dstType` = `VAULT`). * * @param networkId The ID of the network (required) - * @return CompletableFuture<ApiResponse<SetRoutingPolicy200Response>> + * @return CompletableFuture<ApiResponse<DeleteNetworkIdResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> deleteNetworkId( - String networkId) throws ApiException { + public CompletableFuture> deleteNetworkId(String networkId) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = deleteNetworkIdRequestBuilder(networkId); return memberVarHttpClient @@ -470,7 +472,7 @@ public CompletableFuture> deleteNetwork try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -478,7 +480,7 @@ public CompletableFuture> deleteNetwork : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SetRoutingPolicy200Response>() {}))); + DeleteNetworkIdResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -823,6 +825,73 @@ private HttpRequest.Builder getNetworkIdsRequestBuilder() throws ApiException { } return localVarRequestBuilder; } + /** + * Returns all enabled routing policy asset groups Retrieves a list of all enabled routing + * policy asset groups. Your routing policy defines how your transactions are routed. You can + * use one or more enabled routing policy asset groups to describe connection or network id + * routing policy. + * + * @return CompletableFuture<ApiResponse<List<String>>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture>> getRoutingPolicyAssetGroups() + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getRoutingPolicyAssetGroupsRequestBuilder(); + 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( + "getRoutingPolicyAssetGroups", + 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>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getRoutingPolicyAssetGroupsRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/network_ids/routing_policy_asset_groups"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Update network ID's discoverability. Update whether or not the network ID is discoverable * by others. **Note:** This API call is subject to Flexible Routing Schemes. Your routing @@ -1040,8 +1109,8 @@ private HttpRequest.Builder setNetworkIdNameRequestBuilder( * \"Profile Routing\" Default Workspace Presets: - Network Profile Crypto → * **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → **Default** - * Network Connection FIAT → **Default** Supported asset groups for routing police can be found - * at `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing - * scheme uses (`dstId` = `0`, `dstType` = + * at `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom + * routing scheme uses (`dstId` = `0`, `dstType` = * `VAULT`). * * @param networkId The ID of the network (required) @@ -1139,16 +1208,16 @@ private HttpRequest.Builder setNetworkIdRoutingPolicyRequestBuilder( * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → * **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police - * can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, + * can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, * Custom routing scheme uses (`dstId` = `0`, `dstType` * = `VAULT`). * * @param connectionId The ID of the network connection (required) * @param setRoutingPolicyRequest (optional) - * @return CompletableFuture<ApiResponse<SetRoutingPolicy200Response>> + * @return CompletableFuture<ApiResponse<SetRoutingPolicyResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> setRoutingPolicy( + public CompletableFuture> setRoutingPolicy( String connectionId, SetRoutingPolicyRequest setRoutingPolicyRequest) throws ApiException { try { @@ -1168,7 +1237,7 @@ public CompletableFuture> setRoutingPol try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -1176,7 +1245,7 @@ public CompletableFuture> setRoutingPol : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SetRoutingPolicy200Response>() {}))); + SetRoutingPolicyResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } diff --git a/src/main/java/com/fireblocks/sdk/api/NftsApi.java b/src/main/java/com/fireblocks/sdk/api/NftsApi.java index 94d8726..6244757 100644 --- a/src/main/java/com/fireblocks/sdk/api/NftsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NftsApi.java @@ -19,9 +19,10 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; -import com.fireblocks.sdk.model.GetOwnershipTokens200Response; -import com.fireblocks.sdk.model.ListOwnedCollections200Response; -import com.fireblocks.sdk.model.ListOwnedTokens200Response; +import com.fireblocks.sdk.model.GetNFTsResponse; +import com.fireblocks.sdk.model.GetOwnershipTokensResponse; +import com.fireblocks.sdk.model.ListOwnedCollectionsResponse; +import com.fireblocks.sdk.model.ListOwnedTokensResponse; import com.fireblocks.sdk.model.TokenOwnershipSpamUpdatePayload; import com.fireblocks.sdk.model.TokenOwnershipStatusUpdatePayload; import com.fireblocks.sdk.model.TokenResponse; @@ -155,10 +156,10 @@ private HttpRequest.Builder getNFTRequestBuilder(String id) throws ApiException * (optional * @param order Order direction, it can be `ASC` for ascending or `DESC` for * descending (optional, default to ASC) - * @return CompletableFuture<ApiResponse<ListOwnedTokens200Response>> + * @return CompletableFuture<ApiResponse<GetNFTsResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getNFTs( + public CompletableFuture> getNFTs( String ids, String pageCursor, BigDecimal pageSize, List sort, String order) throws ApiException { try { @@ -178,7 +179,7 @@ public CompletableFuture> getNFTs( try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -186,7 +187,7 @@ public CompletableFuture> getNFTs( : memberVarObjectMapper.readValue( responseBody, new TypeReference< - ListOwnedTokens200Response>() {}))); + GetNFTsResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -274,10 +275,10 @@ private HttpRequest.Builder getNFTsRequestBuilder( * name and id within the contract/collection, collection name, blockchain descriptor and * name. (optional) * @param spam Token ownership spam status. (optional) - * @return CompletableFuture<ApiResponse<GetOwnershipTokens200Response>> + * @return CompletableFuture<ApiResponse<GetOwnershipTokensResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getOwnershipTokens( + public CompletableFuture> getOwnershipTokens( String blockchainDescriptor, String vaultAccountIds, String ncwId, @@ -325,7 +326,7 @@ public CompletableFuture> getOwnershi try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -333,7 +334,7 @@ public CompletableFuture> getOwnershi : memberVarObjectMapper.readValue( responseBody, new TypeReference< - GetOwnershipTokens200Response>() {}))); + GetOwnershipTokensResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -435,10 +436,10 @@ private HttpRequest.Builder getOwnershipTokensRequestBuilder( * @param order Order direction, it can be `ASC` for ascending or `DESC` for * descending (optional, default to ASC) * @param status Token ownership status (optional, default to LISTED) - * @return CompletableFuture<ApiResponse<ListOwnedCollections200Response>> + * @return CompletableFuture<ApiResponse<ListOwnedCollectionsResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> listOwnedCollections( + public CompletableFuture> listOwnedCollections( String ncwId, String walletType, String search, @@ -467,7 +468,7 @@ public CompletableFuture> listOwned try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -475,7 +476,7 @@ public CompletableFuture> listOwned : memberVarObjectMapper.readValue( responseBody, new TypeReference< - ListOwnedCollections200Response>() {}))); + ListOwnedCollectionsResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -559,10 +560,10 @@ private HttpRequest.Builder listOwnedCollectionsRequestBuilder( * @param status Token ownership status (optional, default to LISTED) * @param search Search owned tokens by token name (optional) * @param spam Token ownership spam status. (optional) - * @return CompletableFuture<ApiResponse<ListOwnedTokens200Response>> + * @return CompletableFuture<ApiResponse<ListOwnedTokensResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> listOwnedTokens( + public CompletableFuture> listOwnedTokens( String ncwId, String walletType, String pageCursor, @@ -599,7 +600,7 @@ public CompletableFuture> listOwnedToken try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -607,7 +608,7 @@ public CompletableFuture> listOwnedToken : memberVarObjectMapper.readValue( responseBody, new TypeReference< - ListOwnedTokens200Response>() {}))); + ListOwnedTokensResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } diff --git a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java index 33a00cb..e19869b 100644 --- a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java @@ -18,7 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.GetOtaStatus200Response; +import com.fireblocks.sdk.model.GetOtaStatusResponse; import com.fireblocks.sdk.model.SetOtaStatusRequest; import com.fireblocks.sdk.model.SetOtaStatusResponse; import java.io.IOException; @@ -72,11 +72,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Returns current OTA status Returns current OTA status * - * @return CompletableFuture<ApiResponse<GetOtaStatus200Response>> + * @return CompletableFuture<ApiResponse<GetOtaStatusResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getOtaStatus() - throws ApiException { + public CompletableFuture> getOtaStatus() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getOtaStatusRequestBuilder(); return memberVarHttpClient @@ -93,7 +92,7 @@ public CompletableFuture> getOtaStatus() try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -101,7 +100,7 @@ public CompletableFuture> getOtaStatus() : memberVarObjectMapper.readValue( responseBody, new TypeReference< - GetOtaStatus200Response>() {}))); + GetOtaStatusResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } diff --git a/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java b/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java index 4962830..5b2ddfd 100644 --- a/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java @@ -65,9 +65,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * resets device resets device + * Resets device Resets mobile device for given console user, that user will need to do mobile + * onboarding again. * - * @param id The ID of the user (required) + * @param id The ID of the console user (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) diff --git a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java new file mode 100644 index 0000000..7eb181b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -0,0 +1,467 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.CreateTokenRequestDto; +import com.fireblocks.sdk.model.TokenLinkDto; +import com.fireblocks.sdk.model.TokenLinkRequestDto; +import com.fireblocks.sdk.model.TokensPaginatedResponse; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenizationApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public TokenizationApi() { + this(new ApiClient()); + } + + public TokenizationApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Return a linked token Return a linked token, with its status and metadata. + * + * @param id The token link id (required) + * @return CompletableFuture<ApiResponse<TokenLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getLinkedToken(String id) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getLinkedTokenRequestBuilder(id); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getLinkedToken", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + TokenLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getLinkedTokenRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getLinkedToken"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/tokens/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * List all linked tokens Return all linked tokens (paginated) + * + * @param pageCursor Page cursor to get the next page (optional) + * @param pageSize Number of items per page, requesting more then max will return max items + * (optional) + * @param status A comma separated list of statuses to filter. Default is + * \"COMPLETED\" (optional) + * @return CompletableFuture<ApiResponse<TokensPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getLinkedTokens( + String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getLinkedTokensRequestBuilder(pageCursor, pageSize, status); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("getLinkedTokens", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + TokensPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getLinkedTokensRequestBuilder( + String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/tokens"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Issue a new token Facilitates the creation of a new token, supporting both EVM-based and + * Stellar/Ripple platforms. For EVM, it deploys the corresponding contract template to the + * blockchain and links the token to the workspace. For Stellar/Ripple, it links a newly created + * token directly to the workspace without deploying a contract. Returns the token link with + * status \"PENDING\" until the token is deployed or \"SUCCESS\" if no + * deployment is needed. + * + * @param createTokenRequestDto (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<TokenLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> issueNewToken( + CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + issueNewTokenRequestBuilder(createTokenRequestDto, idempotencyKey); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("issueNewToken", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + TokenLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder issueNewTokenRequestBuilder( + CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) + throws ApiException { + // verify the required parameter 'createTokenRequestDto' is set + if (createTokenRequestDto == null) { + throw new ApiException( + 400, + "Missing the required parameter 'createTokenRequestDto' when calling" + + " issueNewToken"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/tokens"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(createTokenRequestDto); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Link a token Link an already existing token (by assetId, collectionId or contractId as refId) + * to a workspace across EVM, Stellar, or Ripple platforms. The token will be linked to the + * workspace if it does not already exist. + * + * @param tokenLinkRequestDto (required) + * @param idempotencyKey A unique identifier for the request. If the request is sent multiple + * times with the same idempotency key, the server will return the same response as the + * first request. The idempotency key is valid for 24 hours. (optional) + * @return CompletableFuture<ApiResponse<TokenLinkDto>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> link( + TokenLinkRequestDto tokenLinkRequestDto, String idempotencyKey) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + linkRequestBuilder(tokenLinkRequestDto, 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("link", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + TokenLinkDto>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder linkRequestBuilder( + TokenLinkRequestDto tokenLinkRequestDto, String idempotencyKey) throws ApiException { + // verify the required parameter 'tokenLinkRequestDto' is set + if (tokenLinkRequestDto == null) { + throw new ApiException( + 400, "Missing the required parameter 'tokenLinkRequestDto' when calling link"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/tokenization/tokens/link"; + + 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(tokenLinkRequestDto); + 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. + * + * @param id The token link id (required) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> unlink(String id) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = unlinkRequestBuilder(id); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException("unlink", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder unlinkRequestBuilder(String id) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling unlink"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/tokenization/tokens/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java index df5b635..81c878f 100644 --- a/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java @@ -19,8 +19,8 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.CreateConnectionRequest; import com.fireblocks.sdk.model.CreateConnectionResponse; -import com.fireblocks.sdk.model.CreateRequest; import com.fireblocks.sdk.model.GetConnectionsResponse; import com.fireblocks.sdk.model.GetFilterParameter; import com.fireblocks.sdk.model.RespondToConnectionRequest; @@ -81,7 +81,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String * make a request to `PUT /v1/connections/wc/{id}` (below) to approve or reject the * new Web3 connection. * - * @param createRequest (required) + * @param createConnectionRequest (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) @@ -89,10 +89,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @throws ApiException if fails to make API call */ public CompletableFuture> create( - CreateRequest createRequest, String idempotencyKey) throws ApiException { + CreateConnectionRequest createConnectionRequest, String idempotencyKey) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - createRequestBuilder(createRequest, idempotencyKey); + createRequestBuilder(createConnectionRequest, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -126,11 +127,13 @@ public CompletableFuture> create( } private HttpRequest.Builder createRequestBuilder( - CreateRequest createRequest, String idempotencyKey) throws ApiException { - // verify the required parameter 'createRequest' is set - if (createRequest == null) { + CreateConnectionRequest createConnectionRequest, String idempotencyKey) + throws ApiException { + // verify the required parameter 'createConnectionRequest' is set + if (createConnectionRequest == null) { throw new ApiException( - 400, "Missing the required parameter 'createRequest' when calling create"); + 400, + "Missing the required parameter 'createConnectionRequest' when calling create"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -146,7 +149,8 @@ private HttpRequest.Builder createRequestBuilder( localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createRequest); + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(createConnectionRequest); localVarRequestBuilder.method( "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { diff --git a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java index d3582c4..0d99cc0 100644 --- a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java @@ -68,9 +68,9 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * gets ip addresses gets ip addresses + * Gets whitelisted ip addresses Gets whitelisted ip addresses for given Api user. * - * @param userId The ID of the user (required) + * @param userId The ID of the api user (required) * @return CompletableFuture<ApiResponse<GetWhitelistIpAddressesResponse>> * @throws ApiException if fails to make API call */ diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java index e78e70e..8e24257 100644 --- a/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java @@ -18,7 +18,7 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.GetWorkspaceStatus200Response; +import com.fireblocks.sdk.model.GetWorkspaceStatusResponse; import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -70,10 +70,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Returns current workspace status Returns current workspace status * - * @return CompletableFuture<ApiResponse<GetWorkspaceStatus200Response>> + * @return CompletableFuture<ApiResponse<GetWorkspaceStatusResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getWorkspaceStatus() + public CompletableFuture> getWorkspaceStatus() throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = getWorkspaceStatusRequestBuilder(); @@ -92,7 +92,7 @@ public CompletableFuture> getWorkspac try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -100,7 +100,7 @@ public CompletableFuture> getWorkspac : memberVarObjectMapper.readValue( responseBody, new TypeReference< - GetWorkspaceStatus200Response>() {}))); + GetWorkspaceStatusResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } diff --git a/src/main/java/com/fireblocks/sdk/model/AbiFunction.java b/src/main/java/com/fireblocks/sdk/model/AbiFunction.java new file mode 100644 index 0000000..5cf1c74 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AbiFunction.java @@ -0,0 +1,459 @@ +/* + * 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; + +/** AbiFunction */ +@JsonPropertyOrder({ + AbiFunction.JSON_PROPERTY_NAME, + AbiFunction.JSON_PROPERTY_STATE_MUTABILITY, + AbiFunction.JSON_PROPERTY_TYPE, + AbiFunction.JSON_PROPERTY_INPUTS, + AbiFunction.JSON_PROPERTY_OUTPUTS, + AbiFunction.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AbiFunction { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + /** The state mutability of the contract function as it appears in the ABI */ + public enum StateMutabilityEnum { + PURE("pure"), + + VIEW("view"), + + NONPAYABLE("nonpayable"), + + PAYABLE("payable"); + + private String value; + + StateMutabilityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StateMutabilityEnum fromValue(String value) { + for (StateMutabilityEnum b : StateMutabilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATE_MUTABILITY = "stateMutability"; + private StateMutabilityEnum stateMutability; + + /** The type if the function */ + public enum TypeEnum { + FUNCTION("function"), + + CONSTRUCTOR("constructor"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + private List inputs = new ArrayList<>(); + + public static final String JSON_PROPERTY_OUTPUTS = "outputs"; + private List outputs; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public AbiFunction() {} + + public AbiFunction name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract function as it appears in the ABI + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + public AbiFunction stateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + return this; + } + + /** + * The state mutability of the contract function as it appears in the ABI + * + * @return stateMutability + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StateMutabilityEnum getStateMutability() { + return stateMutability; + } + + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + } + + public AbiFunction type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type if the function + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + public AbiFunction inputs(List inputs) { + this.inputs = inputs; + return this; + } + + public AbiFunction addInputsItem(Parameter inputsItem) { + if (this.inputs == null) { + this.inputs = new ArrayList<>(); + } + this.inputs.add(inputsItem); + return this; + } + + /** + * The parameters that this function/constructor posses + * + * @return inputs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInputs() { + return inputs; + } + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputs(List inputs) { + this.inputs = inputs; + } + + public AbiFunction outputs(List outputs) { + this.outputs = outputs; + return this; + } + + public AbiFunction addOutputsItem(Parameter outputsItem) { + if (this.outputs == null) { + this.outputs = new ArrayList<>(); + } + this.outputs.add(outputsItem); + return this; + } + + /** + * The parameters that this 'read' function returns + * + * @return outputs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOutputs() { + return outputs; + } + + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputs(List outputs) { + this.outputs = outputs; + } + + public AbiFunction description(String description) { + this.description = description; + return this; + } + + /** + * The documentation of this function (if has any) + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this AbiFunction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbiFunction abiFunction = (AbiFunction) o; + return Objects.equals(this.name, abiFunction.name) + && Objects.equals(this.stateMutability, abiFunction.stateMutability) + && Objects.equals(this.type, abiFunction.type) + && Objects.equals(this.inputs, abiFunction.inputs) + && Objects.equals(this.outputs, abiFunction.outputs) + && Objects.equals(this.description, abiFunction.description); + } + + @Override + public int hashCode() { + return Objects.hash(name, stateMutability, type, inputs, outputs, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AbiFunction {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" stateMutability: ").append(toIndentedString(stateMutability)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" outputs: ").append(toIndentedString(outputs)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `stateMutability` to the URL query string + if (getStateMutability() != null) { + joiner.add( + String.format( + "%sstateMutability%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStateMutability()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (int i = 0; i < getInputs().size(); i++) { + if (getInputs().get(i) != null) { + joiner.add( + getInputs() + .get(i) + .toUrlQueryString( + String.format( + "%sinputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `outputs` to the URL query string + if (getOutputs() != null) { + for (int i = 0; i < getOutputs().size(); i++) { + if (getOutputs().get(i) != null) { + joiner.add( + getOutputs() + .get(i) + .toUrlQueryString( + String.format( + "%soutputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpError.java b/src/main/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpError.java new file mode 100644 index 0000000..e6b904c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpError.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetAlreadyExistHttpError */ +@JsonPropertyOrder({ + AssetAlreadyExistHttpError.JSON_PROPERTY_STATUS_CODE, + AssetAlreadyExistHttpError.JSON_PROPERTY_MESSAGE, + AssetAlreadyExistHttpError.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetAlreadyExistHttpError { + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private Integer statusCode; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public AssetAlreadyExistHttpError() {} + + public AssetAlreadyExistHttpError statusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * HTTP status code + * + * @return statusCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatusCode() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + } + + public AssetAlreadyExistHttpError message(String message) { + this.message = message; + return this; + } + + /** + * Error message + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + public AssetAlreadyExistHttpError error(String error) { + this.error = error; + return this; + } + + /** + * Short description of the HTTP error + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(String error) { + this.error = error; + } + + /** Return true if this AssetAlreadyExistHttpError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetAlreadyExistHttpError assetAlreadyExistHttpError = (AssetAlreadyExistHttpError) o; + return Objects.equals(this.statusCode, assetAlreadyExistHttpError.statusCode) + && Objects.equals(this.message, assetAlreadyExistHttpError.message) + && Objects.equals(this.error, assetAlreadyExistHttpError.error); + } + + @Override + public int hashCode() { + return Objects.hash(statusCode, message, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetAlreadyExistHttpError {\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).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 `statusCode` to the URL query string + if (getStatusCode() != null) { + joiner.add( + String.format( + "%sstatusCode%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStatusCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add( + String.format( + "%serror%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getError()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.java b/src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.java new file mode 100644 index 0000000..c73e03b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpError.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetDoesNotExistHttpError */ +@JsonPropertyOrder({ + AssetDoesNotExistHttpError.JSON_PROPERTY_STATUS_CODE, + AssetDoesNotExistHttpError.JSON_PROPERTY_MESSAGE, + AssetDoesNotExistHttpError.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetDoesNotExistHttpError { + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private Integer statusCode; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public AssetDoesNotExistHttpError() {} + + public AssetDoesNotExistHttpError statusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * HTTP status code + * + * @return statusCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatusCode() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + } + + public AssetDoesNotExistHttpError message(String message) { + this.message = message; + return this; + } + + /** + * Error message + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + public AssetDoesNotExistHttpError error(String error) { + this.error = error; + return this; + } + + /** + * Short description of the HTTP error + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(String error) { + this.error = error; + } + + /** Return true if this AssetDoesNotExistHttpError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetDoesNotExistHttpError assetDoesNotExistHttpError = (AssetDoesNotExistHttpError) o; + return Objects.equals(this.statusCode, assetDoesNotExistHttpError.statusCode) + && Objects.equals(this.message, assetDoesNotExistHttpError.message) + && Objects.equals(this.error, assetDoesNotExistHttpError.error); + } + + @Override + public int hashCode() { + return Objects.hash(statusCode, message, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetDoesNotExistHttpError {\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).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 `statusCode` to the URL query string + if (getStatusCode() != null) { + joiner.add( + String.format( + "%sstatusCode%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStatusCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add( + String.format( + "%serror%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getError()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java new file mode 100644 index 0000000..00e8c7f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AssetForbiddenErrorResponse */ +@JsonPropertyOrder({ + AssetForbiddenErrorResponse.JSON_PROPERTY_MESSAGE, + AssetForbiddenErrorResponse.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetForbiddenErrorResponse { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public AssetForbiddenErrorResponse() {} + + public AssetForbiddenErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Forbidden error code + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(String message) { + this.message = message; + } + + public AssetForbiddenErrorResponse code(String code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCode(String code) { + this.code = code; + } + + /** Return true if this AssetForbiddenErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetForbiddenErrorResponse assetForbiddenErrorResponse = (AssetForbiddenErrorResponse) o; + return Objects.equals(this.message, assetForbiddenErrorResponse.message) + && Objects.equals(this.code, assetForbiddenErrorResponse.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetForbiddenErrorResponse {\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/AssetMetadataDto.java b/src/main/java/com/fireblocks/sdk/model/AssetMetadataDto.java new file mode 100644 index 0000000..a9e7044 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetMetadataDto.java @@ -0,0 +1,649 @@ +/* + * 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; + +/** AssetMetadataDto */ +@JsonPropertyOrder({ + AssetMetadataDto.JSON_PROPERTY_ASSET_ID, + AssetMetadataDto.JSON_PROPERTY_NAME, + AssetMetadataDto.JSON_PROPERTY_SYMBOL, + AssetMetadataDto.JSON_PROPERTY_NETWORK_PROTOCOL, + AssetMetadataDto.JSON_PROPERTY_TOTAL_SUPPLY, + AssetMetadataDto.JSON_PROPERTY_HOLDERS_COUNT, + AssetMetadataDto.JSON_PROPERTY_TYPE, + AssetMetadataDto.JSON_PROPERTY_CONTRACT_ADDRESS, + AssetMetadataDto.JSON_PROPERTY_ISSUER_ADDRESS, + AssetMetadataDto.JSON_PROPERTY_TESTNET, + AssetMetadataDto.JSON_PROPERTY_BLOCKCHAIN, + AssetMetadataDto.JSON_PROPERTY_DECIMALS, + AssetMetadataDto.JSON_PROPERTY_VAULT_ACCOUNT_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AssetMetadataDto { + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_NETWORK_PROTOCOL = "networkProtocol"; + private String networkProtocol; + + public static final String JSON_PROPERTY_TOTAL_SUPPLY = "totalSupply"; + private String totalSupply; + + public static final String JSON_PROPERTY_HOLDERS_COUNT = "holdersCount"; + private BigDecimal holdersCount; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_ISSUER_ADDRESS = "issuerAddress"; + private String issuerAddress; + + public static final String JSON_PROPERTY_TESTNET = "testnet"; + private Boolean testnet; + + public static final String JSON_PROPERTY_BLOCKCHAIN = "blockchain"; + private String blockchain; + + public static final String JSON_PROPERTY_DECIMALS = "decimals"; + private BigDecimal decimals; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public AssetMetadataDto() {} + + public AssetMetadataDto assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * The Fireblocks` asset id + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public AssetMetadataDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the token + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + public AssetMetadataDto symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The symbol of the token + * + * @return symbol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSymbol() { + return symbol; + } + + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public AssetMetadataDto networkProtocol(String networkProtocol) { + this.networkProtocol = networkProtocol; + return this; + } + + /** + * The network protocol of the token + * + * @return networkProtocol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNetworkProtocol() { + return networkProtocol; + } + + @JsonProperty(JSON_PROPERTY_NETWORK_PROTOCOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNetworkProtocol(String networkProtocol) { + this.networkProtocol = networkProtocol; + } + + public AssetMetadataDto totalSupply(String totalSupply) { + this.totalSupply = totalSupply; + return this; + } + + /** + * The total supply of the token + * + * @return totalSupply + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SUPPLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTotalSupply() { + return totalSupply; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_SUPPLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalSupply(String totalSupply) { + this.totalSupply = totalSupply; + } + + public AssetMetadataDto holdersCount(BigDecimal holdersCount) { + this.holdersCount = holdersCount; + return this; + } + + /** + * The number of holders of the token + * + * @return holdersCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOLDERS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getHoldersCount() { + return holdersCount; + } + + @JsonProperty(JSON_PROPERTY_HOLDERS_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHoldersCount(BigDecimal holdersCount) { + this.holdersCount = holdersCount; + } + + public AssetMetadataDto type(String type) { + this.type = type; + return this; + } + + /** + * The type of the token + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(String type) { + this.type = type; + } + + public AssetMetadataDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The address of the token contract + * + * @return contractAddress + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public AssetMetadataDto issuerAddress(String issuerAddress) { + this.issuerAddress = issuerAddress; + return this; + } + + /** + * In case of Stellar or Ripple, the address of the issuer of the token + * + * @return issuerAddress + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIssuerAddress() { + return issuerAddress; + } + + @JsonProperty(JSON_PROPERTY_ISSUER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIssuerAddress(String issuerAddress) { + this.issuerAddress = issuerAddress; + } + + public AssetMetadataDto testnet(Boolean testnet) { + this.testnet = testnet; + return this; + } + + /** + * Is it deployed on testnet or to mainnet + * + * @return testnet + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TESTNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getTestnet() { + return testnet; + } + + @JsonProperty(JSON_PROPERTY_TESTNET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTestnet(Boolean testnet) { + this.testnet = testnet; + } + + public AssetMetadataDto blockchain(String blockchain) { + this.blockchain = blockchain; + return this; + } + + /** + * The blockchain native asset id which the token is deployed on + * + * @return blockchain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBlockchain() { + return blockchain; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBlockchain(String blockchain) { + this.blockchain = blockchain; + } + + public AssetMetadataDto decimals(BigDecimal decimals) { + this.decimals = decimals; + return this; + } + + /** + * The number of decimals of the token + * + * @return decimals + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getDecimals() { + return decimals; + } + + @JsonProperty(JSON_PROPERTY_DECIMALS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimals(BigDecimal decimals) { + this.decimals = decimals; + } + + public AssetMetadataDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The id of the vault account that initiated the request to issue the token. Will be empty if + * token was issued outside of Fireblocks. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + /** Return true if this AssetMetadataDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssetMetadataDto assetMetadataDto = (AssetMetadataDto) o; + return Objects.equals(this.assetId, assetMetadataDto.assetId) + && Objects.equals(this.name, assetMetadataDto.name) + && Objects.equals(this.symbol, assetMetadataDto.symbol) + && Objects.equals(this.networkProtocol, assetMetadataDto.networkProtocol) + && Objects.equals(this.totalSupply, assetMetadataDto.totalSupply) + && Objects.equals(this.holdersCount, assetMetadataDto.holdersCount) + && Objects.equals(this.type, assetMetadataDto.type) + && Objects.equals(this.contractAddress, assetMetadataDto.contractAddress) + && Objects.equals(this.issuerAddress, assetMetadataDto.issuerAddress) + && Objects.equals(this.testnet, assetMetadataDto.testnet) + && Objects.equals(this.blockchain, assetMetadataDto.blockchain) + && Objects.equals(this.decimals, assetMetadataDto.decimals) + && Objects.equals(this.vaultAccountId, assetMetadataDto.vaultAccountId); + } + + @Override + public int hashCode() { + return Objects.hash( + assetId, + name, + symbol, + networkProtocol, + totalSupply, + holdersCount, + type, + contractAddress, + issuerAddress, + testnet, + blockchain, + decimals, + vaultAccountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssetMetadataDto {\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" networkProtocol: ").append(toIndentedString(networkProtocol)).append("\n"); + sb.append(" totalSupply: ").append(toIndentedString(totalSupply)).append("\n"); + sb.append(" holdersCount: ").append(toIndentedString(holdersCount)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" issuerAddress: ").append(toIndentedString(issuerAddress)).append("\n"); + sb.append(" testnet: ").append(toIndentedString(testnet)).append("\n"); + sb.append(" blockchain: ").append(toIndentedString(blockchain)).append("\n"); + sb.append(" decimals: ").append(toIndentedString(decimals)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).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 `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `networkProtocol` to the URL query string + if (getNetworkProtocol() != null) { + joiner.add( + String.format( + "%snetworkProtocol%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getNetworkProtocol()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `totalSupply` to the URL query string + if (getTotalSupply() != null) { + joiner.add( + String.format( + "%stotalSupply%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTotalSupply()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `holdersCount` to the URL query string + if (getHoldersCount() != null) { + joiner.add( + String.format( + "%sholdersCount%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getHoldersCount()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractAddress` to the URL query string + if (getContractAddress() != null) { + joiner.add( + String.format( + "%scontractAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `issuerAddress` to the URL query string + if (getIssuerAddress() != null) { + joiner.add( + String.format( + "%sissuerAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIssuerAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `testnet` to the URL query string + if (getTestnet() != null) { + joiner.add( + String.format( + "%stestnet%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTestnet()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockchain` to the URL query string + if (getBlockchain() != null) { + joiner.add( + String.format( + "%sblockchain%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchain()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `decimals` to the URL query string + if (getDecimals() != null) { + joiner.add( + String.format( + "%sdecimals%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getDecimals()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `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"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AuditorData.java b/src/main/java/com/fireblocks/sdk/model/AuditorData.java new file mode 100644 index 0000000..c19c6f1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AuditorData.java @@ -0,0 +1,221 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** AuditorData */ +@JsonPropertyOrder({ + AuditorData.JSON_PROPERTY_NAME, + AuditorData.JSON_PROPERTY_IMAGE_U_R_L, + AuditorData.JSON_PROPERTY_LINK +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuditorData { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_IMAGE_U_R_L = "imageURL"; + private String imageURL; + + public static final String JSON_PROPERTY_LINK = "link"; + private String link; + + public AuditorData() {} + + public AuditorData name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public AuditorData imageURL(String imageURL) { + this.imageURL = imageURL; + return this; + } + + /** + * Get imageURL + * + * @return imageURL + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IMAGE_U_R_L) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getImageURL() { + return imageURL; + } + + @JsonProperty(JSON_PROPERTY_IMAGE_U_R_L) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setImageURL(String imageURL) { + this.imageURL = imageURL; + } + + public AuditorData link(String link) { + this.link = link; + return this; + } + + /** + * Get link + * + * @return link + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLink() { + return link; + } + + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLink(String link) { + this.link = link; + } + + /** Return true if this AuditorData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AuditorData auditorData = (AuditorData) o; + return Objects.equals(this.name, auditorData.name) + && Objects.equals(this.imageURL, auditorData.imageURL) + && Objects.equals(this.link, auditorData.link); + } + + @Override + public int hashCode() { + return Objects.hash(name, imageURL, link); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuditorData {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" imageURL: ").append(toIndentedString(imageURL)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `imageURL` to the URL query string + if (getImageURL() != null) { + joiner.add( + String.format( + "%simageURL%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getImageURL()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `link` to the URL query string + if (getLink() != null) { + joiner.add( + String.format( + "%slink%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getLink()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionMetadataDto.java b/src/main/java/com/fireblocks/sdk/model/CollectionMetadataDto.java new file mode 100644 index 0000000..48a473e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CollectionMetadataDto.java @@ -0,0 +1,351 @@ +/* + * 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; + +/** CollectionMetadataDto */ +@JsonPropertyOrder({ + CollectionMetadataDto.JSON_PROPERTY_FB_COLLECTION_ID, + CollectionMetadataDto.JSON_PROPERTY_NAME, + CollectionMetadataDto.JSON_PROPERTY_SYMBOL, + CollectionMetadataDto.JSON_PROPERTY_STANDARD, + CollectionMetadataDto.JSON_PROPERTY_BLOCKCHAIN_DESCRIPTOR, + CollectionMetadataDto.JSON_PROPERTY_CONTRACT_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CollectionMetadataDto { + public static final String JSON_PROPERTY_FB_COLLECTION_ID = "fbCollectionId"; + private String fbCollectionId; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_STANDARD = "standard"; + private String standard; + + public static final String JSON_PROPERTY_BLOCKCHAIN_DESCRIPTOR = "blockchainDescriptor"; + private String blockchainDescriptor; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public CollectionMetadataDto() {} + + public CollectionMetadataDto fbCollectionId(String fbCollectionId) { + this.fbCollectionId = fbCollectionId; + return this; + } + + /** + * Fireblocks collection id + * + * @return fbCollectionId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FB_COLLECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFbCollectionId() { + return fbCollectionId; + } + + @JsonProperty(JSON_PROPERTY_FB_COLLECTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFbCollectionId(String fbCollectionId) { + this.fbCollectionId = fbCollectionId; + } + + public CollectionMetadataDto name(String name) { + this.name = name; + return this; + } + + /** + * Collection name + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + public CollectionMetadataDto symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * Collection symbol + * + * @return symbol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSymbol() { + return symbol; + } + + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public CollectionMetadataDto standard(String standard) { + this.standard = standard; + return this; + } + + /** + * Collection contract standard + * + * @return standard + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STANDARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStandard() { + return standard; + } + + @JsonProperty(JSON_PROPERTY_STANDARD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStandard(String standard) { + this.standard = standard; + } + + public CollectionMetadataDto blockchainDescriptor(String blockchainDescriptor) { + this.blockchainDescriptor = blockchainDescriptor; + return this; + } + + /** + * Collection's blockchain + * + * @return blockchainDescriptor + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_DESCRIPTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockchainDescriptor() { + return blockchainDescriptor; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_DESCRIPTOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainDescriptor(String blockchainDescriptor) { + this.blockchainDescriptor = blockchainDescriptor; + } + + public CollectionMetadataDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * Collection contract address + * + * @return contractAddress + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + /** Return true if this CollectionMetadataDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CollectionMetadataDto collectionMetadataDto = (CollectionMetadataDto) o; + return Objects.equals(this.fbCollectionId, collectionMetadataDto.fbCollectionId) + && Objects.equals(this.name, collectionMetadataDto.name) + && Objects.equals(this.symbol, collectionMetadataDto.symbol) + && Objects.equals(this.standard, collectionMetadataDto.standard) + && Objects.equals( + this.blockchainDescriptor, collectionMetadataDto.blockchainDescriptor) + && Objects.equals(this.contractAddress, collectionMetadataDto.contractAddress); + } + + @Override + public int hashCode() { + return Objects.hash( + fbCollectionId, name, symbol, standard, blockchainDescriptor, contractAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CollectionMetadataDto {\n"); + sb.append(" fbCollectionId: ").append(toIndentedString(fbCollectionId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" standard: ").append(toIndentedString(standard)).append("\n"); + sb.append(" blockchainDescriptor: ") + .append(toIndentedString(blockchainDescriptor)) + .append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fbCollectionId` to the URL query string + if (getFbCollectionId() != null) { + joiner.add( + String.format( + "%sfbCollectionId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getFbCollectionId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `standard` to the URL query string + if (getStandard() != null) { + joiner.add( + String.format( + "%sstandard%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStandard()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockchainDescriptor` to the URL query string + if (getBlockchainDescriptor() != null) { + joiner.add( + String.format( + "%sblockchainDescriptor%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainDescriptor()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractAddress` to the URL query string + if (getContractAddress() != null) { + joiner.add( + String.format( + "%scontractAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java b/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java index 2af74a7..63f7da4 100644 --- a/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java @@ -54,10 +54,14 @@ public enum BlockchainDescriptorEnum { ETH_TEST5("ETH_TEST5"), + ETH_TEST6("ETH_TEST6"), + POLYGON("POLYGON"), POLYGON_TEST_MUMBAI("POLYGON_TEST_MUMBAI"), + AMOY_POLYGON_TEST("AMOY_POLYGON_TEST"), + XTZ("XTZ"), XTZ_TEST("XTZ_TEST"), diff --git a/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java b/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java new file mode 100644 index 0000000..f2211fb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ContractAbiResponseDto */ +@JsonPropertyOrder({ + ContractAbiResponseDto.JSON_PROPERTY_ABI, + ContractAbiResponseDto.JSON_PROPERTY_IMPLEMENTATION_ABI +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractAbiResponseDto { + public static final String JSON_PROPERTY_ABI = "abi"; + private List abi = new ArrayList<>(); + + public static final String JSON_PROPERTY_IMPLEMENTATION_ABI = "implementationAbi"; + private List implementationAbi; + + public ContractAbiResponseDto() {} + + public ContractAbiResponseDto abi(List abi) { + this.abi = abi; + return this; + } + + public ContractAbiResponseDto addAbiItem(AbiFunction abiItem) { + if (this.abi == null) { + this.abi = new ArrayList<>(); + } + this.abi.add(abiItem); + return this; + } + + /** + * The abi of the contract + * + * @return abi + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAbi() { + return abi; + } + + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbi(List abi) { + this.abi = abi; + } + + public ContractAbiResponseDto implementationAbi(List implementationAbi) { + this.implementationAbi = implementationAbi; + return this; + } + + public ContractAbiResponseDto addImplementationAbiItem(AbiFunction implementationAbiItem) { + if (this.implementationAbi == null) { + this.implementationAbi = new ArrayList<>(); + } + this.implementationAbi.add(implementationAbiItem); + return this; + } + + /** + * The abi of the implementation contract if exists. Relevant only for proxy patterns + * + * @return implementationAbi + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPLEMENTATION_ABI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getImplementationAbi() { + return implementationAbi; + } + + @JsonProperty(JSON_PROPERTY_IMPLEMENTATION_ABI) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImplementationAbi(List implementationAbi) { + this.implementationAbi = implementationAbi; + } + + /** Return true if this ContractAbiResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractAbiResponseDto contractAbiResponseDto = (ContractAbiResponseDto) o; + return Objects.equals(this.abi, contractAbiResponseDto.abi) + && Objects.equals(this.implementationAbi, contractAbiResponseDto.implementationAbi); + } + + @Override + public int hashCode() { + return Objects.hash(abi, implementationAbi); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractAbiResponseDto {\n"); + sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); + sb.append(" implementationAbi: ") + .append(toIndentedString(implementationAbi)) + .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 `abi` to the URL query string + if (getAbi() != null) { + for (int i = 0; i < getAbi().size(); i++) { + if (getAbi().get(i) != null) { + joiner.add( + getAbi().get(i) + .toUrlQueryString( + String.format( + "%sabi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `implementationAbi` to the URL query string + if (getImplementationAbi() != null) { + for (int i = 0; i < getImplementationAbi().size(); i++) { + if (getImplementationAbi().get(i) != null) { + joiner.add( + getImplementationAbi() + .get(i) + .toUrlQueryString( + String.format( + "%simplementationAbi%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractAttributes.java b/src/main/java/com/fireblocks/sdk/model/ContractAttributes.java new file mode 100644 index 0000000..78f4d0b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractAttributes.java @@ -0,0 +1,249 @@ +/* + * 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; + +/** ContractAttributes */ +@JsonPropertyOrder({ + ContractAttributes.JSON_PROPERTY_USE_CASES, + ContractAttributes.JSON_PROPERTY_STANDARDS, + ContractAttributes.JSON_PROPERTY_AUDITOR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractAttributes { + public static final String JSON_PROPERTY_USE_CASES = "useCases"; + private List useCases = new ArrayList<>(); + + public static final String JSON_PROPERTY_STANDARDS = "standards"; + private List standards = new ArrayList<>(); + + public static final String JSON_PROPERTY_AUDITOR = "auditor"; + private AuditorData auditor; + + public ContractAttributes() {} + + public ContractAttributes useCases(List useCases) { + this.useCases = useCases; + return this; + } + + public ContractAttributes addUseCasesItem(String useCasesItem) { + if (this.useCases == null) { + this.useCases = new ArrayList<>(); + } + this.useCases.add(useCasesItem); + return this; + } + + /** + * Get useCases + * + * @return useCases + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_USE_CASES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUseCases() { + return useCases; + } + + @JsonProperty(JSON_PROPERTY_USE_CASES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUseCases(List useCases) { + this.useCases = useCases; + } + + public ContractAttributes standards(List standards) { + this.standards = standards; + return this; + } + + public ContractAttributes addStandardsItem(String standardsItem) { + if (this.standards == null) { + this.standards = new ArrayList<>(); + } + this.standards.add(standardsItem); + return this; + } + + /** + * Get standards + * + * @return standards + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STANDARDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getStandards() { + return standards; + } + + @JsonProperty(JSON_PROPERTY_STANDARDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStandards(List standards) { + this.standards = standards; + } + + public ContractAttributes auditor(AuditorData auditor) { + this.auditor = auditor; + return this; + } + + /** + * Get auditor + * + * @return auditor + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AUDITOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AuditorData getAuditor() { + return auditor; + } + + @JsonProperty(JSON_PROPERTY_AUDITOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAuditor(AuditorData auditor) { + this.auditor = auditor; + } + + /** Return true if this ContractAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractAttributes contractAttributes = (ContractAttributes) o; + return Objects.equals(this.useCases, contractAttributes.useCases) + && Objects.equals(this.standards, contractAttributes.standards) + && Objects.equals(this.auditor, contractAttributes.auditor); + } + + @Override + public int hashCode() { + return Objects.hash(useCases, standards, auditor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractAttributes {\n"); + sb.append(" useCases: ").append(toIndentedString(useCases)).append("\n"); + sb.append(" standards: ").append(toIndentedString(standards)).append("\n"); + sb.append(" auditor: ").append(toIndentedString(auditor)).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 `useCases` to the URL query string + if (getUseCases() != null) { + for (int i = 0; i < getUseCases().size(); i++) { + joiner.add( + String.format( + "%suseCases%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getUseCases().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `standards` to the URL query string + if (getStandards() != null) { + for (int i = 0; i < getStandards().size(); i++) { + joiner.add( + String.format( + "%sstandards%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getStandards().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `auditor` to the URL query string + if (getAuditor() != null) { + joiner.add(getAuditor().toUrlQueryString(prefix + "auditor" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java new file mode 100644 index 0000000..81c0b7a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDeployRequest.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ContractDeployRequest */ +@JsonPropertyOrder({ + ContractDeployRequest.JSON_PROPERTY_ASSET_ID, + ContractDeployRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + ContractDeployRequest.JSON_PROPERTY_CONSTRUCTOR_PARAMETERS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDeployRequest { + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CONSTRUCTOR_PARAMETERS = "constructorParameters"; + private List constructorParameters; + + public ContractDeployRequest() {} + + public ContractDeployRequest assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * The base asset identifier of the blockchain you want to deploy to + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public ContractDeployRequest vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account id you wish to deploy from + * + * @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 ContractDeployRequest constructorParameters( + List constructorParameters) { + this.constructorParameters = constructorParameters; + return this; + } + + public ContractDeployRequest addConstructorParametersItem( + ParameterWithValue constructorParametersItem) { + if (this.constructorParameters == null) { + this.constructorParameters = new ArrayList<>(); + } + this.constructorParameters.add(constructorParametersItem); + return this; + } + + /** + * The constructor parameters of this contract + * + * @return constructorParameters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONSTRUCTOR_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConstructorParameters() { + return constructorParameters; + } + + @JsonProperty(JSON_PROPERTY_CONSTRUCTOR_PARAMETERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConstructorParameters(List constructorParameters) { + this.constructorParameters = constructorParameters; + } + + /** Return true if this ContractDeployRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDeployRequest contractDeployRequest = (ContractDeployRequest) o; + return Objects.equals(this.assetId, contractDeployRequest.assetId) + && Objects.equals(this.vaultAccountId, contractDeployRequest.vaultAccountId) + && Objects.equals( + this.constructorParameters, contractDeployRequest.constructorParameters); + } + + @Override + public int hashCode() { + return Objects.hash(assetId, vaultAccountId, constructorParameters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDeployRequest {\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" constructorParameters: ") + .append(toIndentedString(constructorParameters)) + .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 `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // 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 `constructorParameters` to the URL query string + if (getConstructorParameters() != null) { + for (int i = 0; i < getConstructorParameters().size(); i++) { + if (getConstructorParameters().get(i) != null) { + joiner.add( + getConstructorParameters() + .get(i) + .toUrlQueryString( + String.format( + "%sconstructorParameters%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDeployResponse.java b/src/main/java/com/fireblocks/sdk/model/ContractDeployResponse.java new file mode 100644 index 0000000..d60ad61 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDeployResponse.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ContractDeployResponse */ +@JsonPropertyOrder({ContractDeployResponse.JSON_PROPERTY_TX_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDeployResponse { + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public ContractDeployResponse() {} + + public ContractDeployResponse txId(String txId) { + this.txId = txId; + return this; + } + + /** + * The transaction id of the deployment request + * + * @return txId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxId(String txId) { + this.txId = txId; + } + + /** Return true if this ContractDeployResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDeployResponse contractDeployResponse = (ContractDeployResponse) o; + return Objects.equals(this.txId, contractDeployResponse.txId); + } + + @Override + public int hashCode() { + return Objects.hash(txId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDeployResponse {\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractDoc.java b/src/main/java/com/fireblocks/sdk/model/ContractDoc.java new file mode 100644 index 0000000..7e6c1f7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractDoc.java @@ -0,0 +1,323 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** ContractDoc */ +@JsonPropertyOrder({ + ContractDoc.JSON_PROPERTY_DETAILS, + ContractDoc.JSON_PROPERTY_EVENTS, + ContractDoc.JSON_PROPERTY_KIND, + ContractDoc.JSON_PROPERTY_METHODS, + ContractDoc.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractDoc { + public static final String JSON_PROPERTY_DETAILS = "details"; + private String details; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private String events; + + public static final String JSON_PROPERTY_KIND = "kind"; + private String kind; + + public static final String JSON_PROPERTY_METHODS = "methods"; + private Map methods = new HashMap<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public ContractDoc() {} + + public ContractDoc details(String details) { + this.details = details; + return this; + } + + /** + * A description of the contract + * + * @return details + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDetails() { + return details; + } + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(String details) { + this.details = details; + } + + public ContractDoc events(String events) { + this.events = events; + return this; + } + + /** + * A description of the contract`s events + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvents() { + return events; + } + + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvents(String events) { + this.events = events; + } + + public ContractDoc kind(String kind) { + this.kind = kind; + return this; + } + + /** + * Is it devdoc or userdoc + * + * @return kind + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKind() { + return kind; + } + + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setKind(String kind) { + this.kind = kind; + } + + public ContractDoc methods(Map methods) { + this.methods = methods; + return this; + } + + public ContractDoc putMethodsItem(String key, FunctionDoc methodsItem) { + if (this.methods == null) { + this.methods = new HashMap<>(); + } + this.methods.put(key, methodsItem); + return this; + } + + /** + * The description of the contract functions + * + * @return methods + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_METHODS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getMethods() { + return methods; + } + + @JsonProperty(JSON_PROPERTY_METHODS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMethods(Map methods) { + this.methods = methods; + } + + public ContractDoc version(String version) { + this.version = version; + return this; + } + + /** + * The version of the contract + * + * @return version + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVersion(String version) { + this.version = version; + } + + /** Return true if this ContractDoc object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractDoc contractDoc = (ContractDoc) o; + return Objects.equals(this.details, contractDoc.details) + && Objects.equals(this.events, contractDoc.events) + && Objects.equals(this.kind, contractDoc.kind) + && Objects.equals(this.methods, contractDoc.methods) + && Objects.equals(this.version, contractDoc.version); + } + + @Override + public int hashCode() { + return Objects.hash(details, events, kind, methods, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractDoc {\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" methods: ").append(toIndentedString(methods)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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 `details` to the URL query string + if (getDetails() != null) { + joiner.add( + String.format( + "%sdetails%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getDetails()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `events` to the URL query string + if (getEvents() != null) { + joiner.add( + String.format( + "%sevents%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getEvents()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `kind` to the URL query string + if (getKind() != null) { + joiner.add( + String.format( + "%skind%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getKind()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `methods` to the URL query string + if (getMethods() != null) { + for (String _key : getMethods().keySet()) { + if (getMethods().get(_key) != null) { + joiner.add( + getMethods() + .get(_key) + .toUrlQueryString( + String.format( + "%smethods%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + _key, + containerSuffix)))); + } + } + } + + // add `version` to the URL query string + if (getVersion() != null) { + joiner.add( + String.format( + "%sversion%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getVersion()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractMetadataDto.java b/src/main/java/com/fireblocks/sdk/model/ContractMetadataDto.java new file mode 100644 index 0000000..d89f1e7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractMetadataDto.java @@ -0,0 +1,311 @@ +/* + * 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; + +/** ContractMetadataDto */ +@JsonPropertyOrder({ + ContractMetadataDto.JSON_PROPERTY_ID, + ContractMetadataDto.JSON_PROPERTY_BLOCKCHAIN_ID, + ContractMetadataDto.JSON_PROPERTY_CONTRACT_ADDRESS, + ContractMetadataDto.JSON_PROPERTY_CONTRACT_TEMPLATE_ID, + ContractMetadataDto.JSON_PROPERTY_VAULT_ACCOUNT_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractMetadataDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + private String blockchainId; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_CONTRACT_TEMPLATE_ID = "contractTemplateId"; + private String contractTemplateId; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public ContractMetadataDto() {} + + public ContractMetadataDto id(String id) { + this.id = id; + return this; + } + + /** + * The deployed contract ID + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public ContractMetadataDto blockchainId(String blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The blockchain ID + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(String blockchainId) { + this.blockchainId = blockchainId; + } + + public ContractMetadataDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The address of the token contract + * + * @return contractAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public ContractMetadataDto contractTemplateId(String contractTemplateId) { + this.contractTemplateId = contractTemplateId; + return this; + } + + /** + * The contract template ID + * + * @return contractTemplateId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractTemplateId() { + return contractTemplateId; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractTemplateId(String contractTemplateId) { + this.contractTemplateId = contractTemplateId; + } + + public ContractMetadataDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account ID that initiated the request to issue the token + * + * @return vaultAccountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + /** Return true if this ContractMetadataDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractMetadataDto contractMetadataDto = (ContractMetadataDto) o; + return Objects.equals(this.id, contractMetadataDto.id) + && Objects.equals(this.blockchainId, contractMetadataDto.blockchainId) + && Objects.equals(this.contractAddress, contractMetadataDto.contractAddress) + && Objects.equals(this.contractTemplateId, contractMetadataDto.contractTemplateId) + && Objects.equals(this.vaultAccountId, contractMetadataDto.vaultAccountId); + } + + @Override + public int hashCode() { + return Objects.hash(id, blockchainId, contractAddress, contractTemplateId, vaultAccountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractMetadataDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" contractTemplateId: ") + .append(toIndentedString(contractTemplateId)) + .append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractAddress` to the URL query string + if (getContractAddress() != null) { + joiner.add( + String.format( + "%scontractAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractTemplateId` to the URL query string + if (getContractTemplateId() != null) { + joiner.add( + String.format( + "%scontractTemplateId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractTemplateId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java b/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java new file mode 100644 index 0000000..caee38b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractTemplateDto.java @@ -0,0 +1,772 @@ +/* + * 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; + +/** ContractTemplateDto */ +@JsonPropertyOrder({ + ContractTemplateDto.JSON_PROPERTY_ID, + ContractTemplateDto.JSON_PROPERTY_NAME, + ContractTemplateDto.JSON_PROPERTY_DESCRIPTION, + ContractTemplateDto.JSON_PROPERTY_LONG_DESCRIPTION, + ContractTemplateDto.JSON_PROPERTY_ABI, + ContractTemplateDto.JSON_PROPERTY_ATTRIBUTES, + ContractTemplateDto.JSON_PROPERTY_DOCS, + ContractTemplateDto.JSON_PROPERTY_OWNER, + ContractTemplateDto.JSON_PROPERTY_VENDOR, + ContractTemplateDto.JSON_PROPERTY_IS_PUBLIC, + ContractTemplateDto.JSON_PROPERTY_CAN_DEPLOY, + ContractTemplateDto.JSON_PROPERTY_TYPE, + ContractTemplateDto.JSON_PROPERTY_IMPLEMENTATION_CONTRACT_ID, + ContractTemplateDto.JSON_PROPERTY_INITIALIZATION_PHASE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractTemplateDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LONG_DESCRIPTION = "longDescription"; + private String longDescription; + + public static final String JSON_PROPERTY_ABI = "abi"; + private List> abi = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ContractAttributes attributes; + + public static final String JSON_PROPERTY_DOCS = "docs"; + private ContractDoc docs; + + public static final String JSON_PROPERTY_OWNER = "owner"; + private String owner; + + public static final String JSON_PROPERTY_VENDOR = "vendor"; + private VendorDto vendor; + + public static final String JSON_PROPERTY_IS_PUBLIC = "isPublic"; + private Boolean isPublic; + + public static final String JSON_PROPERTY_CAN_DEPLOY = "canDeploy"; + private Boolean canDeploy; + + /** The type of the contract template */ + public enum TypeEnum { + FUNGIBLE_TOKEN("FUNGIBLE_TOKEN"), + + NON_FUNGIBLE_TOKEN("NON_FUNGIBLE_TOKEN"), + + NON_TOKEN("NON_TOKEN"), + + TOKEN_EXTENSION("TOKEN_EXTENSION"), + + TOKEN_UTILITY("TOKEN_UTILITY"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_IMPLEMENTATION_CONTRACT_ID = + "implementationContractId"; + private String implementationContractId; + + /** Gets or Sets initializationPhase */ + public enum InitializationPhaseEnum { + ON_DEPLOYMENT("ON_DEPLOYMENT"), + + POST_DEPLOYMENT("POST_DEPLOYMENT"); + + private String value; + + InitializationPhaseEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InitializationPhaseEnum fromValue(String value) { + for (InitializationPhaseEnum b : InitializationPhaseEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_INITIALIZATION_PHASE = "initializationPhase"; + private InitializationPhaseEnum initializationPhase; + + public ContractTemplateDto() {} + + public ContractTemplateDto id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the contract template + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public ContractTemplateDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract template + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public ContractTemplateDto description(String description) { + this.description = description; + return this; + } + + /** + * A short description of the contract template + * + * @return description + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + public ContractTemplateDto longDescription(String longDescription) { + this.longDescription = longDescription; + return this; + } + + /** + * A full description of the contract template. May contain to break the lines + * + * @return longDescription + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LONG_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLongDescription() { + return longDescription; + } + + @JsonProperty(JSON_PROPERTY_LONG_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLongDescription(String longDescription) { + this.longDescription = longDescription; + } + + public ContractTemplateDto abi(List> abi) { + this.abi = abi; + return this; + } + + public ContractTemplateDto addAbiItem(List abiItem) { + if (this.abi == null) { + this.abi = new ArrayList<>(); + } + this.abi.add(abiItem); + return this; + } + + /** + * Get abi + * + * @return abi + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getAbi() { + return abi; + } + + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbi(List> abi) { + this.abi = abi; + } + + public ContractTemplateDto attributes(ContractAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * The attributes related to this contract template. It will be displayed in the tokenization + * page + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ContractAttributes getAttributes() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ContractAttributes attributes) { + this.attributes = attributes; + } + + public ContractTemplateDto docs(ContractDoc docs) { + this.docs = docs; + return this; + } + + /** + * A `natspec` compliant documentation json. Can be retrieved from the output json + * after compilation + * + * @return docs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ContractDoc getDocs() { + return docs; + } + + @JsonProperty(JSON_PROPERTY_DOCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocs(ContractDoc docs) { + this.docs = docs; + } + + public ContractTemplateDto owner(String owner) { + this.owner = owner; + return this; + } + + /** + * The workspace id of the owner of this contract template. If it's a private contract, only + * this workspace will be allowed to deploy it + * + * @return owner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOwner() { + return owner; + } + + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwner(String owner) { + this.owner = owner; + } + + public ContractTemplateDto vendor(VendorDto vendor) { + this.vendor = vendor; + return this; + } + + /** + * The details of the vendor of this contract template. Applicable only for public contract + * templates + * + * @return vendor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VENDOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VendorDto getVendor() { + return vendor; + } + + @JsonProperty(JSON_PROPERTY_VENDOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVendor(VendorDto vendor) { + this.vendor = vendor; + } + + public ContractTemplateDto isPublic(Boolean isPublic) { + this.isPublic = isPublic; + return this; + } + + /** + * Is this a contract that is viewable by all fireblocks's users or is it visible only for + * this workspace + * + * @return isPublic + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_PUBLIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsPublic() { + return isPublic; + } + + @JsonProperty(JSON_PROPERTY_IS_PUBLIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsPublic(Boolean isPublic) { + this.isPublic = isPublic; + } + + public ContractTemplateDto canDeploy(Boolean canDeploy) { + this.canDeploy = canDeploy; + return this; + } + + /** + * True if the workspace allowed to deploy this contract, false otherwise + * + * @return canDeploy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CAN_DEPLOY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCanDeploy() { + return canDeploy; + } + + @JsonProperty(JSON_PROPERTY_CAN_DEPLOY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCanDeploy(Boolean canDeploy) { + this.canDeploy = canDeploy; + } + + public ContractTemplateDto type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of the contract template + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + public ContractTemplateDto implementationContractId(String implementationContractId) { + this.implementationContractId = implementationContractId; + return this; + } + + /** + * Get implementationContractId + * + * @return implementationContractId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IMPLEMENTATION_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getImplementationContractId() { + return implementationContractId; + } + + @JsonProperty(JSON_PROPERTY_IMPLEMENTATION_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setImplementationContractId(String implementationContractId) { + this.implementationContractId = implementationContractId; + } + + public ContractTemplateDto initializationPhase(InitializationPhaseEnum initializationPhase) { + this.initializationPhase = initializationPhase; + return this; + } + + /** + * Get initializationPhase + * + * @return initializationPhase + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INITIALIZATION_PHASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public InitializationPhaseEnum getInitializationPhase() { + return initializationPhase; + } + + @JsonProperty(JSON_PROPERTY_INITIALIZATION_PHASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInitializationPhase(InitializationPhaseEnum initializationPhase) { + this.initializationPhase = initializationPhase; + } + + /** Return true if this ContractTemplateDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractTemplateDto contractTemplateDto = (ContractTemplateDto) o; + return Objects.equals(this.id, contractTemplateDto.id) + && Objects.equals(this.name, contractTemplateDto.name) + && Objects.equals(this.description, contractTemplateDto.description) + && Objects.equals(this.longDescription, contractTemplateDto.longDescription) + && Objects.equals(this.abi, contractTemplateDto.abi) + && Objects.equals(this.attributes, contractTemplateDto.attributes) + && Objects.equals(this.docs, contractTemplateDto.docs) + && Objects.equals(this.owner, contractTemplateDto.owner) + && Objects.equals(this.vendor, contractTemplateDto.vendor) + && Objects.equals(this.isPublic, contractTemplateDto.isPublic) + && Objects.equals(this.canDeploy, contractTemplateDto.canDeploy) + && Objects.equals(this.type, contractTemplateDto.type) + && Objects.equals( + this.implementationContractId, contractTemplateDto.implementationContractId) + && Objects.equals( + this.initializationPhase, contractTemplateDto.initializationPhase); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + description, + longDescription, + abi, + attributes, + docs, + owner, + vendor, + isPublic, + canDeploy, + type, + implementationContractId, + initializationPhase); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractTemplateDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" longDescription: ").append(toIndentedString(longDescription)).append("\n"); + sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" docs: ").append(toIndentedString(docs)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); + sb.append(" canDeploy: ").append(toIndentedString(canDeploy)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" implementationContractId: ") + .append(toIndentedString(implementationContractId)) + .append("\n"); + sb.append(" initializationPhase: ") + .append(toIndentedString(initializationPhase)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `longDescription` to the URL query string + if (getLongDescription() != null) { + joiner.add( + String.format( + "%slongDescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getLongDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `abi` to the URL query string + if (getAbi() != null) { + for (int i = 0; i < getAbi().size(); i++) { + if (getAbi().get(i) != null) { + joiner.add( + String.format( + "%sabi%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getAbi().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `docs` to the URL query string + if (getDocs() != null) { + joiner.add(getDocs().toUrlQueryString(prefix + "docs" + suffix)); + } + + // add `owner` to the URL query string + if (getOwner() != null) { + joiner.add( + String.format( + "%sowner%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getOwner()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `vendor` to the URL query string + if (getVendor() != null) { + joiner.add(getVendor().toUrlQueryString(prefix + "vendor" + suffix)); + } + + // add `isPublic` to the URL query string + if (getIsPublic() != null) { + joiner.add( + String.format( + "%sisPublic%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getIsPublic()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `canDeploy` to the URL query string + if (getCanDeploy() != null) { + joiner.add( + String.format( + "%scanDeploy%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCanDeploy()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `implementationContractId` to the URL query string + if (getImplementationContractId() != null) { + joiner.add( + String.format( + "%simplementationContractId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getImplementationContractId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `initializationPhase` to the URL query string + if (getInitializationPhase() != null) { + joiner.add( + String.format( + "%sinitializationPhase%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getInitializationPhase()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java new file mode 100644 index 0000000..93227e9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ContractUploadRequest.java @@ -0,0 +1,526 @@ +/* + * 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; + +/** ContractUploadRequest */ +@JsonPropertyOrder({ + ContractUploadRequest.JSON_PROPERTY_NAME, + ContractUploadRequest.JSON_PROPERTY_DESCRIPTION, + ContractUploadRequest.JSON_PROPERTY_LONG_DESCRIPTION, + ContractUploadRequest.JSON_PROPERTY_BYTECODE, + ContractUploadRequest.JSON_PROPERTY_SOURCECODE, + ContractUploadRequest.JSON_PROPERTY_TYPE, + ContractUploadRequest.JSON_PROPERTY_DOCS, + ContractUploadRequest.JSON_PROPERTY_ABI, + ContractUploadRequest.JSON_PROPERTY_ATTRIBUTES +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContractUploadRequest { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LONG_DESCRIPTION = "longDescription"; + private String longDescription; + + public static final String JSON_PROPERTY_BYTECODE = "bytecode"; + private String bytecode; + + public static final String JSON_PROPERTY_SOURCECODE = "sourcecode"; + private String sourcecode; + + /** The type of the contract template */ + public enum TypeEnum { + FUNGIBLE_TOKEN("FUNGIBLE_TOKEN"), + + NON_FUNGIBLE_TOKEN("NON_FUNGIBLE_TOKEN"), + + NON_TOKEN("NON_TOKEN"), + + TOKEN_EXTENSION("TOKEN_EXTENSION"), + + TOKEN_UTILITY("TOKEN_UTILITY"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_DOCS = "docs"; + private ContractDoc docs; + + public static final String JSON_PROPERTY_ABI = "abi"; + private List> abi = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ContractAttributes attributes; + + public ContractUploadRequest() {} + + public ContractUploadRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract template + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public ContractUploadRequest description(String description) { + this.description = description; + return this; + } + + /** + * A short description of the contract template + * + * @return description + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + public ContractUploadRequest longDescription(String longDescription) { + this.longDescription = longDescription; + return this; + } + + /** + * A full description of the contract template. May contain to break the lines + * + * @return longDescription + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LONG_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLongDescription() { + return longDescription; + } + + @JsonProperty(JSON_PROPERTY_LONG_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLongDescription(String longDescription) { + this.longDescription = longDescription; + } + + public ContractUploadRequest bytecode(String bytecode) { + this.bytecode = bytecode; + return this; + } + + /** + * The compiled artifact of this smart contract. Used for deployment of this contract template + * + * @return bytecode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BYTECODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBytecode() { + return bytecode; + } + + @JsonProperty(JSON_PROPERTY_BYTECODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBytecode(String bytecode) { + this.bytecode = bytecode; + } + + public ContractUploadRequest sourcecode(String sourcecode) { + this.sourcecode = sourcecode; + return this; + } + + /** + * The source code of the contract. Optional. + * + * @return sourcecode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCECODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourcecode() { + return sourcecode; + } + + @JsonProperty(JSON_PROPERTY_SOURCECODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSourcecode(String sourcecode) { + this.sourcecode = sourcecode; + } + + public ContractUploadRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of the contract template + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + public ContractUploadRequest docs(ContractDoc docs) { + this.docs = docs; + return this; + } + + /** + * A `natspec` compliant documentation json. Can be retrieved from the output json + * after compilation + * + * @return docs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ContractDoc getDocs() { + return docs; + } + + @JsonProperty(JSON_PROPERTY_DOCS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDocs(ContractDoc docs) { + this.docs = docs; + } + + public ContractUploadRequest abi(List> abi) { + this.abi = abi; + return this; + } + + public ContractUploadRequest addAbiItem(List abiItem) { + if (this.abi == null) { + this.abi = new ArrayList<>(); + } + this.abi.add(abiItem); + return this; + } + + /** + * Get abi + * + * @return abi + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getAbi() { + return abi; + } + + @JsonProperty(JSON_PROPERTY_ABI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbi(List> abi) { + this.abi = abi; + } + + public ContractUploadRequest attributes(ContractAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * The attributes related to this contract template. It will be displayed in the tokenization + * page + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ContractAttributes getAttributes() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ContractAttributes attributes) { + this.attributes = attributes; + } + + /** Return true if this ContractUploadRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContractUploadRequest contractUploadRequest = (ContractUploadRequest) o; + return Objects.equals(this.name, contractUploadRequest.name) + && Objects.equals(this.description, contractUploadRequest.description) + && Objects.equals(this.longDescription, contractUploadRequest.longDescription) + && Objects.equals(this.bytecode, contractUploadRequest.bytecode) + && Objects.equals(this.sourcecode, contractUploadRequest.sourcecode) + && Objects.equals(this.type, contractUploadRequest.type) + && Objects.equals(this.docs, contractUploadRequest.docs) + && Objects.equals(this.abi, contractUploadRequest.abi) + && Objects.equals(this.attributes, contractUploadRequest.attributes); + } + + @Override + public int hashCode() { + return Objects.hash( + name, + description, + longDescription, + bytecode, + sourcecode, + type, + docs, + abi, + attributes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContractUploadRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" longDescription: ").append(toIndentedString(longDescription)).append("\n"); + sb.append(" bytecode: ").append(toIndentedString(bytecode)).append("\n"); + sb.append(" sourcecode: ").append(toIndentedString(sourcecode)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" docs: ").append(toIndentedString(docs)).append("\n"); + sb.append(" abi: ").append(toIndentedString(abi)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `longDescription` to the URL query string + if (getLongDescription() != null) { + joiner.add( + String.format( + "%slongDescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getLongDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `bytecode` to the URL query string + if (getBytecode() != null) { + joiner.add( + String.format( + "%sbytecode%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getBytecode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `sourcecode` to the URL query string + if (getSourcecode() != null) { + joiner.add( + String.format( + "%ssourcecode%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getSourcecode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `docs` to the URL query string + if (getDocs() != null) { + joiner.add(getDocs().toUrlQueryString(prefix + "docs" + suffix)); + } + + // add `abi` to the URL query string + if (getAbi() != null) { + for (int i = 0; i < getAbi().size(); i++) { + if (getAbi().get(i) != null) { + joiner.add( + String.format( + "%sabi%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getAbi().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateAPIUser.java b/src/main/java/com/fireblocks/sdk/model/CreateAPIUser.java index 8016ec7..c4a6bad 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateAPIUser.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateAPIUser.java @@ -55,7 +55,7 @@ public CreateAPIUser role(String role) { } /** - * User role + * Users role * * @return role */ @@ -78,7 +78,7 @@ public CreateAPIUser name(String name) { } /** - * users name + * Users name * * @return name */ @@ -101,19 +101,20 @@ public CreateAPIUser csrPem(String csrPem) { } /** - * only for user with signing capabilities + * CSR file that is used to verify API requests. read more + * https://developers.fireblocks.com/docs/quickstart * * @return csrPem */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_CSR_PEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getCsrPem() { return csrPem; } @JsonProperty(JSON_PROPERTY_CSR_PEM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setCsrPem(String csrPem) { this.csrPem = csrPem; } @@ -124,7 +125,8 @@ public CreateAPIUser coSignerSetupType(String coSignerSetupType) { } /** - * cosigner setup type + * Different environments allow for different setup options, field is required for + * management/signer role * * @return coSignerSetupType */ @@ -147,7 +149,7 @@ public CreateAPIUser coSignerSetupIsFirstUser(Boolean coSignerSetupIsFirstUser) } /** - * is first? + * pass as true if this is the first user on the coSigner machine * * @return coSignerSetupIsFirstUser */ diff --git a/src/main/java/com/fireblocks/sdk/model/CreateConnectionRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateConnectionRequest.java index 184178c..cb78011 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateConnectionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateConnectionRequest.java @@ -13,218 +13,281 @@ 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.math.BigDecimal; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; +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; -/** CreateConnectionRequest */ -@JsonPropertyOrder({ - CreateConnectionRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, - CreateConnectionRequest.JSON_PROPERTY_FEE_LEVEL, - CreateConnectionRequest.JSON_PROPERTY_URI, - CreateConnectionRequest.JSON_PROPERTY_CHAIN_IDS -}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateConnectionRequest { - public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; - private BigDecimal vaultAccountId; - - /** The default fee level. Valid values are `MEDIUM` and `HIGH`. */ - public enum FeeLevelEnum { - MEDIUM("MEDIUM"), - - HIGH("HIGH"); - - private String value; - - FeeLevelEnum(String value) { - this.value = value; +@JsonDeserialize(using = CreateConnectionRequest.CreateConnectionRequestDeserializer.class) +@JsonSerialize(using = CreateConnectionRequest.CreateConnectionRequestSerializer.class) +public class CreateConnectionRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateConnectionRequest.class.getName()); + + public static class CreateConnectionRequestSerializer + extends StdSerializer { + public CreateConnectionRequestSerializer(Class t) { + super(t); } - @JsonValue - public String getValue() { - return value; + public CreateConnectionRequestSerializer() { + this(null); } @Override - public String toString() { - return String.valueOf(value); + public void serialize( + CreateConnectionRequest value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); } + } - @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 class CreateConnectionRequestDeserializer + extends StdDeserializer { + public CreateConnectionRequestDeserializer() { + this(CreateConnectionRequest.class); } - } - public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; - private FeeLevelEnum feeLevel; + public CreateConnectionRequestDeserializer(Class vc) { + super(vc); + } - public static final String JSON_PROPERTY_URI = "uri"; - private String uri; + @Override + public CreateConnectionRequest 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 CreateNcwConnectionRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateNcwConnectionRequest.class.equals(Integer.class) + || CreateNcwConnectionRequest.class.equals(Long.class) + || CreateNcwConnectionRequest.class.equals(Float.class) + || CreateNcwConnectionRequest.class.equals(Double.class) + || CreateNcwConnectionRequest.class.equals(Boolean.class) + || CreateNcwConnectionRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CreateNcwConnectionRequest.class.equals(Integer.class) + || CreateNcwConnectionRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CreateNcwConnectionRequest.class.equals(Float.class) + || CreateNcwConnectionRequest.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CreateNcwConnectionRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CreateNcwConnectionRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CreateNcwConnectionRequest.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 'CreateNcwConnectionRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CreateNcwConnectionRequest'", + e); + } - public static final String JSON_PROPERTY_CHAIN_IDS = "chainIds"; - private List chainIds; + // deserialize CreateVaultAccountConnectionRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CreateVaultAccountConnectionRequest.class.equals(Integer.class) + || CreateVaultAccountConnectionRequest.class.equals(Long.class) + || CreateVaultAccountConnectionRequest.class.equals(Float.class) + || CreateVaultAccountConnectionRequest.class.equals(Double.class) + || CreateVaultAccountConnectionRequest.class.equals(Boolean.class) + || CreateVaultAccountConnectionRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CreateVaultAccountConnectionRequest.class.equals(Integer.class) + || CreateVaultAccountConnectionRequest.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CreateVaultAccountConnectionRequest.class.equals(Float.class) + || CreateVaultAccountConnectionRequest.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CreateVaultAccountConnectionRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CreateVaultAccountConnectionRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(CreateVaultAccountConnectionRequest.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 'CreateVaultAccountConnectionRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'CreateVaultAccountConnectionRequest'", + e); + } - public CreateConnectionRequest() {} + if (match == 1) { + CreateConnectionRequest ret = new CreateConnectionRequest(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for CreateConnectionRequest: %d classes match" + + " result, expected 1", + match)); + } - public CreateConnectionRequest vaultAccountId(BigDecimal vaultAccountId) { - this.vaultAccountId = vaultAccountId; - return this; + /** Handle deserialization of the 'null' value. */ + @Override + public CreateConnectionRequest getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateConnectionRequest cannot be null"); + } } - /** - * The ID of the vault to connect to the dApp. - * - * @return vaultAccountId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getVaultAccountId() { - return vaultAccountId; - } + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); - @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVaultAccountId(BigDecimal vaultAccountId) { - this.vaultAccountId = vaultAccountId; + public CreateConnectionRequest() { + super("oneOf", Boolean.FALSE); } - public CreateConnectionRequest feeLevel(FeeLevelEnum feeLevel) { - this.feeLevel = feeLevel; - return this; + public CreateConnectionRequest(CreateNcwConnectionRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - /** - * The default fee level. Valid values are `MEDIUM` and `HIGH`. - * - * @return feeLevel - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FEE_LEVEL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FeeLevelEnum getFeeLevel() { - return feeLevel; + public CreateConnectionRequest(CreateVaultAccountConnectionRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); } - @JsonProperty(JSON_PROPERTY_FEE_LEVEL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFeeLevel(FeeLevelEnum feeLevel) { - this.feeLevel = feeLevel; + static { + schemas.put("CreateNcwConnectionRequest", CreateNcwConnectionRequest.class); + schemas.put( + "CreateVaultAccountConnectionRequest", CreateVaultAccountConnectionRequest.class); + JSON.registerDescendants( + CreateConnectionRequest.class, Collections.unmodifiableMap(schemas)); } - public CreateConnectionRequest uri(String uri) { - this.uri = uri; - return this; + @Override + public Map> getSchemas() { + return CreateConnectionRequest.schemas; } /** - * The WalletConnect uri provided by the dapp. + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: CreateNcwConnectionRequest, + * CreateVaultAccountConnectionRequest * - * @return uri + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_URI) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUri() { - return uri; - } - - @JsonProperty(JSON_PROPERTY_URI) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUri(String uri) { - this.uri = uri; - } - - public CreateConnectionRequest chainIds(List chainIds) { - this.chainIds = chainIds; - return this; - } + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + CreateNcwConnectionRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } - public CreateConnectionRequest addChainIdsItem(String chainIdsItem) { - if (this.chainIds == null) { - this.chainIds = new ArrayList<>(); + if (JSON.isInstanceOf( + CreateVaultAccountConnectionRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; } - this.chainIds.add(chainIdsItem); - return this; + + throw new RuntimeException( + "Invalid instance type. Must be CreateNcwConnectionRequest," + + " CreateVaultAccountConnectionRequest"); } /** - * The IDs of the blockchain networks used in the Web3 connection (Currently required in V1 - * connections only). + * Get the actual instance, which can be the following: CreateNcwConnectionRequest, + * CreateVaultAccountConnectionRequest * - * @return chainIds + * @return The actual instance (CreateNcwConnectionRequest, CreateVaultAccountConnectionRequest) */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CHAIN_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getChainIds() { - return chainIds; - } - - @JsonProperty(JSON_PROPERTY_CHAIN_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChainIds(List chainIds) { - this.chainIds = chainIds; - } - - /** Return true if this CreateConnectionRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest) o; - return Objects.equals(this.vaultAccountId, createConnectionRequest.vaultAccountId) - && Objects.equals(this.feeLevel, createConnectionRequest.feeLevel) - && Objects.equals(this.uri, createConnectionRequest.uri) - && Objects.equals(this.chainIds, createConnectionRequest.chainIds); - } - @Override - public int hashCode() { - return Objects.hash(vaultAccountId, feeLevel, uri, chainIds); + public Object getActualInstance() { + return super.getActualInstance(); } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateConnectionRequest {\n"); - sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); - sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); - sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); - sb.append(" chainIds: ").append(toIndentedString(chainIds)).append("\n"); - sb.append("}"); - return sb.toString(); + /** + * Get the actual instance of `CreateNcwConnectionRequest`. If the actual instance is not + * `CreateNcwConnectionRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `CreateNcwConnectionRequest` + * @throws ClassCastException if the instance is not `CreateNcwConnectionRequest` + */ + public CreateNcwConnectionRequest getCreateNcwConnectionRequest() throws ClassCastException { + return (CreateNcwConnectionRequest) super.getActualInstance(); } /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). + * Get the actual instance of `CreateVaultAccountConnectionRequest`. If the actual instance is + * not `CreateVaultAccountConnectionRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `CreateVaultAccountConnectionRequest` + * @throws ClassCastException if the instance is not `CreateVaultAccountConnectionRequest` */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + public CreateVaultAccountConnectionRequest getCreateVaultAccountConnectionRequest() + throws ClassCastException { + return (CreateVaultAccountConnectionRequest) super.getActualInstance(); } /** @@ -259,60 +322,22 @@ public String toUrlQueryString(String prefix) { 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 `feeLevel` to the URL query string - if (getFeeLevel() != null) { - joiner.add( - String.format( - "%sfeeLevel%s=%s", - prefix, - suffix, - URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - - // add `uri` to the URL query string - if (getUri() != null) { - joiner.add( - String.format( - "%suri%s=%s", - prefix, - suffix, - URLEncoder.encode(String.valueOf(getUri()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); + if (getActualInstance() instanceof CreateVaultAccountConnectionRequest) { + if (getActualInstance() != null) { + joiner.add( + ((CreateVaultAccountConnectionRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); } - - // add `chainIds` to the URL query string - if (getChainIds() != null) { - for (int i = 0; i < getChainIds().size(); i++) { + if (getActualInstance() instanceof CreateNcwConnectionRequest) { + if (getActualInstance() != null) { joiner.add( - String.format( - "%schainIds%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getChainIds().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); + ((CreateNcwConnectionRequest) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); } + return joiner.toString(); } - - return joiner.toString(); + return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/CreateConsoleUser.java b/src/main/java/com/fireblocks/sdk/model/CreateConsoleUser.java index 8887617..cff312a 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateConsoleUser.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateConsoleUser.java @@ -50,7 +50,7 @@ public CreateConsoleUser firstName(String firstName) { } /** - * Get firstName + * users firstName * * @return firstName */ @@ -73,7 +73,7 @@ public CreateConsoleUser lastName(String lastName) { } /** - * Get lastName + * users lastName * * @return lastName */ @@ -96,7 +96,7 @@ public CreateConsoleUser role(String role) { } /** - * Get role + * users role * * @return role */ @@ -119,7 +119,7 @@ public CreateConsoleUser email(String email) { } /** - * Get email + * valid email address * * @return email */ diff --git a/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java new file mode 100644 index 0000000..9e2afdc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDto.java @@ -0,0 +1,301 @@ +/* + * 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; + +/** CreateTokenRequestDto */ +@JsonPropertyOrder({ + CreateTokenRequestDto.JSON_PROPERTY_BLOCKCHAIN_ID, + CreateTokenRequestDto.JSON_PROPERTY_ASSET_ID, + CreateTokenRequestDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CreateTokenRequestDto.JSON_PROPERTY_CREATE_PARAMS, + CreateTokenRequestDto.JSON_PROPERTY_DISPLAY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateTokenRequestDto { + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + private String blockchainId; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + private String assetId; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_CREATE_PARAMS = "createParams"; + private CreateTokenRequestDtoCreateParams createParams; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public CreateTokenRequestDto() {} + + public CreateTokenRequestDto blockchainId(String blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * The id of the blockchain the request was initiated on + * + * @return blockchainId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBlockchainId(String blockchainId) { + this.blockchainId = blockchainId; + } + + public CreateTokenRequestDto assetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * The base asset identifier of the blockchain you want to deploy to + * + * @return assetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetId(String assetId) { + this.assetId = assetId; + } + + public CreateTokenRequestDto 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 CreateTokenRequestDto createParams(CreateTokenRequestDtoCreateParams createParams) { + this.createParams = createParams; + return this; + } + + /** + * Get createParams + * + * @return createParams + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateTokenRequestDtoCreateParams getCreateParams() { + return createParams; + } + + @JsonProperty(JSON_PROPERTY_CREATE_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreateParams(CreateTokenRequestDtoCreateParams createParams) { + this.createParams = createParams; + } + + public CreateTokenRequestDto 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; + } + + /** Return true if this CreateTokenRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTokenRequestDto createTokenRequestDto = (CreateTokenRequestDto) o; + return Objects.equals(this.blockchainId, createTokenRequestDto.blockchainId) + && Objects.equals(this.assetId, createTokenRequestDto.assetId) + && Objects.equals(this.vaultAccountId, createTokenRequestDto.vaultAccountId) + && Objects.equals(this.createParams, createTokenRequestDto.createParams) + && Objects.equals(this.displayName, createTokenRequestDto.displayName); + } + + @Override + public int hashCode() { + return Objects.hash(blockchainId, assetId, vaultAccountId, createParams, displayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTokenRequestDto {\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" createParams: ").append(toIndentedString(createParams)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append("}"); + 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 `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAssetId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // 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 `displayName` to the URL query string + if (getDisplayName() != null) { + joiner.add( + String.format( + "%sdisplayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayName()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java similarity index 55% rename from src/main/java/com/fireblocks/sdk/model/CreateRequest.java rename to src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java index 642cd25..edfe47c 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParams.java @@ -37,217 +37,234 @@ import java.util.logging.Logger; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonDeserialize(using = CreateRequest.CreateRequestDeserializer.class) -@JsonSerialize(using = CreateRequest.CreateRequestSerializer.class) -public class CreateRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(CreateRequest.class.getName()); +@JsonDeserialize( + using = + CreateTokenRequestDtoCreateParams.CreateTokenRequestDtoCreateParamsDeserializer + .class) +@JsonSerialize( + using = CreateTokenRequestDtoCreateParams.CreateTokenRequestDtoCreateParamsSerializer.class) +public class CreateTokenRequestDtoCreateParams extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(CreateTokenRequestDtoCreateParams.class.getName()); - public static class CreateRequestSerializer extends StdSerializer { - public CreateRequestSerializer(Class t) { + public static class CreateTokenRequestDtoCreateParamsSerializer + extends StdSerializer { + public CreateTokenRequestDtoCreateParamsSerializer( + Class t) { super(t); } - public CreateRequestSerializer() { + public CreateTokenRequestDtoCreateParamsSerializer() { this(null); } @Override - public void serialize(CreateRequest value, JsonGenerator jgen, SerializerProvider provider) + public void serialize( + CreateTokenRequestDtoCreateParams value, + JsonGenerator jgen, + SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class CreateRequestDeserializer extends StdDeserializer { - public CreateRequestDeserializer() { - this(CreateRequest.class); + public static class CreateTokenRequestDtoCreateParamsDeserializer + extends StdDeserializer { + public CreateTokenRequestDtoCreateParamsDeserializer() { + this(CreateTokenRequestDtoCreateParams.class); } - public CreateRequestDeserializer(Class vc) { + public CreateTokenRequestDtoCreateParamsDeserializer(Class vc) { super(vc); } @Override - public CreateRequest deserialize(JsonParser jp, DeserializationContext ctxt) + public CreateTokenRequestDtoCreateParams 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 CreateConnectionRequest + // deserialize EVMTokenCreateParamsDto try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CreateConnectionRequest.class.equals(Integer.class) - || CreateConnectionRequest.class.equals(Long.class) - || CreateConnectionRequest.class.equals(Float.class) - || CreateConnectionRequest.class.equals(Double.class) - || CreateConnectionRequest.class.equals(Boolean.class) - || CreateConnectionRequest.class.equals(String.class)) { + 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 |= - ((CreateConnectionRequest.class.equals(Integer.class) - || CreateConnectionRequest.class.equals(Long.class)) + ((EVMTokenCreateParamsDto.class.equals(Integer.class) + || EVMTokenCreateParamsDto.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CreateConnectionRequest.class.equals(Float.class) - || CreateConnectionRequest.class.equals( + ((EVMTokenCreateParamsDto.class.equals(Float.class) + || EVMTokenCreateParamsDto.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CreateConnectionRequest.class.equals(Boolean.class) + (EVMTokenCreateParamsDto.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CreateConnectionRequest.class.equals(String.class) + (EVMTokenCreateParamsDto.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(CreateConnectionRequest.class); + 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 'CreateConnectionRequest'"); + 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 'CreateConnectionRequest'", + "Input data does not match schema 'EVMTokenCreateParamsDto'", e); } - // deserialize CreateNcwConnectionRequest + // deserialize StellarRippleCreateParamsDto try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (CreateNcwConnectionRequest.class.equals(Integer.class) - || CreateNcwConnectionRequest.class.equals(Long.class) - || CreateNcwConnectionRequest.class.equals(Float.class) - || CreateNcwConnectionRequest.class.equals(Double.class) - || CreateNcwConnectionRequest.class.equals(Boolean.class) - || CreateNcwConnectionRequest.class.equals(String.class)) { + if (StellarRippleCreateParamsDto.class.equals(Integer.class) + || StellarRippleCreateParamsDto.class.equals(Long.class) + || StellarRippleCreateParamsDto.class.equals(Float.class) + || StellarRippleCreateParamsDto.class.equals(Double.class) + || StellarRippleCreateParamsDto.class.equals(Boolean.class) + || StellarRippleCreateParamsDto.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((CreateNcwConnectionRequest.class.equals(Integer.class) - || CreateNcwConnectionRequest.class.equals( + ((StellarRippleCreateParamsDto.class.equals(Integer.class) + || StellarRippleCreateParamsDto.class.equals( Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((CreateNcwConnectionRequest.class.equals(Float.class) - || CreateNcwConnectionRequest.class.equals( + ((StellarRippleCreateParamsDto.class.equals(Float.class) + || StellarRippleCreateParamsDto.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (CreateNcwConnectionRequest.class.equals(Boolean.class) + (StellarRippleCreateParamsDto.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (CreateNcwConnectionRequest.class.equals(String.class) + (StellarRippleCreateParamsDto.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = tree.traverse(jp.getCodec()) - .readValueAs(CreateNcwConnectionRequest.class); + .readValueAs(StellarRippleCreateParamsDto.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 'CreateNcwConnectionRequest'"); + log.log( + Level.FINER, + "Input data matches schema 'StellarRippleCreateParamsDto'"); } } catch (Exception e) { // deserialization failed, continue log.log( Level.FINER, - "Input data does not match schema 'CreateNcwConnectionRequest'", + "Input data does not match schema 'StellarRippleCreateParamsDto'", e); } if (match == 1) { - CreateRequest ret = new CreateRequest(); + CreateTokenRequestDtoCreateParams ret = new CreateTokenRequestDtoCreateParams(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for CreateRequest: %d classes match result," - + " expected 1", + "Failed deserialization for CreateTokenRequestDtoCreateParams: %d" + + " classes match result, expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public CreateRequest getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "CreateRequest cannot be null"); + public CreateTokenRequestDtoCreateParams getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateTokenRequestDtoCreateParams cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public CreateRequest() { + public CreateTokenRequestDtoCreateParams() { super("oneOf", Boolean.FALSE); } - public CreateRequest(CreateConnectionRequest o) { + public CreateTokenRequestDtoCreateParams(EVMTokenCreateParamsDto o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public CreateRequest(CreateNcwConnectionRequest o) { + public CreateTokenRequestDtoCreateParams(StellarRippleCreateParamsDto o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("CreateConnectionRequest", CreateConnectionRequest.class); - schemas.put("CreateNcwConnectionRequest", CreateNcwConnectionRequest.class); - JSON.registerDescendants(CreateRequest.class, Collections.unmodifiableMap(schemas)); + schemas.put("EVMTokenCreateParamsDto", EVMTokenCreateParamsDto.class); + schemas.put("StellarRippleCreateParamsDto", StellarRippleCreateParamsDto.class); + JSON.registerDescendants( + CreateTokenRequestDtoCreateParams.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return CreateRequest.schemas; + return CreateTokenRequestDtoCreateParams.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: CreateConnectionRequest, CreateNcwConnectionRequest + * against the oneOf child schemas: EVMTokenCreateParamsDto, StellarRippleCreateParamsDto * *

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(CreateConnectionRequest.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(EVMTokenCreateParamsDto.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } if (JSON.isInstanceOf( - CreateNcwConnectionRequest.class, instance, new HashSet>())) { + StellarRippleCreateParamsDto.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be CreateConnectionRequest," - + " CreateNcwConnectionRequest"); + "Invalid instance type. Must be EVMTokenCreateParamsDto," + + " StellarRippleCreateParamsDto"); } /** - * Get the actual instance, which can be the following: CreateConnectionRequest, - * CreateNcwConnectionRequest + * Get the actual instance, which can be the following: EVMTokenCreateParamsDto, + * StellarRippleCreateParamsDto * - * @return The actual instance (CreateConnectionRequest, CreateNcwConnectionRequest) + * @return The actual instance (EVMTokenCreateParamsDto, StellarRippleCreateParamsDto) */ @Override public Object getActualInstance() { @@ -255,25 +272,26 @@ public Object getActualInstance() { } /** - * Get the actual instance of `CreateConnectionRequest`. If the actual instance is not - * `CreateConnectionRequest`, the ClassCastException will be thrown. + * Get the actual instance of `EVMTokenCreateParamsDto`. If the actual instance is not + * `EVMTokenCreateParamsDto`, the ClassCastException will be thrown. * - * @return The actual instance of `CreateConnectionRequest` - * @throws ClassCastException if the instance is not `CreateConnectionRequest` + * @return The actual instance of `EVMTokenCreateParamsDto` + * @throws ClassCastException if the instance is not `EVMTokenCreateParamsDto` */ - public CreateConnectionRequest getCreateConnectionRequest() throws ClassCastException { - return (CreateConnectionRequest) super.getActualInstance(); + public EVMTokenCreateParamsDto getEVMTokenCreateParamsDto() throws ClassCastException { + return (EVMTokenCreateParamsDto) super.getActualInstance(); } /** - * Get the actual instance of `CreateNcwConnectionRequest`. If the actual instance is not - * `CreateNcwConnectionRequest`, the ClassCastException will be thrown. + * Get the actual instance of `StellarRippleCreateParamsDto`. If the actual instance is not + * `StellarRippleCreateParamsDto`, the ClassCastException will be thrown. * - * @return The actual instance of `CreateNcwConnectionRequest` - * @throws ClassCastException if the instance is not `CreateNcwConnectionRequest` + * @return The actual instance of `StellarRippleCreateParamsDto` + * @throws ClassCastException if the instance is not `StellarRippleCreateParamsDto` */ - public CreateNcwConnectionRequest getCreateNcwConnectionRequest() throws ClassCastException { - return (CreateNcwConnectionRequest) super.getActualInstance(); + public StellarRippleCreateParamsDto getStellarRippleCreateParamsDto() + throws ClassCastException { + return (StellarRippleCreateParamsDto) super.getActualInstance(); } /** @@ -308,18 +326,18 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof CreateConnectionRequest) { + if (getActualInstance() instanceof EVMTokenCreateParamsDto) { if (getActualInstance() != null) { joiner.add( - ((CreateConnectionRequest) getActualInstance()) + ((EVMTokenCreateParamsDto) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); } - if (getActualInstance() instanceof CreateNcwConnectionRequest) { + if (getActualInstance() instanceof StellarRippleCreateParamsDto) { if (getActualInstance() != null) { joiner.add( - ((CreateNcwConnectionRequest) getActualInstance()) + ((StellarRippleCreateParamsDto) getActualInstance()) .toUrlQueryString(prefix + "one_of_1" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequest.java new file mode 100644 index 0000000..2b87a8a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequest.java @@ -0,0 +1,320 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.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.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateVaultAccountConnectionRequest */ +@JsonPropertyOrder({ + CreateVaultAccountConnectionRequest.JSON_PROPERTY_VAULT_ACCOUNT_ID, + CreateVaultAccountConnectionRequest.JSON_PROPERTY_FEE_LEVEL, + CreateVaultAccountConnectionRequest.JSON_PROPERTY_URI, + CreateVaultAccountConnectionRequest.JSON_PROPERTY_CHAIN_IDS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateVaultAccountConnectionRequest { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private BigDecimal vaultAccountId; + + /** The default fee level. Valid values are `MEDIUM` and `HIGH`. */ + public enum FeeLevelEnum { + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + + public static final String JSON_PROPERTY_URI = "uri"; + private String uri; + + public static final String JSON_PROPERTY_CHAIN_IDS = "chainIds"; + private List chainIds; + + public CreateVaultAccountConnectionRequest() {} + + public CreateVaultAccountConnectionRequest vaultAccountId(BigDecimal vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The ID of the vault to connect to the dApp. + * + * @return vaultAccountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVaultAccountId(BigDecimal vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public CreateVaultAccountConnectionRequest feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * The default fee level. Valid values are `MEDIUM` and `HIGH`. + * + * @return feeLevel + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + + public CreateVaultAccountConnectionRequest uri(String uri) { + this.uri = uri; + return this; + } + + /** + * The WalletConnect uri provided by the dapp. + * + * @return uri + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_URI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUri() { + return uri; + } + + @JsonProperty(JSON_PROPERTY_URI) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setUri(String uri) { + this.uri = uri; + } + + public CreateVaultAccountConnectionRequest chainIds(List chainIds) { + this.chainIds = chainIds; + return this; + } + + public CreateVaultAccountConnectionRequest addChainIdsItem(String chainIdsItem) { + if (this.chainIds == null) { + this.chainIds = new ArrayList<>(); + } + this.chainIds.add(chainIdsItem); + return this; + } + + /** + * The IDs of the blockchain networks used in the Web3 connection (Currently required in V1 + * connections only). + * + * @return chainIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHAIN_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getChainIds() { + return chainIds; + } + + @JsonProperty(JSON_PROPERTY_CHAIN_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setChainIds(List chainIds) { + this.chainIds = chainIds; + } + + /** Return true if this CreateVaultAccountConnectionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateVaultAccountConnectionRequest createVaultAccountConnectionRequest = + (CreateVaultAccountConnectionRequest) o; + return Objects.equals( + this.vaultAccountId, createVaultAccountConnectionRequest.vaultAccountId) + && Objects.equals(this.feeLevel, createVaultAccountConnectionRequest.feeLevel) + && Objects.equals(this.uri, createVaultAccountConnectionRequest.uri) + && Objects.equals(this.chainIds, createVaultAccountConnectionRequest.chainIds); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, feeLevel, uri, chainIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateVaultAccountConnectionRequest {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" chainIds: ").append(toIndentedString(chainIds)).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 `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `uri` to the URL query string + if (getUri() != null) { + joiner.add( + String.format( + "%suri%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getUri()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `chainIds` to the URL query string + if (getChainIds() != null) { + for (int i = 0; i < getChainIds().size(); i++) { + joiner.add( + String.format( + "%schainIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getChainIds().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java b/src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.java new file mode 100644 index 0000000..7744cd2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponse.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; + +/** DeleteNetworkConnectionResponse */ +@JsonPropertyOrder({DeleteNetworkConnectionResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeleteNetworkConnectionResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public DeleteNetworkConnectionResponse() {} + + public DeleteNetworkConnectionResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Get success + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this DeleteNetworkConnectionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteNetworkConnectionResponse deleteNetworkConnectionResponse = + (DeleteNetworkConnectionResponse) o; + return Objects.equals(this.success, deleteNetworkConnectionResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteNetworkConnectionResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicy200Response.java b/src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java similarity index 86% rename from src/main/java/com/fireblocks/sdk/model/SetRoutingPolicy200Response.java rename to src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java index ed88d27..67ad689 100644 --- a/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicy200Response.java +++ b/src/main/java/com/fireblocks/sdk/model/DeleteNetworkIdResponse.java @@ -21,16 +21,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** SetRoutingPolicy200Response */ -@JsonPropertyOrder({SetRoutingPolicy200Response.JSON_PROPERTY_SUCCESS}) +/** DeleteNetworkIdResponse */ +@JsonPropertyOrder({DeleteNetworkIdResponse.JSON_PROPERTY_SUCCESS}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SetRoutingPolicy200Response { +public class DeleteNetworkIdResponse { public static final String JSON_PROPERTY_SUCCESS = "success"; private Boolean success; - public SetRoutingPolicy200Response() {} + public DeleteNetworkIdResponse() {} - public SetRoutingPolicy200Response success(Boolean success) { + public DeleteNetworkIdResponse success(Boolean success) { this.success = success; return this; } @@ -53,7 +53,7 @@ public void setSuccess(Boolean success) { this.success = success; } - /** Return true if this setRoutingPolicy_200_response object is equal to o. */ + /** Return true if this DeleteNetworkIdResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,8 +62,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SetRoutingPolicy200Response setRoutingPolicy200Response = (SetRoutingPolicy200Response) o; - return Objects.equals(this.success, setRoutingPolicy200Response.success); + DeleteNetworkIdResponse deleteNetworkIdResponse = (DeleteNetworkIdResponse) o; + return Objects.equals(this.success, deleteNetworkIdResponse.success); } @Override @@ -74,7 +74,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SetRoutingPolicy200Response {\n"); + sb.append("class DeleteNetworkIdResponse {\n"); sb.append(" success: ").append(toIndentedString(success)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java b/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java new file mode 100644 index 0000000..7b356c4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployedContractResponseDto.java @@ -0,0 +1,312 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** DeployedContractResponseDto */ +@JsonPropertyOrder({ + DeployedContractResponseDto.JSON_PROPERTY_ID, + DeployedContractResponseDto.JSON_PROPERTY_CONTRACT_ADDRESS, + DeployedContractResponseDto.JSON_PROPERTY_CONTRACT_TEMPLATE_ID, + DeployedContractResponseDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + DeployedContractResponseDto.JSON_PROPERTY_BLOCKCHAIN_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployedContractResponseDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_CONTRACT_TEMPLATE_ID = "contractTemplateId"; + private String contractTemplateId; + + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + private String blockchainId; + + public DeployedContractResponseDto() {} + + public DeployedContractResponseDto id(String id) { + this.id = id; + return this; + } + + /** + * The deployed contract data identifier + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public DeployedContractResponseDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The contract's onchain address + * + * @return contractAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public DeployedContractResponseDto contractTemplateId(String contractTemplateId) { + this.contractTemplateId = contractTemplateId; + return this; + } + + /** + * The contract template identifier + * + * @return contractTemplateId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractTemplateId() { + return contractTemplateId; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractTemplateId(String contractTemplateId) { + this.contractTemplateId = contractTemplateId; + } + + public DeployedContractResponseDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account id this contract was deploy from + * + * @return vaultAccountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVaultAccountId() { + return vaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + } + + public DeployedContractResponseDto blockchainId(String blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * Get blockchainId + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(String blockchainId) { + this.blockchainId = blockchainId; + } + + /** Return true if this DeployedContractResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployedContractResponseDto deployedContractResponseDto = (DeployedContractResponseDto) o; + return Objects.equals(this.id, deployedContractResponseDto.id) + && Objects.equals(this.contractAddress, deployedContractResponseDto.contractAddress) + && Objects.equals( + this.contractTemplateId, deployedContractResponseDto.contractTemplateId) + && Objects.equals(this.vaultAccountId, deployedContractResponseDto.vaultAccountId) + && Objects.equals(this.blockchainId, deployedContractResponseDto.blockchainId); + } + + @Override + public int hashCode() { + return Objects.hash(id, contractAddress, contractTemplateId, vaultAccountId, blockchainId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployedContractResponseDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" contractTemplateId: ") + .append(toIndentedString(contractTemplateId)) + .append("\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractAddress` to the URL query string + if (getContractAddress() != null) { + joiner.add( + String.format( + "%scontractAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractTemplateId` to the URL query string + if (getContractTemplateId() != null) { + joiner.add( + String.format( + "%scontractTemplateId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractTemplateId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `vaultAccountId` to the URL query string + if (getVaultAccountId() != null) { + joiner.add( + String.format( + "%svaultAccountId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getVaultAccountId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponse.java new file mode 100644 index 0000000..bf66e7e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponse.java @@ -0,0 +1,205 @@ +/* + * 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; + +/** DeployedContractsPaginatedResponse */ +@JsonPropertyOrder({ + DeployedContractsPaginatedResponse.JSON_PROPERTY_DATA, + DeployedContractsPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeployedContractsPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public DeployedContractsPaginatedResponse() {} + + public DeployedContractsPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public DeployedContractsPaginatedResponse addDataItem( + LeanDeployedContractResponseDto dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public DeployedContractsPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this DeployedContractsPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeployedContractsPaginatedResponse deployedContractsPaginatedResponse = + (DeployedContractsPaginatedResponse) o; + return Objects.equals(this.data, deployedContractsPaginatedResponse.data) + && Objects.equals(this.next, deployedContractsPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeployedContractsPaginatedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DropTransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/DropTransactionResponse.java index c63318e..7306c2c 100644 --- a/src/main/java/com/fireblocks/sdk/model/DropTransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/DropTransactionResponse.java @@ -18,78 +18,95 @@ 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; /** DropTransactionResponse */ @JsonPropertyOrder({ - DropTransactionResponse.JSON_PROPERTY_SUCCESS, - DropTransactionResponse.JSON_PROPERTY_TRANSACTIONS + DropTransactionResponse.JSON_PROPERTY_TX_STATUS, + DropTransactionResponse.JSON_PROPERTY_TX_ID, + DropTransactionResponse.JSON_PROPERTY_REPLACED_TX_HASH }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DropTransactionResponse { - public static final String JSON_PROPERTY_SUCCESS = "success"; - private Boolean success; + public static final String JSON_PROPERTY_TX_STATUS = "txStatus"; + private String txStatus; - public static final String JSON_PROPERTY_TRANSACTIONS = "transactions"; - private List transactions; + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public static final String JSON_PROPERTY_REPLACED_TX_HASH = "replacedTxHash"; + private String replacedTxHash; public DropTransactionResponse() {} - public DropTransactionResponse success(Boolean success) { - this.success = success; + public DropTransactionResponse txStatus(String txStatus) { + this.txStatus = txStatus; return this; } /** - * Get success + * Get txStatus * - * @return success + * @return txStatus */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonProperty(JSON_PROPERTY_TX_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSuccess() { - return success; + public String getTxStatus() { + return txStatus; } - @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonProperty(JSON_PROPERTY_TX_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuccess(Boolean success) { - this.success = success; + public void setTxStatus(String txStatus) { + this.txStatus = txStatus; } - public DropTransactionResponse transactions(List transactions) { - this.transactions = transactions; + public DropTransactionResponse txId(String txId) { + this.txId = txId; return this; } - public DropTransactionResponse addTransactionsItem(String transactionsItem) { - if (this.transactions == null) { - this.transactions = new ArrayList<>(); - } - this.transactions.add(transactionsItem); + /** + * Get txId + * + * @return txId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxId(String txId) { + this.txId = txId; + } + + public DropTransactionResponse replacedTxHash(String replacedTxHash) { + this.replacedTxHash = replacedTxHash; return this; } /** - * Get transactions + * Get replacedTxHash * - * @return transactions + * @return replacedTxHash */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRANSACTIONS) + @JsonProperty(JSON_PROPERTY_REPLACED_TX_HASH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTransactions() { - return transactions; + public String getReplacedTxHash() { + return replacedTxHash; } - @JsonProperty(JSON_PROPERTY_TRANSACTIONS) + @JsonProperty(JSON_PROPERTY_REPLACED_TX_HASH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTransactions(List transactions) { - this.transactions = transactions; + public void setReplacedTxHash(String replacedTxHash) { + this.replacedTxHash = replacedTxHash; } /** Return true if this DropTransactionResponse object is equal to o. */ @@ -102,21 +119,23 @@ public boolean equals(Object o) { return false; } DropTransactionResponse dropTransactionResponse = (DropTransactionResponse) o; - return Objects.equals(this.success, dropTransactionResponse.success) - && Objects.equals(this.transactions, dropTransactionResponse.transactions); + return Objects.equals(this.txStatus, dropTransactionResponse.txStatus) + && Objects.equals(this.txId, dropTransactionResponse.txId) + && Objects.equals(this.replacedTxHash, dropTransactionResponse.replacedTxHash); } @Override public int hashCode() { - return Objects.hash(success, transactions); + return Objects.hash(txStatus, txId, replacedTxHash); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DropTransactionResponse {\n"); - sb.append(" success: ").append(toIndentedString(success)).append("\n"); - sb.append(" transactions: ").append(toIndentedString(transactions)).append("\n"); + sb.append(" txStatus: ").append(toIndentedString(txStatus)).append("\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append(" replacedTxHash: ").append(toIndentedString(replacedTxHash)).append("\n"); sb.append("}"); return sb.toString(); } @@ -164,34 +183,39 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `success` to the URL query string - if (getSuccess() != null) { + // add `txStatus` to the URL query string + if (getTxStatus() != null) { joiner.add( String.format( - "%ssuccess%s=%s", + "%stxStatus%s=%s", prefix, suffix, - URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + URLEncoder.encode(String.valueOf(getTxStatus()), StandardCharsets.UTF_8) .replaceAll("\\+", "%20"))); } - // add `transactions` to the URL query string - if (getTransactions() != null) { - for (int i = 0; i < getTransactions().size(); i++) { - joiner.add( - String.format( - "%stransactions%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode( - String.valueOf(getTransactions().get(i)), - StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `replacedTxHash` to the URL query string + if (getReplacedTxHash() != null) { + joiner.add( + String.format( + "%sreplacedTxHash%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getReplacedTxHash()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java b/src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java new file mode 100644 index 0000000..3dcc318 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDto.java @@ -0,0 +1,207 @@ +/* + * 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; + +/** EVMTokenCreateParamsDto */ +@JsonPropertyOrder({ + EVMTokenCreateParamsDto.JSON_PROPERTY_CONTRACT_ID, + EVMTokenCreateParamsDto.JSON_PROPERTY_CONSTRUCTOR_PARAMS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EVMTokenCreateParamsDto { + public static final String JSON_PROPERTY_CONTRACT_ID = "contractId"; + private String contractId; + + public static final String JSON_PROPERTY_CONSTRUCTOR_PARAMS = "constructorParams"; + private List> constructorParams; + + public EVMTokenCreateParamsDto() {} + + public EVMTokenCreateParamsDto contractId(String contractId) { + this.contractId = contractId; + return this; + } + + /** + * The id of the contract template that will be used to create the token + * + * @return contractId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractId() { + return contractId; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractId(String contractId) { + this.contractId = contractId; + } + + public EVMTokenCreateParamsDto constructorParams( + List> constructorParams) { + this.constructorParams = constructorParams; + return this; + } + + public EVMTokenCreateParamsDto addConstructorParamsItem( + List constructorParamsItem) { + if (this.constructorParams == null) { + this.constructorParams = new ArrayList<>(); + } + this.constructorParams.add(constructorParamsItem); + return this; + } + + /** + * The constructor parameters and values of the contract template + * + * @return constructorParams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONSTRUCTOR_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getConstructorParams() { + return constructorParams; + } + + @JsonProperty(JSON_PROPERTY_CONSTRUCTOR_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConstructorParams(List> constructorParams) { + this.constructorParams = constructorParams; + } + + /** Return true if this EVMTokenCreateParamsDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EVMTokenCreateParamsDto evMTokenCreateParamsDto = (EVMTokenCreateParamsDto) o; + return Objects.equals(this.contractId, evMTokenCreateParamsDto.contractId) + && Objects.equals( + this.constructorParams, evMTokenCreateParamsDto.constructorParams); + } + + @Override + public int hashCode() { + return Objects.hash(contractId, constructorParams); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EVMTokenCreateParamsDto {\n"); + sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n"); + sb.append(" constructorParams: ") + .append(toIndentedString(constructorParams)) + .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 `contractId` to the URL query string + if (getContractId() != null) { + joiner.add( + String.format( + "%scontractId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `constructorParams` to the URL query string + if (getConstructorParams() != null) { + for (int i = 0; i < getConstructorParams().size(); i++) { + if (getConstructorParams().get(i) != null) { + joiner.add( + String.format( + "%sconstructorParams%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getConstructorParams().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FunctionDoc.java b/src/main/java/com/fireblocks/sdk/model/FunctionDoc.java new file mode 100644 index 0000000..a1de227 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FunctionDoc.java @@ -0,0 +1,257 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** FunctionDoc */ +@JsonPropertyOrder({ + FunctionDoc.JSON_PROPERTY_DETAILS, + FunctionDoc.JSON_PROPERTY_PARAMS, + FunctionDoc.JSON_PROPERTY_RETURNS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FunctionDoc { + public static final String JSON_PROPERTY_DETAILS = "details"; + private String details; + + public static final String JSON_PROPERTY_PARAMS = "params"; + private Map params = new HashMap<>(); + + public static final String JSON_PROPERTY_RETURNS = "returns"; + private Map returns = new HashMap<>(); + + public FunctionDoc() {} + + public FunctionDoc details(String details) { + this.details = details; + return this; + } + + /** + * A description of the function + * + * @return details + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDetails() { + return details; + } + + @JsonProperty(JSON_PROPERTY_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDetails(String details) { + this.details = details; + } + + public FunctionDoc params(Map params) { + this.params = params; + return this; + } + + public FunctionDoc putParamsItem(String key, String paramsItem) { + if (this.params == null) { + this.params = new HashMap<>(); + } + this.params.put(key, paramsItem); + return this; + } + + /** + * A description of the function parameters + * + * @return params + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getParams() { + return params; + } + + @JsonProperty(JSON_PROPERTY_PARAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParams(Map params) { + this.params = params; + } + + public FunctionDoc returns(Map returns) { + this.returns = returns; + return this; + } + + public FunctionDoc putReturnsItem(String key, String returnsItem) { + if (this.returns == null) { + this.returns = new HashMap<>(); + } + this.returns.put(key, returnsItem); + return this; + } + + /** + * A description of the function return values. only for read functions + * + * @return returns + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETURNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getReturns() { + return returns; + } + + @JsonProperty(JSON_PROPERTY_RETURNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReturns(Map returns) { + this.returns = returns; + } + + /** Return true if this FunctionDoc object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FunctionDoc functionDoc = (FunctionDoc) o; + return Objects.equals(this.details, functionDoc.details) + && Objects.equals(this.params, functionDoc.params) + && Objects.equals(this.returns, functionDoc.returns); + } + + @Override + public int hashCode() { + return Objects.hash(details, params, returns); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FunctionDoc {\n"); + sb.append(" details: ").append(toIndentedString(details)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append(" returns: ").append(toIndentedString(returns)).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 `details` to the URL query string + if (getDetails() != null) { + joiner.add( + String.format( + "%sdetails%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getDetails()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `params` to the URL query string + if (getParams() != null) { + for (String _key : getParams().keySet()) { + joiner.add( + String.format( + "%sparams%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getParams().get(_key), + URLEncoder.encode( + String.valueOf(getParams().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + // add `returns` to the URL query string + if (getReturns() != null) { + for (String _key : getReturns().keySet()) { + joiner.add( + String.format( + "%sreturns%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getReturns().get(_key), + URLEncoder.encode( + String.valueOf(getReturns().get(_key)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetNFTsResponse.java b/src/main/java/com/fireblocks/sdk/model/GetNFTsResponse.java new file mode 100644 index 0000000..f604f48 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetNFTsResponse.java @@ -0,0 +1,192 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** GetNFTsResponse */ +@JsonPropertyOrder({GetNFTsResponse.JSON_PROPERTY_PAGING, GetNFTsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetNFTsResponse { + public static final String JSON_PROPERTY_PAGING = "paging"; + private Paging paging; + + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public GetNFTsResponse() {} + + public GetNFTsResponse paging(Paging paging) { + this.paging = paging; + return this; + } + + /** + * Get paging + * + * @return paging + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Paging getPaging() { + return paging; + } + + @JsonProperty(JSON_PROPERTY_PAGING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaging(Paging paging) { + this.paging = paging; + } + + public GetNFTsResponse data(List data) { + this.data = data; + return this; + } + + public GetNFTsResponse addDataItem(TokenResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + /** Return true if this GetNFTsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNFTsResponse getNFTsResponse = (GetNFTsResponse) o; + return Objects.equals(this.paging, getNFTsResponse.paging) + && Objects.equals(this.data, getNFTsResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(paging, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetNFTsResponse {\n"); + sb.append(" paging: ").append(toIndentedString(paging)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `paging` to the URL query string + if (getPaging() != null) { + joiner.add(getPaging().toUrlQueryString(prefix + "paging" + suffix)); + } + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetOtaStatus200Response.java b/src/main/java/com/fireblocks/sdk/model/GetOtaStatusResponse.java similarity index 87% rename from src/main/java/com/fireblocks/sdk/model/GetOtaStatus200Response.java rename to src/main/java/com/fireblocks/sdk/model/GetOtaStatusResponse.java index 8527713..b2abd92 100644 --- a/src/main/java/com/fireblocks/sdk/model/GetOtaStatus200Response.java +++ b/src/main/java/com/fireblocks/sdk/model/GetOtaStatusResponse.java @@ -21,16 +21,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** GetOtaStatus200Response */ -@JsonPropertyOrder({GetOtaStatus200Response.JSON_PROPERTY_ENABLED}) +/** GetOtaStatusResponse */ +@JsonPropertyOrder({GetOtaStatusResponse.JSON_PROPERTY_ENABLED}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GetOtaStatus200Response { +public class GetOtaStatusResponse { public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; - public GetOtaStatus200Response() {} + public GetOtaStatusResponse() {} - public GetOtaStatus200Response enabled(Boolean enabled) { + public GetOtaStatusResponse enabled(Boolean enabled) { this.enabled = enabled; return this; } @@ -53,7 +53,7 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /** Return true if this getOtaStatus_200_response object is equal to o. */ + /** Return true if this GetOtaStatusResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,8 +62,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetOtaStatus200Response getOtaStatus200Response = (GetOtaStatus200Response) o; - return Objects.equals(this.enabled, getOtaStatus200Response.enabled); + GetOtaStatusResponse getOtaStatusResponse = (GetOtaStatusResponse) o; + return Objects.equals(this.enabled, getOtaStatusResponse.enabled); } @Override @@ -74,7 +74,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetOtaStatus200Response {\n"); + sb.append("class GetOtaStatusResponse {\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/GetOwnershipTokens200Response.java b/src/main/java/com/fireblocks/sdk/model/GetOwnershipTokensResponse.java similarity index 85% rename from src/main/java/com/fireblocks/sdk/model/GetOwnershipTokens200Response.java rename to src/main/java/com/fireblocks/sdk/model/GetOwnershipTokensResponse.java index d0fcefa..0da7fac 100644 --- a/src/main/java/com/fireblocks/sdk/model/GetOwnershipTokens200Response.java +++ b/src/main/java/com/fireblocks/sdk/model/GetOwnershipTokensResponse.java @@ -21,22 +21,22 @@ import java.util.Objects; import java.util.StringJoiner; -/** GetOwnershipTokens200Response */ +/** GetOwnershipTokensResponse */ @JsonPropertyOrder({ - GetOwnershipTokens200Response.JSON_PROPERTY_PAGING, - GetOwnershipTokens200Response.JSON_PROPERTY_DATA + GetOwnershipTokensResponse.JSON_PROPERTY_PAGING, + GetOwnershipTokensResponse.JSON_PROPERTY_DATA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GetOwnershipTokens200Response { +public class GetOwnershipTokensResponse { public static final String JSON_PROPERTY_PAGING = "paging"; private Paging paging; public static final String JSON_PROPERTY_DATA = "data"; private List data; - public GetOwnershipTokens200Response() {} + public GetOwnershipTokensResponse() {} - public GetOwnershipTokens200Response paging(Paging paging) { + public GetOwnershipTokensResponse paging(Paging paging) { this.paging = paging; return this; } @@ -59,12 +59,12 @@ public void setPaging(Paging paging) { this.paging = paging; } - public GetOwnershipTokens200Response data(List data) { + public GetOwnershipTokensResponse data(List data) { this.data = data; return this; } - public GetOwnershipTokens200Response addDataItem(TokenOwnershipResponse dataItem) { + public GetOwnershipTokensResponse addDataItem(TokenOwnershipResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -90,7 +90,7 @@ public void setData(List data) { this.data = data; } - /** Return true if this getOwnershipTokens_200_response object is equal to o. */ + /** Return true if this GetOwnershipTokensResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,10 +99,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetOwnershipTokens200Response getOwnershipTokens200Response = - (GetOwnershipTokens200Response) o; - return Objects.equals(this.paging, getOwnershipTokens200Response.paging) - && Objects.equals(this.data, getOwnershipTokens200Response.data); + GetOwnershipTokensResponse getOwnershipTokensResponse = (GetOwnershipTokensResponse) o; + return Objects.equals(this.paging, getOwnershipTokensResponse.paging) + && Objects.equals(this.data, getOwnershipTokensResponse.data); } @Override @@ -113,7 +112,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetOwnershipTokens200Response {\n"); + sb.append("class GetOwnershipTokensResponse {\n"); sb.append(" paging: ").append(toIndentedString(paging)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatus200Response.java b/src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java similarity index 85% rename from src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatus200Response.java rename to src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java index a2dc84d..c1ee3b0 100644 --- a/src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatus200Response.java +++ b/src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java @@ -21,16 +21,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** GetWorkspaceStatus200Response */ -@JsonPropertyOrder({GetWorkspaceStatus200Response.JSON_PROPERTY_STATUS}) +/** GetWorkspaceStatusResponse */ +@JsonPropertyOrder({GetWorkspaceStatusResponse.JSON_PROPERTY_STATUS}) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GetWorkspaceStatus200Response { +public class GetWorkspaceStatusResponse { public static final String JSON_PROPERTY_STATUS = "status"; private String status; - public GetWorkspaceStatus200Response() {} + public GetWorkspaceStatusResponse() {} - public GetWorkspaceStatus200Response status(String status) { + public GetWorkspaceStatusResponse status(String status) { this.status = status; return this; } @@ -53,7 +53,7 @@ public void setStatus(String status) { this.status = status; } - /** Return true if this getWorkspaceStatus_200_response object is equal to o. */ + /** Return true if this GetWorkspaceStatusResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -62,9 +62,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetWorkspaceStatus200Response getWorkspaceStatus200Response = - (GetWorkspaceStatus200Response) o; - return Objects.equals(this.status, getWorkspaceStatus200Response.status); + GetWorkspaceStatusResponse getWorkspaceStatusResponse = (GetWorkspaceStatusResponse) o; + return Objects.equals(this.status, getWorkspaceStatusResponse.status); } @Override @@ -75,7 +74,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetWorkspaceStatus200Response {\n"); + sb.append("class GetWorkspaceStatusResponse {\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.java b/src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.java new file mode 100644 index 0000000..e42ad83 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.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.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** HttpContractDoesNotExistError */ +@JsonPropertyOrder({ + HttpContractDoesNotExistError.JSON_PROPERTY_MESSAGE, + HttpContractDoesNotExistError.JSON_PROPERTY_CODE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpContractDoesNotExistError { + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_CODE = "code"; + private String code; + + public HttpContractDoesNotExistError() {} + + public HttpContractDoesNotExistError message(String message) { + this.message = message; + return this; + } + + /** + * Not Found error code + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + public HttpContractDoesNotExistError code(String code) { + this.code = code; + return this; + } + + /** + * Error code + * + * @return code + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCode() { + return code; + } + + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCode(String code) { + this.code = code; + } + + /** Return true if this HttpContractDoesNotExistError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpContractDoesNotExistError httpContractDoesNotExistError = + (HttpContractDoesNotExistError) o; + return Objects.equals(this.message, httpContractDoesNotExistError.message) + && Objects.equals(this.code, httpContractDoesNotExistError.code); + } + + @Override + public int hashCode() { + return Objects.hash(message, code); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HttpContractDoesNotExistError {\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/LeanAbiFunction.java b/src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java new file mode 100644 index 0000000..ead8307 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/LeanAbiFunction.java @@ -0,0 +1,200 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** LeanAbiFunction */ +@JsonPropertyOrder({LeanAbiFunction.JSON_PROPERTY_NAME, LeanAbiFunction.JSON_PROPERTY_INPUTS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LeanAbiFunction { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + private List inputs = new ArrayList<>(); + + public LeanAbiFunction() {} + + public LeanAbiFunction name(String name) { + this.name = name; + return this; + } + + /** + * The function name + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + public LeanAbiFunction inputs(List inputs) { + this.inputs = inputs; + return this; + } + + public LeanAbiFunction addInputsItem(ParameterWithValue inputsItem) { + if (this.inputs == null) { + this.inputs = new ArrayList<>(); + } + this.inputs.add(inputsItem); + return this; + } + + /** + * The function inputs + * + * @return inputs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInputs() { + return inputs; + } + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputs(List inputs) { + this.inputs = inputs; + } + + /** Return true if this LeanAbiFunction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LeanAbiFunction leanAbiFunction = (LeanAbiFunction) o; + return Objects.equals(this.name, leanAbiFunction.name) + && Objects.equals(this.inputs, leanAbiFunction.inputs); + } + + @Override + public int hashCode() { + return Objects.hash(name, inputs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LeanAbiFunction {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (int i = 0; i < getInputs().size(); i++) { + if (getInputs().get(i) != null) { + joiner.add( + getInputs() + .get(i) + .toUrlQueryString( + String.format( + "%sinputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/LeanContractDto.java b/src/main/java/com/fireblocks/sdk/model/LeanContractDto.java new file mode 100644 index 0000000..73b9a20 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/LeanContractDto.java @@ -0,0 +1,498 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** LeanContractDto */ +@JsonPropertyOrder({ + LeanContractDto.JSON_PROPERTY_ID, + LeanContractDto.JSON_PROPERTY_NAME, + LeanContractDto.JSON_PROPERTY_DESCRIPTION, + LeanContractDto.JSON_PROPERTY_ATTRIBUTES, + LeanContractDto.JSON_PROPERTY_IS_PUBLIC, + LeanContractDto.JSON_PROPERTY_CAN_DEPLOY, + LeanContractDto.JSON_PROPERTY_OWNER, + LeanContractDto.JSON_PROPERTY_VENDOR, + LeanContractDto.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LeanContractDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ContractAttributes attributes; + + public static final String JSON_PROPERTY_IS_PUBLIC = "isPublic"; + private Boolean isPublic; + + public static final String JSON_PROPERTY_CAN_DEPLOY = "canDeploy"; + private Boolean canDeploy; + + public static final String JSON_PROPERTY_OWNER = "owner"; + private String owner; + + public static final String JSON_PROPERTY_VENDOR = "vendor"; + private VendorDto vendor; + + /** Gets or Sets type */ + public enum TypeEnum { + FUNGIBLE_TOKEN("FUNGIBLE_TOKEN"), + + NON_FUNGIBLE_TOKEN("NON_FUNGIBLE_TOKEN"), + + NON_TOKEN("NON_TOKEN"), + + TOKEN_EXTENSION("TOKEN_EXTENSION"), + + TOKEN_UTILITY("TOKEN_UTILITY"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public LeanContractDto() {} + + public LeanContractDto id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the contract template + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public LeanContractDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the contract template + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public LeanContractDto description(String description) { + this.description = description; + return this; + } + + /** + * A short description of the contract template + * + * @return description + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDescription(String description) { + this.description = description; + } + + public LeanContractDto attributes(ContractAttributes attributes) { + this.attributes = attributes; + return this; + } + + /** + * The attributes related to this contract template. It will be displayed in the tokenization + * page + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ContractAttributes getAttributes() { + return attributes; + } + + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(ContractAttributes attributes) { + this.attributes = attributes; + } + + public LeanContractDto isPublic(Boolean isPublic) { + this.isPublic = isPublic; + return this; + } + + /** + * Is this a contract that is viewable by all fireblocks's users or is it visible only for + * this workspace + * + * @return isPublic + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_IS_PUBLIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsPublic() { + return isPublic; + } + + @JsonProperty(JSON_PROPERTY_IS_PUBLIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIsPublic(Boolean isPublic) { + this.isPublic = isPublic; + } + + public LeanContractDto canDeploy(Boolean canDeploy) { + this.canDeploy = canDeploy; + return this; + } + + /** + * True if the workspace allowed to deploy this contract, false otherwise + * + * @return canDeploy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CAN_DEPLOY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCanDeploy() { + return canDeploy; + } + + @JsonProperty(JSON_PROPERTY_CAN_DEPLOY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCanDeploy(Boolean canDeploy) { + this.canDeploy = canDeploy; + } + + public LeanContractDto owner(String owner) { + this.owner = owner; + return this; + } + + /** + * The workspace id of the owner of this contract template. If it's a private contract, only + * this workspace will be allowed to deploy it + * + * @return owner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOwner() { + return owner; + } + + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOwner(String owner) { + this.owner = owner; + } + + public LeanContractDto vendor(VendorDto vendor) { + this.vendor = vendor; + return this; + } + + /** + * The details of the vendor of this contract template. Applicable only for public contract + * templates + * + * @return vendor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VENDOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VendorDto getVendor() { + return vendor; + } + + @JsonProperty(JSON_PROPERTY_VENDOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVendor(VendorDto vendor) { + this.vendor = vendor; + } + + public LeanContractDto type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** Return true if this LeanContractDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LeanContractDto leanContractDto = (LeanContractDto) o; + return Objects.equals(this.id, leanContractDto.id) + && Objects.equals(this.name, leanContractDto.name) + && Objects.equals(this.description, leanContractDto.description) + && Objects.equals(this.attributes, leanContractDto.attributes) + && Objects.equals(this.isPublic, leanContractDto.isPublic) + && Objects.equals(this.canDeploy, leanContractDto.canDeploy) + && Objects.equals(this.owner, leanContractDto.owner) + && Objects.equals(this.vendor, leanContractDto.vendor) + && Objects.equals(this.type, leanContractDto.type); + } + + @Override + public int hashCode() { + return Objects.hash( + id, name, description, attributes, isPublic, canDeploy, owner, vendor, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LeanContractDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); + sb.append(" canDeploy: ").append(toIndentedString(canDeploy)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" vendor: ").append(toIndentedString(vendor)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + joiner.add(getAttributes().toUrlQueryString(prefix + "attributes" + suffix)); + } + + // add `isPublic` to the URL query string + if (getIsPublic() != null) { + joiner.add( + String.format( + "%sisPublic%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getIsPublic()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `canDeploy` to the URL query string + if (getCanDeploy() != null) { + joiner.add( + String.format( + "%scanDeploy%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCanDeploy()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `owner` to the URL query string + if (getOwner() != null) { + joiner.add( + String.format( + "%sowner%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getOwner()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `vendor` to the URL query string + if (getVendor() != null) { + joiner.add(getVendor().toUrlQueryString(prefix + "vendor" + suffix)); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDto.java b/src/main/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDto.java new file mode 100644 index 0000000..4909e7d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDto.java @@ -0,0 +1,272 @@ +/* + * 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; + +/** LeanDeployedContractResponseDto */ +@JsonPropertyOrder({ + LeanDeployedContractResponseDto.JSON_PROPERTY_ID, + LeanDeployedContractResponseDto.JSON_PROPERTY_CONTRACT_ADDRESS, + LeanDeployedContractResponseDto.JSON_PROPERTY_CONTRACT_TEMPLATE_ID, + LeanDeployedContractResponseDto.JSON_PROPERTY_BLOCKCHAIN_ID +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LeanDeployedContractResponseDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_CONTRACT_ADDRESS = "contractAddress"; + private String contractAddress; + + public static final String JSON_PROPERTY_CONTRACT_TEMPLATE_ID = "contractTemplateId"; + private String contractTemplateId; + + public static final String JSON_PROPERTY_BLOCKCHAIN_ID = "blockchainId"; + private String blockchainId; + + public LeanDeployedContractResponseDto() {} + + public LeanDeployedContractResponseDto id(String id) { + this.id = id; + return this; + } + + /** + * The deployed contract data identifier + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public LeanDeployedContractResponseDto contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } + + /** + * The contract's onchain address + * + * @return contractAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractAddress() { + return contractAddress; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public LeanDeployedContractResponseDto contractTemplateId(String contractTemplateId) { + this.contractTemplateId = contractTemplateId; + return this; + } + + /** + * The contract template identifier + * + * @return contractTemplateId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONTRACT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContractTemplateId() { + return contractTemplateId; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_TEMPLATE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setContractTemplateId(String contractTemplateId) { + this.contractTemplateId = contractTemplateId; + } + + public LeanDeployedContractResponseDto blockchainId(String blockchainId) { + this.blockchainId = blockchainId; + return this; + } + + /** + * Get blockchainId + * + * @return blockchainId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBlockchainId() { + return blockchainId; + } + + @JsonProperty(JSON_PROPERTY_BLOCKCHAIN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBlockchainId(String blockchainId) { + this.blockchainId = blockchainId; + } + + /** Return true if this LeanDeployedContractResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LeanDeployedContractResponseDto leanDeployedContractResponseDto = + (LeanDeployedContractResponseDto) o; + return Objects.equals(this.id, leanDeployedContractResponseDto.id) + && Objects.equals( + this.contractAddress, leanDeployedContractResponseDto.contractAddress) + && Objects.equals( + this.contractTemplateId, leanDeployedContractResponseDto.contractTemplateId) + && Objects.equals(this.blockchainId, leanDeployedContractResponseDto.blockchainId); + } + + @Override + public int hashCode() { + return Objects.hash(id, contractAddress, contractTemplateId, blockchainId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LeanDeployedContractResponseDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" contractAddress: ").append(toIndentedString(contractAddress)).append("\n"); + sb.append(" contractTemplateId: ") + .append(toIndentedString(contractTemplateId)) + .append("\n"); + sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractAddress` to the URL query string + if (getContractAddress() != null) { + joiner.add( + String.format( + "%scontractAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `contractTemplateId` to the URL query string + if (getContractTemplateId() != null) { + joiner.add( + String.format( + "%scontractTemplateId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getContractTemplateId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `blockchainId` to the URL query string + if (getBlockchainId() != null) { + joiner.add( + String.format( + "%sblockchainId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getBlockchainId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ListOwnedCollections200Response.java b/src/main/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponse.java similarity index 86% rename from src/main/java/com/fireblocks/sdk/model/ListOwnedCollections200Response.java rename to src/main/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponse.java index 00208b2..cc56529 100644 --- a/src/main/java/com/fireblocks/sdk/model/ListOwnedCollections200Response.java +++ b/src/main/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponse.java @@ -21,22 +21,22 @@ import java.util.Objects; import java.util.StringJoiner; -/** ListOwnedCollections200Response */ +/** ListOwnedCollectionsResponse */ @JsonPropertyOrder({ - ListOwnedCollections200Response.JSON_PROPERTY_PAGING, - ListOwnedCollections200Response.JSON_PROPERTY_DATA + ListOwnedCollectionsResponse.JSON_PROPERTY_PAGING, + ListOwnedCollectionsResponse.JSON_PROPERTY_DATA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ListOwnedCollections200Response { +public class ListOwnedCollectionsResponse { public static final String JSON_PROPERTY_PAGING = "paging"; private Paging paging; public static final String JSON_PROPERTY_DATA = "data"; private List data; - public ListOwnedCollections200Response() {} + public ListOwnedCollectionsResponse() {} - public ListOwnedCollections200Response paging(Paging paging) { + public ListOwnedCollectionsResponse paging(Paging paging) { this.paging = paging; return this; } @@ -59,12 +59,12 @@ public void setPaging(Paging paging) { this.paging = paging; } - public ListOwnedCollections200Response data(List data) { + public ListOwnedCollectionsResponse data(List data) { this.data = data; return this; } - public ListOwnedCollections200Response addDataItem(CollectionOwnershipResponse dataItem) { + public ListOwnedCollectionsResponse addDataItem(CollectionOwnershipResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -90,7 +90,7 @@ public void setData(List data) { this.data = data; } - /** Return true if this listOwnedCollections_200_response object is equal to o. */ + /** Return true if this ListOwnedCollectionsResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,10 +99,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListOwnedCollections200Response listOwnedCollections200Response = - (ListOwnedCollections200Response) o; - return Objects.equals(this.paging, listOwnedCollections200Response.paging) - && Objects.equals(this.data, listOwnedCollections200Response.data); + ListOwnedCollectionsResponse listOwnedCollectionsResponse = + (ListOwnedCollectionsResponse) o; + return Objects.equals(this.paging, listOwnedCollectionsResponse.paging) + && Objects.equals(this.data, listOwnedCollectionsResponse.data); } @Override @@ -113,7 +113,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListOwnedCollections200Response {\n"); + sb.append("class ListOwnedCollectionsResponse {\n"); sb.append(" paging: ").append(toIndentedString(paging)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/fireblocks/sdk/model/ListOwnedTokens200Response.java b/src/main/java/com/fireblocks/sdk/model/ListOwnedTokensResponse.java similarity index 86% rename from src/main/java/com/fireblocks/sdk/model/ListOwnedTokens200Response.java rename to src/main/java/com/fireblocks/sdk/model/ListOwnedTokensResponse.java index 10d05c2..c5b1fcd 100644 --- a/src/main/java/com/fireblocks/sdk/model/ListOwnedTokens200Response.java +++ b/src/main/java/com/fireblocks/sdk/model/ListOwnedTokensResponse.java @@ -21,22 +21,22 @@ import java.util.Objects; import java.util.StringJoiner; -/** ListOwnedTokens200Response */ +/** ListOwnedTokensResponse */ @JsonPropertyOrder({ - ListOwnedTokens200Response.JSON_PROPERTY_PAGING, - ListOwnedTokens200Response.JSON_PROPERTY_DATA + ListOwnedTokensResponse.JSON_PROPERTY_PAGING, + ListOwnedTokensResponse.JSON_PROPERTY_DATA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ListOwnedTokens200Response { +public class ListOwnedTokensResponse { public static final String JSON_PROPERTY_PAGING = "paging"; private Paging paging; public static final String JSON_PROPERTY_DATA = "data"; private List data; - public ListOwnedTokens200Response() {} + public ListOwnedTokensResponse() {} - public ListOwnedTokens200Response paging(Paging paging) { + public ListOwnedTokensResponse paging(Paging paging) { this.paging = paging; return this; } @@ -59,12 +59,12 @@ public void setPaging(Paging paging) { this.paging = paging; } - public ListOwnedTokens200Response data(List data) { + public ListOwnedTokensResponse data(List data) { this.data = data; return this; } - public ListOwnedTokens200Response addDataItem(TokenResponse dataItem) { + public ListOwnedTokensResponse addDataItem(TokenResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -90,7 +90,7 @@ public void setData(List data) { this.data = data; } - /** Return true if this listOwnedTokens_200_response object is equal to o. */ + /** Return true if this ListOwnedTokensResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -99,9 +99,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListOwnedTokens200Response listOwnedTokens200Response = (ListOwnedTokens200Response) o; - return Objects.equals(this.paging, listOwnedTokens200Response.paging) - && Objects.equals(this.data, listOwnedTokens200Response.data); + ListOwnedTokensResponse listOwnedTokensResponse = (ListOwnedTokensResponse) o; + return Objects.equals(this.paging, listOwnedTokensResponse.paging) + && Objects.equals(this.data, listOwnedTokensResponse.data); } @Override @@ -112,7 +112,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListOwnedTokens200Response {\n"); + sb.append("class ListOwnedTokensResponse {\n"); sb.append(" paging: ").append(toIndentedString(paging)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/fireblocks/sdk/model/NotFoundException.java b/src/main/java/com/fireblocks/sdk/model/NotFoundException.java new file mode 100644 index 0000000..055def4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NotFoundException.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** NotFoundException */ +@JsonPropertyOrder({ + NotFoundException.JSON_PROPERTY_STATUS_CODE, + NotFoundException.JSON_PROPERTY_MESSAGE, + NotFoundException.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NotFoundException { + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private Integer statusCode; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public NotFoundException() {} + + public NotFoundException statusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * HTTP status code + * + * @return statusCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatusCode() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + } + + public NotFoundException message(String message) { + this.message = message; + return this; + } + + /** + * Error message + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + public NotFoundException error(String error) { + this.error = error; + return this; + } + + /** + * Short description of the HTTP error + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(String error) { + this.error = error; + } + + /** Return true if this NotFoundException object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotFoundException notFoundException = (NotFoundException) o; + return Objects.equals(this.statusCode, notFoundException.statusCode) + && Objects.equals(this.message, notFoundException.message) + && Objects.equals(this.error, notFoundException.error); + } + + @Override + public int hashCode() { + return Objects.hash(statusCode, message, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotFoundException {\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).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 `statusCode` to the URL query string + if (getStatusCode() != null) { + joiner.add( + String.format( + "%sstatusCode%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStatusCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add( + String.format( + "%serror%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getError()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Parameter.java b/src/main/java/com/fireblocks/sdk/model/Parameter.java new file mode 100644 index 0000000..e0e041c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Parameter.java @@ -0,0 +1,327 @@ +/* + * 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; + +/** Parameter */ +@JsonPropertyOrder({ + Parameter.JSON_PROPERTY_NAME, + Parameter.JSON_PROPERTY_DESCRIPTION, + Parameter.JSON_PROPERTY_INTERNAL_TYPE, + Parameter.JSON_PROPERTY_TYPE, + Parameter.JSON_PROPERTY_COMPONENTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Parameter { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INTERNAL_TYPE = "internalType"; + private String internalType; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components; + + public Parameter() {} + + public Parameter name(String name) { + this.name = name; + return this; + } + + /** + * The name of the parameter as it appears in the ABI + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public Parameter description(String description) { + this.description = description; + return this; + } + + /** + * A description of the parameter, fetched from the devdoc of this contract + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + public Parameter internalType(String internalType) { + this.internalType = internalType; + return this; + } + + /** + * The internal type of the parameter as it appears in the ABI + * + * @return internalType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERNAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInternalType() { + return internalType; + } + + @JsonProperty(JSON_PROPERTY_INTERNAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInternalType(String internalType) { + this.internalType = internalType; + } + + public Parameter type(String type) { + this.type = type; + return this; + } + + /** + * The type of the parameter as it appears in the ABI + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + public Parameter components(List components) { + this.components = components; + return this; + } + + public Parameter addComponentsItem(Parameter componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + return this; + } + + /** + * Get components + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComponents(List components) { + this.components = components; + } + + /** Return true if this Parameter object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Parameter parameter = (Parameter) o; + return Objects.equals(this.name, parameter.name) + && Objects.equals(this.description, parameter.description) + && Objects.equals(this.internalType, parameter.internalType) + && Objects.equals(this.type, parameter.type) + && Objects.equals(this.components, parameter.components); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, internalType, type, components); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Parameter {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" internalType: ").append(toIndentedString(internalType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `internalType` to the URL query string + if (getInternalType() != null) { + joiner.add( + String.format( + "%sinternalType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getInternalType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `components` to the URL query string + if (getComponents() != null) { + for (int i = 0; i < getComponents().size(); i++) { + if (getComponents().get(i) != null) { + joiner.add( + getComponents() + .get(i) + .toUrlQueryString( + String.format( + "%scomponents%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ParameterWithValue.java b/src/main/java/com/fireblocks/sdk/model/ParameterWithValue.java new file mode 100644 index 0000000..e41d563 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ParameterWithValue.java @@ -0,0 +1,403 @@ +/* + * 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; + +/** ParameterWithValue */ +@JsonPropertyOrder({ + ParameterWithValue.JSON_PROPERTY_NAME, + ParameterWithValue.JSON_PROPERTY_DESCRIPTION, + ParameterWithValue.JSON_PROPERTY_INTERNAL_TYPE, + ParameterWithValue.JSON_PROPERTY_TYPE, + ParameterWithValue.JSON_PROPERTY_COMPONENTS, + ParameterWithValue.JSON_PROPERTY_VALUE, + ParameterWithValue.JSON_PROPERTY_FUNCTION_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ParameterWithValue { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_INTERNAL_TYPE = "internalType"; + private String internalType; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_COMPONENTS = "components"; + private List components; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_FUNCTION_VALUE = "functionValue"; + private LeanAbiFunction functionValue; + + public ParameterWithValue() {} + + public ParameterWithValue name(String name) { + this.name = name; + return this; + } + + /** + * The name of the parameter as it appears in the ABI + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public ParameterWithValue description(String description) { + this.description = description; + return this; + } + + /** + * A description of the parameter, fetched from the devdoc of this contract + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + public ParameterWithValue internalType(String internalType) { + this.internalType = internalType; + return this; + } + + /** + * The internal type of the parameter as it appears in the ABI + * + * @return internalType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTERNAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInternalType() { + return internalType; + } + + @JsonProperty(JSON_PROPERTY_INTERNAL_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setInternalType(String internalType) { + this.internalType = internalType; + } + + public ParameterWithValue type(String type) { + this.type = type; + return this; + } + + /** + * The type of the parameter as it appears in the ABI + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + public ParameterWithValue components(List components) { + this.components = components; + return this; + } + + public ParameterWithValue addComponentsItem(Parameter componentsItem) { + if (this.components == null) { + this.components = new ArrayList<>(); + } + this.components.add(componentsItem); + return this; + } + + /** + * Get components + * + * @return components + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponents() { + return components; + } + + @JsonProperty(JSON_PROPERTY_COMPONENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setComponents(List components) { + this.components = components; + } + + public ParameterWithValue value(String value) { + this.value = value; + return this; + } + + /** + * The value of the parameter. can also be ParameterWithValue + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(String value) { + this.value = value; + } + + public ParameterWithValue functionValue(LeanAbiFunction functionValue) { + this.functionValue = functionValue; + return this; + } + + /** + * The function value of this param (if has one). If this is set, the `value` + * shouldn`t be. Used for proxies + * + * @return functionValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FUNCTION_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LeanAbiFunction getFunctionValue() { + return functionValue; + } + + @JsonProperty(JSON_PROPERTY_FUNCTION_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFunctionValue(LeanAbiFunction functionValue) { + this.functionValue = functionValue; + } + + /** Return true if this ParameterWithValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParameterWithValue parameterWithValue = (ParameterWithValue) o; + return Objects.equals(this.name, parameterWithValue.name) + && Objects.equals(this.description, parameterWithValue.description) + && Objects.equals(this.internalType, parameterWithValue.internalType) + && Objects.equals(this.type, parameterWithValue.type) + && Objects.equals(this.components, parameterWithValue.components) + && Objects.equals(this.value, parameterWithValue.value) + && Objects.equals(this.functionValue, parameterWithValue.functionValue); + } + + @Override + public int hashCode() { + return Objects.hash( + name, description, internalType, type, components, value, functionValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParameterWithValue {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" internalType: ").append(toIndentedString(internalType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" components: ").append(toIndentedString(components)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" functionValue: ").append(toIndentedString(functionValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `internalType` to the URL query string + if (getInternalType() != null) { + joiner.add( + String.format( + "%sinternalType%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getInternalType()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `components` to the URL query string + if (getComponents() != null) { + for (int i = 0; i < getComponents().size(); i++) { + if (getComponents().get(i) != null) { + joiner.add( + getComponents() + .get(i) + .toUrlQueryString( + String.format( + "%scomponents%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add( + String.format( + "%svalue%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getValue()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `functionValue` to the URL query string + if (getFunctionValue() != null) { + joiner.add(getFunctionValue().toUrlQueryString(prefix + "functionValue" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java b/src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java new file mode 100644 index 0000000..5b4bf06 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java @@ -0,0 +1,422 @@ +/* + * 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; + +/** ReadAbiFunction */ +@JsonPropertyOrder({ + ReadAbiFunction.JSON_PROPERTY_STATE_MUTABILITY, + ReadAbiFunction.JSON_PROPERTY_OUTPUTS, + ReadAbiFunction.JSON_PROPERTY_NAME, + ReadAbiFunction.JSON_PROPERTY_TYPE, + ReadAbiFunction.JSON_PROPERTY_INPUTS, + ReadAbiFunction.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReadAbiFunction { + /** Gets or Sets stateMutability */ + public enum StateMutabilityEnum { + PURE("pure"), + + VIEW("view"); + + private String value; + + StateMutabilityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StateMutabilityEnum fromValue(String value) { + for (StateMutabilityEnum b : StateMutabilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATE_MUTABILITY = "stateMutability"; + private StateMutabilityEnum stateMutability; + + public static final String JSON_PROPERTY_OUTPUTS = "outputs"; + private List outputs; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + private List inputs = new ArrayList<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public ReadAbiFunction() {} + + public ReadAbiFunction stateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + return this; + } + + /** + * Get stateMutability + * + * @return stateMutability + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StateMutabilityEnum getStateMutability() { + return stateMutability; + } + + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + } + + public ReadAbiFunction outputs(List outputs) { + this.outputs = outputs; + return this; + } + + public ReadAbiFunction addOutputsItem(Parameter outputsItem) { + if (this.outputs == null) { + this.outputs = new ArrayList<>(); + } + this.outputs.add(outputsItem); + return this; + } + + /** + * Get outputs + * + * @return outputs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOutputs() { + return outputs; + } + + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputs(List outputs) { + this.outputs = outputs; + } + + public ReadAbiFunction name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + public ReadAbiFunction type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(String type) { + this.type = type; + } + + public ReadAbiFunction inputs(List inputs) { + this.inputs = inputs; + return this; + } + + public ReadAbiFunction addInputsItem(ParameterWithValue inputsItem) { + if (this.inputs == null) { + this.inputs = new ArrayList<>(); + } + this.inputs.add(inputsItem); + return this; + } + + /** + * Get inputs + * + * @return inputs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInputs() { + return inputs; + } + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputs(List inputs) { + this.inputs = inputs; + } + + public ReadAbiFunction description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this ReadAbiFunction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadAbiFunction readAbiFunction = (ReadAbiFunction) o; + return Objects.equals(this.stateMutability, readAbiFunction.stateMutability) + && Objects.equals(this.outputs, readAbiFunction.outputs) + && Objects.equals(this.name, readAbiFunction.name) + && Objects.equals(this.type, readAbiFunction.type) + && Objects.equals(this.inputs, readAbiFunction.inputs) + && Objects.equals(this.description, readAbiFunction.description); + } + + @Override + public int hashCode() { + return Objects.hash(stateMutability, outputs, name, type, inputs, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadAbiFunction {\n"); + sb.append(" stateMutability: ").append(toIndentedString(stateMutability)).append("\n"); + sb.append(" outputs: ").append(toIndentedString(outputs)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 `stateMutability` to the URL query string + if (getStateMutability() != null) { + joiner.add( + String.format( + "%sstateMutability%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStateMutability()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `outputs` to the URL query string + if (getOutputs() != null) { + for (int i = 0; i < getOutputs().size(); i++) { + if (getOutputs().get(i) != null) { + joiner.add( + getOutputs() + .get(i) + .toUrlQueryString( + String.format( + "%soutputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (int i = 0; i < getInputs().size(); i++) { + if (getInputs().get(i) != null) { + joiner.add( + getInputs() + .get(i) + .toUrlQueryString( + String.format( + "%sinputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java b/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java new file mode 100644 index 0000000..6e38bee --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java @@ -0,0 +1,159 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ReadCallFunctionDto */ +@JsonPropertyOrder({ReadCallFunctionDto.JSON_PROPERTY_ABI_FUNCTION}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReadCallFunctionDto { + public static final String JSON_PROPERTY_ABI_FUNCTION = "abiFunction"; + private List abiFunction = new ArrayList<>(); + + public ReadCallFunctionDto() {} + + public ReadCallFunctionDto abiFunction(List abiFunction) { + this.abiFunction = abiFunction; + return this; + } + + public ReadCallFunctionDto addAbiFunctionItem(ReadAbiFunction abiFunctionItem) { + if (this.abiFunction == null) { + this.abiFunction = new ArrayList<>(); + } + this.abiFunction.add(abiFunctionItem); + return this; + } + + /** + * The abi of the read function you wish to call + * + * @return abiFunction + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAbiFunction() { + return abiFunction; + } + + @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbiFunction(List abiFunction) { + this.abiFunction = abiFunction; + } + + /** Return true if this ReadCallFunctionDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadCallFunctionDto readCallFunctionDto = (ReadCallFunctionDto) o; + return Objects.equals(this.abiFunction, readCallFunctionDto.abiFunction); + } + + @Override + public int hashCode() { + return Objects.hash(abiFunction); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadCallFunctionDto {\n"); + sb.append(" abiFunction: ").append(toIndentedString(abiFunction)).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 `abiFunction` to the URL query string + if (getAbiFunction() != null) { + for (int i = 0; i < getAbiFunction().size(); i++) { + if (getAbiFunction().get(i) != null) { + joiner.add( + getAbiFunction() + .get(i) + .toUrlQueryString( + String.format( + "%sabiFunction%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SetCustomerRefIdForAddressRequest.java b/src/main/java/com/fireblocks/sdk/model/SetCustomerRefIdForAddressRequest.java index ee5bd25..03ca3b4 100644 --- a/src/main/java/com/fireblocks/sdk/model/SetCustomerRefIdForAddressRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/SetCustomerRefIdForAddressRequest.java @@ -53,7 +53,7 @@ public void setCustomerRefId(String customerRefId) { this.customerRefId = customerRefId; } - /** Return true if this setCustomerRefIdForAddress_request object is equal to o. */ + /** Return true if this SetCustomerRefIdForAddressRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { diff --git a/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyResponse.java b/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyResponse.java new file mode 100644 index 0000000..b044059 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyResponse.java @@ -0,0 +1,139 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** SetRoutingPolicyResponse */ +@JsonPropertyOrder({SetRoutingPolicyResponse.JSON_PROPERTY_SUCCESS}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SetRoutingPolicyResponse { + public static final String JSON_PROPERTY_SUCCESS = "success"; + private Boolean success; + + public SetRoutingPolicyResponse() {} + + public SetRoutingPolicyResponse success(Boolean success) { + this.success = success; + return this; + } + + /** + * Get success + * + * @return success + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSuccess() { + return success; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSuccess(Boolean success) { + this.success = success; + } + + /** Return true if this SetRoutingPolicyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SetRoutingPolicyResponse setRoutingPolicyResponse = (SetRoutingPolicyResponse) o; + return Objects.equals(this.success, setRoutingPolicyResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SetRoutingPolicyResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).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 `success` to the URL query string + if (getSuccess() != null) { + joiner.add( + String.format( + "%ssuccess%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSuccess()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDto.java b/src/main/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDto.java new file mode 100644 index 0000000..e202966 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDto.java @@ -0,0 +1,225 @@ +/* + * 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; + +/** StellarRippleCreateParamsDto */ +@JsonPropertyOrder({ + StellarRippleCreateParamsDto.JSON_PROPERTY_SYMBOL, + StellarRippleCreateParamsDto.JSON_PROPERTY_NAME, + StellarRippleCreateParamsDto.JSON_PROPERTY_ISSUER_ADDRESS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StellarRippleCreateParamsDto { + public static final String JSON_PROPERTY_SYMBOL = "symbol"; + private String symbol; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ISSUER_ADDRESS = "issuerAddress"; + private String issuerAddress; + + public StellarRippleCreateParamsDto() {} + + public StellarRippleCreateParamsDto symbol(String symbol) { + this.symbol = symbol; + return this; + } + + /** + * The symbol of the token + * + * @return symbol + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSymbol() { + return symbol; + } + + @JsonProperty(JSON_PROPERTY_SYMBOL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public StellarRippleCreateParamsDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the token + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + public StellarRippleCreateParamsDto issuerAddress(String issuerAddress) { + this.issuerAddress = issuerAddress; + return this; + } + + /** + * The address of the issuer of this token. Will be part of the identifier of this token on + * chain. + * + * @return issuerAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ISSUER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIssuerAddress() { + return issuerAddress; + } + + @JsonProperty(JSON_PROPERTY_ISSUER_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setIssuerAddress(String issuerAddress) { + this.issuerAddress = issuerAddress; + } + + /** Return true if this StellarRippleCreateParamsDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StellarRippleCreateParamsDto stellarRippleCreateParamsDto = + (StellarRippleCreateParamsDto) o; + return Objects.equals(this.symbol, stellarRippleCreateParamsDto.symbol) + && Objects.equals(this.name, stellarRippleCreateParamsDto.name) + && Objects.equals(this.issuerAddress, stellarRippleCreateParamsDto.issuerAddress); + } + + @Override + public int hashCode() { + return Objects.hash(symbol, name, issuerAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StellarRippleCreateParamsDto {\n"); + sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" issuerAddress: ").append(toIndentedString(issuerAddress)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `symbol` to the URL query string + if (getSymbol() != null) { + joiner.add( + String.format( + "%ssymbol%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getSymbol()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `issuerAddress` to the URL query string + if (getIssuerAddress() != null) { + joiner.add( + String.format( + "%sissuerAddress%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getIssuerAddress()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TemplatesPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/TemplatesPaginatedResponse.java new file mode 100644 index 0000000..0c4f573 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TemplatesPaginatedResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** TemplatesPaginatedResponse */ +@JsonPropertyOrder({ + TemplatesPaginatedResponse.JSON_PROPERTY_DATA, + TemplatesPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TemplatesPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public TemplatesPaginatedResponse() {} + + public TemplatesPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public TemplatesPaginatedResponse addDataItem(LeanContractDto dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public TemplatesPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this TemplatesPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplatesPaginatedResponse templatesPaginatedResponse = (TemplatesPaginatedResponse) o; + return Objects.equals(this.data, templatesPaginatedResponse.data) + && Objects.equals(this.next, templatesPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplatesPaginatedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java new file mode 100644 index 0000000..ae0fce5 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkDto.java @@ -0,0 +1,410 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokenLinkDto */ +@JsonPropertyOrder({ + TokenLinkDto.JSON_PROPERTY_ID, + TokenLinkDto.JSON_PROPERTY_STATUS, + TokenLinkDto.JSON_PROPERTY_TYPE, + TokenLinkDto.JSON_PROPERTY_REF_ID, + TokenLinkDto.JSON_PROPERTY_DISPLAY_NAME, + TokenLinkDto.JSON_PROPERTY_TOKEN_METADATA +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenLinkDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** The token status */ + public enum StatusEnum { + PENDING("PENDING"), + + COMPLETED("COMPLETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + /** The type of token */ + public enum TypeEnum { + FUNGIBLE_TOKEN("FUNGIBLE_TOKEN"), + + NON_FUNGIBLE_TOKEN("NON_FUNGIBLE_TOKEN"), + + TOKEN_UTILITY("TOKEN_UTILITY"), + + TOKEN_EXTENSION("TOKEN_EXTENSION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_REF_ID = "refId"; + private String refId; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_TOKEN_METADATA = "tokenMetadata"; + private TokenLinkDtoTokenMetadata tokenMetadata; + + public TokenLinkDto() {} + + public TokenLinkDto id(String id) { + this.id = id; + return this; + } + + /** + * The token link id + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public TokenLinkDto status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The token status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + public TokenLinkDto type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of token + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + public TokenLinkDto refId(String refId) { + this.refId = refId; + return this; + } + + /** + * The Fireblocks' reference id. Can be a Fireblocks' supported asset, collectionId or + * contractId + * + * @return refId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REF_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRefId() { + return refId; + } + + @JsonProperty(JSON_PROPERTY_REF_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRefId(String refId) { + this.refId = refId; + } + + public TokenLinkDto displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The token display name. If was not provided, would be taken from the contract template name + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public TokenLinkDto tokenMetadata(TokenLinkDtoTokenMetadata tokenMetadata) { + this.tokenMetadata = tokenMetadata; + return this; + } + + /** + * Get tokenMetadata + * + * @return tokenMetadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TokenLinkDtoTokenMetadata getTokenMetadata() { + return tokenMetadata; + } + + @JsonProperty(JSON_PROPERTY_TOKEN_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTokenMetadata(TokenLinkDtoTokenMetadata tokenMetadata) { + this.tokenMetadata = tokenMetadata; + } + + /** Return true if this TokenLinkDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenLinkDto tokenLinkDto = (TokenLinkDto) o; + return Objects.equals(this.id, tokenLinkDto.id) + && Objects.equals(this.status, tokenLinkDto.status) + && Objects.equals(this.type, tokenLinkDto.type) + && Objects.equals(this.refId, tokenLinkDto.refId) + && Objects.equals(this.displayName, tokenLinkDto.displayName) + && Objects.equals(this.tokenMetadata, tokenLinkDto.tokenMetadata); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, type, refId, displayName, tokenMetadata); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenLinkDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" refId: ").append(toIndentedString(refId)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" tokenMetadata: ").append(toIndentedString(tokenMetadata)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `refId` to the URL query string + if (getRefId() != null) { + joiner.add( + String.format( + "%srefId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRefId()), 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 `tokenMetadata` to the URL query string + if (getTokenMetadata() != null) { + joiner.add(getTokenMetadata().toUrlQueryString(prefix + "tokenMetadata" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadata.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadata.java new file mode 100644 index 0000000..9a58a41 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadata.java @@ -0,0 +1,396 @@ +/* + * 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 = TokenLinkDtoTokenMetadata.TokenLinkDtoTokenMetadataDeserializer.class) +@JsonSerialize(using = TokenLinkDtoTokenMetadata.TokenLinkDtoTokenMetadataSerializer.class) +public class TokenLinkDtoTokenMetadata extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TokenLinkDtoTokenMetadata.class.getName()); + + public static class TokenLinkDtoTokenMetadataSerializer + extends StdSerializer { + public TokenLinkDtoTokenMetadataSerializer(Class t) { + super(t); + } + + public TokenLinkDtoTokenMetadataSerializer() { + this(null); + } + + @Override + public void serialize( + TokenLinkDtoTokenMetadata value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TokenLinkDtoTokenMetadataDeserializer + extends StdDeserializer { + public TokenLinkDtoTokenMetadataDeserializer() { + this(TokenLinkDtoTokenMetadata.class); + } + + public TokenLinkDtoTokenMetadataDeserializer(Class vc) { + super(vc); + } + + @Override + public TokenLinkDtoTokenMetadata 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 AssetMetadataDto + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AssetMetadataDto.class.equals(Integer.class) + || AssetMetadataDto.class.equals(Long.class) + || AssetMetadataDto.class.equals(Float.class) + || AssetMetadataDto.class.equals(Double.class) + || AssetMetadataDto.class.equals(Boolean.class) + || AssetMetadataDto.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AssetMetadataDto.class.equals(Integer.class) + || AssetMetadataDto.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AssetMetadataDto.class.equals(Float.class) + || AssetMetadataDto.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AssetMetadataDto.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AssetMetadataDto.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AssetMetadataDto.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 'AssetMetadataDto'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AssetMetadataDto'", e); + } + + // deserialize CollectionMetadataDto + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CollectionMetadataDto.class.equals(Integer.class) + || CollectionMetadataDto.class.equals(Long.class) + || CollectionMetadataDto.class.equals(Float.class) + || CollectionMetadataDto.class.equals(Double.class) + || CollectionMetadataDto.class.equals(Boolean.class) + || CollectionMetadataDto.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CollectionMetadataDto.class.equals(Integer.class) + || CollectionMetadataDto.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CollectionMetadataDto.class.equals(Float.class) + || CollectionMetadataDto.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CollectionMetadataDto.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CollectionMetadataDto.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(CollectionMetadataDto.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 'CollectionMetadataDto'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CollectionMetadataDto'", e); + } + + // deserialize ContractMetadataDto + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ContractMetadataDto.class.equals(Integer.class) + || ContractMetadataDto.class.equals(Long.class) + || ContractMetadataDto.class.equals(Float.class) + || ContractMetadataDto.class.equals(Double.class) + || ContractMetadataDto.class.equals(Boolean.class) + || ContractMetadataDto.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ContractMetadataDto.class.equals(Integer.class) + || ContractMetadataDto.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ContractMetadataDto.class.equals(Float.class) + || ContractMetadataDto.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ContractMetadataDto.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ContractMetadataDto.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(ContractMetadataDto.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 'ContractMetadataDto'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ContractMetadataDto'", e); + } + + if (match == 1) { + TokenLinkDtoTokenMetadata ret = new TokenLinkDtoTokenMetadata(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for TokenLinkDtoTokenMetadata: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public TokenLinkDtoTokenMetadata getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "TokenLinkDtoTokenMetadata cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public TokenLinkDtoTokenMetadata() { + super("oneOf", Boolean.FALSE); + } + + public TokenLinkDtoTokenMetadata(AssetMetadataDto o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TokenLinkDtoTokenMetadata(CollectionMetadataDto o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TokenLinkDtoTokenMetadata(ContractMetadataDto o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AssetMetadataDto", AssetMetadataDto.class); + schemas.put("CollectionMetadataDto", CollectionMetadataDto.class); + schemas.put("ContractMetadataDto", ContractMetadataDto.class); + JSON.registerDescendants( + TokenLinkDtoTokenMetadata.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return TokenLinkDtoTokenMetadata.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AssetMetadataDto, CollectionMetadataDto, ContractMetadataDto + * + *

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(AssetMetadataDto.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CollectionMetadataDto.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ContractMetadataDto.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be AssetMetadataDto, CollectionMetadataDto," + + " ContractMetadataDto"); + } + + /** + * Get the actual instance, which can be the following: AssetMetadataDto, CollectionMetadataDto, + * ContractMetadataDto + * + * @return The actual instance (AssetMetadataDto, CollectionMetadataDto, ContractMetadataDto) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AssetMetadataDto`. If the actual instance is not + * `AssetMetadataDto`, the ClassCastException will be thrown. + * + * @return The actual instance of `AssetMetadataDto` + * @throws ClassCastException if the instance is not `AssetMetadataDto` + */ + public AssetMetadataDto getAssetMetadataDto() throws ClassCastException { + return (AssetMetadataDto) super.getActualInstance(); + } + + /** + * Get the actual instance of `CollectionMetadataDto`. If the actual instance is not + * `CollectionMetadataDto`, the ClassCastException will be thrown. + * + * @return The actual instance of `CollectionMetadataDto` + * @throws ClassCastException if the instance is not `CollectionMetadataDto` + */ + public CollectionMetadataDto getCollectionMetadataDto() throws ClassCastException { + return (CollectionMetadataDto) super.getActualInstance(); + } + + /** + * Get the actual instance of `ContractMetadataDto`. If the actual instance is not + * `ContractMetadataDto`, the ClassCastException will be thrown. + * + * @return The actual instance of `ContractMetadataDto` + * @throws ClassCastException if the instance is not `ContractMetadataDto` + */ + public ContractMetadataDto getContractMetadataDto() throws ClassCastException { + return (ContractMetadataDto) 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 AssetMetadataDto) { + if (getActualInstance() != null) { + joiner.add( + ((AssetMetadataDto) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof CollectionMetadataDto) { + if (getActualInstance() != null) { + joiner.add( + ((CollectionMetadataDto) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ContractMetadataDto) { + if (getActualInstance() != null) { + joiner.add( + ((ContractMetadataDto) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkExistsHttpError.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkExistsHttpError.java new file mode 100644 index 0000000..29db851 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkExistsHttpError.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokenLinkExistsHttpError */ +@JsonPropertyOrder({ + TokenLinkExistsHttpError.JSON_PROPERTY_STATUS_CODE, + TokenLinkExistsHttpError.JSON_PROPERTY_MESSAGE, + TokenLinkExistsHttpError.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenLinkExistsHttpError { + public static final String JSON_PROPERTY_STATUS_CODE = "statusCode"; + private Integer statusCode; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public TokenLinkExistsHttpError() {} + + public TokenLinkExistsHttpError statusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * HTTP status code + * + * @return statusCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getStatusCode() { + return statusCode; + } + + @JsonProperty(JSON_PROPERTY_STATUS_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusCode(Integer statusCode) { + this.statusCode = statusCode; + } + + public TokenLinkExistsHttpError message(String message) { + this.message = message; + return this; + } + + /** + * Error message + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + public TokenLinkExistsHttpError error(String error) { + this.error = error; + return this; + } + + /** + * Short description of the HTTP error + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(String error) { + this.error = error; + } + + /** Return true if this TokenLinkExistsHttpError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenLinkExistsHttpError tokenLinkExistsHttpError = (TokenLinkExistsHttpError) o; + return Objects.equals(this.statusCode, tokenLinkExistsHttpError.statusCode) + && Objects.equals(this.message, tokenLinkExistsHttpError.message) + && Objects.equals(this.error, tokenLinkExistsHttpError.error); + } + + @Override + public int hashCode() { + return Objects.hash(statusCode, message, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenLinkExistsHttpError {\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).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 `statusCode` to the URL query string + if (getStatusCode() != null) { + joiner.add( + String.format( + "%sstatusCode%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStatusCode()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getMessage()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add( + String.format( + "%serror%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getError()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java b/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java new file mode 100644 index 0000000..0b719bc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokenLinkRequestDto.java @@ -0,0 +1,263 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokenLinkRequestDto */ +@JsonPropertyOrder({ + TokenLinkRequestDto.JSON_PROPERTY_TYPE, + TokenLinkRequestDto.JSON_PROPERTY_REF_ID, + TokenLinkRequestDto.JSON_PROPERTY_DISPLAY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokenLinkRequestDto { + /** The type of token being linked */ + public enum TypeEnum { + FUNGIBLE_TOKEN("FUNGIBLE_TOKEN"), + + NON_FUNGIBLE_TOKEN("NON_FUNGIBLE_TOKEN"), + + TOKEN_UTILITY("TOKEN_UTILITY"), + + TOKEN_EXTENSION("TOKEN_EXTENSION"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_REF_ID = "refId"; + private String refId; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public TokenLinkRequestDto() {} + + public TokenLinkRequestDto type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of token being linked + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + public TokenLinkRequestDto refId(String refId) { + this.refId = refId; + return this; + } + + /** + * The Fireblocks' token link reference id. For example, 'BQ5R_BDESC_ABC' if + * it's a fungible asset + * + * @return refId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REF_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRefId() { + return refId; + } + + @JsonProperty(JSON_PROPERTY_REF_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRefId(String refId) { + this.refId = refId; + } + + public TokenLinkRequestDto displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The token display name + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + /** Return true if this TokenLinkRequestDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenLinkRequestDto tokenLinkRequestDto = (TokenLinkRequestDto) o; + return Objects.equals(this.type, tokenLinkRequestDto.type) + && Objects.equals(this.refId, tokenLinkRequestDto.refId) + && Objects.equals(this.displayName, tokenLinkRequestDto.displayName); + } + + @Override + public int hashCode() { + return Objects.hash(type, refId, displayName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenLinkRequestDto {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" refId: ").append(toIndentedString(refId)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append("}"); + 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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `refId` to the URL query string + if (getRefId() != null) { + joiner.add( + String.format( + "%srefId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRefId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `displayName` to the URL query string + if (getDisplayName() != null) { + joiner.add( + String.format( + "%sdisplayName%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDisplayName()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java b/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java index b30f31a..47cf7fc 100644 --- a/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TokenOwnershipResponse.java @@ -93,10 +93,14 @@ public enum BlockchainDescriptorEnum { ETH_TEST5("ETH_TEST5"), + ETH_TEST6("ETH_TEST6"), + POLYGON("POLYGON"), POLYGON_TEST_MUMBAI("POLYGON_TEST_MUMBAI"), + AMOY_POLYGON_TEST("AMOY_POLYGON_TEST"), + XTZ("XTZ"), XTZ_TEST("XTZ_TEST"), diff --git a/src/main/java/com/fireblocks/sdk/model/TokenResponse.java b/src/main/java/com/fireblocks/sdk/model/TokenResponse.java index 7090502..5d6935e 100644 --- a/src/main/java/com/fireblocks/sdk/model/TokenResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TokenResponse.java @@ -73,10 +73,14 @@ public enum BlockchainDescriptorEnum { ETH_TEST5("ETH_TEST5"), + ETH_TEST6("ETH_TEST6"), + POLYGON("POLYGON"), POLYGON_TEST_MUMBAI("POLYGON_TEST_MUMBAI"), + AMOY_POLYGON_TEST("AMOY_POLYGON_TEST"), + XTZ("XTZ"), XTZ_TEST("XTZ_TEST"), diff --git a/src/main/java/com/fireblocks/sdk/model/TokensPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/TokensPaginatedResponse.java new file mode 100644 index 0000000..adbf689 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TokensPaginatedResponse.java @@ -0,0 +1,203 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** TokensPaginatedResponse */ +@JsonPropertyOrder({ + TokensPaginatedResponse.JSON_PROPERTY_DATA, + TokensPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TokensPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public TokensPaginatedResponse() {} + + public TokensPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public TokensPaginatedResponse addDataItem(TokenLinkDto dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public TokensPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this TokensPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokensPaginatedResponse tokensPaginatedResponse = (TokensPaginatedResponse) o; + return Objects.equals(this.data, tokensPaginatedResponse.data) + && Objects.equals(this.next, tokensPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokensPaginatedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionFee.java b/src/main/java/com/fireblocks/sdk/model/TransactionFee.java index 753cbaf..9b4d3bc 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionFee.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionFee.java @@ -29,7 +29,9 @@ TransactionFee.JSON_PROPERTY_GAS_LIMIT, TransactionFee.JSON_PROPERTY_NETWORK_FEE, TransactionFee.JSON_PROPERTY_BASE_FEE, - TransactionFee.JSON_PROPERTY_PRIORITY_FEE + TransactionFee.JSON_PROPERTY_PRIORITY_FEE, + TransactionFee.JSON_PROPERTY_MAX_FEE_PER_GAS_DELTA, + TransactionFee.JSON_PROPERTY_L1_FEE }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TransactionFee { @@ -51,6 +53,12 @@ public class TransactionFee { public static final String JSON_PROPERTY_PRIORITY_FEE = "priorityFee"; private BigDecimal priorityFee; + public static final String JSON_PROPERTY_MAX_FEE_PER_GAS_DELTA = "maxFeePerGasDelta"; + private String maxFeePerGasDelta; + + public static final String JSON_PROPERTY_L1_FEE = "l1Fee"; + private String l1Fee; + public TransactionFee() {} public TransactionFee feePerByte(String feePerByte) { @@ -191,6 +199,52 @@ public void setPriorityFee(BigDecimal priorityFee) { this.priorityFee = priorityFee; } + public TransactionFee maxFeePerGasDelta(String maxFeePerGasDelta) { + this.maxFeePerGasDelta = maxFeePerGasDelta; + return this; + } + + /** + * Max Fee Per Gas Delta added only for EIP-1559 (ETH assets) + * + * @return maxFeePerGasDelta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_FEE_PER_GAS_DELTA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMaxFeePerGasDelta() { + return maxFeePerGasDelta; + } + + @JsonProperty(JSON_PROPERTY_MAX_FEE_PER_GAS_DELTA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxFeePerGasDelta(String maxFeePerGasDelta) { + this.maxFeePerGasDelta = maxFeePerGasDelta; + } + + public TransactionFee l1Fee(String l1Fee) { + this.l1Fee = l1Fee; + return this; + } + + /** + * Layer 1 fee for Layer 2 chains + * + * @return l1Fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_L1_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getL1Fee() { + return l1Fee; + } + + @JsonProperty(JSON_PROPERTY_L1_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setL1Fee(String l1Fee) { + this.l1Fee = l1Fee; + } + /** Return true if this TransactionFee object is equal to o. */ @Override public boolean equals(Object o) { @@ -206,12 +260,22 @@ public boolean equals(Object o) { && Objects.equals(this.gasLimit, transactionFee.gasLimit) && Objects.equals(this.networkFee, transactionFee.networkFee) && Objects.equals(this.baseFee, transactionFee.baseFee) - && Objects.equals(this.priorityFee, transactionFee.priorityFee); + && Objects.equals(this.priorityFee, transactionFee.priorityFee) + && Objects.equals(this.maxFeePerGasDelta, transactionFee.maxFeePerGasDelta) + && Objects.equals(this.l1Fee, transactionFee.l1Fee); } @Override public int hashCode() { - return Objects.hash(feePerByte, gasPrice, gasLimit, networkFee, baseFee, priorityFee); + return Objects.hash( + feePerByte, + gasPrice, + gasLimit, + networkFee, + baseFee, + priorityFee, + maxFeePerGasDelta, + l1Fee); } @Override @@ -224,6 +288,10 @@ public String toString() { sb.append(" networkFee: ").append(toIndentedString(networkFee)).append("\n"); sb.append(" baseFee: ").append(toIndentedString(baseFee)).append("\n"); sb.append(" priorityFee: ").append(toIndentedString(priorityFee)).append("\n"); + sb.append(" maxFeePerGasDelta: ") + .append(toIndentedString(maxFeePerGasDelta)) + .append("\n"); + sb.append(" l1Fee: ").append(toIndentedString(l1Fee)).append("\n"); sb.append("}"); return sb.toString(); } @@ -341,6 +409,30 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } + // add `maxFeePerGasDelta` to the URL query string + if (getMaxFeePerGasDelta() != null) { + joiner.add( + String.format( + "%smaxFeePerGasDelta%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getMaxFeePerGasDelta()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `l1Fee` to the URL query string + if (getL1Fee() != null) { + joiner.add( + String.format( + "%sl1Fee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getL1Fee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java b/src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java index a19efd9..3951fe3 100644 --- a/src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/UpdateVaultAccountAssetAddressRequest.java @@ -53,7 +53,7 @@ public void setDescription(String description) { this.description = description; } - /** Return true if this updateVaultAccountAssetAddress_request object is equal to o. */ + /** Return true if this UpdateVaultAccountAssetAddressRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { diff --git a/src/main/java/com/fireblocks/sdk/model/VendorDto.java b/src/main/java/com/fireblocks/sdk/model/VendorDto.java new file mode 100644 index 0000000..de0f14e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/VendorDto.java @@ -0,0 +1,177 @@ +/* + * 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; + +/** VendorDto */ +@JsonPropertyOrder({VendorDto.JSON_PROPERTY_ID, VendorDto.JSON_PROPERTY_NAME}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class VendorDto { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public VendorDto() {} + + public VendorDto id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the vendor of this contract template + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(String id) { + this.id = id; + } + + public VendorDto name(String name) { + this.name = name; + return this; + } + + /** + * The name of the vendor of this contract template + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + /** Return true if this VendorDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VendorDto vendorDto = (VendorDto) o; + return Objects.equals(this.id, vendorDto.id) && Objects.equals(this.name, vendorDto.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VendorDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WriteAbiFunction.java b/src/main/java/com/fireblocks/sdk/model/WriteAbiFunction.java new file mode 100644 index 0000000..753c7a8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WriteAbiFunction.java @@ -0,0 +1,453 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** WriteAbiFunction */ +@JsonPropertyOrder({ + WriteAbiFunction.JSON_PROPERTY_STATE_MUTABILITY, + WriteAbiFunction.JSON_PROPERTY_OUTPUTS, + WriteAbiFunction.JSON_PROPERTY_TYPE, + WriteAbiFunction.JSON_PROPERTY_NAME, + WriteAbiFunction.JSON_PROPERTY_INPUTS, + WriteAbiFunction.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WriteAbiFunction { + /** Gets or Sets stateMutability */ + public enum StateMutabilityEnum { + PAYABLE("payable"), + + NONPAYABLE("nonpayable"); + + private String value; + + StateMutabilityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StateMutabilityEnum fromValue(String value) { + for (StateMutabilityEnum b : StateMutabilityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATE_MUTABILITY = "stateMutability"; + private StateMutabilityEnum stateMutability; + + public static final String JSON_PROPERTY_OUTPUTS = "outputs"; + private List outputs; + + /** Gets or Sets type */ + public enum TypeEnum { + FUNCTION("function"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + private List inputs = new ArrayList<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public WriteAbiFunction() {} + + public WriteAbiFunction stateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + return this; + } + + /** + * Get stateMutability + * + * @return stateMutability + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StateMutabilityEnum getStateMutability() { + return stateMutability; + } + + @JsonProperty(JSON_PROPERTY_STATE_MUTABILITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStateMutability(StateMutabilityEnum stateMutability) { + this.stateMutability = stateMutability; + } + + public WriteAbiFunction outputs(List outputs) { + this.outputs = outputs; + return this; + } + + public WriteAbiFunction addOutputsItem(Parameter outputsItem) { + if (this.outputs == null) { + this.outputs = new ArrayList<>(); + } + this.outputs.add(outputsItem); + return this; + } + + /** + * Get outputs + * + * @return outputs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOutputs() { + return outputs; + } + + @JsonProperty(JSON_PROPERTY_OUTPUTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutputs(List outputs) { + this.outputs = outputs; + } + + public WriteAbiFunction type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(TypeEnum type) { + this.type = type; + } + + public WriteAbiFunction name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + public WriteAbiFunction inputs(List inputs) { + this.inputs = inputs; + return this; + } + + public WriteAbiFunction addInputsItem(ParameterWithValue inputsItem) { + if (this.inputs == null) { + this.inputs = new ArrayList<>(); + } + this.inputs.add(inputsItem); + return this; + } + + /** + * Get inputs + * + * @return inputs + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInputs() { + return inputs; + } + + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setInputs(List inputs) { + this.inputs = inputs; + } + + public WriteAbiFunction description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** Return true if this WriteAbiFunction object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteAbiFunction writeAbiFunction = (WriteAbiFunction) o; + return Objects.equals(this.stateMutability, writeAbiFunction.stateMutability) + && Objects.equals(this.outputs, writeAbiFunction.outputs) + && Objects.equals(this.type, writeAbiFunction.type) + && Objects.equals(this.name, writeAbiFunction.name) + && Objects.equals(this.inputs, writeAbiFunction.inputs) + && Objects.equals(this.description, writeAbiFunction.description); + } + + @Override + public int hashCode() { + return Objects.hash(stateMutability, outputs, type, name, inputs, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WriteAbiFunction {\n"); + sb.append(" stateMutability: ").append(toIndentedString(stateMutability)).append("\n"); + sb.append(" outputs: ").append(toIndentedString(outputs)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 `stateMutability` to the URL query string + if (getStateMutability() != null) { + joiner.add( + String.format( + "%sstateMutability%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStateMutability()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `outputs` to the URL query string + if (getOutputs() != null) { + for (int i = 0; i < getOutputs().size(); i++) { + if (getOutputs().get(i) != null) { + joiner.add( + getOutputs() + .get(i) + .toUrlQueryString( + String.format( + "%soutputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getType()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `inputs` to the URL query string + if (getInputs() != null) { + for (int i = 0; i < getInputs().size(); i++) { + if (getInputs().get(i) != null) { + joiner.add( + getInputs() + .get(i) + .toUrlQueryString( + String.format( + "%sinputs%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `description` to the URL query string + if (getDescription() != null) { + joiner.add( + String.format( + "%sdescription%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getDescription()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java new file mode 100644 index 0000000..bce6c18 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java @@ -0,0 +1,406 @@ +/* + * 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; + +/** WriteCallFunctionDto */ +@JsonPropertyOrder({ + WriteCallFunctionDto.JSON_PROPERTY_VAULT_ACCOUNT_ID, + WriteCallFunctionDto.JSON_PROPERTY_ABI_FUNCTION, + WriteCallFunctionDto.JSON_PROPERTY_AMOUNT, + WriteCallFunctionDto.JSON_PROPERTY_FEE_LEVEL, + WriteCallFunctionDto.JSON_PROPERTY_FEE, + WriteCallFunctionDto.JSON_PROPERTY_NOTE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WriteCallFunctionDto { + public static final String JSON_PROPERTY_VAULT_ACCOUNT_ID = "vaultAccountId"; + private String vaultAccountId; + + public static final String JSON_PROPERTY_ABI_FUNCTION = "abiFunction"; + private List abiFunction = new ArrayList<>(); + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private String amount; + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + */ + public enum FeeLevelEnum { + LOW("LOW"), + + MEDIUM("MEDIUM"), + + HIGH("HIGH"); + + private String value; + + FeeLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeLevelEnum fromValue(String value) { + for (FeeLevelEnum b : FeeLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; + private FeeLevelEnum feeLevel; + + public static final String JSON_PROPERTY_FEE = "fee"; + private String fee; + + public static final String JSON_PROPERTY_NOTE = "note"; + private String note; + + public WriteCallFunctionDto() {} + + public WriteCallFunctionDto vaultAccountId(String vaultAccountId) { + this.vaultAccountId = vaultAccountId; + return this; + } + + /** + * The vault account id this contract was deploy from + * + * @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 WriteCallFunctionDto abiFunction(List abiFunction) { + this.abiFunction = abiFunction; + return this; + } + + public WriteCallFunctionDto addAbiFunctionItem(WriteAbiFunction abiFunctionItem) { + if (this.abiFunction == null) { + this.abiFunction = new ArrayList<>(); + } + this.abiFunction.add(abiFunctionItem); + return this; + } + + /** + * The abi of the read function you wish to call + * + * @return abiFunction + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAbiFunction() { + return abiFunction; + } + + @JsonProperty(JSON_PROPERTY_ABI_FUNCTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAbiFunction(List abiFunction) { + this.abiFunction = abiFunction; + } + + public WriteCallFunctionDto amount(String amount) { + this.amount = amount; + return this; + } + + /** + * Amount in base asset. Being used in payable functions + * + * @return amount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(String amount) { + this.amount = amount; + } + + public WriteCallFunctionDto feeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + return this; + } + + /** + * Fee level for the write function transaction. interchangeable with the 'fee' field + * + * @return feeLevel + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeLevelEnum getFeeLevel() { + return feeLevel; + } + + @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeLevel(FeeLevelEnum feeLevel) { + this.feeLevel = feeLevel; + } + + public WriteCallFunctionDto 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 WriteCallFunctionDto note(String note) { + this.note = note; + return this; + } + + /** + * Custom note, not sent to the blockchain, that describes the transaction at your Fireblocks + * workspace + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(String note) { + this.note = note; + } + + /** Return true if this WriteCallFunctionDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteCallFunctionDto writeCallFunctionDto = (WriteCallFunctionDto) o; + return Objects.equals(this.vaultAccountId, writeCallFunctionDto.vaultAccountId) + && Objects.equals(this.abiFunction, writeCallFunctionDto.abiFunction) + && Objects.equals(this.amount, writeCallFunctionDto.amount) + && Objects.equals(this.feeLevel, writeCallFunctionDto.feeLevel) + && Objects.equals(this.fee, writeCallFunctionDto.fee) + && Objects.equals(this.note, writeCallFunctionDto.note); + } + + @Override + public int hashCode() { + return Objects.hash(vaultAccountId, abiFunction, amount, feeLevel, fee, note); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WriteCallFunctionDto {\n"); + sb.append(" vaultAccountId: ").append(toIndentedString(vaultAccountId)).append("\n"); + sb.append(" abiFunction: ").append(toIndentedString(abiFunction)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).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 `abiFunction` to the URL query string + if (getAbiFunction() != null) { + for (int i = 0; i < getAbiFunction().size(); i++) { + if (getAbiFunction().get(i) != null) { + joiner.add( + getAbiFunction() + .get(i) + .toUrlQueryString( + String.format( + "%sabiFunction%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getAmount()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `feeLevel` to the URL query string + if (getFeeLevel() != null) { + joiner.add( + String.format( + "%sfeeLevel%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFeeLevel()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add( + String.format( + "%sfee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `note` to the URL query string + if (getNote() != null) { + joiner.add( + String.format( + "%snote%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNote()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDto.java b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDto.java new file mode 100644 index 0000000..25ce737 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDto.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; + +/** WriteCallFunctionResponseDto */ +@JsonPropertyOrder({WriteCallFunctionResponseDto.JSON_PROPERTY_TX_ID}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class WriteCallFunctionResponseDto { + public static final String JSON_PROPERTY_TX_ID = "txId"; + private String txId; + + public WriteCallFunctionResponseDto() {} + + public WriteCallFunctionResponseDto txId(String txId) { + this.txId = txId; + return this; + } + + /** + * Get txId + * + * @return txId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTxId(String txId) { + this.txId = txId; + } + + /** Return true if this WriteCallFunctionResponseDto object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WriteCallFunctionResponseDto writeCallFunctionResponseDto = + (WriteCallFunctionResponseDto) o; + return Objects.equals(this.txId, writeCallFunctionResponseDto.txId); + } + + @Override + public int hashCode() { + return Objects.hash(txId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WriteCallFunctionResponseDto {\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTxId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index e0f750f..a66da8e 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -122,7 +122,7 @@ private void runAndVerifyAuthorizationValue( Assert.assertEquals(expectedAuthorizationValue, headerMap.get("Authorization").get(0)); Assert.assertEquals("application/json", headerMap.get("Content-Type").get(0)); Assert.assertEquals( - "testUserAgent fireblocks/sdk/java/1.1.0", headerMap.get("User-Agent").get(0)); + "testUserAgent fireblocks/sdk/java/2.0.0", headerMap.get("User-Agent").get(0)); Assert.assertEquals("testApiKey", headerMap.get("X-API-Key").get(0)); } } @@ -255,7 +255,7 @@ public void testHeadersExistsInRequest() { Assert.assertEquals("Bearer mockJwt", headerMap.get("Authorization").get(0)); Assert.assertEquals("application/json", headerMap.get("Content-Type").get(0)); Assert.assertEquals( - "testUserAgent fireblocks/sdk/java/1.1.0", headerMap.get("User-Agent").get(0)); + "testUserAgent fireblocks/sdk/java/2.0.0", headerMap.get("User-Agent").get(0)); Assert.assertEquals("testApiKey", headerMap.get("X-API-Key").get(0)); } } @@ -366,6 +366,22 @@ public void testGetConsoleUserApi() { Assert.assertSame(consoleUser, fireblocks.consoleUser()); } + @Test + public void testGetContractInteractionsApi() { + setupFireblocks(true, null, null); + ContractInteractionsApi contractInteractions = fireblocks.contractInteractions(); + Assert.assertNotNull(contractInteractions); + Assert.assertSame(contractInteractions, fireblocks.contractInteractions()); + } + + @Test + public void testGetContractTemplatesApi() { + setupFireblocks(true, null, null); + ContractTemplatesApi contractTemplates = fireblocks.contractTemplates(); + Assert.assertNotNull(contractTemplates); + Assert.assertSame(contractTemplates, fireblocks.contractTemplates()); + } + @Test public void testGetContractsApi() { setupFireblocks(true, null, null); @@ -382,6 +398,14 @@ public void testGetCosignersBetaApi() { Assert.assertSame(cosignersBeta, fireblocks.cosignersBeta()); } + @Test + public void testGetDeployedContractsApi() { + setupFireblocks(true, null, null); + DeployedContractsApi deployedContracts = fireblocks.deployedContracts(); + Assert.assertNotNull(deployedContracts); + Assert.assertSame(deployedContracts, fireblocks.deployedContracts()); + } + @Test public void testGetExchangeAccountsApi() { setupFireblocks(true, null, null); @@ -502,6 +526,14 @@ public void testGetStakingBetaApi() { Assert.assertSame(stakingBeta, fireblocks.stakingBeta()); } + @Test + public void testGetTokenizationApi() { + setupFireblocks(true, null, null); + TokenizationApi tokenization = fireblocks.tokenization(); + Assert.assertNotNull(tokenization); + Assert.assertSame(tokenization, fireblocks.tokenization()); + } + @Test public void testGetTransactionsApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java b/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java index 0e6da7a..8ab4a09 100644 --- a/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java +++ b/src/test/java/com/fireblocks/sdk/UserAgentUtilTest.java @@ -14,7 +14,7 @@ public class UserAgentUtilTest { public void testGetUserAgentWithAnonymousPlatform() { AdditionalOptions additionalOptions = new AdditionalOptions().isAnonymousPlatform(true); String userAgent = UserAgentUtil.getUserAgent(additionalOptions); - Assert.assertEquals("fireblocks/sdk/java/1.1.0", userAgent); + Assert.assertEquals("fireblocks/sdk/java/2.0.0", userAgent); } @Test @@ -26,7 +26,7 @@ public void testGetUserAgentWithoutAnonymousPlatform() { mockedSystem.when(() -> SystemWrapper.getProperty("os.version")).thenReturn("10.15.7"); mockedSystem.when(() -> SystemWrapper.getProperty("os.arch")).thenReturn("x86_64"); String userAgent = UserAgentUtil.getUserAgent(additionalOptions); - Assert.assertEquals("fireblocks/sdk/java/1.1.0 (macOS 10.15.7; x86_64)", userAgent); + Assert.assertEquals("fireblocks/sdk/java/2.0.0 (macOS 10.15.7; x86_64)", userAgent); } } @@ -41,7 +41,7 @@ public void testGetUserAgentWithCustomUserAgent() { mockedSystem.when(() -> SystemWrapper.getProperty("os.arch")).thenReturn("x86_64"); String userAgent = UserAgentUtil.getUserAgent(additionalOptions); Assert.assertEquals( - "customUserAgent fireblocks/sdk/java/1.1.0 (macOS 10.15.7; x86_64)", userAgent); + "customUserAgent fireblocks/sdk/java/2.0.0 (macOS 10.15.7; x86_64)", userAgent); } } } diff --git a/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java b/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java index add75e6..88da011 100644 --- a/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java @@ -28,9 +28,9 @@ public class ApiUserApiTest { private final ApiUserApi api = new ApiUserApi(); /** - * create api user + * Create Api user * - *

creates api user + *

Creates Api user in your tenant * * @throws ApiException if the Api call fails */ @@ -44,9 +44,9 @@ public void createApiUserTest() throws ApiException { } /** - * get api users + * Get Api users * - *

get api users from the current tenant + *

Get Api users of your tenant * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java b/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java index fd4f6de..55618e9 100644 --- a/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java @@ -28,9 +28,9 @@ public class ConsoleUserApiTest { private final ConsoleUserApi api = new ConsoleUserApi(); /** - * create console user + * Create console user * - *

creates fireblocks console user + *

Creates console user in your tenant * * @throws ApiException if the Api call fails */ @@ -44,9 +44,9 @@ public void createConsoleUserTest() throws ApiException { } /** - * get console users + * Get console users * - *

get console users from the current tenant + *

Get console users for your tenant * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java new file mode 100644 index 0000000..74ecba1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java @@ -0,0 +1,87 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.ContractAbiResponseDto; +import com.fireblocks.sdk.model.ParameterWithValue; +import com.fireblocks.sdk.model.ReadCallFunctionDto; +import com.fireblocks.sdk.model.WriteCallFunctionDto; +import com.fireblocks.sdk.model.WriteCallFunctionResponseDto; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for ContractInteractionsApi */ +@Ignore +public class ContractInteractionsApiTest { + + private final ContractInteractionsApi api = new ContractInteractionsApi(); + + /** + * Return deployed contract's ABI + * + *

Return deployed contract's ABI by blockchain native asset id and contract address + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDeployedContractAbiTest() throws ApiException { + String contractAddress = null; + String assetId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.getDeployedContractAbi(contractAddress, assetId, idempotencyKey); + } + + /** + * Call a read function on a deployed contract + * + *

Call a read function on a deployed contract by blockchain native asset id and contract + * address + * + * @throws ApiException if the Api call fails + */ + @Test + public void readCallFunctionTest() throws ApiException { + ReadCallFunctionDto readCallFunctionDto = null; + String contractAddress = null; + String assetId = null; + String idempotencyKey = null; + CompletableFuture>> response = + api.readCallFunction(readCallFunctionDto, contractAddress, assetId, idempotencyKey); + } + + /** + * Call a write function on a deployed contract + * + *

Call a write function on a deployed contract by blockchain native asset id and contract + * address. This creates an onchain transaction, thus it is an async operation. It returns a + * transaction id that can be polled for status check + * + * @throws ApiException if the Api call fails + */ + @Test + public void writeCallFunctionTest() throws ApiException { + WriteCallFunctionDto writeCallFunctionDto = null; + String contractAddress = null; + String assetId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.writeCallFunction( + writeCallFunctionDto, contractAddress, assetId, idempotencyKey); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java new file mode 100644 index 0000000..52f25c0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java @@ -0,0 +1,146 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.AbiFunction; +import com.fireblocks.sdk.model.ContractDeployRequest; +import com.fireblocks.sdk.model.ContractDeployResponse; +import com.fireblocks.sdk.model.ContractTemplateDto; +import com.fireblocks.sdk.model.ContractUploadRequest; +import com.fireblocks.sdk.model.TemplatesPaginatedResponse; +import java.math.BigDecimal; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for ContractTemplatesApi */ +@Ignore +public class ContractTemplatesApiTest { + + private final ContractTemplatesApi api = new ContractTemplatesApi(); + + /** + * Delete a contract template by id + * + *

Delete a contract by id. allowed only for private contract templates. Notice: it is + * irreversible! + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteContractTemplateByIdTest() throws ApiException { + String contractTemplateId = null; + + CompletableFuture> response = + api.deleteContractTemplateById(contractTemplateId); + } + + /** + * Deploy contract + * + *

Deploy a new contract by contract template id. If you wish to deploy a token (ERC20, + * ERC721 etc), and create asset please use POST /tokenization + * + * @throws ApiException if the Api call fails + */ + @Test + public void deployContractTest() throws ApiException { + ContractDeployRequest contractDeployRequest = null; + String contractTemplateId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.deployContract(contractDeployRequest, contractTemplateId, idempotencyKey); + } + + /** + * Return contract template's constructor + * + *

Return contract template's constructor ABI + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConstructorByContractTemplateIdTest() throws ApiException { + String contractTemplateId = null; + Boolean withDocs = null; + CompletableFuture> response = + api.getConstructorByContractTemplateId(contractTemplateId, withDocs); + } + + /** + * Return contract template by id + * + *

Return detailed information about the contract template + * + * @throws ApiException if the Api call fails + */ + @Test + public void getContractTemplateByIdTest() throws ApiException { + String contractTemplateId = null; + CompletableFuture> response = + api.getContractTemplateById(contractTemplateId); + } + + /** + * List all contract templates + * + *

Return minimal representation of all the contract templates available for the workspace + * + * @throws ApiException if the Api call fails + */ + @Test + public void getContractTemplatesTest() throws ApiException { + BigDecimal limit = null; + BigDecimal offset = null; + String pageCursor = null; + BigDecimal pageSize = null; + String type = null; + String initializationPhase = null; + CompletableFuture> response = + api.getContractTemplates( + limit, offset, pageCursor, pageSize, type, initializationPhase); + } + + /** + * Return contract template's function + * + *

Return contract template`s function ABI by signature + * + * @throws ApiException if the Api call fails + */ + @Test + public void getFunctionAbiByContractTemplateIdTest() throws ApiException { + String contractTemplateId = null; + String functionSignature = null; + CompletableFuture> response = + api.getFunctionAbiByContractTemplateId(contractTemplateId, functionSignature); + } + + /** + * Upload contract template + * + *

Upload a new contract template. This contract template will be available for the workspace + * + * @throws ApiException if the Api call fails + */ + @Test + public void uploadContractTemplateTest() throws ApiException { + ContractUploadRequest contractUploadRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.uploadContractTemplate(contractUploadRequest, idempotencyKey); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java new file mode 100644 index 0000000..11e0dcf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java @@ -0,0 +1,79 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.DeployedContractResponseDto; +import com.fireblocks.sdk.model.DeployedContractsPaginatedResponse; +import java.math.BigDecimal; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for DeployedContractsApi */ +@Ignore +public class DeployedContractsApiTest { + + private final DeployedContractsApi api = new DeployedContractsApi(); + + /** + * Return deployed contract data + * + *

Return deployed contract data by blockchain native asset id and contract address + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDeployedContractByAddressTest() throws ApiException { + String contractAddress = null; + String assetId = null; + CompletableFuture> response = + api.getDeployedContractByAddress(contractAddress, assetId); + } + + /** + * Return deployed contract data by id + * + *

Return deployed contract data by id + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDeployedContractByIdTest() throws ApiException { + String id = null; + CompletableFuture> response = + api.getDeployedContractById(id); + } + + /** + * List deployed contracts data + * + *

Return a filtered lean representation of the deployed contracts data on all blockchains + * (paginated) + * + * @throws ApiException if the Api call fails + */ + @Test + public void getDeployedContractsTest() throws ApiException { + String pageCursor = null; + BigDecimal pageSize = null; + String contractAddress = null; + String assetId = null; + String templateId = null; + CompletableFuture> response = + api.getDeployedContracts( + pageCursor, pageSize, contractAddress, assetId, templateId); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java index f859ade..70acd37 100644 --- a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java @@ -16,6 +16,8 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateNetworkIdRequest; +import com.fireblocks.sdk.model.DeleteNetworkConnectionResponse; +import com.fireblocks.sdk.model.DeleteNetworkIdResponse; import com.fireblocks.sdk.model.NetworkConnection; import com.fireblocks.sdk.model.NetworkConnectionResponse; import com.fireblocks.sdk.model.NetworkIdResponse; @@ -23,8 +25,8 @@ import com.fireblocks.sdk.model.SetNetworkIdNameRequest; import com.fireblocks.sdk.model.SetNetworkIdResponse; import com.fireblocks.sdk.model.SetNetworkIdRoutingPolicyRequest; -import com.fireblocks.sdk.model.SetRoutingPolicy200Response; import com.fireblocks.sdk.model.SetRoutingPolicyRequest; +import com.fireblocks.sdk.model.SetRoutingPolicyResponse; import com.fireblocks.sdk.model.ThirdPartyRouting; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -67,7 +69,7 @@ public void checkThirdPartyRoutingTest() throws ApiException { * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → * **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police - * can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, + * can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, * Custom routing scheme uses (`dstId` = `0`, `dstType` * = `VAULT`). * @@ -94,7 +96,7 @@ public void createNetworkConnectionTest() throws ApiException { * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → * **Default** - Network Connection FIAT → **Default** Supported asset groups for routing police - * can be found at `/enabled_routing_policy_asset_groups` - **Note**: By default, + * can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, * Custom routing scheme uses (`dstId` = `0`, `dstType` * = `VAULT`). * @@ -129,7 +131,7 @@ public void createNetworkIdTest() throws ApiException { @Test public void deleteNetworkConnectionTest() throws ApiException { String connectionId = null; - CompletableFuture> response = + CompletableFuture> response = api.deleteNetworkConnection(connectionId); } @@ -154,7 +156,7 @@ public void deleteNetworkConnectionTest() throws ApiException { @Test public void deleteNetworkIdTest() throws ApiException { String networkId = null; - CompletableFuture> response = + CompletableFuture> response = api.deleteNetworkId(networkId); } @@ -254,6 +256,20 @@ public void getNetworkIdsTest() throws ApiException { CompletableFuture>> response = api.getNetworkIds(); } + /** + * Returns all enabled routing policy asset groups + * + *

Retrieves a list of all enabled routing policy asset groups. Your routing policy defines + * how your transactions are routed. You can use one or more enabled routing policy asset groups + * to describe connection or network id routing policy. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getRoutingPolicyAssetGroupsTest() throws ApiException { + CompletableFuture>> response = api.getRoutingPolicyAssetGroups(); + } + /** * Update network ID's discoverability. * @@ -320,7 +336,7 @@ public void setNetworkIdNameTest() throws ApiException { * Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** Supported * asset groups for routing police can be found at - * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing * scheme uses (`dstId` = `0`, `dstType` = * `VAULT`). * @@ -348,7 +364,7 @@ public void setNetworkIdRoutingPolicyTest() throws ApiException { * Default Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → * **None** - Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * Supported asset groups for routing police can be found at - * `/enabled_routing_policy_asset_groups` - **Note**: By default, Custom routing + * `/network_ids/routing_policy_asset_groups` - **Note**: By default, Custom routing * scheme uses (`dstId` = `0`, `dstType` = * `VAULT`). * @@ -358,7 +374,7 @@ public void setNetworkIdRoutingPolicyTest() throws ApiException { public void setRoutingPolicyTest() throws ApiException { String connectionId = null; SetRoutingPolicyRequest setRoutingPolicyRequest = null; - CompletableFuture> response = + CompletableFuture> response = api.setRoutingPolicy(connectionId, setRoutingPolicyRequest); } } diff --git a/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java b/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java index aaa09ee..d3a36dd 100644 --- a/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java @@ -15,9 +15,10 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.GetOwnershipTokens200Response; -import com.fireblocks.sdk.model.ListOwnedCollections200Response; -import com.fireblocks.sdk.model.ListOwnedTokens200Response; +import com.fireblocks.sdk.model.GetNFTsResponse; +import com.fireblocks.sdk.model.GetOwnershipTokensResponse; +import com.fireblocks.sdk.model.ListOwnedCollectionsResponse; +import com.fireblocks.sdk.model.ListOwnedTokensResponse; import com.fireblocks.sdk.model.TokenOwnershipSpamUpdatePayload; import com.fireblocks.sdk.model.TokenOwnershipStatusUpdatePayload; import com.fireblocks.sdk.model.TokenResponse; @@ -61,7 +62,7 @@ public void getNFTsTest() throws ApiException { BigDecimal pageSize = null; List sort = null; String order = null; - CompletableFuture> response = + CompletableFuture> response = api.getNFTs(ids, pageCursor, pageSize, sort, order); } @@ -88,7 +89,7 @@ public void getOwnershipTokensTest() throws ApiException { String status = null; String search = null; String spam = null; - CompletableFuture> response = + CompletableFuture> response = api.getOwnershipTokens( blockchainDescriptor, vaultAccountIds, @@ -123,7 +124,7 @@ public void listOwnedCollectionsTest() throws ApiException { List sort = null; String order = null; String status = null; - CompletableFuture> response = + CompletableFuture> response = api.listOwnedCollections( ncwId, walletType, search, pageCursor, pageSize, sort, order, status); } @@ -146,7 +147,7 @@ public void listOwnedTokensTest() throws ApiException { String status = null; String search = null; String spam = null; - CompletableFuture> response = + CompletableFuture> response = api.listOwnedTokens( ncwId, walletType, pageCursor, pageSize, sort, order, status, search, spam); } diff --git a/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java index 19a2345..e7f5886 100644 --- a/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java @@ -15,7 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.GetOtaStatus200Response; +import com.fireblocks.sdk.model.GetOtaStatusResponse; import com.fireblocks.sdk.model.SetOtaStatusRequest; import com.fireblocks.sdk.model.SetOtaStatusResponse; import java.util.concurrent.CompletableFuture; @@ -37,7 +37,7 @@ public class OtaBetaApiTest { */ @Test public void getOtaStatusTest() throws ApiException { - CompletableFuture> response = api.getOtaStatus(); + CompletableFuture> response = api.getOtaStatus(); } /** diff --git a/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java b/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java index cded87c..fa5aa77 100644 --- a/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java @@ -26,9 +26,10 @@ public class ResetDeviceApiTest { private final ResetDeviceApi api = new ResetDeviceApi(); /** - * resets device + * Resets device * - *

resets device + *

Resets mobile device for given console user, that user will need to do mobile onboarding + * again. * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java new file mode 100644 index 0000000..6c47591 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java @@ -0,0 +1,113 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateTokenRequestDto; +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.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for TokenizationApi */ +@Ignore +public class TokenizationApiTest { + + private final TokenizationApi api = new TokenizationApi(); + + /** + * Return a linked token + * + *

Return a linked token, with its status and metadata. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getLinkedTokenTest() throws ApiException { + String id = null; + CompletableFuture> response = api.getLinkedToken(id); + } + + /** + * List all linked tokens + * + *

Return all linked tokens (paginated) + * + * @throws ApiException if the Api call fails + */ + @Test + public void getLinkedTokensTest() throws ApiException { + String pageCursor = null; + BigDecimal pageSize = null; + Object status = null; + CompletableFuture> response = + api.getLinkedTokens(pageCursor, pageSize, status); + } + + /** + * Issue a new token + * + *

Facilitates the creation of a new token, supporting both EVM-based and Stellar/Ripple + * platforms. For EVM, it deploys the corresponding contract template to the blockchain and + * links the token to the workspace. For Stellar/Ripple, it links a newly created token directly + * to the workspace without deploying a contract. Returns the token link with status + * \"PENDING\" until the token is deployed or \"SUCCESS\" if no deployment + * is needed. + * + * @throws ApiException if the Api call fails + */ + @Test + public void issueNewTokenTest() throws ApiException { + CreateTokenRequestDto createTokenRequestDto = null; + String idempotencyKey = null; + CompletableFuture> response = + api.issueNewToken(createTokenRequestDto, idempotencyKey); + } + + /** + * Link a token + * + *

Link an already existing token (by assetId, collectionId or contractId as refId) to a + * workspace across EVM, Stellar, or Ripple platforms. The token will be linked to the workspace + * if it does not already exist. + * + * @throws ApiException if the Api call fails + */ + @Test + public void linkTest() throws ApiException { + TokenLinkRequestDto tokenLinkRequestDto = null; + String idempotencyKey = null; + CompletableFuture> response = + api.link(tokenLinkRequestDto, idempotencyKey); + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void unlinkTest() throws ApiException { + String id = null; + + CompletableFuture> response = api.unlink(id); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java index f231897..7d5306c 100644 --- a/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java @@ -15,8 +15,8 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateConnectionRequest; import com.fireblocks.sdk.model.CreateConnectionResponse; -import com.fireblocks.sdk.model.CreateRequest; import com.fireblocks.sdk.model.GetConnectionsResponse; import com.fireblocks.sdk.model.GetFilterParameter; import com.fireblocks.sdk.model.RespondToConnectionRequest; @@ -41,10 +41,10 @@ public class Web3ConnectionsApiTest { */ @Test public void createTest() throws ApiException { - CreateRequest createRequest = null; + CreateConnectionRequest createConnectionRequest = null; String idempotencyKey = null; CompletableFuture> response = - api.create(createRequest, idempotencyKey); + api.create(createConnectionRequest, idempotencyKey); } /** diff --git a/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java b/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java index 94a8637..d7cee08 100644 --- a/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java @@ -27,9 +27,9 @@ public class WhitelistIpAddressesApiTest { private final WhitelistIpAddressesApi api = new WhitelistIpAddressesApi(); /** - * gets ip addresses + * Gets whitelisted ip addresses * - *

gets ip addresses + *

Gets whitelisted ip addresses for given Api user. * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java index f093957..df31040 100644 --- a/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java @@ -15,7 +15,7 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.GetWorkspaceStatus200Response; +import com.fireblocks.sdk.model.GetWorkspaceStatusResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; @@ -35,7 +35,7 @@ public class WorkspaceStatusBetaApiTest { */ @Test public void getWorkspaceStatusTest() throws ApiException { - CompletableFuture> response = + CompletableFuture> response = api.getWorkspaceStatus(); } } diff --git a/src/test/java/com/fireblocks/sdk/model/AbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/AbiFunctionTest.java new file mode 100644 index 0000000..4e98212 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AbiFunctionTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for AbiFunction */ +public class AbiFunctionTest { + private final AbiFunction model = new AbiFunction(); + + /** Model tests for AbiFunction */ + @Test + public void testAbiFunction() { + // TODO: test AbiFunction + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpErrorTest.java b/src/test/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpErrorTest.java new file mode 100644 index 0000000..0720024 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpErrorTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for AssetAlreadyExistHttpError */ +public class AssetAlreadyExistHttpErrorTest { + private final AssetAlreadyExistHttpError model = new AssetAlreadyExistHttpError(); + + /** Model tests for AssetAlreadyExistHttpError */ + @Test + public void testAssetAlreadyExistHttpError() { + // TODO: test AssetAlreadyExistHttpError + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.java b/src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.java new file mode 100644 index 0000000..929f137 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetDoesNotExistHttpErrorTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for AssetDoesNotExistHttpError */ +public class AssetDoesNotExistHttpErrorTest { + private final AssetDoesNotExistHttpError model = new AssetDoesNotExistHttpError(); + + /** Model tests for AssetDoesNotExistHttpError */ + @Test + public void testAssetDoesNotExistHttpError() { + // TODO: test AssetDoesNotExistHttpError + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponseTest.java new file mode 100644 index 0000000..8fd488d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponseTest.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 AssetForbiddenErrorResponse */ +public class AssetForbiddenErrorResponseTest { + private final AssetForbiddenErrorResponse model = new AssetForbiddenErrorResponse(); + + /** Model tests for AssetForbiddenErrorResponse */ + @Test + public void testAssetForbiddenErrorResponse() { + // TODO: test AssetForbiddenErrorResponse + } + + /** 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/AssetMetadataDtoTest.java b/src/test/java/com/fireblocks/sdk/model/AssetMetadataDtoTest.java new file mode 100644 index 0000000..ed6ee1f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetMetadataDtoTest.java @@ -0,0 +1,105 @@ +/* + * 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 AssetMetadataDto */ +public class AssetMetadataDtoTest { + private final AssetMetadataDto model = new AssetMetadataDto(); + + /** Model tests for AssetMetadataDto */ + @Test + public void testAssetMetadataDto() { + // TODO: test AssetMetadataDto + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'networkProtocol' */ + @Test + public void networkProtocolTest() { + // TODO: test networkProtocol + } + + /** Test the property 'totalSupply' */ + @Test + public void totalSupplyTest() { + // TODO: test totalSupply + } + + /** Test the property 'holdersCount' */ + @Test + public void holdersCountTest() { + // TODO: test holdersCount + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'issuerAddress' */ + @Test + public void issuerAddressTest() { + // TODO: test issuerAddress + } + + /** Test the property 'testnet' */ + @Test + public void testnetTest() { + // TODO: test testnet + } + + /** Test the property 'blockchain' */ + @Test + public void blockchainTest() { + // TODO: test blockchain + } + + /** Test the property 'decimals' */ + @Test + public void decimalsTest() { + // TODO: test decimals + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AuditorDataTest.java b/src/test/java/com/fireblocks/sdk/model/AuditorDataTest.java new file mode 100644 index 0000000..747c2a6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AuditorDataTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for AuditorData */ +public class AuditorDataTest { + private final AuditorData model = new AuditorData(); + + /** Model tests for AuditorData */ + @Test + public void testAuditorData() { + // TODO: test AuditorData + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'imageURL' */ + @Test + public void imageURLTest() { + // TODO: test imageURL + } + + /** Test the property 'link' */ + @Test + public void linkTest() { + // TODO: test link + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CollectionMetadataDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CollectionMetadataDtoTest.java new file mode 100644 index 0000000..55c6bcc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CollectionMetadataDtoTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for CollectionMetadataDto */ +public class CollectionMetadataDtoTest { + private final CollectionMetadataDto model = new CollectionMetadataDto(); + + /** Model tests for CollectionMetadataDto */ + @Test + public void testCollectionMetadataDto() { + // TODO: test CollectionMetadataDto + } + + /** Test the property 'fbCollectionId' */ + @Test + public void fbCollectionIdTest() { + // TODO: test fbCollectionId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'standard' */ + @Test + public void standardTest() { + // TODO: test standard + } + + /** Test the property 'blockchainDescriptor' */ + @Test + public void blockchainDescriptorTest() { + // TODO: test blockchainDescriptor + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoTest.java new file mode 100644 index 0000000..c67435e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoTest.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 ContractAbiResponseDto */ +public class ContractAbiResponseDtoTest { + private final ContractAbiResponseDto model = new ContractAbiResponseDto(); + + /** Model tests for ContractAbiResponseDto */ + @Test + public void testContractAbiResponseDto() { + // TODO: test ContractAbiResponseDto + } + + /** Test the property 'abi' */ + @Test + public void abiTest() { + // TODO: test abi + } + + /** Test the property 'implementationAbi' */ + @Test + public void implementationAbiTest() { + // TODO: test implementationAbi + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractAttributesTest.java b/src/test/java/com/fireblocks/sdk/model/ContractAttributesTest.java new file mode 100644 index 0000000..9b2bbcc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractAttributesTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for ContractAttributes */ +public class ContractAttributesTest { + private final ContractAttributes model = new ContractAttributes(); + + /** Model tests for ContractAttributes */ + @Test + public void testContractAttributes() { + // TODO: test ContractAttributes + } + + /** Test the property 'useCases' */ + @Test + public void useCasesTest() { + // TODO: test useCases + } + + /** Test the property 'standards' */ + @Test + public void standardsTest() { + // TODO: test standards + } + + /** Test the property 'auditor' */ + @Test + public void auditorTest() { + // TODO: test auditor + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java new file mode 100644 index 0000000..712265a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDeployRequestTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for ContractDeployRequest */ +public class ContractDeployRequestTest { + private final ContractDeployRequest model = new ContractDeployRequest(); + + /** Model tests for ContractDeployRequest */ + @Test + public void testContractDeployRequest() { + // TODO: test ContractDeployRequest + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'constructorParameters' */ + @Test + public void constructorParametersTest() { + // TODO: test constructorParameters + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDeployResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDeployResponseTest.java new file mode 100644 index 0000000..0c26737 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDeployResponseTest.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 ContractDeployResponse */ +public class ContractDeployResponseTest { + private final ContractDeployResponse model = new ContractDeployResponse(); + + /** Model tests for ContractDeployResponse */ + @Test + public void testContractDeployResponse() { + // TODO: test ContractDeployResponse + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractDocTest.java b/src/test/java/com/fireblocks/sdk/model/ContractDocTest.java new file mode 100644 index 0000000..959cca8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractDocTest.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 ContractDoc */ +public class ContractDocTest { + private final ContractDoc model = new ContractDoc(); + + /** Model tests for ContractDoc */ + @Test + public void testContractDoc() { + // TODO: test ContractDoc + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } + + /** Test the property 'kind' */ + @Test + public void kindTest() { + // TODO: test kind + } + + /** Test the property 'methods' */ + @Test + public void methodsTest() { + // TODO: test methods + } + + /** Test the property 'version' */ + @Test + public void versionTest() { + // TODO: test version + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractMetadataDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ContractMetadataDtoTest.java new file mode 100644 index 0000000..617b1be --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractMetadataDtoTest.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 ContractMetadataDto */ +public class ContractMetadataDtoTest { + private final ContractMetadataDto model = new ContractMetadataDto(); + + /** Model tests for ContractMetadataDto */ + @Test + public void testContractMetadataDto() { + // TODO: test ContractMetadataDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'contractTemplateId' */ + @Test + public void contractTemplateIdTest() { + // TODO: test contractTemplateId + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractTemplateDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ContractTemplateDtoTest.java new file mode 100644 index 0000000..570fe58 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractTemplateDtoTest.java @@ -0,0 +1,111 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for ContractTemplateDto */ +public class ContractTemplateDtoTest { + private final ContractTemplateDto model = new ContractTemplateDto(); + + /** Model tests for ContractTemplateDto */ + @Test + public void testContractTemplateDto() { + // TODO: test ContractTemplateDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'longDescription' */ + @Test + public void longDescriptionTest() { + // TODO: test longDescription + } + + /** Test the property 'abi' */ + @Test + public void abiTest() { + // TODO: test abi + } + + /** Test the property 'attributes' */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** Test the property 'docs' */ + @Test + public void docsTest() { + // TODO: test docs + } + + /** Test the property 'owner' */ + @Test + public void ownerTest() { + // TODO: test owner + } + + /** Test the property 'vendor' */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** Test the property 'isPublic' */ + @Test + public void isPublicTest() { + // TODO: test isPublic + } + + /** Test the property 'canDeploy' */ + @Test + public void canDeployTest() { + // TODO: test canDeploy + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'implementationContractId' */ + @Test + public void implementationContractIdTest() { + // TODO: test implementationContractId + } + + /** Test the property 'initializationPhase' */ + @Test + public void initializationPhaseTest() { + // TODO: test initializationPhase + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java new file mode 100644 index 0000000..547e709 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ContractUploadRequestTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for ContractUploadRequest */ +public class ContractUploadRequestTest { + private final ContractUploadRequest model = new ContractUploadRequest(); + + /** Model tests for ContractUploadRequest */ + @Test + public void testContractUploadRequest() { + // TODO: test ContractUploadRequest + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'longDescription' */ + @Test + public void longDescriptionTest() { + // TODO: test longDescription + } + + /** Test the property 'bytecode' */ + @Test + public void bytecodeTest() { + // TODO: test bytecode + } + + /** Test the property 'sourcecode' */ + @Test + public void sourcecodeTest() { + // TODO: test sourcecode + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'docs' */ + @Test + public void docsTest() { + // TODO: test docs + } + + /** Test the property 'abi' */ + @Test + public void abiTest() { + // TODO: test abi + } + + /** Test the property 'attributes' */ + @Test + public void attributesTest() { + // TODO: test attributes + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateConnectionRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateConnectionRequestTest.java index 8921c36..9095534 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateConnectionRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateConnectionRequestTest.java @@ -48,4 +48,16 @@ public void uriTest() { public void chainIdsTest() { // TODO: test chainIds } + + /** Test the property 'ncwId' */ + @Test + public void ncwIdTest() { + // TODO: test ncwId + } + + /** Test the property 'ncwAccountId' */ + @Test + public void ncwAccountIdTest() { + // TODO: test ncwAccountId + } } diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.java new file mode 100644 index 0000000..f49f34c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoCreateParamsTest.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 CreateTokenRequestDtoCreateParams */ +public class CreateTokenRequestDtoCreateParamsTest { + private final CreateTokenRequestDtoCreateParams model = new CreateTokenRequestDtoCreateParams(); + + /** Model tests for CreateTokenRequestDtoCreateParams */ + @Test + public void testCreateTokenRequestDtoCreateParams() { + // TODO: test CreateTokenRequestDtoCreateParams + } + + /** Test the property 'contractId' */ + @Test + public void contractIdTest() { + // TODO: test contractId + } + + /** Test the property 'constructorParams' */ + @Test + public void constructorParamsTest() { + // TODO: test constructorParams + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'issuerAddress' */ + @Test + public void issuerAddressTest() { + // TODO: test issuerAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.java new file mode 100644 index 0000000..3d5026f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateTokenRequestDtoTest.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 CreateTokenRequestDto */ +public class CreateTokenRequestDtoTest { + private final CreateTokenRequestDto model = new CreateTokenRequestDto(); + + /** Model tests for CreateTokenRequestDto */ + @Test + public void testCreateTokenRequestDto() { + // TODO: test CreateTokenRequestDto + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'createParams' */ + @Test + public void createParamsTest() { + // TODO: test createParams + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequestTest.java similarity index 65% rename from src/test/java/com/fireblocks/sdk/model/CreateRequestTest.java rename to src/test/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequestTest.java index a353f9c..a945876 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateVaultAccountConnectionRequestTest.java @@ -15,14 +15,15 @@ import org.junit.Test; -/** Model tests for CreateRequest */ -public class CreateRequestTest { - private final CreateRequest model = new CreateRequest(); +/** Model tests for CreateVaultAccountConnectionRequest */ +public class CreateVaultAccountConnectionRequestTest { + private final CreateVaultAccountConnectionRequest model = + new CreateVaultAccountConnectionRequest(); - /** Model tests for CreateRequest */ + /** Model tests for CreateVaultAccountConnectionRequest */ @Test - public void testCreateRequest() { - // TODO: test CreateRequest + public void testCreateVaultAccountConnectionRequest() { + // TODO: test CreateVaultAccountConnectionRequest } /** Test the property 'vaultAccountId' */ @@ -48,16 +49,4 @@ public void uriTest() { public void chainIdsTest() { // TODO: test chainIds } - - /** Test the property 'ncwId' */ - @Test - public void ncwIdTest() { - // TODO: test ncwId - } - - /** Test the property 'ncwAccountId' */ - @Test - public void ncwAccountIdTest() { - // TODO: test ncwAccountId - } } diff --git a/src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.java new file mode 100644 index 0000000..cd7f87f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeleteNetworkConnectionResponseTest.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 DeleteNetworkConnectionResponse */ +public class DeleteNetworkConnectionResponseTest { + private final DeleteNetworkConnectionResponse model = new DeleteNetworkConnectionResponse(); + + /** Model tests for DeleteNetworkConnectionResponse */ + @Test + public void testDeleteNetworkConnectionResponse() { + // TODO: test DeleteNetworkConnectionResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetRoutingPolicy200ResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java similarity index 62% rename from src/test/java/com/fireblocks/sdk/model/SetRoutingPolicy200ResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java index 78e6f9b..b62c5b9 100644 --- a/src/test/java/com/fireblocks/sdk/model/SetRoutingPolicy200ResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DeleteNetworkIdResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for SetRoutingPolicy200Response */ -public class SetRoutingPolicy200ResponseTest { - private final SetRoutingPolicy200Response model = new SetRoutingPolicy200Response(); +/** Model tests for DeleteNetworkIdResponse */ +public class DeleteNetworkIdResponseTest { + private final DeleteNetworkIdResponse model = new DeleteNetworkIdResponse(); - /** Model tests for SetRoutingPolicy200Response */ + /** Model tests for DeleteNetworkIdResponse */ @Test - public void testSetRoutingPolicy200Response() { - // TODO: test SetRoutingPolicy200Response + public void testDeleteNetworkIdResponse() { + // TODO: test DeleteNetworkIdResponse } /** Test the property 'success' */ diff --git a/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.java new file mode 100644 index 0000000..962b297 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployedContractResponseDtoTest.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 DeployedContractResponseDto */ +public class DeployedContractResponseDtoTest { + private final DeployedContractResponseDto model = new DeployedContractResponseDto(); + + /** Model tests for DeployedContractResponseDto */ + @Test + public void testDeployedContractResponseDto() { + // TODO: test DeployedContractResponseDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'contractTemplateId' */ + @Test + public void contractTemplateIdTest() { + // TODO: test contractTemplateId + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponseTest.java new file mode 100644 index 0000000..11d3870 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DeployedContractsPaginatedResponseTest.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 DeployedContractsPaginatedResponse */ +public class DeployedContractsPaginatedResponseTest { + private final DeployedContractsPaginatedResponse model = + new DeployedContractsPaginatedResponse(); + + /** Model tests for DeployedContractsPaginatedResponse */ + @Test + public void testDeployedContractsPaginatedResponse() { + // TODO: test DeployedContractsPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DropTransactionResponseTest.java b/src/test/java/com/fireblocks/sdk/model/DropTransactionResponseTest.java index 51c45d0..e7aa54b 100644 --- a/src/test/java/com/fireblocks/sdk/model/DropTransactionResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DropTransactionResponseTest.java @@ -25,15 +25,21 @@ public void testDropTransactionResponse() { // TODO: test DropTransactionResponse } - /** Test the property 'success' */ + /** Test the property 'txStatus' */ @Test - public void successTest() { - // TODO: test success + public void txStatusTest() { + // TODO: test txStatus } - /** Test the property 'transactions' */ + /** Test the property 'txId' */ @Test - public void transactionsTest() { - // TODO: test transactions + public void txIdTest() { + // TODO: test txId + } + + /** Test the property 'replacedTxHash' */ + @Test + public void replacedTxHashTest() { + // TODO: test replacedTxHash } } diff --git a/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java b/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.java new file mode 100644 index 0000000..c16627c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/EVMTokenCreateParamsDtoTest.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 EVMTokenCreateParamsDto */ +public class EVMTokenCreateParamsDtoTest { + private final EVMTokenCreateParamsDto model = new EVMTokenCreateParamsDto(); + + /** Model tests for EVMTokenCreateParamsDto */ + @Test + public void testEVMTokenCreateParamsDto() { + // TODO: test EVMTokenCreateParamsDto + } + + /** Test the property 'contractId' */ + @Test + public void contractIdTest() { + // TODO: test contractId + } + + /** Test the property 'constructorParams' */ + @Test + public void constructorParamsTest() { + // TODO: test constructorParams + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FunctionDocTest.java b/src/test/java/com/fireblocks/sdk/model/FunctionDocTest.java new file mode 100644 index 0000000..a3fee47 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FunctionDocTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for FunctionDoc */ +public class FunctionDocTest { + private final FunctionDoc model = new FunctionDoc(); + + /** Model tests for FunctionDoc */ + @Test + public void testFunctionDoc() { + // TODO: test FunctionDoc + } + + /** Test the property 'details' */ + @Test + public void detailsTest() { + // TODO: test details + } + + /** Test the property 'params' */ + @Test + public void paramsTest() { + // TODO: test params + } + + /** Test the property 'returns' */ + @Test + public void returnsTest() { + // TODO: test returns + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ListOwnedTokens200ResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetNFTsResponseTest.java similarity index 67% rename from src/test/java/com/fireblocks/sdk/model/ListOwnedTokens200ResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/GetNFTsResponseTest.java index 10ceaa4..67b4cee 100644 --- a/src/test/java/com/fireblocks/sdk/model/ListOwnedTokens200ResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/GetNFTsResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ListOwnedTokens200Response */ -public class ListOwnedTokens200ResponseTest { - private final ListOwnedTokens200Response model = new ListOwnedTokens200Response(); +/** Model tests for GetNFTsResponse */ +public class GetNFTsResponseTest { + private final GetNFTsResponse model = new GetNFTsResponse(); - /** Model tests for ListOwnedTokens200Response */ + /** Model tests for GetNFTsResponse */ @Test - public void testListOwnedTokens200Response() { - // TODO: test ListOwnedTokens200Response + public void testGetNFTsResponse() { + // TODO: test GetNFTsResponse } /** Test the property 'paging' */ diff --git a/src/test/java/com/fireblocks/sdk/model/GetOtaStatus200ResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetOtaStatusResponseTest.java similarity index 64% rename from src/test/java/com/fireblocks/sdk/model/GetOtaStatus200ResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/GetOtaStatusResponseTest.java index 91a44ab..5c2e99e 100644 --- a/src/test/java/com/fireblocks/sdk/model/GetOtaStatus200ResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/GetOtaStatusResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for GetOtaStatus200Response */ -public class GetOtaStatus200ResponseTest { - private final GetOtaStatus200Response model = new GetOtaStatus200Response(); +/** Model tests for GetOtaStatusResponse */ +public class GetOtaStatusResponseTest { + private final GetOtaStatusResponse model = new GetOtaStatusResponse(); - /** Model tests for GetOtaStatus200Response */ + /** Model tests for GetOtaStatusResponse */ @Test - public void testGetOtaStatus200Response() { - // TODO: test GetOtaStatus200Response + public void testGetOtaStatusResponse() { + // TODO: test GetOtaStatusResponse } /** Test the property 'enabled' */ diff --git a/src/test/java/com/fireblocks/sdk/model/GetOwnershipTokens200ResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetOwnershipTokensResponseTest.java similarity index 65% rename from src/test/java/com/fireblocks/sdk/model/GetOwnershipTokens200ResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/GetOwnershipTokensResponseTest.java index 5014a6c..2dc42cb 100644 --- a/src/test/java/com/fireblocks/sdk/model/GetOwnershipTokens200ResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/GetOwnershipTokensResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for GetOwnershipTokens200Response */ -public class GetOwnershipTokens200ResponseTest { - private final GetOwnershipTokens200Response model = new GetOwnershipTokens200Response(); +/** Model tests for GetOwnershipTokensResponse */ +public class GetOwnershipTokensResponseTest { + private final GetOwnershipTokensResponse model = new GetOwnershipTokensResponse(); - /** Model tests for GetOwnershipTokens200Response */ + /** Model tests for GetOwnershipTokensResponse */ @Test - public void testGetOwnershipTokens200Response() { - // TODO: test GetOwnershipTokens200Response + public void testGetOwnershipTokensResponse() { + // TODO: test GetOwnershipTokensResponse } /** Test the property 'paging' */ diff --git a/src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatus200ResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java similarity index 61% rename from src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatus200ResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java index 6a9b4b6..cb27ec0 100644 --- a/src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatus200ResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for GetWorkspaceStatus200Response */ -public class GetWorkspaceStatus200ResponseTest { - private final GetWorkspaceStatus200Response model = new GetWorkspaceStatus200Response(); +/** Model tests for GetWorkspaceStatusResponse */ +public class GetWorkspaceStatusResponseTest { + private final GetWorkspaceStatusResponse model = new GetWorkspaceStatusResponse(); - /** Model tests for GetWorkspaceStatus200Response */ + /** Model tests for GetWorkspaceStatusResponse */ @Test - public void testGetWorkspaceStatus200Response() { - // TODO: test GetWorkspaceStatus200Response + public void testGetWorkspaceStatusResponse() { + // TODO: test GetWorkspaceStatusResponse } /** Test the property 'status' */ diff --git a/src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.java b/src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.java new file mode 100644 index 0000000..a0dd23e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.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 HttpContractDoesNotExistError */ +public class HttpContractDoesNotExistErrorTest { + private final HttpContractDoesNotExistError model = new HttpContractDoesNotExistError(); + + /** Model tests for HttpContractDoesNotExistError */ + @Test + public void testHttpContractDoesNotExistError() { + // TODO: test HttpContractDoesNotExistError + } + + /** 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/LeanAbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.java new file mode 100644 index 0000000..7929052 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/LeanAbiFunctionTest.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 LeanAbiFunction */ +public class LeanAbiFunctionTest { + private final LeanAbiFunction model = new LeanAbiFunction(); + + /** Model tests for LeanAbiFunction */ + @Test + public void testLeanAbiFunction() { + // TODO: test LeanAbiFunction + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/LeanContractDtoTest.java b/src/test/java/com/fireblocks/sdk/model/LeanContractDtoTest.java new file mode 100644 index 0000000..7744c1f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/LeanContractDtoTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for LeanContractDto */ +public class LeanContractDtoTest { + private final LeanContractDto model = new LeanContractDto(); + + /** Model tests for LeanContractDto */ + @Test + public void testLeanContractDto() { + // TODO: test LeanContractDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'attributes' */ + @Test + public void attributesTest() { + // TODO: test attributes + } + + /** Test the property 'isPublic' */ + @Test + public void isPublicTest() { + // TODO: test isPublic + } + + /** Test the property 'canDeploy' */ + @Test + public void canDeployTest() { + // TODO: test canDeploy + } + + /** Test the property 'owner' */ + @Test + public void ownerTest() { + // TODO: test owner + } + + /** Test the property 'vendor' */ + @Test + public void vendorTest() { + // TODO: test vendor + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDtoTest.java new file mode 100644 index 0000000..68a623b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/LeanDeployedContractResponseDtoTest.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 LeanDeployedContractResponseDto */ +public class LeanDeployedContractResponseDtoTest { + private final LeanDeployedContractResponseDto model = new LeanDeployedContractResponseDto(); + + /** Model tests for LeanDeployedContractResponseDto */ + @Test + public void testLeanDeployedContractResponseDto() { + // TODO: test LeanDeployedContractResponseDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'contractTemplateId' */ + @Test + public void contractTemplateIdTest() { + // TODO: test contractTemplateId + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ListOwnedCollections200ResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponseTest.java similarity index 64% rename from src/test/java/com/fireblocks/sdk/model/ListOwnedCollections200ResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponseTest.java index d004dbc..06cfa2a 100644 --- a/src/test/java/com/fireblocks/sdk/model/ListOwnedCollections200ResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponseTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for ListOwnedCollections200Response */ -public class ListOwnedCollections200ResponseTest { - private final ListOwnedCollections200Response model = new ListOwnedCollections200Response(); +/** Model tests for ListOwnedCollectionsResponse */ +public class ListOwnedCollectionsResponseTest { + private final ListOwnedCollectionsResponse model = new ListOwnedCollectionsResponse(); - /** Model tests for ListOwnedCollections200Response */ + /** Model tests for ListOwnedCollectionsResponse */ @Test - public void testListOwnedCollections200Response() { - // TODO: test ListOwnedCollections200Response + public void testListOwnedCollectionsResponse() { + // TODO: test ListOwnedCollectionsResponse } /** Test the property 'paging' */ diff --git a/src/test/java/com/fireblocks/sdk/model/ListOwnedTokensResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ListOwnedTokensResponseTest.java new file mode 100644 index 0000000..76514a1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ListOwnedTokensResponseTest.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 ListOwnedTokensResponse */ +public class ListOwnedTokensResponseTest { + private final ListOwnedTokensResponse model = new ListOwnedTokensResponse(); + + /** Model tests for ListOwnedTokensResponse */ + @Test + public void testListOwnedTokensResponse() { + // TODO: test ListOwnedTokensResponse + } + + /** Test the property 'paging' */ + @Test + public void pagingTest() { + // TODO: test paging + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java b/src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java new file mode 100644 index 0000000..614fd27 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for NotFoundException */ +public class NotFoundExceptionTest { + private final NotFoundException model = new NotFoundException(); + + /** Model tests for NotFoundException */ + @Test + public void testNotFoundException() { + // TODO: test NotFoundException + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ParameterTest.java b/src/test/java/com/fireblocks/sdk/model/ParameterTest.java new file mode 100644 index 0000000..19191cb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ParameterTest.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 Parameter */ +public class ParameterTest { + private final Parameter model = new Parameter(); + + /** Model tests for Parameter */ + @Test + public void testParameter() { + // TODO: test Parameter + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'internalType' */ + @Test + public void internalTypeTest() { + // TODO: test internalType + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'components' */ + @Test + public void componentsTest() { + // TODO: test components + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ParameterWithValueTest.java b/src/test/java/com/fireblocks/sdk/model/ParameterWithValueTest.java new file mode 100644 index 0000000..fb2f596 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ParameterWithValueTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for ParameterWithValue */ +public class ParameterWithValueTest { + private final ParameterWithValue model = new ParameterWithValue(); + + /** Model tests for ParameterWithValue */ + @Test + public void testParameterWithValue() { + // TODO: test ParameterWithValue + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** Test the property 'internalType' */ + @Test + public void internalTypeTest() { + // TODO: test internalType + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'components' */ + @Test + public void componentsTest() { + // TODO: test components + } + + /** Test the property 'value' */ + @Test + public void valueTest() { + // TODO: test value + } + + /** Test the property 'functionValue' */ + @Test + public void functionValueTest() { + // TODO: test functionValue + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java new file mode 100644 index 0000000..35ff833 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for ReadAbiFunction */ +public class ReadAbiFunctionTest { + private final ReadAbiFunction model = new ReadAbiFunction(); + + /** Model tests for ReadAbiFunction */ + @Test + public void testReadAbiFunction() { + // TODO: test ReadAbiFunction + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java b/src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java new file mode 100644 index 0000000..af7e276 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.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 ReadCallFunctionDto */ +public class ReadCallFunctionDtoTest { + private final ReadCallFunctionDto model = new ReadCallFunctionDto(); + + /** Model tests for ReadCallFunctionDto */ + @Test + public void testReadCallFunctionDto() { + // TODO: test ReadCallFunctionDto + } + + /** Test the property 'abiFunction' */ + @Test + public void abiFunctionTest() { + // TODO: test abiFunction + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SetRoutingPolicyResponseTest.java b/src/test/java/com/fireblocks/sdk/model/SetRoutingPolicyResponseTest.java new file mode 100644 index 0000000..6185025 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SetRoutingPolicyResponseTest.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 SetRoutingPolicyResponse */ +public class SetRoutingPolicyResponseTest { + private final SetRoutingPolicyResponse model = new SetRoutingPolicyResponse(); + + /** Model tests for SetRoutingPolicyResponse */ + @Test + public void testSetRoutingPolicyResponse() { + // TODO: test SetRoutingPolicyResponse + } + + /** Test the property 'success' */ + @Test + public void successTest() { + // TODO: test success + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDtoTest.java b/src/test/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDtoTest.java new file mode 100644 index 0000000..9283c82 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDtoTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for StellarRippleCreateParamsDto */ +public class StellarRippleCreateParamsDtoTest { + private final StellarRippleCreateParamsDto model = new StellarRippleCreateParamsDto(); + + /** Model tests for StellarRippleCreateParamsDto */ + @Test + public void testStellarRippleCreateParamsDto() { + // TODO: test StellarRippleCreateParamsDto + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'issuerAddress' */ + @Test + public void issuerAddressTest() { + // TODO: test issuerAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TemplatesPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TemplatesPaginatedResponseTest.java new file mode 100644 index 0000000..6b26bdb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TemplatesPaginatedResponseTest.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 TemplatesPaginatedResponse */ +public class TemplatesPaginatedResponseTest { + private final TemplatesPaginatedResponse model = new TemplatesPaginatedResponse(); + + /** Model tests for TemplatesPaginatedResponse */ + @Test + public void testTemplatesPaginatedResponse() { + // TODO: test TemplatesPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTest.java new file mode 100644 index 0000000..64efe6a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for TokenLinkDto */ +public class TokenLinkDtoTest { + private final TokenLinkDto model = new TokenLinkDto(); + + /** Model tests for TokenLinkDto */ + @Test + public void testTokenLinkDto() { + // TODO: test TokenLinkDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'refId' */ + @Test + public void refIdTest() { + // TODO: test refId + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } + + /** Test the property 'tokenMetadata' */ + @Test + public void tokenMetadataTest() { + // TODO: test tokenMetadata + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadataTest.java new file mode 100644 index 0000000..8e44382 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkDtoTokenMetadataTest.java @@ -0,0 +1,141 @@ +/* + * 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 TokenLinkDtoTokenMetadata */ +public class TokenLinkDtoTokenMetadataTest { + private final TokenLinkDtoTokenMetadata model = new TokenLinkDtoTokenMetadata(); + + /** Model tests for TokenLinkDtoTokenMetadata */ + @Test + public void testTokenLinkDtoTokenMetadata() { + // TODO: test TokenLinkDtoTokenMetadata + } + + /** Test the property 'assetId' */ + @Test + public void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'symbol' */ + @Test + public void symbolTest() { + // TODO: test symbol + } + + /** Test the property 'networkProtocol' */ + @Test + public void networkProtocolTest() { + // TODO: test networkProtocol + } + + /** Test the property 'totalSupply' */ + @Test + public void totalSupplyTest() { + // TODO: test totalSupply + } + + /** Test the property 'holdersCount' */ + @Test + public void holdersCountTest() { + // TODO: test holdersCount + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'contractAddress' */ + @Test + public void contractAddressTest() { + // TODO: test contractAddress + } + + /** Test the property 'issuerAddress' */ + @Test + public void issuerAddressTest() { + // TODO: test issuerAddress + } + + /** Test the property 'testnet' */ + @Test + public void testnetTest() { + // TODO: test testnet + } + + /** Test the property 'blockchain' */ + @Test + public void blockchainTest() { + // TODO: test blockchain + } + + /** Test the property 'decimals' */ + @Test + public void decimalsTest() { + // TODO: test decimals + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'fbCollectionId' */ + @Test + public void fbCollectionIdTest() { + // TODO: test fbCollectionId + } + + /** Test the property 'standard' */ + @Test + public void standardTest() { + // TODO: test standard + } + + /** Test the property 'blockchainDescriptor' */ + @Test + public void blockchainDescriptorTest() { + // TODO: test blockchainDescriptor + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'blockchainId' */ + @Test + public void blockchainIdTest() { + // TODO: test blockchainId + } + + /** Test the property 'contractTemplateId' */ + @Test + public void contractTemplateIdTest() { + // TODO: test contractTemplateId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkExistsHttpErrorTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkExistsHttpErrorTest.java new file mode 100644 index 0000000..d277b7b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkExistsHttpErrorTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for TokenLinkExistsHttpError */ +public class TokenLinkExistsHttpErrorTest { + private final TokenLinkExistsHttpError model = new TokenLinkExistsHttpError(); + + /** Model tests for TokenLinkExistsHttpError */ + @Test + public void testTokenLinkExistsHttpError() { + // TODO: test TokenLinkExistsHttpError + } + + /** Test the property 'statusCode' */ + @Test + public void statusCodeTest() { + // TODO: test statusCode + } + + /** Test the property 'message' */ + @Test + public void messageTest() { + // TODO: test message + } + + /** Test the property 'error' */ + @Test + public void errorTest() { + // TODO: test error + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java b/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java new file mode 100644 index 0000000..465a4ad --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokenLinkRequestDtoTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for TokenLinkRequestDto */ +public class TokenLinkRequestDtoTest { + private final TokenLinkRequestDto model = new TokenLinkRequestDto(); + + /** Model tests for TokenLinkRequestDto */ + @Test + public void testTokenLinkRequestDto() { + // TODO: test TokenLinkRequestDto + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'refId' */ + @Test + public void refIdTest() { + // TODO: test refId + } + + /** Test the property 'displayName' */ + @Test + public void displayNameTest() { + // TODO: test displayName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TokensPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TokensPaginatedResponseTest.java new file mode 100644 index 0000000..5d4c84e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TokensPaginatedResponseTest.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 TokensPaginatedResponse */ +public class TokensPaginatedResponseTest { + private final TokensPaginatedResponse model = new TokensPaginatedResponse(); + + /** Model tests for TokensPaginatedResponse */ + @Test + public void testTokensPaginatedResponse() { + // TODO: test TokensPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionFeeTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionFeeTest.java index 429b8ba..de85368 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionFeeTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionFeeTest.java @@ -60,4 +60,16 @@ public void baseFeeTest() { public void priorityFeeTest() { // TODO: test priorityFee } + + /** Test the property 'maxFeePerGasDelta' */ + @Test + public void maxFeePerGasDeltaTest() { + // TODO: test maxFeePerGasDelta + } + + /** Test the property 'l1Fee' */ + @Test + public void l1FeeTest() { + // TODO: test l1Fee + } } diff --git a/src/test/java/com/fireblocks/sdk/model/VendorDtoTest.java b/src/test/java/com/fireblocks/sdk/model/VendorDtoTest.java new file mode 100644 index 0000000..b649f5e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/VendorDtoTest.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 VendorDto */ +public class VendorDtoTest { + private final VendorDto model = new VendorDto(); + + /** Model tests for VendorDto */ + @Test + public void testVendorDto() { + // TODO: test VendorDto + } + + /** Test the property 'id' */ + @Test + public void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WriteAbiFunctionTest.java b/src/test/java/com/fireblocks/sdk/model/WriteAbiFunctionTest.java new file mode 100644 index 0000000..1c9be61 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WriteAbiFunctionTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for WriteAbiFunction */ +public class WriteAbiFunctionTest { + private final WriteAbiFunction model = new WriteAbiFunction(); + + /** Model tests for WriteAbiFunction */ + @Test + public void testWriteAbiFunction() { + // TODO: test WriteAbiFunction + } + + /** Test the property 'stateMutability' */ + @Test + public void stateMutabilityTest() { + // TODO: test stateMutability + } + + /** Test the property 'outputs' */ + @Test + public void outputsTest() { + // TODO: test outputs + } + + /** Test the property 'type' */ + @Test + public void typeTest() { + // TODO: test type + } + + /** Test the property 'name' */ + @Test + public void nameTest() { + // TODO: test name + } + + /** Test the property 'inputs' */ + @Test + public void inputsTest() { + // TODO: test inputs + } + + /** Test the property 'description' */ + @Test + public void descriptionTest() { + // TODO: test description + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java new file mode 100644 index 0000000..a9be73e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.Test; + +/** Model tests for WriteCallFunctionDto */ +public class WriteCallFunctionDtoTest { + private final WriteCallFunctionDto model = new WriteCallFunctionDto(); + + /** Model tests for WriteCallFunctionDto */ + @Test + public void testWriteCallFunctionDto() { + // TODO: test WriteCallFunctionDto + } + + /** Test the property 'vaultAccountId' */ + @Test + public void vaultAccountIdTest() { + // TODO: test vaultAccountId + } + + /** Test the property 'abiFunction' */ + @Test + public void abiFunctionTest() { + // TODO: test abiFunction + } + + /** Test the property 'amount' */ + @Test + public void amountTest() { + // TODO: test amount + } + + /** Test the property 'feeLevel' */ + @Test + public void feeLevelTest() { + // TODO: test feeLevel + } + + /** Test the property 'fee' */ + @Test + public void feeTest() { + // TODO: test fee + } + + /** Test the property 'note' */ + @Test + public void noteTest() { + // TODO: test note + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDtoTest.java b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDtoTest.java new file mode 100644 index 0000000..3e2686b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/WriteCallFunctionResponseDtoTest.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 WriteCallFunctionResponseDto */ +public class WriteCallFunctionResponseDtoTest { + private final WriteCallFunctionResponseDto model = new WriteCallFunctionResponseDto(); + + /** Model tests for WriteCallFunctionResponseDto */ + @Test + public void testWriteCallFunctionResponseDto() { + // TODO: test WriteCallFunctionResponseDto + } + + /** Test the property 'txId' */ + @Test + public void txIdTest() { + // TODO: test txId + } +}