@xchainjs/xchain-thornode 0.3.3 → 0.3.4

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
@@ -2460,6 +2460,8 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2460
2460
  * @param {string} [toAsset] the target asset
2461
2461
  * @param {number} [amount] the source asset amount in 1e8 decimals
2462
2462
  * @param {string} [destination] the destination address, required to generate memo
2463
+ * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2464
+ * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2463
2465
  * @param {string} [fromAddress] the from address, required if the from asset is a synth
2464
2466
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2465
2467
  * @param {number} [affiliateBps] the affiliate fee in basis points
@@ -2467,7 +2469,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2467
2469
  * @param {*} [options] Override http request option.
2468
2470
  * @throws {RequiredError}
2469
2471
  */
2470
- quoteswap: (height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2472
+ quoteswap: (height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
2471
2473
  const localVarPath = `/thorchain/quote/swap`;
2472
2474
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2473
2475
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2493,6 +2495,12 @@ const QuoteApiAxiosParamCreator = function (configuration) {
2493
2495
  if (destination !== undefined) {
2494
2496
  localVarQueryParameter['destination'] = destination;
2495
2497
  }
2498
+ if (streamingInterval !== undefined) {
2499
+ localVarQueryParameter['streaming_interval'] = streamingInterval;
2500
+ }
2501
+ if (streamingQuantity !== undefined) {
2502
+ localVarQueryParameter['streaming_quantity'] = streamingQuantity;
2503
+ }
2496
2504
  if (fromAddress !== undefined) {
2497
2505
  localVarQueryParameter['from_address'] = fromAddress;
2498
2506
  }
@@ -2594,6 +2602,8 @@ const QuoteApiFp = function (configuration) {
2594
2602
  * @param {string} [toAsset] the target asset
2595
2603
  * @param {number} [amount] the source asset amount in 1e8 decimals
2596
2604
  * @param {string} [destination] the destination address, required to generate memo
2605
+ * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2606
+ * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2597
2607
  * @param {string} [fromAddress] the from address, required if the from asset is a synth
2598
2608
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2599
2609
  * @param {number} [affiliateBps] the affiliate fee in basis points
@@ -2601,9 +2611,9 @@ const QuoteApiFp = function (configuration) {
2601
2611
  * @param {*} [options] Override http request option.
2602
2612
  * @throws {RequiredError}
2603
2613
  */
2604
- quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2614
+ quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2605
2615
  return __awaiter(this, void 0, void 0, function* () {
2606
- const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options);
2616
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options);
2607
2617
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2608
2618
  });
2609
2619
  },
@@ -2676,6 +2686,8 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2676
2686
  * @param {string} [toAsset] the target asset
2677
2687
  * @param {number} [amount] the source asset amount in 1e8 decimals
2678
2688
  * @param {string} [destination] the destination address, required to generate memo
2689
+ * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2690
+ * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2679
2691
  * @param {string} [fromAddress] the from address, required if the from asset is a synth
2680
2692
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2681
2693
  * @param {number} [affiliateBps] the affiliate fee in basis points
@@ -2683,8 +2695,8 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
2683
2695
  * @param {*} [options] Override http request option.
2684
2696
  * @throws {RequiredError}
2685
2697
  */
2686
- quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2687
- return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2698
+ quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2699
+ return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
2688
2700
  },
2689
2701
  };
2690
2702
  };
@@ -2759,6 +2771,8 @@ class QuoteApi extends BaseAPI {
2759
2771
  * @param {string} [toAsset] the target asset
2760
2772
  * @param {number} [amount] the source asset amount in 1e8 decimals
2761
2773
  * @param {string} [destination] the destination address, required to generate memo
2774
+ * @param {number} [streamingInterval] the interval in which streaming swaps are swapped
2775
+ * @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
2762
2776
  * @param {string} [fromAddress] the from address, required if the from asset is a synth
2763
2777
  * @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
2764
2778
  * @param {number} [affiliateBps] the affiliate fee in basis points
@@ -2767,8 +2781,8 @@ class QuoteApi extends BaseAPI {
2767
2781
  * @throws {RequiredError}
2768
2782
  * @memberof QuoteApi
2769
2783
  */
2770
- quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2771
- return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
2784
+ quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options) {
2785
+ return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, fromAddress, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
2772
2786
  }
2773
2787
  }
