UNPKG

@goplus/sdk-node

Version:
89 lines (85 loc) 3.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NftControllerApi = void 0; var _ApiClient = require("../ApiClient"); var _ResponseWrapperGetNftInfo = require("../model/ResponseWrapperGetNftInfo"); /* * GoPlus Security API Document * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 1.0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 3.0.45 * * Do not edit the class manually. * */ /** * NftController service. * @module api/NftControllerApi * @version 1.0 */ class NftControllerApi { /** * Constructs a new NftControllerApi. * @alias module:api/NftControllerApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instanc e} if unspecified. */ constructor(apiClient) { this.apiClient = apiClient || _ApiClient.ApiClient.instance; } /** * Callback function to receive the result of the getNftInfoUsingGET1 operation. * @callback moduleapi/NftControllerApi~getNftInfoUsingGET1Callback * @param {String} error Error message, if any. * @param {module:model/ResponseWrapperGetNftInfo{ data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Get NFT&#x27;s security and risk data. * @param {String} chain_id The chain_id of the blockchain.\&quot;1\&quot; means Ethereum; \&quot;10\&quot; means Optimism;\&quot;25\&quot; means Cronos;\&quot;56\&quot; means BSC; \&quot;100\&quot; means Gnosis;\&quot;128\&quot; means HECO; \&quot;137\&quot; means Polygon; \&quot;250\&quot; means Fantom;\&quot;321\&quot; means KCC;\&quot;324\&quot; means zkSync Era; \&quot;201022\&quot; means FON;\&quot;42161\&quot; means Arbitrum; \&quot;43114\&quot; means Avalanche;\&quot;59144\&quot; means Linea Mainnet;\&quot;8453\&quot; Base;\&quot;5000\&quot; Mantle; * @param {String} contract_addresses NFT contract address * @param {Object} opts Optional parameters * @param {String} opts.Authorization Authorization token in the format: Bearer &lt;token&gt; (e.g., Bearer eyJsZXZlbCI6NSwiYXBwTmFtZSI6ImF2cyIsImFwcEtleSI6IjFaW...) * @param {String} opts.token_id tokenId * @param {module:api/NftControllerApi~getNftInfoUsingGET1Callback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} */ getNftInfoUsingGET1(chain_id, contract_addresses, opts, callback) { opts = opts || {}; let postBody = null; // verify the required parameter 'chain_id' is set if (chain_id === undefined || chain_id === null) { throw new Error("Missing the required parameter 'chain_id' when calling getNftInfoUsingGET1"); } // verify the required parameter 'contract_addresses' is set if (contract_addresses === undefined || contract_addresses === null) { throw new Error("Missing the required parameter 'contract_addresses' when calling getNftInfoUsingGET1"); } let pathParams = { 'chain_id': chain_id }; let queryParams = { 'contract_addresses': contract_addresses, 'token_id': opts['token_id'] }; let headerParams = { 'Authorization': opts['Authorization'] }; let formParams = {}; let authNames = []; let contentTypes = []; let accepts = ['*/*']; let returnType = _ResponseWrapperGetNftInfo.ResponseWrapperGetNftInfo; return this.apiClient.callApi('/api/v1/nft_security/{chain_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback); } } exports.NftControllerApi = NftControllerApi;