@covalenthq/client-sdk 2.3.7 → 2.3.8

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.
@@ -9,7 +9,10 @@ export declare enum StreamingChain {
9
9
  ETH_MAINNET = "ETH_MAINNET",
10
10
  BSC_MAINNET = "BSC_MAINNET",
11
11
  HYPERCORE_MAINNET = "HYPERCORE_MAINNET",
12
- MONAD_MAINNET = "MONAD_MAINNET"
12
+ HYPEREVM_MAINNET = "HYPEREVM_MAINNET",
13
+ MONAD_MAINNET = "MONAD_MAINNET",
14
+ POLYGON_MAINNET = "POLYGON_MAINNET",
15
+ MEGAETH_MAINNET = "MEGAETH_MAINNET"
13
16
  }
14
17
  export declare enum StreamingInterval {
15
18
  ONE_SECOND = "ONE_SECOND",
@@ -35,7 +38,7 @@ export declare enum StreamingProtocol {
35
38
  UNISWAP_V2 = "UNISWAP_V2",
36
39
  UNISWAP_V3 = "UNISWAP_V3",
37
40
  VIRTUALS_V2 = "VIRTUALS_V2",
38
- CLANKER_V3 = "CLANKER_V3",
41
+ CLANKER_V3 = "CLANKER",
39
42
  RAYDIUM_AMM = "RAYDIUM_AMM",
40
43
  RAYDIUM_CLMM = "RAYDIUM_CLMM",
41
44
  RAYDIUM_CPMM = "RAYDIUM_CPMM",
@@ -51,7 +54,13 @@ export declare enum StreamingProtocol {
51
54
  SHADOW_V2 = "SHADOW_V2",
52
55
  SHADOW_V3 = "SHADOW_V3",
53
56
  OCTOSWAP_V2 = "OCTOSWAP_V2",
54
- OCTOSWAP_V3 = "OCTOSWAP_V3"
57
+ OCTOSWAP_V3 = "OCTOSWAP_V3",
58
+ QUICKSWAP_V2 = "QUICKSWAP_V2",
59
+ QUICKSWAP_V3 = "QUICKSWAP_V3",
60
+ SUSHISWAP_V2 = "SUSHISWAP_V2",
61
+ PROJECT_X = "PROJECT_X",
62
+ KUMBAYA_V1 = "KUMBAYA_V1",
63
+ JOE_V2 = "JOE_V2"
55
64
  }
56
65
  /**
57
66
  * OHLCV Pairs Stream Types
@@ -140,9 +149,9 @@ export interface NewPairsStreamResponse {
140
149
  event_name: string;
141
150
  quote_rate: number;
142
151
  quote_rate_usd: number;
143
- base_token_metadata: ContractMetadata;
144
- quote_token_metadata: ContractMetadata;
145
- pair_metadata: ContractMetadata;
152
+ base_token: ContractMetadata;
153
+ quote_token: ContractMetadata;
154
+ pair: ContractMetadata;
146
155
  }
147
156
  /**
148
157
  * Update Pairs Stream Types
@@ -250,6 +259,58 @@ export interface WalletActivityStreamResponse {
250
259
  decoded_details?: DecodedTransactionDetails;
251
260
  logs: WalletActivityLogItem[];
252
261
  }
262
+ /**
263
+ * Token Search Query Types
264
+ */
265
+ export interface TokenSearchParams {
266
+ query: string;
267
+ }
268
+ export interface TokenSearchResponse {
269
+ pair_address: string;
270
+ chain_name: string;
271
+ quote_rate: number;
272
+ quote_rate_usd: number;
273
+ volume: number;
274
+ volume_usd: number;
275
+ market_cap: number;
276
+ base_token: ContractMetadata;
277
+ quote_token: ContractMetadata;
278
+ }
279
+ /**
280
+ * Unrealized PnL for Token Query Types
281
+ */
282
+ export interface UPnLForTokenParams {
283
+ chain_name: StreamingChain;
284
+ token_address: string;
285
+ }
286
+ export interface UPnLForTokenResponse {
287
+ token_address: string;
288
+ wallet_address: string;
289
+ volume: string;
290
+ transactions_count: number;
291
+ pnl_realized_usd: number;
292
+ balance: string;
293
+ balance_pretty: string;
294
+ pnl_unrealized_usd: number;
295
+ contract_metadata: ContractMetadata;
296
+ }
297
+ /**
298
+ * Unrealized PnL for Wallet Query Types
299
+ */
300
+ export interface UPnLForWalletParams {
301
+ chain_name: StreamingChain;
302
+ wallet_address: string;
303
+ }
304
+ export interface UPnLForWalletResponse {
305
+ token_address: string;
306
+ cost_basis: number;
307
+ current_price: number;
308
+ pnl_realized_usd: number | null;
309
+ pnl_unrealized_usd: number;
310
+ net_balance_change: string;
311
+ marketcap_usd: string;
312
+ contract_metadata: ContractMetadata;
313
+ }
253
314
  /**
254
315
  * Streaming service configuration
255
316
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalenthq/client-sdk",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,8 @@
16
16
  "homepage": "https://github.com/covalenthq/covalent-api-sdk-ts#readme",
17
17
  "dependencies": {
18
18
  "big.js": "^6.2.1",
19
- "graphql-ws": "^6.0.5"
19
+ "graphql-ws": "^6.0.5",
20
+ "graphqurl": "^1.0.3"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@rollup/plugin-commonjs": "^25.0.4",
@@ -67,6 +68,8 @@
67
68
  "clean": "rimraf dist",
68
69
  "start": "rollup -c",
69
70
  "lint": "eslint .",
70
- "pretty": "prettier . --write"
71
+ "pretty": "prettier . --write",
72
+ "sync-docs": "ts-node --project s/tsconfig.json s/sync-docs/index.ts",
73
+ "sync-docs:check": "ts-node --project s/tsconfig.json s/sync-docs/index.ts --check"
71
74
  }
72
75
  }