@glowlabs-org/utils 0.2.95 → 0.2.97

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 (34) hide show
  1. package/dist/cjs/browser.d.ts +1 -0
  2. package/dist/cjs/browser.js +6 -1
  3. package/dist/cjs/browser.js.map +1 -1
  4. package/dist/cjs/constants/addresses.d.ts +1 -1
  5. package/dist/cjs/{farms-router-DCCy-acA.js → farms-router-CDsqKkP6.js} +1093 -210
  6. package/dist/cjs/farms-router-CDsqKkP6.js.map +1 -0
  7. package/dist/cjs/index.d.ts +1 -0
  8. package/dist/cjs/index.js +2 -1
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/lib/abis/offchainFractions.d.ts +473 -0
  11. package/dist/cjs/lib/control-api/farms-router.d.ts +2 -1
  12. package/dist/cjs/lib/hooks/use-offchain-fractions.d.ts +60 -0
  13. package/dist/cjs/lib/types/index.d.ts +64 -0
  14. package/dist/esm/browser.d.ts +1 -0
  15. package/dist/esm/browser.js +2 -2
  16. package/dist/esm/constants/addresses.d.ts +1 -1
  17. package/dist/esm/{farms-router-XDjQOQ-c.js → farms-router-Da1P3B8g.js} +1093 -211
  18. package/dist/esm/farms-router-Da1P3B8g.js.map +1 -0
  19. package/dist/esm/index.d.ts +1 -0
  20. package/dist/esm/index.js +2 -2
  21. package/dist/esm/lib/abis/offchainFractions.d.ts +473 -0
  22. package/dist/esm/lib/control-api/farms-router.d.ts +2 -1
  23. package/dist/esm/lib/hooks/use-offchain-fractions.d.ts +60 -0
  24. package/dist/esm/lib/types/index.d.ts +64 -0
  25. package/package.json +1 -1
  26. package/src/browser.ts +1 -0
  27. package/src/constants/addresses.ts +7 -1
  28. package/src/index.ts +1 -0
  29. package/src/lib/abis/offchainFractions.ts +332 -0
  30. package/src/lib/control-api/farms-router.ts +37 -2
  31. package/src/lib/hooks/use-offchain-fractions.ts +737 -0
  32. package/src/lib/types/index.ts +69 -0
  33. package/dist/cjs/farms-router-DCCy-acA.js.map +0 -1
  34. package/dist/esm/farms-router-XDjQOQ-c.js.map +0 -1
