@covalenthq/client-sdk 0.7.4 → 0.7.6

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 (66) hide show
  1. package/README.md +20 -0
  2. package/dist/cjs/index.js +461 -362
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/services/BalanceService.d.ts +2 -1
  5. package/dist/cjs/services/BaseService.d.ts +2 -1
  6. package/dist/cjs/services/CovalentClient.d.ts +4 -2
  7. package/dist/cjs/services/NftService.d.ts +2 -1
  8. package/dist/cjs/services/PricingService.d.ts +2 -1
  9. package/dist/cjs/services/SecurityService.d.ts +2 -1
  10. package/dist/cjs/services/TransactionService.d.ts +8 -4
  11. package/dist/cjs/services/XykService.d.ts +68 -13
  12. package/dist/cjs/util/ApiHelpers.d.ts +1 -1
  13. package/dist/cjs/util/types/XykServiceTypes.d.ts +52 -13
  14. package/dist/es/index.js +461 -362
  15. package/dist/es/index.js.map +1 -1
  16. package/dist/es/services/BalanceService.d.ts +2 -1
  17. package/dist/es/services/BaseService.d.ts +2 -1
  18. package/dist/es/services/CovalentClient.d.ts +4 -2
  19. package/dist/es/services/NftService.d.ts +2 -1
  20. package/dist/es/services/PricingService.d.ts +2 -1
  21. package/dist/es/services/SecurityService.d.ts +2 -1
  22. package/dist/es/services/TransactionService.d.ts +8 -4
  23. package/dist/es/services/XykService.d.ts +68 -13
  24. package/dist/es/util/ApiHelpers.d.ts +1 -1
  25. package/dist/es/util/types/XykServiceTypes.d.ts +52 -13
  26. package/dist/esm/index.js +461 -362
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/services/BalanceService.d.ts +2 -1
  29. package/dist/esm/services/BaseService.d.ts +2 -1
  30. package/dist/esm/services/CovalentClient.d.ts +4 -2
  31. package/dist/esm/services/NftService.d.ts +2 -1
  32. package/dist/esm/services/PricingService.d.ts +2 -1
  33. package/dist/esm/services/SecurityService.d.ts +2 -1
  34. package/dist/esm/services/TransactionService.d.ts +8 -4
  35. package/dist/esm/services/XykService.d.ts +68 -13
  36. package/dist/esm/util/ApiHelpers.d.ts +1 -1
  37. package/dist/esm/util/types/XykServiceTypes.d.ts +52 -13
  38. package/dist/services/BalanceService.d.ts +2 -1
  39. package/dist/services/BalanceService.js +40 -33
  40. package/dist/services/BalanceService.js.map +1 -1
  41. package/dist/services/BaseService.d.ts +2 -1
  42. package/dist/services/BaseService.js +66 -55
  43. package/dist/services/BaseService.js.map +1 -1
  44. package/dist/services/CovalentClient.d.ts +4 -2
  45. package/dist/services/CovalentClient.js +17 -17
  46. package/dist/services/CovalentClient.js.map +1 -1
  47. package/dist/services/NftService.d.ts +2 -1
  48. package/dist/services/NftService.js +82 -68
  49. package/dist/services/NftService.js.map +1 -1
  50. package/dist/services/PricingService.d.ts +2 -1
  51. package/dist/services/PricingService.js +8 -6
  52. package/dist/services/PricingService.js.map +1 -1
  53. package/dist/services/SecurityService.d.ts +2 -1
  54. package/dist/services/SecurityService.js +14 -11
  55. package/dist/services/SecurityService.js.map +1 -1
  56. package/dist/services/TransactionService.d.ts +8 -4
  57. package/dist/services/TransactionService.js +95 -79
  58. package/dist/services/TransactionService.js.map +1 -1
  59. package/dist/services/XykService.d.ts +68 -13
  60. package/dist/services/XykService.js +128 -83
  61. package/dist/services/XykService.js.map +1 -1
  62. package/dist/util/ApiHelpers.d.ts +1 -1
  63. package/dist/util/ApiHelpers.js +6 -5
  64. package/dist/util/ApiHelpers.js.map +1 -1
  65. package/dist/util/types/XykServiceTypes.d.ts +52 -13
  66. package/package.json +1 -1
