@xchainjs/xchain-aggregator 2.2.0 → 2.2.2
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 +1028 -39
- package/lib/index.js +1028 -39
- package/package.json +7 -7
package/lib/index.esm.js
CHANGED
|
@@ -4298,10 +4298,10 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
4298
4298
|
/* eslint-disable */
|
|
4299
4299
|
/**
|
|
4300
4300
|
* Midgard Public API
|
|
4301
|
-
* The Midgard Public API queries
|
|
4301
|
+
* The Midgard Public API queries MAYAChain and prepares information about the network to be readily available for public users. The API parses transaction event data from MAYAChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with MAYAChain protocol, users should query MAYANode directly.
|
|
4302
4302
|
*
|
|
4303
|
-
* The version of the OpenAPI document: 2.
|
|
4304
|
-
* Contact: devs@
|
|
4303
|
+
* The version of the OpenAPI document: 2.16.0
|
|
4304
|
+
* Contact: devs@mayaprotocol.com
|
|
4305
4305
|
*
|
|
4306
4306
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
4307
4307
|
* https://openapi-generator.tech
|
|
@@ -4343,10 +4343,10 @@ let RequiredError$1 = class RequiredError extends Error {
|
|
|
4343
4343
|
/* eslint-disable */
|
|
4344
4344
|
/**
|
|
4345
4345
|
* Midgard Public API
|
|
4346
|
-
* The Midgard Public API queries
|
|
4346
|
+
* The Midgard Public API queries MAYAChain and prepares information about the network to be readily available for public users. The API parses transaction event data from MAYAChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with MAYAChain protocol, users should query MAYANode directly.
|
|
4347
4347
|
*
|
|
4348
|
-
* The version of the OpenAPI document: 2.
|
|
4349
|
-
* Contact: devs@
|
|
4348
|
+
* The version of the OpenAPI document: 2.16.0
|
|
4349
|
+
* Contact: devs@mayaprotocol.com
|
|
4350
4350
|
*
|
|
4351
4351
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
4352
4352
|
* https://openapi-generator.tech
|
|
@@ -4423,7 +4423,7 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
|
|
|
4423
4423
|
* @param {string} [address] Comma separated list. Address of sender or recipient of any in/out transaction related to the action.
|
|
4424
4424
|
* @param {string} [txid] ID of any in/out tx related to the action
|
|
4425
4425
|
* @param {string} [asset] Comma separated list. Any asset that is part of the action (CHAIN.SYMBOL) Additionally, synth, nosynth, and norune filters can be used for swap, add/withdraw actions.
|
|
4426
|
-
* @param {string} [type] One or more comma separated unique types of action (swap, addLiquidity, withdraw, donate, refund, switch)
|
|
4426
|
+
* @param {string} [type] One or more comma separated unique types of action (swap, addLiquidity, withdraw, donate, refund, switch, mayaname, cacaoPoolDeposit, cacaoPoolWithdraw)
|
|
4427
4427
|
* @param {string} [affiliate] Comma separated list. Affiliate address of the action (swap, refund)
|
|
4428
4428
|
* @param {number} [limit] number of actions returned, default is 50
|
|
4429
4429
|
* @param {number} [offset] pagination offset, default is 0
|
|
@@ -4494,6 +4494,51 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
|
|
|
4494
4494
|
options: localVarRequestOptions,
|
|
4495
4495
|
};
|
|
4496
4496
|
}),
|
|
4497
|
+
/**
|
|
4498
|
+
* Returns affiliate count, volume in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
4499
|
+
* @summary Affiliate History
|
|
4500
|
+
* @param {string} [mayaname] Return history given mayaname. Returns sum of all mayanames if missing.
|
|
4501
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
4502
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
4503
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
4504
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
4505
|
+
* @param {*} [options] Override http request option.
|
|
4506
|
+
* @throws {RequiredError}
|
|
4507
|
+
*/
|
|
4508
|
+
getAffiliateHistory: (mayaname_1, interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$3(this, [mayaname_1, interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (mayaname, interval, count, to, from, options = {}) {
|
|
4509
|
+
const localVarPath = `/v2/history/affiliate`;
|
|
4510
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4511
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
4512
|
+
let baseOptions;
|
|
4513
|
+
if (configuration) {
|
|
4514
|
+
baseOptions = configuration.baseOptions;
|
|
4515
|
+
}
|
|
4516
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4517
|
+
const localVarHeaderParameter = {};
|
|
4518
|
+
const localVarQueryParameter = {};
|
|
4519
|
+
if (mayaname !== undefined) {
|
|
4520
|
+
localVarQueryParameter['mayaname'] = mayaname;
|
|
4521
|
+
}
|
|
4522
|
+
if (interval !== undefined) {
|
|
4523
|
+
localVarQueryParameter['interval'] = interval;
|
|
4524
|
+
}
|
|
4525
|
+
if (count !== undefined) {
|
|
4526
|
+
localVarQueryParameter['count'] = count;
|
|
4527
|
+
}
|
|
4528
|
+
if (to !== undefined) {
|
|
4529
|
+
localVarQueryParameter['to'] = to;
|
|
4530
|
+
}
|
|
4531
|
+
if (from !== undefined) {
|
|
4532
|
+
localVarQueryParameter['from'] = from;
|
|
4533
|
+
}
|
|
4534
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
4535
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4536
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4537
|
+
return {
|
|
4538
|
+
url: toPathString$1(localVarUrlObj),
|
|
4539
|
+
options: localVarRequestOptions,
|
|
4540
|
+
};
|
|
4541
|
+
}),
|
|
4497
4542
|
/**
|
|
4498
4543
|
* Returns all coin amounts of the given address at the specified timestamp or height, or at the latest process block if neither is provided. (Only one of timestamp or height can be specified, not both.) This endpoint is enabled only if the midgard startup config allows it.
|
|
4499
4544
|
* @summary Current balance for an address
|
|
@@ -4589,6 +4634,117 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
|
|
|
4589
4634
|
options: localVarRequestOptions,
|
|
4590
4635
|
};
|
|
4591
4636
|
}),
|
|
4637
|
+
/**
|
|
4638
|
+
* Returns an array of statistics for all the CACAOPool associated with given member addresses. Query can also be multiple addresses should be separated by comma (\',\')
|
|
4639
|
+
* @summary CACAOPool Details
|
|
4640
|
+
* @param {string} address Address to match the CACAOPool. multiple cacao addresses can be given.
|
|
4641
|
+
* @param {*} [options] Override http request option.
|
|
4642
|
+
* @throws {RequiredError}
|
|
4643
|
+
*/
|
|
4644
|
+
getCACAOPoolDetail: (address_1, ...args_1) => __awaiter$3(this, [address_1, ...args_1], void 0, function* (address, options = {}) {
|
|
4645
|
+
// verify required parameter 'address' is not null or undefined
|
|
4646
|
+
assertParamExists$1('getCACAOPoolDetail', 'address', address);
|
|
4647
|
+
const localVarPath = `/v2/cacaopool/{address}`
|
|
4648
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
4649
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4650
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
4651
|
+
let baseOptions;
|
|
4652
|
+
if (configuration) {
|
|
4653
|
+
baseOptions = configuration.baseOptions;
|
|
4654
|
+
}
|
|
4655
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4656
|
+
const localVarHeaderParameter = {};
|
|
4657
|
+
const localVarQueryParameter = {};
|
|
4658
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
4659
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4660
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4661
|
+
return {
|
|
4662
|
+
url: toPathString$1(localVarUrlObj),
|
|
4663
|
+
options: localVarRequestOptions,
|
|
4664
|
+
};
|
|
4665
|
+
}),
|
|
4666
|
+
/**
|
|
4667
|
+
* Returns CacaoPool members and units. The values report the state at the end of each interval. History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
4668
|
+
* @summary CacaoPool total members and units History
|
|
4669
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
4670
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
4671
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
4672
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
4673
|
+
* @param {*} [options] Override http request option.
|
|
4674
|
+
* @throws {RequiredError}
|
|
4675
|
+
*/
|
|
4676
|
+
getCacaoPoolHistory: (interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$3(this, [interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (interval, count, to, from, options = {}) {
|
|
4677
|
+
const localVarPath = `/v2/history/cacaopool`;
|
|
4678
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4679
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
4680
|
+
let baseOptions;
|
|
4681
|
+
if (configuration) {
|
|
4682
|
+
baseOptions = configuration.baseOptions;
|
|
4683
|
+
}
|
|
4684
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4685
|
+
const localVarHeaderParameter = {};
|
|
4686
|
+
const localVarQueryParameter = {};
|
|
4687
|
+
if (interval !== undefined) {
|
|
4688
|
+
localVarQueryParameter['interval'] = interval;
|
|
4689
|
+
}
|
|
4690
|
+
if (count !== undefined) {
|
|
4691
|
+
localVarQueryParameter['count'] = count;
|
|
4692
|
+
}
|
|
4693
|
+
if (to !== undefined) {
|
|
4694
|
+
localVarQueryParameter['to'] = to;
|
|
4695
|
+
}
|
|
4696
|
+
if (from !== undefined) {
|
|
4697
|
+
localVarQueryParameter['from'] = from;
|
|
4698
|
+
}
|
|
4699
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
4700
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4701
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4702
|
+
return {
|
|
4703
|
+
url: toPathString$1(localVarUrlObj),
|
|
4704
|
+
options: localVarRequestOptions,
|
|
4705
|
+
};
|
|
4706
|
+
}),
|
|
4707
|
+
/**
|
|
4708
|
+
* Returns cacao price history in USD based on the time bucket given
|
|
4709
|
+
* @summary Cacao price history in USD
|
|
4710
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
4711
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
4712
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
4713
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
4714
|
+
* @param {*} [options] Override http request option.
|
|
4715
|
+
* @throws {RequiredError}
|
|
4716
|
+
*/
|
|
4717
|
+
getCacaoPriceHistory: (interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$3(this, [interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (interval, count, to, from, options = {}) {
|
|
4718
|
+
const localVarPath = `/v2/history/cacao`;
|
|
4719
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4720
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
4721
|
+
let baseOptions;
|
|
4722
|
+
if (configuration) {
|
|
4723
|
+
baseOptions = configuration.baseOptions;
|
|
4724
|
+
}
|
|
4725
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4726
|
+
const localVarHeaderParameter = {};
|
|
4727
|
+
const localVarQueryParameter = {};
|
|
4728
|
+
if (interval !== undefined) {
|
|
4729
|
+
localVarQueryParameter['interval'] = interval;
|
|
4730
|
+
}
|
|
4731
|
+
if (count !== undefined) {
|
|
4732
|
+
localVarQueryParameter['count'] = count;
|
|
4733
|
+
}
|
|
4734
|
+
if (to !== undefined) {
|
|
4735
|
+
localVarQueryParameter['to'] = to;
|
|
4736
|
+
}
|
|
4737
|
+
if (from !== undefined) {
|
|
4738
|
+
localVarQueryParameter['from'] = from;
|
|
4739
|
+
}
|
|
4740
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
4741
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4742
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4743
|
+
return {
|
|
4744
|
+
url: toPathString$1(localVarUrlObj),
|
|
4745
|
+
options: localVarRequestOptions,
|
|
4746
|
+
};
|
|
4747
|
+
}),
|
|
4592
4748
|
/**
|
|
4593
4749
|
* Returns block height and timestamp for each churn.
|
|
4594
4750
|
* @summary Churns List
|
|
@@ -4725,6 +4881,39 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
|
|
|
4725
4881
|
options: localVarRequestOptions,
|
|
4726
4882
|
};
|
|
4727
4883
|
}),
|
|
4884
|
+
/**
|
|
4885
|
+
* Returns all coin amounts of the given asset ordered by their amounts in descending order. This endpoint is enabled only if the midgard startup config allows it.
|
|
4886
|
+
* @summary Current top holders for an asset
|
|
4887
|
+
* @param {string} [asset] Asset to get the top holders for.
|
|
4888
|
+
* @param {number} [limit] Number of top holders to return, default is 100, maximum is 1000.
|
|
4889
|
+
* @param {*} [options] Override http request option.
|
|
4890
|
+
* @throws {RequiredError}
|
|
4891
|
+
*/
|
|
4892
|
+
getHolders: (asset_1, limit_1, ...args_1) => __awaiter$3(this, [asset_1, limit_1, ...args_1], void 0, function* (asset, limit, options = {}) {
|
|
4893
|
+
const localVarPath = `/v2/holders`;
|
|
4894
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4895
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
4896
|
+
let baseOptions;
|
|
4897
|
+
if (configuration) {
|
|
4898
|
+
baseOptions = configuration.baseOptions;
|
|
4899
|
+
}
|
|
4900
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4901
|
+
const localVarHeaderParameter = {};
|
|
4902
|
+
const localVarQueryParameter = {};
|
|
4903
|
+
if (asset !== undefined) {
|
|
4904
|
+
localVarQueryParameter['asset'] = asset;
|
|
4905
|
+
}
|
|
4906
|
+
if (limit !== undefined) {
|
|
4907
|
+
localVarQueryParameter['limit'] = limit;
|
|
4908
|
+
}
|
|
4909
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
4910
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4911
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4912
|
+
return {
|
|
4913
|
+
url: toPathString$1(localVarUrlObj),
|
|
4914
|
+
options: localVarRequestOptions,
|
|
4915
|
+
};
|
|
4916
|
+
}),
|
|
4728
4917
|
/**
|
|
4729
4918
|
* Returns an object with known pools and their statuses
|
|
4730
4919
|
* @summary Known Pools List
|
|
@@ -5006,6 +5195,47 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
|
|
|
5006
5195
|
options: localVarRequestOptions,
|
|
5007
5196
|
};
|
|
5008
5197
|
}),
|
|
5198
|
+
/**
|
|
5199
|
+
* Returns reserve module network fee, outbound fee, and gas reimbursement flow in bucketed history
|
|
5200
|
+
* @summary Reserve income and expenses over bucketed history
|
|
5201
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
5202
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
5203
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
5204
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
5205
|
+
* @param {*} [options] Override http request option.
|
|
5206
|
+
* @throws {RequiredError}
|
|
5207
|
+
*/
|
|
5208
|
+
getReserveHistory: (interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$3(this, [interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (interval, count, to, from, options = {}) {
|
|
5209
|
+
const localVarPath = `/v2/history/reserve`;
|
|
5210
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5211
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
5212
|
+
let baseOptions;
|
|
5213
|
+
if (configuration) {
|
|
5214
|
+
baseOptions = configuration.baseOptions;
|
|
5215
|
+
}
|
|
5216
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5217
|
+
const localVarHeaderParameter = {};
|
|
5218
|
+
const localVarQueryParameter = {};
|
|
5219
|
+
if (interval !== undefined) {
|
|
5220
|
+
localVarQueryParameter['interval'] = interval;
|
|
5221
|
+
}
|
|
5222
|
+
if (count !== undefined) {
|
|
5223
|
+
localVarQueryParameter['count'] = count;
|
|
5224
|
+
}
|
|
5225
|
+
if (to !== undefined) {
|
|
5226
|
+
localVarQueryParameter['to'] = to;
|
|
5227
|
+
}
|
|
5228
|
+
if (from !== undefined) {
|
|
5229
|
+
localVarQueryParameter['from'] = from;
|
|
5230
|
+
}
|
|
5231
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
5232
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5233
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5234
|
+
return {
|
|
5235
|
+
url: toPathString$1(localVarUrlObj),
|
|
5236
|
+
options: localVarRequestOptions,
|
|
5237
|
+
};
|
|
5238
|
+
}),
|
|
5009
5239
|
/**
|
|
5010
5240
|
* Returns an array of statistics for all the savers associated with a given member address. Query can also be multiple addresses should be seperated by comma (\',\')
|
|
5011
5241
|
* @summary Saver Details
|
|
@@ -5278,6 +5508,35 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
|
|
|
5278
5508
|
options: localVarRequestOptions,
|
|
5279
5509
|
};
|
|
5280
5510
|
}),
|
|
5511
|
+
/**
|
|
5512
|
+
* Returns timestamp, key, value for each active node member.
|
|
5513
|
+
* @summary Current Protocol Voting
|
|
5514
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which votes will be shown. Default is 90d.
|
|
5515
|
+
* @param {*} [options] Override http request option.
|
|
5516
|
+
* @throws {RequiredError}
|
|
5517
|
+
*/
|
|
5518
|
+
getVotes: (period_1, ...args_1) => __awaiter$3(this, [period_1, ...args_1], void 0, function* (period, options = {}) {
|
|
5519
|
+
const localVarPath = `/v2/votes`;
|
|
5520
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5521
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
|
|
5522
|
+
let baseOptions;
|
|
5523
|
+
if (configuration) {
|
|
5524
|
+
baseOptions = configuration.baseOptions;
|
|
5525
|
+
}
|
|
5526
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
5527
|
+
const localVarHeaderParameter = {};
|
|
5528
|
+
const localVarQueryParameter = {};
|
|
5529
|
+
if (period !== undefined) {
|
|
5530
|
+
localVarQueryParameter['period'] = period;
|
|
5531
|
+
}
|
|
5532
|
+
setSearchParams$1(localVarUrlObj, localVarQueryParameter);
|
|
5533
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5534
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5535
|
+
return {
|
|
5536
|
+
url: toPathString$1(localVarUrlObj),
|
|
5537
|
+
options: localVarRequestOptions,
|
|
5538
|
+
};
|
|
5539
|
+
}),
|
|
5281
5540
|
};
|
|
5282
5541
|
};
|
|
5283
5542
|
/**
|
|
@@ -5293,7 +5552,7 @@ const DefaultApiFp$1 = function (configuration) {
|
|
|
5293
5552
|
* @param {string} [address] Comma separated list. Address of sender or recipient of any in/out transaction related to the action.
|
|
5294
5553
|
* @param {string} [txid] ID of any in/out tx related to the action
|
|
5295
5554
|
* @param {string} [asset] Comma separated list. Any asset that is part of the action (CHAIN.SYMBOL) Additionally, synth, nosynth, and norune filters can be used for swap, add/withdraw actions.
|
|
5296
|
-
* @param {string} [type] One or more comma separated unique types of action (swap, addLiquidity, withdraw, donate, refund, switch)
|
|
5555
|
+
* @param {string} [type] One or more comma separated unique types of action (swap, addLiquidity, withdraw, donate, refund, switch, mayaname, cacaoPoolDeposit, cacaoPoolWithdraw)
|
|
5297
5556
|
* @param {string} [affiliate] Comma separated list. Affiliate address of the action (swap, refund)
|
|
5298
5557
|
* @param {number} [limit] number of actions returned, default is 50
|
|
5299
5558
|
* @param {number} [offset] pagination offset, default is 0
|
|
@@ -5312,6 +5571,23 @@ const DefaultApiFp$1 = function (configuration) {
|
|
|
5312
5571
|
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5313
5572
|
});
|
|
5314
5573
|
},
|
|
5574
|
+
/**
|
|
5575
|
+
* Returns affiliate count, volume in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
5576
|
+
* @summary Affiliate History
|
|
5577
|
+
* @param {string} [mayaname] Return history given mayaname. Returns sum of all mayanames if missing.
|
|
5578
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
5579
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
5580
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
5581
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
5582
|
+
* @param {*} [options] Override http request option.
|
|
5583
|
+
* @throws {RequiredError}
|
|
5584
|
+
*/
|
|
5585
|
+
getAffiliateHistory(mayaname, interval, count, to, from, options) {
|
|
5586
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5587
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateHistory(mayaname, interval, count, to, from, options);
|
|
5588
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5589
|
+
});
|
|
5590
|
+
},
|
|
5315
5591
|
/**
|
|
5316
5592
|
* Returns all coin amounts of the given address at the specified timestamp or height, or at the latest process block if neither is provided. (Only one of timestamp or height can be specified, not both.) This endpoint is enabled only if the midgard startup config allows it.
|
|
5317
5593
|
* @summary Current balance for an address
|
|
@@ -5353,6 +5629,51 @@ const DefaultApiFp$1 = function (configuration) {
|
|
|
5353
5629
|
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5354
5630
|
});
|
|
5355
5631
|
},
|
|
5632
|
+
/**
|
|
5633
|
+
* Returns an array of statistics for all the CACAOPool associated with given member addresses. Query can also be multiple addresses should be separated by comma (\',\')
|
|
5634
|
+
* @summary CACAOPool Details
|
|
5635
|
+
* @param {string} address Address to match the CACAOPool. multiple cacao addresses can be given.
|
|
5636
|
+
* @param {*} [options] Override http request option.
|
|
5637
|
+
* @throws {RequiredError}
|
|
5638
|
+
*/
|
|
5639
|
+
getCACAOPoolDetail(address, options) {
|
|
5640
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5641
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCACAOPoolDetail(address, options);
|
|
5642
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5643
|
+
});
|
|
5644
|
+
},
|
|
5645
|
+
/**
|
|
5646
|
+
* Returns CacaoPool members and units. The values report the state at the end of each interval. History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
5647
|
+
* @summary CacaoPool total members and units History
|
|
5648
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
5649
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
5650
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
5651
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
5652
|
+
* @param {*} [options] Override http request option.
|
|
5653
|
+
* @throws {RequiredError}
|
|
5654
|
+
*/
|
|
5655
|
+
getCacaoPoolHistory(interval, count, to, from, options) {
|
|
5656
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5657
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCacaoPoolHistory(interval, count, to, from, options);
|
|
5658
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5659
|
+
});
|
|
5660
|
+
},
|
|
5661
|
+
/**
|
|
5662
|
+
* Returns cacao price history in USD based on the time bucket given
|
|
5663
|
+
* @summary Cacao price history in USD
|
|
5664
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
5665
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
5666
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
5667
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
5668
|
+
* @param {*} [options] Override http request option.
|
|
5669
|
+
* @throws {RequiredError}
|
|
5670
|
+
*/
|
|
5671
|
+
getCacaoPriceHistory(interval, count, to, from, options) {
|
|
5672
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5673
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCacaoPriceHistory(interval, count, to, from, options);
|
|
5674
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5675
|
+
});
|
|
5676
|
+
},
|
|
5356
5677
|
/**
|
|
5357
5678
|
* Returns block height and timestamp for each churn.
|
|
5358
5679
|
* @summary Churns List
|
|
@@ -5410,6 +5731,20 @@ const DefaultApiFp$1 = function (configuration) {
|
|
|
5410
5731
|
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5411
5732
|
});
|
|
5412
5733
|
},
|
|
5734
|
+
/**
|
|
5735
|
+
* Returns all coin amounts of the given asset ordered by their amounts in descending order. This endpoint is enabled only if the midgard startup config allows it.
|
|
5736
|
+
* @summary Current top holders for an asset
|
|
5737
|
+
* @param {string} [asset] Asset to get the top holders for.
|
|
5738
|
+
* @param {number} [limit] Number of top holders to return, default is 100, maximum is 1000.
|
|
5739
|
+
* @param {*} [options] Override http request option.
|
|
5740
|
+
* @throws {RequiredError}
|
|
5741
|
+
*/
|
|
5742
|
+
getHolders(asset, limit, options) {
|
|
5743
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5744
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getHolders(asset, limit, options);
|
|
5745
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5746
|
+
});
|
|
5747
|
+
},
|
|
5413
5748
|
/**
|
|
5414
5749
|
* Returns an object with known pools and their statuses
|
|
5415
5750
|
* @summary Known Pools List
|
|
@@ -5519,16 +5854,32 @@ const DefaultApiFp$1 = function (configuration) {
|
|
|
5519
5854
|
});
|
|
5520
5855
|
},
|
|
5521
5856
|
/**
|
|
5522
|
-
* Returns an array containing details for a set of pools
|
|
5523
|
-
* @summary Pools List
|
|
5524
|
-
* @param {'available' | 'staged' | 'suspended'} [status] Filter for only pools with this status
|
|
5525
|
-
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which annualPercentageRate and poolAPY is extrapolated. Default is 14d.
|
|
5857
|
+
* Returns an array containing details for a set of pools
|
|
5858
|
+
* @summary Pools List
|
|
5859
|
+
* @param {'available' | 'staged' | 'suspended'} [status] Filter for only pools with this status
|
|
5860
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which annualPercentageRate and poolAPY is extrapolated. Default is 14d.
|
|
5861
|
+
* @param {*} [options] Override http request option.
|
|
5862
|
+
* @throws {RequiredError}
|
|
5863
|
+
*/
|
|
5864
|
+
getPools(status, period, options) {
|
|
5865
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5866
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPools(status, period, options);
|
|
5867
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5868
|
+
});
|
|
5869
|
+
},
|
|
5870
|
+
/**
|
|
5871
|
+
* Returns reserve module network fee, outbound fee, and gas reimbursement flow in bucketed history
|
|
5872
|
+
* @summary Reserve income and expenses over bucketed history
|
|
5873
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
5874
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
5875
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
5876
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
5526
5877
|
* @param {*} [options] Override http request option.
|
|
5527
5878
|
* @throws {RequiredError}
|
|
5528
5879
|
*/
|
|
5529
|
-
|
|
5880
|
+
getReserveHistory(interval, count, to, from, options) {
|
|
5530
5881
|
return __awaiter$3(this, void 0, void 0, function* () {
|
|
5531
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
5882
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getReserveHistory(interval, count, to, from, options);
|
|
5532
5883
|
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5533
5884
|
});
|
|
5534
5885
|
},
|
|
@@ -5646,6 +5997,19 @@ const DefaultApiFp$1 = function (configuration) {
|
|
|
5646
5997
|
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
5647
5998
|
});
|
|
5648
5999
|
},
|
|
6000
|
+
/**
|
|
6001
|
+
* Returns timestamp, key, value for each active node member.
|
|
6002
|
+
* @summary Current Protocol Voting
|
|
6003
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which votes will be shown. Default is 90d.
|
|
6004
|
+
* @param {*} [options] Override http request option.
|
|
6005
|
+
* @throws {RequiredError}
|
|
6006
|
+
*/
|
|
6007
|
+
getVotes(period, options) {
|
|
6008
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
|
6009
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getVotes(period, options);
|
|
6010
|
+
return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
|
|
6011
|
+
});
|
|
6012
|
+
},
|
|
5649
6013
|
};
|
|
5650
6014
|
};
|
|
5651
6015
|
/**
|
|
@@ -5661,7 +6025,7 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
|
|
|
5661
6025
|
* @param {string} [address] Comma separated list. Address of sender or recipient of any in/out transaction related to the action.
|
|
5662
6026
|
* @param {string} [txid] ID of any in/out tx related to the action
|
|
5663
6027
|
* @param {string} [asset] Comma separated list. Any asset that is part of the action (CHAIN.SYMBOL) Additionally, synth, nosynth, and norune filters can be used for swap, add/withdraw actions.
|
|
5664
|
-
* @param {string} [type] One or more comma separated unique types of action (swap, addLiquidity, withdraw, donate, refund, switch)
|
|
6028
|
+
* @param {string} [type] One or more comma separated unique types of action (swap, addLiquidity, withdraw, donate, refund, switch, mayaname, cacaoPoolDeposit, cacaoPoolWithdraw)
|
|
5665
6029
|
* @param {string} [affiliate] Comma separated list. Affiliate address of the action (swap, refund)
|
|
5666
6030
|
* @param {number} [limit] number of actions returned, default is 50
|
|
5667
6031
|
* @param {number} [offset] pagination offset, default is 0
|
|
@@ -5678,6 +6042,21 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
|
|
|
5678
6042
|
getActions(address, txid, asset, type, affiliate, limit, offset, nextPageToken, timestamp, height, prevPageToken, fromTimestamp, fromHeight, options) {
|
|
5679
6043
|
return DefaultApiFp$1(this.configuration).getActions(address, txid, asset, type, affiliate, limit, offset, nextPageToken, timestamp, height, prevPageToken, fromTimestamp, fromHeight, options).then((request) => request(this.axios, this.basePath));
|
|
5680
6044
|
}
|
|
6045
|
+
/**
|
|
6046
|
+
* Returns affiliate count, volume in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
6047
|
+
* @summary Affiliate History
|
|
6048
|
+
* @param {string} [mayaname] Return history given mayaname. Returns sum of all mayanames if missing.
|
|
6049
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
6050
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
6051
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
6052
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
6053
|
+
* @param {*} [options] Override http request option.
|
|
6054
|
+
* @throws {RequiredError}
|
|
6055
|
+
* @memberof DefaultApi
|
|
6056
|
+
*/
|
|
6057
|
+
getAffiliateHistory(mayaname, interval, count, to, from, options) {
|
|
6058
|
+
return DefaultApiFp$1(this.configuration).getAffiliateHistory(mayaname, interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
6059
|
+
}
|
|
5681
6060
|
/**
|
|
5682
6061
|
* Returns all coin amounts of the given address at the specified timestamp or height, or at the latest process block if neither is provided. (Only one of timestamp or height can be specified, not both.) This endpoint is enabled only if the midgard startup config allows it.
|
|
5683
6062
|
* @summary Current balance for an address
|
|
@@ -5713,6 +6092,45 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
|
|
|
5713
6092
|
getBorrowersAddresses(asset, options) {
|
|
5714
6093
|
return DefaultApiFp$1(this.configuration).getBorrowersAddresses(asset, options).then((request) => request(this.axios, this.basePath));
|
|
5715
6094
|
}
|
|
6095
|
+
/**
|
|
6096
|
+
* Returns an array of statistics for all the CACAOPool associated with given member addresses. Query can also be multiple addresses should be separated by comma (\',\')
|
|
6097
|
+
* @summary CACAOPool Details
|
|
6098
|
+
* @param {string} address Address to match the CACAOPool. multiple cacao addresses can be given.
|
|
6099
|
+
* @param {*} [options] Override http request option.
|
|
6100
|
+
* @throws {RequiredError}
|
|
6101
|
+
* @memberof DefaultApi
|
|
6102
|
+
*/
|
|
6103
|
+
getCACAOPoolDetail(address, options) {
|
|
6104
|
+
return DefaultApiFp$1(this.configuration).getCACAOPoolDetail(address, options).then((request) => request(this.axios, this.basePath));
|
|
6105
|
+
}
|
|
6106
|
+
/**
|
|
6107
|
+
* Returns CacaoPool members and units. The values report the state at the end of each interval. History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
6108
|
+
* @summary CacaoPool total members and units History
|
|
6109
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
6110
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
6111
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
6112
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
6113
|
+
* @param {*} [options] Override http request option.
|
|
6114
|
+
* @throws {RequiredError}
|
|
6115
|
+
* @memberof DefaultApi
|
|
6116
|
+
*/
|
|
6117
|
+
getCacaoPoolHistory(interval, count, to, from, options) {
|
|
6118
|
+
return DefaultApiFp$1(this.configuration).getCacaoPoolHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
6119
|
+
}
|
|
6120
|
+
/**
|
|
6121
|
+
* Returns cacao price history in USD based on the time bucket given
|
|
6122
|
+
* @summary Cacao price history in USD
|
|
6123
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
6124
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
6125
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
6126
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
6127
|
+
* @param {*} [options] Override http request option.
|
|
6128
|
+
* @throws {RequiredError}
|
|
6129
|
+
* @memberof DefaultApi
|
|
6130
|
+
*/
|
|
6131
|
+
getCacaoPriceHistory(interval, count, to, from, options) {
|
|
6132
|
+
return DefaultApiFp$1(this.configuration).getCacaoPriceHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
6133
|
+
}
|
|
5716
6134
|
/**
|
|
5717
6135
|
* Returns block height and timestamp for each churn.
|
|
5718
6136
|
* @summary Churns List
|
|
@@ -5762,6 +6180,18 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
|
|
|
5762
6180
|
getHealth(options) {
|
|
5763
6181
|
return DefaultApiFp$1(this.configuration).getHealth(options).then((request) => request(this.axios, this.basePath));
|
|
5764
6182
|
}
|
|
6183
|
+
/**
|
|
6184
|
+
* Returns all coin amounts of the given asset ordered by their amounts in descending order. This endpoint is enabled only if the midgard startup config allows it.
|
|
6185
|
+
* @summary Current top holders for an asset
|
|
6186
|
+
* @param {string} [asset] Asset to get the top holders for.
|
|
6187
|
+
* @param {number} [limit] Number of top holders to return, default is 100, maximum is 1000.
|
|
6188
|
+
* @param {*} [options] Override http request option.
|
|
6189
|
+
* @throws {RequiredError}
|
|
6190
|
+
* @memberof DefaultApi
|
|
6191
|
+
*/
|
|
6192
|
+
getHolders(asset, limit, options) {
|
|
6193
|
+
return DefaultApiFp$1(this.configuration).getHolders(asset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
6194
|
+
}
|
|
5765
6195
|
/**
|
|
5766
6196
|
* Returns an object with known pools and their statuses
|
|
5767
6197
|
* @summary Known Pools List
|
|
@@ -5866,6 +6296,20 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
|
|
|
5866
6296
|
getPools(status, period, options) {
|
|
5867
6297
|
return DefaultApiFp$1(this.configuration).getPools(status, period, options).then((request) => request(this.axios, this.basePath));
|
|
5868
6298
|
}
|
|
6299
|
+
/**
|
|
6300
|
+
* Returns reserve module network fee, outbound fee, and gas reimbursement flow in bucketed history
|
|
6301
|
+
* @summary Reserve income and expenses over bucketed history
|
|
6302
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
6303
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
6304
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
6305
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
6306
|
+
* @param {*} [options] Override http request option.
|
|
6307
|
+
* @throws {RequiredError}
|
|
6308
|
+
* @memberof DefaultApi
|
|
6309
|
+
*/
|
|
6310
|
+
getReserveHistory(interval, count, to, from, options) {
|
|
6311
|
+
return DefaultApiFp$1(this.configuration).getReserveHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
6312
|
+
}
|
|
5869
6313
|
/**
|
|
5870
6314
|
* Returns an array of statistics for all the savers associated with a given member address. Query can also be multiple addresses should be seperated by comma (\',\')
|
|
5871
6315
|
* @summary Saver Details
|
|
@@ -5964,16 +6408,27 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
|
|
|
5964
6408
|
getTVLHistory(interval, count, to, from, options) {
|
|
5965
6409
|
return DefaultApiFp$1(this.configuration).getTVLHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
5966
6410
|
}
|
|
6411
|
+
/**
|
|
6412
|
+
* Returns timestamp, key, value for each active node member.
|
|
6413
|
+
* @summary Current Protocol Voting
|
|
6414
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which votes will be shown. Default is 90d.
|
|
6415
|
+
* @param {*} [options] Override http request option.
|
|
6416
|
+
* @throws {RequiredError}
|
|
6417
|
+
* @memberof DefaultApi
|
|
6418
|
+
*/
|
|
6419
|
+
getVotes(period, options) {
|
|
6420
|
+
return DefaultApiFp$1(this.configuration).getVotes(period, options).then((request) => request(this.axios, this.basePath));
|
|
6421
|
+
}
|
|
5967
6422
|
};
|
|
5968
6423
|
|
|
5969
6424
|
/* tslint:disable */
|
|
5970
6425
|
/* eslint-disable */
|
|
5971
6426
|
/**
|
|
5972
6427
|
* Midgard Public API
|
|
5973
|
-
* The Midgard Public API queries
|
|
6428
|
+
* The Midgard Public API queries MAYAChain and prepares information about the network to be readily available for public users. The API parses transaction event data from MAYAChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with MAYAChain protocol, users should query MAYANode directly.
|
|
5974
6429
|
*
|
|
5975
|
-
* The version of the OpenAPI document: 2.
|
|
5976
|
-
* Contact: devs@
|
|
6430
|
+
* The version of the OpenAPI document: 2.16.0
|
|
6431
|
+
* Contact: devs@mayaprotocol.com
|
|
5977
6432
|
*
|
|
5978
6433
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
5979
6434
|
* https://openapi-generator.tech
|
|
@@ -6935,7 +7390,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
6935
7390
|
* Midgard Public API
|
|
6936
7391
|
* The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with THORChain protocol, users should query THORNode directly.
|
|
6937
7392
|
*
|
|
6938
|
-
* The version of the OpenAPI document: 2.
|
|
7393
|
+
* The version of the OpenAPI document: 2.34.0
|
|
6939
7394
|
* Contact: devs@thorchain.org
|
|
6940
7395
|
*
|
|
6941
7396
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -6980,7 +7435,7 @@ class RequiredError extends Error {
|
|
|
6980
7435
|
* Midgard Public API
|
|
6981
7436
|
* The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with THORChain protocol, users should query THORNode directly.
|
|
6982
7437
|
*
|
|
6983
|
-
* The version of the OpenAPI document: 2.
|
|
7438
|
+
* The version of the OpenAPI document: 2.34.0
|
|
6984
7439
|
* Contact: devs@thorchain.org
|
|
6985
7440
|
*
|
|
6986
7441
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -7133,6 +7588,141 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
7133
7588
|
options: localVarRequestOptions,
|
|
7134
7589
|
};
|
|
7135
7590
|
}),
|
|
7591
|
+
/**
|
|
7592
|
+
* Returns affiliate earnings (liquidity fees) in USD and RUNE in specified interval. If thorname is not specified returns all affiliates. History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
7593
|
+
* @summary Affiliate Earnings History
|
|
7594
|
+
* @param {string} [thorname] Return earnings for given thorname. Returns all affiliates if missing.
|
|
7595
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
7596
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
7597
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
7598
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
7599
|
+
* @param {*} [options] Override http request option.
|
|
7600
|
+
* @throws {RequiredError}
|
|
7601
|
+
*/
|
|
7602
|
+
getAffiliateEarning: (thorname_1, interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [thorname_1, interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (thorname, interval, count, to, from, options = {}) {
|
|
7603
|
+
const localVarPath = `/v2/history/affiliate/earnings`;
|
|
7604
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7605
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7606
|
+
let baseOptions;
|
|
7607
|
+
if (configuration) {
|
|
7608
|
+
baseOptions = configuration.baseOptions;
|
|
7609
|
+
}
|
|
7610
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7611
|
+
const localVarHeaderParameter = {};
|
|
7612
|
+
const localVarQueryParameter = {};
|
|
7613
|
+
if (thorname !== undefined) {
|
|
7614
|
+
localVarQueryParameter['thorname'] = thorname;
|
|
7615
|
+
}
|
|
7616
|
+
if (interval !== undefined) {
|
|
7617
|
+
localVarQueryParameter['interval'] = interval;
|
|
7618
|
+
}
|
|
7619
|
+
if (count !== undefined) {
|
|
7620
|
+
localVarQueryParameter['count'] = count;
|
|
7621
|
+
}
|
|
7622
|
+
if (to !== undefined) {
|
|
7623
|
+
localVarQueryParameter['to'] = to;
|
|
7624
|
+
}
|
|
7625
|
+
if (from !== undefined) {
|
|
7626
|
+
localVarQueryParameter['from'] = from;
|
|
7627
|
+
}
|
|
7628
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7629
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7630
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7631
|
+
return {
|
|
7632
|
+
url: toPathString(localVarUrlObj),
|
|
7633
|
+
options: localVarRequestOptions,
|
|
7634
|
+
};
|
|
7635
|
+
}),
|
|
7636
|
+
/**
|
|
7637
|
+
* Returns affiliate count, earnings in USD in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
7638
|
+
* @summary Affiliate earnings History
|
|
7639
|
+
* @param {string} [thorname] Return history given thorname. Returns sum of all thornames if missing.
|
|
7640
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
7641
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
7642
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
7643
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
7644
|
+
* @param {*} [options] Override http request option.
|
|
7645
|
+
* @throws {RequiredError}
|
|
7646
|
+
*/
|
|
7647
|
+
getAffiliateHistory: (thorname_1, interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [thorname_1, interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (thorname, interval, count, to, from, options = {}) {
|
|
7648
|
+
const localVarPath = `/v2/history/affiliate`;
|
|
7649
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7650
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7651
|
+
let baseOptions;
|
|
7652
|
+
if (configuration) {
|
|
7653
|
+
baseOptions = configuration.baseOptions;
|
|
7654
|
+
}
|
|
7655
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7656
|
+
const localVarHeaderParameter = {};
|
|
7657
|
+
const localVarQueryParameter = {};
|
|
7658
|
+
if (thorname !== undefined) {
|
|
7659
|
+
localVarQueryParameter['thorname'] = thorname;
|
|
7660
|
+
}
|
|
7661
|
+
if (interval !== undefined) {
|
|
7662
|
+
localVarQueryParameter['interval'] = interval;
|
|
7663
|
+
}
|
|
7664
|
+
if (count !== undefined) {
|
|
7665
|
+
localVarQueryParameter['count'] = count;
|
|
7666
|
+
}
|
|
7667
|
+
if (to !== undefined) {
|
|
7668
|
+
localVarQueryParameter['to'] = to;
|
|
7669
|
+
}
|
|
7670
|
+
if (from !== undefined) {
|
|
7671
|
+
localVarQueryParameter['from'] = from;
|
|
7672
|
+
}
|
|
7673
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7674
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7675
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7676
|
+
return {
|
|
7677
|
+
url: toPathString(localVarUrlObj),
|
|
7678
|
+
options: localVarRequestOptions,
|
|
7679
|
+
};
|
|
7680
|
+
}),
|
|
7681
|
+
/**
|
|
7682
|
+
* Returns affiliate count, swap volume in USD in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
7683
|
+
* @summary Affiliate Volume Stats
|
|
7684
|
+
* @param {string} [thorname] Return history given thorname. Returns sum of all thornames if missing.
|
|
7685
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
7686
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
7687
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
7688
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
7689
|
+
* @param {*} [options] Override http request option.
|
|
7690
|
+
* @throws {RequiredError}
|
|
7691
|
+
*/
|
|
7692
|
+
getAffiliateStats: (thorname_1, interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [thorname_1, interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (thorname, interval, count, to, from, options = {}) {
|
|
7693
|
+
const localVarPath = `/v2/history/affiliate/stats`;
|
|
7694
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7695
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7696
|
+
let baseOptions;
|
|
7697
|
+
if (configuration) {
|
|
7698
|
+
baseOptions = configuration.baseOptions;
|
|
7699
|
+
}
|
|
7700
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7701
|
+
const localVarHeaderParameter = {};
|
|
7702
|
+
const localVarQueryParameter = {};
|
|
7703
|
+
if (thorname !== undefined) {
|
|
7704
|
+
localVarQueryParameter['thorname'] = thorname;
|
|
7705
|
+
}
|
|
7706
|
+
if (interval !== undefined) {
|
|
7707
|
+
localVarQueryParameter['interval'] = interval;
|
|
7708
|
+
}
|
|
7709
|
+
if (count !== undefined) {
|
|
7710
|
+
localVarQueryParameter['count'] = count;
|
|
7711
|
+
}
|
|
7712
|
+
if (to !== undefined) {
|
|
7713
|
+
localVarQueryParameter['to'] = to;
|
|
7714
|
+
}
|
|
7715
|
+
if (from !== undefined) {
|
|
7716
|
+
localVarQueryParameter['from'] = from;
|
|
7717
|
+
}
|
|
7718
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7719
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7720
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7721
|
+
return {
|
|
7722
|
+
url: toPathString(localVarUrlObj),
|
|
7723
|
+
options: localVarRequestOptions,
|
|
7724
|
+
};
|
|
7725
|
+
}),
|
|
7136
7726
|
/**
|
|
7137
7727
|
* Returns all coin amounts of the given address at the specified timestamp or height, or at the latest process block if neither is provided. (Only one of timestamp or height can be specified, not both.) This endpoint is enabled only if the midgard startup config allows it.
|
|
7138
7728
|
* @summary Current balance for an address
|
|
@@ -7170,6 +7760,35 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
7170
7760
|
options: localVarRequestOptions,
|
|
7171
7761
|
};
|
|
7172
7762
|
}),
|
|
7763
|
+
/**
|
|
7764
|
+
* Returns the bond details of a given address. The response contains the bond amount, the bond status, and the bond type. This is wrapper from THORNode nodes API.
|
|
7765
|
+
* @summary Bonder Details
|
|
7766
|
+
* @param {string} address Address of the bonder
|
|
7767
|
+
* @param {*} [options] Override http request option.
|
|
7768
|
+
* @throws {RequiredError}
|
|
7769
|
+
*/
|
|
7770
|
+
getBondersDetails: (address_1, ...args_1) => __awaiter$1(this, [address_1, ...args_1], void 0, function* (address, options = {}) {
|
|
7771
|
+
// verify required parameter 'address' is not null or undefined
|
|
7772
|
+
assertParamExists('getBondersDetails', 'address', address);
|
|
7773
|
+
const localVarPath = `/v2/bonds/{address}`
|
|
7774
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
7775
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7776
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7777
|
+
let baseOptions;
|
|
7778
|
+
if (configuration) {
|
|
7779
|
+
baseOptions = configuration.baseOptions;
|
|
7780
|
+
}
|
|
7781
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7782
|
+
const localVarHeaderParameter = {};
|
|
7783
|
+
const localVarQueryParameter = {};
|
|
7784
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7785
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7786
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7787
|
+
return {
|
|
7788
|
+
url: toPathString(localVarUrlObj),
|
|
7789
|
+
options: localVarRequestOptions,
|
|
7790
|
+
};
|
|
7791
|
+
}),
|
|
7173
7792
|
/**
|
|
7174
7793
|
* Returns an array of statistics for all the open loans associated with a given borrower address.
|
|
7175
7794
|
* @summary Borrower Details
|
|
@@ -7319,18 +7938,43 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
7319
7938
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7320
7939
|
const localVarHeaderParameter = {};
|
|
7321
7940
|
const localVarQueryParameter = {};
|
|
7322
|
-
if (interval !== undefined) {
|
|
7323
|
-
localVarQueryParameter['interval'] = interval;
|
|
7324
|
-
}
|
|
7325
|
-
if (count !== undefined) {
|
|
7326
|
-
localVarQueryParameter['count'] = count;
|
|
7327
|
-
}
|
|
7328
|
-
if (to !== undefined) {
|
|
7329
|
-
localVarQueryParameter['to'] = to;
|
|
7330
|
-
}
|
|
7331
|
-
if (from !== undefined) {
|
|
7332
|
-
localVarQueryParameter['from'] = from;
|
|
7333
|
-
}
|
|
7941
|
+
if (interval !== undefined) {
|
|
7942
|
+
localVarQueryParameter['interval'] = interval;
|
|
7943
|
+
}
|
|
7944
|
+
if (count !== undefined) {
|
|
7945
|
+
localVarQueryParameter['count'] = count;
|
|
7946
|
+
}
|
|
7947
|
+
if (to !== undefined) {
|
|
7948
|
+
localVarQueryParameter['to'] = to;
|
|
7949
|
+
}
|
|
7950
|
+
if (from !== undefined) {
|
|
7951
|
+
localVarQueryParameter['from'] = from;
|
|
7952
|
+
}
|
|
7953
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7954
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7955
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
7956
|
+
return {
|
|
7957
|
+
url: toPathString(localVarUrlObj),
|
|
7958
|
+
options: localVarRequestOptions,
|
|
7959
|
+
};
|
|
7960
|
+
}),
|
|
7961
|
+
/**
|
|
7962
|
+
* Returns an object containing the health response of the API. Meaning of heights: lastThorNode - Latest block as reported by ThorNode. lastFetched - Latest block fetched from ThorNode. lastCommitted - Latest block committed to the DB but not fully processed yet. lastAggregated - Latest block fully processed and aggregated. genesisInfo - The genesis height Midgard bootstrapped with.
|
|
7963
|
+
* @summary Health Info
|
|
7964
|
+
* @param {*} [options] Override http request option.
|
|
7965
|
+
* @throws {RequiredError}
|
|
7966
|
+
*/
|
|
7967
|
+
getHealth: (...args_1) => __awaiter$1(this, [...args_1], void 0, function* (options = {}) {
|
|
7968
|
+
const localVarPath = `/v2/health`;
|
|
7969
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7970
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7971
|
+
let baseOptions;
|
|
7972
|
+
if (configuration) {
|
|
7973
|
+
baseOptions = configuration.baseOptions;
|
|
7974
|
+
}
|
|
7975
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7976
|
+
const localVarHeaderParameter = {};
|
|
7977
|
+
const localVarQueryParameter = {};
|
|
7334
7978
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7335
7979
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7336
7980
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -7340,13 +7984,15 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
7340
7984
|
};
|
|
7341
7985
|
}),
|
|
7342
7986
|
/**
|
|
7343
|
-
* Returns
|
|
7344
|
-
* @summary
|
|
7987
|
+
* Returns all coin amounts of the given asset ordered by their amounts in descending order. This endpoint is enabled only if the midgard startup config allows it.
|
|
7988
|
+
* @summary Current top holders for an asset
|
|
7989
|
+
* @param {string} [asset] Asset to get the top holders for.
|
|
7990
|
+
* @param {number} [limit] Number of top holders to return, default is 100, maximum is 1000.
|
|
7345
7991
|
* @param {*} [options] Override http request option.
|
|
7346
7992
|
* @throws {RequiredError}
|
|
7347
7993
|
*/
|
|
7348
|
-
|
|
7349
|
-
const localVarPath = `/v2/
|
|
7994
|
+
getHolders: (asset_1, limit_1, ...args_1) => __awaiter$1(this, [asset_1, limit_1, ...args_1], void 0, function* (asset, limit, options = {}) {
|
|
7995
|
+
const localVarPath = `/v2/holders`;
|
|
7350
7996
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7351
7997
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7352
7998
|
let baseOptions;
|
|
@@ -7356,6 +8002,12 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
7356
8002
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
7357
8003
|
const localVarHeaderParameter = {};
|
|
7358
8004
|
const localVarQueryParameter = {};
|
|
8005
|
+
if (asset !== undefined) {
|
|
8006
|
+
localVarQueryParameter['asset'] = asset;
|
|
8007
|
+
}
|
|
8008
|
+
if (limit !== undefined) {
|
|
8009
|
+
localVarQueryParameter['limit'] = limit;
|
|
8010
|
+
}
|
|
7359
8011
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7360
8012
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7361
8013
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -7726,7 +8378,48 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
7726
8378
|
* @throws {RequiredError}
|
|
7727
8379
|
*/
|
|
7728
8380
|
getReserveHistory: (interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (interval, count, to, from, options = {}) {
|
|
7729
|
-
const localVarPath = `/v2/reserve`;
|
|
8381
|
+
const localVarPath = `/v2/history/reserve`;
|
|
8382
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8383
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8384
|
+
let baseOptions;
|
|
8385
|
+
if (configuration) {
|
|
8386
|
+
baseOptions = configuration.baseOptions;
|
|
8387
|
+
}
|
|
8388
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
8389
|
+
const localVarHeaderParameter = {};
|
|
8390
|
+
const localVarQueryParameter = {};
|
|
8391
|
+
if (interval !== undefined) {
|
|
8392
|
+
localVarQueryParameter['interval'] = interval;
|
|
8393
|
+
}
|
|
8394
|
+
if (count !== undefined) {
|
|
8395
|
+
localVarQueryParameter['count'] = count;
|
|
8396
|
+
}
|
|
8397
|
+
if (to !== undefined) {
|
|
8398
|
+
localVarQueryParameter['to'] = to;
|
|
8399
|
+
}
|
|
8400
|
+
if (from !== undefined) {
|
|
8401
|
+
localVarQueryParameter['from'] = from;
|
|
8402
|
+
}
|
|
8403
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8404
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8405
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
8406
|
+
return {
|
|
8407
|
+
url: toPathString(localVarUrlObj),
|
|
8408
|
+
options: localVarRequestOptions,
|
|
8409
|
+
};
|
|
8410
|
+
}),
|
|
8411
|
+
/**
|
|
8412
|
+
* Returns rune price history in USD based on the time bucket given
|
|
8413
|
+
* @summary Rune price history in USD
|
|
8414
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
8415
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
8416
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
8417
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
8418
|
+
* @param {*} [options] Override http request option.
|
|
8419
|
+
* @throws {RequiredError}
|
|
8420
|
+
*/
|
|
8421
|
+
getRunePriceHistory: (interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (interval, count, to, from, options = {}) {
|
|
8422
|
+
const localVarPath = `/v2/history/rune`;
|
|
7730
8423
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7731
8424
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
7732
8425
|
let baseOptions;
|
|
@@ -8028,6 +8721,68 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
8028
8721
|
options: localVarRequestOptions,
|
|
8029
8722
|
};
|
|
8030
8723
|
}),
|
|
8724
|
+
/**
|
|
8725
|
+
* Returns an array of TCY distribution for the given address.
|
|
8726
|
+
* @summary Tcy Distribution
|
|
8727
|
+
* @param {string} address Address which is assigned to TCY Holder.
|
|
8728
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which APR will be calculated. Default is 30d.
|
|
8729
|
+
* @param {*} [options] Override http request option.
|
|
8730
|
+
* @throws {RequiredError}
|
|
8731
|
+
*/
|
|
8732
|
+
getTcyDistribution: (address_1, period_1, ...args_1) => __awaiter$1(this, [address_1, period_1, ...args_1], void 0, function* (address, period, options = {}) {
|
|
8733
|
+
// verify required parameter 'address' is not null or undefined
|
|
8734
|
+
assertParamExists('getTcyDistribution', 'address', address);
|
|
8735
|
+
const localVarPath = `/v2/tcy/distribution/{address}`
|
|
8736
|
+
.replace(`{${"address"}}`, encodeURIComponent(String(address)));
|
|
8737
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8738
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8739
|
+
let baseOptions;
|
|
8740
|
+
if (configuration) {
|
|
8741
|
+
baseOptions = configuration.baseOptions;
|
|
8742
|
+
}
|
|
8743
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
8744
|
+
const localVarHeaderParameter = {};
|
|
8745
|
+
const localVarQueryParameter = {};
|
|
8746
|
+
if (period !== undefined) {
|
|
8747
|
+
localVarQueryParameter['period'] = period;
|
|
8748
|
+
}
|
|
8749
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8750
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8751
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
8752
|
+
return {
|
|
8753
|
+
url: toPathString(localVarUrlObj),
|
|
8754
|
+
options: localVarRequestOptions,
|
|
8755
|
+
};
|
|
8756
|
+
}),
|
|
8757
|
+
/**
|
|
8758
|
+
* Returns timestamp, key, value for each active node member.
|
|
8759
|
+
* @summary Current Protocol Voting
|
|
8760
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which votes will be shown. Default is 90d.
|
|
8761
|
+
* @param {*} [options] Override http request option.
|
|
8762
|
+
* @throws {RequiredError}
|
|
8763
|
+
*/
|
|
8764
|
+
getVotes: (period_1, ...args_1) => __awaiter$1(this, [period_1, ...args_1], void 0, function* (period, options = {}) {
|
|
8765
|
+
const localVarPath = `/v2/votes`;
|
|
8766
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8767
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8768
|
+
let baseOptions;
|
|
8769
|
+
if (configuration) {
|
|
8770
|
+
baseOptions = configuration.baseOptions;
|
|
8771
|
+
}
|
|
8772
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
8773
|
+
const localVarHeaderParameter = {};
|
|
8774
|
+
const localVarQueryParameter = {};
|
|
8775
|
+
if (period !== undefined) {
|
|
8776
|
+
localVarQueryParameter['period'] = period;
|
|
8777
|
+
}
|
|
8778
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8779
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8780
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
8781
|
+
return {
|
|
8782
|
+
url: toPathString(localVarUrlObj),
|
|
8783
|
+
options: localVarRequestOptions,
|
|
8784
|
+
};
|
|
8785
|
+
}),
|
|
8031
8786
|
};
|
|
8032
8787
|
};
|
|
8033
8788
|
/**
|
|
@@ -8063,6 +8818,57 @@ const DefaultApiFp = function (configuration) {
|
|
|
8063
8818
|
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8064
8819
|
});
|
|
8065
8820
|
},
|
|
8821
|
+
/**
|
|
8822
|
+
* Returns affiliate earnings (liquidity fees) in USD and RUNE in specified interval. If thorname is not specified returns all affiliates. History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
8823
|
+
* @summary Affiliate Earnings History
|
|
8824
|
+
* @param {string} [thorname] Return earnings for given thorname. Returns all affiliates if missing.
|
|
8825
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
8826
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
8827
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
8828
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
8829
|
+
* @param {*} [options] Override http request option.
|
|
8830
|
+
* @throws {RequiredError}
|
|
8831
|
+
*/
|
|
8832
|
+
getAffiliateEarning(thorname, interval, count, to, from, options) {
|
|
8833
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
8834
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateEarning(thorname, interval, count, to, from, options);
|
|
8835
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8836
|
+
});
|
|
8837
|
+
},
|
|
8838
|
+
/**
|
|
8839
|
+
* Returns affiliate count, earnings in USD in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
8840
|
+
* @summary Affiliate earnings History
|
|
8841
|
+
* @param {string} [thorname] Return history given thorname. Returns sum of all thornames if missing.
|
|
8842
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
8843
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
8844
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
8845
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
8846
|
+
* @param {*} [options] Override http request option.
|
|
8847
|
+
* @throws {RequiredError}
|
|
8848
|
+
*/
|
|
8849
|
+
getAffiliateHistory(thorname, interval, count, to, from, options) {
|
|
8850
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
8851
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateHistory(thorname, interval, count, to, from, options);
|
|
8852
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8853
|
+
});
|
|
8854
|
+
},
|
|
8855
|
+
/**
|
|
8856
|
+
* Returns affiliate count, swap volume in USD in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
8857
|
+
* @summary Affiliate Volume Stats
|
|
8858
|
+
* @param {string} [thorname] Return history given thorname. Returns sum of all thornames if missing.
|
|
8859
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
8860
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
8861
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
8862
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
8863
|
+
* @param {*} [options] Override http request option.
|
|
8864
|
+
* @throws {RequiredError}
|
|
8865
|
+
*/
|
|
8866
|
+
getAffiliateStats(thorname, interval, count, to, from, options) {
|
|
8867
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
8868
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateStats(thorname, interval, count, to, from, options);
|
|
8869
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8870
|
+
});
|
|
8871
|
+
},
|
|
8066
8872
|
/**
|
|
8067
8873
|
* Returns all coin amounts of the given address at the specified timestamp or height, or at the latest process block if neither is provided. (Only one of timestamp or height can be specified, not both.) This endpoint is enabled only if the midgard startup config allows it.
|
|
8068
8874
|
* @summary Current balance for an address
|
|
@@ -8078,6 +8884,19 @@ const DefaultApiFp = function (configuration) {
|
|
|
8078
8884
|
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8079
8885
|
});
|
|
8080
8886
|
},
|
|
8887
|
+
/**
|
|
8888
|
+
* Returns the bond details of a given address. The response contains the bond amount, the bond status, and the bond type. This is wrapper from THORNode nodes API.
|
|
8889
|
+
* @summary Bonder Details
|
|
8890
|
+
* @param {string} address Address of the bonder
|
|
8891
|
+
* @param {*} [options] Override http request option.
|
|
8892
|
+
* @throws {RequiredError}
|
|
8893
|
+
*/
|
|
8894
|
+
getBondersDetails(address, options) {
|
|
8895
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
8896
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBondersDetails(address, options);
|
|
8897
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8898
|
+
});
|
|
8899
|
+
},
|
|
8081
8900
|
/**
|
|
8082
8901
|
* Returns an array of statistics for all the open loans associated with a given borrower address.
|
|
8083
8902
|
* @summary Borrower Details
|
|
@@ -8161,6 +8980,20 @@ const DefaultApiFp = function (configuration) {
|
|
|
8161
8980
|
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8162
8981
|
});
|
|
8163
8982
|
},
|
|
8983
|
+
/**
|
|
8984
|
+
* Returns all coin amounts of the given asset ordered by their amounts in descending order. This endpoint is enabled only if the midgard startup config allows it.
|
|
8985
|
+
* @summary Current top holders for an asset
|
|
8986
|
+
* @param {string} [asset] Asset to get the top holders for.
|
|
8987
|
+
* @param {number} [limit] Number of top holders to return, default is 100, maximum is 1000.
|
|
8988
|
+
* @param {*} [options] Override http request option.
|
|
8989
|
+
* @throws {RequiredError}
|
|
8990
|
+
*/
|
|
8991
|
+
getHolders(asset, limit, options) {
|
|
8992
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
8993
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getHolders(asset, limit, options);
|
|
8994
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8995
|
+
});
|
|
8996
|
+
},
|
|
8164
8997
|
/**
|
|
8165
8998
|
* Returns an object with known pools and their statuses
|
|
8166
8999
|
* @summary Known Pools List
|
|
@@ -8328,6 +9161,22 @@ const DefaultApiFp = function (configuration) {
|
|
|
8328
9161
|
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8329
9162
|
});
|
|
8330
9163
|
},
|
|
9164
|
+
/**
|
|
9165
|
+
* Returns rune price history in USD based on the time bucket given
|
|
9166
|
+
* @summary Rune price history in USD
|
|
9167
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
9168
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
9169
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
9170
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
9171
|
+
* @param {*} [options] Override http request option.
|
|
9172
|
+
* @throws {RequiredError}
|
|
9173
|
+
*/
|
|
9174
|
+
getRunePriceHistory(interval, count, to, from, options) {
|
|
9175
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
9176
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getRunePriceHistory(interval, count, to, from, options);
|
|
9177
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
9178
|
+
});
|
|
9179
|
+
},
|
|
8331
9180
|
/**
|
|
8332
9181
|
* Returns an array of statistics for all the savers associated with a given member address. Query can also be multiple addresses should be separated by comma (\',\')
|
|
8333
9182
|
* @summary Saver Details
|
|
@@ -8442,6 +9291,33 @@ const DefaultApiFp = function (configuration) {
|
|
|
8442
9291
|
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
8443
9292
|
});
|
|
8444
9293
|
},
|
|
9294
|
+
/**
|
|
9295
|
+
* Returns an array of TCY distribution for the given address.
|
|
9296
|
+
* @summary Tcy Distribution
|
|
9297
|
+
* @param {string} address Address which is assigned to TCY Holder.
|
|
9298
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which APR will be calculated. Default is 30d.
|
|
9299
|
+
* @param {*} [options] Override http request option.
|
|
9300
|
+
* @throws {RequiredError}
|
|
9301
|
+
*/
|
|
9302
|
+
getTcyDistribution(address, period, options) {
|
|
9303
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
9304
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getTcyDistribution(address, period, options);
|
|
9305
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
9306
|
+
});
|
|
9307
|
+
},
|
|
9308
|
+
/**
|
|
9309
|
+
* Returns timestamp, key, value for each active node member.
|
|
9310
|
+
* @summary Current Protocol Voting
|
|
9311
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which votes will be shown. Default is 90d.
|
|
9312
|
+
* @param {*} [options] Override http request option.
|
|
9313
|
+
* @throws {RequiredError}
|
|
9314
|
+
*/
|
|
9315
|
+
getVotes(period, options) {
|
|
9316
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
9317
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getVotes(period, options);
|
|
9318
|
+
return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
|
|
9319
|
+
});
|
|
9320
|
+
},
|
|
8445
9321
|
};
|
|
8446
9322
|
};
|
|
8447
9323
|
/**
|
|
@@ -8475,6 +9351,51 @@ class DefaultApi extends BaseAPI {
|
|
|
8475
9351
|
getActions(address, txid, asset, type, txType, affiliate, limit, offset, nextPageToken, timestamp, height, prevPageToken, fromTimestamp, fromHeight, options) {
|
|
8476
9352
|
return DefaultApiFp(this.configuration).getActions(address, txid, asset, type, txType, affiliate, limit, offset, nextPageToken, timestamp, height, prevPageToken, fromTimestamp, fromHeight, options).then((request) => request(this.axios, this.basePath));
|
|
8477
9353
|
}
|
|
9354
|
+
/**
|
|
9355
|
+
* Returns affiliate earnings (liquidity fees) in USD and RUNE in specified interval. If thorname is not specified returns all affiliates. History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
9356
|
+
* @summary Affiliate Earnings History
|
|
9357
|
+
* @param {string} [thorname] Return earnings for given thorname. Returns all affiliates if missing.
|
|
9358
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
9359
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
9360
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
9361
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
9362
|
+
* @param {*} [options] Override http request option.
|
|
9363
|
+
* @throws {RequiredError}
|
|
9364
|
+
* @memberof DefaultApi
|
|
9365
|
+
*/
|
|
9366
|
+
getAffiliateEarning(thorname, interval, count, to, from, options) {
|
|
9367
|
+
return DefaultApiFp(this.configuration).getAffiliateEarning(thorname, interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
9368
|
+
}
|
|
9369
|
+
/**
|
|
9370
|
+
* Returns affiliate count, earnings in USD in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
9371
|
+
* @summary Affiliate earnings History
|
|
9372
|
+
* @param {string} [thorname] Return history given thorname. Returns sum of all thornames if missing.
|
|
9373
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
9374
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
9375
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
9376
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
9377
|
+
* @param {*} [options] Override http request option.
|
|
9378
|
+
* @throws {RequiredError}
|
|
9379
|
+
* @memberof DefaultApi
|
|
9380
|
+
*/
|
|
9381
|
+
getAffiliateHistory(thorname, interval, count, to, from, options) {
|
|
9382
|
+
return DefaultApiFp(this.configuration).getAffiliateHistory(thorname, interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
9383
|
+
}
|
|
9384
|
+
/**
|
|
9385
|
+
* Returns affiliate count, swap volume in USD in specified interval. If thorname is not specified returns all thornames History endpoint has two modes: * With Interval parameter it returns a series of time buckets. From and To dates will be rounded to the Interval boundaries. * Without Interval parameter a single From..To search is performed with exact timestamps. * Interval: possible values: 5min, hour, day, week, month, quarter, year. * count: [1..400]. Defines number of intervals. Don\'t provide if Interval is missing. * from/to: optional int, unix second. Possible usages with interval. * last 10 days: `?interval=day&count=10` * last 10 days before to: `?interval=day&count=10&to=1608825600` * next 10 days after from: `?interval=day&count=10&from=1606780800` * Days between from and to. From defaults to start of chain, to defaults to now. Only the first 400 intervals are returned: `interval=day&from=1606780800&to=1608825600` Pagination is possible with from&count and then using the returned meta.endTime as the From parameter of the next query. Possible configurations without interval: * exact search for one time frame: `?from=1606780899&to=1608825600` * one time frame until now: `?from=1606780899` * from chain start until now: no query parameters
|
|
9386
|
+
* @summary Affiliate Volume Stats
|
|
9387
|
+
* @param {string} [thorname] Return history given thorname. Returns sum of all thornames if missing.
|
|
9388
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
9389
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
9390
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
9391
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
9392
|
+
* @param {*} [options] Override http request option.
|
|
9393
|
+
* @throws {RequiredError}
|
|
9394
|
+
* @memberof DefaultApi
|
|
9395
|
+
*/
|
|
9396
|
+
getAffiliateStats(thorname, interval, count, to, from, options) {
|
|
9397
|
+
return DefaultApiFp(this.configuration).getAffiliateStats(thorname, interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
9398
|
+
}
|
|
8478
9399
|
/**
|
|
8479
9400
|
* Returns all coin amounts of the given address at the specified timestamp or height, or at the latest process block if neither is provided. (Only one of timestamp or height can be specified, not both.) This endpoint is enabled only if the midgard startup config allows it.
|
|
8480
9401
|
* @summary Current balance for an address
|
|
@@ -8488,6 +9409,17 @@ class DefaultApi extends BaseAPI {
|
|
|
8488
9409
|
getBalance(address, timestamp, height, options) {
|
|
8489
9410
|
return DefaultApiFp(this.configuration).getBalance(address, timestamp, height, options).then((request) => request(this.axios, this.basePath));
|
|
8490
9411
|
}
|
|
9412
|
+
/**
|
|
9413
|
+
* Returns the bond details of a given address. The response contains the bond amount, the bond status, and the bond type. This is wrapper from THORNode nodes API.
|
|
9414
|
+
* @summary Bonder Details
|
|
9415
|
+
* @param {string} address Address of the bonder
|
|
9416
|
+
* @param {*} [options] Override http request option.
|
|
9417
|
+
* @throws {RequiredError}
|
|
9418
|
+
* @memberof DefaultApi
|
|
9419
|
+
*/
|
|
9420
|
+
getBondersDetails(address, options) {
|
|
9421
|
+
return DefaultApiFp(this.configuration).getBondersDetails(address, options).then((request) => request(this.axios, this.basePath));
|
|
9422
|
+
}
|
|
8491
9423
|
/**
|
|
8492
9424
|
* Returns an array of statistics for all the open loans associated with a given borrower address.
|
|
8493
9425
|
* @summary Borrower Details
|
|
@@ -8559,6 +9491,18 @@ class DefaultApi extends BaseAPI {
|
|
|
8559
9491
|
getHealth(options) {
|
|
8560
9492
|
return DefaultApiFp(this.configuration).getHealth(options).then((request) => request(this.axios, this.basePath));
|
|
8561
9493
|
}
|
|
9494
|
+
/**
|
|
9495
|
+
* Returns all coin amounts of the given asset ordered by their amounts in descending order. This endpoint is enabled only if the midgard startup config allows it.
|
|
9496
|
+
* @summary Current top holders for an asset
|
|
9497
|
+
* @param {string} [asset] Asset to get the top holders for.
|
|
9498
|
+
* @param {number} [limit] Number of top holders to return, default is 100, maximum is 1000.
|
|
9499
|
+
* @param {*} [options] Override http request option.
|
|
9500
|
+
* @throws {RequiredError}
|
|
9501
|
+
* @memberof DefaultApi
|
|
9502
|
+
*/
|
|
9503
|
+
getHolders(asset, limit, options) {
|
|
9504
|
+
return DefaultApiFp(this.configuration).getHolders(asset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
9505
|
+
}
|
|
8562
9506
|
/**
|
|
8563
9507
|
* Returns an object with known pools and their statuses
|
|
8564
9508
|
* @summary Known Pools List
|
|
@@ -8702,6 +9646,20 @@ class DefaultApi extends BaseAPI {
|
|
|
8702
9646
|
getReserveHistory(interval, count, to, from, options) {
|
|
8703
9647
|
return DefaultApiFp(this.configuration).getReserveHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
8704
9648
|
}
|
|
9649
|
+
/**
|
|
9650
|
+
* Returns rune price history in USD based on the time bucket given
|
|
9651
|
+
* @summary Rune price history in USD
|
|
9652
|
+
* @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
|
|
9653
|
+
* @param {number} [count] Number of intervals to return. Should be between [1..400].
|
|
9654
|
+
* @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
|
|
9655
|
+
* @param {number} [from] Start time of the query as unix timestamp
|
|
9656
|
+
* @param {*} [options] Override http request option.
|
|
9657
|
+
* @throws {RequiredError}
|
|
9658
|
+
* @memberof DefaultApi
|
|
9659
|
+
*/
|
|
9660
|
+
getRunePriceHistory(interval, count, to, from, options) {
|
|
9661
|
+
return DefaultApiFp(this.configuration).getRunePriceHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
9662
|
+
}
|
|
8705
9663
|
/**
|
|
8706
9664
|
* Returns an array of statistics for all the savers associated with a given member address. Query can also be multiple addresses should be separated by comma (\',\')
|
|
8707
9665
|
* @summary Saver Details
|
|
@@ -8800,6 +9758,29 @@ class DefaultApi extends BaseAPI {
|
|
|
8800
9758
|
getTVLHistory(interval, count, to, from, options) {
|
|
8801
9759
|
return DefaultApiFp(this.configuration).getTVLHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
|
|
8802
9760
|
}
|
|
9761
|
+
/**
|
|
9762
|
+
* Returns an array of TCY distribution for the given address.
|
|
9763
|
+
* @summary Tcy Distribution
|
|
9764
|
+
* @param {string} address Address which is assigned to TCY Holder.
|
|
9765
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which APR will be calculated. Default is 30d.
|
|
9766
|
+
* @param {*} [options] Override http request option.
|
|
9767
|
+
* @throws {RequiredError}
|
|
9768
|
+
* @memberof DefaultApi
|
|
9769
|
+
*/
|
|
9770
|
+
getTcyDistribution(address, period, options) {
|
|
9771
|
+
return DefaultApiFp(this.configuration).getTcyDistribution(address, period, options).then((request) => request(this.axios, this.basePath));
|
|
9772
|
+
}
|
|
9773
|
+
/**
|
|
9774
|
+
* Returns timestamp, key, value for each active node member.
|
|
9775
|
+
* @summary Current Protocol Voting
|
|
9776
|
+
* @param {'1h' | '24h' | '7d' | '14d' | '30d' | '90d' | '100d' | '180d' | '365d' | 'all'} [period] Specifies the base interval from which votes will be shown. Default is 90d.
|
|
9777
|
+
* @param {*} [options] Override http request option.
|
|
9778
|
+
* @throws {RequiredError}
|
|
9779
|
+
* @memberof DefaultApi
|
|
9780
|
+
*/
|
|
9781
|
+
getVotes(period, options) {
|
|
9782
|
+
return DefaultApiFp(this.configuration).getVotes(period, options).then((request) => request(this.axios, this.basePath));
|
|
9783
|
+
}
|
|
8803
9784
|
}
|
|
8804
9785
|
|
|
8805
9786
|
/* tslint:disable */
|
|
@@ -8808,7 +9789,7 @@ class DefaultApi extends BaseAPI {
|
|
|
8808
9789
|
* Midgard Public API
|
|
8809
9790
|
* The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with THORChain protocol, users should query THORNode directly.
|
|
8810
9791
|
*
|
|
8811
|
-
* The version of the OpenAPI document: 2.
|
|
9792
|
+
* The version of the OpenAPI document: 2.34.0
|
|
8812
9793
|
* Contact: devs@thorchain.org
|
|
8813
9794
|
*
|
|
8814
9795
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -9464,6 +10445,8 @@ class MidgardQuery {
|
|
|
9464
10445
|
'TRON.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7': 6,
|
|
9465
10446
|
// XRP
|
|
9466
10447
|
'XRP.XRP': 6,
|
|
10448
|
+
// Solana
|
|
10449
|
+
'SOL.SOL': 9,
|
|
9467
10450
|
};
|
|
9468
10451
|
// Return specific fallback or use chain-based defaults
|
|
9469
10452
|
if (fallbackDecimalMap[assetString]) {
|
|
@@ -9483,6 +10466,7 @@ class MidgardQuery {
|
|
|
9483
10466
|
BASE: 18,
|
|
9484
10467
|
TRON: 6,
|
|
9485
10468
|
XRP: 6,
|
|
10469
|
+
SOL: 9,
|
|
9486
10470
|
THOR: DEFAULT_THORCHAIN_DECIMALS,
|
|
9487
10471
|
};
|
|
9488
10472
|
const chainDefault = chainDefaults[asset.chain];
|
|
@@ -9550,7 +10534,12 @@ class MidgardQuery {
|
|
|
9550
10534
|
return DEFAULT_THORCHAIN_DECIMALS;
|
|
9551
10535
|
try {
|
|
9552
10536
|
const pool = yield this.getPool(assetToString(asset));
|
|
9553
|
-
|
|
10537
|
+
const decimals = Number(pool.nativeDecimal);
|
|
10538
|
+
if (decimals >= 0)
|
|
10539
|
+
return decimals;
|
|
10540
|
+
// Midgard returns -1 for chains where decimals are not yet configured
|
|
10541
|
+
console.warn(`Midgard returned -1 decimals for ${assetToString(asset)}, using fallback`);
|
|
10542
|
+
return this.getFallbackDecimals(asset);
|
|
9554
10543
|
}
|
|
9555
10544
|
catch (error) {
|
|
9556
10545
|
// Fallback: if Midgard is down, use standard decimal values for common assets
|