@compass-labs/api-sdk 0.5.7 → 0.5.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.
- package/FUNCTIONS.md +6 -26
- package/README.md +41 -72
- package/bin/mcp-server.js +9 -9
- package/bin/mcp-server.js.map +6 -6
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/errors/apierror.d.ts +14 -2
- package/dist/commonjs/models/errors/apierror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/apierror.js +1 -1
- package/dist/commonjs/models/errors/apierror.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/errors/apierror.d.ts +14 -2
- package/dist/esm/models/errors/apierror.d.ts.map +1 -1
- package/dist/esm/models/errors/apierror.js +1 -1
- package/dist/esm/models/errors/apierror.js.map +1 -1
- package/docs/sdks/aavev3/README.md +83 -199
- package/docs/sdks/aerodromeslipstream/README.md +39 -79
- package/docs/sdks/morpho/README.md +84 -182
- package/docs/sdks/pendle/README.md +53 -113
- package/docs/sdks/sky/README.md +27 -51
- package/docs/sdks/smartaccount/README.md +5 -9
- package/docs/sdks/token/README.md +24 -56
- package/docs/sdks/transactionbatching/README.md +15 -27
- package/docs/sdks/uniswapv3/README.md +60 -132
- package/docs/sdks/universal/README.md +50 -106
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/errors/apierror.ts +18 -3
|
@@ -35,14 +35,9 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
35
35
|
|
|
36
36
|
async function run() {
|
|
37
37
|
const result = await compassApiSDK.uniswapV3.quoteBuyExactly({
|
|
38
|
-
chain: "arbitrum:mainnet",
|
|
39
|
-
tokenIn: "USDC",
|
|
40
|
-
tokenOut: "USDT",
|
|
41
|
-
fee: "0.01",
|
|
42
38
|
amountOut: "<value>",
|
|
43
39
|
});
|
|
44
40
|
|
|
45
|
-
// Handle the result
|
|
46
41
|
console.log(result);
|
|
47
42
|
}
|
|
48
43
|
|
|
@@ -65,21 +60,14 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
65
60
|
|
|
66
61
|
async function run() {
|
|
67
62
|
const res = await uniswapV3QuoteBuyExactly(compassApiSDK, {
|
|
68
|
-
chain: "arbitrum:mainnet",
|
|
69
|
-
tokenIn: "USDC",
|
|
70
|
-
tokenOut: "USDT",
|
|
71
|
-
fee: "0.01",
|
|
72
63
|
amountOut: "<value>",
|
|
73
64
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
if (res.ok) {
|
|
66
|
+
const { value: result } = res;
|
|
67
|
+
console.log(result);
|
|
68
|
+
} else {
|
|
69
|
+
console.log("uniswapV3QuoteBuyExactly failed:", res.error);
|
|
77
70
|
}
|
|
78
|
-
|
|
79
|
-
const { value: result } = res;
|
|
80
|
-
|
|
81
|
-
// Handle the result
|
|
82
|
-
console.log(result);
|
|
83
71
|
}
|
|
84
72
|
|
|
85
73
|
run();
|
|
@@ -124,14 +112,9 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
124
112
|
|
|
125
113
|
async function run() {
|
|
126
114
|
const result = await compassApiSDK.uniswapV3.quoteSellExactly({
|
|
127
|
-
chain: "arbitrum:mainnet",
|
|
128
|
-
tokenIn: "USDC",
|
|
129
|
-
tokenOut: "USDT",
|
|
130
|
-
fee: "0.01",
|
|
131
115
|
amountIn: "<value>",
|
|
132
116
|
});
|
|
133
117
|
|
|
134
|
-
// Handle the result
|
|
135
118
|
console.log(result);
|
|
136
119
|
}
|
|
137
120
|
|
|
@@ -154,21 +137,14 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
154
137
|
|
|
155
138
|
async function run() {
|
|
156
139
|
const res = await uniswapV3QuoteSellExactly(compassApiSDK, {
|
|
157
|
-
chain: "arbitrum:mainnet",
|
|
158
|
-
tokenIn: "USDC",
|
|
159
|
-
tokenOut: "USDT",
|
|
160
|
-
fee: "0.01",
|
|
161
140
|
amountIn: "<value>",
|
|
162
141
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
142
|
+
if (res.ok) {
|
|
143
|
+
const { value: result } = res;
|
|
144
|
+
console.log(result);
|
|
145
|
+
} else {
|
|
146
|
+
console.log("uniswapV3QuoteSellExactly failed:", res.error);
|
|
166
147
|
}
|
|
167
|
-
|
|
168
|
-
const { value: result } = res;
|
|
169
|
-
|
|
170
|
-
// Handle the result
|
|
171
|
-
console.log(result);
|
|
172
148
|
}
|
|
173
149
|
|
|
174
150
|
run();
|
|
@@ -210,14 +186,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
210
186
|
});
|
|
211
187
|
|
|
212
188
|
async function run() {
|
|
213
|
-
const result = await compassApiSDK.uniswapV3.poolPrice({
|
|
214
|
-
chain: "arbitrum:mainnet",
|
|
215
|
-
tokenIn: "USDC",
|
|
216
|
-
tokenOut: "USDT",
|
|
217
|
-
fee: "0.01",
|
|
218
|
-
});
|
|
189
|
+
const result = await compassApiSDK.uniswapV3.poolPrice({});
|
|
219
190
|
|
|
220
|
-
// Handle the result
|
|
221
191
|
console.log(result);
|
|
222
192
|
}
|
|
223
193
|
|
|
@@ -239,21 +209,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
239
209
|
});
|
|
240
210
|
|
|
241
211
|
async function run() {
|
|
242
|
-
const res = await uniswapV3PoolPrice(compassApiSDK, {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (!res.ok) {
|
|
250
|
-
throw res.error;
|
|
212
|
+
const res = await uniswapV3PoolPrice(compassApiSDK, {});
|
|
213
|
+
if (res.ok) {
|
|
214
|
+
const { value: result } = res;
|
|
215
|
+
console.log(result);
|
|
216
|
+
} else {
|
|
217
|
+
console.log("uniswapV3PoolPrice failed:", res.error);
|
|
251
218
|
}
|
|
252
|
-
|
|
253
|
-
const { value: result } = res;
|
|
254
|
-
|
|
255
|
-
// Handle the result
|
|
256
|
-
console.log(result);
|
|
257
219
|
}
|
|
258
220
|
|
|
259
221
|
run();
|
|
@@ -300,12 +262,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
300
262
|
});
|
|
301
263
|
|
|
302
264
|
async function run() {
|
|
303
|
-
const result = await compassApiSDK.uniswapV3.liquidityProvisionInRange({
|
|
304
|
-
chain: "arbitrum:mainnet",
|
|
305
|
-
tokenId: 4318185,
|
|
306
|
-
});
|
|
265
|
+
const result = await compassApiSDK.uniswapV3.liquidityProvisionInRange({});
|
|
307
266
|
|
|
308
|
-
// Handle the result
|
|
309
267
|
console.log(result);
|
|
310
268
|
}
|
|
311
269
|
|
|
@@ -327,19 +285,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
327
285
|
});
|
|
328
286
|
|
|
329
287
|
async function run() {
|
|
330
|
-
const res = await uniswapV3LiquidityProvisionInRange(compassApiSDK, {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
throw res.error;
|
|
288
|
+
const res = await uniswapV3LiquidityProvisionInRange(compassApiSDK, {});
|
|
289
|
+
if (res.ok) {
|
|
290
|
+
const { value: result } = res;
|
|
291
|
+
console.log(result);
|
|
292
|
+
} else {
|
|
293
|
+
console.log("uniswapV3LiquidityProvisionInRange failed:", res.error);
|
|
337
294
|
}
|
|
338
|
-
|
|
339
|
-
const { value: result } = res;
|
|
340
|
-
|
|
341
|
-
// Handle the result
|
|
342
|
-
console.log(result);
|
|
343
295
|
}
|
|
344
296
|
|
|
345
297
|
run();
|
|
@@ -385,11 +337,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
385
337
|
});
|
|
386
338
|
|
|
387
339
|
async function run() {
|
|
388
|
-
const result = await compassApiSDK.uniswapV3.liquidityProvisionPositions({
|
|
389
|
-
chain: "arbitrum:mainnet",
|
|
390
|
-
});
|
|
340
|
+
const result = await compassApiSDK.uniswapV3.liquidityProvisionPositions({});
|
|
391
341
|
|
|
392
|
-
// Handle the result
|
|
393
342
|
console.log(result);
|
|
394
343
|
}
|
|
395
344
|
|
|
@@ -411,18 +360,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
411
360
|
});
|
|
412
361
|
|
|
413
362
|
async function run() {
|
|
414
|
-
const res = await uniswapV3LiquidityProvisionPositions(compassApiSDK, {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
363
|
+
const res = await uniswapV3LiquidityProvisionPositions(compassApiSDK, {});
|
|
364
|
+
if (res.ok) {
|
|
365
|
+
const { value: result } = res;
|
|
366
|
+
console.log(result);
|
|
367
|
+
} else {
|
|
368
|
+
console.log("uniswapV3LiquidityProvisionPositions failed:", res.error);
|
|
420
369
|
}
|
|
421
|
-
|
|
422
|
-
const { value: result } = res;
|
|
423
|
-
|
|
424
|
-
// Handle the result
|
|
425
|
-
console.log(result);
|
|
426
370
|
}
|
|
427
371
|
|
|
428
372
|
run();
|
|
@@ -474,11 +418,11 @@ async function run() {
|
|
|
474
418
|
fee: "0.01",
|
|
475
419
|
amount: 1.5,
|
|
476
420
|
maxSlippagePercent: 0.5,
|
|
421
|
+
wrapEth: true,
|
|
477
422
|
chain: "ethereum:mainnet",
|
|
478
423
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
479
424
|
});
|
|
480
425
|
|
|
481
|
-
// Handle the result
|
|
482
426
|
console.log(result);
|
|
483
427
|
}
|
|
484
428
|
|
|
@@ -506,18 +450,16 @@ async function run() {
|
|
|
506
450
|
fee: "0.01",
|
|
507
451
|
amount: 1.5,
|
|
508
452
|
maxSlippagePercent: 0.5,
|
|
453
|
+
wrapEth: true,
|
|
509
454
|
chain: "ethereum:mainnet",
|
|
510
455
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
511
456
|
});
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
457
|
+
if (res.ok) {
|
|
458
|
+
const { value: result } = res;
|
|
459
|
+
console.log(result);
|
|
460
|
+
} else {
|
|
461
|
+
console.log("uniswapV3SwapBuyExactly failed:", res.error);
|
|
515
462
|
}
|
|
516
|
-
|
|
517
|
-
const { value: result } = res;
|
|
518
|
-
|
|
519
|
-
// Handle the result
|
|
520
|
-
console.log(result);
|
|
521
463
|
}
|
|
522
464
|
|
|
523
465
|
run();
|
|
@@ -569,11 +511,11 @@ async function run() {
|
|
|
569
511
|
fee: "0.05",
|
|
570
512
|
amount: 1.5,
|
|
571
513
|
maxSlippagePercent: 0.5,
|
|
514
|
+
wrapEth: true,
|
|
572
515
|
chain: "arbitrum:mainnet",
|
|
573
516
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
574
517
|
});
|
|
575
518
|
|
|
576
|
-
// Handle the result
|
|
577
519
|
console.log(result);
|
|
578
520
|
}
|
|
579
521
|
|
|
@@ -601,18 +543,16 @@ async function run() {
|
|
|
601
543
|
fee: "0.05",
|
|
602
544
|
amount: 1.5,
|
|
603
545
|
maxSlippagePercent: 0.5,
|
|
546
|
+
wrapEth: true,
|
|
604
547
|
chain: "arbitrum:mainnet",
|
|
605
548
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
606
549
|
});
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
550
|
+
if (res.ok) {
|
|
551
|
+
const { value: result } = res;
|
|
552
|
+
console.log(result);
|
|
553
|
+
} else {
|
|
554
|
+
console.log("uniswapV3SwapSellExactly failed:", res.error);
|
|
610
555
|
}
|
|
611
|
-
|
|
612
|
-
const { value: result } = res;
|
|
613
|
-
|
|
614
|
-
// Handle the result
|
|
615
|
-
console.log(result);
|
|
616
556
|
}
|
|
617
557
|
|
|
618
558
|
run();
|
|
@@ -670,7 +610,6 @@ async function run() {
|
|
|
670
610
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
671
611
|
});
|
|
672
612
|
|
|
673
|
-
// Handle the result
|
|
674
613
|
console.log(result);
|
|
675
614
|
}
|
|
676
615
|
|
|
@@ -701,15 +640,12 @@ async function run() {
|
|
|
701
640
|
chain: "ethereum:mainnet",
|
|
702
641
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
703
642
|
});
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
643
|
+
if (res.ok) {
|
|
644
|
+
const { value: result } = res;
|
|
645
|
+
console.log(result);
|
|
646
|
+
} else {
|
|
647
|
+
console.log("uniswapV3LiquidityProvisionIncrease failed:", res.error);
|
|
707
648
|
}
|
|
708
|
-
|
|
709
|
-
const { value: result } = res;
|
|
710
|
-
|
|
711
|
-
// Handle the result
|
|
712
|
-
console.log(result);
|
|
713
649
|
}
|
|
714
650
|
|
|
715
651
|
run();
|
|
@@ -772,7 +708,6 @@ async function run() {
|
|
|
772
708
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
773
709
|
});
|
|
774
710
|
|
|
775
|
-
// Handle the result
|
|
776
711
|
console.log(result);
|
|
777
712
|
}
|
|
778
713
|
|
|
@@ -808,15 +743,12 @@ async function run() {
|
|
|
808
743
|
chain: "arbitrum:mainnet",
|
|
809
744
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
810
745
|
});
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
746
|
+
if (res.ok) {
|
|
747
|
+
const { value: result } = res;
|
|
748
|
+
console.log(result);
|
|
749
|
+
} else {
|
|
750
|
+
console.log("uniswapV3LiquidityProvisionMint failed:", res.error);
|
|
814
751
|
}
|
|
815
|
-
|
|
816
|
-
const { value: result } = res;
|
|
817
|
-
|
|
818
|
-
// Handle the result
|
|
819
|
-
console.log(result);
|
|
820
752
|
}
|
|
821
753
|
|
|
822
754
|
run();
|
|
@@ -872,7 +804,6 @@ async function run() {
|
|
|
872
804
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
873
805
|
});
|
|
874
806
|
|
|
875
|
-
// Handle the result
|
|
876
807
|
console.log(result);
|
|
877
808
|
}
|
|
878
809
|
|
|
@@ -900,15 +831,12 @@ async function run() {
|
|
|
900
831
|
chain: "arbitrum:mainnet",
|
|
901
832
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
902
833
|
});
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
834
|
+
if (res.ok) {
|
|
835
|
+
const { value: result } = res;
|
|
836
|
+
console.log(result);
|
|
837
|
+
} else {
|
|
838
|
+
console.log("uniswapV3LiquidityProvisionWithdraw failed:", res.error);
|
|
906
839
|
}
|
|
907
|
-
|
|
908
|
-
const { value: result } = res;
|
|
909
|
-
|
|
910
|
-
// Handle the result
|
|
911
|
-
console.log(result);
|
|
912
840
|
}
|
|
913
841
|
|
|
914
842
|
run();
|
|
@@ -31,11 +31,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
async function run() {
|
|
34
|
-
const result = await compassApiSDK.universal.portfolio({
|
|
35
|
-
chain: "arbitrum:mainnet",
|
|
36
|
-
});
|
|
34
|
+
const result = await compassApiSDK.universal.portfolio({});
|
|
37
35
|
|
|
38
|
-
// Handle the result
|
|
39
36
|
console.log(result);
|
|
40
37
|
}
|
|
41
38
|
|
|
@@ -57,18 +54,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
57
54
|
});
|
|
58
55
|
|
|
59
56
|
async function run() {
|
|
60
|
-
const res = await universalPortfolio(compassApiSDK, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
const res = await universalPortfolio(compassApiSDK, {});
|
|
58
|
+
if (res.ok) {
|
|
59
|
+
const { value: result } = res;
|
|
60
|
+
console.log(result);
|
|
61
|
+
} else {
|
|
62
|
+
console.log("universalPortfolio failed:", res.error);
|
|
66
63
|
}
|
|
67
|
-
|
|
68
|
-
const { value: result } = res;
|
|
69
|
-
|
|
70
|
-
// Handle the result
|
|
71
|
-
console.log(result);
|
|
72
64
|
}
|
|
73
65
|
|
|
74
66
|
run();
|
|
@@ -112,11 +104,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
112
104
|
});
|
|
113
105
|
|
|
114
106
|
async function run() {
|
|
115
|
-
const result = await compassApiSDK.universal.visualizePortfolio({
|
|
116
|
-
chain: "arbitrum:mainnet",
|
|
117
|
-
});
|
|
107
|
+
const result = await compassApiSDK.universal.visualizePortfolio({});
|
|
118
108
|
|
|
119
|
-
// Handle the result
|
|
120
109
|
console.log(result);
|
|
121
110
|
}
|
|
122
111
|
|
|
@@ -138,18 +127,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
138
127
|
});
|
|
139
128
|
|
|
140
129
|
async function run() {
|
|
141
|
-
const res = await universalVisualizePortfolio(compassApiSDK, {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
130
|
+
const res = await universalVisualizePortfolio(compassApiSDK, {});
|
|
131
|
+
if (res.ok) {
|
|
132
|
+
const { value: result } = res;
|
|
133
|
+
console.log(result);
|
|
134
|
+
} else {
|
|
135
|
+
console.log("universalVisualizePortfolio failed:", res.error);
|
|
147
136
|
}
|
|
148
|
-
|
|
149
|
-
const { value: result } = res;
|
|
150
|
-
|
|
151
|
-
// Handle the result
|
|
152
|
-
console.log(result);
|
|
153
137
|
}
|
|
154
138
|
|
|
155
139
|
run();
|
|
@@ -189,11 +173,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
189
173
|
});
|
|
190
174
|
|
|
191
175
|
async function run() {
|
|
192
|
-
const result = await compassApiSDK.universal.supportedTokens({
|
|
193
|
-
chain: "arbitrum:mainnet",
|
|
194
|
-
});
|
|
176
|
+
const result = await compassApiSDK.universal.supportedTokens({});
|
|
195
177
|
|
|
196
|
-
// Handle the result
|
|
197
178
|
console.log(result);
|
|
198
179
|
}
|
|
199
180
|
|
|
@@ -215,18 +196,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
215
196
|
});
|
|
216
197
|
|
|
217
198
|
async function run() {
|
|
218
|
-
const res = await universalSupportedTokens(compassApiSDK, {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
199
|
+
const res = await universalSupportedTokens(compassApiSDK, {});
|
|
200
|
+
if (res.ok) {
|
|
201
|
+
const { value: result } = res;
|
|
202
|
+
console.log(result);
|
|
203
|
+
} else {
|
|
204
|
+
console.log("universalSupportedTokens failed:", res.error);
|
|
224
205
|
}
|
|
225
|
-
|
|
226
|
-
const { value: result } = res;
|
|
227
|
-
|
|
228
|
-
// Handle the result
|
|
229
|
-
console.log(result);
|
|
230
206
|
}
|
|
231
207
|
|
|
232
208
|
run();
|
|
@@ -272,13 +248,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
272
248
|
});
|
|
273
249
|
|
|
274
250
|
async function run() {
|
|
275
|
-
const result = await compassApiSDK.universal.allowance({
|
|
276
|
-
chain: "arbitrum:mainnet",
|
|
277
|
-
token: "USDC",
|
|
278
|
-
contractName: "AaveV3Pool",
|
|
279
|
-
});
|
|
251
|
+
const result = await compassApiSDK.universal.allowance({});
|
|
280
252
|
|
|
281
|
-
// Handle the result
|
|
282
253
|
console.log(result);
|
|
283
254
|
}
|
|
284
255
|
|
|
@@ -300,20 +271,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
300
271
|
});
|
|
301
272
|
|
|
302
273
|
async function run() {
|
|
303
|
-
const res = await universalAllowance(compassApiSDK, {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
if (!res.ok) {
|
|
310
|
-
throw res.error;
|
|
274
|
+
const res = await universalAllowance(compassApiSDK, {});
|
|
275
|
+
if (res.ok) {
|
|
276
|
+
const { value: result } = res;
|
|
277
|
+
console.log(result);
|
|
278
|
+
} else {
|
|
279
|
+
console.log("universalAllowance failed:", res.error);
|
|
311
280
|
}
|
|
312
|
-
|
|
313
|
-
const { value: result } = res;
|
|
314
|
-
|
|
315
|
-
// Handle the result
|
|
316
|
-
console.log(result);
|
|
317
281
|
}
|
|
318
282
|
|
|
319
283
|
run();
|
|
@@ -356,11 +320,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
356
320
|
});
|
|
357
321
|
|
|
358
322
|
async function run() {
|
|
359
|
-
const result = await compassApiSDK.universal.ens({
|
|
360
|
-
chain: "ethereum:mainnet",
|
|
361
|
-
});
|
|
323
|
+
const result = await compassApiSDK.universal.ens({});
|
|
362
324
|
|
|
363
|
-
// Handle the result
|
|
364
325
|
console.log(result);
|
|
365
326
|
}
|
|
366
327
|
|
|
@@ -382,18 +343,13 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
382
343
|
});
|
|
383
344
|
|
|
384
345
|
async function run() {
|
|
385
|
-
const res = await universalEns(compassApiSDK, {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
346
|
+
const res = await universalEns(compassApiSDK, {});
|
|
347
|
+
if (res.ok) {
|
|
348
|
+
const { value: result } = res;
|
|
349
|
+
console.log(result);
|
|
350
|
+
} else {
|
|
351
|
+
console.log("universalEns failed:", res.error);
|
|
391
352
|
}
|
|
392
|
-
|
|
393
|
-
const { value: result } = res;
|
|
394
|
-
|
|
395
|
-
// Handle the result
|
|
396
|
-
console.log(result);
|
|
397
353
|
}
|
|
398
354
|
|
|
399
355
|
run();
|
|
@@ -440,7 +396,6 @@ async function run() {
|
|
|
440
396
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
441
397
|
});
|
|
442
398
|
|
|
443
|
-
// Handle the result
|
|
444
399
|
console.log(result);
|
|
445
400
|
}
|
|
446
401
|
|
|
@@ -467,15 +422,12 @@ async function run() {
|
|
|
467
422
|
chain: "arbitrum:mainnet",
|
|
468
423
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
469
424
|
});
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
425
|
+
if (res.ok) {
|
|
426
|
+
const { value: result } = res;
|
|
427
|
+
console.log(result);
|
|
428
|
+
} else {
|
|
429
|
+
console.log("universalWrapEth failed:", res.error);
|
|
473
430
|
}
|
|
474
|
-
|
|
475
|
-
const { value: result } = res;
|
|
476
|
-
|
|
477
|
-
// Handle the result
|
|
478
|
-
console.log(result);
|
|
479
431
|
}
|
|
480
432
|
|
|
481
433
|
run();
|
|
@@ -522,7 +474,6 @@ async function run() {
|
|
|
522
474
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
523
475
|
});
|
|
524
476
|
|
|
525
|
-
// Handle the result
|
|
526
477
|
console.log(result);
|
|
527
478
|
}
|
|
528
479
|
|
|
@@ -549,15 +500,12 @@ async function run() {
|
|
|
549
500
|
chain: "arbitrum:mainnet",
|
|
550
501
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
551
502
|
});
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
503
|
+
if (res.ok) {
|
|
504
|
+
const { value: result } = res;
|
|
505
|
+
console.log(result);
|
|
506
|
+
} else {
|
|
507
|
+
console.log("universalUnwrapWeth failed:", res.error);
|
|
555
508
|
}
|
|
556
|
-
|
|
557
|
-
const { value: result } = res;
|
|
558
|
-
|
|
559
|
-
// Handle the result
|
|
560
|
-
console.log(result);
|
|
561
509
|
}
|
|
562
510
|
|
|
563
511
|
run();
|
|
@@ -611,7 +559,6 @@ async function run() {
|
|
|
611
559
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
612
560
|
});
|
|
613
561
|
|
|
614
|
-
// Handle the result
|
|
615
562
|
console.log(result);
|
|
616
563
|
}
|
|
617
564
|
|
|
@@ -640,15 +587,12 @@ async function run() {
|
|
|
640
587
|
chain: "base:mainnet",
|
|
641
588
|
sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
642
589
|
});
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
590
|
+
if (res.ok) {
|
|
591
|
+
const { value: result } = res;
|
|
592
|
+
console.log(result);
|
|
593
|
+
} else {
|
|
594
|
+
console.log("universalAllowanceSet failed:", res.error);
|
|
646
595
|
}
|
|
647
|
-
|
|
648
|
-
const { value: result } = res;
|
|
649
|
-
|
|
650
|
-
// Handle the result
|
|
651
|
-
console.log(result);
|
|
652
596
|
}
|
|
653
597
|
|
|
654
598
|
run();
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "0.5.
|
|
65
|
-
genVersion: "2.
|
|
64
|
+
sdkVersion: "0.5.8",
|
|
65
|
+
genVersion: "2.620.2",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.5.
|
|
67
|
+
"speakeasy-sdk/typescript 0.5.8 2.620.2 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|