@tokemak/graph-cli 0.0.5 → 0.0.7

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/dist/index.js CHANGED
@@ -28,11 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // index.ts
31
- var graph_cli_exports = {};
32
- __export(graph_cli_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  getSdkByChainId: () => getSdkByChainId
34
34
  });
35
- module.exports = __toCommonJS(graph_cli_exports);
35
+ module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // clients.ts
38
38
  var import_graphql_request = require("graphql-request");
@@ -382,12 +382,13 @@ var GetUserActivityDocument = import_graphql_tag.default`
382
382
  }
383
383
  `;
384
384
  var GetUserBalanceChangeHistoryDocument = import_graphql_tag.default`
385
- query GetUserBalanceChangeHistory($userAddress: Bytes!) {
385
+ query GetUserBalanceChangeHistory($userAddress: Bytes!, $first: Int!, $skip: Int!, $vaultAddress: Bytes) {
386
386
  userAutopoolBalanceChanges(
387
- where: {walletAddress: $userAddress}
387
+ where: {walletAddress: $userAddress, vaultAddress: $vaultAddress}
388
388
  orderBy: timestamp
389
389
  orderDirection: asc
390
- first: 1000
390
+ first: $first
391
+ skip: $skip
391
392
  ) {
392
393
  vaultAddress
393
394
  timestamp
@@ -887,12 +888,13 @@ var GetUserActivityDocument2 = import_graphql_tag2.default`
887
888
  }
888
889
  `;
889
890
  var GetUserBalanceChangeHistoryDocument2 = import_graphql_tag2.default`
