@glowlabs-org/utils 0.2.153 → 0.2.155

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.
Files changed (31) hide show
  1. package/dist/cjs/browser.js +1 -1
  2. package/dist/cjs/{farms-router-DwbBMkUd.js → farms-router-BOXNLl3m.js} +64 -1
  3. package/dist/cjs/farms-router-BOXNLl3m.js.map +1 -0
  4. package/dist/cjs/index.d.ts +1 -1
  5. package/dist/cjs/index.js +9 -1
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/lib/control-api/farms-router.d.ts +2 -1
  8. package/dist/cjs/lib/control-api/region-router.d.ts +2 -1
  9. package/dist/cjs/lib/control-api/wallets-router.d.ts +2 -2
  10. package/dist/cjs/lib/create-weekly-report/index.d.ts +4 -0
  11. package/dist/cjs/lib/types/index.d.ts +77 -1
  12. package/dist/esm/browser.js +2 -2
  13. package/dist/esm/{farms-router-C0g4hf2Z.js → farms-router-BYpMNa_b.js} +64 -1
  14. package/dist/esm/farms-router-BYpMNa_b.js.map +1 -0
  15. package/dist/esm/index.d.ts +1 -1
  16. package/dist/esm/index.js +10 -3
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/lib/control-api/farms-router.d.ts +2 -1
  19. package/dist/esm/lib/control-api/region-router.d.ts +2 -1
  20. package/dist/esm/lib/control-api/wallets-router.d.ts +2 -2
  21. package/dist/esm/lib/create-weekly-report/index.d.ts +4 -0
  22. package/dist/esm/lib/types/index.d.ts +77 -1
  23. package/package.json +1 -1
  24. package/src/index.ts +1 -0
  25. package/src/lib/control-api/farms-router.ts +33 -0
  26. package/src/lib/control-api/region-router.ts +29 -0
  27. package/src/lib/control-api/wallets-router.ts +36 -2
  28. package/src/lib/create-weekly-report/index.ts +13 -0
  29. package/src/lib/types/index.ts +91 -1
  30. package/dist/cjs/farms-router-DwbBMkUd.js.map +0 -1
  31. package/dist/esm/farms-router-C0g4hf2Z.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  export * from "./lib/create-weekly-report/types/index";
2
2
  export type { GlwPrice } from "./lib/types/index";
3
3
  export * from "./constants/index";
4
- export { createWeeklyReport, createWeeklyReportLegacy, } from "./lib/create-weekly-report/index";
4
+ export { createWeeklyReport, createWeeklyReportLegacy, fetchWeeklyFarmsData, } from "./lib/create-weekly-report/index";
5
5
  export * from "./lib/types";
6
6
  export { useForwarder } from "./lib/hooks/use-forwarder";
7
7
  export { useOffchainFractions } from "./lib/hooks/use-offchain-fractions";
package/dist/esm/index.js CHANGED
@@ -13,8 +13,8 @@ import { parseUnits, formatUnits } from 'viem';
13
13
  import { MerkleTree } from 'merkletreejs';
14
14
  import { solidityPackedKeccak256, keccak256 } from 'ethers';
15
15
  import Decimal from 'decimal.js';
16
- import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './farms-router-C0g4hf2Z.js';
17
- export { C as ControlRouter, F as FarmsRouter, d as KICKSTARTER_STATUS, K as KickstarterRouter, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, b as REGIONS, R as RegionRouter, S as STAKING_DIRECTIONS, T as TRANSFER_TYPES, W as WalletsRouter, c as configureSentry, u as useForwarder, a as useOffchainFractions } from './farms-router-C0g4hf2Z.js';
16
+ import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './farms-router-BYpMNa_b.js';
17
+ export { C as ControlRouter, F as FarmsRouter, d as KICKSTARTER_STATUS, K as KickstarterRouter, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, b as REGIONS, R as RegionRouter, S as STAKING_DIRECTIONS, T as TRANSFER_TYPES, W as WalletsRouter, c as configureSentry, u as useForwarder, a as useOffchainFractions } from './farms-router-BYpMNa_b.js';
18
18
 
19
19
  const GENESIS_TIMESTAMP = 1700352000;
20
20
 
@@ -19151,6 +19151,13 @@ async function createWeeklyReport({ week, gcaUrls, apiUrl, }) {
19151
19151
  creditsDeviationList, // Detailed deviation report per farm
19152
19152
  };
19153
19153
  }
19154
+ async function fetchWeeklyFarmsData({ week, gcaUrls, apiUrl, }) {
19155
+ const apiResponse = await fetchFarmsForWeek(week, gcaUrls, apiUrl);
19156
+ return {
19157
+ farms: apiResponse.filteredFarms,
19158
+ rawData: apiResponse.rawData,
19159
+ };
19160
+ }
19154
19161
 
19155
- export { GENESIS_TIMESTAMP, createWeeklyReport, createWeeklyReportLegacy };
19162
+ export { GENESIS_TIMESTAMP, createWeeklyReport, createWeeklyReportLegacy, fetchWeeklyFarmsData };
19156
19163
  //# sourceMappingURL=index.js.map