@xchainjs/xchain-thornode 0.1.0 → 0.1.2

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.esm.js CHANGED
@@ -132,165 +132,6 @@ const VaultTypeEnum = {
132
132
  AsgardVault: 'AsgardVault',
133
133
  YggdrasilVault: 'YggdrasilVault'
134
134
  };
135
- /**
136
- * BucketsApi - axios parameter creator
137
- * @export
138
- */
139
- const BucketsApiAxiosParamCreator = function (configuration) {
140
- return {
141
- /**
142
- * Returns the bucket information for the provided asset.
143
- * @param {string} asset
144
- * @param {number} [height] optional block height, defaults to current tip
145
- * @param {*} [options] Override http request option.
146
- * @throws {RequiredError}
147
- */
148
- bucket: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
149
- // verify required parameter 'asset' is not null or undefined
150
- assertParamExists('bucket', 'asset', asset);
151
- const localVarPath = `/thorchain/bucket/{asset}`
152
- .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
153
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
- let baseOptions;
156
- if (configuration) {
157
- baseOptions = configuration.baseOptions;
158
- }
159
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
160
- const localVarHeaderParameter = {};
161
- const localVarQueryParameter = {};
162
- if (height !== undefined) {
163
- localVarQueryParameter['height'] = height;
164
- }
165
- setSearchParams(localVarUrlObj, localVarQueryParameter);
166
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
167
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
168
- return {
169
- url: toPathString(localVarUrlObj),
170
- options: localVarRequestOptions,
171
- };
172
- }),
173
- /**
174
- * Returns the bucket information for all assets.
175
- * @param {number} [height] optional block height, defaults to current tip
176
- * @param {*} [options] Override http request option.
177
- * @throws {RequiredError}
178
- */
179
- buckets: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
180
- const localVarPath = `/thorchain/buckets`;
181
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
182
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
183
- let baseOptions;
184
- if (configuration) {
185
- baseOptions = configuration.baseOptions;
186
- }
187
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
188
- const localVarHeaderParameter = {};
189
- const localVarQueryParameter = {};
190
- if (height !== undefined) {
191
- localVarQueryParameter['height'] = height;
192
- }
193
- setSearchParams(localVarUrlObj, localVarQueryParameter);
194
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
195
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
196
- return {
197
- url: toPathString(localVarUrlObj),
198
- options: localVarRequestOptions,
199
- };
200
- }),
201
- };
202
- };
203
- /**
204
- * BucketsApi - functional programming interface
205
- * @export
206
- */
207
- const BucketsApiFp = function (configuration) {
208
- const localVarAxiosParamCreator = BucketsApiAxiosParamCreator(configuration);
209
- return {
210
- /**
211
- * Returns the bucket information for the provided asset.
212
- * @param {string} asset
213
- * @param {number} [height] optional block height, defaults to current tip
214
- * @param {*} [options] Override http request option.
215
- * @throws {RequiredError}
216
- */
217
- bucket(asset, height, options) {
218
- return __awaiter(this, void 0, void 0, function* () {
219
- const localVarAxiosArgs = yield localVarAxiosParamCreator.bucket(asset, height, options);
220
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
221
- });
222
- },
223
- /**
224
- * Returns the bucket information for all assets.
225
- * @param {number} [height] optional block height, defaults to current tip
226
- * @param {*} [options] Override http request option.
227
- * @throws {RequiredError}
228
- */
229
- buckets(height, options) {
230
- return __awaiter(this, void 0, void 0, function* () {
231
- const localVarAxiosArgs = yield localVarAxiosParamCreator.buckets(height, options);
232
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
233
- });
234
- },
235
- };
236
- };
237
- /**
238
- * BucketsApi - factory interface
239
- * @export
240
- */
241
- const BucketsApiFactory = function (configuration, basePath, axios) {
242
- const localVarFp = BucketsApiFp(configuration);
243
- return {
244
- /**
245
- * Returns the bucket information for the provided asset.
246
- * @param {string} asset
247
- * @param {number} [height] optional block height, defaults to current tip
248
- * @param {*} [options] Override http request option.
249
- * @throws {RequiredError}
250
- */
251
- bucket(asset, height, options) {
252
- return localVarFp.bucket(asset, height, options).then((request) => request(axios, basePath));
253
- },
254
- /**
255
- * Returns the bucket information for all assets.
256
- * @param {number} [height] optional block height, defaults to current tip
257
- * @param {*} [options] Override http request option.
258
- * @throws {RequiredError}
259
- */
260
- buckets(height, options) {
261
- return localVarFp.buckets(height, options).then((request) => request(axios, basePath));
262
- },
263
- };
264
- };
265
- /**
266
- * BucketsApi - object-oriented interface
267
- * @export
268
- * @class BucketsApi
269
- * @extends {BaseAPI}
270
- */
271
- class BucketsApi extends BaseAPI {
272
- /**
273
- * Returns the bucket information for the provided asset.
274
- * @param {string} asset
275
- * @param {number} [height] optional block height, defaults to current tip
276
- * @param {*} [options] Override http request option.
277
- * @throws {RequiredError}
278
- * @memberof BucketsApi
279
- */
280
- bucket(asset, height, options) {
281
- return BucketsApiFp(this.configuration).bucket(asset, height, options).then((request) => request(this.axios, this.basePath));
282
- }
283
- /**
284
- * Returns the bucket information for all assets.
285
- * @param {number} [height] optional block height, defaults to current tip
286
- * @param {*} [options] Override http request option.
287
- * @throws {RequiredError}
288
- * @memberof BucketsApi
289
- */
290
- buckets(height, options) {
291
- return BucketsApiFp(this.configuration).buckets(height, options).then((request) => request(this.axios, this.basePath));
292
- }
293
- }
294
135
  /**
295
136
  * HealthApi - axios parameter creator
296
137
  * @export
@@ -2035,6 +1876,474 @@ class QueueApi extends BaseAPI {
2035
1876
  return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
2036
1877
  }
2037
1878
  }
1879
+ /**
1880
+ * QuoteApi - axios parameter creator
1881
+ * @export
1882
+ */
1883
+ const QuoteApiAxiosParamCreator = function (configuration) {
1884
+ return {
1885
+ /**
1886
+ * Provide a quote estimate for the provided saver deposit.
1887
+ * @param {number} [height] optional block height, defaults to current tip
1888
+ * @param {string} [asset] the asset to deposit
1889
+ * @param {number} [amount] the source asset amount in 1e8 decimals
1890
+ * @param {*} [options] Override http request option.
1891
+ * @throws {RequiredError}
1892
+ */
1893
+ quotesaverdeposit: (height, asset, amount, options = {}) => __awaiter(this, void 0, void 0, function* () {
1894
+ const localVarPath = `/thorchain/quote/saver/deposit`;
1895
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1896
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1897
+ let baseOptions;
1898
+ if (configuration) {
1899
+ baseOptions = configuration.baseOptions;
1900
+ }
1901
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1902
+ const localVarHeaderParameter = {};
1903
+ const localVarQueryParameter = {};
1904
+ if (height !== undefined) {
1905
+ localVarQueryParameter['height'] = height;
1906
+ }
1907
+ if (asset !== undefined) {
1908
+ localVarQueryParameter['asset'] = asset;
1909
+ }
1910
+ if (amount !== undefined) {
1911
+ localVarQueryParameter['amount'] = amount;
1912
+ }
1913
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1914
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1915
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1916
+ return {
1917
+ url: toPathString(localVarUrlObj),
1918
+ options: localVarRequestOptions,
1919
+ };
1920
+ }),
1921
+ /**
1922
+ * Provide a quote estimate for the provided saver withdraw.
1923
+ * @param {number} [height] optional block height, defaults to current tip
1924
+ * @param {string} [asset] the asset to withdraw
1925
+ * @param {string} [address] the address for the position
1926
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
1927
+ * @param {*} [options] Override http request option.
1928
+ * @throws {RequiredError}
1929
+ */
1930
+ quotesaverwithdraw: (height, asset, address, withdrawBps, options = {}) => __awaiter(this, void 0, void 0, function* () {
1931
+ const localVarPath = `/thorchain/quote/saver/withdraw`;
1932
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1933
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1934
+ let baseOptions;
1935
+ if (configuration) {
1936
+ baseOptions = configuration.baseOptions;
1937
+ }
1938
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1939
+ const localVarHeaderParameter = {};
1940
+ const localVarQueryParameter = {};
1941
+ if (height !== undefined) {
1942
+ localVarQueryParameter['height'] = height;
1943
+ }
1944
+ if (asset !== undefined) {
1945
+ localVarQueryParameter['asset'] = asset;
1946
+ }
1947
+ if (address !== undefined) {
1948
+ localVarQueryParameter['address'] = address;
1949
+ }
1950
+ if (withdrawBps !== undefined) {
1951
+ localVarQueryParameter['withdraw_bps'] = withdrawBps;
1952
+ }
1953
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1954
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1955
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1956
+ return {
1957
+ url: toPathString(localVarUrlObj),
1958
+ options: localVarRequestOptions,
1959
+ };
1960
+ }),
1961
+ /**
1962
+ * Provide a quote estimate for the provided swap.
1963
+ * @param {number} [height] optional block height, defaults to current tip
1964
+ * @param {string} [fromAsset] the source asset
1965
+ * @param {string} [toAsset] the target asset
1966
+ * @param {number} [amount] the source asset amount in 1e8 decimals
1967
+ * @param {string} [destination] the destination address, required to generate memo
1968
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
1969
+ * @param {number} [affiliateBps] the affiliate fee in basis points
1970
+ * @param {string} [affiliate] the affiliate (address or thorname)
1971
+ * @param {*} [options] Override http request option.
1972
+ * @throws {RequiredError}
1973
+ */
1974
+ quoteswap: (height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
1975
+ const localVarPath = `/thorchain/quote/swap`;
1976
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1977
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1978
+ let baseOptions;
1979
+ if (configuration) {
1980
+ baseOptions = configuration.baseOptions;
1981
+ }
1982
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1983
+ const localVarHeaderParameter = {};
1984
+ const localVarQueryParameter = {};
1985
+ if (height !== undefined) {
1986
+ localVarQueryParameter['height'] = height;
1987
+ }
1988
+ if (fromAsset !== undefined) {
1989
+ localVarQueryParameter['from_asset'] = fromAsset;
1990
+ }
1991
+ if (toAsset !== undefined) {
1992
+ localVarQueryParameter['to_asset'] = toAsset;
1993
+ }
1994
+ if (amount !== undefined) {
1995
+ localVarQueryParameter['amount'] = amount;
1996
+ }
1997
+ if (destination !== undefined) {
1998
+ localVarQueryParameter['destination'] = destination;
1999
+ }
2000
+ if (toleranceBps !== undefined) {
2001
+ localVarQueryParameter['tolerance_bps'] = toleranceBps;
2002
+ }
2003
+ if (affiliateBps !== undefined) {
2004
+ localVarQueryParameter['affiliate_bps'] = affiliateBps;
2005
+ }
2006
+ if (affiliate !== undefined) {
2007
+ localVarQueryParameter['affiliate'] = affiliate;
2008
+ }
2009
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2010
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2011
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2012
+ return {
2013
+ url: toPathString(localVarUrlObj),
2014
+ options: localVarRequestOptions,
2015
+ };
2016
+ }),
2017
+ };
2018
+ };
2019
+ /**
2020
+ * QuoteApi - functional programming interface
2021
+ * @export
2022
+ */
2023
+ const QuoteApiFp = function (configuration) {
2024
+ const localVarAxiosParamCreator = QuoteApiAxiosParamCreator(configuration);
2025
+ return {
2026
+ /**
2027
+ * Provide a quote estimate for the provided saver deposit.
2028
+ * @param {number} [height] optional block height, defaults to current tip
2029
+ * @param {string} [asset] the asset to deposit
2030
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2031
+ * @param {*} [options] Override http request option.
2032
+ * @throws {RequiredError}
2033
+ */
2034
+ quotesaverdeposit(height, asset, amount, options) {
2035
+ return __awaiter(this, void 0, void 0, function* () {
2036
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quotesaverdeposit(height, asset, amount, options);
2037
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2038
+ });
2039
+ },
2040
+ /**
2041
+ * Provide a quote estimate for the provided saver withdraw.
2042
+ * @param {number} [height] optional block height, defaults to current tip
2043
+ * @param {string} [asset] the asset to withdraw
2044
+ * @param {string} [address] the address for the position
2045
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2046
+ * @param {*} [options] Override http request option.
2047
+ * @throws {RequiredError}
2048
+ */
2049
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2050
+ return __awaiter(this, void 0, void 0, function* () {
2051
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quotesaverwithdraw(height, asset, address, withdrawBps, options);
2052
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2053
+ });
2054
+ },
2055
+ /**
2056
+ * Provide a quote estimate for the provided swap.
2057
+ * @param {number} [height] optional block height, defaults to current tip
2058
+ * @param {string} [fromAsset] the source asset
2059
+ * @param {string} [toAsset] the target asset
2060
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2061
+ * @param {string} [destination] the destination address, required to generate memo
2062
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2063
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2064
+ * @param {string} [affiliate] the affiliate (address or thorname)
2065
+ * @param {*} [options] Override http request option.
2066
+ * @throws {RequiredError}
2067
+ */
2068
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2069
+ return __awaiter(this, void 0, void 0, function* () {
2070
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options);
2071
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2072
+ });
2073
+ },
2074
+ };
2075
+ };
2076
+ /**
2077
+ * QuoteApi - factory interface
2078
+ * @export
2079
+ */
2080
+ const QuoteApiFactory = function (configuration, basePath, axios) {
2081
+ const localVarFp = QuoteApiFp(configuration);
2082
+ return {
2083
+ /**
2084
+ * Provide a quote estimate for the provided saver deposit.
2085
+ * @param {number} [height] optional block height, defaults to current tip
2086
+ * @param {string} [asset] the asset to deposit
2087
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2088
+ * @param {*} [options] Override http request option.
2089
+ * @throws {RequiredError}
2090
+ */
2091
+ quotesaverdeposit(height, asset, amount, options) {
2092
+ return localVarFp.quotesaverdeposit(height, asset, amount, options).then((request) => request(axios, basePath));
2093
+ },
2094
+ /**
2095
+ * Provide a quote estimate for the provided saver withdraw.
2096
+ * @param {number} [height] optional block height, defaults to current tip
2097
+ * @param {string} [asset] the asset to withdraw
2098
+ * @param {string} [address] the address for the position
2099
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2100
+ * @param {*} [options] Override http request option.
2101
+ * @throws {RequiredError}
2102
+ */
2103
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2104
+ return localVarFp.quotesaverwithdraw(height, asset, address, withdrawBps, options).then((request) => request(axios, basePath));
2105
+ },
2106
+ /**
2107
+ * Provide a quote estimate for the provided swap.
2108
+ * @param {number} [height] optional block height, defaults to current tip
2109
+ * @param {string} [fromAsset] the source asset
2110
+ * @param {string} [toAsset] the target asset
2111
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2112
+ * @param {string} [destination] the destination address, required to generate memo
2113
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2114
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2115
+ * @param {string} [affiliate] the affiliate (address or thorname)
2116
+ * @param {*} [options] Override http request option.
2117
+ * @throws {RequiredError}
2118
+ */
2119
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2120
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2121
+ },
2122
+ };
2123
+ };
2124
+ /**
2125
+ * QuoteApi - object-oriented interface
2126
+ * @export
2127
+ * @class QuoteApi
2128
+ * @extends {BaseAPI}
2129
+ */
2130
+ class QuoteApi extends BaseAPI {
2131
+ /**
2132
+ * Provide a quote estimate for the provided saver deposit.
2133
+ * @param {number} [height] optional block height, defaults to current tip
2134
+ * @param {string} [asset] the asset to deposit
2135
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2136
+ * @param {*} [options] Override http request option.
2137
+ * @throws {RequiredError}
2138
+ * @memberof QuoteApi
2139
+ */
2140
+ quotesaverdeposit(height, asset, amount, options) {
2141
+ return QuoteApiFp(this.configuration).quotesaverdeposit(height, asset, amount, options).then((request) => request(this.axios, this.basePath));
2142
+ }
2143
+ /**
2144
+ * Provide a quote estimate for the provided saver withdraw.
2145
+ * @param {number} [height] optional block height, defaults to current tip
2146
+ * @param {string} [asset] the asset to withdraw
2147
+ * @param {string} [address] the address for the position
2148
+ * @param {number} [withdrawBps] the basis points of the existing position to withdraw
2149
+ * @param {*} [options] Override http request option.
2150
+ * @throws {RequiredError}
2151
+ * @memberof QuoteApi
2152
+ */
2153
+ quotesaverwithdraw(height, asset, address, withdrawBps, options) {
2154
+ return QuoteApiFp(this.configuration).quotesaverwithdraw(height, asset, address, withdrawBps, options).then((request) => request(this.axios, this.basePath));
2155
+ }
2156
+ /**
2157
+ * Provide a quote estimate for the provided swap.
2158
+ * @param {number} [height] optional block height, defaults to current tip
2159
+ * @param {string} [fromAsset] the source asset
2160
+ * @param {string} [toAsset] the target asset
2161
+ * @param {number} [amount] the source asset amount in 1e8 decimals
2162
+ * @param {string} [destination] the destination address, required to generate memo
2163
+ * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2164
+ * @param {number} [affiliateBps] the affiliate fee in basis points
2165
+ * @param {string} [affiliate] the affiliate (address or thorname)
2166
+ * @param {*} [options] Override http request option.
2167
+ * @throws {RequiredError}
2168
+ * @memberof QuoteApi
2169
+ */
2170
+ quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2171
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
2172
+ }
2173
+ }
2174
+ /**
2175
+ * SaversApi - axios parameter creator
2176
+ * @export
2177
+ */
2178
+ const SaversApiAxiosParamCreator = function (configuration) {
2179
+ return {
2180
+ /**
2181
+ * Returns the saver position given then savers pool and address.
2182
+ * @param {string} asset
2183
+ * @param {string} address
2184
+ * @param {number} [height] optional block height, defaults to current tip
2185
+ * @param {*} [options] Override http request option.
2186
+ * @throws {RequiredError}
2187
+ */
2188
+ saver: (asset, address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2189
+ // verify required parameter 'asset' is not null or undefined
2190
+ assertParamExists('saver', 'asset', asset);
2191
+ // verify required parameter 'address' is not null or undefined
2192
+ assertParamExists('saver', 'address', address);
2193
+ const localVarPath = `/thorchain/pool/{asset}/saver/{address}`
2194
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
2195
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
2196
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2197
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2198
+ let baseOptions;
2199
+ if (configuration) {
2200
+ baseOptions = configuration.baseOptions;
2201
+ }
2202
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2203
+ const localVarHeaderParameter = {};
2204
+ const localVarQueryParameter = {};
2205
+ if (height !== undefined) {
2206
+ localVarQueryParameter['height'] = height;
2207
+ }
2208
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2209
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2210
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2211
+ return {
2212
+ url: toPathString(localVarUrlObj),
2213
+ options: localVarRequestOptions,
2214
+ };
2215
+ }),
2216
+ /**
2217
+ * Returns all savers for the savers pool.
2218
+ * @param {string} asset
2219
+ * @param {number} [height] optional block height, defaults to current tip
2220
+ * @param {*} [options] Override http request option.
2221
+ * @throws {RequiredError}
2222
+ */
2223
+ savers: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2224
+ // verify required parameter 'asset' is not null or undefined
2225
+ assertParamExists('savers', 'asset', asset);
2226
+ const localVarPath = `/thorchain/pool/{asset}/savers`
2227
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
2228
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2229
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2230
+ let baseOptions;
2231
+ if (configuration) {
2232
+ baseOptions = configuration.baseOptions;
2233
+ }
2234
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2235
+ const localVarHeaderParameter = {};
2236
+ const localVarQueryParameter = {};
2237
+ if (height !== undefined) {
2238
+ localVarQueryParameter['height'] = height;
2239
+ }
2240
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2241
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2242
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2243
+ return {
2244
+ url: toPathString(localVarUrlObj),
2245
+ options: localVarRequestOptions,
2246
+ };
2247
+ }),
2248
+ };
2249
+ };
2250
+ /**
2251
+ * SaversApi - functional programming interface
2252
+ * @export
2253
+ */
2254
+ const SaversApiFp = function (configuration) {
2255
+ const localVarAxiosParamCreator = SaversApiAxiosParamCreator(configuration);
2256
+ return {
2257
+ /**
2258
+ * Returns the saver position given then savers pool and address.
2259
+ * @param {string} asset
2260
+ * @param {string} address
2261
+ * @param {number} [height] optional block height, defaults to current tip
2262
+ * @param {*} [options] Override http request option.
2263
+ * @throws {RequiredError}
2264
+ */
2265
+ saver(asset, address, height, options) {
2266
+ return __awaiter(this, void 0, void 0, function* () {
2267
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.saver(asset, address, height, options);
2268
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2269
+ });
2270
+ },
2271
+ /**
2272
+ * Returns all savers for the savers pool.
2273
+ * @param {string} asset
2274
+ * @param {number} [height] optional block height, defaults to current tip
2275
+ * @param {*} [options] Override http request option.
2276
+ * @throws {RequiredError}
2277
+ */
2278
+ savers(asset, height, options) {
2279
+ return __awaiter(this, void 0, void 0, function* () {
2280
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.savers(asset, height, options);
2281
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2282
+ });
2283
+ },
2284
+ };
2285
+ };
2286
+ /**
2287
+ * SaversApi - factory interface
2288
+ * @export
2289
+ */
2290
+ const SaversApiFactory = function (configuration, basePath, axios) {
2291
+ const localVarFp = SaversApiFp(configuration);
2292
+ return {
2293
+ /**
2294
+ * Returns the saver position given then savers pool and address.
2295
+ * @param {string} asset
2296
+ * @param {string} address
2297
+ * @param {number} [height] optional block height, defaults to current tip
2298
+ * @param {*} [options] Override http request option.
2299
+ * @throws {RequiredError}
2300
+ */
2301
+ saver(asset, address, height, options) {
2302
+ return localVarFp.saver(asset, address, height, options).then((request) => request(axios, basePath));
2303
+ },
2304
+ /**
2305
+ * Returns all savers for the savers pool.
2306
+ * @param {string} asset
2307
+ * @param {number} [height] optional block height, defaults to current tip
2308
+ * @param {*} [options] Override http request option.
2309
+ * @throws {RequiredError}
2310
+ */
2311
+ savers(asset, height, options) {
2312
+ return localVarFp.savers(asset, height, options).then((request) => request(axios, basePath));
2313
+ },
2314
+ };
2315
+ };
2316
+ /**
2317
+ * SaversApi - object-oriented interface
2318
+ * @export
2319
+ * @class SaversApi
2320
+ * @extends {BaseAPI}
2321
+ */
2322
+ class SaversApi extends BaseAPI {
2323
+ /**
2324
+ * Returns the saver position given then savers pool and address.
2325
+ * @param {string} asset
2326
+ * @param {string} address
2327
+ * @param {number} [height] optional block height, defaults to current tip
2328
+ * @param {*} [options] Override http request option.
2329
+ * @throws {RequiredError}
2330
+ * @memberof SaversApi
2331
+ */
2332
+ saver(asset, address, height, options) {
2333
+ return SaversApiFp(this.configuration).saver(asset, address, height, options).then((request) => request(this.axios, this.basePath));
2334
+ }
2335
+ /**
2336
+ * Returns all savers for the savers pool.
2337
+ * @param {string} asset
2338
+ * @param {number} [height] optional block height, defaults to current tip
2339
+ * @param {*} [options] Override http request option.
2340
+ * @throws {RequiredError}
2341
+ * @memberof SaversApi
2342
+ */
2343
+ savers(asset, height, options) {
2344
+ return SaversApiFp(this.configuration).savers(asset, height, options).then((request) => request(this.axios, this.basePath));
2345
+ }
2346
+ }
2038
2347
  /**
2039
2348
  * TSSApi - axios parameter creator
2040
2349
  * @export
@@ -2869,7 +3178,7 @@ class VaultsApi extends BaseAPI {
2869
3178
  * Thornode API
2870
3179
  * Thornode REST API.
2871
3180
  *
2872
- * The version of the OpenAPI document: 1.97.2
3181
+ * The version of the OpenAPI document: 1.99.0
2873
3182
  * Contact: devs@thorchain.org
2874
3183
  *
2875
3184
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2904,4 +3213,4 @@ class Configuration {
2904
3213
 
2905
3214
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
2906
3215
 
2907
- export { BucketsApi, BucketsApiAxiosParamCreator, BucketsApiFactory, BucketsApiFp, Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
3216
+ export { Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };