@0xsequence/api 1.2.7 → 1.2.9

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.
@@ -608,13 +608,13 @@ class SequenceAPIClient extends API {
608
608
  const headers = {};
609
609
  const {
610
610
  jwtAuth,
611
- tokenKey
611
+ accessKey
612
612
  } = this.authorization || {};
613
613
  if (jwtAuth && jwtAuth.length > 0) {
614
614
  headers['Authorization'] = `BEARER ${jwtAuth}`;
615
615
  }
616
- if (tokenKey && tokenKey.length > 0) {
617
- headers['X-Sequence-Token-Key'] = `${tokenKey}`;
616
+ if (accessKey && accessKey.length > 0) {
617
+ headers['X-Access-Key'] = `${accessKey}`;
618
618
  }
619
619
 
620
620
  // before the request is made
@@ -608,13 +608,13 @@ class SequenceAPIClient extends API {
608
608
  const headers = {};
609
609
  const {
610
610
  jwtAuth,
611
- tokenKey
611
+ accessKey
612
612
  } = this.authorization || {};
613
613
  if (jwtAuth && jwtAuth.length > 0) {
614
614
  headers['Authorization'] = `BEARER ${jwtAuth}`;
615
615
  }
616
- if (tokenKey && tokenKey.length > 0) {
617
- headers['X-Sequence-Token-Key'] = `${tokenKey}`;
616
+ if (accessKey && accessKey.length > 0) {
617
+ headers['X-Access-Key'] = `${accessKey}`;
618
618
  }
619
619
 
620
620
  // before the request is made
@@ -604,13 +604,13 @@ class SequenceAPIClient extends API {
604
604
  const headers = {};
605
605
  const {
606
606
  jwtAuth,
607
- tokenKey
607
+ accessKey
608
608
  } = this.authorization || {};
609
609
  if (jwtAuth && jwtAuth.length > 0) {
610
610
  headers['Authorization'] = `BEARER ${jwtAuth}`;
611
611
  }
612
- if (tokenKey && tokenKey.length > 0) {
613
- headers['X-Sequence-Token-Key'] = `${tokenKey}`;
612
+ if (accessKey && accessKey.length > 0) {
613
+ headers['X-Access-Key'] = `${accessKey}`;
614
614
  }
615
615
 
616
616
  // before the request is made
@@ -3,11 +3,11 @@ import { API as ApiRpc } from "./api.gen.js";
3
3
  export declare class SequenceAPIClient extends ApiRpc {
4
4
  authorization?: {
5
5
  jwtAuth?: string | undefined;
6
- tokenKey?: string | undefined;
6
+ accessKey?: string | undefined;
7
7
  } | undefined;
8
8
  constructor(hostname: string, authorization?: {
9
9
  jwtAuth?: string | undefined;
10
- tokenKey?: string | undefined;
10
+ accessKey?: string | undefined;
11
11
  } | undefined);
12
12
  _fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "api sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ export class SequenceAPIClient extends ApiRpc {
9
9
  hostname: string,
10
10
  public authorization?: {
11
11
  jwtAuth?: string
12
- tokenKey?: string
12
+ accessKey?: string
13
13
  }
14
14
  ) {
15
15
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
@@ -20,15 +20,15 @@ export class SequenceAPIClient extends ApiRpc {
20
20
  // automatically include jwt auth header to requests
21
21
  // if its been set on the api client
22
22
  const headers: { [key: string]: any } = {}
23
-
24
- const {jwtAuth, tokenKey} = this.authorization || {}
23
+
24
+ const { jwtAuth, accessKey } = this.authorization || {}
25
25
 
26
26
  if (jwtAuth && jwtAuth.length > 0) {
27
27
  headers['Authorization'] = `BEARER ${jwtAuth}`
28
28
  }
29
29
 
30
- if (tokenKey && tokenKey.length > 0) {
31
- headers['X-Sequence-Token-Key'] = `${tokenKey}`
30
+ if (accessKey && accessKey.length > 0) {
31
+ headers['X-Access-Key'] = `${accessKey}`
32
32
  }
33
33
 
34
34
  // before the request is made