@@ -0,0 +1,473 @@
1
+ export declare const OFFCHAIN_FRACTIONS_ABI: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "contract CounterfactualHolderFactory";
4
+ readonly name: "_counterfactualHolderFactory";
5
+ readonly type: "address";
6
+ }];
7
+ readonly stateMutability: "nonpayable";
8
+ readonly type: "constructor";
9
+ }, {
10
+ readonly inputs: readonly [{
11
+ readonly internalType: "address";
12
+ readonly name: "target";
13
+ readonly type: "address";
14
+ }];
15
+ readonly name: "AddressEmptyCode";
16
+ readonly type: "error";
17
+ }, {
18
+ readonly inputs: readonly [{
19
+ readonly internalType: "address";
20
+ readonly name: "account";
21
+ readonly type: "address";
22
+ }];
23
+ readonly name: "AddressInsufficientBalance";
24
+ readonly type: "error";
25
+ }, {
26
+ readonly inputs: readonly [];
27
+ readonly name: "AlreadyClaimed";
28
+ readonly type: "error";
29
+ }, {
30
+ readonly inputs: readonly [];
31
+ readonly name: "AlreadyClosed";
32
+ readonly type: "error";
33
+ }, {
34
+ readonly inputs: readonly [];
35
+ readonly name: "AlreadyExists";
36
+ readonly type: "error";
37
+ }, {
38
+ readonly inputs: readonly [];
39
+ readonly name: "AlreadySent";
40
+ readonly type: "error";
41
+ }, {
42
+ readonly inputs: readonly [];
43
+ readonly name: "CannotClaimPayoutWhenRoundNotFullyFilled";
44
+ readonly type: "error";
45
+ }, {
46
+ readonly inputs: readonly [];
47
+ readonly name: "CannotClaimRefundWhenNotExpired";
48
+ readonly type: "error";
49
+ }, {
50
+ readonly inputs: readonly [];
51
+ readonly name: "CannotClaimRefundWhenRoundFullyFilled";
52
+ readonly type: "error";
53
+ }, {
54
+ readonly inputs: readonly [];
55
+ readonly name: "CannotCloseAFullRound";
56
+ readonly type: "error";
57
+ }, {
58
+ readonly inputs: readonly [];
59
+ readonly name: "CannotHaveZeroTotalSteps";
60
+ readonly type: "error";
61
+ }, {
62
+ readonly inputs: readonly [];
63
+ readonly name: "Expired";
64
+ readonly type: "error";
65
+ }, {
66
+ readonly inputs: readonly [];
67
+ readonly name: "FailedInnerCall";
68
+ readonly type: "error";
69
+ }, {
70
+ readonly inputs: readonly [];
71
+ readonly name: "InsufficientSharesAvailable";
72
+ readonly type: "error";
73
+ }, {
74
+ readonly inputs: readonly [];
75
+ readonly name: "InvalidToAddress";
76
+ readonly type: "error";
77
+ }, {
78
+ readonly inputs: readonly [];
79
+ readonly name: "InvalidToken";
80
+ readonly type: "error";
81
+ }, {
82
+ readonly inputs: readonly [];
83
+ readonly name: "MinSharesCannotBeGreaterThanTotalSteps";
84
+ readonly type: "error";
85
+ }, {
86
+ readonly inputs: readonly [];
87
+ readonly name: "NoStepsPurchased";
88
+ readonly type: "error";
89
+ }, {
90
+ readonly inputs: readonly [];
91
+ readonly name: "NotAllOrNothing";
92
+ readonly type: "error";
93
+ }, {
94
+ readonly inputs: readonly [];
95
+ readonly name: "NotFractionsOwner";
96
+ readonly type: "error";
97
+ }, {
98
+ readonly inputs: readonly [];
99
+ readonly name: "RecipientCannotBeSelf";
100
+ readonly type: "error";
101
+ }, {
102
+ readonly inputs: readonly [];
103
+ readonly name: "ReentrancyGuardReentrantCall";
104
+ readonly type: "error";
105
+ }, {
106
+ readonly inputs: readonly [{
107
+ readonly internalType: "address";
108
+ readonly name: "token";
109
+ readonly type: "address";
110
+ }];
111
+ readonly name: "SafeERC20FailedOperation";
112
+ readonly type: "error";
113
+ }, {
114
+ readonly inputs: readonly [];
115
+ readonly name: "StepMustBeGreaterThanZero";
116
+ readonly type: "error";
117
+ }, {
118
+ readonly inputs: readonly [];
119
+ readonly name: "TaxTokenNotSupported";
120
+ readonly type: "error";
121
+ }, {
122
+ readonly inputs: readonly [];
123
+ readonly name: "TotalRaisedOverflow";
124
+ readonly type: "error";
125
+ }, {
126
+ readonly inputs: readonly [];
127
+ readonly name: "ZeroSteps";
128
+ readonly type: "error";
129
+ }, {
130
+ readonly anonymous: false;
131
+ readonly inputs: readonly [{
132
+ readonly indexed: true;
133
+ readonly internalType: "bytes32";
134
+ readonly name: "id";
135
+ readonly type: "bytes32";
136
+ }, {
137
+ readonly indexed: true;
138
+ readonly internalType: "address";
139
+ readonly name: "token";
140
+ readonly type: "address";
141
+ }, {
142
+ readonly indexed: true;
143
+ readonly internalType: "address";
144
+ readonly name: "owner";
145
+ readonly type: "address";
146
+ }];
147
+ readonly name: "FractionClosed";
148
+ readonly type: "event";
149
+ }, {
150
+ readonly anonymous: false;
151
+ readonly inputs: readonly [{
152
+ readonly indexed: true;
153
+ readonly internalType: "bytes32";
154
+ readonly name: "id";
155
+ readonly type: "bytes32";
156
+ }, {
157
+ readonly indexed: true;
158
+ readonly internalType: "address";
159
+ readonly name: "token";
160
+ readonly type: "address";
161
+ }, {
162
+ readonly indexed: true;
163
+ readonly internalType: "address";
164
+ readonly name: "owner";
165
+ readonly type: "address";
166
+ }, {
167
+ readonly indexed: false;
168
+ readonly internalType: "uint256";
169
+ readonly name: "step";
170
+ readonly type: "uint256";
171
+ }, {
172
+ readonly indexed: false;
173
+ readonly internalType: "uint256";
174
+ readonly name: "totalSteps";
175
+ readonly type: "uint256";
176
+ }, {
177
+ readonly indexed: false;
178
+ readonly internalType: "uint48";
179
+ readonly name: "expiration";
180
+ readonly type: "uint48";
181
+ }, {
182
+ readonly indexed: false;
183
+ readonly internalType: "address";
184
+ readonly name: "to";
185
+ readonly type: "address";
186
+ }, {
187
+ readonly indexed: false;
188
+ readonly internalType: "bool";
189
+ readonly name: "useCounterfactualAddress";
190
+ readonly type: "bool";
191
+ }, {
192
+ readonly indexed: false;
193
+ readonly internalType: "uint256";
194
+ readonly name: "minSharesToRaise";
195
+ readonly type: "uint256";
196
+ }];
197
+ readonly name: "FractionCreated";
198
+ readonly type: "event";
199
+ }, {
200
+ readonly anonymous: false;
201
+ readonly inputs: readonly [{
202
+ readonly indexed: true;
203
+ readonly internalType: "bytes32";
204
+ readonly name: "id";
205
+ readonly type: "bytes32";
206
+ }, {
207
+ readonly indexed: true;
208
+ readonly internalType: "address";
209
+ readonly name: "creator";
210
+ readonly type: "address";
211
+ }, {
212
+ readonly indexed: true;
213
+ readonly internalType: "address";
214
+ readonly name: "user";
215
+ readonly type: "address";
216
+ }, {
217
+ readonly indexed: false;
218
+ readonly internalType: "uint256";
219
+ readonly name: "amount";
220
+ readonly type: "uint256";
221
+ }];
222
+ readonly name: "FractionRefunded";
223
+ readonly type: "event";
224
+ }, {
225
+ readonly anonymous: false;
226
+ readonly inputs: readonly [{
227
+ readonly indexed: true;
228
+ readonly internalType: "bytes32";
229
+ readonly name: "id";
230
+ readonly type: "bytes32";
231
+ }, {
232
+ readonly indexed: true;
233
+ readonly internalType: "address";
234
+ readonly name: "creator";
235
+ readonly type: "address";
236
+ }, {
237
+ readonly indexed: true;
238
+ readonly internalType: "address";
239
+ readonly name: "buyer";
240
+ readonly type: "address";
241
+ }, {
242
+ readonly indexed: false;
243
+ readonly internalType: "uint256";
244
+ readonly name: "step";
245
+ readonly type: "uint256";
246
+ }, {
247
+ readonly indexed: false;
248
+ readonly internalType: "uint256";
249
+ readonly name: "amount";
250
+ readonly type: "uint256";
251
+ }];
252
+ readonly name: "FractionSold";
253
+ readonly type: "event";
254
+ }, {
255
+ readonly anonymous: false;
256
+ readonly inputs: readonly [{
257
+ readonly indexed: true;
258
+ readonly internalType: "bytes32";
259
+ readonly name: "id";
260
+ readonly type: "bytes32";
261
+ }, {
262
+ readonly indexed: true;
263
+ readonly internalType: "address";
264
+ readonly name: "creator";
265
+ readonly type: "address";
266
+ }, {
267
+ readonly indexed: false;
268
+ readonly internalType: "uint256";
269
+ readonly name: "minShares";
270
+ readonly type: "uint256";
271
+ }, {
272
+ readonly indexed: false;
273
+ readonly internalType: "uint256";
274
+ readonly name: "newTotalSharesSold";
275
+ readonly type: "uint256";
276
+ }];
277
+ readonly name: "MinSharesReached";
278
+ readonly type: "event";
279
+ }, {
280
+ readonly anonymous: false;
281
+ readonly inputs: readonly [{
282
+ readonly indexed: true;
283
+ readonly internalType: "bytes32";
284
+ readonly name: "id";
285
+ readonly type: "bytes32";
286
+ }, {
287
+ readonly indexed: true;
288
+ readonly internalType: "address";
289
+ readonly name: "creator";
290
+ readonly type: "address";
291
+ }];
292
+ readonly name: "RoundFilled";
293
+ readonly type: "event";
294
+ }, {
295
+ readonly inputs: readonly [{
296
+ readonly internalType: "address";
297
+ readonly name: "creator";
298
+ readonly type: "address";
299
+ }, {
300
+ readonly internalType: "bytes32";
301
+ readonly name: "id";
302
+ readonly type: "bytes32";
303
+ }, {
304
+ readonly internalType: "uint256";
305
+ readonly name: "stepsToBuy";
306
+ readonly type: "uint256";
307
+ }, {
308
+ readonly internalType: "uint256";
309
+ readonly name: "minStepsToBuy";
310
+ readonly type: "uint256";
311
+ }];
312
+ readonly name: "buyFractions";
313
+ readonly outputs: readonly [];
314
+ readonly stateMutability: "nonpayable";
315
+ readonly type: "function";
316
+ }, {
317
+ readonly inputs: readonly [{
318
+ readonly internalType: "address";
319
+ readonly name: "creator";
320
+ readonly type: "address";
321
+ }, {
322
+ readonly internalType: "bytes32";
323
+ readonly name: "id";
324
+ readonly type: "bytes32";
325
+ }];
326
+ readonly name: "claimRefund";
327
+ readonly outputs: readonly [];
328
+ readonly stateMutability: "nonpayable";
329
+ readonly type: "function";
330
+ }, {
331
+ readonly inputs: readonly [{
332
+ readonly internalType: "bytes32";
333
+ readonly name: "id";
334
+ readonly type: "bytes32";
335
+ }];
336
+ readonly name: "closeFraction";
337
+ readonly outputs: readonly [];
338
+ readonly stateMutability: "nonpayable";
339
+ readonly type: "function";
340
+ }, {
341
+ readonly inputs: readonly [{
342
+ readonly internalType: "bytes32";
343
+ readonly name: "id";
344
+ readonly type: "bytes32";
345
+ }, {
346
+ readonly internalType: "address";
347
+ readonly name: "token";
348
+ readonly type: "address";
349
+ }, {
350
+ readonly internalType: "uint256";
351
+ readonly name: "step";
352
+ readonly type: "uint256";
353
+ }, {
354
+ readonly internalType: "uint256";
355
+ readonly name: "totalSteps";
356
+ readonly type: "uint256";
357
+ }, {
358
+ readonly internalType: "uint48";
359
+ readonly name: "expiration";
360
+ readonly type: "uint48";
361
+ }, {
362
+ readonly internalType: "address";
363
+ readonly name: "to";
364
+ readonly type: "address";
365
+ }, {
366
+ readonly internalType: "bool";
367
+ readonly name: "useCounterfactualAddress";
368
+ readonly type: "bool";
369
+ }, {
370
+ readonly internalType: "uint256";
371
+ readonly name: "minSharesToRaise";
372
+ readonly type: "uint256";
373
+ }];
374
+ readonly name: "createFraction";
375
+ readonly outputs: readonly [];
376
+ readonly stateMutability: "nonpayable";
377
+ readonly type: "function";
378
+ }, {
379
+ readonly inputs: readonly [{
380
+ readonly internalType: "address";
381
+ readonly name: "creator";
382
+ readonly type: "address";
383
+ }, {
384
+ readonly internalType: "bytes32";
385
+ readonly name: "id";
386
+ readonly type: "bytes32";
387
+ }];
388
+ readonly name: "getFraction";
389
+ readonly outputs: readonly [{
390
+ readonly components: readonly [{
391
+ readonly internalType: "address";
392
+ readonly name: "token";
393
+ readonly type: "address";
394
+ }, {
395
+ readonly internalType: "uint48";
396
+ readonly name: "expiration";
397
+ readonly type: "uint48";
398
+ }, {
399
+ readonly internalType: "bool";
400
+ readonly name: "manuallyClosed";
401
+ readonly type: "bool";
402
+ }, {
403
+ readonly internalType: "uint256";
404
+ readonly name: "minSharesToRaise";
405
+ readonly type: "uint256";
406
+ }, {
407
+ readonly internalType: "bool";
408
+ readonly name: "useCounterfactualAddress";
409
+ readonly type: "bool";
410
+ }, {
411
+ readonly internalType: "bool";
412
+ readonly name: "claimedFromMinSharesToRaise";
413
+ readonly type: "bool";
414
+ }, {
415
+ readonly internalType: "address";
416
+ readonly name: "owner";
417
+ readonly type: "address";
418
+ }, {
419
+ readonly internalType: "uint256";
420
+ readonly name: "step";
421
+ readonly type: "uint256";
422
+ }, {
423
+ readonly internalType: "address";
424
+ readonly name: "to";
425
+ readonly type: "address";
426
+ }, {
427
+ readonly internalType: "uint256";
428
+ readonly name: "soldSteps";
429
+ readonly type: "uint256";
430
+ }, {
431
+ readonly internalType: "uint256";
432
+ readonly name: "totalSteps";
433
+ readonly type: "uint256";
434
+ }];
435
+ readonly internalType: "struct OffchainFractions.FractionData";
436
+ readonly name: "";
437
+ readonly type: "tuple";
438
+ }];
439
+ readonly stateMutability: "view";
440
+ readonly type: "function";
441
+ }, {
442
+ readonly inputs: readonly [];
443
+ readonly name: "i_CFHFactory";
444
+ readonly outputs: readonly [{
445
+ readonly internalType: "contract CounterfactualHolderFactory";
446
+ readonly name: "";
447
+ readonly type: "address";
448
+ }];
449
+ readonly stateMutability: "view";
450
+ readonly type: "function";
451
+ }, {
452
+ readonly inputs: readonly [{
453
+ readonly internalType: "address";
454
+ readonly name: "user";
455
+ readonly type: "address";
456
+ }, {
457
+ readonly internalType: "address";
458
+ readonly name: "creator";
459
+ readonly type: "address";
460
+ }, {
461
+ readonly internalType: "bytes32";
462
+ readonly name: "id";
463
+ readonly type: "bytes32";
464
+ }];
465
+ readonly name: "stepsPurchased";
466
+ readonly outputs: readonly [{
467
+ readonly internalType: "uint256";
468
+ readonly name: "stepsPurchased";
469
+ readonly type: "uint256";
470
+ }];
471
+ readonly stateMutability: "view";
472
+ readonly type: "function";
473
+ }];
@@ -1,4 +1,5 @@
1
- import type { SponsoredFarm } from "../types";
1
+ import type { SponsoredFarm, EstimateRewardScoreParams, RewardScoreResponse } from "../types";
2
2
  export declare function FarmsRouter(baseUrl: string): {
3
3
  readonly fetchSponsoredFarms: (sponsorWallet?: string) => Promise<SponsoredFarm[]>;
4
+ readonly estimateRewardScore: (params: EstimateRewardScoreParams) => Promise<RewardScoreResponse>;
4
5
  };
