@xchainjs/xchain-thornode 0.3.9 → 0.3.11

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
@@ -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} [amount] the asset amount in 1e8 decimals
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, amount, toAsset, loanOwner, minOut, options = {}) => __awaiter(this, void 0, void 0, function* () {
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 (amount !== undefined) {
2590
- localVarQueryParameter['amount'] = amount;
2748
+ if (repayBps !== undefined) {
2749
+ localVarQueryParameter['repay_bps'] = repayBps;
2591
2750
  }
2592
2751
  if (toAsset !== undefined) {
2593
2752
  localVarQueryParameter['to_asset'] = toAsset;
@@ -2745,6 +2904,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2745
2904
  * @param {string} [toAsset] the target asset
2746
2905
  * @param {number} [amount] the source asset amount in 1e8 decimals
2747
2906
  * @param {string} [destination] the destination address, required to generate memo
2907
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
2748
2908
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2749
2909
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2750
2910
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -2753,7 +2913,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2753
2913
  * @param {*} [options] Override http request option.
2754
2914
  * @throws {RequiredError}
2755
2915
  */
2756
- quoteswap: (height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2916
+ quoteswap: (height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2757
2917
  const localVarPath = `/thorchain/quote/swap`;
2758
2918
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2759
2919
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2779,6 +2939,9 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2779
2939
  if (destination !== undefined) {
2780
2940
  localVarQueryParameter['destination'] = destination;
2781
2941
  }
2942
+ if (refundAddress !== undefined) {
2943
+ localVarQueryParameter['refund_address'] = refundAddress;
2944
+ }
2782
2945
  if (streamingInterval !== undefined) {
2783
2946
  localVarQueryParameter['streaming_interval'] = streamingInterval;
2784
2947
  }
@@ -2815,16 +2978,16 @@ const QuoteApiFp = function (configuration) {
2815
2978
  * Provide a quote estimate for the provided loan close.
2816
2979
  * @param {number} [height] optional block height, defaults to current tip
2817
2980
  * @param {string} [fromAsset] the asset used to repay the loan
2818
- * @param {number} [amount] the asset amount in 1e8 decimals
2981
+ * @param {number} [repayBps] the basis points of the existing position to repay
2819
2982
  * @param {string} [toAsset] the collateral asset of the loan
2820
2983
  * @param {string} [loanOwner] the owner of the loan collateral
2821
2984
  * @param {string} [minOut] the minimum amount of the target asset to accept
2822
2985
  * @param {*} [options] Override http request option.
2823
2986
  * @throws {RequiredError}
2824
2987
  */
2825
- quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options) {
2988
+ quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
2826
2989
  return __awaiter(this, void 0, void 0, function* () {
2827
- const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options);
2990
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options);
2828
2991
  return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
2829
2992
  });
2830
2993
  },
@@ -2883,6 +3046,7 @@ const QuoteApiFp = function (configuration) {
2883
3046
  * @param {string} [toAsset] the target asset
2884
3047
  * @param {number} [amount] the source asset amount in 1e8 decimals
2885
3048
  * @param {string} [destination] the destination address, required to generate memo
3049
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
2886
3050
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2887
3051
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2888
3052
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -2891,9 +3055,9 @@ const QuoteApiFp = function (configuration) {
2891
3055
  * @param {*} [options] Override http request option.
2892
3056
  * @throws {RequiredError}
2893
3057
  */
2894
- quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3058
+ quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
2895
3059
  return __awaiter(this, void 0, void 0, function* () {
2896
- const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
3060
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
2897
3061
  return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
2898
3062
  });
2899
3063
  },
@@ -2910,15 +3074,15 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2910
3074
  * Provide a quote estimate for the provided loan close.
2911
3075
  * @param {number} [height] optional block height, defaults to current tip
2912
3076
  * @param {string} [fromAsset] the asset used to repay the loan
2913
- * @param {number} [amount] the asset amount in 1e8 decimals
3077
+ * @param {number} [repayBps] the basis points of the existing position to repay
2914
3078
  * @param {string} [toAsset] the collateral asset of the loan
2915
3079
  * @param {string} [loanOwner] the owner of the loan collateral
2916
3080
  * @param {string} [minOut] the minimum amount of the target asset to accept
2917
3081
  * @param {*} [options] Override http request option.
2918
3082
  * @throws {RequiredError}
2919
3083
  */
2920
- quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options) {
2921
- return localVarFp.quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
3084
+ quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
3085
+ return localVarFp.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
2922
3086
  },
2923
3087
  /**
2924
3088
  * Provide a quote estimate for the provided loan open.
@@ -2966,6 +3130,7 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2966
3130
  * @param {string} [toAsset] the target asset
2967
3131
  * @param {number} [amount] the source asset amount in 1e8 decimals
2968
3132
  * @param {string} [destination] the destination address, required to generate memo
3133
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
2969
3134
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2970
3135
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2971
3136
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -2974,8 +3139,8 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2974
3139
  * @param {*} [options] Override http request option.
2975
3140
  * @throws {RequiredError}
2976
3141
  */
2977
- quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
2978
- return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
3142
+ quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3143
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2979
3144
  },
2980
3145
  };
2981
3146
  };
@@ -2990,7 +3155,7 @@ class QuoteApi extends BaseAPI {
2990
3155
  * Provide a quote estimate for the provided loan close.
2991
3156
  * @param {number} [height] optional block height, defaults to current tip
2992
3157
  * @param {string} [fromAsset] the asset used to repay the loan
2993
- * @param {number} [amount] the asset amount in 1e8 decimals
3158
+ * @param {number} [repayBps] the basis points of the existing position to repay
2994
3159
  * @param {string} [toAsset] the collateral asset of the loan
2995
3160
  * @param {string} [loanOwner] the owner of the loan collateral
2996
3161
  * @param {string} [minOut] the minimum amount of the target asset to accept
@@ -2998,8 +3163,8 @@ class QuoteApi extends BaseAPI {
2998
3163
  * @throws {RequiredError}
2999
3164
  * @memberof QuoteApi
3000
3165
  */
3001
- quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options) {
3002
- return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
3166
+ quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
3167
+ return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
3003
3168
  }
3004
3169
  /**
3005
3170
  * Provide a quote estimate for the provided loan open.
@@ -3050,6 +3215,7 @@ class QuoteApi extends BaseAPI {
3050
3215
  * @param {string} [toAsset] the target asset
3051
3216
  * @param {number} [amount] the source asset amount in 1e8 decimals
3052
3217
  * @param {string} [destination] the destination address, required to generate memo
3218
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
3053
3219
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
3054
3220
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
3055
3221
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -3059,8 +3225,8 @@ class QuoteApi extends BaseAPI {
3059
3225
  * @throws {RequiredError}
3060
3226
  * @memberof QuoteApi
3061
3227
  */
3062
- quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3063
- return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
3228
+ quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3229
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
3064
3230
  }
3065
3231
  }
