@xchainjs/xchain-thornode 1.1.0 → 1.2.0

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
@@ -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://thornode.ninerealms.com/thorchain/doc"
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
- // THORNODE_API_9R_URL - default exported URL
22
- // import { MimirApi, THORNODE_API_9R_URL, Configuration } from '@xchainjs/xchain-thornode'
21
+ // THORNODE_API_URL - default exported URL
22
+ // import { MimirApi, THORNODE_API_URL, Configuration } from '@xchainjs/xchain-thornode'
23
23
 
24
- const baseUrl = THORNODE_API_9R_URL
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
- // THORNODE_API_9R_URL - default exported URL
38
- // import { MimirApi, THORNODE_API_9R_URL, Configuration } from '@xchainjs/xchain-thornode'
37
+ // THORNODE_API_URL - default exported URL
38
+ // import { MimirApi, THORNODE_API_URL, Configuration } from '@xchainjs/xchain-thornode'
39
39
 
40
- const baseUrl = THORNODE_API_9R_URL
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 NineRelms endpoint`](https://thornode.ninerealms.com/)
52
+ [`Thornode Liquify endpoint`](https://gateway.liquify.com/chain/thorchain_api/)
53
53
 
54
- ### Setting Headers for Nine Realms endpoints
54
+ ### Setting Headers for public endpoints
55
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
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://midgard.ninerealms.com
59
- - https://haskoin.ninerealms.com (BTC/BCH/LTC)
60
- - https://thornode.ninerealms.com
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 THORNODE_API_9R_URL = "https://thornode.ninerealms.com/";
4
+ export declare const THORNODE_API_URL = "https://thornode.thorchain.network/";
5
+ /** @deprecated Use THORNODE_API_URL instead. Will be removed in next major version. */
6
+ export declare const THORNODE_API_9R_URL = "https://thornode.thorchain.network/";
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 3.15.0
5
+ * The version of the OpenAPI document: 3.16.3
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1381,6 +1381,19 @@ export interface LiquidityProviderSummary {
1381
1381
  */
1382
1382
  export interface LiquidityProvidersResponse extends Array<LiquidityProviderSummary> {
1383
1383
  }
1384
+ /**
1385
+ *
1386
+ * @export
1387
+ * @interface LockedSupply
1388
+ */
1389
+ export interface LockedSupply {
1390
+ /**
1391
+ * RUNE locked in the reserve module
1392
+ * @type {number}
1393
+ * @memberof LockedSupply
1394
+ */
1395
+ 'reserve'?: number;
1396
+ }
1384
1397
  /**
1385
1398
  *
1386
1399
  * @export
@@ -3528,6 +3541,31 @@ export interface StreamingSwap {
3528
3541
  */
3529
3542
  export interface StreamingSwapsResponse extends Array<StreamingSwap> {
3530
3543
  }
3544
+ /**
3545
+ *
3546
+ * @export
3547
+ * @interface SupplyResponse
3548
+ */
3549
+ export interface SupplyResponse {
3550
+ /**
3551
+ * circulating RUNE supply
3552
+ * @type {number}
3553
+ * @memberof SupplyResponse
3554
+ */
3555
+ 'circulating': number;
3556
+ /**
3557
+ *
3558
+ * @type {LockedSupply}
3559
+ * @memberof SupplyResponse
3560
+ */
3561
+ 'locked'?: LockedSupply;
3562
+ /**
3563
+ * total RUNE supply
3564
+ * @type {number}
3565
+ * @memberof SupplyResponse
3566
+ */
3567
+ 'total': number;
3568
+ }
3531
3569
  /**
3532
3570
  *
3533
3571
  * @export
@@ -7414,6 +7452,94 @@ export declare class StreamingSwapApi extends BaseAPI {
7414
7452
  */
7415
7453
  streamSwaps(height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<StreamingSwapsResponse, any, {}>>;
7416
7454
  }
7455
+ /**
7456
+ * SupplyApi - axios parameter creator
7457
+ * @export
7458
+ */
7459
+ export declare const SupplyApiAxiosParamCreator: (configuration?: Configuration) => {
7460
+ /**
7461
+ * Returns the RUNE supply breakdown.
7462
+ * @param {number} [height] optional block height, defaults to current tip
7463
+ * @param {*} [options] Override http request option.
7464
+ * @throws {RequiredError}
7465
+ */
7466
+ supply: (height?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
7467
+ /**
7468
+ * Returns a single supply value as plain text for CoinMarketCap integration.
7469
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
7470
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
7471
+ * @param {*} [options] Override http request option.
7472
+ * @throws {RequiredError}
7473
+ */
7474
+ supplyCmc: (type: "circulating" | "total" | "locked" | "staked", asset?: "rune" | "tcy", options?: AxiosRequestConfig) => Promise<RequestArgs>;
7475
+ };
7476
+ /**
7477
+ * SupplyApi - functional programming interface
7478
+ * @export
7479
+ */
7480
+ export declare const SupplyApiFp: (configuration?: Configuration) => {
7481
+ /**
7482
+ * Returns the RUNE supply breakdown.
7483
+ * @param {number} [height] optional block height, defaults to current tip
7484
+ * @param {*} [options] Override http request option.
7485
+ * @throws {RequiredError}
7486
+ */
7487
+ supply(height?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupplyResponse>>;
7488
+ /**
7489
+ * Returns a single supply value as plain text for CoinMarketCap integration.
7490
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
7491
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
7492
+ * @param {*} [options] Override http request option.
7493
+ * @throws {RequiredError}
7494
+ */
7495
+ supplyCmc(type: "circulating" | "total" | "locked" | "staked", asset?: "rune" | "tcy", options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<number>>;
7496
+ };
7497
+ /**
7498
+ * SupplyApi - factory interface
7499
+ * @export
7500
+ */
7501
+ export declare const SupplyApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
7502
+ /**
7503
+ * Returns the RUNE supply breakdown.
7504
+ * @param {number} [height] optional block height, defaults to current tip
7505
+ * @param {*} [options] Override http request option.
7506
+ * @throws {RequiredError}
7507
+ */
7508
+ supply(height?: number, options?: any): AxiosPromise<SupplyResponse>;
7509
+ /**
7510
+ * Returns a single supply value as plain text for CoinMarketCap integration.
7511
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
7512
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
7513
+ * @param {*} [options] Override http request option.
7514
+ * @throws {RequiredError}
7515
+ */
7516
+ supplyCmc(type: "circulating" | "total" | "locked" | "staked", asset?: "rune" | "tcy", options?: any): AxiosPromise<number>;
7517
+ };
7518
+ /**
7519
+ * SupplyApi - object-oriented interface
7520
+ * @export
7521
+ * @class SupplyApi
7522
+ * @extends {BaseAPI}
7523
+ */
7524
+ export declare class SupplyApi extends BaseAPI {
7525
+ /**
7526
+ * Returns the RUNE supply breakdown.
7527
+ * @param {number} [height] optional block height, defaults to current tip
7528
+ * @param {*} [options] Override http request option.
7529
+ * @throws {RequiredError}
7530
+ * @memberof SupplyApi
7531
+ */
7532
+ supply(height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SupplyResponse, any, {}>>;
7533
+ /**
7534
+ * Returns a single supply value as plain text for CoinMarketCap integration.
7535
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
7536
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
7537
+ * @param {*} [options] Override http request option.
7538
+ * @throws {RequiredError}
7539
+ * @memberof SupplyApi
7540
+ */
7541
+ supplyCmc(type: 'circulating' | 'total' | 'locked' | 'staked', asset?: 'rune' | 'tcy', options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<number, any, {}>>;
7542
+ }
7417
7543
  /**
7418
7544
  * SwapApi - axios parameter creator
7419
7545
  * @export
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 3.15.0
5
+ * The version of the OpenAPI document: 3.16.3
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 3.15.0
5
+ * The version of the OpenAPI document: 3.16.3
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 3.15.0
5
+ * The version of the OpenAPI document: 3.16.3
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Thornode API
3
3
  * Thornode REST API.
4
4
  *
5
- * The version of the OpenAPI document: 3.15.0
5
+ * The version of the OpenAPI document: 3.16.3
6
6
  * Contact: devs@thorchain.org
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/lib/index.esm.js CHANGED
@@ -38,7 +38,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
38
38
  * Thornode API
39
39
  * Thornode REST API.
40
40
  *
41
- * The version of the OpenAPI document: 3.15.0
41
+ * The version of the OpenAPI document: 3.16.3
42
42
  * Contact: devs@thorchain.org
43
43
  *
44
44
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -83,7 +83,7 @@ class RequiredError extends Error {
83
83
  * Thornode API
84
84
  * Thornode REST API.
85
85
  *
86
- * The version of the OpenAPI document: 3.15.0
86
+ * The version of the OpenAPI document: 3.16.3
87
87
  * Contact: devs@thorchain.org
88
88
  *
89
89
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -156,7 +156,7 @@ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, confi
156
156
  * Thornode API
157
157
  * Thornode REST API.
158
158
  *
159
- * The version of the OpenAPI document: 3.15.0
159
+ * The version of the OpenAPI document: 3.16.3
160
160
  * Contact: devs@thorchain.org
161
161
  *
162
162
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4881,6 +4881,167 @@ class StreamingSwapApi extends BaseAPI {
4881
4881
  return StreamingSwapApiFp(this.configuration).streamSwaps(height, options).then((request) => request(this.axios, this.basePath));
4882
4882
  }
4883
4883
  }
4884
+ /**
4885
+ * SupplyApi - axios parameter creator
4886
+ * @export
4887
+ */
4888
+ const SupplyApiAxiosParamCreator = function (configuration) {
4889
+ return {
4890
+ /**
4891
+ * Returns the RUNE supply breakdown.
4892
+ * @param {number} [height] optional block height, defaults to current tip
4893
+ * @param {*} [options] Override http request option.
4894
+ * @throws {RequiredError}
4895
+ */
4896
+ supply: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
4897
+ const localVarPath = `/thorchain/supply`;
4898
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4899
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4900
+ let baseOptions;
4901
+ if (configuration) {
4902
+ baseOptions = configuration.baseOptions;
4903
+ }
4904
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4905
+ const localVarHeaderParameter = {};
4906
+ const localVarQueryParameter = {};
4907
+ if (height !== undefined) {
4908
+ localVarQueryParameter['height'] = height;
4909
+ }
4910
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4911
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4912
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4913
+ return {
4914
+ url: toPathString(localVarUrlObj),
4915
+ options: localVarRequestOptions,
4916
+ };
4917
+ }),
4918
+ /**
4919
+ * Returns a single supply value as plain text for CoinMarketCap integration.
4920
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
4921
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
4922
+ * @param {*} [options] Override http request option.
4923
+ * @throws {RequiredError}
4924
+ */
4925
+ supplyCmc: (type_1, asset_1, ...args_1) => __awaiter(this, [type_1, asset_1, ...args_1], void 0, function* (type, asset, options = {}) {
4926
+ // verify required parameter 'type' is not null or undefined
4927
+ assertParamExists('supplyCmc', 'type', type);
4928
+ const localVarPath = `/thorchain/supply/cmc`;
4929
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4930
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4931
+ let baseOptions;
4932
+ if (configuration) {
4933
+ baseOptions = configuration.baseOptions;
4934
+ }
4935
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4936
+ const localVarHeaderParameter = {};
4937
+ const localVarQueryParameter = {};
4938
+ if (asset !== undefined) {
4939
+ localVarQueryParameter['asset'] = asset;
4940
+ }
4941
+ if (type !== undefined) {
4942
+ localVarQueryParameter['type'] = type;
4943
+ }
4944
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4945
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4946
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4947
+ return {
4948
+ url: toPathString(localVarUrlObj),
4949
+ options: localVarRequestOptions,
4950
+ };
4951
+ }),
4952
+ };
4953
+ };
4954
+ /**
4955
+ * SupplyApi - functional programming interface
4956
+ * @export
4957
+ */
4958
+ const SupplyApiFp = function (configuration) {
4959
+ const localVarAxiosParamCreator = SupplyApiAxiosParamCreator(configuration);
4960
+ return {
4961
+ /**
4962
+ * Returns the RUNE supply breakdown.
4963
+ * @param {number} [height] optional block height, defaults to current tip
4964
+ * @param {*} [options] Override http request option.
4965
+ * @throws {RequiredError}
4966
+ */
4967
+ supply(height, options) {
4968
+ return __awaiter(this, void 0, void 0, function* () {
4969
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.supply(height, options);
4970
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4971
+ });
4972
+ },
4973
+ /**
4974
+ * Returns a single supply value as plain text for CoinMarketCap integration.
4975
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
4976
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
4977
+ * @param {*} [options] Override http request option.
4978
+ * @throws {RequiredError}
4979
+ */
4980
+ supplyCmc(type, asset, options) {
4981
+ return __awaiter(this, void 0, void 0, function* () {
4982
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.supplyCmc(type, asset, options);
4983
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4984
+ });
4985
+ },
4986
+ };
4987
+ };
4988
+ /**
4989
+ * SupplyApi - factory interface
4990
+ * @export
4991
+ */
4992
+ const SupplyApiFactory = function (configuration, basePath, axios) {
4993
+ const localVarFp = SupplyApiFp(configuration);
4994
+ return {
4995
+ /**
4996
+ * Returns the RUNE supply breakdown.
4997
+ * @param {number} [height] optional block height, defaults to current tip
4998
+ * @param {*} [options] Override http request option.
4999
+ * @throws {RequiredError}
5000
+ */
5001
+ supply(height, options) {
5002
+ return localVarFp.supply(height, options).then((request) => request(axios, basePath));
5003
+ },
5004
+ /**
5005
+ * Returns a single supply value as plain text for CoinMarketCap integration.
5006
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
5007
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
5008
+ * @param {*} [options] Override http request option.
5009
+ * @throws {RequiredError}
5010
+ */
5011
+ supplyCmc(type, asset, options) {
5012
+ return localVarFp.supplyCmc(type, asset, options).then((request) => request(axios, basePath));
5013
+ },
5014
+ };
5015
+ };
5016
+ /**
5017
+ * SupplyApi - object-oriented interface
5018
+ * @export
5019
+ * @class SupplyApi
5020
+ * @extends {BaseAPI}
5021
+ */
5022
+ class SupplyApi extends BaseAPI {
5023
+ /**
5024
+ * Returns the RUNE supply breakdown.
5025
+ * @param {number} [height] optional block height, defaults to current tip
5026
+ * @param {*} [options] Override http request option.
5027
+ * @throws {RequiredError}
5028
+ * @memberof SupplyApi
5029
+ */
5030
+ supply(height, options) {
5031
+ return SupplyApiFp(this.configuration).supply(height, options).then((request) => request(this.axios, this.basePath));
5032
+ }
5033
+ /**
5034
+ * Returns a single supply value as plain text for CoinMarketCap integration.
5035
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
5036
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
5037
+ * @param {*} [options] Override http request option.
5038
+ * @throws {RequiredError}
5039
+ * @memberof SupplyApi
5040
+ */
5041
+ supplyCmc(type, asset, options) {
5042
+ return SupplyApiFp(this.configuration).supplyCmc(type, asset, options).then((request) => request(this.axios, this.basePath));
5043
+ }
5044
+ }
4884
5045
  /**
4885
5046
  * SwapApi - axios parameter creator
4886
5047
  * @export
@@ -6849,7 +7010,7 @@ class VaultsApi extends BaseAPI {
6849
7010
  * Thornode API
6850
7011
  * Thornode REST API.
6851
7012
  *
6852
- * The version of the OpenAPI document: 3.15.0
7013
+ * The version of the OpenAPI document: 3.16.3
6853
7014
  * Contact: devs@thorchain.org
6854
7015
  *
6855
7016
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6885,6 +7046,8 @@ class Configuration {
6885
7046
  /**
6886
7047
  * The base URL for the THORNode API endpoint.
6887
7048
  */
6888
- const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
7049
+ const THORNODE_API_URL = 'https://thornode.thorchain.network/';
7050
+ /** @deprecated Use THORNODE_API_URL instead. Will be removed in next major version. */
7051
+ const THORNODE_API_9R_URL = THORNODE_API_URL;
6889
7052
 
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 };
7053
+ 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, SupplyApi, SupplyApiAxiosParamCreator, SupplyApiFactory, SupplyApiFp, 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
@@ -44,7 +44,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
44
44
  * Thornode API
45
45
  * Thornode REST API.
46
46
  *
47
- * The version of the OpenAPI document: 3.15.0
47
+ * The version of the OpenAPI document: 3.16.3
48
48
  * Contact: devs@thorchain.org
49
49
  *
50
50
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -89,7 +89,7 @@ class RequiredError extends Error {
89
89
  * Thornode API
90
90
  * Thornode REST API.
91
91
  *
92
- * The version of the OpenAPI document: 3.15.0
92
+ * The version of the OpenAPI document: 3.16.3
93
93
  * Contact: devs@thorchain.org
94
94
  *
95
95
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -162,7 +162,7 @@ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, confi
162
162
  * Thornode API
163
163
  * Thornode REST API.
164
164
  *
165
- * The version of the OpenAPI document: 3.15.0
165
+ * The version of the OpenAPI document: 3.16.3
166
166
  * Contact: devs@thorchain.org
167
167
  *
168
168
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4887,6 +4887,167 @@ class StreamingSwapApi extends BaseAPI {
4887
4887
  return StreamingSwapApiFp(this.configuration).streamSwaps(height, options).then((request) => request(this.axios, this.basePath));
4888
4888
  }
4889
4889
  }
4890
+ /**
4891
+ * SupplyApi - axios parameter creator
4892
+ * @export
4893
+ */
4894
+ const SupplyApiAxiosParamCreator = function (configuration) {
4895
+ return {
4896
+ /**
4897
+ * Returns the RUNE supply breakdown.
4898
+ * @param {number} [height] optional block height, defaults to current tip
4899
+ * @param {*} [options] Override http request option.
4900
+ * @throws {RequiredError}
4901
+ */
4902
+ supply: (height_1, ...args_1) => __awaiter(this, [height_1, ...args_1], void 0, function* (height, options = {}) {
4903
+ const localVarPath = `/thorchain/supply`;
4904
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4905
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4906
+ let baseOptions;
4907
+ if (configuration) {
4908
+ baseOptions = configuration.baseOptions;
4909
+ }
4910
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4911
+ const localVarHeaderParameter = {};
4912
+ const localVarQueryParameter = {};
4913
+ if (height !== undefined) {
4914
+ localVarQueryParameter['height'] = height;
4915
+ }
4916
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4917
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4918
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4919
+ return {
4920
+ url: toPathString(localVarUrlObj),
4921
+ options: localVarRequestOptions,
4922
+ };
4923
+ }),
4924
+ /**
4925
+ * Returns a single supply value as plain text for CoinMarketCap integration.
4926
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
4927
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
4928
+ * @param {*} [options] Override http request option.
4929
+ * @throws {RequiredError}
4930
+ */
4931
+ supplyCmc: (type_1, asset_1, ...args_1) => __awaiter(this, [type_1, asset_1, ...args_1], void 0, function* (type, asset, options = {}) {
4932
+ // verify required parameter 'type' is not null or undefined
4933
+ assertParamExists('supplyCmc', 'type', type);
4934
+ const localVarPath = `/thorchain/supply/cmc`;
4935
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4936
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4937
+ let baseOptions;
4938
+ if (configuration) {
4939
+ baseOptions = configuration.baseOptions;
4940
+ }
4941
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4942
+ const localVarHeaderParameter = {};
4943
+ const localVarQueryParameter = {};
4944
+ if (asset !== undefined) {
4945
+ localVarQueryParameter['asset'] = asset;
4946
+ }
4947
+ if (type !== undefined) {
4948
+ localVarQueryParameter['type'] = type;
4949
+ }
4950
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4951
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4952
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4953
+ return {
4954
+ url: toPathString(localVarUrlObj),
4955
+ options: localVarRequestOptions,
4956
+ };
4957
+ }),
4958
+ };
4959
+ };
4960
+ /**
4961
+ * SupplyApi - functional programming interface
4962
+ * @export
4963
+ */
4964
+ const SupplyApiFp = function (configuration) {
4965
+ const localVarAxiosParamCreator = SupplyApiAxiosParamCreator(configuration);
4966
+ return {
4967
+ /**
4968
+ * Returns the RUNE supply breakdown.
4969
+ * @param {number} [height] optional block height, defaults to current tip
4970
+ * @param {*} [options] Override http request option.
4971
+ * @throws {RequiredError}
4972
+ */
4973
+ supply(height, options) {
4974
+ return __awaiter(this, void 0, void 0, function* () {
4975
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.supply(height, options);
4976
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default.default, BASE_PATH, configuration);
4977
+ });
4978
+ },
4979
+ /**
4980
+ * Returns a single supply value as plain text for CoinMarketCap integration.
4981
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
4982
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
4983
+ * @param {*} [options] Override http request option.
4984
+ * @throws {RequiredError}
4985
+ */
4986
+ supplyCmc(type, asset, options) {
4987
+ return __awaiter(this, void 0, void 0, function* () {
4988
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.supplyCmc(type, asset, options);
4989
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default.default, BASE_PATH, configuration);
4990
+ });
4991
+ },
4992
+ };
4993
+ };
4994
+ /**
4995
+ * SupplyApi - factory interface
4996
+ * @export
4997
+ */
4998
+ const SupplyApiFactory = function (configuration, basePath, axios) {
4999
+ const localVarFp = SupplyApiFp(configuration);
5000
+ return {
5001
+ /**
5002
+ * Returns the RUNE supply breakdown.
5003
+ * @param {number} [height] optional block height, defaults to current tip
5004
+ * @param {*} [options] Override http request option.
5005
+ * @throws {RequiredError}
5006
+ */
5007
+ supply(height, options) {
5008
+ return localVarFp.supply(height, options).then((request) => request(axios, basePath));
5009
+ },
5010
+ /**
5011
+ * Returns a single supply value as plain text for CoinMarketCap integration.
5012
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
5013
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
5014
+ * @param {*} [options] Override http request option.
5015
+ * @throws {RequiredError}
5016
+ */
5017
+ supplyCmc(type, asset, options) {
5018
+ return localVarFp.supplyCmc(type, asset, options).then((request) => request(axios, basePath));
5019
+ },
5020
+ };
5021
+ };
5022
+ /**
5023
+ * SupplyApi - object-oriented interface
5024
+ * @export
5025
+ * @class SupplyApi
5026
+ * @extends {BaseAPI}
5027
+ */
5028
+ class SupplyApi extends BaseAPI {
5029
+ /**
5030
+ * Returns the RUNE supply breakdown.
5031
+ * @param {number} [height] optional block height, defaults to current tip
5032
+ * @param {*} [options] Override http request option.
5033
+ * @throws {RequiredError}
5034
+ * @memberof SupplyApi
5035
+ */
5036
+ supply(height, options) {
5037
+ return SupplyApiFp(this.configuration).supply(height, options).then((request) => request(this.axios, this.basePath));
5038
+ }
5039
+ /**
5040
+ * Returns a single supply value as plain text for CoinMarketCap integration.
5041
+ * @param {'circulating' | 'total' | 'locked' | 'staked'} type The type of supply value to return.
5042
+ * @param {'rune' | 'tcy'} [asset] The asset to query supply for (default rune).
5043
+ * @param {*} [options] Override http request option.
5044
+ * @throws {RequiredError}
5045
+ * @memberof SupplyApi
5046
+ */
5047
+ supplyCmc(type, asset, options) {
5048
+ return SupplyApiFp(this.configuration).supplyCmc(type, asset, options).then((request) => request(this.axios, this.basePath));
5049
+ }
5050
+ }
4890
5051
  /**
4891
5052
  * SwapApi - axios parameter creator
4892
5053
  * @export
@@ -6855,7 +7016,7 @@ class VaultsApi extends BaseAPI {
6855
7016
  * Thornode API
6856
7017
  * Thornode REST API.
6857
7018
  *
6858
- * The version of the OpenAPI document: 3.15.0
7019
+ * The version of the OpenAPI document: 3.16.3
6859
7020
  * Contact: devs@thorchain.org
6860
7021
  *
6861
7022
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6891,7 +7052,9 @@ class Configuration {
6891
7052
  /**
6892
7053
  * The base URL for the THORNode API endpoint.
6893
7054
  */
6894
- const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
7055
+ const THORNODE_API_URL = 'https://thornode.thorchain.network/';
7056
+ /** @deprecated Use THORNODE_API_URL instead. Will be removed in next major version. */
7057
+ const THORNODE_API_9R_URL = THORNODE_API_URL;
6895
7058
 
6896
7059
  exports.AuthApi = AuthApi;
6897
7060
  exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
@@ -6992,6 +7155,10 @@ exports.StreamingSwapApi = StreamingSwapApi;
6992
7155
  exports.StreamingSwapApiAxiosParamCreator = StreamingSwapApiAxiosParamCreator;
6993
7156
  exports.StreamingSwapApiFactory = StreamingSwapApiFactory;
6994
7157
  exports.StreamingSwapApiFp = StreamingSwapApiFp;
7158
+ exports.SupplyApi = SupplyApi;
7159
+ exports.SupplyApiAxiosParamCreator = SupplyApiAxiosParamCreator;
7160
+ exports.SupplyApiFactory = SupplyApiFactory;
7161
+ exports.SupplyApiFp = SupplyApiFp;
6995
7162
  exports.SwapApi = SwapApi;
6996
7163
  exports.SwapApiAxiosParamCreator = SwapApiAxiosParamCreator;
6997
7164
  exports.SwapApiFactory = SwapApiFactory;
@@ -7005,6 +7172,7 @@ exports.TCYStakersApiAxiosParamCreator = TCYStakersApiAxiosParamCreator;
7005
7172
  exports.TCYStakersApiFactory = TCYStakersApiFactory;
7006
7173
  exports.TCYStakersApiFp = TCYStakersApiFp;
7007
7174
  exports.THORNODE_API_9R_URL = THORNODE_API_9R_URL;
7175
+ exports.THORNODE_API_URL = THORNODE_API_URL;
7008
7176
  exports.TSSApi = TSSApi;
7009
7177
  exports.TSSApiAxiosParamCreator = TSSApiAxiosParamCreator;
7010
7178
  exports.TSSApiFactory = TSSApiFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thornode",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
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://thornode.ninerealms.com/thorchain/doc/openapi.yaml -g typescript-axios -o ./src/generated/thornodeApi --skip-validate-spec --generate-alias-as-model",
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.13.5"
37
+ "axios": "1.15.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@openapitools/openapi-generator-cli": "^2.20.2",