@xchainjs/xchain-thornode 0.3.10 → 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/config.d.ts +3 -0
- package/lib/generated/thornodeApi/api.d.ts +323 -5
- 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.d.ts +3 -0
- package/lib/index.esm.js +412 -9
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +427 -8
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
package/lib/index.esm.js
CHANGED
|
@@ -2896,6 +2896,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2896
2896
|
* @param {string} [toAsset] the target asset
|
|
2897
2897
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2898
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
|
|
2899
2900
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
2900
2901
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
2901
2902
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -2904,7 +2905,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2904
2905
|
* @param {*} [options] Override http request option.
|
|
2905
2906
|
* @throws {RequiredError}
|
|
2906
2907
|
*/
|
|
2907
|
-
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* () {
|
|
2908
2909
|
const localVarPath = `/thorchain/quote/swap`;
|
|
2909
2910
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2910
2911
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2930,6 +2931,9 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2930
2931
|
if (destination !== undefined) {
|
|
2931
2932
|
localVarQueryParameter['destination'] = destination;
|
|
2932
2933
|
}
|
|
2934
|
+
if (refundAddress !== undefined) {
|
|
2935
|
+
localVarQueryParameter['refund_address'] = refundAddress;
|
|
2936
|
+
}
|
|
2933
2937
|
if (streamingInterval !== undefined) {
|
|
2934
2938
|
localVarQueryParameter['streaming_interval'] = streamingInterval;
|
|
2935
2939
|
}
|
|
@@ -3034,6 +3038,7 @@ const QuoteApiFp = function (configuration) {
|
|
|
3034
3038
|
* @param {string} [toAsset] the target asset
|
|
3035
3039
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3036
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
|
|
3037
3042
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3038
3043
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3039
3044
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -3042,9 +3047,9 @@ const QuoteApiFp = function (configuration) {
|
|
|
3042
3047
|
* @param {*} [options] Override http request option.
|
|
3043
3048
|
* @throws {RequiredError}
|
|
3044
3049
|
*/
|
|
3045
|
-
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) {
|
|
3046
3051
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3047
|
-
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);
|
|
3048
3053
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3049
3054
|
});
|
|
3050
3055
|
},
|
|
@@ -3117,6 +3122,7 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
3117
3122
|
* @param {string} [toAsset] the target asset
|
|
3118
3123
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3119
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
|
|
3120
3126
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3121
3127
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3122
3128
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -3125,8 +3131,8 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
3125
3131
|
* @param {*} [options] Override http request option.
|
|
3126
3132
|
* @throws {RequiredError}
|
|
3127
3133
|
*/
|
|
3128
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3129
|
-
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));
|
|
3130
3136
|
},
|
|
3131
3137
|
};
|
|
3132
3138
|
};
|
|
@@ -3201,6 +3207,7 @@ class QuoteApi extends BaseAPI {
|
|
|
3201
3207
|
* @param {string} [toAsset] the target asset
|
|
3202
3208
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3203
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
|
|
3204
3211
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3205
3212
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3206
3213
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -3210,8 +3217,8 @@ class QuoteApi extends BaseAPI {
|
|
|
3210
3217
|
* @throws {RequiredError}
|
|
3211
3218
|
* @memberof QuoteApi
|
|
3212
3219
|
*/
|
|
3213
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3214
|
-
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));
|
|
3215
3222
|
}
|
|
3216
3223
|
}
|
|
3217
3224
|
/**
|
|
@@ -3930,6 +3937,399 @@ class ThornamesApi extends BaseAPI {
|
|
|
3930
3937
|
return ThornamesApiFp(this.configuration).thorname(name, height, options).then((request) => request(this.axios, this.basePath));
|
|
3931
3938
|
}
|
|
3932
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
|
+
}
|
|
3933
4333
|
/**
|
|
3934
4334
|
* TransactionsApi - axios parameter creator
|
|
3935
4335
|
* @export
|
|
@@ -4578,7 +4978,7 @@ class VaultsApi extends BaseAPI {
|
|
|
4578
4978
|
* Thornode API
|
|
4579
4979
|
* Thornode REST API.
|
|
4580
4980
|
*
|
|
4581
|
-
* The version of the OpenAPI document: 1.
|
|
4981
|
+
* The version of the OpenAPI document: 1.128.1
|
|
4582
4982
|
* Contact: devs@thorchain.org
|
|
4583
4983
|
*
|
|
4584
4984
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4611,7 +5011,10 @@ class Configuration {
|
|
|
4611
5011
|
}
|
|
4612
5012
|
}
|
|
4613
5013
|
|
|
5014
|
+
/**
|
|
5015
|
+
* The base URL for the THORNode API endpoint.
|
|
5016
|
+
*/
|
|
4614
5017
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
4615
5018
|
|
|
4616
|
-
export { BlockApi, BlockApiAxiosParamCreator, BlockApiFactory, BlockApiFp, BorrowersApi, BorrowersApiAxiosParamCreator, BorrowersApiFactory, BorrowersApiFp, CloutApi, CloutApiAxiosParamCreator, CloutApiFactory, CloutApiFp, Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, InvariantsApi, InvariantsApiAxiosParamCreator, InvariantsApiFactory, InvariantsApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, QuoteApi, QuoteApiAxiosParamCreator, QuoteApiFactory, QuoteApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, StreamingSwapApi, StreamingSwapApiAxiosParamCreator, StreamingSwapApiFactory, StreamingSwapApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
|
|
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 };
|
|
4617
5020
|
//# sourceMappingURL=index.esm.js.map
|