@covalenthq/client-sdk 1.0.2 → 2.0.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.
Files changed (192) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +223 -282
  3. package/dist/cjs/index.d.ts +17 -20
  4. package/dist/cjs/index.js +2331 -7659
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/src/GoldRushClient.d.ts +20 -0
  7. package/dist/cjs/src/services/BalanceService.d.ts +125 -0
  8. package/dist/cjs/src/services/BaseService.d.ts +161 -0
  9. package/dist/cjs/src/services/NftService.d.ts +157 -0
  10. package/dist/cjs/src/services/PricingService.d.ts +25 -0
  11. package/dist/cjs/src/services/SecurityService.d.ts +28 -0
  12. package/dist/cjs/src/services/TransactionService.d.ts +128 -0
  13. package/dist/cjs/src/utils/functions/bigIntParser.d.ts +1 -0
  14. package/dist/cjs/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  15. package/dist/cjs/src/utils/functions/debugOutput.d.ts +2 -0
  16. package/dist/cjs/src/utils/functions/endpointGenerator.d.ts +4 -0
  17. package/dist/cjs/src/utils/functions/execution.d.ts +11 -0
  18. package/dist/cjs/src/utils/functions/isValidApiKey.d.ts +1 -0
  19. package/dist/cjs/src/utils/functions/paginateEndpoint.d.ts +7 -0
  20. package/dist/cjs/src/utils/functions/prettifyCurrency.d.ts +2 -0
  21. package/dist/{esm/util/types/BalanceServiceTypes.d.ts → cjs/src/utils/types/BalanceService.types.d.ts} +91 -27
  22. package/dist/{es/util/types/BaseServiceTypes.d.ts → cjs/src/utils/types/BaseService.types.d.ts} +68 -18
  23. package/dist/cjs/src/utils/types/Generic.types.d.ts +477 -0
  24. package/dist/{esm/util/types/NftServiceTypes.d.ts → cjs/src/utils/types/NftService.types.d.ts} +53 -83
  25. package/dist/cjs/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  26. package/dist/{esm/util/types/SecurityServiceTypes.d.ts → cjs/src/utils/types/SecurityService.types.d.ts} +8 -7
  27. package/dist/{esm/util/types/TransactionServiceTypes.d.ts → cjs/src/utils/types/TransactionService.types.d.ts} +110 -24
  28. package/dist/es/index.d.ts +17 -20
  29. package/dist/es/index.js +2327 -7649
  30. package/dist/es/index.js.map +1 -1
  31. package/dist/es/src/GoldRushClient.d.ts +20 -0
  32. package/dist/es/src/services/BalanceService.d.ts +125 -0
  33. package/dist/es/src/services/BaseService.d.ts +161 -0
  34. package/dist/es/src/services/NftService.d.ts +157 -0
  35. package/dist/es/src/services/PricingService.d.ts +25 -0
  36. package/dist/es/src/services/SecurityService.d.ts +28 -0
  37. package/dist/es/src/services/TransactionService.d.ts +128 -0
  38. package/dist/es/src/utils/functions/bigIntParser.d.ts +1 -0
  39. package/dist/es/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  40. package/dist/es/src/utils/functions/debugOutput.d.ts +2 -0
  41. package/dist/es/src/utils/functions/endpointGenerator.d.ts +4 -0
  42. package/dist/es/src/utils/functions/execution.d.ts +11 -0
  43. package/dist/es/src/utils/functions/isValidApiKey.d.ts +1 -0
  44. package/dist/es/src/utils/functions/paginateEndpoint.d.ts +7 -0
  45. package/dist/es/src/utils/functions/prettifyCurrency.d.ts +2 -0
  46. package/dist/{cjs/util/types/BalanceServiceTypes.d.ts → es/src/utils/types/BalanceService.types.d.ts} +91 -27
  47. package/dist/{esm/util/types/BaseServiceTypes.d.ts → es/src/utils/types/BaseService.types.d.ts} +68 -18
  48. package/dist/es/src/utils/types/Generic.types.d.ts +477 -0
  49. package/dist/{cjs/util/types/NftServiceTypes.d.ts → es/src/utils/types/NftService.types.d.ts} +53 -83
  50. package/dist/es/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  51. package/dist/{util/types/SecurityServiceTypes.d.ts → es/src/utils/types/SecurityService.types.d.ts} +8 -7
  52. package/dist/{cjs/util/types/TransactionServiceTypes.d.ts → es/src/utils/types/TransactionService.types.d.ts} +110 -24
  53. package/dist/esm/index.d.ts +17 -20
  54. package/dist/esm/index.js +2327 -7649
  55. package/dist/esm/index.js.map +1 -1
  56. package/dist/esm/src/GoldRushClient.d.ts +20 -0
  57. package/dist/esm/src/services/BalanceService.d.ts +125 -0
  58. package/dist/esm/src/services/BaseService.d.ts +161 -0
  59. package/dist/esm/src/services/NftService.d.ts +157 -0
  60. package/dist/esm/src/services/PricingService.d.ts +25 -0
  61. package/dist/esm/src/services/SecurityService.d.ts +28 -0
  62. package/dist/esm/src/services/TransactionService.d.ts +128 -0
  63. package/dist/esm/src/utils/functions/bigIntParser.d.ts +1 -0
  64. package/dist/esm/{util/CalculatePrettyBalance.d.ts → src/utils/functions/calculatePrettyBalance.d.ts} +0 -0
  65. package/dist/esm/src/utils/functions/debugOutput.d.ts +2 -0
  66. package/dist/esm/src/utils/functions/endpointGenerator.d.ts +4 -0
  67. package/dist/esm/src/utils/functions/execution.d.ts +11 -0
  68. package/dist/esm/src/utils/functions/isValidApiKey.d.ts +1 -0
  69. package/dist/esm/src/utils/functions/paginateEndpoint.d.ts +7 -0
  70. package/dist/esm/src/utils/functions/prettifyCurrency.d.ts +2 -0
  71. package/dist/{util/types/BalanceServiceTypes.d.ts → esm/src/utils/types/BalanceService.types.d.ts} +91 -27
  72. package/dist/{cjs/util/types/BaseServiceTypes.d.ts → esm/src/utils/types/BaseService.types.d.ts} +68 -18
  73. package/dist/esm/src/utils/types/Generic.types.d.ts +477 -0
  74. package/dist/{util/types/NftServiceTypes.d.ts → esm/src/utils/types/NftService.types.d.ts} +53 -83
  75. package/dist/esm/{util/types/PricingServiceTypes.d.ts → src/utils/types/PricingService.types.d.ts} +9 -3
  76. package/dist/{es/util/types/SecurityServiceTypes.d.ts → esm/src/utils/types/SecurityService.types.d.ts} +8 -7
  77. package/dist/{util/types/TransactionServiceTypes.d.ts → esm/src/utils/types/TransactionService.types.d.ts} +110 -24
  78. package/package.json +25 -12
  79. package/dist/cjs/services/BalanceService.d.ts +0 -638
  80. package/dist/cjs/services/BaseService.d.ts +0 -571
  81. package/dist/cjs/services/CovalentClient.d.ts +0 -57
  82. package/dist/cjs/services/NftService.d.ts +0 -686
  83. package/dist/cjs/services/PricingService.d.ts +0 -103
  84. package/dist/cjs/services/SecurityService.d.ts +0 -162
  85. package/dist/cjs/services/TransactionService.d.ts +0 -711
  86. package/dist/cjs/services/XykService.d.ts +0 -1018
  87. package/dist/cjs/util/ApiHelpers.d.ts +0 -6
  88. package/dist/cjs/util/ApiKeyValidator.d.ts +0 -8
  89. package/dist/cjs/util/Chains.d.ts +0 -223
  90. package/dist/cjs/util/backoff.d.ts +0 -12
  91. package/dist/cjs/util/prettifyCurrency.d.ts +0 -2
  92. package/dist/cjs/util/types/GenericTypes.d.ts +0 -116
  93. package/dist/cjs/util/types/SecurityServiceTypes.d.ts +0 -121
  94. package/dist/cjs/util/types/XykServiceTypes.d.ts +0 -687
  95. package/dist/es/services/BalanceService.d.ts +0 -638
  96. package/dist/es/services/BaseService.d.ts +0 -571
  97. package/dist/es/services/CovalentClient.d.ts +0 -57
  98. package/dist/es/services/NftService.d.ts +0 -686
  99. package/dist/es/services/PricingService.d.ts +0 -103
  100. package/dist/es/services/SecurityService.d.ts +0 -162
  101. package/dist/es/services/TransactionService.d.ts +0 -711
  102. package/dist/es/services/XykService.d.ts +0 -1018
  103. package/dist/es/util/ApiHelpers.d.ts +0 -6
  104. package/dist/es/util/ApiKeyValidator.d.ts +0 -8
  105. package/dist/es/util/Chains.d.ts +0 -223
  106. package/dist/es/util/backoff.d.ts +0 -12
  107. package/dist/es/util/prettifyCurrency.d.ts +0 -2
  108. package/dist/es/util/types/BalanceServiceTypes.d.ts +0 -378
  109. package/dist/es/util/types/GenericTypes.d.ts +0 -116
  110. package/dist/es/util/types/NftServiceTypes.d.ts +0 -303
  111. package/dist/es/util/types/TransactionServiceTypes.d.ts +0 -388
  112. package/dist/es/util/types/XykServiceTypes.d.ts +0 -687
  113. package/dist/esm/services/BalanceService.d.ts +0 -638
  114. package/dist/esm/services/BaseService.d.ts +0 -571
  115. package/dist/esm/services/CovalentClient.d.ts +0 -57
  116. package/dist/esm/services/NftService.d.ts +0 -686
  117. package/dist/esm/services/PricingService.d.ts +0 -103
  118. package/dist/esm/services/SecurityService.d.ts +0 -162
  119. package/dist/esm/services/TransactionService.d.ts +0 -711
  120. package/dist/esm/services/XykService.d.ts +0 -1018
  121. package/dist/esm/util/ApiHelpers.d.ts +0 -6
  122. package/dist/esm/util/ApiKeyValidator.d.ts +0 -8
  123. package/dist/esm/util/Chains.d.ts +0 -223
  124. package/dist/esm/util/backoff.d.ts +0 -12
  125. package/dist/esm/util/prettifyCurrency.d.ts +0 -2
  126. package/dist/esm/util/types/GenericTypes.d.ts +0 -116
  127. package/dist/esm/util/types/XykServiceTypes.d.ts +0 -687
  128. package/dist/index.d.ts +0 -20
  129. package/dist/index.js +0 -21
  130. package/dist/index.js.map +0 -1
  131. package/dist/services/BalanceService.d.ts +0 -638
  132. package/dist/services/BalanceService.js +0 -959
  133. package/dist/services/BalanceService.js.map +0 -1
  134. package/dist/services/BaseService.d.ts +0 -571
  135. package/dist/services/BaseService.js +0 -1202
  136. package/dist/services/BaseService.js.map +0 -1
  137. package/dist/services/CovalentClient.d.ts +0 -57
  138. package/dist/services/CovalentClient.js +0 -49
  139. package/dist/services/CovalentClient.js.map +0 -1
  140. package/dist/services/NftService.d.ts +0 -686
  141. package/dist/services/NftService.js +0 -1490
  142. package/dist/services/NftService.js.map +0 -1
  143. package/dist/services/PricingService.d.ts +0 -103
  144. package/dist/services/PricingService.js +0 -155
  145. package/dist/services/PricingService.js.map +0 -1
  146. package/dist/services/SecurityService.d.ts +0 -162
  147. package/dist/services/SecurityService.js +0 -249
  148. package/dist/services/SecurityService.js.map +0 -1
  149. package/dist/services/TransactionService.d.ts +0 -711
  150. package/dist/services/TransactionService.js +0 -1687
  151. package/dist/services/TransactionService.js.map +0 -1
  152. package/dist/services/XykService.d.ts +0 -1018
  153. package/dist/services/XykService.js +0 -1827
  154. package/dist/services/XykService.js.map +0 -1
  155. package/dist/util/ApiHelpers.d.ts +0 -6
  156. package/dist/util/ApiHelpers.js +0 -87
  157. package/dist/util/ApiHelpers.js.map +0 -1
  158. package/dist/util/ApiKeyValidator.d.ts +0 -8
  159. package/dist/util/ApiKeyValidator.js +0 -13
  160. package/dist/util/ApiKeyValidator.js.map +0 -1
  161. package/dist/util/CalculatePrettyBalance.d.ts +0 -1
  162. package/dist/util/CalculatePrettyBalance.js +0 -32
  163. package/dist/util/CalculatePrettyBalance.js.map +0 -1
  164. package/dist/util/Chains.d.ts +0 -223
  165. package/dist/util/Chains.js +0 -225
  166. package/dist/util/Chains.js.map +0 -1
  167. package/dist/util/backoff.d.ts +0 -12
  168. package/dist/util/backoff.js +0 -47
  169. package/dist/util/backoff.js.map +0 -1
  170. package/dist/util/prettifyCurrency.d.ts +0 -2
  171. package/dist/util/prettifyCurrency.js +0 -69
  172. package/dist/util/prettifyCurrency.js.map +0 -1
  173. package/dist/util/types/BalanceServiceTypes.js +0 -2
  174. package/dist/util/types/BalanceServiceTypes.js.map +0 -1
  175. package/dist/util/types/BaseServiceTypes.d.ts +0 -276
  176. package/dist/util/types/BaseServiceTypes.js +0 -2
  177. package/dist/util/types/BaseServiceTypes.js.map +0 -1
  178. package/dist/util/types/GenericTypes.d.ts +0 -116
  179. package/dist/util/types/GenericTypes.js +0 -2
  180. package/dist/util/types/GenericTypes.js.map +0 -1
  181. package/dist/util/types/NftServiceTypes.js +0 -2
  182. package/dist/util/types/NftServiceTypes.js.map +0 -1
  183. package/dist/util/types/PricingServiceTypes.d.ts +0 -33
  184. package/dist/util/types/PricingServiceTypes.js +0 -2
  185. package/dist/util/types/PricingServiceTypes.js.map +0 -1
  186. package/dist/util/types/SecurityServiceTypes.js +0 -2
  187. package/dist/util/types/SecurityServiceTypes.js.map +0 -1
  188. package/dist/util/types/TransactionServiceTypes.js +0 -2
  189. package/dist/util/types/TransactionServiceTypes.js.map +0 -1
  190. package/dist/util/types/XykServiceTypes.d.ts +0 -687
  191. package/dist/util/types/XykServiceTypes.js +0 -2
  192. package/dist/util/types/XykServiceTypes.js.map +0 -1
