@xchainjs/xchain-thornode 0.2.0 → 0.2.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,6 +140,179 @@ const VaultTypeEnum = {
140
140
  AsgardVault: 'AsgardVault',
141
141
  YggdrasilVault: 'YggdrasilVault'
142
142
  };
143
+ /**
144
+ * BorrowersApi - axios parameter creator
145
+ * @export
146
+ */
147
+ const BorrowersApiAxiosParamCreator = function (configuration) {
148
+ return {
149
+ /**
150
+ * Returns the borrower position given the pool and address.
151
+ * @param {string} asset
152
+ * @param {string} address
153
+ * @param {number} [height] optional block height, defaults to current tip
154
+ * @param {*} [options] Override http request option.
155
+ * @throws {RequiredError}
156
+ */
157
+ borrower: (asset, address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
158
+ // verify required parameter 'asset' is not null or undefined
159
+ assertParamExists('borrower', 'asset', asset);
160
+ // verify required parameter 'address' is not null or undefined
161
+ assertParamExists('borrower', 'address', address);
162
+ const localVarPath = `/thorchain/pool/{asset}/borrower/{address}`
163
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
164
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
167
+ let baseOptions;
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ }
171
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
172
+ const localVarHeaderParameter = {};
173
+ const localVarQueryParameter = {};
174
+ if (height !== undefined) {
175
+ localVarQueryParameter['height'] = height;
176
+ }
177
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
178
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
179
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
180
+ return {
181
+ url: toPathString(localVarUrlObj),
182
+ options: localVarRequestOptions,
183
+ };
184
+ }),
185
+ /**
186
+ * Returns all borrowers for the given pool.
187
+ * @param {string} asset
188
+ * @param {number} [height] optional block height, defaults to current tip
189
+ * @param {*} [options] Override http request option.
190
+ * @throws {RequiredError}
191
+ */
192
+ borrowers: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
193
+ // verify required parameter 'asset' is not null or undefined
194
+ assertParamExists('borrowers', 'asset', asset);
195
+ const localVarPath = `/thorchain/pool/{asset}/borrowers`
196
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
197
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
198
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
199
+ let baseOptions;
200
+ if (configuration) {
201
+ baseOptions = configuration.baseOptions;
202
+ }
203
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
204
+ const localVarHeaderParameter = {};
205
+ const localVarQueryParameter = {};
206
+ if (height !== undefined) {
207
+ localVarQueryParameter['height'] = height;
208
+ }
209
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
210
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
211
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
212
+ return {
213
+ url: toPathString(localVarUrlObj),
214
+ options: localVarRequestOptions,
215
+ };
216
+ }),
217
+ };
218
+ };
219
+ /**
220
+ * BorrowersApi - functional programming interface
221
+ * @export
222
+ */
223
+ const BorrowersApiFp = function (configuration) {
224
+ const localVarAxiosParamCreator = BorrowersApiAxiosParamCreator(configuration);
225
+ return {
226
+ /**
227
+ * Returns the borrower position given the pool and address.
228
+ * @param {string} asset
229
+ * @param {string} address
230
+ * @param {number} [height] optional block height, defaults to current tip
231
+ * @param {*} [options] Override http request option.
232
+ * @throws {RequiredError}
233
+ */
234
+ borrower(asset, address, height, options) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.borrower(asset, address, height, options);
237
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
238
+ });
239
+ },
240
+ /**
241
+ * Returns all borrowers for the given pool.
242
+ * @param {string} asset
243
+ * @param {number} [height] optional block height, defaults to current tip
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ borrowers(asset, height, options) {
248
+ return __awaiter(this, void 0, void 0, function* () {
249
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.borrowers(asset, height, options);
250
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
251
+ });
252
+ },
253
+ };
254
+ };
255
+ /**
256
+ * BorrowersApi - factory interface
257
+ * @export
258
+ */
259
+ const BorrowersApiFactory = function (configuration, basePath, axios) {
260
+ const localVarFp = BorrowersApiFp(configuration);
261
+ return {
262
+ /**
263
+ * Returns the borrower position given the pool and address.
264
+ * @param {string} asset
265
+ * @param {string} address
266
+ * @param {number} [height] optional block height, defaults to current tip
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ borrower(asset, address, height, options) {
271
+ return localVarFp.borrower(asset, address, height, options).then((request) => request(axios, basePath));
272
+ },
273
+ /**
274
+ * Returns all borrowers for the given pool.
275
+ * @param {string} asset
276
+ * @param {number} [height] optional block height, defaults to current tip
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ borrowers(asset, height, options) {
281
+ return localVarFp.borrowers(asset, height, options).then((request) => request(axios, basePath));
282
+ },
283
+ };
284
+ };
285
+ /**
286
+ * BorrowersApi - object-oriented interface
287
+ * @export
288
+ * @class BorrowersApi
289
+ * @extends {BaseAPI}
290
+ */
291
+ class BorrowersApi extends BaseAPI {
292
+ /**
293
+ * Returns the borrower position given the pool and address.
294
+ * @param {string} asset
295
+ * @param {string} address
296
+ * @param {number} [height] optional block height, defaults to current tip
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ * @memberof BorrowersApi
300
+ */
301
+ borrower(asset, address, height, options) {
302
+ return BorrowersApiFp(this.configuration).borrower(asset, address, height, options).then((request) => request(this.axios, this.basePath));
303
+ }
304
+ /**
305
+ * Returns all borrowers for the given pool.
306
+ * @param {string} asset
307
+ * @param {number} [height] optional block height, defaults to current tip
308
+ * @param {*} [options] Override http request option.
309
+ * @throws {RequiredError}
310
+ * @memberof BorrowersApi
311
+ */
312
+ borrowers(asset, height, options) {
313
+ return BorrowersApiFp(this.configuration).borrowers(asset, height, options).then((request) => request(this.axios, this.basePath));
314
+ }
315
+ }
143
316
  /**
144
317
  * HealthApi - axios parameter creator
145
318
  * @export
@@ -226,6 +399,165 @@ class HealthApi extends BaseAPI {
226
399
  return HealthApiFp(this.configuration).ping(options).then((request) => request(this.axios, this.basePath));
227
400
  }
228
401
  }
402
+ /**
403
+ * InvariantsApi - axios parameter creator
404
+ * @export
405
+ */
406
+ const InvariantsApiAxiosParamCreator = function (configuration) {
407
+ return {
408
+ /**
409
+ * Returns result of running the given invariant.
410
+ * @param {string} invariant
411
+ * @param {number} [height] optional block height, defaults to current tip
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ invariant: (invariant, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
416
+ // verify required parameter 'invariant' is not null or undefined
417
+ assertParamExists('invariant', 'invariant', invariant);
418
+ const localVarPath = `/thorchain/invariant/{invariant}`
419
+ .replace(`{${"invariant"}}`, encodeURIComponent(String(invariant)));
420
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
421
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
422
+ let baseOptions;
423
+ if (configuration) {
424
+ baseOptions = configuration.baseOptions;
425
+ }
426
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
427
+ const localVarHeaderParameter = {};
428
+ const localVarQueryParameter = {};
429
+ if (height !== undefined) {
430
+ localVarQueryParameter['height'] = height;
431
+ }
432
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
433
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
434
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
435
+ return {
436
+ url: toPathString(localVarUrlObj),
437
+ options: localVarRequestOptions,
438
+ };
439
+ }),
440
+ /**
441
+ * Returns a list of available invariants.
442
+ * @param {number} [height] optional block height, defaults to current tip
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ invariants: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
447
+ const localVarPath = `/thorchain/invariants`;
448
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
449
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
450
+ let baseOptions;
451
+ if (configuration) {
452
+ baseOptions = configuration.baseOptions;
453
+ }
454
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
455
+ const localVarHeaderParameter = {};
456
+ const localVarQueryParameter = {};
457
+ if (height !== undefined) {
458
+ localVarQueryParameter['height'] = height;
459
+ }
460
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
461
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
462
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
463
+ return {
464
+ url: toPathString(localVarUrlObj),
465
+ options: localVarRequestOptions,
466
+ };
467
+ }),
468
+ };
469
+ };
470
+ /**
471
+ * InvariantsApi - functional programming interface
472
+ * @export
473
+ */
474
+ const InvariantsApiFp = function (configuration) {
475
+ const localVarAxiosParamCreator = InvariantsApiAxiosParamCreator(configuration);
476
+ return {
477
+ /**
478
+ * Returns result of running the given invariant.
479
+ * @param {string} invariant
480
+ * @param {number} [height] optional block height, defaults to current tip
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ invariant(invariant, height, options) {
485
+ return __awaiter(this, void 0, void 0, function* () {
486
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.invariant(invariant, height, options);
487
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
488
+ });
489
+ },
490
+ /**
491
+ * Returns a list of available invariants.
492
+ * @param {number} [height] optional block height, defaults to current tip
493
+ * @param {*} [options] Override http request option.
494
+ * @throws {RequiredError}
495
+ */
496
+ invariants(height, options) {
497
+ return __awaiter(this, void 0, void 0, function* () {
498
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.invariants(height, options);
499
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
500
+ });
501
+ },
502
+ };
503
+ };
504
+ /**
505
+ * InvariantsApi - factory interface
506
+ * @export
507
+ */
508
+ const InvariantsApiFactory = function (configuration, basePath, axios) {
509
+ const localVarFp = InvariantsApiFp(configuration);
510
+ return {
511
+ /**
512
+ * Returns result of running the given invariant.
513
+ * @param {string} invariant
514
+ * @param {number} [height] optional block height, defaults to current tip
515
+ * @param {*} [options] Override http request option.
516
+ * @throws {RequiredError}
517
+ */
518
+ invariant(invariant, height, options) {
519
+ return localVarFp.invariant(invariant, height, options).then((request) => request(axios, basePath));
520
+ },
521
+ /**
522
+ * Returns a list of available invariants.
523
+ * @param {number} [height] optional block height, defaults to current tip
524
+ * @param {*} [options] Override http request option.
525
+ * @throws {RequiredError}
526
+ */
527
+ invariants(height, options) {
528
+ return localVarFp.invariants(height, options).then((request) => request(axios, basePath));
529
+ },
530
+ };
531
+ };
532
+ /**
533
+ * InvariantsApi - object-oriented interface
534
+ * @export
535
+ * @class InvariantsApi
536
+ * @extends {BaseAPI}
537
+ */
538
+ class InvariantsApi extends BaseAPI {
539
+ /**
540
+ * Returns result of running the given invariant.
541
+ * @param {string} invariant
542
+ * @param {number} [height] optional block height, defaults to current tip
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ * @memberof InvariantsApi
546
+ */
547
+ invariant(invariant, height, options) {
548
+ return InvariantsApiFp(this.configuration).invariant(invariant, height, options).then((request) => request(this.axios, this.basePath));
549
+ }
550
+ /**
551
+ * Returns a list of available invariants.
552
+ * @param {number} [height] optional block height, defaults to current tip
553
+ * @param {*} [options] Override http request option.
554
+ * @throws {RequiredError}
555
+ * @memberof InvariantsApi
556
+ */
557
+ invariants(height, options) {
558
+ return InvariantsApiFp(this.configuration).invariants(height, options).then((request) => request(this.axios, this.basePath));
559
+ }
560
+ }
229
561
  /**
230
562
  * LiquidityProvidersApi - axios parameter creator
231
563
  * @export
@@ -1763,6 +2095,34 @@ const QueueApiAxiosParamCreator = function (configuration) {
1763
2095
  options: localVarRequestOptions,
1764
2096
  };
1765
2097
  }),
2098
+ /**
2099
+ * Returns the swap queue.
2100
+ * @param {number} [height] optional block height, defaults to current tip
2101
+ * @param {*} [options] Override http request option.
2102
+ * @throws {RequiredError}
2103
+ */
2104
+ queueSwap: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2105
+ const localVarPath = `/thorchain/queue/swap`;
2106
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2107
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2108
+ let baseOptions;
2109
+ if (configuration) {
2110
+ baseOptions = configuration.baseOptions;
2111
+ }
2112
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2113
+ const localVarHeaderParameter = {};
2114
+ const localVarQueryParameter = {};
2115
+ if (height !== undefined) {
2116
+ localVarQueryParameter['height'] = height;
2117
+ }
2118
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2120
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2121
+ return {
2122
+ url: toPathString(localVarUrlObj),
2123
+ options: localVarRequestOptions,
2124
+ };
2125
+ }),
1766
2126
  };
1767
2127
  };
