@covalenthq/client-sdk 2.3.1 → 2.3.3

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.
Files changed (66) hide show
  1. package/dist/{cjs/index.js → index.js} +92 -32
  2. package/dist/index.js.map +1 -0
  3. package/dist/{esm/src → src}/services/StreamingService.d.ts +26 -1
  4. package/dist/{esm/src → src}/utils/types/Generic.types.d.ts +11 -27
  5. package/dist/{esm/src → src}/utils/types/StreamingService.types.d.ts +22 -1
  6. package/package.json +18 -23
  7. package/dist/cjs/index.js.map +0 -1
  8. package/dist/cjs/src/services/StreamingService.d.ts +0 -151
  9. package/dist/cjs/src/utils/types/Generic.types.d.ts +0 -391
  10. package/dist/cjs/src/utils/types/StreamingService.types.d.ts +0 -201
  11. package/dist/esm/index.d.ts +0 -16
  12. package/dist/esm/index.js +0 -5696
  13. package/dist/esm/index.js.map +0 -1
  14. package/dist/esm/src/GoldRushClient.d.ts +0 -27
  15. package/dist/esm/src/services/AllChainsService.d.ts +0 -63
  16. package/dist/esm/src/services/BalanceService.d.ts +0 -125
  17. package/dist/esm/src/services/BaseService.d.ts +0 -163
  18. package/dist/esm/src/services/BitcoinService.d.ts +0 -40
  19. package/dist/esm/src/services/NftService.d.ts +0 -193
  20. package/dist/esm/src/services/PricingService.d.ts +0 -36
  21. package/dist/esm/src/services/SecurityService.d.ts +0 -28
  22. package/dist/esm/src/services/TransactionService.d.ts +0 -134
  23. package/dist/esm/src/utils/functions/bigIntParser.d.ts +0 -1
  24. package/dist/esm/src/utils/functions/calculatePrettyBalance.d.ts +0 -1
  25. package/dist/esm/src/utils/functions/debugOutput.d.ts +0 -2
  26. package/dist/esm/src/utils/functions/endpointGenerator.d.ts +0 -4
  27. package/dist/esm/src/utils/functions/execution.d.ts +0 -11
  28. package/dist/esm/src/utils/functions/isValidApiKey.d.ts +0 -1
  29. package/dist/esm/src/utils/functions/paginateEndpoint.d.ts +0 -7
  30. package/dist/esm/src/utils/functions/prettifyCurrency.d.ts +0 -2
  31. package/dist/esm/src/utils/functions/timestamp-parser.d.ts +0 -1
  32. package/dist/esm/src/utils/types/AllChainService.types.d.ts +0 -123
  33. package/dist/esm/src/utils/types/BalanceService.types.d.ts +0 -442
  34. package/dist/esm/src/utils/types/BaseService.types.d.ts +0 -312
  35. package/dist/esm/src/utils/types/BitcoinService.types.d.ts +0 -88
  36. package/dist/esm/src/utils/types/NftService.types.d.ts +0 -355
  37. package/dist/esm/src/utils/types/PricingService.types.d.ts +0 -80
  38. package/dist/esm/src/utils/types/SecurityService.types.d.ts +0 -124
  39. package/dist/esm/src/utils/types/TransactionService.types.d.ts +0 -392
  40. /package/dist/{cjs/index.d.ts → index.d.ts} +0 -0
  41. /package/dist/{cjs/src → src}/GoldRushClient.d.ts +0 -0
  42. /package/dist/{cjs/src → src}/services/AllChainsService.d.ts +0 -0
  43. /package/dist/{cjs/src → src}/services/BalanceService.d.ts +0 -0
  44. /package/dist/{cjs/src → src}/services/BaseService.d.ts +0 -0
  45. /package/dist/{cjs/src → src}/services/BitcoinService.d.ts +0 -0
  46. /package/dist/{cjs/src → src}/services/NftService.d.ts +0 -0
  47. /package/dist/{cjs/src → src}/services/PricingService.d.ts +0 -0
  48. /package/dist/{cjs/src → src}/services/SecurityService.d.ts +0 -0
  49. /package/dist/{cjs/src → src}/services/TransactionService.d.ts +0 -0
  50. /package/dist/{cjs/src → src}/utils/functions/bigIntParser.d.ts +0 -0
  51. /package/dist/{cjs/src → src}/utils/functions/calculatePrettyBalance.d.ts +0 -0
  52. /package/dist/{cjs/src → src}/utils/functions/debugOutput.d.ts +0 -0
  53. /package/dist/{cjs/src → src}/utils/functions/endpointGenerator.d.ts +0 -0
  54. /package/dist/{cjs/src → src}/utils/functions/execution.d.ts +0 -0
  55. /package/dist/{cjs/src → src}/utils/functions/isValidApiKey.d.ts +0 -0
  56. /package/dist/{cjs/src → src}/utils/functions/paginateEndpoint.d.ts +0 -0
  57. /package/dist/{cjs/src → src}/utils/functions/prettifyCurrency.d.ts +0 -0
  58. /package/dist/{cjs/src → src}/utils/functions/timestamp-parser.d.ts +0 -0
  59. /package/dist/{cjs/src → src}/utils/types/AllChainService.types.d.ts +0 -0
  60. /package/dist/{cjs/src → src}/utils/types/BalanceService.types.d.ts +0 -0
  61. /package/dist/{cjs/src → src}/utils/types/BaseService.types.d.ts +0 -0
  62. /package/dist/{cjs/src → src}/utils/types/BitcoinService.types.d.ts +0 -0
  63. /package/dist/{cjs/src → src}/utils/types/NftService.types.d.ts +0 -0
  64. /package/dist/{cjs/src → src}/utils/types/PricingService.types.d.ts +0 -0
  65. /package/dist/{cjs/src → src}/utils/types/SecurityService.types.d.ts +0 -0
  66. /package/dist/{cjs/src → src}/utils/types/TransactionService.types.d.ts +0 -0