@@ -0,0 +1,60 @@
1
+ import { type Signer } from "ethers";
2
+ export declare enum OffchainFractionsError {
3
+ CONTRACT_NOT_AVAILABLE = "Contract not available",
4
+ SIGNER_NOT_AVAILABLE = "Signer not available",
5
+ UNKNOWN_ERROR = "Unknown error",
6
+ INVALID_PARAMETERS = "Invalid parameters",
7
+ FRACTION_NOT_FOUND = "Fraction not found",
8
+ INSUFFICIENT_BALANCE = "Insufficient balance",
9
+ INSUFFICIENT_ALLOWANCE = "Insufficient allowance"
10
+ }
11
+ export interface FractionData {
12
+ token: string;
13
+ expiration: number;
14
+ manuallyClosed: boolean;
15
+ minSharesToRaise: bigint;
16
+ useCounterfactualAddress: boolean;
17
+ claimedFromMinSharesToRaise: boolean;
18
+ owner: string;
19
+ step: bigint;
20
+ to: string;
21
+ soldSteps: bigint;
22
+ totalSteps: bigint;
23
+ }
24
+ export interface CreateFractionParams {
25
+ id: string;
26
+ token: string;
27
+ step: bigint;
28
+ totalSteps: bigint;
29
+ expiration: number;
30
+ to: string;
31
+ useCounterfactualAddress: boolean;
32
+ minSharesToRaise: bigint;
33
+ }
34
+ export interface BuyFractionsParams {
35
+ creator: string;
36
+ id: string;
37
+ stepsToBuy: bigint;
38
+ minStepsToBuy: bigint;
39
+ }
40
+ export declare function useOffchainFractions(signer: Signer | undefined, CHAIN_ID: number): {
41
+ createFraction: (params: CreateFractionParams) => Promise<string>;
42
+ buyFractions: (params: BuyFractionsParams) => Promise<string>;
43
+ claimRefund: (creator: string, id: string) => Promise<string>;
44
+ closeFraction: (id: string) => Promise<string>;
45
+ getFraction: (creator: string, id: string) => Promise<FractionData>;
46
+ getStepsPurchased: (user: string, creator: string, id: string) => Promise<bigint>;
47
+ approveToken: (tokenAddress: string, amount: bigint) => Promise<boolean>;
48
+ checkTokenAllowance: (owner: string, tokenAddress: string) => Promise<bigint>;
49
+ checkTokenBalance: (owner: string, tokenAddress: string) => Promise<bigint>;
50
+ isFractionExpired: (creator: string, id: string) => Promise<boolean>;
51
+ hasReachedMinimumShares: (creator: string, id: string) => Promise<boolean>;
52
+ isFractionCompletelyFilled: (creator: string, id: string) => Promise<boolean>;
53
+ getTotalAmountRaised: (creator: string, id: string) => Promise<bigint>;
54
+ getRemainingSteps: (creator: string, id: string) => Promise<bigint>;
55
+ estimateGasForCreateFraction: (params: CreateFractionParams, ethPriceInUSD: number | null) => Promise<string>;
56
+ estimateGasForBuyFractions: (params: BuyFractionsParams, ethPriceInUSD: number | null) => Promise<string>;
57
+ readonly isProcessing: boolean;
58
+ addresses: Record<import("../../constants/addresses").ContractKeys, `0x${string}`>;
59
+ isSignerAvailable: boolean;
60
+ };
@@ -383,4 +383,68 @@ export interface WalletDetails {
383
383
  ownedFarms: WalletFarmInfo[];
384
384
  purchasedFarms: WalletFarmInfo[];
385
385
  }