@@ -484,8 +484,9 @@ export declare class BalanceService {
484
484
  private debug;
485
485
  private threadCount;
486
486
  private is_key_valid;
487
+ private enableRetry;
487
488
  private LIMIT;
488
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
489
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
489
490
  /**
490
491
  *
491
492
  * Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.
@@ -364,8 +364,9 @@ export declare class BaseService {
364
364
  private debug;
365
365
  private threadCount;
366
366
  private is_key_valid;
367
+ private enableRetry;
367
368
  private LIMIT;
368
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
369
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
369
370
  /**
370
371
  *
371
372
  * Commonly used to fetch and render a single block for a block explorer.
@@ -7,11 +7,11 @@ import { TransactionService } from "./TransactionService";
7
7
  import { XykService } from "./XykService";
8
8
  export type Chain = "btc-mainnet" | "eth-mainnet" | "matic-mainnet" | "bsc-mainnet" | "avalanche-mainnet" | "optimism-mainnet" | "fantom-mainnet" | "moonbeam-mainnet" | "moonbeam-moonriver" | "rsk-mainnet" | "arbitrum-mainnet" | "palm-mainnet" | "klaytn-mainnet" | "heco-mainnet" | "nervos-godwoken-mainnet" | "axie-mainnet" | "evmos-mainnet" | "astar-mainnet" | "iotex-mainnet" | "harmony-mainnet" | "cronos-mainnet" | "aurora-mainnet" | "emerald-paratime-mainnet" | "boba-mainnet" | "eth-goerli" | "matic-mumbai" | "avalanche-testnet" | "bsc-testnet" | "moonbeam-moonbase-alpha" | "rsk-testnet" | "arbitrum-goerli" | "fantom-testnet" | "palm-testnet" | "heco-testnet" | "nervos-godwoken-testnet" | "evmos-testnet" | "astar-shiden" | "iotex-testnet" | "harmony-testnet" | "aurora-testnet" | "scroll-l2-testnet" | "scroll-sepolia-testnet" | "covalent-internal-network-v1" | "defi-kingdoms-mainnet" | "swimmer-mainnet" | "boba-avalanche-mainnet" | "boba-bobabeam-mainnet" | "boba-bnb-mainnet" | "boba-rinkeby-testnet" | "boba-bobabase-testnet" | "boba-bnb-testnet" | "boba-avalanche-testnet" | "klaytn-testnet" | "gather-mainnet" | "gather-testnet" | "skale-calypso" | "skale-mainnet" | "skale-razor" | "avalanche-dexalot-mainnet" | "skale-omnus" | "avalanche-dexalot-testnet" | "astar-shibuya" | "cronos-testnet" | "defi-kingdoms-testnet" | "metis-mainnet" | "metis-stardust" | "milkomeda-a1-mainnet" | "milkomeda-a1-devnet" | "milkomeda-c1-mainnet" | "milkomeda-c1-devnet" | "swimmer-testnet" | "solana-mainnet" | "skale-europa" | "meter-mainnet" | "meter-testnet" | "skale-exorde" | "boba-goerli" | "neon-testnet" | "skale-staging-uum" | "skale-staging-lcc" | "arbitrum-nova-mainnet" | "canto-mainnet" | "bittorrent-mainnet" | "bittorrent-testnet" | "flarenetworks-flare-mainnet" | "flarenetworks-flare-testnet" | "flarenetworks-canary-mainnet" | "flarenetworks-canary-testnet" | "kcc-mainnet" | "kcc-testnet" | "polygon-zkevm-testnet" | "linea-testnet" | "base-testnet" | "mantle-testnet" | "scroll-alpha-testnet" | "oasys-mainnet" | "oasys-testnet" | "findora-mainnet" | "findora-forge-testnet" | "sx-mainnet" | "oasis-sapphire-mainnet" | "oasis-sapphire-testnet" | "optimism-goerli" | "polygon-zkevm-mainnet" | "horizen-yuma-testnet" | "clv-parachain" | "energi-mainnet" | "energi-testnet" | "horizen-gobi-testnet" | "eth-sepolia" | "skale-nebula" | "skale-battleground" | "avalanche-meld-testnet" | "gunzilla-testnet" | "ultron-mainnet" | "ultron-testnet" | "zora-mainnet" | "zora-testnet" | "neon-mainnet" | "avalanche-shrapnel-mainnet" | "base-mainnet" | "mantle-mainnet" | "avalanche-loco-legends-mainnet" | "linea-mainnet" | "horizen-eon-mainnet" | "avalanche-numbers" | "avalanche-dos" | "avalanche-step-network" | "avalanche-xplus" | "avalanche-xanachain" | "avalanche-meld-mainnet" | "opside-public-zkevm" | "opside-law-chain" | "avalanche-shrapnel-testnet" | "avalanche-loco-legends-testnet" | "opside-cb-zkevm" | "opside-pre-alpha-testnet" | "opside-era7" | "opside-xthrill" | "zksync-mainnet" | "metis-testnet" | "zksync-testnet" | "avalanche-blitz-testnet" | "avalanche-d-chain-testnet" | "avalanche-green-dot-testnet" | "avalanche-mintara-testnet" | "avalanche-beam-testnet" | "bnb-meta-apes-mainnet" | "bnb-antimatter-mainnet" | "bnb-antimatter-testnet" | "bnb-opbnb-testnet" | "opside-debox" | "opside-jackbot" | "opside-odx-zkevm-testnet" | "opside-readon-content-testnet" | "opside-relation" | "opside-soquest-zkevm" | "opside-vip3" | "opside-zkmeta" | "avalanche-pulsar-testnet" | "avalanche-uptn" | "bnb-fncy-mainnet" | "zetachain-testnet" | "kinto-testnet" | "mode-testnet" | "loot-mainnet" | "bnb-fncy-testnet" | "manta-testnet" | "pgn-mainnet" | "pgn-testnet" | "gnosis-mainnet" | "gnosis-testnet" | "rollux-mainnet" | "rollux-testnet" | "taiko-jolnir-testnet" | "optimism-sepolia" | "bnb-opbnb-mainnet" | "telos-mainnet" | "telos-testnet" | "avalanche-hubble-exchange-testnet" | "avalanche-miho-testnet" | "avalanche-bulletin-testnet" | "avalanche-kiwi-testnet" | "avalanche-hero-testnet" | "avalanche-avacloud-testnet" | "avalanche-thirdweb-testnet" | "avalanche-mondrian-testnet" | "avalanche-conduit-testnet" | "avalanche-nmac-testnet" | "avalanche-orderly-testnet" | "avalanche-amplify-testnet" | "avalanche-mirai-testnet" | "avalanche-wagmi-testnet" | "avalanche-playa3ull-testnet" | "avalanche-beam-mainnet" | "scroll-mainnet" | "eth-holesky";
9
9
  export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
10
- export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.4";
10
+ export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.6";
11
11
  export declare class Response<T> {
12
12
  data: T;
13
13
  error: boolean;
14
- error_code: number;
14
+ error_code: number | string;
15
15
  error_message: string;
16
16
  }
17
17
  export interface CovalentClientSettings {
@@ -19,6 +19,8 @@ export interface CovalentClientSettings {
19
19
  debug?: boolean;
20
20
  /** * The number of concurrent requests allowed. */
21
21
  threadCount?: number;
22
+ /** Toggle to turn on and off retry logic */
23
+ enableRetry?: boolean;
22
24
  }
