UNPKG

nmkr-studio-api

Version:

Typesafe API Client to work with the NMKR Studio V2 API

72 lines 2.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SmartcontractsService = void 0; class SmartcontractsService { constructor(httpRequest) { this.httpRequest = httpRequest; } /** * @returns GetPaymentAddressResultClass Success * @throws ApiError */ getV2GetBuyOutSmartcontractAddress({ customerid, txHashLockedinAssets, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetBuyOutSmartcontractAddress/{customerid}/{txHashLockedinAssets}', path: { customerid: customerid, txHashLockedinAssets: txHashLockedinAssets, }, errors: { 401: `Unauthorized`, 404: `Not Found`, 406: `Not Acceptable`, 429: `Too Many Requests`, 500: `Server Error`, }, }); } /** * Returns the datum information for a smartcontract directsale transaction * You will receive the datum information of a smartcontract directsale transaction (JPG Store V2 Contract and NMKR V2 Contract) * @returns SmartcontractDirectsaleDatumInformationClass Returns an array of SmartcontractDirectsaleDatumInformationClass * @throws ApiError */ getV2GetDatumInformationForSmartcontractDirectsaleTransaction({ txhash, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetDatumInformationForSmartcontractDirectsaleTransaction/{txhash}', path: { txhash: txhash, }, 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`, }, }); } /** * @returns PaymentTransactionResultClass Success * @throws ApiError */ getV2GetListedAssetPaymentTransaction({ policyid, assetnameinhex, }) { return this.httpRequest.request({ method: 'GET', url: '/v2/GetListedAssetPaymentTransaction/{policyid}/{assetnameinhex}', path: { policyid: policyid, assetnameinhex: assetnameinhex, }, errors: { 401: `Unauthorized`, 404: `Not Found`, 406: `Not Acceptable`, 429: `Too Many Requests`, 500: `Server Error`, }, }); } } exports.SmartcontractsService = SmartcontractsService; //# sourceMappingURL=SmartcontractsService.js.map