@xchainjs/xchain-thornode 0.3.9 → 0.3.10
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 +261 -21
- 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 +174 -15
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +177 -14
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -406,6 +406,106 @@ class BorrowersApi extends BaseAPI {
|
|
|
406
406
|
return BorrowersApiFp(this.configuration).borrowers(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* CloutApi - axios parameter creator
|
|
411
|
+
* @export
|
|
412
|
+
*/
|
|
413
|
+
const CloutApiAxiosParamCreator = function (configuration) {
|
|
414
|
+
return {
|
|
415
|
+
/**
|
|
416
|
+
* Returns the clout score of an address
|
|
417
|
+
* @param {string} address
|
|
418
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
419
|
+
* @param {*} [options] Override http request option.
|
|
420
|
+
* @throws {RequiredError}
|
|
421
|
+
*/
|
|
422
|
+
swapperClout: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
423
|
+
// verify required parameter 'address' is not null or undefined
|
|
424
|
+
assertParamExists('swapperClout', 'address', address);
|
|
425
|
+
const localVarPath = `/thorchain/clout/swap/{address}`
|
|
426
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
427
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
428
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
429
|
+
let baseOptions;
|
|
430
|
+
if (configuration) {
|
|
431
|
+
baseOptions = configuration.baseOptions;
|
|
432
|
+
}
|
|
433
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
434
|
+
const localVarHeaderParameter = {};
|
|
435
|
+
const localVarQueryParameter = {};
|
|
436
|
+
if (height !== undefined) {
|
|
437
|
+
localVarQueryParameter['height'] = height;
|
|
438
|
+
}
|
|
439
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
440
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
441
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
442
|
+
return {
|
|
443
|
+
url: toPathString(localVarUrlObj),
|
|
444
|
+
options: localVarRequestOptions,
|
|
445
|
+
};
|
|
446
|
+
}),
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* CloutApi - functional programming interface
|
|
451
|
+
* @export
|
|
452
|
+
*/
|
|
453
|
+
const CloutApiFp = function (configuration) {
|
|
454
|
+
const localVarAxiosParamCreator = CloutApiAxiosParamCreator(configuration);
|
|
455
|
+
return {
|
|
456
|
+
/**
|
|
457
|
+
* Returns the clout score of an address
|
|
458
|
+
* @param {string} address
|
|
459
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
460
|
+
* @param {*} [options] Override http request option.
|
|
461
|
+
* @throws {RequiredError}
|
|
462
|
+
*/
|
|
463
|
+
swapperClout(address, height, options) {
|
|
464
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.swapperClout(address, height, options);
|
|
466
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
467
|
+
});
|
|
468
|
+
},
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* CloutApi - factory interface
|
|
473
|
+
* @export
|
|
474
|
+
*/
|
|
475
|
+
const CloutApiFactory = function (configuration, basePath, axios) {
|
|
476
|
+
const localVarFp = CloutApiFp(configuration);
|
|
477
|
+
return {
|
|
478
|
+
/**
|
|
479
|
+
* Returns the clout score of an address
|
|
480
|
+
* @param {string} address
|
|
481
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
482
|
+
* @param {*} [options] Override http request option.
|
|
483
|
+
* @throws {RequiredError}
|
|
484
|
+
*/
|
|
485
|
+
swapperClout(address, height, options) {
|
|
486
|
+
return localVarFp.swapperClout(address, height, options).then((request) => request(axios, basePath));
|
|
487
|
+
},
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* CloutApi - object-oriented interface
|
|
492
|
+
* @export
|
|
493
|
+
* @class CloutApi
|
|
494
|
+
* @extends {BaseAPI}
|
|
495
|
+
*/
|
|
496
|
+
class CloutApi extends BaseAPI {
|
|
497
|
+
/**
|
|
498
|
+
* Returns the clout score of an address
|
|
499
|
+
* @param {string} address
|
|
500
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
501
|
+
* @param {*} [options] Override http request option.
|
|
502
|
+
* @throws {RequiredError}
|
|
503
|
+
* @memberof CloutApi
|
|
504
|
+
*/
|
|
505
|
+
swapperClout(address, height, options) {
|
|
506
|
+
return CloutApiFp(this.configuration).swapperClout(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
507
|
+
}
|
|
508
|
+
}
|
|
409
509
|
/**
|
|
410
510
|
* HealthApi - axios parameter creator
|
|
411
511
|
* @export
|
|
@@ -1006,6 +1106,34 @@ const MimirApiAxiosParamCreator = function (configuration) {
|
|
|
1006
1106
|
options: localVarRequestOptions,
|
|
1007
1107
|
};
|
|
1008
1108
|
}),
|
|
1109
|
+
/**
|
|
1110
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1111
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1112
|
+
* @param {*} [options] Override http request option.
|
|
1113
|
+
* @throws {RequiredError}
|
|
1114
|
+
*/
|
|
1115
|
+
mimirV2IDs: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1116
|
+
const localVarPath = `/thorchain/mimirV2/ids`;
|
|
1117
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1118
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1119
|
+
let baseOptions;
|
|
1120
|
+
if (configuration) {
|
|
1121
|
+
baseOptions = configuration.baseOptions;
|
|
1122
|
+
}
|
|
1123
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1124
|
+
const localVarHeaderParameter = {};
|
|
1125
|
+
const localVarQueryParameter = {};
|
|
1126
|
+
if (height !== undefined) {
|
|
1127
|
+
localVarQueryParameter['height'] = height;
|
|
1128
|
+
}
|
|
1129
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1130
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1131
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1132
|
+
return {
|
|
1133
|
+
url: toPathString(localVarUrlObj),
|
|
1134
|
+
options: localVarRequestOptions,
|
|
1135
|
+
};
|
|
1136
|
+
}),
|
|
1009
1137
|
};
|
|
1010
1138
|
};
|
|
1011
1139
|
/**
|
|
@@ -1089,6 +1217,18 @@ const MimirApiFp = function (configuration) {
|
|
|
1089
1217
|
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
1090
1218
|
});
|
|
1091
1219
|
},
|
|
1220
|
+
/**
|
|
1221
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1222
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1223
|
+
* @param {*} [options] Override http request option.
|
|
1224
|
+
* @throws {RequiredError}
|
|
1225
|
+
*/
|
|
1226
|
+
mimirV2IDs(height, options) {
|
|
1227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1228
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirV2IDs(height, options);
|
|
1229
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
1230
|
+
});
|
|
1231
|
+
},
|
|
1092
1232
|
};
|
|
1093
1233
|
};
|
|
1094
1234
|
/**
|
|
@@ -1154,6 +1294,15 @@ const MimirApiFactory = function (configuration, basePath, axios) {
|
|
|
1154
1294
|
mimirV2(height, options) {
|
|
1155
1295
|
return localVarFp.mimirV2(height, options).then((request) => request(axios, basePath));
|
|
1156
1296
|
},
|
|
1297
|
+
/**
|
|
1298
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1299
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1300
|
+
* @param {*} [options] Override http request option.
|
|
1301
|
+
* @throws {RequiredError}
|
|
1302
|
+
*/
|
|
1303
|
+
mimirV2IDs(height, options) {
|
|
1304
|
+
return localVarFp.mimirV2IDs(height, options).then((request) => request(axios, basePath));
|
|
1305
|
+
},
|
|
1157
1306
|
};
|
|
1158
1307
|
};
|
|
1159
1308
|
/**
|
|
@@ -1225,6 +1374,16 @@ class MimirApi extends BaseAPI {
|
|
|
1225
1374
|
mimirV2(height, options) {
|
|
1226
1375
|
return MimirApiFp(this.configuration).mimirV2(height, options).then((request) => request(this.axios, this.basePath));
|
|
1227
1376
|
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1379
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1380
|
+
* @param {*} [options] Override http request option.
|
|
1381
|
+
* @throws {RequiredError}
|
|
1382
|
+
* @memberof MimirApi
|
|
1383
|
+
*/
|
|
1384
|
+
mimirV2IDs(height, options) {
|
|
1385
|
+
return MimirApiFp(this.configuration).mimirV2IDs(height, options).then((request) => request(this.axios, this.basePath));
|
|
1386
|
+
}
|
|
1228
1387
|
}
|
|
1229
1388
|
/**
|
|
1230
1389
|
* NetworkApi - axios parameter creator
|
|
@@ -2562,14 +2721,14 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2562
2721
|
* Provide a quote estimate for the provided loan close.
|
|
2563
2722
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2564
2723
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2565
|
-
* @param {number} [
|
|
2724
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2566
2725
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2567
2726
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2568
2727
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
2569
2728
|
* @param {*} [options] Override http request option.
|
|
2570
2729
|
* @throws {RequiredError}
|
|
2571
2730
|
*/
|
|
2572
|
-
quoteloanclose: (height, fromAsset,
|
|
2731
|
+
quoteloanclose: (height, fromAsset, repayBps, toAsset, loanOwner, minOut, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2573
2732
|
const localVarPath = `/thorchain/quote/loan/close`;
|
|
2574
2733
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2575
2734
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2586,8 +2745,8 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2586
2745
|
if (fromAsset !== undefined) {
|
|
2587
2746
|
localVarQueryParameter['from_asset'] = fromAsset;
|
|
2588
2747
|
}
|
|
2589
|
-
if (
|
|
2590
|
-
localVarQueryParameter['
|
|
2748
|
+
if (repayBps !== undefined) {
|
|
2749
|
+
localVarQueryParameter['repay_bps'] = repayBps;
|
|
2591
2750
|
}
|
|
2592
2751
|
if (toAsset !== undefined) {
|
|
2593
2752
|
localVarQueryParameter['to_asset'] = toAsset;
|
|
@@ -2815,16 +2974,16 @@ const QuoteApiFp = function (configuration) {
|
|
|
2815
2974
|
* Provide a quote estimate for the provided loan close.
|
|
2816
2975
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2817
2976
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2818
|
-
* @param {number} [
|
|
2977
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2819
2978
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2820
2979
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2821
2980
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
2822
2981
|
* @param {*} [options] Override http request option.
|
|
2823
2982
|
* @throws {RequiredError}
|
|
2824
2983
|
*/
|
|
2825
|
-
quoteloanclose(height, fromAsset,
|
|
2984
|
+
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
2826
2985
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2827
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset,
|
|
2986
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options);
|
|
2828
2987
|
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
2829
2988
|
});
|
|
2830
2989
|
},
|
|
@@ -2910,15 +3069,15 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
2910
3069
|
* Provide a quote estimate for the provided loan close.
|
|
2911
3070
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2912
3071
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2913
|
-
* @param {number} [
|
|
3072
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2914
3073
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2915
3074
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2916
3075
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
2917
3076
|
* @param {*} [options] Override http request option.
|
|
2918
3077
|
* @throws {RequiredError}
|
|
2919
3078
|
*/
|
|
2920
|
-
quoteloanclose(height, fromAsset,
|
|
2921
|
-
return localVarFp.quoteloanclose(height, fromAsset,
|
|
3079
|
+
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3080
|
+
return localVarFp.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
|
|
2922
3081
|
},
|
|
2923
3082
|
/**
|
|
2924
3083
|
* Provide a quote estimate for the provided loan open.
|
|
@@ -2990,7 +3149,7 @@ class QuoteApi extends BaseAPI {
|
|
|
2990
3149
|
* Provide a quote estimate for the provided loan close.
|
|
2991
3150
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2992
3151
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2993
|
-
* @param {number} [
|
|
3152
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2994
3153
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2995
3154
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2996
3155
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
@@ -2998,8 +3157,8 @@ class QuoteApi extends BaseAPI {
|
|
|
2998
3157
|
* @throws {RequiredError}
|
|
2999
3158
|
* @memberof QuoteApi
|
|
3000
3159
|
*/
|
|
3001
|
-
quoteloanclose(height, fromAsset,
|
|
3002
|
-
return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset,
|
|
3160
|
+
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3161
|
+
return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
|
|
3003
3162
|
}
|
|
3004
3163
|
/**
|
|
3005
3164
|
* Provide a quote estimate for the provided loan open.
|
|
@@ -4427,7 +4586,7 @@ class VaultsApi extends BaseAPI {
|
|
|
4427
4586
|
* Thornode API
|
|
4428
4587
|
* Thornode REST API.
|
|
4429
4588
|
*
|
|
4430
|
-
* The version of the OpenAPI document: 1.
|
|
4589
|
+
* The version of the OpenAPI document: 1.126.0
|
|
4431
4590
|
* Contact: devs@thorchain.org
|
|
4432
4591
|
*
|
|
4433
4592
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4470,6 +4629,10 @@ exports.BorrowersApi = BorrowersApi;
|
|
|
4470
4629
|
exports.BorrowersApiAxiosParamCreator = BorrowersApiAxiosParamCreator;
|
|
4471
4630
|
exports.BorrowersApiFactory = BorrowersApiFactory;
|
|
4472
4631
|
exports.BorrowersApiFp = BorrowersApiFp;
|
|
4632
|
+
exports.CloutApi = CloutApi;
|
|
4633
|
+
exports.CloutApiAxiosParamCreator = CloutApiAxiosParamCreator;
|
|
4634
|
+
exports.CloutApiFactory = CloutApiFactory;
|
|
4635
|
+
exports.CloutApiFp = CloutApiFp;
|
|
4473
4636
|
exports.Configuration = Configuration;
|
|
4474
4637
|
exports.HealthApi = HealthApi;
|
|
4475
4638
|
exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
|