23
25
  /**
24
26
  * CovalentClient Class
@@ -484,8 +484,9 @@ export declare class NftService {
484
484
  private debug;
485
485
  private threadCount;
486
486
  private is_key_valid;
487
+ private enableRetry;
487
488
  private LIMIT;
488
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
489
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
489
490
  /**
490
491
  *
491
492
  * Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
@@ -70,8 +70,9 @@ export declare class PricingService {
70
70
  private debug;
71
71
  private threadCount;
72
72
  private is_key_valid;
73
+ private enableRetry;
73
74
  private LIMIT;
74
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
75
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
75
76
  /**
76
77
  *
77
78
  * Commonly used to get historic prices of a token between date ranges. Supports native tokens.
@@ -137,8 +137,9 @@ export declare class SecurityService {
137
137
  private debug;
138
138
  private threadCount;
139
139
  private is_key_valid;
140
+ private enableRetry;
140
141
  private LIMIT;
141
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
142
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
142
143
  /**
143
144
  *
144
145
  * Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet’s assets.
@@ -339,6 +339,7 @@ declare class RecentTransactionsResponse {
339
339
  private _apiKey;
340
340
  private _threadCount;
341
341
  private _urlParams;
342
+ private _enableRetry;
342
343
  /** * The requested address. */
343
344
  address: string;