3066
3232
  /**
@@ -3779,6 +3945,399 @@ class ThornamesApi extends BaseAPI {
3779
3945
  return ThornamesApiFp(this.configuration).thorname(name, height, options).then((request) => request(this.axios, this.basePath));
3780
3946
  }
3781
3947
  }
3948
+ /**
3949
+ * TradeAccountApi - axios parameter creator
3950
+ * @export
3951
+ */
3952
+ const TradeAccountApiAxiosParamCreator = function (configuration) {
3953
+ return {
3954
+ /**
3955
+ * Returns the units and depth of a trade account
3956
+ * @param {string} address
3957
+ * @param {number} [height] optional block height, defaults to current tip
3958
+ * @param {*} [options] Override http request option.
3959
+ * @throws {RequiredError}
3960
+ */
3961
+ tradeAccount: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
3962
+ // verify required parameter 'address' is not null or undefined
3963
+ assertParamExists('tradeAccount', 'address', address);
3964
+ const localVarPath = `/thorchain/trade/account/{address}`
3965
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
3966
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3967
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3968
+ let baseOptions;
3969
+ if (configuration) {
3970
+ baseOptions = configuration.baseOptions;
3971
+ }
3972
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3973
+ const localVarHeaderParameter = {};
3974
+ const localVarQueryParameter = {};
3975
+ if (height !== undefined) {
3976
+ localVarQueryParameter['height'] = height;
3977
+ }
3978
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3979
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3980
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3981
+ return {
3982
+ url: toPathString(localVarUrlObj),
3983
+ options: localVarRequestOptions,
3984
+ };
3985
+ }),
3986
+ };
3987
+ };
3988
+ /**
3989
+ * TradeAccountApi - functional programming interface
3990
+ * @export
3991
+ */
3992
+ const TradeAccountApiFp = function (configuration) {
3993
+ const localVarAxiosParamCreator = TradeAccountApiAxiosParamCreator(configuration);
3994
+ return {
3995
+ /**
3996
+ * Returns the units and depth of a trade account
3997
+ * @param {string} address
3998
+ * @param {number} [height] optional block height, defaults to current tip
3999
+ * @param {*} [options] Override http request option.
4000
+ * @throws {RequiredError}
4001
+ */
4002
+ tradeAccount(address, height, options) {
4003
+ return __awaiter(this, void 0, void 0, function* () {
4004
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeAccount(address, height, options);
4005
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
4006
+ });
4007
+ },
4008
+ };
4009
+ };
4010
+ /**
4011
+ * TradeAccountApi - factory interface
4012
+ * @export
4013
+ */
4014
+ const TradeAccountApiFactory = function (configuration, basePath, axios) {
4015
+ const localVarFp = TradeAccountApiFp(configuration);
4016
+ return {
4017
+ /**
4018
+ * Returns the units and depth of a trade account
4019
+ * @param {string} address
4020
+ * @param {number} [height] optional block height, defaults to current tip
4021
+ * @param {*} [options] Override http request option.
4022
+ * @throws {RequiredError}
4023
+ */
4024
+ tradeAccount(address, height, options) {
4025
+ return localVarFp.tradeAccount(address, height, options).then((request) => request(axios, basePath));
4026
+ },
4027
+ };
4028
+ };
4029
+ /**
4030
+ * TradeAccountApi - object-oriented interface
4031
+ * @export
4032
+ * @class TradeAccountApi
4033
+ * @extends {BaseAPI}
4034
+ */
4035
+ class TradeAccountApi extends BaseAPI {
4036
+ /**
4037
+ * Returns the units and depth of a trade account
4038
+ * @param {string} address
4039
+ * @param {number} [height] optional block height, defaults to current tip
4040
+ * @param {*} [options] Override http request option.
4041
+ * @throws {RequiredError}
4042
+ * @memberof TradeAccountApi
4043
+ */
4044
+ tradeAccount(address, height, options) {
4045
+ return TradeAccountApiFp(this.configuration).tradeAccount(address, height, options).then((request) => request(this.axios, this.basePath));
4046
+ }
4047
+ }
4048
+ /**
4049
+ * TradeAccountsApi - axios parameter creator
4050
+ * @export
4051
+ */
4052
+ const TradeAccountsApiAxiosParamCreator = function (configuration) {
4053
+ return {
4054
+ /**
4055
+ * Returns all trade accounts for an asset
4056
+ * @param {string} asset
4057
+ * @param {number} [height] optional block height, defaults to current tip
4058
+ * @param {*} [options] Override http request option.
4059
+ * @throws {RequiredError}
4060
+ */
4061
+ tradeAccounts: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
4062
+ // verify required parameter 'asset' is not null or undefined
4063
+ assertParamExists('tradeAccounts', 'asset', asset);
4064
+ const localVarPath = `/thorchain/trade/accounts/{asset}`
4065
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
4066
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4067
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4068
+ let baseOptions;
4069
+ if (configuration) {
4070
+ baseOptions = configuration.baseOptions;
4071
+ }
4072
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4073
+ const localVarHeaderParameter = {};
4074
+ const localVarQueryParameter = {};
4075
+ if (height !== undefined) {
4076
+ localVarQueryParameter['height'] = height;
4077
+ }
4078
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4079
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4080
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4081
+ return {
4082
+ url: toPathString(localVarUrlObj),
4083
+ options: localVarRequestOptions,
4084
+ };
4085
+ }),
4086
+ };
4087
+ };
4088
+ /**
4089
+ * TradeAccountsApi - functional programming interface
4090
+ * @export
4091
+ */
4092
+ const TradeAccountsApiFp = function (configuration) {
4093
+ const localVarAxiosParamCreator = TradeAccountsApiAxiosParamCreator(configuration);
4094
+ return {
4095
+ /**
4096
+ * Returns all trade accounts for an asset
4097
+ * @param {string} asset
4098
+ * @param {number} [height] optional block height, defaults to current tip
4099
+ * @param {*} [options] Override http request option.
4100
+ * @throws {RequiredError}
4101
+ */
4102
+ tradeAccounts(asset, height, options) {
4103
+ return __awaiter(this, void 0, void 0, function* () {
4104
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeAccounts(asset, height, options);
4105
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
4106
+ });
4107
+ },
4108
+ };
4109
+ };
4110
+ /**
4111
+ * TradeAccountsApi - factory interface
4112
+ * @export
4113
+ */
4114
+ const TradeAccountsApiFactory = function (configuration, basePath, axios) {
4115
+ const localVarFp = TradeAccountsApiFp(configuration);
4116
+ return {
4117
+ /**
4118
+ * Returns all trade accounts for an asset
4119
+ * @param {string} asset
4120
+ * @param {number} [height] optional block height, defaults to current tip
4121
+ * @param {*} [options] Override http request option.
4122
+ * @throws {RequiredError}
4123
+ */
4124
+ tradeAccounts(asset, height, options) {
4125
+ return localVarFp.tradeAccounts(asset, height, options).then((request) => request(axios, basePath));
4126
+ },
4127
+ };
4128
+ };
4129
+ /**
4130
+ * TradeAccountsApi - object-oriented interface
4131
+ * @export
4132
+ * @class TradeAccountsApi
4133
+ * @extends {BaseAPI}
4134
+ */
4135
+ class TradeAccountsApi extends BaseAPI {
4136
+ /**
4137
+ * Returns all trade accounts for an asset
4138
+ * @param {string} asset
4139
+ * @param {number} [height] optional block height, defaults to current tip
4140
+ * @param {*} [options] Override http request option.
4141
+ * @throws {RequiredError}
4142
+ * @memberof TradeAccountsApi
4143
+ */
4144
+ tradeAccounts(asset, height, options) {
4145
+ return TradeAccountsApiFp(this.configuration).tradeAccounts(asset, height, options).then((request) => request(this.axios, this.basePath));
4146
+ }
4147
+ }
4148
+ /**
4149
+ * TradeUnitApi - axios parameter creator
4150
+ * @export
4151
+ */
4152
+ const TradeUnitApiAxiosParamCreator = function (configuration) {
4153
+ return {
4154
+ /**
4155
+ * Returns the total units and depth of a trade asset
4156
+ * @param {string} asset
4157
+ * @param {number} [height] optional block height, defaults to current tip
4158
+ * @param {*} [options] Override http request option.
4159
+ * @throws {RequiredError}
4160
+ */
4161
+ tradeUnit: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
4162
+ // verify required parameter 'asset' is not null or undefined
4163
+ assertParamExists('tradeUnit', 'asset', asset);
4164
+ const localVarPath = `/thorchain/trade/unit/{asset}`
4165
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
4166
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4167
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4168
+ let baseOptions;
4169
+ if (configuration) {
4170
+ baseOptions = configuration.baseOptions;
4171
+ }
4172
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4173
+ const localVarHeaderParameter = {};
4174
+ const localVarQueryParameter = {};
4175
+ if (height !== undefined) {
4176
+ localVarQueryParameter['height'] = height;
4177
+ }
4178
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4179
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4180
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4181
+ return {
4182
+ url: toPathString(localVarUrlObj),
4183
+ options: localVarRequestOptions,
4184
+ };
4185
+ }),
4186
+ };
4187
+ };
4188
+ /**
4189
+ * TradeUnitApi - functional programming interface
4190
+ * @export
4191
+ */
4192
+ const TradeUnitApiFp = function (configuration) {
4193
+ const localVarAxiosParamCreator = TradeUnitApiAxiosParamCreator(configuration);
4194
+ return {
4195
+ /**
4196
+ * Returns the total units and depth of a trade asset
4197
+ * @param {string} asset
4198
+ * @param {number} [height] optional block height, defaults to current tip
4199
+ * @param {*} [options] Override http request option.
4200
+ * @throws {RequiredError}
4201
+ */
4202
+ tradeUnit(asset, height, options) {
4203
+ return __awaiter(this, void 0, void 0, function* () {
4204
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeUnit(asset, height, options);
4205
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
4206
+ });
4207
+ },
4208
+ };
4209
+ };
4210
+ /**
4211
+ * TradeUnitApi - factory interface
4212
+ * @export
4213
+ */
4214
+ const TradeUnitApiFactory = function (configuration, basePath, axios) {
4215
+ const localVarFp = TradeUnitApiFp(configuration);
4216
+ return {
4217
+ /**
4218
+ * Returns the total units and depth of a trade asset
4219
+ * @param {string} asset
4220
+ * @param {number} [height] optional block height, defaults to current tip
4221
+ * @param {*} [options] Override http request option.
4222
+ * @throws {RequiredError}
4223
+ */
4224
+ tradeUnit(asset, height, options) {
4225
+ return localVarFp.tradeUnit(asset, height, options).then((request) => request(axios, basePath));
4226
+ },
4227
+ };
4228
+ };
4229
+ /**
4230
+ * TradeUnitApi - object-oriented interface
4231
+ * @export
4232
+ * @class TradeUnitApi
4233
+ * @extends {BaseAPI}
4234
+ */
4235
+ class TradeUnitApi extends BaseAPI {
4236
+ /**
4237
+ * Returns the total units and depth of a trade asset
4238
+ * @param {string} asset
4239
+ * @param {number} [height] optional block height, defaults to current tip
4240
+ * @param {*} [options] Override http request option.
4241
+ * @throws {RequiredError}
4242
+ * @memberof TradeUnitApi
4243
+ */
4244
+ tradeUnit(asset, height, options) {
4245
+ return TradeUnitApiFp(this.configuration).tradeUnit(asset, height, options).then((request) => request(this.axios, this.basePath));
4246
+ }
4247
+ }
4248
+ /**
4249
+ * TradeUnitsApi - axios parameter creator
4250
+ * @export
4251
+ */
4252
+ const TradeUnitsApiAxiosParamCreator = function (configuration) {
4253
+ return {
4254
+ /**
4255
+ * Returns the total units and depth for each trade asset
4256
+ * @param {number} [height] optional block height, defaults to current tip
4257
+ * @param {*} [options] Override http request option.
4258
+ * @throws {RequiredError}
4259
+ */
4260
+ tradeUnits: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
4261
+ const localVarPath = `/thorchain/trade/units`;
4262
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4263
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4264
+ let baseOptions;
4265
+ if (configuration) {
4266
+ baseOptions = configuration.baseOptions;
4267
+ }
4268
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4269
+ const localVarHeaderParameter = {};
4270
+ const localVarQueryParameter = {};
4271
+ if (height !== undefined) {
4272
+ localVarQueryParameter['height'] = height;
4273
+ }
4274
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4275
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4276
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4277
+ return {
4278
+ url: toPathString(localVarUrlObj),
4279
+ options: localVarRequestOptions,
4280
+ };
4281
+ }),
4282
+ };
4283
+ };
4284
+ /**
4285
+ * TradeUnitsApi - functional programming interface
4286
+ * @export
4287
+ */
4288
+ const TradeUnitsApiFp = function (configuration) {
4289
+ const localVarAxiosParamCreator = TradeUnitsApiAxiosParamCreator(configuration);
4290
+ return {
4291
+ /**
4292
+ * Returns the total units and depth for each trade asset
4293
+ * @param {number} [height] optional block height, defaults to current tip
4294
+ * @param {*} [options] Override http request option.
4295
+ * @throws {RequiredError}
4296
+ */
4297
+ tradeUnits(height, options) {
4298
+ return __awaiter(this, void 0, void 0, function* () {
4299
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeUnits(height, options);
4300
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
4301
+ });
4302
+ },
4303
+ };
4304
+ };
4305
+ /**
4306
+ * TradeUnitsApi - factory interface
4307
+ * @export
4308
+ */
4309
+ const TradeUnitsApiFactory = function (configuration, basePath, axios) {
4310
+ const localVarFp = TradeUnitsApiFp(configuration);
4311
+ return {
4312
+ /**
4313
+ * Returns the total units and depth for each trade asset
4314
+ * @param {number} [height] optional block height, defaults to current tip
4315
+ * @param {*} [options] Override http request option.
4316
+ * @throws {RequiredError}
4317
+ */
4318
+ tradeUnits(height, options) {
4319
+ return localVarFp.tradeUnits(height, options).then((request) => request(axios, basePath));
4320
+ },
4321
+ };
4322
+ };
4323
+ /**
4324
+ * TradeUnitsApi - object-oriented interface
4325
+ * @export
4326
+ * @class TradeUnitsApi
4327
+ * @extends {BaseAPI}
4328
+ */
4329
+ class TradeUnitsApi extends BaseAPI {
4330
+ /**
4331
+ * Returns the total units and depth for each trade asset
4332
+ * @param {number} [height] optional block height, defaults to current tip
4333
+ * @param {*} [options] Override http request option.
4334
+ * @throws {RequiredError}
4335
+ * @memberof TradeUnitsApi
4336
+ */
4337
+ tradeUnits(height, options) {
4338
+ return TradeUnitsApiFp(this.configuration).tradeUnits(height, options).then((request) => request(this.axios, this.basePath));
4339
+ }
4340
+ }
3782
4341
  /**
3783
4342
  * TransactionsApi - axios parameter creator
3784
4343
  * @export
@@ -4427,7 +4986,7 @@ class VaultsApi extends BaseAPI {
4427
4986
  * Thornode API
4428
4987
  * Thornode REST API.
4429
4988
  *
4430
- * The version of the OpenAPI document: 1.124.0
4989
+ * The version of the OpenAPI document: 1.128.1
4431
4990
  * Contact: devs@thorchain.org
4432
4991
  *
4433
4992
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4460,6 +5019,9 @@ class Configuration {
4460
5019
  }
4461
5020
  }
4462
5021
 
5022
+ /**
5023
+ * The base URL for the THORNode API endpoint.
5024
+ */
4463
5025
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
4464
5026
 
