@xoxno/types 1.0.368 → 1.0.370

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,654 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REDIS_KEYS = void 0;
4
- const ttl_1 = require("./ttl");
5
- function serializeChain(chain) {
6
- return (chain ?? []).sort().join(',');
7
- }
8
- /**
9
- * An object that defines all Redis keys and their TTLs.
10
- * This ensures consistency and a single source of truth.
11
- *
12
- * Each entry should return an object: { key: string, ttl: number }
13
- */
14
- exports.REDIS_KEYS = {
15
- LendingAllMarketsTokens: {
16
- key: 'lendingAllMarketsTokens',
17
- ttl: ttl_1.TTLS.ONE_HOUR * 6,
18
- },
19
- MinterLocalOwner: (address) => ({
20
- key: `launchpadLocalOwner:${address}`,
21
- ttl: ttl_1.TTLS.ONE_YEAR,
22
- }),
23
- GetCreatorProfileByContractAddress: (contractAddress) => ({
24
- key: `userCreatorProfileByContractAddress:${contractAddress}`,
25
- ttl: ttl_1.TTLS.ONE_YEAR,
26
- }),
27
- GetBoberBattleBiggestWinners: {
28
- key: 'boberBattleBiggestWinners',
29
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
30
- },
31
- GetAllBoberBattleTokens: {
32
- key: 'allBoberBattleTokens',
33
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
34
- },
35
- StakingProviderOwner: (provider) => ({
36
- key: `stakingProviderOwner:${provider}`,
37
- ttl: ttl_1.TTLS.ONE_DAY,
38
- }),
39
- StakingCreatedDelegationContract: (address) => ({
40
- key: `stakingCreatedDelegationContract:${address}`,
41
- ttl: ttl_1.TTLS.ONE_YEAR,
42
- }),
43
- StakingProviderUserRewards: (address, currentEpoch) => ({
44
- key: `stakingProviderUserRewardsV2:${address}:${currentEpoch}`,
45
- ttl: ttl_1.TTLS.ONE_DAY,
46
- }),
47
- StakingProviderEpochRewards: (provider, epoch) => ({
48
- key: `stakingProviderEpochRewardsData:${provider}:${epoch}`,
49
- ttl: ttl_1.TTLS.ONE_YEAR,
50
- }),
51
- LendingFaucetClaimed: (address) => ({
52
- key: `faucetv3-${address}`,
53
- ttl: ttl_1.TTLS.ONE_YEAR,
54
- }),
55
- BoberWheelWinners: {
56
- key: 'boberWheelWinners',
57
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
58
- },
59
- BoberWheelConfig: {
60
- key: 'boberWheelConfig',
61
- ttl: ttl_1.TTLS.ONE_MINUTE,
62
- },
63
- BoberWheelScheduledSpin: {
64
- key: 'boberWheelScheduledSpin',
65
- ttl: ttl_1.TTLS.ONE_DAY,
66
- },
67
- LendingBulkOraclePrice: (tokens, returnAsUsd) => ({
68
- key: `lendingBulkOraclePrice:${tokens.join(',')}:${returnAsUsd}`,
69
- ttl: ttl_1.TTLS.ONE_SECOND * 30,
70
- }),
71
- LpTokenInfo: (token) => ({
72
- key: `lpTokenInfo:${token}`,
73
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
74
- }),
75
- LendingTokenPriceAsUsd: (token) => ({
76
- key: `lendingTokenPriceUsd:${token}`,
77
- ttl: ttl_1.TTLS.ONE_SECOND * 30,
78
- }),
79
- LendingOverallStats: {
80
- key: 'LendingOverallStats',
81
- ttl: ttl_1.TTLS.ONE_HOUR,
82
- },
83
- LendingTopMarketParticipants: (token) => ({
84
- key: `lendingTopMarketParticipants:${token}`,
85
- ttl: ttl_1.TTLS.ONE_HOUR * 6,
86
- }),
87
- LendingMarketParticipantsCount: (token) => ({
88
- key: `lendingMarketParticipantsCount:${token}`,
89
- ttl: ttl_1.TTLS.ONE_HOUR,
90
- }),
91
- LendingPositionLeaderboard: (hash) => ({
92
- key: `lendingPositionLeaderboard:${hash}`,
93
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
94
- }),
95
- LendingTokenPriceAsEgld: (token) => ({
96
- key: `lendingTokenPriceEgld:${token}`,
97
- ttl: ttl_1.TTLS.ONE_SECOND * 30,
98
- }),
99
- LendingPoolContracts: (controllerAddress) => ({
100
- key: `lendingPoolContracts:${controllerAddress}`,
101
- ttl: ttl_1.TTLS.ONE_YEAR,
102
- }),
103
- LendingTokenEModeProfileDoc: (token, eModeCategory) => ({
104
- key: `lendingTokenEModeProfileDoc:${token}:${eModeCategory}`,
105
- ttl: ttl_1.TTLS.ONE_YEAR,
106
- }),
107
- LendingEModeCategoryProfileDoc: (id) => ({
108
- key: `lendingEModeCategoryProfileDoc:${id}`,
109
- ttl: ttl_1.TTLS.ONE_YEAR,
110
- }),
111
- LendingMarketProfileDoc: (token) => ({
112
- key: `lendingMarketProfileDoc:${token}`,
113
- ttl: ttl_1.TTLS.ONE_MONTH,
114
- }),
115
- LendingAccountProfileDoc: (identifier, token) => ({
116
- key: `lendingAccountProfileDoc:${identifier}:${token}`,
117
- ttl: ttl_1.TTLS.ONE_MONTH,
118
- }),
119
- LocationPolygon: (query) => ({
120
- key: `locationPolygon:${query.toLowerCase().trim()}`,
121
- ttl: ttl_1.TTLS.ONE_MONTH * 6,
122
- }),
123
- UserInventorySummary: (address, activeAuction) => ({
124
- key: `userInventorySummary:${address}:${activeAuction}`,
125
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
126
- }),
127
- EventStartsFromPrice: (eventId) => ({
128
- key: `eventStartsFromPrice:${eventId}`,
129
- ttl: ttl_1.TTLS.ONE_MONTH,
130
- }),
131
- EventQuestions: (eventId) => ({
132
- key: `eventQuestions:${eventId}`,
133
- ttl: ttl_1.TTLS.ONE_MONTH,
134
- }),
135
- EventVoucherDoc: (eventId, voucherId) => ({
136
- key: `event:${eventId}VoucherDoc:${voucherId}`,
137
- ttl: ttl_1.TTLS.ONE_MONTH,
138
- }),
139
- EventUserRoleDoc: (eventId, address) => ({
140
- key: `event:${eventId}UserRolDoc:${address}`,
141
- ttl: ttl_1.TTLS.ONE_MONTH,
142
- }),
143
- EventGuestSummary: (eventId) => ({
144
- key: `eventGuestSummary:${eventId}`,
145
- ttl: ttl_1.TTLS.ONE_MINUTE * 30,
146
- }),
147
- EventGuestDoc: (eventId, address) => ({
148
- key: `event:${eventId}GuestDoc:${address}`,
149
- ttl: ttl_1.TTLS.ONE_MONTH,
150
- }),
151
- EventVoucherDocByCode: (eventId, code) => ({
152
- key: `event:${eventId}:voucher:code:${code}`,
153
- ttl: ttl_1.TTLS.ONE_HOUR,
154
- }),
155
- EventStageDoc: (eventId, stageId) => ({
156
- key: `event:${eventId}StageDoc:${stageId}`,
157
- ttl: ttl_1.TTLS.ONE_MONTH,
158
- }),
159
- EventIdBySlug: (slug) => ({
160
- key: `eventIdBySlug:${slug}`,
161
- ttl: ttl_1.TTLS.ONE_YEAR,
162
- }),
163
- EventTicketProfileDoc: (eventId, ticketId) => ({
164
- key: `event:${eventId}TicketDoc:${ticketId}`,
165
- ttl: ttl_1.TTLS.ONE_MONTH,
166
- }),
167
- EventProfileDoc: (eventId) => ({
168
- key: `eventDoc:${eventId}`,
169
- ttl: ttl_1.TTLS.ONE_MONTH,
170
- }),
171
- NftSearch: (filter) => ({
172
- key: `nftSearch:${filter}`,
173
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
174
- }),
175
- GetCountries: {
176
- key: 'countries:zontix',
177
- ttl: ttl_1.TTLS.ONE_DAY * 30,
178
- },
179
- NftMetadataUrl: (url) => ({
180
- key: `nftMetadataUrl:${url}`,
181
- ttl: ttl_1.TTLS.ONE_DAY * 30,
182
- }),
183
- NftMetadata: (identifier) => ({
184
- key: `nftMetadata:${identifier}`,
185
- ttl: ttl_1.TTLS.ONE_DAY * 30,
186
- }),
187
- XoxnoLiquidStats: {
188
- key: 'xoxnoLiquidStats',
189
- ttl: ttl_1.TTLS.ONE_MINUTE * 15,
190
- },
191
- XoxnoLiquidApy: {
192
- key: 'xoxnoLiquidApy',
193
- ttl: ttl_1.TTLS.ONE_HOUR,
194
- },
195
- CollectionListedCount: (collection) => ({
196
- key: `collectionListedCount:${collection}`,
197
- ttl: ttl_1.TTLS.ONE_DAY,
198
- }),
199
- EmailVerificationCode: (address) => ({
200
- key: `emailVerificationCode:${address}`,
201
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
202
- }),
203
- UserSettings: (address) => ({
204
- key: `userSettings:${address}`,
205
- ttl: ttl_1.TTLS.ONE_YEAR,
206
- }),
207
- UserFavorite: (address, favoriteId) => ({
208
- key: `userFavorite:${address}:${favoriteId}`,
209
- ttl: ttl_1.TTLS.ONE_YEAR,
210
- }),
211
- ClaimableRewards: (address, delegationContract) => ({
212
- key: `claimableRewards:${address}:${delegationContract}`,
213
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
214
- }),
215
- AllUserDelegations: (address) => ({
216
- key: `allUserDelegations:${address}`,
217
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
218
- }),
219
- EgldStakingProviders: (providers, withIdentityInfo = true) => ({
220
- key: `egld:providers:${providers.join(',')}:${withIdentityInfo}`,
221
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
222
- }),
223
- EgldStakingProvider: (provider) => ({
224
- key: `egld:provider:${provider}`,
225
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
226
- }),
227
- GetLastUpdatedEpoch: (provider, epoch) => ({
228
- key: `egld:provider:${provider}:lastUpdatedEpoch:${epoch}`,
229
- ttl: ttl_1.TTLS.ONE_DAY,
230
- }),
231
- CollectionStats: (collection) => ({
232
- key: `collectionStats:${collection}`,
233
- ttl: ttl_1.TTLS.ONE_MINUTE * 30,
234
- }),
235
- AllGroupChatIds: {
236
- key: `allGroupChatIds`,
237
- ttl: ttl_1.TTLS.ONE_MONTH * 6,
238
- },
239
- GroupChatProfile: (chatId) => ({
240
- key: `groupChatProfile:${chatId}`,
241
- ttl: ttl_1.TTLS.ONE_MONTH * 6,
242
- }),
243
- PinnedNftsApiResponse: {
244
- key: 'pinnedNftsApiResponse',
245
- ttl: ttl_1.TTLS.ONE_HOUR,
246
- },
247
- ConversationDeleteTimestamp: (chatId, address) => ({
248
- key: `conversationDeleteTimestamp:${chatId}:${address}`,
249
- ttl: ttl_1.TTLS.ONE_YEAR,
250
- }),
251
- IsSenderBlockedByReceiver: (sender, receiver) => ({
252
- key: `isSenderBlockedByReceiver:${sender}:${receiver}`,
253
- ttl: ttl_1.TTLS.ONE_YEAR,
254
- }),
255
- UserLastReadChatMessage: (chatId, address) => ({
256
- key: `userLastReadChatMessage:${chatId}:${address}`,
257
- ttl: ttl_1.TTLS.ONE_YEAR,
258
- }),
259
- UserLastSentChatMessage: (chatId, address) => ({
260
- key: `userLastSentChatMessage:${chatId}:${address}`,
261
- ttl: ttl_1.TTLS.ONE_YEAR,
262
- }),
263
- UserXoxnoDropScore: (skip, top, address) => ({
264
- key: `userXoxnoDropScoreDefi:${skip}:${top}:${address}`,
265
- ttl: ttl_1.TTLS.ONE_HOUR,
266
- }),
267
- Web2NativeWalletAddress: (userId) => ({
268
- key: `web2NativeWalletAddress:${userId}`,
269
- ttl: ttl_1.TTLS.ONE_YEAR,
270
- }),
271
- Web2UserDoc: (userId) => ({
272
- key: `web2UserDoc:${userId}`,
273
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
274
- }),
275
- StakingPoolsSummaryByCollection: {
276
- key: 'stakingPoolsSummaryByCollection',
277
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
278
- },
279
- TwispayCallbackProcessed: (transactionId) => ({
280
- key: `twispayCallbackProcessed:${transactionId}`,
281
- ttl: ttl_1.TTLS.ONE_MONTH,
282
- }),
283
- PendingExternalPayments: {
284
- key: 'pendingExternalPayments',
285
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
286
- },
287
- NextRelayWalletIndex: (shard) => ({
288
- key: `nextRelayWalletIndex:${shard}`,
289
- ttl: ttl_1.TTLS.ONE_YEAR,
290
- }),
291
- DropsPinnedCollectionsApiResponse: {
292
- key: 'dropsPinnedCollectionsApiResponse',
293
- ttl: ttl_1.TTLS.ONE_HOUR,
294
- },
295
- HomePinnedCollectionsApiResponse: {
296
- key: 'homePinnedCollectionsApiResponse',
297
- ttl: ttl_1.TTLS.ONE_HOUR,
298
- },
299
- NftHasOffer: (identifier) => ({
300
- key: `nftHasOffer:${identifier}`,
301
- ttl: ttl_1.TTLS.ONE_YEAR,
302
- }),
303
- LaunchpadAllRegisteredContracts: {
304
- key: 'launchpadAllRegisteredContracts',
305
- ttl: ttl_1.TTLS.ONE_MONTH,
306
- },
307
- UserStatistics: (hash) => ({
308
- key: `userStatistics:${hash}`,
309
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
310
- }),
311
- UserOwnedAndListedSummary: (address) => ({
312
- key: `userOwnedAndListedSummary:${address}`,
313
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
314
- }),
315
- UserSearch: (filter) => ({
316
- key: `userSearch:${filter}`,
317
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
318
- }),
319
- DropsSearch: (filter) => ({
320
- key: `drops:${filter}`,
321
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
322
- }),
323
- CollectionSearch: (filter) => ({
324
- key: `collectionSearch:${filter}`,
325
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
326
- }),
327
- GlobalSearch: (filter) => ({
328
- key: `globalSearch:${filter}`,
329
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
330
- }),
331
- ListingCount: (chain) => ({
332
- key: `listingCount${serializeChain(chain)}`,
333
- ttl: ttl_1.TTLS.ONE_HOUR * 6,
334
- }),
335
- UserCount: (chain) => ({
336
- key: `userCount${serializeChain(chain)}`,
337
- ttl: ttl_1.TTLS.ONE_DAY,
338
- }),
339
- TradingStatistics: (chain) => ({
340
- key: `tradingStatistics${serializeChain(chain)}`,
341
- ttl: ttl_1.TTLS.ONE_DAY,
342
- }),
343
- ShardCount: {
344
- key: 'shardCount',
345
- ttl: ttl_1.TTLS.ONE_WEEK,
346
- },
347
- AddressEsdt: (address) => ({
348
- key: `addressEsdt:${address}`,
349
- ttl: ttl_1.TTLS.ONE_SECOND * 6,
350
- }),
351
- UserFavoriteUserAddresses: (address) => ({
352
- key: `userFavoriteUserAddresses:${address}`,
353
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
354
- }),
355
- UserFavoriteCollectionTickers: (address) => ({
356
- key: `userFavoriteCollectionTickers:${address}`,
357
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
358
- }),
359
- UserFavoriteNftIdentifiers: (address) => ({
360
- key: `userFavoriteNftIdentifiers:${address}`,
361
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
362
- }),
363
- UserTradingSummary: (address) => ({
364
- key: `userTradingSummary:${address}`,
365
- ttl: ttl_1.TTLS.ONE_MINUTE * 15,
366
- }),
367
- LendingMarketStatsGraphData: (startTime, endTime, bin, token) => ({
368
- key: `lendingMarketStatsGraphData:${startTime}:${endTime}:${bin}:${token}`,
369
- ttl: ttl_1.TTLS.ONE_MINUTE * 15,
370
- }),
371
- VolumeGraphData: (startTime, endTime, bin, collection, chain) => ({
372
- key: `volumeGraphData:${startTime}:${endTime}:${bin}:${collection}:${serializeChain(chain)}`,
373
- ttl: ttl_1.TTLS.ONE_MINUTE * 15,
374
- }),
375
- DataApiTokens: {
376
- key: 'dataApiTokens',
377
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
378
- },
379
- DataApiTokenPrice: (identifier, timestamp) => {
380
- const priceDate = timestamp ? new Date(timestamp * 1000) : new Date();
381
- // A simple implementation of toISODateString for portability
382
- const toISODateString = (date) => date.toISOString().split('T')[0];
383
- const isCurrentDate = toISODateString(priceDate) === toISODateString(new Date());
384
- const ttl = isCurrentDate ? ttl_1.TTLS.ONE_MINUTE * 5 : ttl_1.TTLS.ONE_WEEK;
385
- return {
386
- key: `dataApiPrice:${identifier}:${toISODateString(priceDate)}`,
387
- ttl,
388
- };
389
- },
390
- CollectionTickerByTags: (creatorTag, collectionTag) => ({
391
- key: `collectionTickerByTags:${creatorTag}:${collectionTag}`,
392
- ttl: ttl_1.TTLS.ONE_YEAR,
393
- }),
394
- TokenFiatPrice: (fiatCurrencies, token) => ({
395
- key: `tokenFiatPrice:${fiatCurrencies.join(',')}:${token}`,
396
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
397
- }),
398
- AshTokenUsdValue: (token) => ({
399
- key: `ashTokenUsdValue:${token}`,
400
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
401
- }),
402
- AshSupportedTokens: {
403
- key: 'ashSupportedTokens',
404
- ttl: ttl_1.TTLS.ONE_DAY,
405
- },
406
- StakingUserRewardByPoolId: (address, poolId) => ({
407
- key: `stakingUserRewardByPoolId:${poolId}:${address}`,
408
- ttl: ttl_1.TTLS.ONE_SECOND * 6,
409
- }),
410
- StakingWlNonces: (poolId) => ({
411
- key: `stakingWlNonces:${poolId}`,
412
- ttl: ttl_1.TTLS.ONE_MONTH,
413
- }),
414
- StakingDataDocs: (query) => ({
415
- key: `stakingDataItems:${query}`,
416
- ttl: ttl_1.TTLS.ONE_SECOND * 30,
417
- }),
418
- StakingPoolDoc: (poolId) => ({
419
- key: `stakingPoolDoc:${poolId}`,
420
- ttl: ttl_1.TTLS.ONE_MONTH,
421
- }),
422
- CollectionListingDistribution: (collection) => ({
423
- key: `collectionListingDistribution:${collection}`,
424
- ttl: ttl_1.TTLS.ONE_HOUR * 6,
425
- }),
426
- CollectionTraitMap: (collection) => ({
427
- key: `collectionTraitMap:${collection}`,
428
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
429
- }),
430
- CollectionFloorPriceByAttribute: (collection) => ({
431
- key: `collectionFloorPriceByAttribute:${collection}`,
432
- ttl: ttl_1.TTLS.ONE_HOUR * 3,
433
- }),
434
- UserCreatorProfileByTag: (creatorTag) => ({
435
- key: `userCreatorProfileByTag:${creatorTag}`,
436
- ttl: ttl_1.TTLS.ONE_MONTH,
437
- }),
438
- UserCreatorProfile: (address) => ({
439
- key: `userCreatorProfile:${address}`,
440
- ttl: ttl_1.TTLS.ONE_MONTH,
441
- }),
442
- UserCreatorTagRegistered: (tag) => ({
443
- key: `userCreatorTagRegistered:${tag}`,
444
- ttl: ttl_1.TTLS.ONE_MONTH,
445
- }),
446
- CollectionFloorPrice: (collection, token) => ({
447
- key: `floorPrice:${collection}:${token}`,
448
- ttl: ttl_1.TTLS.ONE_MONTH,
449
- }),
450
- NftDataDocs: (query) => ({
451
- key: `nftDataItems:${query}`,
452
- ttl: ttl_1.TTLS.ONE_SECOND * 30,
453
- }),
454
- TokenData: (token) => ({
455
- key: `tokenData:${token}`,
456
- ttl: ttl_1.TTLS.ONE_MONTH,
457
- }),
458
- AllBannedCollections: {
459
- key: 'bannedCollections',
460
- ttl: ttl_1.TTLS.ONE_DAY * 30,
461
- },
462
- AllVerifiedCollections: {
463
- key: 'verifiedCollections',
464
- ttl: ttl_1.TTLS.ONE_DAY * 30,
465
- },
466
- CollectionProfileDocs: (hash) => ({
467
- key: `collectionProfileDocs:${hash}`,
468
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
469
- }),
470
- CollectionOfferDocs: (hash) => ({
471
- key: `collectionOffers:${hash}`,
472
- ttl: ttl_1.TTLS.ONE_SECOND * 30,
473
- }),
474
- TokenUsdcValue: (token, timestamp) => ({
475
- key: `tokenUsdcValue:${token}:${timestamp}`,
476
- ttl: ttl_1.TTLS.ONE_DAY,
477
- }),
478
- UserProfile: (address) => ({
479
- key: `userProfile:${address}`,
480
- ttl: ttl_1.TTLS.ONE_DAY * 3,
481
- }),
482
- EpochEndTimestamp: {
483
- key: 'epochEndTimestamp',
484
- ttl: ttl_1.TTLS.ONE_SECOND * 6,
485
- },
486
- CurrentEpoch: {
487
- key: `currentEpoch`,
488
- ttl: ttl_1.TTLS.ONE_SECOND * 6,
489
- },
490
- CurrentTokenValue: {
491
- key: `currentTokenValue`,
492
- ttl: ttl_1.TTLS.ONE_HOUR * 1,
493
- },
494
- SEgldExchangeRate: {
495
- key: `sEgldExchangeRate`,
496
- ttl: ttl_1.TTLS.ONE_HOUR * 12,
497
- },
498
- CollectionHoldersDetailed: (key, realOwners) => ({
499
- key: `collectionHoldersDetailed:${key}:${realOwners}`,
500
- ttl: ttl_1.TTLS.ONE_HOUR * 6,
501
- }),
502
- SftTotalSupplyCount: (key) => ({
503
- key: `sftTotalSupplyCount:${key}`,
504
- ttl: ttl_1.TTLS.ONE_DAY,
505
- }),
506
- CollectionHoldersCount: (key) => ({
507
- key: `collectionHoldersCount:${key}`,
508
- ttl: ttl_1.TTLS.ONE_HOUR * 6,
509
- }),
510
- CollectionStatsDocs: (query) => ({
511
- key: `collectionStats:${query}`,
512
- ttl: ttl_1.TTLS.ONE_MINUTE * 10,
513
- }),
514
- CollectionMintStages: (collection, enabledOnly) => ({
515
- key: `collectionMintStages:${collection}:${enabledOnly}`,
516
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
517
- }),
518
- CollectionMintProfile: (collection) => ({
519
- key: `collectionMintProfile:${collection}`,
520
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
521
- }),
522
- TokenDecimals: (token) => ({
523
- key: `tokenDecimals:${token}`,
524
- ttl: ttl_1.TTLS.ONE_YEAR,
525
- }),
526
- AllSwapTokens: {
527
- key: `allSwapTokens`,
528
- ttl: ttl_1.TTLS.ONE_DAY,
529
- },
530
- AllTokensMap: {
531
- key: 'fetchAllTokensMap',
532
- ttl: ttl_1.TTLS.ONE_HOUR * 2,
533
- },
534
- TokenSupply: (token) => ({
535
- key: `tokenSupply:${token}`,
536
- ttl: ttl_1.TTLS.ONE_HOUR,
537
- }),
538
- MvxTokenSummary: (token) => ({
539
- key: `mvxTokenSummary:${token}`,
540
- ttl: ttl_1.TTLS.ONE_MINUTE * 15,
541
- }),
542
- TokenSummary: (token) => ({
543
- key: `tokenSummary:${token}`,
544
- ttl: ttl_1.TTLS.ONE_HOUR,
545
- }),
546
- MinterUserMintsGlobal: (collectionTag, contractAddress, userAddress) => ({
547
- key: `minterUserMintsGlobal:${collectionTag}:${contractAddress}:${userAddress}`,
548
- ttl: ttl_1.TTLS.ONE_SECOND * 6,
549
- }),
550
- MinterUserMintsPerStage: (collectionTag, contractAddress, userAddress, stageName) => ({
551
- key: `minterUserMintsPerStage:${collectionTag}:${contractAddress}:${userAddress}:${stageName}`,
552
- ttl: ttl_1.TTLS.ONE_SECOND * 6,
553
- }),
554
- MinterMintShareholders: (collectionTag, contractAddress) => ({
555
- key: `minterMintShareholders:${collectionTag}:${contractAddress}`,
556
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
557
- }),
558
- MinterRoyaltiesShareholders: (contractAddress) => ({
559
- key: `minterRoyaltiesShareholders:${contractAddress}`,
560
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
561
- }),
562
- MinterIsUserWhitelisted: (collectionTag, contractAddress, userAddress, stageName) => ({
563
- key: `minterIsUserWhitelisted:${collectionTag}:${contractAddress}:${userAddress}:${stageName}`,
564
- ttl: ttl_1.TTLS.ONE_MINUTE * 5,
565
- }),
566
- CollectionProfile: (collection) => ({
567
- key: `collectionProfile:${collection}`,
568
- ttl: ttl_1.TTLS.ONE_MONTH,
569
- }),
570
- GetAbi: (abiName) => ({
571
- key: `abi:${abiName}`,
572
- ttl: ttl_1.TTLS.ONE_DAY,
573
- }),
574
- EsdtTokenProperties: (tokenIdentifier) => ({
575
- key: `esdtTokenProperties:${tokenIdentifier}`,
576
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
577
- }),
578
- AccountHerotag: (address) => ({
579
- key: `accountHerotag:${address}`,
580
- ttl: ttl_1.TTLS.ONE_MONTH * 3,
581
- }),
582
- CollectionHoldersDocCount: (collection) => ({
583
- key: `collectionHoldersDocCount:${collection}`,
584
- ttl: ttl_1.TTLS.ONE_MONTH * 6,
585
- }),
586
- AccumulatorCreators: {
587
- key: `accumulator:creators`,
588
- ttl: ttl_1.TTLS.ONE_HOUR,
589
- },
590
- ExchangeRateLiquidXOXNO: {
591
- key: `liquid:xoxno:exchangeRate`,
592
- ttl: ttl_1.TTLS.ONE_HOUR,
593
- },
594
- ExchangeRateLiquidXOXNOEGLD: {
595
- key: `liquid:xoxno:egld:exchangeRate`,
596
- ttl: ttl_1.TTLS.ONE_HOUR,
597
- },
598
- FeesXOXNOEGLD: {
599
- key: `liquid:xoxno:egld:fees`,
600
- ttl: ttl_1.TTLS.ONE_DAY,
601
- },
602
- PendingDelegateXOXNOEGLD: {
603
- key: `liquid:xoxno:egld:pendingDelegate`,
604
- ttl: ttl_1.TTLS.ONE_HOUR,
605
- },
606
- VirtualEGLDReserveXOXNOEGLD: {
607
- key: `liquid:xoxno:egld:virtualReserve`,
608
- ttl: ttl_1.TTLS.ONE_HOUR,
609
- },
610
- EGLDLiquidStats: {
611
- key: `liquid:egld:stats`,
612
- ttl: ttl_1.TTLS.ONE_HOUR,
613
- },
614
- TotalWithdrawnXOXNOEGLD: {
615
- key: `liquid:xoxno:egld:totalWithdrawn`,
616
- ttl: ttl_1.TTLS.ONE_HOUR,
617
- },
618
- ValidatorsLiquidXOXNOEGLD: {
619
- key: `liquid:xoxno:egld:stakingProviders`,
620
- ttl: ttl_1.TTLS.ONE_HOUR * 5,
621
- },
622
- AprLiquidXOXNOEGLD: {
623
- key: `liquid:xoxno:egld:apr`,
624
- ttl: ttl_1.TTLS.ONE_HOUR,
625
- },
626
- PendingUnstakeXOXNOEGLD: {
627
- key: `liquid:xoxno:egld:pendingUnstake`,
628
- ttl: ttl_1.TTLS.ONE_HOUR,
629
- },
630
- HatomTokenValues: {
631
- key: 'hatomTokenValues',
632
- ttl: ttl_1.TTLS.ONE_HOUR,
633
- },
634
- LowVolumeCollections: {
635
- key: 'lowVolumeCollections',
636
- ttl: ttl_1.TTLS.ONE_HOUR,
637
- },
638
- EventReferralConfigDoc: (eventId, configId) => ({
639
- key: `event:${eventId}:referralConfig:${configId}`,
640
- ttl: ttl_1.TTLS.ONE_MONTH,
641
- }),
642
- EventReferralDoc: (eventId, referralCode) => ({
643
- key: `event:${eventId}:referral:${referralCode}`,
644
- ttl: ttl_1.TTLS.ONE_MONTH,
645
- }),
646
- SuiTransactionSender: (txDigest) => ({
647
- key: `suiTransactionSender:${txDigest}`,
648
- ttl: ttl_1.TTLS.ONE_YEAR,
649
- }),
650
- SuiObject: (objectId) => ({
651
- key: `suiObject:${objectId}`,
652
- ttl: ttl_1.TTLS.ONE_YEAR,
653
- }),
654
- };