890
- query GetUserBalanceChangeHistory($userAddress: Bytes!) {
891
+ query GetUserBalanceChangeHistory($userAddress: Bytes!, $first: Int!, $skip: Int!, $vaultAddress: Bytes) {
891
892
  userAutopoolBalanceChanges(
892
- where: {walletAddress: $userAddress}
893
+ where: {walletAddress: $userAddress, vaultAddress: $vaultAddress}
893
894
  orderBy: timestamp
894
895
  orderDirection: asc
895
- first: 1000
896
+ first: $first
897
+ skip: $skip
896
898
  ) {
897
899
  vaultAddress
898
900
  timestamp
@@ -1392,12 +1394,13 @@ var GetUserActivityDocument3 = import_graphql_tag3.default`
1392
1394
  }
1393
1395
  `;
1394
1396
  var GetUserBalanceChangeHistoryDocument3 = import_graphql_tag3.default`
1395
- query GetUserBalanceChangeHistory($userAddress: Bytes!) {
1397
+ query GetUserBalanceChangeHistory($userAddress: Bytes!, $first: Int!, $skip: Int!, $vaultAddress: Bytes) {
1396
1398
  userAutopoolBalanceChanges(
1397
- where: {walletAddress: $userAddress}
1399
+ where: {walletAddress: $userAddress, vaultAddress: $vaultAddress}
1398
1400
  orderBy: timestamp
1399
1401
  orderDirection: asc
1400
- first: 1000
1402
+ first: $first
1403
+ skip: $skip
1401
1404
  ) {
1402
1405
  vaultAddress
1403
1406
  timestamp
@@ -1897,12 +1900,13 @@ var GetUserActivityDocument4 = import_graphql_tag4.default`
1897
1900
  }
1898
1901
  `;
1899
1902
  var GetUserBalanceChangeHistoryDocument4 = import_graphql_tag4.default`
1900
- query GetUserBalanceChangeHistory($userAddress: Bytes!) {
1903
+ query GetUserBalanceChangeHistory($userAddress: Bytes!, $first: Int!, $skip: Int!, $vaultAddress: Bytes) {
1901
1904
  userAutopoolBalanceChanges(
1902
- where: {walletAddress: $userAddress}
1905
+ where: {walletAddress: $userAddress, vaultAddress: $vaultAddress}
1903
1906
  orderBy: timestamp
1904
1907
  orderDirection: asc
1905
- first: 1000
1908
+ first: $first
1909
+ skip: $skip
1906
1910
  ) {
1907
1911
  vaultAddress
1908
1912
  timestamp
@@ -2058,10 +2062,7 @@ function getSdk4(client, withWrapper = defaultWrapper4) {
2058
2062
  };
2059
2063
  }
2060
2064
 
2061
- // clients.ts
2062
- var import_config = require("@tokemak/config");
2063
-
2064
- // generated/arbitrum.ts
2065
+ // generated/linea.ts
2065
2066
  var import_graphql_tag5 = __toESM(require("graphql-tag"));
2066
2067
  var GetAllAutopoolRebalancesDocument5 = import_graphql_tag5.default`
2067
2068
  query GetAllAutopoolRebalances($first: Int = 1000, $skip: Int = 0) {
@@ -2405,12 +2406,13 @@ var GetUserActivityDocument5 = import_graphql_tag5.default`
2405
2406
  }
2406
2407
  `;
2407
2408
  var GetUserBalanceChangeHistoryDocument5 = import_graphql_tag5.default`
2408
- query GetUserBalanceChangeHistory($userAddress: Bytes!) {
2409
+ query GetUserBalanceChangeHistory($userAddress: Bytes!, $first: Int!, $skip: Int!, $vaultAddress: Bytes) {
2409
2410
  userAutopoolBalanceChanges(
2410
- where: {walletAddress: $userAddress}
2411
+ where: {walletAddress: $userAddress, vaultAddress: $vaultAddress}
2411
2412
  orderBy: timestamp
2412
2413
  orderDirection: asc
2413
- first: 1000
2414
+ first: $first
2415
+ skip: $skip
2414
2416
  ) {
2415
2417
  vaultAddress
2416
2418
  timestamp
@@ -2567,26 +2569,559 @@ function getSdk5(client, withWrapper = defaultWrapper5) {
2567
2569
  }
2568
2570
 
2569
2571
  // clients.ts
2570
- var endpoints = {
2571
- [import_chains.mainnet.id]: import_config.coreMainnetConfig.subgraphEndpoint,
2572
- [import_chains.base.id]: import_config.coreBaseConfig.subgraphEndpoint,
2573
- [import_chains.sonic.id]: import_config.coreSonicConfig.subgraphEndpoint,
2574
- [import_chains.plasma.id]: import_config.corePlasmaConfig.subgraphEndpoint,
2575
- [import_chains.arbitrum.id]: import_config.coreArbitrumConfig.subgraphEndpoint
2572
+ var import_config = require("@tokemak/config");
2573
+
2574
+ // generated/arbitrum.ts
2575
+ var import_graphql_tag6 = __toESM(require("graphql-tag"));
2576
+ var GetAllAutopoolRebalancesDocument6 = import_graphql_tag6.default`
2577
+ query GetAllAutopoolRebalances($first: Int = 1000, $skip: Int = 0) {
2578
+ autopoolRebalances(
2579
+ orderBy: timestamp
2580
+ orderDirection: desc
2581
+ first: $first
2582
+ skip: $skip
2583
+ ) {
2584
+ autopool
2585
+ timestamp
2586
+ blockNumber
2587
+ tokenOut {
2588
+ id
2589
+ symbol
2590
+ decimals
2591
+ }
2592
+ tokenOutValueInEth
2593
+ tokenOutValueBaseAsset
2594
+ }
2595
+ }
2596
+ `;
2597
+ var GetAutopoolDayDataDocument6 = import_graphql_tag6.default`
2598
+ query GetAutopoolDayData($address: String!, $timestamp: BigInt!) {
2599
+ autopoolDayDatas(
2600
+ where: {id_contains_nocase: $address, timestamp_gte: $timestamp}
2601
+ orderBy: timestamp
2602
+ orderDirection: asc
2603
+ first: 1000
2604
+ ) {
2605
+ totalSupply
2606
+ nav
2607
+ date
2608
+ timestamp
2609
+ id
2610
+ baseAsset {
2611
+ id
2612
+ decimals
2613
+ }
2614
+ autopoolApy
2615
+ autopoolDay7MAApy
2616
+ autopoolDay30MAApy
2617
+ rewarderApy
2618
+ rewarderDay7MAApy
2619
+ rewarderDay30MAApy
2620
+ }
2621
+ }
2622
+ `;
2623
+ var GetAutopoolRebalancesDocument6 = import_graphql_tag6.default`
2624
+ query GetAutopoolRebalances($address: Bytes!, $first: Int! = 1000, $skip: Int! = 0) {
2625
+ autopoolRebalances(
2626
+ where: {autopool: $address}
2627
+ orderBy: timestamp
2628
+ orderDirection: desc
2629
+ first: $first
2630
+ skip: $skip
2631
+ ) {
2632
+ autopool
2633
+ timestamp
2634
+ logIndex
2635
+ transactionHash
2636
+ blockNumber
2637
+ tokenOut {
2638
+ id
2639
+ symbol
2640
+ }
2641
+ tokenOutAmount
2642
+ tokenOutValueInEth
2643
+ tokenOutValueBaseAsset
2644
+ tokenOutValueDenominatedIn
2645
+ tokenIn {
2646
+ id
2647
+ symbol
2648
+ }
2649
+ tokenInAmount
2650
+ tokenInValueInEth
2651
+ tokenInValueBaseAsset
2652
+ tokenInValueDenominatedIn
2653
+ destinationOutName
2654
+ destinationOutAddress
2655
+ destinationOutExchangeName
2656
+ destinationOutUnderlyingTokens {
2657
+ id
2658
+ symbol
2659
+ }
2660
+ destinationInName
2661
+ destinationInAddress
2662
+ destinationInExchangeName
2663
+ destinationInUnderlyingTokens {
2664
+ id
2665
+ symbol
2666
+ }
2667
+ }
2668
+ }
2669
+ `;
2670
+ var GetAutopoolsAprDocument6 = import_graphql_tag6.default`
2671
+ query GetAutopoolsApr {
2672
+ autopools(where: {registered: true}) {
2673
+ id
2674
+ rewarder {
2675
+ id
2676
+ currentApy
2677
+ day7MAApy
2678
+ day30MAApy
2679
+ currentRewardDuration
2680
+ currentRewardAmount
2681
+ extraRewarders {
2682
+ id
2683
+ currentApy
2684
+ rewardToken {
2685
+ symbol
2686
+ id
2687
+ }
2688
+ }
2689
+ }
2690
+ currentApy
2691
+ day7MAApy
2692
+ day30MAApy
2693
+ denominatedIn {
2694
+ id
2695
+ decimals
2696
+ symbol
2697
+ }
2698
+ }
2699
+ }
2700
+ `;
2701
+ var GetAutopoolsDayDataDocument6 = import_graphql_tag6.default`
2702
+ query GetAutopoolsDayData($timestamp: BigInt!, $first: Int = 1000, $skip: Int = 0) {
2703
+ autopoolDayDatas(
2704
+ where: {timestamp_gte: $timestamp}
2705
+ orderBy: timestamp
2706
+ orderDirection: asc
2707
+ first: $first
2708
+ skip: $skip
2709
+ ) {
2710
+ totalSupply
2711
+ nav
2712
+ date
2713
+ timestamp
2714
+ id
2715
+ }
2716
+ }
2717
+ `;
2718
+ var GetAutopoolsInactiveDestinationsDocument6 = import_graphql_tag6.default`
2719
+ query GetAutopoolsInactiveDestinations {
2720
+ autopools {
2721
+ id
2722
+ inactiveDestinations {
2723
+ vaultAddress
2724
+ exchangeName
2725
+ totalSupply
2726
+ debtValueHeldByVault
2727
+ lastSnapshotTimestamp
2728
+ dexPool
2729
+ lpTokenAddress
2730
+ lpTokenSymbol
2731
+ lpTokenName
2732
+ compositeReturn
2733
+ underlyingTokens {
2734
+ tokenAddress
2735
+ }
2736
+ underlyingTokenSymbols {
2737
+ symbol
2738
+ }
2739
+ underlyingTokenValueHeld {
2740
+ valueHeldInEth
2741
+ }
2742
+ reservesInEth
2743
+ }
2744
+ }
2745
+ }
2746
+ `;
2747
+ var GetAutopoolsRebalancesDocument6 = import_graphql_tag6.default`
2748
+ query GetAutopoolsRebalances {
2749
+ autopools(where: {registered: true}) {
2750
+ id
2751
+ rebalances(orderBy: timestamp, orderDirection: desc) {
2752
+ autopool
2753
+ blockNumber
2754
+ hash
2755
+ id
2756
+ ix
2757
+ autopool
2758
+ timestamp
2759
+ outData {
2760
+ id
2761
+ exchangeName
2762
+ ethValue
2763
+ destination
2764
+ underlyer {
2765
+ decimals
2766
+ id
2767
+ name
2768
+ symbol
2769
+ }
2770
+ tokens {
2771
+ decimals
2772
+ id
2773
+ name
2774
+ symbol
2775
+ }
2776
+ }
2777
+ inData {
2778
+ ethValue
2779
+ exchangeName
2780
+ id
2781
+ destination
2782
+ underlyer {
2783
+ decimals
2784
+ id
2785
+ name
2786
+ symbol
2787
+ }
2788
+ tokens {
2789
+ decimals
2790
+ id
2791
+ name
2792
+ symbol
2793
+ }
2794
+ }
2795
+ }
2796
+ }
2797
+ }
2798
+ `;
2799
+ var GetLatestSubgraphTimestampDocument6 = import_graphql_tag6.default`
2800
+ query GetLatestSubgraphTimestamp {
2801
+ _meta {
2802
+ block {
2803
+ timestamp
2804
+ }
2805
+ }
2806
+ }
2807
+ `;
2808
+ var GetMutlipleAutopoolRebalancesDocument6 = import_graphql_tag6.default`
2809
+ query GetMutlipleAutopoolRebalances($addresses: [Bytes!]!) {
2810
+ autopools(where: {id_in: $addresses}) {
2811
+ id
2812
+ rebalances(orderBy: timestamp, orderDirection: desc) {
2813
+ autopool
2814
+ blockNumber
2815
+ hash
2816
+ id
2817
+ ix
2818
+ autopool
2819
+ timestamp
2820
+ outData {
2821
+ id
2822
+ exchangeName
2823
+ ethValue
2824
+ destination
2825
+ underlyer {
2826
+ decimals
2827
+ id
2828
+ name
2829
+ symbol
2830
+ }
2831
+ tokens {
2832
+ decimals
2833
+ id
2834
+ name
2835
+ symbol
2836
+ }
2837
+ }
2838
+ inData {
2839
+ ethValue
2840
+ exchangeName
2841
+ id
2842
+ destination
2843
+ underlyer {
2844
+ decimals
2845
+ id
2846
+ name
2847
+ symbol
2848
+ }
2849
+ tokens {
2850
+ decimals
2851
+ id
2852
+ name
2853
+ symbol
2854
+ }
2855
+ }
2856
+ }
2857
+ }
2858
+ }
2859
+ `;
2860
+ var GetSTokeRewardsDocument6 = import_graphql_tag6.default`
2861
+ query GetSTokeRewards($first: Int = 1000, $skip: Int = 0) {
2862
+ poolRewardsBalances {
2863
+ id
2864
+ balance
2865
+ balanceUSD
2866
+ currentAprPerCredit
2867
+ }
2868
+ poolRewardsBalanceDayDatas(first: $first, skip: $skip) {
2869
+ id
2870
+ earned
2871
+ earnedUSD
2872
+ balance
2873
+ balanceUSD
2874
+ dayAprPerCredit
2875
+ timestamp
2876
+ }
2877
+ }
2878
+ `;
2879
+ var GetSTokeVotesDocument6 = import_graphql_tag6.default`
2880
+ query GetSTokeVotes {
2881
+ voteStatuses(where: {id: "global"}) {
2882
+ id
2883
+ pools
2884
+ points
2885
+ }
2886
+ accTokeVoteWeights(where: {id: "global"}) {
2887
+ id
2888
+ voted
2889
+ notVoted
2890
+ }
2891
+ }
2892
+ `;
2893
+ var GetTopAutopoolHoldersDocument6 = import_graphql_tag6.default`
2894
+ query GetTopAutopoolHolders($address: Bytes) {
2895
+ holders(
2896
+ orderBy: sharesHeld
2897
+ orderDirection: desc
2898
+ where: {autoPool: $address}
2899
+ first: 100
2900
+ ) {
2901
+ sharesHeld
2902
+ user
2903
+ lastUpdated
2904
+ }
2905
+ }
2906
+ `;
2907
+ var GetUserActivityDocument6 = import_graphql_tag6.default`
2908
+ query GetUserActivity($address: Bytes!) {
2909
+ userActivities(where: {user: $address}, first: 1000) {
2910
+ id
2911
+ timestamp
2912
+ type
2913
+ data
2914
+ }
2915
+ }
2916
+ `;
2917
+ var GetUserBalanceChangeHistoryDocument6 = import_graphql_tag6.default`
2918
+ query GetUserBalanceChangeHistory($userAddress: Bytes!, $first: Int!, $skip: Int!, $vaultAddress: Bytes) {
2919
+ userAutopoolBalanceChanges(
2920
+ where: {walletAddress: $userAddress, vaultAddress: $vaultAddress}
2921
+ orderBy: timestamp
2922
+ orderDirection: asc
2923
+ first: $first
2924
+ skip: $skip
2925
+ ) {
2926
+ vaultAddress
2927
+ timestamp
2928
+ items {
2929
+ shareChange
2930
+ assetChange
2931
+ staked
2932
+ }
2933
+ }
2934
+ }
2935
+ `;
2936
+ var GetUserSTokeBalanceDocument6 = import_graphql_tag6.default`
2937
+ query GetUserSTokeBalance($address: ID!) {
2938
+ accountBalanceV1S(where: {id: $address}) {
2939
+ id
2940
+ amount
2941
+ points
2942
+ cycleStartPoints
2943
+ cycleStartBalance
2944
+ cycleStartBalanceIndex
2945
+ }
2946
+ }
2947
+ `;
2948
+ var GetUserSTokeVotesDocument6 = import_graphql_tag6.default`
2949
+ query GetUserSTokeVotes($address: ID!) {
2950
+ userVotes(where: {id: $address}) {
2951
+ id
2952
+ weights
2953
+ pools
2954
+ }
2955
+ accountBalanceV1S(where: {id: $address}) {
2956
+ id
2957
+ amount
2958
+ points
2959
+ cycleStartPoints
2960
+ cycleStartBalance
2961
+ cycleStartBalanceIndex
2962
+ }
2963
+ }
2964
+ `;
2965
+ var GetUserVaultInfoDocument6 = import_graphql_tag6.default`
2966
+ query GetUserVaultInfo($address: ID!) {
2967
+ userInfo(id: $address) {
2968
+ vaults {
2969
+ vaultAddress
2970
+ totalShares
2971
+ walletShares
2972
+ stakedShares
2973
+ rewardsClaimed
2974
+ }
2975
+ }
2976
+ }
2977
+ `;
2978
+ var GetUserVaultsDayDataDocument6 = import_graphql_tag6.default`
2979
+ query GetUserVaultsDayData($address: Bytes!, $timestamp: BigInt!) {
2980
+ userVaultDayDatas(
2981
+ where: {walletAddress: $address, timestamp_gte: $timestamp}
2982
+ orderBy: timestamp
2983
+ orderDirection: asc
2984
+ ) {
2985
+ date
2986
+ vaultAddress
2987
+ totalShares
2988
+ rewardsClaimed
2989
+ timestamp
2990
+ }
2991
+ }
2992
+ `;
2993
+ var GetVaultAddedsDocument6 = import_graphql_tag6.default`
2994
+ query GetVaultAddeds {
2995
+ vaultAddeds {
2996
+ vault
2997
+ blockTimestamp
2998
+ }
2999
+ }
3000
+ `;
3001
+ var GetTokenValueDayDatasDocument6 = import_graphql_tag6.default`
3002
+ query GetTokenValueDayDatas($tokenAddress: String!) {
3003
+ tokenValueDayDatas(
3004
+ where: {id_contains_nocase: $tokenAddress}
3005
+ orderBy: lastSnapshotTimestamp
3006
+ orderDirection: asc
3007
+ first: 1000
3008
+ ) {
3009
+ lastSnapshotTimestamp
3010
+ priceInUsd
3011
+ }
3012
+ }
3013
+ `;
3014
+ var defaultWrapper6 = (action, _operationName, _operationType, _variables) => action();
3015
+ function getSdk6(client, withWrapper = defaultWrapper6) {
3016
+ return {
3017
+ GetAllAutopoolRebalances(variables, requestHeaders) {
3018
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAllAutopoolRebalancesDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAllAutopoolRebalances", "query", variables);
3019
+ },
3020
+ GetAutopoolDayData(variables, requestHeaders) {
3021
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAutopoolDayDataDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAutopoolDayData", "query", variables);
3022
+ },
3023
+ GetAutopoolRebalances(variables, requestHeaders) {
3024
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAutopoolRebalancesDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAutopoolRebalances", "query", variables);
3025
+ },
3026
+ GetAutopoolsApr(variables, requestHeaders) {
3027
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAutopoolsAprDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAutopoolsApr", "query", variables);
3028
+ },
3029
+ GetAutopoolsDayData(variables, requestHeaders) {
3030
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAutopoolsDayDataDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAutopoolsDayData", "query", variables);
3031
+ },
3032
+ GetAutopoolsInactiveDestinations(variables, requestHeaders) {
3033
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAutopoolsInactiveDestinationsDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAutopoolsInactiveDestinations", "query", variables);
3034
+ },
3035
+ GetAutopoolsRebalances(variables, requestHeaders) {
3036
+ return withWrapper((wrappedRequestHeaders) => client.request(GetAutopoolsRebalancesDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetAutopoolsRebalances", "query", variables);
3037
+ },
3038
+ GetLatestSubgraphTimestamp(variables, requestHeaders) {
3039
+ return withWrapper((wrappedRequestHeaders) => client.request(GetLatestSubgraphTimestampDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetLatestSubgraphTimestamp", "query", variables);
3040
+ },
3041
+ GetMutlipleAutopoolRebalances(variables, requestHeaders) {
3042
+ return withWrapper((wrappedRequestHeaders) => client.request(GetMutlipleAutopoolRebalancesDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetMutlipleAutopoolRebalances", "query", variables);
3043
+ },
3044
+ GetSTokeRewards(variables, requestHeaders) {
3045
+ return withWrapper((wrappedRequestHeaders) => client.request(GetSTokeRewardsDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetSTokeRewards", "query", variables);
3046
+ },
3047
+ GetSTokeVotes(variables, requestHeaders) {
3048
+ return withWrapper((wrappedRequestHeaders) => client.request(GetSTokeVotesDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetSTokeVotes", "query", variables);
3049
+ },
3050
+ GetTopAutopoolHolders(variables, requestHeaders) {
3051
+ return withWrapper((wrappedRequestHeaders) => client.request(GetTopAutopoolHoldersDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetTopAutopoolHolders", "query", variables);
3052
+ },
3053
+ GetUserActivity(variables, requestHeaders) {
3054
+ return withWrapper((wrappedRequestHeaders) => client.request(GetUserActivityDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetUserActivity", "query", variables);
3055
+ },
3056
+ GetUserBalanceChangeHistory(variables, requestHeaders) {
3057
+ return withWrapper((wrappedRequestHeaders) => client.request(GetUserBalanceChangeHistoryDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetUserBalanceChangeHistory", "query", variables);
3058
+ },
3059
+ GetUserSTokeBalance(variables, requestHeaders) {
3060
+ return withWrapper((wrappedRequestHeaders) => client.request(GetUserSTokeBalanceDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetUserSTokeBalance", "query", variables);
3061
+ },
3062
+ GetUserSTokeVotes(variables, requestHeaders) {
3063
+ return withWrapper((wrappedRequestHeaders) => client.request(GetUserSTokeVotesDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetUserSTokeVotes", "query", variables);
3064
+ },
3065
+ GetUserVaultInfo(variables, requestHeaders) {
3066
+ return withWrapper((wrappedRequestHeaders) => client.request(GetUserVaultInfoDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetUserVaultInfo", "query", variables);
3067
+ },
3068
+ GetUserVaultsDayData(variables, requestHeaders) {
3069
+ return withWrapper((wrappedRequestHeaders) => client.request(GetUserVaultsDayDataDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetUserVaultsDayData", "query", variables);
3070
+ },
3071
+ GetVaultAddeds(variables, requestHeaders) {
3072
+ return withWrapper((wrappedRequestHeaders) => client.request(GetVaultAddedsDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetVaultAddeds", "query", variables);
3073
+ },
3074
+ GetTokenValueDayDatas(variables, requestHeaders) {
3075
+ return withWrapper((wrappedRequestHeaders) => client.request(GetTokenValueDayDatasDocument6, variables, { ...requestHeaders, ...wrappedRequestHeaders }), "GetTokenValueDayDatas", "query", variables);
3076
+ }
3077
+ };
3078
+ }
3079
+
3080
+ // clients.ts
3081
+ var getEndpoint = (chainId) => {
3082
+ let config;
3083
+ switch (chainId) {
3084
+ case import_chains.mainnet.id:
3085
+ config = import_config.coreMainnetConfig;
3086
+ break;
3087
+ case import_chains.base.id:
3088
+ config = import_config.coreBaseConfig;
3089
+ break;
3090
+ case import_chains.sonic.id:
3091
+ config = import_config.coreSonicConfig;
3092
+ break;
3093
+ case import_chains.plasma.id:
3094
+ config = import_config.corePlasmaConfig;
3095
+ break;
3096
+ case import_chains.arbitrum.id:
3097
+ config = import_config.coreArbitrumConfig;
3098
+ break;
3099
+ case import_chains.linea.id:
3100
+ config = import_config.coreLineaConfig;
3101
+ break;
3102
+ default:
3103
+ throw new Error(`Unsupported chainId: ${chainId}`);
3104
+ }
3105
+ if (!config) {
3106
+ throw new Error(
3107
+ `Config for chainId ${chainId} is undefined. Make sure @tokemak/config is properly installed and built.`
3108
+ );
3109
+ }
3110
+ if (!config.subgraphEndpoint) {
3111
+ throw new Error(
3112
+ `subgraphEndpoint is undefined for chainId ${chainId}. Make sure @tokemak/config is properly configured.`
3113
+ );
3114
+ }
3115
+ return config.subgraphEndpoint;
2576
3116
  };
2577
3117
  var getSdkByChainId = (chainId) => {
2578
- const url = endpoints[chainId];
2579
- if (!url)
2580
- throw new Error(`Unsupported chainId: ${chainId}`);
3118
+ const url = getEndpoint(chainId);
2581
3119
  const client = new import_graphql_request.GraphQLClient(url);
2582
- if (chainId === import_chains.base.id)
2583
- return getSdk2(client);
2584
- if (chainId === import_chains.sonic.id)
2585
- return getSdk3(client);
2586
- if (chainId === import_chains.plasma.id)
2587
- return getSdk4(client);
2588
- if (chainId === import_chains.arbitrum.id)
2589
- return getSdk5(client);
3120
+ if (chainId === import_chains.base.id) return getSdk2(client);
3121
+ if (chainId === import_chains.sonic.id) return getSdk3(client);
3122
+ if (chainId === import_chains.plasma.id) return getSdk4(client);
3123
+ if (chainId === import_chains.arbitrum.id) return getSdk6(client);
3124
+ if (chainId === import_chains.linea.id) return getSdk5(client);
2590
3125
  return getSdk(client);
2591
3126
  };
2592
3127
  // Annotate the CommonJS export names for ESM import in node: