@xchainjs/xchain-thornode 0.1.0-alpha2 → 0.1.0-alpha3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1248,6 +1248,165 @@ class NetworkApi extends BaseAPI {
1248
1248
  return NetworkApiFp(this.configuration).version(height, options).then((request) => request(this.axios, this.basePath));
1249
1249
  }
1250
1250
  }
1251
+ /**
1252
+ * NodesApi - axios parameter creator
1253
+ * @export
1254
+ */
1255
+ const NodesApiAxiosParamCreator = function (configuration) {
1256
+ return {
1257
+ /**
1258
+ * Returns node information for the provided node address.
1259
+ * @param {string} address
1260
+ * @param {number} [height] optional block height, defaults to current tip
1261
+ * @param {*} [options] Override http request option.
1262
+ * @throws {RequiredError}
1263
+ */
1264
+ node: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
1265
+ // verify required parameter 'address' is not null or undefined
1266
+ assertParamExists('node', 'address', address);
1267
+ const localVarPath = `/thorchain/node/{address}`
1268
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
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 node information for all registered validators.
1291
+ * @param {number} [height] optional block height, defaults to current tip
1292
+ * @param {*} [options] Override http request option.
1293
+ * @throws {RequiredError}
1294
+ */
1295
+ nodes: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
1296
+ const localVarPath = `/thorchain/nodes`;
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
+ * NodesApi - functional programming interface
1321
+ * @export
1322
+ */
1323
+ const NodesApiFp = function (configuration) {
1324
+ const localVarAxiosParamCreator = NodesApiAxiosParamCreator(configuration);
1325
+ return {
1326
+ /**
1327
+ * Returns node information for the provided node address.
1328
+ * @param {string} address
1329
+ * @param {number} [height] optional block height, defaults to current tip
1330
+ * @param {*} [options] Override http request option.
1331
+ * @throws {RequiredError}
1332
+ */
1333
+ node(address, height, options) {
1334
+ return __awaiter(this, void 0, void 0, function* () {
1335
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.node(address, height, options);
1336
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1337
+ });
1338
+ },
1339
+ /**
1340
+ * Returns node information for all registered validators.
1341
+ * @param {number} [height] optional block height, defaults to current tip
1342
+ * @param {*} [options] Override http request option.
1343
+ * @throws {RequiredError}
1344
+ */
1345
+ nodes(height, options) {
1346
+ return __awaiter(this, void 0, void 0, function* () {
1347
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.nodes(height, options);
1348
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1349
+ });
1350
+ },
1351
+ };
1352
+ };
1353
+ /**
1354
+ * NodesApi - factory interface
1355
+ * @export
1356
+ */
1357
+ const NodesApiFactory = function (configuration, basePath, axios) {
1358
+ const localVarFp = NodesApiFp(configuration);
1359
+ return {
1360
+ /**
1361
+ * Returns node information for the provided node address.
1362
+ * @param {string} address
1363
+ * @param {number} [height] optional block height, defaults to current tip
1364
+ * @param {*} [options] Override http request option.
1365
+ * @throws {RequiredError}
1366
+ */
1367
+ node(address, height, options) {
1368
+ return localVarFp.node(address, height, options).then((request) => request(axios, basePath));
1369
+ },
1370
+ /**
1371
+ * Returns node information for all registered validators.
1372
+ * @param {number} [height] optional block height, defaults to current tip
1373
+ * @param {*} [options] Override http request option.
1374
+ * @throws {RequiredError}
1375
+ */
1376
+ nodes(height, options) {
1377
+ return localVarFp.nodes(height, options).then((request) => request(axios, basePath));
1378
+ },
1379
+ };
1380
+ };
1381
+ /**
1382
+ * NodesApi - object-oriented interface
1383
+ * @export
1384
+ * @class NodesApi
1385
+ * @extends {BaseAPI}
1386
+ */
1387
+ class NodesApi extends BaseAPI {
1388
+ /**
1389
+ * Returns node information for the provided node address.
1390
+ * @param {string} address
1391
+ * @param {number} [height] optional block height, defaults to current tip
1392
+ * @param {*} [options] Override http request option.
1393
+ * @throws {RequiredError}
1394
+ * @memberof NodesApi
1395
+ */
1396
+ node(address, height, options) {
1397
+ return NodesApiFp(this.configuration).node(address, height, options).then((request) => request(this.axios, this.basePath));
1398
+ }
1399
+ /**
1400
+ * Returns node information for all registered validators.
1401
+ * @param {number} [height] optional block height, defaults to current tip
1402
+ * @param {*} [options] Override http request option.
1403
+ * @throws {RequiredError}
1404
+ * @memberof NodesApi
1405
+ */
1406
+ nodes(height, options) {
1407
+ return NodesApiFp(this.configuration).nodes(height, options).then((request) => request(this.axios, this.basePath));
1408
+ }
1409
+ }
1251
1410
  /**
1252
1411
  * PoolsApi - axios parameter creator
1253
1412
  * @export
@@ -2008,66 +2167,6 @@ class ThornamesApi extends BaseAPI {
2008
2167
  */
2009
2168
  const TransactionsApiAxiosParamCreator = function (configuration) {
2010
2169
  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
2170
  /**
2072
2171
  * Returns the observed transaction for a provided inbound or outbound hash.
2073
2172
  * @param {string} hash
@@ -2141,31 +2240,6 @@ const TransactionsApiAxiosParamCreator = function (configuration) {
2141
2240
  const TransactionsApiFp = function (configuration) {
2142
2241
  const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
2143
2242
  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
2243
  /**
2170
2244
  * Returns the observed transaction for a provided inbound or outbound hash.
2171
2245
  * @param {string} hash
@@ -2201,25 +2275,6 @@ const TransactionsApiFp = function (configuration) {
2201
2275
  const TransactionsApiFactory = function (configuration, basePath, axios) {
2202
2276
  const localVarFp = TransactionsApiFp(configuration);
2203
2277
  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
2278
  /**
2224
2279
  * Returns the observed transaction for a provided inbound or outbound hash.
2225
2280
  * @param {string} hash
@@ -2249,27 +2304,6 @@ const TransactionsApiFactory = function (configuration, basePath, axios) {
2249
2304
  * @extends {BaseAPI}
2250
2305
  */
2251
2306
  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
2307
  /**
2274
2308
  * Returns the observed transaction for a provided inbound or outbound hash.
2275
2309
  * @param {string} hash
@@ -2612,4 +2646,4 @@ class Configuration {
2612
2646
 
2613
2647
  const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
2614
2648
 
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 };
2649
+ export { Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, 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 };
package/lib/index.js CHANGED
@@ -1256,6 +1256,165 @@ class NetworkApi extends BaseAPI {
1256
1256
  return NetworkApiFp(this.configuration).version(height, options).then((request) => request(this.axios, this.basePath));
1257
1257
  }
1258
1258
  }
1259
+ /**
1260
+ * NodesApi - axios parameter creator
1261
+ * @export
1262
+ */
1263
+ const NodesApiAxiosParamCreator = function (configuration) {
1264
+ return {
1265
+ /**
1266
+ * Returns node information for the provided node address.
1267
+ * @param {string} address
1268
+ * @param {number} [height] optional block height, defaults to current tip
1269
+ * @param {*} [options] Override http request option.
1270
+ * @throws {RequiredError}
1271
+ */
1272
+ node: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
1273
+ // verify required parameter 'address' is not null or undefined
1274
+ assertParamExists('node', 'address', address);
1275
+ const localVarPath = `/thorchain/node/{address}`
1276
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
1277
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1278
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1279
+ let baseOptions;
1280
+ if (configuration) {
1281
+ baseOptions = configuration.baseOptions;
1282
+ }
1283
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1284
+ const localVarHeaderParameter = {};
1285
+ const localVarQueryParameter = {};
1286
+ if (height !== undefined) {
1287
+ localVarQueryParameter['height'] = height;
1288
+ }
1289
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1290
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1291
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1292
+ return {
1293
+ url: toPathString(localVarUrlObj),
1294
+ options: localVarRequestOptions,
1295
+ };
1296
+ }),
1297
+ /**
1298
+ * Returns node information for all registered validators.
1299
+ * @param {number} [height] optional block height, defaults to current tip
1300
+ * @param {*} [options] Override http request option.
1301
+ * @throws {RequiredError}
1302
+ */
1303
+ nodes: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
1304
+ const localVarPath = `/thorchain/nodes`;
1305
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1306
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1307
+ let baseOptions;
1308
+ if (configuration) {
1309
+ baseOptions = configuration.baseOptions;
1310
+ }
1311
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1312
+ const localVarHeaderParameter = {};
1313
+ const localVarQueryParameter = {};
1314
+ if (height !== undefined) {
1315
+ localVarQueryParameter['height'] = height;
1316
+ }
1317
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1318
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1319
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1320
+ return {
1321
+ url: toPathString(localVarUrlObj),
1322
+ options: localVarRequestOptions,
1323
+ };
1324
+ }),
1325
+ };
1326
+ };
1327
+ /**
1328
+ * NodesApi - functional programming interface
1329
+ * @export
1330
+ */
1331
+ const NodesApiFp = function (configuration) {
1332
+ const localVarAxiosParamCreator = NodesApiAxiosParamCreator(configuration);
1333
+ return {
1334
+ /**
1335
+ * Returns node information for the provided node address.
1336
+ * @param {string} address
1337
+ * @param {number} [height] optional block height, defaults to current tip
1338
+ * @param {*} [options] Override http request option.
1339
+ * @throws {RequiredError}
1340
+ */
1341
+ node(address, height, options) {
1342
+ return __awaiter(this, void 0, void 0, function* () {
1343
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.node(address, height, options);
1344
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
1345
+ });
1346
+ },
1347
+ /**
1348
+ * Returns node information for all registered validators.
1349
+ * @param {number} [height] optional block height, defaults to current tip
1350
+ * @param {*} [options] Override http request option.
1351
+ * @throws {RequiredError}
1352
+ */
1353
+ nodes(height, options) {
1354
+ return __awaiter(this, void 0, void 0, function* () {
1355
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.nodes(height, options);
1356
+ return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
1357
+ });
1358
+ },
1359
+ };
1360
+ };
1361
+ /**
1362
+ * NodesApi - factory interface
1363
+ * @export
1364
+ */
1365
+ const NodesApiFactory = function (configuration, basePath, axios) {
1366
+ const localVarFp = NodesApiFp(configuration);
1367
+ return {
1368
+ /**
1369
+ * Returns node information for the provided node address.
1370
+ * @param {string} address
1371
+ * @param {number} [height] optional block height, defaults to current tip
1372
+ * @param {*} [options] Override http request option.
1373
+ * @throws {RequiredError}
1374
+ */
1375
+ node(address, height, options) {
1376
+ return localVarFp.node(address, height, options).then((request) => request(axios, basePath));
1377
+ },
1378
+ /**
1379
+ * Returns node information for all registered validators.
1380
+ * @param {number} [height] optional block height, defaults to current tip
1381
+ * @param {*} [options] Override http request option.
1382
+ * @throws {RequiredError}
1383
+ */
1384
+ nodes(height, options) {
1385
+ return localVarFp.nodes(height, options).then((request) => request(axios, basePath));
1386
+ },
1387
+ };
1388
+ };
1389
+ /**
1390
+ * NodesApi - object-oriented interface
1391
+ * @export
1392
+ * @class NodesApi
1393
+ * @extends {BaseAPI}
1394
+ */
1395
+ class NodesApi extends BaseAPI {
1396
+ /**
1397
+ * Returns node information for the provided node address.
1398
+ * @param {string} address
1399
+ * @param {number} [height] optional block height, defaults to current tip
1400
+ * @param {*} [options] Override http request option.
1401
+ * @throws {RequiredError}
1402
+ * @memberof NodesApi
1403
+ */
1404
+ node(address, height, options) {
1405
+ return NodesApiFp(this.configuration).node(address, height, options).then((request) => request(this.axios, this.basePath));
1406
+ }
1407
+ /**
1408
+ * Returns node information for all registered validators.
1409
+ * @param {number} [height] optional block height, defaults to current tip
1410
+ * @param {*} [options] Override http request option.
1411
+ * @throws {RequiredError}
1412
+ * @memberof NodesApi
1413
+ */
1414
+ nodes(height, options) {
1415
+ return NodesApiFp(this.configuration).nodes(height, options).then((request) => request(this.axios, this.basePath));
1416
+ }
1417
+ }
1259
1418
  /**
1260
1419
  * PoolsApi - axios parameter creator
1261
1420
  * @export
@@ -2016,66 +2175,6 @@ class ThornamesApi extends BaseAPI {
2016
2175
  */
