@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.esm.js
CHANGED
|
@@ -398,6 +398,106 @@ class BorrowersApi extends BaseAPI {
|
|
|
398
398
|
return BorrowersApiFp(this.configuration).borrowers(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
+
/**
|
|
402
|
+
* CloutApi - axios parameter creator
|
|
403
|
+
* @export
|
|
404
|
+
*/
|
|
405
|
+
const CloutApiAxiosParamCreator = function (configuration) {
|
|
406
|
+
return {
|
|
407
|
+
/**
|
|
408
|
+
* Returns the clout score of an address
|
|
409
|
+
* @param {string} address
|
|
410
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
411
|
+
* @param {*} [options] Override http request option.
|
|
412
|
+
* @throws {RequiredError}
|
|
413
|
+
*/
|
|
414
|
+
swapperClout: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
// verify required parameter 'address' is not null or undefined
|
|
416
|
+
assertParamExists('swapperClout', 'address', address);
|
|
417
|
+
const localVarPath = `/thorchain/clout/swap/{address}`
|
|
418
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
419
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
420
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
421
|
+
let baseOptions;
|
|
422
|
+
if (configuration) {
|
|
423
|
+
baseOptions = configuration.baseOptions;
|
|
424
|
+
}
|
|
425
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
426
|
+
const localVarHeaderParameter = {};
|
|
427
|
+
const localVarQueryParameter = {};
|
|
428
|
+
if (height !== undefined) {
|
|
429
|
+
localVarQueryParameter['height'] = height;
|
|
430
|
+
}
|
|
431
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
432
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
433
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
434
|
+
return {
|
|
435
|
+
url: toPathString(localVarUrlObj),
|
|
436
|
+
options: localVarRequestOptions,
|
|
437
|
+
};
|
|
438
|
+
}),
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* CloutApi - functional programming interface
|
|
443
|
+
* @export
|
|
444
|
+
*/
|
|
445
|
+
const CloutApiFp = function (configuration) {
|
|
446
|
+
const localVarAxiosParamCreator = CloutApiAxiosParamCreator(configuration);
|
|
447
|
+
return {
|
|
448
|
+
/**
|
|
449
|
+
* Returns the clout score of an address
|
|
450
|
+
* @param {string} address
|
|
451
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
452
|
+
* @param {*} [options] Override http request option.
|
|
453
|
+
* @throws {RequiredError}
|
|
454
|
+
*/
|
|
455
|
+
swapperClout(address, height, options) {
|
|
456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
457
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.swapperClout(address, height, options);
|
|
458
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
459
|
+
});
|
|
460
|
+
},
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
/**
|
|
464
|
+
* CloutApi - factory interface
|
|
465
|
+
* @export
|
|
466
|
+
*/
|
|
467
|
+
const CloutApiFactory = function (configuration, basePath, axios) {
|
|
468
|
+
const localVarFp = CloutApiFp(configuration);
|
|
469
|
+
return {
|
|
470
|
+
/**
|
|
471
|
+
* Returns the clout score of an address
|
|
472
|
+
* @param {string} address
|
|
473
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
474
|
+
* @param {*} [options] Override http request option.
|
|
475
|
+
* @throws {RequiredError}
|
|
476
|
+
*/
|
|
477
|
+
swapperClout(address, height, options) {
|
|
478
|
+
return localVarFp.swapperClout(address, height, options).then((request) => request(axios, basePath));
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* CloutApi - object-oriented interface
|
|
484
|
+
* @export
|
|
485
|
+
* @class CloutApi
|
|
486
|
+
* @extends {BaseAPI}
|
|
487
|
+
*/
|
|
488
|
+
class CloutApi extends BaseAPI {
|
|
489
|
+
/**
|
|
490
|
+
* Returns the clout score of an address
|
|
491
|
+
* @param {string} address
|
|
492
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
493
|
+
* @param {*} [options] Override http request option.
|
|
494
|
+
* @throws {RequiredError}
|
|
495
|
+
* @memberof CloutApi
|
|
496
|
+
*/
|
|
497
|
+
swapperClout(address, height, options) {
|
|
498
|
+
return CloutApiFp(this.configuration).swapperClout(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
499
|
+
}
|
|
500
|
+
}
|
|
401
501
|
/**
|
|
402
502
|
* HealthApi - axios parameter creator
|
|
403
503
|
* @export
|
|
@@ -998,6 +1098,34 @@ const MimirApiAxiosParamCreator = function (configuration) {
|
|
|
998
1098
|
options: localVarRequestOptions,
|
|
999
1099
|
};
|
|
1000
1100
|
}),
|
|
1101
|
+
/**
|
|
1102
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1103
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1104
|
+
* @param {*} [options] Override http request option.
|
|
1105
|
+
* @throws {RequiredError}
|
|
1106
|
+
*/
|
|
1107
|
+
mimirV2IDs: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1108
|
+
const localVarPath = `/thorchain/mimirV2/ids`;
|
|
1109
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1110
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1111
|
+
let baseOptions;
|
|
1112
|
+
if (configuration) {
|
|
1113
|
+
baseOptions = configuration.baseOptions;
|
|
1114
|
+
}
|
|
1115
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1116
|
+
const localVarHeaderParameter = {};
|
|
1117
|
+
const localVarQueryParameter = {};
|
|
1118
|
+
if (height !== undefined) {
|
|
1119
|
+
localVarQueryParameter['height'] = height;
|
|
1120
|
+
}
|
|
1121
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1122
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1123
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1124
|
+
return {
|
|
1125
|
+
url: toPathString(localVarUrlObj),
|
|
1126
|
+
options: localVarRequestOptions,
|
|
1127
|
+
};
|
|
1128
|
+
}),
|
|
1001
1129
|
};
|
|
1002
1130
|
};
|
|
1003
1131
|
/**
|
|
@@ -1081,6 +1209,18 @@ const MimirApiFp = function (configuration) {
|
|
|
1081
1209
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1082
1210
|
});
|
|
1083
1211
|
},
|
|
1212
|
+
/**
|
|
1213
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1214
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1215
|
+
* @param {*} [options] Override http request option.
|
|
1216
|
+
* @throws {RequiredError}
|
|
1217
|
+
*/
|
|
1218
|
+
mimirV2IDs(height, options) {
|
|
1219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1220
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirV2IDs(height, options);
|
|
1221
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1222
|
+
});
|
|
1223
|
+
},
|
|
1084
1224
|
};
|
|
1085
1225
|
};
|
|
1086
1226
|
/**
|
|
@@ -1146,6 +1286,15 @@ const MimirApiFactory = function (configuration, basePath, axios) {
|
|
|
1146
1286
|
mimirV2(height, options) {
|
|
1147
1287
|
return localVarFp.mimirV2(height, options).then((request) => request(axios, basePath));
|
|
1148
1288
|
},
|
|
1289
|
+
/**
|
|
1290
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1291
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1292
|
+
* @param {*} [options] Override http request option.
|
|
1293
|
+
* @throws {RequiredError}
|
|
1294
|
+
*/
|
|
1295
|
+
mimirV2IDs(height, options) {
|
|
1296
|
+
return localVarFp.mimirV2IDs(height, options).then((request) => request(axios, basePath));
|
|
1297
|
+
},
|
|
1149
1298
|
};
|
|
1150
1299
|
};
|
|
1151
1300
|
/**
|
|
@@ -1217,6 +1366,16 @@ class MimirApi extends BaseAPI {
|
|
|
1217
1366
|
mimirV2(height, options) {
|
|
1218
1367
|
return MimirApiFp(this.configuration).mimirV2(height, options).then((request) => request(this.axios, this.basePath));
|
|
1219
1368
|
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Returns mapping of mimir V2 IDs to name.
|
|
1371
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1372
|
+
* @param {*} [options] Override http request option.
|
|
1373
|
+
* @throws {RequiredError}
|
|
1374
|
+
* @memberof MimirApi
|
|
1375
|
+
*/
|
|
1376
|
+
mimirV2IDs(height, options) {
|
|
1377
|
+
return MimirApiFp(this.configuration).mimirV2IDs(height, options).then((request) => request(this.axios, this.basePath));
|
|
1378
|
+
}
|
|
1220
1379
|
}
|
|
1221
1380
|
/**
|
|
1222
1381
|
* NetworkApi - axios parameter creator
|
|
@@ -2554,14 +2713,14 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2554
2713
|
* Provide a quote estimate for the provided loan close.
|
|
2555
2714
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2556
2715
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2557
|
-
* @param {number} [
|
|
2716
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2558
2717
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2559
2718
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2560
2719
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
2561
2720
|
* @param {*} [options] Override http request option.
|
|
2562
2721
|
* @throws {RequiredError}
|
|
2563
2722
|
*/
|
|
2564
|
-
quoteloanclose: (height, fromAsset,
|
|
2723
|
+
quoteloanclose: (height, fromAsset, repayBps, toAsset, loanOwner, minOut, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2565
2724
|
const localVarPath = `/thorchain/quote/loan/close`;
|
|
2566
2725
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2567
2726
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2578,8 +2737,8 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2578
2737
|
if (fromAsset !== undefined) {
|
|
2579
2738
|
localVarQueryParameter['from_asset'] = fromAsset;
|
|
2580
2739
|
}
|
|
2581
|
-
if (
|
|
2582
|
-
localVarQueryParameter['
|
|
2740
|
+
if (repayBps !== undefined) {
|
|
2741
|
+
localVarQueryParameter['repay_bps'] = repayBps;
|
|
2583
2742
|
}
|
|
2584
2743
|
if (toAsset !== undefined) {
|
|
2585
2744
|
localVarQueryParameter['to_asset'] = toAsset;
|
|
@@ -2807,16 +2966,16 @@ const QuoteApiFp = function (configuration) {
|
|
|
2807
2966
|
* Provide a quote estimate for the provided loan close.
|
|
2808
2967
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2809
2968
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2810
|
-
* @param {number} [
|
|
2969
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2811
2970
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2812
2971
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2813
2972
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
2814
2973
|
* @param {*} [options] Override http request option.
|
|
2815
2974
|
* @throws {RequiredError}
|
|
2816
2975
|
*/
|
|
2817
|
-
quoteloanclose(height, fromAsset,
|
|
2976
|
+
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
2818
2977
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2819
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset,
|
|
2978
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options);
|
|
2820
2979
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2821
2980
|
});
|
|
2822
2981
|
},
|
|
@@ -2902,15 +3061,15 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
2902
3061
|
* Provide a quote estimate for the provided loan close.
|
|
2903
3062
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2904
3063
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2905
|
-
* @param {number} [
|
|
3064
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2906
3065
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2907
3066
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2908
3067
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
2909
3068
|
* @param {*} [options] Override http request option.
|
|
2910
3069
|
* @throws {RequiredError}
|
|
2911
3070
|
*/
|
|
2912
|
-
quoteloanclose(height, fromAsset,
|
|
2913
|
-
return localVarFp.quoteloanclose(height, fromAsset,
|
|
3071
|
+
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3072
|
+
return localVarFp.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
|
|
2914
3073
|
},
|
|
2915
3074
|
/**
|
|
2916
3075
|
* Provide a quote estimate for the provided loan open.
|
|
@@ -2982,7 +3141,7 @@ class QuoteApi extends BaseAPI {
|
|
|
2982
3141
|
* Provide a quote estimate for the provided loan close.
|
|
2983
3142
|
* @param {number} [height] optional block height, defaults to current tip
|
|
2984
3143
|
* @param {string} [fromAsset] the asset used to repay the loan
|
|
2985
|
-
* @param {number} [
|
|
3144
|
+
* @param {number} [repayBps] the basis points of the existing position to repay
|
|
2986
3145
|
* @param {string} [toAsset] the collateral asset of the loan
|
|
2987
3146
|
* @param {string} [loanOwner] the owner of the loan collateral
|
|
2988
3147
|
* @param {string} [minOut] the minimum amount of the target asset to accept
|
|
@@ -2990,8 +3149,8 @@ class QuoteApi extends BaseAPI {
|
|
|
2990
3149
|
* @throws {RequiredError}
|
|
2991
3150
|
* @memberof QuoteApi
|
|
2992
3151
|
*/
|
|
2993
|
-
quoteloanclose(height, fromAsset,
|
|
2994
|
-
return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset,
|
|
3152
|
+
quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
|
|
3153
|
+
return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
|
|
2995
3154
|
}
|
|
2996
3155
|
/**
|
|
2997
3156
|
* Provide a quote estimate for the provided loan open.
|
|
@@ -4419,7 +4578,7 @@ class VaultsApi extends BaseAPI {
|
|
|
4419
4578
|
* Thornode API
|
|
4420
4579
|
* Thornode REST API.
|
|
4421
4580
|
*
|
|
4422
|
-
* The version of the OpenAPI document: 1.
|
|
4581
|
+
* The version of the OpenAPI document: 1.126.0
|
|
4423
4582
|
* Contact: devs@thorchain.org
|
|
4424
4583
|
*
|
|
4425
4584
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4454,5 +4613,5 @@ class Configuration {
|
|
|
4454
4613
|
|
|
4455
4614
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
4456
4615
|
|
|
4457
|
-
export { BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp, 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, StreamingSwapApi, StreamingSwapApiAxiosParamCreator, StreamingSwapApiFactory, StreamingSwapApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
|
|
4616
|
+
export { BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp, BorrowersApi, BorrowersApiAxiosParamCreator, BorrowersApiFactory, BorrowersApiFp, CloutApi, CloutApiAxiosParamCreator, CloutApiFactory, CloutApiFp, 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, StreamingSwapApi, StreamingSwapApiAxiosParamCreator, StreamingSwapApiFactory, StreamingSwapApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
|
|
4458
4617
|
//# sourceMappingURL=index.esm.js.map
|