@xoxno/sdk-js 0.0.5-alpha → 0.0.7-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/collection/index.d.ts +59 -0
  2. package/dist/index.d.ts +12 -0
  3. package/dist/index.min.js +1 -0
  4. package/dist/interactions/index.d.ts +79 -0
  5. package/dist/launchpad/index.d.ts +78 -0
  6. package/dist/nft/index.d.ts +44 -0
  7. package/dist/types/collection.d.ts +313 -0
  8. package/dist/types/interactions.d.ts +16 -0
  9. package/dist/types/nft.d.ts +93 -0
  10. package/dist/types/trading.d.ts +91 -0
  11. package/dist/utils/SmartContractAbis.d.ts +15 -0
  12. package/dist/utils/SmartContractService.d.ts +3 -0
  13. package/dist/utils/api.d.ts +23 -0
  14. package/dist/utils/const.d.ts +13 -0
  15. package/dist/utils/getActivity.d.ts +10 -0
  16. package/dist/utils/helpers.d.ts +2 -0
  17. package/dist/utils/regex.d.ts +2 -0
  18. package/dist/utils/scCalls.d.ts +9 -0
  19. package/package.json +3 -2
  20. package/.editorconfig +0 -9
  21. package/.prettierrc +0 -8
  22. package/.releaserc +0 -10
  23. package/commitlint.config.js +0 -3
  24. package/dist/xoxno.min.js +0 -1
  25. package/jest.config.js +0 -7
  26. package/src/collection/__tests__/collection.test.ts +0 -107
  27. package/src/collection/index.ts +0 -204
  28. package/src/index.ts +0 -20
  29. package/src/interactions/__tests__/market.test.ts +0 -92
  30. package/src/interactions/index.ts +0 -221
  31. package/src/launchpad/__tests__/market.test.ts +0 -25
  32. package/src/launchpad/index.ts +0 -163
  33. package/src/nft/__tests__/nft.test.ts +0 -84
  34. package/src/nft/index.ts +0 -98
  35. package/src/types/collection.ts +0 -332
  36. package/src/types/interactions.ts +0 -16
  37. package/src/types/nft.ts +0 -100
  38. package/src/types/trading.ts +0 -95
  39. package/src/utils/SmartContractAbis.ts +0 -82
  40. package/src/utils/SmartContractService.ts +0 -10
  41. package/src/utils/api.ts +0 -133
  42. package/src/utils/const.ts +0 -26
  43. package/src/utils/getActivity.ts +0 -55
  44. package/src/utils/helpers.ts +0 -14
  45. package/src/utils/regex.ts +0 -7
  46. package/src/utils/scCalls.ts +0 -47
  47. package/tsconfig.json +0 -14
  48. package/webpack.config.js +0 -28
  49. /package/{src/types/index.ts → dist/types/index.d.ts} +0 -0
