@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.js
CHANGED
|
@@ -2904,6 +2904,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2904
2904
|
* @param {string} [toAsset] the target asset
|
|
2905
2905
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
2906
2906
|
* @param {string} [destination] the destination address, required to generate memo
|
|
2907
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
2907
2908
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
2908
2909
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
2909
2910
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -2912,7 +2913,7 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2912
2913
|
* @param {*} [options] Override http request option.
|
|
2913
2914
|
* @throws {RequiredError}
|
|
2914
2915
|
*/
|
|
2915
|
-
quoteswap: (height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2916
|
+
quoteswap: (height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2916
2917
|
const localVarPath = `/thorchain/quote/swap`;
|
|
2917
2918
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2918
2919
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2938,6 +2939,9 @@ const QuoteApiAxiosParamCreator = function (configuration) {
|
|
|
2938
2939
|
if (destination !== undefined) {
|
|
2939
2940
|
localVarQueryParameter['destination'] = destination;
|
|
2940
2941
|
}
|
|
2942
|
+
if (refundAddress !== undefined) {
|
|
2943
|
+
localVarQueryParameter['refund_address'] = refundAddress;
|
|
2944
|
+
}
|
|
2941
2945
|
if (streamingInterval !== undefined) {
|
|
2942
2946
|
localVarQueryParameter['streaming_interval'] = streamingInterval;
|
|
2943
2947
|
}
|
|
@@ -3042,6 +3046,7 @@ const QuoteApiFp = function (configuration) {
|
|
|
3042
3046
|
* @param {string} [toAsset] the target asset
|
|
3043
3047
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3044
3048
|
* @param {string} [destination] the destination address, required to generate memo
|
|
3049
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3045
3050
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3046
3051
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3047
3052
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -3050,9 +3055,9 @@ const QuoteApiFp = function (configuration) {
|
|
|
3050
3055
|
* @param {*} [options] Override http request option.
|
|
3051
3056
|
* @throws {RequiredError}
|
|
3052
3057
|
*/
|
|
3053
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3058
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3054
3059
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3055
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
|
|
3060
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options);
|
|
3056
3061
|
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
3057
3062
|
});
|
|
3058
3063
|
},
|
|
@@ -3125,6 +3130,7 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
3125
3130
|
* @param {string} [toAsset] the target asset
|
|
3126
3131
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3127
3132
|
* @param {string} [destination] the destination address, required to generate memo
|
|
3133
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3128
3134
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3129
3135
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3130
3136
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -3133,8 +3139,8 @@ const QuoteApiFactory = function (configuration, basePath, axios) {
|
|
|
3133
3139
|
* @param {*} [options] Override http request option.
|
|
3134
3140
|
* @throws {RequiredError}
|
|
3135
3141
|
*/
|
|
3136
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3137
|
-
return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
|
|
3142
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3143
|
+
return localVarFp.quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(axios, basePath));
|
|
3138
3144
|
},
|
|
3139
3145
|
};
|
|
3140
3146
|
};
|
|
@@ -3209,6 +3215,7 @@ class QuoteApi extends BaseAPI {
|
|
|
3209
3215
|
* @param {string} [toAsset] the target asset
|
|
3210
3216
|
* @param {number} [amount] the source asset amount in 1e8 decimals
|
|
3211
3217
|
* @param {string} [destination] the destination address, required to generate memo
|
|
3218
|
+
* @param {string} [refundAddress] the refund address, refunds will be sent here if the swap fails
|
|
3212
3219
|
* @param {number} [streamingInterval] the interval in which streaming swaps are swapped
|
|
3213
3220
|
* @param {number} [streamingQuantity] the quantity of swaps within a streaming swap
|
|
3214
3221
|
* @param {number} [toleranceBps] the maximum basis points from the current feeless swap price to set the limit in the generated memo
|
|
@@ -3218,8 +3225,8 @@ class QuoteApi extends BaseAPI {
|
|
|
3218
3225
|
* @throws {RequiredError}
|
|
3219
3226
|
* @memberof QuoteApi
|
|
3220
3227
|
*/
|
|
3221
|
-
quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3222
|
-
return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
|
|
3228
|
+
quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options) {
|
|
3229
|
+
return QuoteApiFp(this.configuration).quoteswap(height, fromAsset, toAsset, amount, destination, refundAddress, streamingInterval, streamingQuantity, toleranceBps, affiliateBps, affiliate, options).then((request) => request(this.axios, this.basePath));
|
|
3223
3230
|
}
|
|
3224
3231
|
}
|
|
3225
3232
|
/**
|
|
@@ -3938,6 +3945,399 @@ class ThornamesApi extends BaseAPI {
|
|
|
3938
3945
|
return ThornamesApiFp(this.configuration).thorname(name, height, options).then((request) => request(this.axios, this.basePath));
|
|
3939
3946
|
}
|
|
3940
3947
|
}
|
|
3948
|
+
/**
|
|
3949
|
+
* TradeAccountApi - axios parameter creator
|
|
3950
|
+
* @export
|
|
3951
|
+
*/
|
|
3952
|
+
const TradeAccountApiAxiosParamCreator = function (configuration) {
|
|
3953
|
+
return {
|
|
3954
|
+
/**
|
|
3955
|
+
* Returns the units and depth of a trade account
|
|
3956
|
+
* @param {string} address
|
|
3957
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3958
|
+
* @param {*} [options] Override http request option.
|
|
3959
|
+
* @throws {RequiredError}
|
|
3960
|
+
*/
|
|
3961
|
+
tradeAccount: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3962
|
+
// verify required parameter 'address' is not null or undefined
|
|
3963
|
+
assertParamExists('tradeAccount', 'address', address);
|
|
3964
|
+
const localVarPath = `/thorchain/trade/account/{address}`
|
|
3965
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
3966
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3967
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3968
|
+
let baseOptions;
|
|
3969
|
+
if (configuration) {
|
|
3970
|
+
baseOptions = configuration.baseOptions;
|
|
3971
|
+
}
|
|
3972
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3973
|
+
const localVarHeaderParameter = {};
|
|
3974
|
+
const localVarQueryParameter = {};
|
|
3975
|
+
if (height !== undefined) {
|
|
3976
|
+
localVarQueryParameter['height'] = height;
|
|
3977
|
+
}
|
|
3978
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3979
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3980
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3981
|
+
return {
|
|
3982
|
+
url: toPathString(localVarUrlObj),
|
|
3983
|
+
options: localVarRequestOptions,
|
|
3984
|
+
};
|
|
3985
|
+
}),
|
|
3986
|
+
};
|
|
3987
|
+
};
|
|
3988
|
+
/**
|
|
3989
|
+
* TradeAccountApi - functional programming interface
|
|
3990
|
+
* @export
|
|
3991
|
+
*/
|
|
3992
|
+
const TradeAccountApiFp = function (configuration) {
|
|
3993
|
+
const localVarAxiosParamCreator = TradeAccountApiAxiosParamCreator(configuration);
|
|
3994
|
+
return {
|
|
3995
|
+
/**
|
|
3996
|
+
* Returns the units and depth of a trade account
|
|
3997
|
+
* @param {string} address
|
|
3998
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
3999
|
+
* @param {*} [options] Override http request option.
|
|
4000
|
+
* @throws {RequiredError}
|
|
4001
|
+
*/
|
|
4002
|
+
tradeAccount(address, height, options) {
|
|
4003
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4004
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeAccount(address, height, options);
|
|
4005
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
4006
|
+
});
|
|
4007
|
+
},
|
|
4008
|
+
};
|
|
4009
|
+
};
|
|
4010
|
+
/**
|
|
4011
|
+
* TradeAccountApi - factory interface
|
|
4012
|
+
* @export
|
|
4013
|
+
*/
|
|
4014
|
+
const TradeAccountApiFactory = function (configuration, basePath, axios) {
|
|
4015
|
+
const localVarFp = TradeAccountApiFp(configuration);
|
|
4016
|
+
return {
|
|
4017
|
+
/**
|
|
4018
|
+
* Returns the units and depth of a trade account
|
|
4019
|
+
* @param {string} address
|
|
4020
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4021
|
+
* @param {*} [options] Override http request option.
|
|
4022
|
+
* @throws {RequiredError}
|
|
4023
|
+
*/
|
|
4024
|
+
tradeAccount(address, height, options) {
|
|
4025
|
+
return localVarFp.tradeAccount(address, height, options).then((request) => request(axios, basePath));
|
|
4026
|
+
},
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
/**
|
|
4030
|
+
* TradeAccountApi - object-oriented interface
|
|
4031
|
+
* @export
|
|
4032
|
+
* @class TradeAccountApi
|
|
4033
|
+
* @extends {BaseAPI}
|
|
4034
|
+
*/
|
|
4035
|
+
class TradeAccountApi extends BaseAPI {
|
|
4036
|
+
/**
|
|
4037
|
+
* Returns the units and depth of a trade account
|
|
4038
|
+
* @param {string} address
|
|
4039
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4040
|
+
* @param {*} [options] Override http request option.
|
|
4041
|
+
* @throws {RequiredError}
|
|
4042
|
+
* @memberof TradeAccountApi
|
|
4043
|
+
*/
|
|
4044
|
+
tradeAccount(address, height, options) {
|
|
4045
|
+
return TradeAccountApiFp(this.configuration).tradeAccount(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
/**
|
|
4049
|
+
* TradeAccountsApi - axios parameter creator
|
|
4050
|
+
* @export
|
|
4051
|
+
*/
|
|
4052
|
+
const TradeAccountsApiAxiosParamCreator = function (configuration) {
|
|
4053
|
+
return {
|
|
4054
|
+
/**
|
|
4055
|
+
* Returns all trade accounts for an asset
|
|
4056
|
+
* @param {string} asset
|
|
4057
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4058
|
+
* @param {*} [options] Override http request option.
|
|
4059
|
+
* @throws {RequiredError}
|
|
4060
|
+
*/
|
|
4061
|
+
tradeAccounts: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4062
|
+
// verify required parameter 'asset' is not null or undefined
|
|
4063
|
+
assertParamExists('tradeAccounts', 'asset', asset);
|
|
4064
|
+
const localVarPath = `/thorchain/trade/accounts/{asset}`
|
|
4065
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
4066
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4067
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4068
|
+
let baseOptions;
|
|
4069
|
+
if (configuration) {
|
|
4070
|
+
baseOptions = configuration.baseOptions;
|
|
4071
|
+
}
|
|
4072
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4073
|
+
const localVarHeaderParameter = {};
|
|
4074
|
+
const localVarQueryParameter = {};
|
|
4075
|
+
if (height !== undefined) {
|
|
4076
|
+
localVarQueryParameter['height'] = height;
|
|
4077
|
+
}
|
|
4078
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4079
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4080
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4081
|
+
return {
|
|
4082
|
+
url: toPathString(localVarUrlObj),
|
|
4083
|
+
options: localVarRequestOptions,
|
|
4084
|
+
};
|
|
4085
|
+
}),
|
|
4086
|
+
};
|
|
4087
|
+
};
|
|
4088
|
+
/**
|
|
4089
|
+
* TradeAccountsApi - functional programming interface
|
|
4090
|
+
* @export
|
|
4091
|
+
*/
|
|
4092
|
+
const TradeAccountsApiFp = function (configuration) {
|
|
4093
|
+
const localVarAxiosParamCreator = TradeAccountsApiAxiosParamCreator(configuration);
|
|
4094
|
+
return {
|
|
4095
|
+
/**
|
|
4096
|
+
* Returns all trade accounts for an asset
|
|
4097
|
+
* @param {string} asset
|
|
4098
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4099
|
+
* @param {*} [options] Override http request option.
|
|
4100
|
+
* @throws {RequiredError}
|
|
4101
|
+
*/
|
|
4102
|
+
tradeAccounts(asset, height, options) {
|
|
4103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4104
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeAccounts(asset, height, options);
|
|
4105
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
4106
|
+
});
|
|
4107
|
+
},
|
|
4108
|
+
};
|
|
4109
|
+
};
|
|
4110
|
+
/**
|
|
4111
|
+
* TradeAccountsApi - factory interface
|
|
4112
|
+
* @export
|
|
4113
|
+
*/
|
|
4114
|
+
const TradeAccountsApiFactory = function (configuration, basePath, axios) {
|
|
4115
|
+
const localVarFp = TradeAccountsApiFp(configuration);
|
|
4116
|
+
return {
|
|
4117
|
+
/**
|
|
4118
|
+
* Returns all trade accounts for an asset
|
|
4119
|
+
* @param {string} asset
|
|
4120
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4121
|
+
* @param {*} [options] Override http request option.
|
|
4122
|
+
* @throws {RequiredError}
|
|
4123
|
+
*/
|
|
4124
|
+
tradeAccounts(asset, height, options) {
|
|
4125
|
+
return localVarFp.tradeAccounts(asset, height, options).then((request) => request(axios, basePath));
|
|
4126
|
+
},
|
|
4127
|
+
};
|
|
4128
|
+
};
|
|
4129
|
+
/**
|
|
4130
|
+
* TradeAccountsApi - object-oriented interface
|
|
4131
|
+
* @export
|
|
4132
|
+
* @class TradeAccountsApi
|
|
4133
|
+
* @extends {BaseAPI}
|
|
4134
|
+
*/
|
|
4135
|
+
class TradeAccountsApi extends BaseAPI {
|
|
4136
|
+
/**
|
|
4137
|
+
* Returns all trade accounts for an asset
|
|
4138
|
+
* @param {string} asset
|
|
4139
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4140
|
+
* @param {*} [options] Override http request option.
|
|
4141
|
+
* @throws {RequiredError}
|
|
4142
|
+
* @memberof TradeAccountsApi
|
|
4143
|
+
*/
|
|
4144
|
+
tradeAccounts(asset, height, options) {
|
|
4145
|
+
return TradeAccountsApiFp(this.configuration).tradeAccounts(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4148
|
+
/**
|
|
4149
|
+
* TradeUnitApi - axios parameter creator
|
|
4150
|
+
* @export
|
|
4151
|
+
*/
|
|
4152
|
+
const TradeUnitApiAxiosParamCreator = function (configuration) {
|
|
4153
|
+
return {
|
|
4154
|
+
/**
|
|
4155
|
+
* Returns the total units and depth of a trade asset
|
|
4156
|
+
* @param {string} asset
|
|
4157
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4158
|
+
* @param {*} [options] Override http request option.
|
|
4159
|
+
* @throws {RequiredError}
|
|
4160
|
+
*/
|
|
4161
|
+
tradeUnit: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4162
|
+
// verify required parameter 'asset' is not null or undefined
|
|
4163
|
+
assertParamExists('tradeUnit', 'asset', asset);
|
|
4164
|
+
const localVarPath = `/thorchain/trade/unit/{asset}`
|
|
4165
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
4166
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4167
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4168
|
+
let baseOptions;
|
|
4169
|
+
if (configuration) {
|
|
4170
|
+
baseOptions = configuration.baseOptions;
|
|
4171
|
+
}
|
|
4172
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4173
|
+
const localVarHeaderParameter = {};
|
|
4174
|
+
const localVarQueryParameter = {};
|
|
4175
|
+
if (height !== undefined) {
|
|
4176
|
+
localVarQueryParameter['height'] = height;
|
|
4177
|
+
}
|
|
4178
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4179
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4180
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4181
|
+
return {
|
|
4182
|
+
url: toPathString(localVarUrlObj),
|
|
4183
|
+
options: localVarRequestOptions,
|
|
4184
|
+
};
|
|
4185
|
+
}),
|
|
4186
|
+
};
|
|
4187
|
+
};
|
|
4188
|
+
/**
|
|
4189
|
+
* TradeUnitApi - functional programming interface
|
|
4190
|
+
* @export
|
|
4191
|
+
*/
|
|
4192
|
+
const TradeUnitApiFp = function (configuration) {
|
|
4193
|
+
const localVarAxiosParamCreator = TradeUnitApiAxiosParamCreator(configuration);
|
|
4194
|
+
return {
|
|
4195
|
+
/**
|
|
4196
|
+
* Returns the total units and depth of a trade asset
|
|
4197
|
+
* @param {string} asset
|
|
4198
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4199
|
+
* @param {*} [options] Override http request option.
|
|
4200
|
+
* @throws {RequiredError}
|
|
4201
|
+
*/
|
|
4202
|
+
tradeUnit(asset, height, options) {
|
|
4203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4204
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeUnit(asset, height, options);
|
|
4205
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
4206
|
+
});
|
|
4207
|
+
},
|
|
4208
|
+
};
|
|
4209
|
+
};
|
|
4210
|
+
/**
|
|
4211
|
+
* TradeUnitApi - factory interface
|
|
4212
|
+
* @export
|
|
4213
|
+
*/
|
|
4214
|
+
const TradeUnitApiFactory = function (configuration, basePath, axios) {
|
|
4215
|
+
const localVarFp = TradeUnitApiFp(configuration);
|
|
4216
|
+
return {
|
|
4217
|
+
/**
|
|
4218
|
+
* Returns the total units and depth of a trade asset
|
|
4219
|
+
* @param {string} asset
|
|
4220
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4221
|
+
* @param {*} [options] Override http request option.
|
|
4222
|
+
* @throws {RequiredError}
|
|
4223
|
+
*/
|
|
4224
|
+
tradeUnit(asset, height, options) {
|
|
4225
|
+
return localVarFp.tradeUnit(asset, height, options).then((request) => request(axios, basePath));
|
|
4226
|
+
},
|
|
4227
|
+
};
|
|
4228
|
+
};
|
|
4229
|
+
/**
|
|
4230
|
+
* TradeUnitApi - object-oriented interface
|
|
4231
|
+
* @export
|
|
4232
|
+
* @class TradeUnitApi
|
|
4233
|
+
* @extends {BaseAPI}
|
|
4234
|
+
*/
|
|
4235
|
+
class TradeUnitApi extends BaseAPI {
|
|
4236
|
+
/**
|
|
4237
|
+
* Returns the total units and depth of a trade asset
|
|
4238
|
+
* @param {string} asset
|
|
4239
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4240
|
+
* @param {*} [options] Override http request option.
|
|
4241
|
+
* @throws {RequiredError}
|
|
4242
|
+
* @memberof TradeUnitApi
|
|
4243
|
+
*/
|
|
4244
|
+
tradeUnit(asset, height, options) {
|
|
4245
|
+
return TradeUnitApiFp(this.configuration).tradeUnit(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4248
|
+
/**
|
|
4249
|
+
* TradeUnitsApi - axios parameter creator
|
|
4250
|
+
* @export
|
|
4251
|
+
*/
|
|
4252
|
+
const TradeUnitsApiAxiosParamCreator = function (configuration) {
|
|
4253
|
+
return {
|
|
4254
|
+
/**
|
|
4255
|
+
* Returns the total units and depth for each trade asset
|
|
4256
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4257
|
+
* @param {*} [options] Override http request option.
|
|
4258
|
+
* @throws {RequiredError}
|
|
4259
|
+
*/
|
|
4260
|
+
tradeUnits: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4261
|
+
const localVarPath = `/thorchain/trade/units`;
|
|
4262
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4263
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4264
|
+
let baseOptions;
|
|
4265
|
+
if (configuration) {
|
|
4266
|
+
baseOptions = configuration.baseOptions;
|
|
4267
|
+
}
|
|
4268
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4269
|
+
const localVarHeaderParameter = {};
|
|
4270
|
+
const localVarQueryParameter = {};
|
|
4271
|
+
if (height !== undefined) {
|
|
4272
|
+
localVarQueryParameter['height'] = height;
|
|
4273
|
+
}
|
|
4274
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4275
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4276
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4277
|
+
return {
|
|
4278
|
+
url: toPathString(localVarUrlObj),
|
|
4279
|
+
options: localVarRequestOptions,
|
|
4280
|
+
};
|
|
4281
|
+
}),
|
|
4282
|
+
};
|
|
4283
|
+
};
|
|
4284
|
+
/**
|
|
4285
|
+
* TradeUnitsApi - functional programming interface
|
|
4286
|
+
* @export
|
|
4287
|
+
*/
|
|
4288
|
+
const TradeUnitsApiFp = function (configuration) {
|
|
4289
|
+
const localVarAxiosParamCreator = TradeUnitsApiAxiosParamCreator(configuration);
|
|
4290
|
+
return {
|
|
4291
|
+
/**
|
|
4292
|
+
* Returns the total units and depth for each trade asset
|
|
4293
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4294
|
+
* @param {*} [options] Override http request option.
|
|
4295
|
+
* @throws {RequiredError}
|
|
4296
|
+
*/
|
|
4297
|
+
tradeUnits(height, options) {
|
|
4298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4299
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.tradeUnits(height, options);
|
|
4300
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default["default"], BASE_PATH, configuration);
|
|
4301
|
+
});
|
|
4302
|
+
},
|
|
4303
|
+
};
|
|
4304
|
+
};
|
|
4305
|
+
/**
|
|
4306
|
+
* TradeUnitsApi - factory interface
|
|
4307
|
+
* @export
|
|
4308
|
+
*/
|
|
4309
|
+
const TradeUnitsApiFactory = function (configuration, basePath, axios) {
|
|
4310
|
+
const localVarFp = TradeUnitsApiFp(configuration);
|
|
4311
|
+
return {
|
|
4312
|
+
/**
|
|
4313
|
+
* Returns the total units and depth for each trade asset
|
|
4314
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4315
|
+
* @param {*} [options] Override http request option.
|
|
4316
|
+
* @throws {RequiredError}
|
|
4317
|
+
*/
|
|
4318
|
+
tradeUnits(height, options) {
|
|
4319
|
+
return localVarFp.tradeUnits(height, options).then((request) => request(axios, basePath));
|
|
4320
|
+
},
|
|
4321
|
+
};
|
|
4322
|
+
};
|
|
4323
|
+
/**
|
|
4324
|
+
* TradeUnitsApi - object-oriented interface
|
|
4325
|
+
* @export
|
|
4326
|
+
* @class TradeUnitsApi
|
|
4327
|
+
* @extends {BaseAPI}
|
|
4328
|
+
*/
|
|
4329
|
+
class TradeUnitsApi extends BaseAPI {
|
|
4330
|
+
/**
|
|
4331
|
+
* Returns the total units and depth for each trade asset
|
|
4332
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
4333
|
+
* @param {*} [options] Override http request option.
|
|
4334
|
+
* @throws {RequiredError}
|
|
4335
|
+
* @memberof TradeUnitsApi
|
|
4336
|
+
*/
|
|
4337
|
+
tradeUnits(height, options) {
|
|
4338
|
+
return TradeUnitsApiFp(this.configuration).tradeUnits(height, options).then((request) => request(this.axios, this.basePath));
|
|
4339
|
+
}
|
|
4340
|
+
}
|
|
3941
4341
|
/**
|
|
3942
4342
|
* TransactionsApi - axios parameter creator
|
|
3943
4343
|
* @export
|
|
@@ -4586,7 +4986,7 @@ class VaultsApi extends BaseAPI {
|
|
|
4586
4986
|
* Thornode API
|
|
4587
4987
|
* Thornode REST API.
|
|
4588
4988
|
*
|
|
4589
|
-
* The version of the OpenAPI document: 1.
|
|
4989
|
+
* The version of the OpenAPI document: 1.128.1
|
|
4590
4990
|
* Contact: devs@thorchain.org
|
|
4591
4991
|
*
|
|
4592
4992
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4619,6 +5019,9 @@ class Configuration {
|
|
|
4619
5019
|
}
|
|
4620
5020
|
}
|
|
4621
5021
|
|
|
5022
|
+
/**
|
|
5023
|
+
* The base URL for the THORNode API endpoint.
|
|
5024
|
+
*/
|
|
4622
5025
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
4623
5026
|
|
|
4624
5027
|
exports.BlockApi = BlockApi;
|
|
@@ -4693,6 +5096,22 @@ exports.ThornamesApi = ThornamesApi;
|
|
|
4693
5096
|
exports.ThornamesApiAxiosParamCreator = ThornamesApiAxiosParamCreator;
|
|
4694
5097
|
exports.ThornamesApiFactory = ThornamesApiFactory;
|
|
4695
5098
|
exports.ThornamesApiFp = ThornamesApiFp;
|
|
5099
|
+
exports.TradeAccountApi = TradeAccountApi;
|
|
5100
|
+
exports.TradeAccountApiAxiosParamCreator = TradeAccountApiAxiosParamCreator;
|
|
5101
|
+
exports.TradeAccountApiFactory = TradeAccountApiFactory;
|
|
5102
|
+
exports.TradeAccountApiFp = TradeAccountApiFp;
|
|
5103
|
+
exports.TradeAccountsApi = TradeAccountsApi;
|
|
5104
|
+
exports.TradeAccountsApiAxiosParamCreator = TradeAccountsApiAxiosParamCreator;
|
|
5105
|
+
exports.TradeAccountsApiFactory = TradeAccountsApiFactory;
|
|
5106
|
+
exports.TradeAccountsApiFp = TradeAccountsApiFp;
|
|
5107
|
+
exports.TradeUnitApi = TradeUnitApi;
|
|
5108
|
+
exports.TradeUnitApiAxiosParamCreator = TradeUnitApiAxiosParamCreator;
|
|
5109
|
+
exports.TradeUnitApiFactory = TradeUnitApiFactory;
|
|
5110
|
+
exports.TradeUnitApiFp = TradeUnitApiFp;
|
|
5111
|
+
exports.TradeUnitsApi = TradeUnitsApi;
|
|
5112
|
+
exports.TradeUnitsApiAxiosParamCreator = TradeUnitsApiAxiosParamCreator;
|
|
5113
|
+
exports.TradeUnitsApiFactory = TradeUnitsApiFactory;
|
|
5114
|
+
exports.TradeUnitsApiFp = TradeUnitsApiFp;
|
|
4696
5115
|
exports.TransactionsApi = TransactionsApi;
|
|
4697
5116
|
exports.TransactionsApiAxiosParamCreator = TransactionsApiAxiosParamCreator;
|
|
4698
5117
|
exports.TransactionsApiFactory = TransactionsApiFactory;
|