344
345
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
@@ -354,7 +355,7 @@ declare class RecentTransactionsResponse {
354
355
  links: PaginationLinks;
355
356
  /** * List of response items. */
356
357
  items: Transaction[];
357
- constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams);
358
+ constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
358
359
  prev(): Promise<Response<RecentTransactionsResponse>>;
359
360
  next(): Promise<Response<RecentTransactionsResponse>>;
360
361
  }
@@ -412,6 +413,7 @@ declare class TransactionsResponse {
412
413
  private _apiKey;
413
414
  private _threadCount;
414
415
  private _urlParams;
416
+ private _enableRetry;
415
417
  /** * The requested address. */
416
418
  address: string;
417
419
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
@@ -427,7 +429,7 @@ declare class TransactionsResponse {
427
429
  links: PaginationLinks;
428
430
  /** * List of response items. */
429
431
  items: Transaction[];
430
- constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams);
432
+ constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
431
433
  prev(): Promise<Response<TransactionsResponse>>;
432
434
  next(): Promise<Response<TransactionsResponse>>;
433
435
  }
@@ -436,6 +438,7 @@ declare class TransactionsTimeBucketResponse {
436
438
  private _apiKey;
437
439
  private _threadCount;
438
440
  private _urlParams;
441
+ private _enableRetry;
439
442
  /** * The requested address. */
440
443
  address: string;
441
444
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
@@ -452,7 +455,7 @@ declare class TransactionsTimeBucketResponse {
452
455
  links: PaginationLinks;
453
456
  /** * List of response items. */
454
457
  items: Transaction[];
455
- constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams);
458
+ constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
456
459
  prev(): Promise<Response<TransactionsTimeBucketResponse>>;
457
460
  next(): Promise<Response<TransactionsTimeBucketResponse>>;
458
461
  }