@@ -0,0 +1,59 @@
1
+ import { CollectionsNFTsResponse, GetCollectionsArgs, ICollectionAttributes, ICollectionProfile, SearchNFTsArgs, SearchNFTsResponse } from '../types/collection';
2
+ import { TradincActivityArgs, TradingActivityResponse } from '../types/trading';
3
+ /**
4
+ * CollectionModule provides a set of methods to interact with NFT collections.
5
+ * It includes methods for getting collection profile information, floor price,
6
+ * collection attributes, and searching NFTs within a collection.
7
+ *
8
+ * @example
9
+ * const xoxno = new XOXNO({ apiURL: 'https://api.xoxno.com', apiKey: 'your-api-key' });
10
+ * const collectionModule = xoxno.collection;
11
+ */
12
+ export declare class CollectionModule {
13
+ private api;
14
+ constructor();
15
+ /**
16
+ * Fetches the profile of a collection.
17
+ * @param collection - The ticker of the collection.
18
+ * @returns A Promise that resolves to the ICollectionProfile object.
19
+ * @throws An error if the provided collection ticker is invalid.
20
+ */
21
+ getCollectionProfile: (collection: string) => Promise<ICollectionProfile>;
22
+ /**
23
+ * Fetches the floor price of a collection.
24
+ * @param collection - The ticker of the collection.
25
+ * @param token - The token for the floor price calculation (default: 'EGLD').
26
+ * @returns A Promise that resolves to the collection's floor price as a number.
27
+ * @throws An error if the provided collection ticker is invalid.
28
+ */
29
+ getCollectionFloorPrice: (collection: string, token?: string) => Promise<number>;
30
+ /**
31
+ * Fetches the attributes of a collection.
32
+ * @param collection - The ticker of the collection.
33
+ * @returns A Promise that resolves to the ICollectionAttributes object.
34
+ * @throws An error if the provided collection ticker is invalid.
35
+ */
36
+ getCollectionAttributes: (collection: string) => Promise<ICollectionAttributes>;
37
+ /**
38
+ * Searches for NFTs in a collection based on the provided arguments.
39
+ * @param {SearchNFTsArgs} args - The SearchNFTsArgs object containing the search parameters.
40
+ * @returns {Promise<SearchNFTsResponse>} A Promise that resolves to the SearchNFTsResponse object.
41
+ * @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 35.
42
+ */
43
+ searchNFTs: (args: SearchNFTsArgs) => Promise<SearchNFTsResponse>;
44
+ /**
45
+ * Retrieves trading history based on the provided arguments.
46
+ *
47
+ * @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
48
+ * @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
49
+ * @throws {Error} Throws an error if the 'top' argument is greater than 35.
50
+ */
51
+ getTradingActivity: (args: TradincActivityArgs) => Promise<TradingActivityResponse>;
52
+ /**
53
+ * Searches for NFTs in a collection based on the provided arguments.
54
+ * @param {GetCollectionsArgs} args - The SearchNFTsArgs object containing the search parameters.
55
+ * @returns {Promise<CollectionsNFTsResponse>} A Promise that resolves to the CollectionsNFTsResponse object.
56
+ * @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 35.
57
+ */
58
+ getCollections: (args?: GetCollectionsArgs) => Promise<CollectionsNFTsResponse>;
59
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Represents an XOXNO Marketplace SDK, providing a simplified interface for
3
+ * interacting with an XOXNO API.
4
+ */
5
+ export declare class XOXNO {
6
+ /**
7
+ * Creates a new XOXNO instance.
8
+ * @param apiUrl - The base URL of the XOXNO API.
9
+ * @param apiKey - The API key for accessing the XOXNO API.
10
+ */
11
+ constructor(apiUrl?: string, apiKey?: string);
12
+ }
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.XOXNO=t():e.XOXNO=t()}(self,(()=>(()=>{"use strict";var e={140:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.APIClient=t.Chain=void 0;const i=o(n(218)),s=n(617);var a;!function(e){e.MAINNET="1",e.DEVNET="D"}(a=t.Chain||(t.Chain={}));class c{constructor(e,t,n){this.fetchWithTimeout=(e,t={},n=4e4)=>r(this,void 0,void 0,(function*(){var r,o;const s=Math.round((new Date).getTime()/1e3),a=Object.assign(Object.assign({"Accept-Encoding":"gzip,deflate,br","xo-time":`Sent-At:${s}`,Referer:"https://xoxno.sdk","User-Agent":"XOXNO/1.0/SDK"},"POST"===t.method?{"Content-Type":"application/json"}:{}),null!==(r=t.headers)&&void 0!==r?r:{});try{const{data:r}=yield(0,i.default)(`${this.apiUrl}${e}${t.params?"?"+Object.keys(t.params).map((e=>`${e}=${encodeURIComponent(t.params[e])}`)).join("&"):""}`,Object.assign(Object.assign(Object.assign({timeout:n},t),Object.keys(a).length?{headers:a}:{}),{method:null!==(o=t.method)&&void 0!==o?o:"GET"}));return r}catch(n){throw new Error("Something went wrong inside fetchWithTimeout "+e+" "+JSON.stringify(t)+" "+n)}})),this.apiUrl=e,this.apiKey=t,this.chain=n,this.config=n===a.MAINNET?{XO_SC:s.XOXNO_SC,FM_SC:s.FM_SC,DR_SC:s.DR_SC,KG_SC:s.KG_SC,Staking_SC:s.Staking_SC,Manager_SC:s.Manager_SC,P2P_SC:s.P2P_SC}:{XO_SC:s.XOXNO_SC_DEV,FM_SC:s.FM_SC,DR_SC:s.DR_SC,KG_SC:s.KG_SC,Staking_SC:s.Staking_SC_DEV,Manager_SC:s.Manager_SC_DEV,P2P_SC:s.P2P_SC_DEV}}static init(e=s.API_URL,t="",n=a.MAINNET){return c.instance||(c.instance=new c(e,t,n)),c.instance}static getClient(){if(!c.instance)throw new Error("APIClient has not been initialized");return c.instance}}t.APIClient=c},617:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.P2P_SC_DEV=t.Manager_SC_DEV=t.Staking_SC_DEV=t.XOXNO_SC_DEV=t.P2P_SC=t.Manager_SC=t.Staking_SC=t.KG_SC=t.DR_SC=t.FM_SC=t.XOXNO_SC=t.API_URL_DEV=t.API_URL=void 0,t.API_URL="https://api.xoxno.com",t.API_URL_DEV="https://api-dev.xoxno.com",t.XOXNO_SC="erd1qqqqqqqqqqqqqpgq6wegs2xkypfpync8mn2sa5cmpqjlvrhwz5nqgepyg8",t.FM_SC="erd1qqqqqqqqqqqqqpgq705fxpfrjne0tl3ece0rrspykq88mynn4kxs2cg43s",t.DR_SC="erd1qqqqqqqqqqqqqpgqd9rvv2n378e27jcts8vfwynpx0gfl5ufz6hqhfy0u0",t.KG_SC="erd1qqqqqqqqqqqqqpgq8xwzu82v8ex3h4ayl5lsvxqxnhecpwyvwe0sf2qj4e",t.Staking_SC="erd1qqqqqqqqqqqqqpgqvpkd3g3uwludduv3797j54qt6c888wa59w2shntt6z",t.Manager_SC="erd1qqqqqqqqqqqqqpgqg9fa0dmpn8fu3fnleeqn5zt8rl8mdqjkys5s2gtas7",t.P2P_SC="erd1qqqqqqqqqqqqqpgq47y8hnct68v6asjv6gxem6h9rumn9frzah0skhxxt6",t.XOXNO_SC_DEV="erd1qqqqqqqqqqqqqpgqn4fnwl43hhchz9emdy66eh5azzhl599zd8ssxjdyh3",t.Staking_SC_DEV="erd1qqqqqqqqqqqqqpgqmkt2fvumf0zgum5qd0awl2l46x2pxdgmr5rswjr6r8",t.Manager_SC_DEV="erd1qqqqqqqqqqqqqpgq6sysl7mga393a850xemfpawaqanf4da5d8ssp3xamn",t.P2P_SC_DEV="erd1qqqqqqqqqqqqqpgqhuvnvkwwmucdzy3g7pvgvjumjfcgfwf69w2svch5c2"},218:(e,t,n)=>{function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),e=>{const t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>s(t)===e),u=e=>t=>typeof t===e,{isArray:l}=Array,f=u("undefined"),d=c("ArrayBuffer"),p=u("string"),h=u("function"),m=u("number"),g=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=c("Date"),q=c("File"),w=c("Blob"),S=c("FileList"),E=c("URLSearchParams");function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),l(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function _(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,R=e=>!f(e)&&e!==C,v=(A="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>A&&e instanceof A);var A;const x=c("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),P=c("RegExp"),T=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};O(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},N="abcdefghijklmnopqrstuvwxyz",D="0123456789",U={DIGIT:D,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+D};var F={isArray:l,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||h(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:p,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:y,isUndefined:f,isDate:b,isFile:q,isBlob:w,isRegExp:P,isFunction:h,isStream:e=>g(e)&&h(e.pipe),isURLSearchParams:E,isTypedArray:v,isFileList:S,forEach:O,merge:function e(){const{caseless:t}=R(this)&&this||{},n={},r=(r,o)=>{const i=t&&_(n,o)||o;y(n[i])&&y(r)?n[i]=e(n[i],r):y(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:o}={})=>(O(t,((t,o)=>{n&&h(t)?e[o]=r(t,n):e[o]=t}),{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:x,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:T,freezeMethods:e=>{T(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:_,global:C,isContextDefined:R,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=l(e)?[]:{};return O(e,((e,t)=>{const i=n(e,r+1);!f(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)}};function L(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}F.inherits(L,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const k=L.prototype,B={};function M(e){return F.isPlainObject(e)||F.isArray(e)}function I(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function z(e,t,n){return e?e.concat(t).map((function(e,t){return e=I(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{B[e]={value:e}})),Object.defineProperties(L,B),Object.defineProperty(k,"isAxiosError",{value:!0}),L.from=(e,t,n,r,o,i)=>{const s=Object.create(k);return F.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),L.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const V=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function X(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!a&&F.isBlob(e))throw new L("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(F.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(M)}(e)||(F.isFileList(e)||F.endsWith(n,"[]"))&&(a=F.toArray(e)))return n=I(n),a.forEach((function(e,r){!F.isUndefined(e)&&null!==e&&t.append(!0===s?z([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!M(e)||(t.append(z(o,n,i),c(e)),!1)}const l=[],f=Object.assign(V,{defaultVisitor:u,convertValue:c,isVisitable:M});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!F.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),F.forEach(n,(function(n,i){!0===(!(F.isUndefined(n)||null===n)&&o.call(t,n,F.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function H(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&X(e,this,t)}const J=K.prototype;function W(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function G(e,t,n){if(!t)return e;const r=n&&n.encode||W,o=n&&n.serialize;let i;if(i=o?o(t,n):F.isURLSearchParams(t)?t.toString():new K(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,H)}:H;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var $=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Q={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:K,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Y(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&F.isArray(r)?r.length:i,a?(F.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&F.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&F.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,((e,r)=>{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const ee={"Content-Type":void 0},te={transitional:Q,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=F.isObject(e);if(o&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return r&&r?JSON.stringify(Y(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return X(e,new Z.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Z.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=F.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return X(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(F.isString(e))try{return(0,JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||te.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&F.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw L.from(e,L.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};F.forEach(["delete","get","head"],(function(e){te.headers[e]={}})),F.forEach(["post","put","patch"],(function(e){te.headers[e]=F.merge(ee)}));var ne=te;const re=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oe=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function se(e){return!1===e||null==e?e:F.isArray(e)?e.map(se):String(e)}function ae(e,t,n,r,o){return F.isFunction(r)?r.call(this,t,n):(o&&(t=n),F.isString(t)?F.isString(r)?-1!==t.indexOf(r):F.isRegExp(r)?r.test(t):void 0:void 0)}class ce{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ie(t);if(!o)throw new Error("header name must be a non-empty string");const i=F.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=se(e))}const i=(e,t)=>F.forEach(e,((e,n)=>o(e,n,t)));return F.isPlainObject(e)||e instanceof this.constructor?i(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&re[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ie(e)){const n=F.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(F.isFunction(t))return t.call(this,e,n);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ie(e)){const n=F.findKey(this,e);return!(!n||void 0===this[n]||t&&!ae(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ie(e)){const o=F.findKey(n,e);!o||t&&!ae(0,n[o],o,t)||(delete n[o],r=!0)}}return F.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ae(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return F.forEach(this,((r,o)=>{const i=F.findKey(n,o);if(i)return t[i]=se(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=se(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&F.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[oe]=this[oe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ie(e);t[r]||(function(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return F.isArray(e)?e.forEach(r):r(e),this}}ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.freezeMethods(ce.prototype),F.freezeMethods(ce);var ue=ce;function le(e,t){const n=this||ne,r=t||n,o=ue.from(r.headers);let i=r.data;return F.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function fe(e){return!(!e||!e.__CANCEL__)}function de(e,t,n){L.call(this,null==e?"canceled":e,L.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(de,L,{__CANCEL__:!0});var pe=Z.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+"="+encodeURIComponent(t)),F.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),F.isString(r)&&s.push("path="+r),F.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function he(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var me=Z.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=F.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ge(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const ye={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=ue.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}F.isFormData(r)&&(Z.isStandardBrowserEnv||Z.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const u=he(e.baseURL,e.url);function l(){if(!c)return;const r=ue.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),G(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new L("Request aborted",L.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new L("Network Error",L.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Q;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new L(t,r.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,c)),c=null},Z.isStandardBrowserEnv){const t=(e.withCredentials||me(u))&&e.xsrfCookieName&&pe.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&F.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",ge(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ge(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new de(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);f&&-1===Z.protocols.indexOf(f)?n(new L("Unsupported protocol "+f+":",L.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};F.forEach(ye,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new de(null,e)}function qe(e){return be(e),e.headers=ue.from(e.headers),e.data=le.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=F.isString(n)?ye[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new L(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(F.hasOwnProp(ye,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!F.isFunction(r))throw new TypeError("adapter is not a function");return r})(e.adapter||ne.adapter)(e).then((function(t){return be(e),t.data=le.call(e,e.transformResponse,t),t.headers=ue.from(t.headers),t}),(function(t){return fe(t)||(be(e),t&&t.response&&(t.response.data=le.call(e,e.transformResponse,t.response),t.response.headers=ue.from(t.response.headers))),Promise.reject(t)}))}const we=e=>e instanceof ue?e.toJSON():e;function Se(e,t){t=t||{};const n={};function r(e,t,n){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:n},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function o(e,t,n){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!F.isUndefined(t))return r(void 0,t)}function s(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(we(e),we(t),!0)};return F.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);F.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Ee={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ee[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Oe={};Ee.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new L(r(o," has been removed"+(t?" in "+t:"")),L.ERR_DEPRECATED);return t&&!Oe[o]&&(Oe[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var _e={assertOptions:function(e,t,n){if("object"!=typeof e)throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new L("option "+i+" must be "+n,L.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new L("Unknown option "+i,L.ERR_BAD_OPTION)}},validators:Ee};const Ce=_e.validators;class Re{constructor(e){this.defaults=e,this.interceptors={request:new $,response:new $}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&_e.assertOptions(n,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),void 0!==r&&_e.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&F.merge(o.common,o[t.method]),i&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ue.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[qe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=qe.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return G(he((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(e){Re.prototype[e]=function(t,n){return this.request(Se(n||{},{method:e,url:t,data:(n||{}).data}))}})),F.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Se(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Re.prototype[e]=t(),Re.prototype[e+"Form"]=t(!0)}));var ve=Re;class Ae{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new de(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ae((function(t){e=t})),cancel:e}}}var xe=Ae;const je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(je).forEach((([e,t])=>{je[t]=e}));var Pe=je;const Te=function e(t){const n=new ve(t),o=r(ve.prototype.request,n);return F.extend(o,ve.prototype,n,{allOwnKeys:!0}),F.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Se(t,n))},o}(ne);Te.Axios=ve,Te.CanceledError=de,Te.CancelToken=xe,Te.isCancel=fe,Te.VERSION="1.3.4",Te.toFormData=X,Te.AxiosError=L,Te.Cancel=Te.CanceledError,Te.all=function(e){return Promise.all(e)},Te.spread=function(e){return function(t){return e.apply(null,t)}},Te.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},Te.mergeConfig=Se,Te.AxiosHeaders=ue,Te.formToJSON=e=>Y(F.isHTMLForm(e)?new FormData(e):e),Te.HttpStatusCode=Pe,Te.default=Te,e.exports=Te}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.XOXNO=void 0;const t=n(140),o=n(617);e.XOXNO=class{constructor(e=o.API_URL,n=""){t.APIClient.init(e,n)}}})(),r})()));
@@ -0,0 +1,79 @@
1
+ import { GlobalOffer } from '../types/collection';
2
+ import type { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smartContract';
3
+ export declare class SCInteraction {
4
+ private xo;
5
+ private call;
6
+ constructor(marketAbiXOXNO: SmartContract);
7
+ static create(): Promise<SCInteraction>;
8
+ private getResult;
9
+ /**
10
+ * Gets the percentage of each transaction that will be paid to the marketplace.
11
+ *
12
+ * @returns The percentage of each transaction that will be paid to the marketplace.
13
+ */
14
+ getMarketplaceFees: () => Promise<number>;
15
+ /**
16
+ * Retrieves the list of accepted payment tokens.
17
+ * @returns {string[]} A list of accepted payment tokens.
18
+ */
19
+ getAcceptedPaymentTokens: () => Promise<string[]>;
20
+ /**
21
+ * This function returns a list of IDs of global offers.
22
+ * @returns {number[]} a list of IDs of global offers.
23
+ */
24
+ getGlobalOfferIDs: () => Promise<number[]>;
25
+ /**
26
+ * Gets the balance of a user in a token of a specific pool.
27
+ * @param address The address of the user.
28
+ * @param token The token address.
29
+ * @param nonce The nonce of the pool.
30
+ * @returns {number} The balance of the user in the token of the pool.
31
+ */
32
+ getUserPoolBalance(address: string, token: string, nonce: number): Promise<number>;
33
+ private isOfferActive;
34
+ /**
35
+ * Returns the global offer data for the offer with the given id.
36
+ *
37
+ * @param global_offer_id The id of the global offer for which to return the data.
38
+ *
39
+ * @returns An object containing the global offer data for the offer with the given id. If the global offer id is invalid, the return value will be null.
40
+ */
41
+ getGlobalOfferData: (global_offer_id: number) => Promise<GlobalOffer>;
42
+ /** Gets the number of listings.
43
+ * @returns {number} The number of listings.
44
+ * */
45
+ getListingsCount(): Promise<number>;
46
+ /** Gets the number of custom offers.
47
+ * @returns {number} The number of custom offers.
48
+ * */
49
+ getOffersCount(): Promise<number>;
50
+ /** Gets the number of global offers.
51
+ * @returns {number} The number of global offers.
52
+ * */
53
+ getGlobalOffersCount(): Promise<number>;
54
+ /** Gets the number of collections listed.
55
+ * @returns {number} The number of collections listed.
56
+ * */
57
+ getCollectionsCount(): Promise<number>;
58
+ /**
59
+ * Checks whether a collection is listed with at least 1 NFT.
60
+ *
61
+ * @param collection name of the collection
62
+ * @return true if the collection is listed, false otherwise
63
+ */
64
+ isCollectionListed(collection: string): Promise<boolean>;
65
+ /** Gets the on sale NFT count of the collection.
66
+ *
67
+ * @param collection The collection identifier for which one wants to get the on sale NFT count.
68
+ *
69
+ * @returns {number} The on sale NFT count of the collection.
70
+ * */
71
+ getCollectionNFTsOnSaleCount(collection: string): Promise<number>;
72
+ /** Gets the active unique auction IDs of collection.
73
+ *
74
+ * @param collection The collection identifier for which one wants to get the active unique auction IDs.
75
+ *
76
+ * @returns {number[]} The active unique auction IDs of collection.
77
+ * */
78
+ getAuctionIDsForCollection(collection: string): Promise<number[]>;
79
+ }
@@ -0,0 +1,78 @@
1
+ import type { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smartContract';
2
+ /**
3
+ * LaunchpadModule provides methods to interact with the minter smart contract.
4
+ * @class
5
+ */
6
+ export declare class LaunchpadModule {
7
+ private minter;
8
+ private call;
9
+ /**
10
+ * @constructor
11
+ * @param {SmartContract} minterAbiXOXNO - The minter smart contract instance.
12
+ */
13
+ constructor(minterAbiXOXNO: SmartContract);
14
+ /**
15
+ * Executes the provided interaction and returns the result.
16
+ * @private
17
+ * @param {Interaction} interaction - The smart contract interaction.
18
+ * @returns {Promise<any>} The result of the interaction.
19
+ */
20
+ private getResult;
21
+ /**
22
+ * Initializes the LaunchpadModule with a minter smart contract instance.
23
+ * @static
24
+ * @param {string} minterSC - The minter smart contract address.
25
+ * @returns {Promise<LaunchpadModule>} A new instance of LaunchpadModule.
26
+ */
27
+ static init(minterSC: string): Promise<LaunchpadModule>;
28
+ /**
29
+ * Fetches all unique tags from the minter smart contract.
30
+ * @public
31
+ * @returns {Promise<string[]>} An array of unique tags.
32
+ */
33
+ getAllUniqueTags: () => Promise<string[]>;
34
+ /**
35
+ * Fetches the global buy count for a user and tag.
36
+ * @public
37
+ * @param {string} user - The user's address.
38
+ * @param {string} tag - The tag.
39
+ * @returns {Promise<number>} The global buy count.
40
+ */
41
+ getWalletGlobalBuyCount: (user: string, tag: string) => Promise<number>;
42
+ /**
43
+ * Fetches the stage buy count for a user, tag, and stage.
44
+ * @public
45
+ * @param {string} user - The user's address.
46
+ * @param {string} tag - The tag.
47
+ * @param {string} stage - The stage.
48
+ * @returns {Promise<number>} The stage buy count.
49
+ */
50
+ getWalletStageBuyCount: (user: string, tag: string, stage: string) => Promise<number>;
51
+ /**
52
+ * Fetches the local owner's address from the minter smart contract.
53
+ * @public
54
+ * @returns {Promise<string>} The local owner's address.
55
+ */
56
+ getLocalOwner: () => Promise<string>;
57
+ /**
58
+ * Fetches the launchpad cut fee percentage from the minter smart contract.
59
+ * @public
60
+ * @returns {Promise<number>} The launchpad cut fee percentage.
61
+ */
62
+ getLaunchpadCutFee: () => Promise<number>;
63
+ /**
64
+ * Fetches the stage whitelist of wallets for a tag and stage.
65
+ * @public
66
+ * @param {string} tag - The tag.
67
+ * @param {string} stage - The stage.
68
+ * @returns {Promise<string[]>} An array of whitelisted wallet addresses.
69
+ */
70
+ getStageWhitelist: (tag: string, stage: string) => Promise<string[]>;
71
+ /**
72
+ * Fetches the list of stages for a tag.
73
+ * @public
74
+ * @param {string} tag - The tag.
75
+ * @returns {Promise<string[]>} An array of stages.
76
+ */
77
+ getStages: (tag: string) => Promise<string[]>;
78
+ }
@@ -0,0 +1,44 @@
1
+ import { NftData } from '../types/nft';
2
+ import { TradingActivityResponse, TradincActivityArgs } from '../types/trading';
3
+ /**
4
+ * NFTModule provides a set of methods to interact with single NFTs.
5
+ * It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
6
+ *
7
+ * @example
8
+ * const xoxno = new XOXNO({ apiURL: 'https://api.xoxno.com', apiKey: 'your-api-key' });
9
+ * const nftModule = xoxno.nft;
10
+ */
11
+ export declare class NFTModule {
12
+ private api;
13
+ constructor();
14
+ /**
15
+ * Get the NFT data for the specified identifier.
16
+ * @param identifier The NFT identifier. Must be a valid NFT identifier.
17
+ * @returns {Promise<NftData>} The NFT data.
18
+ */
19
+ getNFTByIdentifier: (identifier: string) => Promise<NftData>;
20
+ /**
21
+ * Gets an NFT by collection and nonce.
22
+ * @param collection The collection ticker.
23
+ * @param nonce The nonce of the NFT.
24
+ * @returns {Promise<NftData>} The NFT data.
25
+ * @throws Throws an error when the collection ticker is invalid.
26
+ */
27
+ getNFTByCollectionAndNonce: (collection: string, nonce: number) => Promise<NftData>;
28
+ /**
29
+ * Get NFT by collection and nonce hex
30
+ *
31
+ * @param collection - collection ticker
32
+ * @param nonceHex - nonce hex
33
+ * @return {Promise<NftData>} NFT data
34
+ */
35
+ getNFTByCollectionAndNonceHex: (collection: string, nonceHex: string) => Promise<NftData>;
36
+ /**
37
+ * Retrieves trading history based on the provided arguments.
38
+ *
39
+ * @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
40
+ * @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
41
+ * @throws {Error} Throws an error if the 'top' argument is greater than 35.
42
+ */
43
+ getTradingActivity: (args: TradincActivityArgs) => Promise<TradingActivityResponse>;
44
+ }
@@ -0,0 +1,313 @@
1
+ import { NftData } from './nft';
2
+ export interface ISocials {
3
+ twitter: string;
4
+ instagram: string;
5
+ website: string;
6
+ telegram: string;
7
+ discord: string;
8
+ facebook: string;
9
+ youtube: string;
10
+ }
11
+ export interface IMintInfo {
12
+ contractAddress: string;
13
+ totalNftMinted: number;
14
+ collectionTag: string;
15
+ cid: string;
16
+ mediaType: string;
17
+ collectionSize: number;
18
+ nftTransferLimited: string;
19
+ allowsPublicBurn: string;
20
+ kycRequired: string;
21
+ allowsRefund: string;
22
+ hasReveal: string;
23
+ }
24
+ export interface ICollectionProfile {
25
+ dataType: 'collectionProfile';
26
+ collection: string;
27
+ name: string;
28
+ description: string;
29
+ isVisible: boolean;
30
+ isVerified: boolean;
31
+ profile: string;
32
+ banner: string;
33
+ statistics: {
34
+ tradeData: {
35
+ dayEgldVolume: number;
36
+ weekEgldVolume: number;
37
+ totalEgldVolume: number;
38
+ averageEgldPrice: number;
39
+ athEgldPrice: number;
40
+ athTxHash: string;
41
+ totalTrades: number;
42
+ };
43
+ mintData: {
44
+ totalMintEgldVolume: number;
45
+ weekMintEgldVolume: number;
46
+ dayMintEgldVolume: number;
47
+ };
48
+ other: {
49
+ nftCount: number;
50
+ followCount: number;
51
+ holdersCount?: number;
52
+ };
53
+ };
54
+ owner: string;
55
+ creator: string;
56
+ isMintable: boolean;
57
+ mintInfo: IMintInfo;
58
+ mintStages: {
59
+ name: string;
60
+ collectionTag: string;
61
+ mintEnabled: boolean;
62
+ isWhitelist: boolean;
63
+ startTime: number;
64
+ endTime: number;
65
+ mintLimit: number;
66
+ mintCount: number;
67
+ prices: {
68
+ tokenIdentifier: string;
69
+ tokenNonce: string;
70
+ amount: string;
71
+ }[];
72
+ walletLimit: number;
73
+ }[];
74
+ hasStaking: boolean;
75
+ id: string;
76
+ socials: ISocials;
77
+ type: string;
78
+ lastVerifiedTimestamp: number;
79
+ lastVerifiedBy: string;
80
+ _ts: number;
81
+ }
82
+ export interface AttributeData {
83
+ attributeOccurrence: number;
84
+ FloorPrice: number;
85
+ OnSale: number;
86
+ }
87
+ export interface MetadataAttribute {
88
+ trait_type: string;
89
+ value: string;
90
+ }
91
+ export interface TraitValues {
92
+ [traitValue: string]: AttributeData;
93
+ }
94
+ export interface ICollectionAttributes {
95
+ [traitType: string]: TraitValues;
96
+ }
97
+ export declare enum Marketplace {
98
+ XO = "XO",
99
+ FM = "FM",
100
+ DR = "DR",
101
+ KG = "KG"
102
+ }
103
+ export interface GlobalOffer {
104
+ attributes: MetadataAttribute[];
105
+ collection: string;
106
+ isActive: boolean;
107
+ marketplace: string;
108
+ offer_id: number;
109
+ owner: string;
110
+ ownerProfile?: string;
111
+ ownerUsername?: string;
112
+ payment_nonce: number;
113
+ payment_token: string;
114
+ price: string;
115
+ quantity: number;
116
+ short_price: number;
117
+ timestamp: number;
118
+ }
119
+ export declare enum FieldsToSelect {
120
+ Rank = "metadata/rarity/rank",
121
+ Attributes = "metadata/attributes",
122
+ Description = "metadata/description",
123
+ Name = "name",
124
+ OnSale = "onSale",
125
+ SaleInfo = "saleInfoNft",
126
+ Royalties = "royalties",
127
+ Identifier = "identifier",
128
+ Collection = "collection",
129
+ OriginalURL = "url",
130
+ Nonce = "nonce",
131
+ ContentType = "originalMedia/contentType",
132
+ WasProcessed = "wasProcessed",
133
+ AvifURL = "avifUrl",
134
+ WebpURL = "webpUrl",
135
+ Type = "type"
136
+ }
137
+ export declare enum SearchOrderBy {
138
+ PriceHighToLow = "saleInfoNft/min_bid_short desc",
139
+ PriceLowToHigh = "saleInfoNft/min_bid_short asc",
140
+ RarityHighToLow = "metadata/rarity/rank desc",
141
+ RarityLowToHigh = "metadata/rarity/rank asc",
142
+ NonceHighToLow = "nonce desc",
143
+ NonceLowToHigh = "nonce asc",
144
+ RecentListed = "saleInfoNft/timestamp desc",
145
+ OldestListed = "saleInfoNft/timestamp asc"
146
+ }
147
+ export declare enum CollectionsOrderBy {
148
+ WeekVolumeHighToLow = "statistics.tradeData.weekEgldVolume desc",
149
+ WeekVolumeLowToHigh = "statistics.tradeData.weekEgldVolume asc",
150
+ DailyVolumeHighToLow = "statistics.tradeData.dayEgldVolume desc",
151
+ DailyVolumeLowToHigh = "statistics.tradeData.dayEgldVolume asc",
152
+ TotalVolumeHighToLow = "statistics.tradeData.totalEgldVolume desc",
153
+ TotalVolumeLowToHigh = "statistics.tradeData.totalEgldVolume asc",
154
+ AvgVolumePriceHighToLow = "statistics.tradeData.averageEgldPrice desc",
155
+ AvgVolumePriceLowToHigh = "statistics.tradeData.averageEgldPrice asc",
156
+ ATHHighToLow = "statistics.tradeData.athEgldPrice desc",
157
+ ATHLowToHigh = "statistics.tradeData.athEgldPrice asc",
158
+ TotalTradesHighToLow = "statistics.tradeData.totalTrades desc",
159
+ TotalTradesLowToHigh = "statistics.tradeData.totalTrades asc",
160
+ SupplyHighToLow = "statistics.other.nftCount desc",
161
+ SupplyLowToHigh = "statistics.other.nftCount asc",
162
+ FollowersHighToLow = "statistics.other.followCount desc",
163
+ FollowersLowToHigh = "statistics.other.followCount asc"
164
+ }
165
+ export declare enum CollectionsFieldsToSelect {
166
+ Profile = "profile",
167
+ Description = "description",
168
+ Creator = "creator",
169
+ Owner = "owner",
170
+ Socials = "socials",
171
+ Type = "type",
172
+ HasStaking = "hasStaking",
173
+ MintInfo = "mintInfo",
174
+ MintStages = "mintStages",
175
+ Name = "name",
176
+ Banner = "banner",
177
+ IsVerified = "isVerified",
178
+ IsMintable = "isMintable",
179
+ Statistics = "statistics",
180
+ Collection = "collection"
181
+ }
182
+ export interface Filter {
183
+ marketplace?: Marketplace[];
184
+ onSale?: boolean;
185
+ auctionTypes?: string[];
186
+ tokens?: string[];
187
+ attributes?: MetadataAttribute[];
188
+ range?: {
189
+ min: number;
190
+ max: number;
191
+ type: string;
192
+ };
193
+ rankRange?: {
194
+ min?: number;
195
+ max?: number;
196
+ };
197
+ levelRange?: {
198
+ min?: number;
199
+ max?: number;
200
+ };
201
+ }
202
+ export interface SearchNFTs {
203
+ filters: Filter;
204
+ name?: string;
205
+ orderBy?: SearchOrderBy[];
206
+ collection: string;
207
+ top: number;
208
+ skip: number;
209
+ select?: FieldsToSelect[];
210
+ }
211
+ export interface SearchNFTsArgs {
212
+ /** The collection to search in */
213
+ collection: string;
214
+ /** If true, will return only NFTs that are on sale */
215
+ onlyOnSale?: boolean;
216
+ /** If true, will return only NFTs that are on auction */
217
+ onlyAuctions?: boolean;
218
+ /** If set, will return only NFTs with a price in the specified range */
219
+ priceRange?: {
220
+ min: number;
221
+ max: number;
222
+ };
223
+ /** If set, will return only NFTs listed in the specified tokens */
224
+ listedInToken?: string[];
225
+ /** If set, will return only NFTs with a rank in the specified range */
226
+ rankRange?: {
227
+ min: number;
228
+ max: number;
229
+ };
230
+ /** If set, will return only NFTs with a cantina level in the specified range */
231
+ cantinaLevelRange?: {
232
+ min: number;
233
+ max: number;
234
+ };
235
+ /** If set, will return only NFTs with a name that contains the specified string */
236
+ searchName?: string;
237
+ /** The number of results to return */
238
+ top?: number;
239
+ /** The order by to use */
240
+ skip?: number;
241
+ /** The order of the results based on a field */
242
+ orderBy?: SearchOrderBy[];
243
+ /** If set, will return only the specified fields */
244
+ onlySelectFields?: FieldsToSelect[];
245
+ /** If set, will return only NFTs listed in the specified marketplaces */
246
+ listedOnlyOn?: Marketplace[];
247
+ /** If set, will return only NFTs with the specified attributes */
248
+ attributes?: MetadataAttribute[];
249
+ }
250
+ export interface SearchNFTsResponse {
251
+ /** The total count of the results for the specific query */
252
+ count: number;
253
+ /** The results count for the current page */
254
+ resultsCount: number;
255
+ /** The results for the current page */
256
+ results: NftData[];
257
+ /** If the results are empty */
258
+ empty: boolean;
259
+ /** The payload to use to get the next page */
260
+ getNextPagePayload: SearchNFTsArgs;
261
+ /** If there are more results to fetch */
262
+ hasMoreResults: boolean;
263
+ }
264
+ export interface TradingActivity {
265
+ action: string;
266
+ attributes: MetadataAttribute[];
267
+ avifUrl: string;
268
+ buyer: string;
269
+ buyerUsername: string;
270
+ collection: string;
271
+ egldValue: number;
272
+ id: string;
273
+ identifier: string;
274
+ marketplace: Marketplace;
275
+ name: string;
276
+ paymentToken: string;
277
+ price: number;
278
+ rank: number;
279
+ seller: string;
280
+ sellerUsername: string;
281
+ timestamp: number;
282
+ txHash: string;
283
+ url: string;
284
+ usdPrice: number;
285
+ webpUrl: string;
286
+ _ts: number;
287
+ }
288
+ export interface GetCollectionsArgs {
289
+ /** The collections to fetch the profile */
290
+ collections?: string[];
291
+ /** If true, will return only NFTs that are mintable */
292
+ onlyMintable?: boolean;
293
+ /** The number of results to return */
294
+ top?: number;
295
+ /** The order by to use */
296
+ skip?: number;
297
+ /** The order of the results based on a field */
298
+ orderBy?: CollectionsOrderBy;
299
+ /** If set, will return only the specified fields */
300
+ onlySelectFields?: CollectionsFieldsToSelect[];
301
+ }
302
+ export interface CollectionsNFTsResponse {
303
+ /** The results count for the current page */
304
+ resultsCount: number;
305
+ /** The results for the current page */
306
+ results: ICollectionProfile[];
307
+ /** If the results are empty */
308
+ empty: boolean;
309
+ /** The payload to use to get the next page */
310
+ getNextPagePayload: GetCollectionsArgs;
311
+ /** If there are more results to fetch */
312
+ hasMoreResults: boolean;
313
+ }