2017
2176
  const TransactionsApiAxiosParamCreator = function (configuration) {
2018
2177
  return {
2019
- /**
2020
- * Returns node information for the provided node address.
2021
- * @param {string} address
2022
- * @param {number} [height] optional block height, defaults to current tip
2023
- * @param {*} [options] Override http request option.
2024
- * @throws {RequiredError}
2025
- */
2026
- node: (address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2027
- // verify required parameter 'address' is not null or undefined
2028
- assertParamExists('node', 'address', address);
2029
- const localVarPath = `/thorchain/node/{address}`
2030
- .replace(`{${"address"}}`, encodeURIComponent(String(address)));
2031
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2032
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2033
- let baseOptions;
2034
- if (configuration) {
2035
- baseOptions = configuration.baseOptions;
2036
- }
2037
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2038
- const localVarHeaderParameter = {};
2039
- const localVarQueryParameter = {};
2040
- if (height !== undefined) {
2041
- localVarQueryParameter['height'] = height;
2042
- }
2043
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2044
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2045
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2046
- return {
2047
- url: toPathString(localVarUrlObj),
2048
- options: localVarRequestOptions,
2049
- };
2050
- }),
2051
- /**
2052
- * Returns node information for all registered validators.
2053
- * @param {number} [height] optional block height, defaults to current tip
2054
- * @param {*} [options] Override http request option.
2055
- * @throws {RequiredError}
2056
- */
2057
- nodes: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
2058
- const localVarPath = `/thorchain/nodes`;
2059
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2060
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2061
- let baseOptions;
2062
- if (configuration) {
2063
- baseOptions = configuration.baseOptions;
2064
- }
2065
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2066
- const localVarHeaderParameter = {};
2067
- const localVarQueryParameter = {};
2068
- if (height !== undefined) {
2069
- localVarQueryParameter['height'] = height;
2070
- }
2071
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2072
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2073
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2074
- return {
2075
- url: toPathString(localVarUrlObj),
2076
- options: localVarRequestOptions,
2077
- };
2078
- }),
2079
2178
  /**
2080
2179
  * Returns the observed transaction for a provided inbound or outbound hash.
2081
2180
  * @param {string} hash
@@ -2149,31 +2248,6 @@ const TransactionsApiAxiosParamCreator = function (configuration) {
2149
2248
  const TransactionsApiFp = function (configuration) {
2150
2249
  const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
2151
2250
  return {
2152
- /**
2153
- * Returns node information for the provided node address.
2154
- * @param {string} address
2155
- * @param {number} [height] optional block height, defaults to current tip
2156
- * @param {*} [options] Override http request option.
2157
- * @throws {RequiredError}
2158
- */
2159
- node(address, height, options) {
2160
- return __awaiter(this, void 0, void 0, function* () {
2161
- const localVarAxiosArgs = yield localVarAxiosParamCreator.node(address, height, options);
2162
- return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2163
- });
2164
- },
2165
- /**
2166
- * Returns node information for all registered validators.
2167
- * @param {number} [height] optional block height, defaults to current tip
2168
- * @param {*} [options] Override http request option.
2169
- * @throws {RequiredError}
2170
- */
2171
- nodes(height, options) {
2172
- return __awaiter(this, void 0, void 0, function* () {
2173
- const localVarAxiosArgs = yield localVarAxiosParamCreator.nodes(height, options);
2174
- return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
2175
- });
2176
- },
2177
2251
  /**
2178
2252
  * Returns the observed transaction for a provided inbound or outbound hash.
2179
2253
  * @param {string} hash
@@ -2209,25 +2283,6 @@ const TransactionsApiFp = function (configuration) {
2209
2283
  const TransactionsApiFactory = function (configuration, basePath, axios) {
2210
2284
  const localVarFp = TransactionsApiFp(configuration);
2211
2285
  return {
2212
- /**
2213
- * Returns node information for the provided node address.
2214
- * @param {string} address
2215
- * @param {number} [height] optional block height, defaults to current tip
2216
- * @param {*} [options] Override http request option.
2217
- * @throws {RequiredError}
2218
- */
2219
- node(address, height, options) {
2220
- return localVarFp.node(address, height, options).then((request) => request(axios, basePath));
2221
- },
2222
- /**
2223
- * Returns node information for all registered validators.
2224
- * @param {number} [height] optional block height, defaults to current tip
2225
- * @param {*} [options] Override http request option.
2226
- * @throws {RequiredError}
2227
- */
2228
- nodes(height, options) {
2229
- return localVarFp.nodes(height, options).then((request) => request(axios, basePath));
2230
- },
2231
2286
  /**
2232
2287
  * Returns the observed transaction for a provided inbound or outbound hash.
2233
2288
  * @param {string} hash
@@ -2257,27 +2312,6 @@ const TransactionsApiFactory = function (configuration, basePath, axios) {
2257
2312
  * @extends {BaseAPI}
2258
2313
  */
2259
2314
  class TransactionsApi extends BaseAPI {
2260
- /**
2261
- * Returns node information for the provided node address.
2262
- * @param {string} address
2263
- * @param {number} [height] optional block height, defaults to current tip
2264
- * @param {*} [options] Override http request option.
2265
- * @throws {RequiredError}
2266
- * @memberof TransactionsApi
2267
- */
2268
- node(address, height, options) {
2269
- return TransactionsApiFp(this.configuration).node(address, height, options).then((request) => request(this.axios, this.basePath));
2270
- }
2271
- /**
2272
- * Returns node information for all registered validators.
2273
- * @param {number} [height] optional block height, defaults to current tip
2274
- * @param {*} [options] Override http request option.
2275
- * @throws {RequiredError}
2276
- * @memberof TransactionsApi
2277
- */
2278
- nodes(height, options) {
2279
- return TransactionsApiFp(this.configuration).nodes(height, options).then((request) => request(this.axios, this.basePath));
2280
- }
2281
2315
  /**
2282
2316
  * Returns the observed transaction for a provided inbound or outbound hash.
2283
2317
  * @param {string} hash
@@ -2638,6 +2672,10 @@ exports.NetworkApiAxiosParamCreator = NetworkApiAxiosParamCreator;
2638
2672
  exports.NetworkApiFactory = NetworkApiFactory;
2639
2673
  exports.NetworkApiFp = NetworkApiFp;
2640
2674
  exports.NodeStatusEnum = NodeStatusEnum;
2675
+ exports.NodesApi = NodesApi;
2676
+ exports.NodesApiAxiosParamCreator = NodesApiAxiosParamCreator;
2677
+ exports.NodesApiFactory = NodesApiFactory;
2678
+ exports.NodesApiFp = NodesApiFp;
2641
2679
  exports.ObservedTxStatusEnum = ObservedTxStatusEnum;
2642
2680
  exports.PoolsApi = PoolsApi;
2643
2681
  exports.PoolsApiAxiosParamCreator = PoolsApiAxiosParamCreator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thornode",
3
- "version": "0.1.0-alpha2",
3
+ "version": "0.1.0-alpha3",
4
4
  "license": "MIT",
5
5
  "description": "Thornode module that exposes all thornode functions using openapi-generator-cli",
6
6
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "prepublishOnly": "yarn run build",
31
31
  "test": "jest --passWithNoTests",
32
32
  "generate:types": "yarn clean:types:thornode && yarn generate:types:convertToJson && yarn generate:types:thornode && yarn clean:types:tempFiles",
33
- "generate:types:convertToJson": "curl 'https://thornode.ninerealms.com/thorchain/doc/openapi.yaml' > ./input.yaml && yaml2json ./input.yaml --pretty > ./input.json",
33
+ "generate:types:convertToJson": "curl 'https://gitlab.com/thorchain/thornode/-/raw/357456ea9e71cb2e846157b169bb5581b4075d0f/openapi/openapi.yaml' > ./input.yaml && yaml2json ./input.yaml --pretty > ./input.json",
34
34
  "generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i ./input.json -g typescript-axios -o ./src/generated/thornodeApi --reserved-words-mappings in=in",
35
35
  "clean:types:tempFiles": "rimraf ./input.yaml ./input.json",
36
36
  "clean:types:thornode": "rimraf ./src/generated/thornodeApi"