@xchainjs/xchain-thornode 0.1.0-alpha
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/LICENSE +21 -0
- package/README.md +33 -0
- package/lib/config.d.ts +1 -0
- package/lib/generated/thornodeApi/api.d.ts +2510 -0
- package/lib/generated/thornodeApi/base.d.ts +55 -0
- package/lib/generated/thornodeApi/common.d.ts +65 -0
- package/lib/generated/thornodeApi/configuration.d.ts +83 -0
- package/lib/generated/thornodeApi/index.d.ts +13 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.esm.js +2615 -0
- package/lib/index.js +2667 -0
- package/package.json +46 -0
package/lib/index.esm.js
ADDED
|
@@ -0,0 +1,2615 @@
|
|
|
1
|
+
import globalAxios from 'axios';
|
|
2
|
+
|
|
3
|
+
/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */
|
|
17
|
+
|
|
18
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
19
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
21
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
22
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
23
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
24
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* tslint:disable */
|
|
29
|
+
const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
* @class BaseAPI
|
|
34
|
+
*/
|
|
35
|
+
class BaseAPI {
|
|
36
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
37
|
+
this.basePath = basePath;
|
|
38
|
+
this.axios = axios;
|
|
39
|
+
if (configuration) {
|
|
40
|
+
this.configuration = configuration;
|
|
41
|
+
this.basePath = configuration.basePath || this.basePath;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
class RequiredError extends Error {
|
|
52
|
+
constructor(field, msg) {
|
|
53
|
+
super(msg);
|
|
54
|
+
this.field = field;
|
|
55
|
+
this.name = "RequiredError";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* tslint:disable */
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
const DUMMY_BASE_URL = 'https://example.com';
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
71
|
+
if (paramValue === null || paramValue === undefined) {
|
|
72
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @export
|
|
78
|
+
*/
|
|
79
|
+
const setSearchParams = function (url, ...objects) {
|
|
80
|
+
const searchParams = new URLSearchParams(url.search);
|
|
81
|
+
for (const object of objects) {
|
|
82
|
+
for (const key in object) {
|
|
83
|
+
if (Array.isArray(object[key])) {
|
|
84
|
+
searchParams.delete(key);
|
|
85
|
+
for (const item of object[key]) {
|
|
86
|
+
searchParams.append(key, item);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
searchParams.set(key, object[key]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
url.search = searchParams.toString();
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @export
|
|
99
|
+
*/
|
|
100
|
+
const toPathString = function (url) {
|
|
101
|
+
return url.pathname + url.search + url.hash;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
108
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
109
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
|
|
110
|
+
return axios.request(axiosRequestArgs);
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/* tslint:disable */
|
|
115
|
+
const NodeStatusEnum = {
|
|
116
|
+
Active: 'Active',
|
|
117
|
+
Whitelisted: 'Whitelisted',
|
|
118
|
+
Standby: 'Standby',
|
|
119
|
+
Disabled: 'Disabled'
|
|
120
|
+
};
|
|
121
|
+
const ObservedTxStatusEnum = {
|
|
122
|
+
Done: 'done',
|
|
123
|
+
Incomplete: 'incomplete'
|
|
124
|
+
};
|
|
125
|
+
const VaultTypeEnum = {
|
|
126
|
+
AsgardVault: 'AsgardVault',
|
|
127
|
+
YggdrasilVault: 'YggdrasilVault'
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* HealthApi - axios parameter creator
|
|
131
|
+
* @export
|
|
132
|
+
*/
|
|
133
|
+
const HealthApiAxiosParamCreator = function (configuration) {
|
|
134
|
+
return {
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @param {*} [options] Override http request option.
|
|
138
|
+
* @throws {RequiredError}
|
|
139
|
+
*/
|
|
140
|
+
ping: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
const localVarPath = `/thorchain/ping`;
|
|
142
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
143
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
144
|
+
let baseOptions;
|
|
145
|
+
if (configuration) {
|
|
146
|
+
baseOptions = configuration.baseOptions;
|
|
147
|
+
}
|
|
148
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
149
|
+
const localVarHeaderParameter = {};
|
|
150
|
+
const localVarQueryParameter = {};
|
|
151
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
152
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
153
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
154
|
+
return {
|
|
155
|
+
url: toPathString(localVarUrlObj),
|
|
156
|
+
options: localVarRequestOptions,
|
|
157
|
+
};
|
|
158
|
+
}),
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* HealthApi - functional programming interface
|
|
163
|
+
* @export
|
|
164
|
+
*/
|
|
165
|
+
const HealthApiFp = function (configuration) {
|
|
166
|
+
const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration);
|
|
167
|
+
return {
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @param {*} [options] Override http request option.
|
|
171
|
+
* @throws {RequiredError}
|
|
172
|
+
*/
|
|
173
|
+
ping(options) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ping(options);
|
|
176
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* HealthApi - factory interface
|
|
183
|
+
* @export
|
|
184
|
+
*/
|
|
185
|
+
const HealthApiFactory = function (configuration, basePath, axios) {
|
|
186
|
+
const localVarFp = HealthApiFp(configuration);
|
|
187
|
+
return {
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
* @param {*} [options] Override http request option.
|
|
191
|
+
* @throws {RequiredError}
|
|
192
|
+
*/
|
|
193
|
+
ping(options) {
|
|
194
|
+
return localVarFp.ping(options).then((request) => request(axios, basePath));
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* HealthApi - object-oriented interface
|
|
200
|
+
* @export
|
|
201
|
+
* @class HealthApi
|
|
202
|
+
* @extends {BaseAPI}
|
|
203
|
+
*/
|
|
204
|
+
class HealthApi extends BaseAPI {
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @param {*} [options] Override http request option.
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
* @memberof HealthApi
|
|
210
|
+
*/
|
|
211
|
+
ping(options) {
|
|
212
|
+
return HealthApiFp(this.configuration).ping(options).then((request) => request(this.axios, this.basePath));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* LiquidityProvidersApi - axios parameter creator
|
|
217
|
+
* @export
|
|
218
|
+
*/
|
|
219
|
+
const LiquidityProvidersApiAxiosParamCreator = function (configuration) {
|
|
220
|
+
return {
|
|
221
|
+
/**
|
|
222
|
+
* Returns the liquidity provider information for an address and asset.
|
|
223
|
+
* @param {string} asset
|
|
224
|
+
* @param {string} address
|
|
225
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
liquidityProvider: (asset, address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
// verify required parameter 'asset' is not null or undefined
|
|
231
|
+
assertParamExists('liquidityProvider', 'asset', asset);
|
|
232
|
+
// verify required parameter 'address' is not null or undefined
|
|
233
|
+
assertParamExists('liquidityProvider', 'address', address);
|
|
234
|
+
const localVarPath = `/thorchain/pool/{asset}/liquidity_provider/{address}`
|
|
235
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
236
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
237
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
238
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
239
|
+
let baseOptions;
|
|
240
|
+
if (configuration) {
|
|
241
|
+
baseOptions = configuration.baseOptions;
|
|
242
|
+
}
|
|
243
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
244
|
+
const localVarHeaderParameter = {};
|
|
245
|
+
const localVarQueryParameter = {};
|
|
246
|
+
if (height !== undefined) {
|
|
247
|
+
localVarQueryParameter['height'] = height;
|
|
248
|
+
}
|
|
249
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
250
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
251
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
252
|
+
return {
|
|
253
|
+
url: toPathString(localVarUrlObj),
|
|
254
|
+
options: localVarRequestOptions,
|
|
255
|
+
};
|
|
256
|
+
}),
|
|
257
|
+
/**
|
|
258
|
+
* Returns all liquidity provider information for an asset.
|
|
259
|
+
* @param {string} asset
|
|
260
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
261
|
+
* @param {*} [options] Override http request option.
|
|
262
|
+
* @throws {RequiredError}
|
|
263
|
+
*/
|
|
264
|
+
liquidityProviders: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
// verify required parameter 'asset' is not null or undefined
|
|
266
|
+
assertParamExists('liquidityProviders', 'asset', asset);
|
|
267
|
+
const localVarPath = `/thorchain/pool/{asset}/liquidity_providers`
|
|
268
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
269
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
270
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
271
|
+
let baseOptions;
|
|
272
|
+
if (configuration) {
|
|
273
|
+
baseOptions = configuration.baseOptions;
|
|
274
|
+
}
|
|
275
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
276
|
+
const localVarHeaderParameter = {};
|
|
277
|
+
const localVarQueryParameter = {};
|
|
278
|
+
if (height !== undefined) {
|
|
279
|
+
localVarQueryParameter['height'] = height;
|
|
280
|
+
}
|
|
281
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
282
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
283
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
284
|
+
return {
|
|
285
|
+
url: toPathString(localVarUrlObj),
|
|
286
|
+
options: localVarRequestOptions,
|
|
287
|
+
};
|
|
288
|
+
}),
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* LiquidityProvidersApi - functional programming interface
|
|
293
|
+
* @export
|
|
294
|
+
*/
|
|
295
|
+
const LiquidityProvidersApiFp = function (configuration) {
|
|
296
|
+
const localVarAxiosParamCreator = LiquidityProvidersApiAxiosParamCreator(configuration);
|
|
297
|
+
return {
|
|
298
|
+
/**
|
|
299
|
+
* Returns the liquidity provider information for an address and asset.
|
|
300
|
+
* @param {string} asset
|
|
301
|
+
* @param {string} address
|
|
302
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
303
|
+
* @param {*} [options] Override http request option.
|
|
304
|
+
* @throws {RequiredError}
|
|
305
|
+
*/
|
|
306
|
+
liquidityProvider(asset, address, height, options) {
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.liquidityProvider(asset, address, height, options);
|
|
309
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
310
|
+
});
|
|
311
|
+
},
|
|
312
|
+
/**
|
|
313
|
+
* Returns all liquidity provider information for an asset.
|
|
314
|
+
* @param {string} asset
|
|
315
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
316
|
+
* @param {*} [options] Override http request option.
|
|
317
|
+
* @throws {RequiredError}
|
|
318
|
+
*/
|
|
319
|
+
liquidityProviders(asset, height, options) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.liquidityProviders(asset, height, options);
|
|
322
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
323
|
+
});
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* LiquidityProvidersApi - factory interface
|
|
329
|
+
* @export
|
|
330
|
+
*/
|
|
331
|
+
const LiquidityProvidersApiFactory = function (configuration, basePath, axios) {
|
|
332
|
+
const localVarFp = LiquidityProvidersApiFp(configuration);
|
|
333
|
+
return {
|
|
334
|
+
/**
|
|
335
|
+
* Returns the liquidity provider information for an address and asset.
|
|
336
|
+
* @param {string} asset
|
|
337
|
+
* @param {string} address
|
|
338
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
liquidityProvider(asset, address, height, options) {
|
|
343
|
+
return localVarFp.liquidityProvider(asset, address, height, options).then((request) => request(axios, basePath));
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* Returns all liquidity provider information for an asset.
|
|
347
|
+
* @param {string} asset
|
|
348
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
349
|
+
* @param {*} [options] Override http request option.
|
|
350
|
+
* @throws {RequiredError}
|
|
351
|
+
*/
|
|
352
|
+
liquidityProviders(asset, height, options) {
|
|
353
|
+
return localVarFp.liquidityProviders(asset, height, options).then((request) => request(axios, basePath));
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* LiquidityProvidersApi - object-oriented interface
|
|
359
|
+
* @export
|
|
360
|
+
* @class LiquidityProvidersApi
|
|
361
|
+
* @extends {BaseAPI}
|
|
362
|
+
*/
|
|
363
|
+
class LiquidityProvidersApi extends BaseAPI {
|
|
364
|
+
/**
|
|
365
|
+
* Returns the liquidity provider information for an address and asset.
|
|
366
|
+
* @param {string} asset
|
|
367
|
+
* @param {string} address
|
|
368
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
* @memberof LiquidityProvidersApi
|
|
372
|
+
*/
|
|
373
|
+
liquidityProvider(asset, address, height, options) {
|
|
374
|
+
return LiquidityProvidersApiFp(this.configuration).liquidityProvider(asset, address, height, options).then((request) => request(this.axios, this.basePath));
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Returns all liquidity provider information for an asset.
|
|
378
|
+
* @param {string} asset
|
|
379
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
380
|
+
* @param {*} [options] Override http request option.
|
|
381
|
+
* @throws {RequiredError}
|
|
382
|
+
* @memberof LiquidityProvidersApi
|
|
383
|
+
*/
|
|
384
|
+
liquidityProviders(asset, height, options) {
|
|
385
|
+
return LiquidityProvidersApiFp(this.configuration).liquidityProviders(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* MimirApi - axios parameter creator
|
|
390
|
+
* @export
|
|
391
|
+
*/
|
|
392
|
+
const MimirApiAxiosParamCreator = function (configuration) {
|
|
393
|
+
return {
|
|
394
|
+
/**
|
|
395
|
+
* Returns current active mimir configuration.
|
|
396
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
397
|
+
* @param {*} [options] Override http request option.
|
|
398
|
+
* @throws {RequiredError}
|
|
399
|
+
*/
|
|
400
|
+
mimir: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
const localVarPath = `/thorchain/mimir`;
|
|
402
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
403
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
404
|
+
let baseOptions;
|
|
405
|
+
if (configuration) {
|
|
406
|
+
baseOptions = configuration.baseOptions;
|
|
407
|
+
}
|
|
408
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
409
|
+
const localVarHeaderParameter = {};
|
|
410
|
+
const localVarQueryParameter = {};
|
|
411
|
+
if (height !== undefined) {
|
|
412
|
+
localVarQueryParameter['height'] = height;
|
|
413
|
+
}
|
|
414
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
415
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
416
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
417
|
+
return {
|
|
418
|
+
url: toPathString(localVarUrlObj),
|
|
419
|
+
options: localVarRequestOptions,
|
|
420
|
+
};
|
|
421
|
+
}),
|
|
422
|
+
/**
|
|
423
|
+
* Returns current admin mimir configuration.
|
|
424
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
425
|
+
* @param {*} [options] Override http request option.
|
|
426
|
+
* @throws {RequiredError}
|
|
427
|
+
*/
|
|
428
|
+
mimirAdmin: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
429
|
+
const localVarPath = `/thorchain/mimir/admin`;
|
|
430
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
431
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
432
|
+
let baseOptions;
|
|
433
|
+
if (configuration) {
|
|
434
|
+
baseOptions = configuration.baseOptions;
|
|
435
|
+
}
|
|
436
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
437
|
+
const localVarHeaderParameter = {};
|
|
438
|
+
const localVarQueryParameter = {};
|
|
439
|
+
if (height !== undefined) {
|
|
440
|
+
localVarQueryParameter['height'] = height;
|
|
441
|
+
}
|
|
442
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
443
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
444
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
445
|
+
return {
|
|
446
|
+
url: toPathString(localVarUrlObj),
|
|
447
|
+
options: localVarRequestOptions,
|
|
448
|
+
};
|
|
449
|
+
}),
|
|
450
|
+
/**
|
|
451
|
+
* Returns current active mimir configuration for the provided key.
|
|
452
|
+
* @param {string} key the mimir key to lookup
|
|
453
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
454
|
+
* @param {*} [options] Override http request option.
|
|
455
|
+
* @throws {RequiredError}
|
|
456
|
+
*/
|
|
457
|
+
mimirKey: (key, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
458
|
+
// verify required parameter 'key' is not null or undefined
|
|
459
|
+
assertParamExists('mimirKey', 'key', key);
|
|
460
|
+
const localVarPath = `/thorchain/mimir/key/{key}`
|
|
461
|
+
.replace(`{${"key"}}`, encodeURIComponent(String(key)));
|
|
462
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
463
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
464
|
+
let baseOptions;
|
|
465
|
+
if (configuration) {
|
|
466
|
+
baseOptions = configuration.baseOptions;
|
|
467
|
+
}
|
|
468
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
469
|
+
const localVarHeaderParameter = {};
|
|
470
|
+
const localVarQueryParameter = {};
|
|
471
|
+
if (height !== undefined) {
|
|
472
|
+
localVarQueryParameter['height'] = height;
|
|
473
|
+
}
|
|
474
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
475
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
476
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
477
|
+
return {
|
|
478
|
+
url: toPathString(localVarUrlObj),
|
|
479
|
+
options: localVarRequestOptions,
|
|
480
|
+
};
|
|
481
|
+
}),
|
|
482
|
+
/**
|
|
483
|
+
* Returns current node mimir configuration for the provided node address.
|
|
484
|
+
* @param {string} address
|
|
485
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
486
|
+
* @param {*} [options] Override http request option.
|
|
487
|
+
* @throws {RequiredError}
|
|
488
|
+
*/
|
|
489
|
+
mimirNode: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
// verify required parameter 'address' is not null or undefined
|
|
491
|
+
assertParamExists('mimirNode', 'address', address);
|
|
492
|
+
const localVarPath = `/thorchain/mimir/node/{address}`
|
|
493
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
494
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
495
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
496
|
+
let baseOptions;
|
|
497
|
+
if (configuration) {
|
|
498
|
+
baseOptions = configuration.baseOptions;
|
|
499
|
+
}
|
|
500
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
501
|
+
const localVarHeaderParameter = {};
|
|
502
|
+
const localVarQueryParameter = {};
|
|
503
|
+
if (height !== undefined) {
|
|
504
|
+
localVarQueryParameter['height'] = height;
|
|
505
|
+
}
|
|
506
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
507
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
508
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
509
|
+
return {
|
|
510
|
+
url: toPathString(localVarUrlObj),
|
|
511
|
+
options: localVarRequestOptions,
|
|
512
|
+
};
|
|
513
|
+
}),
|
|
514
|
+
/**
|
|
515
|
+
* Returns current node mimir votes.
|
|
516
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
517
|
+
* @param {*} [options] Override http request option.
|
|
518
|
+
* @throws {RequiredError}
|
|
519
|
+
*/
|
|
520
|
+
mimirNodes: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
521
|
+
const localVarPath = `/thorchain/mimir/nodes_all`;
|
|
522
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
523
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
524
|
+
let baseOptions;
|
|
525
|
+
if (configuration) {
|
|
526
|
+
baseOptions = configuration.baseOptions;
|
|
527
|
+
}
|
|
528
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
529
|
+
const localVarHeaderParameter = {};
|
|
530
|
+
const localVarQueryParameter = {};
|
|
531
|
+
if (height !== undefined) {
|
|
532
|
+
localVarQueryParameter['height'] = height;
|
|
533
|
+
}
|
|
534
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
535
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
536
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
537
|
+
return {
|
|
538
|
+
url: toPathString(localVarUrlObj),
|
|
539
|
+
options: localVarRequestOptions,
|
|
540
|
+
};
|
|
541
|
+
}),
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* MimirApi - functional programming interface
|
|
546
|
+
* @export
|
|
547
|
+
*/
|
|
548
|
+
const MimirApiFp = function (configuration) {
|
|
549
|
+
const localVarAxiosParamCreator = MimirApiAxiosParamCreator(configuration);
|
|
550
|
+
return {
|
|
551
|
+
/**
|
|
552
|
+
* Returns current active mimir configuration.
|
|
553
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
554
|
+
* @param {*} [options] Override http request option.
|
|
555
|
+
* @throws {RequiredError}
|
|
556
|
+
*/
|
|
557
|
+
mimir(height, options) {
|
|
558
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
559
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimir(height, options);
|
|
560
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
561
|
+
});
|
|
562
|
+
},
|
|
563
|
+
/**
|
|
564
|
+
* Returns current admin mimir configuration.
|
|
565
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
566
|
+
* @param {*} [options] Override http request option.
|
|
567
|
+
* @throws {RequiredError}
|
|
568
|
+
*/
|
|
569
|
+
mimirAdmin(height, options) {
|
|
570
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
571
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirAdmin(height, options);
|
|
572
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
573
|
+
});
|
|
574
|
+
},
|
|
575
|
+
/**
|
|
576
|
+
* Returns current active mimir configuration for the provided key.
|
|
577
|
+
* @param {string} key the mimir key to lookup
|
|
578
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
579
|
+
* @param {*} [options] Override http request option.
|
|
580
|
+
* @throws {RequiredError}
|
|
581
|
+
*/
|
|
582
|
+
mimirKey(key, height, options) {
|
|
583
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
584
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirKey(key, height, options);
|
|
585
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
586
|
+
});
|
|
587
|
+
},
|
|
588
|
+
/**
|
|
589
|
+
* Returns current node mimir configuration for the provided node address.
|
|
590
|
+
* @param {string} address
|
|
591
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
592
|
+
* @param {*} [options] Override http request option.
|
|
593
|
+
* @throws {RequiredError}
|
|
594
|
+
*/
|
|
595
|
+
mimirNode(address, height, options) {
|
|
596
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
597
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirNode(address, height, options);
|
|
598
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
599
|
+
});
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* Returns current node mimir votes.
|
|
603
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
604
|
+
* @param {*} [options] Override http request option.
|
|
605
|
+
* @throws {RequiredError}
|
|
606
|
+
*/
|
|
607
|
+
mimirNodes(height, options) {
|
|
608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
609
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mimirNodes(height, options);
|
|
610
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
611
|
+
});
|
|
612
|
+
},
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* MimirApi - factory interface
|
|
617
|
+
* @export
|
|
618
|
+
*/
|
|
619
|
+
const MimirApiFactory = function (configuration, basePath, axios) {
|
|
620
|
+
const localVarFp = MimirApiFp(configuration);
|
|
621
|
+
return {
|
|
622
|
+
/**
|
|
623
|
+
* Returns current active mimir configuration.
|
|
624
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
625
|
+
* @param {*} [options] Override http request option.
|
|
626
|
+
* @throws {RequiredError}
|
|
627
|
+
*/
|
|
628
|
+
mimir(height, options) {
|
|
629
|
+
return localVarFp.mimir(height, options).then((request) => request(axios, basePath));
|
|
630
|
+
},
|
|
631
|
+
/**
|
|
632
|
+
* Returns current admin mimir configuration.
|
|
633
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
634
|
+
* @param {*} [options] Override http request option.
|
|
635
|
+
* @throws {RequiredError}
|
|
636
|
+
*/
|
|
637
|
+
mimirAdmin(height, options) {
|
|
638
|
+
return localVarFp.mimirAdmin(height, options).then((request) => request(axios, basePath));
|
|
639
|
+
},
|
|
640
|
+
/**
|
|
641
|
+
* Returns current active mimir configuration for the provided key.
|
|
642
|
+
* @param {string} key the mimir key to lookup
|
|
643
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
644
|
+
* @param {*} [options] Override http request option.
|
|
645
|
+
* @throws {RequiredError}
|
|
646
|
+
*/
|
|
647
|
+
mimirKey(key, height, options) {
|
|
648
|
+
return localVarFp.mimirKey(key, height, options).then((request) => request(axios, basePath));
|
|
649
|
+
},
|
|
650
|
+
/**
|
|
651
|
+
* Returns current node mimir configuration for the provided node address.
|
|
652
|
+
* @param {string} address
|
|
653
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
654
|
+
* @param {*} [options] Override http request option.
|
|
655
|
+
* @throws {RequiredError}
|
|
656
|
+
*/
|
|
657
|
+
mimirNode(address, height, options) {
|
|
658
|
+
return localVarFp.mimirNode(address, height, options).then((request) => request(axios, basePath));
|
|
659
|
+
},
|
|
660
|
+
/**
|
|
661
|
+
* Returns current node mimir votes.
|
|
662
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
663
|
+
* @param {*} [options] Override http request option.
|
|
664
|
+
* @throws {RequiredError}
|
|
665
|
+
*/
|
|
666
|
+
mimirNodes(height, options) {
|
|
667
|
+
return localVarFp.mimirNodes(height, options).then((request) => request(axios, basePath));
|
|
668
|
+
},
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
/**
|
|
672
|
+
* MimirApi - object-oriented interface
|
|
673
|
+
* @export
|
|
674
|
+
* @class MimirApi
|
|
675
|
+
* @extends {BaseAPI}
|
|
676
|
+
*/
|
|
677
|
+
class MimirApi extends BaseAPI {
|
|
678
|
+
/**
|
|
679
|
+
* Returns current active mimir configuration.
|
|
680
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
681
|
+
* @param {*} [options] Override http request option.
|
|
682
|
+
* @throws {RequiredError}
|
|
683
|
+
* @memberof MimirApi
|
|
684
|
+
*/
|
|
685
|
+
mimir(height, options) {
|
|
686
|
+
return MimirApiFp(this.configuration).mimir(height, options).then((request) => request(this.axios, this.basePath));
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Returns current admin mimir configuration.
|
|
690
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
691
|
+
* @param {*} [options] Override http request option.
|
|
692
|
+
* @throws {RequiredError}
|
|
693
|
+
* @memberof MimirApi
|
|
694
|
+
*/
|
|
695
|
+
mimirAdmin(height, options) {
|
|
696
|
+
return MimirApiFp(this.configuration).mimirAdmin(height, options).then((request) => request(this.axios, this.basePath));
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Returns current active mimir configuration for the provided key.
|
|
700
|
+
* @param {string} key the mimir key to lookup
|
|
701
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
702
|
+
* @param {*} [options] Override http request option.
|
|
703
|
+
* @throws {RequiredError}
|
|
704
|
+
* @memberof MimirApi
|
|
705
|
+
*/
|
|
706
|
+
mimirKey(key, height, options) {
|
|
707
|
+
return MimirApiFp(this.configuration).mimirKey(key, height, options).then((request) => request(this.axios, this.basePath));
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Returns current node mimir configuration for the provided node address.
|
|
711
|
+
* @param {string} address
|
|
712
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
713
|
+
* @param {*} [options] Override http request option.
|
|
714
|
+
* @throws {RequiredError}
|
|
715
|
+
* @memberof MimirApi
|
|
716
|
+
*/
|
|
717
|
+
mimirNode(address, height, options) {
|
|
718
|
+
return MimirApiFp(this.configuration).mimirNode(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Returns current node mimir votes.
|
|
722
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
723
|
+
* @param {*} [options] Override http request option.
|
|
724
|
+
* @throws {RequiredError}
|
|
725
|
+
* @memberof MimirApi
|
|
726
|
+
*/
|
|
727
|
+
mimirNodes(height, options) {
|
|
728
|
+
return MimirApiFp(this.configuration).mimirNodes(height, options).then((request) => request(this.axios, this.basePath));
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* NetworkApi - axios parameter creator
|
|
733
|
+
* @export
|
|
734
|
+
*/
|
|
735
|
+
const NetworkApiAxiosParamCreator = function (configuration) {
|
|
736
|
+
return {
|
|
737
|
+
/**
|
|
738
|
+
* Returns the ban status for the provided node address.
|
|
739
|
+
* @param {string} address
|
|
740
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
741
|
+
* @param {*} [options] Override http request option.
|
|
742
|
+
* @throws {RequiredError}
|
|
743
|
+
*/
|
|
744
|
+
ban: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
745
|
+
// verify required parameter 'address' is not null or undefined
|
|
746
|
+
assertParamExists('ban', 'address', address);
|
|
747
|
+
const localVarPath = `/thorchain/ban/{address}`
|
|
748
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
749
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
750
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
751
|
+
let baseOptions;
|
|
752
|
+
if (configuration) {
|
|
753
|
+
baseOptions = configuration.baseOptions;
|
|
754
|
+
}
|
|
755
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
756
|
+
const localVarHeaderParameter = {};
|
|
757
|
+
const localVarQueryParameter = {};
|
|
758
|
+
if (height !== undefined) {
|
|
759
|
+
localVarQueryParameter['height'] = height;
|
|
760
|
+
}
|
|
761
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
762
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
763
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
764
|
+
return {
|
|
765
|
+
url: toPathString(localVarUrlObj),
|
|
766
|
+
options: localVarRequestOptions,
|
|
767
|
+
};
|
|
768
|
+
}),
|
|
769
|
+
/**
|
|
770
|
+
* Returns constant configuration, can be overridden by mimir.
|
|
771
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
772
|
+
* @param {*} [options] Override http request option.
|
|
773
|
+
* @throws {RequiredError}
|
|
774
|
+
*/
|
|
775
|
+
constants: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
776
|
+
const localVarPath = `/thorchain/constants`;
|
|
777
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
778
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
779
|
+
let baseOptions;
|
|
780
|
+
if (configuration) {
|
|
781
|
+
baseOptions = configuration.baseOptions;
|
|
782
|
+
}
|
|
783
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
784
|
+
const localVarHeaderParameter = {};
|
|
785
|
+
const localVarQueryParameter = {};
|
|
786
|
+
if (height !== undefined) {
|
|
787
|
+
localVarQueryParameter['height'] = height;
|
|
788
|
+
}
|
|
789
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
790
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
791
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
792
|
+
return {
|
|
793
|
+
url: toPathString(localVarUrlObj),
|
|
794
|
+
options: localVarRequestOptions,
|
|
795
|
+
};
|
|
796
|
+
}),
|
|
797
|
+
/**
|
|
798
|
+
* Returns the set of asgard addresses that should be used for inbound transactions.
|
|
799
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
800
|
+
* @param {*} [options] Override http request option.
|
|
801
|
+
* @throws {RequiredError}
|
|
802
|
+
*/
|
|
803
|
+
inboundAddresses: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
804
|
+
const localVarPath = `/thorchain/inbound_addresses`;
|
|
805
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
806
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
807
|
+
let baseOptions;
|
|
808
|
+
if (configuration) {
|
|
809
|
+
baseOptions = configuration.baseOptions;
|
|
810
|
+
}
|
|
811
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
812
|
+
const localVarHeaderParameter = {};
|
|
813
|
+
const localVarQueryParameter = {};
|
|
814
|
+
if (height !== undefined) {
|
|
815
|
+
localVarQueryParameter['height'] = height;
|
|
816
|
+
}
|
|
817
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
818
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
819
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
820
|
+
return {
|
|
821
|
+
url: toPathString(localVarUrlObj),
|
|
822
|
+
options: localVarRequestOptions,
|
|
823
|
+
};
|
|
824
|
+
}),
|
|
825
|
+
/**
|
|
826
|
+
* Returns the last block information for all chains.
|
|
827
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
828
|
+
* @param {*} [options] Override http request option.
|
|
829
|
+
* @throws {RequiredError}
|
|
830
|
+
*/
|
|
831
|
+
lastblock: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
832
|
+
const localVarPath = `/thorchain/lastblock`;
|
|
833
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
834
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
835
|
+
let baseOptions;
|
|
836
|
+
if (configuration) {
|
|
837
|
+
baseOptions = configuration.baseOptions;
|
|
838
|
+
}
|
|
839
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
840
|
+
const localVarHeaderParameter = {};
|
|
841
|
+
const localVarQueryParameter = {};
|
|
842
|
+
if (height !== undefined) {
|
|
843
|
+
localVarQueryParameter['height'] = height;
|
|
844
|
+
}
|
|
845
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
846
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
847
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
848
|
+
return {
|
|
849
|
+
url: toPathString(localVarUrlObj),
|
|
850
|
+
options: localVarRequestOptions,
|
|
851
|
+
};
|
|
852
|
+
}),
|
|
853
|
+
/**
|
|
854
|
+
* Returns the last block information for the provided chain.
|
|
855
|
+
* @param {string} chain
|
|
856
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
lastblockChain: (chain, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
861
|
+
// verify required parameter 'chain' is not null or undefined
|
|
862
|
+
assertParamExists('lastblockChain', 'chain', chain);
|
|
863
|
+
const localVarPath = `/thorchain/lastblock/{chain}`
|
|
864
|
+
.replace(`{${"chain"}}`, encodeURIComponent(String(chain)));
|
|
865
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
866
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
867
|
+
let baseOptions;
|
|
868
|
+
if (configuration) {
|
|
869
|
+
baseOptions = configuration.baseOptions;
|
|
870
|
+
}
|
|
871
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
872
|
+
const localVarHeaderParameter = {};
|
|
873
|
+
const localVarQueryParameter = {};
|
|
874
|
+
if (height !== undefined) {
|
|
875
|
+
localVarQueryParameter['height'] = height;
|
|
876
|
+
}
|
|
877
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
878
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
879
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
880
|
+
return {
|
|
881
|
+
url: toPathString(localVarUrlObj),
|
|
882
|
+
options: localVarRequestOptions,
|
|
883
|
+
};
|
|
884
|
+
}),
|
|
885
|
+
/**
|
|
886
|
+
* Returns network overview statistics.
|
|
887
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
888
|
+
* @param {*} [options] Override http request option.
|
|
889
|
+
* @throws {RequiredError}
|
|
890
|
+
*/
|
|
891
|
+
network: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
892
|
+
const localVarPath = `/thorchain/network`;
|
|
893
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
894
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
895
|
+
let baseOptions;
|
|
896
|
+
if (configuration) {
|
|
897
|
+
baseOptions = configuration.baseOptions;
|
|
898
|
+
}
|
|
899
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
900
|
+
const localVarHeaderParameter = {};
|
|
901
|
+
const localVarQueryParameter = {};
|
|
902
|
+
if (height !== undefined) {
|
|
903
|
+
localVarQueryParameter['height'] = height;
|
|
904
|
+
}
|
|
905
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
906
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
907
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
908
|
+
return {
|
|
909
|
+
url: toPathString(localVarUrlObj),
|
|
910
|
+
options: localVarRequestOptions,
|
|
911
|
+
};
|
|
912
|
+
}),
|
|
913
|
+
/**
|
|
914
|
+
* Returns a boolean indicating whether the chain is in ragnarok.
|
|
915
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
916
|
+
* @param {*} [options] Override http request option.
|
|
917
|
+
* @throws {RequiredError}
|
|
918
|
+
*/
|
|
919
|
+
ragnarok: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
920
|
+
const localVarPath = `/thorchain/ragnarok`;
|
|
921
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
922
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
923
|
+
let baseOptions;
|
|
924
|
+
if (configuration) {
|
|
925
|
+
baseOptions = configuration.baseOptions;
|
|
926
|
+
}
|
|
927
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
928
|
+
const localVarHeaderParameter = {};
|
|
929
|
+
const localVarQueryParameter = {};
|
|
930
|
+
if (height !== undefined) {
|
|
931
|
+
localVarQueryParameter['height'] = height;
|
|
932
|
+
}
|
|
933
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
934
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
935
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
936
|
+
return {
|
|
937
|
+
url: toPathString(localVarUrlObj),
|
|
938
|
+
options: localVarRequestOptions,
|
|
939
|
+
};
|
|
940
|
+
}),
|
|
941
|
+
/**
|
|
942
|
+
* Returns the network\'s current THORNode version, the network\'s next THORNode version, and the querier\'s THORNode version.
|
|
943
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
944
|
+
* @param {*} [options] Override http request option.
|
|
945
|
+
* @throws {RequiredError}
|
|
946
|
+
*/
|
|
947
|
+
version: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
948
|
+
const localVarPath = `/thorchain/version`;
|
|
949
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
950
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
951
|
+
let baseOptions;
|
|
952
|
+
if (configuration) {
|
|
953
|
+
baseOptions = configuration.baseOptions;
|
|
954
|
+
}
|
|
955
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
956
|
+
const localVarHeaderParameter = {};
|
|
957
|
+
const localVarQueryParameter = {};
|
|
958
|
+
if (height !== undefined) {
|
|
959
|
+
localVarQueryParameter['height'] = height;
|
|
960
|
+
}
|
|
961
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
962
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
963
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
964
|
+
return {
|
|
965
|
+
url: toPathString(localVarUrlObj),
|
|
966
|
+
options: localVarRequestOptions,
|
|
967
|
+
};
|
|
968
|
+
}),
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
/**
|
|
972
|
+
* NetworkApi - functional programming interface
|
|
973
|
+
* @export
|
|
974
|
+
*/
|
|
975
|
+
const NetworkApiFp = function (configuration) {
|
|
976
|
+
const localVarAxiosParamCreator = NetworkApiAxiosParamCreator(configuration);
|
|
977
|
+
return {
|
|
978
|
+
/**
|
|
979
|
+
* Returns the ban status for the provided node address.
|
|
980
|
+
* @param {string} address
|
|
981
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
982
|
+
* @param {*} [options] Override http request option.
|
|
983
|
+
* @throws {RequiredError}
|
|
984
|
+
*/
|
|
985
|
+
ban(address, height, options) {
|
|
986
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
987
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ban(address, height, options);
|
|
988
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
989
|
+
});
|
|
990
|
+
},
|
|
991
|
+
/**
|
|
992
|
+
* Returns constant configuration, can be overridden by mimir.
|
|
993
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
994
|
+
* @param {*} [options] Override http request option.
|
|
995
|
+
* @throws {RequiredError}
|
|
996
|
+
*/
|
|
997
|
+
constants(height, options) {
|
|
998
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
999
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.constants(height, options);
|
|
1000
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1001
|
+
});
|
|
1002
|
+
},
|
|
1003
|
+
/**
|
|
1004
|
+
* Returns the set of asgard addresses that should be used for inbound transactions.
|
|
1005
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1006
|
+
* @param {*} [options] Override http request option.
|
|
1007
|
+
* @throws {RequiredError}
|
|
1008
|
+
*/
|
|
1009
|
+
inboundAddresses(height, options) {
|
|
1010
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1011
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.inboundAddresses(height, options);
|
|
1012
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1013
|
+
});
|
|
1014
|
+
},
|
|
1015
|
+
/**
|
|
1016
|
+
* Returns the last block information for all chains.
|
|
1017
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1018
|
+
* @param {*} [options] Override http request option.
|
|
1019
|
+
* @throws {RequiredError}
|
|
1020
|
+
*/
|
|
1021
|
+
lastblock(height, options) {
|
|
1022
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1023
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.lastblock(height, options);
|
|
1024
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1025
|
+
});
|
|
1026
|
+
},
|
|
1027
|
+
/**
|
|
1028
|
+
* Returns the last block information for the provided chain.
|
|
1029
|
+
* @param {string} chain
|
|
1030
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1031
|
+
* @param {*} [options] Override http request option.
|
|
1032
|
+
* @throws {RequiredError}
|
|
1033
|
+
*/
|
|
1034
|
+
lastblockChain(chain, height, options) {
|
|
1035
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1036
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.lastblockChain(chain, height, options);
|
|
1037
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1038
|
+
});
|
|
1039
|
+
},
|
|
1040
|
+
/**
|
|
1041
|
+
* Returns network overview statistics.
|
|
1042
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1043
|
+
* @param {*} [options] Override http request option.
|
|
1044
|
+
* @throws {RequiredError}
|
|
1045
|
+
*/
|
|
1046
|
+
network(height, options) {
|
|
1047
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1048
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.network(height, options);
|
|
1049
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1050
|
+
});
|
|
1051
|
+
},
|
|
1052
|
+
/**
|
|
1053
|
+
* Returns a boolean indicating whether the chain is in ragnarok.
|
|
1054
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1055
|
+
* @param {*} [options] Override http request option.
|
|
1056
|
+
* @throws {RequiredError}
|
|
1057
|
+
*/
|
|
1058
|
+
ragnarok(height, options) {
|
|
1059
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1060
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.ragnarok(height, options);
|
|
1061
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1062
|
+
});
|
|
1063
|
+
},
|
|
1064
|
+
/**
|
|
1065
|
+
* Returns the network\'s current THORNode version, the network\'s next THORNode version, and the querier\'s THORNode version.
|
|
1066
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1067
|
+
* @param {*} [options] Override http request option.
|
|
1068
|
+
* @throws {RequiredError}
|
|
1069
|
+
*/
|
|
1070
|
+
version(height, options) {
|
|
1071
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1072
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.version(height, options);
|
|
1073
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1074
|
+
});
|
|
1075
|
+
},
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
/**
|
|
1079
|
+
* NetworkApi - factory interface
|
|
1080
|
+
* @export
|
|
1081
|
+
*/
|
|
1082
|
+
const NetworkApiFactory = function (configuration, basePath, axios) {
|
|
1083
|
+
const localVarFp = NetworkApiFp(configuration);
|
|
1084
|
+
return {
|
|
1085
|
+
/**
|
|
1086
|
+
* Returns the ban status for the provided node address.
|
|
1087
|
+
* @param {string} address
|
|
1088
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1089
|
+
* @param {*} [options] Override http request option.
|
|
1090
|
+
* @throws {RequiredError}
|
|
1091
|
+
*/
|
|
1092
|
+
ban(address, height, options) {
|
|
1093
|
+
return localVarFp.ban(address, height, options).then((request) => request(axios, basePath));
|
|
1094
|
+
},
|
|
1095
|
+
/**
|
|
1096
|
+
* Returns constant configuration, can be overridden by mimir.
|
|
1097
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1098
|
+
* @param {*} [options] Override http request option.
|
|
1099
|
+
* @throws {RequiredError}
|
|
1100
|
+
*/
|
|
1101
|
+
constants(height, options) {
|
|
1102
|
+
return localVarFp.constants(height, options).then((request) => request(axios, basePath));
|
|
1103
|
+
},
|
|
1104
|
+
/**
|
|
1105
|
+
* Returns the set of asgard addresses that should be used for inbound transactions.
|
|
1106
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1107
|
+
* @param {*} [options] Override http request option.
|
|
1108
|
+
* @throws {RequiredError}
|
|
1109
|
+
*/
|
|
1110
|
+
inboundAddresses(height, options) {
|
|
1111
|
+
return localVarFp.inboundAddresses(height, options).then((request) => request(axios, basePath));
|
|
1112
|
+
},
|
|
1113
|
+
/**
|
|
1114
|
+
* Returns the last block information for all chains.
|
|
1115
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1116
|
+
* @param {*} [options] Override http request option.
|
|
1117
|
+
* @throws {RequiredError}
|
|
1118
|
+
*/
|
|
1119
|
+
lastblock(height, options) {
|
|
1120
|
+
return localVarFp.lastblock(height, options).then((request) => request(axios, basePath));
|
|
1121
|
+
},
|
|
1122
|
+
/**
|
|
1123
|
+
* Returns the last block information for the provided chain.
|
|
1124
|
+
* @param {string} chain
|
|
1125
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1126
|
+
* @param {*} [options] Override http request option.
|
|
1127
|
+
* @throws {RequiredError}
|
|
1128
|
+
*/
|
|
1129
|
+
lastblockChain(chain, height, options) {
|
|
1130
|
+
return localVarFp.lastblockChain(chain, height, options).then((request) => request(axios, basePath));
|
|
1131
|
+
},
|
|
1132
|
+
/**
|
|
1133
|
+
* Returns network overview statistics.
|
|
1134
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1135
|
+
* @param {*} [options] Override http request option.
|
|
1136
|
+
* @throws {RequiredError}
|
|
1137
|
+
*/
|
|
1138
|
+
network(height, options) {
|
|
1139
|
+
return localVarFp.network(height, options).then((request) => request(axios, basePath));
|
|
1140
|
+
},
|
|
1141
|
+
/**
|
|
1142
|
+
* Returns a boolean indicating whether the chain is in ragnarok.
|
|
1143
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1144
|
+
* @param {*} [options] Override http request option.
|
|
1145
|
+
* @throws {RequiredError}
|
|
1146
|
+
*/
|
|
1147
|
+
ragnarok(height, options) {
|
|
1148
|
+
return localVarFp.ragnarok(height, options).then((request) => request(axios, basePath));
|
|
1149
|
+
},
|
|
1150
|
+
/**
|
|
1151
|
+
* Returns the network\'s current THORNode version, the network\'s next THORNode version, and the querier\'s THORNode version.
|
|
1152
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1153
|
+
* @param {*} [options] Override http request option.
|
|
1154
|
+
* @throws {RequiredError}
|
|
1155
|
+
*/
|
|
1156
|
+
version(height, options) {
|
|
1157
|
+
return localVarFp.version(height, options).then((request) => request(axios, basePath));
|
|
1158
|
+
},
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
/**
|
|
1162
|
+
* NetworkApi - object-oriented interface
|
|
1163
|
+
* @export
|
|
1164
|
+
* @class NetworkApi
|
|
1165
|
+
* @extends {BaseAPI}
|
|
1166
|
+
*/
|
|
1167
|
+
class NetworkApi extends BaseAPI {
|
|
1168
|
+
/**
|
|
1169
|
+
* Returns the ban status for the provided node address.
|
|
1170
|
+
* @param {string} address
|
|
1171
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1172
|
+
* @param {*} [options] Override http request option.
|
|
1173
|
+
* @throws {RequiredError}
|
|
1174
|
+
* @memberof NetworkApi
|
|
1175
|
+
*/
|
|
1176
|
+
ban(address, height, options) {
|
|
1177
|
+
return NetworkApiFp(this.configuration).ban(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Returns constant configuration, can be overridden by mimir.
|
|
1181
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1182
|
+
* @param {*} [options] Override http request option.
|
|
1183
|
+
* @throws {RequiredError}
|
|
1184
|
+
* @memberof NetworkApi
|
|
1185
|
+
*/
|
|
1186
|
+
constants(height, options) {
|
|
1187
|
+
return NetworkApiFp(this.configuration).constants(height, options).then((request) => request(this.axios, this.basePath));
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Returns the set of asgard addresses that should be used for inbound transactions.
|
|
1191
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1192
|
+
* @param {*} [options] Override http request option.
|
|
1193
|
+
* @throws {RequiredError}
|
|
1194
|
+
* @memberof NetworkApi
|
|
1195
|
+
*/
|
|
1196
|
+
inboundAddresses(height, options) {
|
|
1197
|
+
return NetworkApiFp(this.configuration).inboundAddresses(height, options).then((request) => request(this.axios, this.basePath));
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* Returns the last block information for all chains.
|
|
1201
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1202
|
+
* @param {*} [options] Override http request option.
|
|
1203
|
+
* @throws {RequiredError}
|
|
1204
|
+
* @memberof NetworkApi
|
|
1205
|
+
*/
|
|
1206
|
+
lastblock(height, options) {
|
|
1207
|
+
return NetworkApiFp(this.configuration).lastblock(height, options).then((request) => request(this.axios, this.basePath));
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Returns the last block information for the provided chain.
|
|
1211
|
+
* @param {string} chain
|
|
1212
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1213
|
+
* @param {*} [options] Override http request option.
|
|
1214
|
+
* @throws {RequiredError}
|
|
1215
|
+
* @memberof NetworkApi
|
|
1216
|
+
*/
|
|
1217
|
+
lastblockChain(chain, height, options) {
|
|
1218
|
+
return NetworkApiFp(this.configuration).lastblockChain(chain, height, options).then((request) => request(this.axios, this.basePath));
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Returns network overview statistics.
|
|
1222
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1223
|
+
* @param {*} [options] Override http request option.
|
|
1224
|
+
* @throws {RequiredError}
|
|
1225
|
+
* @memberof NetworkApi
|
|
1226
|
+
*/
|
|
1227
|
+
network(height, options) {
|
|
1228
|
+
return NetworkApiFp(this.configuration).network(height, options).then((request) => request(this.axios, this.basePath));
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Returns a boolean indicating whether the chain is in ragnarok.
|
|
1232
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1233
|
+
* @param {*} [options] Override http request option.
|
|
1234
|
+
* @throws {RequiredError}
|
|
1235
|
+
* @memberof NetworkApi
|
|
1236
|
+
*/
|
|
1237
|
+
ragnarok(height, options) {
|
|
1238
|
+
return NetworkApiFp(this.configuration).ragnarok(height, options).then((request) => request(this.axios, this.basePath));
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Returns the network\'s current THORNode version, the network\'s next THORNode version, and the querier\'s THORNode version.
|
|
1242
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1243
|
+
* @param {*} [options] Override http request option.
|
|
1244
|
+
* @throws {RequiredError}
|
|
1245
|
+
* @memberof NetworkApi
|
|
1246
|
+
*/
|
|
1247
|
+
version(height, options) {
|
|
1248
|
+
return NetworkApiFp(this.configuration).version(height, options).then((request) => request(this.axios, this.basePath));
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* PoolsApi - axios parameter creator
|
|
1253
|
+
* @export
|
|
1254
|
+
*/
|
|
1255
|
+
const PoolsApiAxiosParamCreator = function (configuration) {
|
|
1256
|
+
return {
|
|
1257
|
+
/**
|
|
1258
|
+
* Returns the pool information for the provided asset.
|
|
1259
|
+
* @param {string} asset
|
|
1260
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1261
|
+
* @param {*} [options] Override http request option.
|
|
1262
|
+
* @throws {RequiredError}
|
|
1263
|
+
*/
|
|
1264
|
+
pool: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1265
|
+
// verify required parameter 'asset' is not null or undefined
|
|
1266
|
+
assertParamExists('pool', 'asset', asset);
|
|
1267
|
+
const localVarPath = `/thorchain/pool/{asset}`
|
|
1268
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
1269
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1270
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1271
|
+
let baseOptions;
|
|
1272
|
+
if (configuration) {
|
|
1273
|
+
baseOptions = configuration.baseOptions;
|
|
1274
|
+
}
|
|
1275
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1276
|
+
const localVarHeaderParameter = {};
|
|
1277
|
+
const localVarQueryParameter = {};
|
|
1278
|
+
if (height !== undefined) {
|
|
1279
|
+
localVarQueryParameter['height'] = height;
|
|
1280
|
+
}
|
|
1281
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1282
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1283
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1284
|
+
return {
|
|
1285
|
+
url: toPathString(localVarUrlObj),
|
|
1286
|
+
options: localVarRequestOptions,
|
|
1287
|
+
};
|
|
1288
|
+
}),
|
|
1289
|
+
/**
|
|
1290
|
+
* Returns the pool information for all assets.
|
|
1291
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1292
|
+
* @param {*} [options] Override http request option.
|
|
1293
|
+
* @throws {RequiredError}
|
|
1294
|
+
*/
|
|
1295
|
+
pools: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1296
|
+
const localVarPath = `/thorchain/pools`;
|
|
1297
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1298
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1299
|
+
let baseOptions;
|
|
1300
|
+
if (configuration) {
|
|
1301
|
+
baseOptions = configuration.baseOptions;
|
|
1302
|
+
}
|
|
1303
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1304
|
+
const localVarHeaderParameter = {};
|
|
1305
|
+
const localVarQueryParameter = {};
|
|
1306
|
+
if (height !== undefined) {
|
|
1307
|
+
localVarQueryParameter['height'] = height;
|
|
1308
|
+
}
|
|
1309
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1310
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1311
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1312
|
+
return {
|
|
1313
|
+
url: toPathString(localVarUrlObj),
|
|
1314
|
+
options: localVarRequestOptions,
|
|
1315
|
+
};
|
|
1316
|
+
}),
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
/**
|
|
1320
|
+
* PoolsApi - functional programming interface
|
|
1321
|
+
* @export
|
|
1322
|
+
*/
|
|
1323
|
+
const PoolsApiFp = function (configuration) {
|
|
1324
|
+
const localVarAxiosParamCreator = PoolsApiAxiosParamCreator(configuration);
|
|
1325
|
+
return {
|
|
1326
|
+
/**
|
|
1327
|
+
* Returns the pool information for the provided asset.
|
|
1328
|
+
* @param {string} asset
|
|
1329
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1330
|
+
* @param {*} [options] Override http request option.
|
|
1331
|
+
* @throws {RequiredError}
|
|
1332
|
+
*/
|
|
1333
|
+
pool(asset, height, options) {
|
|
1334
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1335
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pool(asset, height, options);
|
|
1336
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1337
|
+
});
|
|
1338
|
+
},
|
|
1339
|
+
/**
|
|
1340
|
+
* Returns the pool information for all assets.
|
|
1341
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1342
|
+
* @param {*} [options] Override http request option.
|
|
1343
|
+
* @throws {RequiredError}
|
|
1344
|
+
*/
|
|
1345
|
+
pools(height, options) {
|
|
1346
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1347
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.pools(height, options);
|
|
1348
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1349
|
+
});
|
|
1350
|
+
},
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
/**
|
|
1354
|
+
* PoolsApi - factory interface
|
|
1355
|
+
* @export
|
|
1356
|
+
*/
|
|
1357
|
+
const PoolsApiFactory = function (configuration, basePath, axios) {
|
|
1358
|
+
const localVarFp = PoolsApiFp(configuration);
|
|
1359
|
+
return {
|
|
1360
|
+
/**
|
|
1361
|
+
* Returns the pool information for the provided asset.
|
|
1362
|
+
* @param {string} asset
|
|
1363
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1364
|
+
* @param {*} [options] Override http request option.
|
|
1365
|
+
* @throws {RequiredError}
|
|
1366
|
+
*/
|
|
1367
|
+
pool(asset, height, options) {
|
|
1368
|
+
return localVarFp.pool(asset, height, options).then((request) => request(axios, basePath));
|
|
1369
|
+
},
|
|
1370
|
+
/**
|
|
1371
|
+
* Returns the pool information for all assets.
|
|
1372
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1373
|
+
* @param {*} [options] Override http request option.
|
|
1374
|
+
* @throws {RequiredError}
|
|
1375
|
+
*/
|
|
1376
|
+
pools(height, options) {
|
|
1377
|
+
return localVarFp.pools(height, options).then((request) => request(axios, basePath));
|
|
1378
|
+
},
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
/**
|
|
1382
|
+
* PoolsApi - object-oriented interface
|
|
1383
|
+
* @export
|
|
1384
|
+
* @class PoolsApi
|
|
1385
|
+
* @extends {BaseAPI}
|
|
1386
|
+
*/
|
|
1387
|
+
class PoolsApi extends BaseAPI {
|
|
1388
|
+
/**
|
|
1389
|
+
* Returns the pool information for the provided asset.
|
|
1390
|
+
* @param {string} asset
|
|
1391
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1392
|
+
* @param {*} [options] Override http request option.
|
|
1393
|
+
* @throws {RequiredError}
|
|
1394
|
+
* @memberof PoolsApi
|
|
1395
|
+
*/
|
|
1396
|
+
pool(asset, height, options) {
|
|
1397
|
+
return PoolsApiFp(this.configuration).pool(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Returns the pool information for all assets.
|
|
1401
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1402
|
+
* @param {*} [options] Override http request option.
|
|
1403
|
+
* @throws {RequiredError}
|
|
1404
|
+
* @memberof PoolsApi
|
|
1405
|
+
*/
|
|
1406
|
+
pools(height, options) {
|
|
1407
|
+
return PoolsApiFp(this.configuration).pools(height, options).then((request) => request(this.axios, this.basePath));
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* QueueApi - axios parameter creator
|
|
1412
|
+
* @export
|
|
1413
|
+
*/
|
|
1414
|
+
const QueueApiAxiosParamCreator = function (configuration) {
|
|
1415
|
+
return {
|
|
1416
|
+
/**
|
|
1417
|
+
* Returns queue statistics.
|
|
1418
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1419
|
+
* @param {*} [options] Override http request option.
|
|
1420
|
+
* @throws {RequiredError}
|
|
1421
|
+
*/
|
|
1422
|
+
queue: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1423
|
+
const localVarPath = `/thorchain/queue`;
|
|
1424
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1425
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1426
|
+
let baseOptions;
|
|
1427
|
+
if (configuration) {
|
|
1428
|
+
baseOptions = configuration.baseOptions;
|
|
1429
|
+
}
|
|
1430
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1431
|
+
const localVarHeaderParameter = {};
|
|
1432
|
+
const localVarQueryParameter = {};
|
|
1433
|
+
if (height !== undefined) {
|
|
1434
|
+
localVarQueryParameter['height'] = height;
|
|
1435
|
+
}
|
|
1436
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1437
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1438
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1439
|
+
return {
|
|
1440
|
+
url: toPathString(localVarUrlObj),
|
|
1441
|
+
options: localVarRequestOptions,
|
|
1442
|
+
};
|
|
1443
|
+
}),
|
|
1444
|
+
/**
|
|
1445
|
+
* Returns the outbound queue including estimated RUNE values.
|
|
1446
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1447
|
+
* @param {*} [options] Override http request option.
|
|
1448
|
+
* @throws {RequiredError}
|
|
1449
|
+
*/
|
|
1450
|
+
queueOutbound: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1451
|
+
const localVarPath = `/thorchain/queue/outbound`;
|
|
1452
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1453
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1454
|
+
let baseOptions;
|
|
1455
|
+
if (configuration) {
|
|
1456
|
+
baseOptions = configuration.baseOptions;
|
|
1457
|
+
}
|
|
1458
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1459
|
+
const localVarHeaderParameter = {};
|
|
1460
|
+
const localVarQueryParameter = {};
|
|
1461
|
+
if (height !== undefined) {
|
|
1462
|
+
localVarQueryParameter['height'] = height;
|
|
1463
|
+
}
|
|
1464
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1465
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1466
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1467
|
+
return {
|
|
1468
|
+
url: toPathString(localVarUrlObj),
|
|
1469
|
+
options: localVarRequestOptions,
|
|
1470
|
+
};
|
|
1471
|
+
}),
|
|
1472
|
+
/**
|
|
1473
|
+
* Returns the scheduled queue.
|
|
1474
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1475
|
+
* @param {*} [options] Override http request option.
|
|
1476
|
+
* @throws {RequiredError}
|
|
1477
|
+
*/
|
|
1478
|
+
queueScheduled: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1479
|
+
const localVarPath = `/thorchain/queue/scheduled`;
|
|
1480
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1481
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1482
|
+
let baseOptions;
|
|
1483
|
+
if (configuration) {
|
|
1484
|
+
baseOptions = configuration.baseOptions;
|
|
1485
|
+
}
|
|
1486
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1487
|
+
const localVarHeaderParameter = {};
|
|
1488
|
+
const localVarQueryParameter = {};
|
|
1489
|
+
if (height !== undefined) {
|
|
1490
|
+
localVarQueryParameter['height'] = height;
|
|
1491
|
+
}
|
|
1492
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1493
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1494
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1495
|
+
return {
|
|
1496
|
+
url: toPathString(localVarUrlObj),
|
|
1497
|
+
options: localVarRequestOptions,
|
|
1498
|
+
};
|
|
1499
|
+
}),
|
|
1500
|
+
};
|
|
1501
|
+
};
|
|
1502
|
+
/**
|
|
1503
|
+
* QueueApi - functional programming interface
|
|
1504
|
+
* @export
|
|
1505
|
+
*/
|
|
1506
|
+
const QueueApiFp = function (configuration) {
|
|
1507
|
+
const localVarAxiosParamCreator = QueueApiAxiosParamCreator(configuration);
|
|
1508
|
+
return {
|
|
1509
|
+
/**
|
|
1510
|
+
* Returns queue statistics.
|
|
1511
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1512
|
+
* @param {*} [options] Override http request option.
|
|
1513
|
+
* @throws {RequiredError}
|
|
1514
|
+
*/
|
|
1515
|
+
queue(height, options) {
|
|
1516
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1517
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.queue(height, options);
|
|
1518
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1519
|
+
});
|
|
1520
|
+
},
|
|
1521
|
+
/**
|
|
1522
|
+
* Returns the outbound queue including estimated RUNE values.
|
|
1523
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1524
|
+
* @param {*} [options] Override http request option.
|
|
1525
|
+
* @throws {RequiredError}
|
|
1526
|
+
*/
|
|
1527
|
+
queueOutbound(height, options) {
|
|
1528
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1529
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.queueOutbound(height, options);
|
|
1530
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1531
|
+
});
|
|
1532
|
+
},
|
|
1533
|
+
/**
|
|
1534
|
+
* Returns the scheduled queue.
|
|
1535
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1536
|
+
* @param {*} [options] Override http request option.
|
|
1537
|
+
* @throws {RequiredError}
|
|
1538
|
+
*/
|
|
1539
|
+
queueScheduled(height, options) {
|
|
1540
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1541
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.queueScheduled(height, options);
|
|
1542
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1543
|
+
});
|
|
1544
|
+
},
|
|
1545
|
+
};
|
|
1546
|
+
};
|
|
1547
|
+
/**
|
|
1548
|
+
* QueueApi - factory interface
|
|
1549
|
+
* @export
|
|
1550
|
+
*/
|
|
1551
|
+
const QueueApiFactory = function (configuration, basePath, axios) {
|
|
1552
|
+
const localVarFp = QueueApiFp(configuration);
|
|
1553
|
+
return {
|
|
1554
|
+
/**
|
|
1555
|
+
* Returns queue statistics.
|
|
1556
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1557
|
+
* @param {*} [options] Override http request option.
|
|
1558
|
+
* @throws {RequiredError}
|
|
1559
|
+
*/
|
|
1560
|
+
queue(height, options) {
|
|
1561
|
+
return localVarFp.queue(height, options).then((request) => request(axios, basePath));
|
|
1562
|
+
},
|
|
1563
|
+
/**
|
|
1564
|
+
* Returns the outbound queue including estimated RUNE values.
|
|
1565
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1566
|
+
* @param {*} [options] Override http request option.
|
|
1567
|
+
* @throws {RequiredError}
|
|
1568
|
+
*/
|
|
1569
|
+
queueOutbound(height, options) {
|
|
1570
|
+
return localVarFp.queueOutbound(height, options).then((request) => request(axios, basePath));
|
|
1571
|
+
},
|
|
1572
|
+
/**
|
|
1573
|
+
* Returns the scheduled queue.
|
|
1574
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1575
|
+
* @param {*} [options] Override http request option.
|
|
1576
|
+
* @throws {RequiredError}
|
|
1577
|
+
*/
|
|
1578
|
+
queueScheduled(height, options) {
|
|
1579
|
+
return localVarFp.queueScheduled(height, options).then((request) => request(axios, basePath));
|
|
1580
|
+
},
|
|
1581
|
+
};
|
|
1582
|
+
};
|
|
1583
|
+
/**
|
|
1584
|
+
* QueueApi - object-oriented interface
|
|
1585
|
+
* @export
|
|
1586
|
+
* @class QueueApi
|
|
1587
|
+
* @extends {BaseAPI}
|
|
1588
|
+
*/
|
|
1589
|
+
class QueueApi extends BaseAPI {
|
|
1590
|
+
/**
|
|
1591
|
+
* Returns queue statistics.
|
|
1592
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1593
|
+
* @param {*} [options] Override http request option.
|
|
1594
|
+
* @throws {RequiredError}
|
|
1595
|
+
* @memberof QueueApi
|
|
1596
|
+
*/
|
|
1597
|
+
queue(height, options) {
|
|
1598
|
+
return QueueApiFp(this.configuration).queue(height, options).then((request) => request(this.axios, this.basePath));
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* Returns the outbound queue including estimated RUNE values.
|
|
1602
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1603
|
+
* @param {*} [options] Override http request option.
|
|
1604
|
+
* @throws {RequiredError}
|
|
1605
|
+
* @memberof QueueApi
|
|
1606
|
+
*/
|
|
1607
|
+
queueOutbound(height, options) {
|
|
1608
|
+
return QueueApiFp(this.configuration).queueOutbound(height, options).then((request) => request(this.axios, this.basePath));
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Returns the scheduled queue.
|
|
1612
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1613
|
+
* @param {*} [options] Override http request option.
|
|
1614
|
+
* @throws {RequiredError}
|
|
1615
|
+
* @memberof QueueApi
|
|
1616
|
+
*/
|
|
1617
|
+
queueScheduled(height, options) {
|
|
1618
|
+
return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* TSSApi - axios parameter creator
|
|
1623
|
+
* @export
|
|
1624
|
+
*/
|
|
1625
|
+
const TSSApiAxiosParamCreator = function (configuration) {
|
|
1626
|
+
return {
|
|
1627
|
+
/**
|
|
1628
|
+
* Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
|
|
1629
|
+
* @param {number} height
|
|
1630
|
+
* @param {*} [options] Override http request option.
|
|
1631
|
+
* @throws {RequiredError}
|
|
1632
|
+
*/
|
|
1633
|
+
keysign: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1634
|
+
// verify required parameter 'height' is not null or undefined
|
|
1635
|
+
assertParamExists('keysign', 'height', height);
|
|
1636
|
+
const localVarPath = `/thorchain/keysign/{height}`
|
|
1637
|
+
.replace(`{${"height"}}`, encodeURIComponent(String(height)));
|
|
1638
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1639
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1640
|
+
let baseOptions;
|
|
1641
|
+
if (configuration) {
|
|
1642
|
+
baseOptions = configuration.baseOptions;
|
|
1643
|
+
}
|
|
1644
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1645
|
+
const localVarHeaderParameter = {};
|
|
1646
|
+
const localVarQueryParameter = {};
|
|
1647
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1648
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1649
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1650
|
+
return {
|
|
1651
|
+
url: toPathString(localVarUrlObj),
|
|
1652
|
+
options: localVarRequestOptions,
|
|
1653
|
+
};
|
|
1654
|
+
}),
|
|
1655
|
+
/**
|
|
1656
|
+
* Returns keysign information for the provided height and pubkey - the height being the block at which a tx out item is scheduled to be signed and moved from the scheduled outbound queue to the outbound queue.
|
|
1657
|
+
* @param {number} height
|
|
1658
|
+
* @param {string} pubkey
|
|
1659
|
+
* @param {*} [options] Override http request option.
|
|
1660
|
+
* @throws {RequiredError}
|
|
1661
|
+
*/
|
|
1662
|
+
keysignPubkey: (height, pubkey, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1663
|
+
// verify required parameter 'height' is not null or undefined
|
|
1664
|
+
assertParamExists('keysignPubkey', 'height', height);
|
|
1665
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
1666
|
+
assertParamExists('keysignPubkey', 'pubkey', pubkey);
|
|
1667
|
+
const localVarPath = `/thorchain/keysign/{height}/{pubkey}`
|
|
1668
|
+
.replace(`{${"height"}}`, encodeURIComponent(String(height)))
|
|
1669
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
1670
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1671
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1672
|
+
let baseOptions;
|
|
1673
|
+
if (configuration) {
|
|
1674
|
+
baseOptions = configuration.baseOptions;
|
|
1675
|
+
}
|
|
1676
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1677
|
+
const localVarHeaderParameter = {};
|
|
1678
|
+
const localVarQueryParameter = {};
|
|
1679
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1680
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1681
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1682
|
+
return {
|
|
1683
|
+
url: toPathString(localVarUrlObj),
|
|
1684
|
+
options: localVarRequestOptions,
|
|
1685
|
+
};
|
|
1686
|
+
}),
|
|
1687
|
+
/**
|
|
1688
|
+
* Returns keygen and keysign metrics for current vaults.
|
|
1689
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1690
|
+
* @param {*} [options] Override http request option.
|
|
1691
|
+
* @throws {RequiredError}
|
|
1692
|
+
*/
|
|
1693
|
+
metrics: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1694
|
+
const localVarPath = `/thorchain/metrics`;
|
|
1695
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1696
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1697
|
+
let baseOptions;
|
|
1698
|
+
if (configuration) {
|
|
1699
|
+
baseOptions = configuration.baseOptions;
|
|
1700
|
+
}
|
|
1701
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1702
|
+
const localVarHeaderParameter = {};
|
|
1703
|
+
const localVarQueryParameter = {};
|
|
1704
|
+
if (height !== undefined) {
|
|
1705
|
+
localVarQueryParameter['height'] = height;
|
|
1706
|
+
}
|
|
1707
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1708
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1709
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1710
|
+
return {
|
|
1711
|
+
url: toPathString(localVarUrlObj),
|
|
1712
|
+
options: localVarRequestOptions,
|
|
1713
|
+
};
|
|
1714
|
+
}),
|
|
1715
|
+
/**
|
|
1716
|
+
* Returns keygen metrics for the provided vault pubkey.
|
|
1717
|
+
* @param {string} pubkey
|
|
1718
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1719
|
+
* @param {*} [options] Override http request option.
|
|
1720
|
+
* @throws {RequiredError}
|
|
1721
|
+
*/
|
|
1722
|
+
metricsKeygen: (pubkey, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1723
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
1724
|
+
assertParamExists('metricsKeygen', 'pubkey', pubkey);
|
|
1725
|
+
const localVarPath = `/thorchain/metric/keygen/{pubkey}`
|
|
1726
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
1727
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1728
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1729
|
+
let baseOptions;
|
|
1730
|
+
if (configuration) {
|
|
1731
|
+
baseOptions = configuration.baseOptions;
|
|
1732
|
+
}
|
|
1733
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1734
|
+
const localVarHeaderParameter = {};
|
|
1735
|
+
const localVarQueryParameter = {};
|
|
1736
|
+
if (height !== undefined) {
|
|
1737
|
+
localVarQueryParameter['height'] = height;
|
|
1738
|
+
}
|
|
1739
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1740
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1741
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1742
|
+
return {
|
|
1743
|
+
url: toPathString(localVarUrlObj),
|
|
1744
|
+
options: localVarRequestOptions,
|
|
1745
|
+
};
|
|
1746
|
+
}),
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
/**
|
|
1750
|
+
* TSSApi - functional programming interface
|
|
1751
|
+
* @export
|
|
1752
|
+
*/
|
|
1753
|
+
const TSSApiFp = function (configuration) {
|
|
1754
|
+
const localVarAxiosParamCreator = TSSApiAxiosParamCreator(configuration);
|
|
1755
|
+
return {
|
|
1756
|
+
/**
|
|
1757
|
+
* Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
|
|
1758
|
+
* @param {number} height
|
|
1759
|
+
* @param {*} [options] Override http request option.
|
|
1760
|
+
* @throws {RequiredError}
|
|
1761
|
+
*/
|
|
1762
|
+
keysign(height, options) {
|
|
1763
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1764
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.keysign(height, options);
|
|
1765
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1766
|
+
});
|
|
1767
|
+
},
|
|
1768
|
+
/**
|
|
1769
|
+
* Returns keysign information for the provided height and pubkey - the height being the block at which a tx out item is scheduled to be signed and moved from the scheduled outbound queue to the outbound queue.
|
|
1770
|
+
* @param {number} height
|
|
1771
|
+
* @param {string} pubkey
|
|
1772
|
+
* @param {*} [options] Override http request option.
|
|
1773
|
+
* @throws {RequiredError}
|
|
1774
|
+
*/
|
|
1775
|
+
keysignPubkey(height, pubkey, options) {
|
|
1776
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1777
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.keysignPubkey(height, pubkey, options);
|
|
1778
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1779
|
+
});
|
|
1780
|
+
},
|
|
1781
|
+
/**
|
|
1782
|
+
* Returns keygen and keysign metrics for current vaults.
|
|
1783
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1784
|
+
* @param {*} [options] Override http request option.
|
|
1785
|
+
* @throws {RequiredError}
|
|
1786
|
+
*/
|
|
1787
|
+
metrics(height, options) {
|
|
1788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1789
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.metrics(height, options);
|
|
1790
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1791
|
+
});
|
|
1792
|
+
},
|
|
1793
|
+
/**
|
|
1794
|
+
* Returns keygen metrics for the provided vault pubkey.
|
|
1795
|
+
* @param {string} pubkey
|
|
1796
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1797
|
+
* @param {*} [options] Override http request option.
|
|
1798
|
+
* @throws {RequiredError}
|
|
1799
|
+
*/
|
|
1800
|
+
metricsKeygen(pubkey, height, options) {
|
|
1801
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1802
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.metricsKeygen(pubkey, height, options);
|
|
1803
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1804
|
+
});
|
|
1805
|
+
},
|
|
1806
|
+
};
|
|
1807
|
+
};
|
|
1808
|
+
/**
|
|
1809
|
+
* TSSApi - factory interface
|
|
1810
|
+
* @export
|
|
1811
|
+
*/
|
|
1812
|
+
const TSSApiFactory = function (configuration, basePath, axios) {
|
|
1813
|
+
const localVarFp = TSSApiFp(configuration);
|
|
1814
|
+
return {
|
|
1815
|
+
/**
|
|
1816
|
+
* Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
|
|
1817
|
+
* @param {number} height
|
|
1818
|
+
* @param {*} [options] Override http request option.
|
|
1819
|
+
* @throws {RequiredError}
|
|
1820
|
+
*/
|
|
1821
|
+
keysign(height, options) {
|
|
1822
|
+
return localVarFp.keysign(height, options).then((request) => request(axios, basePath));
|
|
1823
|
+
},
|
|
1824
|
+
/**
|
|
1825
|
+
* Returns keysign information for the provided height and pubkey - the height being the block at which a tx out item is scheduled to be signed and moved from the scheduled outbound queue to the outbound queue.
|
|
1826
|
+
* @param {number} height
|
|
1827
|
+
* @param {string} pubkey
|
|
1828
|
+
* @param {*} [options] Override http request option.
|
|
1829
|
+
* @throws {RequiredError}
|
|
1830
|
+
*/
|
|
1831
|
+
keysignPubkey(height, pubkey, options) {
|
|
1832
|
+
return localVarFp.keysignPubkey(height, pubkey, options).then((request) => request(axios, basePath));
|
|
1833
|
+
},
|
|
1834
|
+
/**
|
|
1835
|
+
* Returns keygen and keysign metrics for current vaults.
|
|
1836
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1837
|
+
* @param {*} [options] Override http request option.
|
|
1838
|
+
* @throws {RequiredError}
|
|
1839
|
+
*/
|
|
1840
|
+
metrics(height, options) {
|
|
1841
|
+
return localVarFp.metrics(height, options).then((request) => request(axios, basePath));
|
|
1842
|
+
},
|
|
1843
|
+
/**
|
|
1844
|
+
* Returns keygen metrics for the provided vault pubkey.
|
|
1845
|
+
* @param {string} pubkey
|
|
1846
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1847
|
+
* @param {*} [options] Override http request option.
|
|
1848
|
+
* @throws {RequiredError}
|
|
1849
|
+
*/
|
|
1850
|
+
metricsKeygen(pubkey, height, options) {
|
|
1851
|
+
return localVarFp.metricsKeygen(pubkey, height, options).then((request) => request(axios, basePath));
|
|
1852
|
+
},
|
|
1853
|
+
};
|
|
1854
|
+
};
|
|
1855
|
+
/**
|
|
1856
|
+
* TSSApi - object-oriented interface
|
|
1857
|
+
* @export
|
|
1858
|
+
* @class TSSApi
|
|
1859
|
+
* @extends {BaseAPI}
|
|
1860
|
+
*/
|
|
1861
|
+
class TSSApi extends BaseAPI {
|
|
1862
|
+
/**
|
|
1863
|
+
* Returns keysign information for the provided height - the height being the first block a tx out item appears in the signed-but-unobserved outbound queue.
|
|
1864
|
+
* @param {number} height
|
|
1865
|
+
* @param {*} [options] Override http request option.
|
|
1866
|
+
* @throws {RequiredError}
|
|
1867
|
+
* @memberof TSSApi
|
|
1868
|
+
*/
|
|
1869
|
+
keysign(height, options) {
|
|
1870
|
+
return TSSApiFp(this.configuration).keysign(height, options).then((request) => request(this.axios, this.basePath));
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Returns keysign information for the provided height and pubkey - the height being the block at which a tx out item is scheduled to be signed and moved from the scheduled outbound queue to the outbound queue.
|
|
1874
|
+
* @param {number} height
|
|
1875
|
+
* @param {string} pubkey
|
|
1876
|
+
* @param {*} [options] Override http request option.
|
|
1877
|
+
* @throws {RequiredError}
|
|
1878
|
+
* @memberof TSSApi
|
|
1879
|
+
*/
|
|
1880
|
+
keysignPubkey(height, pubkey, options) {
|
|
1881
|
+
return TSSApiFp(this.configuration).keysignPubkey(height, pubkey, options).then((request) => request(this.axios, this.basePath));
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Returns keygen and keysign metrics for current vaults.
|
|
1885
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1886
|
+
* @param {*} [options] Override http request option.
|
|
1887
|
+
* @throws {RequiredError}
|
|
1888
|
+
* @memberof TSSApi
|
|
1889
|
+
*/
|
|
1890
|
+
metrics(height, options) {
|
|
1891
|
+
return TSSApiFp(this.configuration).metrics(height, options).then((request) => request(this.axios, this.basePath));
|
|
1892
|
+
}
|
|
1893
|
+
/**
|
|
1894
|
+
* Returns keygen metrics for the provided vault pubkey.
|
|
1895
|
+
* @param {string} pubkey
|
|
1896
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1897
|
+
* @param {*} [options] Override http request option.
|
|
1898
|
+
* @throws {RequiredError}
|
|
1899
|
+
* @memberof TSSApi
|
|
1900
|
+
*/
|
|
1901
|
+
metricsKeygen(pubkey, height, options) {
|
|
1902
|
+
return TSSApiFp(this.configuration).metricsKeygen(pubkey, height, options).then((request) => request(this.axios, this.basePath));
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* ThornamesApi - axios parameter creator
|
|
1907
|
+
* @export
|
|
1908
|
+
*/
|
|
1909
|
+
const ThornamesApiAxiosParamCreator = function (configuration) {
|
|
1910
|
+
return {
|
|
1911
|
+
/**
|
|
1912
|
+
* Returns addresses registered to the provided thorname.
|
|
1913
|
+
* @param {string} name the thornode to lookup
|
|
1914
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1915
|
+
* @param {*} [options] Override http request option.
|
|
1916
|
+
* @throws {RequiredError}
|
|
1917
|
+
*/
|
|
1918
|
+
thorname: (name, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1919
|
+
// verify required parameter 'name' is not null or undefined
|
|
1920
|
+
assertParamExists('thorname', 'name', name);
|
|
1921
|
+
const localVarPath = `/thorchain/thorname/{name}`
|
|
1922
|
+
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
1923
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1924
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1925
|
+
let baseOptions;
|
|
1926
|
+
if (configuration) {
|
|
1927
|
+
baseOptions = configuration.baseOptions;
|
|
1928
|
+
}
|
|
1929
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1930
|
+
const localVarHeaderParameter = {};
|
|
1931
|
+
const localVarQueryParameter = {};
|
|
1932
|
+
if (height !== undefined) {
|
|
1933
|
+
localVarQueryParameter['height'] = height;
|
|
1934
|
+
}
|
|
1935
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1936
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1937
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1938
|
+
return {
|
|
1939
|
+
url: toPathString(localVarUrlObj),
|
|
1940
|
+
options: localVarRequestOptions,
|
|
1941
|
+
};
|
|
1942
|
+
}),
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
/**
|
|
1946
|
+
* ThornamesApi - functional programming interface
|
|
1947
|
+
* @export
|
|
1948
|
+
*/
|
|
1949
|
+
const ThornamesApiFp = function (configuration) {
|
|
1950
|
+
const localVarAxiosParamCreator = ThornamesApiAxiosParamCreator(configuration);
|
|
1951
|
+
return {
|
|
1952
|
+
/**
|
|
1953
|
+
* Returns addresses registered to the provided thorname.
|
|
1954
|
+
* @param {string} name the thornode to lookup
|
|
1955
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1956
|
+
* @param {*} [options] Override http request option.
|
|
1957
|
+
* @throws {RequiredError}
|
|
1958
|
+
*/
|
|
1959
|
+
thorname(name, height, options) {
|
|
1960
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1961
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.thorname(name, height, options);
|
|
1962
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1963
|
+
});
|
|
1964
|
+
},
|
|
1965
|
+
};
|
|
1966
|
+
};
|
|
1967
|
+
/**
|
|
1968
|
+
* ThornamesApi - factory interface
|
|
1969
|
+
* @export
|
|
1970
|
+
*/
|
|
1971
|
+
const ThornamesApiFactory = function (configuration, basePath, axios) {
|
|
1972
|
+
const localVarFp = ThornamesApiFp(configuration);
|
|
1973
|
+
return {
|
|
1974
|
+
/**
|
|
1975
|
+
* Returns addresses registered to the provided thorname.
|
|
1976
|
+
* @param {string} name the thornode to lookup
|
|
1977
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1978
|
+
* @param {*} [options] Override http request option.
|
|
1979
|
+
* @throws {RequiredError}
|
|
1980
|
+
*/
|
|
1981
|
+
thorname(name, height, options) {
|
|
1982
|
+
return localVarFp.thorname(name, height, options).then((request) => request(axios, basePath));
|
|
1983
|
+
},
|
|
1984
|
+
};
|
|
1985
|
+
};
|
|
1986
|
+
/**
|
|
1987
|
+
* ThornamesApi - object-oriented interface
|
|
1988
|
+
* @export
|
|
1989
|
+
* @class ThornamesApi
|
|
1990
|
+
* @extends {BaseAPI}
|
|
1991
|
+
*/
|
|
1992
|
+
class ThornamesApi extends BaseAPI {
|
|
1993
|
+
/**
|
|
1994
|
+
* Returns addresses registered to the provided thorname.
|
|
1995
|
+
* @param {string} name the thornode to lookup
|
|
1996
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1997
|
+
* @param {*} [options] Override http request option.
|
|
1998
|
+
* @throws {RequiredError}
|
|
1999
|
+
* @memberof ThornamesApi
|
|
2000
|
+
*/
|
|
2001
|
+
thorname(name, height, options) {
|
|
2002
|
+
return ThornamesApiFp(this.configuration).thorname(name, height, options).then((request) => request(this.axios, this.basePath));
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
/**
|
|
2006
|
+
* TransactionsApi - axios parameter creator
|
|
2007
|
+
* @export
|
|
2008
|
+
*/
|
|
2009
|
+
const TransactionsApiAxiosParamCreator = function (configuration) {
|
|
2010
|
+
return {
|
|
2011
|
+
/**
|
|
2012
|
+
* Returns node information for the provided node address.
|
|
2013
|
+
* @param {string} address
|
|
2014
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2015
|
+
* @param {*} [options] Override http request option.
|
|
2016
|
+
* @throws {RequiredError}
|
|
2017
|
+
*/
|
|
2018
|
+
node: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2019
|
+
// verify required parameter 'address' is not null or undefined
|
|
2020
|
+
assertParamExists('node', 'address', address);
|
|
2021
|
+
const localVarPath = `/thorchain/node/{address}`
|
|
2022
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
2023
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2024
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2025
|
+
let baseOptions;
|
|
2026
|
+
if (configuration) {
|
|
2027
|
+
baseOptions = configuration.baseOptions;
|
|
2028
|
+
}
|
|
2029
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2030
|
+
const localVarHeaderParameter = {};
|
|
2031
|
+
const localVarQueryParameter = {};
|
|
2032
|
+
if (height !== undefined) {
|
|
2033
|
+
localVarQueryParameter['height'] = height;
|
|
2034
|
+
}
|
|
2035
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2036
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2037
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2038
|
+
return {
|
|
2039
|
+
url: toPathString(localVarUrlObj),
|
|
2040
|
+
options: localVarRequestOptions,
|
|
2041
|
+
};
|
|
2042
|
+
}),
|
|
2043
|
+
/**
|
|
2044
|
+
* Returns node information for all registered validators.
|
|
2045
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2046
|
+
* @param {*} [options] Override http request option.
|
|
2047
|
+
* @throws {RequiredError}
|
|
2048
|
+
*/
|
|
2049
|
+
nodes: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2050
|
+
const localVarPath = `/thorchain/nodes`;
|
|
2051
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2052
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2053
|
+
let baseOptions;
|
|
2054
|
+
if (configuration) {
|
|
2055
|
+
baseOptions = configuration.baseOptions;
|
|
2056
|
+
}
|
|
2057
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2058
|
+
const localVarHeaderParameter = {};
|
|
2059
|
+
const localVarQueryParameter = {};
|
|
2060
|
+
if (height !== undefined) {
|
|
2061
|
+
localVarQueryParameter['height'] = height;
|
|
2062
|
+
}
|
|
2063
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2064
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2065
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2066
|
+
return {
|
|
2067
|
+
url: toPathString(localVarUrlObj),
|
|
2068
|
+
options: localVarRequestOptions,
|
|
2069
|
+
};
|
|
2070
|
+
}),
|
|
2071
|
+
/**
|
|
2072
|
+
* Returns the observed transaction for a provided inbound or outbound hash.
|
|
2073
|
+
* @param {string} hash
|
|
2074
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2075
|
+
* @param {*} [options] Override http request option.
|
|
2076
|
+
* @throws {RequiredError}
|
|
2077
|
+
*/
|
|
2078
|
+
tx: (hash, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2079
|
+
// verify required parameter 'hash' is not null or undefined
|
|
2080
|
+
assertParamExists('tx', 'hash', hash);
|
|
2081
|
+
const localVarPath = `/thorchain/tx/{hash}`
|
|
2082
|
+
.replace(`{${"hash"}}`, encodeURIComponent(String(hash)));
|
|
2083
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2084
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2085
|
+
let baseOptions;
|
|
2086
|
+
if (configuration) {
|
|
2087
|
+
baseOptions = configuration.baseOptions;
|
|
2088
|
+
}
|
|
2089
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2090
|
+
const localVarHeaderParameter = {};
|
|
2091
|
+
const localVarQueryParameter = {};
|
|
2092
|
+
if (height !== undefined) {
|
|
2093
|
+
localVarQueryParameter['height'] = height;
|
|
2094
|
+
}
|
|
2095
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2096
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2097
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2098
|
+
return {
|
|
2099
|
+
url: toPathString(localVarUrlObj),
|
|
2100
|
+
options: localVarRequestOptions,
|
|
2101
|
+
};
|
|
2102
|
+
}),
|
|
2103
|
+
/**
|
|
2104
|
+
* Returns the signers for a provided inbound or outbound hash.
|
|
2105
|
+
* @param {string} hash
|
|
2106
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2107
|
+
* @param {*} [options] Override http request option.
|
|
2108
|
+
* @throws {RequiredError}
|
|
2109
|
+
*/
|
|
2110
|
+
txSigners: (hash, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2111
|
+
// verify required parameter 'hash' is not null or undefined
|
|
2112
|
+
assertParamExists('txSigners', 'hash', hash);
|
|
2113
|
+
const localVarPath = `/thorchain/tx/{hash}/signers`
|
|
2114
|
+
.replace(`{${"hash"}}`, encodeURIComponent(String(hash)));
|
|
2115
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2116
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2117
|
+
let baseOptions;
|
|
2118
|
+
if (configuration) {
|
|
2119
|
+
baseOptions = configuration.baseOptions;
|
|
2120
|
+
}
|
|
2121
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2122
|
+
const localVarHeaderParameter = {};
|
|
2123
|
+
const localVarQueryParameter = {};
|
|
2124
|
+
if (height !== undefined) {
|
|
2125
|
+
localVarQueryParameter['height'] = height;
|
|
2126
|
+
}
|
|
2127
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2128
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2129
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2130
|
+
return {
|
|
2131
|
+
url: toPathString(localVarUrlObj),
|
|
2132
|
+
options: localVarRequestOptions,
|
|
2133
|
+
};
|
|
2134
|
+
}),
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
/**
|
|
2138
|
+
* TransactionsApi - functional programming interface
|
|
2139
|
+
* @export
|
|
2140
|
+
*/
|
|
2141
|
+
const TransactionsApiFp = function (configuration) {
|
|
2142
|
+
const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
|
|
2143
|
+
return {
|
|
2144
|
+
/**
|
|
2145
|
+
* Returns node information for the provided node address.
|
|
2146
|
+
* @param {string} address
|
|
2147
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2148
|
+
* @param {*} [options] Override http request option.
|
|
2149
|
+
* @throws {RequiredError}
|
|
2150
|
+
*/
|
|
2151
|
+
node(address, height, options) {
|
|
2152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2153
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.node(address, height, options);
|
|
2154
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2155
|
+
});
|
|
2156
|
+
},
|
|
2157
|
+
/**
|
|
2158
|
+
* Returns node information for all registered validators.
|
|
2159
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2160
|
+
* @param {*} [options] Override http request option.
|
|
2161
|
+
* @throws {RequiredError}
|
|
2162
|
+
*/
|
|
2163
|
+
nodes(height, options) {
|
|
2164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2165
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.nodes(height, options);
|
|
2166
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2167
|
+
});
|
|
2168
|
+
},
|
|
2169
|
+
/**
|
|
2170
|
+
* Returns the observed transaction for a provided inbound or outbound hash.
|
|
2171
|
+
* @param {string} hash
|
|
2172
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2173
|
+
* @param {*} [options] Override http request option.
|
|
2174
|
+
* @throws {RequiredError}
|
|
2175
|
+
*/
|
|
2176
|
+
tx(hash, height, options) {
|
|
2177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2178
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.tx(hash, height, options);
|
|
2179
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2180
|
+
});
|
|
2181
|
+
},
|
|
2182
|
+
/**
|
|
2183
|
+
* Returns the signers for a provided inbound or outbound hash.
|
|
2184
|
+
* @param {string} hash
|
|
2185
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2186
|
+
* @param {*} [options] Override http request option.
|
|
2187
|
+
* @throws {RequiredError}
|
|
2188
|
+
*/
|
|
2189
|
+
txSigners(hash, height, options) {
|
|
2190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2191
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.txSigners(hash, height, options);
|
|
2192
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2193
|
+
});
|
|
2194
|
+
},
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
/**
|
|
2198
|
+
* TransactionsApi - factory interface
|
|
2199
|
+
* @export
|
|
2200
|
+
*/
|
|
2201
|
+
const TransactionsApiFactory = function (configuration, basePath, axios) {
|
|
2202
|
+
const localVarFp = TransactionsApiFp(configuration);
|
|
2203
|
+
return {
|
|
2204
|
+
/**
|
|
2205
|
+
* Returns node information for the provided node address.
|
|
2206
|
+
* @param {string} address
|
|
2207
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2208
|
+
* @param {*} [options] Override http request option.
|
|
2209
|
+
* @throws {RequiredError}
|
|
2210
|
+
*/
|
|
2211
|
+
node(address, height, options) {
|
|
2212
|
+
return localVarFp.node(address, height, options).then((request) => request(axios, basePath));
|
|
2213
|
+
},
|
|
2214
|
+
/**
|
|
2215
|
+
* Returns node information for all registered validators.
|
|
2216
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2217
|
+
* @param {*} [options] Override http request option.
|
|
2218
|
+
* @throws {RequiredError}
|
|
2219
|
+
*/
|
|
2220
|
+
nodes(height, options) {
|
|
2221
|
+
return localVarFp.nodes(height, options).then((request) => request(axios, basePath));
|
|
2222
|
+
},
|
|
2223
|
+
/**
|
|
2224
|
+
* Returns the observed transaction for a provided inbound or outbound hash.
|
|
2225
|
+
* @param {string} hash
|
|
2226
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2227
|
+
* @param {*} [options] Override http request option.
|
|
2228
|
+
* @throws {RequiredError}
|
|
2229
|
+
*/
|
|
2230
|
+
tx(hash, height, options) {
|
|
2231
|
+
return localVarFp.tx(hash, height, options).then((request) => request(axios, basePath));
|
|
2232
|
+
},
|
|
2233
|
+
/**
|
|
2234
|
+
* Returns the signers for a provided inbound or outbound hash.
|
|
2235
|
+
* @param {string} hash
|
|
2236
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2237
|
+
* @param {*} [options] Override http request option.
|
|
2238
|
+
* @throws {RequiredError}
|
|
2239
|
+
*/
|
|
2240
|
+
txSigners(hash, height, options) {
|
|
2241
|
+
return localVarFp.txSigners(hash, height, options).then((request) => request(axios, basePath));
|
|
2242
|
+
},
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
/**
|
|
2246
|
+
* TransactionsApi - object-oriented interface
|
|
2247
|
+
* @export
|
|
2248
|
+
* @class TransactionsApi
|
|
2249
|
+
* @extends {BaseAPI}
|
|
2250
|
+
*/
|
|
2251
|
+
class TransactionsApi extends BaseAPI {
|
|
2252
|
+
/**
|
|
2253
|
+
* Returns node information for the provided node address.
|
|
2254
|
+
* @param {string} address
|
|
2255
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2256
|
+
* @param {*} [options] Override http request option.
|
|
2257
|
+
* @throws {RequiredError}
|
|
2258
|
+
* @memberof TransactionsApi
|
|
2259
|
+
*/
|
|
2260
|
+
node(address, height, options) {
|
|
2261
|
+
return TransactionsApiFp(this.configuration).node(address, height, options).then((request) => request(this.axios, this.basePath));
|
|
2262
|
+
}
|
|
2263
|
+
/**
|
|
2264
|
+
* Returns node information for all registered validators.
|
|
2265
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2266
|
+
* @param {*} [options] Override http request option.
|
|
2267
|
+
* @throws {RequiredError}
|
|
2268
|
+
* @memberof TransactionsApi
|
|
2269
|
+
*/
|
|
2270
|
+
nodes(height, options) {
|
|
2271
|
+
return TransactionsApiFp(this.configuration).nodes(height, options).then((request) => request(this.axios, this.basePath));
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Returns the observed transaction for a provided inbound or outbound hash.
|
|
2275
|
+
* @param {string} hash
|
|
2276
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2277
|
+
* @param {*} [options] Override http request option.
|
|
2278
|
+
* @throws {RequiredError}
|
|
2279
|
+
* @memberof TransactionsApi
|
|
2280
|
+
*/
|
|
2281
|
+
tx(hash, height, options) {
|
|
2282
|
+
return TransactionsApiFp(this.configuration).tx(hash, height, options).then((request) => request(this.axios, this.basePath));
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* Returns the signers for a provided inbound or outbound hash.
|
|
2286
|
+
* @param {string} hash
|
|
2287
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2288
|
+
* @param {*} [options] Override http request option.
|
|
2289
|
+
* @throws {RequiredError}
|
|
2290
|
+
* @memberof TransactionsApi
|
|
2291
|
+
*/
|
|
2292
|
+
txSigners(hash, height, options) {
|
|
2293
|
+
return TransactionsApiFp(this.configuration).txSigners(hash, height, options).then((request) => request(this.axios, this.basePath));
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
/**
|
|
2297
|
+
* VaultsApi - axios parameter creator
|
|
2298
|
+
* @export
|
|
2299
|
+
*/
|
|
2300
|
+
const VaultsApiAxiosParamCreator = function (configuration) {
|
|
2301
|
+
return {
|
|
2302
|
+
/**
|
|
2303
|
+
* Returns current asgard vaults.
|
|
2304
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2305
|
+
* @param {*} [options] Override http request option.
|
|
2306
|
+
* @throws {RequiredError}
|
|
2307
|
+
*/
|
|
2308
|
+
asgard: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2309
|
+
const localVarPath = `/thorchain/vaults/asgard`;
|
|
2310
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2311
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2312
|
+
let baseOptions;
|
|
2313
|
+
if (configuration) {
|
|
2314
|
+
baseOptions = configuration.baseOptions;
|
|
2315
|
+
}
|
|
2316
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2317
|
+
const localVarHeaderParameter = {};
|
|
2318
|
+
const localVarQueryParameter = {};
|
|
2319
|
+
if (height !== undefined) {
|
|
2320
|
+
localVarQueryParameter['height'] = height;
|
|
2321
|
+
}
|
|
2322
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2323
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2324
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2325
|
+
return {
|
|
2326
|
+
url: toPathString(localVarUrlObj),
|
|
2327
|
+
options: localVarRequestOptions,
|
|
2328
|
+
};
|
|
2329
|
+
}),
|
|
2330
|
+
/**
|
|
2331
|
+
* Returns the vault for the provided pubkey.
|
|
2332
|
+
* @param {string} pubkey
|
|
2333
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2334
|
+
* @param {*} [options] Override http request option.
|
|
2335
|
+
* @throws {RequiredError}
|
|
2336
|
+
*/
|
|
2337
|
+
vault: (pubkey, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2338
|
+
// verify required parameter 'pubkey' is not null or undefined
|
|
2339
|
+
assertParamExists('vault', 'pubkey', pubkey);
|
|
2340
|
+
const localVarPath = `/thorchain/vaults/{pubkey}`
|
|
2341
|
+
.replace(`{${"pubkey"}}`, encodeURIComponent(String(pubkey)));
|
|
2342
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2343
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2344
|
+
let baseOptions;
|
|
2345
|
+
if (configuration) {
|
|
2346
|
+
baseOptions = configuration.baseOptions;
|
|
2347
|
+
}
|
|
2348
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2349
|
+
const localVarHeaderParameter = {};
|
|
2350
|
+
const localVarQueryParameter = {};
|
|
2351
|
+
if (height !== undefined) {
|
|
2352
|
+
localVarQueryParameter['height'] = height;
|
|
2353
|
+
}
|
|
2354
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2355
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2356
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2357
|
+
return {
|
|
2358
|
+
url: toPathString(localVarUrlObj),
|
|
2359
|
+
options: localVarRequestOptions,
|
|
2360
|
+
};
|
|
2361
|
+
}),
|
|
2362
|
+
/**
|
|
2363
|
+
* Returns all pubkeys for current vaults.
|
|
2364
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2365
|
+
* @param {*} [options] Override http request option.
|
|
2366
|
+
* @throws {RequiredError}
|
|
2367
|
+
*/
|
|
2368
|
+
vaultPubkeys: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2369
|
+
const localVarPath = `/thorchain/vaults/pubkeys`;
|
|
2370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2372
|
+
let baseOptions;
|
|
2373
|
+
if (configuration) {
|
|
2374
|
+
baseOptions = configuration.baseOptions;
|
|
2375
|
+
}
|
|
2376
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2377
|
+
const localVarHeaderParameter = {};
|
|
2378
|
+
const localVarQueryParameter = {};
|
|
2379
|
+
if (height !== undefined) {
|
|
2380
|
+
localVarQueryParameter['height'] = height;
|
|
2381
|
+
}
|
|
2382
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2383
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2384
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2385
|
+
return {
|
|
2386
|
+
url: toPathString(localVarUrlObj),
|
|
2387
|
+
options: localVarRequestOptions,
|
|
2388
|
+
};
|
|
2389
|
+
}),
|
|
2390
|
+
/**
|
|
2391
|
+
* Returns current yggdrasil vaults.
|
|
2392
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2393
|
+
* @param {*} [options] Override http request option.
|
|
2394
|
+
* @throws {RequiredError}
|
|
2395
|
+
*/
|
|
2396
|
+
yggdrasil: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2397
|
+
const localVarPath = `/thorchain/vaults/yggdrasil`;
|
|
2398
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2399
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2400
|
+
let baseOptions;
|
|
2401
|
+
if (configuration) {
|
|
2402
|
+
baseOptions = configuration.baseOptions;
|
|
2403
|
+
}
|
|
2404
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2405
|
+
const localVarHeaderParameter = {};
|
|
2406
|
+
const localVarQueryParameter = {};
|
|
2407
|
+
if (height !== undefined) {
|
|
2408
|
+
localVarQueryParameter['height'] = height;
|
|
2409
|
+
}
|
|
2410
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2411
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2412
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2413
|
+
return {
|
|
2414
|
+
url: toPathString(localVarUrlObj),
|
|
2415
|
+
options: localVarRequestOptions,
|
|
2416
|
+
};
|
|
2417
|
+
}),
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
/**
|
|
2421
|
+
* VaultsApi - functional programming interface
|
|
2422
|
+
* @export
|
|
2423
|
+
*/
|
|
2424
|
+
const VaultsApiFp = function (configuration) {
|
|
2425
|
+
const localVarAxiosParamCreator = VaultsApiAxiosParamCreator(configuration);
|
|
2426
|
+
return {
|
|
2427
|
+
/**
|
|
2428
|
+
* Returns current asgard vaults.
|
|
2429
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2430
|
+
* @param {*} [options] Override http request option.
|
|
2431
|
+
* @throws {RequiredError}
|
|
2432
|
+
*/
|
|
2433
|
+
asgard(height, options) {
|
|
2434
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2435
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.asgard(height, options);
|
|
2436
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2437
|
+
});
|
|
2438
|
+
},
|
|
2439
|
+
/**
|
|
2440
|
+
* Returns the vault for the provided pubkey.
|
|
2441
|
+
* @param {string} pubkey
|
|
2442
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2443
|
+
* @param {*} [options] Override http request option.
|
|
2444
|
+
* @throws {RequiredError}
|
|
2445
|
+
*/
|
|
2446
|
+
vault(pubkey, height, options) {
|
|
2447
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2448
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.vault(pubkey, height, options);
|
|
2449
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2450
|
+
});
|
|
2451
|
+
},
|
|
2452
|
+
/**
|
|
2453
|
+
* Returns all pubkeys for current vaults.
|
|
2454
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2455
|
+
* @param {*} [options] Override http request option.
|
|
2456
|
+
* @throws {RequiredError}
|
|
2457
|
+
*/
|
|
2458
|
+
vaultPubkeys(height, options) {
|
|
2459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2460
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.vaultPubkeys(height, options);
|
|
2461
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2462
|
+
});
|
|
2463
|
+
},
|
|
2464
|
+
/**
|
|
2465
|
+
* Returns current yggdrasil vaults.
|
|
2466
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2467
|
+
* @param {*} [options] Override http request option.
|
|
2468
|
+
* @throws {RequiredError}
|
|
2469
|
+
*/
|
|
2470
|
+
yggdrasil(height, options) {
|
|
2471
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2472
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.yggdrasil(height, options);
|
|
2473
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2474
|
+
});
|
|
2475
|
+
},
|
|
2476
|
+
};
|
|
2477
|
+
};
|
|
2478
|
+
/**
|
|
2479
|
+
* VaultsApi - factory interface
|
|
2480
|
+
* @export
|
|
2481
|
+
*/
|
|
2482
|
+
const VaultsApiFactory = function (configuration, basePath, axios) {
|
|
2483
|
+
const localVarFp = VaultsApiFp(configuration);
|
|
2484
|
+
return {
|
|
2485
|
+
/**
|
|
2486
|
+
* Returns current asgard vaults.
|
|
2487
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2488
|
+
* @param {*} [options] Override http request option.
|
|
2489
|
+
* @throws {RequiredError}
|
|
2490
|
+
*/
|
|
2491
|
+
asgard(height, options) {
|
|
2492
|
+
return localVarFp.asgard(height, options).then((request) => request(axios, basePath));
|
|
2493
|
+
},
|
|
2494
|
+
/**
|
|
2495
|
+
* Returns the vault for the provided pubkey.
|
|
2496
|
+
* @param {string} pubkey
|
|
2497
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2498
|
+
* @param {*} [options] Override http request option.
|
|
2499
|
+
* @throws {RequiredError}
|
|
2500
|
+
*/
|
|
2501
|
+
vault(pubkey, height, options) {
|
|
2502
|
+
return localVarFp.vault(pubkey, height, options).then((request) => request(axios, basePath));
|
|
2503
|
+
},
|
|
2504
|
+
/**
|
|
2505
|
+
* Returns all pubkeys for current vaults.
|
|
2506
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2507
|
+
* @param {*} [options] Override http request option.
|
|
2508
|
+
* @throws {RequiredError}
|
|
2509
|
+
*/
|
|
2510
|
+
vaultPubkeys(height, options) {
|
|
2511
|
+
return localVarFp.vaultPubkeys(height, options).then((request) => request(axios, basePath));
|
|
2512
|
+
},
|
|
2513
|
+
/**
|
|
2514
|
+
* Returns current yggdrasil vaults.
|
|
2515
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2516
|
+
* @param {*} [options] Override http request option.
|
|
2517
|
+
* @throws {RequiredError}
|
|
2518
|
+
*/
|
|
2519
|
+
yggdrasil(height, options) {
|
|
2520
|
+
return localVarFp.yggdrasil(height, options).then((request) => request(axios, basePath));
|
|
2521
|
+
},
|
|
2522
|
+
};
|
|
2523
|
+
};
|
|
2524
|
+
/**
|
|
2525
|
+
* VaultsApi - object-oriented interface
|
|
2526
|
+
* @export
|
|
2527
|
+
* @class VaultsApi
|
|
2528
|
+
* @extends {BaseAPI}
|
|
2529
|
+
*/
|
|
2530
|
+
class VaultsApi extends BaseAPI {
|
|
2531
|
+
/**
|
|
2532
|
+
* Returns current asgard vaults.
|
|
2533
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2534
|
+
* @param {*} [options] Override http request option.
|
|
2535
|
+
* @throws {RequiredError}
|
|
2536
|
+
* @memberof VaultsApi
|
|
2537
|
+
*/
|
|
2538
|
+
asgard(height, options) {
|
|
2539
|
+
return VaultsApiFp(this.configuration).asgard(height, options).then((request) => request(this.axios, this.basePath));
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* Returns the vault for the provided pubkey.
|
|
2543
|
+
* @param {string} pubkey
|
|
2544
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2545
|
+
* @param {*} [options] Override http request option.
|
|
2546
|
+
* @throws {RequiredError}
|
|
2547
|
+
* @memberof VaultsApi
|
|
2548
|
+
*/
|
|
2549
|
+
vault(pubkey, height, options) {
|
|
2550
|
+
return VaultsApiFp(this.configuration).vault(pubkey, height, options).then((request) => request(this.axios, this.basePath));
|
|
2551
|
+
}
|
|
2552
|
+
/**
|
|
2553
|
+
* Returns all pubkeys for current vaults.
|
|
2554
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2555
|
+
* @param {*} [options] Override http request option.
|
|
2556
|
+
* @throws {RequiredError}
|
|
2557
|
+
* @memberof VaultsApi
|
|
2558
|
+
*/
|
|
2559
|
+
vaultPubkeys(height, options) {
|
|
2560
|
+
return VaultsApiFp(this.configuration).vaultPubkeys(height, options).then((request) => request(this.axios, this.basePath));
|
|
2561
|
+
}
|
|
2562
|
+
/**
|
|
2563
|
+
* Returns current yggdrasil vaults.
|
|
2564
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2565
|
+
* @param {*} [options] Override http request option.
|
|
2566
|
+
* @throws {RequiredError}
|
|
2567
|
+
* @memberof VaultsApi
|
|
2568
|
+
*/
|
|
2569
|
+
yggdrasil(height, options) {
|
|
2570
|
+
return VaultsApiFp(this.configuration).yggdrasil(height, options).then((request) => request(this.axios, this.basePath));
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
/* tslint:disable */
|
|
2575
|
+
/* eslint-disable */
|
|
2576
|
+
/**
|
|
2577
|
+
* Thornode API
|
|
2578
|
+
* Thornode REST API.
|
|
2579
|
+
*
|
|
2580
|
+
* The version of the OpenAPI document: 1.89.0
|
|
2581
|
+
* Contact: devs@thorchain.org
|
|
2582
|
+
*
|
|
2583
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2584
|
+
* https://openapi-generator.tech
|
|
2585
|
+
* Do not edit the class manually.
|
|
2586
|
+
*/
|
|
2587
|
+
class Configuration {
|
|
2588
|
+
constructor(param = {}) {
|
|
2589
|
+
this.apiKey = param.apiKey;
|
|
2590
|
+
this.username = param.username;
|
|
2591
|
+
this.password = param.password;
|
|
2592
|
+
this.accessToken = param.accessToken;
|
|
2593
|
+
this.basePath = param.basePath;
|
|
2594
|
+
this.baseOptions = param.baseOptions;
|
|
2595
|
+
this.formDataCtor = param.formDataCtor;
|
|
2596
|
+
}
|
|
2597
|
+
/**
|
|
2598
|
+
* Check if the given MIME is a JSON MIME.
|
|
2599
|
+
* JSON MIME examples:
|
|
2600
|
+
* application/json
|
|
2601
|
+
* application/json; charset=UTF8
|
|
2602
|
+
* APPLICATION/JSON
|
|
2603
|
+
* application/vnd.company+json
|
|
2604
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
2605
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
2606
|
+
*/
|
|
2607
|
+
isJsonMime(mime) {
|
|
2608
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
2609
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
2614
|
+
|
|
2615
|
+
export { Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, ObservedTxStatusEnum, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, THORNODE_API_9R_URL, TSSApi, TSSApiAxiosParamCreator, TSSApiFactory, TSSApiFp, ThornamesApi, ThornamesApiAxiosParamCreator, ThornamesApiFactory, ThornamesApiFp, TransactionsApi, TransactionsApiAxiosParamCreator, TransactionsApiFactory, TransactionsApiFp, VaultTypeEnum, VaultsApi, VaultsApiAxiosParamCreator, VaultsApiFactory, VaultsApiFp };
|