1768
2128
  /**
@@ -1808,6 +2168,18 @@ const QueueApiFp = function (configuration) {
1808
2168
  return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
1809
2169
  });
1810
2170
  },
2171
+ /**
2172
+ * Returns the swap queue.
2173
+ * @param {number} [height] optional block height, defaults to current tip
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ */
2177
+ queueSwap(height, options) {
2178
+ return __awaiter(this, void 0, void 0, function* () {
2179
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.queueSwap(height, options);
2180
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2181
+ });
2182
+ },
1811
2183
  };
1812
2184
  };
1813
2185
  /**
@@ -1844,6 +2216,15 @@ const QueueApiFactory = function (configuration, basePath, axios) {
1844
2216
  queueScheduled(height, options) {
1845
2217
  return localVarFp.queueScheduled(height, options).then((request) => request(axios, basePath));
1846
2218
  },
2219
+ /**
2220
+ * Returns the swap queue.
2221
+ * @param {number} [height] optional block height, defaults to current tip
2222
+ * @param {*} [options] Override http request option.
2223
+ * @throws {RequiredError}
2224
+ */
2225
+ queueSwap(height, options) {
2226
+ return localVarFp.queueSwap(height, options).then((request) => request(axios, basePath));
2227
+ },
1847
2228
  };
