@covalenthq/client-sdk 0.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.
@@ -0,0 +1,421 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.XykService = void 0;
13
+ const baseDelayMs = 1000; // Base delay in milliseconds
14
+ class XykService {
15
+ constructor(apiKey) {
16
+ this.apiKey = apiKey;
17
+ }
18
+ /**
19
+ *
20
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
21
+ * @param {string} dexName - The DEX name eg: `uniswap_v2`.
22
+ *
23
+ */
24
+ getPools(chainName, dexName) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ let retryCount = 0;
27
+ let success = false;
28
+ while (!success) {
29
+ try {
30
+ const urlParams = new URLSearchParams();
31
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/pools/?${urlParams}`, {
32
+ headers: {
33
+ "Authorization": `Bearer ${this.apiKey}`
34
+ }
35
+ });
36
+ const data = yield response.json();
37
+ if (data.error && data.error_code === 429) {
38
+ retryCount++;
39
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
40
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
41
+ }
42
+ else {
43
+ success = true;
44
+ return data;
45
+ }
46
+ }
47
+ catch (error) {
48
+ success = true;
49
+ return error.message;
50
+ }
51
+ }
52
+ });
53
+ }
54
+ /**
55
+ *
56
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
57
+ * @param {string} dexName - The DEX name eg: `uniswap_v2`.
58
+ * @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, or an `Unstoppable Domain` resolves automatically.
59
+ *
60
+ */
61
+ getPoolByAddress(chainName, dexName, poolAddress) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ let retryCount = 0;
64
+ let success = false;
65
+ while (!success) {
66
+ try {
67
+ const urlParams = new URLSearchParams();
68
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/pools/address/${poolAddress}/?${urlParams}`, {
69
+ headers: {
70
+ "Authorization": `Bearer ${this.apiKey}`
71
+ }
72
+ });
73
+ const data = yield response.json();
74
+ if (data.error && data.error_code === 429) {
75
+ retryCount++;
76
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
77
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
78
+ }
79
+ else {
80
+ success = true;
81
+ return data;
82
+ }
83
+ }
84
+ catch (error) {
85
+ success = true;
86
+ return error.message;
87
+ }
88
+ }
89
+ });
90
+ }
91
+ /**
92
+ *
93
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
94
+ * @param {string} dexName - The DEX name eg: `uniswap_v2`.
95
+ * @param {string} accountAddress - The account address.
96
+ *
97
+ */
98
+ getAddressExchangeBalances(chainName, dexName, accountAddress) {
99
+ return __awaiter(this, void 0, void 0, function* () {
100
+ let retryCount = 0;
101
+ let success = false;
102
+ while (!success) {
103
+ try {
104
+ const urlParams = new URLSearchParams();
105
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/address/${accountAddress}/balances/?${urlParams}`, {
106
+ headers: {
107
+ "Authorization": `Bearer ${this.apiKey}`
108
+ }
109
+ });
110
+ const data = yield response.json();
111
+ if (data.error && data.error_code === 429) {
112
+ retryCount++;
113
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
114
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
115
+ }
116
+ else {
117
+ success = true;
118
+ return data;
119
+ }
120
+ }
121
+ catch (error) {
122
+ success = true;
123
+ return error.message;
124
+ }
125
+ }
126
+ });
127
+ }
128
+ /**
129
+ *
130
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
131
+ * @param {string} dexName - The DEX name eg: `uniswap`.
132
+ *
133
+ */
134
+ getNetworkExchangeTokens(chainName, dexName) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ let retryCount = 0;
137
+ let success = false;
138
+ while (!success) {
139
+ try {
140
+ const urlParams = new URLSearchParams();
141
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/tokens/?${urlParams}`, {
142
+ headers: {
143
+ "Authorization": `Bearer ${this.apiKey}`
144
+ }
145
+ });
146
+ const data = yield response.json();
147
+ if (data.error && data.error_code === 429) {
148
+ retryCount++;
149
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
150
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
151
+ }
152
+ else {
153
+ success = true;
154
+ return data;
155
+ }
156
+ }
157
+ catch (error) {
158
+ success = true;
159
+ return error.message;
160
+ }
161
+ }
162
+ });
163
+ }
164
+ /**
165
+ *
166
+
167
+ *
168
+ */
169
+ getSupportedDEXes() {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ let retryCount = 0;
172
+ let success = false;
173
+ while (!success) {
174
+ try {
175
+ const urlParams = new URLSearchParams();
176
+ const response = yield fetch(`https://api.covalenthq.com/v1/xyk/supported_dexes/?${urlParams}`, {
177
+ headers: {
178
+ "Authorization": `Bearer ${this.apiKey}`
179
+ }
180
+ });
181
+ const data = yield response.json();
182
+ if (data.error && data.error_code === 429) {
183
+ retryCount++;
184
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
185
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
186
+ }
187
+ else {
188
+ success = true;
189
+ return data;
190
+ }
191
+ }
192
+ catch (error) {
193
+ success = true;
194
+ return error.message;
195
+ }
196
+ }
197
+ });
198
+ }
199
+ /**
200
+ *
201
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
202
+ * @param {string} dexName - The DEX name eg: `uniswap`.
203
+ * @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, or an `Unstoppable Domain` resolves automatically.
204
+ *
205
+ */
206
+ getSingleNetworkExchangeToken(chainName, dexName, tokenAddress) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ let retryCount = 0;
209
+ let success = false;
210
+ while (!success) {
211
+ try {
212
+ const urlParams = new URLSearchParams();
213
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/tokens/address/${tokenAddress}/?${urlParams}`, {
214
+ headers: {
215
+ "Authorization": `Bearer ${this.apiKey}`
216
+ }
217
+ });
218
+ const data = yield response.json();
219
+ if (data.error && data.error_code === 429) {
220
+ retryCount++;
221
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
222
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
223
+ }
224
+ else {
225
+ success = true;
226
+ return data;
227
+ }
228
+ }
229
+ catch (error) {
230
+ success = true;
231
+ return error.message;
232
+ }
233
+ }
234
+ });
235
+ }
236
+ /**
237
+ *
238
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
239
+ * @param {string} dexName - The DEX name eg: `uniswap`.
240
+ * @param {string} accountAddress - The account address. Passing in an `ENS` or `RNS` resolves automatically.
241
+ *
242
+ */
243
+ getTransactionsForAccountAddress(chainName, dexName, accountAddress) {
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ let retryCount = 0;
246
+ let success = false;
247
+ while (!success) {
248
+ try {
249
+ const urlParams = new URLSearchParams();
250
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/address/${accountAddress}/transactions/?${urlParams}`, {
251
+ headers: {
252
+ "Authorization": `Bearer ${this.apiKey}`
253
+ }
254
+ });
255
+ const data = yield response.json();
256
+ if (data.error && data.error_code === 429) {
257
+ retryCount++;
258
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
259
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
260
+ }
261
+ else {
262
+ success = true;
263
+ return data;
264
+ }
265
+ }
266
+ catch (error) {
267
+ success = true;
268
+ return error.message;
269
+ }
270
+ }
271
+ });
272
+ }
273
+ /**
274
+ *
275
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
276
+ * @param {string} dexName - The DEX name eg: `uniswap`.
277
+ * @param {string} tokenAddress - The token contract address. Passing in an `ENS`, `RNS`, or an `Unstoppable Domain` resolves automatically.
278
+ *
279
+ */
280
+ getTransactionsForTokenAddress(chainName, dexName, tokenAddress) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ let retryCount = 0;
283
+ let success = false;
284
+ while (!success) {
285
+ try {
286
+ const urlParams = new URLSearchParams();
287
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/tokens/address/${tokenAddress}/transactions/?${urlParams}`, {
288
+ headers: {
289
+ "Authorization": `Bearer ${this.apiKey}`
290
+ }
291
+ });
292
+ const data = yield response.json();
293
+ if (data.error && data.error_code === 429) {
294
+ retryCount++;
295
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
296
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
297
+ }
298
+ else {
299
+ success = true;
300
+ return data;
301
+ }
302
+ }
303
+ catch (error) {
304
+ success = true;
305
+ return error.message;
306
+ }
307
+ }
308
+ });
309
+ }
310
+ /**
311
+ *
312
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
313
+ * @param {string} dexName - The DEX name eg: `uniswap`.
314
+ * @param {string} poolAddress - The pool contract address. Passing in an `ENS`, `RNS`, or an `Unstoppable Domain` resolves automatically.
315
+ *
316
+ */
317
+ getTransactionsForExchange(chainName, dexName, poolAddress) {
318
+ return __awaiter(this, void 0, void 0, function* () {
319
+ let retryCount = 0;
320
+ let success = false;
321
+ while (!success) {
322
+ try {
323
+ const urlParams = new URLSearchParams();
324
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/pools/address/${poolAddress}/transactions/?${urlParams}`, {
325
+ headers: {
326
+ "Authorization": `Bearer ${this.apiKey}`
327
+ }
328
+ });
329
+ const data = yield response.json();
330
+ if (data.error && data.error_code === 429) {
331
+ retryCount++;
332
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
333
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
334
+ }
335
+ else {
336
+ success = true;
337
+ return data;
338
+ }
339
+ }
340
+ catch (error) {
341
+ success = true;
342
+ return error.message;
343
+ }
344
+ }
345
+ });
346
+ }
347
+ /**
348
+ *
349
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
350
+ * @param {string} dexName - The DEX name eg: `uniswap`.
351
+ *
352
+ */
353
+ getEcosystemChartData(chainName, dexName) {
354
+ return __awaiter(this, void 0, void 0, function* () {
355
+ let retryCount = 0;
356
+ let success = false;
357
+ while (!success) {
358
+ try {
359
+ const urlParams = new URLSearchParams();
360
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/ecosystem/?${urlParams}`, {
361
+ headers: {
362
+ "Authorization": `Bearer ${this.apiKey}`
363
+ }
364
+ });
365
+ const data = yield response.json();
366
+ if (data.error && data.error_code === 429) {
367
+ retryCount++;
368
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
369
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
370
+ }
371
+ else {
372
+ success = true;
373
+ return data;
374
+ }
375
+ }
376
+ catch (error) {
377
+ success = true;
378
+ return error.message;
379
+ }
380
+ }
381
+ });
382
+ }
383
+ /**
384
+ *
385
+ * @param {string} chainName - The chain name eg: `eth-mainnet`.
386
+ * @param {string} dexName - The DEX name eg: `uniswap`.
387
+ *
388
+ */
389
+ getHealthData(chainName, dexName) {
390
+ return __awaiter(this, void 0, void 0, function* () {
391
+ let retryCount = 0;
392
+ let success = false;
393
+ while (!success) {
394
+ try {
395
+ const urlParams = new URLSearchParams();
396
+ const response = yield fetch(`https://api.covalenthq.com/v1/${chainName}/xyk/${dexName}/health/?${urlParams}`, {
397
+ headers: {
398
+ "Authorization": `Bearer ${this.apiKey}`
399
+ }
400
+ });
401
+ const data = yield response.json();
402
+ if (data.error && data.error_code === 429) {
403
+ retryCount++;
404
+ const delayMs = Math.pow(2, retryCount) * baseDelayMs; // Exponential delay calculation
405
+ yield new Promise((resolve) => setTimeout(resolve, delayMs));
406
+ }
407
+ else {
408
+ success = true;
409
+ return data;
410
+ }
411
+ }
412
+ catch (error) {
413
+ success = true;
414
+ return error.message;
415
+ }
416
+ }
417
+ });
418
+ }
419
+ }
420
+ exports.XykService = XykService;
421
+ //# sourceMappingURL=XykService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XykService.js","sourceRoot":"","sources":["../src/services/XykService.ts"],"names":[],"mappings":";;;;;;;;;;;;AA2SA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,6BAA6B;AAEvD,MAAa,UAAU;IACnB,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAClC,CAAC;IAGD;;;;;OAKG;IACU,QAAQ,CAAC,SAAkjE,EAAE,OAAe;;YACrlE,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,OAAO,CAAC,OAAO,EAAE;gBACb,IAAI;oBACA,MAAM,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC;oBAGxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,iCAAiC,SAAS,QAAQ,OAAO,WAAW,SAAS,EAAE,EAAE;wBAC1G,OAAO,EAAE;4BACL,eAAe,EAAE,UAAU,IA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A,MAAM,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC;oBAGxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,iCAAiC,SAAS,QAAQ,OAAO,YAAY,SAAS,EAAE,EAAE;wBAC3G,OAAO,EAAE;4BACL,eAAe,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;yBAC3C;qBACJ,CAAC,CAAC;oBACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;oBACnC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,KAAK,GAAG,EAAE;wBACvC,UAAU,EAAE,CAAC;wBACb,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,WAAW,CAAC,CAAC,gCAAgC;wBACvF,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;qBAChE;yBAAM;wBACH,OAAO,GAAG,IAAI,CAAC;wBACf,OAAO,IAAI,CAAC;qBACf;iBACJ;gBAAC,OAAO,KAAK,EAAE;oBACZ,OAAO,GAAG,IAAI,CAAC;oBACf,OAAO,KAAK,CAAC,OAAO,CAAC;iBACxB;aACJ;QACL,CAAC;KAAA;CAGJ;AA5YD,gCA4YC"}
@@ -0,0 +1 @@
1
+ export { Client } from "./Client";
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Client = void 0;
4
+ var Client_1 = require("./Client");
5
+ Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/services/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@covalenthq/client-sdk",
3
+ "version": "0.0.1",
4
+ "description": "this is a test client library",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "/dist"
9
+ ],
10
+ "repository": "https://github.com/covalenthq/covalent-api-sdk-js",
11
+ "author": "David Zhang",
12
+ "license": "MIT",
13
+ "dependencies": {
14
+ "typescript": "^5.1.6"
15
+ }
16
+ }