@xoxno/sdk-js 0.1.355 → 1.0.0
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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.esm.js +1 -1
- package/dist/interactions/index.d.ts +27 -4
- package/dist/{types/interactions.d.ts → interactions/types.d.ts} +5 -39
- package/dist/interactor.cjs.js +1 -1
- package/dist/interactor.d.ts +0 -2
- package/dist/interactor.esm.js +1 -1
- package/dist/sdk/endpoints.d.ts +19 -0
- package/dist/sdk/index.d.ts +86 -0
- package/dist/sdk/swagger.d.ts +1708 -0
- package/dist/sdk/utils.d.ts +9 -0
- package/dist/utils/api.d.ts +3 -2
- package/package.json +7 -7
- package/dist/collection/index.d.ts +0 -294
- package/dist/common/index.d.ts +0 -72
- package/dist/nft/index.d.ts +0 -75
- package/dist/staking/index.d.ts +0 -11
- package/dist/types/collection.d.ts +0 -733
- package/dist/types/common.d.ts +0 -71
- package/dist/types/event.d.ts +0 -195
- package/dist/types/index.d.ts +0 -23
- package/dist/types/nft.d.ts +0 -129
- package/dist/types/staking.d.ts +0 -68
- package/dist/types/trading.d.ts +0 -111
- package/dist/types/user.d.ts +0 -290
- package/dist/users/index.d.ts +0 -201
- /package/dist/{utils/types.d.ts → sdk/parseSwagger.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const coveredMethods: readonly ["PATCH", "POST", "DELETE", "PUT"];
|
|
2
|
+
declare const _nestTypes: readonly ["string", "number", "boolean"];
|
|
3
|
+
declare const _returnTypes: readonly ["application/json", "multipart/form-data"];
|
|
4
|
+
declare const _securityModes: readonly ["requiredAny", "requiredWeb2", "requiredJwt", "optionalAny"];
|
|
5
|
+
export type ICoveredMethods = (typeof coveredMethods)[number];
|
|
6
|
+
export type INestType = (typeof _nestTypes)[number];
|
|
7
|
+
export type IReturnTypes = (typeof _returnTypes)[number];
|
|
8
|
+
export type ISecurityMode = (typeof _securityModes)[number];
|
|
9
|
+
export {};
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IChainID } from '@multiversx/sdk-core/out/interface';
|
|
2
|
-
|
|
2
|
+
declare enum Chain {
|
|
3
3
|
MAINNET = "1",
|
|
4
4
|
DEVNET = "D"
|
|
5
5
|
}
|
|
@@ -26,7 +26,8 @@ export declare class XOXNOClient {
|
|
|
26
26
|
chain?: Chain;
|
|
27
27
|
}>): XOXNOClient;
|
|
28
28
|
static getInstance(): XOXNOClient;
|
|
29
|
-
fetchWithTimeout: <T>(path: string, options?: RequestInit & {
|
|
29
|
+
fetchWithTimeout: <T>(path: string, { params, ...options }?: RequestInit & {
|
|
30
30
|
params?: Record<string, any>;
|
|
31
31
|
}) => Promise<T>;
|
|
32
32
|
}
|
|
33
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xoxno/sdk-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "The SDK to interact with the XOXNO Protocol!",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,10 +24,11 @@
|
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"scripts": {
|
|
26
26
|
"test": "jest",
|
|
27
|
+
"build:sdk": "npx bun run src/sdk/parseSwagger.ts && eslint 'src/sdk/swagger.ts' --fix",
|
|
27
28
|
"build:types": "tsc --emitDeclarationOnly",
|
|
28
29
|
"build:esm": "webpack --config webpack-esm.config.mjs",
|
|
29
30
|
"build:cjs": "webpack --config webpack-cjs.config.mjs",
|
|
30
|
-
"build": "npm run build:types && npm run build:esm && npm run build:cjs",
|
|
31
|
+
"build": "npm run build:sdk && npm run build:types && npm run build:esm && npm run build:cjs",
|
|
31
32
|
"lint": "eslint 'src/**/*.{ts,tsx}' --fix",
|
|
32
33
|
"format": "prettier --write 'src/**/*.{ts,tsx}'",
|
|
33
34
|
"commit": "git-cz",
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"@types/node": "^22.10.2",
|
|
76
77
|
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
|
77
78
|
"@typescript-eslint/parser": "^8.19.0",
|
|
79
|
+
"bun": "^1.2.18",
|
|
78
80
|
"commitizen": "^4.3.1",
|
|
79
81
|
"cz-conventional-changelog": "^3.3.0",
|
|
80
82
|
"eslint": "^8",
|
|
@@ -93,14 +95,12 @@
|
|
|
93
95
|
"typescript": "^5.7.2",
|
|
94
96
|
"webpack": "^5.97.1",
|
|
95
97
|
"webpack-cli": "^6.0.1",
|
|
96
|
-
"webpack-merge": "^6.0.1"
|
|
98
|
+
"webpack-merge": "^6.0.1",
|
|
99
|
+
"yaml": "^2.8.0"
|
|
97
100
|
},
|
|
98
101
|
"dependencies": {
|
|
99
102
|
"@multiversx/sdk-core": "^13.17.2",
|
|
100
103
|
"@multiversx/sdk-network-providers": "^2.9.3",
|
|
101
|
-
"@xoxno/types": "^1.0.
|
|
102
|
-
"axios": "^1.7.9",
|
|
103
|
-
"protobufjs": "^7.4.0",
|
|
104
|
-
"webpack-bundle-analyzer": "^4.10.2"
|
|
104
|
+
"@xoxno/types": "^1.0.72"
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import type { CollectionMintProfileFilter, CollectionOffersFilter, CollectionProfileDoc, CollectionStatsFilter, CollectionTraitMap, DropsQueryDto, ExploreCollectionsStatisticsDto, FilterQueryDto, GetUserOffersResponseDto, GlobalOffersDto, GlobalSearchResponseDto, NftCosmosResponse, NftDocFilter, NftOfferDocFilter } from '@xoxno/types';
|
|
2
|
-
import type { ActivityChain, AnalyticsGraphs, CollectionListings, CollectionRanksExport, CollectionStatsDoc, CollectionVolume, GetCollectionMintInfo, GetCollectionsArgs, IOwners, ISingleHolder, PublicOnly, StakingSummaryPools } from '../types';
|
|
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 collectionModule = new CollectionModule();
|
|
10
|
-
*/
|
|
11
|
-
export declare class CollectionModule {
|
|
12
|
-
private api;
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
* @async
|
|
17
|
-
* @function getCollectionProfile
|
|
18
|
-
* @param {string} collection - The ticker of the collection to fetch the profile for.
|
|
19
|
-
* @returns {Promise<CollectionProfileDoc>} A promise that resolves to the fetched collection profile.
|
|
20
|
-
*
|
|
21
|
-
* This function fetches the profile of a given collection. It takes the following parameter:
|
|
22
|
-
* - collection (string): The ticker of the collection to fetch the profile for.
|
|
23
|
-
*
|
|
24
|
-
* The function first validates the input ticker and checks if it is a valid collection ticker.
|
|
25
|
-
* If it is valid, the function fetches the collection profile using the API.
|
|
26
|
-
* Finally, it returns a promise that resolves to the fetched collection profile.
|
|
27
|
-
*/
|
|
28
|
-
getCollectionProfile: (collection: string) => Promise<CollectionProfileDoc>;
|
|
29
|
-
/**
|
|
30
|
-
* Fetches the floor price of a collection.
|
|
31
|
-
* @param collection - The ticker of the collection.
|
|
32
|
-
* @param token - The token for the floor price calculation (default: 'EGLD').
|
|
33
|
-
* @returns A Promise that resolves to the collection's floor price as a number.
|
|
34
|
-
* @throws An error if the provided collection ticker is invalid.
|
|
35
|
-
*/
|
|
36
|
-
getCollectionFloorPrice: (collection: string, token?: string) => Promise<{
|
|
37
|
-
price: number;
|
|
38
|
-
usdPrice: number;
|
|
39
|
-
}>;
|
|
40
|
-
/**
|
|
41
|
-
* @public
|
|
42
|
-
* @async
|
|
43
|
-
* @function getCollectionAttributes
|
|
44
|
-
* @param {string} collection - The ticker of the collection to fetch the attributes for.
|
|
45
|
-
* @returns {Promise<CollectionTraitMap>} A promise that resolves to the fetched collection attributes.
|
|
46
|
-
*
|
|
47
|
-
* This function fetches the attributes of a given collection. It takes the following parameter:
|
|
48
|
-
* - collection (string): The ticker of the collection to fetch the attributes for.
|
|
49
|
-
*
|
|
50
|
-
* The function first validates the input ticker and checks if it is a valid collection ticker.
|
|
51
|
-
* If it is valid, the function fetches the collection attributes using the API.
|
|
52
|
-
* Finally, it returns a promise that resolves to the fetched collection attributes.
|
|
53
|
-
*/
|
|
54
|
-
getCollectionAttributes: (collection: string) => Promise<CollectionTraitMap>;
|
|
55
|
-
/**
|
|
56
|
-
* Searches for NFTs based on the provided arguments.
|
|
57
|
-
* @param {NftDocFilter} args - The SearchNFTsArgs object containing the search parameters.
|
|
58
|
-
* @returns {Promise<NftCosmosResponse>} A Promise that resolves to the SearchNFTsResponse object.
|
|
59
|
-
* @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 100.
|
|
60
|
-
*/
|
|
61
|
-
getNFTs: (args: PublicOnly<NftDocFilter>) => Promise<NftCosmosResponse>;
|
|
62
|
-
/**
|
|
63
|
-
* Searches for NFTs based on the provided arguments.
|
|
64
|
-
* @param {NftDocFilter} args - The SearchNFTsArgs object containing the search parameters.
|
|
65
|
-
* @returns {Promise<NftCosmosResponse>} A Promise that resolves to the SearchNFTsResponse object.
|
|
66
|
-
* @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 100.
|
|
67
|
-
*/
|
|
68
|
-
getSearchNFTs: (args: PublicOnly<NftDocFilter>) => Promise<NftCosmosResponse>;
|
|
69
|
-
/**
|
|
70
|
-
* @public
|
|
71
|
-
* @async
|
|
72
|
-
* @function suggestCollections
|
|
73
|
-
* @param {FilterQueryDto} args - An object containing the necessary parameters to fetch suggested collections results.
|
|
74
|
-
* @returns {Promise<GlobalSearchResponseDto>} A promise that resolves to the fetched collections results.
|
|
75
|
-
*
|
|
76
|
-
* This function fetches suggested collections results based on the provided arguments. It takes an object with the following properties:
|
|
77
|
-
* - name (string): The name to search for (required).
|
|
78
|
-
* - top (number, optional): The maximum number of results to return (default is 35, cannot be greater than 100).
|
|
79
|
-
* - skip (number, optional): The number of results to skip (default is 0).
|
|
80
|
-
*
|
|
81
|
-
* Finally, it returns a promise that resolves to the fetched collections results.
|
|
82
|
-
*/
|
|
83
|
-
suggestCollections: (args: PublicOnly<FilterQueryDto>) => Promise<GlobalSearchResponseDto>;
|
|
84
|
-
/**
|
|
85
|
-
* @public
|
|
86
|
-
* @async
|
|
87
|
-
* @function collectionListingsAnalytics
|
|
88
|
-
* @param {string} ticker - The unique collection identifier called ticker
|
|
89
|
-
* @returns {Promise<CollectionListings>} A promise that resolves to the distribution of listings
|
|
90
|
-
*/
|
|
91
|
-
collectionListingsAnalytics: (ticker: string) => Promise<CollectionListings>;
|
|
92
|
-
getOffers: (args: PublicOnly<NftOfferDocFilter>) => Promise<GetUserOffersResponseDto>;
|
|
93
|
-
/**
|
|
94
|
-
* Fetch collections profiles based on the provided arguments.
|
|
95
|
-
* @param {GetCollectionsArgs} args - The GetCollectionsArgs object containing the search parameters.
|
|
96
|
-
* @returns {Promise<CollectionsNFTsResponse>} A Promise that resolves to the CollectionsNFTsResponse object.
|
|
97
|
-
* @throws An error if the 'top' value is greater than 100.
|
|
98
|
-
*/
|
|
99
|
-
getCollections: (args?: GetCollectionsArgs) => Promise<{
|
|
100
|
-
results: CollectionProfileDoc[];
|
|
101
|
-
count: number;
|
|
102
|
-
hasMoreResults: boolean;
|
|
103
|
-
}>;
|
|
104
|
-
/**
|
|
105
|
-
* Fetch global offers based on the provided arguments.
|
|
106
|
-
* @param {CollectionOffersFilter} args - The GetCollectionsArgs object containing the search parameters.
|
|
107
|
-
* @returns {Promise<GlobalOffersDto>} A Promise that resolves to the GlobalOffersResult object.
|
|
108
|
-
* @throws An error if the 'top' value is greater than 100.
|
|
109
|
-
*/
|
|
110
|
-
getGlobalOffers: (args: PublicOnly<CollectionOffersFilter>) => Promise<GlobalOffersDto>;
|
|
111
|
-
/**
|
|
112
|
-
* @public
|
|
113
|
-
* @async
|
|
114
|
-
* @function getCollectionVolume
|
|
115
|
-
* @param {string} collection - The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
116
|
-
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
117
|
-
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
118
|
-
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
119
|
-
* @returns {Promise<CollectionVolume[]>} A promise that resolves to an array of collection volume data.
|
|
120
|
-
*
|
|
121
|
-
* This function fetches volume data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
122
|
-
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
123
|
-
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
124
|
-
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
125
|
-
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
126
|
-
*
|
|
127
|
-
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
128
|
-
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
129
|
-
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
130
|
-
*/
|
|
131
|
-
getCollectionVolume: (collection: string, after: string, before: string, bin: string) => Promise<CollectionVolume[]>;
|
|
132
|
-
/**
|
|
133
|
-
* @public
|
|
134
|
-
* @async
|
|
135
|
-
* @function getMarketplaceVolume
|
|
136
|
-
* @param {string} after - The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
137
|
-
* @param {string} before - The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
138
|
-
* @param {string} bin - The binning period for the volume data (e.g., '1d' for 1 day).
|
|
139
|
-
* @returns {Promise<CollectionVolume[]>} A promise that resolves to an array of collection volume data.
|
|
140
|
-
*
|
|
141
|
-
* This function fetches volume data for a given collection within a specified date range and binning period. It takes the following parameters:
|
|
142
|
-
* - collection (string): The ticker of the collection to fetch the volume for (e.g., 'EAPES-8f3c1f').
|
|
143
|
-
* - after (string): The start date (inclusive) of the date range for the volume data (e.g., '2023-04-17').
|
|
144
|
-
* - before (string): The end date (inclusive) of the date range for the volume data (e.g., '2023-04-25').
|
|
145
|
-
* - bin (string): The binning period for the volume data (e.g., '1d' for 1 day).
|
|
146
|
-
*
|
|
147
|
-
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
148
|
-
* If it is valid, the function fetches the collection volume data using the API with the specified query parameters.
|
|
149
|
-
* Finally, it returns a promise that resolves to an array of collection volume data.
|
|
150
|
-
*/
|
|
151
|
-
getMarketplaceVolume: (after: string, before: string, bin: string, chain?: ActivityChain[]) => Promise<CollectionVolume[]>;
|
|
152
|
-
/**
|
|
153
|
-
* @public
|
|
154
|
-
* @async
|
|
155
|
-
* @function getCollectionOwners
|
|
156
|
-
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
157
|
-
* @returns {Promise<IOwners>} A promise that resolves a struct of collection information about holders
|
|
158
|
-
*
|
|
159
|
-
* This function fetches owner information for a given collection. It takes the following parameter:
|
|
160
|
-
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
161
|
-
*
|
|
162
|
-
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
163
|
-
* If it is valid, the function fetches the collection owner information using the API.
|
|
164
|
-
* Finally, it returns a promise that resolves a struct of collection information about holders
|
|
165
|
-
*/
|
|
166
|
-
getCollectionOwners: (collection: string) => Promise<IOwners>;
|
|
167
|
-
/**
|
|
168
|
-
* @public
|
|
169
|
-
* @async
|
|
170
|
-
* @function getExportOwners
|
|
171
|
-
* @param {string} collection - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
172
|
-
* @returns {Promise<ISingleHolder[]>} A promise that resolves an array of holders part of the collection.
|
|
173
|
-
*
|
|
174
|
-
* This function fetches owners information for a given collection. It takes the following parameter:
|
|
175
|
-
* - collection (string): The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
176
|
-
*
|
|
177
|
-
* The function first validates the input collection ticker and checks if it is a valid collection ticker.
|
|
178
|
-
* If it is valid, the function fetches the collection owner information using the API.
|
|
179
|
-
* Finally, it returns a promise that resolves to an array of collection owner information.
|
|
180
|
-
*/
|
|
181
|
-
getExportOwners: (collection: string) => Promise<ISingleHolder[]>;
|
|
182
|
-
/**
|
|
183
|
-
* @public
|
|
184
|
-
* @async
|
|
185
|
-
* @function getCollectionsStatistics
|
|
186
|
-
* @param {CollectionStatsFilter} args - The filter payload for the collection statsitics
|
|
187
|
-
* @returns {Promise<ExploreCollectionsStatisticsDto>} A promise that resolves to a struct with information
|
|
188
|
-
* Finally, it returns a promise that resolves a struct with information
|
|
189
|
-
*/
|
|
190
|
-
getCollectionsStatistics: (args: PublicOnly<CollectionStatsFilter>) => Promise<ExploreCollectionsStatisticsDto>;
|
|
191
|
-
/**
|
|
192
|
-
* @public
|
|
193
|
-
* @async
|
|
194
|
-
* @function getCollectionStats
|
|
195
|
-
* @param {GetCollectionStatsArgs} args - The filter payload for the collection statsitics
|
|
196
|
-
* @returns {Promise<CollectionStatsDoc>} A promise that resolves to a struct with information
|
|
197
|
-
* Finally, it returns a promise that resolves a struct with information
|
|
198
|
-
*/
|
|
199
|
-
getCollectionStats: (ticker: string) => Promise<CollectionStatsDoc>;
|
|
200
|
-
getAwaitEmpty: (delay: number) => Promise<boolean>;
|
|
201
|
-
/**
|
|
202
|
-
* @public
|
|
203
|
-
* @async
|
|
204
|
-
* @function getCollectionMintInfo
|
|
205
|
-
* @param {string} ticker - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
206
|
-
* @returns {Promise<GetCollectionMintInfo>} A promise that resolves to a struct with information
|
|
207
|
-
* Finally, it returns a promise that resolves a struct with information
|
|
208
|
-
*/
|
|
209
|
-
getCollectionMintInfo: ({ ticker, extra, }: {
|
|
210
|
-
ticker: string;
|
|
211
|
-
extra?: RequestInit;
|
|
212
|
-
}) => Promise<GetCollectionMintInfo>;
|
|
213
|
-
/**
|
|
214
|
-
* @public
|
|
215
|
-
* @async
|
|
216
|
-
* @function getCollectionRanks
|
|
217
|
-
* @param {string} ticker - The ticker of the collection to fetch the owner information for (e.g., 'EAPES-8f3c1f').
|
|
218
|
-
* @returns {Promise<CollectionRanksExport[]>} A promise that resolves to a struct with information
|
|
219
|
-
* Finally, it returns a promise that resolves a struct with information
|
|
220
|
-
*/
|
|
221
|
-
getCollectionRanks: ({ ticker, extra, }: {
|
|
222
|
-
ticker: string;
|
|
223
|
-
extra?: RequestInit;
|
|
224
|
-
}) => Promise<CollectionRanksExport[]>;
|
|
225
|
-
/**
|
|
226
|
-
* @public
|
|
227
|
-
* @async
|
|
228
|
-
* @function getDropInfo
|
|
229
|
-
* @param {string} collectionTag - The unique ID of the collection part of the launchpad smart contract
|
|
230
|
-
* @param {string} creatorTag - The unique ID of the creator part of the launchpad smart contract
|
|
231
|
-
* @returns {Promise<GetCollectionMintInfo>} A promise that resolves to a struct with information
|
|
232
|
-
* Finally, it returns a promise that resolves a struct with information
|
|
233
|
-
*/
|
|
234
|
-
getDropInfo: ({ collectionTag, creatorTag, extra, }: {
|
|
235
|
-
collectionTag: string;
|
|
236
|
-
creatorTag: string;
|
|
237
|
-
extra?: RequestInit;
|
|
238
|
-
}) => Promise<GetCollectionMintInfo>;
|
|
239
|
-
/**
|
|
240
|
-
* @public
|
|
241
|
-
* @async
|
|
242
|
-
* @function getCollectionGraphData
|
|
243
|
-
* @param category - The ticker of the collection.
|
|
244
|
-
* @returns {Promise<AnalyticsGraphs>} A promise the required analytics data
|
|
245
|
-
* This function gets the global graph data
|
|
246
|
-
*/
|
|
247
|
-
getCollectionGraphData: (collection: string, startTime: string, endTime: string, bin: string) => Promise<AnalyticsGraphs>;
|
|
248
|
-
/**
|
|
249
|
-
* @public
|
|
250
|
-
* @async
|
|
251
|
-
* @function getPinnedCollections
|
|
252
|
-
* @returns {Promise<CollectionProfileDoc[]>} A promise that resolves to the fetched pinned collections.
|
|
253
|
-
*/
|
|
254
|
-
getPinnedCollections: (chain?: ActivityChain) => Promise<CollectionProfileDoc[]>;
|
|
255
|
-
/**
|
|
256
|
-
* @public
|
|
257
|
-
* @async
|
|
258
|
-
* @function getPinnedDrops
|
|
259
|
-
* @returns {Promise<GetCollectionMintInfo[]>} A promise that resolves to the fetched pinned collections.
|
|
260
|
-
*/
|
|
261
|
-
getPinnedDrops: (chain?: ActivityChain) => Promise<GetCollectionMintInfo[]>;
|
|
262
|
-
/**
|
|
263
|
-
* Get drops based on the provided arguments.
|
|
264
|
-
* @param {FilterQueryDto} args - The SearchNFTsArgs object containing the search parameters.
|
|
265
|
-
* @returns {Promise<GlobalSearchResponseDto>} A Promise that resolves to the SearchNFTsResponse object.
|
|
266
|
-
* @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 100.
|
|
267
|
-
*/
|
|
268
|
-
getSearchDrops: (args: FilterQueryDto) => Promise<GlobalSearchResponseDto>;
|
|
269
|
-
/**
|
|
270
|
-
* Get drops based on the provided arguments.
|
|
271
|
-
* @param {CollectionMintProfileFilter} args - The SearchNFTsArgs object containing the search parameters.
|
|
272
|
-
* @returns {Promise<DropsQueryDto>} A Promise that resolves to the SearchNFTsResponse object.
|
|
273
|
-
* @throws An error if the provided collection ticker is invalid or if the 'top' value is greater than 100.
|
|
274
|
-
*/
|
|
275
|
-
getDrops: (args: PublicOnly<CollectionMintProfileFilter>) => Promise<DropsQueryDto>;
|
|
276
|
-
/** Gets collection staking info
|
|
277
|
-
* @param {String} collection - User's address
|
|
278
|
-
* @returns {StakingSummaryPools[]} Collection's staking info
|
|
279
|
-
* @throws {Error} Throws an error if the collection is invalid
|
|
280
|
-
* */
|
|
281
|
-
getCollectionStakingSummary: ({ collection, extra, }: {
|
|
282
|
-
collection: string;
|
|
283
|
-
extra?: RequestInit;
|
|
284
|
-
}) => Promise<StakingSummaryPools[]>;
|
|
285
|
-
/**
|
|
286
|
-
* @public
|
|
287
|
-
* @async
|
|
288
|
-
* @function getCollectionsFloor
|
|
289
|
-
* @param collections - The tickers of the collection.
|
|
290
|
-
* @returns {Promise<Record<string, number>>} Floor price of the collections
|
|
291
|
-
* This function gets the floor price of the collections
|
|
292
|
-
*/
|
|
293
|
-
getCollectionsFloor: (collections: string[]) => Promise<Record<string, number>>;
|
|
294
|
-
}
|
package/dist/common/index.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { ActivityHistoryDto, FilterQueryDto, GlobalSearchResponseDto, NftActivityFilter } from '@xoxno/types';
|
|
2
|
-
import type { ActivityChain, PublicOnly } from '../types';
|
|
3
|
-
import type { FungibleAssetsMap } from '../types/collection';
|
|
4
|
-
import { AssetCategory } from '../types/collection';
|
|
5
|
-
import type { AshSwapPaymentData, StakingExplore, StatisticsSummary, TokenUSDPrices } from '../types/common';
|
|
6
|
-
export declare class CommonModule {
|
|
7
|
-
private api;
|
|
8
|
-
constructor();
|
|
9
|
-
/** Gets all tokens usd price
|
|
10
|
-
* @returns {TokenUSDPrices} User's creator info
|
|
11
|
-
* */
|
|
12
|
-
getTokensUsdPrice: () => Promise<TokenUSDPrices>;
|
|
13
|
-
/** Gets all tokens usd price
|
|
14
|
-
* @returns {TokenUSDPrices} User's creator info
|
|
15
|
-
* */
|
|
16
|
-
getAshSwapAmount: ({ originalToken, originalTokenValue, paymentToken, }: {
|
|
17
|
-
originalToken: string;
|
|
18
|
-
originalTokenValue: string;
|
|
19
|
-
paymentToken: string;
|
|
20
|
-
}) => Promise<AshSwapPaymentData>;
|
|
21
|
-
/**
|
|
22
|
-
* @public
|
|
23
|
-
* @async
|
|
24
|
-
* @function getFungibleTokens
|
|
25
|
-
* @param category - The ticker of the collection.
|
|
26
|
-
* @returns {Promise<FungibleAssetsMap>} A promise that resolves a map of ESDT tokens and their info
|
|
27
|
-
* This function fetches all branded fungible assets and their info
|
|
28
|
-
*/
|
|
29
|
-
getFungibleTokens: (categories?: AssetCategory[], identifiers?: string[], chain?: ActivityChain[]) => Promise<FungibleAssetsMap>;
|
|
30
|
-
/**
|
|
31
|
-
* @public
|
|
32
|
-
* @async
|
|
33
|
-
* @function getAnalyticsOverview
|
|
34
|
-
* @returns {Promise<StatisticsSummary>} A promise the required analytics data
|
|
35
|
-
* This function gets the global graph data
|
|
36
|
-
*/
|
|
37
|
-
getAnalyticsOverview: (chain?: ActivityChain[]) => Promise<StatisticsSummary>;
|
|
38
|
-
/**
|
|
39
|
-
* @public
|
|
40
|
-
* @async
|
|
41
|
-
* @function suggestResults
|
|
42
|
-
* @param {SuggestNFTsArgs} args - An object containing the necessary parameters to fetch suggested NFT results.
|
|
43
|
-
* @returns {Promise<SuggestResults>} A promise that resolves to the fetched NFT results.
|
|
44
|
-
*
|
|
45
|
-
* This function fetches suggested NFT results based on the provided arguments. It takes an object with the following properties:
|
|
46
|
-
* - name (string): The name to search for (required).
|
|
47
|
-
* - orderBy (SuggestOrderBy[], optional): An array of ordering preferences for the results.
|
|
48
|
-
* - top (number, optional): The maximum number of results to return (default is 35, cannot be greater than 100).
|
|
49
|
-
* - skip (number, optional): The number of results to skip (default is 0).
|
|
50
|
-
*
|
|
51
|
-
* The function first validates the input arguments and constructs a payload body with the provided parameters.
|
|
52
|
-
* Then, it converts the payload body into a base64 string and fetches the suggested results using the API.
|
|
53
|
-
* Finally, it returns a promise that resolves to the fetched NFT results.
|
|
54
|
-
*/
|
|
55
|
-
suggestResults: (args: PublicOnly<FilterQueryDto>) => Promise<GlobalSearchResponseDto>;
|
|
56
|
-
/**
|
|
57
|
-
* @public
|
|
58
|
-
* @async
|
|
59
|
-
* @function getExploreStaking
|
|
60
|
-
* @returns {Promise<StakingExplore[]>} A promise that resolves to the fetched staking explore data.
|
|
61
|
-
* This function fetches the staking explore data.
|
|
62
|
-
*/
|
|
63
|
-
getExploreStaking: () => Promise<StakingExplore[]>;
|
|
64
|
-
/**
|
|
65
|
-
* Retrieves trading history based on the provided arguments.
|
|
66
|
-
*
|
|
67
|
-
* @param {NftActivityFilter} args - The arguments for filtering the trading activity.
|
|
68
|
-
* @returns {Promise<ActivityHistoryDto>} A promise resolving to a TradingActivityResponse object containing the activity.
|
|
69
|
-
* @throws {Error} Throws an error if the 'top' argument is greater than 100.
|
|
70
|
-
*/
|
|
71
|
-
getTradingActivity: (args: PublicOnly<NftActivityFilter>) => Promise<ActivityHistoryDto>;
|
|
72
|
-
}
|
package/dist/nft/index.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { GetSingleNftOfferResponseDto, NftDoc } from '@xoxno/types';
|
|
2
|
-
import type { ArgsQueryTop } from '../types';
|
|
3
|
-
import type { ActivityChain } from '../types/nft';
|
|
4
|
-
/**
|
|
5
|
-
* NFTModule provides a set of methods to interact with single NFTs.
|
|
6
|
-
* It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const nftModule = new NFTModule();
|
|
10
|
-
*/
|
|
11
|
-
export declare class NFTModule {
|
|
12
|
-
private api;
|
|
13
|
-
constructor();
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
* @async
|
|
17
|
-
* @function getNFTByIdentifier
|
|
18
|
-
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
19
|
-
* @returns {Promise<NftDoc>} A promise that resolves to the fetched NFT data.
|
|
20
|
-
*
|
|
21
|
-
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
22
|
-
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
23
|
-
*
|
|
24
|
-
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
25
|
-
* If it is valid, the function fetches the NFT data using the API.
|
|
26
|
-
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
27
|
-
*/
|
|
28
|
-
getNFTByIdentifier: (identifier: string, extra?: RequestInit) => Promise<NftDoc>;
|
|
29
|
-
/**
|
|
30
|
-
* @public
|
|
31
|
-
* @async
|
|
32
|
-
* @function getNFTByIdentifier
|
|
33
|
-
* @param {string} identifier - The identifier of the NFT to fetch data for.
|
|
34
|
-
* @returns {Promise<NftDoc>} A promise that resolves to the fetched NFT data.
|
|
35
|
-
*
|
|
36
|
-
* This function fetches data for a given NFT by its identifier. It takes the following parameter:
|
|
37
|
-
* - identifier (string): The identifier of the NFT to fetch data for.
|
|
38
|
-
*
|
|
39
|
-
* The function first validates the input identifier and checks if it is a valid NFT identifier.
|
|
40
|
-
* If it is valid, the function fetches the NFT data using the API.
|
|
41
|
-
* Finally, it returns a promise that resolves to the fetched NFT data.
|
|
42
|
-
*/
|
|
43
|
-
getNFTsOffers: ({ identifier, ...args }: ArgsQueryTop) => Promise<GetSingleNftOfferResponseDto>;
|
|
44
|
-
/**
|
|
45
|
-
* Gets an NFT by collection and nonce.
|
|
46
|
-
* @param collection The collection ticker.
|
|
47
|
-
* @param nonce The nonce of the NFT.
|
|
48
|
-
* @returns {Promise<NftDoc>} The NFT data.
|
|
49
|
-
* @throws Throws an error when the collection ticker is invalid.
|
|
50
|
-
*/
|
|
51
|
-
getNFTByCollectionAndNonce: (collection: string, nonce: number) => Promise<NftDoc>;
|
|
52
|
-
/**
|
|
53
|
-
* @public
|
|
54
|
-
* @async
|
|
55
|
-
* @function getDailyTrending
|
|
56
|
-
* @returns {Promise<NftDoc[]>} A promise that resolves to the array of trending NFTs.
|
|
57
|
-
* This function fetches the top NFTs that are trending today based on their floor and volumes
|
|
58
|
-
*/
|
|
59
|
-
getDailyTrending: () => Promise<NftDoc[]>;
|
|
60
|
-
/**
|
|
61
|
-
* @public
|
|
62
|
-
* @async
|
|
63
|
-
* @function getPinnedNFTs
|
|
64
|
-
* @returns {Promise<NftDoc[]>} A promise that resolves to the fetched pinned collections.
|
|
65
|
-
*/
|
|
66
|
-
getPinnedNFTs: (chain?: ActivityChain) => Promise<NftDoc[]>;
|
|
67
|
-
/**
|
|
68
|
-
* Get NFT by collection and nonce hex
|
|
69
|
-
*
|
|
70
|
-
* @param collection - collection ticker
|
|
71
|
-
* @param nonceHex - nonce hex
|
|
72
|
-
* @return {Promise<NftDoc>} NFT data
|
|
73
|
-
*/
|
|
74
|
-
getNFTByCollectionAndNonceHex: (collection: string, nonceHex: string) => Promise<NftDoc>;
|
|
75
|
-
}
|
package/dist/staking/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { StakingSummaryPools } from '../types/staking';
|
|
2
|
-
export declare class StakingModule {
|
|
3
|
-
private api;
|
|
4
|
-
constructor();
|
|
5
|
-
/** Gets pool details
|
|
6
|
-
* @param {number} poolId - User's address
|
|
7
|
-
* @returns {CreatoPoolDetailsrInfo} User's creator info
|
|
8
|
-
* @throws {Error} Throws an error if the address is invalid
|
|
9
|
-
* */
|
|
10
|
-
getPoolDetails: (poolId: number) => Promise<StakingSummaryPools>;
|
|
11
|
-
}
|