@0xsequence/indexer 1.2.7 → 1.2.8
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.
|
@@ -270,13 +270,13 @@ class SequenceIndexerClient extends Indexer {
|
|
|
270
270
|
const headers = {};
|
|
271
271
|
const {
|
|
272
272
|
jwtAuth,
|
|
273
|
-
|
|
273
|
+
accessKey
|
|
274
274
|
} = this.authorization || {};
|
|
275
275
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
276
276
|
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
277
277
|
}
|
|
278
|
-
if (
|
|
279
|
-
headers['X-
|
|
278
|
+
if (accessKey && accessKey.length > 0) {
|
|
279
|
+
headers['X-Access-Key'] = `${accessKey}`;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
// before the request is made
|
|
@@ -270,13 +270,13 @@ class SequenceIndexerClient extends Indexer {
|
|
|
270
270
|
const headers = {};
|
|
271
271
|
const {
|
|
272
272
|
jwtAuth,
|
|
273
|
-
|
|
273
|
+
accessKey
|
|
274
274
|
} = this.authorization || {};
|
|
275
275
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
276
276
|
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
277
277
|
}
|
|
278
|
-
if (
|
|
279
|
-
headers['X-
|
|
278
|
+
if (accessKey && accessKey.length > 0) {
|
|
279
|
+
headers['X-Access-Key'] = `${accessKey}`;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
// before the request is made
|
|
@@ -266,13 +266,13 @@ class SequenceIndexerClient extends Indexer {
|
|
|
266
266
|
const headers = {};
|
|
267
267
|
const {
|
|
268
268
|
jwtAuth,
|
|
269
|
-
|
|
269
|
+
accessKey
|
|
270
270
|
} = this.authorization || {};
|
|
271
271
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
272
272
|
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
273
273
|
}
|
|
274
|
-
if (
|
|
275
|
-
headers['X-
|
|
274
|
+
if (accessKey && accessKey.length > 0) {
|
|
275
|
+
headers['X-Access-Key'] = `${accessKey}`;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
// before the request is made
|
|
@@ -17,11 +17,11 @@ export declare enum SequenceIndexerServices {
|
|
|
17
17
|
export declare class SequenceIndexerClient extends IndexerRpc {
|
|
18
18
|
authorization?: {
|
|
19
19
|
jwtAuth?: string | undefined;
|
|
20
|
-
|
|
20
|
+
accessKey?: string | undefined;
|
|
21
21
|
} | undefined;
|
|
22
22
|
constructor(hostname: string, authorization?: {
|
|
23
23
|
jwtAuth?: string | undefined;
|
|
24
|
-
|
|
24
|
+
accessKey?: string | undefined;
|
|
25
25
|
} | undefined);
|
|
26
26
|
_fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
27
27
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -31,7 +31,7 @@ export class SequenceIndexerClient extends IndexerRpc {
|
|
|
31
31
|
hostname: string,
|
|
32
32
|
public authorization?: {
|
|
33
33
|
jwtAuth?: string
|
|
34
|
-
|
|
34
|
+
accessKey?: string
|
|
35
35
|
}
|
|
36
36
|
) {
|
|
37
37
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
|
|
@@ -43,14 +43,14 @@ export class SequenceIndexerClient extends IndexerRpc {
|
|
|
43
43
|
// if its been set on the api client
|
|
44
44
|
const headers: { [key: string]: any } = {}
|
|
45
45
|
|
|
46
|
-
const {jwtAuth,
|
|
46
|
+
const { jwtAuth, accessKey } = this.authorization || {}
|
|
47
47
|
|
|
48
48
|
if (jwtAuth && jwtAuth.length > 0) {
|
|
49
49
|
headers['Authorization'] = `BEARER ${jwtAuth}`
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
if (
|
|
53
|
-
headers['X-
|
|
52
|
+
if (accessKey && accessKey.length > 0) {
|
|
53
|
+
headers['X-Access-Key'] = `${accessKey}`
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// before the request is made
|