@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
|
@@ -363,6 +363,108 @@ export interface TokenV2Volume {
|
|
|
363
363
|
/** * The total volume 24h converted to fiat in `quote-currency`. */
|
|
364
364
|
total_volume_24h_quote: number;
|
|
365
365
|
}
|
|
366
|
+
export interface NetworkExchangeTokenViewResponse {
|
|
367
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
368
|
+
updated_at: Date;
|
|
369
|
+
/** * The requested chain ID eg: `1`. */
|
|
370
|
+
chain_id: number;
|
|
371
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
372
|
+
chain_name: string;
|
|
373
|
+
/** * List of response items. */
|
|
374
|
+
items: TokenV2VolumeWithChartData[];
|
|
375
|
+
/** * Pagination metadata. */
|
|
376
|
+
pagination: Pagination;
|
|
377
|
+
}
|
|
378
|
+
export interface TokenV2VolumeWithChartData {
|
|
379
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
380
|
+
chain_name: string;
|
|
381
|
+
/** * The requested chain ID eg: `1`. */
|
|
382
|
+
chain_id: string;
|
|
383
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
384
|
+
dex_name: string;
|
|
385
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
386
|
+
contract_address: string;
|
|
387
|
+
/** * The string returned by the `name()` method. */
|
|
388
|
+
contract_name: string;
|
|
389
|
+
/** * The total liquidity unscaled value. */
|
|
390
|
+
total_liquidity: number;
|
|
391
|
+
/** * The total volume 24h unscaled value. */
|
|
392
|
+
total_volume_24h: number;
|
|
393
|
+
/** * The contract logo URL. */
|
|
394
|
+
logo_url: string;
|
|
395
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
396
|
+
contract_ticker_symbol: string;
|
|
397
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
398
|
+
contract_decimals: number;
|
|
399
|
+
/** * The total amount of swaps in the last 24h. */
|
|
400
|
+
swap_count_24h: number;
|
|
401
|
+
/** * The exchange rate for the requested quote currency. */
|
|
402
|
+
quote_rate: number;
|
|
403
|
+
/** * The 24h exchange rate for the requested quote currency. */
|
|
404
|
+
quote_rate_24h: number;
|
|
405
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
406
|
+
pretty_quote_rate: string;
|
|
407
|
+
/** * A prettier version of the 24h exchange rate for rendering purposes. */
|
|
408
|
+
pretty_quote_rate_24h: string;
|
|
409
|
+
/** * A prettier version of the total liquidity quote for rendering purposes. */
|
|
410
|
+
pretty_total_liquidity_quote: string;
|
|
411
|
+
/** * A prettier version of the 24h volume quote for rendering purposes. */
|
|
412
|
+
pretty_total_volume_24h_quote: string;
|
|
413
|
+
/** * The total liquidity converted to fiat in `quote-currency`. */
|
|
414
|
+
total_liquidity_quote: number;
|
|
415
|
+
/** * The total volume 24h converted to fiat in `quote-currency`. */
|
|
416
|
+
total_volume_24h_quote: number;
|
|
417
|
+
/** * The number of transactions in the last 24h. */
|
|
418
|
+
transactions_24h: number;
|
|
419
|
+
volume_timeseries_7d: VolumeTokenTimeseries[];
|
|
420
|
+
volume_timeseries_30d: VolumeTokenTimeseries[];
|
|
421
|
+
liquidity_timeseries_7d: LiquidityTokenTimeseries[];
|
|
422
|
+
liquidity_timeseries_30d: LiquidityTokenTimeseries[];
|
|
423
|
+
price_timeseries_7d: PriceTokenTimeseries[];
|
|
424
|
+
price_timeseries_30d: PriceTokenTimeseries[];
|
|
425
|
+
}
|
|
426
|
+
export interface VolumeTokenTimeseries {
|
|
427
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
428
|
+
dex_name: string;
|
|
429
|
+
/** * The requested chain ID eg: `1`. */
|
|
430
|
+
chain_id: string;
|
|
431
|
+
/** * The current date. */
|
|
432
|
+
dt: string;
|
|
433
|
+
/** * The total volume unscaled for this day. */
|
|
434
|
+
total_volume: string;
|
|
435
|
+
/** * The volume in `quote-currency` denomination. */
|
|
436
|
+
volume_quote: number;
|
|
437
|
+
/** * A prettier version of the volume quote for rendering purposes. */
|
|
438
|
+
pretty_volume_quote: string;
|
|
439
|
+
}
|
|
440
|
+
export interface LiquidityTokenTimeseries {
|
|
441
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
442
|
+
dex_name: string;
|
|
443
|
+
/** * The requested chain ID eg: `1`. */
|
|
444
|
+
chain_id: string;
|
|
445
|
+
/** * The current date. */
|
|
446
|
+
dt: string;
|
|
447
|
+
/** * The total liquidity unscaled up to this day. */
|
|
448
|
+
total_liquidity: string;
|
|
449
|
+
/** * The liquidity in `quote-currency` denomination. */
|
|
450
|
+
liquidity_quote: number;
|
|
451
|
+
/** * A prettier version of the liquidity quote for rendering purposes. */
|
|
452
|
+
pretty_liquidity_quote: string;
|
|
453
|
+
}
|
|
454
|
+
export interface PriceTokenTimeseries {
|
|
455
|
+
/** * The name of the DEX, eg: `uniswap_v2`. */
|
|
456
|
+
dex_name: string;
|
|
457
|
+
/** * The requested chain ID eg: `1`. */
|
|
458
|
+
chain_id: string;
|
|
459
|
+
/** * The current date. */
|
|
460
|
+
dt: string;
|
|
461
|
+
/** * The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`. */
|
|
462
|
+
quote_currency: string;
|
|
463
|
+
/** * The exchange rate for the requested quote currency. */
|
|
464
|
+
quote_rate: number;
|
|
465
|
+
/** * A prettier version of the exchange rate for rendering purposes. */
|
|
466
|
+
pretty_quote_rate: string;
|
|
467
|
+
}
|
|
366
468
|
export interface SupportedDexesResponse {
|
|
367
469
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
368
470
|
updated_at: Date;
|
|
@@ -482,6 +584,18 @@ export interface TransactionsForExchangeResponse {
|
|
|
482
584
|
/** * Pagination metadata. */
|
|
483
585
|
pagination: Pagination;
|
|
484
586
|
}
|
|
587
|
+
export interface NetworkTransactionsResponse {
|
|
588
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
589
|
+
updated_at: Date;
|
|
590
|
+
/** * The requested chain ID eg: `1`. */
|
|
591
|
+
chain_id: number;
|
|
592
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
593
|
+
chain_name: string;
|
|
594
|
+
/** * List of response items. */
|
|
595
|
+
items: ExchangeTransaction[];
|
|
596
|
+
/** * Pagination metadata. */
|
|
597
|
+
pagination: Pagination;
|
|
598
|
+
}
|
|
485
599
|
export interface EcosystemChartDataResponse {
|
|
486
600
|
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
487
601
|
updated_at: Date;
|