@xchainjs/xchain-thornode 1.0.6 → 1.1.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.
- package/README.md +13 -13
- package/lib/config.d.ts +3 -1
- package/lib/generated/thornodeApi/api.d.ts +1147 -545
- package/lib/generated/thornodeApi/base.d.ts +1 -1
- package/lib/generated/thornodeApi/common.d.ts +1 -1
- package/lib/generated/thornodeApi/configuration.d.ts +1 -1
- package/lib/generated/thornodeApi/index.d.ts +1 -1
- package/lib/index.esm.js +997 -529
- package/lib/index.js +1017 -532
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Thornode Module for XChainJS Clients
|
|
|
5
5
|
## Modules
|
|
6
6
|
|
|
7
7
|
Thornode module has been created using openapi-generator-cli to auto-generate rest api reading from "https://gitlab.com/thorchain/thornode/-/raw/release-{version}/openapi/openapi.yaml"
|
|
8
|
-
This library exposes all the Api's outlined in the swagger doc "https://
|
|
8
|
+
This library exposes all the Api's outlined in the swagger doc "https://gateway.liquify.com/chain/thorchain_api/thorchain/doc"
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -18,10 +18,10 @@ yarn add @xchainjs/xchain-thornode
|
|
|
18
18
|
Request data from MimirApi
|
|
19
19
|
|
|
20
20
|
```
|
|
21
|
-
//
|
|
22
|
-
// import { MimirApi,
|
|
21
|
+
// THORNODE_API_URL - default exported URL
|
|
22
|
+
// import { MimirApi, THORNODE_API_URL, Configuration } from '@xchainjs/xchain-thornode'
|
|
23
23
|
|
|
24
|
-
const baseUrl =
|
|
24
|
+
const baseUrl = THORNODE_API_URL
|
|
25
25
|
const apiconfig = new Configuration({ basePath: baseUrl })
|
|
26
26
|
const mimirApi = new MimirApi(apiconfig)
|
|
27
27
|
const mimirResponse = await mimirApi.mimir()
|
|
@@ -34,10 +34,10 @@ Request data from MimirApi
|
|
|
34
34
|
Request data from MimirApi
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
-
//
|
|
38
|
-
// import { MimirApi,
|
|
37
|
+
// THORNODE_API_URL - default exported URL
|
|
38
|
+
// import { MimirApi, THORNODE_API_URL, Configuration } from '@xchainjs/xchain-thornode'
|
|
39
39
|
|
|
40
|
-
const baseUrl =
|
|
40
|
+
const baseUrl = THORNODE_API_URL
|
|
41
41
|
const headers = {"x-client-id": "my-custom-val"}
|
|
42
42
|
const baseOptions = { headers }
|
|
43
43
|
const apiconfig = new Configuration({ basePath: baseUrl , baseOptions })
|
|
@@ -49,15 +49,15 @@ Request data from MimirApi
|
|
|
49
49
|
|
|
50
50
|
## Documentation
|
|
51
51
|
|
|
52
|
-
[`Thornode
|
|
52
|
+
[`Thornode Liquify endpoint`](https://gateway.liquify.com/chain/thorchain_api/)
|
|
53
53
|
|
|
54
|
-
### Setting Headers for
|
|
54
|
+
### Setting Headers for public endpoints
|
|
55
55
|
|
|
56
|
-
If you plan on using the
|
|
56
|
+
If you plan on using the publicly accessible endpoints listed below, ensure that you add a valid 'x-client-id' to all requests
|
|
57
57
|
|
|
58
|
-
- https://
|
|
59
|
-
- https://haskoin.
|
|
60
|
-
- https://
|
|
58
|
+
- https://gateway.liquify.com/chain/thorchain_midgard
|
|
59
|
+
- https://api.haskoin.com (BTC/BCH/LTC)
|
|
60
|
+
- https://gateway.liquify.com/chain/thorchain_api
|
|
61
61
|
|
|
62
62
|
Example
|
|
63
63
|
|
package/lib/config.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The base URL for the THORNode API endpoint.
|
|
3
3
|
*/
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const THORNODE_API_URL = "https://gateway.liquify.com/chain/thorchain_api/";
|
|
5
|
+
/** @deprecated Use THORNODE_API_URL instead. Will be removed in next major version. */
|
|
6
|
+
export declare const THORNODE_API_9R_URL = "https://gateway.liquify.com/chain/thorchain_api/";
|