@xchainjs/xchain-thornode 0.3.15 → 0.3.16

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/lib/index.js CHANGED
@@ -140,6 +140,10 @@ const VaultTypeEnum = {
140
140
  AsgardVault: 'AsgardVault',
141
141
  YggdrasilVault: 'YggdrasilVault'
142
142
  };
143
+ const YggdrasilVaultTypeEnum = {
144
+ AsgardVault: 'AsgardVault',
145
+ YggdrasilVault: 'YggdrasilVault'
146
+ };
143
147
  /**
144
148
  * BlockApi - axios parameter creator
145
149
  * @export
@@ -1567,6 +1571,66 @@ const NetworkApiAxiosParamCreator = function (configuration) {
1567
1571
  options: localVarRequestOptions,
1568
1572
  };
1569
1573
  }),
1574
+ /**
1575
+ * Returns the outbound fee information for the provided asset.
1576
+ * @param {string} asset
1577
+ * @param {number} [height] optional block height, defaults to current tip
1578
+ * @param {*} [options] Override http request option.
1579
+ * @throws {RequiredError}
1580
+ */
1581
+ outboundFeeAsset: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
1582
+ // verify required parameter 'asset' is not null or undefined
1583
+ assertParamExists('outboundFeeAsset', 'asset', asset);
1584
+ const localVarPath = `/thorchain/outbound_fee/{asset}`
1585
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
1586
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1587
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1588
+ let baseOptions;
1589
+ if (configuration) {
1590
+ baseOptions = configuration.baseOptions;
1591
+ }
1592
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1593
+ const localVarHeaderParameter = {};
1594
+ const localVarQueryParameter = {};
1595
+ if (height !== undefined) {
1596
+ localVarQueryParameter['height'] = height;
1597
+ }
1598
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1599
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1600
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1601
+ return {
1602
+ url: toPathString(localVarUrlObj),
1603
+ options: localVarRequestOptions,
1604
+ };
1605
+ }),
1606
+ /**
1607
+ * Returns the last block information for all chains.
1608
+ * @param {number} [height] optional block height, defaults to current tip
1609
+ * @param {*} [options] Override http request option.
1610
+ * @throws {RequiredError}
1611
+ */
1612
+ outboundFees: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
1613
+ const localVarPath = `/thorchain/outbound_fees`;
1614
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1615
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1616
+ let baseOptions;
1617
+ if (configuration) {
1618
+ baseOptions = configuration.baseOptions;
1619
+ }
1620
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1621
+ const localVarHeaderParameter = {};
1622
+ const localVarQueryParameter = {};
1623
+ if (height !== undefined) {
1624
+ localVarQueryParameter['height'] = height;
1625
+ }
1626
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1627
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1628
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1629
+ return {
1630
+ url: toPathString(localVarUrlObj),
1631
+ options: localVarRequestOptions,
1632
+ };
1633
+ }),
1570
1634
  /**
1571
1635
  * Returns a boolean indicating whether the chain is in ragnarok.
1572
1636
  * @param {number} [height] optional block height, defaults to current tip
@@ -1706,6 +1770,31 @@ const NetworkApiFp = function (configuration) {
1706
1770
  return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
1707
1771
  });
1708
1772
  },
1773
+ /**
1774
+ * Returns the outbound fee information for the provided asset.
1775
+ * @param {string} asset
1776
+ * @param {number} [height] optional block height, defaults to current tip
1777
+ * @param {*} [options] Override http request option.
1778
+ * @throws {RequiredError}
1779
+ */
1780
+ outboundFeeAsset(asset, height, options) {
1781
+ return __awaiter(this, void 0, void 0, function* () {
1782
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.outboundFeeAsset(asset, height, options);
1783
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
1784
+ });
1785
+ },
1786
+ /**
1787
+ * Returns the last block information for all chains.
1788
+ * @param {number} [height] optional block height, defaults to current tip
1789
+ * @param {*} [options] Override http request option.
1790
+ * @throws {RequiredError}
1791
+ */
1792
+ outboundFees(height, options) {
1793
+ return __awaiter(this, void 0, void 0, function* () {
1794
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.outboundFees(height, options);
1795
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
1796
+ });
1797
+ },
1709
1798
  /**
1710
1799
  * Returns a boolean indicating whether the chain is in ragnarok.
1711
1800
  * @param {number} [height] optional block height, defaults to current tip
@@ -1795,6 +1884,25 @@ const NetworkApiFactory = function (configuration, basePath, axios) {
1795
1884
  network(height, options) {
1796
1885
  return localVarFp.network(height, options).then((request) => request(axios, basePath));
1797
1886
  },
1887
+ /**
1888
+ * Returns the outbound fee information for the provided asset.
1889
+ * @param {string} asset
1890
+ * @param {number} [height] optional block height, defaults to current tip
1891
+ * @param {*} [options] Override http request option.
1892
+ * @throws {RequiredError}
1893
+ */
1894
+ outboundFeeAsset(asset, height, options) {
1895
+ return localVarFp.outboundFeeAsset(asset, height, options).then((request) => request(axios, basePath));
1896
+ },
1897
+ /**
1898
+ * Returns the last block information for all chains.
1899
+ * @param {number} [height] optional block height, defaults to current tip
1900
+ * @param {*} [options] Override http request option.
1901
+ * @throws {RequiredError}
1902
+ */
1903
+ outboundFees(height, options) {
1904
+ return localVarFp.outboundFees(height, options).then((request) => request(axios, basePath));
1905
+ },
1798
1906
  /**
1799
1907
  * Returns a boolean indicating whether the chain is in ragnarok.
1800
1908
  * @param {number} [height] optional block height, defaults to current tip
@@ -1884,6 +1992,27 @@ class NetworkApi extends BaseAPI {
1884
1992
  network(height, options) {
1885
1993
  return NetworkApiFp(this.configuration).network(height, options).then((request) => request(this.axios, this.basePath));
1886
1994
  }
1995
+ /**
1996
+ * Returns the outbound fee information for the provided asset.
1997
+ * @param {string} asset
1998
+ * @param {number} [height] optional block height, defaults to current tip
1999
+ * @param {*} [options] Override http request option.
2000
+ * @throws {RequiredError}
2001
+ * @memberof NetworkApi
2002
+ */
2003
+ outboundFeeAsset(asset, height, options) {
2004
+ return NetworkApiFp(this.configuration).outboundFeeAsset(asset, height, options).then((request) => request(this.axios, this.basePath));
2005
+ }
2006
+ /**
2007
+ * Returns the last block information for all chains.
2008
+ * @param {number} [height] optional block height, defaults to current tip
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ * @memberof NetworkApi
2012
+ */
2013
+ outboundFees(height, options) {
2014
+ return NetworkApiFp(this.configuration).outboundFees(height, options).then((request) => request(this.axios, this.basePath));
2015
+ }
1887
2016
  /**
1888
2017
  * Returns a boolean indicating whether the chain is in ragnarok.
1889
2018
  * @param {number} [height] optional block height, defaults to current tip
@@ -2157,6 +2286,165 @@ class POLApi extends BaseAPI {
2157
2286
  return POLApiFp(this.configuration).pol(height, options).then((request) => request(this.axios, this.basePath));
2158
2287
  }
2159
2288
  }
2289
+ /**
2290
+ * PoolSlipApi - axios parameter creator
2291
+ * @export
2292
+ */
2293
+ const PoolSlipApiAxiosParamCreator = function (configuration) {
2294
+ return {
2295
+ /**
2296
+ * Returns the pool slip information for the provided asset.
2297
+ * @param {string} asset
2298
+ * @param {number} [height] optional block height, defaults to current tip
2299
+ * @param {*} [options] Override http request option.
2300
+ * @throws {RequiredError}
2301
+ */
2302
+ poolslip: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2303
+ // verify required parameter 'asset' is not null or undefined
2304
+ assertParamExists('poolslip', 'asset', asset);
2305
+ const localVarPath = `/thorchain/slip/{asset}`
2306
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
2307
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2308
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2309
+ let baseOptions;
2310
+ if (configuration) {
2311
+ baseOptions = configuration.baseOptions;
2312
+ }
2313
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2314
+ const localVarHeaderParameter = {};
2315
+ const localVarQueryParameter = {};
2316
+ if (height !== undefined) {
2317
+ localVarQueryParameter['height'] = height;
2318
+ }
2319
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2320
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2321
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2322
+ return {
2323
+ url: toPathString(localVarUrlObj),
2324
+ options: localVarRequestOptions,
2325
+ };
2326
+ }),
2327
+ /**
2328
+ * Returns the pool slip information for all Available Layer 1 pool assets.
2329
+ * @param {number} [height] optional block height, defaults to current tip
2330
+ * @param {*} [options] Override http request option.
2331
+ * @throws {RequiredError}
2332
+ */
2333
+ poolslips: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2334
+ const localVarPath = `/thorchain/slips`;
2335
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2336
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2337
+ let baseOptions;
2338
+ if (configuration) {
2339
+ baseOptions = configuration.baseOptions;
2340
+ }
2341
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2342
+ const localVarHeaderParameter = {};
2343
+ const localVarQueryParameter = {};
2344
+ if (height !== undefined) {
2345
+ localVarQueryParameter['height'] = height;
2346
+ }
2347
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2348
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2349
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2350
+ return {
2351
+ url: toPathString(localVarUrlObj),
2352
+ options: localVarRequestOptions,
2353
+ };
2354
+ }),
2355
+ };
2356
+ };
2357
+ /**
2358
+ * PoolSlipApi - functional programming interface
2359
+ * @export
2360
+ */
2361
+ const PoolSlipApiFp = function (configuration) {
2362
+ const localVarAxiosParamCreator = PoolSlipApiAxiosParamCreator(configuration);
2363
+ return {
2364
+ /**
2365
+ * Returns the pool slip information for the provided asset.
2366
+ * @param {string} asset
2367
+ * @param {number} [height] optional block height, defaults to current tip
2368
+ * @param {*} [options] Override http request option.
2369
+ * @throws {RequiredError}
2370
+ */
2371
+ poolslip(asset, height, options) {
2372
+ return __awaiter(this, void 0, void 0, function* () {
2373
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.poolslip(asset, height, options);
2374
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
2375
+ });
2376
+ },
2377
+ /**
2378
+ * Returns the pool slip information for all Available Layer 1 pool assets.
2379
+ * @param {number} [height] optional block height, defaults to current tip
2380
+ * @param {*} [options] Override http request option.
2381
+ * @throws {RequiredError}
2382
+ */
2383
+ poolslips(height, options) {
2384
+ return __awaiter(this, void 0, void 0, function* () {
2385
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.poolslips(height, options);
2386
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
2387
+ });
2388
+ },
2389
+ };
2390
+ };
2391
+ /**
2392
+ * PoolSlipApi - factory interface
2393
+ * @export
2394
+ */
2395
+ const PoolSlipApiFactory = function (configuration, basePath, axios) {
2396
+ const localVarFp = PoolSlipApiFp(configuration);
2397
+ return {
2398
+ /**
2399
+ * Returns the pool slip information for the provided asset.
2400
+ * @param {string} asset
2401
+ * @param {number} [height] optional block height, defaults to current tip
2402
+ * @param {*} [options] Override http request option.
2403
+ * @throws {RequiredError}
2404
+ */
2405
+ poolslip(asset, height, options) {
2406
+ return localVarFp.poolslip(asset, height, options).then((request) => request(axios, basePath));
2407
+ },
2408
+ /**
2409
+ * Returns the pool slip information for all Available Layer 1 pool assets.
2410
+ * @param {number} [height] optional block height, defaults to current tip
2411
+ * @param {*} [options] Override http request option.
2412
+ * @throws {RequiredError}
2413
+ */
2414
+ poolslips(height, options) {
2415
+ return localVarFp.poolslips(height, options).then((request) => request(axios, basePath));
2416
+ },
2417
+ };
2418
+ };
2419
+ /**
2420
+ * PoolSlipApi - object-oriented interface
2421
+ * @export
2422
+ * @class PoolSlipApi
2423
+ * @extends {BaseAPI}
2424
+ */
2425
+ class PoolSlipApi extends BaseAPI {
2426
+ /**
2427
+ * Returns the pool slip information for the provided asset.
2428
+ * @param {string} asset
2429
+ * @param {number} [height] optional block height, defaults to current tip
2430
+ * @param {*} [options] Override http request option.
2431
+ * @throws {RequiredError}
2432
+ * @memberof PoolSlipApi
2433
+ */
2434
+ poolslip(asset, height, options) {
2435
+ return PoolSlipApiFp(this.configuration).poolslip(asset, height, options).then((request) => request(this.axios, this.basePath));
2436
+ }
2437
+ /**
2438
+ * Returns the pool slip information for all Available Layer 1 pool assets.
2439
+ * @param {number} [height] optional block height, defaults to current tip
2440
+ * @param {*} [options] Override http request option.
2441
+ * @throws {RequiredError}
2442
+ * @memberof PoolSlipApi
2443
+ */
2444
+ poolslips(height, options) {
2445
+ return PoolSlipApiFp(this.configuration).poolslips(height, options).then((request) => request(this.axios, this.basePath));
2446
+ }
2447
+ }
2160
2448
  /**
2161
2449
  * PoolsApi - axios parameter creator
2162
2450
  * @export
@@ -3567,6 +3855,38 @@ class StreamingSwapApi extends BaseAPI {
3567
3855
  */
