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