@berachain/berajs 0.2.8-beta.0 → 0.2.8-beta.10

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 (221) hide show
  1. package/dist/RequestError-BRIiJgHk.d.ts +144 -0
  2. package/dist/RequestError-DSUzJ1Iy.d.cts +144 -0
  3. package/dist/abi/exports.cjs.map +1 -1
  4. package/dist/actions/exports.cjs +1 -1
  5. package/dist/actions/exports.cjs.map +1 -1
  6. package/dist/actions/exports.d.cts +22 -105
  7. package/dist/actions/exports.d.ts +22 -105
  8. package/dist/actions/exports.mjs +1 -1
  9. package/dist/actions/exports.mjs.map +1 -1
  10. package/dist/actions/governance/exports.cjs +2 -0
  11. package/dist/actions/governance/exports.cjs.map +1 -0
  12. package/dist/actions/governance/exports.d.cts +140 -0
  13. package/dist/actions/governance/exports.d.ts +140 -0
  14. package/dist/actions/governance/exports.mjs +2 -0
  15. package/dist/actions/governance/exports.mjs.map +1 -0
  16. package/dist/chunk-33XNWMPP.cjs +2 -0
  17. package/dist/chunk-33XNWMPP.cjs.map +1 -0
  18. package/dist/chunk-4TALWNXE.cjs +2 -0
  19. package/dist/chunk-4TALWNXE.cjs.map +1 -0
  20. package/dist/chunk-54BTOQE3.cjs +2 -0
  21. package/dist/chunk-54BTOQE3.cjs.map +1 -0
  22. package/dist/chunk-5QAFKFM5.mjs +2 -0
  23. package/dist/chunk-5QAFKFM5.mjs.map +1 -0
  24. package/dist/chunk-6DIA6PXV.cjs +2 -0
  25. package/dist/chunk-6DIA6PXV.cjs.map +1 -0
  26. package/dist/{chunk-NMH7LHPW.cjs → chunk-6JJIZCVY.cjs} +2 -2
  27. package/dist/chunk-6JJIZCVY.cjs.map +1 -0
  28. package/dist/chunk-BE6B4PQF.cjs +2 -0
  29. package/dist/chunk-BE6B4PQF.cjs.map +1 -0
  30. package/dist/chunk-CHFETMC6.cjs +4 -0
  31. package/dist/chunk-CHFETMC6.cjs.map +1 -0
  32. package/dist/{chunk-I7M43BB4.cjs → chunk-D6L7LTA2.cjs} +2 -2
  33. package/dist/chunk-D6L7LTA2.cjs.map +1 -0
  34. package/dist/chunk-DDEQFR3M.cjs.map +1 -1
  35. package/dist/chunk-ENT2OSXT.mjs +2 -0
  36. package/dist/chunk-ENT2OSXT.mjs.map +1 -0
  37. package/dist/{chunk-74QD4JAH.mjs → chunk-GXV2JA36.mjs} +2 -2
  38. package/dist/chunk-GXV2JA36.mjs.map +1 -0
  39. package/dist/chunk-H6ZO4SLB.mjs +4 -0
  40. package/dist/chunk-H6ZO4SLB.mjs.map +1 -0
  41. package/dist/chunk-JDDRTHFG.mjs +2 -0
  42. package/dist/chunk-JDDRTHFG.mjs.map +1 -0
  43. package/dist/{chunk-T5FSQ3YE.mjs → chunk-JDZGYU5T.mjs} +2 -2
  44. package/dist/{chunk-T5FSQ3YE.mjs.map → chunk-JDZGYU5T.mjs.map} +1 -1
  45. package/dist/chunk-JIPSTWKO.mjs +2 -0
  46. package/dist/{chunk-COMMLZ3O.mjs.map → chunk-JIPSTWKO.mjs.map} +1 -1
  47. package/dist/chunk-JSTCUTXP.cjs +2 -0
  48. package/dist/chunk-JSTCUTXP.cjs.map +1 -0
  49. package/dist/{chunk-MJZHJFZO.mjs → chunk-JXM5S4IU.mjs} +2 -2
  50. package/dist/chunk-K5L2B4DU.mjs +2 -0
  51. package/dist/{chunk-FM3WDBFH.mjs.map → chunk-K5L2B4DU.mjs.map} +1 -1
  52. package/dist/chunk-KUQEX7H3.mjs +2 -0
  53. package/dist/chunk-KUQEX7H3.mjs.map +1 -0
  54. package/dist/chunk-NXXMW2O7.mjs +2 -0
  55. package/dist/chunk-NXXMW2O7.mjs.map +1 -0
  56. package/dist/chunk-OIYXOKTT.cjs.map +1 -1
  57. package/dist/chunk-OUD27MU7.cjs.map +1 -1
  58. package/dist/chunk-PRLVZIKD.mjs +2 -0
  59. package/dist/chunk-PRLVZIKD.mjs.map +1 -0
  60. package/dist/chunk-QVIAMSZ6.cjs +2 -0
  61. package/dist/chunk-QVIAMSZ6.cjs.map +1 -0
  62. package/dist/chunk-RCWM55DE.cjs +2 -0
  63. package/dist/chunk-RCWM55DE.cjs.map +1 -0
  64. package/dist/chunk-REWME3FY.cjs +2 -0
  65. package/dist/chunk-REWME3FY.cjs.map +1 -0
  66. package/dist/chunk-RJN36GBU.mjs +2 -0
  67. package/dist/chunk-RJN36GBU.mjs.map +1 -0
  68. package/dist/chunk-RWOICHRW.cjs.map +1 -1
  69. package/dist/chunk-S4CDSVLK.cjs +2 -0
  70. package/dist/chunk-S4CDSVLK.cjs.map +1 -0
  71. package/dist/chunk-WLJHFHKF.mjs +2 -0
  72. package/dist/chunk-WLJHFHKF.mjs.map +1 -0
  73. package/dist/chunk-WRFDB3QJ.cjs.map +1 -1
  74. package/dist/chunk-XNJLSA6P.cjs.map +1 -1
  75. package/dist/chunk-XZC34BHM.cjs +2 -0
  76. package/dist/chunk-XZC34BHM.cjs.map +1 -0
  77. package/dist/chunk-Y2FETC6T.cjs +2 -0
  78. package/dist/chunk-Y2FETC6T.cjs.map +1 -0
  79. package/dist/chunk-ZW2N63FI.mjs +2 -0
  80. package/dist/chunk-ZW2N63FI.mjs.map +1 -0
  81. package/dist/contexts/exports.cjs +1 -1
  82. package/dist/contexts/exports.cjs.map +1 -1
  83. package/dist/contexts/exports.mjs +1 -1
  84. package/dist/contexts/exports.mjs.map +1 -1
  85. package/dist/enum/exports.cjs +1 -1
  86. package/dist/enum/exports.cjs.map +1 -1
  87. package/dist/enum/exports.d.cts +1 -1
  88. package/dist/enum/exports.d.ts +1 -1
  89. package/dist/enum/exports.mjs +1 -1
  90. package/dist/enum/exports.mjs.map +1 -1
  91. package/dist/enum/governance/exports.cjs +2 -0
  92. package/dist/enum/governance/exports.cjs.map +1 -0
  93. package/dist/enum/governance/exports.d.cts +60 -0
  94. package/dist/enum/governance/exports.d.ts +60 -0
  95. package/dist/enum/governance/exports.mjs +2 -0
  96. package/dist/enum/governance/exports.mjs.map +1 -0
  97. package/dist/errors/exports.cjs +1 -1
  98. package/dist/errors/exports.cjs.map +1 -1
  99. package/dist/errors/exports.d.cts +3 -89
  100. package/dist/errors/exports.d.ts +3 -89
  101. package/dist/errors/exports.mjs +1 -1
  102. package/dist/{getValidatorQueuedOperatorAddress-BfKrMaui.d.cts → getValidatorQueuedOperatorAddress-CPuIw7n5.d.cts} +2 -2
  103. package/dist/{getValidatorQueuedOperatorAddress-Bef1e1c_.d.ts → getValidatorQueuedOperatorAddress-CbZQ0kv2.d.ts} +2 -2
  104. package/dist/{global.d-DW7dpBsz.d.cts → global.d-B2WavzCY.d.cts} +3 -239
  105. package/dist/{global.d-CrPSEwwf.d.ts → global.d-D8byjWYx.d.ts} +3 -239
  106. package/dist/hooks/exports.cjs +3 -3
  107. package/dist/hooks/exports.cjs.map +1 -1
  108. package/dist/hooks/exports.d.cts +19 -198
  109. package/dist/hooks/exports.d.ts +19 -198
  110. package/dist/hooks/exports.mjs +3 -3
  111. package/dist/hooks/exports.mjs.map +1 -1
  112. package/dist/hooks/governance/exports.cjs +2 -0
  113. package/dist/hooks/governance/exports.cjs.map +1 -0
  114. package/dist/hooks/governance/exports.d.cts +181 -0
  115. package/dist/hooks/governance/exports.d.ts +181 -0
  116. package/dist/hooks/governance/exports.mjs +2 -0
  117. package/dist/hooks/governance/exports.mjs.map +1 -0
  118. package/dist/pol.d-o6Iw75bK.d.cts +134 -0
  119. package/dist/pol.d-qR8bGEP5.d.ts +134 -0
  120. package/dist/{txnEnum-CCuQUFlh.d.cts → txnEnum-CwAJN4zV.d.cts} +3 -60
  121. package/dist/{txnEnum-CCuQUFlh.d.ts → txnEnum-CwAJN4zV.d.ts} +3 -60
  122. package/dist/types/exports.cjs.map +1 -1
  123. package/dist/types/exports.d.cts +7 -7
  124. package/dist/types/exports.d.ts +7 -7
  125. package/dist/types/governance/exports.cjs +1 -0
  126. package/dist/types/governance/exports.cjs.map +1 -0
  127. package/dist/types/governance/exports.d.cts +109 -0
  128. package/dist/types/governance/exports.d.ts +109 -0
  129. package/dist/types/governance/exports.mjs +1 -0
  130. package/dist/types/governance/exports.mjs.map +1 -0
  131. package/dist/utils/exports.cjs +1 -1
  132. package/dist/utils/exports.cjs.map +1 -1
  133. package/dist/utils/exports.d.cts +10 -2
  134. package/dist/utils/exports.d.ts +10 -2
  135. package/dist/utils/exports.mjs +1 -1
  136. package/dist/utils/exports.mjs.map +1 -1
  137. package/package.json +16 -7
  138. package/src/actions/clients/BeraApolloClient.ts +9 -0
  139. package/src/actions/clients/getApolloClient.ts +23 -6
  140. package/src/actions/dex/getOnChainPool.ts +1 -1
  141. package/src/actions/enso/getBendMultiplyBundle.ts +9 -2
  142. package/src/actions/enso/util.ts +6 -8
  143. package/src/actions/exports.ts +1 -10
  144. package/src/actions/governance/checkProposalField.ts +108 -54
  145. package/src/actions/governance/computeActualStatus.ts +7 -3
  146. package/src/actions/governance/exports.ts +9 -0
  147. package/src/actions/governance/getAllProposals.ts +15 -8
  148. package/src/actions/governance/getBodyErrors.ts +13 -5
  149. package/src/actions/governance/getDecodedFunctionData.ts +31 -22
  150. package/src/actions/governance/getProposalDetails.ts +8 -4
  151. package/src/actions/governance/getProposalFromTx.ts +19 -10
  152. package/src/actions/governance/getProposalParams.ts +17 -17
  153. package/src/actions/governance/getProposalVotes.ts +7 -3
  154. package/src/actions/governance/getQuorum.ts +7 -7
  155. package/src/actions/governance/parseProposalBody.ts +19 -9
  156. package/src/actions/honey/getChartData.ts +5 -5
  157. package/src/actions/honey/getHoney24hVolume.ts +30 -0
  158. package/src/actions/honey/getHoneyPythPriceOracle.ts +1 -1
  159. package/src/actions/honey/getHoneyRootPriceOracle.ts +1 -1
  160. package/src/actions/pol/getEarnedStakedBeraVault.ts +12 -2
  161. package/src/actions/pol/getRewardVaultBeaconImplementation.ts +1 -1
  162. package/src/actions/pol/getRewardVaultIncentives.ts +15 -15
  163. package/src/actions/pol/getStakingDailyAssets.ts +7 -1
  164. package/src/actions/pol/getTotalStakedAmount.ts +1 -1
  165. package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
  166. package/src/actions/pol/getUserVaultsReward.ts +1 -1
  167. package/src/actions/tokens/getTokenInformation.ts +8 -15
  168. package/src/actions/tokens/getUnderlyingToken.ts +1 -1
  169. package/src/actions/validators/getUserBoosts.ts +1 -1
  170. package/src/enum/exports.ts +0 -1
  171. package/src/enum/governance/exports.ts +1 -0
  172. package/src/enum/txnEnum.ts +2 -0
  173. package/src/errors/BeraError.ts +7 -2
  174. package/src/errors/RequestError.ts +2 -1
  175. package/src/hooks/dex/usePoolHistoricalData.ts +1 -1
  176. package/src/hooks/enso/useBendZapSupply.ts +1 -1
  177. package/src/hooks/exports.ts +1 -15
  178. package/src/hooks/governance/exports.ts +14 -0
  179. package/src/hooks/honey/useHoney24hVolume.ts +16 -0
  180. package/src/hooks/perps/usePythUpdateFee.ts +1 -1
  181. package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
  182. package/src/types/exports.ts +0 -1
  183. package/src/types/governance/exports.ts +1 -0
  184. package/src/utils/beraFetch.ts +70 -15
  185. package/src/utils/getErrorResponse.ts +1 -1
  186. package/dist/RequestError-A8XJ6QR9.d.cts +0 -57
  187. package/dist/RequestError-Dk97z8rm.d.ts +0 -57
  188. package/dist/chunk-2YBHAMDV.cjs +0 -2
  189. package/dist/chunk-2YBHAMDV.cjs.map +0 -1
  190. package/dist/chunk-57RINXU6.cjs +0 -2
  191. package/dist/chunk-57RINXU6.cjs.map +0 -1
  192. package/dist/chunk-74QD4JAH.mjs.map +0 -1
  193. package/dist/chunk-74WA35RI.cjs +0 -2
  194. package/dist/chunk-74WA35RI.cjs.map +0 -1
  195. package/dist/chunk-BEKH5EYT.mjs +0 -2
  196. package/dist/chunk-BEKH5EYT.mjs.map +0 -1
  197. package/dist/chunk-CF3LFNXG.cjs +0 -2
  198. package/dist/chunk-CF3LFNXG.cjs.map +0 -1
  199. package/dist/chunk-COMMLZ3O.mjs +0 -2
  200. package/dist/chunk-DK42F2ZM.cjs +0 -2
  201. package/dist/chunk-DK42F2ZM.cjs.map +0 -1
  202. package/dist/chunk-FCZ72ML6.mjs +0 -4
  203. package/dist/chunk-FCZ72ML6.mjs.map +0 -1
  204. package/dist/chunk-FM3WDBFH.mjs +0 -2
  205. package/dist/chunk-I7M43BB4.cjs.map +0 -1
  206. package/dist/chunk-IDFMLLDY.mjs +0 -2
  207. package/dist/chunk-IDFMLLDY.mjs.map +0 -1
  208. package/dist/chunk-LHR24OO7.cjs +0 -4
  209. package/dist/chunk-LHR24OO7.cjs.map +0 -1
  210. package/dist/chunk-LNVR4BW6.cjs +0 -2
  211. package/dist/chunk-LNVR4BW6.cjs.map +0 -1
  212. package/dist/chunk-NMH7LHPW.cjs.map +0 -1
  213. package/dist/chunk-NVHV2LDK.cjs +0 -2
  214. package/dist/chunk-NVHV2LDK.cjs.map +0 -1
  215. package/dist/chunk-PLIH6KQM.mjs +0 -2
  216. package/dist/chunk-PLIH6KQM.mjs.map +0 -1
  217. package/dist/chunk-QRAIGQF2.mjs +0 -2
  218. package/dist/chunk-QRAIGQF2.mjs.map +0 -1
  219. package/src/actions/honey/getHoneyGlobalData.ts +0 -21
  220. package/src/hooks/honey/useHoneyGlobalData.ts +0 -23
  221. /package/dist/{chunk-MJZHJFZO.mjs.map → chunk-JXM5S4IU.mjs.map} +0 -0