@@ -1,151 +0,0 @@
1
- import { type NewPairsStreamParams, type NewPairsStreamResponse, type OHLCVPairsStreamParams, type OHLCVPairsStreamResponse, type OHLCVTokensStreamParams, type OHLCVTokensStreamResponse, type StreamingServiceConfig, type StreamSubscriptionOptions, type TokenBalancesStreamParams, type TokenBalancesStreamResponse, type UnsubscribeFunction, type WalletActivityStreamParams, type WalletActivityStreamResponse } from "../utils/types/StreamingService.types";
2
- import { type Client } from "graphql-ws";
3
- /**
4
- * Streaming API Service
5
- *
6
- */
7
- export declare class StreamingService {
8
- private defaultConfig;
9
- constructor(apiKey: string, config?: StreamingServiceConfig);
10
- /**
11
- * Initialize the streaming connection
12
- */
13
- getClient(): Client;
14
- /**
15
- * Disconnect from the streaming service
16
- */
17
- disconnect(): Promise<void>;
18
- /**
19
- * Check if the client is connected
20
- */
21
- get isConnected(): boolean;
22
- /**
23
- * Subscribe to a custom GraphQL subscription
24
- * This allows for advanced usage and future extensibility
25
- *
26
- * @param query - GraphQL subscription query
27
- * @param variables - Query variables
28
- * @param callbacks - Subscription callbacks
29
- * @returns Unsubscribe function
30
- */
31
- rawQuery<T = Array<object>>(query: string, variables: Record<string, unknown>, callbacks: StreamSubscriptionOptions<T>): UnsubscribeFunction;
32
- /**
33
- * Subscribe to OHLCV data for specific pairs
34
- *
35
- * @param params - Parameters for the OHLCV pairs stream
36
- * @param callbacks - Subscription callbacks
37
- * @returns Unsubscribe function
38
- *
39
- * @example
40
- * ```typescript
41
- * const unsubscribe = streamingService.subscribeToOHLCVPairs(
42
- * {
43
- * chain_name: StreamingChain.BASE_MAINNET,
44
- * pair_addresses: ["0x9c087Eb773291e50CF6c6a90ef0F4500e349B903"],
45
- * interval: StreamingInterval.ONE_MINUTE,
46
- * timeframe: StreamingTimeframe.ONE_HOUR
47
- * },
48
- * {
49
- * next: (data) => console.log("OHLCV Data:", data),
50
- * error: (err) => console.error("Error:", err),
51
- * complete: () => console.log("Stream completed")
52
- * }
53
- * );
54
- * ```
55
- */
56
- subscribeToOHLCVPairs(params: OHLCVPairsStreamParams, callbacks: StreamSubscriptionOptions<OHLCVPairsStreamResponse[]>): UnsubscribeFunction;
57
- /**
58
- * Subscribe to OHLCV data for specific tokens
59
- *
60
- * @param params - Parameters for the OHLCV tokens stream
61
- * @param callbacks - Subscription callbacks
62
- * @returns Unsubscribe function
63
- *
64
- * @example
65
- * ```typescript
66
- * const unsubscribe = streamingService.subscribeToOHLCVTokens(
67
- * {
68
- * chain_name: StreamingChain.BASE_MAINNET,
69
- * token_addresses: ["0x4B6104755AfB5Da4581B81C552DA3A25608c73B8"],
70
- * interval: StreamingInterval.ONE_MINUTE,
71
- * timeframe: StreamingTimeframe.ONE_HOUR
72
- * },
73
- * {
74
- * next: (data) => console.log("OHLCV Token Data:", data),
75
- * error: (err) => console.error("Error:", err),
76
- * complete: () => console.log("Stream completed")
77
- * }
78
- * );
79
- * ```
80
- */
81
- subscribeToOHLCVTokens(params: OHLCVTokensStreamParams, callbacks: StreamSubscriptionOptions<OHLCVTokensStreamResponse[]>): UnsubscribeFunction;
82
- /**
83
- * Subscribe to new DEX pairs created on supported decentralized exchanges
84
- *
85
- * @param params - Parameters for the new pairs stream
86
- * @param callbacks - Subscription callbacks
87
- * @returns Unsubscribe function
88
- *
89
- * @example
90
- * ```typescript
91
- * const unsubscribe = streamingService.subscribeToNewPairs(
92
- * {
93
- * chain_name: StreamingChain.BASE_MAINNET,
94
- * protocols: [StreamingProtocol.UNISWAP_V2, StreamingProtocol.UNISWAP_V3]
95
- * },
96
- * {
97
- * next: (data) => console.log("New Pairs:", data),
98
- * error: (err) => console.error("Error:", err),
99
- * complete: () => console.log("Stream completed")
100
- * }
101
- * );
102
- * ```
103
- */
104
- subscribeToNewPairs(params: NewPairsStreamParams, callbacks: StreamSubscriptionOptions<NewPairsStreamResponse[]>): UnsubscribeFunction;
105
- /**
106
- * Subscribe to real-time token balance updates for a specific wallet address
107
- *
108
- * @param params - Parameters for the token balances stream
109
- * @param callbacks - Subscription callbacks
110
- * @returns Unsubscribe function
111
- *
112
- * @example
113
- * ```typescript
114
- * const unsubscribe = streamingService.subscribeToTokenBalances(
115
- * {
116
- * chain_name: StreamingChain.BASE_MAINNET,
117
- * wallet_address: "0x198ef79f1f515f02dfe9e3115ed9fc07183f02fc"
118
- * },
119
- * {
120
- * next: (data) => console.log("Token Balances:", data),
121
- * error: (err) => console.error("Error:", err),
122
- * complete: () => console.log("Stream completed")
123
- * }
124
- * );
125
- * ```
126
- */
127
- subscribeToTokenBalances(params: TokenBalancesStreamParams, callbacks: StreamSubscriptionOptions<TokenBalancesStreamResponse>): UnsubscribeFunction;
128
- /**
129
- * Subscribe to real-time wallet activity including transactions, token transfers, and smart contract interactions
130
- *
131
- * @param params - Parameters for the wallet activity stream
132
- * @param callbacks - Subscription callbacks
133
- * @returns Unsubscribe function
134
- *
135
- * @example
136
- * ```typescript
137
- * const unsubscribe = streamingService.subscribeToWalletActivity(
138
- * {
139
- * chain_name: StreamingChain.BASE_MAINNET,
140
- * wallet_addresses: ["0x198ef79f1f515f02dfe9e3115ed9fc07183f02fc"]
141
- * },
142
- * {
143
- * next: (data) => console.log("Wallet Activity:", data),
144
- * error: (err) => console.error("Error:", err),
145
- * complete: () => console.log("Stream completed")
146
- * }
147
- * );
148
- * ```
149
- */
150
- subscribeToWalletActivity(params: WalletActivityStreamParams, callbacks: StreamSubscriptionOptions<WalletActivityStreamResponse[]>): UnsubscribeFunction;
151
- }
@@ -1,391 +0,0 @@
1
- export declare enum ChainName {
2
- ETH_MAINNET = "eth-mainnet",
3
- ETH_SEPOLIA = "eth-sepolia",
4
- ETH_HOLESKY = "eth-holesky",
5
- MATIC_MAINNET = "matic-mainnet",
6
- AVALANCHE_MAINNET = "avalanche-mainnet",
7
- AVALANCHE_TESTNET = "avalanche-testnet",
8
- BSC_MAINNET = "bsc-mainnet",
9
- BSC_TESTNET = "bsc-testnet",
10
- MOONBEAM_MAINNET = "moonbeam-mainnet",
11
- MOONBEAM_MOONBASE_ALPHA = "moonbeam-moonbase-alpha",
12
- MOONBEAM_MOONRIVER = "moonbeam-moonriver",
13
- RSK_MAINNET = "rsk-mainnet",
14
- RSK_TESTNET = "rsk-testnet",
15
- ARBITRUM_MAINNET = "arbitrum-mainnet",
16
- ARBITRUM_NOVA_MAINNET = "arbitrum-nova-mainnet",
17
- ARBITRUM_SEPOLIA = "arbitrum-sepolia",
18
- FANTOM_MAINNET = "fantom-mainnet",
19
- FANTOM_TESTNET = "fantom-testnet",
20
- PALM_MAINNET = "palm-mainnet",
21
- PALM_TESTNET = "palm-testnet",
22
- SOLANA_MAINNET = "solana-mainnet",
23
- BTC_MAINNET = "btc-mainnet",
24
- AXIE_MAINNET = "axie-mainnet",
25
- OPTIMISM_MAINNET = "optimism-mainnet",
26
- OPTIMISM_SEPOLIA = "optimism-sepolia",
27
- CRONOS_MAINNET = "cronos-mainnet",
28
- CRONOS_TESTNET = "cronos-testnet",
29
- CRONOS_ZKEVM_TESTNET = "cronos-zkevm-testnet",
30
- CRONOS_ZKEVM_MAINNET = "cronos-zkevm-mainnet",
31
- AURORA_MAINNET = "aurora-mainnet",
32
- AURORA_TESTNET = "aurora-testnet",
33
- EMERALD_PARATIME_MAINNET = "emerald-paratime-mainnet",
34
- DEFI_KINGDOMS_MAINNET = "defi-kingdoms-mainnet",
35
- DEFI_KINGDOMS_TESTNET = "defi-kingdoms-testnet",
36
- BOBA_MAINNET = "boba-mainnet",
37
- BOBA_BNB_MAINNET = "boba-bnb-mainnet",
38
- BOBA_BNB_TESTNET = "boba-bnb-testnet",
39
- SCROLL_SEPOLIA_TESTNET = "scroll-sepolia-testnet",
40
- METIS_MAINNET = "metis-mainnet",
41
- AVALANCHE_DEXALOT_MAINNET = "avalanche-dexalot-mainnet",
42
- AVALANCHE_DEXALOT_TESTNET = "avalanche-dexalot-testnet",
43
- AVALANCHE_SHRAPNEL_MAINNET = "avalanche-shrapnel-mainnet",
44
- AVALANCHE_NUMBERS = "avalanche-numbers",
45
- AVALANCHE_XANACHAIN = "avalanche-xanachain",
46
- AVALANCHE_STEP_NETWORK = "avalanche-step-network",
47
- AVALANCHE_SHRAPNEL_TESTNET = "avalanche-shrapnel-testnet",
48
- AVALANCHE_BEAM_TESTNET = "avalanche-beam-testnet",
49
- AVALANCHE_BLITZ_TESTNET = "avalanche-blitz-testnet",
50
- AVALANCHE_UPTN = "avalanche-uptn",
51
- AVALANCHE_BEAM_MAINNET = "avalanche-beam-mainnet",
52
- AVALANCHE_MIRAI_TESTNET = "avalanche-mirai-testnet",
53
- BERACHAIN_MAINNET = "berachain-mainnet",
54
- UNICHAIN_MAINNET = "unichain-mainnet",
55
- CANTO_MAINNET = "canto-mainnet",
56
- FLARENETWORKS_FLARE_MAINNET = "flarenetworks-flare-mainnet",
57
- FLARENETWORKS_FLARE_TESTNET = "flarenetworks-flare-testnet",
58
- POLYGON_ZKEVM_MAINNET = "polygon-zkevm-mainnet",
59
- LINEA_MAINNET = "linea-mainnet",
60
- LINEA_GOERLI_TESTNET = "linea-goerli-testnet",
61
- LINEA_SEPOLIA_TESTNET = "linea-sepolia-testnet",
62
- POLYGON_ZKEVM_TESTNET = "polygon-zkevm-testnet",
63
- POLYGON_AMOY_TESTNET = "polygon-amoy-testnet",
64
- MANTLE_MAINNET = "mantle-mainnet",
65
- MANTLE_SEPOLIA_TESTNET = "mantle-sepolia-testnet",
66
- POLYGON_ZKEVM_CARDONA_TESTNET = "polygon-zkevm-cardona-testnet",
67
- BASE_MAINNET = "base-mainnet",
68
- BASE_SEPOLIA_TESTNET = "base-sepolia-testnet",
69
- SX_MAINNET = "sx-mainnet",
70
- OASIS_SAPPHIRE_MAINNET = "oasis-sapphire-mainnet",
71
- SYNDR_TESTNET = "syndr-testnet",
72
- OASIS_SAPPHIRE_TESTNET = "oasis-sapphire-testnet",
73
- CELO_MAINNET = "celo-mainnet",
74
- X1_MAINNET = "x1-mainnet",
75
- HORIZEN_EON_MAINNET = "horizen-eon-mainnet",
76
- HORIZEN_GOBI_TESTNET = "horizen-gobi-testnet",
77
- FRAXTAL_MAINNET = "fraxtal-mainnet",
78
- APECHAIN_TESTNET = "apechain-testnet",
79
- BERACHAIN_TESTNET = "berachain-testnet",
80
- REDSTONE_MAINNET = "redstone-mainnet",
81
- SEI_MAINNET = "sei-mainnet",
82
- APECHAIN_MAINNET = "apechain-mainnet",
83
- UNICHAIN_SEPOLIA_TESTNET = "unichain-sepolia-testnet",
84
- WORLD_MAINNET = "world-mainnet",
85
- WORLD_SEPOLIA_TESTNET = "world-sepolia-testnet",
86
- LENS_SEPOLIA_TESTNET = "lens-sepolia-testnet",
87
- INK_SEPOLIA_TESTNET = "ink-sepolia-testnet",
88
- INK_MAINNET = "ink-mainnet",
89
- AVALANCHE_MELD_TESTNET = "avalanche-meld-testnet",
90
- AVALANCHE_MELD_MAINNET = "avalanche-meld-mainnet",
91
- GUNZILLA_TESTNET = "gunzilla-testnet",
92
- ZORA_MAINNET = "zora-mainnet",
93
- ZORA_SEPOLIA_TESTNET = "zora-sepolia-testnet",
94
- ZKSYNC_MAINNET = "zksync-mainnet",
95
- ZKSYNC_SEPOLIA_TESTNET = "zksync-sepolia-testnet",
96
- BNB_OPBNB_TESTNET = "bnb-opbnb-testnet",
97
- BNB_OPBNB_MAINNET = "bnb-opbnb-mainnet",
98
- ZETACHAIN_TESTNET = "zetachain-testnet",
99
- ZETACHAIN_MAINNET = "zetachain-mainnet",
100
- KINTO_TESTNET = "kinto-testnet",
101
- MANTA_SEPOLIA_TESTNET = "manta-sepolia-testnet",
102
- ROLLUX_MAINNET = "rollux-mainnet",
103
- GNOSIS_MAINNET = "gnosis-mainnet",
104
- GNOSIS_TESTNET = "gnosis-testnet",
105
- VICTION_MAINNET = "viction-mainnet",
106
- VICTION_TESTNET = "viction-testnet",
107
- TAIKO_HEKLA_TESTNET = "taiko-hekla-testnet",
108
- TAIKO_MAINNET = "taiko-mainnet",
109
- MERLIN_MAINNET = "merlin-mainnet",
110
- MERLIN_TESTNET = "merlin-testnet",
111
- MOVEMENT_MEVM_TESTNET = "movement-mevm-testnet",
112
- BLAST_MAINNET = "blast-mainnet",
113
- SCROLL_MAINNET = "scroll-mainnet"
114
- }
115
- export declare enum ChainID {
116
- ETH_MAINNET = 1,
117
- ETH_SEPOLIA = 11155111,
118
- ETH_HOLESKY = 17000,
119
- MATIC_MAINNET = 137,
120
- AVALANCHE_MAINNET = 43114,
121
- AVALANCHE_TESTNET = 43113,
122
- BSC_MAINNET = 56,
123
- BSC_TESTNET = 97,
124
- MOONBEAM_MAINNET = 1284,
125
- MOONBEAM_MOONBASE_ALPHA = 1287,
126
- MOONBEAM_MOONRIVER = 1285,
127
- RSK_MAINNET = 30,
128
- RSK_TESTNET = 31,
129
- ARBITRUM_MAINNET = 42161,
130
- ARBITRUM_NOVA_MAINNET = 42170,
131
- ARBITRUM_SEPOLIA = 421614,
132
- FANTOM_MAINNET = 250,
133
- FANTOM_TESTNET = 4002,
134
- PALM_MAINNET = 11297108109,
135
- PALM_TESTNET = 11297108099,
136
- BTC_MAINNET = 20090103,
137
- SOLANA_MAINNET = 1399811149,
138
- AXIE_MAINNET = 2020,
139
- OPTIMISM_MAINNET = 10,
140
- OPTIMISM_SEPOLIA = 11155420,
141
- CRONOS_MAINNET = 25,
142
- CRONOS_TESTNET = 338,
143
- CRONOS_ZKEVM_TESTNET = 282,
144
- CRONOS_ZKEVM_MAINNET = 388,
145
- AURORA_MAINNET = 1313161554,
146
- AURORA_TESTNET = 1313161555,
147
- EMERALD_PARATIME_MAINNET = 42262,
148
- DEFI_KINGDOMS_MAINNET = 53935,
149
- DEFI_KINGDOMS_TESTNET = 335,
150
- BOBA_MAINNET = 288,
151
- BOBA_BNB_MAINNET = 56288,
152
- BOBA_BNB_TESTNET = 9728,
153
- SCROLL_SEPOLIA_TESTNET = 534351,
154
- METIS_MAINNET = 1088,
155
- AVALANCHE_DEXALOT_MAINNET = 432204,
156
- AVALANCHE_DEXALOT_TESTNET = 432201,
157
- AVALANCHE_SHRAPNEL_MAINNET = 2044,
158
- AVALANCHE_NUMBERS = 10507,
159
- AVALANCHE_XANACHAIN = 8888,
160
- AVALANCHE_STEP_NETWORK = 1234,
161
- AVALANCHE_SHRAPNEL_TESTNET = 2038,
162
- AVALANCHE_BEAM_TESTNET = 13337,
163
- AVALANCHE_BLITZ_TESTNET = 1343,
164
- AVALANCHE_UPTN = 6119,
165
- AVALANCHE_BEAM_MAINNET = 4337,
166
- AVALANCHE_MIRAI_TESTNET = 2195,
167
- BERACHAIN_MAINNET = 80094,
168
- UNICHAIN_MAINNET = 130,
169
- CANTO_MAINNET = 7700,
170
- FLARENETWORKS_FLARE_MAINNET = 14,
171
- FLARENETWORKS_FLARE_TESTNET = 114,
172
- POLYGON_ZKEVM_MAINNET = 1101,
173
- LINEA_MAINNET = 59144,
174
- LINEA_GOERLI_TESTNET = 59140,
175
- LINEA_SEPOLIA_TESTNET = 59141,
176
- POLYGON_ZKEVM_TESTNET = 1422,
177
- POLYGON_AMOY_TESTNET = 80002,
178
- MANTLE_MAINNET = 5000,
179
- MANTLE_SEPOLIA_TESTNET = 5003,
180
- POLYGON_ZKEVM_CARDONA_TESTNET = 2442,
181
- BASE_MAINNET = 8453,
182
- BASE_SEPOLIA_TESTNET = 84532,
183
- SX_MAINNET = 416,
184
- OASIS_SAPPHIRE_MAINNET = 23294,
185
- SYNDR_TESTNET = 412346,
186
- OASIS_SAPPHIRE_TESTNET = 23295,
187
- CELO_MAINNET = 42220,
188
- X1_MAINNET = 196,
189
- HORIZEN_EON_MAINNET = 7332,
190
- HORIZEN_GOBI_TESTNET = 1663,
191
- FRAXTAL_MAINNET = 252,
192
- APECHAIN_TESTNET = 1798,
193
- BERACHAIN_TESTNET = 80084,
194
- REDSTONE_MAINNET = 690,
195
- SEI_MAINNET = 1329,
196
- APECHAIN_MAINNET = 33139,
197
- UNICHAIN_SEPOLIA_TESTNET = 1301,
198
- WORLD_MAINNET = 480,
199
- WORLD_SEPOLIA_TESTNET = 4801,
200
- LENS_SEPOLIA_TESTNET = 37111,
201
- INK_SEPOLIA_TESTNET = 763373,
202
- INK_MAINNET = 57073,
203
- AVALANCHE_MELD_TESTNET = 222000222,
204
- AVALANCHE_MELD_MAINNET = 333000333,
205
- GUNZILLA_TESTNET = 49321,
206
- ZORA_MAINNET = 7777777,
207
- ZORA_SEPOLIA_TESTNET = 999999999,
208
- ZKSYNC_MAINNET = 324,
209
- ZKSYNC_SEPOLIA_TESTNET = 300,
210
- BNB_OPBNB_TESTNET = 5611,
211
- BNB_OPBNB_MAINNET = 204,
212
- ZETACHAIN_TESTNET = 7001,
213
- ZETACHAIN_MAINNET = 7000,
214
- KINTO_TESTNET = 42888,
215
- MANTA_SEPOLIA_TESTNET = 3441006,
216
- ROLLUX_MAINNET = 570,
217
- GNOSIS_MAINNET = 100,
218
- GNOSIS_TESTNET = 10200,
219
- VICTION_MAINNET = 88,
220
- VICTION_TESTNET = 89,
221
- TAIKO_HEKLA_TESTNET = 167009,
222
- TAIKO_MAINNET = 167000,
223
- MERLIN_MAINNET = 4200,
224
- MERLIN_TESTNET = 686868,
225
- MOVEMENT_MEVM_TESTNET = 336,
226
- BLAST_MAINNET = 81457,
227
- SCROLL_MAINNET = 534352
228
- }
229
- export type Chain = ChainID | ChainName | `${ChainName}` | `${ChainID}`;
230
- export type Source = "Ponder" | "GoldRush" | "Viem";
231
- export type Quote = "USD" | "CAD" | "EUR" | "SGD" | "INR" | "JPY" | "VND" | "CNY" | "KRW" | "RUB" | "TRY" | "NGN" | "ARS" | "AUD" | "CHF" | "GBP";
232
- export type CryptocurrencyQuote = "ETH" | "BTC";
233
- export type ChainLabel = "Foundational" | "Frontier" | "Community";
234
- export interface Pagination {
235
- /** * True is there is another page. */
236
- has_more: boolean;
237
- /** * The requested page number. */
238
- page_number: number;
239
- /** * The requested number of items on the current page. */
240
- page_size: number;
241
- /** * The total number of items across all pages for this request. */
242
- total_count: number;
243
- }
244
- export interface PaginationLinks {
245
- /** * URL link to the next page. */
246
- prev: string;
247
- /** * URL link to the previous page. */
248
- next: string;
249
- }
250
- export interface NftCollectionAttribute {
251
- trait_type: string;
252
- value: string;
253
- }
254
- export type NftData = Nullable<{
255
- /** * The token's id. */
256
- token_id: bigint;
257
- token_url: string;
258
- /** * The original minter. */
259
- original_owner: string;
260
- /** * The current holder of this NFT. */
261
- current_owner: string;
262
- external_data: NftExternalData;
263
- /** * If `true`, the asset data is available from the Covalent CDN. */
264
- asset_cached: boolean;
265
- /** * If `true`, the image data is available from the Covalent CDN. */
266
- image_cached: boolean;
267
- }>;
268
- export interface NftExternalData {
269
- name: string;
270
- description: string;
271
- asset_url: string;
272
- asset_file_extension: string;
273
- asset_mime_type: string;
274
- asset_size_bytes: string;
275
- image: string;
276
- image_256: string;
277
- image_512: string;
278
- image_1024: string;
279
- animation_url: string;
280
- external_url: string;
281
- attributes: NftCollectionAttribute[];
282
- thumbnails: NFTThumbnails;
283
- }
284
- export interface NFTThumbnails {
285
- image256: string;
286
- image512: string;
287
- image1024: string;
288
- image_opengraph_url: string;
289
- thumbhash: string;
290
- }
291
- export interface DecodedItem {
292
- name: string;
293
- signature: string;
294
- params: Param[];
295
- }
296
- export interface Param {
297
- name: string;
298
- type: string;
299
- indexed: boolean;
300
- decoded: boolean;
301
- value: string;
302
- }
303
- export type LogEvent = Nullable<{
304
- /** * The block signed timestamp in UTC. */
305
- block_signed_at: Date;
306
- /** * The height of the block. */
307
- block_height: number;
308
- /** * The offset is the position of the tx in the block. */
309
- tx_offset: number;
310
- /** * The offset is the position of the log entry within an event log. */
311
- log_offset: number;
312
- /** * The requested transaction hash. */
313
- tx_hash: string;
314
- /** * The log topics in raw data. */
315
- raw_log_topics: string[];
316
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
317
- sender_contract_decimals: number;
318
- /** * The name of the sender. */
319
- sender_name: string;
320
- sender_contract_ticker_symbol: string;
321
- /** * The address of the sender. */
322
- sender_address: string;
323
- /** * The label of the sender address. */
324
- sender_address_label: string;
325
- /** * The contract logo URL. */
326
- sender_logo_url: string;
327
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
328
- supports_erc: string[];
329
- /** * The address of the deployed UniswapV2 like factory contract for this DEX. */
330
- sender_factory_address: string;
331
- /** * The log events in raw. */
332
- raw_log_data: string;
333
- /** * The decoded item. */
334
- decoded: DecodedItem;
335
- }>;
336
- export interface ContractMetadata {
337
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
338
- contract_decimals: number;
339
- /** * The string returned by the `name()` method. */
340
- contract_name: string;
341
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
342
- contract_ticker_symbol: string;
343
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
344
- contract_address: string;
345
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
346
- supports_erc: string[];
347
- /** * The contract logo URL. */
348
- logo_url: string;
349
- }
350
- export interface Explorer {
351
- /** * The name of the explorer. */
352
- label: string;
353
- /** * The URL of the explorer. */
354
- url: string;
355
- }
356
- export interface LogoUrls {
357
- /** * The token logo URL. */
358
- token_logo_url: string;
359
- /** * The protocol logo URL. */
360
- protocol_logo_url: string;
361
- /** * The chain logo URL. */
362
- chain_logo_url: string;
363
- }
364
- export type GoldRushResponse<T> = {
365
- data: T;
366
- error: false | null;
367
- error_code: null;
368
- error_message: null;
369
- } | {
370
- data: null;
371
- error: true;
372
- error_code: number;
373
- error_message: string;
374
- };
375
- export interface GoldRushClientSettings {
376
- /** * Toggle to analyze the execution of each api request. */
377
- debug?: boolean;
378
- /** * The number of concurrent requests allowed. */
379
- threadCount?: number;
380
- /** Toggle to turn on and off retry logic */
381
- enableRetry?: boolean;
382
- /** Set the retry logic count */
383
- maxRetries?: number;
384
- /** Set the retry delay in ms */
385
- retryDelay?: number;
386
- /** Set the source of the usage */
387
- source?: Source | string;
388
- }
389
- export type Nullable<T> = {
390
- [P in keyof T]: T[P] | null;
391
- };