1848
2229
  };
1849
2230
  /**
@@ -1883,6 +2264,16 @@ class QueueApi extends BaseAPI {
1883
2264
  queueScheduled(height, options) {
1884
2265
  return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
1885
2266
  }
2267
+ /**
2268
+ * Returns the swap queue.
2269
+ * @param {number} [height] optional block height, defaults to current tip
2270
+ * @param {*} [options] Override http request option.
2271
+ * @throws {RequiredError}
2272
+ * @memberof QueueApi
2273
+ */
2274
+ queueSwap(height, options) {
2275
+ return QueueApiFp(this.configuration).queueSwap(height, options).then((request) => request(this.axios, this.basePath));
2276
+ }
1886
2277
  }
1887
2278
  /**
1888
2279
  * QuoteApi - axios parameter creator
@@ -1973,13 +2364,14 @@ const QuoteApiAxiosParamCreator = function (configuration) {
1973
2364
  * @param {string} [toAsset] the target asset
1974
2365
  * @param {number} [amount] the source asset amount in 1e8 decimals
1975
2366
  * @param {string} [destination] the destination address, required to generate memo
2367
+ * @param {string} [fromAddress] the from address, required if the from asset is a synth
1976
2368
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
1977
2369
  * @param {number} [affiliateBps] the affiliate fee in basis points
1978
2370
  * @param {string} [affiliate] the affiliate (address or thorname)
1979
2371
  * @param {*} [options] Override http request option.
1980
2372
  * @throws {RequiredError}
1981
2373
  */