@@ -1,246 +1,10 @@
1
- import { Address, Hex, AbiFunction, Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Account } from 'viem';
2
- import { ProposalWithVotesFragment, ProposalVoteFragment } from '@berachain/graphql/governance';
3
- import { b as ProposalTypeEnum, P as ProposalErrorCodes, T as TransactionActionType, C as ContractName } from './txnEnum-CCuQUFlh.cjs';
4
- import { a as TokenWithMetadata, b as Token } from './HoneyConfigProvider-DfkjmzEf.cjs';
5
- import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
6
1
  import { Config, GetWalletClientReturnType } from '@wagmi/core';
7
2
  import { SWRConfiguration, SWRResponse } from 'swr';
3
+ import { Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Hex, Account, Address } from 'viem';
8
4
  import { ChainId, BeraConfig } from '@berachain/config';
5
+ import { T as TransactionActionType, C as ContractName } from './txnEnum-CwAJN4zV.cjs';
9
6
  import { B as BeraError } from './BeraError-_mQdkanr.cjs';
10
7
 
11
- type Proposal = ProposalWithVotesFragment;
12
-
13
- type Vote = ProposalVoteFragment;
14
-
15
- type Voter = Address;
16
-
17
- type ProposalVotes = {
18
- yes: number;
19
- no: number;
20
- abstain: number;
21
- };
22
-
23
- type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
24
-
25
- type CustomProposalActionErrors = {
26
- type?: null | ProposalErrorCodes;
27
- target?: null | ProposalErrorCodes;
28
- value?: null | ProposalErrorCodes;
29
- ABI?: null | ProposalErrorCodes;
30
- functionSignature?: null | ProposalErrorCodes;
31
- args?: (null | ProposalErrorCodes)[];
32
- vault?: null | ProposalErrorCodes;
33
- isFriend?: null | ProposalErrorCodes;
34
- to?: null | ProposalErrorCodes;
35
- amount?: null | ProposalErrorCodes;
36
- minIncentiveRate?: null | ProposalErrorCodes;
37
- managerAddress?: null | ProposalErrorCodes;
38
- input?: null | ProposalErrorCodes;
39
- token?: null | ProposalErrorCodes;
40
- rawCalldata?: null | ProposalErrorCodes;
41
- message?: null | ProposalErrorCodes;
42
- } | null;
43
-
44
- type CustomProposalErrors = {
45
- title?: null | ProposalErrorCodes;
46
- description?: null | ProposalErrorCodes;
47
- forumLink?: null | ProposalErrorCodes;
48
- actions?: CustomProposalActionErrors[];
49
- };
50
-
51
- type GovernanceTopic = {
52
- id: PROPOSAL_GENRE;
53
- color: string;
54
- icon: React.ReactNode;
55
- iconBackground?: string;
56
- name: string;
57
- slug: string;
58
- forumLink: string;
59
- description?: string;
60
- comingSoon?: boolean;
61
- };
62
- type CustomProposal = {
63
- title: string;
64
- description: any;
65
- actions: ProposalAction[];
66
- forumLink: string;
67
- topic: Set<PROPOSAL_GENRE>;
68
- };
69
-
70
- type SafeProposalAction = {
71
- value: bigint;
72
- target: "" | Address;
73
- } & (
74
- | {
75
- type: ProposalTypeEnum.CUSTOM_PROPOSAL;
76
- input: "ABI" | "rawCalldata" | "message";
77
- ABI: string;
78
- _isVerifiedAbi?: boolean;
79
- functionSignature: string;
80
- args: string[];
81
- rawCalldata: Hex;
82
- message: string;
83
- }
84
- | {
85
- type:
86
- | ProposalTypeEnum.WHITELIST_REWARD_VAULT
87
- | ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
88
- vault: Address;
89
- }
90
- | {
91
- type: ProposalTypeEnum.ERC20_TRANSFER;
92
- to: Address;
93
- amount: string;
94
- }
95
- | {
96
- type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
97
- vault: Address;
98
- token: Address;
99
- minIncentiveRate: string;
100
- managerAddress: Address;
101
- }
102
- );
103
-
104
- type ProposalAction = Partial<SafeProposalAction> & {
105
- type: SafeProposalAction["type"];
106
- };
107
-
108
- type VerifiedAbi = {
109
- abiItem?: AbiFunction;
110
- functionName?: string;
111
- args: readonly unknown[];
112
- functionSignature?: string;
113
- };
114
-
115
- interface ProtocolMetadata {
116
- name: string;
117
- logoURI: string;
118
- url: string;
119
- description: string;
120
- tags?: string[];
121
- }
122
-
123
- /**
124
- * Configuration for a single staking option.
125
- * Maps receipt tokens to their accepted input tokens.
126
- */
127
- type StakingConfig = {
128
- /** Unique identifier for this staking config */
129
- id: string;
130
- /** The token received when staking (e.g., sWBERA, siBERA) */
131
- receiptToken: TokenWithMetadata;
132
- /** Tokens that can be staked to receive the receipt token */
133
- inputTokens: TokenWithMetadata[];
134
- };
135
-
136
- interface BribeBoostReward {
137
- token: string;
138
- total_unclaimed: string;
139
- }
140
-
141
- interface BribeBoostRewardItem {
142
- rewards: BribeBoostReward[];
143
- validator: string;
144
- }
145
-
146
- interface BribeBoostRewardProof {
147
- validator?: string;
148
- pagination: {
149
- next: number;
150
- previous: number;
151
- record_per_page: number;
152
- current_page: number;
153
- total_page: number;
154
- };
155
- rewards:
156
- | {
157
- id: string;
158
- dist_id: string;
159
- token: Address;
160
- recipient: string;
161
- amount: string;
162
- merkle_proof: string[];
163
- available_at: number;
164
- }[]
165
- | null;
166
- }
167
-
168
- interface BribeBoostValidatorApr {
169
- id: string;
170
- boost_total_bgt: string;
171
- rewards_total_usd: string;
172
- daily_rate: string;
173
- apr: string;
174
- apy: string;
175
- tokens: Address[]; // Confirm this type with backend real data
176
- validator: string;
177
- start_block: number;
178
- end_block: number;
179
- start_timestamp: number;
180
- end_timestamp: number;
181
- created_at: string;
182
- updated_at: string;
183
- }
184
-
185
- type IncentiveReward = {
186
- tokenMetadata: Token | undefined;
187
- tokenPrice: number;
188
- tokenValue: number;
189
- id: string;
190
- dist_id: string;
191
- token: string;
192
- recipient: string;
193
- formattedAmount: string;
194
- amount: string;
195
- merkle_proof: string[];
196
- available_at: number;
197
- };
198
- interface IncentiveRewardChunksWithValidatorData {
199
- validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
200
- maxTimestamp: number | undefined;
201
- minTimestamp: number | undefined;
202
- totalValue: number;
203
- tokenTotals: {
204
- chainId: number;
205
- address: Address;
206
- amount: number;
207
- value: number;
208
- metadata: Token | undefined;
209
- }[];
210
- rewards: IncentiveReward[];
211
- isCurrent: boolean;
212
- }
213
-
214
- interface AggregatedTokenTotals {
215
- address: Address;
216
- amount: number;
217
- value: number;
218
- metadata: Token | undefined;
219
- chainId: number;
220
- }
221
-
222
- type ClaimedIncentives = Record<string, string>;
223
-
224
- type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
225
-
226
- interface UserVaultInfo {
227
- balance: bigint;
228
- delegatedBalance: bigint;
229
- withdrawableBalance: bigint;
230
- rewards: string;
231
- percentage: string;
232
- }
233
-
234
- type StakedBeraAsset = {
235
- token: TokenWithMetadata;
236
- apr: number;
237
- stakedAmount: number;
238
- stakedAmountUsd: number;
239
- earnedAmount: number;
240
- earnedAmountUsd: number;
241
- isLoadingEarnings?: boolean;
242
- };
243
-
244
8
  interface UseContractWriteApi {
245
9
  isLoading: boolean;
246
10
  isSubmitting: boolean;
@@ -471,4 +235,4 @@ declare global {
471
235
  }
472
236
  }