@@ -511,8 +514,9 @@ export declare class TransactionService {
511
514
  private debug;
512
515
  private threadCount;
513
516
  private is_key_valid;
517
+ private enableRetry;
514
518
  private LIMIT;
515
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
519
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
516
520
  /**
517
521
  *
518
522
  * Commonly used to fetch and render a single transaction including its decoded log events. Additionally return semantically decoded information for DEX trades, lending and NFT sales.
@@ -256,6 +256,8 @@ declare class PoolsDexDataItem {
256
256
  volume_7d_quote: number;
257
257
  /** * The fee 24h converted to fiat in `quote-currency`. */
258
258
  fee_24h_quote: number;
259
+ /** * The annual fee percentage. */
260
+ annualized_fee: number;
259
261
  /** * A prettier version of the volume 24h quote for rendering purposes. */
260
262
  pretty_volume_24h_quote: string;
261
263
  /** * A prettier version of the volume 7d quote for rendering purposes. */
@@ -316,6 +318,8 @@ declare class UniswapLikeToken {
316
318
  /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
317
319
  balance: bigint | null;
318
320
  quote: number;
321
+ /** * A prettier version of the quote for rendering purposes. */
322
+ pretty_quote: string;
319
323
  /** * The exchange rate for the requested quote currency. */
320
324
  quote_rate: number;
321
325
  constructor(data: UniswapLikeToken);
@@ -332,6 +336,8 @@ declare class UniswapLikeTokenWithSupply {
332
336
  /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
333
337
  balance: bigint | null;
334
338
  quote: number;
339
+ /** * A prettier version of the quote for rendering purposes. */
340
+ pretty_quote: string;
335
341
  /** * The exchange rate for the requested quote currency. */
336
342
  quote_rate: number;
337
343
  /** * Total supply of this pool token. */
@@ -432,23 +438,63 @@ declare class ExchangeTransaction {
432
438
  act: string;
433
439
  /** * The requested address. */
434
440
  address: string;
435
- amount0: number;
436
- amount1: number;
437
- amount0_in: number;
438
- amount0_out: number;
439
- amount1_out: number;
441
+ amount_0: number;
442
+ amount_1: number;
443
+ amount_0_in: number;
444
+ amount_0_out: number;
445
+ amount_1_in: number;
446
+ amount_1_out: number;
440
447
  to_address: string;
441
448
  from_address: string;
442
449
  sender_address: string;
443
450
  total_quote: number;
444
451
  /** * A prettier version of the total quote for rendering purposes. */
445
452
  pretty_total_quote: string;
453
+ /** * The value attached to this tx. */
454
+ value: bigint | null;
455
+ /** * The value attached in `quote-currency` to this tx. */
456
+ value_quote: number;
457
+ /** * A prettier version of the quote for rendering purposes. */
458
+ pretty_value_quote: string;
459
+ /** * The requested chain native gas token metadata. */
460
+ gas_metadata: ContractMetadata;
461
+ /** * The amount of gas supplied for this tx. */
462
+ gas_offered: string;
463
+ /** * The gas spent for this tx. */
464
+ gas_spent: string;
465
+ /** * The gas price at the time of this tx. */
466
+ gas_price: string;
467
+ /** * The total transaction fees (`gas_price` * `gas_spent`) paid for this tx, denoted in wei. */
468
+ fees_paid: bigint | null;
469
+ /** * The gas spent in `quote-currency` denomination. */
470
+ gas_quote: number;
471
+ /** * A prettier version of the quote for rendering purposes. */
472
+ pretty_gas_quote: string;
473
+ /** * The native gas exchange rate for the requested `quote-currency`. */
474
+ gas_quote_rate: number;
475
+ /** * The requested quote currency eg: `USD`. */
476
+ quote_currency: string;
446
477
  token_0: PoolToken;
447
478
  token_1: PoolToken;
448
479
  token_0_quote_rate: number;
449
480
  token_1_quote_rate: number;
450
481
  constructor(data: ExchangeTransaction);
451
482
  }
483
+ declare class ContractMetadata {
484
+ /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
485
+ contract_decimals: number;
486
+ /** * The string returned by the `name()` method. */
487
+ contract_name: string;
488
+ /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
489
+ contract_ticker_symbol: string;
490
+ /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
491
+ contract_address: string;
492
+ /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
493
+ supports_erc: string;
494
+ /** * The contract logo URL. */
495
+ logo_url: string;
496
+ constructor(data: ContractMetadata);
497
+ }
452
498
  declare class PoolToken {
453
499
  /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
454
500
  contract_decimals: number;
@@ -511,13 +557,17 @@ declare class UniswapLikeEcosystemCharts {
511
557
  /** * The requested quote currency eg: `USD`. */
512
558
  quote_currency: string;
513
559
  gas_token_price_quote: number;
514
- total_swaps24h: number;
515
- total_active_pairs7d: number;
516
- total_fees24h: number;
517
- volume_chart7d: VolumeEcosystemChart[];
518
- volume_chart30d: VolumeEcosystemChart[];
519
- liquidity_chart7d: LiquidityEcosystemChart[];
520
- liquidity_chart30d: LiquidityEcosystemChart[];
560
+ total_swaps_24h: number;
561
+ total_active_pairs_7d: number;
562
+ total_fees_24h: number;
563
+ /** * A prettier version of the gas quote for rendering purposes. */
564
+ pretty_gas_token_price_quote: string;
565
+ /** * A prettier version of the 24h total fees for rendering purposes. */
566
+ pretty_total_fees_24h: string;
567
+ volume_chart_7d: VolumeEcosystemChart[];
568
+ volume_chart_30d: VolumeEcosystemChart[];
569
+ liquidity_chart_7d: LiquidityEcosystemChart[];
570
+ liquidity_chart_30d: LiquidityEcosystemChart[];
521
571
  constructor(data: UniswapLikeEcosystemCharts);
522
572
  }
523
573
  declare class VolumeEcosystemChart {
@@ -529,6 +579,8 @@ declare class VolumeEcosystemChart {
529
579
  /** * The requested quote currency eg: `USD`. */
530
580
  quote_currency: string;
531
581
  volume_quote: number;
582
+ /** * A prettier version of the volume quote for rendering purposes. */
583
+ pretty_volume_quote: string;
532
584
  swap_count_24: number;
533
585
  constructor(data: VolumeEcosystemChart);
534
586
  }
@@ -541,6 +593,8 @@ declare class LiquidityEcosystemChart {
541
593
  /** * The requested quote currency eg: `USD`. */
542
594
  quote_currency: string;
543
595
  liquidity_quote: number;
596
+ /** * A prettier version of the liquidity quote for rendering purposes. */
597
+ pretty_liquidity_quote: string;
544
598
  constructor(data: LiquidityEcosystemChart);
545
599
  }
546
600
  declare class HealthDataResponse {
@@ -586,8 +640,9 @@ export declare class XykService {
586
640
  private debug;
587
641
  private threadCount;
588
642
  private is_key_valid;
643
+ private enableRetry;
589
644
  private LIMIT;
590
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
645
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
591
646
  /**
592
647
  *
593
648
  * Commonly used to get all the pools of a particular DEX. Supports most common DEXs (Uniswap, SushiSwap, etc), and returns detailed trading data (volume, liquidity, swap counts, fees, LP token prices).
@@ -1,5 +1,5 @@
1
1
  export declare function checkAndModifyResponse(jsonObj: any): void;
2
2
  export declare function debugOutput(url: string, responseStatus: number, startTime: number | [number, number] | undefined): Promise<void>;
3
3
  type Constructor<T> = new (...args: any[]) => T;
4
- export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number): AsyncIterable<T1>;
4
+ export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean): AsyncIterable<T1>;
5
5
  export {};
@@ -1,4 +1,4 @@
1
- import { Pagination } from "./GenericTypes";
1
+ import { Pagination, ContractMetadata } from "./GenericTypes";
2
2
  export interface PoolResponse {
3
3
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
4
4
  updated_at: Date;
@@ -232,6 +232,8 @@ export interface PoolsDexDataItem {
232
232
  volume_7d_quote: number;
233
233
  /** * The fee 24h converted to fiat in `quote-currency`. */
234
234
  fee_24h_quote: number;
235
+ /** * The annual fee percentage. */
236
+ annualized_fee: number;
235
237
  /** * A prettier version of the volume 24h quote for rendering purposes. */
236
238
  pretty_volume_24h_quote: string;
237
239
  /** * A prettier version of the volume 7d quote for rendering purposes. */
@@ -288,6 +290,8 @@ export interface UniswapLikeToken {
288
290
  /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
289
291
  balance: bigint | null;
290
292
  quote: number;
293
+ /** * A prettier version of the quote for rendering purposes. */
294
+ pretty_quote: string;
291
295
  /** * The exchange rate for the requested quote currency. */
292
296
  quote_rate: number;
293
297
  }
@@ -303,6 +307,8 @@ export interface UniswapLikeTokenWithSupply {
303
307
  /** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
304
308
  balance: bigint | null;
305
309
  quote: number;
310
+ /** * A prettier version of the quote for rendering purposes. */
311
+ pretty_quote: string;
306
312
  /** * The exchange rate for the requested quote currency. */
307
313
  quote_rate: number;
308
314
  /** * Total supply of this pool token. */
@@ -397,17 +403,42 @@ export interface ExchangeTransaction {
397
403
  act: string;
398
404
  /** * The requested address. */
399
405
  address: string;
400
- amount0: number;
401
- amount1: number;
402
- amount0_in: number;
403
- amount0_out: number;
404
- amount1_out: number;
406
+ amount_0: number;
407
+ amount_1: number;
408
+ amount_0_in: number;
409
+ amount_0_out: number;
410
+ amount_1_in: number;
411
+ amount_1_out: number;
405
412
  to_address: string;
406
413
  from_address: string;
407
414
  sender_address: string;
408
415
  total_quote: number;
409
416
  /** * A prettier version of the total quote for rendering purposes. */
410
417
  pretty_total_quote: string;
418
+ /** * The value attached to this tx. */
419
+ value: bigint | null;
420
+ /** * The value attached in `quote-currency` to this tx. */
421
+ value_quote: number;
422
+ /** * A prettier version of the quote for rendering purposes. */
423
+ pretty_value_quote: string;
424
+ /** * The requested chain native gas token metadata. */
425
+ gas_metadata: ContractMetadata;
426
+ /** * The amount of gas supplied for this tx. */
427
+ gas_offered: string;
428
+ /** * The gas spent for this tx. */
429
+ gas_spent: string;
430
+ /** * The gas price at the time of this tx. */
431
+ gas_price: string;
432
+ /** * The total transaction fees (`gas_price` * `gas_spent`) paid for this tx, denoted in wei. */
433
+ fees_paid: bigint | null;
434
+ /** * The gas spent in `quote-currency` denomination. */
435
+ gas_quote: number;
436
+ /** * A prettier version of the quote for rendering purposes. */
437
+ pretty_gas_quote: string;
438
+ /** * The native gas exchange rate for the requested `quote-currency`. */
439
+ gas_quote_rate: number;
440
+ /** * The requested quote currency eg: `USD`. */
441
+ quote_currency: string;
411
442
  token_0: PoolToken;
412
443
  token_1: PoolToken;
413
444
  token_0_quote_rate: number;
@@ -471,13 +502,17 @@ export interface UniswapLikeEcosystemCharts {
471
502
  /** * The requested quote currency eg: `USD`. */
472
503
  quote_currency: string;
473
504
  gas_token_price_quote: number;
474
- total_swaps24h: number;
475
- total_active_pairs7d: number;
476
- total_fees24h: number;
477
- volume_chart7d: VolumeEcosystemChart[];
478
- volume_chart30d: VolumeEcosystemChart[];
479
- liquidity_chart7d: LiquidityEcosystemChart[];
480
- liquidity_chart30d: LiquidityEcosystemChart[];
505
+ total_swaps_24h: number;
506
+ total_active_pairs_7d: number;
507
+ total_fees_24h: number;
508
+ /** * A prettier version of the gas quote for rendering purposes. */
509
+ pretty_gas_token_price_quote: string;
510
+ /** * A prettier version of the 24h total fees for rendering purposes. */
511
+ pretty_total_fees_24h: string;
512
+ volume_chart_7d: VolumeEcosystemChart[];
513
+ volume_chart_30d: VolumeEcosystemChart[];
514
+ liquidity_chart_7d: LiquidityEcosystemChart[];
515
+ liquidity_chart_30d: LiquidityEcosystemChart[];
481
516
  }
482
517
  export interface VolumeEcosystemChart {
483
518
  /** * The name of the DEX, eg: `uniswap_v2`. */
@@ -488,6 +523,8 @@ export interface VolumeEcosystemChart {
488
523
  /** * The requested quote currency eg: `USD`. */
489
524
  quote_currency: string;
490
525
  volume_quote: number;
526
+ /** * A prettier version of the volume quote for rendering purposes. */
527
+ pretty_volume_quote: string;
491
528
  swap_count_24: number;
492
529
  }
493
530
  export interface LiquidityEcosystemChart {
@@ -499,6 +536,8 @@ export interface LiquidityEcosystemChart {
499
536
  /** * The requested quote currency eg: `USD`. */
500
537
  quote_currency: string;
501
538
  liquidity_quote: number;
539
+ /** * A prettier version of the liquidity quote for rendering purposes. */
540
+ pretty_liquidity_quote: string;
502
541
  }
503
542
  export interface HealthDataResponse {
504
543
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
@@ -484,8 +484,9 @@ export declare class BalanceService {
484
484
  private debug;
485
485
  private threadCount;
486
486
  private is_key_valid;
487
+ private enableRetry;
487
488
  private LIMIT;
488
- constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean);
489
+ constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
489
490
  /**
490
491
  *
491
492
  * Commonly used to fetch the native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address. Response includes spot prices and other metadata.