UNPKG

nmkr-studio-api

Version:

Typesafe API Client to work with the NMKR Studio V2 API

284 lines 10.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ToolsService = void 0; class ToolsService { constructor(httpRequest) { this.httpRequest = httpRequest; } /** * Checks if there applies a discount for an address * Checks if there applies a discount for an address * @returns CheckDiscountsResultClass Returns the CheckDiscountsResultClass Class * @throws ApiError */ getV2CheckIfEligibleForDiscount({ projectuid, address, couponcode, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/CheckIfEligibleForDiscount/{projectuid}/{address}', path: { 'projectuid': projectuid, 'address': address, }, query: { 'couponcode': couponcode, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `Not Found`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Checks, if an address matches the sale conditions * Checks, if an address matches the sale conditions of a project * @returns CheckConditionsResultClass Returns the CheckConditionsResultClass Class * @throws ApiError */ getV2CheckIfSaleConditionsMet({ projectuid, address, countnft, blockchain, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/CheckIfSaleConditionsMet/{projectuid}/{address}/{countnft}', path: { 'projectuid': projectuid, 'address': address, 'countnft': countnft, }, query: { 'blockchain': blockchain, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `Not Found`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Returns the utxo of an address * @returns TxInAddressesClass Returns the AssetsAssociatedWithAccount Class * @throws ApiError */ getV2CheckUtxo({ address, dataprovider, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/CheckUtxo/{address}', path: { 'address': address, }, query: { 'dataprovider': dataprovider, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * @returns any OK * @throws ApiError */ getV2GetActiveDirectsaleListings({ stakeaddress, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetActiveDirectsaleListings/{stakeaddress}', path: { 'stakeaddress': stakeaddress, }, }); } /** * Returns all assets that are in a wallet * @returns AssetsAssociatedWithAccount Returns the AssetsAssociatedWithAccount Class * @throws ApiError */ getV2GetAllAssetsInWallet({ address, blockchain, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetAllAssetsInWallet/{address}', path: { 'address': address, }, query: { 'blockchain': blockchain, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Returns the quantity of a specific token in a wallet * @returns AssetsAssociatedWithAccount Returns the AssetsAssociatedWithAccount Class * @throws ApiError */ getV2GetAmountOfSpecificTokenInWallet({ address, policyid, tokenname, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetAmountOfSpecificTokenInWallet/{address}/{policyid}/{tokenname}', path: { 'address': address, 'policyid': policyid, 'tokenname': tokenname, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Returns the quantity of a specific token in a wallet * @returns AssetsAssociatedWithAccount Returns the AssetsAssociatedWithAccount Class * @throws ApiError */ postV2GetAmountOfSpecificTokenInWallet({ policyid, tokenname, requestBody, }) { return this.httpRequest.request({ method: 'POST', url: '/v2/GetAmountOfSpecificTokenInWallet/{policyid}/{tokenname}', path: { 'policyid': policyid, 'tokenname': tokenname, }, body: requestBody, mediaType: 'application/json', errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Returns the Token Registry Information for a specific token (if available) * @returns TokenInformationClass Returns TokenInformationClass * @throws ApiError */ getV2GetCardanoTokenRegistryInformation({ policyid, tokenname, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetCardanoTokenRegistryInformation/{policyid}/{tokenname}', path: { 'policyid': policyid, 'tokenname': tokenname, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `No Registry Information was not found`, }, }); } /** * Returns the Metadata for a specific token * @returns string Returns the Metadata as String * @throws ApiError */ getV2GetMetadataForToken({ policyid, tokennamehex, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetMetadataForToken/{policyid}/{tokennamehex}', path: { 'policyid': policyid, 'tokennamehex': tokennamehex, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `Not Found`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Returns a snapshot with all addresses and tokens for a specific policyid * You will receive all tokens and the holding addresses of a specific policyid * @returns NmkrAssetAddress Returns an array of NmkrAssetAddress * @throws ApiError */ getV2GetPolicySnapshot({ policyid, cumulateStakeAddresses = true, withMintingInformation = false, blockchain, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetPolicySnapshot/{policyid}', path: { 'policyid': policyid, }, query: { 'cumulateStakeAddresses': cumulateStakeAddresses, 'withMintingInformation': withMintingInformation, 'blockchain': blockchain, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `The policyid was not found`, }, }); } /** * Returns the IPFS Hash of the preview image for a specific token * @returns string Returns the IPFS/IAGON Link for the preview image * @throws ApiError */ getV2GetPreviewImageForToken({ policyid, tokennamehex, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetPreviewImageForToken/{policyid}/{tokennamehex}', path: { 'policyid': policyid, 'tokennamehex': tokennamehex, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `Not Found`, 429: `Too Many Requests`, 500: `Internal server error - see the errormessage in the result`, }, }); } /** * Returns the actual price in EUR and USD for ADA,APT,SOL,ETH, etc. * @returns NewRatesClass Returns the NewRatesClass * @throws ApiError */ getV2GetRates({ coin, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetRates', query: { 'coin': coin, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`, 404: `Not Found`, }, }); } /** * Returns the royalty information for a specific policyid * You will receive the rate in percent and the wallet address for the royalties (if applicable) of a specific policyid * @returns RoyaltyClass Returns an array of RoyaltyClass * @throws ApiError */ getV2GetRoyaltyInformation({ policyid, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetRoyaltyInformation/{policyid}', path: { 'policyid': policyid, }, errors: { 401: `The access was denied. (Wrong or expired APIKEY, wrong policyid etc.)`, 404: `There are no royalty informations for this policyid`, 406: `The policyid is not valid`, }, }); } } exports.ToolsService = ToolsService; //# sourceMappingURL=ToolsService.js.map