@xchainjs/xchain-thornode 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/generated/thornodeApi/api.d.ts +34 -9
- package/lib/generated/thornodeApi/base.d.ts +1 -1
- package/lib/generated/thornodeApi/common.d.ts +1 -1
- package/lib/generated/thornodeApi/configuration.d.ts +1 -1
- package/lib/generated/thornodeApi/index.d.ts +1 -1
- package/lib/index.esm.js +67 -15
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +67 -15
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -978,6 +978,34 @@ const MimirApiAxiosParamCreator = function (configuration) {
|
|
|
978
978
|
options: localVarRequestOptions,
|
|
979
979
|
};
|
|
980
980
|
}),
|
|
981
|
+
/**
|
|
982
|
+
* Returns current mimir V2 configuration.
|
|
983
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
984
|
+
* @param {*} [options] Override http request option.
|
|
985
|
+
* @throws {RequiredError}
|
|
986
|
+
*/
|
|
987
|
+
mimirV2: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
988
|
+
const localVarPath = `/thorchain/mimirV2`;
|
|
989
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
990
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
991
|
+
let baseOptions;
|
|
992
|
+
if (configuration) {
|
|
993
|
+
baseOptions = configuration.baseOptions;
|
|
994
|
+
}
|
|
995
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
996
|
+
const localVarHeaderParameter = {};
|
|
997
|
+
const localVarQueryParameter = {};
|
|
998
|
+
if (height !== undefined) {
|
|
999
|
+
localVarQueryParameter['height'] = height;
|
|
1000
|
+
}
|
|
1001
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1002
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1003
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1004
|
+
return {
|
|
1005
|
+
url: toPathString(localVarUrlObj),
|
|
1006
|
+
options: localVarRequestOptions,
|
|
1007
|
+
};
|
|
1008
|
+
}),
|
|
981
1009
|
};
|
|
982
1010
|
};
|
|
983
1011
|
/**
|
|
@@ -1049,6 +1077,18 @@ const MimirApiFp = function (configuration) {
|
|
|
1049
1077
|
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
1050
1078
|
});
|
|
1051
1079
|
},
|
|
1080
|
+
/**
|
|
1081
|
+
* Returns current mimir V2 configuration.
|
|
1082
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1083
|
+
* @param {*} [options] Override http request option.
|
|
1084
|
+
* @throws {RequiredError}
|
|
1085
|
+
*/
|
|
1086
|
+
mimirV2(height, options) {
|
|
1087
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1088
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirV2(height, options);
|
|
1089
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
1090
|
+
});
|
|
1091
|
+
},
|
|
1052
1092
|
};
|
|
1053
1093
|
};
|
|
1054
1094
|
/**
|
|
@@ -1105,6 +1145,15 @@ const MimirApiFactory = function (configuration, basePath, axios) {
|
|
|
1105
1145
|
mimirNodes(height, options) {
|
|
1106
1146
|
return localVarFp.mimirNodes(height, options).then((request) => request(axios, basePath));
|
|
1107
1147
|
},
|
|
1148
|
+
/**
|
|
1149
|
+
* Returns current mimir V2 configuration.
|
|
1150
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1151
|
+
* @param {*} [options] Override http request option.
|
|
1152
|
+
* @throws {RequiredError}
|
|
1153
|
+
*/
|
|
1154
|
+
mimirV2(height, options) {
|
|
1155
|
+
return localVarFp.mimirV2(height, options).then((request) => request(axios, basePath));
|
|
1156
|
+
},
|
|
1108
1157
|
};
|
|
1109
1158
|
};
|
|
1110
1159
|
/**
|
|
@@ -1166,6 +1215,16 @@ class MimirApi extends BaseAPI {
|
|
|
1166
1215
|
mimirNodes(height, options) {
|
|
1167
1216
|
return MimirApiFp(this.configuration).mimirNodes(height, options).then((request) => request(this.axios, this.basePath));
|
|
1168
1217
|
}
|
|
1218
|
+
/**
|
|
1219
|
+
* Returns current mimir V2 configuration.
|
|
1220
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1221
|
+
* @param {*} [options] Override http request option.
|
|
1222
|
+
* @throws {RequiredError}
|
|
1223
|
+
* @memberof MimirApi
|
|
1224
|
+
*/
|
|
1225
|
+
mimirV2(height, options) {
|
|
1226
|
+
return MimirApiFp(this.configuration).mimirV2(height, options).then((request) => request(this.axios, this.basePath));
|
|
1227
|
+
}
|
|
1169
1228
|
}
|
|
1170
1229
|
/**
|
|
1171
1230
|
* NetworkApi - axios parameter creator
|
|
@@ -2688,14 +2747,13 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2688
2747
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2689
2748
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
2690
2749
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
2691
|
-
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
2692
2750
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2693
2751
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2694
2752
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2695
2753
|
* @param {*} [options] Override http request option.
|
|
2696
2754
|
* @throws {RequiredError}
|
|
2697
2755
|
*/
|
|
2698
|
-
quoteswap: (height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
2756
|
+
quoteswap: (height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2699
2757
|
const localVarPath = `/thorchain/quote/swap`;
|
|
2700
2758
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2701
2759
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2727,9 +2785,6 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2727
2785
|
if (streamingQuantity !== undefined) {
|
|
2728
2786
|
localVarQueryParameter['streaming_quantity'] = streamingQuantity;
|
|
2729
2787
|
}
|
|
2730
|
-
if (fromAddress !== undefined) {
|
|
2731
|
-
localVarQueryParameter['from_address'] = fromAddress;
|
|
2732
|
-
}
|
|
2733
2788
|
if (toleranceBps !== undefined) {
|
|
2734
2789
|
localVarQueryParameter['tolerance_bps'] = toleranceBps;
|
|
2735
2790
|
}
|
|
@@ -2830,16 +2885,15 @@ const QuoteApiFp = function (configuration) {
|
|
|
2830
2885
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2831
2886
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
2832
2887
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
2833
|
-
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
2834
2888
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2835
2889
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2836
2890
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2837
2891
|
* @param {*} [options] Override http request option.
|
|
2838
2892
|
* @throws {RequiredError}
|
|
2839
2893
|
*/
|
|
2840
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
2894
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
2841
2895
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2842
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
2896
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
|
|
2843
2897
|
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
2844
2898
|
});
|
|
2845
2899
|
},
|
|
@@ -2914,15 +2968,14 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
2914
2968
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2915
2969
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
2916
2970
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
2917
|
-
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
2918
2971
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
2919
2972
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
2920
2973
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
2921
2974
|
* @param {*} [options] Override http request option.
|
|
2922
2975
|
* @throws {RequiredError}
|
|
2923
2976
|
*/
|
|
2924
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
2925
|
-
return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
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));
|
|
2926
2979
|
},
|
|
2927
2980
|
};
|
|
2928
2981
|
};
|
|
@@ -2999,7 +3052,6 @@ class QuoteApi extends BaseAPI {
|
|
|
2999
3052
|
* @param {string} [destination] the destination address, required to generate memo
|
|
3000
3053
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3001
3054
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3002
|
-
* @param {string} [fromAddress] the from address, required if the from asset is a synth
|
|
3003
3055
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
3004
3056
|
* @param {number} [affiliateBps] the affiliate fee in basis points
|
|
3005
3057
|
* @param {string} [affiliate] the affiliate (address or thorname)
|
|
@@ -3007,8 +3059,8 @@ class QuoteApi extends BaseAPI {
|
|
|
3007
3059
|
* @throws {RequiredError}
|
|
3008
3060
|
* @memberof QuoteApi
|
|
3009
3061
|
*/
|
|
3010
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
3011
|
-
return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity,
|
|
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));
|
|
3012
3064
|
}
|
|
3013
3065
|
}
|
|
3014
3066
|
/**
|
|
@@ -4375,7 +4427,7 @@ class VaultsApi extends BaseAPI {
|
|
|
4375
4427
|
* Thornode API
|
|
4376
4428
|
* Thornode REST API.
|
|
4377
4429
|
*
|
|
4378
|
-
* The version of the OpenAPI document: 1.
|
|
4430
|
+
* The version of the OpenAPI document: 1.124.0
|
|
4379
4431
|
* Contact: devs@thorchain.org
|
|
4380
4432
|
*
|
|
4381
4433
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|