1982
- quoteswap: (height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2374
+ quoteswap: (height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
1983
2375
  const localVarPath = `/thorchain/quote/swap`;
1984
2376
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1985
2377
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2005,6 +2397,9 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2005
2397
  if (destination !== undefined) {
2006
2398
  localVarQueryParameter['destination'] = destination;
2007
2399
  }
2400
+ if (fromAddress !== undefined) {
2401
+ localVarQueryParameter['from_address'] = fromAddress;
2402
+ }
2008
2403
  if (toleranceBps !== undefined) {
2009
2404
  localVarQueryParameter['tolerance_bps'] = toleranceBps;
2010
2405
  }
@@ -2067,15 +2462,16 @@ const QuoteApiFp = function (configuration) {
2067
2462
  * @param {string} [toAsset] the target asset
2068
2463
  * @param {number} [amount] the source asset amount in 1e8 decimals
2069
2464
  * @param {string} [destination] the destination address, required to generate memo
2465
+ * @param {string} [fromAddress] the from address, required if the from asset is a synth
2070
2466
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2071
2467
  * @param {number} [affiliateBps] the affiliate fee in basis points
2072
2468
  * @param {string} [affiliate] the affiliate (address or thorname)
2073
2469
  * @param {*} [options] Override http request option.
2074
2470
  * @throws {RequiredError}
2075
2471
  */
2076
- quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
2472
+ quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2077
2473
  return __awaiter(this, void 0, void 0, function* () {
2078
- const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options);
2474
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options);
2079
2475
  return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2080
2476
  });
2081
2477
  },