473
237
 
474
- export type { AggregatedTokenTotals as A, BribeBoostRewardProof as B, CustomProposal as C, DefaultHookOptions as D, GovernanceTopic as G, IContractWrite as I, ProtocolMetadata as P, StakingConfig as S, TxnEventKeys as T, UserVaultInfo as U, VerifiedAbi as V, CustomProposalErrors as a, BribeBoostRewardItem as b, DefaultHookReturnType as c, StakedBeraAsset as d, IUseContractWriteArgs as e, UseContractWriteApi as f, BribeBoostReward as g, BribeBoostValidatorApr as h, ClaimedIncentives as i, ClaimedIncentivesLocalState as j, CustomProposalActionErrors as k, IContractWriteFn as l, IncentiveReward as m, IncentiveRewardChunksWithValidatorData as n, PROPOSAL_GENRE as o, Proposal as p, ProposalAction as q, ProposalVotes as r, SafeProposalAction as s, Vote as t, Voter as u };
238
+ export type { DefaultHookOptions as D, IContractWrite as I, TxnEventKeys as T, UseContractWriteApi as U, DefaultHookReturnType as a, IUseContractWriteArgs as b, IContractWriteFn as c };
@@ -1,246 +1,10 @@
1
- import { Address, Hex, AbiFunction, Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Account } from 'viem';
2
- import { ProposalWithVotesFragment, ProposalVoteFragment } from '@berachain/graphql/governance';
3
- import { b as ProposalTypeEnum, P as ProposalErrorCodes, T as TransactionActionType, C as ContractName } from './txnEnum-CCuQUFlh.js';
4
- import { a as TokenWithMetadata, b as Token } from './HoneyConfigProvider-DVP_9KZn.js';
5
- import { ApiValidatorFragment } from '@berachain/graphql/pol/api';
6
1
  import { Config, GetWalletClientReturnType } from '@wagmi/core';
