@0xsequence/indexer 3.0.0-beta.8 → 3.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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-lint.log +4 -0
- package/.turbo/turbo-test.log +5 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +91 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -47
- package/dist/indexer.gen.d.ts +993 -633
- package/dist/indexer.gen.d.ts.map +1 -1
- package/dist/indexer.gen.js +885 -632
- package/dist/indexergw.gen.d.ts +686 -455
- package/dist/indexergw.gen.d.ts.map +1 -1
- package/dist/indexergw.gen.js +684 -426
- package/eslint.config.js +4 -0
- package/package.json +8 -5
- package/src/index.ts +6 -6
- package/src/indexer.gen.ts +1904 -1487
- package/src/indexergw.gen.ts +1215 -946
- package/tsconfig.json +3 -1
package/dist/indexergw.gen.d.ts
CHANGED
|
@@ -1,20 +1,107 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
export declare const WebrpcVersion = "v1";
|
|
2
|
+
export declare const WebrpcSchemaVersion = "v0.4.0";
|
|
3
|
+
export declare const WebrpcSchemaHash = "212120aad9a46e88ead9a2183c5717e9902d8c2b";
|
|
4
|
+
export interface IndexerGatewayClient {
|
|
5
|
+
/**
|
|
6
|
+
* GetTokenBalances returns a balance summary/details for an specific account
|
|
7
|
+
* on all indexer nodes. By default if accountAddress is left empty, it will
|
|
8
|
+
* use the account from the jwt session.
|
|
9
|
+
*/
|
|
10
|
+
getBalanceUpdates(req: GetBalanceUpdatesRequest, headers?: object, signal?: AbortSignal): Promise<GetBalanceUpdatesResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* GetChains returns a list of chains with their ID and name
|
|
13
|
+
*/
|
|
14
|
+
getChains(req: GetChainsRequest, headers?: object, signal?: AbortSignal): Promise<GetChainsResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* GetNativeTokenBalance queries indexer nodes for the latest native token
|
|
17
|
+
* account balance.
|
|
18
|
+
*/
|
|
19
|
+
getNativeTokenBalance(req: GetNativeTokenBalanceRequest, headers?: object, signal?: AbortSignal): Promise<GetNativeTokenBalanceResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* GetTokenBalances returns a balance summary/details for a specific account
|
|
22
|
+
* on all indexer nodes. By default if accountAddress is left empty, it will
|
|
23
|
+
* use the account from the jwt session.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated Use GetTokenBalancesSummary or GetTokenBalancesDetails instead.
|
|
26
|
+
*/
|
|
27
|
+
getTokenBalances(req: GetTokenBalancesRequest, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* GetTokenBalancesByContract returns a balances for specific accounts and
|
|
30
|
+
* contracts on all indexer nodes. The collection ERC721 & ERC1155 tokens are
|
|
31
|
+
* represented as individual balances.
|
|
32
|
+
*/
|
|
33
|
+
getTokenBalancesByContract(req: GetTokenBalancesByContractRequest, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesByContractResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* GetTokenBalancesDetails returns a detailed balance summary for the given
|
|
36
|
+
* accounts on all indexer nodes. The collection ERC721 & ERC1155 tokens are
|
|
37
|
+
* represented as individual balances.
|
|
38
|
+
*/
|
|
39
|
+
getTokenBalancesDetails(req: GetTokenBalancesDetailsRequest, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesDetailsResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* GetTokenBalancesSummary returns a summary of token balances for the given
|
|
42
|
+
* accounts on all indexer nodes. The collection ERC721 & ERC1155 tokens are
|
|
43
|
+
* represented as a single aggregated balance.
|
|
44
|
+
*/
|
|
45
|
+
getTokenBalancesSummary(req: GetTokenBalancesSummaryRequest, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesSummaryResponse>;
|
|
46
|
+
getTokenPrice(req: GetTokenPriceRequest, headers?: object, signal?: AbortSignal): Promise<GetTokenPriceResponse>;
|
|
47
|
+
getTokenPrices(req: GetTokenPricesRequest, headers?: object, signal?: AbortSignal): Promise<GetTokenPricesResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* GetTransactionHistory returns the history of mined transactions for the
|
|
50
|
+
* given account on all indexer nodes, which includes a list of token transfer
|
|
51
|
+
* (sent/received) , and sent transactions from a Sequence wallet.
|
|
52
|
+
*/
|
|
53
|
+
getTransactionHistory(req: GetTransactionHistoryRequest, headers?: object, signal?: AbortSignal): Promise<GetTransactionHistoryResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Ping the indexer
|
|
56
|
+
*/
|
|
57
|
+
ping(headers?: object, signal?: AbortSignal): Promise<PingResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Get the current runtime health status of the indexer gatewya
|
|
60
|
+
*/
|
|
61
|
+
runtimeStatus(headers?: object, signal?: AbortSignal): Promise<RuntimeStatusResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Get the current version of the indexer
|
|
64
|
+
*/
|
|
65
|
+
version(headers?: object, signal?: AbortSignal): Promise<VersionResponse>;
|
|
66
|
+
}
|
|
67
|
+
export interface Asset {
|
|
68
|
+
id: number;
|
|
69
|
+
collectionId: number;
|
|
70
|
+
tokenId?: string;
|
|
71
|
+
url?: string;
|
|
72
|
+
metadataField: string;
|
|
73
|
+
name?: string;
|
|
74
|
+
filesize?: number;
|
|
75
|
+
mimeType?: string;
|
|
76
|
+
width?: number;
|
|
77
|
+
height?: number;
|
|
78
|
+
updatedAt?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare enum BackupMode {
|
|
81
|
+
INCREMENTAL = "INCREMENTAL",
|
|
82
|
+
COMPLETE = "COMPLETE"
|
|
83
|
+
}
|
|
84
|
+
export interface BloomStats {
|
|
85
|
+
hitRatio: string;
|
|
86
|
+
falsePositivesPercent: string;
|
|
87
|
+
hitCount: number;
|
|
88
|
+
missCount: number;
|
|
89
|
+
falsePositives: number;
|
|
90
|
+
}
|
|
91
|
+
export interface BloomStatus {
|
|
92
|
+
enabled: boolean;
|
|
93
|
+
initialized: boolean;
|
|
94
|
+
bloomInitElapsedTime: string;
|
|
95
|
+
stats: BloomStats;
|
|
96
|
+
}
|
|
97
|
+
export interface Bond {
|
|
98
|
+
pebble: PebbleMetrics;
|
|
99
|
+
estimatedDiskUsagePerTable: any;
|
|
100
|
+
estimatedDiskUsageTotal: string;
|
|
101
|
+
}
|
|
102
|
+
export interface ChainInfo {
|
|
103
|
+
chainId: number;
|
|
104
|
+
chainName: string;
|
|
18
105
|
}
|
|
19
106
|
export interface ContractInfo {
|
|
20
107
|
chainId: number;
|
|
@@ -32,58 +119,29 @@ export interface ContractInfo {
|
|
|
32
119
|
queuedAt?: string;
|
|
33
120
|
status: ResourceStatus;
|
|
34
121
|
}
|
|
35
|
-
export interface
|
|
36
|
-
|
|
37
|
-
description: string;
|
|
38
|
-
categories: Array<string>;
|
|
39
|
-
ogImage: string;
|
|
40
|
-
ogName: string;
|
|
41
|
-
originChainId: number;
|
|
42
|
-
originAddress: string;
|
|
43
|
-
blacklist: boolean;
|
|
44
|
-
verified: boolean;
|
|
45
|
-
verifiedBy: string;
|
|
46
|
-
featured: boolean;
|
|
47
|
-
featureIndex: number;
|
|
122
|
+
export interface ContractInfoExtensionBridgeInfo {
|
|
123
|
+
tokenAddress: string;
|
|
48
124
|
}
|
|
49
|
-
export interface
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
125
|
+
export interface ContractInfoExtensionIndexingInfo {
|
|
126
|
+
useOnChainBalance: boolean;
|
|
127
|
+
}
|
|
128
|
+
export interface ContractInfoExtensions {
|
|
129
|
+
link?: string;
|
|
54
130
|
description?: string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
properties?: {
|
|
59
|
-
[key: string]: any;
|
|
131
|
+
categories?: Array<string>;
|
|
132
|
+
bridgeInfo?: {
|
|
133
|
+
[key: string]: ContractInfoExtensionBridgeInfo;
|
|
60
134
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
status: ResourceStatus;
|
|
72
|
-
queuedAt?: string;
|
|
73
|
-
lastFetched?: string;
|
|
74
|
-
}
|
|
75
|
-
export interface Asset {
|
|
76
|
-
id: number;
|
|
77
|
-
collectionId: number;
|
|
78
|
-
tokenId?: string;
|
|
79
|
-
url?: string;
|
|
80
|
-
metadataField: string;
|
|
81
|
-
name?: string;
|
|
82
|
-
filesize?: number;
|
|
83
|
-
mimeType?: string;
|
|
84
|
-
width?: number;
|
|
85
|
-
height?: number;
|
|
86
|
-
updatedAt?: string;
|
|
135
|
+
indexingInfo?: ContractInfoExtensionIndexingInfo;
|
|
136
|
+
ogImage?: string;
|
|
137
|
+
ogName?: string;
|
|
138
|
+
originChainId?: number;
|
|
139
|
+
originAddress?: string;
|
|
140
|
+
blacklist?: boolean;
|
|
141
|
+
verified?: boolean;
|
|
142
|
+
verifiedBy?: string;
|
|
143
|
+
featured?: boolean;
|
|
144
|
+
featureIndex?: number;
|
|
87
145
|
}
|
|
88
146
|
export declare enum ContractType {
|
|
89
147
|
UNKNOWN = "UNKNOWN",
|
|
@@ -95,12 +153,59 @@ export declare enum ContractType {
|
|
|
95
153
|
ERC20_BRIDGE = "ERC20_BRIDGE",
|
|
96
154
|
ERC721_BRIDGE = "ERC721_BRIDGE",
|
|
97
155
|
ERC1155_BRIDGE = "ERC1155_BRIDGE",
|
|
98
|
-
SEQ_MARKETPLACE = "SEQ_MARKETPLACE"
|
|
156
|
+
SEQ_MARKETPLACE = "SEQ_MARKETPLACE",
|
|
157
|
+
ERC6909 = "ERC6909"
|
|
99
158
|
}
|
|
100
|
-
export declare enum
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
159
|
+
export declare enum ContractVerificationStatus {
|
|
160
|
+
VERIFIED = "VERIFIED",
|
|
161
|
+
UNVERIFIED = "UNVERIFIED",
|
|
162
|
+
ALL = "ALL"
|
|
163
|
+
}
|
|
164
|
+
export interface DiskUsage {
|
|
165
|
+
humanReadable: string;
|
|
166
|
+
used: number;
|
|
167
|
+
size: number;
|
|
168
|
+
percent: number;
|
|
169
|
+
dirs: {
|
|
170
|
+
[key: string]: string;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export interface EtherBalance {
|
|
174
|
+
accountAddress: string;
|
|
175
|
+
balanceWei: string;
|
|
176
|
+
}
|
|
177
|
+
export interface EventDecoded {
|
|
178
|
+
topicHash: string;
|
|
179
|
+
eventSig: string;
|
|
180
|
+
types: Array<string>;
|
|
181
|
+
names: Array<string>;
|
|
182
|
+
values: Array<string>;
|
|
183
|
+
}
|
|
184
|
+
export interface EventFilter {
|
|
185
|
+
events?: Array<string>;
|
|
186
|
+
contractAddresses?: Array<string>;
|
|
187
|
+
accounts?: Array<string>;
|
|
188
|
+
tokenIDs?: Array<string>;
|
|
189
|
+
}
|
|
190
|
+
export interface EventLog {
|
|
191
|
+
id: number;
|
|
192
|
+
uid: string;
|
|
193
|
+
type: EventLogType;
|
|
194
|
+
blockNumber: number;
|
|
195
|
+
blockHash: string;
|
|
196
|
+
parentBlockHash: string;
|
|
197
|
+
contractAddress: string;
|
|
198
|
+
contractType: ContractType;
|
|
199
|
+
txnHash: string;
|
|
200
|
+
txnIndex: number;
|
|
201
|
+
txnLogIndex: number;
|
|
202
|
+
logDataType: EventLogDataType;
|
|
203
|
+
ts: string;
|
|
204
|
+
txnInfo?: TxnInfo;
|
|
205
|
+
rawLog?: {
|
|
206
|
+
[key: string]: any;
|
|
207
|
+
};
|
|
208
|
+
event?: EventDecoded;
|
|
104
209
|
}
|
|
105
210
|
export declare enum EventLogDataType {
|
|
106
211
|
EVENT = "EVENT",
|
|
@@ -108,50 +213,10 @@ export declare enum EventLogDataType {
|
|
|
108
213
|
NATIVE_TOKEN_TRANSFER = "NATIVE_TOKEN_TRANSFER",
|
|
109
214
|
SEQUENCE_TXN = "SEQUENCE_TXN"
|
|
110
215
|
}
|
|
111
|
-
export declare enum
|
|
112
|
-
OPEN = "OPEN",
|
|
113
|
-
CLOSED = "CLOSED",
|
|
114
|
-
CANCELLED = "CANCELLED"
|
|
115
|
-
}
|
|
116
|
-
export declare enum TxnTransferType {
|
|
216
|
+
export declare enum EventLogType {
|
|
117
217
|
UNKNOWN = "UNKNOWN",
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
export declare enum TransactionStatus {
|
|
122
|
-
FAILED = "FAILED",
|
|
123
|
-
SUCCESSFUL = "SUCCESSFUL"
|
|
124
|
-
}
|
|
125
|
-
export declare enum TransactionType {
|
|
126
|
-
LegacyTxnType = "LegacyTxnType",
|
|
127
|
-
AccessListTxnType = "AccessListTxnType",
|
|
128
|
-
DynamicFeeTxnType = "DynamicFeeTxnType"
|
|
129
|
-
}
|
|
130
|
-
export declare enum SortOrder {
|
|
131
|
-
DESC = "DESC",
|
|
132
|
-
ASC = "ASC"
|
|
133
|
-
}
|
|
134
|
-
export declare enum ContractVerificationStatus {
|
|
135
|
-
VERIFIED = "VERIFIED",
|
|
136
|
-
UNVERIFIED = "UNVERIFIED",
|
|
137
|
-
ALL = "ALL"
|
|
138
|
-
}
|
|
139
|
-
export interface Version {
|
|
140
|
-
webrpcVersion: string;
|
|
141
|
-
schemaVersion: string;
|
|
142
|
-
schemaHash: string;
|
|
143
|
-
appVersion: string;
|
|
144
|
-
}
|
|
145
|
-
export interface RuntimeStatus {
|
|
146
|
-
healthOK: boolean;
|
|
147
|
-
indexerEnabled: boolean;
|
|
148
|
-
startTime: string;
|
|
149
|
-
uptime: number;
|
|
150
|
-
ver: string;
|
|
151
|
-
branch: string;
|
|
152
|
-
commitHash: string;
|
|
153
|
-
chainID: number;
|
|
154
|
-
checks: RuntimeChecks;
|
|
218
|
+
BLOCK_ADDED = "BLOCK_ADDED",
|
|
219
|
+
BLOCK_REMOVED = "BLOCK_REMOVED"
|
|
155
220
|
}
|
|
156
221
|
export interface GatewayBackendResponseTime {
|
|
157
222
|
percentiles: {
|
|
@@ -164,6 +229,26 @@ export interface GatewayBackendRuntimeStatus {
|
|
|
164
229
|
chainId: number;
|
|
165
230
|
responseTime: GatewayBackendResponseTime;
|
|
166
231
|
}
|
|
232
|
+
export interface GatewayEtherBalance {
|
|
233
|
+
chainId: number;
|
|
234
|
+
errorReason?: string;
|
|
235
|
+
result: EtherBalance;
|
|
236
|
+
}
|
|
237
|
+
export interface GatewayNativeTokenBalance {
|
|
238
|
+
chainId: number;
|
|
239
|
+
errorReason?: string;
|
|
240
|
+
result: NativeTokenBalance;
|
|
241
|
+
}
|
|
242
|
+
export interface GatewayNativeTokenBalances {
|
|
243
|
+
chainId: number;
|
|
244
|
+
errorReason?: string;
|
|
245
|
+
results: Array<NativeTokenBalance>;
|
|
246
|
+
}
|
|
247
|
+
export interface GatewayPrice {
|
|
248
|
+
chainID: number;
|
|
249
|
+
errorReason?: string;
|
|
250
|
+
results: Array<Price>;
|
|
251
|
+
}
|
|
167
252
|
export interface GatewayRuntimeStatus {
|
|
168
253
|
healthOK: boolean;
|
|
169
254
|
startTime: string;
|
|
@@ -173,105 +258,153 @@ export interface GatewayRuntimeStatus {
|
|
|
173
258
|
commitHash: string;
|
|
174
259
|
backends: Array<GatewayBackendRuntimeStatus>;
|
|
175
260
|
}
|
|
176
|
-
export interface
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
commitHash: string;
|
|
261
|
+
export interface GatewayTokenBalance {
|
|
262
|
+
chainId: number;
|
|
263
|
+
errorReason?: string;
|
|
264
|
+
results: Array<TokenBalance>;
|
|
265
|
+
}
|
|
266
|
+
export interface GatewayTokenPriceQuery {
|
|
183
267
|
chainID: number;
|
|
184
|
-
|
|
268
|
+
queries: Array<TokenPriceQuery>;
|
|
185
269
|
}
|
|
186
|
-
export interface
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
270
|
+
export interface GatewayTransaction {
|
|
271
|
+
chainId: number;
|
|
272
|
+
errorReason?: string;
|
|
273
|
+
results: Array<Transaction>;
|
|
274
|
+
}
|
|
275
|
+
export interface IndexState {
|
|
276
|
+
chainId: string;
|
|
193
277
|
lastBlockNum: number;
|
|
194
|
-
|
|
195
|
-
bloomStatus: BloomStatus;
|
|
196
|
-
bond: Bond;
|
|
197
|
-
diskUsage: DiskUsage;
|
|
278
|
+
lastBlockHash: string;
|
|
198
279
|
}
|
|
199
|
-
export interface
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
size: number;
|
|
203
|
-
percent: number;
|
|
204
|
-
dirs: {
|
|
205
|
-
[key: string]: string;
|
|
206
|
-
};
|
|
280
|
+
export interface IndexedBlock {
|
|
281
|
+
blockNumber: number;
|
|
282
|
+
blockShortHash: string;
|
|
207
283
|
}
|
|
208
|
-
export interface
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
estimatedDiskUsageTotal: string;
|
|
284
|
+
export interface IndexerMetrics {
|
|
285
|
+
blocksPerSecond: number;
|
|
286
|
+
eventsPerSecond: number;
|
|
212
287
|
}
|
|
213
|
-
export interface
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
288
|
+
export interface MarketplaceOrder {
|
|
289
|
+
orderId: string;
|
|
290
|
+
tokenContract: string;
|
|
291
|
+
tokenId: string;
|
|
292
|
+
isListing: boolean;
|
|
293
|
+
quantity: string;
|
|
294
|
+
quantityRemaining: string;
|
|
295
|
+
currencyAddress: string;
|
|
296
|
+
pricePerToken: string;
|
|
297
|
+
expiry: string;
|
|
298
|
+
orderStatus: OrderStatus;
|
|
299
|
+
createdBy: string;
|
|
300
|
+
blockNumber: number;
|
|
301
|
+
orderbookContractAddress: string;
|
|
302
|
+
createdAt: number;
|
|
219
303
|
}
|
|
220
|
-
export interface
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
304
|
+
export interface MarketplaceOrderFilter {
|
|
305
|
+
isListing?: boolean;
|
|
306
|
+
userAddresses?: Array<string>;
|
|
307
|
+
currencyAddresses: Array<string>;
|
|
308
|
+
orderIds: Array<string>;
|
|
309
|
+
tokenIds: Array<string>;
|
|
310
|
+
excludeUserAddresses?: Array<string>;
|
|
311
|
+
blockNumberGt: number;
|
|
312
|
+
createdAtAfter: number;
|
|
313
|
+
orderStatuses: Array<OrderStatus>;
|
|
314
|
+
returnExpired: boolean;
|
|
224
315
|
}
|
|
225
|
-
export interface
|
|
226
|
-
|
|
227
|
-
|
|
316
|
+
export interface MarketplaceTopOrdersFilter {
|
|
317
|
+
currencyAddresses: Array<string>;
|
|
318
|
+
tokenIds: Array<string>;
|
|
319
|
+
isListing: boolean;
|
|
320
|
+
priceSort: SortOrder;
|
|
321
|
+
excludeUser?: string;
|
|
322
|
+
}
|
|
323
|
+
export interface MetadataOptions {
|
|
324
|
+
verifiedOnly?: boolean;
|
|
325
|
+
unverifiedOnly?: boolean;
|
|
326
|
+
includeContracts?: Array<string>;
|
|
228
327
|
}
|
|
229
328
|
export interface NativeTokenBalance {
|
|
230
329
|
accountAddress: string;
|
|
231
330
|
chainId: number;
|
|
331
|
+
name: string;
|
|
332
|
+
symbol: string;
|
|
232
333
|
balance: string;
|
|
233
|
-
|
|
334
|
+
balanceUSD: string;
|
|
335
|
+
priceUSD: string;
|
|
336
|
+
priceUpdatedAt?: string;
|
|
337
|
+
errorReason?: string;
|
|
338
|
+
}
|
|
339
|
+
export declare enum NetworkType {
|
|
340
|
+
MAINNETS = "MAINNETS",
|
|
341
|
+
TESTNETS = "TESTNETS",
|
|
342
|
+
ALL = "ALL"
|
|
234
343
|
}
|
|
235
|
-
export
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
344
|
+
export declare enum OrderStatus {
|
|
345
|
+
OPEN = "OPEN",
|
|
346
|
+
CLOSED = "CLOSED",
|
|
347
|
+
CANCELLED = "CANCELLED"
|
|
239
348
|
}
|
|
240
|
-
export interface
|
|
241
|
-
|
|
242
|
-
|
|
349
|
+
export interface Page {
|
|
350
|
+
page?: number;
|
|
351
|
+
column?: string;
|
|
352
|
+
before?: any;
|
|
353
|
+
after?: any;
|
|
354
|
+
sort?: Array<SortBy>;
|
|
355
|
+
pageSize?: number;
|
|
356
|
+
more?: boolean;
|
|
243
357
|
}
|
|
244
|
-
export interface
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
358
|
+
export interface PebbleMetrics {
|
|
359
|
+
compactionCount: number;
|
|
360
|
+
compactionEstimatedDebt: number;
|
|
361
|
+
compactionInProgressBytes: number;
|
|
362
|
+
compactionNumInProgress: number;
|
|
363
|
+
compactionMarkedFiles: number;
|
|
248
364
|
}
|
|
249
|
-
export interface
|
|
250
|
-
id: number;
|
|
251
|
-
uid: string;
|
|
252
|
-
type: EventLogType;
|
|
253
|
-
blockNumber: number;
|
|
254
|
-
blockHash: string;
|
|
255
|
-
parentBlockHash: string;
|
|
365
|
+
export interface Price {
|
|
256
366
|
contractAddress: string;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
txnLogIndex: number;
|
|
261
|
-
logDataType: EventLogDataType;
|
|
262
|
-
ts: string;
|
|
263
|
-
txnInfo?: TxnInfo;
|
|
264
|
-
rawLog?: {
|
|
265
|
-
[key: string]: any;
|
|
266
|
-
};
|
|
267
|
-
event?: EventDecoded;
|
|
367
|
+
tokenID?: string;
|
|
368
|
+
priceUSD: string;
|
|
369
|
+
updatedAt?: string;
|
|
268
370
|
}
|
|
269
|
-
export
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
371
|
+
export declare enum ResourceStatus {
|
|
372
|
+
NOT_AVAILABLE = "NOT_AVAILABLE",
|
|
373
|
+
REFRESHING = "REFRESHING",
|
|
374
|
+
AVAILABLE = "AVAILABLE"
|
|
375
|
+
}
|
|
376
|
+
export interface RuntimeChecks {
|
|
377
|
+
running: boolean;
|
|
378
|
+
runnables: any;
|
|
379
|
+
cgoEnabled: boolean;
|
|
380
|
+
quotaControlEnabled: boolean;
|
|
381
|
+
syncMode: string;
|
|
382
|
+
percentIndexed: number;
|
|
383
|
+
lastBlockNum: number;
|
|
384
|
+
lastBlockNumWithState: number;
|
|
385
|
+
bloomStatus: BloomStatus;
|
|
386
|
+
bond: Bond;
|
|
387
|
+
diskUsage: DiskUsage;
|
|
388
|
+
metrics: IndexerMetrics;
|
|
389
|
+
}
|
|
390
|
+
export interface RuntimeStatus {
|
|
391
|
+
healthOK: boolean;
|
|
392
|
+
indexerEnabled: boolean;
|
|
393
|
+
startTime: string;
|
|
394
|
+
uptime: number;
|
|
395
|
+
ver: string;
|
|
396
|
+
branch: string;
|
|
397
|
+
commitHash: string;
|
|
398
|
+
chainID: number;
|
|
399
|
+
checks: RuntimeChecks;
|
|
400
|
+
}
|
|
401
|
+
export interface SortBy {
|
|
402
|
+
column: string;
|
|
403
|
+
order: SortOrder;
|
|
404
|
+
}
|
|
405
|
+
export declare enum SortOrder {
|
|
406
|
+
DESC = "DESC",
|
|
407
|
+
ASC = "ASC"
|
|
275
408
|
}
|
|
276
409
|
export interface TokenBalance {
|
|
277
410
|
contractType: ContractType;
|
|
@@ -279,6 +412,9 @@ export interface TokenBalance {
|
|
|
279
412
|
accountAddress: string;
|
|
280
413
|
tokenID?: string;
|
|
281
414
|
balance: string;
|
|
415
|
+
balanceUSD: string;
|
|
416
|
+
priceUSD: string;
|
|
417
|
+
priceUpdatedAt?: string;
|
|
282
418
|
blockHash: string;
|
|
283
419
|
blockNumber: number;
|
|
284
420
|
chainId: number;
|
|
@@ -287,37 +423,29 @@ export interface TokenBalance {
|
|
|
287
423
|
contractInfo?: ContractInfo;
|
|
288
424
|
tokenMetadata?: TokenMetadata;
|
|
289
425
|
}
|
|
290
|
-
export interface
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
tokenId: string;
|
|
294
|
-
isListing: boolean;
|
|
295
|
-
quantity: string;
|
|
296
|
-
quantityRemaining: string;
|
|
297
|
-
currencyAddress: string;
|
|
298
|
-
pricePerToken: string;
|
|
299
|
-
expiry: string;
|
|
300
|
-
orderStatus: OrderStatus;
|
|
301
|
-
createdBy: string;
|
|
302
|
-
blockNumber: number;
|
|
303
|
-
orderbookContractAddress: string;
|
|
304
|
-
createdAt: number;
|
|
426
|
+
export interface TokenBalanceFilter {
|
|
427
|
+
contractAddress: string;
|
|
428
|
+
sinceBlockNumber: number;
|
|
305
429
|
}
|
|
306
|
-
export interface
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
430
|
+
export interface TokenBalancesByContractFilter {
|
|
431
|
+
contractAddresses: Array<string>;
|
|
432
|
+
accountAddresses?: Array<string>;
|
|
433
|
+
contractStatus?: ContractVerificationStatus;
|
|
434
|
+
tokenIDs?: Array<string>;
|
|
435
|
+
}
|
|
436
|
+
export interface TokenBalancesFilter {
|
|
437
|
+
accountAddresses: Array<string>;
|
|
438
|
+
contractStatus?: ContractVerificationStatus;
|
|
439
|
+
contractTypes?: Array<string>;
|
|
440
|
+
contractWhitelist?: Array<string>;
|
|
441
|
+
contractBlacklist?: Array<string>;
|
|
442
|
+
omitNativeBalances: boolean;
|
|
443
|
+
omitPrices?: boolean;
|
|
444
|
+
tokenIDs?: Array<string>;
|
|
316
445
|
}
|
|
317
446
|
export interface TokenHistory {
|
|
318
447
|
blockNumber: number;
|
|
319
448
|
blockHash: string;
|
|
320
|
-
accountAddress: string;
|
|
321
449
|
contractAddress: string;
|
|
322
450
|
contractType: ContractType;
|
|
323
451
|
fromAddress: string;
|
|
@@ -325,11 +453,45 @@ export interface TokenHistory {
|
|
|
325
453
|
txnHash: string;
|
|
326
454
|
txnIndex: number;
|
|
327
455
|
txnLogIndex: number;
|
|
328
|
-
logData: string;
|
|
329
456
|
tokenIDs: string;
|
|
330
|
-
|
|
457
|
+
amounts: string;
|
|
331
458
|
ts: string;
|
|
332
459
|
}
|
|
460
|
+
export interface TokenIDRange {
|
|
461
|
+
start: string;
|
|
462
|
+
end: string;
|
|
463
|
+
}
|
|
464
|
+
export interface TokenMetadata {
|
|
465
|
+
chainId?: number;
|
|
466
|
+
contractAddress?: string;
|
|
467
|
+
tokenId: string;
|
|
468
|
+
source: string;
|
|
469
|
+
name: string;
|
|
470
|
+
description?: string;
|
|
471
|
+
image?: string;
|
|
472
|
+
video?: string;
|
|
473
|
+
audio?: string;
|
|
474
|
+
properties?: {
|
|
475
|
+
[key: string]: any;
|
|
476
|
+
};
|
|
477
|
+
attributes: Array<{
|
|
478
|
+
[key: string]: any;
|
|
479
|
+
}>;
|
|
480
|
+
image_data?: string;
|
|
481
|
+
external_url?: string;
|
|
482
|
+
background_color?: string;
|
|
483
|
+
animation_url?: string;
|
|
484
|
+
decimals?: number;
|
|
485
|
+
updatedAt?: string;
|
|
486
|
+
assets?: Array<Asset>;
|
|
487
|
+
status: ResourceStatus;
|
|
488
|
+
queuedAt?: string;
|
|
489
|
+
lastFetched?: string;
|
|
490
|
+
}
|
|
491
|
+
export interface TokenPriceQuery {
|
|
492
|
+
contractAddress: string;
|
|
493
|
+
tokenID?: string;
|
|
494
|
+
}
|
|
333
495
|
export interface TokenSupply {
|
|
334
496
|
tokenID: string;
|
|
335
497
|
supply: string;
|
|
@@ -339,26 +501,19 @@ export interface TokenSupply {
|
|
|
339
501
|
}
|
|
340
502
|
export interface Transaction {
|
|
341
503
|
txnHash: string;
|
|
342
|
-
blockNumber: number;
|
|
343
|
-
blockHash: string;
|
|
344
|
-
chainId: number;
|
|
345
|
-
metaTxnID?: string;
|
|
346
|
-
transfers?: Array<TxnTransfer>;
|
|
347
|
-
timestamp: string;
|
|
348
|
-
}
|
|
349
|
-
export interface
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
tokenIds?: Array<string>;
|
|
356
|
-
amounts: Array<string>;
|
|
357
|
-
logIndex: number;
|
|
358
|
-
contractInfo?: ContractInfo;
|
|
359
|
-
tokenMetadata?: {
|
|
360
|
-
[key: string]: TokenMetadata;
|
|
361
|
-
};
|
|
504
|
+
blockNumber: number;
|
|
505
|
+
blockHash: string;
|
|
506
|
+
chainId: number;
|
|
507
|
+
metaTxnID?: string;
|
|
508
|
+
transfers?: Array<TxnTransfer>;
|
|
509
|
+
timestamp: string;
|
|
510
|
+
}
|
|
511
|
+
export interface TransactionFilter {
|
|
512
|
+
txnHash?: string;
|
|
513
|
+
from?: string;
|
|
514
|
+
to?: string;
|
|
515
|
+
contractAddress?: string;
|
|
516
|
+
event?: string;
|
|
362
517
|
}
|
|
363
518
|
export interface TransactionHistoryFilter {
|
|
364
519
|
accountAddress?: string;
|
|
@@ -370,13 +525,13 @@ export interface TransactionHistoryFilter {
|
|
|
370
525
|
fromBlock?: number;
|
|
371
526
|
toBlock?: number;
|
|
372
527
|
tokenID?: string;
|
|
528
|
+
omitPrices?: boolean;
|
|
373
529
|
}
|
|
374
|
-
export interface
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
event?: string;
|
|
530
|
+
export interface TransactionLog {
|
|
531
|
+
contractAddress: string;
|
|
532
|
+
topics: Array<string>;
|
|
533
|
+
data: string;
|
|
534
|
+
index: number;
|
|
380
535
|
}
|
|
381
536
|
export interface TransactionReceipt {
|
|
382
537
|
txnHash: string;
|
|
@@ -393,28 +548,56 @@ export interface TransactionReceipt {
|
|
|
393
548
|
final: boolean;
|
|
394
549
|
reorged: boolean;
|
|
395
550
|
}
|
|
396
|
-
export
|
|
551
|
+
export declare enum TransactionStatus {
|
|
552
|
+
FAILED = "FAILED",
|
|
553
|
+
SUCCESSFUL = "SUCCESSFUL"
|
|
554
|
+
}
|
|
555
|
+
export declare enum TransactionType {
|
|
556
|
+
LegacyTxnType = "LegacyTxnType",
|
|
557
|
+
AccessListTxnType = "AccessListTxnType",
|
|
558
|
+
DynamicFeeTxnType = "DynamicFeeTxnType"
|
|
559
|
+
}
|
|
560
|
+
export interface TxnInfo {
|
|
561
|
+
from: string;
|
|
562
|
+
to: string;
|
|
563
|
+
value: string;
|
|
564
|
+
}
|
|
565
|
+
export interface TxnTransfer {
|
|
566
|
+
transferType: TxnTransferType;
|
|
397
567
|
contractAddress: string;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
568
|
+
contractType: ContractType;
|
|
569
|
+
from: string;
|
|
570
|
+
to: string;
|
|
571
|
+
tokenIds?: Array<string>;
|
|
572
|
+
amounts: Array<string>;
|
|
573
|
+
logIndex: number;
|
|
574
|
+
amountsUSD?: Array<string>;
|
|
575
|
+
pricesUSD?: Array<string>;
|
|
576
|
+
contractInfo?: ContractInfo;
|
|
577
|
+
tokenMetadata?: {
|
|
578
|
+
[key: string]: TokenMetadata;
|
|
579
|
+
};
|
|
401
580
|
}
|
|
402
|
-
export
|
|
403
|
-
|
|
404
|
-
|
|
581
|
+
export declare enum TxnTransferType {
|
|
582
|
+
UNKNOWN = "UNKNOWN",
|
|
583
|
+
SEND = "SEND",
|
|
584
|
+
RECEIVE = "RECEIVE"
|
|
405
585
|
}
|
|
406
|
-
export interface
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
sort?: Array<SortBy>;
|
|
412
|
-
pageSize?: number;
|
|
413
|
-
more?: boolean;
|
|
586
|
+
export interface Version {
|
|
587
|
+
webrpcVersion: string;
|
|
588
|
+
schemaVersion: string;
|
|
589
|
+
schemaHash: string;
|
|
590
|
+
appVersion: string;
|
|
414
591
|
}
|
|
415
|
-
export interface
|
|
416
|
-
|
|
417
|
-
|
|
592
|
+
export interface WALWriterRuntimeStatus {
|
|
593
|
+
healthOK: boolean;
|
|
594
|
+
startTime: string;
|
|
595
|
+
uptime: number;
|
|
596
|
+
ver: string;
|
|
597
|
+
branch: string;
|
|
598
|
+
commitHash: string;
|
|
599
|
+
chainID: number;
|
|
600
|
+
percentWALWritten: number;
|
|
418
601
|
}
|
|
419
602
|
export interface WebhookListener {
|
|
420
603
|
id: number;
|
|
@@ -425,78 +608,39 @@ export interface WebhookListener {
|
|
|
425
608
|
updatedAt: string;
|
|
426
609
|
active: boolean;
|
|
427
610
|
}
|
|
428
|
-
export interface
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
tokenIDs?: Array<string>;
|
|
433
|
-
}
|
|
434
|
-
export interface TokenBalanceFilter {
|
|
611
|
+
export interface GetBalanceUpdatesRequest {
|
|
612
|
+
chainIds?: Array<number>;
|
|
613
|
+
networks?: Array<string>;
|
|
614
|
+
networkType?: NetworkType;
|
|
435
615
|
contractAddress: string;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
verifiedOnly?: boolean;
|
|
440
|
-
unverifiedOnly?: boolean;
|
|
441
|
-
includeContracts?: Array<string>;
|
|
442
|
-
}
|
|
443
|
-
export interface TokenBalancesFilter {
|
|
444
|
-
accountAddresses: Array<string>;
|
|
445
|
-
contractStatus?: ContractVerificationStatus;
|
|
446
|
-
contractTypes?: Array<string>;
|
|
447
|
-
contractWhitelist?: Array<string>;
|
|
448
|
-
contractBlacklist?: Array<string>;
|
|
449
|
-
omitNativeBalances: boolean;
|
|
450
|
-
}
|
|
451
|
-
export interface TokenBalancesByContractFilter {
|
|
452
|
-
contractAddresses: Array<string>;
|
|
453
|
-
accountAddresses?: Array<string>;
|
|
454
|
-
contractStatus?: ContractVerificationStatus;
|
|
455
|
-
}
|
|
456
|
-
export interface GatewayEtherBalance {
|
|
457
|
-
chainId: number;
|
|
458
|
-
error: string;
|
|
459
|
-
result: EtherBalance;
|
|
616
|
+
lastBlockNumber: number;
|
|
617
|
+
lastBlockHash?: string;
|
|
618
|
+
page?: Page;
|
|
460
619
|
}
|
|
461
|
-
export interface
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
result: NativeTokenBalance;
|
|
620
|
+
export interface GetBalanceUpdatesResponse {
|
|
621
|
+
page: Page;
|
|
622
|
+
balances: Array<GatewayTokenBalance>;
|
|
465
623
|
}
|
|
466
|
-
export interface
|
|
467
|
-
|
|
468
|
-
error: string;
|
|
469
|
-
results: Array<NativeTokenBalance>;
|
|
624
|
+
export interface GetChainsRequest {
|
|
625
|
+
networkType?: NetworkType;
|
|
470
626
|
}
|
|
471
|
-
export interface
|
|
472
|
-
|
|
473
|
-
error: string;
|
|
474
|
-
results: Array<TokenBalance>;
|
|
627
|
+
export interface GetChainsResponse {
|
|
628
|
+
chains: Array<ChainInfo>;
|
|
475
629
|
}
|
|
476
|
-
export interface
|
|
477
|
-
getNativeTokenBalance(args: GetNativeTokenBalanceArgs, headers?: object, signal?: AbortSignal): Promise<GetNativeTokenBalanceReturn>;
|
|
478
|
-
getTokenBalances(args: GetTokenBalancesArgs, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesReturn>;
|
|
479
|
-
getTokenBalancesSummary(args: GetTokenBalancesSummaryArgs, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesSummaryReturn>;
|
|
480
|
-
getTokenBalancesDetails(args: GetTokenBalancesDetailsArgs, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesDetailsReturn>;
|
|
481
|
-
getTokenBalancesByContract(args: GetTokenBalancesByContractArgs, headers?: object, signal?: AbortSignal): Promise<GetTokenBalancesByContractReturn>;
|
|
482
|
-
getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object, signal?: AbortSignal): Promise<GetBalanceUpdatesReturn>;
|
|
483
|
-
ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>;
|
|
484
|
-
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>;
|
|
485
|
-
runtimeStatus(headers?: object, signal?: AbortSignal): Promise<RuntimeStatusReturn>;
|
|
486
|
-
}
|
|
487
|
-
export interface GetNativeTokenBalanceArgs {
|
|
630
|
+
export interface GetNativeTokenBalanceRequest {
|
|
488
631
|
chainIds?: Array<number>;
|
|
489
632
|
networks?: Array<string>;
|
|
490
|
-
|
|
633
|
+
networkType?: NetworkType;
|
|
491
634
|
accountAddress?: string;
|
|
635
|
+
omitPrices?: boolean;
|
|
492
636
|
}
|
|
493
|
-
export interface
|
|
637
|
+
export interface GetNativeTokenBalanceResponse {
|
|
494
638
|
balances: Array<GatewayNativeTokenBalance>;
|
|
495
639
|
}
|
|
496
|
-
export interface
|
|
640
|
+
export interface GetTokenBalancesRequest {
|
|
497
641
|
chainIds?: Array<number>;
|
|
498
642
|
networks?: Array<string>;
|
|
499
|
-
|
|
643
|
+
networkType?: NetworkType;
|
|
500
644
|
accountAddress?: string;
|
|
501
645
|
contractAddress?: string;
|
|
502
646
|
tokenID?: string;
|
|
@@ -505,213 +649,249 @@ export interface GetTokenBalancesArgs {
|
|
|
505
649
|
includeCollectionTokens?: boolean;
|
|
506
650
|
page?: Page;
|
|
507
651
|
}
|
|
508
|
-
export interface
|
|
652
|
+
export interface GetTokenBalancesResponse {
|
|
509
653
|
page: Page;
|
|
510
654
|
balances: Array<GatewayTokenBalance>;
|
|
511
655
|
}
|
|
512
|
-
export interface
|
|
656
|
+
export interface GetTokenBalancesByContractRequest {
|
|
513
657
|
chainIds?: Array<number>;
|
|
514
658
|
networks?: Array<string>;
|
|
515
|
-
|
|
516
|
-
filter:
|
|
659
|
+
networkType?: NetworkType;
|
|
660
|
+
filter: TokenBalancesByContractFilter;
|
|
517
661
|
omitMetadata?: boolean;
|
|
518
662
|
page?: Page;
|
|
519
663
|
}
|
|
520
|
-
export interface
|
|
664
|
+
export interface GetTokenBalancesByContractResponse {
|
|
521
665
|
page: Page;
|
|
522
|
-
nativeBalances: Array<GatewayNativeTokenBalances>;
|
|
523
666
|
balances: Array<GatewayTokenBalance>;
|
|
524
667
|
}
|
|
525
|
-
export interface
|
|
668
|
+
export interface GetTokenBalancesDetailsRequest {
|
|
526
669
|
chainIds?: Array<number>;
|
|
527
670
|
networks?: Array<string>;
|
|
528
|
-
|
|
671
|
+
networkType?: NetworkType;
|
|
529
672
|
filter: TokenBalancesFilter;
|
|
530
673
|
omitMetadata?: boolean;
|
|
531
674
|
page?: Page;
|
|
532
675
|
}
|
|
533
|
-
export interface
|
|
676
|
+
export interface GetTokenBalancesDetailsResponse {
|
|
534
677
|
page: Page;
|
|
535
678
|
nativeBalances: Array<GatewayNativeTokenBalances>;
|
|
536
679
|
balances: Array<GatewayTokenBalance>;
|
|
537
680
|
}
|
|
538
|
-
export interface
|
|
681
|
+
export interface GetTokenBalancesSummaryRequest {
|
|
539
682
|
chainIds?: Array<number>;
|
|
540
683
|
networks?: Array<string>;
|
|
541
|
-
|
|
542
|
-
filter:
|
|
684
|
+
networkType?: NetworkType;
|
|
685
|
+
filter: TokenBalancesFilter;
|
|
543
686
|
omitMetadata?: boolean;
|
|
544
687
|
page?: Page;
|
|
545
688
|
}
|
|
546
|
-
export interface
|
|
689
|
+
export interface GetTokenBalancesSummaryResponse {
|
|
547
690
|
page: Page;
|
|
691
|
+
nativeBalances: Array<GatewayNativeTokenBalances>;
|
|
548
692
|
balances: Array<GatewayTokenBalance>;
|
|
549
693
|
}
|
|
550
|
-
export interface
|
|
694
|
+
export interface GetTokenPriceRequest {
|
|
695
|
+
q: GatewayTokenPriceQuery;
|
|
696
|
+
}
|
|
697
|
+
export interface GetTokenPriceResponse {
|
|
698
|
+
price: GatewayPrice;
|
|
699
|
+
}
|
|
700
|
+
export interface GetTokenPricesRequest {
|
|
701
|
+
q: Array<GatewayTokenPriceQuery>;
|
|
702
|
+
}
|
|
703
|
+
export interface GetTokenPricesResponse {
|
|
704
|
+
prices: Array<GatewayPrice>;
|
|
705
|
+
}
|
|
706
|
+
export interface GetTransactionHistoryRequest {
|
|
551
707
|
chainIds?: Array<number>;
|
|
552
708
|
networks?: Array<string>;
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
709
|
+
networkType?: NetworkType;
|
|
710
|
+
filter: TransactionHistoryFilter;
|
|
711
|
+
includeMetadata?: boolean;
|
|
712
|
+
metadataOptions?: MetadataOptions;
|
|
557
713
|
page?: Page;
|
|
558
714
|
}
|
|
559
|
-
export interface
|
|
715
|
+
export interface GetTransactionHistoryResponse {
|
|
560
716
|
page: Page;
|
|
561
|
-
|
|
717
|
+
transactions: Array<GatewayTransaction>;
|
|
562
718
|
}
|
|
563
|
-
export interface
|
|
719
|
+
export interface PingRequest {
|
|
564
720
|
}
|
|
565
|
-
export interface
|
|
721
|
+
export interface PingResponse {
|
|
566
722
|
status: boolean;
|
|
567
723
|
}
|
|
568
|
-
export interface
|
|
724
|
+
export interface RuntimeStatusRequest {
|
|
569
725
|
}
|
|
570
|
-
export interface
|
|
571
|
-
|
|
726
|
+
export interface RuntimeStatusResponse {
|
|
727
|
+
status: GatewayRuntimeStatus;
|
|
572
728
|
}
|
|
573
|
-
export interface
|
|
729
|
+
export interface VersionRequest {
|
|
574
730
|
}
|
|
575
|
-
export interface
|
|
576
|
-
|
|
731
|
+
export interface VersionResponse {
|
|
732
|
+
version: Version;
|
|
577
733
|
}
|
|
578
|
-
export declare class IndexerGateway implements
|
|
734
|
+
export declare class IndexerGateway implements IndexerGatewayClient {
|
|
579
735
|
protected hostname: string;
|
|
580
736
|
protected fetch: Fetch;
|
|
581
737
|
protected path: string;
|
|
582
738
|
constructor(hostname: string, fetch: Fetch);
|
|
583
739
|
private url;
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
740
|
+
queryKey: {
|
|
741
|
+
getBalanceUpdates: (req: GetBalanceUpdatesRequest) => readonly ["IndexerGateway", "getBalanceUpdates", GetBalanceUpdatesRequest];
|
|
742
|
+
getChains: (req: GetChainsRequest) => readonly ["IndexerGateway", "getChains", GetChainsRequest];
|
|
743
|
+
getNativeTokenBalance: (req: GetNativeTokenBalanceRequest) => readonly ["IndexerGateway", "getNativeTokenBalance", GetNativeTokenBalanceRequest];
|
|
744
|
+
getTokenBalances: (req: GetTokenBalancesRequest) => readonly ["IndexerGateway", "getTokenBalances", GetTokenBalancesRequest];
|
|
745
|
+
getTokenBalancesByContract: (req: GetTokenBalancesByContractRequest) => readonly ["IndexerGateway", "getTokenBalancesByContract", GetTokenBalancesByContractRequest];
|
|
746
|
+
getTokenBalancesDetails: (req: GetTokenBalancesDetailsRequest) => readonly ["IndexerGateway", "getTokenBalancesDetails", GetTokenBalancesDetailsRequest];
|
|
747
|
+
getTokenBalancesSummary: (req: GetTokenBalancesSummaryRequest) => readonly ["IndexerGateway", "getTokenBalancesSummary", GetTokenBalancesSummaryRequest];
|
|
748
|
+
getTokenPrice: (req: GetTokenPriceRequest) => readonly ["IndexerGateway", "getTokenPrice", GetTokenPriceRequest];
|
|
749
|
+
getTokenPrices: (req: GetTokenPricesRequest) => readonly ["IndexerGateway", "getTokenPrices", GetTokenPricesRequest];
|
|
750
|
+
getTransactionHistory: (req: GetTransactionHistoryRequest) => readonly ["IndexerGateway", "getTransactionHistory", GetTransactionHistoryRequest];
|
|
751
|
+
ping: () => readonly ["IndexerGateway", "ping"];
|
|
752
|
+
runtimeStatus: () => readonly ["IndexerGateway", "runtimeStatus"];
|
|
753
|
+
version: () => readonly ["IndexerGateway", "version"];
|
|
754
|
+
};
|
|
755
|
+
getBalanceUpdates: (req: GetBalanceUpdatesRequest, headers?: object, signal?: AbortSignal) => Promise<GetBalanceUpdatesResponse>;
|
|
756
|
+
getChains: (req: GetChainsRequest, headers?: object, signal?: AbortSignal) => Promise<GetChainsResponse>;
|
|
757
|
+
getNativeTokenBalance: (req: GetNativeTokenBalanceRequest, headers?: object, signal?: AbortSignal) => Promise<GetNativeTokenBalanceResponse>;
|
|
758
|
+
getTokenBalances: (req: GetTokenBalancesRequest, headers?: object, signal?: AbortSignal) => Promise<GetTokenBalancesResponse>;
|
|
759
|
+
getTokenBalancesByContract: (req: GetTokenBalancesByContractRequest, headers?: object, signal?: AbortSignal) => Promise<GetTokenBalancesByContractResponse>;
|
|
760
|
+
getTokenBalancesDetails: (req: GetTokenBalancesDetailsRequest, headers?: object, signal?: AbortSignal) => Promise<GetTokenBalancesDetailsResponse>;
|
|
761
|
+
getTokenBalancesSummary: (req: GetTokenBalancesSummaryRequest, headers?: object, signal?: AbortSignal) => Promise<GetTokenBalancesSummaryResponse>;
|
|
762
|
+
getTokenPrice: (req: GetTokenPriceRequest, headers?: object, signal?: AbortSignal) => Promise<GetTokenPriceResponse>;
|
|
763
|
+
getTokenPrices: (req: GetTokenPricesRequest, headers?: object, signal?: AbortSignal) => Promise<GetTokenPricesResponse>;
|
|
764
|
+
getTransactionHistory: (req: GetTransactionHistoryRequest, headers?: object, signal?: AbortSignal) => Promise<GetTransactionHistoryResponse>;
|
|
765
|
+
ping: (headers?: object, signal?: AbortSignal) => Promise<PingResponse>;
|
|
766
|
+
runtimeStatus: (headers?: object, signal?: AbortSignal) => Promise<RuntimeStatusResponse>;
|
|
767
|
+
version: (headers?: object, signal?: AbortSignal) => Promise<VersionResponse>;
|
|
593
768
|
}
|
|
769
|
+
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
770
|
+
export declare const JsonEncode: <T = any>(obj: T) => string;
|
|
771
|
+
export declare const JsonDecode: <T = any>(data: string | any, _typ?: string) => T;
|
|
772
|
+
type WebrpcErrorParams = {
|
|
773
|
+
name?: string;
|
|
774
|
+
code?: number;
|
|
775
|
+
message?: string;
|
|
776
|
+
status?: number;
|
|
777
|
+
cause?: string;
|
|
778
|
+
};
|
|
594
779
|
export declare class WebrpcError extends Error {
|
|
595
|
-
name: string;
|
|
596
780
|
code: number;
|
|
597
|
-
message: string;
|
|
598
781
|
status: number;
|
|
599
|
-
|
|
600
|
-
/** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
|
|
601
|
-
msg: string;
|
|
602
|
-
constructor(name: string, code: number, message: string, status: number, cause?: string);
|
|
782
|
+
constructor(error?: WebrpcErrorParams);
|
|
603
783
|
static new(payload: any): WebrpcError;
|
|
604
784
|
}
|
|
605
785
|
export declare class WebrpcEndpointError extends WebrpcError {
|
|
606
|
-
constructor(
|
|
786
|
+
constructor(error?: WebrpcErrorParams);
|
|
607
787
|
}
|
|
608
788
|
export declare class WebrpcRequestFailedError extends WebrpcError {
|
|
609
|
-
constructor(
|
|
789
|
+
constructor(error?: WebrpcErrorParams);
|
|
610
790
|
}
|
|
611
791
|
export declare class WebrpcBadRouteError extends WebrpcError {
|
|
612
|
-
constructor(
|
|
792
|
+
constructor(error?: WebrpcErrorParams);
|
|
613
793
|
}
|
|
614
794
|
export declare class WebrpcBadMethodError extends WebrpcError {
|
|
615
|
-
constructor(
|
|
795
|
+
constructor(error?: WebrpcErrorParams);
|
|
616
796
|
}
|
|
617
797
|
export declare class WebrpcBadRequestError extends WebrpcError {
|
|
618
|
-
constructor(
|
|
798
|
+
constructor(error?: WebrpcErrorParams);
|
|
619
799
|
}
|
|
620
800
|
export declare class WebrpcBadResponseError extends WebrpcError {
|
|
621
|
-
constructor(
|
|
801
|
+
constructor(error?: WebrpcErrorParams);
|
|
622
802
|
}
|
|
623
803
|
export declare class WebrpcServerPanicError extends WebrpcError {
|
|
624
|
-
constructor(
|
|
804
|
+
constructor(error?: WebrpcErrorParams);
|
|
625
805
|
}
|
|
626
806
|
export declare class WebrpcInternalErrorError extends WebrpcError {
|
|
627
|
-
constructor(
|
|
807
|
+
constructor(error?: WebrpcErrorParams);
|
|
628
808
|
}
|
|
629
|
-
export declare class
|
|
630
|
-
constructor(
|
|
809
|
+
export declare class WebrpcClientAbortedError extends WebrpcError {
|
|
810
|
+
constructor(error?: WebrpcErrorParams);
|
|
631
811
|
}
|
|
632
812
|
export declare class WebrpcStreamLostError extends WebrpcError {
|
|
633
|
-
constructor(
|
|
813
|
+
constructor(error?: WebrpcErrorParams);
|
|
634
814
|
}
|
|
635
815
|
export declare class WebrpcStreamFinishedError extends WebrpcError {
|
|
636
|
-
constructor(
|
|
637
|
-
}
|
|
638
|
-
export declare class UnauthorizedError extends WebrpcError {
|
|
639
|
-
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
640
|
-
}
|
|
641
|
-
export declare class PermissionDeniedError extends WebrpcError {
|
|
642
|
-
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
643
|
-
}
|
|
644
|
-
export declare class SessionExpiredError extends WebrpcError {
|
|
645
|
-
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
646
|
-
}
|
|
647
|
-
export declare class MethodNotFoundError extends WebrpcError {
|
|
648
|
-
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
649
|
-
}
|
|
650
|
-
export declare class RequestConflictError extends WebrpcError {
|
|
651
|
-
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
816
|
+
constructor(error?: WebrpcErrorParams);
|
|
652
817
|
}
|
|
653
818
|
export declare class AbortedError extends WebrpcError {
|
|
654
|
-
constructor(
|
|
819
|
+
constructor(error?: WebrpcErrorParams);
|
|
655
820
|
}
|
|
656
|
-
export declare class
|
|
657
|
-
constructor(
|
|
821
|
+
export declare class AccessKeyMismatchError extends WebrpcError {
|
|
822
|
+
constructor(error?: WebrpcErrorParams);
|
|
658
823
|
}
|
|
659
|
-
export declare class
|
|
660
|
-
constructor(
|
|
824
|
+
export declare class AccessKeyNotFoundError extends WebrpcError {
|
|
825
|
+
constructor(error?: WebrpcErrorParams);
|
|
661
826
|
}
|
|
662
|
-
export declare class
|
|
663
|
-
constructor(
|
|
827
|
+
export declare class AtLeastOneKeyError extends WebrpcError {
|
|
828
|
+
constructor(error?: WebrpcErrorParams);
|
|
664
829
|
}
|
|
665
|
-
export declare class
|
|
666
|
-
constructor(
|
|
830
|
+
export declare class GeoblockedError extends WebrpcError {
|
|
831
|
+
constructor(error?: WebrpcErrorParams);
|
|
667
832
|
}
|
|
668
|
-
export declare class
|
|
669
|
-
constructor(
|
|
833
|
+
export declare class InvalidArgumentError extends WebrpcError {
|
|
834
|
+
constructor(error?: WebrpcErrorParams);
|
|
670
835
|
}
|
|
671
836
|
export declare class InvalidOriginError extends WebrpcError {
|
|
672
|
-
constructor(
|
|
837
|
+
constructor(error?: WebrpcErrorParams);
|
|
673
838
|
}
|
|
674
839
|
export declare class InvalidServiceError extends WebrpcError {
|
|
675
|
-
constructor(
|
|
840
|
+
constructor(error?: WebrpcErrorParams);
|
|
676
841
|
}
|
|
677
|
-
export declare class
|
|
678
|
-
constructor(
|
|
842
|
+
export declare class MaxAccessKeysError extends WebrpcError {
|
|
843
|
+
constructor(error?: WebrpcErrorParams);
|
|
679
844
|
}
|
|
680
|
-
export declare class
|
|
681
|
-
constructor(
|
|
845
|
+
export declare class MetadataCallFailedError extends WebrpcError {
|
|
846
|
+
constructor(error?: WebrpcErrorParams);
|
|
682
847
|
}
|
|
683
|
-
export declare class
|
|
684
|
-
constructor(
|
|
848
|
+
export declare class MethodNotFoundError extends WebrpcError {
|
|
849
|
+
constructor(error?: WebrpcErrorParams);
|
|
685
850
|
}
|
|
686
851
|
export declare class NoDefaultKeyError extends WebrpcError {
|
|
687
|
-
constructor(
|
|
852
|
+
constructor(error?: WebrpcErrorParams);
|
|
688
853
|
}
|
|
689
|
-
export declare class
|
|
690
|
-
constructor(
|
|
854
|
+
export declare class NotFoundError extends WebrpcError {
|
|
855
|
+
constructor(error?: WebrpcErrorParams);
|
|
691
856
|
}
|
|
692
|
-
export declare class
|
|
693
|
-
constructor(
|
|
857
|
+
export declare class PermissionDeniedError extends WebrpcError {
|
|
858
|
+
constructor(error?: WebrpcErrorParams);
|
|
694
859
|
}
|
|
695
|
-
export declare class
|
|
696
|
-
constructor(
|
|
860
|
+
export declare class ProjectNotFoundError extends WebrpcError {
|
|
861
|
+
constructor(error?: WebrpcErrorParams);
|
|
697
862
|
}
|
|
698
|
-
export declare class
|
|
699
|
-
constructor(
|
|
863
|
+
export declare class QueryFailedError extends WebrpcError {
|
|
864
|
+
constructor(error?: WebrpcErrorParams);
|
|
700
865
|
}
|
|
701
|
-
export declare class
|
|
702
|
-
constructor(
|
|
866
|
+
export declare class QuotaExceededError extends WebrpcError {
|
|
867
|
+
constructor(error?: WebrpcErrorParams);
|
|
703
868
|
}
|
|
704
|
-
export declare class
|
|
705
|
-
constructor(
|
|
869
|
+
export declare class RateLimitError extends WebrpcError {
|
|
870
|
+
constructor(error?: WebrpcErrorParams);
|
|
871
|
+
}
|
|
872
|
+
export declare class RateLimitedError extends WebrpcError {
|
|
873
|
+
constructor(error?: WebrpcErrorParams);
|
|
874
|
+
}
|
|
875
|
+
export declare class RequestConflictError extends WebrpcError {
|
|
876
|
+
constructor(error?: WebrpcErrorParams);
|
|
706
877
|
}
|
|
707
878
|
export declare class ResourceExhaustedError extends WebrpcError {
|
|
708
|
-
constructor(
|
|
879
|
+
constructor(error?: WebrpcErrorParams);
|
|
709
880
|
}
|
|
710
|
-
export declare class
|
|
711
|
-
constructor(
|
|
881
|
+
export declare class SessionExpiredError extends WebrpcError {
|
|
882
|
+
constructor(error?: WebrpcErrorParams);
|
|
712
883
|
}
|
|
713
|
-
export declare class
|
|
714
|
-
constructor(
|
|
884
|
+
export declare class TimeoutError extends WebrpcError {
|
|
885
|
+
constructor(error?: WebrpcErrorParams);
|
|
886
|
+
}
|
|
887
|
+
export declare class UnauthorizedError extends WebrpcError {
|
|
888
|
+
constructor(error?: WebrpcErrorParams);
|
|
889
|
+
}
|
|
890
|
+
export declare class UnauthorizedUserError extends WebrpcError {
|
|
891
|
+
constructor(error?: WebrpcErrorParams);
|
|
892
|
+
}
|
|
893
|
+
export declare class UnavailableError extends WebrpcError {
|
|
894
|
+
constructor(error?: WebrpcErrorParams);
|
|
715
895
|
}
|
|
716
896
|
export declare enum errors {
|
|
717
897
|
WebrpcEndpoint = "WebrpcEndpoint",
|
|
@@ -722,36 +902,87 @@ export declare enum errors {
|
|
|
722
902
|
WebrpcBadResponse = "WebrpcBadResponse",
|
|
723
903
|
WebrpcServerPanic = "WebrpcServerPanic",
|
|
724
904
|
WebrpcInternalError = "WebrpcInternalError",
|
|
725
|
-
|
|
905
|
+
WebrpcClientAborted = "WebrpcClientAborted",
|
|
726
906
|
WebrpcStreamLost = "WebrpcStreamLost",
|
|
727
907
|
WebrpcStreamFinished = "WebrpcStreamFinished",
|
|
728
|
-
Unauthorized = "Unauthorized",
|
|
729
|
-
PermissionDenied = "PermissionDenied",
|
|
730
|
-
SessionExpired = "SessionExpired",
|
|
731
|
-
MethodNotFound = "MethodNotFound",
|
|
732
|
-
RequestConflict = "RequestConflict",
|
|
733
908
|
Aborted = "Aborted",
|
|
734
|
-
Geoblocked = "Geoblocked",
|
|
735
|
-
RateLimited = "RateLimited",
|
|
736
|
-
ProjectNotFound = "ProjectNotFound",
|
|
737
|
-
AccessKeyNotFound = "AccessKeyNotFound",
|
|
738
909
|
AccessKeyMismatch = "AccessKeyMismatch",
|
|
910
|
+
AccessKeyNotFound = "AccessKeyNotFound",
|
|
911
|
+
AtLeastOneKey = "AtLeastOneKey",
|
|
912
|
+
Geoblocked = "Geoblocked",
|
|
913
|
+
InvalidArgument = "InvalidArgument",
|
|
739
914
|
InvalidOrigin = "InvalidOrigin",
|
|
740
915
|
InvalidService = "InvalidService",
|
|
741
|
-
UnauthorizedUser = "UnauthorizedUser",
|
|
742
|
-
QuotaExceeded = "QuotaExceeded",
|
|
743
|
-
RateLimit = "RateLimit",
|
|
744
|
-
NoDefaultKey = "NoDefaultKey",
|
|
745
916
|
MaxAccessKeys = "MaxAccessKeys",
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
917
|
+
MetadataCallFailed = "MetadataCallFailed",
|
|
918
|
+
MethodNotFound = "MethodNotFound",
|
|
919
|
+
NoDefaultKey = "NoDefaultKey",
|
|
920
|
+
NotFound = "NotFound",
|
|
921
|
+
PermissionDenied = "PermissionDenied",
|
|
922
|
+
ProjectNotFound = "ProjectNotFound",
|
|
750
923
|
QueryFailed = "QueryFailed",
|
|
924
|
+
QuotaExceeded = "QuotaExceeded",
|
|
925
|
+
RateLimit = "RateLimit",
|
|
926
|
+
RateLimited = "RateLimited",
|
|
927
|
+
RequestConflict = "RequestConflict",
|
|
751
928
|
ResourceExhausted = "ResourceExhausted",
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
929
|
+
SessionExpired = "SessionExpired",
|
|
930
|
+
Timeout = "Timeout",
|
|
931
|
+
Unauthorized = "Unauthorized",
|
|
932
|
+
UnauthorizedUser = "UnauthorizedUser",
|
|
933
|
+
Unavailable = "Unavailable"
|
|
934
|
+
}
|
|
935
|
+
export declare enum WebrpcErrorCodes {
|
|
936
|
+
WebrpcEndpoint = 0,
|
|
937
|
+
WebrpcRequestFailed = -1,
|
|
938
|
+
WebrpcBadRoute = -2,
|
|
939
|
+
WebrpcBadMethod = -3,
|
|
940
|
+
WebrpcBadRequest = -4,
|
|
941
|
+
WebrpcBadResponse = -5,
|
|
942
|
+
WebrpcServerPanic = -6,
|
|
943
|
+
WebrpcInternalError = -7,
|
|
944
|
+
WebrpcClientAborted = -8,
|
|
945
|
+
WebrpcStreamLost = -9,
|
|
946
|
+
WebrpcStreamFinished = -10,
|
|
947
|
+
Aborted = 1005,
|
|
948
|
+
AccessKeyMismatch = 1102,
|
|
949
|
+
AccessKeyNotFound = 1101,
|
|
950
|
+
AtLeastOneKey = 1302,
|
|
951
|
+
Geoblocked = 1006,
|
|
952
|
+
InvalidArgument = 2001,
|
|
953
|
+
InvalidOrigin = 1103,
|
|
954
|
+
InvalidService = 1104,
|
|
955
|
+
MaxAccessKeys = 1301,
|
|
956
|
+
MetadataCallFailed = 3003,
|
|
957
|
+
MethodNotFound = 1003,
|
|
958
|
+
NoDefaultKey = 1300,
|
|
959
|
+
NotFound = 3000,
|
|
960
|
+
PermissionDenied = 1001,
|
|
961
|
+
ProjectNotFound = 1100,
|
|
962
|
+
QueryFailed = 2003,
|
|
963
|
+
QuotaExceeded = 1200,
|
|
964
|
+
RateLimit = 1201,
|
|
965
|
+
RateLimited = 1007,
|
|
966
|
+
RequestConflict = 1004,
|
|
967
|
+
ResourceExhausted = 2004,
|
|
968
|
+
SessionExpired = 1002,
|
|
969
|
+
Timeout = 1900,
|
|
970
|
+
Unauthorized = 1000,
|
|
971
|
+
UnauthorizedUser = 1105,
|
|
972
|
+
Unavailable = 2002
|
|
973
|
+
}
|
|
974
|
+
export declare const webrpcErrorByCode: {
|
|
975
|
+
[code: number]: any;
|
|
976
|
+
};
|
|
977
|
+
export declare const WebrpcHeader = "Webrpc";
|
|
978
|
+
export declare const WebrpcHeaderValue = "webrpc@v0.31.2;gen-typescript@v0.23.1;sequence-indexer@v0.4.0";
|
|
979
|
+
type WebrpcGenVersions = {
|
|
980
|
+
WebrpcGenVersion: string;
|
|
981
|
+
codeGenName: string;
|
|
982
|
+
codeGenVersion: string;
|
|
983
|
+
schemaName: string;
|
|
984
|
+
schemaVersion: string;
|
|
985
|
+
};
|
|
986
|
+
export declare function VersionFromHeader(headers: Headers): WebrpcGenVersions;
|
|
756
987
|
export {};
|
|
757
988
|
//# sourceMappingURL=indexergw.gen.d.ts.map
|