@xchainjs/xchain-thornode 1.1.0 → 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/index.esm.js +4 -2
- package/lib/index.js +4 -1
- 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/";
|
package/lib/index.esm.js
CHANGED
|
@@ -6885,6 +6885,8 @@ class Configuration {
|
|
|
6885
6885
|
/**
|
|
6886
6886
|
* The base URL for the THORNode API endpoint.
|
|
6887
6887
|
*/
|
|
6888
|
-
const
|
|
6888
|
+
const THORNODE_API_URL = 'https://gateway.liquify.com/chain/thorchain_api/';
|
|
6889
|
+
/** @deprecated Use THORNODE_API_URL instead. Will be removed in next major version. */
|
|
6890
|
+
const THORNODE_API_9R_URL = THORNODE_API_URL;
|
|
6889
6891
|
|
|
6890
|
-
export { AuthApi, AuthApiAxiosParamCreator, AuthApiFactory, AuthApiFp, BankApi, BankApiAxiosParamCreator, BankApiFactory, BankApiFp, BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp, CloutApi, CloutApiAxiosParamCreator, CloutApiFactory, CloutApiFp, CodesApi, CodesApiAxiosParamCreator, CodesApiFactory, CodesApiFp, Configuration, ExportApi, ExportApiAxiosParamCreator, ExportApiFactory, ExportApiFp, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, LimitOrderApi, LimitOrderApiAxiosParamCreator, LimitOrderApiFactory, LimitOrderApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, OracleApi, OracleApiAxiosParamCreator, OracleApiFactory, OracleApiFp, PoolSlipApi, PoolSlipApiAxiosParamCreator, PoolSlipApiFactory, PoolSlipApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, RUNEPoolApi, RUNEPoolApiAxiosParamCreator, RUNEPoolApiFactory, RUNEPoolApiFp, ReferenceMemosApi, ReferenceMemosApiAxiosParamCreator, ReferenceMemosApiFactory, ReferenceMemosApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, SecuredAssetApi, SecuredAssetApiAxiosParamCreator, SecuredAssetApiFactory, SecuredAssetApiFp, SecuredAssetsApi, SecuredAssetsApiAxiosParamCreator, SecuredAssetsApiFactory, SecuredAssetsApiFp, StreamingSwapApi, StreamingSwapApiAxiosParamCreator, StreamingSwapApiFactory, StreamingSwapApiFp, SwapApi, SwapApiAxiosParamCreator, SwapApiFactory, SwapApiFp, TCYClaimersApi, TCYClaimersApiAxiosParamCreator, TCYClaimersApiFactory, TCYClaimersApiFp, TCYStakersApi, TCYStakersApiAxiosParamCreator, TCYStakersApiFactory, TCYStakersApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TradeAccountApi, TradeAccountApiAxiosParamCreator, TradeAccountApiFactory, TradeAccountApiFp, TradeAccountsApi, TradeAccountsApiAxiosParamCreator, TradeAccountsApiFactory, TradeAccountsApiFp, TradeUnitApi, TradeUnitApiAxiosParamCreator, TradeUnitApiFactory, TradeUnitApiFp, TradeUnitsApi, TradeUnitsApiAxiosParamCreator, TradeUnitsApiFactory, TradeUnitsApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, UpgradeVoteVoteEnum, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp, YggdrasilVaultTypeEnum };
|
|
6892
|
+
export { AuthApi, AuthApiAxiosParamCreator, AuthApiFactory, AuthApiFp, BankApi, BankApiAxiosParamCreator, BankApiFactory, BankApiFp, BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp, CloutApi, CloutApiAxiosParamCreator, CloutApiFactory, CloutApiFp, CodesApi, CodesApiAxiosParamCreator, CodesApiFactory, CodesApiFp, Configuration, ExportApi, ExportApiAxiosParamCreator, ExportApiFactory, ExportApiFp, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, LimitOrderApi, LimitOrderApiAxiosParamCreator, LimitOrderApiFactory, LimitOrderApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, OracleApi, OracleApiAxiosParamCreator, OracleApiFactory, OracleApiFp, PoolSlipApi, PoolSlipApiAxiosParamCreator, PoolSlipApiFactory, PoolSlipApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, RUNEPoolApi, RUNEPoolApiAxiosParamCreator, RUNEPoolApiFactory, RUNEPoolApiFp, ReferenceMemosApi, ReferenceMemosApiAxiosParamCreator, ReferenceMemosApiFactory, ReferenceMemosApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, SecuredAssetApi, SecuredAssetApiAxiosParamCreator, SecuredAssetApiFactory, SecuredAssetApiFp, SecuredAssetsApi, SecuredAssetsApiAxiosParamCreator, SecuredAssetsApiFactory, SecuredAssetsApiFp, StreamingSwapApi, StreamingSwapApiAxiosParamCreator, StreamingSwapApiFactory, StreamingSwapApiFp, SwapApi, SwapApiAxiosParamCreator, SwapApiFactory, SwapApiFp, TCYClaimersApi, TCYClaimersApiAxiosParamCreator, TCYClaimersApiFactory, TCYClaimersApiFp, TCYStakersApi, TCYStakersApiAxiosParamCreator, TCYStakersApiFactory, TCYStakersApiFp, THORNODE_API_9R_URL, THORNODE_API_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TradeAccountApi, TradeAccountApiAxiosParamCreator, TradeAccountApiFactory, TradeAccountApiFp, TradeAccountsApi, TradeAccountsApiAxiosParamCreator, TradeAccountsApiFactory, TradeAccountsApiFp, TradeUnitApi, TradeUnitApiAxiosParamCreator, TradeUnitApiFactory, TradeUnitApiFp, TradeUnitsApi, TradeUnitsApiAxiosParamCreator, TradeUnitsApiFactory, TradeUnitsApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, UpgradeVoteVoteEnum, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp, YggdrasilVaultTypeEnum };
|
package/lib/index.js
CHANGED
|
@@ -6891,7 +6891,9 @@ class Configuration {
|
|
|
6891
6891
|
/**
|
|
6892
6892
|
* The base URL for the THORNode API endpoint.
|
|
6893
6893
|
*/
|
|
6894
|
-
const
|
|
6894
|
+
const THORNODE_API_URL = 'https://gateway.liquify.com/chain/thorchain_api/';
|
|
6895
|
+
/** @deprecated Use THORNODE_API_URL instead. Will be removed in next major version. */
|
|
6896
|
+
const THORNODE_API_9R_URL = THORNODE_API_URL;
|
|
6895
6897
|
|
|
6896
6898
|
exports.AuthApi = AuthApi;
|
|
6897
6899
|
exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
|
|
@@ -7005,6 +7007,7 @@ exports.TCYStakersApiAxiosParamCreator = TCYStakersApiAxiosParamCreator;
|
|
|
7005
7007
|
exports.TCYStakersApiFactory = TCYStakersApiFactory;
|
|
7006
7008
|
exports.TCYStakersApiFp = TCYStakersApiFp;
|
|
7007
7009
|
exports.THORNODE_API_9R_URL = THORNODE_API_9R_URL;
|
|
7010
|
+
exports.THORNODE_API_URL = THORNODE_API_URL;
|
|
7008
7011
|
exports.TSSApi = TSSApi;
|
|
7009
7012
|
exports.TSSApiAxiosParamCreator = TSSApiAxiosParamCreator;
|
|
7010
7013
|
exports.TSSApiFactory = TSSApiFactory;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thornode",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Thornode module that exposes all thornode functions using openapi-generator-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"lint": "eslint --config ../../eslint.config.mjs \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0",
|
|
31
31
|
"test": "jest --passWithNoTests",
|
|
32
32
|
"generate:types": "yarn clean:types:thornode && yarn generate:types:thornode",
|
|
33
|
-
"generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://
|
|
33
|
+
"generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://gateway.liquify.com/chain/thorchain_api/thorchain/doc/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
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"axios": "1.
|
|
37
|
+
"axios": "1.15.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@openapitools/openapi-generator-cli": "^2.20.2",
|