@covalenthq/client-sdk 2.1.0 → 2.1.1

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.
@@ -17,9 +17,6 @@ export declare class TransactionService {
17
17
  * @param {GetTransactionQueryParamOpts} queryParamOpts
18
18
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
19
19
  * - `noLogs`: Omit log events.
20
- * - `withDex`: Decoded DEX details including protocol (e.g. Uniswap), event (e.g 'add_liquidity') and tokens involved with historical prices. Additional 0.05 credits charged if data available.
21
- * - `withNftSales`: Decoded NFT sales details including marketplace (e.g. Opensea) and cached media links. Additional 0.05 credits charged if data available.
22
- * - `withLending`: Decoded lending details including protocol (e.g. Aave), event (e.g. 'deposit') and tokens involved with prices. Additional 0.05 credits charged if data available.
23
20
  * - `withSafe`: Include safe details.
24
21
  *
25
22
  */
@@ -455,12 +455,17 @@ export interface LogoUrls {
455
455
  /** * The chain logo URL. */
456
456
  chain_logo_url: string;
457
457
  }
458
- export type GoldRushResponse<T> = Nullable<{
458
+ export type GoldRushResponse<T> = {
459
459
  data: T;
460
- error: boolean;
461
- error_code: number | string;
460
+ error: false | null;
461
+ error_code: null;
462
+ error_message: null;
463
+ } | {
464
+ data: null;
465
+ error: true;
466
+ error_code: number;
462
467
  error_message: string;
463
- }>;
468
+ };
464
469
  export interface GoldRushClientSettings {
465
470
  /** * Toggle to analyze the execution of each api request. */
466
471
  debug?: boolean;
@@ -405,12 +405,6 @@ export type GetTransactionQueryParamOpts = Nullable<{
405
405
  quoteCurrency?: Quote;
406
406
  /** * Omit log events. */
407
407
  noLogs?: boolean;
408
- /** * Decoded DEX details including protocol (e.g. Uniswap), event (e.g 'add_liquidity') and tokens involved with historical prices. Additional 0.05 credits charged if data available. */
409
- withDex?: boolean;
410
- /** * Decoded NFT sales details including marketplace (e.g. Opensea) and cached media links. Additional 0.05 credits charged if data available. */
411
- withNftSales?: boolean;
412
- /** * Decoded lending details including protocol (e.g. Aave), event (e.g. 'deposit') and tokens involved with prices. Additional 0.05 credits charged if data available. */
413
- withLending?: boolean;
414
408
  /** * Include safe details. */
415
409
  withSafe?: boolean;
416
410
  }>;
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "2.1.0";
1
+ var version = "2.1.1";
2
2
 
3
3
  const bigIntParser = (val) => {
4
4
  if (val === null || val === undefined) {
@@ -1730,9 +1730,6 @@ class TransactionService {
1730
1730
  * @param {GetTransactionQueryParamOpts} queryParamOpts
1731
1731
  * - `quoteCurrency`: The currency to convert. Supports `USD`, `CAD`, `EUR`, `SGD`, `INR`, `JPY`, `VND`, `CNY`, `KRW`, `RUB`, `TRY`, `NGN`, `ARS`, `AUD`, `CHF`, and `GBP`.
1732
1732
  * - `noLogs`: Omit log events.
1733
- * - `withDex`: Decoded DEX details including protocol (e.g. Uniswap), event (e.g 'add_liquidity') and tokens involved with historical prices. Additional 0.05 credits charged if data available.
1734
- * - `withNftSales`: Decoded NFT sales details including marketplace (e.g. Opensea) and cached media links. Additional 0.05 credits charged if data available.
1735
- * - `withLending`: Decoded lending details including protocol (e.g. Aave), event (e.g. 'deposit') and tokens involved with prices. Additional 0.05 credits charged if data available.
1736
1733
  * - `withSafe`: Include safe details.
1737
1734
  *
1738
1735
  */
@@ -1746,18 +1743,6 @@ class TransactionService {
1746
1743
  key: "no-logs",
1747
1744
  value: queryParamOpts?.noLogs,
1748
1745
  },
1749
- {
1750
- key: "with-dex",
1751
- value: queryParamOpts?.withDex,
1752
- },
1753
- {
1754
- key: "with-nft-sales",
1755
- value: queryParamOpts?.withNftSales,
1756
- },
1757
- {
1758
- key: "with-lending",
1759
- value: queryParamOpts?.withLending,
1760
- },
1761
1746
  ]);
1762
1747
  const parseData = (data) => {
1763
1748
  if (data.data) {
@@ -2457,7 +2442,7 @@ class Execution {
2457
2442
  const parsedData = parseData(data);
2458
2443
  completed = true;
2459
2444
  return {
2460
- data: parsedData.data ?? null,
2445
+ data: parsedData.data,
2461
2446
  error: false,
2462
2447
  error_code: null,
2463
2448
  error_message: null,