7
2
  import { SWRConfiguration, SWRResponse } from 'swr';
3
+ import { Abi, ContractFunctionName, ContractFunctionArgs, TransactionReceipt, WalletCallReceipt, Hex, Account, Address } from 'viem';
8
4
  import { ChainId, BeraConfig } from '@berachain/config';
5
+ import { T as TransactionActionType, C as ContractName } from './txnEnum-CwAJN4zV.js';
9
6
  import { B as BeraError } from './BeraError-_mQdkanr.js';
10
7
 
11
- type Proposal = ProposalWithVotesFragment;
12
-
13
- type Vote = ProposalVoteFragment;
14
-
15
- type Voter = Address;
16
-
17
- type ProposalVotes = {
18
- yes: number;
19
- no: number;
20
- abstain: number;
21
- };
22
-
23
- type PROPOSAL_GENRE = "berahub" | "honey" | "bend" | "berps" | "general";
24
-
25
- type CustomProposalActionErrors = {
26
- type?: null | ProposalErrorCodes;
27
- target?: null | ProposalErrorCodes;
28
- value?: null | ProposalErrorCodes;
29
- ABI?: null | ProposalErrorCodes;
30
- functionSignature?: null | ProposalErrorCodes;
31
- args?: (null | ProposalErrorCodes)[];
32
- vault?: null | ProposalErrorCodes;
33
- isFriend?: null | ProposalErrorCodes;
34
- to?: null | ProposalErrorCodes;
35
- amount?: null | ProposalErrorCodes;
36
- minIncentiveRate?: null | ProposalErrorCodes;
37
- managerAddress?: null | ProposalErrorCodes;
38
- input?: null | ProposalErrorCodes;
39
- token?: null | ProposalErrorCodes;
40
- rawCalldata?: null | ProposalErrorCodes;
41
- message?: null | ProposalErrorCodes;
42
- } | null;
43
-
44
- type CustomProposalErrors = {
45
- title?: null | ProposalErrorCodes;
46
- description?: null | ProposalErrorCodes;
47
- forumLink?: null | ProposalErrorCodes;
48
- actions?: CustomProposalActionErrors[];
49
- };
50
-
51
- type GovernanceTopic = {
52
- id: PROPOSAL_GENRE;
53
- color: string;
54
- icon: React.ReactNode;
55
- iconBackground?: string;
56
- name: string;
57
- slug: string;
58
- forumLink: string;
59
- description?: string;
60
- comingSoon?: boolean;
61
- };
62
- type CustomProposal = {
63
- title: string;
64
- description: any;
65
- actions: ProposalAction[];
66
- forumLink: string;
67
- topic: Set<PROPOSAL_GENRE>;
68
- };
69
-
70
- type SafeProposalAction = {
71
- value: bigint;
72
- target: "" | Address;
73
- } & (
74
- | {
75
- type: ProposalTypeEnum.CUSTOM_PROPOSAL;
76
- input: "ABI" | "rawCalldata" | "message";
77
- ABI: string;
78
- _isVerifiedAbi?: boolean;
79
- functionSignature: string;
80
- args: string[];
81
- rawCalldata: Hex;
82
- message: string;
83
- }
84
- | {
85
- type:
86
- | ProposalTypeEnum.WHITELIST_REWARD_VAULT
87
- | ProposalTypeEnum.BLACKLIST_REWARD_VAULT;
88
- vault: Address;
89
- }
90
- | {
91
- type: ProposalTypeEnum.ERC20_TRANSFER;
92
- to: Address;
93
- amount: string;
94
- }
95
- | {
96
- type: ProposalTypeEnum.WHITELIST_REWARD_VAULT_INCENTIVE;
97
- vault: Address;
98
- token: Address;
99
- minIncentiveRate: string;
100
- managerAddress: Address;
101
- }
102
- );
103
-
104
- type ProposalAction = Partial<SafeProposalAction> & {
105
- type: SafeProposalAction["type"];
106
- };
107
-
108
- type VerifiedAbi = {
109
- abiItem?: AbiFunction;
110
- functionName?: string;
111
- args: readonly unknown[];
112
- functionSignature?: string;
113
- };
114
-
115
- interface ProtocolMetadata {
116
- name: string;
117
- logoURI: string;
118
- url: string;
119
- description: string;
120
- tags?: string[];
121
- }
122
-
123
- /**
124
- * Configuration for a single staking option.
125
- * Maps receipt tokens to their accepted input tokens.
126
- */
127
- type StakingConfig = {
128
- /** Unique identifier for this staking config */
129
- id: string;
130
- /** The token received when staking (e.g., sWBERA, siBERA) */
131
- receiptToken: TokenWithMetadata;
132
- /** Tokens that can be staked to receive the receipt token */
133
- inputTokens: TokenWithMetadata[];
134
- };
135
-
136
- interface BribeBoostReward {
137
- token: string;
138
- total_unclaimed: string;
139
- }
140
-
141
- interface BribeBoostRewardItem {
142
- rewards: BribeBoostReward[];
143
- validator: string;
144
- }
145
-
146
- interface BribeBoostRewardProof {
147
- validator?: string;
148
- pagination: {
149
- next: number;
150
- previous: number;
151
- record_per_page: number;
152
- current_page: number;
153
- total_page: number;
154
- };
155
- rewards:
156
- | {
157
- id: string;
158
- dist_id: string;
159
- token: Address;
160
- recipient: string;
161
- amount: string;
162
- merkle_proof: string[];
163
- available_at: number;
164
- }[]
165
- | null;
166
- }
167
-
168
- interface BribeBoostValidatorApr {
169
- id: string;
170
- boost_total_bgt: string;
171
- rewards_total_usd: string;
172
- daily_rate: string;
173
- apr: string;
174
- apy: string;
175
- tokens: Address[]; // Confirm this type with backend real data
176
- validator: string;
177
- start_block: number;
178
- end_block: number;
179
- start_timestamp: number;
180
- end_timestamp: number;
181
- created_at: string;
182
- updated_at: string;
183
- }
184
-
185
- type IncentiveReward = {
186
- tokenMetadata: Token | undefined;
187
- tokenPrice: number;
188
- tokenValue: number;
189
- id: string;
190
- dist_id: string;
191
- token: string;
192
- recipient: string;
193
- formattedAmount: string;
194
- amount: string;
195
- merkle_proof: string[];
196
- available_at: number;
197
- };
198
- interface IncentiveRewardChunksWithValidatorData {
199
- validator: ApiValidatorInListFragment | ApiValidatorFragment | undefined;
200
- maxTimestamp: number | undefined;
201
- minTimestamp: number | undefined;
202
- totalValue: number;
203
- tokenTotals: {
204
- chainId: number;
205
- address: Address;
206
- amount: number;
207
- value: number;
208
- metadata: Token | undefined;
209
- }[];
210
- rewards: IncentiveReward[];
211
- isCurrent: boolean;
212
- }
213
-
214
- interface AggregatedTokenTotals {
215
- address: Address;
216
- amount: number;
217
- value: number;
218
- metadata: Token | undefined;
219
- chainId: number;
220
- }
221
-
222
- type ClaimedIncentives = Record<string, string>;
223
-
224
- type ClaimedIncentivesLocalState = Record<string, ClaimedIncentives>;
225
-
226
- interface UserVaultInfo {
227
- balance: bigint;
228
- delegatedBalance: bigint;
229
- withdrawableBalance: bigint;
230
- rewards: string;
231
- percentage: string;
232
- }
233
-
234
- type StakedBeraAsset = {
235
- token: TokenWithMetadata;
236
- apr: number;
237
- stakedAmount: number;
238
- stakedAmountUsd: number;
239
- earnedAmount: number;
240
- earnedAmountUsd: number;
241
- isLoadingEarnings?: boolean;
242
- };
243
-
244
8
  interface UseContractWriteApi {
245
9
  isLoading: boolean;
246
10
  isSubmitting: boolean;
@@ -471,4 +235,4 @@ declare global {
471
235
  }
472
236
  }
473
237
 
474
- export type { AggregatedTokenTotals as A, BribeBoostRewardProof as B, CustomProposal as C, DefaultHookOptions as D, GovernanceTopic as G, IContractWrite as I, ProtocolMetadata as P, StakingConfig as S, TxnEventKeys as T, UserVaultInfo as U, VerifiedAbi as V, CustomProposalErrors as a, BribeBoostRewardItem as b, DefaultHookReturnType as c, StakedBeraAsset as d, IUseContractWriteArgs as e, UseContractWriteApi as f, BribeBoostReward as g, BribeBoostValidatorApr as h, ClaimedIncentives as i, ClaimedIncentivesLocalState as j, CustomProposalActionErrors as k, IContractWriteFn as l, IncentiveReward as m, IncentiveRewardChunksWithValidatorData as n, PROPOSAL_GENRE as o, Proposal as p, ProposalAction as q, ProposalVotes as r, SafeProposalAction as s, Vote as t, Voter as u };
238
+ export type { DefaultHookOptions as D, IContractWrite as I, TxnEventKeys as T, UseContractWriteApi as U, DefaultHookReturnType as a, IUseContractWriteArgs as b, IContractWriteFn as c };