@@ -1,6 +0,0 @@
1
- import { Source } from "../services/CovalentClient";
2
- export declare function checkAndModifyResponse(jsonObj: any): void;
3
- export declare function debugOutput(url: string, responseStatus: number, startTime: Date | undefined): Promise<void>;
4
- type Constructor<T> = new (...args: any[]) => T;
5
- export declare function paginateEndpoint<T1, T2>(url: string, apiKey: string, urlsParams: URLSearchParams, dataClassConstructor: Constructor<T1>, debug: boolean, threadCount: number, enableRetry: boolean, source: Source): AsyncIterable<T1>;
6
- export {};
@@ -1,8 +0,0 @@
1
- export declare class ApiKeyValidator {
2
- readonly _apiKey: string;
3
- private static readonly _apiKeyV1Pattern;
4
- private static readonly _apiKeyV2Pattern;
5
- static readonly INVALID_API_KEY_MESSAGE = "Invalid or missing API key (sign up at covalenthq.com/platform)";
6
- constructor(apiKey: string);
7
- isValidApiKey(): boolean;
8
- }
@@ -1,223 +0,0 @@
1
- export declare enum Chains {
2
- BTC_MAINNET = "btc-mainnet",
3
- ETH_MAINNET = "eth-mainnet",
4
- MATIC_MAINNET = "matic-mainnet",
5
- BSC_MAINNET = "bsc-mainnet",
6
- AVALANCHE_MAINNET = "avalanche-mainnet",
7
- OPTIMISM_MAINNET = "optimism-mainnet",
8
- FANTOM_MAINNET = "fantom-mainnet",
9
- MOONBEAM_MAINNET = "moonbeam-mainnet",
10
- MOONBEAM_MOONRIVER = "moonbeam-moonriver",
11
- RSK_MAINNET = "rsk-mainnet",
12
- ARBITRUM_MAINNET = "arbitrum-mainnet",
13
- PALM_MAINNET = "palm-mainnet",
14
- KLAYTN_MAINNET = "klaytn-mainnet",
15
- HECO_MAINNET = "heco-mainnet",
16
- NERVOS_GODWOKEN_MAINNET = "nervos-godwoken-mainnet",
17
- AXIE_MAINNET = "axie-mainnet",
18
- EVMOS_MAINNET = "evmos-mainnet",
19
- ASTAR_MAINNET = "astar-mainnet",
20
- IOTEX_MAINNET = "iotex-mainnet",
21
- HARMONY_MAINNET = "harmony-mainnet",
22
- CRONOS_MAINNET = "cronos-mainnet",
23
- AURORA_MAINNET = "aurora-mainnet",
24
- EMERALD_PARATIME_MAINNET = "emerald-paratime-mainnet",
25
- BOBA_MAINNET = "boba-mainnet",
26
- ETH_GOERLI = "eth-goerli",
27
- MATIC_MUMBAI = "matic-mumbai",
28
- AVALANCHE_TESTNET = "avalanche-testnet",
29
- BSC_TESTNET = "bsc-testnet",
30
- MOONBEAM_MOONBASE_ALPHA = "moonbeam-moonbase-alpha",
31
- RSK_TESTNET = "rsk-testnet",
32
- ARBITRUM_GOERLI = "arbitrum-goerli",
33
- FANTOM_TESTNET = "fantom-testnet",
34
- PALM_TESTNET = "palm-testnet",
35
- HECO_TESTNET = "heco-testnet",
36
- NERVOS_GODWOKEN_TESTNET = "nervos-godwoken-testnet",
37
- EVMOS_TESTNET = "evmos-testnet",
38
- IOTEX_TESTNET = "iotex-testnet",
39
- HARMONY_TESTNET = "harmony-testnet",
40
- AURORA_TESTNET = "aurora-testnet",
41
- SCROLL_L2_TESTNET = "scroll-l2-testnet",
42
- SCROLL_SEPOLIA_TESTNET = "scroll-sepolia-testnet",
43
- COVALENT_INTERNAL_NETWORK_V1 = "covalent-internal-network-v1",
44
- DEFI_KINGDOMS_MAINNET = "defi-kingdoms-mainnet",
45
- SWIMMER_MAINNET = "swimmer-mainnet",
46
- BOBA_AVALANCHE_MAINNET = "boba-avalanche-mainnet",
47
- BOBA_BOBABEAM_MAINNET = "boba-bobabeam-mainnet",
48
- BOBA_BNB_MAINNET = "boba-bnb-mainnet",
49
- BOBA_RINKEBY_TESTNET = "boba-rinkeby-testnet",
50
- BOBA_BOBABASE_TESTNET = "boba-bobabase-testnet",
51
- BOBA_BNB_TESTNET = "boba-bnb-testnet",
52
- BOBA_AVALANCHE_TESTNET = "boba-avalanche-testnet",
53
- KLAYTN_TESTNET = "klaytn-testnet",
54
- GATHER_MAINNET = "gather-mainnet",
55
- GATHER_TESTNET = "gather-testnet",
56
- SKALE_CALYPSO = "skale-calypso",
57
- SKALE_MAINNET = "skale-mainnet",
58
- SKALE_RAZOR = "skale-razor",
59
- AVALANCHE_DEXALOT_MAINNET = "avalanche-dexalot-mainnet",
60
- SKALE_OMNUS = "skale-omnus",
61
- AVALANCHE_DEXALOT_TESTNET = "avalanche-dexalot-testnet",
62
- ASTAR_SHIBUYA = "astar-shibuya",
63
- CRONOS_TESTNET = "cronos-testnet",
64
- DEFI_KINGDOMS_TESTNET = "defi-kingdoms-testnet",
65
- METIS_MAINNET = "metis-mainnet",
66
- METIS_STARDUST = "metis-stardust",
67
- MILKOMEDA_A1_MAINNET = "milkomeda-a1-mainnet",
68
- MILKOMEDA_A1_DEVNET = "milkomeda-a1-devnet",
69
- MILKOMEDA_C1_MAINNET = "milkomeda-c1-mainnet",
70
- MILKOMEDA_C1_DEVNET = "milkomeda-c1-devnet",
71
- SWIMMER_TESTNET = "swimmer-testnet",
72
- SOLANA_MAINNET = "solana-mainnet",
73
- SKALE_EUROPA = "skale-europa",
74
- METER_MAINNET = "meter-mainnet",
75
- METER_TESTNET = "meter-testnet",
76
- SKALE_EXORDE = "skale-exorde",
77
- BOBA_GOERLI = "boba-goerli",
78
- NEON_TESTNET = "neon-testnet",
79
- SKALE_STAGING_UUM = "skale-staging-uum",
80
- SKALE_STAGING_LCC = "skale-staging-lcc",
81
- ARBITRUM_NOVA_MAINNET = "arbitrum-nova-mainnet",
82
- CANTO_MAINNET = "canto-mainnet",
83
- BITTORRENT_MAINNET = "bittorrent-mainnet",
84
- BITTORRENT_TESTNET = "bittorrent-testnet",
85
- FLARENETWORKS_FLARE_MAINNET = "flarenetworks-flare-mainnet",
86
- FLARENETWORKS_FLARE_TESTNET = "flarenetworks-flare-testnet",
87
- FLARENETWORKS_CANARY_MAINNET = "flarenetworks-canary-mainnet",
88
- FLARENETWORKS_CANARY_TESTNET = "flarenetworks-canary-testnet",
89
- KCC_MAINNET = "kcc-mainnet",
90
- KCC_TESTNET = "kcc-testnet",
91
- POLYGON_ZKEVM_TESTNET = "polygon-zkevm-testnet",
92
- LINEA_TESTNET = "linea-testnet",
93
- BASE_TESTNET = "base-testnet",
94
- MANTLE_TESTNET = "mantle-testnet",
95
- SCROLL_ALPHA_TESTNET = "scroll-alpha-testnet",
96
- OASYS_MAINNET = "oasys-mainnet",
97
- OASYS_TESTNET = "oasys-testnet",
98
- FINDORA_MAINNET = "findora-mainnet",
99
- FINDORA_FORGE_TESTNET = "findora-forge-testnet",
100
- SX_MAINNET = "sx-mainnet",
101
- OASIS_SAPPHIRE_MAINNET = "oasis-sapphire-mainnet",
102
- OASIS_SAPPHIRE_TESTNET = "oasis-sapphire-testnet",
103
- OPTIMISM_GOERLI = "optimism-goerli",
104
- POLYGON_ZKEVM_MAINNET = "polygon-zkevm-mainnet",
105
- HORIZEN_YUMA_TESTNET = "horizen-yuma-testnet",
106
- CLV_PARACHAIN = "clv-parachain",
107
- ENERGI_MAINNET = "energi-mainnet",
108
- ENERGI_TESTNET = "energi-testnet",
109
- HORIZEN_GOBI_TESTNET = "horizen-gobi-testnet",
110
- ETH_SEPOLIA = "eth-sepolia",
111
- SKALE_NEBULA = "skale-nebula",
112
- SKALE_BATTLEGROUND = "skale-battleground",
113
- AVALANCHE_MELD_TESTNET = "avalanche-meld-testnet",
114
- GUNZILLA_TESTNET = "gunzilla-testnet",
115
- ULTRON_MAINNET = "ultron-mainnet",
116
- ULTRON_TESTNET = "ultron-testnet",
117
- ZORA_MAINNET = "zora-mainnet",
118
- ZORA_GOERLI_TESTNET = "zora-goerli-testnet",
119
- NEON_MAINNET = "neon-mainnet",
120
- AVALANCHE_SHRAPNEL_MAINNET = "avalanche-shrapnel-mainnet",
121
- BASE_MAINNET = "base-mainnet",
122
- MANTLE_MAINNET = "mantle-mainnet",
123
- AVALANCHE_LOCO_LEGENDS_MAINNET = "avalanche-loco-legends-mainnet",
124
- LINEA_MAINNET = "linea-mainnet",
125
- HORIZEN_EON_MAINNET = "horizen-eon-mainnet",
126
- AVALANCHE_NUMBERS = "avalanche-numbers",
127
- AVALANCHE_DOS = "avalanche-dos",
128
- AVALANCHE_STEP_NETWORK = "avalanche-step-network",
129
- AVALANCHE_XPLUS = "avalanche-xplus",
130
- AVALANCHE_XANACHAIN = "avalanche-xanachain",
131
- AVALANCHE_MELD_MAINNET = "avalanche-meld-mainnet",
132
- OPSIDE_PUBLIC_ZKEVM = "opside-public-zkevm",
133
- OPSIDE_LAW_CHAIN = "opside-law-chain",
134
- AVALANCHE_SHRAPNEL_TESTNET = "avalanche-shrapnel-testnet",
135
- AVALANCHE_LOCO_LEGENDS_TESTNET = "avalanche-loco-legends-testnet",
136
- OPSIDE_CB_ZKEVM = "opside-cb-zkevm",
137
- OPSIDE_PRE_ALPHA_TESTNET = "opside-pre-alpha-testnet",
138
- OPSIDE_ERA7 = "opside-era7",
139
- OPSIDE_XTHRILL = "opside-xthrill",
140
- ZKSYNC_MAINNET = "zksync-mainnet",
141
- METIS_TESTNET = "metis-testnet",
142
- ZKSYNC_TESTNET = "zksync-testnet",
143
- AVALANCHE_BLITZ_TESTNET = "avalanche-blitz-testnet",
144
- AVALANCHE_D_CHAIN_TESTNET = "avalanche-d-chain-testnet",
145
- AVALANCHE_GREEN_DOT_TESTNET = "avalanche-green-dot-testnet",
146
- AVALANCHE_MINTARA_TESTNET = "avalanche-mintara-testnet",
147
- AVALANCHE_BEAM_TESTNET = "avalanche-beam-testnet",
148
- BNB_META_APES_MAINNET = "bnb-meta-apes-mainnet",
149
- BNB_ANTIMATTER_MAINNET = "bnb-antimatter-mainnet",
150
- BNB_ANTIMATTER_TESTNET = "bnb-antimatter-testnet",
151
- BNB_OPBNB_TESTNET = "bnb-opbnb-testnet",
152
- OPSIDE_DEBOX = "opside-debox",
153
- OPSIDE_JACKBOT = "opside-jackbot",
154
- OPSIDE_ODX_ZKEVM_TESTNET = "opside-odx-zkevm-testnet",
155
- OPSIDE_READON_CONTENT_TESTNET = "opside-readon-content-testnet",
156
- OPSIDE_RELATION = "opside-relation",
157
- OPSIDE_SOQUEST_ZKEVM = "opside-soquest-zkevm",
158
- OPSIDE_VIP3 = "opside-vip3",
159
- OPSIDE_ZKMETA = "opside-zkmeta",
160
- AVALANCHE_PULSAR_TESTNET = "avalanche-pulsar-testnet",
161
- AVALANCHE_UPTN = "avalanche-uptn",
162
- BNB_FNCY_MAINNET = "bnb-fncy-mainnet",
163
- ZETACHAIN_TESTNET = "zetachain-testnet",
164
- KINTO_TESTNET = "kinto-testnet",
165
- MODE_TESTNET = "mode-testnet",
166
- LOOT_MAINNET = "loot-mainnet",
167
- BNB_FNCY_TESTNET = "bnb-fncy-testnet",
168
- MANTA_TESTNET = "manta-testnet",
169
- PGN_MAINNET = "pgn-mainnet",
170
- PGN_TESTNET = "pgn-testnet",
171
- GNOSIS_MAINNET = "gnosis-mainnet",
172
- GNOSIS_TESTNET = "gnosis-testnet",
173
- ROLLUX_MAINNET = "rollux-mainnet",
174
- ROLLUX_TESTNET = "rollux-testnet",
175
- TAIKO_JOLNIR_TESTNET = "taiko-jolnir-testnet",
176
- OPTIMISM_SEPOLIA = "optimism-sepolia",
177
- BNB_OPBNB_MAINNET = "bnb-opbnb-mainnet",
178
- TELOS_MAINNET = "telos-mainnet",
179
- TELOS_TESTNET = "telos-testnet",
180
- AVALANCHE_HUBBLE_EXCHANGE_TESTNET = "avalanche-hubble-exchange-testnet",
181
- AVALANCHE_MIHO_TESTNET = "avalanche-miho-testnet",
182
- AVALANCHE_BULLETIN_TESTNET = "avalanche-bulletin-testnet",
183
- AVALANCHE_KIWI_TESTNET = "avalanche-kiwi-testnet",
184
- AVALANCHE_HERO_TESTNET = "avalanche-hero-testnet",
185
- AVALANCHE_AVACLOUD_TESTNET = "avalanche-avacloud-testnet",
186
- AVALANCHE_THIRDWEB_TESTNET = "avalanche-thirdweb-testnet",
187
- AVALANCHE_MONDRIAN_TESTNET = "avalanche-mondrian-testnet",
188
- AVALANCHE_CONDUIT_TESTNET = "avalanche-conduit-testnet",
189
- AVALANCHE_NMAC_TESTNET = "avalanche-nmac-testnet",
190
- AVALANCHE_ORDERLY_TESTNET = "avalanche-orderly-testnet",
191
- AVALANCHE_AMPLIFY_TESTNET = "avalanche-amplify-testnet",
192
- AVALANCHE_MIRAI_TESTNET = "avalanche-mirai-testnet",
193
- AVALANCHE_WAGMI_TESTNET = "avalanche-wagmi-testnet",
194
- AVALANCHE_PLAYA3ULL_TESTNET = "avalanche-playa3ull-testnet",
195
- AVALANCHE_BEAM_MAINNET = "avalanche-beam-mainnet",
196
- SCROLL_MAINNET = "scroll-mainnet",
197
- ETH_HOLESKY = "eth-holesky",
198
- TOMOCHAIN_MAINNET = "tomochain-mainnet",
199
- TOMOCHAIN_TESTNET = "tomochain-testnet",
200
- AVALANCHE_JONO11_TESTNET = "avalanche-jono11-testnet",
201
- BASE_SEPOLIA_TESTNET = "base-sepolia-testnet",
202
- XAI_TESTNET = "xai-testnet",
203
- ARBITRUM_SEPOLIA = "arbitrum-sepolia",
204
- LUMOZ_PUBLIC_ZKSYNC_V2 = "lumoz-public-zksync-v2",
205
- LUMOZ_DECIBLING = "lumoz-decibling",
206
- LUMOZ_STARK_SPORT = "lumoz-stark-sport",
207
- AVALANCHE_LT0_TESTNET = "avalanche-lt0-testnet",
208
- AVALANCHE_LT1_TESTNET = "avalanche-lt1-testnet",
209
- AVALANCHE_LT2_TESTNET = "avalanche-lt2-testnet",
210
- AVALANCHE_LT3_TESTNET = "avalanche-lt3-testnet",
211
- AVALANCHE_LT4_TESTNET = "avalanche-lt4-testnet",
212
- AVALANCHE_LT5_TESTNET = "avalanche-lt5-testnet",
213
- SYNDR_TESTNET = "syndr-testnet",
214
- CROSSFI_EVM_TESTNET = "crossfi-evm-testnet",
215
- CELO_MAINNET = "celo-mainnet",
216
- TAIKO_KATLA_TESTNET = "taiko-katla-testnet",
217
- MOVEMENT_MEVM_TESTNET = "movement-mevm-testnet",
218
- ZORA_SEPOLIA_TESTNET = "zora-sepolia-testnet",
219
- MERLIN_MAINNET = "merlin-mainnet",
220
- MERLIN_TESTNET = "merlin-testnet",
221
- AVALANCHE_HUBBLE_EXCHANGE_MAINNET = "avalanche-hubble-exchange-mainnet",
222
- XAI_MAINNET = "xai-mainnet"
223
- }
@@ -1,12 +0,0 @@
1
- import { Source } from "../services/CovalentClient";
2
- export declare const DEFAULT_BACKOFF_MAX_RETRIES = 5;
3
- export declare const BASE_DELAY_MS = 1000;
4
- export declare class ExponentialBackoff<T> {
5
- private maxRetries;
6
- retryCount: number;
7
- _apiKey: string;
8
- _debug: boolean;
9
- constructor(apiKey: string, debug: boolean, maxRetries?: number);
10
- backOff(url: string, source: Source): Promise<T>;
11
- setNumAttempts(retryCount: number): void;
12
- }
@@ -1,2 +0,0 @@
1
- import { Quote } from "../services/CovalentClient";
2
- export declare const prettifyCurrency: (value: any, decimals?: number, currency?: Quote, ignoreSmallValue?: boolean, ignoreMinus?: boolean, ignoreZero?: boolean) => string;
@@ -1,116 +0,0 @@
1
- export interface Pagination {
2
- /** * True is there is another page. */
3
- has_more: boolean;
4
- /** * The requested page number. */
5
- page_number: number;
6
- /** * The requested number of items on the current page. */
7
- page_size: number;
8
- /** * The total number of items across all pages for this request. */
9
- total_count: number;
10
- }
11
- export interface NftCollectionAttribute {
12
- trait_type: string;
13
- value: string;
14
- }
15
- export interface NftData {
16
- /** * The token's id. */
17
- token_id: bigint | null;
18
- token_url: string;
19
- /** * The original minter. */
20
- original_owner: string;
21
- /** * The current holder of this NFT. */
22
- current_owner: string;
23
- external_data: NftExternalData;
24
- /** * If `true`, the asset data is available from the Covalent CDN. */
25
- asset_cached: boolean;
26
- /** * If `true`, the image data is available from the Covalent CDN. */
27
- image_cached: boolean;
28
- }
29
- export interface NftExternalData {
30
- name: string;
31
- description: string;
32
- asset_url: string;
33
- asset_file_extension: string;
34
- asset_mime_type: string;
35
- asset_size_bytes: string;
36
- image: string;
37
- image_256: string;
38
- image_512: string;
39
- image_1024: string;
40
- animation_url: string;
41
- external_url: string;
42
- attributes: NftCollectionAttribute[];
43
- }
44
- export interface DecodedItem {
45
- name: string;
46
- signature: string;
47
- params: Param[];
48
- }
49
- export interface Param {
50
- name: string;
51
- type: string;
52
- indexed: boolean;
53
- decoded: boolean;
54
- value: string;
55
- }
56
- export interface LogEvent {
57
- /** * The block signed timestamp in UTC. */
58
- block_signed_at: Date;
59
- /** * The height of the block. */
60
- block_height: number;
61
- /** * The offset is the position of the tx in the block. */
62
- tx_offset: number;
63
- /** * The offset is the position of the log entry within an event log. */
64
- log_offset: number;
65
- /** * The requested transaction hash. */
66
- tx_hash: string;
67
- /** * The log topics in raw data. */
68
- raw_log_topics: string[];
69
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
70
- sender_contract_decimals: number;
71
- /** * The name of the sender. */
72
- sender_name: string;
73
- sender_contract_ticker_symbol: string;
74
- /** * The address of the sender. */
75
- sender_address: string;
76
- /** * The label of the sender address. */
77
- sender_address_label: string;
78
- /** * The contract logo URL. */
79
- sender_logo_url: string;
80
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
81
- supports_erc: string[];
82
- /** * The address of the deployed UniswapV2 like factory contract for this DEX. */
83
- sender_factory_address: string;
84
- /** * The log events in raw. */
85
- raw_log_data: string;
86
- /** * The decoded item. */
87
- decoded: DecodedItem;
88
- }
89
- export interface ContractMetadata {
90
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
91
- contract_decimals: number;
92
- /** * The string returned by the `name()` method. */
93
- contract_name: string;
94
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
95
- contract_ticker_symbol: string;
96
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
97
- contract_address: string;
98
- /** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
99
- supports_erc: string[];
100
- /** * The contract logo URL. */
101
- logo_url: string;
102
- }
103
- export interface Explorer {
104
- /** * The name of the explorer. */
105
- label: string;
106
- /** * The URL of the explorer. */
107
- url: string;
108
- }
109
- export interface LogoUrls {
110
- /** * The token logo URL. */
111
- token_logo_url: string;
112
- /** * The protocol logo URL. */
113
- protocol_logo_url: string;
114
- /** * The chain logo URL. */
115
- chain_logo_url: string;
116
- }
@@ -1,121 +0,0 @@
1
- export interface ApprovalsResponse {
2
- /** * The requested address. */
3
- address: string;
4
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
5
- updated_at: Date;
6
- /** * The requested quote currency eg: `USD`. */
7
- quote_currency: string;
8
- /** * The requested chain ID eg: `1`. */
9
- chain_id: number;
10
- /** * The requested chain name eg: `eth-mainnet`. */
11
- chain_name: string;
12
- /** * List of response items. */
13
- items: TokensApprovalItem[];
14
- }
15
- export interface TokensApprovalItem {
16
- /** * The address for the token that has approvals. */
17
- token_address: string;
18
- /** * The name for the token that has approvals. */
19
- token_address_label: string;
20
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
21
- ticker_symbol: string;
22
- /** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
23
- contract_decimals: number;
24
- /** * The contract logo URL. */
25
- logo_url: string;
26
- /** * The exchange rate for the requested quote currency. */
27
- quote_rate: number;
28
- /** * Wallet balance of the token. */
29
- balance: bigint | null;
30
- /** * Value of the wallet balance of the token. */
31
- balance_quote: number;
32
- /** * A prettier version of the quote for rendering purposes. */
33
- pretty_balance_quote: string;
34
- /** * Total amount at risk across all spenders. */
35
- value_at_risk: string;
36
- /** * Value of total amount at risk across all spenders. */
37
- value_at_risk_quote: number;
38
- /** * A prettier version of the quote for rendering purposes. */
39
- pretty_value_at_risk_quote: string;
40
- /** * Contracts with non-zero approvals for this token. */
41
- spenders: TokenSpenderItem[];
42
- }
43
- export interface TokenSpenderItem {
44
- /** * The height of the block. */
45
- block_height: number;
46
- /** * The offset is the position of the tx in the block. */
47
- tx_offset: number;
48
- /** * The offset is the position of the log entry within an event log." */
49
- log_offset: number;
50
- /** * The block signed timestamp in UTC. */
51
- block_signed_at: Date;
52
- /** * Most recent transaction that updated approval amounts for the token. */
53
- tx_hash: string;
54
- /** * Address of the contract with approval for the token. */
55
- spender_address: string;
56
- /** * Name of the contract with approval for the token. */
57
- spender_address_label: string;
58
- /** * Remaining number of tokens granted to the spender by the approval. */
59
- allowance: string;
60
- /** * Value of the remaining allowance specified by the approval. */
61
- allowance_quote: number;
62
- /** * A prettier version of the quote for rendering purposes. */
63
- pretty_allowance_quote: string;
64
- /** * Amount at risk for spender. */
65
- value_at_risk: string;
66
- /** * Value of amount at risk for spender. */
67
- value_at_risk_quote: number;
68
- /** * A prettier version of the quote for rendering purposes. */
69
- pretty_value_at_risk_quote: string;
70
- risk_factor: string;
71
- }
72
- export interface NftApprovalsResponse {
73
- /** * The timestamp when the response was generated. Useful to show data staleness to users. */
74
- updated_at: Date;
75
- /** * The requested chain ID eg: `1`. */
76
- chain_id: number;
77
- /** * The requested chain name eg: `eth-mainnet`. */
78
- chain_name: string;
79
- /** * The requested address. */
80
- address: string;
81
- /** * List of response items. */
82
- items: NftApprovalsItem[];
83
- }
84
- export interface NftApprovalsItem {
85
- /** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
86
- contract_address: string;
87
- /** * The label of the contract address. */
88
- contract_address_label: string;
89
- /** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
90
- contract_ticker_symbol: string;
91
- /** * List of asset balances held by the user. */
92
- token_balances: NftApprovalBalance[];
93
- /** * Contracts with non-zero approvals for this token. */
94
- spenders: NftApprovalSpender[];
95
- }
96
- export interface NftApprovalBalance {
97
- /** * The token's id. */
98
- token_id: bigint | null;
99
- /** * The NFT's token balance. */
100
- token_balance: bigint | null;
101
- }
102
- export interface NftApprovalSpender {
103
- /** * The height of the block. */
104
- block_height: number;
105
- /** * The offset is the position of the tx in the block. */
106
- tx_offset: number;
107
- /** * The offset is the position of the log entry within an event log." */
108
- log_offset: number;
109
- /** * The block signed timestamp in UTC. */
110
- block_signed_at: Date;
111
- /** * Most recent transaction that updated approval amounts for the token. */
112
- tx_hash: string;
113
- /** * Address of the contract with approval for the token. */
114
- spender_address: string;
115
- /** * Name of the contract with approval for the token. */
116
- spender_address_label: string;
117
- /** * The token ids approved. */
118
- token_ids_approved: string;
119
- /** * Remaining number of tokens granted to the spender by the approval. */
120
- allowance: string;
121
- }