@glowlabs-org/utils 0.2.61 → 0.2.62

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/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 './kickstarter-router-D8tZPVSu.js';
17
- export { C as ControlRouter, K as KickstarterRouter, R as RegionRouter, u as useForwarder } from './kickstarter-router-D8tZPVSu.js';
16
+ import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './wallets-router-BPRWWUbm.js';
17
+ export { C as ControlRouter, K as KickstarterRouter, R as RegionRouter, W as WalletsRouter, u as useForwarder } from './wallets-router-BPRWWUbm.js';
18
18
 
19
19
  const GENESIS_TIMESTAMP = 1700352000;
20
20
 
@@ -19152,47 +19152,5 @@ async function createWeeklyReport({ week, gcaUrls, apiUrl, }) {
19152
19152
  };
19153
19153
  }
19154
19154
 
19155
- function parseApiError(error) {
19156
- if (!error)
19157
- return "Unknown error";
19158
- if (error instanceof Error)
19159
- return error.message;
19160
- const possible = error;
19161
- return possible?.error?.message ?? possible?.message ?? "Unknown error";
19162
- }
19163
- function WalletsRouter(baseUrl) {
19164
- if (!baseUrl)
19165
- throw new Error("CONTROL API base URL is not set");
19166
- const request = async (path, init) => {
19167
- const res = await fetch(`${baseUrl}${path}`, init);
19168
- if (!res.ok) {
19169
- const errData = await res.json().catch(() => ({}));
19170
- throw new Error(errData?.error || `Request to ${path} failed`);
19171
- }
19172
- return (await res.json());
19173
- };
19174
- const fetchAllWallets = async () => {
19175
- try {
19176
- const data = await request(`/wallets/all`);
19177
- return data.wallets ?? [];
19178
- }
19179
- catch (error) {
19180
- throw new Error(parseApiError(error));
19181
- }
19182
- };
19183
- const fetchWalletByAddress = async (wallet) => {
19184
- try {
19185
- return await request(`/wallets/address/${encodeURIComponent(wallet)}`);
19186
- }
19187
- catch (error) {
19188
- throw new Error(parseApiError(error));
19189
- }
19190
- };
19191
- return {
19192
- fetchAllWallets,
19193
- fetchWalletByAddress,
19194
- };
19195
- }
19196
-
19197
- export { GENESIS_TIMESTAMP, WalletsRouter, createWeeklyReport, createWeeklyReportLegacy };
19155
+ export { GENESIS_TIMESTAMP, createWeeklyReport, createWeeklyReportLegacy };
19198
19156
  //# sourceMappingURL=index.js.map