2774
2788
  /**
@@ -2944,6 +2958,165 @@ class SaversApi extends BaseAPI {
2944
2958
  return SaversApiFp(this.configuration).savers(asset, height, options).then((request) => request(this.axios, this.basePath));
2945
2959
  }
2946
2960
  }
2961
+ /**
2962
+ * StreamingSwapApi - axios parameter creator
2963
+ * @export
2964
+ */
2965
+ const StreamingSwapApiAxiosParamCreator = function (configuration) {
2966
+ return {
2967
+ /**
2968
+ * Returns the state of a streaming swap
2969
+ * @param {string} hash
2970
+ * @param {number} [height] optional block height, defaults to current tip
2971
+ * @param {*} [options] Override http request option.
2972
+ * @throws {RequiredError}
2973
+ */
2974
+ streamSwap: (hash, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2975
+ // verify required parameter 'hash' is not null or undefined
2976
+ assertParamExists('streamSwap', 'hash', hash);
2977
+ const localVarPath = `/thorchain/swap/streaming/{hash}`
2978
+ .replace(`{${"hash"}}`, encodeURIComponent(String(hash)));
2979
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2980
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2981
+ let baseOptions;
2982
+ if (configuration) {
2983
+ baseOptions = configuration.baseOptions;
2984
+ }
2985
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2986
+ const localVarHeaderParameter = {};
2987
+ const localVarQueryParameter = {};
2988
+ if (height !== undefined) {
2989
+ localVarQueryParameter['height'] = height;
2990
+ }
2991
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2992
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2993
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2994
+ return {
2995
+ url: toPathString(localVarUrlObj),
2996
+ options: localVarRequestOptions,
2997
+ };
2998
+ }),
2999
+ /**
3000
+ * Returns the state of all streaming swaps
3001
+ * @param {number} [height] optional block height, defaults to current tip
3002
+ * @param {*} [options] Override http request option.
3003
+ * @throws {RequiredError}
3004
+ */
3005
+ streamSwaps: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
3006
+ const localVarPath = `/thorchain/swaps/streaming`;
3007
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3008
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3009
+ let baseOptions;
3010
+ if (configuration) {
3011
+ baseOptions = configuration.baseOptions;
3012
+ }
3013
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3014
+ const localVarHeaderParameter = {};
3015
+ const localVarQueryParameter = {};
3016
+ if (height !== undefined) {
3017
+ localVarQueryParameter['height'] = height;
3018
+ }
3019
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3020
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3021
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3022
+ return {
3023
+ url: toPathString(localVarUrlObj),
3024
+ options: localVarRequestOptions,
3025
+ };
3026
+ }),
3027
+ };
3028
+ };
3029
+ /**
3030
+ * StreamingSwapApi - functional programming interface
3031
+ * @export
3032
+ */
3033
+ const StreamingSwapApiFp = function (configuration) {
3034
+ const localVarAxiosParamCreator = StreamingSwapApiAxiosParamCreator(configuration);
3035
+ return {
3036
+ /**
3037
+ * Returns the state of a streaming swap
3038
+ * @param {string} hash
3039
+ * @param {number} [height] optional block height, defaults to current tip
3040
+ * @param {*} [options] Override http request option.
3041
+ * @throws {RequiredError}
3042
+ */
3043
+ streamSwap(hash, height, options) {
3044
+ return __awaiter(this, void 0, void 0, function* () {
3045
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.streamSwap(hash, height, options);
3046
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3047
+ });
3048
+ },
3049
+ /**
3050
+ * Returns the state of all streaming swaps
3051
+ * @param {number} [height] optional block height, defaults to current tip
3052
+ * @param {*} [options] Override http request option.
3053
+ * @throws {RequiredError}
3054
+ */
3055
+ streamSwaps(height, options) {
3056
+ return __awaiter(this, void 0, void 0, function* () {
3057
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.streamSwaps(height, options);
3058
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
3059
+ });
3060
+ },
3061
+ };
3062
+ };
3063
+ /**
3064
+ * StreamingSwapApi - factory interface
3065
+ * @export
3066
+ */
3067
+ const StreamingSwapApiFactory = function (configuration, basePath, axios) {
3068
+ const localVarFp = StreamingSwapApiFp(configuration);
3069
+ return {
3070
+ /**
3071
+ * Returns the state of a streaming swap
3072
+ * @param {string} hash
3073
+ * @param {number} [height] optional block height, defaults to current tip
3074
+ * @param {*} [options] Override http request option.
3075
+ * @throws {RequiredError}
3076
+ */
3077
+ streamSwap(hash, height, options) {
3078
+ return localVarFp.streamSwap(hash, height, options).then((request) => request(axios, basePath));
3079
+ },
3080
+ /**
3081
+ * Returns the state of all streaming swaps
3082
+ * @param {number} [height] optional block height, defaults to current tip
3083
+ * @param {*} [options] Override http request option.
3084
+ * @throws {RequiredError}
3085
+ */
3086
+ streamSwaps(height, options) {
3087
+ return localVarFp.streamSwaps(height, options).then((request) => request(axios, basePath));
3088
+ },
3089
+ };
3090
+ };
3091
+ /**
3092
+ * StreamingSwapApi - object-oriented interface
3093
+ * @export
3094
+ * @class StreamingSwapApi
3095
+ * @extends {BaseAPI}
3096
+ */
3097
+ class StreamingSwapApi extends BaseAPI {
3098
+ /**
3099
+ * Returns the state of a streaming swap
3100
+ * @param {string} hash
3101
+ * @param {number} [height] optional block height, defaults to current tip
3102
+ * @param {*} [options] Override http request option.
3103
+ * @throws {RequiredError}
3104
+ * @memberof StreamingSwapApi
3105
+ */
3106
+ streamSwap(hash, height, options) {
3107
+ return StreamingSwapApiFp(this.configuration).streamSwap(hash, height, options).then((request) => request(this.axios, this.basePath));
3108
+ }
3109
+ /**
3110
+ * Returns the state of all streaming swaps
3111
+ * @param {number} [height] optional block height, defaults to current tip
3112
+ * @param {*} [options] Override http request option.
3113
+ * @throws {RequiredError}
3114
+ * @memberof StreamingSwapApi
3115
+ */
3116
+ streamSwaps(height, options) {
3117
+ return StreamingSwapApiFp(this.configuration).streamSwaps(height, options).then((request) => request(this.axios, this.basePath));
3118
+ }
3119
+ }
2947
3120
  /**
2948
3121
  * TSSApi - axios parameter creator
2949
3122
  * @export
@@ -3976,7 +4149,7 @@ class VaultsApi extends BaseAPI {
3976
4149
  * Thornode API
3977
4150
  * Thornode REST API.
3978
4151
  *
3979
- * The version of the OpenAPI document: 1.113.1
4152
+ * The version of the OpenAPI document: 1.116.0
3980
4153
  * Contact: devs@thorchain.org
3981
4154
  *
3982
4155
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4011,5 +4184,5 @@ class Configuration {
4011
4184
 
4012
4185
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
4013
4186
 
4014
- export { BorrowersApi, BorrowersApiAxiosParamCreator, BorrowersApiFactory, BorrowersApiFp, Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
4187
+ export { BorrowersApi, BorrowersApiAxiosParamCreator, BorrowersApiFactory, BorrowersApiFp, Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, 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 };
4015
4188
  //# sourceMappingURL=index.esm.js.map