@0xsequence/indexer 0.36.2 → 0.36.5
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.
|
@@ -238,9 +238,18 @@ const buildResponse = res => {
|
|
|
238
238
|
});
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
+
exports.SequenceIndexerServices = void 0;
|
|
242
|
+
|
|
243
|
+
(function (SequenceIndexerServices) {
|
|
244
|
+
SequenceIndexerServices["MAINNET"] = "https://mainnet-indexer.sequence.app";
|
|
245
|
+
SequenceIndexerServices["POLYGON"] = "https://polygon-indexer.sequence.app";
|
|
246
|
+
SequenceIndexerServices["RINKEBY"] = "https://rinkeby-indexer.sequence.app";
|
|
247
|
+
SequenceIndexerServices["POLYGON_MUMBAI"] = "https://mumbai-indexer.sequence.app";
|
|
248
|
+
})(exports.SequenceIndexerServices || (exports.SequenceIndexerServices = {}));
|
|
249
|
+
|
|
241
250
|
class SequenceIndexerClient extends Indexer {
|
|
242
251
|
constructor(hostname, jwtAuth) {
|
|
243
|
-
super(hostname, fetch__default["default"]);
|
|
252
|
+
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch__default["default"]);
|
|
244
253
|
this.jwtAuth = jwtAuth;
|
|
245
254
|
|
|
246
255
|
this._fetch = (input, init) => {
|
|
@@ -238,9 +238,18 @@ const buildResponse = res => {
|
|
|
238
238
|
});
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
+
exports.SequenceIndexerServices = void 0;
|
|
242
|
+
|
|
243
|
+
(function (SequenceIndexerServices) {
|
|
244
|
+
SequenceIndexerServices["MAINNET"] = "https://mainnet-indexer.sequence.app";
|
|
245
|
+
SequenceIndexerServices["POLYGON"] = "https://polygon-indexer.sequence.app";
|
|
246
|
+
SequenceIndexerServices["RINKEBY"] = "https://rinkeby-indexer.sequence.app";
|
|
247
|
+
SequenceIndexerServices["POLYGON_MUMBAI"] = "https://mumbai-indexer.sequence.app";
|
|
248
|
+
})(exports.SequenceIndexerServices || (exports.SequenceIndexerServices = {}));
|
|
249
|
+
|
|
241
250
|
class SequenceIndexerClient extends Indexer {
|
|
242
251
|
constructor(hostname, jwtAuth) {
|
|
243
|
-
super(hostname, fetch__default["default"]);
|
|
252
|
+
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch__default["default"]);
|
|
244
253
|
this.jwtAuth = jwtAuth;
|
|
245
254
|
|
|
246
255
|
this._fetch = (input, init) => {
|
|
@@ -230,9 +230,18 @@ const buildResponse = res => {
|
|
|
230
230
|
});
|
|
231
231
|
};
|
|
232
232
|
|
|
233
|
+
let SequenceIndexerServices;
|
|
234
|
+
|
|
235
|
+
(function (SequenceIndexerServices) {
|
|
236
|
+
SequenceIndexerServices["MAINNET"] = "https://mainnet-indexer.sequence.app";
|
|
237
|
+
SequenceIndexerServices["POLYGON"] = "https://polygon-indexer.sequence.app";
|
|
238
|
+
SequenceIndexerServices["RINKEBY"] = "https://rinkeby-indexer.sequence.app";
|
|
239
|
+
SequenceIndexerServices["POLYGON_MUMBAI"] = "https://mumbai-indexer.sequence.app";
|
|
240
|
+
})(SequenceIndexerServices || (SequenceIndexerServices = {}));
|
|
241
|
+
|
|
233
242
|
class SequenceIndexerClient extends Indexer {
|
|
234
243
|
constructor(hostname, jwtAuth) {
|
|
235
|
-
super(hostname, fetch);
|
|
244
|
+
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
236
245
|
this.jwtAuth = jwtAuth;
|
|
237
246
|
|
|
238
247
|
this._fetch = (input, init) => {
|
|
@@ -254,4 +263,4 @@ class SequenceIndexerClient extends Indexer {
|
|
|
254
263
|
|
|
255
264
|
}
|
|
256
265
|
|
|
257
|
-
export { ContractType, EventLogDataType, EventLogType, Indexer, SequenceIndexerClient, SortOrder, TxnTransferType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
266
|
+
export { ContractType, EventLogDataType, EventLogType, Indexer, SequenceIndexerClient, SequenceIndexerServices, SortOrder, TxnTransferType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export * from './indexer.gen';
|
|
2
2
|
import { Indexer as BaseSequenceIndexer } from './indexer.gen';
|
|
3
|
+
export declare enum SequenceIndexerServices {
|
|
4
|
+
MAINNET = "https://mainnet-indexer.sequence.app",
|
|
5
|
+
POLYGON = "https://polygon-indexer.sequence.app",
|
|
6
|
+
RINKEBY = "https://rinkeby-indexer.sequence.app",
|
|
7
|
+
POLYGON_MUMBAI = "https://mumbai-indexer.sequence.app"
|
|
8
|
+
}
|
|
3
9
|
export declare class SequenceIndexerClient extends BaseSequenceIndexer {
|
|
4
10
|
jwtAuth?: string | undefined;
|
|
5
11
|
constructor(hostname: string, jwtAuth?: string | undefined);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,9 +4,17 @@ import fetch from 'cross-fetch'
|
|
|
4
4
|
|
|
5
5
|
import { Indexer as BaseSequenceIndexer } from './indexer.gen'
|
|
6
6
|
|
|
7
|
+
export enum SequenceIndexerServices {
|
|
8
|
+
MAINNET = 'https://mainnet-indexer.sequence.app',
|
|
9
|
+
POLYGON = 'https://polygon-indexer.sequence.app',
|
|
10
|
+
|
|
11
|
+
RINKEBY = 'https://rinkeby-indexer.sequence.app',
|
|
12
|
+
POLYGON_MUMBAI = 'https://mumbai-indexer.sequence.app'
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
export class SequenceIndexerClient extends BaseSequenceIndexer {
|
|
8
16
|
constructor(hostname: string, public jwtAuth?: string) {
|
|
9
|
-
super(hostname, fetch)
|
|
17
|
+
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
|
|
10
18
|
this.fetch = this._fetch
|
|
11
19
|
}
|
|
12
20
|
|