@0xsequence/indexer 0.43.34 → 1.0.1
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.
|
@@ -36,9 +36,7 @@ const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
38
38
|
//
|
|
39
|
-
|
|
40
|
-
exports.ContractType = void 0;
|
|
41
|
-
(function (ContractType) {
|
|
39
|
+
let ContractType = /*#__PURE__*/function (ContractType) {
|
|
42
40
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
43
41
|
ContractType["ERC20"] = "ERC20";
|
|
44
42
|
ContractType["ERC721"] = "ERC721";
|
|
@@ -47,49 +45,48 @@ exports.ContractType = void 0;
|
|
|
47
45
|
ContractType["ERC20_BRIDGE"] = "ERC20_BRIDGE";
|
|
48
46
|
ContractType["ERC721_BRIDGE"] = "ERC721_BRIDGE";
|
|
49
47
|
ContractType["ERC1155_BRIDGE"] = "ERC1155_BRIDGE";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
return ContractType;
|
|
49
|
+
}({});
|
|
50
|
+
let EventLogType = /*#__PURE__*/function (EventLogType) {
|
|
53
51
|
EventLogType["UNKNOWN"] = "UNKNOWN";
|
|
54
52
|
EventLogType["BLOCK_ADDED"] = "BLOCK_ADDED";
|
|
55
53
|
EventLogType["BLOCK_REMOVED"] = "BLOCK_REMOVED";
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
return EventLogType;
|
|
55
|
+
}({});
|
|
56
|
+
let EventLogDataType = /*#__PURE__*/function (EventLogDataType) {
|
|
59
57
|
EventLogDataType["UNKNOWN"] = "UNKNOWN";
|
|
60
58
|
EventLogDataType["TOKEN_TRANSFER"] = "TOKEN_TRANSFER";
|
|
61
59
|
EventLogDataType["NATIVE_TOKEN_TRANSFER"] = "NATIVE_TOKEN_TRANSFER";
|
|
62
60
|
EventLogDataType["SEQUENCE_TXN"] = "SEQUENCE_TXN";
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
return EventLogDataType;
|
|
62
|
+
}({});
|
|
63
|
+
let TxnTransferType = /*#__PURE__*/function (TxnTransferType) {
|
|
66
64
|
TxnTransferType["UNKNOWN"] = "UNKNOWN";
|
|
67
65
|
TxnTransferType["SEND"] = "SEND";
|
|
68
66
|
TxnTransferType["RECEIVE"] = "RECEIVE";
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
return TxnTransferType;
|
|
68
|
+
}({});
|
|
69
|
+
let TransactionStatus = /*#__PURE__*/function (TransactionStatus) {
|
|
72
70
|
TransactionStatus["FAILED"] = "FAILED";
|
|
73
71
|
TransactionStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
return TransactionStatus;
|
|
73
|
+
}({});
|
|
74
|
+
let TransactionType = /*#__PURE__*/function (TransactionType) {
|
|
77
75
|
TransactionType["LegacyTxnType"] = "LegacyTxnType";
|
|
78
76
|
TransactionType["AccessListTxnType"] = "AccessListTxnType";
|
|
79
77
|
TransactionType["DynamicFeeTxnType"] = "DynamicFeeTxnType";
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
return TransactionType;
|
|
79
|
+
}({});
|
|
80
|
+
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
83
81
|
SortOrder["DESC"] = "DESC";
|
|
84
82
|
SortOrder["ASC"] = "ASC";
|
|
85
|
-
|
|
83
|
+
return SortOrder;
|
|
84
|
+
}({});
|
|
86
85
|
//
|
|
87
86
|
// Client
|
|
88
87
|
//
|
|
89
88
|
class Indexer {
|
|
90
89
|
constructor(hostname, fetch) {
|
|
91
|
-
this.hostname = void 0;
|
|
92
|
-
this.fetch = void 0;
|
|
93
90
|
this.path = '/rpc/Indexer/';
|
|
94
91
|
this.ping = headers => {
|
|
95
92
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -248,8 +245,7 @@ const buildResponse = res => {
|
|
|
248
245
|
};
|
|
249
246
|
|
|
250
247
|
// TODO: rename to SequenceIndexerNetworks
|
|
251
|
-
|
|
252
|
-
(function (SequenceIndexerServices) {
|
|
248
|
+
let SequenceIndexerServices = /*#__PURE__*/function (SequenceIndexerServices) {
|
|
253
249
|
SequenceIndexerServices["MAINNET"] = "https://mainnet-indexer.sequence.app";
|
|
254
250
|
SequenceIndexerServices["POLYGON"] = "https://polygon-indexer.sequence.app";
|
|
255
251
|
SequenceIndexerServices["POLYGON_MUMBAI"] = "https://mumbai-indexer.sequence.app";
|
|
@@ -262,12 +258,12 @@ exports.SequenceIndexerServices = void 0;
|
|
|
262
258
|
SequenceIndexerServices["BSC"] = "https://bsc-indexer.sequence.app";
|
|
263
259
|
SequenceIndexerServices["BSC_TESTNET"] = "https://bsc-testnet-indexer.sequence.app";
|
|
264
260
|
SequenceIndexerServices["GOERLI"] = "https://goerli-indexer.sequence.app";
|
|
265
|
-
|
|
261
|
+
return SequenceIndexerServices;
|
|
262
|
+
}({});
|
|
266
263
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
267
264
|
class SequenceIndexerClient extends Indexer {
|
|
268
265
|
constructor(hostname, jwtAuth) {
|
|
269
266
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
270
|
-
this.jwtAuth = jwtAuth;
|
|
271
267
|
this._fetch = (input, init) => {
|
|
272
268
|
// automatically include jwt auth header to requests
|
|
273
269
|
// if its been set on the api client
|
|
@@ -280,6 +276,7 @@ class SequenceIndexerClient extends Indexer {
|
|
|
280
276
|
init.headers = _extends({}, init.headers, headers);
|
|
281
277
|
return fetch(input, init);
|
|
282
278
|
};
|
|
279
|
+
this.jwtAuth = jwtAuth;
|
|
283
280
|
this.fetch = this._fetch;
|
|
284
281
|
}
|
|
285
282
|
}
|
|
@@ -296,8 +293,16 @@ class SequenceIndexerClient extends Indexer {
|
|
|
296
293
|
|
|
297
294
|
// export { SequenceIndexerServices }
|
|
298
295
|
|
|
296
|
+
exports.ContractType = ContractType;
|
|
297
|
+
exports.EventLogDataType = EventLogDataType;
|
|
298
|
+
exports.EventLogType = EventLogType;
|
|
299
299
|
exports.Indexer = Indexer;
|
|
300
300
|
exports.SequenceIndexerClient = SequenceIndexerClient;
|
|
301
|
+
exports.SequenceIndexerServices = SequenceIndexerServices;
|
|
302
|
+
exports.SortOrder = SortOrder;
|
|
303
|
+
exports.TransactionStatus = TransactionStatus;
|
|
304
|
+
exports.TransactionType = TransactionType;
|
|
305
|
+
exports.TxnTransferType = TxnTransferType;
|
|
301
306
|
exports.WebRPCSchemaHash = WebRPCSchemaHash;
|
|
302
307
|
exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
|
|
303
308
|
exports.WebRPCVersion = WebRPCVersion;
|
|
@@ -36,9 +36,7 @@ const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
38
38
|
//
|
|
39
|
-
|
|
40
|
-
exports.ContractType = void 0;
|
|
41
|
-
(function (ContractType) {
|
|
39
|
+
let ContractType = /*#__PURE__*/function (ContractType) {
|
|
42
40
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
43
41
|
ContractType["ERC20"] = "ERC20";
|
|
44
42
|
ContractType["ERC721"] = "ERC721";
|
|
@@ -47,49 +45,48 @@ exports.ContractType = void 0;
|
|
|
47
45
|
ContractType["ERC20_BRIDGE"] = "ERC20_BRIDGE";
|
|
48
46
|
ContractType["ERC721_BRIDGE"] = "ERC721_BRIDGE";
|
|
49
47
|
ContractType["ERC1155_BRIDGE"] = "ERC1155_BRIDGE";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
return ContractType;
|
|
49
|
+
}({});
|
|
50
|
+
let EventLogType = /*#__PURE__*/function (EventLogType) {
|
|
53
51
|
EventLogType["UNKNOWN"] = "UNKNOWN";
|
|
54
52
|
EventLogType["BLOCK_ADDED"] = "BLOCK_ADDED";
|
|
55
53
|
EventLogType["BLOCK_REMOVED"] = "BLOCK_REMOVED";
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
return EventLogType;
|
|
55
|
+
}({});
|
|
56
|
+
let EventLogDataType = /*#__PURE__*/function (EventLogDataType) {
|
|
59
57
|
EventLogDataType["UNKNOWN"] = "UNKNOWN";
|
|
60
58
|
EventLogDataType["TOKEN_TRANSFER"] = "TOKEN_TRANSFER";
|
|
61
59
|
EventLogDataType["NATIVE_TOKEN_TRANSFER"] = "NATIVE_TOKEN_TRANSFER";
|
|
62
60
|
EventLogDataType["SEQUENCE_TXN"] = "SEQUENCE_TXN";
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
return EventLogDataType;
|
|
62
|
+
}({});
|
|
63
|
+
let TxnTransferType = /*#__PURE__*/function (TxnTransferType) {
|
|
66
64
|
TxnTransferType["UNKNOWN"] = "UNKNOWN";
|
|
67
65
|
TxnTransferType["SEND"] = "SEND";
|
|
68
66
|
TxnTransferType["RECEIVE"] = "RECEIVE";
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
return TxnTransferType;
|
|
68
|
+
}({});
|
|
69
|
+
let TransactionStatus = /*#__PURE__*/function (TransactionStatus) {
|
|
72
70
|
TransactionStatus["FAILED"] = "FAILED";
|
|
73
71
|
TransactionStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
return TransactionStatus;
|
|
73
|
+
}({});
|
|
74
|
+
let TransactionType = /*#__PURE__*/function (TransactionType) {
|
|
77
75
|
TransactionType["LegacyTxnType"] = "LegacyTxnType";
|
|
78
76
|
TransactionType["AccessListTxnType"] = "AccessListTxnType";
|
|
79
77
|
TransactionType["DynamicFeeTxnType"] = "DynamicFeeTxnType";
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
return TransactionType;
|
|
79
|
+
}({});
|
|
80
|
+
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
83
81
|
SortOrder["DESC"] = "DESC";
|
|
84
82
|
SortOrder["ASC"] = "ASC";
|
|
85
|
-
|
|
83
|
+
return SortOrder;
|
|
84
|
+
}({});
|
|
86
85
|
//
|
|
87
86
|
// Client
|
|
88
87
|
//
|
|
89
88
|
class Indexer {
|
|
90
89
|
constructor(hostname, fetch) {
|
|
91
|
-
this.hostname = void 0;
|
|
92
|
-
this.fetch = void 0;
|
|
93
90
|
this.path = '/rpc/Indexer/';
|
|
94
91
|
this.ping = headers => {
|
|
95
92
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -248,8 +245,7 @@ const buildResponse = res => {
|
|
|
248
245
|
};
|
|
249
246
|
|
|
250
247
|
// TODO: rename to SequenceIndexerNetworks
|
|
251
|
-
|
|
252
|
-
(function (SequenceIndexerServices) {
|
|
248
|
+
let SequenceIndexerServices = /*#__PURE__*/function (SequenceIndexerServices) {
|
|
253
249
|
SequenceIndexerServices["MAINNET"] = "https://mainnet-indexer.sequence.app";
|
|
254
250
|
SequenceIndexerServices["POLYGON"] = "https://polygon-indexer.sequence.app";
|
|
255
251
|
SequenceIndexerServices["POLYGON_MUMBAI"] = "https://mumbai-indexer.sequence.app";
|
|
@@ -262,12 +258,12 @@ exports.SequenceIndexerServices = void 0;
|
|
|
262
258
|
SequenceIndexerServices["BSC"] = "https://bsc-indexer.sequence.app";
|
|
263
259
|
SequenceIndexerServices["BSC_TESTNET"] = "https://bsc-testnet-indexer.sequence.app";
|
|
264
260
|
SequenceIndexerServices["GOERLI"] = "https://goerli-indexer.sequence.app";
|
|
265
|
-
|
|
261
|
+
return SequenceIndexerServices;
|
|
262
|
+
}({});
|
|
266
263
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
267
264
|
class SequenceIndexerClient extends Indexer {
|
|
268
265
|
constructor(hostname, jwtAuth) {
|
|
269
266
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
270
|
-
this.jwtAuth = jwtAuth;
|
|
271
267
|
this._fetch = (input, init) => {
|
|
272
268
|
// automatically include jwt auth header to requests
|
|
273
269
|
// if its been set on the api client
|
|
@@ -280,6 +276,7 @@ class SequenceIndexerClient extends Indexer {
|
|
|
280
276
|
init.headers = _extends({}, init.headers, headers);
|
|
281
277
|
return fetch(input, init);
|
|
282
278
|
};
|
|
279
|
+
this.jwtAuth = jwtAuth;
|
|
283
280
|
this.fetch = this._fetch;
|
|
284
281
|
}
|
|
285
282
|
}
|
|
@@ -296,8 +293,16 @@ class SequenceIndexerClient extends Indexer {
|
|
|
296
293
|
|
|
297
294
|
// export { SequenceIndexerServices }
|
|
298
295
|
|
|
296
|
+
exports.ContractType = ContractType;
|
|
297
|
+
exports.EventLogDataType = EventLogDataType;
|
|
298
|
+
exports.EventLogType = EventLogType;
|
|
299
299
|
exports.Indexer = Indexer;
|
|
300
300
|
exports.SequenceIndexerClient = SequenceIndexerClient;
|
|
301
|
+
exports.SequenceIndexerServices = SequenceIndexerServices;
|
|
302
|
+
exports.SortOrder = SortOrder;
|
|
303
|
+
exports.TransactionStatus = TransactionStatus;
|
|
304
|
+
exports.TransactionType = TransactionType;
|
|
305
|
+
exports.TxnTransferType = TxnTransferType;
|
|
301
306
|
exports.WebRPCSchemaHash = WebRPCSchemaHash;
|
|
302
307
|
exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
|
|
303
308
|
exports.WebRPCVersion = WebRPCVersion;
|
|
@@ -32,9 +32,7 @@ const WebRPCSchemaHash = "3254a537c563d6b612b7ab5365c305664abb5951";
|
|
|
32
32
|
//
|
|
33
33
|
// Types
|
|
34
34
|
//
|
|
35
|
-
|
|
36
|
-
let ContractType;
|
|
37
|
-
(function (ContractType) {
|
|
35
|
+
let ContractType = /*#__PURE__*/function (ContractType) {
|
|
38
36
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
39
37
|
ContractType["ERC20"] = "ERC20";
|
|
40
38
|
ContractType["ERC721"] = "ERC721";
|
|
@@ -43,49 +41,48 @@ let ContractType;
|
|
|
43
41
|
ContractType["ERC20_BRIDGE"] = "ERC20_BRIDGE";
|
|
44
42
|
ContractType["ERC721_BRIDGE"] = "ERC721_BRIDGE";
|
|
45
43
|
ContractType["ERC1155_BRIDGE"] = "ERC1155_BRIDGE";
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
return ContractType;
|
|
45
|
+
}({});
|
|
46
|
+
let EventLogType = /*#__PURE__*/function (EventLogType) {
|
|
49
47
|
EventLogType["UNKNOWN"] = "UNKNOWN";
|
|
50
48
|
EventLogType["BLOCK_ADDED"] = "BLOCK_ADDED";
|
|
51
49
|
EventLogType["BLOCK_REMOVED"] = "BLOCK_REMOVED";
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
return EventLogType;
|
|
51
|
+
}({});
|
|
52
|
+
let EventLogDataType = /*#__PURE__*/function (EventLogDataType) {
|
|
55
53
|
EventLogDataType["UNKNOWN"] = "UNKNOWN";
|
|
56
54
|
EventLogDataType["TOKEN_TRANSFER"] = "TOKEN_TRANSFER";
|
|
57
55
|
EventLogDataType["NATIVE_TOKEN_TRANSFER"] = "NATIVE_TOKEN_TRANSFER";
|
|
58
56
|
EventLogDataType["SEQUENCE_TXN"] = "SEQUENCE_TXN";
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
return EventLogDataType;
|
|
58
|
+
}({});
|
|
59
|
+
let TxnTransferType = /*#__PURE__*/function (TxnTransferType) {
|
|
62
60
|
TxnTransferType["UNKNOWN"] = "UNKNOWN";
|
|
63
61
|
TxnTransferType["SEND"] = "SEND";
|
|
64
62
|
TxnTransferType["RECEIVE"] = "RECEIVE";
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
return TxnTransferType;
|
|
64
|
+
}({});
|
|
65
|
+
let TransactionStatus = /*#__PURE__*/function (TransactionStatus) {
|
|
68
66
|
TransactionStatus["FAILED"] = "FAILED";
|
|
69
67
|
TransactionStatus["SUCCESSFUL"] = "SUCCESSFUL";
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
return TransactionStatus;
|
|
69
|
+
}({});
|
|
70
|
+
let TransactionType = /*#__PURE__*/function (TransactionType) {
|
|
73
71
|
TransactionType["LegacyTxnType"] = "LegacyTxnType";
|
|
74
72
|
TransactionType["AccessListTxnType"] = "AccessListTxnType";
|
|
75
73
|
TransactionType["DynamicFeeTxnType"] = "DynamicFeeTxnType";
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
return TransactionType;
|
|
75
|
+
}({});
|
|
76
|
+
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
79
77
|
SortOrder["DESC"] = "DESC";
|
|
80
78
|
SortOrder["ASC"] = "ASC";
|
|
81
|
-
|
|
79
|
+
return SortOrder;
|
|
80
|
+
}({});
|
|
82
81
|
//
|
|
83
82
|
// Client
|
|
84
83
|
//
|
|
85
84
|
class Indexer {
|
|
86
85
|
constructor(hostname, fetch) {
|
|
87
|
-
this.hostname = void 0;
|
|
88
|
-
this.fetch = void 0;
|
|
89
86
|
this.path = '/rpc/Indexer/';
|
|
90
87
|
this.ping = headers => {
|
|
91
88
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -244,8 +241,7 @@ const buildResponse = res => {
|
|
|
244
241
|
};
|
|
245
242
|
|
|
246
243
|
// TODO: rename to SequenceIndexerNetworks
|
|
247
|
-
let SequenceIndexerServices
|
|
248
|
-
(function (SequenceIndexerServices) {
|
|
244
|
+
let SequenceIndexerServices = /*#__PURE__*/function (SequenceIndexerServices) {
|
|
249
245
|
SequenceIndexerServices["MAINNET"] = "https://mainnet-indexer.sequence.app";
|
|
250
246
|
SequenceIndexerServices["POLYGON"] = "https://polygon-indexer.sequence.app";
|
|
251
247
|
SequenceIndexerServices["POLYGON_MUMBAI"] = "https://mumbai-indexer.sequence.app";
|
|
@@ -258,12 +254,12 @@ let SequenceIndexerServices;
|
|
|
258
254
|
SequenceIndexerServices["BSC"] = "https://bsc-indexer.sequence.app";
|
|
259
255
|
SequenceIndexerServices["BSC_TESTNET"] = "https://bsc-testnet-indexer.sequence.app";
|
|
260
256
|
SequenceIndexerServices["GOERLI"] = "https://goerli-indexer.sequence.app";
|
|
261
|
-
|
|
257
|
+
return SequenceIndexerServices;
|
|
258
|
+
}({});
|
|
262
259
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
263
260
|
class SequenceIndexerClient extends Indexer {
|
|
264
261
|
constructor(hostname, jwtAuth) {
|
|
265
262
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
266
|
-
this.jwtAuth = jwtAuth;
|
|
267
263
|
this._fetch = (input, init) => {
|
|
268
264
|
// automatically include jwt auth header to requests
|
|
269
265
|
// if its been set on the api client
|
|
@@ -276,6 +272,7 @@ class SequenceIndexerClient extends Indexer {
|
|
|
276
272
|
init.headers = _extends({}, init.headers, headers);
|
|
277
273
|
return fetch(input, init);
|
|
278
274
|
};
|
|
275
|
+
this.jwtAuth = jwtAuth;
|
|
279
276
|
this.fetch = this._fetch;
|
|
280
277
|
}
|
|
281
278
|
}
|
package/package.json
CHANGED