@glowlabs-org/utils 0.2.158 → 0.2.160

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-CLa5037R.js');
3
+ var calculateFarmEfficiency = require('./calculate-farm-efficiency-r_CeFLgH.js');
4
4
  require('decimal.js');
5
5
  var viem = require('viem');
6
6
  require('ethers');
@@ -4571,6 +4571,7 @@ function RegionRouter(baseUrl) {
4571
4571
  installerCount: 1,
4572
4572
  createdAt: new Date(),
4573
4573
  activationInstallerThreshold: 1,
4574
+ efficiencyScore: 0,
4574
4575
  };
4575
4576
  };
4576
4577
  // -------------------------------------------------------------------------
@@ -4822,12 +4823,36 @@ function WalletsRouter(baseUrl) {
4822
4823
  throw new Error(parseApiError$1(error));
4823
4824
  }
4824
4825
  };
4826
+ const acceptToS = async (wallet, tosRequest) => {
4827
+ try {
4828
+ return await request(`/wallets/address/${encodeURIComponent(wallet)}/tos/accept`, {
4829
+ method: "POST",
4830
+ headers: {
4831
+ "Content-Type": "application/json",
4832
+ },
4833
+ body: JSON.stringify(tosRequest),
4834
+ });
4835
+ }
4836
+ catch (error) {
4837
+ throw new Error(parseApiError$1(error));
4838
+ }
4839
+ };
4840
+ const fetchTosStatus = async (wallet) => {
4841
+ try {
4842
+ return await request(`/wallets/address/${encodeURIComponent(wallet)}/tos/status`);
4843
+ }
4844
+ catch (error) {
4845
+ throw new Error(parseApiError$1(error));
4846
+ }
4847
+ };
4825
4848
  return {
4826
4849
  fetchAllWallets,
4827
4850
  fetchWalletByAddress,
4828
4851
  fetchWalletMintedEvents,
4829
4852
  fetchWalletStakeEvents,
4830
4853
  fetchWalletWeeklyRewards,
4854
+ acceptToS,
4855
+ fetchTosStatus,
4831
4856
  };
4832
4857
  }
4833
4858
 
@@ -5096,4 +5121,4 @@ exports.useOffchainFractions = useOffchainFractions;
5096
5121
  exports.useRewardsKernel = useRewardsKernel;
5097
5122
  exports.waitForEthersTransactionWithRetry = waitForEthersTransactionWithRetry;
5098
5123
  exports.waitForViemTransactionWithRetry = waitForViemTransactionWithRetry;
5099
- //# sourceMappingURL=calculate-farm-efficiency-CLa5037R.js.map
5124
+ //# sourceMappingURL=calculate-farm-efficiency-r_CeFLgH.js.map