@covalenthq/client-sdk 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/cjs/index.js +285 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/CovalentClient.d.ts +2 -2
- package/dist/cjs/services/TransactionService.d.ts +45 -0
- package/dist/cjs/services/XykService.d.ts +51 -10
- package/dist/cjs/util/Chains.d.ts +19 -1
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/cjs/util/types/XykServiceTypes.d.ts +51 -10
- package/dist/es/index.js +285 -13
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/CovalentClient.d.ts +2 -2
- package/dist/es/services/TransactionService.d.ts +45 -0
- package/dist/es/services/XykService.d.ts +51 -10
- package/dist/es/util/Chains.d.ts +19 -1
- package/dist/es/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/es/util/types/XykServiceTypes.d.ts +51 -10
- package/dist/esm/index.js +285 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/CovalentClient.d.ts +2 -2
- package/dist/esm/services/TransactionService.d.ts +45 -0
- package/dist/esm/services/XykService.d.ts +51 -10
- package/dist/esm/util/Chains.d.ts +19 -1
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/esm/util/types/XykServiceTypes.d.ts +51 -10
- package/dist/services/CovalentClient.d.ts +2 -2
- package/dist/services/CovalentClient.js +1 -1
- package/dist/services/TransactionService.d.ts +45 -0
- package/dist/services/TransactionService.js +236 -2
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +51 -10
- package/dist/services/XykService.js +30 -10
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/Chains.d.ts +19 -1
- package/dist/util/Chains.js +18 -0
- package/dist/util/Chains.js.map +1 -1
- package/dist/util/types/TransactionServiceTypes.d.ts +18 -0
- package/dist/util/types/XykServiceTypes.d.ts +51 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -181,8 +181,9 @@ The `TransactionService` class refers to the [transactions API endpoints](https:
|
|
|
181
181
|
- `getTransaction()`: Fetch and render a single transaction including its decoded log events. Additionally return semantically decoded information for DEX trades, lending and NFT sales.
|
|
182
182
|
- `getTransactionsForBlock()`: Fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
|
|
183
183
|
- `getTransactionSummary()`: Fetch the earliest and latest transactions, and the transaction count for a wallet. Calculate the age of the wallet and the time it has been idle and quickly gain insights into their engagement with web3.
|
|
184
|
+
- `getTimeBucketTransactionsForAddress()`: Fetch all transactions including their decoded log events in a 15-minute time bucket interval.
|
|
184
185
|
|
|
185
|
-
The functions `getAllTransactionsForAddressByPage()` and `
|
|
186
|
+
The functions `getAllTransactionsForAddressByPage()`, `getTransactionsForAddressV3()`, and `getTimeBucketTransactionsForAddress()` have been enhanced with the introduction of `next()` and `prev()` support functions. These functions facilitate a smoother transition for developers navigating through our links object, which includes `prev` and `next` fields. Instead of requiring developers to manually extract values from these fields and create JavaScript API fetch calls for the URL values, the new `next()` and `prev()` functions provide a streamlined approach, allowing developers to simulate this behavior more efficiently.
|
|
186
187
|
|
|
187
188
|
```ts
|
|
188
189
|
import { CovalentClient } from "@covalenthq/client-sdk";
|
package/dist/cjs/index.js
CHANGED
|
@@ -4789,6 +4789,155 @@ class TransactionsResponse {
|
|
|
4789
4789
|
}
|
|
4790
4790
|
}
|
|
4791
4791
|
}
|
|
4792
|
+
class TransactionsTimeBucketResponse {
|
|
4793
|
+
constructor(data, _debug, _apiKey, _threadCount, _urlParams) {
|
|
4794
|
+
this._debug = _debug;
|
|
4795
|
+
this._apiKey = _apiKey;
|
|
4796
|
+
this._threadCount = _threadCount;
|
|
4797
|
+
this._urlParams = _urlParams;
|
|
4798
|
+
this.address = data.address;
|
|
4799
|
+
this.updated_at = data.updated_at && data.updated_at !== null ? dateFns.parseISO(data.updated_at.toString()) : null;
|
|
4800
|
+
this.quote_currency = data.quote_currency;
|
|
4801
|
+
this.chain_id = data.chain_id;
|
|
4802
|
+
this.chain_name = data.chain_name;
|
|
4803
|
+
this.complete = data.complete;
|
|
4804
|
+
this.current_bucket = data.current_bucket;
|
|
4805
|
+
this.links = data.links && data.links !== null ? new PaginationLinks(data.links) : null;
|
|
4806
|
+
this.items = data.items && data.items !== null ? data.items.map((itemData) => new Transaction(itemData)) : null;
|
|
4807
|
+
}
|
|
4808
|
+
async prev() {
|
|
4809
|
+
let success = false;
|
|
4810
|
+
let data;
|
|
4811
|
+
let response;
|
|
4812
|
+
const backoff = new ExponentialBackoff(this._apiKey, this._debug);
|
|
4813
|
+
const LIMIT = pLimit$1(this._threadCount);
|
|
4814
|
+
while (!success) {
|
|
4815
|
+
try {
|
|
4816
|
+
let startTime;
|
|
4817
|
+
if (this._debug) {
|
|
4818
|
+
startTime = typeof performance !== 'undefined' ? performance.now() : process.hrtime();
|
|
4819
|
+
}
|
|
4820
|
+
if (this.links.prev === null) {
|
|
4821
|
+
success = true;
|
|
4822
|
+
return {
|
|
4823
|
+
data: null,
|
|
4824
|
+
error: true,
|
|
4825
|
+
error_code: 400,
|
|
4826
|
+
error_message: "Invalid URL: URL link cannot be null"
|
|
4827
|
+
};
|
|
4828
|
+
}
|
|
4829
|
+
response = await LIMIT(() => fetch(`${this.links.prev}?${this._urlParams}`, {
|
|
4830
|
+
headers: {
|
|
4831
|
+
"Authorization": `Bearer ${this._apiKey}`,
|
|
4832
|
+
"X-Requested-With": userAgent
|
|
4833
|
+
}
|
|
4834
|
+
}));
|
|
4835
|
+
debugOutput(response.url, response.status ?? 429, startTime);
|
|
4836
|
+
if (response.status === null || response.status === 429) {
|
|
4837
|
+
try {
|
|
4838
|
+
data = await LIMIT(() => backoff.backOff(response.url));
|
|
4839
|
+
}
|
|
4840
|
+
catch (error) {
|
|
4841
|
+
success = true;
|
|
4842
|
+
return {
|
|
4843
|
+
data: null,
|
|
4844
|
+
error: true,
|
|
4845
|
+
error_code: response.status ?? 429,
|
|
4846
|
+
error_message: error.message
|
|
4847
|
+
};
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4850
|
+
else {
|
|
4851
|
+
data = await response.json();
|
|
4852
|
+
}
|
|
4853
|
+
const dataClass = new TransactionsTimeBucketResponse(data.data, this._debug, this._apiKey, this._threadCount, this._urlParams);
|
|
4854
|
+
checkAndModifyResponse(dataClass);
|
|
4855
|
+
success = true;
|
|
4856
|
+
return {
|
|
4857
|
+
data: dataClass,
|
|
4858
|
+
error: data.error,
|
|
4859
|
+
error_code: data ? data.error_code : response.status,
|
|
4860
|
+
error_message: data ? data.error_message : response.status === 500 ? "Internal server error" : "401 Authorization Required"
|
|
4861
|
+
};
|
|
4862
|
+
}
|
|
4863
|
+
catch (error) {
|
|
4864
|
+
success = true;
|
|
4865
|
+
return {
|
|
4866
|
+
data: null,
|
|
4867
|
+
error: true,
|
|
4868
|
+
error_code: data ? data.error_code : response.status,
|
|
4869
|
+
error_message: data ? data.error_message : response.status === 500 ? "Internal server error" : "401 Authorization Required"
|
|
4870
|
+
};
|
|
4871
|
+
}
|
|
4872
|
+
}
|
|
4873
|
+
}
|
|
4874
|
+
async next() {
|
|
4875
|
+
let success = false;
|
|
4876
|
+
let data;
|
|
4877
|
+
let response;
|
|
4878
|
+
const backoff = new ExponentialBackoff(this._apiKey, this._debug);
|
|
4879
|
+
const LIMIT = pLimit$1(this._threadCount);
|
|
4880
|
+
while (!success) {
|
|
4881
|
+
try {
|
|
4882
|
+
let startTime;
|
|
4883
|
+
if (this._debug) {
|
|
4884
|
+
startTime = typeof performance !== 'undefined' ? performance.now() : process.hrtime();
|
|
4885
|
+
}
|
|
4886
|
+
if (this.links.next === null) {
|
|
4887
|
+
success = true;
|
|
4888
|
+
return {
|
|
4889
|
+
data: null,
|
|
4890
|
+
error: true,
|
|
4891
|
+
error_code: 400,
|
|
4892
|
+
error_message: "Invalid URL: URL link cannot be null"
|
|
4893
|
+
};
|
|
4894
|
+
}
|
|
4895
|
+
response = await LIMIT(() => fetch(`${this.links.next}?${this._urlParams}`, {
|
|
4896
|
+
headers: {
|
|
4897
|
+
"Authorization": `Bearer ${this._apiKey}`,
|
|
4898
|
+
"X-Requested-With": userAgent
|
|
4899
|
+
}
|
|
4900
|
+
}));
|
|
4901
|
+
debugOutput(response.url, response.status ?? 429, startTime);
|
|
4902
|
+
if (response.status === null || response.status === 429) {
|
|
4903
|
+
try {
|
|
4904
|
+
data = await LIMIT(() => backoff.backOff(response.url));
|
|
4905
|
+
}
|
|
4906
|
+
catch (error) {
|
|
4907
|
+
success = true;
|
|
4908
|
+
return {
|
|
4909
|
+
data: null,
|
|
4910
|
+
error: true,
|
|
4911
|
+
error_code: response.status ?? 429,
|
|
4912
|
+
error_message: error.message
|
|
4913
|
+
};
|
|
4914
|
+
}
|
|
4915
|
+
}
|
|
4916
|
+
else {
|
|
4917
|
+
data = await response.json();
|
|
4918
|
+
}
|
|
4919
|
+
const dataClass = new TransactionsTimeBucketResponse(data.data, this._debug, this._apiKey, this._threadCount, this._urlParams);
|
|
4920
|
+
checkAndModifyResponse(dataClass);
|
|
4921
|
+
success = true;
|
|
4922
|
+
return {
|
|
4923
|
+
data: dataClass,
|
|
4924
|
+
error: data.error,
|
|
4925
|
+
error_code: data ? data.error_code : response.status,
|
|
4926
|
+
error_message: data ? data.error_message : response.status === 500 ? "Internal server error" : "401 Authorization Required"
|
|
4927
|
+
};
|
|
4928
|
+
}
|
|
4929
|
+
catch (error) {
|
|
4930
|
+
success = true;
|
|
4931
|
+
return {
|
|
4932
|
+
data: null,
|
|
4933
|
+
error: true,
|
|
4934
|
+
error_code: data ? data.error_code : response.status,
|
|
4935
|
+
error_message: data ? data.error_message : response.status === 500 ? "Internal server error" : "401 Authorization Required"
|
|
4936
|
+
};
|
|
4937
|
+
}
|
|
4938
|
+
}
|
|
4939
|
+
}
|
|
4940
|
+
}
|
|
4792
4941
|
/**
|
|
4793
4942
|
* Transactions APIs
|
|
4794
4943
|
*
|
|
@@ -5293,12 +5442,12 @@ class TransactionService {
|
|
|
5293
5442
|
if (this.debug) {
|
|
5294
5443
|
startTime = typeof performance !== 'undefined' ? performance.now() : process.hrtime();
|
|
5295
5444
|
}
|
|
5296
|
-
response = await fetch(`https://api.covalenthq.com/v1/${chainName}/address/${walletAddress}/transactions_v3/page/${page}/?${urlParams}`, {
|
|
5445
|
+
response = await this.LIMIT(() => fetch(`https://api.covalenthq.com/v1/${chainName}/address/${walletAddress}/transactions_v3/page/${page}/?${urlParams}`, {
|
|
5297
5446
|
headers: {
|
|
5298
5447
|
"Authorization": `Bearer ${this.apiKey}`,
|
|
5299
5448
|
"X-Requested-With": userAgent
|
|
5300
5449
|
}
|
|
5301
|
-
});
|
|
5450
|
+
}));
|
|
5302
5451
|
debugOutput(response.url, response.status ?? 429, startTime);
|
|
5303
5452
|
if (response.status === null || response.status === 429) {
|
|
5304
5453
|
try {
|
|
@@ -5338,6 +5487,91 @@ class TransactionService {
|
|
|
5338
5487
|
}
|
|
5339
5488
|
}
|
|
5340
5489
|
}
|
|
5490
|
+
/**
|
|
5491
|
+
*
|
|
5492
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
5493
|
+
* @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
5494
|
+
* @param {number} timeBucket - The 0-indexed 15-minute time bucket. E.g. 27 Feb 2023 05:23 GMT = 1677475383 (Unix time). 1677475383/900=1863861 timeBucket.
|
|
5495
|
+
* @param {GetTimeBucketTransactionsForAddressQueryParamOpts} queryParamOpts
|
|
5496
|
+
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
5497
|
+
* - `noLogs`: Omit log events.
|
|
5498
|
+
* - `withSafe`: Include safe details.
|
|
5499
|
+
*
|
|
5500
|
+
*/
|
|
5501
|
+
async getTimeBucketTransactionsForAddress(chainName, walletAddress, timeBucket, queryParamOpts) {
|
|
5502
|
+
let success = false;
|
|
5503
|
+
let data;
|
|
5504
|
+
let response;
|
|
5505
|
+
const backoff = new ExponentialBackoff(this.apiKey, this.debug);
|
|
5506
|
+
while (!success) {
|
|
5507
|
+
try {
|
|
5508
|
+
const urlParams = new URLSearchParams();
|
|
5509
|
+
if (!this.is_key_valid) {
|
|
5510
|
+
return {
|
|
5511
|
+
data: null,
|
|
5512
|
+
error: true,
|
|
5513
|
+
error_code: 401,
|
|
5514
|
+
error_message: ApiKeyValidator.INVALID_API_KEY_MESSAGE
|
|
5515
|
+
};
|
|
5516
|
+
}
|
|
5517
|
+
if (queryParamOpts?.quoteCurrency !== undefined) {
|
|
5518
|
+
urlParams.append("quote-currency", queryParamOpts?.quoteCurrency.toString());
|
|
5519
|
+
}
|
|
5520
|
+
if (queryParamOpts?.noLogs !== undefined) {
|
|
5521
|
+
urlParams.append("no-logs", queryParamOpts?.noLogs.toString());
|
|
5522
|
+
}
|
|
5523
|
+
if (queryParamOpts?.withSafe !== undefined) {
|
|
5524
|
+
urlParams.append("with-safe", queryParamOpts?.withSafe.toString());
|
|
5525
|
+
}
|
|
5526
|
+
let startTime;
|
|
5527
|
+
if (this.debug) {
|
|
5528
|
+
startTime = typeof performance !== 'undefined' ? performance.now() : process.hrtime();
|
|
5529
|
+
}
|
|
5530
|
+
response = await this.LIMIT(() => fetch(`https://api.covalenthq.com/v1/${chainName}/bulk/transactions/${walletAddress}/${timeBucket}/?${urlParams}`, {
|
|
5531
|
+
headers: {
|
|
5532
|
+
"Authorization": `Bearer ${this.apiKey}`,
|
|
5533
|
+
"X-Requested-With": userAgent
|
|
5534
|
+
}
|
|
5535
|
+
}));
|
|
5536
|
+
debugOutput(response.url, response.status ?? 429, startTime);
|
|
5537
|
+
if (response.status === null || response.status === 429) {
|
|
5538
|
+
try {
|
|
5539
|
+
data = await this.LIMIT(() => backoff.backOff(response.url));
|
|
5540
|
+
}
|
|
5541
|
+
catch (error) {
|
|
5542
|
+
success = true;
|
|
5543
|
+
return {
|
|
5544
|
+
data: null,
|
|
5545
|
+
error: true,
|
|
5546
|
+
error_code: response.status ?? 429,
|
|
5547
|
+
error_message: error.message
|
|
5548
|
+
};
|
|
5549
|
+
}
|
|
5550
|
+
}
|
|
5551
|
+
else {
|
|
5552
|
+
data = await response.json();
|
|
5553
|
+
}
|
|
5554
|
+
const dataClass = new TransactionsTimeBucketResponse(data.data, this.debug, this.apiKey, this.threadCount, urlParams);
|
|
5555
|
+
checkAndModifyResponse(dataClass);
|
|
5556
|
+
success = true;
|
|
5557
|
+
return {
|
|
5558
|
+
data: dataClass,
|
|
5559
|
+
error: data.error,
|
|
5560
|
+
error_code: data ? data.error_code : response.status,
|
|
5561
|
+
error_message: data ? data.error_message : response.status === 500 ? "Internal server error" : "401 Authorization Required"
|
|
5562
|
+
};
|
|
5563
|
+
}
|
|
5564
|
+
catch (error) {
|
|
5565
|
+
success = true;
|
|
5566
|
+
return {
|
|
5567
|
+
data: null,
|
|
5568
|
+
error: true,
|
|
5569
|
+
error_code: data ? data.error_code : response.status,
|
|
5570
|
+
error_message: data ? data.error_message : response.status === 500 ? "Internal server error" : "401 Authorization Required"
|
|
5571
|
+
};
|
|
5572
|
+
}
|
|
5573
|
+
}
|
|
5574
|
+
}
|
|
5341
5575
|
}
|
|
5342
5576
|
|
|
5343
5577
|
class PoolResponse {
|
|
@@ -5358,6 +5592,10 @@ class Pool {
|
|
|
5358
5592
|
this.fee_24h_quote = data.fee_24h_quote;
|
|
5359
5593
|
this.total_supply = data.total_supply && data.total_supply !== null ? BigInt(data.total_supply) : null;
|
|
5360
5594
|
this.quote_rate = data.quote_rate;
|
|
5595
|
+
this.pretty_total_liquidity_quote = data.pretty_total_liquidity_quote;
|
|
5596
|
+
this.pretty_volume_24h_quote = data.pretty_volume_24h_quote;
|
|
5597
|
+
this.pretty_fee_24h_quote = data.pretty_fee_24h_quote;
|
|
5598
|
+
this.pretty_volume_7d_quote = data.pretty_volume_7d_quote;
|
|
5361
5599
|
this.chain_name = data.chain_name;
|
|
5362
5600
|
this.chain_id = data.chain_id;
|
|
5363
5601
|
this.dex_name = data.dex_name;
|
|
@@ -5404,6 +5642,8 @@ class SupportedDex {
|
|
|
5404
5642
|
this.chain_id = data.chain_id;
|
|
5405
5643
|
this.chain_name = data.chain_name;
|
|
5406
5644
|
this.dex_name = data.dex_name;
|
|
5645
|
+
this.display_name = data.display_name;
|
|
5646
|
+
this.logo_url = data.logo_url;
|
|
5407
5647
|
this.factory_contract_address = data.factory_contract_address;
|
|
5408
5648
|
this.router_contract_addresses = data.router_contract_addresses;
|
|
5409
5649
|
this.swap_fee = data.swap_fee;
|
|
@@ -5437,6 +5677,10 @@ class PoolWithTimeseries {
|
|
|
5437
5677
|
this.dex_name = data.dex_name;
|
|
5438
5678
|
this.volume_7d_quote = data.volume_7d_quote;
|
|
5439
5679
|
this.annualized_fee = data.annualized_fee;
|
|
5680
|
+
this.pretty_total_liquidity_quote = data.pretty_total_liquidity_quote;
|
|
5681
|
+
this.pretty_volume_24h_quote = data.pretty_volume_24h_quote;
|
|
5682
|
+
this.pretty_fee_24h_quote = data.pretty_fee_24h_quote;
|
|
5683
|
+
this.pretty_volume_7d_quote = data.pretty_volume_7d_quote;
|
|
5440
5684
|
this.token_0_reserve_quote = data.token_0_reserve_quote;
|
|
5441
5685
|
this.token_1_reserve_quote = data.token_1_reserve_quote;
|
|
5442
5686
|
this.token_0 = data.token_0 && data.token_0 !== null ? new Token(data.token_0) : null;
|
|
@@ -5455,11 +5699,12 @@ class VolumeTimeseries {
|
|
|
5455
5699
|
this.chain_id = data.chain_id;
|
|
5456
5700
|
this.dt = data.dt;
|
|
5457
5701
|
this.exchange = data.exchange;
|
|
5458
|
-
this.
|
|
5459
|
-
this.
|
|
5460
|
-
this.
|
|
5461
|
-
this.
|
|
5702
|
+
this.sum_amount0in = data.sum_amount0in;
|
|
5703
|
+
this.sum_amount0out = data.sum_amount0out;
|
|
5704
|
+
this.sum_amount1in = data.sum_amount1in;
|
|
5705
|
+
this.sum_amount1out = data.sum_amount1out;
|
|
5462
5706
|
this.volume_quote = data.volume_quote;
|
|
5707
|
+
this.pretty_volume_quote = data.pretty_volume_quote;
|
|
5463
5708
|
this.token_0_quote_rate = data.token_0_quote_rate;
|
|
5464
5709
|
this.token_1_quote_rate = data.token_1_quote_rate;
|
|
5465
5710
|
this.swap_count_24 = data.swap_count_24;
|
|
@@ -5474,6 +5719,7 @@ class LiquidityTimeseries {
|
|
|
5474
5719
|
this.r0_c = data.r0_c;
|
|
5475
5720
|
this.r1_c = data.r1_c;
|
|
5476
5721
|
this.liquidity_quote = data.liquidity_quote;
|
|
5722
|
+
this.pretty_liquidity_quote = data.pretty_liquidity_quote;
|
|
5477
5723
|
this.token_0_quote_rate = data.token_0_quote_rate;
|
|
5478
5724
|
this.token_1_quote_rate = data.token_1_quote_rate;
|
|
5479
5725
|
}
|
|
@@ -5484,13 +5730,15 @@ class PriceTimeseries {
|
|
|
5484
5730
|
this.chain_id = data.chain_id;
|
|
5485
5731
|
this.dt = data.dt;
|
|
5486
5732
|
this.exchange = data.exchange;
|
|
5487
|
-
this.
|
|
5488
|
-
this.
|
|
5489
|
-
this.
|
|
5490
|
-
this.
|
|
5733
|
+
this.price_of_token0_in_token1 = data.price_of_token0_in_token1;
|
|
5734
|
+
this.pretty_price_of_token0_in_token1 = data.pretty_price_of_token0_in_token1;
|
|
5735
|
+
this.price_of_token0_in_token1_description = data.price_of_token0_in_token1_description;
|
|
5736
|
+
this.price_of_token1_in_token0 = data.price_of_token1_in_token0;
|
|
5737
|
+
this.pretty_price_of_token1_in_token0 = data.pretty_price_of_token1_in_token0;
|
|
5738
|
+
this.price_of_token1_in_token0_description = data.price_of_token1_in_token0_description;
|
|
5491
5739
|
this.quote_currency = data.quote_currency;
|
|
5492
|
-
this.
|
|
5493
|
-
this.
|
|
5740
|
+
this.price_of_token0_in_quote_currency = data.price_of_token0_in_quote_currency;
|
|
5741
|
+
this.price_of_token1_in_quote_currency = data.price_of_token1_in_quote_currency;
|
|
5494
5742
|
}
|
|
5495
5743
|
}
|
|
5496
5744
|
class PoolsDexDataResponse {
|
|
@@ -5595,6 +5843,11 @@ class TokenV2Volume {
|
|
|
5595
5843
|
this.contract_decimals = data.contract_decimals;
|
|
5596
5844
|
this.swap_count_24h = data.swap_count_24h;
|
|
5597
5845
|
this.quote_rate = data.quote_rate;
|
|
5846
|
+
this.quote_rate_24h = data.quote_rate_24h;
|
|
5847
|
+
this.pretty_quote_rate = data.pretty_quote_rate;
|
|
5848
|
+
this.pretty_quote_rate_24h = data.pretty_quote_rate_24h;
|
|
5849
|
+
this.pretty_total_liquidity_quote = data.pretty_total_liquidity_quote;
|
|
5850
|
+
this.pretty_total_volume_24h_quote = data.pretty_total_volume_24h_quote;
|
|
5598
5851
|
this.total_liquidity_quote = data.total_liquidity_quote;
|
|
5599
5852
|
this.total_volume_24h_quote = data.total_volume_24h_quote;
|
|
5600
5853
|
}
|
|
@@ -5639,6 +5892,7 @@ class ExchangeTransaction {
|
|
|
5639
5892
|
this.from_address = data.from_address;
|
|
5640
5893
|
this.sender_address = data.sender_address;
|
|
5641
5894
|
this.total_quote = data.total_quote;
|
|
5895
|
+
this.pretty_total_quote = data.pretty_total_quote;
|
|
5642
5896
|
this.token_0_quote_rate = data.token_0_quote_rate;
|
|
5643
5897
|
this.token_1_quote_rate = data.token_1_quote_rate;
|
|
5644
5898
|
this.token_0 = data.token_0 && data.token_0 !== null ? new PoolToken(data.token_0) : null;
|
|
@@ -6795,7 +7049,7 @@ class XykService {
|
|
|
6795
7049
|
}
|
|
6796
7050
|
}
|
|
6797
7051
|
|
|
6798
|
-
const userAgent = "com.covalenthq.sdk.typescript/0.7.
|
|
7052
|
+
const userAgent = "com.covalenthq.sdk.typescript/0.7.4";
|
|
6799
7053
|
/**
|
|
6800
7054
|
* CovalentClient Class
|
|
6801
7055
|
*/
|
|
@@ -7111,6 +7365,24 @@ exports.Chains = void 0;
|
|
|
7111
7365
|
Chains["BNB_OPBNB_MAINNET"] = "bnb-opbnb-mainnet";
|
|
7112
7366
|
Chains["TELOS_MAINNET"] = "telos-mainnet";
|
|
7113
7367
|
Chains["TELOS_TESTNET"] = "telos-testnet";
|
|
7368
|
+
Chains["AVALANCHE_HUBBLE_EXCHANGE_TESTNET"] = "avalanche-hubble-exchange-testnet";
|
|
7369
|
+
Chains["AVALANCHE_MIHO_TESTNET"] = "avalanche-miho-testnet";
|
|
7370
|
+
Chains["AVALANCHE_BULLETIN_TESTNET"] = "avalanche-bulletin-testnet";
|
|
7371
|
+
Chains["AVALANCHE_KIWI_TESTNET"] = "avalanche-kiwi-testnet";
|
|
7372
|
+
Chains["AVALANCHE_HERO_TESTNET"] = "avalanche-hero-testnet";
|
|
7373
|
+
Chains["AVALANCHE_AVACLOUD_TESTNET"] = "avalanche-avacloud-testnet";
|
|
7374
|
+
Chains["AVALANCHE_THIRDWEB_TESTNET"] = "avalanche-thirdweb-testnet";
|
|
7375
|
+
Chains["AVALANCHE_MONDRIAN_TESTNET"] = "avalanche-mondrian-testnet";
|
|
7376
|
+
Chains["AVALANCHE_CONDUIT_TESTNET"] = "avalanche-conduit-testnet";
|
|
7377
|
+
Chains["AVALANCHE_NMAC_TESTNET"] = "avalanche-nmac-testnet";
|
|
7378
|
+
Chains["AVALANCHE_ORDERLY_TESTNET"] = "avalanche-orderly-testnet";
|
|
7379
|
+
Chains["AVALANCHE_AMPLIFY_TESTNET"] = "avalanche-amplify-testnet";
|
|
7380
|
+
Chains["AVALANCHE_MIRAI_TESTNET"] = "avalanche-mirai-testnet";
|
|
7381
|
+
Chains["AVALANCHE_WAGMI_TESTNET"] = "avalanche-wagmi-testnet";
|
|
7382
|
+
Chains["AVALANCHE_PLAYA3ULL_TESTNET"] = "avalanche-playa3ull-testnet";
|
|
7383
|
+
Chains["AVALANCHE_BEAM_MAINNET"] = "avalanche-beam-mainnet";
|
|
7384
|
+
Chains["SCROLL_MAINNET"] = "scroll-mainnet";
|
|
7385
|
+
Chains["ETH_HOLESKY"] = "eth-holesky";
|
|
7114
7386
|
})(exports.Chains || (exports.Chains = {}));
|
|
7115
7387
|
|
|
7116
7388
|
exports.Client = Client;
|