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