@glowlabs-org/utils 0.2.159 → 0.2.161

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var calculateFarmEfficiency = require('./calculate-farm-efficiency-BVxRutOQ.js');
3
+ var calculateFarmEfficiency = require('./calculate-farm-efficiency-DgUyd3Go.js');
4
4
  require('decimal.js');
5
5
  var viem = require('viem');
6
6
  require('ethers');
@@ -2946,6 +2946,11 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2946
2946
  chainId: walletClient?.chain?.id,
2947
2947
  contract: ADDRESSES.REWARDS_KERNEL,
2948
2948
  nonce: nonce.toString(),
2949
+ tokensAndAmounts: tokensAndAmounts,
2950
+ from: from,
2951
+ to: to,
2952
+ isGuardedToken: isGuardedToken,
2953
+ toCounterfactual: toCounterfactual,
2949
2954
  });
2950
2955
  throw new Error(parseViemError(simulationError));
2951
2956
  }
@@ -2976,7 +2981,10 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2976
2981
  contract: ADDRESSES.REWARDS_KERNEL,
2977
2982
  nonce: params.nonce.toString(),
2978
2983
  from: params.from,
2984
+ tokensAndAmounts: params.tokensAndAmounts,
2979
2985
  to: params.to,
2986
+ isGuardedToken: params.isGuardedToken,
2987
+ toCounterfactual: params.toCounterfactual,
2980
2988
  });
2981
2989
  throw new Error(parseViemError(error));
2982
2990
  }
@@ -4823,12 +4831,36 @@ function WalletsRouter(baseUrl) {
4823
4831
  throw new Error(parseApiError$1(error));
4824
4832
  }
4825
4833
  };
4834
+ const acceptToS = async (wallet, tosRequest) => {
4835
+ try {
4836
+ return await request(`/wallets/address/${encodeURIComponent(wallet)}/tos/accept`, {
4837
+ method: "POST",
4838
+ headers: {
4839
+ "Content-Type": "application/json",
4840
+ },
4841
+ body: JSON.stringify(tosRequest),
4842
+ });
4843
+ }
4844
+ catch (error) {
4845
+ throw new Error(parseApiError$1(error));
4846
+ }
4847
+ };
4848
+ const fetchTosStatus = async (wallet) => {
4849
+ try {
4850
+ return await request(`/wallets/address/${encodeURIComponent(wallet)}/tos/status`);
4851
+ }
4852
+ catch (error) {
4853
+ throw new Error(parseApiError$1(error));
4854
+ }
4855
+ };
4826
4856
  return {
4827
4857
  fetchAllWallets,
4828
4858
  fetchWalletByAddress,
4829
4859
  fetchWalletMintedEvents,
4830
4860
  fetchWalletStakeEvents,
4831
4861
  fetchWalletWeeklyRewards,
4862
+ acceptToS,
4863
+ fetchTosStatus,
4832
4864
  };
4833
4865
  }
4834
4866
 
@@ -5097,4 +5129,4 @@ exports.useOffchainFractions = useOffchainFractions;
5097
5129
  exports.useRewardsKernel = useRewardsKernel;
5098
5130
  exports.waitForEthersTransactionWithRetry = waitForEthersTransactionWithRetry;
5099
5131
  exports.waitForViemTransactionWithRetry = waitForViemTransactionWithRetry;
5100
- //# sourceMappingURL=calculate-farm-efficiency-BVxRutOQ.js.map
5132
+ //# sourceMappingURL=calculate-farm-efficiency-DgUyd3Go.js.map