@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.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} [amount] the asset amount in 1e8 decimals
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, amount, toAsset, loanOwner, minOut, options = {}) => __awaiter(this, void 0, void 0, function* () {
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 (amount !== undefined) {
2582
- localVarQueryParameter['amount'] = amount;
2740
+ if (repayBps !== undefined) {
2741
+ localVarQueryParameter['repay_bps'] = repayBps;
2583
2742
  }
2584
2743
  if (toAsset !== undefined) {
2585
2744
  localVarQueryParameter['to_asset'] = toAsset;
@@ -2737,6 +2896,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2737
2896
  * @param {string} [toAsset] the target asset
2738
2897
  * @param {number} [amount] the source asset amount in 1e8 decimals
2739
2898
  * @param {string} [destination] the destination address, required to generate memo
2899
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
2740
2900
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2741
2901
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2742
2902
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -2745,7 +2905,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2745
2905
  * @param {*} [options] Override http request option.
2746
2906
  * @throws {RequiredError}
2747
2907
  */
2748
- quoteswap: (height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2908
+ quoteswap: (height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2749
2909
  const localVarPath = `/thorchain/quote/swap`;
2750
2910
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2751
2911
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2771,6 +2931,9 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2771
2931
  if (destination !== undefined) {
2772
2932
  localVarQueryParameter['destination'] = destination;
2773
2933
  }
2934
+ if (refundAddress !== undefined) {
2935
+ localVarQueryParameter['refund_address'] = refundAddress;
2936
+ }
2774
2937
  if (streamingInterval !== undefined) {
2775
2938
  localVarQueryParameter['streaming_interval'] = streamingInterval;
2776
2939
  }
@@ -2807,16 +2970,16 @@ const QuoteApiFp = function (configuration) {
2807
2970
  * Provide a quote estimate for the provided loan close.
2808
2971
  * @param {number} [height] optional block height, defaults to current tip
2809
2972
  * @param {string} [fromAsset] the asset used to repay the loan
2810
- * @param {number} [amount] the asset amount in 1e8 decimals
2973
+ * @param {number} [repayBps] the basis points of the existing position to repay
2811
2974
  * @param {string} [toAsset] the collateral asset of the loan
2812
2975
  * @param {string} [loanOwner] the owner of the loan collateral
2813
2976
  * @param {string} [minOut] the minimum amount of the target asset to accept
2814
2977
  * @param {*} [options] Override http request option.
2815
2978
  * @throws {RequiredError}
2816
2979
  */
2817
- quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options) {
2980
+ quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
2818
2981
  return __awaiter(this, void 0, void 0, function* () {
2819
- const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options);
2982
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options);
2820
2983
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2821
2984
  });
2822
2985
  },
@@ -2875,6 +3038,7 @@ const QuoteApiFp = function (configuration) {
2875
3038
  * @param {string} [toAsset] the target asset
2876
3039
  * @param {number} [amount] the source asset amount in 1e8 decimals
2877
3040
  * @param {string} [destination] the destination address, required to generate memo
3041
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
2878
3042
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2879
3043
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2880
3044
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -2883,9 +3047,9 @@ const QuoteApiFp = function (configuration) {
2883
3047
  * @param {*} [options] Override http request option.
2884
3048
  * @throws {RequiredError}
2885
3049
  */
2886
- quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3050
+ quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
2887
3051
  return __awaiter(this, void 0, void 0, function* () {
2888
- const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
3052
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
2889
3053
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2890
3054
  });
2891
3055
  },
@@ -2902,15 +3066,15 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2902
3066
  * Provide a quote estimate for the provided loan close.
2903
3067
  * @param {number} [height] optional block height, defaults to current tip
2904
3068
  * @param {string} [fromAsset] the asset used to repay the loan
2905
- * @param {number} [amount] the asset amount in 1e8 decimals
3069
+ * @param {number} [repayBps] the basis points of the existing position to repay
2906
3070
  * @param {string} [toAsset] the collateral asset of the loan
2907
3071
  * @param {string} [loanOwner] the owner of the loan collateral
2908
3072
  * @param {string} [minOut] the minimum amount of the target asset to accept
2909
3073
  * @param {*} [options] Override http request option.
2910
3074
  * @throws {RequiredError}
2911
3075
  */
2912
- quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options) {
2913
- return localVarFp.quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
3076
+ quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
3077
+ return localVarFp.quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(axios, basePath));
2914
3078
  },
2915
3079
  /**
2916
3080
  * Provide a quote estimate for the provided loan open.
@@ -2958,6 +3122,7 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2958
3122
  * @param {string} [toAsset] the target asset
2959
3123
  * @param {number} [amount] the source asset amount in 1e8 decimals
2960
3124
  * @param {string} [destination] the destination address, required to generate memo
3125
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
2961
3126
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2962
3127
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2963
3128
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -2966,8 +3131,8 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2966
3131
  * @param {*} [options] Override http request option.
2967
3132
  * @throws {RequiredError}
2968
3133
  */
2969
- quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
2970
- return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
3134
+ quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3135
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2971
3136
  },
2972
3137
  };
2973
3138
  };
@@ -2982,7 +3147,7 @@ class QuoteApi extends BaseAPI {
2982
3147
  * Provide a quote estimate for the provided loan close.
2983
3148
  * @param {number} [height] optional block height, defaults to current tip
2984
3149
  * @param {string} [fromAsset] the asset used to repay the loan
2985
- * @param {number} [amount] the asset amount in 1e8 decimals
3150
+ * @param {number} [repayBps] the basis points of the existing position to repay
2986
3151
  * @param {string} [toAsset] the collateral asset of the loan
2987
3152
  * @param {string} [loanOwner] the owner of the loan collateral
2988
3153
  * @param {string} [minOut] the minimum amount of the target asset to accept
@@ -2990,8 +3155,8 @@ class QuoteApi extends BaseAPI {
2990
3155
  * @throws {RequiredError}
2991
3156
  * @memberof QuoteApi
2992
3157
  */
2993
- quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options) {
2994
- return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, amount, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
3158
+ quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options) {
3159
+ return QuoteApiFp(this.configuration).quoteloanclose(height, fromAsset, repayBps, toAsset, loanOwner, minOut, options).then((request) => request(this.axios, this.basePath));
2995
3160
  }
2996
3161
  /**
2997
3162
  * Provide a quote estimate for the provided loan open.
@@ -3042,6 +3207,7 @@ class QuoteApi extends BaseAPI {
3042
3207
  * @param {string} [toAsset] the target asset
3043
3208
  * @param {number} [amount] the source asset amount in 1e8 decimals
3044
3209
  * @param {string} [destination] the destination address, required to generate memo
3210
+ * @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
3045
3211
  * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
3046
3212
  * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
3047
3213
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
@@ -3051,8 +3217,8 @@ class QuoteApi extends BaseAPI {
3051
3217
  * @throws {RequiredError}
3052
3218
  * @memberof QuoteApi
3053
3219
  */
3054
- quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3055
- return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
3220
+ quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
3221
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
3056
3222
  }
3057
3223
  }
3058
3224
  /**
@@ -3771,6 +3937,399 @@ class ThornamesApi extends BaseAPI {
3771
3937
  return ThornamesApiFp(this.configuration).thorname(name, height, options).then((request) => request(this.axios, this.basePath));
3772
3938
  }
3773
3939
  }
3940
+ /**
3941
+ * TradeAccountApi - axios parameter creator
3942
+ * @export
3943
+ */
3944
+ const TradeAccountApiAxiosParamCreator = function (configuration) {
3945
+ return {
3946
+ /**
3947
+ * Returns the units and depth of a trade account
3948
+ * @param {string} address
3949
+ * @param {number} [height] optional block height, defaults to current tip
3950
+ * @param {*} [options] Override http request option.
3951
+ * @throws {RequiredError}
3952
+ */
3953
+ tradeAccount: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
3954
+ // verify required parameter 'address' is not null or undefined
3955
+ assertParamExists('tradeAccount', 'address', address);
3956
+ const localVarPath = `/thorchain/trade/account/{address}`
3957
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
3958
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3959
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3960
+ let baseOptions;
3961
+ if (configuration) {
3962
+ baseOptions = configuration.baseOptions;
3963
+ }
3964
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3965
+ const localVarHeaderParameter = {};
3966
+ const localVarQueryParameter = {};
3967
+ if (height !== undefined) {
3968
+ localVarQueryParameter['height'] = height;
3969
+ }
3970
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3971
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3972
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3973
+ return {
3974
+ url: toPathString(localVarUrlObj),
3975
+ options: localVarRequestOptions,
3976
+ };
3977
+ }),
3978
+ };
3979
+ };
3980
+ /**
3981
+ * TradeAccountApi - functional programming interface
3982
+ * @export
3983
+ */
3984
+ const TradeAccountApiFp = function (configuration) {
3985
+ const localVarAxiosParamCreator = TradeAccountApiAxiosParamCreator(configuration);
3986
+ return {
3987
+ /**
3988
+ * Returns the units and depth of a trade account
3989
+ * @param {string} address
3990
+ * @param {number} [height] optional block height, defaults to current tip
3991
+ * @param {*} [options] Override http request option.
3992
+ * @throws {RequiredError}
3993
+ */
3994
+ tradeAccount(address, height, options) {
3995
+ return __awaiter(this, void 0, void 0, function* () {
3996
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeAccount(address, height, options);
3997
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3998
+ });
3999
+ },
4000
+ };
4001
+ };
4002
+ /**
4003
+ * TradeAccountApi - factory interface
4004
+ * @export
4005
+ */
4006
+ const TradeAccountApiFactory = function (configuration, basePath, axios) {
4007
+ const localVarFp = TradeAccountApiFp(configuration);
4008
+ return {
4009
+ /**
4010
+ * Returns the units and depth of a trade account
4011
+ * @param {string} address
4012
+ * @param {number} [height] optional block height, defaults to current tip
4013
+ * @param {*} [options] Override http request option.
4014
+ * @throws {RequiredError}
4015
+ */
4016
+ tradeAccount(address, height, options) {
4017
+ return localVarFp.tradeAccount(address, height, options).then((request) => request(axios, basePath));
4018
+ },
4019
+ };
4020
+ };
4021
+ /**
4022
+ * TradeAccountApi - object-oriented interface
4023
+ * @export
4024
+ * @class TradeAccountApi
4025
+ * @extends {BaseAPI}
4026
+ */
4027
+ class TradeAccountApi extends BaseAPI {
4028
+ /**
4029
+ * Returns the units and depth of a trade account
4030
+ * @param {string} address
4031
+ * @param {number} [height] optional block height, defaults to current tip
4032
+ * @param {*} [options] Override http request option.
4033
+ * @throws {RequiredError}
4034
+ * @memberof TradeAccountApi
4035
+ */
4036
+ tradeAccount(address, height, options) {
4037
+ return TradeAccountApiFp(this.configuration).tradeAccount(address, height, options).then((request) => request(this.axios, this.basePath));
4038
+ }
4039
+ }
4040
+ /**
4041
+ * TradeAccountsApi - axios parameter creator
4042
+ * @export
4043
+ */
4044
+ const TradeAccountsApiAxiosParamCreator = function (configuration) {
4045
+ return {
4046
+ /**
4047
+ * Returns all trade accounts for an asset
4048
+ * @param {string} asset
4049
+ * @param {number} [height] optional block height, defaults to current tip
4050
+ * @param {*} [options] Override http request option.
4051
+ * @throws {RequiredError}
4052
+ */
4053
+ tradeAccounts: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
4054
+ // verify required parameter 'asset' is not null or undefined
4055
+ assertParamExists('tradeAccounts', 'asset', asset);
4056
+ const localVarPath = `/thorchain/trade/accounts/{asset}`
4057
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
4058
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4059
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4060
+ let baseOptions;
4061
+ if (configuration) {
4062
+ baseOptions = configuration.baseOptions;
4063
+ }
4064
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4065
+ const localVarHeaderParameter = {};
4066
+ const localVarQueryParameter = {};
4067
+ if (height !== undefined) {
4068
+ localVarQueryParameter['height'] = height;
4069
+ }
4070
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4071
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4072
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4073
+ return {
4074
+ url: toPathString(localVarUrlObj),
4075
+ options: localVarRequestOptions,
4076
+ };
4077
+ }),
4078
+ };
4079
+ };
4080
+ /**
4081
+ * TradeAccountsApi - functional programming interface
4082
+ * @export
4083
+ */
4084
+ const TradeAccountsApiFp = function (configuration) {
4085
+ const localVarAxiosParamCreator = TradeAccountsApiAxiosParamCreator(configuration);
4086
+ return {
4087
+ /**
4088
+ * Returns all trade accounts for an asset
4089
+ * @param {string} asset
4090
+ * @param {number} [height] optional block height, defaults to current tip
4091
+ * @param {*} [options] Override http request option.
4092
+ * @throws {RequiredError}
4093
+ */
4094
+ tradeAccounts(asset, height, options) {
4095
+ return __awaiter(this, void 0, void 0, function* () {
4096
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeAccounts(asset, height, options);
4097
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4098
+ });
4099
+ },
4100
+ };
4101
+ };
4102
+ /**
4103
+ * TradeAccountsApi - factory interface
4104
+ * @export
4105
+ */
4106
+ const TradeAccountsApiFactory = function (configuration, basePath, axios) {
4107
+ const localVarFp = TradeAccountsApiFp(configuration);
4108
+ return {
4109
+ /**
4110
+ * Returns all trade accounts for an asset
4111
+ * @param {string} asset
4112
+ * @param {number} [height] optional block height, defaults to current tip
4113
+ * @param {*} [options] Override http request option.
4114
+ * @throws {RequiredError}
4115
+ */
4116
+ tradeAccounts(asset, height, options) {
4117
+ return localVarFp.tradeAccounts(asset, height, options).then((request) => request(axios, basePath));
4118
+ },
4119
+ };
4120
+ };
4121
+ /**
4122
+ * TradeAccountsApi - object-oriented interface
4123
+ * @export
4124
+ * @class TradeAccountsApi
4125
+ * @extends {BaseAPI}
4126
+ */
4127
+ class TradeAccountsApi extends BaseAPI {
4128
+ /**
4129
+ * Returns all trade accounts for an asset
4130
+ * @param {string} asset
4131
+ * @param {number} [height] optional block height, defaults to current tip
4132
+ * @param {*} [options] Override http request option.
4133
+ * @throws {RequiredError}
4134
+ * @memberof TradeAccountsApi
4135
+ */
4136
+ tradeAccounts(asset, height, options) {
4137
+ return TradeAccountsApiFp(this.configuration).tradeAccounts(asset, height, options).then((request) => request(this.axios, this.basePath));
4138
+ }
4139
+ }
4140
+ /**
4141
+ * TradeUnitApi - axios parameter creator
4142
+ * @export
4143
+ */
4144
+ const TradeUnitApiAxiosParamCreator = function (configuration) {
4145
+ return {
4146
+ /**
4147
+ * Returns the total units and depth of a trade asset
4148
+ * @param {string} asset
4149
+ * @param {number} [height] optional block height, defaults to current tip
4150
+ * @param {*} [options] Override http request option.
4151
+ * @throws {RequiredError}
4152
+ */
4153
+ tradeUnit: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
4154
+ // verify required parameter 'asset' is not null or undefined
4155
+ assertParamExists('tradeUnit', 'asset', asset);
4156
+ const localVarPath = `/thorchain/trade/unit/{asset}`
4157
+ .replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
4158
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4159
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4160
+ let baseOptions;
4161
+ if (configuration) {
4162
+ baseOptions = configuration.baseOptions;
4163
+ }
4164
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4165
+ const localVarHeaderParameter = {};
4166
+ const localVarQueryParameter = {};
4167
+ if (height !== undefined) {
4168
+ localVarQueryParameter['height'] = height;
4169
+ }
4170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4172
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4173
+ return {
4174
+ url: toPathString(localVarUrlObj),
4175
+ options: localVarRequestOptions,
4176
+ };
4177
+ }),
4178
+ };
4179
+ };
4180
+ /**
4181
+ * TradeUnitApi - functional programming interface
4182
+ * @export
4183
+ */
4184
+ const TradeUnitApiFp = function (configuration) {
4185
+ const localVarAxiosParamCreator = TradeUnitApiAxiosParamCreator(configuration);
4186
+ return {
4187
+ /**
4188
+ * Returns the total units and depth of a trade asset
4189
+ * @param {string} asset
4190
+ * @param {number} [height] optional block height, defaults to current tip
4191
+ * @param {*} [options] Override http request option.
4192
+ * @throws {RequiredError}
4193
+ */
4194
+ tradeUnit(asset, height, options) {
4195
+ return __awaiter(this, void 0, void 0, function* () {
4196
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeUnit(asset, height, options);
4197
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4198
+ });
4199
+ },
4200
+ };
4201
+ };
4202
+ /**
4203
+ * TradeUnitApi - factory interface
4204
+ * @export
4205
+ */
4206
+ const TradeUnitApiFactory = function (configuration, basePath, axios) {
4207
+ const localVarFp = TradeUnitApiFp(configuration);
4208
+ return {
4209
+ /**
4210
+ * Returns the total units and depth of a trade asset
4211
+ * @param {string} asset
4212
+ * @param {number} [height] optional block height, defaults to current tip
4213
+ * @param {*} [options] Override http request option.
4214
+ * @throws {RequiredError}
4215
+ */
4216
+ tradeUnit(asset, height, options) {
4217
+ return localVarFp.tradeUnit(asset, height, options).then((request) => request(axios, basePath));
4218
+ },
4219
+ };
4220
+ };
4221
+ /**
4222
+ * TradeUnitApi - object-oriented interface
4223
+ * @export
4224
+ * @class TradeUnitApi
4225
+ * @extends {BaseAPI}
4226
+ */
4227
+ class TradeUnitApi extends BaseAPI {
4228
+ /**
4229
+ * Returns the total units and depth of a trade asset
4230
+ * @param {string} asset
4231
+ * @param {number} [height] optional block height, defaults to current tip
4232
+ * @param {*} [options] Override http request option.
4233
+ * @throws {RequiredError}
4234
+ * @memberof TradeUnitApi
4235
+ */
4236
+ tradeUnit(asset, height, options) {
4237
+ return TradeUnitApiFp(this.configuration).tradeUnit(asset, height, options).then((request) => request(this.axios, this.basePath));
4238
+ }
4239
+ }
4240
+ /**
4241
+ * TradeUnitsApi - axios parameter creator
4242
+ * @export
4243
+ */
4244
+ const TradeUnitsApiAxiosParamCreator = function (configuration) {
4245
+ return {
4246
+ /**
4247
+ * Returns the total units and depth for each trade asset
4248
+ * @param {number} [height] optional block height, defaults to current tip
4249
+ * @param {*} [options] Override http request option.
4250
+ * @throws {RequiredError}
4251
+ */
4252
+ tradeUnits: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
4253
+ const localVarPath = `/thorchain/trade/units`;
4254
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4255
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4256
+ let baseOptions;
4257
+ if (configuration) {
4258
+ baseOptions = configuration.baseOptions;
4259
+ }
4260
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4261
+ const localVarHeaderParameter = {};
4262
+ const localVarQueryParameter = {};
4263
+ if (height !== undefined) {
4264
+ localVarQueryParameter['height'] = height;
4265
+ }
4266
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4267
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4268
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4269
+ return {
4270
+ url: toPathString(localVarUrlObj),
4271
+ options: localVarRequestOptions,
4272
+ };
4273
+ }),
4274
+ };
4275
+ };
4276
+ /**
4277
+ * TradeUnitsApi - functional programming interface
4278
+ * @export
4279
+ */
4280
+ const TradeUnitsApiFp = function (configuration) {
4281
+ const localVarAxiosParamCreator = TradeUnitsApiAxiosParamCreator(configuration);
4282
+ return {
4283
+ /**
4284
+ * Returns the total units and depth for each trade asset
4285
+ * @param {number} [height] optional block height, defaults to current tip
4286
+ * @param {*} [options] Override http request option.
4287
+ * @throws {RequiredError}
4288
+ */
4289
+ tradeUnits(height, options) {
4290
+ return __awaiter(this, void 0, void 0, function* () {
4291
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeUnits(height, options);
4292
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
4293
+ });
4294
+ },
4295
+ };
4296
+ };
4297
+ /**
4298
+ * TradeUnitsApi - factory interface
4299
+ * @export
4300
+ */
4301
+ const TradeUnitsApiFactory = function (configuration, basePath, axios) {
4302
+ const localVarFp = TradeUnitsApiFp(configuration);
4303
+ return {
4304
+ /**
4305
+ * Returns the total units and depth for each trade asset
4306
+ * @param {number} [height] optional block height, defaults to current tip
4307
+ * @param {*} [options] Override http request option.
4308
+ * @throws {RequiredError}
4309
+ */
4310
+ tradeUnits(height, options) {
4311
+ return localVarFp.tradeUnits(height, options).then((request) => request(axios, basePath));
4312
+ },
4313
+ };
4314
+ };
4315
+ /**
4316
+ * TradeUnitsApi - object-oriented interface
4317
+ * @export
4318
+ * @class TradeUnitsApi
4319
+ * @extends {BaseAPI}
4320
+ */
4321
+ class TradeUnitsApi extends BaseAPI {
4322
+ /**
4323
+ * Returns the total units and depth for each trade asset
4324
+ * @param {number} [height] optional block height, defaults to current tip
4325
+ * @param {*} [options] Override http request option.
4326
+ * @throws {RequiredError}
4327
+ * @memberof TradeUnitsApi
4328
+ */
4329
+ tradeUnits(height, options) {
4330
+ return TradeUnitsApiFp(this.configuration).tradeUnits(height, options).then((request) => request(this.axios, this.basePath));
4331
+ }
4332
+ }
3774
4333
  /**
3775
4334
  * TransactionsApi - axios parameter creator
3776
4335
  * @export
@@ -4419,7 +4978,7 @@ class VaultsApi extends BaseAPI {
4419
4978
  * Thornode API
4420
4979
  * Thornode REST API.
4421
4980
  *
4422
- * The version of the OpenAPI document: 1.124.0
4981
+ * The version of the OpenAPI document: 1.128.1
4423
4982
  * Contact: devs@thorchain.org
4424
4983
  *
4425
4984
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4452,7 +5011,10 @@ class Configuration {
4452
5011
  }
4453
5012
  }
4454
5013
 
5014
+ /**
5015
+ * The base URL for the THORNode API endpoint.
5016
+ */
4455
5017
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
4456
5018
 
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 };
5019
+ 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, TradeAccountApi, TradeAccountApiAxiosParamCreator, TradeAccountApiFactory, TradeAccountApiFp, TradeAccountsApi, TradeAccountsApiAxiosParamCreator, TradeAccountsApiFactory, TradeAccountsApiFp, TradeUnitApi, TradeUnitApiAxiosParamCreator, TradeUnitApiFactory, TradeUnitApiFp, TradeUnitsApi, TradeUnitsApiAxiosParamCreator, TradeUnitsApiFactory, TradeUnitsApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
4458
5020
  //# sourceMappingURL=index.esm.js.map