386
+ export interface EstimateRewardScoreParams {
387
+ userId: string;
388
+ sponsorSplitPercent: number;
389
+ protocolDepositAmount: string;
390
+ paymentCurrency: PaymentCurrency;
391
+ adjustedWeeklyCarbonCredits: number;
392
+ zone: {
393
+ id: number;
394
+ name?: string;
395
+ };
396
+ }
397
+ export interface RewardScoreResponse {
398
+ rewardScore: number;
399
+ userWeeklyPdRewards: string;
400
+ userWeeklyPdRewardsUsd: string;
401
+ userWeeklyGlwRewards: string;
402
+ userWeeklyGlwValueUsd: string;
403
+ userEstimatedWeeklyCash: string;
404
+ userProtocolDeposit: string;
405
+ userGlowSplitPercent: string;
406
+ userDepositSplitPercent: string;
407
+ glwPriceUsd6: string;
408
+ regionInfo: {
409
+ regionId: number;
410
+ regionName: string;
411
+ existingFarmCount: number;
412
+ existingTotalDepositsUsd: string;
413
+ currencyBreakdown: {
414
+ currency: string;
415
+ protocolDepositSum: string;
416
+ carbonCreditProductionSum: string;
417
+ }[];
418
+ regionGctlStaked: string;
419
+ totalGctlStakedAllRegions: string;
420
+ };
421
+ }
422
+ export interface EstimateRewardScoreApiResponse {
423
+ rewardScore: number;
424
+ userWeeklyPdRewards: string;
425
+ userWeeklyPdRewardsUsd: string;
426
+ userWeeklyGlwRewards: string;
427
+ userWeeklyGlwValueUsd: string;
428
+ userEstimatedWeeklyCash: string;
429
+ userProtocolDeposit: string;
430
+ userGlowSplitPercent: string;
431
+ userDepositSplitPercent: string;
432
+ glwPriceUsd6: string;
433
+ regionInfo: {
434
+ regionId: number;
435
+ regionName: string;
436
+ existingFarmCount: number;
437
+ existingTotalDepositsUsd: string;
438
+ currencyBreakdown: {
439
+ currency: string;
440
+ protocolDepositSum: string;
441
+ carbonCreditProductionSum: string;
442
+ }[];
443
+ regionGctlStaked: string;
444
+ totalGctlStakedAllRegions: string;
445
+ };
446
+ }
447
+ export interface EstimateRewardScoreErrorResponse {
448
+ error: string;
449
+ }
386
450
  export type { MintedEvent as ControlMintedEvent };
