-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathindexer.service.ts
More file actions
517 lines (417 loc) · 23.5 KB
/
indexer.service.ts
File metadata and controls
517 lines (417 loc) · 23.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
import { Inject, Injectable } from "@nestjs/common";
import { BlockFilter } from "src/endpoints/blocks/entities/block.filter";
import { CollectionFilter } from "src/endpoints/collections/entities/collection.filter";
import { NftFilter } from "src/endpoints/nfts/entities/nft.filter";
import { NftMedia } from "src/endpoints/nfts/entities/nft.media";
import { RoundFilter } from "src/endpoints/rounds/entities/round.filter";
import { SmartContractResultFilter } from "src/endpoints/sc-results/entities/smart.contract.result.filter";
import { TokenFilter } from "src/endpoints/tokens/entities/token.filter";
import { TokenWithRolesFilter } from "src/endpoints/tokens/entities/token.with.roles.filter";
import { TransactionFilter } from "src/endpoints/transactions/entities/transaction.filter";
import { MetricsEvents } from "src/utils/metrics-events.constants";
import { TokenAssets } from "../assets/entities/token.assets";
import { QueryPagination } from "../entities/query.pagination";
import { Account, AccountHistory, AccountTokenHistory, Block, Collection, MiniBlock, Operation, Round, ScDeploy, ScResult, Tag, Token, TokenAccount, Transaction, ElasticTransactionLogEvent, TransactionReceipt } from "./entities";
import { IndexerInterface } from "./indexer.interface";
import { LogPerformanceAsync } from "src/utils/log.performance.decorator";
import { AccountQueryOptions } from "src/endpoints/accounts/entities/account.query.options";
import { MiniBlockFilter } from "src/endpoints/miniblocks/entities/mini.block.filter";
import { AccountHistoryFilter } from "src/endpoints/accounts/entities/account.history.filter";
import { AccountAssets } from "../assets/entities/account.assets";
import { ProviderDelegators } from "./entities/provider.delegators";
import { ApplicationFilter, UsersCountRange } from "src/endpoints/applications/entities/application.filter";
import { EventsFilter } from "src/endpoints/events/entities/events.filter";
import { Events } from "./entities/events";
@Injectable()
export class IndexerService implements IndexerInterface {
constructor(
@Inject('IndexerInterface')
private readonly indexerInterface: IndexerInterface,
) { }
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountsCount(filter: AccountQueryOptions): Promise<number> {
return await this.indexerInterface.getAccountsCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getScResultsCount(filter: SmartContractResultFilter): Promise<number> {
return await this.indexerInterface.getScResultsCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountDeploysCount(address: string): Promise<number> {
return await this.indexerInterface.getAccountDeploysCount(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getBlocksCount(filter: BlockFilter): Promise<number> {
return await this.indexerInterface.getBlocksCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getBlocks(filter: BlockFilter, queryPagination: QueryPagination): Promise<Block[]> {
return await this.indexerInterface.getBlocks(filter, queryPagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftCollectionCount(filter: CollectionFilter): Promise<number> {
return await this.indexerInterface.getNftCollectionCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftCountForAddress(address: string, filter: NftFilter): Promise<number> {
return await this.indexerInterface.getNftCountForAddress(address, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getCollectionCountForAddress(address: string, filter: CollectionFilter): Promise<number> {
return await this.indexerInterface.getCollectionCountForAddress(address, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftCount(filter: NftFilter): Promise<number> {
return await this.indexerInterface.getNftCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftOwnersCount(identifier: string): Promise<number> {
return await this.indexerInterface.getNftOwnersCount(identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransfersCount(filter: TransactionFilter): Promise<number> {
return await this.indexerInterface.getTransfersCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTokenCountForAddress(address: string, filter: TokenFilter): Promise<number> {
return await this.indexerInterface.getTokenCountForAddress(address, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTokenAccountsCount(identifier: string): Promise<number | undefined> {
return await this.indexerInterface.getTokenAccountsCount(identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTokenAccounts(pagination: QueryPagination, identifier: string): Promise<TokenAccount[]> {
return await this.indexerInterface.getTokenAccounts(pagination, identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTokensWithRolesForAddressCount(address: string, filter: TokenWithRolesFilter): Promise<number> {
return await this.indexerInterface.getTokensWithRolesForAddressCount(address, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftTagCount(search?: string): Promise<number> {
return await this.indexerInterface.getNftTagCount(search);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getRoundCount(filter: RoundFilter): Promise<number> {
return await this.indexerInterface.getRoundCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountScResultsCount(address: string): Promise<number> {
return await this.indexerInterface.getAccountScResultsCount(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactionCountForAddress(address: string): Promise<number> {
return await this.indexerInterface.getTransactionCountForAddress(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactionCount(filter: TransactionFilter, address?: string): Promise<number> {
return await this.indexerInterface.getTransactionCount(filter, address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getRound(shard: number, round: number): Promise<Round> {
return await this.indexerInterface.getRound(shard, round);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getToken(identifier: string): Promise<Token> {
return await this.indexerInterface.getToken(identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getCollection(identifier: string): Promise<Collection | undefined> {
return await this.indexerInterface.getCollection(identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransaction(txHash: string): Promise<Transaction | null> {
return await this.indexerInterface.getTransaction(txHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getScDeploy(address: string): Promise<ScDeploy | undefined> {
return await this.indexerInterface.getScDeploy(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getScResult(scHash: string): Promise<ScResult> {
return await this.indexerInterface.getScResult(scHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getBlock(hash: string): Promise<Block> {
return await this.indexerInterface.getBlock(hash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getBlockByMiniBlockHash(miniBlockHash: string): Promise<Block | undefined> {
return await this.indexerInterface.getBlockByMiniBlockHash(miniBlockHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getMiniBlock(miniBlockHash: string): Promise<MiniBlock> {
return await this.indexerInterface.getMiniBlock(miniBlockHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getMiniBlocks(pagination: QueryPagination, filter: MiniBlockFilter): Promise<MiniBlock[]> {
return await this.indexerInterface.getMiniBlocks(pagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTag(tag: string): Promise<Tag> {
return await this.indexerInterface.getTag(tag);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransfers(filter: TransactionFilter, pagination: QueryPagination): Promise<Operation[]> {
return await this.indexerInterface.getTransfers(filter, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTokensWithRolesForAddress(address: string, filter: TokenWithRolesFilter, pagination: QueryPagination): Promise<Token[]> {
return await this.indexerInterface.getTokensWithRolesForAddress(address, filter, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getRounds(filter: RoundFilter): Promise<Round[]> {
return await this.indexerInterface.getRounds(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftCollections(pagination: QueryPagination, filter: CollectionFilter, address?: string): Promise<Collection[]> {
return await this.indexerInterface.getNftCollections(pagination, filter, address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountEsdtByAddressesAndIdentifier(identifier: string, addresses: string[]): Promise<TokenAccount[]> {
return await this.indexerInterface.getAccountEsdtByAddressesAndIdentifier(identifier, addresses);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftTags(pagination: QueryPagination, search?: string): Promise<Tag[]> {
return await this.indexerInterface.getNftTags(pagination, search);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getScResults(pagination: QueryPagination, filter: SmartContractResultFilter): Promise<ScResult[]> {
return await this.indexerInterface.getScResults(pagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountScResults(address: string, pagination: QueryPagination): Promise<ScResult[]> {
return await this.indexerInterface.getAccountScResults(address, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccount(address: string): Promise<Account> {
return await this.indexerInterface.getAccount(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccounts(queryPagination: QueryPagination, filter: AccountQueryOptions, fields?: string[]): Promise<Account[]> {
return await this.indexerInterface.getAccounts(queryPagination, filter, fields);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountDeploys(pagination: QueryPagination, address: string): Promise<ScDeploy[]> {
return await this.indexerInterface.getAccountDeploys(pagination, address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountContracts(pagination: QueryPagination, address: string): Promise<any[]> {
return await this.indexerInterface.getAccountContracts(pagination, address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountContractsCount(address: string): Promise<number> {
return await this.indexerInterface.getAccountContractsCount(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountHistory(address: string, pagination: QueryPagination, filter: AccountHistoryFilter): Promise<AccountHistory[]> {
return await this.indexerInterface.getAccountHistory(address, pagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getProviderDelegators(address: string, pagination: QueryPagination): Promise<ProviderDelegators[]> {
return await this.indexerInterface.getProviderDelegators(address, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getProviderDelegatorsCount(address: string): Promise<number> {
return await this.indexerInterface.getProviderDelegatorsCount(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountHistoryCount(address: string, filter?: AccountHistoryFilter): Promise<number> {
return await this.indexerInterface.getAccountHistoryCount(address, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountTokenHistoryCount(address: string, tokenIdentifier: string, filter?: AccountHistoryFilter): Promise<number> {
return await this.indexerInterface.getAccountTokenHistoryCount(address, tokenIdentifier, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountTokenHistory(address: string, tokenIdentifier: string, pagination: QueryPagination, filter: AccountHistoryFilter): Promise<AccountTokenHistory[]> {
return await this.indexerInterface.getAccountTokenHistory(address, tokenIdentifier, pagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountEsdtHistory(address: string, pagination: QueryPagination, filter: AccountHistoryFilter): Promise<AccountTokenHistory[]> {
return await this.indexerInterface.getAccountEsdtHistory(address, pagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountEsdtHistoryCount(address: string, filter: AccountHistoryFilter): Promise<number> {
return await this.indexerInterface.getAccountEsdtHistoryCount(address, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactions(filter: TransactionFilter, pagination: QueryPagination, address?: string): Promise<Transaction[]> {
return await this.indexerInterface.getTransactions(filter, pagination, address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTokensForAddress(address: string, queryPagination: QueryPagination, filter: TokenFilter): Promise<Token[]> {
return await this.indexerInterface.getTokensForAddress(address, queryPagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactionLogs(hashes: string[], eventsIndex: string, txHashField: string): Promise<ElasticTransactionLogEvent[]> {
return await this.indexerInterface.getTransactionLogs(hashes, eventsIndex, txHashField);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactionScResults(txHash: string): Promise<ScResult[]> {
return await this.indexerInterface.getTransactionScResults(txHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getScResultsForTransactions(elasticTransactions: Transaction[]): Promise<ScResult[]> {
return await this.indexerInterface.getScResultsForTransactions(elasticTransactions);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountEsdtByIdentifiers(identifiers: string[], pagination?: QueryPagination): Promise<TokenAccount[]> {
return await this.indexerInterface.getAccountEsdtByIdentifiers(identifiers, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountsEsdtByCollection(identifiers: string[], pagination?: QueryPagination): Promise<TokenAccount[]> {
return await this.indexerInterface.getAccountsEsdtByCollection(identifiers, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftsForAddress(address: string, filter: NftFilter, pagination: QueryPagination): Promise<TokenAccount[]> {
return await this.indexerInterface.getNftsForAddress(address, filter, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNfts(pagination: QueryPagination, filter: NftFilter, identifier?: string): Promise<TokenAccount[]> {
return await this.indexerInterface.getNfts(pagination, filter, identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactionBySenderAndNonce(sender: string, nonce: number): Promise<Transaction[]> {
return await this.indexerInterface.getTransactionBySenderAndNonce(sender, nonce);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getTransactionReceipts(txHash: string): Promise<TransactionReceipt[]> {
return await this.indexerInterface.getTransactionReceipts(txHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAllTokensMetadata(action: (items: Token[]) => Promise<void>): Promise<void> {
return await this.indexerInterface.getAllTokensMetadata(action);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getEsdtAccountsCount(identifier: string): Promise<number> {
return await this.indexerInterface.getEsdtAccountsCount(identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAllAccountsWithToken(identifier: string, action: (items: TokenAccount[]) => Promise<void>): Promise<void> {
return await this.indexerInterface.getAllAccountsWithToken(identifier, action);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getPublicKeys(shard: number, epoch: number): Promise<string[] | undefined> {
return await this.indexerInterface.getPublicKeys(shard, epoch);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getCollectionsForAddress(address: string, filter: CollectionFilter, pagination: QueryPagination): Promise<{ collection: string, count: number, balance: number; }[]> {
return await this.indexerInterface.getCollectionsForAddress(address, filter, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAssetsForToken(identifier: string): Promise<TokenAssets> {
return await this.indexerInterface.getAssetsForToken(identifier);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setAssetsForToken(identifier: string, value: TokenAssets): Promise<void> {
return await this.indexerInterface.setAssetsForToken(identifier, value);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setIsWhitelistedStorageForToken(identifier: string, value: boolean): Promise<void> {
return await this.indexerInterface.setIsWhitelistedStorageForToken(identifier, value);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setMediaForToken(identifier: string, value: NftMedia[]): Promise<void> {
return await this.indexerInterface.setMediaForToken(identifier, value);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setMetadataForToken(identifier: string, value: any): Promise<void> {
return await this.indexerInterface.setMetadataForToken(identifier, value);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setExtraCollectionFields(identifier: string, isVerified: boolean, holderCount: number, nftCount: number): Promise<void> {
return await this.indexerInterface.setExtraCollectionFields(identifier, isVerified, holderCount, nftCount);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setAccountTransfersLast24h(address: string, transfersLast24h: number): Promise<void> {
return await this.indexerInterface.setAccountTransfersLast24h(address, transfersLast24h);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getNftCollectionsByIds(identifiers: string[]): Promise<Collection[]> {
return await this.indexerInterface.getNftCollectionsByIds(identifiers);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getSmartContractResults(transactionHashes: string[]): Promise<ScResult[]> {
return await this.indexerInterface.getSmartContractResults(transactionHashes);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountsForAddresses(addresses: string[]): Promise<Account[]> {
return await this.indexerInterface.getAccountsForAddresses(addresses);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async setAccountAssetsFields(address: string, assets: AccountAssets): Promise<void> {
return await this.indexerInterface.setAccountAssetsFields(address, assets);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async ensureAccountsWritable(): Promise<void> {
return await this.indexerInterface.ensureAccountsWritable();
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async ensureTokensWritable(): Promise<void> {
return await this.indexerInterface.ensureTokensWritable();
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getBlockByTimestampAndShardId(timestamp: number, shardId: number): Promise<Block | undefined> {
return await this.indexerInterface.getBlockByTimestampAndShardId(timestamp, shardId);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getVersion(): Promise<string | undefined> {
return await this.indexerInterface.getVersion();
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getApplications(filter: ApplicationFilter, pagination: QueryPagination): Promise<any[]> {
return await this.indexerInterface.getApplications(filter, pagination);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getApplication(address: string): Promise<any> {
return await this.indexerInterface.getApplication(address);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getApplicationCount(filter: ApplicationFilter): Promise<number> {
return await this.indexerInterface.getApplicationCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAddressesWithTransfersLast24h(): Promise<string[]> {
return await this.indexerInterface.getAddressesWithTransfersLast24h();
}
async getEvents(pagination: QueryPagination, filter: EventsFilter): Promise<Events[]> {
return await this.indexerInterface.getEvents(pagination, filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getEvent(txHash: string): Promise<Events> {
return await this.indexerInterface.getEvent(txHash);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getEventsCount(filter: EventsFilter): Promise<number> {
return await this.indexerInterface.getEventsCount(filter);
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getAccountNftReceivedTimestamps(address: string, identifiers: string[]): Promise<Record<string, number>> {
return await this.indexerInterface.getAccountNftReceivedTimestamps(address, identifiers);
}
async setApplicationExtraProperties(address: string, properties: any): Promise<void> {
return await this.indexerInterface.setApplicationExtraProperties(address, properties);
}
async getApplicationsWithExtraProperties(): Promise<string[]> {
return await this.indexerInterface.getApplicationsWithExtraProperties();
}
async setApplicationIsVerified(address: string, isVerified: boolean): Promise<void> {
return await this.indexerInterface.setApplicationIsVerified(address, isVerified);
}
async getApplicationsWithIsVerified(): Promise<string[]> {
return await this.indexerInterface.getApplicationsWithIsVerified();
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getApplicationUsersCount(applicationAddress: string, range: UsersCountRange): Promise<number> {
return await this.indexerInterface.getApplicationUsersCount(applicationAddress, range);
}
async getAllApplicationAddresses(): Promise<string[]> {
return await this.indexerInterface.getAllApplicationAddresses();
}
@LogPerformanceAsync(MetricsEvents.SetIndexerDuration)
async getApplicationFeesCaptured(applicationAddress: string, range: UsersCountRange): Promise<string> {
return await this.indexerInterface.getApplicationFeesCaptured(applicationAddress, range);
}
}