@covalenthq/client-sdk 0.6.5 → 0.6.7

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 +15 -5
  2. package/dist/cjs/index.d.ts +2 -1
  3. package/dist/cjs/index.js +184 -2
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/services/BalanceService.d.ts +11 -10
  6. package/dist/cjs/services/BaseService.d.ts +10 -9
  7. package/dist/cjs/services/CovalentClient.d.ts +1 -15
  8. package/dist/cjs/services/NftService.d.ts +16 -15
  9. package/dist/cjs/services/PricingService.d.ts +2 -1
  10. package/dist/cjs/services/SecurityService.d.ts +3 -2
  11. package/dist/cjs/services/TransactionService.d.ts +7 -6
  12. package/dist/cjs/services/XykService.d.ts +14 -13
  13. package/dist/cjs/util/Chains.d.ts +180 -0
  14. package/dist/cjs/util/types/BalanceServiceTypes.d.ts +2 -2
  15. package/dist/es/index.d.ts +2 -1
  16. package/dist/es/index.js +185 -3
  17. package/dist/es/index.js.map +1 -1
  18. package/dist/es/services/BalanceService.d.ts +11 -10
  19. package/dist/es/services/BaseService.d.ts +10 -9
  20. package/dist/es/services/CovalentClient.d.ts +1 -15
  21. package/dist/es/services/NftService.d.ts +16 -15
  22. package/dist/es/services/PricingService.d.ts +2 -1
  23. package/dist/es/services/SecurityService.d.ts +3 -2
  24. package/dist/es/services/TransactionService.d.ts +7 -6
  25. package/dist/es/services/XykService.d.ts +14 -13
  26. package/dist/es/util/Chains.d.ts +180 -0
  27. package/dist/es/util/types/BalanceServiceTypes.d.ts +2 -2
  28. package/dist/esm/index.d.ts +2 -1
  29. package/dist/esm/index.js +185 -3
  30. package/dist/esm/index.js.map +1 -1
  31. package/dist/esm/services/BalanceService.d.ts +11 -10
  32. package/dist/esm/services/BaseService.d.ts +10 -9
  33. package/dist/esm/services/CovalentClient.d.ts +1 -15
  34. package/dist/esm/services/NftService.d.ts +16 -15
  35. package/dist/esm/services/PricingService.d.ts +2 -1
  36. package/dist/esm/services/SecurityService.d.ts +3 -2
  37. package/dist/esm/services/TransactionService.d.ts +7 -6
  38. package/dist/esm/services/XykService.d.ts +14 -13
  39. package/dist/esm/util/Chains.d.ts +180 -0
  40. package/dist/esm/util/types/BalanceServiceTypes.d.ts +2 -2
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.js +1 -0
  43. package/dist/index.js.map +1 -1
  44. package/dist/services/BalanceService.d.ts +11 -10
  45. package/dist/services/BalanceService.js +1 -1
  46. package/dist/services/BalanceService.js.map +1 -1
  47. package/dist/services/BaseService.d.ts +10 -9
  48. package/dist/services/BaseService.js.map +1 -1
  49. package/dist/services/CovalentClient.d.ts +1 -15
  50. package/dist/services/CovalentClient.js +1 -1
  51. package/dist/services/CovalentClient.js.map +1 -1
  52. package/dist/services/NftService.d.ts +16 -15
  53. package/dist/services/NftService.js.map +1 -1
  54. package/dist/services/PricingService.d.ts +2 -1
  55. package/dist/services/PricingService.js.map +1 -1
  56. package/dist/services/SecurityService.d.ts +3 -2
  57. package/dist/services/SecurityService.js.map +1 -1
  58. package/dist/services/TransactionService.d.ts +7 -6
  59. package/dist/services/TransactionService.js.map +1 -1
  60. package/dist/services/XykService.d.ts +14 -13
  61. package/dist/services/XykService.js.map +1 -1
  62. package/dist/util/Chains.d.ts +180 -0
  63. package/dist/util/Chains.js +182 -0
  64. package/dist/util/Chains.js.map +1 -0
  65. package/dist/util/types/BalanceServiceTypes.d.ts +2 -2
  66. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { Chain, Quote, Response } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class BalancesResponse {
3
4
  /** * The requested address. */
4
5
  address: string;
@@ -212,8 +213,6 @@ declare class BlockTransactionWithContractTransfers {
212
213
  pretty_gas_quote: string;
213
214
  /** * The native gas exchange rate for the requested `quote-currency`. */
214
215
  gas_quote_rate: number;
215
- /** * The explorer links for this transaction. */
216
- explorers: Explorer[];
217
216
  transfers: TokenTransferItem[];
218
217
  constructor(data: BlockTransactionWithContractTransfers);
219
218
  }
@@ -274,6 +273,8 @@ declare class TokenTransferItem {
274
273
  balance_quote: number;
275
274
  /** * Additional details on which transfer events were invoked. Defaults to `true`. */
276
275
  method_calls: MethodCallsForTransfers[];
276
+ /** * The explorer links for this transaction. */
277
+ explorers: Explorer[];
277
278
  constructor(data: TokenTransferItem);
278
279
  }
279
280
  declare class MethodCallsForTransfers {
@@ -498,7 +499,7 @@ export declare class BalanceService {
498
499
  * - `noNftAssetMetadata`: If `true`, the response shape is limited to a list of collections and token ids, omitting metadata and asset information. Helpful for faster response times and wallets holding a large number of NFTs.
499
500
  *
500
501
  */
501
- getTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
502
+ getTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
502
503
  /**
503
504
  *
504
505
  * Commonly used to render a daily portfolio balance for an address broken down by the token. The timeframe is user-configurable, defaults to 30 days.
@@ -510,7 +511,7 @@ export declare class BalanceService {
510
511
  * - `days`: The number of days to return data for. Defaults to 30 days.
511
512
  *
512
513
  */
513
- getHistoricalPortfolioForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
514
+ getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
514
515
  /**
515
516
  *
516
517
  * Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
@@ -526,7 +527,7 @@ export declare class BalanceService {
526
527
  * - `pageNumber`: 0-indexed page number to begin pagination.
527
528
  *
528
529
  */
529
- getErc20TransfersForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
530
+ getErc20TransfersForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
530
531
  /**
531
532
  *
532
533
  * Commonly used to render the transfer-in and transfer-out of a token along with historical prices from an address.
@@ -542,7 +543,7 @@ export declare class BalanceService {
542
543
  * - `pageNumber`: 0-indexed page number to begin pagination.
543
544
  *
544
545
  */
545
- getErc20TransfersForWalletAddressByPage(chainName: Chain, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
546
+ getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
546
547
  /**
547
548
  *
548
549
  * Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to `latest`). Useful for building pie charts of token holders.
@@ -556,7 +557,7 @@ export declare class BalanceService {
556
557
  * - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
557
558
  *
558
559
  */
559
- getTokenHoldersV2ForTokenAddress(chainName: Chain, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
560
+ getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
560
561
  /**
561
562
  *
562
563
  * Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to `latest`). Useful for building pie charts of token holders.
@@ -570,7 +571,7 @@ export declare class BalanceService {
570
571
  * - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
571
572
  *
572
573
  */
573
- getTokenHoldersV2ForTokenAddressByPage(chainName: Chain, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
574
+ getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
574
575
  /**
575
576
  *
576
577
  * Commonly used to fetch the historical native, fungible (ERC20), and non-fungible (ERC721 & ERC1155) tokens held by an address at a given block height or date. Response includes daily prices and other metadata.
@@ -587,7 +588,7 @@ export declare class BalanceService {
587
588
  * - `date`: Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date.
588
589
  *
589
590
  */
590
- getHistoricalTokenBalancesForWalletAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
591
+ getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
591
592
  /**
592
593
  *
593
594
  * @param {string} chainName - The chain name eg: `eth-mainnet`.
@@ -597,6 +598,6 @@ export declare class BalanceService {
597
598
  * - `blockHeight`: Ending block to define a block range. Omitting this parameter defaults to the latest block height.
598
599
  *
599
600
  */
600
- getNativeTokenBalance(chainName: Chain, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
601
+ getNativeTokenBalance(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
601
602
  }
602
603
  export {};
@@ -1,4 +1,5 @@
1
1
  import { Chain, Response } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class BlockResponse {
3
4
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
4
5
  updated_at: Date;
@@ -329,7 +330,7 @@ export declare class BaseService {
329
330
  * @param {string} blockHeight - The block height or `latest` for the latest block available.
330
331
  *
331
332
  */
332
- getBlock(chainName: Chain, blockHeight: string): Promise<Response<BlockResponse>>;
333
+ getBlock(chainName: Chain | Chains, blockHeight: string): Promise<Response<BlockResponse>>;
333
334
  /**
334
335
  *
335
336
  * Commonly used to resolve ENS, RNS and Unstoppable Domains addresses.
@@ -338,7 +339,7 @@ export declare class BaseService {
338
339
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
339
340
  *
340
341
  */
341
- getResolvedAddress(chainName: Chain, walletAddress: string): Promise<Response<ResolvedAddress>>;
342
+ getResolvedAddress(chainName: Chain | Chains, walletAddress: string): Promise<Response<ResolvedAddress>>;
342
343
  /**
343
344
  *
344
345
  * Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
@@ -351,7 +352,7 @@ export declare class BaseService {
351
352
  * - `pageNumber`: 0-indexed page number to begin pagination.
352
353
  *
353
354
  */
354
- getBlockHeights(chainName: Chain, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
355
+ getBlockHeights(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
355
356
  /**
356
357
  *
357
358
  * Commonly used to get all the block heights within a particular date range. Useful for rendering a display where you sort blocks by day.
@@ -364,7 +365,7 @@ export declare class BaseService {
364
365
  * - `pageNumber`: 0-indexed page number to begin pagination.
365
366
  *
366
367
  */
367
- getBlockHeightsByPage(chainName: Chain, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
368
+ getBlockHeightsByPage(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
368
369
  /**
369
370
  *
370
371
  * Commonly used to get all the event logs of the latest block, or for a range of blocks. Includes sender contract metadata as well as decoded logs.
@@ -379,7 +380,7 @@ export declare class BaseService {
379
380
  * - `skipDecode`: Omit decoded log events.
380
381
  *
381
382
  */
382
- getLogs(chainName: Chain, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
383
+ getLogs(chainName: Chain | Chains, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
383
384
  /**
384
385
  *
385
386
  * Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
@@ -393,7 +394,7 @@ export declare class BaseService {
393
394
  * - `pageNumber`: 0-indexed page number to begin pagination.
394
395
  *
395
396
  */
396
- getLogEventsByAddress(chainName: Chain, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
397
+ getLogEventsByAddress(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
397
398
  /**
398
399
  *
399
400
  * Commonly used to get all the event logs emitted from a particular contract address. Useful for building dashboards that examine on-chain interactions.
@@ -407,7 +408,7 @@ export declare class BaseService {
407
408
  * - `pageNumber`: 0-indexed page number to begin pagination.
408
409
  *
409
410
  */
410
- getLogEventsByAddressByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
411
+ getLogEventsByAddressByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
411
412
  /**
412
413
  *
413
414
  * Commonly used to get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain.
@@ -422,7 +423,7 @@ export declare class BaseService {
422
423
  * - `pageNumber`: 0-indexed page number to begin pagination.
423
424
  *
424
425
  */
425
- getLogEventsByTopicHash(chainName: Chain, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
426
+ getLogEventsByTopicHash(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
426
427
  /**
427
428
  *
428
429
  * Commonly used to get all event logs of the same topic hash across all contracts within a particular chain. Useful for cross-sectional analysis of event logs that are emitted on-chain.
@@ -437,7 +438,7 @@ export declare class BaseService {
437
438
  * - `pageNumber`: 0-indexed page number to begin pagination.
438
439
  *
439
440
  */
440
- getLogEventsByTopicHashByPage(chainName: Chain, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
441
+ getLogEventsByTopicHashByPage(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
441
442
  /**
442
443
  *
443
444
  * Commonly used to build internal dashboards for all supported chains on Covalent.
@@ -7,21 +7,7 @@ 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-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";
9
9
  export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
10
- /**
11
- * @deprecated
12
- * Please use {@link Chain} going forward! This type will be removed after Oct 31, 2023.
13
- * @see #Chain
14
- * CovalentClient Class
15
- */
16
- export type Chains = "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-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";
17
- /**
18
- * @deprecated
19
- * Please use {@link Quote} going forward! This type will be removed after Oct 31, 2023.
20
- * @see #Quote
21
- * CovalentClient Class
22
- */
23
- export type Quotes = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
24
- export declare const userAgent = "com.covalenthq.sdk.typescript/0.6.5";
10
+ export declare const userAgent = "com.covalenthq.sdk.typescript/0.6.7";
25
11
  export declare class Response<T> {
26
12
  data: T;
27
13
  error: boolean;
@@ -1,4 +1,5 @@
1
1
  import { Chain, Quote, Response } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class ChainCollectionResponse {
3
4
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
4
5
  updated_at: Date;
@@ -495,7 +496,7 @@ export declare class NftService {
495
496
  * - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
496
497
  *
497
498
  */
498
- getChainCollections(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
499
+ getChainCollections(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
499
500
  /**
500
501
  *
501
502
  * Commonly used to fetch the list of NFT collections with downloaded and cached off chain data like token metadata and asset files.
@@ -507,7 +508,7 @@ export declare class NftService {
507
508
  * - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
508
509
  *
509
510
  */
510
- getChainCollectionsByPage(chainName: Chain, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
511
+ getChainCollectionsByPage(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
511
512
  /**
512
513
  *
513
514
  * Commonly used to render the NFTs (including ERC721 and ERC1155) held by an address.
@@ -520,7 +521,7 @@ export declare class NftService {
520
521
  * - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
521
522
  *
522
523
  */
523
- getNftsForAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
524
+ getNftsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
524
525
  /**
525
526
  *
526
527
  * Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
@@ -536,7 +537,7 @@ export declare class NftService {
536
537
  * - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
537
538
  *
538
539
  */
539
- getTokenIdsForContractWithMetadata(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
540
+ getTokenIdsForContractWithMetadata(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
540
541
  /**
541
542
  *
542
543
  * Commonly used to get NFT token IDs with metadata from a collection. Useful for building NFT card displays.
@@ -552,7 +553,7 @@ export declare class NftService {
552
553
  * - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
553
554
  *
554
555
  */
555
- getTokenIdsForContractWithMetadataByPage(chainName: Chain, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
556
+ getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
556
557
  /**
557
558
  *
558
559
  * Commonly used to get a single NFT metadata by token ID from a collection. Useful for building NFT card displays.
@@ -565,7 +566,7 @@ export declare class NftService {
565
566
  * - `withUncached`: By default, this endpoint only works on chains where we've cached the assets and the metadata. When set to `true`, the API will fetch metadata from upstream servers even if it's not cached - the downside being that the upstream server can block or rate limit the call and therefore resulting in time outs or slow response times on the Covalent side.
566
567
  *
567
568
  */
568
- getNftMetadataForGivenTokenIdForContract(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
569
+ getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
569
570
  /**
570
571
  *
571
572
  * Commonly used to get all transactions of an NFT token. Useful for building a transaction history table or price chart.
@@ -577,7 +578,7 @@ export declare class NftService {
577
578
  * - `noSpam`: If `true`, the suspected spam tokens are removed. Supports `eth-mainnet` and `matic-mainnet`.
578
579
  *
579
580
  */
580
- getNftTransactionsForContractTokenId(chainName: Chain, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
581
+ getNftTransactionsForContractTokenId(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
581
582
  /**
582
583
  *
583
584
  * Commonly used to fetch and render the traits of a collection as seen in rarity calculators.
@@ -586,7 +587,7 @@ export declare class NftService {
586
587
  * @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
587
588
  *
588
589
  */
589
- getTraitsForCollection(chainName: Chain, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
590
+ getTraitsForCollection(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
590
591
  /**
591
592
  *
592
593
  * Commonly used to get the count of unique values for traits within an NFT collection.
@@ -596,7 +597,7 @@ export declare class NftService {
596
597
  * @param {string} trait - The requested trait.
597
598
  *
598
599
  */
599
- getAttributesForTraitInCollection(chainName: Chain, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
600
+ getAttributesForTraitInCollection(chainName: Chain | Chains, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
600
601
  /**
601
602
  *
602
603
  * Commonly used to calculate rarity scores for a collection based on its traits.
@@ -605,7 +606,7 @@ export declare class NftService {
605
606
  * @param {string} collectionContract - The requested collection address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
606
607
  *
607
608
  */
608
- getCollectionTraitsSummary(chainName: Chain, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
609
+ getCollectionTraitsSummary(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
609
610
  /**
610
611
  *
611
612
  * Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.
@@ -615,7 +616,7 @@ export declare class NftService {
615
616
  * @param {string} collectionContract - The requested collection address.
616
617
  *
617
618
  */
618
- checkOwnershipInNft(chainName: Chain, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
619
+ checkOwnershipInNft(chainName: Chain | Chains, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
619
620
  /**
620
621
  *
621
622
  * Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.
@@ -626,7 +627,7 @@ export declare class NftService {
626
627
  * @param {string} tokenId - The requested token ID.
627
628
  *
628
629
  */
629
- checkOwnershipInNftForSpecificTokenId(chainName: Chain, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
630
+ checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
630
631
  /**
631
632
  *
632
633
  * Commonly used to build a time-series chart of the sales count of an NFT collection.
@@ -638,7 +639,7 @@ export declare class NftService {
638
639
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
639
640
  *
640
641
  */
641
- getNftMarketSaleCount(chainName: Chain, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
642
+ getNftMarketSaleCount(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
642
643
  /**
643
644
  *
644
645
  * Commonly used to build a time-series chart of the transaction volume of an NFT collection.
@@ -650,7 +651,7 @@ export declare class NftService {
650
651
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
651
652
  *
652
653
  */
653
- getNftMarketVolume(chainName: Chain, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
654
+ getNftMarketVolume(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
654
655
  /**
655
656
  *
656
657
  * Commonly used to render a price floor chart for an NFT collection.
@@ -662,6 +663,6 @@ export declare class NftService {
662
663
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
663
664
  *
664
665
  */
665
- getNftMarketFloorPrice(chainName: Chain, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
666
+ getNftMarketFloorPrice(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
666
667
  }
667
668
  export {};
@@ -1,4 +1,5 @@
1
1
  import { Chain, Quote } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class TokenPricesResponse {
3
4
  /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
4
5
  contract_decimals: number;
@@ -83,6 +84,6 @@ export declare class PricingService {
83
84
  * - `pricesAtAsc`: Sort the prices in chronological ascending order. By default, it's set to `false` and returns prices in chronological descending order.
84
85
  *
85
86
  */
86
- getTokenPrices(chainName: Chain, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
87
+ getTokenPrices(chainName: Chain | Chains, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
87
88
  }
88
89
  export {};
@@ -1,4 +1,5 @@
1
1
  import { Chain, Response } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class ApprovalsResponse {
3
4
  /** * The requested address. */
4
5
  address: string;
@@ -145,7 +146,7 @@ export declare class SecurityService {
145
146
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
146
147
  *
147
148
  */
148
- getApprovals(chainName: Chain, walletAddress: string): Promise<Response<ApprovalsResponse>>;
149
+ getApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<ApprovalsResponse>>;
149
150
  /**
150
151
  *
151
152
  * @param {string} chainName - The chain name eg: `eth-mainnet`.
@@ -153,6 +154,6 @@ export declare class SecurityService {
153
154
 
154
155
  *
155
156
  */
156
- getNftApprovals(chainName: Chain, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
157
+ getNftApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
157
158
  }
158
159
  export {};
@@ -1,4 +1,5 @@
1
1
  import { Chain, Quote, Response } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class TransactionResponse {
3
4
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
4
5
  updated_at: Date;
@@ -493,7 +494,7 @@ export declare class TransactionService {
493
494
  * - `withSafe`: Include safe details.
494
495
  *
495
496
  */
496
- getTransaction(chainName: Chain, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
497
+ getTransaction(chainName: Chain | Chains, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
497
498
  /**
498
499
  *
499
500
  * Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
@@ -507,7 +508,7 @@ export declare class TransactionService {
507
508
  * - `withSafe`: Include safe details.
508
509
  *
509
510
  */
510
- getAllTransactionsForAddress(chainName: Chain, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
511
+ getAllTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
511
512
  /**
512
513
  *
513
514
  * Commonly used to fetch and render the most recent transactions involving an address. Frequently seen in wallet applications.
@@ -521,7 +522,7 @@ export declare class TransactionService {
521
522
  * - `withSafe`: Include safe details.
522
523
  *
523
524
  */
524
- getAllTransactionsForAddressByPage(chainName: Chain, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
525
+ getAllTransactionsForAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
525
526
  /**
526
527
  *
527
528
  * Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
@@ -534,7 +535,7 @@ export declare class TransactionService {
534
535
  * - `withSafe`: Include safe details.
535
536
  *
536
537
  */
537
- getTransactionsForBlock(chainName: Chain, blockHeight: number, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
538
+ getTransactionsForBlock(chainName: Chain | Chains, blockHeight: number, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
538
539
  /**
539
540
  *
540
541
  * Commonly used to 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.
@@ -543,7 +544,7 @@ export declare class TransactionService {
543
544
  * @param {string} walletAddress - The requested address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
544
545
  *
545
546
  */
546
- getTransactionSummary(chainName: Chain, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
547
+ getTransactionSummary(chainName: Chain | Chains, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
547
548
  /**
548
549
  *
549
550
  * @param {string} chainName - The chain name eg: `eth-mainnet`.
@@ -556,6 +557,6 @@ export declare class TransactionService {
556
557
  * - `withSafe`: Include safe details.
557
558
  *
558
559
  */
559
- getTransactionsForAddressV3(chainName: Chain, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
560
+ getTransactionsForAddressV3(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
560
561
  }
561
562
  export {};
@@ -1,4 +1,5 @@
1
1
  import { Chain, Quote, Response } from "./CovalentClient";
2
+ import { Chains } from "../util/Chains";
2
3
  declare class PoolResponse {
3
4
  /** * The timestamp when the response was generated. Useful to show data staleness to users. */
4
5
  updated_at: Date;
@@ -553,7 +554,7 @@ export declare class XykService {
553
554
  * @param {string} dexName - The DEX name eg: `uniswap_v2`.
554
555
  *
555
556
  */
556
- getPools(chainName: Chain, dexName: string): Promise<Response<PoolResponse>>;
557
+ getPools(chainName: Chain | Chains, dexName: string): Promise<Response<PoolResponse>>;
557
558
  /**
558
559
  *
559
560
  * Commonly used to get the corresponding supported DEX given a pool address, along with the swap fees, DEX's logo url, and factory addresses. Useful to identifying the specific DEX to which a pair address is associated.
@@ -562,7 +563,7 @@ export declare class XykService {
562
563
  * @param {string} poolAddress - The requested pool address.
563
564
  *
564
565
  */
565
- getDexForPoolAddress(chainName: Chain, poolAddress: string): Promise<Response<PoolToDexResponse>>;
566
+ getDexForPoolAddress(chainName: Chain | Chains, poolAddress: string): Promise<Response<PoolToDexResponse>>;
566
567
  /**
567
568
  *
568
569
  * Commonly used to get the 7 day and 30 day time-series data (volume, liquidity, price) of a particular liquidity pool in a DEX. Useful for building time-series charts on DEX trading activity.
@@ -572,7 +573,7 @@ export declare class XykService {
572
573
  * @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
573
574
  *
574
575
  */
575
- getPoolByAddress(chainName: Chain, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
576
+ getPoolByAddress(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
576
577
  /**
577
578
  *
578
579
  * Commonly used to get all pools and the supported DEX for a token. Useful for building a table of top pairs across all supported DEXes that the token is trading on.
@@ -584,7 +585,7 @@ export declare class XykService {
584
585
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
585
586
  *
586
587
  */
587
- getPoolsForTokenAddress(chainName: Chain, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
588
+ getPoolsForTokenAddress(chainName: Chain | Chains, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
588
589
  /**
589
590
  *
590
591
  * Commonly used to return balance of a wallet/contract address on a specific DEX.
@@ -594,7 +595,7 @@ export declare class XykService {
594
595
  * @param {string} accountAddress - The account address.
595
596
  *
596
597
  */
597
- getAddressExchangeBalances(chainName: Chain, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
598
+ getAddressExchangeBalances(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
598
599
  /**
599
600
  *
600
601
  * Commonly used to get all pools and supported DEX for a wallet. Useful for building a personal DEX UI showcasing pairs and supported DEXes associated to the wallet.
@@ -607,7 +608,7 @@ export declare class XykService {
607
608
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
608
609
  *
609
610
  */
610
- getPoolsForWalletAddress(chainName: Chain, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
611
+ getPoolsForWalletAddress(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
611
612
  /**
612
613
  *
613
614
  * Commonly used to retrieve all network exchange tokens for a specific DEX. Useful for building a top tokens table by total liquidity within a particular DEX.
@@ -616,7 +617,7 @@ export declare class XykService {
616
617
  * @param {string} dexName - The DEX name eg: `uniswap_v2`.
617
618
  *
618
619
  */
619
- getNetworkExchangeTokens(chainName: Chain, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
620
+ getNetworkExchangeTokens(chainName: Chain | Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
620
621
  /**
621
622
  *
622
623
  * Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.
@@ -633,7 +634,7 @@ export declare class XykService {
633
634
  * @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
634
635
  *
635
636
  */
636
- getSingleNetworkExchangeToken(chainName: Chain, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
637
+ getSingleNetworkExchangeToken(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
637
638
  /**
638
639
  *
639
640
  * Commonly used to get all the DEX transactions of a wallet. Useful for building tables of DEX activity segmented by wallet.
@@ -643,7 +644,7 @@ export declare class XykService {
643
644
  * @param {string} accountAddress - The account address. Passing in an `ENS` or `RNS` resolves automatically.
644
645
  *
645
646
  */
646
- getTransactionsForAccountAddress(chainName: Chain, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
647
+ getTransactionsForAccountAddress(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
647
648
  /**
648
649
  *
649
650
  * Commonly used to get all the transactions of a token within a particular DEX. Useful for getting a per-token view of DEX activity.
@@ -653,7 +654,7 @@ export declare class XykService {
653
654
  * @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
654
655
  *
655
656
  */
656
- getTransactionsForTokenAddress(chainName: Chain, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
657
+ getTransactionsForTokenAddress(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
657
658
  /**
658
659
  *
659
660
  * Commonly used for getting all the transactions of a particular DEX liquidity pool. Useful for building a transactions history table for an individual pool.
@@ -663,7 +664,7 @@ export declare class XykService {
663
664
  * @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
664
665
  *
665
666
  */
666
- getTransactionsForExchange(chainName: Chain, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
667
+ getTransactionsForExchange(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
667
668
  /**
668
669
  *
669
670
  * Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.
@@ -672,7 +673,7 @@ export declare class XykService {
672
673
  * @param {string} dexName - The DEX name eg: `uniswap_v2`.
673
674
  *
674
675
  */
675
- getEcosystemChartData(chainName: Chain, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
676
+ getEcosystemChartData(chainName: Chain | Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
676
677
  /**
677
678
  *
678
679
  * Commonly used to ping the health of xy=k endpoints to get the synced block height per chain.
@@ -681,6 +682,6 @@ export declare class XykService {
681
682
  * @param {string} dexName - The DEX name eg: `uniswap_v2`.
682
683
  *
683
684
  */
684
- getHealthData(chainName: Chain, dexName: string): Promise<Response<HealthDataResponse>>;
685
+ getHealthData(chainName: Chain | Chains, dexName: string): Promise<Response<HealthDataResponse>>;
685
686
  }
686
687
  export {};