@@ -1,4 +1,5 @@
1
1
  export * from "./lib/hooks/use-forwarder";
2
+ export * from "./lib/hooks/use-offchain-fractions";
2
3
  export * from "./lib/control-api/control-router";
3
4
  export * from "./lib/control-api/region-router";
4
5
  export * from "./lib/control-api/kickstarter-router";
@@ -1,5 +1,5 @@
1
- import { T as TRANSFER_TYPES } from './farms-router-XDjQOQ-c.js';
2
- export { C as ControlRouter, D as DECIMALS_BY_TOKEN, e as FORWARDER_ABI, F as FarmsRouter, a as ForwarderError, f as GCA_URLS, G as GLOW_WEIGHT_DECIMAL_PRECISION, H as HUB_URL, K as KickstarterRouter, M as MAX_WEIGHT, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, R as RegionRouter, U as USDG_WEIGHT_DECIMAL_PRECISION, W as WalletsRouter, b as allRegions, d as countries, g as getAddresses, r as regionMetadata, c as usStates, u as useForwarder } from './farms-router-XDjQOQ-c.js';
1
+ import { T as TRANSFER_TYPES } from './farms-router-Da1P3B8g.js';
2
+ export { C as ControlRouter, D as DECIMALS_BY_TOKEN, g as FORWARDER_ABI, F as FarmsRouter, b as ForwarderError, i as GCA_URLS, G as GLOW_WEIGHT_DECIMAL_PRECISION, H as HUB_URL, K as KickstarterRouter, M as MAX_WEIGHT, c as OFF_CHAIN_PAYMENT_CURRENCIES, O as OffchainFractionsError, P as PAYMENT_CURRENCIES, R as RegionRouter, U as USDG_WEIGHT_DECIMAL_PRECISION, W as WalletsRouter, d as allRegions, f as countries, h as getAddresses, r as regionMetadata, e as usStates, u as useForwarder, a as useOffchainFractions } from './farms-router-Da1P3B8g.js';
3
3
  import { verifyTypedData, getAddress } from 'viem';
