New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@covalenthq/client-sdk

Package Overview
Dependencies
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@covalenthq/client-sdk - npm Package Compare versions

Comparing version 0.7.6 to 0.8.0

27

dist/cjs/services/BalanceService.d.ts

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -448,3 +448,3 @@ declare class BalancesResponse {

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -469,3 +469,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -478,3 +478,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
}

@@ -491,4 +491,5 @@ /**

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -508,3 +509,3 @@ *

*/
getTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
getTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
/**

@@ -521,3 +522,3 @@ *

*/
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
/**

@@ -538,3 +539,3 @@ *

*/
getErc20TransfersForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
getErc20TransfersForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
/**

@@ -555,3 +556,3 @@ *

*/
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
/**

@@ -570,3 +571,3 @@ *

*/
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
/**

@@ -585,3 +586,3 @@ *

*/
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
/**

@@ -603,3 +604,3 @@ *

*/
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
/**

@@ -614,4 +615,4 @@ *

*/
getNativeTokenBalance(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
getNativeTokenBalance(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -368,4 +368,5 @@ declare class BlockResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -379,3 +380,3 @@ *

*/
getBlock(chainName: Chain | Chains, blockHeight: string): Promise<Response<BlockResponse>>;
getBlock(chainName: Chain | Chains | ChainID, blockHeight: string): Promise<Response<BlockResponse>>;
/**

@@ -389,3 +390,3 @@ *

*/
getResolvedAddress(chainName: Chain | Chains, walletAddress: string): Promise<Response<ResolvedAddress>>;
getResolvedAddress(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ResolvedAddress>>;
/**

@@ -403,3 +404,3 @@ *

*/
getBlockHeights(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
getBlockHeights(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
/**

@@ -417,3 +418,3 @@ *

*/
getBlockHeightsByPage(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
getBlockHeightsByPage(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
/**

@@ -433,3 +434,3 @@ *

*/
getLogs(chainName: Chain | Chains, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
getLogs(chainName: Chain | Chains | ChainID, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
/**

@@ -448,3 +449,3 @@ *

*/
getLogEventsByAddress(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByAddress(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -463,3 +464,3 @@ *

*/
getLogEventsByAddressByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
getLogEventsByAddressByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
/**

@@ -479,3 +480,3 @@ *

*/
getLogEventsByTopicHash(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByTopicHash(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -495,3 +496,3 @@ *

*/
getLogEventsByTopicHashByPage(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
getLogEventsByTopicHashByPage(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
/**

@@ -498,0 +499,0 @@ *

@@ -10,3 +10,5 @@ import { SecurityService } from "./SecurityService";

export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.6";
export type ChainID = 20090103 | 1 | 137 | 56 | 43114 | 10 | 250 | 1284 | 1285 | 30 | 42161 | 11297108109 | 8217 | 128 | 71402 | 2020 | 9001 | 592 | 4689 | 1666600000 | 25 | 1313161554 | 42262 | 288 | 5 | 80001 | 43113 | 97 | 1287 | 31 | 421613 | 4002 | 11297108099 | 256 | 71401 | 9000 | 336 | 4690 | 1666700000 | 1313161555 | 534354 | 534351 | 1131378225 | 53935 | 73772 | 43288 | 1294 | 56288 | 28 | 1297 | 9728 | 4328 | 1001 | 192837465 | 356256156 | 1564830818 | 278611351 | 432204 | 1026062157 | 432201 | 81 | 338 | 335 | 1088 | 588 | 2002 | 200202 | 2001 | 200101 | 73773 | 1399811149 | 2046399126 | 82 | 83 | 2139927552 | 2888 | 245022926 | 344106930 | 476158412 | 42170 | 7700 | 119 | 1029 | 14 | 114 | 19 | 16 | 321 | 322 | 1422 | 59140 | 84531 | 5001 | 534353 | 248 | 9372 | 2152 | 2154 | 416 | 23294 | 23295 | 420 | 1101 | 1662 | 1024 | 39797 | 49797 | 1663 | 11155111 | 1482601649 | 644937893 | 222000222 | 49321 | 1231 | 1230 | 7777777 | 999 | 245022934 | 2044 | 8453 | 5000 | 262018 | 59144 | 7332 | 10507 | 7979 | 1234 | 1228 | 8888 | 333000333 | 12008 | 12011 | 2038 | 1995 | 12010 | 51178 | 12009 | 12012 | 324 | 599 | 280 | 1343 | 11115 | 6765897100 | 1079 | 13337 | 16350 | 1990 | 20221 | 5611 | 12018 | 12013 | 12020 | 12015 | 12016 | 12014 | 12017 | 12019 | 431234 | 6119 | 73 | 7001 | 42888 | 919 | 5151706 | 923018 | 3441005 | 424 | 58008 | 100 | 10200 | 570 | 57000 | 167007 | 11155420 | 204 | 40 | 41 | 321123 | 360163 | 78431 | 2037 | 17772 | 152703 | 894538 | 179188 | 78432 | 7777 | 986532 | 78430 | 2195 | 11111 | 3012 | 4337 | 534352 | 17000 | 88 | 89 | 20765 | 84532 | 47279324479 | 421614 | 12027 | 12028 | 12029 | 31330 | 31331 | 31332 | 31333 | 31334 | 31335 | 412346 | 8545 | 42220;
export type Source = "Ponder" | "GoldRush";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.8.0";
export declare class Response<T> {

@@ -38,3 +40,3 @@ data: T;

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -56,3 +58,3 @@ /**

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -488,4 +488,5 @@ declare class ChainCollectionResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -502,3 +503,3 @@ *

*/
getChainCollections(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
getChainCollections(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
/**

@@ -515,3 +516,3 @@ *

*/
getChainCollectionsByPage(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
getChainCollectionsByPage(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
/**

@@ -529,3 +530,3 @@ *

*/
getNftsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
getNftsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
/**

@@ -546,3 +547,3 @@ *

*/
getTokenIdsForContractWithMetadata(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
getTokenIdsForContractWithMetadata(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
/**

@@ -563,3 +564,3 @@ *

*/
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -577,3 +578,3 @@ *

*/
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -590,3 +591,3 @@ *

*/
getNftTransactionsForContractTokenId(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
getNftTransactionsForContractTokenId(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
/**

@@ -600,3 +601,3 @@ *

*/
getTraitsForCollection(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
getTraitsForCollection(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
/**

@@ -611,3 +612,3 @@ *

*/
getAttributesForTraitInCollection(chainName: Chain | Chains, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
getAttributesForTraitInCollection(chainName: Chain | Chains | ChainID, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
/**

@@ -621,3 +622,3 @@ *

*/
getCollectionTraitsSummary(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
getCollectionTraitsSummary(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
/**

@@ -632,3 +633,3 @@ *

*/
checkOwnershipInNft(chainName: Chain | Chains, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNft(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -644,3 +645,3 @@ *

*/
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -657,3 +658,3 @@ *

*/
getNftMarketSaleCount(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
getNftMarketSaleCount(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
/**

@@ -670,3 +671,3 @@ *

*/
getNftMarketVolume(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
getNftMarketVolume(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
/**

@@ -683,4 +684,4 @@ *

*/
getNftMarketFloorPrice(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
getNftMarketFloorPrice(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote } from "./CovalentClient";
import { Chain, ChainID, Quote, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -74,4 +74,5 @@ declare class TokenPricesResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -90,4 +91,4 @@ *

*/
getTokenPrices(chainName: Chain | Chains, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
getTokenPrices(chainName: Chain | Chains | ChainID, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Response } from "./CovalentClient";
import { Chain, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -141,4 +141,5 @@ declare class ApprovalsResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -152,3 +153,3 @@ *

*/
getApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<ApprovalsResponse>>;
getApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ApprovalsResponse>>;
/**

@@ -161,4 +162,4 @@ *

*/
getNftApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
getNftApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -343,2 +343,3 @@ declare class TransactionResponse {

private _enableRetry;
private _source;
/** * The requested address. */

@@ -359,3 +360,3 @@ address: string;

items: Transaction[];
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<RecentTransactionsResponse>>;

@@ -371,2 +372,22 @@ next(): Promise<Response<RecentTransactionsResponse>>;

}
declare class TransactionsBlockPageResponse {
private _debug;
private _apiKey;
private _threadCount;
private _urlParams;
private _enableRetry;
private _source;
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
constructor(data: TransactionsBlockPageResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsBlockPageResponse>>;
next(): Promise<Response<TransactionsBlockPageResponse>>;
}
declare class TransactionsBlockResponse {

@@ -420,2 +441,3 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

private _enableRetry;
private _source;
/** * The requested address. */

@@ -436,3 +458,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsResponse>>;

@@ -447,2 +469,3 @@ next(): Promise<Response<TransactionsResponse>>;

private _enableRetry;
private _source;
/** * The requested address. */

@@ -464,3 +487,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsTimeBucketResponse>>;

@@ -519,2 +542,18 @@ next(): Promise<Response<TransactionsTimeBucketResponse>>;

}
export interface GetTransactionsForBlockHashByPageQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export interface GetTransactionsForBlockHashQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export declare class TransactionService {

@@ -526,4 +565,5 @@ private apiKey;

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -544,3 +584,3 @@ *

*/
getTransaction(chainName: Chain | Chains, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
getTransaction(chainName: Chain | Chains | ChainID, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
/**

@@ -559,3 +599,3 @@ *

*/
getAllTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
getAllTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
/**

@@ -574,3 +614,3 @@ *

*/
getAllTransactionsForAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
getAllTransactionsForAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
/**

@@ -588,3 +628,3 @@ *

*/
getTransactionsForBlock(chainName: Chain | Chains, blockHeight: number, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
getTransactionsForBlock(chainName: Chain | Chains | ChainID, blockHeight: number | string, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
/**

@@ -598,3 +638,3 @@ *

*/
getTransactionSummary(chainName: Chain | Chains, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
getTransactionSummary(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
/**

@@ -612,3 +652,3 @@ *

*/
getTransactionsForAddressV3(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
getTransactionsForAddressV3(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
/**

@@ -625,4 +665,31 @@ *

*/
getTimeBucketTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
getTimeBucketTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {number} page - The requested 0-indexed page number.
* @param {GetTransactionsForBlockHashByPageQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHashByPage(chainName: Chain | Chains | ChainID, blockHash: string, page: number, queryParamOpts?: GetTransactionsForBlockHashByPageQueryParamOpts): Promise<Response<TransactionsBlockPageResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {GetTransactionsForBlockHashQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHash(chainName: Chain, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -398,2 +398,109 @@ declare class PoolResponse {

}
declare class NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkExchangeTokenViewResponse);
}
declare class TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
constructor(data: TokenV2VolumeWithChartData);
}
declare class VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
constructor(data: VolumeTokenTimeseries);
}
declare class LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
constructor(data: LiquidityTokenTimeseries);
}
declare class PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
constructor(data: PriceTokenTimeseries);
}
declare class SupportedDexesResponse {

@@ -540,2 +647,15 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
declare class NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkTransactionsResponse);
}
declare class EcosystemChartDataResponse {

@@ -622,2 +742,8 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface GetPoolsQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetPoolsForTokenAddressQueryParamOpts {

@@ -628,2 +754,4 @@ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}

@@ -637,3 +765,41 @@ export interface GetPoolsForWalletAddressQueryParamOpts {

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}
export interface GetNetworkExchangeTokensQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetLpTokenViewQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
}
export interface GetSingleNetworkExchangeTokenQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForTokenAddressQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForExchangeQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForDexQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
/**

@@ -649,4 +815,5 @@ * XYK APIs

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -658,5 +825,8 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetPoolsQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getPools(chainName: Chain | Chains, dexName: string): Promise<Response<PoolResponse>>;
getPools(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetPoolsQueryParamOpts): Promise<Response<PoolResponse>>;
/**

@@ -670,3 +840,3 @@ *

*/
getDexForPoolAddress(chainName: Chain | Chains, poolAddress: string): Promise<Response<PoolToDexResponse>>;
getDexForPoolAddress(chainName: Chain | Chains | ChainID, poolAddress: string): Promise<Response<PoolToDexResponse>>;
/**

@@ -681,3 +851,3 @@ *

*/
getPoolByAddress(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
getPoolByAddress(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
/**

@@ -692,5 +862,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForTokenAddress(chainName: Chain | Chains, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -705,3 +877,3 @@ *

*/
getAddressExchangeBalances(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
getAddressExchangeBalances(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
/**

@@ -717,5 +889,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForWalletAddress(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -727,7 +901,22 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetNetworkExchangeTokensQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getNetworkExchangeTokens(chainName: Chain | Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
getNetworkExchangeTokens(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetNetworkExchangeTokensQueryParamOpts): Promise<Response<NetworkExchangeTokensResponse>>;
/**
*
* Commonly used to get a detailed view for a single liquidity pool token. Includes time series data.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetLpTokenViewQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
*
*/
getLpTokenView(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetLpTokenViewQueryParamOpts): Promise<Response<NetworkExchangeTokenViewResponse>>;
/**
*
* Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.

@@ -745,5 +934,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetSingleNetworkExchangeTokenQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getSingleNetworkExchangeToken(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
getSingleNetworkExchangeToken(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetSingleNetworkExchangeTokenQueryParamOpts): Promise<Response<SingleNetworkExchangeTokenResponse>>;
/**

@@ -758,3 +950,3 @@ *

*/
getTransactionsForAccountAddress(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
getTransactionsForAccountAddress(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
/**

@@ -767,5 +959,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForTokenAddressQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForTokenAddress(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
getTransactionsForTokenAddress(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetTransactionsForTokenAddressQueryParamOpts): Promise<Response<TransactionsForTokenAddressResponse>>;
/**

@@ -778,7 +973,23 @@ *

* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForExchangeQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForExchange(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
getTransactionsForExchange(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string, queryParamOpts?: GetTransactionsForExchangeQueryParamOpts): Promise<Response<TransactionsForExchangeResponse>>;
/**
*
* Commonly used to get all the the transactions for a given DEX. Useful for building DEX activity views.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetTransactionsForDexQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForDex(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetTransactionsForDexQueryParamOpts): Promise<Response<NetworkTransactionsResponse>>;
/**
*
* Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.

@@ -790,3 +1001,3 @@ *

*/
getEcosystemChartData(chainName: Chain | Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
getEcosystemChartData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
/**

@@ -800,4 +1011,4 @@ *

*/
getHealthData(chainName: Chain | Chains, dexName: string): Promise<Response<HealthDataResponse>>;
getHealthData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<HealthDataResponse>>;
}
export {};

@@ -0,5 +1,6 @@

import { Source } from "../services/CovalentClient";
export declare function checkAndModifyResponse(jsonObj: any): void;
export declare function debugOutput(url: string, responseStatus: number, startTime: number | [number, number] | undefined): Promise<void>;
type Constructor<T> = new (...args: any[]) => T;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean): AsyncIterable<T1>;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean, source: Source): AsyncIterable<T1>;
export {};

@@ -0,1 +1,2 @@

import { Source } from "../services/CovalentClient";
export declare const DEFAULT_BACKOFF_MAX_RETRIES = 5;

@@ -9,4 +10,4 @@ export declare const BASE_DELAY_MS = 1000;

constructor(apiKey: string, debug: boolean, maxRetries?: number);
backOff(url: string): Promise<T>;
backOff(url: string, source: Source): Promise<T>;
setNumAttempts(retryCount: number): void;
}

@@ -360,1 +360,12 @@ import { ContractMetadata, LogEvent, Explorer } from "./GenericTypes";

}
export interface TransactionsBlockPageResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
}

@@ -366,2 +366,104 @@ import { Pagination, ContractMetadata } from "./GenericTypes";

}
export interface NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
}
export interface VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
}
export interface LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
}
export interface PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
}
export interface SupportedDexesResponse {

@@ -486,2 +588,14 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface EcosystemChartDataResponse {

@@ -488,0 +602,0 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -448,3 +448,3 @@ declare class BalancesResponse {

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -469,3 +469,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -478,3 +478,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
}

@@ -491,4 +491,5 @@ /**

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -508,3 +509,3 @@ *

*/
getTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
getTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
/**

@@ -521,3 +522,3 @@ *

*/
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
/**

@@ -538,3 +539,3 @@ *

*/
getErc20TransfersForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
getErc20TransfersForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
/**

@@ -555,3 +556,3 @@ *

*/
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
/**

@@ -570,3 +571,3 @@ *

*/
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
/**

@@ -585,3 +586,3 @@ *

*/
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
/**

@@ -603,3 +604,3 @@ *

*/
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
/**

@@ -614,4 +615,4 @@ *

*/
getNativeTokenBalance(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
getNativeTokenBalance(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -368,4 +368,5 @@ declare class BlockResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -379,3 +380,3 @@ *

*/
getBlock(chainName: Chain | Chains, blockHeight: string): Promise<Response<BlockResponse>>;
getBlock(chainName: Chain | Chains | ChainID, blockHeight: string): Promise<Response<BlockResponse>>;
/**

@@ -389,3 +390,3 @@ *

*/
getResolvedAddress(chainName: Chain | Chains, walletAddress: string): Promise<Response<ResolvedAddress>>;
getResolvedAddress(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ResolvedAddress>>;
/**

@@ -403,3 +404,3 @@ *

*/
getBlockHeights(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
getBlockHeights(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
/**

@@ -417,3 +418,3 @@ *

*/
getBlockHeightsByPage(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
getBlockHeightsByPage(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
/**

@@ -433,3 +434,3 @@ *

*/
getLogs(chainName: Chain | Chains, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
getLogs(chainName: Chain | Chains | ChainID, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
/**

@@ -448,3 +449,3 @@ *

*/
getLogEventsByAddress(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByAddress(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -463,3 +464,3 @@ *

*/
getLogEventsByAddressByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
getLogEventsByAddressByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
/**

@@ -479,3 +480,3 @@ *

*/
getLogEventsByTopicHash(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByTopicHash(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -495,3 +496,3 @@ *

*/
getLogEventsByTopicHashByPage(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
getLogEventsByTopicHashByPage(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
/**

@@ -498,0 +499,0 @@ *

@@ -10,3 +10,5 @@ import { SecurityService } from "./SecurityService";

export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.6";
export type ChainID = 20090103 | 1 | 137 | 56 | 43114 | 10 | 250 | 1284 | 1285 | 30 | 42161 | 11297108109 | 8217 | 128 | 71402 | 2020 | 9001 | 592 | 4689 | 1666600000 | 25 | 1313161554 | 42262 | 288 | 5 | 80001 | 43113 | 97 | 1287 | 31 | 421613 | 4002 | 11297108099 | 256 | 71401 | 9000 | 336 | 4690 | 1666700000 | 1313161555 | 534354 | 534351 | 1131378225 | 53935 | 73772 | 43288 | 1294 | 56288 | 28 | 1297 | 9728 | 4328 | 1001 | 192837465 | 356256156 | 1564830818 | 278611351 | 432204 | 1026062157 | 432201 | 81 | 338 | 335 | 1088 | 588 | 2002 | 200202 | 2001 | 200101 | 73773 | 1399811149 | 2046399126 | 82 | 83 | 2139927552 | 2888 | 245022926 | 344106930 | 476158412 | 42170 | 7700 | 119 | 1029 | 14 | 114 | 19 | 16 | 321 | 322 | 1422 | 59140 | 84531 | 5001 | 534353 | 248 | 9372 | 2152 | 2154 | 416 | 23294 | 23295 | 420 | 1101 | 1662 | 1024 | 39797 | 49797 | 1663 | 11155111 | 1482601649 | 644937893 | 222000222 | 49321 | 1231 | 1230 | 7777777 | 999 | 245022934 | 2044 | 8453 | 5000 | 262018 | 59144 | 7332 | 10507 | 7979 | 1234 | 1228 | 8888 | 333000333 | 12008 | 12011 | 2038 | 1995 | 12010 | 51178 | 12009 | 12012 | 324 | 599 | 280 | 1343 | 11115 | 6765897100 | 1079 | 13337 | 16350 | 1990 | 20221 | 5611 | 12018 | 12013 | 12020 | 12015 | 12016 | 12014 | 12017 | 12019 | 431234 | 6119 | 73 | 7001 | 42888 | 919 | 5151706 | 923018 | 3441005 | 424 | 58008 | 100 | 10200 | 570 | 57000 | 167007 | 11155420 | 204 | 40 | 41 | 321123 | 360163 | 78431 | 2037 | 17772 | 152703 | 894538 | 179188 | 78432 | 7777 | 986532 | 78430 | 2195 | 11111 | 3012 | 4337 | 534352 | 17000 | 88 | 89 | 20765 | 84532 | 47279324479 | 421614 | 12027 | 12028 | 12029 | 31330 | 31331 | 31332 | 31333 | 31334 | 31335 | 412346 | 8545 | 42220;
export type Source = "Ponder" | "GoldRush";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.8.0";
export declare class Response<T> {

@@ -38,3 +40,3 @@ data: T;

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -56,3 +58,3 @@ /**

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -488,4 +488,5 @@ declare class ChainCollectionResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -502,3 +503,3 @@ *

*/
getChainCollections(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
getChainCollections(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
/**

@@ -515,3 +516,3 @@ *

*/
getChainCollectionsByPage(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
getChainCollectionsByPage(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
/**

@@ -529,3 +530,3 @@ *

*/
getNftsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
getNftsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
/**

@@ -546,3 +547,3 @@ *

*/
getTokenIdsForContractWithMetadata(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
getTokenIdsForContractWithMetadata(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
/**

@@ -563,3 +564,3 @@ *

*/
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -577,3 +578,3 @@ *

*/
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -590,3 +591,3 @@ *

*/
getNftTransactionsForContractTokenId(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
getNftTransactionsForContractTokenId(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
/**

@@ -600,3 +601,3 @@ *

*/
getTraitsForCollection(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
getTraitsForCollection(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
/**

@@ -611,3 +612,3 @@ *

*/
getAttributesForTraitInCollection(chainName: Chain | Chains, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
getAttributesForTraitInCollection(chainName: Chain | Chains | ChainID, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
/**

@@ -621,3 +622,3 @@ *

*/
getCollectionTraitsSummary(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
getCollectionTraitsSummary(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
/**

@@ -632,3 +633,3 @@ *

*/
checkOwnershipInNft(chainName: Chain | Chains, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNft(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -644,3 +645,3 @@ *

*/
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -657,3 +658,3 @@ *

*/
getNftMarketSaleCount(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
getNftMarketSaleCount(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
/**

@@ -670,3 +671,3 @@ *

*/
getNftMarketVolume(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
getNftMarketVolume(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
/**

@@ -683,4 +684,4 @@ *

*/
getNftMarketFloorPrice(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
getNftMarketFloorPrice(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote } from "./CovalentClient";
import { Chain, ChainID, Quote, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -74,4 +74,5 @@ declare class TokenPricesResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -90,4 +91,4 @@ *

*/
getTokenPrices(chainName: Chain | Chains, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
getTokenPrices(chainName: Chain | Chains | ChainID, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Response } from "./CovalentClient";
import { Chain, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -141,4 +141,5 @@ declare class ApprovalsResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -152,3 +153,3 @@ *

*/
getApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<ApprovalsResponse>>;
getApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ApprovalsResponse>>;
/**

@@ -161,4 +162,4 @@ *

*/
getNftApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
getNftApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -343,2 +343,3 @@ declare class TransactionResponse {

private _enableRetry;
private _source;
/** * The requested address. */

@@ -359,3 +360,3 @@ address: string;

items: Transaction[];
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<RecentTransactionsResponse>>;

@@ -371,2 +372,22 @@ next(): Promise<Response<RecentTransactionsResponse>>;

}
declare class TransactionsBlockPageResponse {
private _debug;
private _apiKey;
private _threadCount;
private _urlParams;
private _enableRetry;
private _source;
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
constructor(data: TransactionsBlockPageResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsBlockPageResponse>>;
next(): Promise<Response<TransactionsBlockPageResponse>>;
}
declare class TransactionsBlockResponse {

@@ -420,2 +441,3 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

private _enableRetry;
private _source;
/** * The requested address. */

@@ -436,3 +458,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsResponse>>;

@@ -447,2 +469,3 @@ next(): Promise<Response<TransactionsResponse>>;

private _enableRetry;
private _source;
/** * The requested address. */

@@ -464,3 +487,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsTimeBucketResponse>>;

@@ -519,2 +542,18 @@ next(): Promise<Response<TransactionsTimeBucketResponse>>;

}
export interface GetTransactionsForBlockHashByPageQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export interface GetTransactionsForBlockHashQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export declare class TransactionService {

@@ -526,4 +565,5 @@ private apiKey;

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -544,3 +584,3 @@ *

*/
getTransaction(chainName: Chain | Chains, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
getTransaction(chainName: Chain | Chains | ChainID, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
/**

@@ -559,3 +599,3 @@ *

*/
getAllTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
getAllTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
/**

@@ -574,3 +614,3 @@ *

*/
getAllTransactionsForAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
getAllTransactionsForAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
/**

@@ -588,3 +628,3 @@ *

*/
getTransactionsForBlock(chainName: Chain | Chains, blockHeight: number, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
getTransactionsForBlock(chainName: Chain | Chains | ChainID, blockHeight: number | string, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
/**

@@ -598,3 +638,3 @@ *

*/
getTransactionSummary(chainName: Chain | Chains, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
getTransactionSummary(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
/**

@@ -612,3 +652,3 @@ *

*/
getTransactionsForAddressV3(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
getTransactionsForAddressV3(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
/**

@@ -625,4 +665,31 @@ *

*/
getTimeBucketTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
getTimeBucketTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {number} page - The requested 0-indexed page number.
* @param {GetTransactionsForBlockHashByPageQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHashByPage(chainName: Chain | Chains | ChainID, blockHash: string, page: number, queryParamOpts?: GetTransactionsForBlockHashByPageQueryParamOpts): Promise<Response<TransactionsBlockPageResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {GetTransactionsForBlockHashQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHash(chainName: Chain, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -398,2 +398,109 @@ declare class PoolResponse {

}
declare class NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkExchangeTokenViewResponse);
}
declare class TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
constructor(data: TokenV2VolumeWithChartData);
}
declare class VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
constructor(data: VolumeTokenTimeseries);
}
declare class LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
constructor(data: LiquidityTokenTimeseries);
}
declare class PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
constructor(data: PriceTokenTimeseries);
}
declare class SupportedDexesResponse {

@@ -540,2 +647,15 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
declare class NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkTransactionsResponse);
}
declare class EcosystemChartDataResponse {

@@ -622,2 +742,8 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface GetPoolsQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetPoolsForTokenAddressQueryParamOpts {

@@ -628,2 +754,4 @@ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}

@@ -637,3 +765,41 @@ export interface GetPoolsForWalletAddressQueryParamOpts {

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}
export interface GetNetworkExchangeTokensQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetLpTokenViewQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
}
export interface GetSingleNetworkExchangeTokenQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForTokenAddressQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForExchangeQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForDexQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
/**

@@ -649,4 +815,5 @@ * XYK APIs

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -658,5 +825,8 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetPoolsQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getPools(chainName: Chain | Chains, dexName: string): Promise<Response<PoolResponse>>;
getPools(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetPoolsQueryParamOpts): Promise<Response<PoolResponse>>;
/**

@@ -670,3 +840,3 @@ *

*/
getDexForPoolAddress(chainName: Chain | Chains, poolAddress: string): Promise<Response<PoolToDexResponse>>;
getDexForPoolAddress(chainName: Chain | Chains | ChainID, poolAddress: string): Promise<Response<PoolToDexResponse>>;
/**

@@ -681,3 +851,3 @@ *

*/
getPoolByAddress(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
getPoolByAddress(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
/**

@@ -692,5 +862,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForTokenAddress(chainName: Chain | Chains, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -705,3 +877,3 @@ *

*/
getAddressExchangeBalances(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
getAddressExchangeBalances(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
/**

@@ -717,5 +889,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForWalletAddress(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -727,7 +901,22 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetNetworkExchangeTokensQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getNetworkExchangeTokens(chainName: Chain | Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
getNetworkExchangeTokens(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetNetworkExchangeTokensQueryParamOpts): Promise<Response<NetworkExchangeTokensResponse>>;
/**
*
* Commonly used to get a detailed view for a single liquidity pool token. Includes time series data.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetLpTokenViewQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
*
*/
getLpTokenView(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetLpTokenViewQueryParamOpts): Promise<Response<NetworkExchangeTokenViewResponse>>;
/**
*
* Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.

@@ -745,5 +934,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetSingleNetworkExchangeTokenQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getSingleNetworkExchangeToken(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
getSingleNetworkExchangeToken(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetSingleNetworkExchangeTokenQueryParamOpts): Promise<Response<SingleNetworkExchangeTokenResponse>>;
/**

@@ -758,3 +950,3 @@ *

*/
getTransactionsForAccountAddress(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
getTransactionsForAccountAddress(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
/**

@@ -767,5 +959,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForTokenAddressQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForTokenAddress(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
getTransactionsForTokenAddress(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetTransactionsForTokenAddressQueryParamOpts): Promise<Response<TransactionsForTokenAddressResponse>>;
/**

@@ -778,7 +973,23 @@ *

* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForExchangeQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForExchange(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
getTransactionsForExchange(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string, queryParamOpts?: GetTransactionsForExchangeQueryParamOpts): Promise<Response<TransactionsForExchangeResponse>>;
/**
*
* Commonly used to get all the the transactions for a given DEX. Useful for building DEX activity views.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetTransactionsForDexQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForDex(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetTransactionsForDexQueryParamOpts): Promise<Response<NetworkTransactionsResponse>>;
/**
*
* Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.

@@ -790,3 +1001,3 @@ *

*/
getEcosystemChartData(chainName: Chain | Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
getEcosystemChartData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
/**

@@ -800,4 +1011,4 @@ *

*/
getHealthData(chainName: Chain | Chains, dexName: string): Promise<Response<HealthDataResponse>>;
getHealthData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<HealthDataResponse>>;
}
export {};

@@ -0,5 +1,6 @@

import { Source } from "../services/CovalentClient";
export declare function checkAndModifyResponse(jsonObj: any): void;
export declare function debugOutput(url: string, responseStatus: number, startTime: number | [number, number] | undefined): Promise<void>;
type Constructor<T> = new (...args: any[]) => T;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean): AsyncIterable<T1>;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean, source: Source): AsyncIterable<T1>;
export {};

@@ -0,1 +1,2 @@

import { Source } from "../services/CovalentClient";
export declare const DEFAULT_BACKOFF_MAX_RETRIES = 5;

@@ -9,4 +10,4 @@ export declare const BASE_DELAY_MS = 1000;

constructor(apiKey: string, debug: boolean, maxRetries?: number);
backOff(url: string): Promise<T>;
backOff(url: string, source: Source): Promise<T>;
setNumAttempts(retryCount: number): void;
}

@@ -360,1 +360,12 @@ import { ContractMetadata, LogEvent, Explorer } from "./GenericTypes";

}
export interface TransactionsBlockPageResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
}

@@ -366,2 +366,104 @@ import { Pagination, ContractMetadata } from "./GenericTypes";

}
export interface NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
}
export interface VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
}
export interface LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
}
export interface PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
}
export interface SupportedDexesResponse {

@@ -486,2 +588,14 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface EcosystemChartDataResponse {

@@ -488,0 +602,0 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -448,3 +448,3 @@ declare class BalancesResponse {

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -469,3 +469,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -478,3 +478,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
}

@@ -491,4 +491,5 @@ /**

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -508,3 +509,3 @@ *

*/
getTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
getTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
/**

@@ -521,3 +522,3 @@ *

*/
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
/**

@@ -538,3 +539,3 @@ *

*/
getErc20TransfersForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
getErc20TransfersForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
/**

@@ -555,3 +556,3 @@ *

*/
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
/**

@@ -570,3 +571,3 @@ *

*/
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
/**

@@ -585,3 +586,3 @@ *

*/
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
/**

@@ -603,3 +604,3 @@ *

*/
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
/**

@@ -614,4 +615,4 @@ *

*/
getNativeTokenBalance(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
getNativeTokenBalance(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -368,4 +368,5 @@ declare class BlockResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -379,3 +380,3 @@ *

*/
getBlock(chainName: Chain | Chains, blockHeight: string): Promise<Response<BlockResponse>>;
getBlock(chainName: Chain | Chains | ChainID, blockHeight: string): Promise<Response<BlockResponse>>;
/**

@@ -389,3 +390,3 @@ *

*/
getResolvedAddress(chainName: Chain | Chains, walletAddress: string): Promise<Response<ResolvedAddress>>;
getResolvedAddress(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ResolvedAddress>>;
/**

@@ -403,3 +404,3 @@ *

*/
getBlockHeights(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
getBlockHeights(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
/**

@@ -417,3 +418,3 @@ *

*/
getBlockHeightsByPage(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
getBlockHeightsByPage(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
/**

@@ -433,3 +434,3 @@ *

*/
getLogs(chainName: Chain | Chains, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
getLogs(chainName: Chain | Chains | ChainID, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
/**

@@ -448,3 +449,3 @@ *

*/
getLogEventsByAddress(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByAddress(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -463,3 +464,3 @@ *

*/
getLogEventsByAddressByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
getLogEventsByAddressByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
/**

@@ -479,3 +480,3 @@ *

*/
getLogEventsByTopicHash(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByTopicHash(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -495,3 +496,3 @@ *

*/
getLogEventsByTopicHashByPage(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
getLogEventsByTopicHashByPage(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
/**

@@ -498,0 +499,0 @@ *

@@ -10,3 +10,5 @@ import { SecurityService } from "./SecurityService";

export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.6";
export type ChainID = 20090103 | 1 | 137 | 56 | 43114 | 10 | 250 | 1284 | 1285 | 30 | 42161 | 11297108109 | 8217 | 128 | 71402 | 2020 | 9001 | 592 | 4689 | 1666600000 | 25 | 1313161554 | 42262 | 288 | 5 | 80001 | 43113 | 97 | 1287 | 31 | 421613 | 4002 | 11297108099 | 256 | 71401 | 9000 | 336 | 4690 | 1666700000 | 1313161555 | 534354 | 534351 | 1131378225 | 53935 | 73772 | 43288 | 1294 | 56288 | 28 | 1297 | 9728 | 4328 | 1001 | 192837465 | 356256156 | 1564830818 | 278611351 | 432204 | 1026062157 | 432201 | 81 | 338 | 335 | 1088 | 588 | 2002 | 200202 | 2001 | 200101 | 73773 | 1399811149 | 2046399126 | 82 | 83 | 2139927552 | 2888 | 245022926 | 344106930 | 476158412 | 42170 | 7700 | 119 | 1029 | 14 | 114 | 19 | 16 | 321 | 322 | 1422 | 59140 | 84531 | 5001 | 534353 | 248 | 9372 | 2152 | 2154 | 416 | 23294 | 23295 | 420 | 1101 | 1662 | 1024 | 39797 | 49797 | 1663 | 11155111 | 1482601649 | 644937893 | 222000222 | 49321 | 1231 | 1230 | 7777777 | 999 | 245022934 | 2044 | 8453 | 5000 | 262018 | 59144 | 7332 | 10507 | 7979 | 1234 | 1228 | 8888 | 333000333 | 12008 | 12011 | 2038 | 1995 | 12010 | 51178 | 12009 | 12012 | 324 | 599 | 280 | 1343 | 11115 | 6765897100 | 1079 | 13337 | 16350 | 1990 | 20221 | 5611 | 12018 | 12013 | 12020 | 12015 | 12016 | 12014 | 12017 | 12019 | 431234 | 6119 | 73 | 7001 | 42888 | 919 | 5151706 | 923018 | 3441005 | 424 | 58008 | 100 | 10200 | 570 | 57000 | 167007 | 11155420 | 204 | 40 | 41 | 321123 | 360163 | 78431 | 2037 | 17772 | 152703 | 894538 | 179188 | 78432 | 7777 | 986532 | 78430 | 2195 | 11111 | 3012 | 4337 | 534352 | 17000 | 88 | 89 | 20765 | 84532 | 47279324479 | 421614 | 12027 | 12028 | 12029 | 31330 | 31331 | 31332 | 31333 | 31334 | 31335 | 412346 | 8545 | 42220;
export type Source = "Ponder" | "GoldRush";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.8.0";
export declare class Response<T> {

@@ -38,3 +40,3 @@ data: T;

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -56,3 +58,3 @@ /**

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -488,4 +488,5 @@ declare class ChainCollectionResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -502,3 +503,3 @@ *

*/
getChainCollections(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
getChainCollections(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
/**

@@ -515,3 +516,3 @@ *

*/
getChainCollectionsByPage(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
getChainCollectionsByPage(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
/**

@@ -529,3 +530,3 @@ *

*/
getNftsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
getNftsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
/**

@@ -546,3 +547,3 @@ *

*/
getTokenIdsForContractWithMetadata(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
getTokenIdsForContractWithMetadata(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
/**

@@ -563,3 +564,3 @@ *

*/
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -577,3 +578,3 @@ *

*/
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -590,3 +591,3 @@ *

*/
getNftTransactionsForContractTokenId(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
getNftTransactionsForContractTokenId(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
/**

@@ -600,3 +601,3 @@ *

*/
getTraitsForCollection(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
getTraitsForCollection(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
/**

@@ -611,3 +612,3 @@ *

*/
getAttributesForTraitInCollection(chainName: Chain | Chains, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
getAttributesForTraitInCollection(chainName: Chain | Chains | ChainID, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
/**

@@ -621,3 +622,3 @@ *

*/
getCollectionTraitsSummary(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
getCollectionTraitsSummary(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
/**

@@ -632,3 +633,3 @@ *

*/
checkOwnershipInNft(chainName: Chain | Chains, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNft(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -644,3 +645,3 @@ *

*/
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -657,3 +658,3 @@ *

*/
getNftMarketSaleCount(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
getNftMarketSaleCount(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
/**

@@ -670,3 +671,3 @@ *

*/
getNftMarketVolume(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
getNftMarketVolume(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
/**

@@ -683,4 +684,4 @@ *

*/
getNftMarketFloorPrice(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
getNftMarketFloorPrice(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote } from "./CovalentClient";
import { Chain, ChainID, Quote, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -74,4 +74,5 @@ declare class TokenPricesResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -90,4 +91,4 @@ *

*/
getTokenPrices(chainName: Chain | Chains, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
getTokenPrices(chainName: Chain | Chains | ChainID, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Response } from "./CovalentClient";
import { Chain, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -141,4 +141,5 @@ declare class ApprovalsResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -152,3 +153,3 @@ *

*/
getApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<ApprovalsResponse>>;
getApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ApprovalsResponse>>;
/**

@@ -161,4 +162,4 @@ *

*/
getNftApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
getNftApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -343,2 +343,3 @@ declare class TransactionResponse {

private _enableRetry;
private _source;
/** * The requested address. */

@@ -359,3 +360,3 @@ address: string;

items: Transaction[];
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<RecentTransactionsResponse>>;

@@ -371,2 +372,22 @@ next(): Promise<Response<RecentTransactionsResponse>>;

}
declare class TransactionsBlockPageResponse {
private _debug;
private _apiKey;
private _threadCount;
private _urlParams;
private _enableRetry;
private _source;
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
constructor(data: TransactionsBlockPageResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsBlockPageResponse>>;
next(): Promise<Response<TransactionsBlockPageResponse>>;
}
declare class TransactionsBlockResponse {

@@ -420,2 +441,3 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

private _enableRetry;
private _source;
/** * The requested address. */

@@ -436,3 +458,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsResponse>>;

@@ -447,2 +469,3 @@ next(): Promise<Response<TransactionsResponse>>;

private _enableRetry;
private _source;
/** * The requested address. */

@@ -464,3 +487,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsTimeBucketResponse>>;

@@ -519,2 +542,18 @@ next(): Promise<Response<TransactionsTimeBucketResponse>>;

}
export interface GetTransactionsForBlockHashByPageQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export interface GetTransactionsForBlockHashQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export declare class TransactionService {

@@ -526,4 +565,5 @@ private apiKey;

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -544,3 +584,3 @@ *

*/
getTransaction(chainName: Chain | Chains, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
getTransaction(chainName: Chain | Chains | ChainID, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
/**

@@ -559,3 +599,3 @@ *

*/
getAllTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
getAllTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
/**

@@ -574,3 +614,3 @@ *

*/
getAllTransactionsForAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
getAllTransactionsForAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
/**

@@ -588,3 +628,3 @@ *

*/
getTransactionsForBlock(chainName: Chain | Chains, blockHeight: number, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
getTransactionsForBlock(chainName: Chain | Chains | ChainID, blockHeight: number | string, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
/**

@@ -598,3 +638,3 @@ *

*/
getTransactionSummary(chainName: Chain | Chains, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
getTransactionSummary(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
/**

@@ -612,3 +652,3 @@ *

*/
getTransactionsForAddressV3(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
getTransactionsForAddressV3(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
/**

@@ -625,4 +665,31 @@ *

*/
getTimeBucketTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
getTimeBucketTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {number} page - The requested 0-indexed page number.
* @param {GetTransactionsForBlockHashByPageQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHashByPage(chainName: Chain | Chains | ChainID, blockHash: string, page: number, queryParamOpts?: GetTransactionsForBlockHashByPageQueryParamOpts): Promise<Response<TransactionsBlockPageResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {GetTransactionsForBlockHashQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHash(chainName: Chain, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -398,2 +398,109 @@ declare class PoolResponse {

}
declare class NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkExchangeTokenViewResponse);
}
declare class TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
constructor(data: TokenV2VolumeWithChartData);
}
declare class VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
constructor(data: VolumeTokenTimeseries);
}
declare class LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
constructor(data: LiquidityTokenTimeseries);
}
declare class PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
constructor(data: PriceTokenTimeseries);
}
declare class SupportedDexesResponse {

@@ -540,2 +647,15 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
declare class NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkTransactionsResponse);
}
declare class EcosystemChartDataResponse {

@@ -622,2 +742,8 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface GetPoolsQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetPoolsForTokenAddressQueryParamOpts {

@@ -628,2 +754,4 @@ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}

@@ -637,3 +765,41 @@ export interface GetPoolsForWalletAddressQueryParamOpts {

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}
export interface GetNetworkExchangeTokensQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetLpTokenViewQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
}
export interface GetSingleNetworkExchangeTokenQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForTokenAddressQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForExchangeQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForDexQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
/**

@@ -649,4 +815,5 @@ * XYK APIs

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -658,5 +825,8 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetPoolsQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getPools(chainName: Chain | Chains, dexName: string): Promise<Response<PoolResponse>>;
getPools(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetPoolsQueryParamOpts): Promise<Response<PoolResponse>>;
/**

@@ -670,3 +840,3 @@ *

*/
getDexForPoolAddress(chainName: Chain | Chains, poolAddress: string): Promise<Response<PoolToDexResponse>>;
getDexForPoolAddress(chainName: Chain | Chains | ChainID, poolAddress: string): Promise<Response<PoolToDexResponse>>;
/**

@@ -681,3 +851,3 @@ *

*/
getPoolByAddress(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
getPoolByAddress(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
/**

@@ -692,5 +862,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForTokenAddress(chainName: Chain | Chains, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -705,3 +877,3 @@ *

*/
getAddressExchangeBalances(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
getAddressExchangeBalances(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
/**

@@ -717,5 +889,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForWalletAddress(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -727,7 +901,22 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetNetworkExchangeTokensQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getNetworkExchangeTokens(chainName: Chain | Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
getNetworkExchangeTokens(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetNetworkExchangeTokensQueryParamOpts): Promise<Response<NetworkExchangeTokensResponse>>;
/**
*
* Commonly used to get a detailed view for a single liquidity pool token. Includes time series data.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetLpTokenViewQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
*
*/
getLpTokenView(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetLpTokenViewQueryParamOpts): Promise<Response<NetworkExchangeTokenViewResponse>>;
/**
*
* Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.

@@ -745,5 +934,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetSingleNetworkExchangeTokenQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getSingleNetworkExchangeToken(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
getSingleNetworkExchangeToken(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetSingleNetworkExchangeTokenQueryParamOpts): Promise<Response<SingleNetworkExchangeTokenResponse>>;
/**

@@ -758,3 +950,3 @@ *

*/
getTransactionsForAccountAddress(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
getTransactionsForAccountAddress(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
/**

@@ -767,5 +959,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForTokenAddressQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForTokenAddress(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
getTransactionsForTokenAddress(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetTransactionsForTokenAddressQueryParamOpts): Promise<Response<TransactionsForTokenAddressResponse>>;
/**

@@ -778,7 +973,23 @@ *

* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForExchangeQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForExchange(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
getTransactionsForExchange(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string, queryParamOpts?: GetTransactionsForExchangeQueryParamOpts): Promise<Response<TransactionsForExchangeResponse>>;
/**
*
* Commonly used to get all the the transactions for a given DEX. Useful for building DEX activity views.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetTransactionsForDexQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForDex(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetTransactionsForDexQueryParamOpts): Promise<Response<NetworkTransactionsResponse>>;
/**
*
* Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.

@@ -790,3 +1001,3 @@ *

*/
getEcosystemChartData(chainName: Chain | Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
getEcosystemChartData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
/**

@@ -800,4 +1011,4 @@ *

*/
getHealthData(chainName: Chain | Chains, dexName: string): Promise<Response<HealthDataResponse>>;
getHealthData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<HealthDataResponse>>;
}
export {};

@@ -0,5 +1,6 @@

import { Source } from "../services/CovalentClient";
export declare function checkAndModifyResponse(jsonObj: any): void;
export declare function debugOutput(url: string, responseStatus: number, startTime: number | [number, number] | undefined): Promise<void>;
type Constructor<T> = new (...args: any[]) => T;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean): AsyncIterable<T1>;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean, source: Source): AsyncIterable<T1>;
export {};

@@ -0,1 +1,2 @@

import { Source } from "../services/CovalentClient";
export declare const DEFAULT_BACKOFF_MAX_RETRIES = 5;

@@ -9,4 +10,4 @@ export declare const BASE_DELAY_MS = 1000;

constructor(apiKey: string, debug: boolean, maxRetries?: number);
backOff(url: string): Promise<T>;
backOff(url: string, source: Source): Promise<T>;
setNumAttempts(retryCount: number): void;
}

@@ -360,1 +360,12 @@ import { ContractMetadata, LogEvent, Explorer } from "./GenericTypes";

}
export interface TransactionsBlockPageResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
}

@@ -366,2 +366,104 @@ import { Pagination, ContractMetadata } from "./GenericTypes";

}
export interface NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
}
export interface VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
}
export interface LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
}
export interface PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
}
export interface SupportedDexesResponse {

@@ -486,2 +588,14 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface EcosystemChartDataResponse {

@@ -488,0 +602,0 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -448,3 +448,3 @@ declare class BalancesResponse {

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -469,3 +469,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
/** * Ending date to define a block range (YYYY-MM-DD). Omitting this parameter defaults to the current date. */

@@ -478,3 +478,3 @@ date?: string;

/** * Ending block to define a block range. Omitting this parameter defaults to the latest block height. */
blockHeight?: number;
blockHeight?: number | string;
}

@@ -491,4 +491,5 @@ /**

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -508,3 +509,3 @@ *

*/
getTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
getTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<BalancesResponse>>;
/**

@@ -521,3 +522,3 @@ *

*/
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
getHistoricalPortfolioForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalPortfolioForWalletAddressQueryParamOpts): Promise<Response<PortfolioResponse>>;
/**

@@ -538,3 +539,3 @@ *

*/
getErc20TransfersForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
getErc20TransfersForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): AsyncIterable<BlockTransactionWithContractTransfers>;
/**

@@ -555,3 +556,3 @@ *

*/
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
getErc20TransfersForWalletAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetErc20TransfersForWalletAddressQueryParamOpts): Promise<Response<Erc20TransfersResponse>>;
/**

@@ -570,3 +571,3 @@ *

*/
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
getTokenHoldersV2ForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): AsyncIterable<TokenHolder>;
/**

@@ -585,3 +586,3 @@ *

*/
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
getTokenHoldersV2ForTokenAddressByPage(chainName: Chain | Chains | ChainID, tokenAddress: string, queryParamOpts?: GetTokenHoldersV2ForTokenAddressQueryParamOpts): Promise<Response<TokenHoldersResponse>>;
/**

@@ -603,3 +604,3 @@ *

*/
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
getHistoricalTokenBalancesForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetHistoricalTokenBalancesForWalletAddressQueryParamOpts): Promise<Response<HistoricalBalancesResponse>>;
/**

@@ -614,4 +615,4 @@ *

*/
getNativeTokenBalance(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
getNativeTokenBalance(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNativeTokenBalanceQueryParamOpts): Promise<Response<TokenBalanceNativeResponse>>;
}
export {};

@@ -288,3 +288,3 @@ import { userAgent } from "./CovalentClient";

export class BalanceService {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true) {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true, source) {
this.apiKey = apiKey;

@@ -295,2 +295,3 @@ this.debug = debug;

this.enableRetry = enableRetry;
this.source = source;
this.LIMIT = pLimit(this.threadCount);

@@ -351,3 +352,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -358,3 +359,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -436,3 +437,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -443,3 +444,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -522,3 +523,3 @@ catch (error) {

}
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/address/${walletAddress}/transfers_v2/`, this.apiKey, urlParams, BlockTransactionWithContractTransfers, this.debug, this.threadCount, this.enableRetry)) {
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/address/${walletAddress}/transfers_v2/`, this.apiKey, urlParams, BlockTransactionWithContractTransfers, this.debug, this.threadCount, this.enableRetry, this.source)) {
yield res;

@@ -591,3 +592,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -598,3 +599,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -669,3 +670,3 @@ catch (error) {

}
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/tokens/${tokenAddress}/token_holders_v2/`, this.apiKey, urlParams, TokenHolder, this.debug, this.threadCount, this.enableRetry)) {
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/tokens/${tokenAddress}/token_holders_v2/`, this.apiKey, urlParams, TokenHolder, this.debug, this.threadCount, this.enableRetry, this.source)) {
yield res;

@@ -730,3 +731,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -737,3 +738,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -835,3 +836,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -842,3 +843,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -918,3 +919,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -925,3 +926,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -928,0 +929,0 @@ catch (error) {

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -368,4 +368,5 @@ declare class BlockResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -379,3 +380,3 @@ *

*/
getBlock(chainName: Chain | Chains, blockHeight: string): Promise<Response<BlockResponse>>;
getBlock(chainName: Chain | Chains | ChainID, blockHeight: string): Promise<Response<BlockResponse>>;
/**

@@ -389,3 +390,3 @@ *

*/
getResolvedAddress(chainName: Chain | Chains, walletAddress: string): Promise<Response<ResolvedAddress>>;
getResolvedAddress(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ResolvedAddress>>;
/**

@@ -403,3 +404,3 @@ *

*/
getBlockHeights(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
getBlockHeights(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): AsyncIterable<Block>;
/**

@@ -417,3 +418,3 @@ *

*/
getBlockHeightsByPage(chainName: Chain | Chains, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
getBlockHeightsByPage(chainName: Chain | Chains | ChainID, startDate: string, endDate: string, queryParamOpts?: GetBlockHeightsQueryParamOpts): Promise<Response<BlockHeightsResponse>>;
/**

@@ -433,3 +434,3 @@ *

*/
getLogs(chainName: Chain | Chains, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
getLogs(chainName: Chain | Chains | ChainID, queryParamOpts?: GetLogsQueryParamOpts): Promise<Response<GetLogsResponse>>;
/**

@@ -448,3 +449,3 @@ *

*/
getLogEventsByAddress(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByAddress(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -463,3 +464,3 @@ *

*/
getLogEventsByAddressByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
getLogEventsByAddressByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetLogEventsByAddressQueryParamOpts): Promise<Response<LogEventsByAddressResponse>>;
/**

@@ -479,3 +480,3 @@ *

*/
getLogEventsByTopicHash(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
getLogEventsByTopicHash(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): AsyncIterable<LogEvent>;
/**

@@ -495,3 +496,3 @@ *

*/
getLogEventsByTopicHashByPage(chainName: Chain | Chains, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
getLogEventsByTopicHashByPage(chainName: Chain | Chains | ChainID, topicHash: string, queryParamOpts?: GetLogEventsByTopicHashQueryParamOpts): Promise<Response<LogEventsByTopicHashResponse>>;
/**

@@ -498,0 +499,0 @@ *

@@ -228,3 +228,3 @@ import { userAgent } from "./CovalentClient";

export class BaseService {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true) {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true, source) {
this.apiKey = apiKey;

@@ -235,2 +235,3 @@ this.debug = debug;

this.enableRetry = enableRetry;
this.source = source;
this.LIMIT = pLimit(this.threadCount);

@@ -270,3 +271,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -277,3 +278,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -346,3 +347,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -353,3 +354,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -417,3 +418,3 @@ catch (error) {

}
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/block_v2/${startDate}/${endDate}/`, this.apiKey, urlParams, Block, this.debug, this.threadCount, this.enableRetry)) {
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/block_v2/${startDate}/${endDate}/`, this.apiKey, urlParams, Block, this.debug, this.threadCount, this.enableRetry, this.source)) {
yield res;

@@ -471,3 +472,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -478,3 +479,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -571,3 +572,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -578,3 +579,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -649,3 +650,3 @@ catch (error) {

}
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/events/address/${contractAddress}/`, this.apiKey, urlParams, LogEvent, this.debug, this.threadCount, this.enableRetry)) {
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/events/address/${contractAddress}/`, this.apiKey, urlParams, LogEvent, this.debug, this.threadCount, this.enableRetry, this.source)) {
yield res;

@@ -710,3 +711,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -717,3 +718,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -792,3 +793,3 @@ catch (error) {

}
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/events/topics/${topicHash}/`, this.apiKey, urlParams, LogEvent, this.debug, this.threadCount, this.enableRetry)) {
for await (res of paginateEndpoint(`https://api.covalenthq.com/v1/${chainName}/events/topics/${topicHash}/`, this.apiKey, urlParams, LogEvent, this.debug, this.threadCount, this.enableRetry, this.source)) {
yield res;

@@ -857,3 +858,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -864,3 +865,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -931,3 +932,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -938,3 +939,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -1005,3 +1006,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -1012,3 +1013,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -1085,3 +1086,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -1092,3 +1093,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -1164,3 +1165,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -1171,3 +1172,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -1174,0 +1175,0 @@ catch (error) {

@@ -10,3 +10,5 @@ import { SecurityService } from "./SecurityService";

export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.7.6";
export type ChainID = 20090103 | 1 | 137 | 56 | 43114 | 10 | 250 | 1284 | 1285 | 30 | 42161 | 11297108109 | 8217 | 128 | 71402 | 2020 | 9001 | 592 | 4689 | 1666600000 | 25 | 1313161554 | 42262 | 288 | 5 | 80001 | 43113 | 97 | 1287 | 31 | 421613 | 4002 | 11297108099 | 256 | 71401 | 9000 | 336 | 4690 | 1666700000 | 1313161555 | 534354 | 534351 | 1131378225 | 53935 | 73772 | 43288 | 1294 | 56288 | 28 | 1297 | 9728 | 4328 | 1001 | 192837465 | 356256156 | 1564830818 | 278611351 | 432204 | 1026062157 | 432201 | 81 | 338 | 335 | 1088 | 588 | 2002 | 200202 | 2001 | 200101 | 73773 | 1399811149 | 2046399126 | 82 | 83 | 2139927552 | 2888 | 245022926 | 344106930 | 476158412 | 42170 | 7700 | 119 | 1029 | 14 | 114 | 19 | 16 | 321 | 322 | 1422 | 59140 | 84531 | 5001 | 534353 | 248 | 9372 | 2152 | 2154 | 416 | 23294 | 23295 | 420 | 1101 | 1662 | 1024 | 39797 | 49797 | 1663 | 11155111 | 1482601649 | 644937893 | 222000222 | 49321 | 1231 | 1230 | 7777777 | 999 | 245022934 | 2044 | 8453 | 5000 | 262018 | 59144 | 7332 | 10507 | 7979 | 1234 | 1228 | 8888 | 333000333 | 12008 | 12011 | 2038 | 1995 | 12010 | 51178 | 12009 | 12012 | 324 | 599 | 280 | 1343 | 11115 | 6765897100 | 1079 | 13337 | 16350 | 1990 | 20221 | 5611 | 12018 | 12013 | 12020 | 12015 | 12016 | 12014 | 12017 | 12019 | 431234 | 6119 | 73 | 7001 | 42888 | 919 | 5151706 | 923018 | 3441005 | 424 | 58008 | 100 | 10200 | 570 | 57000 | 167007 | 11155420 | 204 | 40 | 41 | 321123 | 360163 | 78431 | 2037 | 17772 | 152703 | 894538 | 179188 | 78432 | 7777 | 986532 | 78430 | 2195 | 11111 | 3012 | 4337 | 534352 | 17000 | 88 | 89 | 20765 | 84532 | 47279324479 | 421614 | 12027 | 12028 | 12029 | 31330 | 31331 | 31332 | 31333 | 31334 | 31335 | 412346 | 8545 | 42220;
export type Source = "Ponder" | "GoldRush";
export declare const userAgent = "com.covalenthq.sdk.typescript/0.8.0";
export declare class Response<T> {

@@ -38,3 +40,3 @@ data: T;

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -56,3 +58,3 @@ /**

private _is_key_valid;
constructor(apiKey: string, settings?: CovalentClientSettings);
constructor(apiKey: string, settings?: CovalentClientSettings, source?: Source);
}

@@ -9,3 +9,3 @@ import { SecurityService } from "./SecurityService";

import { ApiKeyValidator } from "../util/ApiKeyValidator";
export const userAgent = "com.covalenthq.sdk.typescript/0.7.6";
export const userAgent = "com.covalenthq.sdk.typescript/0.8.0";
export class Response {

@@ -17,13 +17,13 @@ }

export class CovalentClient {
constructor(apiKey, settings) {
constructor(apiKey, settings, source) {
const { debug = false, threadCount = 3, enableRetry = true } = settings || {};
const validator = new ApiKeyValidator(apiKey);
this._is_key_valid = validator.isValidApiKey();
this.SecurityService = new SecurityService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.BalanceService = new BalanceService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.BaseService = new BaseService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.NftService = new NftService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.PricingService = new PricingService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.TransactionService = new TransactionService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.XykService = new XykService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.SecurityService = new SecurityService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.BalanceService = new BalanceService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.BaseService = new BaseService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.NftService = new NftService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.PricingService = new PricingService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.TransactionService = new TransactionService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.XykService = new XykService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
}

@@ -38,15 +38,15 @@ }

export class Client {
constructor(apiKey, settings) {
constructor(apiKey, settings, source) {
const { debug = false, threadCount = 3, enableRetry = true } = settings || {};
const validator = new ApiKeyValidator(apiKey);
this._is_key_valid = validator.isValidApiKey();
this.SecurityService = new SecurityService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.BalanceService = new BalanceService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.BaseService = new BaseService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.NftService = new NftService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.PricingService = new PricingService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.TransactionService = new TransactionService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.XykService = new XykService(apiKey, debug, threadCount, this._is_key_valid, enableRetry);
this.SecurityService = new SecurityService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.BalanceService = new BalanceService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.BaseService = new BaseService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.NftService = new NftService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.PricingService = new PricingService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.TransactionService = new TransactionService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
this.XykService = new XykService(apiKey, debug, threadCount, this._is_key_valid, enableRetry, source);
}
}
//# sourceMappingURL=CovalentClient.js.map

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -488,4 +488,5 @@ declare class ChainCollectionResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -502,3 +503,3 @@ *

*/
getChainCollections(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
getChainCollections(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): AsyncIterable<ChainCollectionItem>;
/**

@@ -515,3 +516,3 @@ *

*/
getChainCollectionsByPage(chainName: Chain | Chains, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
getChainCollectionsByPage(chainName: Chain | Chains | ChainID, queryParamOpts?: GetChainCollectionsQueryParamOpts): Promise<Response<ChainCollectionResponse>>;
/**

@@ -529,3 +530,3 @@ *

*/
getNftsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
getNftsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetNftsForAddressQueryParamOpts): Promise<Response<NftAddressBalanceNftResponse>>;
/**

@@ -546,3 +547,3 @@ *

*/
getTokenIdsForContractWithMetadata(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
getTokenIdsForContractWithMetadata(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): AsyncIterable<NftTokenContract>;
/**

@@ -563,3 +564,3 @@ *

*/
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getTokenIdsForContractWithMetadataByPage(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetTokenIdsForContractWithMetadataQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -577,3 +578,3 @@ *

*/
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
getNftMetadataForGivenTokenIdForContract(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftMetadataForGivenTokenIdForContractQueryParamOpts): Promise<Response<NftMetadataResponse>>;
/**

@@ -590,3 +591,3 @@ *

*/
getNftTransactionsForContractTokenId(chainName: Chain | Chains, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
getNftTransactionsForContractTokenId(chainName: Chain | Chains | ChainID, contractAddress: string, tokenId: string, queryParamOpts?: GetNftTransactionsForContractTokenIdQueryParamOpts): Promise<Response<NftTransactionsResponse>>;
/**

@@ -600,3 +601,3 @@ *

*/
getTraitsForCollection(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
getTraitsForCollection(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitsResponse>>;
/**

@@ -611,3 +612,3 @@ *

*/
getAttributesForTraitInCollection(chainName: Chain | Chains, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
getAttributesForTraitInCollection(chainName: Chain | Chains | ChainID, collectionContract: string, trait: string): Promise<Response<NftCollectionAttributesForTraitResponse>>;
/**

@@ -621,3 +622,3 @@ *

*/
getCollectionTraitsSummary(chainName: Chain | Chains, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
getCollectionTraitsSummary(chainName: Chain | Chains | ChainID, collectionContract: string): Promise<Response<NftCollectionTraitSummaryResponse>>;
/**

@@ -632,3 +633,3 @@ *

*/
checkOwnershipInNft(chainName: Chain | Chains, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNft(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -644,3 +645,3 @@ *

*/
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
checkOwnershipInNftForSpecificTokenId(chainName: Chain | Chains | ChainID, walletAddress: string, collectionContract: string, tokenId: string): Promise<Response<NftOwnershipForCollectionResponse>>;
/**

@@ -657,3 +658,3 @@ *

*/
getNftMarketSaleCount(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
getNftMarketSaleCount(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketSaleCountQueryParamOpts): Promise<Response<NftMarketSaleCountResponse>>;
/**

@@ -670,3 +671,3 @@ *

*/
getNftMarketVolume(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
getNftMarketVolume(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketVolumeQueryParamOpts): Promise<Response<NftMarketVolumeResponse>>;
/**

@@ -683,4 +684,4 @@ *

*/
getNftMarketFloorPrice(chainName: Chain | Chains, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
getNftMarketFloorPrice(chainName: Chain | Chains | ChainID, contractAddress: string, queryParamOpts?: GetNftMarketFloorPriceQueryParamOpts): Promise<Response<NftMarketFloorPriceResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote } from "./CovalentClient";
import { Chain, ChainID, Quote, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -74,4 +74,5 @@ declare class TokenPricesResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -90,4 +91,4 @@ *

*/
getTokenPrices(chainName: Chain | Chains, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
getTokenPrices(chainName: Chain | Chains | ChainID, quoteCurrency: Quote, contractAddress: string, queryParamOpts?: GetTokenPricesQueryParamOpts): Promise<Response<TokenPricesResponse>>;
}
export {};

@@ -46,3 +46,3 @@ import { userAgent } from "./CovalentClient";

export class PricingService {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true) {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true, source) {
this.apiKey = apiKey;

@@ -53,2 +53,3 @@ this.debug = debug;

this.enableRetry = enableRetry;
this.source = source;
this.LIMIT = pLimit(this.threadCount);

@@ -102,3 +103,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -109,3 +110,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -112,0 +113,0 @@ catch (error) {

@@ -1,2 +0,2 @@

import { Chain, Response } from "./CovalentClient";
import { Chain, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -141,4 +141,5 @@ declare class ApprovalsResponse {

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -152,3 +153,3 @@ *

*/
getApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<ApprovalsResponse>>;
getApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<ApprovalsResponse>>;
/**

@@ -161,4 +162,4 @@ *

*/
getNftApprovals(chainName: Chain | Chains, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
getNftApprovals(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<NftApprovalsResponse>>;
}
export {};

@@ -94,3 +94,3 @@ import { userAgent } from "./CovalentClient";

export class SecurityService {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true) {
constructor(apiKey, debug = false, threadCount = 3, is_key_valid, enableRetry = true, source) {
this.apiKey = apiKey;

@@ -101,2 +101,3 @@ this.debug = debug;

this.enableRetry = enableRetry;
this.source = source;
this.LIMIT = pLimit(this.threadCount);

@@ -136,3 +137,3 @@ }

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -143,3 +144,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -211,3 +212,3 @@ catch (error) {

"Authorization": `Bearer ${this.apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": this.source ? this.source + " " + "(" + userAgent + ")" : userAgent
}

@@ -218,3 +219,3 @@ }));

try {
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url));
data = await this.LIMIT(() => backoff.backOff(response ? response.url : url, this.source));
}

@@ -221,0 +222,0 @@ catch (error) {

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -343,2 +343,3 @@ declare class TransactionResponse {

private _enableRetry;
private _source;
/** * The requested address. */

@@ -359,3 +360,3 @@ address: string;

items: Transaction[];
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: RecentTransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<RecentTransactionsResponse>>;

@@ -371,2 +372,22 @@ next(): Promise<Response<RecentTransactionsResponse>>;

}
declare class TransactionsBlockPageResponse {
private _debug;
private _apiKey;
private _threadCount;
private _urlParams;
private _enableRetry;
private _source;
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
constructor(data: TransactionsBlockPageResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsBlockPageResponse>>;
next(): Promise<Response<TransactionsBlockPageResponse>>;
}
declare class TransactionsBlockResponse {

@@ -420,2 +441,3 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

private _enableRetry;
private _source;
/** * The requested address. */

@@ -436,3 +458,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsResponse>>;

@@ -447,2 +469,3 @@ next(): Promise<Response<TransactionsResponse>>;

private _enableRetry;
private _source;
/** * The requested address. */

@@ -464,3 +487,3 @@ address: string;

items: Transaction[];
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean);
constructor(data: TransactionsTimeBucketResponse, _debug: boolean, _apiKey: string, _threadCount: number, _urlParams: URLSearchParams, _enableRetry: boolean, _source: Source);
prev(): Promise<Response<TransactionsTimeBucketResponse>>;

@@ -519,2 +542,18 @@ next(): Promise<Response<TransactionsTimeBucketResponse>>;

}
export interface GetTransactionsForBlockHashByPageQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export interface GetTransactionsForBlockHashQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Omit log events. */
noLogs?: boolean;
/** * Include safe details. */
withSafe?: boolean;
}
export declare class TransactionService {

@@ -526,4 +565,5 @@ private apiKey;

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -544,3 +584,3 @@ *

*/
getTransaction(chainName: Chain | Chains, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
getTransaction(chainName: Chain | Chains | ChainID, txHash: string, queryParamOpts?: GetTransactionQueryParamOpts): Promise<Response<TransactionResponse>>;
/**

@@ -559,3 +599,3 @@ *

*/
getAllTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
getAllTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): AsyncIterable<Transaction>;
/**

@@ -574,3 +614,3 @@ *

*/
getAllTransactionsForAddressByPage(chainName: Chain | Chains, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
getAllTransactionsForAddressByPage(chainName: Chain | Chains | ChainID, walletAddress: string, queryParamOpts?: GetAllTransactionsForAddressQueryParamOpts): Promise<Response<RecentTransactionsResponse>>;
/**

@@ -588,3 +628,3 @@ *

*/
getTransactionsForBlock(chainName: Chain | Chains, blockHeight: number, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
getTransactionsForBlock(chainName: Chain | Chains | ChainID, blockHeight: number | string, queryParamOpts?: GetTransactionsForBlockQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
/**

@@ -598,3 +638,3 @@ *

*/
getTransactionSummary(chainName: Chain | Chains, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
getTransactionSummary(chainName: Chain | Chains | ChainID, walletAddress: string): Promise<Response<TransactionsSummaryResponse>>;
/**

@@ -612,3 +652,3 @@ *

*/
getTransactionsForAddressV3(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
getTransactionsForAddressV3(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetTransactionsForAddressV3QueryParamOpts): Promise<Response<TransactionsResponse>>;
/**

@@ -625,4 +665,31 @@ *

*/
getTimeBucketTransactionsForAddress(chainName: Chain | Chains, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
getTimeBucketTransactionsForAddress(chainName: Chain | Chains | ChainID, walletAddress: string, timeBucket: number, queryParamOpts?: GetTimeBucketTransactionsForAddressQueryParamOpts): Promise<Response<TransactionsTimeBucketResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {number} page - The requested 0-indexed page number.
* @param {GetTransactionsForBlockHashByPageQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHashByPage(chainName: Chain | Chains | ChainID, blockHash: string, page: number, queryParamOpts?: GetTransactionsForBlockHashByPageQueryParamOpts): Promise<Response<TransactionsBlockPageResponse>>;
/**
*
* Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} blockHash - The requested block hash.
* @param {GetTransactionsForBlockHashQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `noLogs`: Omit log events.
* - `withSafe`: Include safe details.
*
*/
getTransactionsForBlockHash(chainName: Chain, blockHash: string, queryParamOpts?: GetTransactionsForBlockHashQueryParamOpts): Promise<Response<TransactionsBlockResponse>>;
}
export {};

@@ -1,2 +0,2 @@

import { Chain, Quote, Response } from "./CovalentClient";
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
import { Chains } from "../util/Chains";

@@ -398,2 +398,109 @@ declare class PoolResponse {

}
declare class NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkExchangeTokenViewResponse);
}
declare class TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
constructor(data: TokenV2VolumeWithChartData);
}
declare class VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
constructor(data: VolumeTokenTimeseries);
}
declare class LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
constructor(data: LiquidityTokenTimeseries);
}
declare class PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
constructor(data: PriceTokenTimeseries);
}
declare class SupportedDexesResponse {

@@ -540,2 +647,15 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
declare class NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
constructor(data: NetworkTransactionsResponse);
}
declare class EcosystemChartDataResponse {

@@ -622,2 +742,8 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface GetPoolsQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetPoolsForTokenAddressQueryParamOpts {

@@ -628,2 +754,4 @@ /** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}

@@ -637,3 +765,41 @@ export interface GetPoolsForWalletAddressQueryParamOpts {

dexName?: string;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
}
export interface GetNetworkExchangeTokensQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetLpTokenViewQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
}
export interface GetSingleNetworkExchangeTokenQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForTokenAddressQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForExchangeQueryParamOpts {
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
export interface GetTransactionsForDexQueryParamOpts {
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quoteCurrency?: Quote;
/** * Number of items per page. Omitting this parameter defaults to 100. */
pageSize?: number;
/** * 0-indexed page number to begin pagination. */
pageNumber?: number;
}
/**

@@ -649,4 +815,5 @@ * XYK APIs

private enableRetry;
private source;
private LIMIT;
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry?: boolean);
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
/**

@@ -658,5 +825,8 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetPoolsQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getPools(chainName: Chain | Chains, dexName: string): Promise<Response<PoolResponse>>;
getPools(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetPoolsQueryParamOpts): Promise<Response<PoolResponse>>;
/**

@@ -670,3 +840,3 @@ *

*/
getDexForPoolAddress(chainName: Chain | Chains, poolAddress: string): Promise<Response<PoolToDexResponse>>;
getDexForPoolAddress(chainName: Chain | Chains | ChainID, poolAddress: string): Promise<Response<PoolToDexResponse>>;
/**

@@ -681,3 +851,3 @@ *

*/
getPoolByAddress(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
getPoolByAddress(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
/**

@@ -692,5 +862,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForTokenAddress(chainName: Chain | Chains, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -705,3 +877,3 @@ *

*/
getAddressExchangeBalances(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
getAddressExchangeBalances(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
/**

@@ -717,5 +889,7 @@ *

* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `dexName`: The DEX name eg: `uniswap_v2`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
*
*/
getPoolsForWalletAddress(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
getPoolsForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
/**

@@ -727,7 +901,22 @@ *

* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetNetworkExchangeTokensQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getNetworkExchangeTokens(chainName: Chain | Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
getNetworkExchangeTokens(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetNetworkExchangeTokensQueryParamOpts): Promise<Response<NetworkExchangeTokensResponse>>;
/**
*
* Commonly used to get a detailed view for a single liquidity pool token. Includes time series data.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetLpTokenViewQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
*
*/
getLpTokenView(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetLpTokenViewQueryParamOpts): Promise<Response<NetworkExchangeTokenViewResponse>>;
/**
*
* Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.

@@ -745,5 +934,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetSingleNetworkExchangeTokenQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getSingleNetworkExchangeToken(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
getSingleNetworkExchangeToken(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetSingleNetworkExchangeTokenQueryParamOpts): Promise<Response<SingleNetworkExchangeTokenResponse>>;
/**

@@ -758,3 +950,3 @@ *

*/
getTransactionsForAccountAddress(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
getTransactionsForAccountAddress(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
/**

@@ -767,5 +959,8 @@ *

* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForTokenAddressQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForTokenAddress(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
getTransactionsForTokenAddress(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetTransactionsForTokenAddressQueryParamOpts): Promise<Response<TransactionsForTokenAddressResponse>>;
/**

@@ -778,7 +973,23 @@ *

* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
* @param {GetTransactionsForExchangeQueryParamOpts} queryParamOpts
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForExchange(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<TransactionsForExchangeResponse>>;
getTransactionsForExchange(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string, queryParamOpts?: GetTransactionsForExchangeQueryParamOpts): Promise<Response<TransactionsForExchangeResponse>>;
/**
*
* Commonly used to get all the the transactions for a given DEX. Useful for building DEX activity views.
*
* @param {string} chainName - The chain name eg: `eth-mainnet`.
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
* @param {GetTransactionsForDexQueryParamOpts} queryParamOpts
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
* - `pageNumber`: 0-indexed page number to begin pagination.
*
*/
getTransactionsForDex(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetTransactionsForDexQueryParamOpts): Promise<Response<NetworkTransactionsResponse>>;
/**
*
* Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.

@@ -790,3 +1001,3 @@ *

*/
getEcosystemChartData(chainName: Chain | Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
getEcosystemChartData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
/**

@@ -800,4 +1011,4 @@ *

*/
getHealthData(chainName: Chain | Chains, dexName: string): Promise<Response<HealthDataResponse>>;
getHealthData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<HealthDataResponse>>;
}
export {};

@@ -0,5 +1,6 @@

import { Source } from "../services/CovalentClient";
export declare function checkAndModifyResponse(jsonObj: any): void;
export declare function debugOutput(url: string, responseStatus: number, startTime: number | [number, number] | undefined): Promise<void>;
type Constructor<T> = new (...args: any[]) => T;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean): AsyncIterable<T1>;
export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean, source: Source): AsyncIterable<T1>;
export {};

@@ -31,3 +31,3 @@ import { ExponentialBackoff } from "./backoff";

}
export async function* paginateEndpoint(url, apiKey, urlsParams, dataClassConstructor, debug, threadCount, enableRetry) {
export async function* paginateEndpoint(url, apiKey, urlsParams, dataClassConstructor, debug, threadCount, enableRetry, source) {
let hasNext = true;

@@ -49,3 +49,3 @@ let response;

"Authorization": `Bearer ${apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": source ? source + " " + "(" + userAgent + ")" : userAgent
}

@@ -56,3 +56,3 @@ }));

try {
data = await LIMIT(() => backoff.backOff(response ? response.url : link));
data = await LIMIT(() => backoff.backOff(response ? response.url : link, source));
}

@@ -59,0 +59,0 @@ catch (error) {

@@ -0,1 +1,2 @@

import { Source } from "../services/CovalentClient";
export declare const DEFAULT_BACKOFF_MAX_RETRIES = 5;

@@ -9,4 +10,4 @@ export declare const BASE_DELAY_MS = 1000;

constructor(apiKey: string, debug: boolean, maxRetries?: number);
backOff(url: string): Promise<T>;
backOff(url: string, source: Source): Promise<T>;
setNumAttempts(retryCount: number): void;
}

@@ -12,3 +12,3 @@ import { userAgent } from "../services/CovalentClient";

}
async backOff(url) {
async backOff(url, source) {
try {

@@ -22,3 +22,3 @@ let startTime;

"Authorization": `Bearer ${this._apiKey}`,
"X-Requested-With": userAgent
"X-Requested-With": source ? source + " " + "(" + userAgent + ")" : userAgent
}

@@ -39,3 +39,3 @@ });

await new Promise((resolve) => setTimeout(resolve, delayMs));
return this.backOff(url);
return this.backOff(url, source);
}

@@ -42,0 +42,0 @@ return Promise.reject(new Error(`Max retries exceeded: ${this.maxRetries}`));

@@ -360,1 +360,12 @@ import { ContractMetadata, LogEvent, Explorer } from "./GenericTypes";

}
export interface TransactionsBlockPageResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
links: PaginationLinks;
/** * List of response items. */
items: Transaction[];
}

@@ -366,2 +366,104 @@ import { Pagination, ContractMetadata } from "./GenericTypes";

}
export interface NetworkExchangeTokenViewResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: TokenV2VolumeWithChartData[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface TokenV2VolumeWithChartData {
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
contract_address: string;
/** * The string returned by the `name()` method. */
contract_name: string;
/** * The total liquidity unscaled value. */
total_liquidity: number;
/** * The total volume 24h unscaled value. */
total_volume_24h: number;
/** * The contract logo URL. */
logo_url: string;
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
contract_ticker_symbol: string;
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
contract_decimals: number;
/** * The total amount of swaps in the last 24h. */
swap_count_24h: number;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * The 24h exchange rate for the requested quote currency. */
quote_rate_24h: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
/** * A prettier version of the 24h exchange rate for rendering purposes. */
pretty_quote_rate_24h: string;
/** * A prettier version of the total liquidity quote for rendering purposes. */
pretty_total_liquidity_quote: string;
/** * A prettier version of the 24h volume quote for rendering purposes. */
pretty_total_volume_24h_quote: string;
/** * The total liquidity converted to fiat in `quote-currency`. */
total_liquidity_quote: number;
/** * The total volume 24h converted to fiat in `quote-currency`. */
total_volume_24h_quote: number;
/** * The number of transactions in the last 24h. */
transactions_24h: number;
volume_timeseries_7d: VolumeTokenTimeseries[];
volume_timeseries_30d: VolumeTokenTimeseries[];
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
price_timeseries_7d: PriceTokenTimeseries[];
price_timeseries_30d: PriceTokenTimeseries[];
}
export interface VolumeTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total volume unscaled for this day. */
total_volume: string;
/** * The volume in `quote-currency` denomination. */
volume_quote: number;
/** * A prettier version of the volume quote for rendering purposes. */
pretty_volume_quote: string;
}
export interface LiquidityTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The total liquidity unscaled up to this day. */
total_liquidity: string;
/** * The liquidity in `quote-currency` denomination. */
liquidity_quote: number;
/** * A prettier version of the liquidity quote for rendering purposes. */
pretty_liquidity_quote: string;
}
export interface PriceTokenTimeseries {
/** * The name of the DEX, eg: `uniswap_v2`. */
dex_name: string;
/** * The requested chain ID eg: `1`. */
chain_id: string;
/** * The current date. */
dt: string;
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
quote_currency: string;
/** * The exchange rate for the requested quote currency. */
quote_rate: number;
/** * A prettier version of the exchange rate for rendering purposes. */
pretty_quote_rate: string;
}
export interface SupportedDexesResponse {

@@ -486,2 +588,14 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

}
export interface NetworkTransactionsResponse {
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
updated_at: Date;
/** * The requested chain ID eg: `1`. */
chain_id: number;
/** * The requested chain name eg: `eth-mainnet`. */
chain_name: string;
/** * List of response items. */
items: ExchangeTransaction[];
/** * Pagination metadata. */
pagination: Pagination;
}
export interface EcosystemChartDataResponse {

@@ -488,0 +602,0 @@ /** * The timestamp when the response was generated. Useful to show data staleness to users. */

{
"name": "@covalenthq/client-sdk",
"version": "0.7.6",
"version": "0.8.0",
"types": "dist/index.d.ts",

@@ -5,0 +5,0 @@ "files": [

@@ -195,3 +195,6 @@ <p align="center">

- `getTimeBucketTransactionsForAddress()`: Fetch all transactions including their decoded log events in a 15-minute time bucket interval.
- `getTransactionsForBlockHashByPage()`: Fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
- `getTransactionsForBlockHash()`: Fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions.
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.

@@ -221,2 +224,3 @@

- `getNetworkExchangeTokens()`: Retrieve all network exchange tokens for a specific DEX. Useful for building a top tokens table by total liquidity within a particular DEX.
- `getLpTokenView()`: Get a detailed view for a single liquidity pool token. Includes time series data.
- `getSupportedDEXes()`: Get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.

@@ -228,2 +232,3 @@ - `getDexForPoolAddress()`: Get the 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.

- `getTransactionsForExchange()`: Get all the transactions of a particular DEX liquidity pool. Useful for building a transactions history table for an individual pool.
- `getTransactionsForDex()`: Get all the the transactions for a given DEX. Useful for building DEX activity views.
- `getEcosystemChartData()`: Get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.

@@ -230,0 +235,0 @@ - `getHealthData()`: Ping the health of xy=k endpoints to get the synced block height per chain.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc