/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { BuyAssetOnMarketplace } from '../models/BuyAssetOnMarketplace'; import type { BuyAssetOnMarketplaceCelo } from '../models/BuyAssetOnMarketplaceCelo'; import type { BuyAssetOnMarketplaceCeloKMS } from '../models/BuyAssetOnMarketplaceCeloKMS'; import type { BuyAssetOnMarketplaceKMS } from '../models/BuyAssetOnMarketplaceKMS'; import type { CancelSellAssetOnMarketplace } from '../models/CancelSellAssetOnMarketplace'; import type { CancelSellAssetOnMarketplaceCelo } from '../models/CancelSellAssetOnMarketplaceCelo'; import type { CancelSellAssetOnMarketplaceCeloKMS } from '../models/CancelSellAssetOnMarketplaceCeloKMS'; import type { CancelSellAssetOnMarketplaceKMS } from '../models/CancelSellAssetOnMarketplaceKMS'; import type { GenerateMarketplace } from '../models/GenerateMarketplace'; import type { GenerateMarketplaceCelo } from '../models/GenerateMarketplaceCelo'; import type { GenerateMarketplaceCeloKMS } from '../models/GenerateMarketplaceCeloKMS'; import type { GenerateMarketplaceKMS } from '../models/GenerateMarketplaceKMS'; import type { SellAssetOnMarketplace } from '../models/SellAssetOnMarketplace'; import type { SellAssetOnMarketplaceCelo } from '../models/SellAssetOnMarketplaceCelo'; import type { SellAssetOnMarketplaceCeloKMS } from '../models/SellAssetOnMarketplaceCeloKMS'; import type { SellAssetOnMarketplaceKMS } from '../models/SellAssetOnMarketplaceKMS'; import type { SignatureId } from '../models/SignatureId'; import type { TransactionHash } from '../models/TransactionHash'; import type { UpdateFee } from '../models/UpdateFee'; import type { UpdateFeeCelo } from '../models/UpdateFeeCelo'; import type { UpdateFeeCeloKMS } from '../models/UpdateFeeCeloKMS'; import type { UpdateFeeKMS } from '../models/UpdateFeeKMS'; import type { UpdateFeeRecipient } from '../models/UpdateFeeRecipient'; import type { UpdateFeeRecipientCelo } from '../models/UpdateFeeRecipientCelo'; import type { UpdateFeeRecipientCeloKMS } from '../models/UpdateFeeRecipientCeloKMS'; import type { UpdateFeeRecipientKMS } from '../models/UpdateFeeRecipientKMS'; import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class MarketplaceService { /** * Create an NFT marketplace *
2 credits per API call
*Deploy an NFT marketplace smart contract on the blockchain. With a deployed marketplace smart contract, you and your customers can create new listings for assets such as non-fungible tokens and combinations of token types as described by the ERC-721 and ERC-1155 standards on the Ethereum blockchain or by the equivalent standards on the other blockchains. As the marketplace operator, you can set a fee as a percentage of the asset price that will be paid on top of the asset price.
*The purchase process looks like the following:
*buyAssetFromListing() method is called against the marketplace smart contract) and send the required amount of the native assets to the marketplace smart contract.buyAssetFromListing() method is called against the marketplace smart contract).This API is supported for the following blockchains:
*Signing a transaction
*When deploying an NFT marketplace smart contract, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.
*Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.
*For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.
* * @param requestBody * @returns any OK * @throws ApiError */ public static generateMarketplace( requestBody: (GenerateMarketplace | GenerateMarketplaceKMS | GenerateMarketplaceCelo | GenerateMarketplaceCeloKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/marketplace/listing`, body: requestBody, mediaType: 'application/json', errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } /** * Sell an asset on the NFT marketplace *2 credits per API call
*Create a new listing for an asset on the NFT marketplace. The listing can be offered for the native blockchain assets (for example, ETH, BSC, and so on) or for any fungible tokens.
*After the listing is created, allow the marketplace smart contract to transfer the asset that you are selling.
*You can create a listing only for an existing asset that you own (you must be the owner of the asset).
*This API is supported for the following blockchains:
*NOTE: When making this API call, you may get the following message:
* Although one or more Error Occurred [execution reverted] Contract Execution Completed
* This message is a result of the marketplace version check and has no impact on completing the API call. You can safely ignore it.
Signing a transaction
*When creating a new listing on the NFT marketplace, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.
*Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.
*For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.
* * @param requestBody * @returns any OK * @throws ApiError */ public static sellAssetOnMarketplace( requestBody: (SellAssetOnMarketplace | SellAssetOnMarketplaceKMS | SellAssetOnMarketplaceCelo | SellAssetOnMarketplaceCeloKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/marketplace/listing/sell`, body: requestBody, mediaType: 'application/json', errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } /** * Buy an asset on the NFT marketplace *2 credits per API call
*Buy an asset listed on the NFT marketplace.
*You can buy the asset either for the native blockchain assets (for example, ETH, BSC, and so on) or for the fungible tokens of the blockchain.
*This API is supported for the following blockchains:
*NOTE: When making this API call, you may get the following message:
* Although one or more Error Occurred [execution reverted] Contract Execution Completed
* This message is a result of the marketplace version check and has no impact on completing the API call. You can safely ignore it.
Signing a transaction
*When buying an asset on the NFT marketplace, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.
*Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.
*For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.
* * @param requestBody * @returns any OK * @throws ApiError */ public static buyAssetOnMarketplace( requestBody: (BuyAssetOnMarketplace | BuyAssetOnMarketplaceKMS | BuyAssetOnMarketplaceCelo | BuyAssetOnMarketplaceCeloKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/marketplace/listing/buy`, body: requestBody, mediaType: 'application/json', errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } /** * Cancel the selling of an asset on the NFT marketplace *2 credits per API call
*Cancel the selling of an asset on the NFT marketplace.
*You can cancel the selling only if you are the seller of the asset or the marketplace operator. Once the selling is canceled, the asset is returned to the seller.
*You cannot cancel the selling if the asset has already been purchased.
*This API is supported for the following blockchains:
*NOTE: When making this API call, you may get the following message:
* Although one or more Error Occurred [execution reverted] Contract Execution Completed
* This message is a result of the marketplace version check and has no impact on completing the API call. You can safely ignore it.
Signing a transaction
*When cancelling the selling of an asset, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.
*Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.
*For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.
* * @param requestBody * @returns any OK * @throws ApiError */ public static cancelSellMarketplaceListing( requestBody: (CancelSellAssetOnMarketplace | CancelSellAssetOnMarketplaceKMS | CancelSellAssetOnMarketplaceCelo | CancelSellAssetOnMarketplaceCeloKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'POST', path: `/v3/blockchain/marketplace/listing/cancel`, body: requestBody, mediaType: 'application/json', errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } /** * Get the listings of a certain type from the NFT marketplace *1 credit per API call
*Get the open, sold, or cancelled listings from the NFT marketplace.
*This API is supported for the following blockchains:
*1 credit per API call
*Get information about a specific listing on the NFT marketplace.
*This API is supported for the following blockchains:
*1 credit per API call
*Get the NFT marketplace fee.
*This API is supported for the following blockchains:
*1 credit per API call
*Get the recipient of the NFT marketplace fee.
*This API is supported for the following blockchains:
*2 credits per API call
*Update the recepient of the NFT marketplace fee.
*You can update the fee recepient only if you are the marketplace operator.
*This API is supported for the following blockchains:
*Signing a transaction
*When updating the recepient of the NFT marketplace fee, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.
*Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.
*For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.
* * @param requestBody * @returns any OK * @throws ApiError */ public static updateFeeRecipient( requestBody: (UpdateFeeRecipient | UpdateFeeRecipientKMS | UpdateFeeRecipientCelo | UpdateFeeRecipientCeloKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'PUT', path: `/v3/blockchain/marketplace/listing/recipient`, body: requestBody, mediaType: 'application/json', errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } /** * Update the NFT marketplace fee *2 credits per API call
*Update the NFT marketplace fee.
*You can update the marketplace fee only if you are the marketplace operator.
*This API is supported for the following blockchains:
*Signing a transaction
*When updating the NFT marketplace fee, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.
*Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.
*For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.
* * @param requestBody * @returns any OK * @throws ApiError */ public static updateFee( requestBody: (UpdateFee | UpdateFeeKMS | UpdateFeeCelo | UpdateFeeCeloKMS), ): CancelablePromise<(TransactionHash | SignatureId)> { return __request({ method: 'PUT', path: `/v3/blockchain/marketplace/listing/fee`, body: requestBody, mediaType: 'application/json', errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 403: `Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.`, 500: `Internal server error. There was an error on the server while processing the request.`, }, }); } }