4
4
  import 'ethers';
5
5
 
@@ -1,3 +1,3 @@
1
- export type ContractKeys = "USDC" | "FORWARDER" | "FOUNDATION_WALLET" | "GLW" | "USDG" | "USDG_REDEMPTION" | "IMPACT_CATALYST" | "AUDIT_FEE_WALLET" | "UNISWAP_V2_ROUTER" | "UNISWAP_V2_FACTORY" | "USDG_UNISWAP" | "GLW_UNISWAP";
1
+ export type ContractKeys = "USDC" | "FORWARDER" | "FOUNDATION_WALLET" | "GLW" | "USDG" | "USDG_REDEMPTION" | "IMPACT_CATALYST" | "AUDIT_FEE_WALLET" | "UNISWAP_V2_ROUTER" | "UNISWAP_V2_FACTORY" | "USDG_UNISWAP" | "GLW_UNISWAP" | "OFFCHAIN_FRACTIONS" | "COUNTERFACTUAL_HOLDER_FACTORY";
2
2
  export declare const getAddresses: (CHAIN_ID: number) => Record<ContractKeys, `0x${string}`>;
3
3
  export declare const DECIMALS_BY_TOKEN: Record<"USDC" | "USDG" | "GCTL" | "SGCTL" | "GLW", number>;