@berachain/berajs 0.2.8-beta.9 → 0.2.9

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 (237) hide show
  1. package/dist/{BeraError-_mQdkanr.d.cts → BeraError-7-A5JYy_.d.ts} +31 -2
  2. package/dist/{HoneyConfigProvider-DVP_9KZn.d.ts → HoneyConfigProvider-Dkj-_a5x.d.ts} +1 -1
  3. package/dist/{RequestError-BRIiJgHk.d.ts → RequestError-DBOIV65x.d.ts} +1 -1
  4. package/dist/abi/exports.mjs +4452 -2
  5. package/dist/actions/clients/exports.d.ts +2 -0
  6. package/dist/actions/clients/exports.mjs +12 -0
  7. package/dist/actions/exports.d.ts +104 -189
  8. package/dist/actions/exports.mjs +853 -2
  9. package/dist/actions/governance/exports.d.ts +140 -0
  10. package/dist/actions/governance/exports.mjs +226 -0
  11. package/dist/actions/server/exports.d.ts +13 -0
  12. package/dist/actions/server/exports.mjs +27 -0
  13. package/dist/chunk-3EARVV7K.mjs +414 -0
  14. package/dist/chunk-4Z4AK6SH.mjs +211 -0
  15. package/dist/chunk-75M6TF7M.mjs +25 -0
  16. package/dist/chunk-AFN4CVD3.mjs +326 -0
  17. package/dist/chunk-BGMRHTBQ.mjs +23 -0
  18. package/dist/chunk-CDFWPU2R.mjs +473 -0
  19. package/dist/chunk-CDK4YV3D.mjs +571 -0
  20. package/dist/chunk-DKMAIU74.mjs +62 -0
  21. package/dist/chunk-EXIUPSFN.mjs +86 -0
  22. package/dist/chunk-FFB5LFDW.mjs +35 -0
  23. package/dist/chunk-HQCOU6GY.mjs +243 -0
  24. package/dist/chunk-HSSJKHZ4.mjs +135 -0
  25. package/dist/chunk-J5I45WGQ.mjs +1769 -0
  26. package/dist/chunk-KQUMKB66.mjs +89 -0
  27. package/dist/chunk-NBYLMO2L.mjs +14 -0
  28. package/dist/chunk-NPBQLVL3.mjs +80 -0
  29. package/dist/chunk-O2NQFKJK.mjs +170 -0
  30. package/dist/chunk-QJIXTYTZ.mjs +4054 -0
  31. package/dist/chunk-SGIJVHZO.mjs +12 -0
  32. package/dist/chunk-SZ5C44L5.mjs +35 -0
  33. package/dist/chunk-WXXOISTU.mjs +96 -0
  34. package/dist/chunk-XIYN6AL6.mjs +160 -0
  35. package/dist/contexts/exports.d.ts +2 -2
  36. package/dist/contexts/exports.mjs +85 -2
  37. package/dist/enum/exports.d.ts +1 -1
  38. package/dist/enum/exports.mjs +46 -2
  39. package/dist/enum/governance/exports.d.ts +60 -0
  40. package/dist/enum/governance/exports.mjs +14 -0
  41. package/dist/errors/exports.d.ts +4 -3
  42. package/dist/errors/exports.mjs +48 -2
  43. package/dist/exports-BcUTGFUb.d.ts +40 -0
  44. package/dist/{getValidatorQueuedOperatorAddress-BcyxE9uw.d.ts → getValidatorQueuedOperatorAddress-Dw5KN5sh.d.ts} +2 -2
  45. package/dist/{global.d-5w_lvl2J.d.ts → global.d-BuGDKh4k.d.ts} +4 -240
  46. package/dist/hooks/exports.d.ts +69 -211
  47. package/dist/hooks/exports.mjs +7434 -4
  48. package/dist/hooks/governance/exports.d.ts +181 -0
  49. package/dist/hooks/governance/exports.mjs +888 -0
  50. package/dist/pol.d-CqPA9K6m.d.ts +142 -0
  51. package/dist/{txnEnum-7_o92X3N.d.cts → txnEnum-ByI5dtDi.d.ts} +2 -60
  52. package/dist/types/exports.d.ts +9 -9
  53. package/dist/types/exports.mjs +0 -1
  54. package/dist/types/governance/exports.d.ts +109 -0
  55. package/dist/types/governance/exports.mjs +0 -0
  56. package/dist/{useHoneySwapState-B494PQDl.d.ts → useHoneySwapState-vFmuFF0g.d.ts} +1 -1
  57. package/dist/utils/exports.d.ts +15 -6
  58. package/dist/utils/exports.mjs +825 -2
  59. package/package.json +49 -13
  60. package/src/actions/__test/transports.ts +61 -0
  61. package/src/actions/clients/exports.ts +4 -0
  62. package/src/actions/clients/getApolloClient.ts +58 -23
  63. package/src/actions/clients/getEnsoClient.ts +20 -9
  64. package/src/actions/dex/aggregators/enso/enso.ts +27 -17
  65. package/src/actions/dex/aggregators/enso/ensoErc4626.ts +2 -2
  66. package/src/actions/dex/aggregators/kyberswap.ts +18 -23
  67. package/src/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.ts +3 -6
  68. package/src/actions/exports.ts +4 -9
  69. package/src/actions/governance/exports.ts +9 -0
  70. package/src/actions/governance/getAllProposals.ts +10 -65
  71. package/src/actions/governance/getProposalDetails.ts +6 -33
  72. package/src/actions/governance/getProposalVotes.ts +8 -15
  73. package/src/actions/honey/getChartData.ts +27 -21
  74. package/src/actions/honey/getHoney24hVolume.ts +19 -22
  75. package/src/actions/pol/getAutoclaimedIncentives.ts +30 -0
  76. package/src/actions/pol/getBeraTokenTotalSupply.ts +45 -0
  77. package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +35 -0
  78. package/src/actions/pol/getEarnedStakedBeraVault.ts +7 -11
  79. package/src/actions/pol/getGlobalData.ts +1 -0
  80. package/src/actions/pol/getHeroEarnVaults.ts +62 -0
  81. package/src/actions/pol/getIncentiveFeeClaimStats.ts +19 -38
  82. package/src/actions/pol/getSWBeraVaultMetadata.ts +1 -1
  83. package/src/actions/pol/getStakingDailyAssets.ts +7 -10
  84. package/src/actions/server/exports.ts +1 -0
  85. package/src/actions/server/getDailyValidatorBlockStats.ts +33 -0
  86. package/src/actions/tokens/getWalletBalances.integration.test.ts +3 -6
  87. package/src/actions/transactions/beraWriteContract.integration.test.ts +3 -6
  88. package/src/actions/validators/getDailyValidatorBlockStats.ts +25 -24
  89. package/src/actions/validators/getValidatorAnalytics.ts +20 -21
  90. package/src/actions/validators/getValidatorIncentiveDistribution.ts +33 -0
  91. package/src/enum/contracts.ts +1 -0
  92. package/src/enum/exports.ts +0 -1
  93. package/src/enum/governance/exports.ts +1 -0
  94. package/src/errors/BeraError.ts +47 -7
  95. package/src/errors/BeraTracing.unit.test.ts +65 -0
  96. package/src/errors/RequestError.ts +13 -1
  97. package/src/errors/exports.ts +5 -0
  98. package/src/errors/getRevertReason.integration.test.ts +3 -3
  99. package/src/errors/spanStatus.ts +78 -0
  100. package/src/errors/spanStatus.unit.test.ts +62 -0
  101. package/src/hooks/dex/useCreatePool.ts +1 -88
  102. package/src/hooks/dex/useOnChainPoolData.ts +27 -2
  103. package/src/hooks/dex/usePriceImpact.ts +12 -5
  104. package/src/hooks/enso/useBendDemultiply.ts +9 -1
  105. package/src/hooks/enso/useBendMultiply.ts +9 -1
  106. package/src/hooks/enso/useBendZapSupply.ts +26 -7
  107. package/src/hooks/enso/useEnsoSwapBundle.ts +17 -3
  108. package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +13 -2
  109. package/src/hooks/exports.ts +2 -15
  110. package/src/hooks/governance/exports.ts +14 -0
  111. package/src/hooks/pol/useAutoclaimedIncentives.ts +49 -0
  112. package/src/hooks/pol/useStakedAPR.ts +2 -2
  113. package/src/hooks/pol/useStakedSnapshots.ts +5 -9
  114. package/src/hooks/validators/useValidator.ts +2 -0
  115. package/src/hooks/validators/useValidatorIncentiveDistribution.ts +39 -0
  116. package/src/types/bribe-boost.d.ts +8 -0
  117. package/src/types/exports.ts +0 -1
  118. package/src/types/governance/exports.ts +1 -0
  119. package/src/utils/beraFetch.ts +9 -3
  120. package/src/utils/exports.ts +1 -0
  121. package/src/utils/getServerSideClient.ts +4 -2
  122. package/src/utils/sanitizeRpcUrl.ts +22 -0
  123. package/src/utils/tracedTransport.ts +35 -0
  124. package/dist/BeraError-_mQdkanr.d.ts +0 -94
  125. package/dist/BexStatusProvider-DRymVlQf.d.cts +0 -70
  126. package/dist/HoneyConfigProvider-DfkjmzEf.d.cts +0 -390
  127. package/dist/RequestError-DSUzJ1Iy.d.cts +0 -144
  128. package/dist/abi/exports.cjs +0 -2
  129. package/dist/abi/exports.cjs.map +0 -1
  130. package/dist/abi/exports.d.cts +0 -6574
  131. package/dist/abi/exports.mjs.map +0 -1
  132. package/dist/actions/exports.cjs +0 -2
  133. package/dist/actions/exports.cjs.map +0 -1
  134. package/dist/actions/exports.d.cts +0 -1650
  135. package/dist/actions/exports.mjs.map +0 -1
  136. package/dist/chunk-45HIEVNI.cjs +0 -4
  137. package/dist/chunk-45HIEVNI.cjs.map +0 -1
  138. package/dist/chunk-47ILYVHC.mjs +0 -2
  139. package/dist/chunk-47ILYVHC.mjs.map +0 -1
  140. package/dist/chunk-575OK77P.mjs +0 -2
  141. package/dist/chunk-575OK77P.mjs.map +0 -1
  142. package/dist/chunk-5NVZG5N6.mjs +0 -2
  143. package/dist/chunk-5NVZG5N6.mjs.map +0 -1
  144. package/dist/chunk-6DIA6PXV.cjs +0 -2
  145. package/dist/chunk-6DIA6PXV.cjs.map +0 -1
  146. package/dist/chunk-6JJIZCVY.cjs +0 -2
  147. package/dist/chunk-6JJIZCVY.cjs.map +0 -1
  148. package/dist/chunk-7F72ZH4Q.mjs +0 -2
  149. package/dist/chunk-7F72ZH4Q.mjs.map +0 -1
  150. package/dist/chunk-AUA42YIG.mjs +0 -4
  151. package/dist/chunk-AUA42YIG.mjs.map +0 -1
  152. package/dist/chunk-BC2WX6O6.cjs +0 -2
  153. package/dist/chunk-BC2WX6O6.cjs.map +0 -1
  154. package/dist/chunk-CJOZC5Z2.cjs +0 -2
  155. package/dist/chunk-CJOZC5Z2.cjs.map +0 -1
  156. package/dist/chunk-D6L7LTA2.cjs +0 -2
  157. package/dist/chunk-D6L7LTA2.cjs.map +0 -1
  158. package/dist/chunk-DDEQFR3M.cjs +0 -2
  159. package/dist/chunk-DDEQFR3M.cjs.map +0 -1
  160. package/dist/chunk-GXV2JA36.mjs +0 -2
  161. package/dist/chunk-GXV2JA36.mjs.map +0 -1
  162. package/dist/chunk-ISYNEDET.mjs +0 -2
  163. package/dist/chunk-ISYNEDET.mjs.map +0 -1
  164. package/dist/chunk-JDDRTHFG.mjs +0 -2
  165. package/dist/chunk-JDDRTHFG.mjs.map +0 -1
  166. package/dist/chunk-JDZGYU5T.mjs +0 -2
  167. package/dist/chunk-JDZGYU5T.mjs.map +0 -1
  168. package/dist/chunk-LVOXBZMA.cjs +0 -2
  169. package/dist/chunk-LVOXBZMA.cjs.map +0 -1
  170. package/dist/chunk-MK5NS5B5.mjs +0 -2
  171. package/dist/chunk-MK5NS5B5.mjs.map +0 -1
  172. package/dist/chunk-NAXAZJJY.mjs +0 -2
  173. package/dist/chunk-NAXAZJJY.mjs.map +0 -1
  174. package/dist/chunk-NLVWRMGD.mjs +0 -2
  175. package/dist/chunk-NLVWRMGD.mjs.map +0 -1
  176. package/dist/chunk-OGBD5YOG.mjs +0 -2
  177. package/dist/chunk-OGBD5YOG.mjs.map +0 -1
  178. package/dist/chunk-OGJMSGB2.mjs +0 -2
  179. package/dist/chunk-OGJMSGB2.mjs.map +0 -1
  180. package/dist/chunk-OIYXOKTT.cjs +0 -2
  181. package/dist/chunk-OIYXOKTT.cjs.map +0 -1
  182. package/dist/chunk-OUD27MU7.cjs +0 -2
  183. package/dist/chunk-OUD27MU7.cjs.map +0 -1
  184. package/dist/chunk-PRLVZIKD.mjs +0 -2
  185. package/dist/chunk-PRLVZIKD.mjs.map +0 -1
  186. package/dist/chunk-Q2SNRLW3.cjs +0 -2
  187. package/dist/chunk-Q2SNRLW3.cjs.map +0 -1
  188. package/dist/chunk-REWME3FY.cjs +0 -2
  189. package/dist/chunk-REWME3FY.cjs.map +0 -1
  190. package/dist/chunk-RJN36GBU.mjs +0 -2
  191. package/dist/chunk-RJN36GBU.mjs.map +0 -1
  192. package/dist/chunk-RWOICHRW.cjs +0 -2
  193. package/dist/chunk-RWOICHRW.cjs.map +0 -1
  194. package/dist/chunk-S4CDSVLK.cjs +0 -2
  195. package/dist/chunk-S4CDSVLK.cjs.map +0 -1
  196. package/dist/chunk-SFEULGSX.cjs +0 -2
  197. package/dist/chunk-SFEULGSX.cjs.map +0 -1
  198. package/dist/chunk-WBTS6KFG.mjs +0 -2
  199. package/dist/chunk-WBTS6KFG.mjs.map +0 -1
  200. package/dist/chunk-WRFDB3QJ.cjs +0 -2
  201. package/dist/chunk-WRFDB3QJ.cjs.map +0 -1
  202. package/dist/chunk-XNJLSA6P.cjs +0 -2
  203. package/dist/chunk-XNJLSA6P.cjs.map +0 -1
  204. package/dist/contexts/exports.cjs +0 -2
  205. package/dist/contexts/exports.cjs.map +0 -1
  206. package/dist/contexts/exports.d.cts +0 -66
  207. package/dist/contexts/exports.mjs.map +0 -1
  208. package/dist/defaultFlags-D6KfkTZx.d.cts +0 -10
  209. package/dist/dex-C_BB0b0O.d.cts +0 -37
  210. package/dist/enum/exports.cjs +0 -2
  211. package/dist/enum/exports.cjs.map +0 -1
  212. package/dist/enum/exports.d.cts +0 -23
  213. package/dist/enum/exports.mjs.map +0 -1
  214. package/dist/errors/exports.cjs +0 -2
  215. package/dist/errors/exports.cjs.map +0 -1
  216. package/dist/errors/exports.d.cts +0 -327
  217. package/dist/errors/exports.mjs.map +0 -1
  218. package/dist/getValidatorQueuedOperatorAddress-Cql_D50j.d.cts +0 -562
  219. package/dist/global.d-B7IeayVX.d.cts +0 -474
  220. package/dist/honey-CYm0RWf4.d.cts +0 -14
  221. package/dist/hooks/exports.cjs +0 -4
  222. package/dist/hooks/exports.cjs.map +0 -1
  223. package/dist/hooks/exports.d.cts +0 -1734
  224. package/dist/hooks/exports.mjs.map +0 -1
  225. package/dist/polling-BKnyavLI.d.cts +0 -8
  226. package/dist/txnEnum-7_o92X3N.d.ts +0 -164
  227. package/dist/types/exports.cjs +0 -1
  228. package/dist/types/exports.cjs.map +0 -1
  229. package/dist/types/exports.d.cts +0 -90
  230. package/dist/types/exports.mjs.map +0 -1
  231. package/dist/useHoneySwapState-D6vpv19r.d.cts +0 -32
  232. package/dist/utils/exports.cjs +0 -2
  233. package/dist/utils/exports.cjs.map +0 -1
  234. package/dist/utils/exports.d.cts +0 -420
  235. package/dist/utils/exports.mjs.map +0 -1
  236. package/src/actions/dex/getIsTokenExploited.ts +0 -63
  237. package/src/hooks/dex/useExploitedTokens.ts +0 -57
