@compass-labs/api-sdk 0.0.3 → 0.0.5

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.
@@ -35,7 +35,10 @@ const compassApiSDK = new CompassApiSDK({
35
35
  });
36
36
 
37
37
  async function run() {
38
- const result = await compassApiSDK.morpho.vaults({});
38
+ const result = await compassApiSDK.morpho.vaults({
39
+ chain: "ethereum:mainnet",
40
+ depositToken: "<value>",
41
+ });
39
42
 
40
43
  // Handle the result
41
44
  console.log(result);
@@ -59,7 +62,10 @@ const compassApiSDK = new CompassApiSDKCore({
59
62
  });
60
63
 
61
64
  async function run() {
62
- const res = await morphoVaults(compassApiSDK, {});
65
+ const res = await morphoVaults(compassApiSDK, {
66
+ chain: "ethereum:mainnet",
67
+ depositToken: "<value>",
68
+ });
63
69
 
64
70
  if (!res.ok) {
65
71
  throw res.error;
@@ -110,6 +116,7 @@ const compassApiSDK = new CompassApiSDK({
110
116
 
111
117
  async function run() {
112
118
  const result = await compassApiSDK.morpho.vaultPosition({
119
+ chain: "ethereum:mainnet",
113
120
  userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
114
121
  vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
115
122
  });
@@ -137,6 +144,7 @@ const compassApiSDK = new CompassApiSDKCore({
137
144
 
138
145
  async function run() {
139
146
  const res = await morphoVaultPosition(compassApiSDK, {
147
+ chain: "ethereum:mainnet",
140
148
  userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
141
149
  vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
142
150
  });
@@ -191,7 +199,9 @@ const compassApiSDK = new CompassApiSDK({
191
199
  });
192
200
 
193
201
  async function run() {
194
- const result = await compassApiSDK.morpho.markets({});
202
+ const result = await compassApiSDK.morpho.markets({
203
+ chain: "ethereum:mainnet",
204
+ });
195
205
 
196
206
  // Handle the result
197
207
  console.log(result);
@@ -215,7 +225,9 @@ const compassApiSDK = new CompassApiSDKCore({
215
225
  });
216
226
 
217
227
  async function run() {
218
- const res = await morphoMarkets(compassApiSDK, {});
228
+ const res = await morphoMarkets(compassApiSDK, {
229
+ chain: "ethereum:mainnet",
230
+ });
219
231
 
220
232
  if (!res.ok) {
221
233
  throw res.error;
@@ -266,6 +278,7 @@ const compassApiSDK = new CompassApiSDK({
266
278
 
267
279
  async function run() {
268
280
  const result = await compassApiSDK.morpho.marketPosition({
281
+ chain: "ethereum:mainnet",
269
282
  userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
270
283
  uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
271
284
  });
@@ -293,6 +306,7 @@ const compassApiSDK = new CompassApiSDKCore({
293
306
 
294
307
  async function run() {
295
308
  const res = await morphoMarketPosition(compassApiSDK, {
309
+ chain: "ethereum:mainnet",
296
310
  userAddress: "0xa829B388A3DF7f581cE957a95edbe419dd146d1B",
297
311
  uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
298
312
  });
@@ -349,10 +363,10 @@ const compassApiSDK = new CompassApiSDK({
349
363
 
350
364
  async function run() {
351
365
  const result = await compassApiSDK.morpho.allowance({
352
- vaultAddress: "<value>",
366
+ vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
353
367
  amount: 1.5,
354
368
  chain: "arbitrum:mainnet",
355
- sender: "<value>",
369
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
356
370
  });
357
371
 
358
372
  // Handle the result
@@ -378,10 +392,10 @@ const compassApiSDK = new CompassApiSDKCore({
378
392
 
379
393
  async function run() {
380
394
  const res = await morphoAllowance(compassApiSDK, {
381
- vaultAddress: "<value>",
395
+ vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
382
396
  amount: 1.5,
383
397
  chain: "arbitrum:mainnet",
384
- sender: "<value>",
398
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
385
399
  });
386
400
 
387
401
  if (!res.ok) {
@@ -442,10 +456,10 @@ const compassApiSDK = new CompassApiSDK({
442
456
 
443
457
  async function run() {
444
458
  const result = await compassApiSDK.morpho.deposit({
445
- vaultAddress: "<value>",
459
+ vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
446
460
  amount: 1.5,
447
461
  chain: "arbitrum:mainnet",
448
- sender: "<value>",
462
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
449
463
  });
450
464
 
451
465
  // Handle the result
@@ -471,10 +485,10 @@ const compassApiSDK = new CompassApiSDKCore({
471
485
 
472
486
  async function run() {
473
487
  const res = await morphoDeposit(compassApiSDK, {
474
- vaultAddress: "<value>",
488
+ vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
475
489
  amount: 1.5,
476
490
  chain: "arbitrum:mainnet",
477
- sender: "<value>",
491
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
478
492
  });
479
493
 
480
494
  if (!res.ok) {
@@ -535,10 +549,10 @@ const compassApiSDK = new CompassApiSDK({
535
549
 
536
550
  async function run() {
537
551
  const result = await compassApiSDK.morpho.withdraw({
538
- vaultAddress: "<value>",
552
+ vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
539
553
  amount: "ALL",
540
554
  chain: "ethereum:mainnet",
541
- sender: "<value>",
555
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
542
556
  });
543
557
 
544
558
  // Handle the result
@@ -564,10 +578,10 @@ const compassApiSDK = new CompassApiSDKCore({
564
578
 
565
579
  async function run() {
566
580
  const res = await morphoWithdraw(compassApiSDK, {
567
- vaultAddress: "<value>",
581
+ vaultAddress: "0xbEef047a543E45807105E51A8BBEFCc5950fcfBa",
568
582
  amount: "ALL",
569
583
  chain: "ethereum:mainnet",
570
- sender: "<value>",
584
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
571
585
  });
572
586
 
573
587
  if (!res.ok) {
@@ -624,9 +638,9 @@ const compassApiSDK = new CompassApiSDK({
624
638
  async function run() {
625
639
  const result = await compassApiSDK.morpho.supplyCollateral({
626
640
  amount: 1.5,
627
- uniqueMarketKey: "<value>",
641
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
628
642
  chain: "base:mainnet",
629
- sender: "<value>",
643
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
630
644
  });
631
645
 
632
646
  // Handle the result
@@ -653,9 +667,9 @@ const compassApiSDK = new CompassApiSDKCore({
653
667
  async function run() {
654
668
  const res = await morphoSupplyCollateral(compassApiSDK, {
655
669
  amount: 1.5,
656
- uniqueMarketKey: "<value>",
670
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
657
671
  chain: "base:mainnet",
658
- sender: "<value>",
672
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
659
673
  });
660
674
 
661
675
  if (!res.ok) {
@@ -712,9 +726,9 @@ const compassApiSDK = new CompassApiSDK({
712
726
  async function run() {
713
727
  const result = await compassApiSDK.morpho.withdrawCollateral({
714
728
  amount: 1.5,
715
- uniqueMarketKey: "<value>",
729
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
716
730
  chain: "arbitrum:mainnet",
717
- sender: "<value>",
731
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
718
732
  });
719
733
 
720
734
  // Handle the result
@@ -741,9 +755,9 @@ const compassApiSDK = new CompassApiSDKCore({
741
755
  async function run() {
742
756
  const res = await morphoWithdrawCollateral(compassApiSDK, {
743
757
  amount: 1.5,
744
- uniqueMarketKey: "<value>",
758
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
745
759
  chain: "arbitrum:mainnet",
746
- sender: "<value>",
760
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
747
761
  });
748
762
 
749
763
  if (!res.ok) {
@@ -803,9 +817,9 @@ const compassApiSDK = new CompassApiSDK({
803
817
  async function run() {
804
818
  const result = await compassApiSDK.morpho.borrow({
805
819
  amount: 1.5,
806
- uniqueMarketKey: "<value>",
820
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
807
821
  chain: "ethereum:mainnet",
808
- sender: "<value>",
822
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
809
823
  });
810
824
 
811
825
  // Handle the result
@@ -832,9 +846,9 @@ const compassApiSDK = new CompassApiSDKCore({
832
846
  async function run() {
833
847
  const res = await morphoBorrow(compassApiSDK, {
834
848
  amount: 1.5,
835
- uniqueMarketKey: "<value>",
849
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
836
850
  chain: "ethereum:mainnet",
837
- sender: "<value>",
851
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
838
852
  });
839
853
 
840
854
  if (!res.ok) {
@@ -891,9 +905,9 @@ const compassApiSDK = new CompassApiSDK({
891
905
  async function run() {
892
906
  const result = await compassApiSDK.morpho.repay({
893
907
  amount: "ALL",
894
- uniqueMarketKey: "<value>",
908
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
895
909
  chain: "ethereum:mainnet",
896
- sender: "<value>",
910
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
897
911
  });
898
912
 
899
913
  // Handle the result
@@ -920,9 +934,9 @@ const compassApiSDK = new CompassApiSDKCore({
920
934
  async function run() {
921
935
  const res = await morphoRepay(compassApiSDK, {
922
936
  amount: "ALL",
923
- uniqueMarketKey: "<value>",
937
+ uniqueMarketKey: "0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4",
924
938
  chain: "ethereum:mainnet",
925
- sender: "<value>",
939
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
926
940
  });
927
941
 
928
942
  if (!res.ok) {
@@ -24,7 +24,10 @@ const compassApiSDK = new CompassApiSDK({
24
24
  });
25
25
 
26
26
  async function run() {
27
- const result = await compassApiSDK.token.address({});
27
+ const result = await compassApiSDK.token.address({
28
+ chain: "arbitrum:mainnet",
29
+ token: "WETH",
30
+ });
28
31
 
29
32
  // Handle the result
30
33
  console.log(result);
@@ -48,7 +51,10 @@ const compassApiSDK = new CompassApiSDKCore({
48
51
  });
49
52
 
50
53
  async function run() {
51
- const res = await tokenAddress(compassApiSDK, {});
54
+ const res = await tokenAddress(compassApiSDK, {
55
+ chain: "arbitrum:mainnet",
56
+ token: "WETH",
57
+ });
52
58
 
53
59
  if (!res.ok) {
54
60
  throw res.error;
@@ -266,7 +272,7 @@ async function run() {
266
272
  token: "WETH",
267
273
  to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
268
274
  chain: "base:mainnet",
269
- sender: "<value>",
275
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
270
276
  });
271
277
 
272
278
  // Handle the result
@@ -296,7 +302,7 @@ async function run() {
296
302
  token: "WETH",
297
303
  to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
298
304
  chain: "base:mainnet",
299
- sender: "<value>",
305
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
300
306
  });
301
307
 
302
308
  if (!res.ok) {
@@ -35,6 +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",
38
41
  fee: "0.01",
39
42
  amountOut: "<value>",
40
43
  });
@@ -62,6 +65,9 @@ const compassApiSDK = new CompassApiSDKCore({
62
65
 
63
66
  async function run() {
64
67
  const res = await uniswapV3QuoteBuyExactly(compassApiSDK, {
68
+ chain: "arbitrum:mainnet",
69
+ tokenIn: "USDC",
70
+ tokenOut: "USDT",
65
71
  fee: "0.01",
66
72
  amountOut: "<value>",
67
73
  });
@@ -118,6 +124,9 @@ const compassApiSDK = new CompassApiSDK({
118
124
 
119
125
  async function run() {
120
126
  const result = await compassApiSDK.uniswapV3.quoteSellExactly({
127
+ chain: "arbitrum:mainnet",
128
+ tokenIn: "USDC",
129
+ tokenOut: "USDT",
121
130
  fee: "0.01",
122
131
  amountIn: "<value>",
123
132
  });
@@ -145,6 +154,9 @@ const compassApiSDK = new CompassApiSDKCore({
145
154
 
146
155
  async function run() {
147
156
  const res = await uniswapV3QuoteSellExactly(compassApiSDK, {
157
+ chain: "arbitrum:mainnet",
158
+ tokenIn: "USDC",
159
+ tokenOut: "USDT",
148
160
  fee: "0.01",
149
161
  amountIn: "<value>",
150
162
  });
@@ -199,6 +211,7 @@ const compassApiSDK = new CompassApiSDK({
199
211
 
200
212
  async function run() {
201
213
  const result = await compassApiSDK.uniswapV3.poolPrice({
214
+ chain: "arbitrum:mainnet",
202
215
  tokenIn: "USDC",
203
216
  tokenOut: "USDT",
204
217
  fee: "0.01",
@@ -227,6 +240,7 @@ const compassApiSDK = new CompassApiSDKCore({
227
240
 
228
241
  async function run() {
229
242
  const res = await uniswapV3PoolPrice(compassApiSDK, {
243
+ chain: "arbitrum:mainnet",
230
244
  tokenIn: "USDC",
231
245
  tokenOut: "USDT",
232
246
  fee: "0.01",
@@ -287,6 +301,7 @@ const compassApiSDK = new CompassApiSDK({
287
301
 
288
302
  async function run() {
289
303
  const result = await compassApiSDK.uniswapV3.liquidityProvisionInRange({
304
+ chain: "arbitrum:mainnet",
290
305
  tokenId: 4318185,
291
306
  });
292
307
 
@@ -313,6 +328,7 @@ const compassApiSDK = new CompassApiSDKCore({
313
328
 
314
329
  async function run() {
315
330
  const res = await uniswapV3LiquidityProvisionInRange(compassApiSDK, {
331
+ chain: "arbitrum:mainnet",
316
332
  tokenId: 4318185,
317
333
  });
318
334
 
@@ -369,7 +385,9 @@ const compassApiSDK = new CompassApiSDK({
369
385
  });
370
386
 
371
387
  async function run() {
372
- const result = await compassApiSDK.uniswapV3.liquidityProvisionPositions({});
388
+ const result = await compassApiSDK.uniswapV3.liquidityProvisionPositions({
389
+ chain: "arbitrum:mainnet",
390
+ });
373
391
 
374
392
  // Handle the result
375
393
  console.log(result);
@@ -393,7 +411,9 @@ const compassApiSDK = new CompassApiSDKCore({
393
411
  });
394
412
 
395
413
  async function run() {
396
- const res = await uniswapV3LiquidityProvisionPositions(compassApiSDK, {});
414
+ const res = await uniswapV3LiquidityProvisionPositions(compassApiSDK, {
415
+ chain: "arbitrum:mainnet",
416
+ });
397
417
 
398
418
  if (!res.ok) {
399
419
  throw res.error;
@@ -455,7 +475,7 @@ async function run() {
455
475
  amountOut: 1.5,
456
476
  amountInMaximum: 1.6,
457
477
  chain: "ethereum:mainnet",
458
- sender: "<value>",
478
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
459
479
  });
460
480
 
461
481
  // Handle the result
@@ -487,7 +507,7 @@ async function run() {
487
507
  amountOut: 1.5,
488
508
  amountInMaximum: 1.6,
489
509
  chain: "ethereum:mainnet",
490
- sender: "<value>",
510
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
491
511
  });
492
512
 
493
513
  if (!res.ok) {
@@ -550,7 +570,7 @@ async function run() {
550
570
  amountIn: 1.5,
551
571
  amountOutMinimum: 1.4,
552
572
  chain: "arbitrum:mainnet",
553
- sender: "<value>",
573
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
554
574
  });
555
575
 
556
576
  // Handle the result
@@ -582,7 +602,7 @@ async function run() {
582
602
  amountIn: 1.5,
583
603
  amountOutMinimum: 1.4,
584
604
  chain: "arbitrum:mainnet",
585
- sender: "<value>",
605
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
586
606
  });
587
607
 
588
608
  if (!res.ok) {
@@ -647,7 +667,7 @@ async function run() {
647
667
  amount0Min: "1.4",
648
668
  amount1Min: "1.6",
649
669
  chain: "arbitrum:mainnet",
650
- sender: "<value>",
670
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
651
671
  });
652
672
 
653
673
  // Handle the result
@@ -679,7 +699,7 @@ async function run() {
679
699
  amount0Min: "1.4",
680
700
  amount1Min: "1.6",
681
701
  chain: "arbitrum:mainnet",
682
- sender: "<value>",
702
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
683
703
  });
684
704
 
685
705
  if (!res.ok) {
@@ -749,7 +769,7 @@ async function run() {
749
769
  amount1Min: "1.6",
750
770
  recipient: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
751
771
  chain: "base:mainnet",
752
- sender: "<value>",
772
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
753
773
  });
754
774
 
755
775
  // Handle the result
@@ -786,7 +806,7 @@ async function run() {
786
806
  amount1Min: "1.6",
787
807
  recipient: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
788
808
  chain: "base:mainnet",
789
- sender: "<value>",
809
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
790
810
  });
791
811
 
792
812
  if (!res.ok) {
@@ -849,7 +869,7 @@ async function run() {
849
869
  tokenId: 486084,
850
870
  percentageForWithdrawal: "50",
851
871
  chain: "ethereum:mainnet",
852
- sender: "<value>",
872
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
853
873
  });
854
874
 
855
875
  // Handle the result
@@ -878,7 +898,7 @@ async function run() {
878
898
  tokenId: 486084,
879
899
  percentageForWithdrawal: "50",
880
900
  chain: "ethereum:mainnet",
881
- sender: "<value>",
901
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
882
902
  });
883
903
 
884
904
  if (!res.ok) {
@@ -35,7 +35,9 @@ const compassApiSDK = new CompassApiSDK({
35
35
  });
36
36
 
37
37
  async function run() {
38
- const result = await compassApiSDK.universal.portfolio({});
38
+ const result = await compassApiSDK.universal.portfolio({
39
+ chain: "arbitrum:mainnet",
40
+ });
39
41
 
40
42
  // Handle the result
41
43
  console.log(result);
@@ -59,7 +61,9 @@ const compassApiSDK = new CompassApiSDKCore({
59
61
  });
60
62
 
61
63
  async function run() {
62
- const res = await universalPortfolio(compassApiSDK, {});
64
+ const res = await universalPortfolio(compassApiSDK, {
65
+ chain: "arbitrum:mainnet",
66
+ });
63
67
 
64
68
  if (!res.ok) {
65
69
  throw res.error;
@@ -112,7 +116,9 @@ const compassApiSDK = new CompassApiSDK({
112
116
  });
113
117
 
114
118
  async function run() {
115
- const result = await compassApiSDK.universal.visualizePortfolio({});
119
+ const result = await compassApiSDK.universal.visualizePortfolio({
120
+ chain: "arbitrum:mainnet",
121
+ });
116
122
 
117
123
  // Handle the result
118
124
  console.log(result);
@@ -136,7 +142,9 @@ const compassApiSDK = new CompassApiSDKCore({
136
142
  });
137
143
 
138
144
  async function run() {
139
- const res = await universalVisualizePortfolio(compassApiSDK, {});
145
+ const res = await universalVisualizePortfolio(compassApiSDK, {
146
+ chain: "arbitrum:mainnet",
147
+ });
140
148
 
141
149
  if (!res.ok) {
142
150
  throw res.error;
@@ -190,7 +198,10 @@ const compassApiSDK = new CompassApiSDK({
190
198
  });
191
199
 
192
200
  async function run() {
193
- const result = await compassApiSDK.universal.priceUsd({});
201
+ const result = await compassApiSDK.universal.priceUsd({
202
+ chain: "arbitrum:mainnet",
203
+ token: "WBTC",
204
+ });
194
205
 
195
206
  // Handle the result
196
207
  console.log(result);
@@ -214,7 +225,10 @@ const compassApiSDK = new CompassApiSDKCore({
214
225
  });
215
226
 
216
227
  async function run() {
217
- const res = await universalPriceUsd(compassApiSDK, {});
228
+ const res = await universalPriceUsd(compassApiSDK, {
229
+ chain: "arbitrum:mainnet",
230
+ token: "WBTC",
231
+ });
218
232
 
219
233
  if (!res.ok) {
220
234
  throw res.error;
@@ -263,7 +277,9 @@ const compassApiSDK = new CompassApiSDK({
263
277
  });
264
278
 
265
279
  async function run() {
266
- const result = await compassApiSDK.universal.supportedTokens({});
280
+ const result = await compassApiSDK.universal.supportedTokens({
281
+ chain: "arbitrum:mainnet",
282
+ });
267
283
 
268
284
  // Handle the result
269
285
  console.log(result);
@@ -287,7 +303,9 @@ const compassApiSDK = new CompassApiSDKCore({
287
303
  });
288
304
 
289
305
  async function run() {
290
- const res = await universalSupportedTokens(compassApiSDK, {});
306
+ const res = await universalSupportedTokens(compassApiSDK, {
307
+ chain: "arbitrum:mainnet",
308
+ });
291
309
 
292
310
  if (!res.ok) {
293
311
  throw res.error;
@@ -336,7 +354,10 @@ const compassApiSDK = new CompassApiSDK({
336
354
  });
337
355
 
338
356
  async function run() {
339
- const result = await compassApiSDK.universal.balance({});
357
+ const result = await compassApiSDK.universal.balance({
358
+ chain: "arbitrum:mainnet",
359
+ token: "USDC",
360
+ });
340
361
 
341
362
  // Handle the result
342
363
  console.log(result);
@@ -360,7 +381,10 @@ const compassApiSDK = new CompassApiSDKCore({
360
381
  });
361
382
 
362
383
  async function run() {
363
- const res = await universalBalance(compassApiSDK, {});
384
+ const res = await universalBalance(compassApiSDK, {
385
+ chain: "arbitrum:mainnet",
386
+ token: "USDC",
387
+ });
364
388
 
365
389
  if (!res.ok) {
366
390
  throw res.error;
@@ -416,6 +440,8 @@ const compassApiSDK = new CompassApiSDK({
416
440
 
417
441
  async function run() {
418
442
  const result = await compassApiSDK.universal.allowance({
443
+ chain: "arbitrum:mainnet",
444
+ token: "USDC",
419
445
  contractName: "AaveV3Pool",
420
446
  });
421
447
 
@@ -442,6 +468,8 @@ const compassApiSDK = new CompassApiSDKCore({
442
468
 
443
469
  async function run() {
444
470
  const res = await universalAllowance(compassApiSDK, {
471
+ chain: "arbitrum:mainnet",
472
+ token: "USDC",
445
473
  contractName: "AaveV3Pool",
446
474
  });
447
475
 
@@ -495,7 +523,9 @@ const compassApiSDK = new CompassApiSDK({
495
523
  });
496
524
 
497
525
  async function run() {
498
- const result = await compassApiSDK.universal.ens({});
526
+ const result = await compassApiSDK.universal.ens({
527
+ chain: "ethereum:mainnet",
528
+ });
499
529
 
500
530
  // Handle the result
501
531
  console.log(result);
@@ -519,7 +549,9 @@ const compassApiSDK = new CompassApiSDKCore({
519
549
  });
520
550
 
521
551
  async function run() {
522
- const res = await universalEns(compassApiSDK, {});
552
+ const res = await universalEns(compassApiSDK, {
553
+ chain: "ethereum:mainnet",
554
+ });
523
555
 
524
556
  if (!res.ok) {
525
557
  throw res.error;
@@ -572,7 +604,7 @@ async function run() {
572
604
  const result = await compassApiSDK.universal.wrapEth({
573
605
  amount: 1.5,
574
606
  chain: "base:mainnet",
575
- sender: "<value>",
607
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
576
608
  });
577
609
 
578
610
  // Handle the result
@@ -600,7 +632,7 @@ async function run() {
600
632
  const res = await universalWrapEth(compassApiSDK, {
601
633
  amount: 1.5,
602
634
  chain: "base:mainnet",
603
- sender: "<value>",
635
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
604
636
  });
605
637
 
606
638
  if (!res.ok) {
@@ -654,7 +686,7 @@ async function run() {
654
686
  const result = await compassApiSDK.universal.unwrapWeth({
655
687
  amount: 1.5,
656
688
  chain: "arbitrum:mainnet",
657
- sender: "<value>",
689
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
658
690
  });
659
691
 
660
692
  // Handle the result
@@ -682,7 +714,7 @@ async function run() {
682
714
  const res = await universalUnwrapWeth(compassApiSDK, {
683
715
  amount: 1.5,
684
716
  chain: "arbitrum:mainnet",
685
- sender: "<value>",
717
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
686
718
  });
687
719
 
688
720
  if (!res.ok) {
@@ -737,7 +769,7 @@ async function run() {
737
769
  token: "osETH",
738
770
  to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
739
771
  chain: "base:mainnet",
740
- sender: "<value>",
772
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
741
773
  });
742
774
 
743
775
  // Handle the result
@@ -767,7 +799,7 @@ async function run() {
767
799
  token: "osETH",
768
800
  to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
769
801
  chain: "base:mainnet",
770
- sender: "<value>",
802
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
771
803
  });
772
804
 
773
805
  if (!res.ok) {
@@ -821,7 +853,7 @@ async function run() {
821
853
  amount: 1.5,
822
854
  to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
823
855
  chain: "arbitrum:mainnet",
824
- sender: "<value>",
856
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
825
857
  });
826
858
 
827
859
  // Handle the result
@@ -850,7 +882,7 @@ async function run() {
850
882
  amount: 1.5,
851
883
  to: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc44",
852
884
  chain: "arbitrum:mainnet",
853
- sender: "<value>",
885
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
854
886
  });
855
887
 
856
888
  if (!res.ok) {
@@ -911,7 +943,7 @@ async function run() {
911
943
  contractName: "AaveV3Pool",
912
944
  amount: 1.5,
913
945
  chain: "ethereum:mainnet",
914
- sender: "<value>",
946
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
915
947
  });
916
948
 
917
949
  // Handle the result
@@ -941,7 +973,7 @@ async function run() {
941
973
  contractName: "AaveV3Pool",
942
974
  amount: 1.5,
943
975
  chain: "ethereum:mainnet",
944
- sender: "<value>",
976
+ sender: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
945
977
  });
946
978
 
947
979
  if (!res.ok) {