@xchainjs/xchain-aggregator 2.1.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/index.esm.js +1067 -95
  2. package/lib/index.js +1067 -95
  3. package/package.json +8 -8
package/lib/index.esm.js CHANGED
@@ -65,6 +65,15 @@ const xAssetToCAsset = (asset) => {
65
65
  return asset.ticker;
66
66
  };
67
67
 
68
+ const networkToChainflip = (network) => {
69
+ switch (network) {
70
+ case Network.Stagenet:
71
+ return 'perseverance';
72
+ case Network.Mainnet:
73
+ default:
74
+ return 'mainnet';
75
+ }
76
+ };
68
77
  /**
69
78
  * Chainflip protocol
70
79
  */
@@ -72,7 +81,7 @@ class ChainflipProtocol {
72
81
  constructor(configuration) {
73
82
  this.name = 'Chainflip';
74
83
  this.sdk = new SwapSDK({
75
- network: 'mainnet',
84
+ network: networkToChainflip(configuration === null || configuration === void 0 ? void 0 : configuration.network),
76
85
  enabledFeatures: {
77
86
  dca: true,
78
87
  },
@@ -155,25 +164,7 @@ class ChainflipProtocol {
155
164
  // User wants regular quotes - prioritize DCA > REGULAR (ignore boost quotes)
156
165
  selectedQuote = quotes.find((quote) => quote.type === 'DCA') || quotes.find((quote) => quote.type === 'REGULAR');
157
166
  }
158
- if (params.destinationAddress && (selectedQuote === null || selectedQuote === void 0 ? void 0 : selectedQuote.type) === 'DCA' && params.fromAddress) {
159
- // Use boost quote only if user enabled boost and it's available
160
- const quoteToUse = params.enableBoost && selectedQuote.boostQuote ? selectedQuote.boostQuote : selectedQuote;
161
- const resp = yield this.sdk.requestDepositAddressV2({
162
- quote: quoteToUse,
163
- destAddress: params.destinationAddress,
164
- srcAddress: params.fromAddress,
165
- fillOrKillParams: {
166
- slippageTolerancePercent: selectedQuote.recommendedSlippageTolerancePercent,
167
- refundAddress: params.fromAddress,
168
- retryDurationBlocks: 100,
169
- },
170
- affiliateBrokers: this.affiliateBrokers,
171
- });
172
- toAddress = resp.depositAddress;
173
- depositChannelId = resp.depositChannelId;
174
- }
175
- else if (params.destinationAddress && (selectedQuote === null || selectedQuote === void 0 ? void 0 : selectedQuote.type) === 'REGULAR' && params.fromAddress) {
176
- // Use boost quote only if user enabled boost and it's available
167
+ if (params.destinationAddress && selectedQuote && params.fromAddress) {
177
168
  const quoteToUse = params.enableBoost && selectedQuote.boostQuote ? selectedQuote.boostQuote : selectedQuote;
178
169
  const resp = yield this.sdk.requestDepositAddressV2({
179
170
  quote: quoteToUse,
@@ -4307,10 +4298,10 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
4307
4298
  /* eslint-disable */
4308
4299
  /**
4309
4300
  * Midgard Public API
4310
- * 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 MAYAChain protocol, users should query MAYANode directly.
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.
4311
4302
  *
4312
- * The version of the OpenAPI document: 2.10.0
4313
- * Contact: devs@thorchain.org
4303
+ * The version of the OpenAPI document: 2.16.0
4304
+ * Contact: devs@mayaprotocol.com
4314
4305
  *
4315
4306
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
4316
4307
  * https://openapi-generator.tech
@@ -4352,10 +4343,10 @@ let RequiredError$1 = class RequiredError extends Error {
4352
4343
  /* eslint-disable */
4353
4344
  /**
4354
4345
  * Midgard Public API
4355
- * 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 MAYAChain protocol, users should query MAYANode directly.
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.
4356
4347
  *
4357
- * The version of the OpenAPI document: 2.10.0
4358
- * Contact: devs@thorchain.org
4348
+ * The version of the OpenAPI document: 2.16.0
4349
+ * Contact: devs@mayaprotocol.com
4359
4350
  *
4360
4351
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
4361
4352
  * https://openapi-generator.tech
@@ -4432,7 +4423,7 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
4432
4423
  * @param {string} [address] Comma separated list. Address of sender or recipient of any in/out transaction related to the action.
4433
4424
  * @param {string} [txid] ID of any in/out tx related to the action
4434
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.
4435
- * @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)
4436
4427
  * @param {string} [affiliate] Comma separated list. Affiliate address of the action (swap, refund)
4437
4428
  * @param {number} [limit] number of actions returned, default is 50
4438
4429
  * @param {number} [offset] pagination offset, default is 0
@@ -4503,6 +4494,51 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
4503
4494
  options: localVarRequestOptions,
4504
4495
  };
4505
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
+ }),
4506
4542
  /**
4507
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.
4508
4544
  * @summary Current balance for an address
@@ -4598,6 +4634,117 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
4598
4634
  options: localVarRequestOptions,
4599
4635
  };
4600
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
+ }),
4601
4748
  /**
4602
4749
  * Returns block height and timestamp for each churn.
4603
4750
  * @summary Churns List
@@ -4734,6 +4881,39 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
4734
4881
  options: localVarRequestOptions,
4735
4882
  };
4736
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
+ }),
4737
4917
  /**
4738
4918
  * Returns an object with known pools and their statuses
4739
4919
  * @summary Known Pools List
@@ -5015,6 +5195,47 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
5015
5195
  options: localVarRequestOptions,
5016
5196
  };
5017
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
+ }),
5018
5239
  /**
5019
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 (\',\')
5020
5241
  * @summary Saver Details
@@ -5287,6 +5508,35 @@ const DefaultApiAxiosParamCreator$1 = function (configuration) {
5287
5508
  options: localVarRequestOptions,
5288
5509
  };
5289
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
+ }),
5290
5540
  };
5291
5541
  };
5292
5542
  /**
@@ -5302,7 +5552,7 @@ const DefaultApiFp$1 = function (configuration) {
5302
5552
  * @param {string} [address] Comma separated list. Address of sender or recipient of any in/out transaction related to the action.
5303
5553
  * @param {string} [txid] ID of any in/out tx related to the action
5304
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.
5305
- * @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)
5306
5556
  * @param {string} [affiliate] Comma separated list. Affiliate address of the action (swap, refund)
5307
5557
  * @param {number} [limit] number of actions returned, default is 50
5308
5558
  * @param {number} [offset] pagination offset, default is 0
@@ -5322,17 +5572,34 @@ const DefaultApiFp$1 = function (configuration) {
5322
5572
  });
5323
5573
  },
5324
5574
  /**
5325
- * 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.
5326
- * @summary Current balance for an address
5327
- * @param {string} address Rune address.
5328
- * @param {number} [timestamp] Unix timestamp as seconds since 1970 (if provided, height must not be provided)
5329
- * @param {number} [height] Block height (if provided, timestamp must not be provided)
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
5330
5582
  * @param {*} [options] Override http request option.
5331
5583
  * @throws {RequiredError}
5332
5584
  */
5333
- getBalance(address, timestamp, height, options) {
5585
+ getAffiliateHistory(mayaname, interval, count, to, from, options) {
5334
5586
  return __awaiter$3(this, void 0, void 0, function* () {
5335
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(address, timestamp, height, options);
5587
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateHistory(mayaname, interval, count, to, from, options);
5588
+ return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5589
+ });
5590
+ },
5591
+ /**
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.
5593
+ * @summary Current balance for an address
5594
+ * @param {string} address Rune address.
5595
+ * @param {number} [timestamp] Unix timestamp as seconds since 1970 (if provided, height must not be provided)
5596
+ * @param {number} [height] Block height (if provided, timestamp must not be provided)
5597
+ * @param {*} [options] Override http request option.
5598
+ * @throws {RequiredError}
5599
+ */
5600
+ getBalance(address, timestamp, height, options) {
5601
+ return __awaiter$3(this, void 0, void 0, function* () {
5602
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(address, timestamp, height, options);
5336
5603
  return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5337
5604
  });
5338
5605
  },
@@ -5362,6 +5629,51 @@ const DefaultApiFp$1 = function (configuration) {
5362
5629
  return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5363
5630
  });
5364
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
+ },
5365
5677
  /**
5366
5678
  * Returns block height and timestamp for each churn.
5367
5679
  * @summary Churns List
@@ -5419,6 +5731,20 @@ const DefaultApiFp$1 = function (configuration) {
5419
5731
  return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5420
5732
  });
5421
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
+ },
5422
5748
  /**
5423
5749
  * Returns an object with known pools and their statuses
5424
5750
  * @summary Known Pools List
@@ -5541,6 +5867,22 @@ const DefaultApiFp$1 = function (configuration) {
5541
5867
  return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5542
5868
  });
5543
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
5877
+ * @param {*} [options] Override http request option.
5878
+ * @throws {RequiredError}
5879
+ */
5880
+ getReserveHistory(interval, count, to, from, options) {
5881
+ return __awaiter$3(this, void 0, void 0, function* () {
5882
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getReserveHistory(interval, count, to, from, options);
5883
+ return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5884
+ });
5885
+ },
5544
5886
  /**
5545
5887
  * 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 (\',\')
5546
5888
  * @summary Saver Details
@@ -5655,6 +5997,19 @@ const DefaultApiFp$1 = function (configuration) {
5655
5997
  return createRequestFunction$1(localVarAxiosArgs, axios, BASE_PATH$1, configuration);
5656
5998
  });
5657
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
+ },
5658
6013
  };
5659
6014
  };
5660
6015
  /**
@@ -5670,7 +6025,7 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
5670
6025
  * @param {string} [address] Comma separated list. Address of sender or recipient of any in/out transaction related to the action.
5671
6026
  * @param {string} [txid] ID of any in/out tx related to the action
5672
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.
5673
- * @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)
5674
6029
  * @param {string} [affiliate] Comma separated list. Affiliate address of the action (swap, refund)
5675
6030
  * @param {number} [limit] number of actions returned, default is 50
5676
6031
  * @param {number} [offset] pagination offset, default is 0
@@ -5687,6 +6042,21 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
5687
6042
  getActions(address, txid, asset, type, affiliate, limit, offset, nextPageToken, timestamp, height, prevPageToken, fromTimestamp, fromHeight, options) {
5688
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));
5689
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
+ }
5690
6060
  /**
5691
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.
5692
6062
  * @summary Current balance for an address
@@ -5722,6 +6092,45 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
5722
6092
  getBorrowersAddresses(asset, options) {
5723
6093
  return DefaultApiFp$1(this.configuration).getBorrowersAddresses(asset, options).then((request) => request(this.axios, this.basePath));
5724
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
+ }
5725
6134
  /**
5726
6135
  * Returns block height and timestamp for each churn.
5727
6136
  * @summary Churns List
@@ -5771,6 +6180,18 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
5771
6180
  getHealth(options) {
5772
6181
  return DefaultApiFp$1(this.configuration).getHealth(options).then((request) => request(this.axios, this.basePath));
5773
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
+ }
5774
6195
  /**
5775
6196
  * Returns an object with known pools and their statuses
5776
6197
  * @summary Known Pools List
@@ -5875,6 +6296,20 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
5875
6296
  getPools(status, period, options) {
5876
6297
  return DefaultApiFp$1(this.configuration).getPools(status, period, options).then((request) => request(this.axios, this.basePath));
5877
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
+ }
5878
6313
  /**
5879
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 (\',\')
5880
6315
  * @summary Saver Details
@@ -5973,16 +6408,27 @@ let DefaultApi$1 = class DefaultApi extends BaseAPI$1 {
5973
6408
  getTVLHistory(interval, count, to, from, options) {
5974
6409
  return DefaultApiFp$1(this.configuration).getTVLHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
5975
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
+ }
5976
6422
  };
5977
6423
 
5978
6424
  /* tslint:disable */
5979
6425
  /* eslint-disable */
5980
6426
  /**
5981
6427
  * Midgard Public API
5982
- * 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 MAYAChain protocol, users should query MAYANode directly.
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.
5983
6429
  *
5984
- * The version of the OpenAPI document: 2.10.0
5985
- * Contact: devs@thorchain.org
6430
+ * The version of the OpenAPI document: 2.16.0
6431
+ * Contact: devs@mayaprotocol.com
5986
6432
  *
5987
6433
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
5988
6434
  * https://openapi-generator.tech
@@ -6861,7 +7307,7 @@ class MayachainProtocol {
6861
7307
  expectedAmount: estimatedSwap.expectedAmount,
6862
7308
  dustThreshold: estimatedSwap.dustThreshold,
6863
7309
  fees: estimatedSwap.fees,
6864
- totalSwapSeconds: estimatedSwap.inboundConfirmationSeconds || 0 + estimatedSwap.outboundDelaySeconds,
7310
+ totalSwapSeconds: (estimatedSwap.inboundConfirmationSeconds || 0) + estimatedSwap.outboundDelaySeconds,
6865
7311
  slipBasisPoints: estimatedSwap.slipBasisPoints,
6866
7312
  maxStreamingQuantity: estimatedSwap.maxStreamingQuantity,
6867
7313
  canSwap: estimatedSwap.canSwap,
@@ -6944,7 +7390,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
6944
7390
  * Midgard Public API
6945
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.
6946
7392
  *
6947
- * The version of the OpenAPI document: 2.29.3
7393
+ * The version of the OpenAPI document: 2.34.0
6948
7394
  * Contact: devs@thorchain.org
6949
7395
  *
6950
7396
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6989,7 +7435,7 @@ class RequiredError extends Error {
6989
7435
  * Midgard Public API
6990
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.
6991
7437
  *
6992
- * The version of the OpenAPI document: 2.29.3
7438
+ * The version of the OpenAPI document: 2.34.0
6993
7439
  * Contact: devs@thorchain.org
6994
7440
  *
6995
7441
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -7143,19 +7589,18 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7143
7589
  };
7144
7590
  }),
7145
7591
  /**
7146
- * 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.
7147
- * @summary Current balance for an address
7148
- * @param {string} address Rune address.
7149
- * @param {number} [timestamp] Unix timestamp as seconds since 1970 (if provided, height must not be provided)
7150
- * @param {number} [height] Block height (if provided, timestamp must not be provided)
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
7151
7599
  * @param {*} [options] Override http request option.
7152
7600
  * @throws {RequiredError}
7153
7601
  */
7154
- getBalance: (address_1, timestamp_1, height_1, ...args_1) => __awaiter$1(this, [address_1, timestamp_1, height_1, ...args_1], void 0, function* (address, timestamp, height, options = {}) {
7155
- // verify required parameter 'address' is not null or undefined
7156
- assertParamExists('getBalance', 'address', address);
7157
- const localVarPath = `/v2/balance/{address}`
7158
- .replace(`{${"address"}}`, encodeURIComponent(String(address)));
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`;
7159
7604
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7160
7605
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7161
7606
  let baseOptions;
@@ -7165,11 +7610,20 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7165
7610
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7166
7611
  const localVarHeaderParameter = {};
7167
7612
  const localVarQueryParameter = {};
7168
- if (timestamp !== undefined) {
7169
- localVarQueryParameter['timestamp'] = timestamp;
7613
+ if (thorname !== undefined) {
7614
+ localVarQueryParameter['thorname'] = thorname;
7170
7615
  }
7171
- if (height !== undefined) {
7172
- localVarQueryParameter['height'] = height;
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;
7173
7627
  }
7174
7628
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7175
7629
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -7180,17 +7634,18 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7180
7634
  };
7181
7635
  }),
7182
7636
  /**
7183
- * Returns an array of statistics for all the open loans associated with a given borrower address.
7184
- * @summary Borrower Details
7185
- * @param {string} address Address to match borrower, an asset address is given. Query can also be multiple addresses should be separated by comma (\',\')
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
7186
7644
  * @param {*} [options] Override http request option.
7187
7645
  * @throws {RequiredError}
7188
7646
  */
7189
- getBorrowerDetail: (address_1, ...args_1) => __awaiter$1(this, [address_1, ...args_1], void 0, function* (address, options = {}) {
7190
- // verify required parameter 'address' is not null or undefined
7191
- assertParamExists('getBorrowerDetail', 'address', address);
7192
- const localVarPath = `/v2/borrower/{address}`
7193
- .replace(`{${"address"}}`, encodeURIComponent(String(address)));
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`;
7194
7649
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7195
7650
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7196
7651
  let baseOptions;
@@ -7200,6 +7655,21 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7200
7655
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7201
7656
  const localVarHeaderParameter = {};
7202
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
+ }
7203
7673
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7204
7674
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7205
7675
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -7209,14 +7679,18 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7209
7679
  };
7210
7680
  }),
7211
7681
  /**
7212
- * Returns an array containing the addresses for all borrowers. Addresses are only shown once.
7213
- * @summary Borrowers List
7214
- * @param {string} [asset] Return only borrowers getting loan against this asset as collateral.
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
7215
7689
  * @param {*} [options] Override http request option.
7216
7690
  * @throws {RequiredError}
7217
7691
  */
7218
- getBorrowersAddresses: (asset_1, ...args_1) => __awaiter$1(this, [asset_1, ...args_1], void 0, function* (asset, options = {}) {
7219
- const localVarPath = `/v2/borrowers`;
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`;
7220
7694
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7221
7695
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7222
7696
  let baseOptions;
@@ -7226,8 +7700,20 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7226
7700
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7227
7701
  const localVarHeaderParameter = {};
7228
7702
  const localVarQueryParameter = {};
7229
- if (asset !== undefined) {
7230
- localVarQueryParameter['asset'] = asset;
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;
7231
7717
  }
7232
7718
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7233
7719
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -7238,13 +7724,19 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7238
7724
  };
7239
7725
  }),
7240
7726
  /**
7241
- * Returns block height and timestamp for each churn.
7242
- * @summary Churns List
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.
7728
+ * @summary Current balance for an address
7729
+ * @param {string} address Rune address.
7730
+ * @param {number} [timestamp] Unix timestamp as seconds since 1970 (if provided, height must not be provided)
7731
+ * @param {number} [height] Block height (if provided, timestamp must not be provided)
7243
7732
  * @param {*} [options] Override http request option.
7244
7733
  * @throws {RequiredError}
7245
7734
  */
7246
- getChurns: (...args_1) => __awaiter$1(this, [...args_1], void 0, function* (options = {}) {
7247
- const localVarPath = `/v2/churns`;
7735
+ getBalance: (address_1, timestamp_1, height_1, ...args_1) => __awaiter$1(this, [address_1, timestamp_1, height_1, ...args_1], void 0, function* (address, timestamp, height, options = {}) {
7736
+ // verify required parameter 'address' is not null or undefined
7737
+ assertParamExists('getBalance', 'address', address);
7738
+ const localVarPath = `/v2/balance/{address}`
7739
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
7248
7740
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7249
7741
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7250
7742
  let baseOptions;
@@ -7254,6 +7746,12 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7254
7746
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7255
7747
  const localVarHeaderParameter = {};
7256
7748
  const localVarQueryParameter = {};
7749
+ if (timestamp !== undefined) {
7750
+ localVarQueryParameter['timestamp'] = timestamp;
7751
+ }
7752
+ if (height !== undefined) {
7753
+ localVarQueryParameter['height'] = height;
7754
+ }
7257
7755
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7258
7756
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7259
7757
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -7263,21 +7761,17 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7263
7761
  };
7264
7762
  }),
7265
7763
  /**
7266
- * Returns the asset and rune depths and price. 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
7267
- * @summary Depth and Price History
7268
- * @param {string} pool Return stats for this single pool.
7269
- * @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
7270
- * @param {number} [count] Number of intervals to return. Should be between [1..400].
7271
- * @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
7272
- * @param {number} [from] Start time of the query as unix timestamp
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
7273
7767
  * @param {*} [options] Override http request option.
7274
7768
  * @throws {RequiredError}
7275
7769
  */
7276
- getDepthHistory: (pool_1, interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [pool_1, interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (pool, interval, count, to, from, options = {}) {
7277
- // verify required parameter 'pool' is not null or undefined
7278
- assertParamExists('getDepthHistory', 'pool', pool);
7279
- const localVarPath = `/v2/history/depths/{pool}`
7280
- .replace(`{${"pool"}}`, encodeURIComponent(String(pool)));
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)));
7281
7775
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7282
7776
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7283
7777
  let baseOptions;
@@ -7287,10 +7781,126 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7287
7781
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7288
7782
  const localVarHeaderParameter = {};
7289
7783
  const localVarQueryParameter = {};
7290
- if (interval !== undefined) {
7291
- localVarQueryParameter['interval'] = interval;
7292
- }
7293
- if (count !== undefined) {
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
+ }),
7792
+ /**
7793
+ * Returns an array of statistics for all the open loans associated with a given borrower address.
7794
+ * @summary Borrower Details
7795
+ * @param {string} address Address to match borrower, an asset address is given. Query can also be multiple addresses should be separated by comma (\',\')
7796
+ * @param {*} [options] Override http request option.
7797
+ * @throws {RequiredError}
7798
+ */
7799
+ getBorrowerDetail: (address_1, ...args_1) => __awaiter$1(this, [address_1, ...args_1], void 0, function* (address, options = {}) {
7800
+ // verify required parameter 'address' is not null or undefined
7801
+ assertParamExists('getBorrowerDetail', 'address', address);
7802
+ const localVarPath = `/v2/borrower/{address}`
7803
+ .replace(`{${"address"}}`, encodeURIComponent(String(address)));
7804
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7805
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7806
+ let baseOptions;
7807
+ if (configuration) {
7808
+ baseOptions = configuration.baseOptions;
7809
+ }
7810
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7811
+ const localVarHeaderParameter = {};
7812
+ const localVarQueryParameter = {};
7813
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7814
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7815
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7816
+ return {
7817
+ url: toPathString(localVarUrlObj),
7818
+ options: localVarRequestOptions,
7819
+ };
7820
+ }),
7821
+ /**
7822
+ * Returns an array containing the addresses for all borrowers. Addresses are only shown once.
7823
+ * @summary Borrowers List
7824
+ * @param {string} [asset] Return only borrowers getting loan against this asset as collateral.
7825
+ * @param {*} [options] Override http request option.
7826
+ * @throws {RequiredError}
7827
+ */
7828
+ getBorrowersAddresses: (asset_1, ...args_1) => __awaiter$1(this, [asset_1, ...args_1], void 0, function* (asset, options = {}) {
7829
+ const localVarPath = `/v2/borrowers`;
7830
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7831
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7832
+ let baseOptions;
7833
+ if (configuration) {
7834
+ baseOptions = configuration.baseOptions;
7835
+ }
7836
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7837
+ const localVarHeaderParameter = {};
7838
+ const localVarQueryParameter = {};
7839
+ if (asset !== undefined) {
7840
+ localVarQueryParameter['asset'] = asset;
7841
+ }
7842
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7843
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7844
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7845
+ return {
7846
+ url: toPathString(localVarUrlObj),
7847
+ options: localVarRequestOptions,
7848
+ };
7849
+ }),
7850
+ /**
7851
+ * Returns block height and timestamp for each churn.
7852
+ * @summary Churns List
7853
+ * @param {*} [options] Override http request option.
7854
+ * @throws {RequiredError}
7855
+ */
7856
+ getChurns: (...args_1) => __awaiter$1(this, [...args_1], void 0, function* (options = {}) {
7857
+ const localVarPath = `/v2/churns`;
7858
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7859
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7860
+ let baseOptions;
7861
+ if (configuration) {
7862
+ baseOptions = configuration.baseOptions;
7863
+ }
7864
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7865
+ const localVarHeaderParameter = {};
7866
+ const localVarQueryParameter = {};
7867
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7868
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7869
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7870
+ return {
7871
+ url: toPathString(localVarUrlObj),
7872
+ options: localVarRequestOptions,
7873
+ };
7874
+ }),
7875
+ /**
7876
+ * Returns the asset and rune depths and price. 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
7877
+ * @summary Depth and Price History
7878
+ * @param {string} pool Return stats for this single pool.
7879
+ * @param {'5min' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'} [interval] Interval of calculations
7880
+ * @param {number} [count] Number of intervals to return. Should be between [1..400].
7881
+ * @param {number} [to] End time of the query as unix timestamp. If only count is given, defaults to now.
7882
+ * @param {number} [from] Start time of the query as unix timestamp
7883
+ * @param {*} [options] Override http request option.
7884
+ * @throws {RequiredError}
7885
+ */
7886
+ getDepthHistory: (pool_1, interval_1, count_1, to_1, from_1, ...args_1) => __awaiter$1(this, [pool_1, interval_1, count_1, to_1, from_1, ...args_1], void 0, function* (pool, interval, count, to, from, options = {}) {
7887
+ // verify required parameter 'pool' is not null or undefined
7888
+ assertParamExists('getDepthHistory', 'pool', pool);
7889
+ const localVarPath = `/v2/history/depths/{pool}`
7890
+ .replace(`{${"pool"}}`, encodeURIComponent(String(pool)));
7891
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7892
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7893
+ let baseOptions;
7894
+ if (configuration) {
7895
+ baseOptions = configuration.baseOptions;
7896
+ }
7897
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7898
+ const localVarHeaderParameter = {};
7899
+ const localVarQueryParameter = {};
7900
+ if (interval !== undefined) {
7901
+ localVarQueryParameter['interval'] = interval;
7902
+ }
7903
+ if (count !== undefined) {
7294
7904
  localVarQueryParameter['count'] = count;
7295
7905
  }
7296
7906
  if (to !== undefined) {
@@ -7373,6 +7983,39 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7373
7983
  options: localVarRequestOptions,
7374
7984
  };
7375
7985
  }),
7986
+ /**
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.
7991
+ * @param {*} [options] Override http request option.
7992
+ * @throws {RequiredError}
7993
+ */
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`;
7996
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7997
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7998
+ let baseOptions;
7999
+ if (configuration) {
8000
+ baseOptions = configuration.baseOptions;
8001
+ }
8002
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
8003
+ const localVarHeaderParameter = {};
8004
+ const localVarQueryParameter = {};
8005
+ if (asset !== undefined) {
8006
+ localVarQueryParameter['asset'] = asset;
8007
+ }
8008
+ if (limit !== undefined) {
8009
+ localVarQueryParameter['limit'] = limit;
8010
+ }
8011
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8012
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8013
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8014
+ return {
8015
+ url: toPathString(localVarUrlObj),
8016
+ options: localVarRequestOptions,
8017
+ };
8018
+ }),
7376
8019
  /**
7377
8020
  * Returns an object with known pools and their statuses
7378
8021
  * @summary Known Pools List
@@ -7735,7 +8378,48 @@ const DefaultApiAxiosParamCreator = function (configuration) {
7735
8378
  * @throws {RequiredError}
7736
8379
  */
7737
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 = {}) {
7738
- 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`;
7739
8423
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7740
8424
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7741
8425
  let baseOptions;
@@ -8037,6 +8721,68 @@ const DefaultApiAxiosParamCreator = function (configuration) {
8037
8721
  options: localVarRequestOptions,
8038
8722
  };
8039
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
+ }),
8040
8786
  };
8041
8787
  };
8042
8788
  /**
@@ -8072,6 +8818,57 @@ const DefaultApiFp = function (configuration) {
8072
8818
  return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
8073
8819
  });
8074
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
+ },
8075
8872
  /**
8076
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.
8077
8874
  * @summary Current balance for an address
@@ -8087,6 +8884,19 @@ const DefaultApiFp = function (configuration) {
8087
8884
  return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
8088
8885
  });
8089
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
+ },
8090
8900
  /**
8091
8901
  * Returns an array of statistics for all the open loans associated with a given borrower address.
8092
8902
  * @summary Borrower Details
@@ -8170,6 +8980,20 @@ const DefaultApiFp = function (configuration) {
8170
8980
  return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
8171
8981
  });
8172
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
+ },
8173
8997
  /**
8174
8998
  * Returns an object with known pools and their statuses
8175
8999
  * @summary Known Pools List
@@ -8337,6 +9161,22 @@ const DefaultApiFp = function (configuration) {
8337
9161
  return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
8338
9162
  });
8339
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
+ },
8340
9180
  /**
8341
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 (\',\')
8342
9182
  * @summary Saver Details
@@ -8451,6 +9291,33 @@ const DefaultApiFp = function (configuration) {
8451
9291
  return createRequestFunction(localVarAxiosArgs, axios, BASE_PATH, configuration);
8452
9292
  });
8453
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
+ },
8454
9321
  };
8455
9322
  };
8456
9323
  /**
@@ -8484,6 +9351,51 @@ class DefaultApi extends BaseAPI {
8484
9351
  getActions(address, txid, asset, type, txType, affiliate, limit, offset, nextPageToken, timestamp, height, prevPageToken, fromTimestamp, fromHeight, options) {
8485
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));
8486
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
+ }
8487
9399
  /**
8488
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.
8489
9401
  * @summary Current balance for an address
@@ -8497,6 +9409,17 @@ class DefaultApi extends BaseAPI {
8497
9409
  getBalance(address, timestamp, height, options) {
8498
9410
  return DefaultApiFp(this.configuration).getBalance(address, timestamp, height, options).then((request) => request(this.axios, this.basePath));
8499
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
+ }
8500
9423
  /**
8501
9424
  * Returns an array of statistics for all the open loans associated with a given borrower address.
8502
9425
  * @summary Borrower Details
@@ -8568,6 +9491,18 @@ class DefaultApi extends BaseAPI {
8568
9491
  getHealth(options) {
8569
9492
  return DefaultApiFp(this.configuration).getHealth(options).then((request) => request(this.axios, this.basePath));
8570
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
+ }
8571
9506
  /**
8572
9507
  * Returns an object with known pools and their statuses
8573
9508
  * @summary Known Pools List
@@ -8711,6 +9646,20 @@ class DefaultApi extends BaseAPI {
8711
9646
  getReserveHistory(interval, count, to, from, options) {
8712
9647
  return DefaultApiFp(this.configuration).getReserveHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
8713
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
+ }
8714
9663
  /**
8715
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 (\',\')
8716
9665
  * @summary Saver Details
@@ -8809,6 +9758,29 @@ class DefaultApi extends BaseAPI {
8809
9758
  getTVLHistory(interval, count, to, from, options) {
8810
9759
  return DefaultApiFp(this.configuration).getTVLHistory(interval, count, to, from, options).then((request) => request(this.axios, this.basePath));
8811
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
+ }
8812
9784
  }
8813
9785
 
8814
9786
  /* tslint:disable */
@@ -8817,7 +9789,7 @@ class DefaultApi extends BaseAPI {
8817
9789
  * Midgard Public API
8818
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.
8819
9791
  *
8820
- * The version of the OpenAPI document: 2.29.3
9792
+ * The version of the OpenAPI document: 2.34.0
8821
9793
  * Contact: devs@thorchain.org
8822
9794
  *
8823
9795
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -9703,7 +10675,7 @@ class ThorchainProtocol {
9703
10675
  expectedAmount: estimatedSwap.txEstimate.netOutput,
9704
10676
  dustThreshold: estimatedSwap.dustThreshold,
9705
10677
  fees: estimatedSwap.txEstimate.totalFees,
9706
- totalSwapSeconds: estimatedSwap.txEstimate.inboundConfirmationSeconds || 0 + estimatedSwap.txEstimate.outboundDelaySeconds,
10678
+ totalSwapSeconds: (estimatedSwap.txEstimate.inboundConfirmationSeconds || 0) + estimatedSwap.txEstimate.outboundDelaySeconds,
9707
10679
  slipBasisPoints: estimatedSwap.txEstimate.slipBasisPoints,
9708
10680
  maxStreamingQuantity: estimatedSwap.txEstimate.maxStreamingQuantity,
9709
10681
  canSwap: estimatedSwap.txEstimate.canSwap,
@@ -9830,7 +10802,7 @@ class Aggregator {
9830
10802
  successfulQuotes.push(result.value);
9831
10803
  }
9832
10804
  });
9833
- if (!successfulQuotes)
10805
+ if (successfulQuotes.length === 0)
9834
10806
  throw Error(`Can not estimate swap from ${assetToString(params.fromAsset)} to ${assetToString(params.destinationAsset)}`);
9835
10807
  return successfulQuotes;
9836
10808
  });