3568
3856
  const TSSApiAxiosParamCreator = function (configuration) {
3569
3857
  return {
3858
+ /**
3859
+ * Returns keygen information for the provided height and pubkey - the pubkey being of one of the members of a keygen block for that height
3860
+ * @param {number} height
3861
+ * @param {string} pubkey
3862
+ * @param {*} [options] Override http request option.
3863
+ * @throws {RequiredError}
3864
+ */
3865
+ keygenPubkey: (height, pubkey, options = {}) => __awaiter(this, void 0, void 0, function* () {
3866
+ // verify required parameter 'height' is not null or undefined
3867
+ assertParamExists('keygenPubkey', 'height', height);
3868
+ // verify required parameter 'pubkey' is not null or undefined
3869
+ assertParamExists('keygenPubkey', 'pubkey', pubkey);
3870
+ const localVarPath = `/thorchain/keygen/{height}/{pubkey}`
3871
+ .replace(`{${"height"}}`, encodeURIComponent(String(height)))
3872
+ .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
3873
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3874
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3875
+ let baseOptions;
3876
+ if (configuration) {
3877
+ baseOptions = configuration.baseOptions;
3878
+ }
3879
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3880
+ const localVarHeaderParameter = {};
3881
+ const localVarQueryParameter = {};
3882
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3883
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3884
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3885
+ return {
3886
+ url: toPathString(localVarUrlObj),
3887
+ options: localVarRequestOptions,
3888
+ };
3889
+ }),
3570
3890
  /**
3571
3891
  * Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
3572
3892
  * @param {number} height
@@ -3696,6 +4016,19 @@ const TSSApiAxiosParamCreator = function (configuration) {
3696
4016
  const TSSApiFp = function (configuration) {
3697
4017
  const localVarAxiosParamCreator = TSSApiAxiosParamCreator(configuration);
3698
4018
  return {
4019
+ /**
4020
+ * Returns keygen information for the provided height and pubkey - the pubkey being of one of the members of a keygen block for that height
4021
+ * @param {number} height
4022
+ * @param {string} pubkey
4023
+ * @param {*} [options] Override http request option.
4024
+ * @throws {RequiredError}
4025
+ */
4026
+ keygenPubkey(height, pubkey, options) {
4027
+ return __awaiter(this, void 0, void 0, function* () {
4028
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.keygenPubkey(height, pubkey, options);
4029
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
4030
+ });
4031
+ },
3699
4032
  /**
3700
4033
  * Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
3701
4034
  * @param {number} height
@@ -3755,6 +4088,16 @@ const TSSApiFp = function (configuration) {
3755
4088
  const TSSApiFactory = function (configuration, basePath, axios) {
3756
4089
  const localVarFp = TSSApiFp(configuration);
3757
4090
  return {
4091
+ /**
4092
+ * Returns keygen information for the provided height and pubkey - the pubkey being of one of the members of a keygen block for that height
4093
+ * @param {number} height
4094
+ * @param {string} pubkey
4095
+ * @param {*} [options] Override http request option.
4096
+ * @throws {RequiredError}
4097
+ */
4098
+ keygenPubkey(height, pubkey, options) {
4099
+ return localVarFp.keygenPubkey(height, pubkey, options).then((request) => request(axios, basePath));
4100
+ },
3758
4101
  /**
3759
4102
  * Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
3760
4103
  * @param {number} height
@@ -3802,6 +4145,17 @@ const TSSApiFactory = function (configuration, basePath, axios) {
3802
4145
  * @extends {BaseAPI}
3803
4146
  */
3804
4147
  class TSSApi extends BaseAPI {
4148
+ /**
4149
+ * Returns keygen information for the provided height and pubkey - the pubkey being of one of the members of a keygen block for that height
4150
+ * @param {number} height
4151
+ * @param {string} pubkey
4152
+ * @param {*} [options] Override http request option.
4153
+ * @throws {RequiredError}
4154
+ * @memberof TSSApi
4155
+ */
4156
+ keygenPubkey(height, pubkey, options) {
4157
+ return TSSApiFp(this.configuration).keygenPubkey(height, pubkey, options).then((request) => request(this.axios, this.basePath));
4158
+ }
3805
4159
  /**
3806
4160
  * Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
3807
4161
  * @param {number} height
@@ -4986,7 +5340,7 @@ class VaultsApi extends BaseAPI {
4986
5340
  * Thornode API
4987
5341
  * Thornode REST API.
4988
5342
  *
4989
- * The version of the OpenAPI document: 1.130.0
5343
+ * The version of the OpenAPI document: 1.132.0
4990
5344
  * Contact: devs@thorchain.org
4991
5345
  *
4992
5346
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5067,6 +5421,10 @@ exports.POLApi = POLApi;
5067
5421
  exports.POLApiAxiosParamCreator = POLApiAxiosParamCreator;
5068
5422
  exports.POLApiFactory = POLApiFactory;
5069
5423
  exports.POLApiFp = POLApiFp;
5424
+ exports.PoolSlipApi = PoolSlipApi;
5425
+ exports.PoolSlipApiAxiosParamCreator = PoolSlipApiAxiosParamCreator;
5426
+ exports.PoolSlipApiFactory = PoolSlipApiFactory;
5427
+ exports.PoolSlipApiFp = PoolSlipApiFp;
5070
5428
  exports.PoolsApi = PoolsApi;
5071
5429
  exports.PoolsApiAxiosParamCreator = PoolsApiAxiosParamCreator;
5072
5430
  exports.PoolsApiFactory = PoolsApiFactory;
@@ -5121,4 +5479,5 @@ exports.VaultsApi = VaultsApi;
5121
5479
  exports.VaultsApiAxiosParamCreator = VaultsApiAxiosParamCreator;
5122
5480
  exports.VaultsApiFactory = VaultsApiFactory;
5123
5481
  exports.VaultsApiFp = VaultsApiFp;
5482
+ exports.YggdrasilVaultTypeEnum = YggdrasilVaultTypeEnum;
5124
5483
  //# sourceMappingURL=index.js.map