@@ -0,0 +1,142 @@
1
+ import { Address } from 'viem';
2
+ import { a as TokenWithMetadata, b as Token } from './HoneyConfigProvider-Dkj-_a5x.js';
3
+ import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
4
+
5
+ interface BribeBoostReward {
6
+ token: string;
7
+ total_unclaimed: string;
8
+ }
9
+
10
+ interface BribeBoostRewardItem {
11
+ rewards: BribeBoostReward[];
12
+ validator: string;
13
+ }
14
+
15
+ interface BribeBoostRewardProof {
16
+ validator?: string;
17
+ pagination: {
18
+ next: number;
19
+ previous: number;
20
+ record_per_page: number;
21
+ current_page: number;
22
+ total_page: number;
23
+ };
24
+ rewards:
25
+ | {
26
+ id: string;
27
+ dist_id: string;
28
+ token: Address;
29
+ recipient: string;
30
+ amount: string;
31
+ merkle_proof: string[];
32
+ available_at: number;
33
+ }[]
34
+ | null;
35
+ }
36
+
37
+ // Response shape of GET /api/v1/wallets/:wallet/autoclaimed:
38
+ // { [wallet]: { [validatorPubkey]: { [tokenAddress]: rawAmount (stringified bigint) } } }
39
+ // Top-level wallet key is the lowercase wallet address that was queried.
40
+ type AutoclaimedIncentivesResponse = Record<
41
+ Address,
42
+ Record<Address, Record<Address, string>>
43
+ >;
44
+
45
+ interface BribeBoostValidatorApr {
46
+ id: string;
47
+ boost_total_bgt: string;
48
+ rewards_total_usd: string;
49
+ daily_rate: string;
50
+ apr: string;
51
+ apy: string;
52
+ tokens: Address[]; // Confirm this type with backend real data
53
+ validator: string;
54
+ start_block: number;
55
+ end_block: number;
56
+ start_timestamp: number;
57
+ end_timestamp: number;
58
+ created_at: string;
59
+ updated_at: string;
60
+ }
61
+
62
+ interface ProtocolMetadata {
63
+ name: string;
64
+ logoURI: string;
65
+ url: string;
66
+ description: string;
67
+ tags?: string[];
68
+ }
69
+
70
+ /**
71
+ * Configuration for a single staking option.
72
+ * Maps receipt tokens to their accepted input tokens.
73
+ */
74
+ type StakingConfig = {
75
+ /** Unique identifier for this staking config */
76
+ id: string;
77
+ /** The token received when staking (e.g., sWBERA, siBERA) */
78
+ receiptToken: TokenWithMetadata;
79
+ /** Tokens that can be staked to receive the receipt token */
80
+ inputTokens: TokenWithMetadata[];
81
+ };
82
+
83
+ type IncentiveReward = {
84
+ tokenMetadata: Token | undefined;
85
+ tokenPrice: number;
86
+ tokenValue: number;
87
+ id: string;
88
+ dist_id: string;
89
+ token: string;
90
+ recipient: string;
91
+ formattedAmount: string;
92
+ amount: string;
93
+ merkle_proof: string[];
94
+ available_at: number;
95
+ };
96
+ interface IncentiveRewardChunksWithValidatorData {
97
+ validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
98
+ maxTimestamp: number | undefined;
99
+ minTimestamp: number | undefined;
100
+ totalValue: number;
101
+ tokenTotals: {
102
+ chainId: number;
103
+ address: Address;
104
+ amount: number;
105
+ value: number;
106
+ metadata: Token | undefined;
107
+ }[];
108
+ rewards: IncentiveReward[];
109
+ isCurrent: boolean;
110
+ }
111
+
112
+ interface AggregatedTokenTotals {
113
+ address: Address;
114
+ amount: number;
115
+ value: number;
116
+ metadata: Token | undefined;
117
+ chainId: number;
118
+ }
119
+
120
+ type ClaimedIncentives = Record<string, string>;
121
+
122
+ type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
123
+
124
+ interface UserVaultInfo {
125
+ balance: bigint;
126
+ delegatedBalance: bigint;
127
+ withdrawableBalance: bigint;
128
+ rewards: string;
129
+ percentage: string;
130
+ }
131
+
132
+ type StakedBeraAsset = {
133
+ token: TokenWithMetadata;
134
+ apr: number;
135
+ stakedAmount: number;
136
+ stakedAmountUsd: number;
137
+ earnedAmount: number;
138
+ earnedAmountUsd: number;
139
+ isLoadingEarnings?: boolean;
140
+ };
141
+
142
+ export type { AutoclaimedIncentivesResponse as A, BribeBoostRewardProof as B, ClaimedIncentives as C, IncentiveReward as I, ProtocolMetadata as P, StakingConfig as S, UserVaultInfo as U, BribeBoostRewardItem as a, StakedBeraAsset as b, AggregatedTokenTotals as c, BribeBoostReward as d, BribeBoostValidatorApr as e, ClaimedIncentivesLocalState as f, IncentiveRewardChunksWithValidatorData as g };
@@ -1,68 +1,10 @@
1
- /**
2
- * Maps the proposal state from the governor contract to a more human-readable format.
3
- * Don't edit this enum manually, it's synced with the governor contract.
4
- *
5
- * @see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/governance/IGovernor.sol
6
- */
7
- declare enum ProposalState {
8
- Pending = 0,
9
- Active = 1,
10
- Canceled = 2,
11
- Defeated = 3,
12
- Succeeded = 4,
13
- Queued = 5,
14
- Expired = 6,
15
- Executed = 7
16
- }
17
- declare enum VoteEnum {
18
- AGAINST = "no",
19
- FOR = "yes",
20
- ABSTAIN = "abstain"
21
- }
22
- declare enum ProposalErrorCodes {
23
- REQUIRED = "Required",
24
- INVALID_AMOUNT = "Invalid amount",
25
- NEGATIVE_AMOUNT = "Negative amount",
26
- INVALID_ADDRESS = "Invalid address",
27
- INVALID_ACTION = "Invalid action",
28
- INVALID_ABI = "Invalid ABI",
29
- MUST_BE_HTTPS = "Must be HTTPS",
30
- MUST_BE_HTTPS_OR_IPFS = "Must be HTTPS or IPFS",
31
- INVALID_BASEPATH = "Must be a berachain forum link",
32
- /**
33
- * Mainly used when it's not a reward vault
34
- */
35
- INVALID_CONTRACT = "This is not a valid contract"
36
- }
37
- declare enum ProposalTypeEnum {
38
- CUSTOM_PROPOSAL = "custom-action",
39
- WHITELIST_REWARD_VAULT = "whitelist-reward-vault",
40
- BLACKLIST_REWARD_VAULT = "blacklist-reward-vault",
41
- ERC20_TRANSFER = "erc20-transfer",
42
- WHITELIST_REWARD_VAULT_INCENTIVE = "whitelist-reward-vault-incentive"
43
- }
44
- declare const VoteColorMap: {
45
- readonly yes: "#059669";
46
- readonly 1: "#059669";
47
- readonly no: "#DC2629";
48
- readonly 2: "#DC2629";
49
- readonly veto: "#0284C7";
50
- readonly 4: "#0284C7";
51
- readonly abstain: "#78716c";
52
- readonly 3: "#78716c";
53
- readonly yes_secondary: "#ECFDF5";
54
- readonly no_secondary: "#FEF2F2";
55
- readonly veto_secondary: "#F0F9FF";
56
- readonly abstain_secondary: "#E7E5E4";
57
- readonly default: "#57534e";
58
- };
59
-
60
1
  /**
61
2
  * A list of contract names that are not mapped in the devrel's contract mapping or that are generated by factories (e.g. RewardVault).
62
3
  */
