@xchainjs/xchain-thornode 0.1.4 → 0.1.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.
package/README.md CHANGED
@@ -28,6 +28,7 @@ Request data from MimirApi
28
28
  console.log(mimirResponse.data)
29
29
 
30
30
  ```
31
+
31
32
  ## Example - set custom header
32
33
 
33
34
  Request data from MimirApi
@@ -49,3 +50,24 @@ Request data from MimirApi
49
50
  ## Documentation
50
51
 
51
52
  [`Thornode NineRelms endpoint`](https://thornode.ninerealms.com/)
53
+
54
+ ### Setting Headers for Nine Realms endpoints
55
+
56
+ If you plan on using the publically accessible endpoints provided by Nine Realms(listed below), ensure that you add a valid 'x-client-id' to all requests
57
+
58
+ - https://midgard.ninerealms.com
59
+ - https://haskoin.ninerealms.com (BTC/BCH/LTC)
60
+ - https://thornode.ninerealms.com
61
+
62
+ Example
63
+
64
+ ```typescript
65
+ import cosmosclient from '@cosmos-client/core'
66
+ import axios from 'axios'
67
+ import { register9Rheader } from '@xchainjs/xchain-util'
68
+
69
+ register9Rheader(axios)
70
+ register9Rheader(cosmosclient.config.globalAxios)
71
+ ```
72
+
73
+ For a complete example please see this [test](https://github.com/xchainjs/xchainjs-lib/blob/master/packages/xchain-thorchain-amm/__e2e__/wallet.e2e.ts)
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from "./configuration";
12
+ import { Configuration } from './configuration';
13
13
  import { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
@@ -50,6 +50,6 @@ export declare class BaseAPI {
50
50
  */
51
51
  export declare class RequiredError extends Error {
52
52
  field: string;
53
- name: "RequiredError";
53
+ name: 'RequiredError';
54
54
  constructor(field: string, msg?: string);
55
55
  }
package/lib/index.esm.js CHANGED
@@ -26,7 +26,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
26
26
  }
27
27
 
28
28
  /* tslint:disable */
29
- const BASE_PATH = "http://localhost".replace(/\/+$/, "");
29
+ const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
30
30
  /**
31
31
  *
32
32
  * @export
@@ -52,7 +52,7 @@ class RequiredError extends Error {
52
52
  constructor(field, msg) {
53
53
  super(msg);
54
54
  this.field = field;
55
- this.name = "RequiredError";
55
+ this.name = 'RequiredError';
56
56
  }
57
57
  }
58
58
 
package/lib/index.js CHANGED
@@ -34,7 +34,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
34
34
  }
35
35
 
36
36
  /* tslint:disable */
37
- const BASE_PATH = "http://localhost".replace(/\/+$/, "");
37
+ const BASE_PATH = 'http://localhost'.replace(/\/+$/, '');
38
38
  /**
39
39
  *
40
40
  * @export
@@ -60,7 +60,7 @@ class RequiredError extends Error {
60
60
  constructor(field, msg) {
61
61
  super(msg);
62
62
  this.field = field;
63
- this.name = "RequiredError";
63
+ this.name = 'RequiredError';
64
64
  }
65
65
  }
66
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thornode",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
5
  "description": "Thornode module that exposes all thornode functions using openapi-generator-cli",
6
6
  "keywords": [
@@ -29,7 +29,7 @@
29
29
  "lint": "eslint \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0",
30
30
  "prepublishOnly": "yarn run build",
31
31
  "test": "jest --passWithNoTests",
32
- "generate:types": "yarn clean:types:thornode && yarn generate:types:thornode && scripts/modifyBaseAPI.sh",
32
+ "generate:types": "yarn clean:types:thornode && yarn generate:types:thornode",
33
33
  "generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://gitlab.com/thorchain/thornode/-/raw/release-1.101.0/openapi/openapi.yaml -g typescript-axios -o ./src/generated/thornodeApi --skip-validate-spec --generate-alias-as-model",
34
34
  "clean:types:thornode": "rimraf ./src/generated/thornodeApi"
35
35
  },
package/CHANGELOG.md DELETED
@@ -1,53 +0,0 @@
1
- # v0.1.4 (2022-12-08)
2
-
3
- ## Update
4
-
5
- - Update to latest THORNode 1.101.0
6
-
7
- # v0.1.3 (2022-12-07)
8
-
9
- ## Update
10
-
11
- - Update to latest THORNode 1.100.0
12
- - support custom headers
13
- - set default 'x-client-id' in all calls
14
-
15
- # v0.1.2 (2022-11-11)
16
-
17
- ## Update
18
-
19
- - Update to latest THORNode 1.99.0
20
-
21
- # v0.1.1 (2022-10-24)
22
-
23
- ## Update
24
-
25
- - Update to latest THORNode 1.98.0
26
-
27
- # v0.0.1.0 (2022-10-04)
28
-
29
- ## Update
30
-
31
- - Update to latest THORNode 1.97.2
32
-
33
- # v0.0.1.0-alpha4 (2022-08-20)
34
-
35
- ## Update
36
-
37
- - Update to latest THORNode 1.95.0
38
- - Generate files from `*.yaml` (to avoid extra step of convertion to `*.json`)
39
- - Remove `yamljs`
40
-
41
- # v0.0.1.0-alpha3 (2022-07-21)
42
-
43
- ???
44
-
45
- # v0.0.1.0-alpha2 (2022-07-7)
46
-
47
- ## Fix
48
-
49
- - Fix `OutboundProcess and ScheduledOutbound` exported interfaces, by preprocessing yaml->json (https://github.com/OpenAPITools/openapi-generator/issues/1593)
50
-
51
- # v0.0.1.0-alpha (2022-07-4)
52
-
53
- ## Module Created