@0xsequence/indexer 0.43.18 → 0.43.20
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.
|
@@ -18,7 +18,7 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-indexer v0.4.0
|
|
21
|
+
// sequence-indexer v0.4.0 3254a537c563d6b612b7ab5365c305664abb5951
|
|
22
22
|
// --
|
|
23
23
|
// Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ const WebRPCVersion = "v1";
|
|
|
31
31
|
const WebRPCSchemaVersion = "v0.4.0";
|
|
32
32
|
|
|
33
33
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = "
|
|
34
|
+
const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
35
35
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
@@ -58,6 +58,7 @@ exports.EventLogDataType = void 0;
|
|
|
58
58
|
(function (EventLogDataType) {
|
|
59
59
|
EventLogDataType["UNKNOWN"] = "UNKNOWN";
|
|
60
60
|
EventLogDataType["TOKEN_TRANSFER"] = "TOKEN_TRANSFER";
|
|
61
|
+
EventLogDataType["NATIVE_TOKEN_TRANSFER"] = "NATIVE_TOKEN_TRANSFER";
|
|
61
62
|
EventLogDataType["SEQUENCE_TXN"] = "SEQUENCE_TXN";
|
|
62
63
|
})(exports.EventLogDataType || (exports.EventLogDataType = {}));
|
|
63
64
|
exports.TxnTransferType = void 0;
|
|
@@ -66,6 +67,17 @@ exports.TxnTransferType = void 0;
|
|
|
66
67
|
TxnTransferType["SEND"] = "SEND";
|
|
67
68
|
TxnTransferType["RECEIVE"] = "RECEIVE";
|
|
68
69
|
})(exports.TxnTransferType || (exports.TxnTransferType = {}));
|
|
70
|
+
exports.TransactionStatus = void 0;
|
|
71
|
+
(function (TransactionStatus) {
|
|
72
|
+
TransactionStatus["FAILED"] = "FAILED";
|
|
73
|
+
TransactionStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
74
|
+
})(exports.TransactionStatus || (exports.TransactionStatus = {}));
|
|
75
|
+
exports.TransactionType = void 0;
|
|
76
|
+
(function (TransactionType) {
|
|
77
|
+
TransactionType["LegacyTxnType"] = "LegacyTxnType";
|
|
78
|
+
TransactionType["AccessListTxnType"] = "AccessListTxnType";
|
|
79
|
+
TransactionType["DynamicFeeTxnType"] = "DynamicFeeTxnType";
|
|
80
|
+
})(exports.TransactionType || (exports.TransactionType = {}));
|
|
69
81
|
exports.SortOrder = void 0;
|
|
70
82
|
(function (SortOrder) {
|
|
71
83
|
SortOrder["DESC"] = "DESC";
|
|
@@ -181,6 +193,24 @@ class Indexer {
|
|
|
181
193
|
});
|
|
182
194
|
});
|
|
183
195
|
};
|
|
196
|
+
this.fetchTransactionReceipt = (args, headers) => {
|
|
197
|
+
return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest(args, headers)).then(res => {
|
|
198
|
+
return buildResponse(res).then(_data => {
|
|
199
|
+
return {
|
|
200
|
+
receipt: _data.receipt
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
this.fetchTransactionReceiptWithFilter = (args, headers) => {
|
|
206
|
+
return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest(args, headers)).then(res => {
|
|
207
|
+
return buildResponse(res).then(_data => {
|
|
208
|
+
return {
|
|
209
|
+
receipt: _data.receipt
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
};
|
|
184
214
|
this.hostname = hostname;
|
|
185
215
|
this.fetch = (input, init) => fetch(input, init);
|
|
186
216
|
}
|
|
@@ -18,7 +18,7 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-indexer v0.4.0
|
|
21
|
+
// sequence-indexer v0.4.0 3254a537c563d6b612b7ab5365c305664abb5951
|
|
22
22
|
// --
|
|
23
23
|
// Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ const WebRPCVersion = "v1";
|
|
|
31
31
|
const WebRPCSchemaVersion = "v0.4.0";
|
|
32
32
|
|
|
33
33
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = "
|
|
34
|
+
const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
35
35
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
@@ -58,6 +58,7 @@ exports.EventLogDataType = void 0;
|
|
|
58
58
|
(function (EventLogDataType) {
|
|
59
59
|
EventLogDataType["UNKNOWN"] = "UNKNOWN";
|
|
60
60
|
EventLogDataType["TOKEN_TRANSFER"] = "TOKEN_TRANSFER";
|
|
61
|
+
EventLogDataType["NATIVE_TOKEN_TRANSFER"] = "NATIVE_TOKEN_TRANSFER";
|
|
61
62
|
EventLogDataType["SEQUENCE_TXN"] = "SEQUENCE_TXN";
|
|
62
63
|
})(exports.EventLogDataType || (exports.EventLogDataType = {}));
|
|
63
64
|
exports.TxnTransferType = void 0;
|
|
@@ -66,6 +67,17 @@ exports.TxnTransferType = void 0;
|
|
|
66
67
|
TxnTransferType["SEND"] = "SEND";
|
|
67
68
|
TxnTransferType["RECEIVE"] = "RECEIVE";
|
|
68
69
|
})(exports.TxnTransferType || (exports.TxnTransferType = {}));
|
|
70
|
+
exports.TransactionStatus = void 0;
|
|
71
|
+
(function (TransactionStatus) {
|
|
72
|
+
TransactionStatus["FAILED"] = "FAILED";
|
|
73
|
+
TransactionStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
74
|
+
})(exports.TransactionStatus || (exports.TransactionStatus = {}));
|
|
75
|
+
exports.TransactionType = void 0;
|
|
76
|
+
(function (TransactionType) {
|
|
77
|
+
TransactionType["LegacyTxnType"] = "LegacyTxnType";
|
|
78
|
+
TransactionType["AccessListTxnType"] = "AccessListTxnType";
|
|
79
|
+
TransactionType["DynamicFeeTxnType"] = "DynamicFeeTxnType";
|
|
80
|
+
})(exports.TransactionType || (exports.TransactionType = {}));
|
|
69
81
|
exports.SortOrder = void 0;
|
|
70
82
|
(function (SortOrder) {
|
|
71
83
|
SortOrder["DESC"] = "DESC";
|
|
@@ -181,6 +193,24 @@ class Indexer {
|
|
|
181
193
|
});
|
|
182
194
|
});
|
|
183
195
|
};
|
|
196
|
+
this.fetchTransactionReceipt = (args, headers) => {
|
|
197
|
+
return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest(args, headers)).then(res => {
|
|
198
|
+
return buildResponse(res).then(_data => {
|
|
199
|
+
return {
|
|
200
|
+
receipt: _data.receipt
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
this.fetchTransactionReceiptWithFilter = (args, headers) => {
|
|
206
|
+
return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest(args, headers)).then(res => {
|
|
207
|
+
return buildResponse(res).then(_data => {
|
|
208
|
+
return {
|
|
209
|
+
receipt: _data.receipt
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
};
|
|
184
214
|
this.hostname = hostname;
|
|
185
215
|
this.fetch = (input, init) => fetch(input, init);
|
|
186
216
|
}
|
|
@@ -14,7 +14,7 @@ function _extends() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* eslint-disable */
|
|
17
|
-
// sequence-indexer v0.4.0
|
|
17
|
+
// sequence-indexer v0.4.0 3254a537c563d6b612b7ab5365c305664abb5951
|
|
18
18
|
// --
|
|
19
19
|
// Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
|
|
20
20
|
//
|
|
@@ -27,7 +27,7 @@ const WebRPCVersion = "v1";
|
|
|
27
27
|
const WebRPCSchemaVersion = "v0.4.0";
|
|
28
28
|
|
|
29
29
|
// Schema hash generated from your RIDL schema
|
|
30
|
-
const WebRPCSchemaHash = "
|
|
30
|
+
const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
31
31
|
|
|
32
32
|
//
|
|
33
33
|
// Types
|
|
@@ -54,6 +54,7 @@ let EventLogDataType;
|
|
|
54
54
|
(function (EventLogDataType) {
|
|
55
55
|
EventLogDataType["UNKNOWN"] = "UNKNOWN";
|
|
56
56
|
EventLogDataType["TOKEN_TRANSFER"] = "TOKEN_TRANSFER";
|
|
57
|
+
EventLogDataType["NATIVE_TOKEN_TRANSFER"] = "NATIVE_TOKEN_TRANSFER";
|
|
57
58
|
EventLogDataType["SEQUENCE_TXN"] = "SEQUENCE_TXN";
|
|
58
59
|
})(EventLogDataType || (EventLogDataType = {}));
|
|
59
60
|
let TxnTransferType;
|
|
@@ -62,6 +63,17 @@ let TxnTransferType;
|
|
|
62
63
|
TxnTransferType["SEND"] = "SEND";
|
|
63
64
|
TxnTransferType["RECEIVE"] = "RECEIVE";
|
|
64
65
|
})(TxnTransferType || (TxnTransferType = {}));
|
|
66
|
+
let TransactionStatus;
|
|
67
|
+
(function (TransactionStatus) {
|
|
68
|
+
TransactionStatus["FAILED"] = "FAILED";
|
|
69
|
+
TransactionStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
70
|
+
})(TransactionStatus || (TransactionStatus = {}));
|
|
71
|
+
let TransactionType;
|
|
72
|
+
(function (TransactionType) {
|
|
73
|
+
TransactionType["LegacyTxnType"] = "LegacyTxnType";
|
|
74
|
+
TransactionType["AccessListTxnType"] = "AccessListTxnType";
|
|
75
|
+
TransactionType["DynamicFeeTxnType"] = "DynamicFeeTxnType";
|
|
76
|
+
})(TransactionType || (TransactionType = {}));
|
|
65
77
|
let SortOrder;
|
|
66
78
|
(function (SortOrder) {
|
|
67
79
|
SortOrder["DESC"] = "DESC";
|
|
@@ -177,6 +189,24 @@ class Indexer {
|
|
|
177
189
|
});
|
|
178
190
|
});
|
|
179
191
|
};
|
|
192
|
+
this.fetchTransactionReceipt = (args, headers) => {
|
|
193
|
+
return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest(args, headers)).then(res => {
|
|
194
|
+
return buildResponse(res).then(_data => {
|
|
195
|
+
return {
|
|
196
|
+
receipt: _data.receipt
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
this.fetchTransactionReceiptWithFilter = (args, headers) => {
|
|
202
|
+
return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest(args, headers)).then(res => {
|
|
203
|
+
return buildResponse(res).then(_data => {
|
|
204
|
+
return {
|
|
205
|
+
receipt: _data.receipt
|
|
206
|
+
};
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
};
|
|
180
210
|
this.hostname = hostname;
|
|
181
211
|
this.fetch = (input, init) => fetch(input, init);
|
|
182
212
|
}
|
|
@@ -261,4 +291,4 @@ class SequenceIndexerClient extends Indexer {
|
|
|
261
291
|
|
|
262
292
|
// export { SequenceIndexerServices }
|
|
263
293
|
|
|
264
|
-
export { ContractType, EventLogDataType, EventLogType, Indexer, SequenceIndexerClient, SequenceIndexerServices, SortOrder, TxnTransferType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
294
|
+
export { ContractType, EventLogDataType, EventLogType, Indexer, SequenceIndexerClient, SequenceIndexerServices, SortOrder, TransactionStatus, TransactionType, TxnTransferType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
3
|
+
export declare const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
4
4
|
export interface ContractInfo {
|
|
5
5
|
chainId: number;
|
|
6
6
|
address: string;
|
|
@@ -59,6 +59,7 @@ export declare enum EventLogType {
|
|
|
59
59
|
export declare enum EventLogDataType {
|
|
60
60
|
UNKNOWN = "UNKNOWN",
|
|
61
61
|
TOKEN_TRANSFER = "TOKEN_TRANSFER",
|
|
62
|
+
NATIVE_TOKEN_TRANSFER = "NATIVE_TOKEN_TRANSFER",
|
|
62
63
|
SEQUENCE_TXN = "SEQUENCE_TXN"
|
|
63
64
|
}
|
|
64
65
|
export declare enum TxnTransferType {
|
|
@@ -66,6 +67,15 @@ export declare enum TxnTransferType {
|
|
|
66
67
|
SEND = "SEND",
|
|
67
68
|
RECEIVE = "RECEIVE"
|
|
68
69
|
}
|
|
70
|
+
export declare enum TransactionStatus {
|
|
71
|
+
FAILED = "FAILED",
|
|
72
|
+
SUCCESSFUL = "SUCCESSFUL"
|
|
73
|
+
}
|
|
74
|
+
export declare enum TransactionType {
|
|
75
|
+
LegacyTxnType = "LegacyTxnType",
|
|
76
|
+
AccessListTxnType = "AccessListTxnType",
|
|
77
|
+
DynamicFeeTxnType = "DynamicFeeTxnType"
|
|
78
|
+
}
|
|
69
79
|
export declare enum SortOrder {
|
|
70
80
|
DESC = "DESC",
|
|
71
81
|
ASC = "ASC"
|
|
@@ -89,6 +99,7 @@ export interface RuntimeStatus {
|
|
|
89
99
|
}
|
|
90
100
|
export interface RuntimeChecks {
|
|
91
101
|
running: boolean;
|
|
102
|
+
cgoEnabled: boolean;
|
|
92
103
|
syncMode: string;
|
|
93
104
|
lastBlockNum: number;
|
|
94
105
|
lastBlockNumWithState: number;
|
|
@@ -100,39 +111,49 @@ export interface EtherBalance {
|
|
|
100
111
|
export interface IndexState {
|
|
101
112
|
chainId: string;
|
|
102
113
|
lastBlockNum: number;
|
|
114
|
+
lastBlockHash: string;
|
|
115
|
+
}
|
|
116
|
+
export interface IndexedBlock {
|
|
117
|
+
blockNumber: number;
|
|
118
|
+
blockShortHash: string;
|
|
119
|
+
}
|
|
120
|
+
export interface TxnData {
|
|
121
|
+
from: string;
|
|
122
|
+
to: string;
|
|
123
|
+
value: string;
|
|
103
124
|
}
|
|
104
125
|
export interface EventLog {
|
|
105
126
|
id: number;
|
|
106
127
|
type: EventLogType;
|
|
107
128
|
blockNumber: number;
|
|
108
129
|
blockHash: string;
|
|
130
|
+
parentBlockHash: string;
|
|
109
131
|
contractAddress: string;
|
|
110
132
|
contractType: ContractType;
|
|
111
133
|
txnHash: string;
|
|
112
134
|
txnIndex: number;
|
|
135
|
+
txnData: TxnData;
|
|
113
136
|
txnLogIndex: number;
|
|
114
137
|
logDataType: EventLogDataType;
|
|
115
138
|
ts: string;
|
|
116
139
|
logData: string;
|
|
117
140
|
}
|
|
118
141
|
export interface TokenBalance {
|
|
119
|
-
id: number;
|
|
120
|
-
contractAddress: string;
|
|
121
142
|
contractType: ContractType;
|
|
143
|
+
contractAddress: string;
|
|
122
144
|
accountAddress: string;
|
|
123
145
|
tokenID: string;
|
|
124
146
|
balance: string;
|
|
125
147
|
blockHash: string;
|
|
126
148
|
blockNumber: number;
|
|
127
|
-
updateId: number;
|
|
128
149
|
chainId: number;
|
|
129
150
|
contractInfo?: ContractInfo;
|
|
130
151
|
tokenMetadata?: TokenMetadata;
|
|
131
152
|
}
|
|
132
153
|
export interface TokenHistory {
|
|
133
|
-
id: number;
|
|
134
154
|
blockNumber: number;
|
|
135
155
|
blockHash: string;
|
|
156
|
+
accountAddress: string;
|
|
136
157
|
contractAddress: string;
|
|
137
158
|
contractType: ContractType;
|
|
138
159
|
fromAddress: string;
|
|
@@ -141,6 +162,8 @@ export interface TokenHistory {
|
|
|
141
162
|
txnIndex: number;
|
|
142
163
|
txnLogIndex: number;
|
|
143
164
|
logData: string;
|
|
165
|
+
tokenIDs: string;
|
|
166
|
+
Amounts: string;
|
|
144
167
|
ts: string;
|
|
145
168
|
}
|
|
146
169
|
export interface TokenSupply {
|
|
@@ -182,6 +205,35 @@ export interface TransactionHistoryFilter {
|
|
|
182
205
|
metaTransactionIDs?: Array<string>;
|
|
183
206
|
fromBlock?: number;
|
|
184
207
|
toBlock?: number;
|
|
208
|
+
tokenID?: string;
|
|
209
|
+
}
|
|
210
|
+
export interface Filter {
|
|
211
|
+
txnHash?: string;
|
|
212
|
+
from?: string;
|
|
213
|
+
to?: string;
|
|
214
|
+
contractAddress?: string;
|
|
215
|
+
logTopic?: string;
|
|
216
|
+
}
|
|
217
|
+
export interface TransactionReceipt {
|
|
218
|
+
txnHash: string;
|
|
219
|
+
txnStatus: TransactionStatus;
|
|
220
|
+
txnIndex: number;
|
|
221
|
+
txnType: TransactionType;
|
|
222
|
+
blockHash: string;
|
|
223
|
+
blockNumber: number;
|
|
224
|
+
gasUsed: number;
|
|
225
|
+
effectiveGasPrice: string;
|
|
226
|
+
from: string;
|
|
227
|
+
to: string;
|
|
228
|
+
logs: Array<TransactionLog>;
|
|
229
|
+
final: boolean;
|
|
230
|
+
reorged: boolean;
|
|
231
|
+
}
|
|
232
|
+
export interface TransactionLog {
|
|
233
|
+
contractAddress: string;
|
|
234
|
+
topics: Array<string>;
|
|
235
|
+
data: string;
|
|
236
|
+
index: number;
|
|
185
237
|
}
|
|
186
238
|
export interface Page {
|
|
187
239
|
page?: number;
|
|
@@ -208,6 +260,8 @@ export interface Indexer {
|
|
|
208
260
|
getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn>;
|
|
209
261
|
getTransactionHistory(args: GetTransactionHistoryArgs, headers?: object): Promise<GetTransactionHistoryReturn>;
|
|
210
262
|
syncBalance(args: SyncBalanceArgs, headers?: object): Promise<SyncBalanceReturn>;
|
|
263
|
+
fetchTransactionReceipt(args: FetchTransactionReceiptArgs, headers?: object): Promise<FetchTransactionReceiptReturn>;
|
|
264
|
+
fetchTransactionReceiptWithFilter(args: FetchTransactionReceiptWithFilterArgs, headers?: object): Promise<FetchTransactionReceiptWithFilterReturn>;
|
|
211
265
|
}
|
|
212
266
|
export interface PingArgs {
|
|
213
267
|
}
|
|
@@ -238,6 +292,7 @@ export interface GetEtherBalanceReturn {
|
|
|
238
292
|
export interface GetTokenBalancesArgs {
|
|
239
293
|
accountAddress?: string;
|
|
240
294
|
contractAddress?: string;
|
|
295
|
+
tokenID?: string;
|
|
241
296
|
includeMetadata?: boolean;
|
|
242
297
|
page?: Page;
|
|
243
298
|
}
|
|
@@ -268,7 +323,8 @@ export interface GetTokenSuppliesMapReturn {
|
|
|
268
323
|
}
|
|
269
324
|
export interface GetBalanceUpdatesArgs {
|
|
270
325
|
contractAddress: string;
|
|
271
|
-
|
|
326
|
+
lastBlockNumber: number;
|
|
327
|
+
lastBlockHash?: string;
|
|
272
328
|
page?: Page;
|
|
273
329
|
}
|
|
274
330
|
export interface GetBalanceUpdatesReturn {
|
|
@@ -291,6 +347,20 @@ export interface SyncBalanceArgs {
|
|
|
291
347
|
}
|
|
292
348
|
export interface SyncBalanceReturn {
|
|
293
349
|
}
|
|
350
|
+
export interface FetchTransactionReceiptArgs {
|
|
351
|
+
txnHash: string;
|
|
352
|
+
maxBlockWait?: number;
|
|
353
|
+
}
|
|
354
|
+
export interface FetchTransactionReceiptReturn {
|
|
355
|
+
receipt: TransactionReceipt;
|
|
356
|
+
}
|
|
357
|
+
export interface FetchTransactionReceiptWithFilterArgs {
|
|
358
|
+
filter: Filter;
|
|
359
|
+
maxBlockWait?: number;
|
|
360
|
+
}
|
|
361
|
+
export interface FetchTransactionReceiptWithFilterReturn {
|
|
362
|
+
receipt: TransactionReceipt;
|
|
363
|
+
}
|
|
294
364
|
export declare class Indexer implements Indexer {
|
|
295
365
|
protected hostname: string;
|
|
296
366
|
protected fetch: Fetch;
|
|
@@ -308,6 +378,8 @@ export declare class Indexer implements Indexer {
|
|
|
308
378
|
getBalanceUpdates: (args: GetBalanceUpdatesArgs, headers?: object | undefined) => Promise<GetBalanceUpdatesReturn>;
|
|
309
379
|
getTransactionHistory: (args: GetTransactionHistoryArgs, headers?: object | undefined) => Promise<GetTransactionHistoryReturn>;
|
|
310
380
|
syncBalance: (args: SyncBalanceArgs, headers?: object | undefined) => Promise<SyncBalanceReturn>;
|
|
381
|
+
fetchTransactionReceipt: (args: FetchTransactionReceiptArgs, headers?: object | undefined) => Promise<FetchTransactionReceiptReturn>;
|
|
382
|
+
fetchTransactionReceiptWithFilter: (args: FetchTransactionReceiptWithFilterArgs, headers?: object | undefined) => Promise<FetchTransactionReceiptWithFilterReturn>;
|
|
311
383
|
}
|
|
312
384
|
export interface WebRPCError extends Error {
|
|
313
385
|
code: string;
|
package/package.json
CHANGED
package/src/indexer.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-indexer v0.4.0
|
|
2
|
+
// sequence-indexer v0.4.0 3254a537c563d6b612b7ab5365c305664abb5951
|
|
3
3
|
// --
|
|
4
4
|
// Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
@@ -12,7 +12,7 @@ export const WebRPCVersion = "v1"
|
|
|
12
12
|
export const WebRPCSchemaVersion = "v0.4.0"
|
|
13
13
|
|
|
14
14
|
// Schema hash generated from your RIDL schema
|
|
15
|
-
export const WebRPCSchemaHash = "
|
|
15
|
+
export const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951"
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
@@ -76,6 +76,7 @@ export enum EventLogType {
|
|
|
76
76
|
export enum EventLogDataType {
|
|
77
77
|
UNKNOWN = 'UNKNOWN',
|
|
78
78
|
TOKEN_TRANSFER = 'TOKEN_TRANSFER',
|
|
79
|
+
NATIVE_TOKEN_TRANSFER = 'NATIVE_TOKEN_TRANSFER',
|
|
79
80
|
SEQUENCE_TXN = 'SEQUENCE_TXN'
|
|
80
81
|
}
|
|
81
82
|
export enum TxnTransferType {
|
|
@@ -83,6 +84,15 @@ export enum TxnTransferType {
|
|
|
83
84
|
SEND = 'SEND',
|
|
84
85
|
RECEIVE = 'RECEIVE'
|
|
85
86
|
}
|
|
87
|
+
export enum TransactionStatus {
|
|
88
|
+
FAILED = 'FAILED',
|
|
89
|
+
SUCCESSFUL = 'SUCCESSFUL'
|
|
90
|
+
}
|
|
91
|
+
export enum TransactionType {
|
|
92
|
+
LegacyTxnType = 'LegacyTxnType',
|
|
93
|
+
AccessListTxnType = 'AccessListTxnType',
|
|
94
|
+
DynamicFeeTxnType = 'DynamicFeeTxnType'
|
|
95
|
+
}
|
|
86
96
|
export enum SortOrder {
|
|
87
97
|
DESC = 'DESC',
|
|
88
98
|
ASC = 'ASC'
|
|
@@ -109,6 +119,7 @@ export interface RuntimeStatus {
|
|
|
109
119
|
|
|
110
120
|
export interface RuntimeChecks {
|
|
111
121
|
running: boolean
|
|
122
|
+
cgoEnabled: boolean
|
|
112
123
|
syncMode: string
|
|
113
124
|
lastBlockNum: number
|
|
114
125
|
lastBlockNumWithState: number
|
|
@@ -122,6 +133,18 @@ export interface EtherBalance {
|
|
|
122
133
|
export interface IndexState {
|
|
123
134
|
chainId: string
|
|
124
135
|
lastBlockNum: number
|
|
136
|
+
lastBlockHash: string
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface IndexedBlock {
|
|
140
|
+
blockNumber: number
|
|
141
|
+
blockShortHash: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface TxnData {
|
|
145
|
+
from: string
|
|
146
|
+
to: string
|
|
147
|
+
value: string
|
|
125
148
|
}
|
|
126
149
|
|
|
127
150
|
export interface EventLog {
|
|
@@ -129,10 +152,12 @@ export interface EventLog {
|
|
|
129
152
|
type: EventLogType
|
|
130
153
|
blockNumber: number
|
|
131
154
|
blockHash: string
|
|
155
|
+
parentBlockHash: string
|
|
132
156
|
contractAddress: string
|
|
133
157
|
contractType: ContractType
|
|
134
158
|
txnHash: string
|
|
135
159
|
txnIndex: number
|
|
160
|
+
txnData: TxnData
|
|
136
161
|
txnLogIndex: number
|
|
137
162
|
logDataType: EventLogDataType
|
|
138
163
|
ts: string
|
|
@@ -140,25 +165,23 @@ export interface EventLog {
|
|
|
140
165
|
}
|
|
141
166
|
|
|
142
167
|
export interface TokenBalance {
|
|
143
|
-
id: number
|
|
144
|
-
|
|
145
|
-
contractAddress: string
|
|
146
168
|
contractType: ContractType
|
|
169
|
+
contractAddress: string
|
|
147
170
|
accountAddress: string
|
|
148
171
|
tokenID: string
|
|
149
172
|
balance: string
|
|
150
173
|
blockHash: string
|
|
151
174
|
blockNumber: number
|
|
152
|
-
updateId: number
|
|
153
175
|
chainId: number
|
|
176
|
+
|
|
154
177
|
contractInfo?: ContractInfo
|
|
155
178
|
tokenMetadata?: TokenMetadata
|
|
156
179
|
}
|
|
157
180
|
|
|
158
181
|
export interface TokenHistory {
|
|
159
|
-
id: number
|
|
160
182
|
blockNumber: number
|
|
161
183
|
blockHash: string
|
|
184
|
+
accountAddress: string
|
|
162
185
|
contractAddress: string
|
|
163
186
|
contractType: ContractType
|
|
164
187
|
fromAddress: string
|
|
@@ -167,6 +190,8 @@ export interface TokenHistory {
|
|
|
167
190
|
txnIndex: number
|
|
168
191
|
txnLogIndex: number
|
|
169
192
|
logData: string
|
|
193
|
+
tokenIDs: string
|
|
194
|
+
Amounts: string
|
|
170
195
|
ts: string
|
|
171
196
|
}
|
|
172
197
|
|
|
@@ -210,6 +235,38 @@ export interface TransactionHistoryFilter {
|
|
|
210
235
|
metaTransactionIDs?: Array<string>
|
|
211
236
|
fromBlock?: number
|
|
212
237
|
toBlock?: number
|
|
238
|
+
tokenID?: string
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface Filter {
|
|
242
|
+
txnHash?: string
|
|
243
|
+
from?: string
|
|
244
|
+
to?: string
|
|
245
|
+
contractAddress?: string
|
|
246
|
+
logTopic?: string
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface TransactionReceipt {
|
|
250
|
+
txnHash: string
|
|
251
|
+
txnStatus: TransactionStatus
|
|
252
|
+
txnIndex: number
|
|
253
|
+
txnType: TransactionType
|
|
254
|
+
blockHash: string
|
|
255
|
+
blockNumber: number
|
|
256
|
+
gasUsed: number
|
|
257
|
+
effectiveGasPrice: string
|
|
258
|
+
from: string
|
|
259
|
+
to: string
|
|
260
|
+
logs: Array<TransactionLog>
|
|
261
|
+
final: boolean
|
|
262
|
+
reorged: boolean
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface TransactionLog {
|
|
266
|
+
contractAddress: string
|
|
267
|
+
topics: Array<string>
|
|
268
|
+
data: string
|
|
269
|
+
index: number
|
|
213
270
|
}
|
|
214
271
|
|
|
215
272
|
export interface Page {
|
|
@@ -239,6 +296,8 @@ export interface Indexer {
|
|
|
239
296
|
getBalanceUpdates(args: GetBalanceUpdatesArgs, headers?: object): Promise<GetBalanceUpdatesReturn>
|
|
240
297
|
getTransactionHistory(args: GetTransactionHistoryArgs, headers?: object): Promise<GetTransactionHistoryReturn>
|
|
241
298
|
syncBalance(args: SyncBalanceArgs, headers?: object): Promise<SyncBalanceReturn>
|
|
299
|
+
fetchTransactionReceipt(args: FetchTransactionReceiptArgs, headers?: object): Promise<FetchTransactionReceiptReturn>
|
|
300
|
+
fetchTransactionReceiptWithFilter(args: FetchTransactionReceiptWithFilterArgs, headers?: object): Promise<FetchTransactionReceiptWithFilterReturn>
|
|
242
301
|
}
|
|
243
302
|
|
|
244
303
|
export interface PingArgs {
|
|
@@ -275,6 +334,7 @@ export interface GetEtherBalanceReturn {
|
|
|
275
334
|
export interface GetTokenBalancesArgs {
|
|
276
335
|
accountAddress?: string
|
|
277
336
|
contractAddress?: string
|
|
337
|
+
tokenID?: string
|
|
278
338
|
includeMetadata?: boolean
|
|
279
339
|
page?: Page
|
|
280
340
|
}
|
|
@@ -304,7 +364,8 @@ export interface GetTokenSuppliesMapReturn {
|
|
|
304
364
|
}
|
|
305
365
|
export interface GetBalanceUpdatesArgs {
|
|
306
366
|
contractAddress: string
|
|
307
|
-
|
|
367
|
+
lastBlockNumber: number
|
|
368
|
+
lastBlockHash?: string
|
|
308
369
|
page?: Page
|
|
309
370
|
}
|
|
310
371
|
|
|
@@ -330,6 +391,22 @@ export interface SyncBalanceArgs {
|
|
|
330
391
|
|
|
331
392
|
export interface SyncBalanceReturn {
|
|
332
393
|
}
|
|
394
|
+
export interface FetchTransactionReceiptArgs {
|
|
395
|
+
txnHash: string
|
|
396
|
+
maxBlockWait?: number
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface FetchTransactionReceiptReturn {
|
|
400
|
+
receipt: TransactionReceipt
|
|
401
|
+
}
|
|
402
|
+
export interface FetchTransactionReceiptWithFilterArgs {
|
|
403
|
+
filter: Filter
|
|
404
|
+
maxBlockWait?: number
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface FetchTransactionReceiptWithFilterReturn {
|
|
408
|
+
receipt: TransactionReceipt
|
|
409
|
+
}
|
|
333
410
|
|
|
334
411
|
|
|
335
412
|
|
|
@@ -490,6 +567,30 @@ export class Indexer implements Indexer {
|
|
|
490
567
|
})
|
|
491
568
|
}
|
|
492
569
|
|
|
570
|
+
fetchTransactionReceipt = (args: FetchTransactionReceiptArgs, headers?: object): Promise<FetchTransactionReceiptReturn> => {
|
|
571
|
+
return this.fetch(
|
|
572
|
+
this.url('FetchTransactionReceipt'),
|
|
573
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
574
|
+
return buildResponse(res).then(_data => {
|
|
575
|
+
return {
|
|
576
|
+
receipt: <TransactionReceipt>(_data.receipt)
|
|
577
|
+
}
|
|
578
|
+
})
|
|
579
|
+
})
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
fetchTransactionReceiptWithFilter = (args: FetchTransactionReceiptWithFilterArgs, headers?: object): Promise<FetchTransactionReceiptWithFilterReturn> => {
|
|
583
|
+
return this.fetch(
|
|
584
|
+
this.url('FetchTransactionReceiptWithFilter'),
|
|
585
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
586
|
+
return buildResponse(res).then(_data => {
|
|
587
|
+
return {
|
|
588
|
+
receipt: <TransactionReceipt>(_data.receipt)
|
|
589
|
+
}
|
|
590
|
+
})
|
|
591
|
+
})
|
|
592
|
+
}
|
|
593
|
+
|
|
493
594
|
}
|
|
494
595
|
|
|
495
596
|
|