@xoxno/sdk-js 0.0.6-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.
@@ -1,25 +0,0 @@
1
- import { LaunchpadModule } from '../index';
2
- import { APIClient } from '../../utils/api';
3
-
4
- describe('SCInteraction', () => {
5
- let sc: LaunchpadModule;
6
- beforeAll(async () => {
7
- APIClient.init();
8
- sc = await LaunchpadModule.init(
9
- 'erd1qqqqqqqqqqqqqpgqtwtp5uz97u232zvzd973upqxwe2xnqv2ys5s3c7jx9'
10
- );
11
- });
12
-
13
- it('should return all the unique tags of the launchpad SC', async () => {
14
- const tags = await sc.getAllUniqueTags();
15
- expect(tags).toBeDefined();
16
- expect(tags).toContain('Elonverse');
17
- });
18
-
19
- it('should return all the unique stages of a collection from the launchpad SC', async () => {
20
- const tags = await sc.getStages('Elonverse');
21
- expect(tags).toBeDefined();
22
- // expect(tags).toContain('Elonverse');
23
- // console.log(tags);
24
- });
25
- });
@@ -1,163 +0,0 @@
1
- import type { Interaction } from '@multiversx/sdk-core/out/smartcontracts/interaction';
2
- import { SmartContractAbis } from '../utils/SmartContractAbis';
3
- import { getSmartContract } from '../utils/SmartContractService';
4
- import { ContractQueryRunner } from '../utils/scCalls';
5
- import type { SmartContract } from '@multiversx/sdk-core/out/smartcontracts/smartContract';
6
-
7
- /**
8
- * LaunchpadModule provides methods to interact with the minter smart contract.
9
- * @class
10
- */
11
- export class LaunchpadModule {
12
- private minter: SmartContract;
13
- private call: ContractQueryRunner;
14
- /**
15
- * @constructor
16
- * @param {SmartContract} minterAbiXOXNO - The minter smart contract instance.
17
- */
18
- constructor(minterAbiXOXNO: SmartContract) {
19
- this.minter = minterAbiXOXNO;
20
- this.call = new ContractQueryRunner();
21
- }
22
-
23
- /**
24
- * Executes the provided interaction and returns the result.
25
- * @private
26
- * @param {Interaction} interaction - The smart contract interaction.
27
- * @returns {Promise<any>} The result of the interaction.
28
- */
29
- private async getResult(interaction: Interaction) {
30
- return await this.call.runQuery(this.minter, interaction);
31
- }
32
-
33
- /**
34
- * Initializes the LaunchpadModule with a minter smart contract instance.
35
- * @static
36
- * @param {string} minterSC - The minter smart contract address.
37
- * @returns {Promise<LaunchpadModule>} A new instance of LaunchpadModule.
38
- */
39
- static async init(minterSC: string) {
40
- const minterAbiXOXNO = await SmartContractAbis.getMinter();
41
- const minter_abi = getSmartContract(minterAbiXOXNO, minterSC);
42
- return new LaunchpadModule(minter_abi);
43
- }
44
-
45
- /**
46
- * Fetches all unique tags from the minter smart contract.
47
- * @public
48
- * @returns {Promise<string[]>} An array of unique tags.
49
- */
50
- public getAllUniqueTags = async (): Promise<string[]> => {
51
- const interaction = this.minter.methods.collections();
52
- const result = await this.getResult(interaction);
53
- return result.firstValue?.valueOf().map((x: any) => x.toString());
54
- };
55
-
56
- /**
57
- * Fetches the global buy count for a user and tag.
58
- * @public
59
- * @param {string} user - The user's address.
60
- * @param {string} tag - The tag.
61
- * @returns {Promise<number>} The global buy count.
62
- */
63
- public getWalletGlobalBuyCount = async (
64
- user: string,
65
- tag: string
66
- ): Promise<number> => {
67
- const interaction = this.minter.methods.buysPerWallet([user, tag]);
68
- const result = await this.getResult(interaction);
69
- return result.firstValue?.valueOf();
70
- };
71
-
72
- /**
73
- * Fetches the stage buy count for a user, tag, and stage.
74
- * @public
75
- * @param {string} user - The user's address.
76
- * @param {string} tag - The tag.
77
- * @param {string} stage - The stage.
78
- * @returns {Promise<number>} The stage buy count.
79
- */
80
- public getWalletStageBuyCount = async (
81
- user: string,
82
- tag: string,
83
- stage: string
84
- ): Promise<number> => {
85
- const interaction = this.minter.methods.buysStagePerWallet([
86
- user,
87
- tag,
88
- stage,
89
- ]);
90
- const result = await this.getResult(interaction);
91
- return result.firstValue?.valueOf();
92
- };
93
-
94
- /**
95
- * Fetches the local owner's address from the minter smart contract.
96
- * @public
97
- * @returns {Promise<string>} The local owner's address.
98
- */
99
- public getLocalOwner = async (): Promise<string> => {
100
- const interaction = this.minter.methods.localOwner();
101
- const result = await this.getResult(interaction);
102
- return result.firstValue?.valueOf();
103
- };
104
-
105
- /**
106
- * Fetches the launchpad cut fee percentage from the minter smart contract.
107
- * @public
108
- * @returns {Promise<number>} The launchpad cut fee percentage.
109
- */
110
-
111
- public getLaunchpadCutFee = async (): Promise<number> => {
112
- const interaction = this.minter.methods.cutPercentage();
113
- const result = await this.getResult(interaction);
114
- return result.firstValue?.valueOf();
115
- };
116
-
117
- /**
118
- * Fetches the stage whitelist of wallets for a tag and stage.
119
- * @public
120
- * @param {string} tag - The tag.
121
- * @param {string} stage - The stage.
122
- * @returns {Promise<string[]>} An array of whitelisted wallet addresses.
123
- */
124
- public getStageWhitelist = async (
125
- tag: string,
126
- stage: string
127
- ): Promise<string[]> => {
128
- const interaction = this.minter.methods.getWhitelistedWallets([tag, stage]);
129
- const result = await this.getResult(interaction);
130
- return result.firstValue?.valueOf().map((x: any) => x.toString());
131
- };
132
-
133
- /**
134
- * Fetches the list of stages for a tag.
135
- * @public
136
- * @param {string} tag - The tag.
137
- * @returns {Promise<string[]>} An array of stages.
138
- */
139
- public getStages = async (tag: string): Promise<string[]> => {
140
- const interaction = this.minter.methods.mintStage([tag]);
141
- const result = await this.getResult(interaction);
142
- return result.firstValue?.valueOf().map((x: any) => {
143
- const body = x[1].valueOf();
144
- body.name = body.name.toString();
145
- body.tag = body.name.toString();
146
- body.start_time = parseInt(body.start_time.toString());
147
- body.end_time = parseInt(body.end_time.toString());
148
- body.mint_limit = parseInt(body.mint_limit.toString());
149
- body.mint_count = parseInt(body.mint_count.toString());
150
- body.max_per_wallet = parseInt(body.max_per_wallet.toString());
151
- body.prices = body.prices.map((x: any) => {
152
- const pr = x.valueOf();
153
- return {
154
- ...pr,
155
- token_nonce: parseInt(pr.token_nonce.toString()),
156
- amount: pr.amount.toString(),
157
- };
158
- });
159
-
160
- return body;
161
- });
162
- };
163
- }
@@ -1,84 +0,0 @@
1
- import { NFTModule } from '../index';
2
- import { APIClient } from '../../utils/api';
3
- import { OrderByTradingActivity } from '../../types';
4
-
5
- describe('NFTModule', () => {
6
- let nftModule: NFTModule;
7
- const inputIdentifier = 'BANANA-e955fd-01';
8
- const collection = 'BANANA-e955fd';
9
- const nonce = 1;
10
- const nonceHex = '01';
11
- beforeAll(() => {
12
- APIClient.init();
13
- nftModule = new NFTModule();
14
- });
15
-
16
- it('should return NFT data when given a valid identifier', async () => {
17
- const nftData = await nftModule.getNFTByIdentifier(inputIdentifier);
18
- expect(nftData).toBeDefined();
19
- expect(nftData.identifier).toEqual(inputIdentifier);
20
- });
21
-
22
- it('should return NFT data when given a valid collection and nonce', async () => {
23
- const nftData = await nftModule.getNFTByCollectionAndNonce(
24
- collection,
25
- nonce
26
- );
27
- expect(nftData).toBeDefined();
28
- expect(nftData.identifier).toEqual(inputIdentifier);
29
- });
30
-
31
- it('should return NFT data when given a valid collection and nonce as hex', async () => {
32
- const nftData = await nftModule.getNFTByCollectionAndNonceHex(
33
- collection,
34
- nonceHex
35
- );
36
- expect(nftData).toBeDefined();
37
- expect(nftData.identifier).toEqual(inputIdentifier);
38
- });
39
-
40
- it('should return empty NFT trading activity', async () => {
41
- const nftTradingActivity = await nftModule.getTradingActivity({
42
- identifiers: [inputIdentifier],
43
- });
44
- expect(nftTradingActivity).toBeDefined();
45
- expect(nftTradingActivity.empty).toEqual(true);
46
- });
47
-
48
- it('should return NFT trading activity', async () => {
49
- const nftTradingActivity = await nftModule.getTradingActivity({
50
- identifiers: ['BANANA-e955fd-05d9'],
51
- orderBy: [OrderByTradingActivity.OldestPlaced],
52
- top: 1,
53
- });
54
- expect(nftTradingActivity).toBeDefined();
55
- expect(nftTradingActivity.empty).toEqual(false);
56
- expect(nftTradingActivity.resources.length).toEqual(1);
57
- expect(nftTradingActivity.resources[0]).toMatchObject({
58
- txHash:
59
- 'f2cc0f9abbe6e18855cec144cecee5a6e7e0fdf2249a7e2b487935c4630aec3d',
60
- collection: 'BANANA-e955fd',
61
- identifier: 'BANANA-e955fd-05d9',
62
- timestamp: 1642523586,
63
- action: 'buy',
64
- price: 0.1,
65
- paymentToken: 'EGLD',
66
- buyer: 'erd1ecae8gpcsf5fk9na69my54c4t3dw27pdgk009huaj0ekjcp02u4qtw9e9d',
67
- seller: 'erd1kkp6kcs5qpmfmcs4vj4v07kq750anpdz579mh2962r2suum2hfjsfrdaav',
68
- usdPrice: 17.24,
69
- egldValue: 0.1,
70
- name: 'Banana #1497',
71
- url: 'https://media.elrond.com/nfts/asset/QmZzdYmNtQw5F8WGY4eFmyqcFcziPa73DMSypMJWTxRdqa/1337.png',
72
- avifUrl:
73
- 'https://trustmarket.blob.core.windows.net/nftmedia/BANANA-e955fd/BANANA-e955fd-05d9.avif',
74
- webpUrl:
75
- 'https://trustmarket.blob.core.windows.net/nftmedia/BANANA-e955fd/BANANA-e955fd-05d9.webp',
76
- rank: 480,
77
- marketplace: 'XO',
78
- id: '4505a7ae-eab9-4591-9f81-81671e63a9a3',
79
- _ts: 1677342781,
80
- sellerUsername: '@denysvicol',
81
- buyerUsername: '@stefanmorar',
82
- });
83
- });
84
- });
package/src/nft/index.ts DELETED
@@ -1,98 +0,0 @@
1
- import { NftData } from '../types/nft';
2
- import { TradingActivityResponse, TradincActivityArgs } from '../types/trading';
3
- import { APIClient } from '../utils/api';
4
- import { getActivity } from '../utils/getActivity';
5
- import { getIdentifierFromColAndNonce } from '../utils/helpers';
6
- import { isValidCollectionTicker, isValidNftIdentifier } from '../utils/regex';
7
-
8
- /**
9
- * NFTModule provides a set of methods to interact with single NFTs.
10
- * It includes methods for getting single NFT information, and searching NFTs by collection and nonce.
11
- *
12
- * @example
13
- * const xoxno = new XOXNO({ apiURL: 'https://api.xoxno.com', apiKey: 'your-api-key' });
14
- * const nftModule = xoxno.nft;
15
- */
16
-
17
- export class NFTModule {
18
- private api: APIClient;
19
- constructor() {
20
- this.api = APIClient.getClient();
21
- }
22
-
23
- /**
24
- * Get the NFT data for the specified identifier.
25
- * @param identifier The NFT identifier. Must be a valid NFT identifier.
26
- * @returns {Promise<NftData>} The NFT data.
27
- */
28
- public getNFTByIdentifier = async (identifier: string): Promise<NftData> => {
29
- if (!isValidNftIdentifier(identifier)) {
30
- throw new Error('Invalid identifier: ' + identifier);
31
- }
32
- const response = await this.api.fetchWithTimeout<NftData>(
33
- `/nfts/${identifier}`
34
- );
35
- return response;
36
- };
37
-
38
- /**
39
- * Gets an NFT by collection and nonce.
40
- * @param collection The collection ticker.
41
- * @param nonce The nonce of the NFT.
42
- * @returns {Promise<NftData>} The NFT data.
43
- * @throws Throws an error when the collection ticker is invalid.
44
- */
45
- public getNFTByCollectionAndNonce = async (
46
- collection: string,
47
- nonce: number
48
- ): Promise<NftData> => {
49
- if (!isValidCollectionTicker(collection)) {
50
- throw new Error('Invalid collection ticker: ' + collection);
51
- }
52
-
53
- const response = await this.api.fetchWithTimeout<NftData>(
54
- `/nfts/${getIdentifierFromColAndNonce(collection, nonce)}`
55
- );
56
- return response;
57
- };
58
-
59
- /**
60
- * Get NFT by collection and nonce hex
61
- *
62
- * @param collection - collection ticker
63
- * @param nonceHex - nonce hex
64
- * @return {Promise<NftData>} NFT data
65
- */
66
-
67
- public getNFTByCollectionAndNonceHex = async (
68
- collection: string,
69
- nonceHex: string
70
- ): Promise<NftData> => {
71
- // check that collection is valid
72
- if (!isValidCollectionTicker(collection)) {
73
- throw new Error('Invalid collection ticker: ' + collection);
74
- }
75
- // make sure nonceHex is even
76
- if (nonceHex.length % 2 !== 0) {
77
- nonceHex = '0' + nonceHex;
78
- }
79
- // fetch the NFT data
80
- const response = await this.api.fetchWithTimeout<NftData>(
81
- `/nfts/${[collection, nonceHex].join('-')}`
82
- );
83
- return response;
84
- };
85
-
86
- /**
87
- * Retrieves trading history based on the provided arguments.
88
- *
89
- * @param {TradincActivityArgs} args - The arguments for filtering the trading activity.
90
- * @returns {Promise<TradingActivityResponse>} A promise resolving to a TradingActivityResponse object containing the activity.
91
- * @throws {Error} Throws an error if the 'top' argument is greater than 35.
92
- */
93
- public getTradingActivity = async (
94
- args: TradincActivityArgs
95
- ): Promise<TradingActivityResponse> => {
96
- return await getActivity(args, this.api);
97
- };
98
- }
@@ -1,332 +0,0 @@
1
- import { NftData } from './nft';
2
-
3
- export interface ISocials {
4
- twitter: string;
5
- instagram: string;
6
- website: string;
7
- telegram: string;
8
- discord: string;
9
- facebook: string;
10
- youtube: string;
11
- }
12
-
13
- export interface IMintInfo {
14
- contractAddress: string;
15
- totalNftMinted: number;
16
- collectionTag: string;
17
- cid: string;
18
- mediaType: string;
19
- collectionSize: number;
20
- nftTransferLimited: string;
21
- allowsPublicBurn: string;
22
- kycRequired: string;
23
- allowsRefund: string;
24
- hasReveal: string;
25
- }
26
-
27
- export interface ICollectionProfile {
28
- dataType: 'collectionProfile';
29
- collection: string;
30
- name: string;
31
- description: string;
32
- isVisible: boolean;
33
- isVerified: boolean;
34
- profile: string;
35
- banner: string;
36
- statistics: {
37
- tradeData: {
38
- dayEgldVolume: number;
39
- weekEgldVolume: number;
40
- totalEgldVolume: number;
41
- averageEgldPrice: number;
42
- athEgldPrice: number;
43
- athTxHash: string;
44
- totalTrades: number;
45
- };
46
- mintData: {
47
- totalMintEgldVolume: number;
48
- weekMintEgldVolume: number;
49
- dayMintEgldVolume: number;
50
- };
51
- other: {
52
- nftCount: number;
53
- followCount: number;
54
- holdersCount?: number;
55
- };
56
- };
57
- owner: string;
58
- creator: string;
59
- isMintable: boolean;
60
- mintInfo: IMintInfo;
61
- mintStages: {
62
- name: string;
63
- collectionTag: string;
64
- mintEnabled: boolean;
65
- isWhitelist: boolean;
66
- startTime: number;
67
- endTime: number;
68
- mintLimit: number;
69
- mintCount: number;
70
- prices: {
71
- tokenIdentifier: string;
72
- tokenNonce: string;
73
- amount: string;
74
- }[];
75
- walletLimit: number;
76
- }[];
77
- hasStaking: boolean;
78
- id: string;
79
- socials: ISocials;
80
- type: string;
81
- lastVerifiedTimestamp: number;
82
- lastVerifiedBy: string;
83
- _ts: number;
84
- }
85
-
86
- export interface AttributeData {
87
- attributeOccurrence: number;
88
- FloorPrice: number;
89
- OnSale: number;
90
- }
91
-
92
- export interface MetadataAttribute {
93
- trait_type: string;
94
- value: string;
95
- }
96
-
97
- export interface TraitValues {
98
- [traitValue: string]: AttributeData;
99
- }
100
-
101
- export interface ICollectionAttributes {
102
- [traitType: string]: TraitValues;
103
- }
104
- export enum Marketplace {
105
- XO = 'XO',
106
- FM = 'FM',
107
- DR = 'DR',
108
- KG = 'KG',
109
- }
110
-
111
- export interface GlobalOffer {
112
- attributes: MetadataAttribute[];
113
- collection: string;
114
- isActive: boolean;
115
- marketplace: string;
116
- offer_id: number;
117
- owner: string;
118
- ownerProfile?: string;
119
- ownerUsername?: string;
120
- payment_nonce: number;
121
- payment_token: string;
122
- price: string;
123
- quantity: number;
124
- short_price: number;
125
- timestamp: number;
126
- }
127
-
128
- export enum FieldsToSelect {
129
- Rank = 'metadata/rarity/rank',
130
- Attributes = 'metadata/attributes',
131
- Description = 'metadata/description',
132
- Name = 'name',
133
- OnSale = 'onSale',
134
- SaleInfo = 'saleInfoNft',
135
- Royalties = 'royalties',
136
- Identifier = 'identifier',
137
- Collection = 'collection',
138
- OriginalURL = 'url',
139
- Nonce = 'nonce',
140
- ContentType = 'originalMedia/contentType',
141
- WasProcessed = 'wasProcessed',
142
- AvifURL = 'avifUrl',
143
- WebpURL = 'webpUrl',
144
- Type = 'type',
145
- }
146
-
147
- export enum SearchOrderBy {
148
- PriceHighToLow = 'saleInfoNft/min_bid_short desc',
149
- PriceLowToHigh = 'saleInfoNft/min_bid_short asc',
150
- RarityHighToLow = 'metadata/rarity/rank desc',
151
- RarityLowToHigh = 'metadata/rarity/rank asc',
152
- NonceHighToLow = 'nonce desc',
153
- NonceLowToHigh = 'nonce asc',
154
- RecentListed = 'saleInfoNft/timestamp desc',
155
- OldestListed = 'saleInfoNft/timestamp asc',
156
- }
157
-
158
- export enum CollectionsOrderBy {
159
- WeekVolumeHighToLow = 'statistics.tradeData.weekEgldVolume desc',
160
- WeekVolumeLowToHigh = 'statistics.tradeData.weekEgldVolume asc',
161
- DailyVolumeHighToLow = 'statistics.tradeData.dayEgldVolume desc',
162
- DailyVolumeLowToHigh = 'statistics.tradeData.dayEgldVolume asc',
163
- TotalVolumeHighToLow = 'statistics.tradeData.totalEgldVolume desc',
164
- TotalVolumeLowToHigh = 'statistics.tradeData.totalEgldVolume asc',
165
- AvgVolumePriceHighToLow = 'statistics.tradeData.averageEgldPrice desc',
166
- AvgVolumePriceLowToHigh = 'statistics.tradeData.averageEgldPrice asc',
167
- ATHHighToLow = 'statistics.tradeData.athEgldPrice desc',
168
- ATHLowToHigh = 'statistics.tradeData.athEgldPrice asc',
169
- TotalTradesHighToLow = 'statistics.tradeData.totalTrades desc',
170
- TotalTradesLowToHigh = 'statistics.tradeData.totalTrades asc',
171
- SupplyHighToLow = 'statistics.other.nftCount desc',
172
- SupplyLowToHigh = 'statistics.other.nftCount asc',
173
- FollowersHighToLow = 'statistics.other.followCount desc',
174
- FollowersLowToHigh = 'statistics.other.followCount asc',
175
- }
176
-
177
- export enum CollectionsFieldsToSelect {
178
- Profile = 'profile',
179
- Description = 'description',
180
- Creator = 'creator',
181
- Owner = 'owner',
182
- Socials = 'socials',
183
- Type = 'type',
184
- HasStaking = 'hasStaking',
185
- MintInfo = 'mintInfo',
186
- MintStages = 'mintStages',
187
- Name = 'name',
188
- Banner = 'banner',
189
- IsVerified = 'isVerified',
190
- IsMintable = 'isMintable',
191
- Statistics = 'statistics',
192
- Collection = 'collection',
193
- }
194
-
195
- export interface Filter {
196
- marketplace?: Marketplace[];
197
- onSale?: boolean;
198
- auctionTypes?: string[];
199
- tokens?: string[];
200
- attributes?: MetadataAttribute[];
201
- range?: {
202
- min: number;
203
- max: number;
204
- type: string;
205
- };
206
- rankRange?: {
207
- min?: number;
208
- max?: number;
209
- };
210
- levelRange?: {
211
- min?: number;
212
- max?: number;
213
- };
214
- }
215
-
216
- export interface SearchNFTs {
217
- filters: Filter;
218
- name?: string;
219
- orderBy?: SearchOrderBy[];
220
- collection: string;
221
- top: number;
222
- skip: number;
223
- select?: FieldsToSelect[];
224
- }
225
-
226
- export interface SearchNFTsArgs {
227
- /** The collection to search in */
228
- collection: string;
229
- /** If true, will return only NFTs that are on sale */
230
- onlyOnSale?: boolean;
231
- /** If true, will return only NFTs that are on auction */
232
- onlyAuctions?: boolean;
233
- /** If set, will return only NFTs with a price in the specified range */
234
- priceRange?: {
235
- min: number;
236
- max: number;
237
- };
238
- /** If set, will return only NFTs listed in the specified tokens */
239
- listedInToken?: string[];
240
- /** If set, will return only NFTs with a rank in the specified range */
241
- rankRange?: {
242
- min: number;
243
- max: number;
244
- };
245
- /** If set, will return only NFTs with a cantina level in the specified range */
246
- cantinaLevelRange?: {
247
- min: number;
248
- max: number;
249
- };
250
- /** If set, will return only NFTs with a name that contains the specified string */
251
- searchName?: string;
252
- /** The number of results to return */
253
- top?: number;
254
- /** The order by to use */
255
- skip?: number;
256
- /** The order of the results based on a field */
257
- orderBy?: SearchOrderBy[];
258
- /** If set, will return only the specified fields */
259
- onlySelectFields?: FieldsToSelect[];
260
- /** If set, will return only NFTs listed in the specified marketplaces */
261
- listedOnlyOn?: Marketplace[];
262
- /** If set, will return only NFTs with the specified attributes */
263
- attributes?: MetadataAttribute[];
264
- }
265
-
266
- export interface SearchNFTsResponse {
267
- /** The total count of the results for the specific query */
268
- count: number;
269
- /** The results count for the current page */
270
- resultsCount: number;
271
- /** The results for the current page */
272
- results: NftData[];
273
- /** If the results are empty */
274
- empty: boolean;
275
- /** The payload to use to get the next page */
276
- getNextPagePayload: SearchNFTsArgs;
277
- /** If there are more results to fetch */
278
- hasMoreResults: boolean;
279
- }
280
-
281
- export interface TradingActivity {
282
- action: string;
283
- attributes: MetadataAttribute[];
284
- avifUrl: string;
285
- buyer: string;
286
- buyerUsername: string;
287
- collection: string;
288
- egldValue: number;
289
- id: string;
290
- identifier: string;
291
- marketplace: Marketplace;
292
- name: string;
293
- paymentToken: string;
294
- price: number;
295
- rank: number;
296
- seller: string;
297
- sellerUsername: string;
298
- timestamp: number;
299
- txHash: string;
300
- url: string;
301
- usdPrice: number;
302
- webpUrl: string;
303
- _ts: number;
304
- }
305
-
306
- export interface GetCollectionsArgs {
307
- /** The collections to fetch the profile */
308
- collections?: string[];
309
- /** If true, will return only NFTs that are mintable */
310
- onlyMintable?: boolean;
311
- /** The number of results to return */
312
- top?: number;
313
- /** The order by to use */
314
- skip?: number;
315
- /** The order of the results based on a field */
316
- orderBy?: CollectionsOrderBy;
317
- /** If set, will return only the specified fields */
318
- onlySelectFields?: CollectionsFieldsToSelect[];
319
- }
320
-
321
- export interface CollectionsNFTsResponse {
322
- /** The results count for the current page */
323
- resultsCount: number;
324
- /** The results for the current page */
325
- results: ICollectionProfile[];
326
- /** If the results are empty */
327
- empty: boolean;
328
- /** The payload to use to get the next page */
329
- getNextPagePayload: GetCollectionsArgs;
330
- /** If there are more results to fetch */
331
- hasMoreResults: boolean;
332
- }
@@ -1,3 +0,0 @@
1
- export * from './collection';
2
- export * from './nft';
3
- export * from './trading';