@@ -2118,14 +2514,15 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2118
2514
  * @param {string} [toAsset] the target asset
2119
2515
  * @param {number} [amount] the source asset amount in 1e8 decimals
2120
2516
  * @param {string} [destination] the destination address, required to generate memo
2517
+ * @param {string} [fromAddress] the from address, required if the from asset is a synth
2121
2518
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2122
2519
  * @param {number} [affiliateBps] the affiliate fee in basis points
2123
2520
  * @param {string} [affiliate] the affiliate (address or thorname)
2124
2521
  * @param {*} [options] Override http request option.
2125
2522
  * @throws {RequiredError}
2126
2523
  */
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));
2524
+ quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2525
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2129
2526
  },
2130
2527
  };
2131
2528
  };
@@ -2168,6 +2565,7 @@ class QuoteApi extends BaseAPI {
2168
2565
  * @param {string} [toAsset] the target asset
2169
2566
  * @param {number} [amount] the source asset amount in 1e8 decimals
2170
2567
  * @param {string} [destination] the destination address, required to generate memo
2568
+ * @param {string} [fromAddress] the from address, required if the from asset is a synth
2171
2569
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2172
2570
  * @param {number} [affiliateBps] the affiliate fee in basis points
2173
2571
  * @param {string} [affiliate] the affiliate (address or thorname)
@@ -2175,8 +2573,8 @@ class QuoteApi extends BaseAPI {
2175
2573
  * @throws {RequiredError}
2176
2574
  * @memberof QuoteApi
2177
2575
  */
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));
2576
+ quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2577
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
2180
2578
  }
2181
2579
  }
2182
2580
  /**
@@ -3144,7 +3542,7 @@ const VaultsApiAxiosParamCreator = function (configuration) {
3144
3542
  vault: (pubkey, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
3145
3543
  // verify required parameter 'pubkey' is not null or undefined
3146
3544
  assertParamExists('vault', 'pubkey', pubkey);
3147
- const localVarPath = `/thorchain/vaults/{pubkey}`
3545
+ const localVarPath = `/thorchain/vault/{pubkey}`
3148
3546
  .replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
3149
3547
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3150
3548
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -3384,7 +3782,7 @@ class VaultsApi extends BaseAPI {
3384
3782
  * Thornode API
3385
3783
  * Thornode REST API.
3386
3784
  *
3387
- * The version of the OpenAPI document: 1.102.0
3785
+ * The version of the OpenAPI document: 1.107.0
3388
3786
  * Contact: devs@thorchain.org
3389
3787
  *
3390
3788
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3419,11 +3817,19 @@ class Configuration {
3419
3817
 
3420
3818
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
3421
3819
 
3820
+ exports.BorrowersApi = BorrowersApi;
3821
+ exports.BorrowersApiAxiosParamCreator = BorrowersApiAxiosParamCreator;
3822
+ exports.BorrowersApiFactory = BorrowersApiFactory;
3823
+ exports.BorrowersApiFp = BorrowersApiFp;
3422
3824
  exports.Configuration = Configuration;
3423
3825
  exports.HealthApi = HealthApi;
3424
3826
  exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
3425
3827
  exports.HealthApiFactory = HealthApiFactory;
3426
3828
  exports.HealthApiFp = HealthApiFp;
3829
+ exports.InvariantsApi = InvariantsApi;
3830
+ exports.InvariantsApiAxiosParamCreator = InvariantsApiAxiosParamCreator;
3831
+ exports.InvariantsApiFactory = InvariantsApiFactory;
3832
+ exports.InvariantsApiFp = InvariantsApiFp;
3427
3833
  exports.LiquidityProvidersApi = LiquidityProvidersApi;
3428
3834
  exports.LiquidityProvidersApiAxiosParamCreator = LiquidityProvidersApiAxiosParamCreator;
3429
3835
  exports.LiquidityProvidersApiFactory = LiquidityProvidersApiFactory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thornode",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "license": "MIT",
5
5
  "description": "Thornode module that exposes all thornode functions using openapi-generator-cli",
6
6
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "prepublishOnly": "yarn run build",
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://gitlab.com/thorchain/thornode/-/raw/release-1.102.0/openapi/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://gitlab.com/thorchain/thornode/-/raw/release-1.107.0/openapi/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
  "devDependencies": {