@covalenthq/client-sdk 0.7.6 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cjs/index.js +815 -181
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/services/BalanceService.d.ts +14 -13
- package/dist/cjs/services/BaseService.d.ts +12 -11
- package/dist/cjs/services/CovalentClient.d.ts +5 -3
- package/dist/cjs/services/NftService.d.ts +18 -17
- package/dist/cjs/services/PricingService.d.ts +4 -3
- package/dist/cjs/services/SecurityService.d.ts +5 -4
- package/dist/cjs/services/TransactionService.d.ts +79 -12
- package/dist/cjs/services/XykService.d.ts +226 -15
- package/dist/cjs/util/ApiHelpers.d.ts +2 -1
- package/dist/cjs/util/backoff.d.ts +2 -1
- package/dist/cjs/util/types/TransactionServiceTypes.d.ts +11 -0
- package/dist/cjs/util/types/XykServiceTypes.d.ts +114 -0
- package/dist/es/index.js +815 -181
- package/dist/es/index.js.map +1 -1
- package/dist/es/services/BalanceService.d.ts +14 -13
- package/dist/es/services/BaseService.d.ts +12 -11
- package/dist/es/services/CovalentClient.d.ts +5 -3
- package/dist/es/services/NftService.d.ts +18 -17
- package/dist/es/services/PricingService.d.ts +4 -3
- package/dist/es/services/SecurityService.d.ts +5 -4
- package/dist/es/services/TransactionService.d.ts +79 -12
- package/dist/es/services/XykService.d.ts +226 -15
- package/dist/es/util/ApiHelpers.d.ts +2 -1
- package/dist/es/util/backoff.d.ts +2 -1
- package/dist/es/util/types/TransactionServiceTypes.d.ts +11 -0
- package/dist/es/util/types/XykServiceTypes.d.ts +114 -0
- package/dist/esm/index.js +815 -181
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/services/BalanceService.d.ts +14 -13
- package/dist/esm/services/BaseService.d.ts +12 -11
- package/dist/esm/services/CovalentClient.d.ts +5 -3
- package/dist/esm/services/NftService.d.ts +18 -17
- package/dist/esm/services/PricingService.d.ts +4 -3
- package/dist/esm/services/SecurityService.d.ts +5 -4
- package/dist/esm/services/TransactionService.d.ts +79 -12
- package/dist/esm/services/XykService.d.ts +226 -15
- package/dist/esm/util/ApiHelpers.d.ts +2 -1
- package/dist/esm/util/backoff.d.ts +2 -1
- package/dist/esm/util/types/TransactionServiceTypes.d.ts +11 -0
- package/dist/esm/util/types/XykServiceTypes.d.ts +114 -0
- package/dist/services/BalanceService.d.ts +14 -13
- package/dist/services/BalanceService.js +16 -15
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +12 -11
- package/dist/services/BaseService.js +25 -24
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/CovalentClient.d.ts +5 -3
- package/dist/services/CovalentClient.js +17 -17
- package/dist/services/CovalentClient.js.map +1 -1
- package/dist/services/NftService.d.ts +18 -17
- package/dist/services/NftService.js +30 -29
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/PricingService.d.ts +4 -3
- package/dist/services/PricingService.js +4 -3
- package/dist/services/PricingService.js.map +1 -1
- package/dist/services/SecurityService.d.ts +5 -4
- package/dist/services/SecurityService.js +6 -5
- package/dist/services/SecurityService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +79 -12
- package/dist/services/TransactionService.js +369 -41
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +226 -15
- package/dist/services/XykService.js +335 -34
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/ApiHelpers.d.ts +2 -1
- package/dist/util/ApiHelpers.js +3 -3
- package/dist/util/ApiHelpers.js.map +1 -1
- package/dist/util/backoff.d.ts +2 -1
- package/dist/util/backoff.js +3 -3
- package/dist/util/backoff.js.map +1 -1
- package/dist/util/types/TransactionServiceTypes.d.ts +11 -0
- package/dist/util/types/XykServiceTypes.d.ts +114 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chain, Quote, Response } from "./CovalentClient";
|
|
1
|
+
import { Chain, Quote, Response, ChainID, Source } from "./CovalentClient";
|
|
2
2
|
import { Chains } from "../util/Chains";
|
|
3
3
|
declare class PoolResponse {
|
|
4
4
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
@@ -395,6 +395,113 @@ declare class TokenV2Volume {
|
|
|
395
395
|
total_volume_24h_quote: number;
|
|
396
396
|
constructor(data: TokenV2Volume);
|
|
397
397
|
}
|
|
398
|
+
declare class NetworkExchangeTokenViewResponse {
|
|
399
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
400
|
+
updated_at: Date;
|
|
401
|
+
/** * The requested chain ID eg: `1`. */
|
|
402
|
+
chain_id: number;
|
|
403
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
404
|
+
chain_name: string;
|
|
405
|
+
/** * List of response items. */
|
|
406
|
+
items: TokenV2VolumeWithChartData[];
|
|
407
|
+
/** * Pagination metadata. */
|
|
408
|
+
pagination: Pagination;
|
|
409
|
+
constructor(data: NetworkExchangeTokenViewResponse);
|
|
410
|
+
}
|
|
411
|
+
declare class TokenV2VolumeWithChartData {
|
|
412
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
413
|
+
chain_name: string;
|
|
414
|
+
/** * The requested chain ID eg: `1`. */
|
|
415
|
+
chain_id: string;
|
|
416
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
417
|
+
dex_name: string;
|
|
418
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
419
|
+
contract_address: string;
|
|
420
|
+
/** * The string returned by the `name()` method. */
|
|
421
|
+
contract_name: string;
|
|
422
|
+
/** * The total liquidity unscaled value. */
|
|
423
|
+
total_liquidity: number;
|
|
424
|
+
/** * The total volume 24h unscaled value. */
|
|
425
|
+
total_volume_24h: number;
|
|
426
|
+
/** * The contract logo URL. */
|
|
427
|
+
logo_url: string;
|
|
428
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
429
|
+
contract_ticker_symbol: string;
|
|
430
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
431
|
+
contract_decimals: number;
|
|
432
|
+
/** * The total amount of swaps in the last 24h. */
|
|
433
|
+
swap_count_24h: number;
|
|
434
|
+
/** * The exchange rate for the requested quote currency. */
|
|
435
|
+
quote_rate: number;
|
|
436
|
+
/** * The 24h exchange rate for the requested quote currency. */
|
|
437
|
+
quote_rate_24h: number;
|
|
438
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
439
|
+
pretty_quote_rate: string;
|
|
440
|
+
/** * A prettier version of the 24h exchange rate for rendering purposes. */
|
|
441
|
+
pretty_quote_rate_24h: string;
|
|
442
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
443
|
+
pretty_total_liquidity_quote: string;
|
|
444
|
+
/** * A prettier version of the 24h volume quote for rendering purposes. */
|
|
445
|
+
pretty_total_volume_24h_quote: string;
|
|
446
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
447
|
+
total_liquidity_quote: number;
|
|
448
|
+
/** * The total volume 24h converted to fiat in `quote-currency`. */
|
|
449
|
+
total_volume_24h_quote: number;
|
|
450
|
+
/** * The number of transactions in the last 24h. */
|
|
451
|
+
transactions_24h: number;
|
|
452
|
+
volume_timeseries_7d: VolumeTokenTimeseries[];
|
|
453
|
+
volume_timeseries_30d: VolumeTokenTimeseries[];
|
|
454
|
+
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
|
|
455
|
+
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
|
|
456
|
+
price_timeseries_7d: PriceTokenTimeseries[];
|
|
457
|
+
price_timeseries_30d: PriceTokenTimeseries[];
|
|
458
|
+
constructor(data: TokenV2VolumeWithChartData);
|
|
459
|
+
}
|
|
460
|
+
declare class VolumeTokenTimeseries {
|
|
461
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
462
|
+
dex_name: string;
|
|
463
|
+
/** * The requested chain ID eg: `1`. */
|
|
464
|
+
chain_id: string;
|
|
465
|
+
/** * The current date. */
|
|
466
|
+
dt: string;
|
|
467
|
+
/** * The total volume unscaled for this day. */
|
|
468
|
+
total_volume: string;
|
|
469
|
+
/** * The volume in `quote-currency` denomination. */
|
|
470
|
+
volume_quote: number;
|
|
471
|
+
/** * A prettier version of the volume quote for rendering purposes. */
|
|
472
|
+
pretty_volume_quote: string;
|
|
473
|
+
constructor(data: VolumeTokenTimeseries);
|
|
474
|
+
}
|
|
475
|
+
declare class LiquidityTokenTimeseries {
|
|
476
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
477
|
+
dex_name: string;
|
|
478
|
+
/** * The requested chain ID eg: `1`. */
|
|
479
|
+
chain_id: string;
|
|
480
|
+
/** * The current date. */
|
|
481
|
+
dt: string;
|
|
482
|
+
/** * The total liquidity unscaled up to this day. */
|
|
483
|
+
total_liquidity: string;
|
|
484
|
+
/** * The liquidity in `quote-currency` denomination. */
|
|
485
|
+
liquidity_quote: number;
|
|
486
|
+
/** * A prettier version of the liquidity quote for rendering purposes. */
|
|
487
|
+
pretty_liquidity_quote: string;
|
|
488
|
+
constructor(data: LiquidityTokenTimeseries);
|
|
489
|
+
}
|
|
490
|
+
declare class PriceTokenTimeseries {
|
|
491
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
492
|
+
dex_name: string;
|
|
493
|
+
/** * The requested chain ID eg: `1`. */
|
|
494
|
+
chain_id: string;
|
|
495
|
+
/** * The current date. */
|
|
496
|
+
dt: string;
|
|
497
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
498
|
+
quote_currency: string;
|
|
499
|
+
/** * The exchange rate for the requested quote currency. */
|
|
500
|
+
quote_rate: number;
|
|
501
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
502
|
+
pretty_quote_rate: string;
|
|
503
|
+
constructor(data: PriceTokenTimeseries);
|
|
504
|
+
}
|
|
398
505
|
declare class SupportedDexesResponse {
|
|
399
506
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
400
507
|
updated_at: Date;
|
|
@@ -536,6 +643,19 @@ declare class TransactionsForExchangeResponse {
|
|
|
536
643
|
pagination: Pagination;
|
|
537
644
|
constructor(data: TransactionsForExchangeResponse);
|
|
538
645
|
}
|
|
646
|
+
declare class NetworkTransactionsResponse {
|
|
647
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
648
|
+
updated_at: Date;
|
|
649
|
+
/** * The requested chain ID eg: `1`. */
|
|
650
|
+
chain_id: number;
|
|
651
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
652
|
+
chain_name: string;
|
|
653
|
+
/** * List of response items. */
|
|
654
|
+
items: ExchangeTransaction[];
|
|
655
|
+
/** * Pagination metadata. */
|
|
656
|
+
pagination: Pagination;
|
|
657
|
+
constructor(data: NetworkTransactionsResponse);
|
|
658
|
+
}
|
|
539
659
|
declare class EcosystemChartDataResponse {
|
|
540
660
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
541
661
|
updated_at: Date;
|
|
@@ -617,11 +737,19 @@ declare class HealthData {
|
|
|
617
737
|
latest_block_signed_at: Date;
|
|
618
738
|
constructor(data: HealthData);
|
|
619
739
|
}
|
|
740
|
+
export interface GetPoolsQueryParamOpts {
|
|
741
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
742
|
+
pageSize?: number;
|
|
743
|
+
/** * 0-indexed page number to begin pagination. */
|
|
744
|
+
pageNumber?: number;
|
|
745
|
+
}
|
|
620
746
|
export interface GetPoolsForTokenAddressQueryParamOpts {
|
|
621
747
|
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
622
748
|
quoteCurrency?: Quote;
|
|
623
749
|
/** * The DEX name eg: `uniswap_v2`. */
|
|
624
750
|
dexName?: string;
|
|
751
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
752
|
+
pageSize?: number;
|
|
625
753
|
}
|
|
626
754
|
export interface GetPoolsForWalletAddressQueryParamOpts {
|
|
627
755
|
/** * The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically. */
|
|
@@ -630,6 +758,44 @@ export interface GetPoolsForWalletAddressQueryParamOpts {
|
|
|
630
758
|
quoteCurrency?: Quote;
|
|
631
759
|
/** * The DEX name eg: `uniswap_v2`. */
|
|
632
760
|
dexName?: string;
|
|
761
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
762
|
+
pageSize?: number;
|
|
763
|
+
}
|
|
764
|
+
export interface GetNetworkExchangeTokensQueryParamOpts {
|
|
765
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
766
|
+
pageSize?: number;
|
|
767
|
+
/** * 0-indexed page number to begin pagination. */
|
|
768
|
+
pageNumber?: number;
|
|
769
|
+
}
|
|
770
|
+
export interface GetLpTokenViewQueryParamOpts {
|
|
771
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
772
|
+
quoteCurrency?: Quote;
|
|
773
|
+
}
|
|
774
|
+
export interface GetSingleNetworkExchangeTokenQueryParamOpts {
|
|
775
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
776
|
+
pageSize?: number;
|
|
777
|
+
/** * 0-indexed page number to begin pagination. */
|
|
778
|
+
pageNumber?: number;
|
|
779
|
+
}
|
|
780
|
+
export interface GetTransactionsForTokenAddressQueryParamOpts {
|
|
781
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
782
|
+
pageSize?: number;
|
|
783
|
+
/** * 0-indexed page number to begin pagination. */
|
|
784
|
+
pageNumber?: number;
|
|
785
|
+
}
|
|
786
|
+
export interface GetTransactionsForExchangeQueryParamOpts {
|
|
787
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
788
|
+
pageSize?: number;
|
|
789
|
+
/** * 0-indexed page number to begin pagination. */
|
|
790
|
+
pageNumber?: number;
|
|
791
|
+
}
|
|
792
|
+
export interface GetTransactionsForDexQueryParamOpts {
|
|
793
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
794
|
+
quoteCurrency?: Quote;
|
|
795
|
+
/** * Number of items per page. Omitting this parameter defaults to 100. */
|
|
796
|
+
pageSize?: number;
|
|
797
|
+
/** * 0-indexed page number to begin pagination. */
|
|
798
|
+
pageNumber?: number;
|
|
633
799
|
}
|
|
634
800
|
/**
|
|
635
801
|
* XYK APIs
|
|
@@ -641,17 +807,21 @@ export declare class XykService {
|
|
|
641
807
|
private threadCount;
|
|
642
808
|
private is_key_valid;
|
|
643
809
|
private enableRetry;
|
|
810
|
+
private source;
|
|
644
811
|
private LIMIT;
|
|
645
|
-
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry
|
|
812
|
+
constructor(apiKey: string, debug: boolean, threadCount: number, is_key_valid: boolean, enableRetry: boolean, source: Source);
|
|
646
813
|
/**
|
|
647
814
|
*
|
|
648
815
|
* Commonly used to get all the pools of a particular DEX. Supports most common DEXs (Uniswap, SushiSwap, etc), and returns detailed trading data (volume, liquidity, swap counts, fees, LP token prices).
|
|
649
816
|
*
|
|
650
817
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
651
818
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
819
|
+
* @param {GetPoolsQueryParamOpts} queryParamOpts
|
|
820
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
821
|
+
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
652
822
|
*
|
|
653
823
|
*/
|
|
654
|
-
getPools(chainName: Chain | Chains, dexName: string): Promise<Response<PoolResponse>>;
|
|
824
|
+
getPools(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetPoolsQueryParamOpts): Promise<Response<PoolResponse>>;
|
|
655
825
|
/**
|
|
656
826
|
*
|
|
657
827
|
* Commonly used to get the corresponding supported DEX given a pool address, along with the swap fees, DEX's logo url, and factory addresses. Useful to identifying the specific DEX to which a pair address is associated.
|
|
@@ -660,7 +830,7 @@ export declare class XykService {
|
|
|
660
830
|
* @param {string} poolAddress - The requested pool address.
|
|
661
831
|
*
|
|
662
832
|
*/
|
|
663
|
-
getDexForPoolAddress(chainName: Chain | Chains, poolAddress: string): Promise<Response<PoolToDexResponse>>;
|
|
833
|
+
getDexForPoolAddress(chainName: Chain | Chains | ChainID, poolAddress: string): Promise<Response<PoolToDexResponse>>;
|
|
664
834
|
/**
|
|
665
835
|
*
|
|
666
836
|
* Commonly used to get the 7 day and 30 day time-series data (volume, liquidity, price) of a particular liquidity pool in a DEX. Useful for building time-series charts on DEX trading activity.
|
|
@@ -670,7 +840,7 @@ export declare class XykService {
|
|
|
670
840
|
* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
671
841
|
*
|
|
672
842
|
*/
|
|
673
|
-
getPoolByAddress(chainName: Chain | Chains, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
|
|
843
|
+
getPoolByAddress(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string): Promise<Response<PoolByAddressResponse>>;
|
|
674
844
|
/**
|
|
675
845
|
*
|
|
676
846
|
* Commonly used to get all pools and the supported DEX for a token. Useful for building a table of top pairs across all supported DEXes that the token is trading on.
|
|
@@ -680,9 +850,11 @@ export declare class XykService {
|
|
|
680
850
|
* @param {number} page - The requested 0-indexed page number.
|
|
681
851
|
* @param {GetPoolsForTokenAddressQueryParamOpts} queryParamOpts
|
|
682
852
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
853
|
+
* - `dexName`: The DEX name eg: `uniswap_v2`.
|
|
854
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
683
855
|
*
|
|
684
856
|
*/
|
|
685
|
-
getPoolsForTokenAddress(chainName: Chain | Chains, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
|
|
857
|
+
getPoolsForTokenAddress(chainName: Chain | Chains | ChainID, tokenAddress: string, page: number, queryParamOpts?: GetPoolsForTokenAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
|
|
686
858
|
/**
|
|
687
859
|
*
|
|
688
860
|
* Commonly used to return balance of a wallet/contract address on a specific DEX.
|
|
@@ -692,7 +864,7 @@ export declare class XykService {
|
|
|
692
864
|
* @param {string} accountAddress - The account address.
|
|
693
865
|
*
|
|
694
866
|
*/
|
|
695
|
-
getAddressExchangeBalances(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
|
|
867
|
+
getAddressExchangeBalances(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<AddressExchangeBalancesResponse>>;
|
|
696
868
|
/**
|
|
697
869
|
*
|
|
698
870
|
* Commonly used to get all pools and supported DEX for a wallet. Useful for building a personal DEX UI showcasing pairs and supported DEXes associated to the wallet.
|
|
@@ -703,18 +875,35 @@ export declare class XykService {
|
|
|
703
875
|
* @param {GetPoolsForWalletAddressQueryParamOpts} queryParamOpts
|
|
704
876
|
* - `tokenAddress`: The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
705
877
|
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
878
|
+
* - `dexName`: The DEX name eg: `uniswap_v2`.
|
|
879
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
706
880
|
*
|
|
707
881
|
*/
|
|
708
|
-
getPoolsForWalletAddress(chainName: Chain | Chains, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
|
|
882
|
+
getPoolsForWalletAddress(chainName: Chain | Chains | ChainID, walletAddress: string, page: number, queryParamOpts?: GetPoolsForWalletAddressQueryParamOpts): Promise<Response<PoolsDexDataResponse>>;
|
|
709
883
|
/**
|
|
710
884
|
*
|
|
711
885
|
* Commonly used to retrieve all network exchange tokens for a specific DEX. Useful for building a top tokens table by total liquidity within a particular DEX.
|
|
712
886
|
*
|
|
713
887
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
714
888
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
889
|
+
* @param {GetNetworkExchangeTokensQueryParamOpts} queryParamOpts
|
|
890
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
891
|
+
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
715
892
|
*
|
|
716
893
|
*/
|
|
717
|
-
getNetworkExchangeTokens(chainName: Chain | Chains, dexName: string): Promise<Response<NetworkExchangeTokensResponse>>;
|
|
894
|
+
getNetworkExchangeTokens(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetNetworkExchangeTokensQueryParamOpts): Promise<Response<NetworkExchangeTokensResponse>>;
|
|
895
|
+
/**
|
|
896
|
+
*
|
|
897
|
+
* Commonly used to get a detailed view for a single liquidity pool token. Includes time series data.
|
|
898
|
+
*
|
|
899
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
900
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
901
|
+
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
902
|
+
* @param {GetLpTokenViewQueryParamOpts} queryParamOpts
|
|
903
|
+
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
904
|
+
*
|
|
905
|
+
*/
|
|
906
|
+
getLpTokenView(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetLpTokenViewQueryParamOpts): Promise<Response<NetworkExchangeTokenViewResponse>>;
|
|
718
907
|
/**
|
|
719
908
|
*
|
|
720
909
|
* Commonly used to get all the supported DEXs available for the xy=k endpoints, along with the swap fees and factory addresses.
|
|
@@ -729,9 +918,12 @@ export declare class XykService {
|
|
|
729
918
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
730
919
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
731
920
|
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
921
|
+
* @param {GetSingleNetworkExchangeTokenQueryParamOpts} queryParamOpts
|
|
922
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
923
|
+
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
732
924
|
*
|
|
733
925
|
*/
|
|
734
|
-
getSingleNetworkExchangeToken(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<SingleNetworkExchangeTokenResponse>>;
|
|
926
|
+
getSingleNetworkExchangeToken(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetSingleNetworkExchangeTokenQueryParamOpts): Promise<Response<SingleNetworkExchangeTokenResponse>>;
|
|
735
927
|
/**
|
|
736
928
|
*
|
|
737
929
|
* Commonly used to get all the DEX transactions of a wallet. Useful for building tables of DEX activity segmented by wallet.
|
|
@@ -741,7 +933,7 @@ export declare class XykService {
|
|
|
741
933
|
* @param {string} accountAddress - The account address. Passing in an `ENS` or `RNS` resolves automatically.
|
|
742
934
|
*
|
|
743
935
|
*/
|
|
744
|
-
getTransactionsForAccountAddress(chainName: Chain | Chains, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
|
|
936
|
+
getTransactionsForAccountAddress(chainName: Chain | Chains | ChainID, dexName: string, accountAddress: string): Promise<Response<TransactionsForAccountAddressResponse>>;
|
|
745
937
|
/**
|
|
746
938
|
*
|
|
747
939
|
* Commonly used to get all the transactions of a token within a particular DEX. Useful for getting a per-token view of DEX activity.
|
|
@@ -749,9 +941,12 @@ export declare class XykService {
|
|
|
749
941
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
750
942
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
751
943
|
* @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
944
|
+
* @param {GetTransactionsForTokenAddressQueryParamOpts} queryParamOpts
|
|
945
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
946
|
+
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
752
947
|
*
|
|
753
948
|
*/
|
|
754
|
-
getTransactionsForTokenAddress(chainName: Chain | Chains, dexName: string, tokenAddress: string): Promise<Response<TransactionsForTokenAddressResponse>>;
|
|
949
|
+
getTransactionsForTokenAddress(chainName: Chain | Chains | ChainID, dexName: string, tokenAddress: string, queryParamOpts?: GetTransactionsForTokenAddressQueryParamOpts): Promise<Response<TransactionsForTokenAddressResponse>>;
|
|
755
950
|
/**
|
|
756
951
|
*
|
|
757
952
|
* Commonly used for getting all the transactions of a particular DEX liquidity pool. Useful for building a transactions history table for an individual pool.
|
|
@@ -759,9 +954,25 @@ export declare class XykService {
|
|
|
759
954
|
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
760
955
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
761
956
|
* @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, `Lens Handle`, or an `Unstoppable Domain` resolves automatically.
|
|
957
|
+
* @param {GetTransactionsForExchangeQueryParamOpts} queryParamOpts
|
|
958
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
959
|
+
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
960
|
+
*
|
|
961
|
+
*/
|
|
962
|
+
getTransactionsForExchange(chainName: Chain | Chains | ChainID, dexName: string, poolAddress: string, queryParamOpts?: GetTransactionsForExchangeQueryParamOpts): Promise<Response<TransactionsForExchangeResponse>>;
|
|
963
|
+
/**
|
|
964
|
+
*
|
|
965
|
+
* Commonly used to get all the the transactions for a given DEX. Useful for building DEX activity views.
|
|
966
|
+
*
|
|
967
|
+
* @param {string} chainName - The chain name eg: `eth-mainnet`.
|
|
968
|
+
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
969
|
+
* @param {GetTransactionsForDexQueryParamOpts} queryParamOpts
|
|
970
|
+
* - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
|
|
971
|
+
* - `pageSize`: Number of items per page. Omitting this parameter defaults to 100.
|
|
972
|
+
* - `pageNumber`: 0-indexed page number to begin pagination.
|
|
762
973
|
*
|
|
763
974
|
*/
|
|
764
|
-
|
|
975
|
+
getTransactionsForDex(chainName: Chain | Chains | ChainID, dexName: string, queryParamOpts?: GetTransactionsForDexQueryParamOpts): Promise<Response<NetworkTransactionsResponse>>;
|
|
765
976
|
/**
|
|
766
977
|
*
|
|
767
978
|
* Commonly used to get a 7d and 30d time-series chart of DEX activity. Includes volume and swap count.
|
|
@@ -770,7 +981,7 @@ export declare class XykService {
|
|
|
770
981
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
771
982
|
*
|
|
772
983
|
*/
|
|
773
|
-
getEcosystemChartData(chainName: Chain | Chains, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
|
|
984
|
+
getEcosystemChartData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<EcosystemChartDataResponse>>;
|
|
774
985
|
/**
|
|
775
986
|
*
|
|
776
987
|
* Commonly used to ping the health of xy=k endpoints to get the synced block height per chain.
|
|
@@ -779,6 +990,6 @@ export declare class XykService {
|
|
|
779
990
|
* @param {string} dexName - The DEX name eg: `uniswap_v2`.
|
|
780
991
|
*
|
|
781
992
|
*/
|
|
782
|
-
getHealthData(chainName: Chain | Chains, dexName: string): Promise<Response<HealthDataResponse>>;
|
|
993
|
+
getHealthData(chainName: Chain | Chains | ChainID, dexName: string): Promise<Response<HealthDataResponse>>;
|
|
783
994
|
}
|
|
784
995
|
export {};
|