@xchainjs/xchain-thornode 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/generated/thornodeApi/api.d.ts +124 -92
- package/lib/generated/thornodeApi/base.d.ts +1 -1
- package/lib/generated/thornodeApi/common.d.ts +1 -1
- package/lib/generated/thornodeApi/configuration.d.ts +1 -1
- package/lib/generated/thornodeApi/index.d.ts +1 -1
- package/lib/index.esm.js +175 -161
- package/lib/index.js +178 -164
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.98.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -181,13 +181,31 @@ export interface InboundAddress {
|
|
|
181
181
|
*/
|
|
182
182
|
'router'?: string;
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* Returns true if trading is unavailable for this chain, either because trading is halted globally or specifically for this chain
|
|
185
185
|
* @type {boolean}
|
|
186
186
|
* @memberof InboundAddress
|
|
187
187
|
*/
|
|
188
188
|
'halted': boolean;
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
190
|
+
* Returns true if trading is paused globally
|
|
191
|
+
* @type {boolean}
|
|
192
|
+
* @memberof InboundAddress
|
|
193
|
+
*/
|
|
194
|
+
'global_trading_paused'?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Returns true if trading is paused for this chain
|
|
197
|
+
* @type {boolean}
|
|
198
|
+
* @memberof InboundAddress
|
|
199
|
+
*/
|
|
200
|
+
'chain_trading_paused'?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Returns true if LP actions are paused for this chain
|
|
203
|
+
* @type {boolean}
|
|
204
|
+
* @memberof InboundAddress
|
|
205
|
+
*/
|
|
206
|
+
'chain_lp_actions_paused'?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* The minimum fee rate used by vaults to send outbound TXs. The actual fee rate may be higher. For EVM chains this is returned in gwei (1e9).
|
|
191
209
|
* @type {string}
|
|
192
210
|
* @memberof InboundAddress
|
|
193
211
|
*/
|
|
@@ -205,7 +223,7 @@ export interface InboundAddress {
|
|
|
205
223
|
*/
|
|
206
224
|
'outbound_tx_size'?: string;
|
|
207
225
|
/**
|
|
208
|
-
* The total outbound fee charged to the user for outbound txs
|
|
226
|
+
* The total outbound fee charged to the user for outbound txs in the gas asset of the chain.
|
|
209
227
|
* @type {string}
|
|
210
228
|
* @memberof InboundAddress
|
|
211
229
|
*/
|
|
@@ -1001,6 +1019,12 @@ export interface Pool {
|
|
|
1001
1019
|
* @memberof Pool
|
|
1002
1020
|
*/
|
|
1003
1021
|
'pending_inbound_asset': string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Returns true if pool is a Savers pool. Savers pools are used for single-sided yield deposits.
|
|
1024
|
+
* @type {boolean}
|
|
1025
|
+
* @memberof Pool
|
|
1026
|
+
*/
|
|
1027
|
+
'is_savers_pool': boolean;
|
|
1004
1028
|
}
|
|
1005
1029
|
/**
|
|
1006
1030
|
*
|
|
@@ -1523,94 +1547,6 @@ export interface VersionResponse {
|
|
|
1523
1547
|
*/
|
|
1524
1548
|
'querier': string;
|
|
1525
1549
|
}
|
|
1526
|
-
/**
|
|
1527
|
-
* BucketsApi - axios parameter creator
|
|
1528
|
-
* @export
|
|
1529
|
-
*/
|
|
1530
|
-
export declare const BucketsApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
|
|
1531
|
-
/**
|
|
1532
|
-
* Returns the bucket information for the provided asset.
|
|
1533
|
-
* @param {string} asset
|
|
1534
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1535
|
-
* @param {*} [options] Override http request option.
|
|
1536
|
-
* @throws {RequiredError}
|
|
1537
|
-
*/
|
|
1538
|
-
bucket: (asset: string, height?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1539
|
-
/**
|
|
1540
|
-
* Returns the bucket information for all assets.
|
|
1541
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1542
|
-
* @param {*} [options] Override http request option.
|
|
1543
|
-
* @throws {RequiredError}
|
|
1544
|
-
*/
|
|
1545
|
-
buckets: (height?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1546
|
-
};
|
|
1547
|
-
/**
|
|
1548
|
-
* BucketsApi - functional programming interface
|
|
1549
|
-
* @export
|
|
1550
|
-
*/
|
|
1551
|
-
export declare const BucketsApiFp: (configuration?: Configuration | undefined) => {
|
|
1552
|
-
/**
|
|
1553
|
-
* Returns the bucket information for the provided asset.
|
|
1554
|
-
* @param {string} asset
|
|
1555
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1556
|
-
* @param {*} [options] Override http request option.
|
|
1557
|
-
* @throws {RequiredError}
|
|
1558
|
-
*/
|
|
1559
|
-
bucket(asset: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Bucket>>;
|
|
1560
|
-
/**
|
|
1561
|
-
* Returns the bucket information for all assets.
|
|
1562
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1563
|
-
* @param {*} [options] Override http request option.
|
|
1564
|
-
* @throws {RequiredError}
|
|
1565
|
-
*/
|
|
1566
|
-
buckets(height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<BucketsResponse>>;
|
|
1567
|
-
};
|
|
1568
|
-
/**
|
|
1569
|
-
* BucketsApi - factory interface
|
|
1570
|
-
* @export
|
|
1571
|
-
*/
|
|
1572
|
-
export declare const BucketsApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
|
|
1573
|
-
/**
|
|
1574
|
-
* Returns the bucket information for the provided asset.
|
|
1575
|
-
* @param {string} asset
|
|
1576
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1577
|
-
* @param {*} [options] Override http request option.
|
|
1578
|
-
* @throws {RequiredError}
|
|
1579
|
-
*/
|
|
1580
|
-
bucket(asset: string, height?: number | undefined, options?: any): AxiosPromise<Bucket>;
|
|
1581
|
-
/**
|
|
1582
|
-
* Returns the bucket information for all assets.
|
|
1583
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1584
|
-
* @param {*} [options] Override http request option.
|
|
1585
|
-
* @throws {RequiredError}
|
|
1586
|
-
*/
|
|
1587
|
-
buckets(height?: number | undefined, options?: any): AxiosPromise<BucketsResponse>;
|
|
1588
|
-
};
|
|
1589
|
-
/**
|
|
1590
|
-
* BucketsApi - object-oriented interface
|
|
1591
|
-
* @export
|
|
1592
|
-
* @class BucketsApi
|
|
1593
|
-
* @extends {BaseAPI}
|
|
1594
|
-
*/
|
|
1595
|
-
export declare class BucketsApi extends BaseAPI {
|
|
1596
|
-
/**
|
|
1597
|
-
* Returns the bucket information for the provided asset.
|
|
1598
|
-
* @param {string} asset
|
|
1599
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1600
|
-
* @param {*} [options] Override http request option.
|
|
1601
|
-
* @throws {RequiredError}
|
|
1602
|
-
* @memberof BucketsApi
|
|
1603
|
-
*/
|
|
1604
|
-
bucket(asset: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Bucket, any>>;
|
|
1605
|
-
/**
|
|
1606
|
-
* Returns the bucket information for all assets.
|
|
1607
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
1608
|
-
* @param {*} [options] Override http request option.
|
|
1609
|
-
* @throws {RequiredError}
|
|
1610
|
-
* @memberof BucketsApi
|
|
1611
|
-
*/
|
|
1612
|
-
buckets(height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BucketsResponse, any>>;
|
|
1613
|
-
}
|
|
1614
1550
|
/**
|
|
1615
1551
|
* HealthApi - axios parameter creator
|
|
1616
1552
|
* @export
|
|
@@ -2547,6 +2483,102 @@ export declare class QueueApi extends BaseAPI {
|
|
|
2547
2483
|
*/
|
|
2548
2484
|
queueScheduled(height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ScheduledResponse, any>>;
|
|
2549
2485
|
}
|
|
2486
|
+
/**
|
|
2487
|
+
* SaversApi - axios parameter creator
|
|
2488
|
+
* @export
|
|
2489
|
+
*/
|
|
2490
|
+
export declare const SaversApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
|
|
2491
|
+
/**
|
|
2492
|
+
* Returns the saver position given then savers pool and address.
|
|
2493
|
+
* @param {string} asset
|
|
2494
|
+
* @param {string} address
|
|
2495
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2496
|
+
* @param {*} [options] Override http request option.
|
|
2497
|
+
* @throws {RequiredError}
|
|
2498
|
+
*/
|
|
2499
|
+
saver: (asset: string, address: string, height?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
2500
|
+
/**
|
|
2501
|
+
* Returns all savers for the savers pool.
|
|
2502
|
+
* @param {string} asset
|
|
2503
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2504
|
+
* @param {*} [options] Override http request option.
|
|
2505
|
+
* @throws {RequiredError}
|
|
2506
|
+
*/
|
|
2507
|
+
savers: (asset: string, height?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
2508
|
+
};
|
|
2509
|
+
/**
|
|
2510
|
+
* SaversApi - functional programming interface
|
|
2511
|
+
* @export
|
|
2512
|
+
*/
|
|
2513
|
+
export declare const SaversApiFp: (configuration?: Configuration | undefined) => {
|
|
2514
|
+
/**
|
|
2515
|
+
* Returns the saver position given then savers pool and address.
|
|
2516
|
+
* @param {string} asset
|
|
2517
|
+
* @param {string} address
|
|
2518
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2519
|
+
* @param {*} [options] Override http request option.
|
|
2520
|
+
* @throws {RequiredError}
|
|
2521
|
+
*/
|
|
2522
|
+
saver(asset: string, address: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<LiquidityProviderResponse>>;
|
|
2523
|
+
/**
|
|
2524
|
+
* Returns all savers for the savers pool.
|
|
2525
|
+
* @param {string} asset
|
|
2526
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2527
|
+
* @param {*} [options] Override http request option.
|
|
2528
|
+
* @throws {RequiredError}
|
|
2529
|
+
*/
|
|
2530
|
+
savers(asset: string, height?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<LiquidityProviderResponse>>;
|
|
2531
|
+
};
|
|
2532
|
+
/**
|
|
2533
|
+
* SaversApi - factory interface
|
|
2534
|
+
* @export
|
|
2535
|
+
*/
|
|
2536
|
+
export declare const SaversApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
|
|
2537
|
+
/**
|
|
2538
|
+
* Returns the saver position given then savers pool and address.
|
|
2539
|
+
* @param {string} asset
|
|
2540
|
+
* @param {string} address
|
|
2541
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2542
|
+
* @param {*} [options] Override http request option.
|
|
2543
|
+
* @throws {RequiredError}
|
|
2544
|
+
*/
|
|
2545
|
+
saver(asset: string, address: string, height?: number | undefined, options?: any): AxiosPromise<LiquidityProviderResponse>;
|
|
2546
|
+
/**
|
|
2547
|
+
* Returns all savers for the savers pool.
|
|
2548
|
+
* @param {string} asset
|
|
2549
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2550
|
+
* @param {*} [options] Override http request option.
|
|
2551
|
+
* @throws {RequiredError}
|
|
2552
|
+
*/
|
|
2553
|
+
savers(asset: string, height?: number | undefined, options?: any): AxiosPromise<LiquidityProviderResponse>;
|
|
2554
|
+
};
|
|
2555
|
+
/**
|
|
2556
|
+
* SaversApi - object-oriented interface
|
|
2557
|
+
* @export
|
|
2558
|
+
* @class SaversApi
|
|
2559
|
+
* @extends {BaseAPI}
|
|
2560
|
+
*/
|
|
2561
|
+
export declare class SaversApi extends BaseAPI {
|
|
2562
|
+
/**
|
|
2563
|
+
* Returns the saver position given then savers pool and address.
|
|
2564
|
+
* @param {string} asset
|
|
2565
|
+
* @param {string} address
|
|
2566
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2567
|
+
* @param {*} [options] Override http request option.
|
|
2568
|
+
* @throws {RequiredError}
|
|
2569
|
+
* @memberof SaversApi
|
|
2570
|
+
*/
|
|
2571
|
+
saver(asset: string, address: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LiquidityProviderResponse, any>>;
|
|
2572
|
+
/**
|
|
2573
|
+
* Returns all savers for the savers pool.
|
|
2574
|
+
* @param {string} asset
|
|
2575
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2576
|
+
* @param {*} [options] Override http request option.
|
|
2577
|
+
* @throws {RequiredError}
|
|
2578
|
+
* @memberof SaversApi
|
|
2579
|
+
*/
|
|
2580
|
+
savers(asset: string, height?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<LiquidityProviderResponse, any>>;
|
|
2581
|
+
}
|
|
2550
2582
|
/**
|
|
2551
2583
|
* TSSApi - axios parameter creator
|
|
2552
2584
|
* @export
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.98.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.98.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.98.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thornode API
|
|
3
3
|
* Thornode REST API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.98.0
|
|
6
6
|
* Contact: devs@thorchain.org
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/lib/index.esm.js
CHANGED
|
@@ -132,165 +132,6 @@ const VaultTypeEnum = {
|
|
|
132
132
|
AsgardVault: 'AsgardVault',
|
|
133
133
|
YggdrasilVault: 'YggdrasilVault'
|
|
134
134
|
};
|
|
135
|
-
/**
|
|
136
|
-
* BucketsApi - axios parameter creator
|
|
137
|
-
* @export
|
|
138
|
-
*/
|
|
139
|
-
const BucketsApiAxiosParamCreator = function (configuration) {
|
|
140
|
-
return {
|
|
141
|
-
/**
|
|
142
|
-
* Returns the bucket information for the provided asset.
|
|
143
|
-
* @param {string} asset
|
|
144
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
145
|
-
* @param {*} [options] Override http request option.
|
|
146
|
-
* @throws {RequiredError}
|
|
147
|
-
*/
|
|
148
|
-
bucket: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
149
|
-
// verify required parameter 'asset' is not null or undefined
|
|
150
|
-
assertParamExists('bucket', 'asset', asset);
|
|
151
|
-
const localVarPath = `/thorchain/bucket/{asset}`
|
|
152
|
-
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
153
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
154
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
155
|
-
let baseOptions;
|
|
156
|
-
if (configuration) {
|
|
157
|
-
baseOptions = configuration.baseOptions;
|
|
158
|
-
}
|
|
159
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
160
|
-
const localVarHeaderParameter = {};
|
|
161
|
-
const localVarQueryParameter = {};
|
|
162
|
-
if (height !== undefined) {
|
|
163
|
-
localVarQueryParameter['height'] = height;
|
|
164
|
-
}
|
|
165
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
166
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
167
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
168
|
-
return {
|
|
169
|
-
url: toPathString(localVarUrlObj),
|
|
170
|
-
options: localVarRequestOptions,
|
|
171
|
-
};
|
|
172
|
-
}),
|
|
173
|
-
/**
|
|
174
|
-
* Returns the bucket information for all assets.
|
|
175
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
176
|
-
* @param {*} [options] Override http request option.
|
|
177
|
-
* @throws {RequiredError}
|
|
178
|
-
*/
|
|
179
|
-
buckets: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
180
|
-
const localVarPath = `/thorchain/buckets`;
|
|
181
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
182
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
183
|
-
let baseOptions;
|
|
184
|
-
if (configuration) {
|
|
185
|
-
baseOptions = configuration.baseOptions;
|
|
186
|
-
}
|
|
187
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
188
|
-
const localVarHeaderParameter = {};
|
|
189
|
-
const localVarQueryParameter = {};
|
|
190
|
-
if (height !== undefined) {
|
|
191
|
-
localVarQueryParameter['height'] = height;
|
|
192
|
-
}
|
|
193
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
194
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
195
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
196
|
-
return {
|
|
197
|
-
url: toPathString(localVarUrlObj),
|
|
198
|
-
options: localVarRequestOptions,
|
|
199
|
-
};
|
|
200
|
-
}),
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* BucketsApi - functional programming interface
|
|
205
|
-
* @export
|
|
206
|
-
*/
|
|
207
|
-
const BucketsApiFp = function (configuration) {
|
|
208
|
-
const localVarAxiosParamCreator = BucketsApiAxiosParamCreator(configuration);
|
|
209
|
-
return {
|
|
210
|
-
/**
|
|
211
|
-
* Returns the bucket information for the provided asset.
|
|
212
|
-
* @param {string} asset
|
|
213
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
214
|
-
* @param {*} [options] Override http request option.
|
|
215
|
-
* @throws {RequiredError}
|
|
216
|
-
*/
|
|
217
|
-
bucket(asset, height, options) {
|
|
218
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.bucket(asset, height, options);
|
|
220
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
221
|
-
});
|
|
222
|
-
},
|
|
223
|
-
/**
|
|
224
|
-
* Returns the bucket information for all assets.
|
|
225
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
226
|
-
* @param {*} [options] Override http request option.
|
|
227
|
-
* @throws {RequiredError}
|
|
228
|
-
*/
|
|
229
|
-
buckets(height, options) {
|
|
230
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.buckets(height, options);
|
|
232
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
233
|
-
});
|
|
234
|
-
},
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
/**
|
|
238
|
-
* BucketsApi - factory interface
|
|
239
|
-
* @export
|
|
240
|
-
*/
|
|
241
|
-
const BucketsApiFactory = function (configuration, basePath, axios) {
|
|
242
|
-
const localVarFp = BucketsApiFp(configuration);
|
|
243
|
-
return {
|
|
244
|
-
/**
|
|
245
|
-
* Returns the bucket information for the provided asset.
|
|
246
|
-
* @param {string} asset
|
|
247
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
248
|
-
* @param {*} [options] Override http request option.
|
|
249
|
-
* @throws {RequiredError}
|
|
250
|
-
*/
|
|
251
|
-
bucket(asset, height, options) {
|
|
252
|
-
return localVarFp.bucket(asset, height, options).then((request) => request(axios, basePath));
|
|
253
|
-
},
|
|
254
|
-
/**
|
|
255
|
-
* Returns the bucket information for all assets.
|
|
256
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
257
|
-
* @param {*} [options] Override http request option.
|
|
258
|
-
* @throws {RequiredError}
|
|
259
|
-
*/
|
|
260
|
-
buckets(height, options) {
|
|
261
|
-
return localVarFp.buckets(height, options).then((request) => request(axios, basePath));
|
|
262
|
-
},
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* BucketsApi - object-oriented interface
|
|
267
|
-
* @export
|
|
268
|
-
* @class BucketsApi
|
|
269
|
-
* @extends {BaseAPI}
|
|
270
|
-
*/
|
|
271
|
-
class BucketsApi extends BaseAPI {
|
|
272
|
-
/**
|
|
273
|
-
* Returns the bucket information for the provided asset.
|
|
274
|
-
* @param {string} asset
|
|
275
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
276
|
-
* @param {*} [options] Override http request option.
|
|
277
|
-
* @throws {RequiredError}
|
|
278
|
-
* @memberof BucketsApi
|
|
279
|
-
*/
|
|
280
|
-
bucket(asset, height, options) {
|
|
281
|
-
return BucketsApiFp(this.configuration).bucket(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Returns the bucket information for all assets.
|
|
285
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
286
|
-
* @param {*} [options] Override http request option.
|
|
287
|
-
* @throws {RequiredError}
|
|
288
|
-
* @memberof BucketsApi
|
|
289
|
-
*/
|
|
290
|
-
buckets(height, options) {
|
|
291
|
-
return BucketsApiFp(this.configuration).buckets(height, options).then((request) => request(this.axios, this.basePath));
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
135
|
/**
|
|
295
136
|
* HealthApi - axios parameter creator
|
|
296
137
|
* @export
|
|
@@ -2035,6 +1876,179 @@ class QueueApi extends BaseAPI {
|
|
|
2035
1876
|
return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
|
|
2036
1877
|
}
|
|
2037
1878
|
}
|
|
1879
|
+
/**
|
|
1880
|
+
* SaversApi - axios parameter creator
|
|
1881
|
+
* @export
|
|
1882
|
+
*/
|
|
1883
|
+
const SaversApiAxiosParamCreator = function (configuration) {
|
|
1884
|
+
return {
|
|
1885
|
+
/**
|
|
1886
|
+
* Returns the saver position given then savers pool and address.
|
|
1887
|
+
* @param {string} asset
|
|
1888
|
+
* @param {string} address
|
|
1889
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1890
|
+
* @param {*} [options] Override http request option.
|
|
1891
|
+
* @throws {RequiredError}
|
|
1892
|
+
*/
|
|
1893
|
+
saver: (asset, address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1894
|
+
// verify required parameter 'asset' is not null or undefined
|
|
1895
|
+
assertParamExists('saver', 'asset', asset);
|
|
1896
|
+
// verify required parameter 'address' is not null or undefined
|
|
1897
|
+
assertParamExists('saver', 'address', address);
|
|
1898
|
+
const localVarPath = `/thorchain/pool/{asset}/saver/{address}`
|
|
1899
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
1900
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
1901
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1902
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1903
|
+
let baseOptions;
|
|
1904
|
+
if (configuration) {
|
|
1905
|
+
baseOptions = configuration.baseOptions;
|
|
1906
|
+
}
|
|
1907
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1908
|
+
const localVarHeaderParameter = {};
|
|
1909
|
+
const localVarQueryParameter = {};
|
|
1910
|
+
if (height !== undefined) {
|
|
1911
|
+
localVarQueryParameter['height'] = height;
|
|
1912
|
+
}
|
|
1913
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1914
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1915
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1916
|
+
return {
|
|
1917
|
+
url: toPathString(localVarUrlObj),
|
|
1918
|
+
options: localVarRequestOptions,
|
|
1919
|
+
};
|
|
1920
|
+
}),
|
|
1921
|
+
/**
|
|
1922
|
+
* Returns all savers for the savers pool.
|
|
1923
|
+
* @param {string} asset
|
|
1924
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1925
|
+
* @param {*} [options] Override http request option.
|
|
1926
|
+
* @throws {RequiredError}
|
|
1927
|
+
*/
|
|
1928
|
+
savers: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1929
|
+
// verify required parameter 'asset' is not null or undefined
|
|
1930
|
+
assertParamExists('savers', 'asset', asset);
|
|
1931
|
+
const localVarPath = `/thorchain/pool/{asset}/savers`
|
|
1932
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
1933
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1934
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1935
|
+
let baseOptions;
|
|
1936
|
+
if (configuration) {
|
|
1937
|
+
baseOptions = configuration.baseOptions;
|
|
1938
|
+
}
|
|
1939
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1940
|
+
const localVarHeaderParameter = {};
|
|
1941
|
+
const localVarQueryParameter = {};
|
|
1942
|
+
if (height !== undefined) {
|
|
1943
|
+
localVarQueryParameter['height'] = height;
|
|
1944
|
+
}
|
|
1945
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1946
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1947
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1948
|
+
return {
|
|
1949
|
+
url: toPathString(localVarUrlObj),
|
|
1950
|
+
options: localVarRequestOptions,
|
|
1951
|
+
};
|
|
1952
|
+
}),
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
/**
|
|
1956
|
+
* SaversApi - functional programming interface
|
|
1957
|
+
* @export
|
|
1958
|
+
*/
|
|
1959
|
+
const SaversApiFp = function (configuration) {
|
|
1960
|
+
const localVarAxiosParamCreator = SaversApiAxiosParamCreator(configuration);
|
|
1961
|
+
return {
|
|
1962
|
+
/**
|
|
1963
|
+
* Returns the saver position given then savers pool and address.
|
|
1964
|
+
* @param {string} asset
|
|
1965
|
+
* @param {string} address
|
|
1966
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1967
|
+
* @param {*} [options] Override http request option.
|
|
1968
|
+
* @throws {RequiredError}
|
|
1969
|
+
*/
|
|
1970
|
+
saver(asset, address, height, options) {
|
|
1971
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1972
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.saver(asset, address, height, options);
|
|
1973
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1974
|
+
});
|
|
1975
|
+
},
|
|
1976
|
+
/**
|
|
1977
|
+
* Returns all savers for the savers pool.
|
|
1978
|
+
* @param {string} asset
|
|
1979
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1980
|
+
* @param {*} [options] Override http request option.
|
|
1981
|
+
* @throws {RequiredError}
|
|
1982
|
+
*/
|
|
1983
|
+
savers(asset, height, options) {
|
|
1984
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1985
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.savers(asset, height, options);
|
|
1986
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1987
|
+
});
|
|
1988
|
+
},
|
|
1989
|
+
};
|
|
1990
|
+
};
|
|
1991
|
+
/**
|
|
1992
|
+
* SaversApi - factory interface
|
|
1993
|
+
* @export
|
|
1994
|
+
*/
|
|
1995
|
+
const SaversApiFactory = function (configuration, basePath, axios) {
|
|
1996
|
+
const localVarFp = SaversApiFp(configuration);
|
|
1997
|
+
return {
|
|
1998
|
+
/**
|
|
1999
|
+
* Returns the saver position given then savers pool and address.
|
|
2000
|
+
* @param {string} asset
|
|
2001
|
+
* @param {string} address
|
|
2002
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2003
|
+
* @param {*} [options] Override http request option.
|
|
2004
|
+
* @throws {RequiredError}
|
|
2005
|
+
*/
|
|
2006
|
+
saver(asset, address, height, options) {
|
|
2007
|
+
return localVarFp.saver(asset, address, height, options).then((request) => request(axios, basePath));
|
|
2008
|
+
},
|
|
2009
|
+
/**
|
|
2010
|
+
* Returns all savers for the savers pool.
|
|
2011
|
+
* @param {string} asset
|
|
2012
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2013
|
+
* @param {*} [options] Override http request option.
|
|
2014
|
+
* @throws {RequiredError}
|
|
2015
|
+
*/
|
|
2016
|
+
savers(asset, height, options) {
|
|
2017
|
+
return localVarFp.savers(asset, height, options).then((request) => request(axios, basePath));
|
|
2018
|
+
},
|
|
2019
|
+
};
|
|
2020
|
+
};
|
|
2021
|
+
/**
|
|
2022
|
+
* SaversApi - object-oriented interface
|
|
2023
|
+
* @export
|
|
2024
|
+
* @class SaversApi
|
|
2025
|
+
* @extends {BaseAPI}
|
|
2026
|
+
*/
|
|
2027
|
+
class SaversApi extends BaseAPI {
|
|
2028
|
+
/**
|
|
2029
|
+
* Returns the saver position given then savers pool and address.
|
|
2030
|
+
* @param {string} asset
|
|
2031
|
+
* @param {string} address
|
|
2032
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2033
|
+
* @param {*} [options] Override http request option.
|
|
2034
|
+
* @throws {RequiredError}
|
|
2035
|
+
* @memberof SaversApi
|
|
2036
|
+
*/
|
|
2037
|
+
saver(asset, address, height, options) {
|
|
2038
|
+
return SaversApiFp(this.configuration).saver(asset, address, height, options).then((request) => request(this.axios, this.basePath));
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Returns all savers for the savers pool.
|
|
2042
|
+
* @param {string} asset
|
|
2043
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2044
|
+
* @param {*} [options] Override http request option.
|
|
2045
|
+
* @throws {RequiredError}
|
|
2046
|
+
* @memberof SaversApi
|
|
2047
|
+
*/
|
|
2048
|
+
savers(asset, height, options) {
|
|
2049
|
+
return SaversApiFp(this.configuration).savers(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2038
2052
|
/**
|
|
2039
2053
|
* TSSApi - axios parameter creator
|
|
2040
2054
|
* @export
|
|
@@ -2869,7 +2883,7 @@ class VaultsApi extends BaseAPI {
|
|
|
2869
2883
|
* Thornode API
|
|
2870
2884
|
* Thornode REST API.
|
|
2871
2885
|
*
|
|
2872
|
-
* The version of the OpenAPI document: 1.
|
|
2886
|
+
* The version of the OpenAPI document: 1.98.0
|
|
2873
2887
|
* Contact: devs@thorchain.org
|
|
2874
2888
|
*
|
|
2875
2889
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2904,4 +2918,4 @@ class Configuration {
|
|
|
2904
2918
|
|
|
2905
2919
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
2906
2920
|
|
|
2907
|
-
export {
|
|
2921
|
+
export { Configuration, HealthApi, HealthApiAxiosParamCreator, HealthApiFactory, HealthApiFp, LiquidityProvidersApi, LiquidityProvidersApiAxiosParamCreator, LiquidityProvidersApiFactory, LiquidityProvidersApiFp, MimirApi, MimirApiAxiosParamCreator, MimirApiFactory, MimirApiFp, NetworkApi, NetworkApiAxiosParamCreator, NetworkApiFactory, NetworkApiFp, NodeStatusEnum, NodesApi, NodesApiAxiosParamCreator, NodesApiFactory, NodesApiFp, ObservedTxStatusEnum, POLApi, POLApiAxiosParamCreator, POLApiFactory, POLApiFp, PoolsApi, PoolsApiAxiosParamCreator, PoolsApiFactory, PoolsApiFp, QueueApi, QueueApiAxiosParamCreator, QueueApiFactory, QueueApiFp, SaversApi, SaversApiAxiosParamCreator, SaversApiFactory, SaversApiFp, 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
|
@@ -140,165 +140,6 @@ const VaultTypeEnum = {
|
|
|
140
140
|
AsgardVault: 'AsgardVault',
|
|
141
141
|
YggdrasilVault: 'YggdrasilVault'
|
|
142
142
|
};
|
|
143
|
-
/**
|
|
144
|
-
* BucketsApi - axios parameter creator
|
|
145
|
-
* @export
|
|
146
|
-
*/
|
|
147
|
-
const BucketsApiAxiosParamCreator = function (configuration) {
|
|
148
|
-
return {
|
|
149
|
-
/**
|
|
150
|
-
* Returns the bucket information for the provided asset.
|
|
151
|
-
* @param {string} asset
|
|
152
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
153
|
-
* @param {*} [options] Override http request option.
|
|
154
|
-
* @throws {RequiredError}
|
|
155
|
-
*/
|
|
156
|
-
bucket: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
// verify required parameter 'asset' is not null or undefined
|
|
158
|
-
assertParamExists('bucket', 'asset', asset);
|
|
159
|
-
const localVarPath = `/thorchain/bucket/{asset}`
|
|
160
|
-
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
161
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
162
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
163
|
-
let baseOptions;
|
|
164
|
-
if (configuration) {
|
|
165
|
-
baseOptions = configuration.baseOptions;
|
|
166
|
-
}
|
|
167
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
168
|
-
const localVarHeaderParameter = {};
|
|
169
|
-
const localVarQueryParameter = {};
|
|
170
|
-
if (height !== undefined) {
|
|
171
|
-
localVarQueryParameter['height'] = height;
|
|
172
|
-
}
|
|
173
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
174
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
175
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
176
|
-
return {
|
|
177
|
-
url: toPathString(localVarUrlObj),
|
|
178
|
-
options: localVarRequestOptions,
|
|
179
|
-
};
|
|
180
|
-
}),
|
|
181
|
-
/**
|
|
182
|
-
* Returns the bucket information for all assets.
|
|
183
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
184
|
-
* @param {*} [options] Override http request option.
|
|
185
|
-
* @throws {RequiredError}
|
|
186
|
-
*/
|
|
187
|
-
buckets: (height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
const localVarPath = `/thorchain/buckets`;
|
|
189
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
190
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
191
|
-
let baseOptions;
|
|
192
|
-
if (configuration) {
|
|
193
|
-
baseOptions = configuration.baseOptions;
|
|
194
|
-
}
|
|
195
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
196
|
-
const localVarHeaderParameter = {};
|
|
197
|
-
const localVarQueryParameter = {};
|
|
198
|
-
if (height !== undefined) {
|
|
199
|
-
localVarQueryParameter['height'] = height;
|
|
200
|
-
}
|
|
201
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
202
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
203
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
204
|
-
return {
|
|
205
|
-
url: toPathString(localVarUrlObj),
|
|
206
|
-
options: localVarRequestOptions,
|
|
207
|
-
};
|
|
208
|
-
}),
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* BucketsApi - functional programming interface
|
|
213
|
-
* @export
|
|
214
|
-
*/
|
|
215
|
-
const BucketsApiFp = function (configuration) {
|
|
216
|
-
const localVarAxiosParamCreator = BucketsApiAxiosParamCreator(configuration);
|
|
217
|
-
return {
|
|
218
|
-
/**
|
|
219
|
-
* Returns the bucket information for the provided asset.
|
|
220
|
-
* @param {string} asset
|
|
221
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
222
|
-
* @param {*} [options] Override http request option.
|
|
223
|
-
* @throws {RequiredError}
|
|
224
|
-
*/
|
|
225
|
-
bucket(asset, height, options) {
|
|
226
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.bucket(asset, height, options);
|
|
228
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
|
|
229
|
-
});
|
|
230
|
-
},
|
|
231
|
-
/**
|
|
232
|
-
* Returns the bucket information for all assets.
|
|
233
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
234
|
-
* @param {*} [options] Override http request option.
|
|
235
|
-
* @throws {RequiredError}
|
|
236
|
-
*/
|
|
237
|
-
buckets(height, options) {
|
|
238
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.buckets(height, options);
|
|
240
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
|
|
241
|
-
});
|
|
242
|
-
},
|
|
243
|
-
};
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* BucketsApi - factory interface
|
|
247
|
-
* @export
|
|
248
|
-
*/
|
|
249
|
-
const BucketsApiFactory = function (configuration, basePath, axios) {
|
|
250
|
-
const localVarFp = BucketsApiFp(configuration);
|
|
251
|
-
return {
|
|
252
|
-
/**
|
|
253
|
-
* Returns the bucket information for the provided asset.
|
|
254
|
-
* @param {string} asset
|
|
255
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
256
|
-
* @param {*} [options] Override http request option.
|
|
257
|
-
* @throws {RequiredError}
|
|
258
|
-
*/
|
|
259
|
-
bucket(asset, height, options) {
|
|
260
|
-
return localVarFp.bucket(asset, height, options).then((request) => request(axios, basePath));
|
|
261
|
-
},
|
|
262
|
-
/**
|
|
263
|
-
* Returns the bucket information for all assets.
|
|
264
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
265
|
-
* @param {*} [options] Override http request option.
|
|
266
|
-
* @throws {RequiredError}
|
|
267
|
-
*/
|
|
268
|
-
buckets(height, options) {
|
|
269
|
-
return localVarFp.buckets(height, options).then((request) => request(axios, basePath));
|
|
270
|
-
},
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
/**
|
|
274
|
-
* BucketsApi - object-oriented interface
|
|
275
|
-
* @export
|
|
276
|
-
* @class BucketsApi
|
|
277
|
-
* @extends {BaseAPI}
|
|
278
|
-
*/
|
|
279
|
-
class BucketsApi extends BaseAPI {
|
|
280
|
-
/**
|
|
281
|
-
* Returns the bucket information for the provided asset.
|
|
282
|
-
* @param {string} asset
|
|
283
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
284
|
-
* @param {*} [options] Override http request option.
|
|
285
|
-
* @throws {RequiredError}
|
|
286
|
-
* @memberof BucketsApi
|
|
287
|
-
*/
|
|
288
|
-
bucket(asset, height, options) {
|
|
289
|
-
return BucketsApiFp(this.configuration).bucket(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Returns the bucket information for all assets.
|
|
293
|
-
* @param {number} [height] optional block height, defaults to current tip
|
|
294
|
-
* @param {*} [options] Override http request option.
|
|
295
|
-
* @throws {RequiredError}
|
|
296
|
-
* @memberof BucketsApi
|
|
297
|
-
*/
|
|
298
|
-
buckets(height, options) {
|
|
299
|
-
return BucketsApiFp(this.configuration).buckets(height, options).then((request) => request(this.axios, this.basePath));
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
143
|
/**
|
|
303
144
|
* HealthApi - axios parameter creator
|
|
304
145
|
* @export
|
|
@@ -2043,6 +1884,179 @@ class QueueApi extends BaseAPI {
|
|
|
2043
1884
|
return QueueApiFp(this.configuration).queueScheduled(height, options).then((request) => request(this.axios, this.basePath));
|
|
2044
1885
|
}
|
|
2045
1886
|
}
|
|
1887
|
+
/**
|
|
1888
|
+
* SaversApi - axios parameter creator
|
|
1889
|
+
* @export
|
|
1890
|
+
*/
|
|
1891
|
+
const SaversApiAxiosParamCreator = function (configuration) {
|
|
1892
|
+
return {
|
|
1893
|
+
/**
|
|
1894
|
+
* Returns the saver position given then savers pool and address.
|
|
1895
|
+
* @param {string} asset
|
|
1896
|
+
* @param {string} address
|
|
1897
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1898
|
+
* @param {*} [options] Override http request option.
|
|
1899
|
+
* @throws {RequiredError}
|
|
1900
|
+
*/
|
|
1901
|
+
saver: (asset, address, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1902
|
+
// verify required parameter 'asset' is not null or undefined
|
|
1903
|
+
assertParamExists('saver', 'asset', asset);
|
|
1904
|
+
// verify required parameter 'address' is not null or undefined
|
|
1905
|
+
assertParamExists('saver', 'address', address);
|
|
1906
|
+
const localVarPath = `/thorchain/pool/{asset}/saver/{address}`
|
|
1907
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)))
|
|
1908
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
1909
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1910
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1911
|
+
let baseOptions;
|
|
1912
|
+
if (configuration) {
|
|
1913
|
+
baseOptions = configuration.baseOptions;
|
|
1914
|
+
}
|
|
1915
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1916
|
+
const localVarHeaderParameter = {};
|
|
1917
|
+
const localVarQueryParameter = {};
|
|
1918
|
+
if (height !== undefined) {
|
|
1919
|
+
localVarQueryParameter['height'] = height;
|
|
1920
|
+
}
|
|
1921
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1922
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1923
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1924
|
+
return {
|
|
1925
|
+
url: toPathString(localVarUrlObj),
|
|
1926
|
+
options: localVarRequestOptions,
|
|
1927
|
+
};
|
|
1928
|
+
}),
|
|
1929
|
+
/**
|
|
1930
|
+
* Returns all savers for the savers pool.
|
|
1931
|
+
* @param {string} asset
|
|
1932
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1933
|
+
* @param {*} [options] Override http request option.
|
|
1934
|
+
* @throws {RequiredError}
|
|
1935
|
+
*/
|
|
1936
|
+
savers: (asset, height, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1937
|
+
// verify required parameter 'asset' is not null or undefined
|
|
1938
|
+
assertParamExists('savers', 'asset', asset);
|
|
1939
|
+
const localVarPath = `/thorchain/pool/{asset}/savers`
|
|
1940
|
+
.replace(`{${"asset"}}`, encodeURIComponent(String(asset)));
|
|
1941
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1942
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1943
|
+
let baseOptions;
|
|
1944
|
+
if (configuration) {
|
|
1945
|
+
baseOptions = configuration.baseOptions;
|
|
1946
|
+
}
|
|
1947
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1948
|
+
const localVarHeaderParameter = {};
|
|
1949
|
+
const localVarQueryParameter = {};
|
|
1950
|
+
if (height !== undefined) {
|
|
1951
|
+
localVarQueryParameter['height'] = height;
|
|
1952
|
+
}
|
|
1953
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1954
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1955
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1956
|
+
return {
|
|
1957
|
+
url: toPathString(localVarUrlObj),
|
|
1958
|
+
options: localVarRequestOptions,
|
|
1959
|
+
};
|
|
1960
|
+
}),
|
|
1961
|
+
};
|
|
1962
|
+
};
|
|
1963
|
+
/**
|
|
1964
|
+
* SaversApi - functional programming interface
|
|
1965
|
+
* @export
|
|
1966
|
+
*/
|
|
1967
|
+
const SaversApiFp = function (configuration) {
|
|
1968
|
+
const localVarAxiosParamCreator = SaversApiAxiosParamCreator(configuration);
|
|
1969
|
+
return {
|
|
1970
|
+
/**
|
|
1971
|
+
* Returns the saver position given then savers pool and address.
|
|
1972
|
+
* @param {string} asset
|
|
1973
|
+
* @param {string} address
|
|
1974
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1975
|
+
* @param {*} [options] Override http request option.
|
|
1976
|
+
* @throws {RequiredError}
|
|
1977
|
+
*/
|
|
1978
|
+
saver(asset, address, height, options) {
|
|
1979
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1980
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.saver(asset, address, height, options);
|
|
1981
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
|
|
1982
|
+
});
|
|
1983
|
+
},
|
|
1984
|
+
/**
|
|
1985
|
+
* Returns all savers for the savers pool.
|
|
1986
|
+
* @param {string} asset
|
|
1987
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
1988
|
+
* @param {*} [options] Override http request option.
|
|
1989
|
+
* @throws {RequiredError}
|
|
1990
|
+
*/
|
|
1991
|
+
savers(asset, height, options) {
|
|
1992
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1993
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.savers(asset, height, options);
|
|
1994
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios__default['default'], BASE_PATH, configuration);
|
|
1995
|
+
});
|
|
1996
|
+
},
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
/**
|
|
2000
|
+
* SaversApi - factory interface
|
|
2001
|
+
* @export
|
|
2002
|
+
*/
|
|
2003
|
+
const SaversApiFactory = function (configuration, basePath, axios) {
|
|
2004
|
+
const localVarFp = SaversApiFp(configuration);
|
|
2005
|
+
return {
|
|
2006
|
+
/**
|
|
2007
|
+
* Returns the saver position given then savers pool and address.
|
|
2008
|
+
* @param {string} asset
|
|
2009
|
+
* @param {string} address
|
|
2010
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2011
|
+
* @param {*} [options] Override http request option.
|
|
2012
|
+
* @throws {RequiredError}
|
|
2013
|
+
*/
|
|
2014
|
+
saver(asset, address, height, options) {
|
|
2015
|
+
return localVarFp.saver(asset, address, height, options).then((request) => request(axios, basePath));
|
|
2016
|
+
},
|
|
2017
|
+
/**
|
|
2018
|
+
* Returns all savers for the savers pool.
|
|
2019
|
+
* @param {string} asset
|
|
2020
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2021
|
+
* @param {*} [options] Override http request option.
|
|
2022
|
+
* @throws {RequiredError}
|
|
2023
|
+
*/
|
|
2024
|
+
savers(asset, height, options) {
|
|
2025
|
+
return localVarFp.savers(asset, height, options).then((request) => request(axios, basePath));
|
|
2026
|
+
},
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
2029
|
+
/**
|
|
2030
|
+
* SaversApi - object-oriented interface
|
|
2031
|
+
* @export
|
|
2032
|
+
* @class SaversApi
|
|
2033
|
+
* @extends {BaseAPI}
|
|
2034
|
+
*/
|
|
2035
|
+
class SaversApi extends BaseAPI {
|
|
2036
|
+
/**
|
|
2037
|
+
* Returns the saver position given then savers pool and address.
|
|
2038
|
+
* @param {string} asset
|
|
2039
|
+
* @param {string} address
|
|
2040
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2041
|
+
* @param {*} [options] Override http request option.
|
|
2042
|
+
* @throws {RequiredError}
|
|
2043
|
+
* @memberof SaversApi
|
|
2044
|
+
*/
|
|
2045
|
+
saver(asset, address, height, options) {
|
|
2046
|
+
return SaversApiFp(this.configuration).saver(asset, address, height, options).then((request) => request(this.axios, this.basePath));
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Returns all savers for the savers pool.
|
|
2050
|
+
* @param {string} asset
|
|
2051
|
+
* @param {number} [height] optional block height, defaults to current tip
|
|
2052
|
+
* @param {*} [options] Override http request option.
|
|
2053
|
+
* @throws {RequiredError}
|
|
2054
|
+
* @memberof SaversApi
|
|
2055
|
+
*/
|
|
2056
|
+
savers(asset, height, options) {
|
|
2057
|
+
return SaversApiFp(this.configuration).savers(asset, height, options).then((request) => request(this.axios, this.basePath));
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2046
2060
|
/**
|
|
2047
2061
|
* TSSApi - axios parameter creator
|
|
2048
2062
|
* @export
|
|
@@ -2877,7 +2891,7 @@ class VaultsApi extends BaseAPI {
|
|
|
2877
2891
|
* Thornode API
|
|
2878
2892
|
* Thornode REST API.
|
|
2879
2893
|
*
|
|
2880
|
-
* The version of the OpenAPI document: 1.
|
|
2894
|
+
* The version of the OpenAPI document: 1.98.0
|
|
2881
2895
|
* Contact: devs@thorchain.org
|
|
2882
2896
|
*
|
|
2883
2897
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2912,10 +2926,6 @@ class Configuration {
|
|
|
2912
2926
|
|
|
2913
2927
|
const THORNODE_API_9R_URL = 'https://thornode.ninerealms.com/';
|
|
2914
2928
|
|
|
2915
|
-
exports.BucketsApi = BucketsApi;
|
|
2916
|
-
exports.BucketsApiAxiosParamCreator = BucketsApiAxiosParamCreator;
|
|
2917
|
-
exports.BucketsApiFactory = BucketsApiFactory;
|
|
2918
|
-
exports.BucketsApiFp = BucketsApiFp;
|
|
2919
2929
|
exports.Configuration = Configuration;
|
|
2920
2930
|
exports.HealthApi = HealthApi;
|
|
2921
2931
|
exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
|
|
@@ -2951,6 +2961,10 @@ exports.QueueApi = QueueApi;
|
|
|
2951
2961
|
exports.QueueApiAxiosParamCreator = QueueApiAxiosParamCreator;
|
|
2952
2962
|
exports.QueueApiFactory = QueueApiFactory;
|
|
2953
2963
|
exports.QueueApiFp = QueueApiFp;
|
|
2964
|
+
exports.SaversApi = SaversApi;
|
|
2965
|
+
exports.SaversApiAxiosParamCreator = SaversApiAxiosParamCreator;
|
|
2966
|
+
exports.SaversApiFactory = SaversApiFactory;
|
|
2967
|
+
exports.SaversApiFp = SaversApiFp;
|
|
2954
2968
|
exports.THORNODE_API_9R_URL = THORNODE_API_9R_URL;
|
|
2955
2969
|
exports.TSSApi = TSSApi;
|
|
2956
2970
|
exports.TSSApiAxiosParamCreator = TSSApiAxiosParamCreator;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thornode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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:thornode",
|
|
33
|
-
"generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://gitlab.com/thorchain/thornode/-/raw/release-1.
|
|
33
|
+
"generate:types:thornode": "TS_POST_PROCESS_FILE=./node_modules/.bin/prettier openapi-generator-cli generate -i https://gitlab.com/thorchain/thornode/-/raw/release-1.98.0/openapi/openapi.yaml -g typescript-axios -o ./src/generated/thornodeApi --skip-validate-spec --generate-alias-as-model",
|
|
34
34
|
"clean:types:thornode": "rimraf ./src/generated/thornodeApi"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|