63
4
  declare enum ContractName {
64
5
  ENSO_ROUTER = "enso.router",
65
6
  POL_REWARD_VAULT = "pol.rewardVault",
7
+ POL_REWARD_VAULT_HELPER = "pol.rewardVaultHelper",
66
8
  BEX_POOL = "bex.pool",
67
9
  ERC20 = "others.erc20",
68
10
  ERC4626 = "others.erc4626",
@@ -161,4 +103,4 @@ declare enum TransactionActionType {
161
103
  BEND_CURATOR_SET_ALLOCATOR = "Bend Curator Set Allocator"
162
104
  }
163
105
 
164
- export { ContractName as C, ProposalErrorCodes as P, TransactionActionType as T, VoteColorMap as V, ProposalState as a, ProposalTypeEnum as b, VoteEnum as c };
106
+ export { ContractName as C, TransactionActionType as T };
@@ -1,19 +1,19 @@
1
- export { A as AggregatedTokenTotals, g as BribeBoostReward, b as BribeBoostRewardItem, B as BribeBoostRewardProof, h as BribeBoostValidatorApr, i as ClaimedIncentives, j as ClaimedIncentivesLocalState, C as CustomProposal, k as CustomProposalActionErrors, a as CustomProposalErrors, D as DefaultHookOptions, c as DefaultHookReturnType, G as GovernanceTopic, I as IContractWrite, l as IContractWriteFn, m as IncentiveReward, n as IncentiveRewardChunksWithValidatorData, o as PROPOSAL_GENRE, p as Proposal, q as ProposalAction, r as ProposalVotes, P as ProtocolMetadata, s as SafeProposalAction, d as StakedBeraAsset, S as StakingConfig, U as UserVaultInfo, V as VerifiedAbi, t as Vote, u as Voter } from '../global.d-5w_lvl2J.js';
2
- import { M as MinimalERC20 } from '../HoneyConfigProvider-DVP_9KZn.js';
3
- export { A as AllowanceQueryItem, j as AllowanceToken, B as BalanceToken, y as BexStatus, w as Calldata, H as HoneySwapActions, I as IAggregatorArgs, z as IAggregatorQuote, g as IRawAggregatorQuote, v as IUserPosition, h as PythPriceFeedMap, S as SwapRequest, b as Token, i as TokenCurrentPriceMap, x as TokenPriceInfo, t as TokenWithAmount, a as TokenWithMetadata, D as TokenWithPrice } from '../HoneyConfigProvider-DVP_9KZn.js';
1
+ export { c as AggregatedTokenTotals, A as AutoclaimedIncentivesResponse, d as BribeBoostReward, a as BribeBoostRewardItem, B as BribeBoostRewardProof, e as BribeBoostValidatorApr, C as ClaimedIncentives, f as ClaimedIncentivesLocalState, I as IncentiveReward, g as IncentiveRewardChunksWithValidatorData, P as ProtocolMetadata, b as StakedBeraAsset, S as StakingConfig, U as UserVaultInfo } from '../pol.d-CqPA9K6m.js';
2
+ import { M as MinimalERC20 } from '../HoneyConfigProvider-Dkj-_a5x.js';
3
+ export { A as AllowanceQueryItem, j as AllowanceToken, B as BalanceToken, y as BexStatus, x as Calldata, H as HoneySwapActions, I as IAggregatorArgs, z as IAggregatorQuote, g as IRawAggregatorQuote, v as IUserPosition, h as PythPriceFeedMap, S as SwapRequest, b as Token, i as TokenCurrentPriceMap, w as TokenPriceInfo, t as TokenWithAmount, a as TokenWithMetadata, D as TokenWithPrice } from '../HoneyConfigProvider-Dkj-_a5x.js';
4
4
  import { BundleData, EnsoClient } from '@ensofinance/sdk';
5
5
  import { TransactionRequest, Address, Hex, PublicClient } from 'viem';
6
- import '@berachain/graphql/governance';
7
- import '../txnEnum-7_o92X3N.js';
6
+ export { D as DefaultHookOptions, a as DefaultHookReturnType, I as IContractWrite, c as IContractWriteFn } from '../global.d-BuGDKh4k.js';
8
7
  import '@berachain/graphql/pol/api';
9
- import '@wagmi/core';
10
- import 'swr';
11
- import '@berachain/config';
12
- import '../BeraError-_mQdkanr.js';
13
8
  import 'react/jsx-runtime';
14
9
  import 'react';
15
10
  import '@berachain-foundation/berancer-sdk';
16
11
  import '../honey-CYm0RWf4.js';
12
+ import '@wagmi/core';
13
+ import 'swr';
14
+ import '@berachain/config';
15
+ import '../txnEnum-ByI5dtDi.js';
16
+ import '../BeraError-7-A5JYy_.js';
17
17
 
18
18
  type Quantity = string | number;
19
19
  type ActionOutputReference<T> = T | StrictOutputReference<T>;
@@ -1 +0,0 @@
1
- //# sourceMappingURL=exports.mjs.map
@@ -0,0 +1,109 @@
1
+ import { Address, Hex, AbiFunction } from 'viem';
2
+ import { ProposalWithVotesFragment, ProposalVoteFragment } from '@berachain/graphql/governance';
3
+ import { ProposalTypeEnum, ProposalErrorCodes } from '../../enum/governance/exports.js';
4
+
5
+ type Proposal = ProposalWithVotesFragment;
6
+
7
+ type Vote = ProposalVoteFragment;
8
+
9
+ type Voter = Address;
10
+
11
+ type ProposalVotes = {
12
+ yes: number;
13
+ no: number;
14
+ abstain: number;
15
+ };
16
+
17
+ type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
18
+
19
+ type CustomProposalActionErrors = {
20
+ type?: null | ProposalErrorCodes;
21
+ target?: null | ProposalErrorCodes;
22
+ value?: null | ProposalErrorCodes;
23
+ ABI?: null | ProposalErrorCodes;
24
+ functionSignature?: null | ProposalErrorCodes;
25
+ args?: (null | ProposalErrorCodes)[];
26
+ vault?: null | ProposalErrorCodes;
27
+ isFriend?: null | ProposalErrorCodes;
28
+ to?: null | ProposalErrorCodes;
29
+ amount?: null | ProposalErrorCodes;
30
+ minIncentiveRate?: null | ProposalErrorCodes;
31
+ managerAddress?: null | ProposalErrorCodes;
32
+ input?: null | ProposalErrorCodes;
33
+ token?: null | ProposalErrorCodes;
34
+ rawCalldata?: null | ProposalErrorCodes;
35
+ message?: null | ProposalErrorCodes;
36
+ } | null;
37
+
38
+ type CustomProposalErrors = {
39
+ title?: null | ProposalErrorCodes;
40
+ description?: null | ProposalErrorCodes;
41
+ forumLink?: null | ProposalErrorCodes;
42
+ actions?: CustomProposalActionErrors[];
43
+ };
44
+
45
+ type GovernanceTopic = {
46
+ id: PROPOSAL_GENRE;
47
+ color: string;
48
+ icon: React.ReactNode;
49
+ iconBackground?: string;
50
+ name: string;
51
+ slug: string;
52
+ forumLink: string;
53
+ description?: string;
54
+ comingSoon?: boolean;
55
+ };
56
+ type CustomProposal = {
57
+ title: string;
58
+ description: any;
59
+ actions: ProposalAction[];
60
+ forumLink: string;
61
+ topic: Set<PROPOSAL_GENRE>;
62
+ };
63
+
64
+ type SafeProposalAction = {
65
+ value: bigint;
66
+ target: "" | Address;
67
+ } & (
68
+ | {
69
+ type: ProposalTypeEnum.CUSTOM_PROPOSAL;
70
+ input: "ABI" | "rawCalldata" | "message";
71
+ ABI: string;
72
+ _isVerifiedAbi?: boolean;
73
+ functionSignature: string;
74
+ args: string[];
75
+ rawCalldata: Hex;
76
+ message: string;
77
+ }
78
+ | {
79
+ type:
80
+ | ProposalTypeEnum.WHITELIST_REWARD_VAULT
81
+ | ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
82
+ vault: Address;
83
+ }
84
+ | {
85
+ type: ProposalTypeEnum.ERC20_TRANSFER;
86
+ to: Address;
87
+ amount: string;
88
+ }
89
+ | {
90
+ type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
91
+ vault: Address;
92
+ token: Address;
93
+ minIncentiveRate: string;
94
+ managerAddress: Address;
95
+ }
96
+ );
97
+
98
+ type ProposalAction = Partial<SafeProposalAction> & {
99
+ type: SafeProposalAction["type"];
100
+ };
101
+
102
+ type VerifiedAbi = {
103
+ abiItem?: AbiFunction;
104
+ functionName?: string;
105
+ args: readonly unknown[];
106
+ functionSignature?: string;
107
+ };
108
+
109
+ export type { CustomProposal, CustomProposalActionErrors, CustomProposalErrors, GovernanceTopic, PROPOSAL_GENRE, Proposal, ProposalAction, ProposalVotes, SafeProposalAction, VerifiedAbi, Vote, Voter };
File without changes
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-DVP_9KZn.js';
2
+ import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-Dkj-_a5x.js';
3
3
 
4
4
  interface IHoneySwapState {
5
5
  actionType: "mint" | "redeem";
@@ -1,20 +1,20 @@
1
1
  export { d as defaultBeraFlags } from '../defaultFlags-D6KfkTZx.js';
2
- import { R as RequestError, S as SpanContext } from '../RequestError-BRIiJgHk.js';
2
+ import { R as RequestError, S as SpanContext } from '../RequestError-DBOIV65x.js';
3
3
  import BigNumber from '@berachain/utils/pkg/bignumber.js';
4
4
  import * as viem from 'viem';
5
- import { Address, PublicClient } from 'viem';
5
+ import { Address, PublicClient, Transport } from 'viem';
6
6
  import * as _berachain_config_internal from '@berachain/config/internal';
7
7
  import { ChainId, BeraConfig } from '@berachain/config/internal';
8
- import { I as IHoneySwapState } from '../useHoneySwapState-B494PQDl.js';
8
+ import { I as IHoneySwapState } from '../useHoneySwapState-vFmuFF0g.js';
9
9
  import * as _berachain_graphql_bend_whisk from '@berachain/graphql/bend/whisk';
10
10
  import { TokenInfoFragmentFragment } from '@berachain/graphql/bend/whisk';
11
11
  import * as _berachain_config from '@berachain/config';
12
12
  import { GqlValidatorBlockUptimeStatus } from '@berachain/graphql/pol/api';
13
13
  import '@berachain/config/internal/flags';
14
14
  import '@apollo/client';
15
- import '../BeraError-_mQdkanr.js';
15
+ import '../BeraError-7-A5JYy_.js';
16
16
  import 'react';
17
- import '../HoneyConfigProvider-DVP_9KZn.js';
17
+ import '../HoneyConfigProvider-Dkj-_a5x.js';
18
18
  import 'react/jsx-runtime';
19
19
  import '@berachain-foundation/berancer-sdk';
20
20
  import '../honey-CYm0RWf4.js';
@@ -394,6 +394,15 @@ type BaseToken = {
394
394
  declare function wrapNativeToken<T extends BaseToken>(token: T): T;
395
395
  declare function wrapNativeTokens<T extends BaseToken>(tokens: T[]): T[];
396
396
 
397
+ /**
398
+ * Wraps a viem Transport to trace each RPC request via BeraTracing.
399
+ *
400
+ * Each `request()` call is wrapped in a span with the JSON-RPC method name,
401
+ * transport type, and URL as attributes. Works with `http()`, `fallback()`,
402
+ * and any other viem transport.
403
+ */
404
+ declare function tracedTransport<T extends Transport>(transport: T): T;
405
+
397
406
  /**
398
407
  * Truncate a transaction or address hash and optionally format with uppercase letters and a lowercase 'x'.
399
408
  */
@@ -417,4 +426,4 @@ declare function isValidatorProposer(status: GqlValidatorBlockUptimeStatus | und
417
426
  */
418
427
  declare function isValidatorSigner(status: GqlValidatorBlockUptimeStatus | undefined): boolean | undefined;
419
428
 
420
- export { type BigNumberValue, CAP_LIMIT_BUFFER, DEFAULT_METAMASK_GAS_LIMIT, type FormatNumberOptions, type LayerZeroDeliveredMessage, type LayerZeroMessage, LayerZeroMessageStatus, MAX_CUSTOM_DEADLINE, MAX_CUSTOM_SLIPPAGE, MIN_CUSTOM_DEADLINE, MIN_CUSTOM_SLIPPAGE, type WaitForMessageReceivedOptions, beraFetch, beraFetchJson, calculateTimestampFromDays, computePriceImpact, days, daysInSeconds, formatInputTokenValue, formatNumber, formatTimeLeft, formatUnixTimestamp, formatUsd, getContractName, getHoneySwapMessage, getHoneyToken, getPythDefaultUpdateFee, getSafeNumber, getServerSidePublicClient, getTestClient, hours, hoursInSeconds, beraToken as internal_beraToken, wBeraToken as internal_wBeraToken, isDifferenceExceedingThreshold, isSubgraphStale, isToken, isValidatorProposer, isValidatorSigner, minutes, minutesInSeconds, months, monthsInSeconds, msToSeconds, parseBaseArgs, parseWhiskToken, seconds, truncateDecimal, truncateHash, waitForLayerZeroMessageReceived, weeks, weeksInSeconds, wrapNativeToken, wrapNativeTokens, years, yearsInSeconds };
429
+ export { type BigNumberValue, CAP_LIMIT_BUFFER, DEFAULT_METAMASK_GAS_LIMIT, type FormatNumberOptions, type LayerZeroDeliveredMessage, type LayerZeroMessage, LayerZeroMessageStatus, MAX_CUSTOM_DEADLINE, MAX_CUSTOM_SLIPPAGE, MIN_CUSTOM_DEADLINE, MIN_CUSTOM_SLIPPAGE, type WaitForMessageReceivedOptions, beraFetch, beraFetchJson, calculateTimestampFromDays, computePriceImpact, days, daysInSeconds, formatInputTokenValue, formatNumber, formatTimeLeft, formatUnixTimestamp, formatUsd, getContractName, getHoneySwapMessage, getHoneyToken, getPythDefaultUpdateFee, getSafeNumber, getServerSidePublicClient, getTestClient, hours, hoursInSeconds, beraToken as internal_beraToken, wBeraToken as internal_wBeraToken, isDifferenceExceedingThreshold, isSubgraphStale, isToken, isValidatorProposer, isValidatorSigner, minutes, minutesInSeconds, months, monthsInSeconds, msToSeconds, parseBaseArgs, parseWhiskToken, seconds, tracedTransport, truncateDecimal, truncateHash, waitForLayerZeroMessageReceived, weeks, weeksInSeconds, wrapNativeToken, wrapNativeTokens, years, yearsInSeconds };