@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/generated/thornodeApi/api.d.ts +554 -12
- package/lib/generated/thornodeApi/base.d.ts +1 -1
- package/lib/generated/thornodeApi/common.d.ts +1 -1
- package/lib/generated/thornodeApi/configuration.d.ts +1 -1
- package/lib/generated/thornodeApi/index.d.ts +1 -1
- package/lib/index.esm.js +408 -10
- package/lib/index.js +415 -9
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.107.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.107.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.107.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.107.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/lib/index.esm.js
CHANGED
|
@@ -132,6 +132,179 @@ const VaultTypeEnum = {
|
|
|
132
132
|
AsgardVault: 'AsgardVault',
|
|
133
133
|
YggdrasilVault: 'YggdrasilVault'
|
|
134
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* BorrowersApi - axios parameter creator
|
|
137
|
+
* @export
|
|
138
|
+
*/
|
|
139
|
+
const BorrowersApiAxiosParamCreator = function (configuration) {
|
|
140
|
+
return {
|
|
141
|
+
/**
|
|
142
|
+
* Returns the borrower position given the pool and address.
|
|
143
|
+
* @param {string} asset
|
|
144
|
+
* @param {string} address
|
|
145
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
borrower: (asset, address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
// verify required parameter 'asset' is not null or undefined
|
|
151
|
+
assertParamExists('borrower', 'asset', asset);
|
|
152
|
+
// verify required parameter 'address' is not null or undefined
|
|
153
|
+
assertParamExists('borrower', 'address', address);
|
|
154
|
+
const localVarPath = `/thorchain/pool/{asset}/borrower/{address}`
|
|
155
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
156
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
157
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
158
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
159
|
+
let baseOptions;
|
|
160
|
+
if (configuration) {
|
|
161
|
+
baseOptions = configuration.baseOptions;
|
|
162
|
+
}
|
|
163
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
164
|
+
const localVarHeaderParameter = {};
|
|
165
|
+
const localVarQueryParameter = {};
|
|
166
|
+
if (height !== undefined) {
|
|
167
|
+
localVarQueryParameter['height'] = height;
|
|
168
|
+
}
|
|
169
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
170
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
171
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
172
|
+
return {
|
|
173
|
+
url: toPathString(localVarUrlObj),
|
|
174
|
+
options: localVarRequestOptions,
|
|
175
|
+
};
|
|
176
|
+
}),
|
|
177
|
+
/**
|
|
178
|
+
* Returns all borrowers for the given pool.
|
|
179
|
+
* @param {string} asset
|
|
180
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
borrowers: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
// verify required parameter 'asset' is not null or undefined
|
|
186
|
+
assertParamExists('borrowers', 'asset', asset);
|
|
187
|
+
const localVarPath = `/thorchain/pool/{asset}/borrowers`
|
|
188
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
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
|
+
* BorrowersApi - functional programming interface
|
|
213
|
+
* @export
|
|
214
|
+
*/
|
|
215
|
+
const BorrowersApiFp = function (configuration) {
|
|
216
|
+
const localVarAxiosParamCreator = BorrowersApiAxiosParamCreator(configuration);
|
|
217
|
+
return {
|
|
218
|
+
/**
|
|
219
|
+
* Returns the borrower position given the pool and address.
|
|
220
|
+
* @param {string} asset
|
|
221
|
+
* @param {string} address
|
|
222
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
223
|
+
* @param {*} [options] Override http request option.
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
*/
|
|
226
|
+
borrower(asset, address, height, options) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.borrower(asset, address, height, options);
|
|
229
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
/**
|
|
233
|
+
* Returns all borrowers for the given pool.
|
|
234
|
+
* @param {string} asset
|
|
235
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
236
|
+
* @param {*} [options] Override http request option.
|
|
237
|
+
* @throws {RequiredError}
|
|
238
|
+
*/
|
|
239
|
+
borrowers(asset, height, options) {
|
|
240
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.borrowers(asset, height, options);
|
|
242
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* BorrowersApi - factory interface
|
|
249
|
+
* @export
|
|
250
|
+
*/
|
|
251
|
+
const BorrowersApiFactory = function (configuration, basePath, axios) {
|
|
252
|
+
const localVarFp = BorrowersApiFp(configuration);
|
|
253
|
+
return {
|
|
254
|
+
/**
|
|
255
|
+
* Returns the borrower position given the pool and address.
|
|
256
|
+
* @param {string} asset
|
|
257
|
+
* @param {string} address
|
|
258
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
259
|
+
* @param {*} [options] Override http request option.
|
|
260
|
+
* @throws {RequiredError}
|
|
261
|
+
*/
|
|
262
|
+
borrower(asset, address, height, options) {
|
|
263
|
+
return localVarFp.borrower(asset, address, height, options).then((request) => request(axios, basePath));
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* Returns all borrowers for the given pool.
|
|
267
|
+
* @param {string} asset
|
|
268
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
269
|
+
* @param {*} [options] Override http request option.
|
|
270
|
+
* @throws {RequiredError}
|
|
271
|
+
*/
|
|
272
|
+
borrowers(asset, height, options) {
|
|
273
|
+
return localVarFp.borrowers(asset, height, options).then((request) => request(axios, basePath));
|
|
274
|
+
},
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* BorrowersApi - object-oriented interface
|
|
279
|
+
* @export
|
|
280
|
+
* @class BorrowersApi
|
|
281
|
+
* @extends {BaseAPI}
|
|
282
|
+
*/
|
|
283
|
+
class BorrowersApi extends BaseAPI {
|
|
284
|
+
/**
|
|
285
|
+
* Returns the borrower position given the pool and address.
|
|
286
|
+
* @param {string} asset
|
|
287
|
+
* @param {string} address
|
|
288
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
289
|
+
* @param {*} [options] Override http request option.
|
|
290
|
+
* @throws {RequiredError}
|
|
291
|
+
* @memberof BorrowersApi
|
|
292
|
+
*/
|
|
293
|
+
borrower(asset, address, height, options) {
|
|
294
|
+
return BorrowersApiFp(this.configuration).borrower(asset, address, height, options).then((request) => request(this.axios, this.basePath));
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Returns all borrowers for the given pool.
|
|
298
|
+
* @param {string} asset
|
|
299
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
300
|
+
* @param {*} [options] Override http request option.
|
|
301
|
+
* @throws {RequiredError}
|
|
302
|
+
* @memberof BorrowersApi
|
|
303
|
+
*/
|
|
304
|
+
borrowers(asset, height, options) {
|
|
305
|
+
return BorrowersApiFp(this.configuration).borrowers(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
306
|
+
}
|
|
307
|
+
}
|
|
135
308
|
/**
|
|
136
309
|
* HealthApi - axios parameter creator
|
|
137
310
|
* @export
|
|
@@ -218,6 +391,165 @@ class HealthApi extends BaseAPI {
|
|
|
218
391
|
return HealthApiFp(this.configuration).ping(options).then((request) => request(this.axios, this.basePath));
|
|
219
392
|
}
|
|
220
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* InvariantsApi - axios parameter creator
|
|
396
|
+
* @export
|
|
397
|
+
*/
|
|
398
|
+
const InvariantsApiAxiosParamCreator = function (configuration) {
|
|
399
|
+
return {
|
|
400
|
+
/**
|
|
401
|
+
* Returns result of running the given invariant.
|
|
402
|
+
* @param {string} invariant
|
|
403
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
404
|
+
* @param {*} [options] Override http request option.
|
|
405
|
+
* @throws {RequiredError}
|
|
406
|
+
*/
|
|
407
|
+
invariant: (invariant, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
408
|
+
// verify required parameter 'invariant' is not null or undefined
|
|
409
|
+
assertParamExists('invariant', 'invariant', invariant);
|
|
410
|
+
const localVarPath = `/thorchain/invariant/{invariant}`
|
|
411
|
+
.replace(`{${"invariant"}}`, encodeURIComponent(String(invariant)));
|
|
412
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
413
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
414
|
+
let baseOptions;
|
|
415
|
+
if (configuration) {
|
|
416
|
+
baseOptions = configuration.baseOptions;
|
|
417
|
+
}
|
|
418
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
419
|
+
const localVarHeaderParameter = {};
|
|
420
|
+
const localVarQueryParameter = {};
|
|
421
|
+
if (height !== undefined) {
|
|
422
|
+
localVarQueryParameter['height'] = height;
|
|
423
|
+
}
|
|
424
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
425
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
426
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
427
|
+
return {
|
|
428
|
+
url: toPathString(localVarUrlObj),
|
|
429
|
+
options: localVarRequestOptions,
|
|
430
|
+
};
|
|
431
|
+
}),
|
|
432
|
+
/**
|
|
433
|
+
* Returns a list of available invariants.
|
|
434
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
435
|
+
* @param {*} [options] Override http request option.
|
|
436
|
+
* @throws {RequiredError}
|
|
437
|
+
*/
|
|
438
|
+
invariants: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
439
|
+
const localVarPath = `/thorchain/invariants`;
|
|
440
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
441
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
442
|
+
let baseOptions;
|
|
443
|
+
if (configuration) {
|
|
444
|
+
baseOptions = configuration.baseOptions;
|
|
445
|
+
}
|
|
446
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
447
|
+
const localVarHeaderParameter = {};
|
|
448
|
+
const localVarQueryParameter = {};
|
|
449
|
+
if (height !== undefined) {
|
|
450
|
+
localVarQueryParameter['height'] = height;
|
|
451
|
+
}
|
|
452
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
453
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
454
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
455
|
+
return {
|
|
456
|
+
url: toPathString(localVarUrlObj),
|
|
457
|
+
options: localVarRequestOptions,
|
|
458
|
+
};
|
|
459
|
+
}),
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* InvariantsApi - functional programming interface
|
|
464
|
+
* @export
|
|
465
|
+
*/
|
|
466
|
+
const InvariantsApiFp = function (configuration) {
|
|
467
|
+
const localVarAxiosParamCreator = InvariantsApiAxiosParamCreator(configuration);
|
|
468
|
+
return {
|
|
469
|
+
/**
|
|
470
|
+
* Returns result of running the given invariant.
|
|
471
|
+
* @param {string} invariant
|
|
472
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
473
|
+
* @param {*} [options] Override http request option.
|
|
474
|
+
* @throws {RequiredError}
|
|
475
|
+
*/
|
|
476
|
+
invariant(invariant, height, options) {
|
|
477
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.invariant(invariant, height, options);
|
|
479
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
480
|
+
});
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* Returns a list of available invariants.
|
|
484
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
485
|
+
* @param {*} [options] Override http request option.
|
|
486
|
+
* @throws {RequiredError}
|
|
487
|
+
*/
|
|
488
|
+
invariants(height, options) {
|
|
489
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.invariants(height, options);
|
|
491
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
492
|
+
});
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
/**
|
|
497
|
+
* InvariantsApi - factory interface
|
|
498
|
+
* @export
|
|
499
|
+
*/
|
|
500
|
+
const InvariantsApiFactory = function (configuration, basePath, axios) {
|
|
501
|
+
const localVarFp = InvariantsApiFp(configuration);
|
|
502
|
+
return {
|
|
503
|
+
/**
|
|
504
|
+
* Returns result of running the given invariant.
|
|
505
|
+
* @param {string} invariant
|
|
506
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
507
|
+
* @param {*} [options] Override http request option.
|
|
508
|
+
* @throws {RequiredError}
|
|
509
|
+
*/
|
|
510
|
+
invariant(invariant, height, options) {
|
|
511
|
+
return localVarFp.invariant(invariant, height, options).then((request) => request(axios, basePath));
|
|
512
|
+
},
|
|
513
|
+
/**
|
|
514
|
+
* Returns a list of available invariants.
|
|
515
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
516
|
+
* @param {*} [options] Override http request option.
|
|
517
|
+
* @throws {RequiredError}
|
|
518
|
+
*/
|
|
519
|
+
invariants(height, options) {
|
|
520
|
+
return localVarFp.invariants(height, options).then((request) => request(axios, basePath));
|
|
521
|
+
},
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* InvariantsApi - object-oriented interface
|
|
526
|
+
* @export
|
|
527
|
+
* @class InvariantsApi
|
|
528
|
+
* @extends {BaseAPI}
|
|
529
|
+
*/
|
|
530
|
+
class InvariantsApi extends BaseAPI {
|
|
531
|
+
/**
|
|
532
|
+
* Returns result of running the given invariant.
|
|
533
|
+
* @param {string} invariant
|
|
534
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
535
|
+
* @param {*} [options] Override http request option.
|
|
536
|
+
* @throws {RequiredError}
|
|
537
|
+
* @memberof InvariantsApi
|
|
538
|
+
*/
|
|
539
|
+
invariant(invariant, height, options) {
|
|
540
|
+
return InvariantsApiFp(this.configuration).invariant(invariant, height, options).then((request) => request(this.axios, this.basePath));
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Returns a list of available invariants.
|
|
544
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
545
|
+
* @param {*} [options] Override http request option.
|
|
546
|
+
* @throws {RequiredError}
|
|
547
|
+
* @memberof InvariantsApi
|
|
548
|
+
*/
|
|
549
|
+
invariants(height, options) {
|
|
550
|
+
return InvariantsApiFp(this.configuration).invariants(height, options).then((request) => request(this.axios, this.basePath));
|
|
551
|
+
}
|
|
552
|
+
}
|
|
221
553
|
/**
|
|
222
554
|
* LiquidityProvidersApi - axios parameter creator
|
|
223
555
|
* @export
|
|
@@ -1755,6 +2087,34 @@ const QueueApiAxiosParamCreator = function (configuration) {
|
|
|
1755
2087
|
options: localVarRequestOptions,
|
|
1756
2088
|
};
|
|
1757
2089
|
}),
|
|
2090
|
+
/**
|
|
2091
|
+
* Returns the swap queue.
|
|
2092
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2093
|
+
* @param {*} [options] Override http request option.
|
|
2094
|
+
* @throws {RequiredError}
|
|
2095
|
+
*/
|
|
2096
|
+
queueSwap: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2097
|
+
const localVarPath = `/thorchain/queue/swap`;
|
|
2098
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2099
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2100
|
+
let baseOptions;
|
|
2101
|
+
if (configuration) {
|
|
2102
|
+
baseOptions = configuration.baseOptions;
|
|
2103
|
+
}
|
|
2104
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2105
|
+
const localVarHeaderParameter = {};
|
|
2106
|
+
const localVarQueryParameter = {};
|
|
2107
|
+
if (height !== undefined) {
|
|
2108
|
+
localVarQueryParameter['height'] = height;
|
|
2109
|
+
}
|
|
2110
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2111
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2112
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2113
|
+
return {
|
|
2114
|
+
url: toPathString(localVarUrlObj),
|
|
2115
|
+
options: localVarRequestOptions,
|
|
2116
|
+
};
|
|
2117
|
+
}),
|
|
1758
2118
|
};
|
|
1759
2119
|
};
|
|
1760
2120
|
/**
|
|
@@ -1800,6 +2160,18 @@ const QueueApiFp = function (configuration) {
|
|
|
1800
2160
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1801
2161
|
});
|
|
1802
2162
|
},
|
|
2163
|
+
/**
|
|
2164
|
+
* Returns the swap queue.
|
|
2165
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2166
|
+
* @param {*} [options] Override http request option.
|
|
2167
|
+
* @throws {RequiredError}
|
|
2168
|
+
*/
|
|
2169
|
+
queueSwap(height, options) {
|
|
2170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2171
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.queueSwap(height, options);
|
|
2172
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2173
|
+
});
|
|
2174
|
+
},
|
|
1803
2175
|
};
|
|
1804
2176
|
};
|
|
1805
2177
|
/**
|
|
@@ -1836,6 +2208,15 @@ const QueueApiFactory = function (configuration, basePath, axios) {
|
|
|
1836
2208
|
queueScheduled(height, options) {
|
|
1837
2209
|
return localVarFp.queueScheduled(height, options).then((request) => request(axios, basePath));
|
|
1838
2210
|
},
|
|
2211
|
+
/**
|
|
2212
|
+
* Returns the swap queue.
|
|
2213
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2214
|
+
* @param {*} [options] Override http request option.
|
|
2215
|
+
* @throws {RequiredError}
|
|
2216
|
+
*/
|
|
2217
|
+
queueSwap(height, options) {
|
|
2218
|
+
return localVarFp.queueSwap(height, options).then((request) => request(axios, basePath));
|
|
2219
|
+
},
|
|
1839
2220
|
};
|
|
1840
2221
|
};
|
|
1841
2222
|
/**
|
|
@@ -1875,6 +2256,16 @@ class QueueApi extends BaseAPI {
|
|
|
1875
2256
|
queueScheduled(height, options) {
|
|
1876
2257
|
return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
|
|
1877
2258
|
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Returns the swap queue.
|
|
2261
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2262
|
+
* @param {*} [options] Override http request option.
|
|
2263
|
+
* @throws {RequiredError}
|
|
2264
|
+
* @memberof QueueApi
|
|
2265
|
+
*/
|
|
2266
|
+
queueSwap(height, options) {
|
|
2267
|
+
return QueueApiFp(this.configuration).queueSwap(height, options).then((request) => request(this.axios, this.basePath));
|
|
2268
|
+
}
|
|
1878
2269
|
}
|
|
1879
2270
|
/**
|
|
1880
2271
|
* QuoteApi - axios parameter creator
|
|
@@ -1965,13 +2356,14 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
1965
2356
|
* @param {string} [toAsset] the target asset
|
|
1966
2357
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
1967
2358
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2359
|
+
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
1968
2360
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
1969
2361
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
1970
2362
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
1971
2363
|
* @param {*} [options] Override http request option.
|
|
1972
2364
|
* @throws {RequiredError}
|
|
1973
2365
|
*/
|
|
1974
|
-
quoteswap: (height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2366
|
+
quoteswap: (height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1975
2367
|
const localVarPath = `/thorchain/quote/swap`;
|
|
1976
2368
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1977
2369
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -1997,6 +2389,9 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
1997
2389
|
if (destination !== undefined) {
|
|
1998
2390
|
localVarQueryParameter['destination'] = destination;
|
|
1999
2391
|
}
|
|
2392
|
+
if (fromAddress !== undefined) {
|
|
2393
|
+
localVarQueryParameter['from_address'] = fromAddress;
|
|
2394
|
+
}
|
|
2000
2395
|
if (toleranceBps !== undefined) {
|
|
2001
2396
|
localVarQueryParameter['tolerance_bps'] = toleranceBps;
|
|
2002
2397
|
}
|
|
@@ -2059,15 +2454,16 @@ const QuoteApiFp = function (configuration) {
|
|
|
2059
2454
|
* @param {string} [toAsset] the target asset
|
|
2060
2455
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2061
2456
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2457
|
+
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
2062
2458
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2063
2459
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2064
2460
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2065
2461
|
* @param {*} [options] Override http request option.
|
|
2066
2462
|
* @throws {RequiredError}
|
|
2067
2463
|
*/
|
|
2068
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options) {
|
|
2464
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
|
|
2069
2465
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2070
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, toleranceBps, affiliateBps, affiliate, options);
|
|
2466
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options);
|
|
2071
2467
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2072
2468
|
});
|
|
2073
2469
|
},
|
|
@@ -2110,14 +2506,15 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
2110
2506
|
* @param {string} [toAsset] the target asset
|
|
2111
2507
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2112
2508
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2509
|
+
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
2113
2510
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2114
2511
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2115
2512
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2116
2513
|
* @param {*} [options] Override http request option.
|
|
2117
2514
|
* @throws {RequiredError}
|
|
2118
2515
|
*/
|
|
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));
|
|
2516
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
|
|
2517
|
+
return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
|
|
2121
2518
|
},
|
|
2122
2519
|
};
|
|
2123
2520
|
};
|
|
@@ -2160,6 +2557,7 @@ class QuoteApi extends BaseAPI {
|
|
|
2160
2557
|
* @param {string} [toAsset] the target asset
|
|
2161
2558
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2162
2559
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2560
|
+
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
2163
2561
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2164
2562
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2165
2563
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
@@ -2167,8 +2565,8 @@ class QuoteApi extends BaseAPI {
|
|
|
2167
2565
|
* @throws {RequiredError}
|
|
2168
2566
|
* @memberof QuoteApi
|
|
2169
2567
|
*/
|
|
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));
|
|
2568
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
|
|
2569
|
+
return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
|
|
2172
2570
|
}
|
|
2173
2571
|
}
|
|
2174
2572
|
/**
|
|
@@ -3136,7 +3534,7 @@ const VaultsApiAxiosParamCreator = function (configuration) {
|
|
|
3136
3534
|
vault: (pubkey, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3137
3535
|
// verify required parameter 'pubkey' is not null or undefined
|
|
3138
3536
|
assertParamExists('vault', 'pubkey', pubkey);
|
|
3139
|
-
const localVarPath = `/thorchain/
|
|
3537
|
+
const localVarPath = `/thorchain/vault/{pubkey}`
|
|
3140
3538
|
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
3141
3539
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3142
3540
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -3376,7 +3774,7 @@ class VaultsApi extends BaseAPI {
|
|
|
3376
3774
|
* Thornode API
|
|
3377
3775
|
* Thornode REST API.
|
|
3378
3776
|
*
|
|
3379
|
-
* The version of the OpenAPI document: 1.
|
|
3777
|
+
* The version of the OpenAPI document: 1.107.0
|
|
3380
3778
|
* Contact: devs@thorchain.org
|
|
3381
3779
|
*
|
|
3382
3780
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3411,4 +3809,4 @@ class Configuration {
|
|
|
3411
3809
|
|
|
3412
3810
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
3413
3811
|
|
|
3414
|
-
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 };
|
|
3812
|
+
export { BorrowersApi, BorrowersApiAxiosParamCreator, BorrowersApiFactory, BorrowersApiFp, Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, 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 };
|