4465
5027
  exports.BlockApi = BlockApi;
@@ -4470,6 +5032,10 @@ exports.BorrowersApi = BorrowersApi;
4470
5032
  exports.BorrowersApiAxiosParamCreator = BorrowersApiAxiosParamCreator;
4471
5033
  exports.BorrowersApiFactory = BorrowersApiFactory;
4472
5034
  exports.BorrowersApiFp = BorrowersApiFp;
5035
+ exports.CloutApi = CloutApi;
5036
+ exports.CloutApiAxiosParamCreator = CloutApiAxiosParamCreator;
5037
+ exports.CloutApiFactory = CloutApiFactory;
5038
+ exports.CloutApiFp = CloutApiFp;
4473
5039
  exports.Configuration = Configuration;
4474
5040
  exports.HealthApi = HealthApi;
4475
5041
  exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
@@ -4530,6 +5096,22 @@ exports.ThornamesApi = ThornamesApi;
4530
5096
  exports.ThornamesApiAxiosParamCreator = ThornamesApiAxiosParamCreator;
4531
5097
  exports.ThornamesApiFactory = ThornamesApiFactory;
4532
5098
  exports.ThornamesApiFp = ThornamesApiFp;
5099
+ exports.TradeAccountApi = TradeAccountApi;
5100
+ exports.TradeAccountApiAxiosParamCreator = TradeAccountApiAxiosParamCreator;
5101
+ exports.TradeAccountApiFactory = TradeAccountApiFactory;
5102
+ exports.TradeAccountApiFp = TradeAccountApiFp;
5103
+ exports.TradeAccountsApi = TradeAccountsApi;
5104
+ exports.TradeAccountsApiAxiosParamCreator = TradeAccountsApiAxiosParamCreator;
5105
+ exports.TradeAccountsApiFactory = TradeAccountsApiFactory;
5106
+ exports.TradeAccountsApiFp = TradeAccountsApiFp;
5107
+ exports.TradeUnitApi = TradeUnitApi;
5108
+ exports.TradeUnitApiAxiosParamCreator = TradeUnitApiAxiosParamCreator;
5109
+ exports.TradeUnitApiFactory = TradeUnitApiFactory;
5110
+ exports.TradeUnitApiFp = TradeUnitApiFp;
5111
+ exports.TradeUnitsApi = TradeUnitsApi;
5112
+ exports.TradeUnitsApiAxiosParamCreator = TradeUnitsApiAxiosParamCreator;
5113
+ exports.TradeUnitsApiFactory = TradeUnitsApiFactory;
5114
+ exports.TradeUnitsApiFp = TradeUnitsApiFp;
4533
5115
  exports.TransactionsApi = TransactionsApi;
4534
5116
  exports.TransactionsApiAxiosParamCreator = TransactionsApiAxiosParamCreator;
4535
5117
  exports.TransactionsApiFactory = TransactionsApiFactory;