@berachain/berajs 0.2.8-beta.8 → 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.
- package/dist/{BeraError-_mQdkanr.d.cts → BeraError-7-A5JYy_.d.ts} +31 -2
- package/dist/{HoneyConfigProvider-DVP_9KZn.d.ts → HoneyConfigProvider-Dkj-_a5x.d.ts} +1 -1
- package/dist/RequestError-DBOIV65x.d.ts +144 -0
- package/dist/abi/exports.mjs +3 -4
- package/dist/actions/clients/exports.d.ts +2 -0
- package/dist/actions/clients/exports.mjs +12 -0
- package/dist/actions/exports.d.ts +108 -187
- package/dist/actions/exports.mjs +97 -158
- package/dist/actions/governance/exports.d.ts +140 -0
- package/dist/actions/governance/exports.mjs +226 -0
- package/dist/actions/server/exports.d.ts +13 -0
- package/dist/actions/server/exports.mjs +27 -0
- package/dist/{chunk-VA3BQ34H.mjs → chunk-3EARVV7K.mjs} +20 -9
- package/dist/chunk-4Z4AK6SH.mjs +211 -0
- package/dist/chunk-75M6TF7M.mjs +25 -0
- package/dist/chunk-AFN4CVD3.mjs +326 -0
- package/dist/{chunk-7TFV6UKF.mjs → chunk-BGMRHTBQ.mjs} +0 -1
- package/dist/{chunk-3M47ZRXT.mjs → chunk-CDFWPU2R.mjs} +73 -17
- package/dist/{chunk-GWSTVITN.mjs → chunk-CDK4YV3D.mjs} +0 -1
- package/dist/{chunk-KL6YZ5VR.mjs → chunk-DKMAIU74.mjs} +0 -1
- package/dist/chunk-EXIUPSFN.mjs +86 -0
- package/dist/{chunk-VA5L5FDG.mjs → chunk-FFB5LFDW.mjs} +2 -3
- package/dist/{chunk-ZCEFC2TK.mjs → chunk-HQCOU6GY.mjs} +0 -1
- package/dist/{chunk-SGZP4O6R.mjs → chunk-HSSJKHZ4.mjs} +11 -11
- package/dist/{chunk-7QKRRIHI.mjs → chunk-J5I45WGQ.mjs} +77 -152
- package/dist/chunk-KQUMKB66.mjs +89 -0
- package/dist/{chunk-JA4DHMTG.mjs → chunk-NBYLMO2L.mjs} +0 -1
- package/dist/{chunk-4GFN4LEP.mjs → chunk-NPBQLVL3.mjs} +4 -21
- package/dist/{chunk-I3FTWD6I.mjs → chunk-O2NQFKJK.mjs} +1 -1
- package/dist/{chunk-2R73G2PO.mjs → chunk-QJIXTYTZ.mjs} +121 -765
- package/dist/{chunk-GLWPRM33.mjs → chunk-SGIJVHZO.mjs} +0 -1
- package/dist/chunk-SZ5C44L5.mjs +35 -0
- package/dist/{chunk-5NMATIH4.mjs → chunk-WXXOISTU.mjs} +1 -35
- package/dist/chunk-XIYN6AL6.mjs +160 -0
- package/dist/contexts/exports.d.ts +2 -2
- package/dist/contexts/exports.mjs +11 -9
- package/dist/enum/exports.d.ts +1 -1
- package/dist/enum/exports.mjs +3 -16
- package/dist/enum/governance/exports.d.ts +60 -0
- package/dist/enum/governance/exports.mjs +14 -0
- package/dist/errors/exports.d.ts +5 -90
- package/dist/errors/exports.mjs +19 -10
- package/dist/exports-BcUTGFUb.d.ts +40 -0
- package/dist/{getValidatorQueuedOperatorAddress-BcyxE9uw.d.ts → getValidatorQueuedOperatorAddress-Dw5KN5sh.d.ts} +2 -2
- package/dist/{global.d-5w_lvl2J.d.ts → global.d-BuGDKh4k.d.ts} +4 -240
- package/dist/hooks/exports.d.ts +80 -236
- package/dist/hooks/exports.mjs +609 -1508
- package/dist/hooks/governance/exports.d.ts +181 -0
- package/dist/hooks/governance/exports.mjs +888 -0
- package/dist/pol.d-CqPA9K6m.d.ts +142 -0
- package/dist/{txnEnum-7_o92X3N.d.cts → txnEnum-ByI5dtDi.d.ts} +2 -60
- package/dist/types/exports.d.ts +9 -9
- package/dist/types/exports.mjs +0 -1
- package/dist/types/governance/exports.d.ts +109 -0
- package/dist/types/governance/exports.mjs +0 -0
- package/dist/{useHoneySwapState-B494PQDl.d.ts → useHoneySwapState-vFmuFF0g.d.ts} +1 -1
- package/dist/utils/exports.d.ts +24 -7
- package/dist/utils/exports.mjs +49 -11
- package/package.json +60 -13
- package/src/actions/__test/transports.ts +61 -0
- package/src/actions/clients/BeraApolloClient.ts +9 -0
- package/src/actions/clients/exports.ts +4 -0
- package/src/actions/clients/getApolloClient.ts +70 -25
- package/src/actions/clients/getEnsoClient.ts +20 -9
- package/src/actions/dex/aggregators/base.ts +1 -1
- package/src/actions/dex/aggregators/enso/enso.ts +27 -17
- package/src/actions/dex/aggregators/enso/ensoErc4626.ts +2 -2
- package/src/actions/dex/aggregators/kyberswap.ts +18 -23
- package/src/actions/enso/__tests__/getEnsoUserTokensWithBalances.debug.test.ts +3 -6
- package/src/actions/exports.ts +5 -10
- package/src/actions/governance/exports.ts +9 -0
- package/src/actions/governance/getAllProposals.ts +10 -65
- package/src/actions/governance/getProposalDetails.ts +6 -33
- package/src/actions/governance/getProposalVotes.ts +8 -15
- package/src/actions/honey/getChartData.ts +27 -21
- package/src/actions/honey/getHoney24hVolume.ts +27 -0
- package/src/actions/pol/getAutoclaimedIncentives.ts +30 -0
- package/src/actions/pol/getBeraTokenTotalSupply.ts +45 -0
- package/src/actions/pol/getBgtIncentiveDistributorPaused.ts +35 -0
- package/src/actions/pol/getEarnedStakedBeraVault.ts +15 -9
- package/src/actions/pol/getGlobalData.ts +1 -0
- package/src/actions/pol/getHeroEarnVaults.ts +62 -0
- package/src/actions/pol/getIncentiveFeeClaimStats.ts +19 -38
- package/src/actions/pol/getSWBeraVaultMetadata.ts +1 -1
- package/src/actions/pol/getStakingDailyAssets.ts +11 -8
- package/src/actions/server/exports.ts +1 -0
- package/src/actions/server/getDailyValidatorBlockStats.ts +33 -0
- package/src/actions/tokens/getWalletBalances.integration.test.ts +3 -6
- package/src/actions/transactions/beraWriteContract.integration.test.ts +3 -6
- package/src/actions/validators/getDailyValidatorBlockStats.ts +25 -24
- package/src/actions/validators/getValidatorAnalytics.ts +20 -21
- package/src/actions/validators/getValidatorIncentiveDistribution.ts +33 -0
- package/src/data/contracts.ts +5 -0
- package/src/enum/contracts.ts +1 -0
- package/src/enum/exports.ts +0 -1
- package/src/enum/governance/exports.ts +1 -0
- package/src/errors/BeraError.ts +47 -7
- package/src/errors/BeraTracing.unit.test.ts +65 -0
- package/src/errors/RequestError.ts +15 -2
- package/src/errors/exports.ts +5 -0
- package/src/errors/getRevertReason.integration.test.ts +3 -3
- package/src/errors/spanStatus.ts +78 -0
- package/src/errors/spanStatus.unit.test.ts +62 -0
- package/src/hooks/dex/useCreatePool.ts +1 -88
- package/src/hooks/dex/useOnChainPoolData.ts +27 -2
- package/src/hooks/dex/usePriceImpact.ts +12 -5
- package/src/hooks/enso/useBendDemultiply.ts +9 -1
- package/src/hooks/enso/useBendMultiply.ts +9 -1
- package/src/hooks/enso/useBendZapSupply.ts +26 -7
- package/src/hooks/enso/useEnsoSwapBundle.ts +17 -3
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +13 -2
- package/src/hooks/exports.ts +3 -16
- package/src/hooks/governance/exports.ts +14 -0
- package/src/hooks/honey/useHoney24hVolume.ts +16 -0
- package/src/hooks/pol/useAutoclaimedIncentives.ts +49 -0
- package/src/hooks/pol/useStakedAPR.ts +2 -2
- package/src/hooks/pol/useStakedSnapshots.ts +5 -9
- package/src/hooks/validators/useValidator.ts +2 -0
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +39 -0
- package/src/types/bribe-boost.d.ts +8 -0
- package/src/types/exports.ts +0 -1
- package/src/types/governance/exports.ts +1 -0
- package/src/utils/beraFetch.ts +76 -15
- package/src/utils/exports.ts +1 -0
- package/src/utils/getServerSideClient.ts +4 -2
- package/src/utils/sanitizeRpcUrl.ts +22 -0
- package/src/utils/tracedTransport.ts +35 -0
- package/dist/BeraError-_mQdkanr.d.ts +0 -94
- package/dist/BexStatusProvider-DRymVlQf.d.cts +0 -70
- package/dist/HoneyConfigProvider-DfkjmzEf.d.cts +0 -390
- package/dist/RequestError-A8XJ6QR9.d.cts +0 -57
- package/dist/RequestError-Dk97z8rm.d.ts +0 -57
- package/dist/abi/exports.cjs +0 -4453
- package/dist/abi/exports.cjs.map +0 -1
- package/dist/abi/exports.d.cts +0 -6574
- package/dist/abi/exports.mjs.map +0 -1
- package/dist/actions/exports.cjs +0 -914
- package/dist/actions/exports.cjs.map +0 -1
- package/dist/actions/exports.d.cts +0 -1644
- package/dist/actions/exports.mjs.map +0 -1
- package/dist/chunk-2R73G2PO.mjs.map +0 -1
- package/dist/chunk-3M47ZRXT.mjs.map +0 -1
- package/dist/chunk-4GFN4LEP.mjs.map +0 -1
- package/dist/chunk-5N7QQS55.cjs +0 -130
- package/dist/chunk-5N7QQS55.cjs.map +0 -1
- package/dist/chunk-5NMATIH4.mjs.map +0 -1
- package/dist/chunk-7QKRRIHI.mjs.map +0 -1
- package/dist/chunk-7TFV6UKF.mjs.map +0 -1
- package/dist/chunk-A4FPM7U3.cjs +0 -63
- package/dist/chunk-A4FPM7U3.cjs.map +0 -1
- package/dist/chunk-BDHINMWQ.cjs +0 -417
- package/dist/chunk-BDHINMWQ.cjs.map +0 -1
- package/dist/chunk-BEHP54S3.cjs +0 -24
- package/dist/chunk-BEHP54S3.cjs.map +0 -1
- package/dist/chunk-EGDXV2PT.cjs +0 -36
- package/dist/chunk-EGDXV2PT.cjs.map +0 -1
- package/dist/chunk-EWBKSMPG.cjs +0 -13
- package/dist/chunk-EWBKSMPG.cjs.map +0 -1
- package/dist/chunk-F6ZW7ZDD.cjs +0 -403
- package/dist/chunk-F6ZW7ZDD.cjs.map +0 -1
- package/dist/chunk-FTXTRUYT.cjs +0 -170
- package/dist/chunk-FTXTRUYT.cjs.map +0 -1
- package/dist/chunk-GLWPRM33.mjs.map +0 -1
- package/dist/chunk-GWSTVITN.mjs.map +0 -1
- package/dist/chunk-H3Z37RYU.cjs +0 -15
- package/dist/chunk-H3Z37RYU.cjs.map +0 -1
- package/dist/chunk-I3FTWD6I.mjs.map +0 -1
- package/dist/chunk-JA4DHMTG.mjs.map +0 -1
- package/dist/chunk-KL6YZ5VR.mjs.map +0 -1
- package/dist/chunk-MXWPP6MS.cjs +0 -572
- package/dist/chunk-MXWPP6MS.cjs.map +0 -1
- package/dist/chunk-SGZP4O6R.mjs.map +0 -1
- package/dist/chunk-TDW5SPXR.cjs +0 -244
- package/dist/chunk-TDW5SPXR.cjs.map +0 -1
- package/dist/chunk-TGK3IXDN.cjs +0 -169
- package/dist/chunk-TGK3IXDN.cjs.map +0 -1
- package/dist/chunk-TJEW6YCJ.cjs +0 -97
- package/dist/chunk-TJEW6YCJ.cjs.map +0 -1
- package/dist/chunk-VA3BQ34H.mjs.map +0 -1
- package/dist/chunk-VA5L5FDG.mjs.map +0 -1
- package/dist/chunk-XSGCRLSD.cjs +0 -1844
- package/dist/chunk-XSGCRLSD.cjs.map +0 -1
- package/dist/chunk-XV3GG3HC.cjs +0 -135
- package/dist/chunk-XV3GG3HC.cjs.map +0 -1
- package/dist/chunk-Y5B224UX.cjs +0 -4698
- package/dist/chunk-Y5B224UX.cjs.map +0 -1
- package/dist/chunk-ZBTRKBSI.mjs +0 -169
- package/dist/chunk-ZBTRKBSI.mjs.map +0 -1
- package/dist/chunk-ZCEFC2TK.mjs.map +0 -1
- package/dist/contexts/exports.cjs +0 -83
- package/dist/contexts/exports.cjs.map +0 -1
- package/dist/contexts/exports.d.cts +0 -66
- package/dist/contexts/exports.mjs.map +0 -1
- package/dist/defaultFlags-D6KfkTZx.d.cts +0 -10
- package/dist/dex-C_BB0b0O.d.cts +0 -37
- package/dist/enum/exports.cjs +0 -59
- package/dist/enum/exports.cjs.map +0 -1
- package/dist/enum/exports.d.cts +0 -23
- package/dist/enum/exports.mjs.map +0 -1
- package/dist/errors/exports.cjs +0 -39
- package/dist/errors/exports.cjs.map +0 -1
- package/dist/errors/exports.d.cts +0 -413
- package/dist/errors/exports.mjs.map +0 -1
- package/dist/getValidatorQueuedOperatorAddress-Cql_D50j.d.cts +0 -562
- package/dist/global.d-B7IeayVX.d.cts +0 -474
- package/dist/honey-CYm0RWf4.d.cts +0 -14
- package/dist/hooks/exports.cjs +0 -8333
- package/dist/hooks/exports.cjs.map +0 -1
- package/dist/hooks/exports.d.cts +0 -1748
- package/dist/hooks/exports.mjs.map +0 -1
- package/dist/polling-BKnyavLI.d.cts +0 -8
- package/dist/txnEnum-7_o92X3N.d.ts +0 -164
- package/dist/types/exports.cjs +0 -1
- package/dist/types/exports.cjs.map +0 -1
- package/dist/types/exports.d.cts +0 -90
- package/dist/types/exports.mjs.map +0 -1
- package/dist/useHoneySwapState-D6vpv19r.d.cts +0 -32
- package/dist/utils/exports.cjs +0 -787
- package/dist/utils/exports.cjs.map +0 -1
- package/dist/utils/exports.d.cts +0 -412
- package/dist/utils/exports.mjs.map +0 -1
- package/src/actions/dex/getIsTokenExploited.ts +0 -63
- package/src/actions/honey/getHoneyGlobalData.ts +0 -21
- package/src/hooks/dex/useExploitedTokens.ts +0 -57
- package/src/hooks/honey/useHoneyGlobalData.ts +0 -23
|
@@ -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,
|
|
106
|
+
export { ContractName as C, TransactionActionType as T };
|
package/dist/types/exports.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { M as MinimalERC20 } from '../HoneyConfigProvider-
|
|
3
|
-
export { A as AllowanceQueryItem, j as AllowanceToken, B as BalanceToken, y as BexStatus,
|
|
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
|
-
|
|
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>;
|
package/dist/types/exports.mjs
CHANGED
|
@@ -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-
|
|
2
|
+
import { T as TokenWithOrder, H as HoneySwapActions } from './HoneyConfigProvider-Dkj-_a5x.js';
|
|
3
3
|
|
|
4
4
|
interface IHoneySwapState {
|
|
5
5
|
actionType: "mint" | "redeem";
|
package/dist/utils/exports.d.ts
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
export { d as defaultBeraFlags } from '../defaultFlags-D6KfkTZx.js';
|
|
2
|
-
import { R as RequestError } from '../RequestError-
|
|
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-
|
|
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-
|
|
15
|
+
import '../BeraError-7-A5JYy_.js';
|
|
16
16
|
import 'react';
|
|
17
|
-
import '../HoneyConfigProvider-
|
|
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';
|
|
21
21
|
|
|
22
22
|
type RequestOptions = RequestInit;
|
|
23
|
-
declare function beraFetch(endpoint: ConstructorParameters<typeof RequestError>[0]["endpoint"], options?: RequestOptions
|
|
23
|
+
declare function beraFetch(endpoint: ConstructorParameters<typeof RequestError>[0]["endpoint"], options?: RequestOptions, spanContext?: SpanContext & {
|
|
24
|
+
/**
|
|
25
|
+
* If true, keep all query params in the span URL.
|
|
26
|
+
* If an array of strings, keep only the query params in the array.
|
|
27
|
+
* If false, remove all query params from the span URL.
|
|
28
|
+
* If not provided, remove all query params from the span URL.
|
|
29
|
+
*/
|
|
30
|
+
keepQueryParams?: boolean | string[];
|
|
31
|
+
}): Promise<Response>;
|
|
24
32
|
declare function beraFetchJson<T>(endpoint: ConstructorParameters<typeof RequestError>[0]["endpoint"], options?: RequestOptions): Promise<T>;
|
|
25
33
|
|
|
26
34
|
declare const CAP_LIMIT_BUFFER: bigint;
|
|
@@ -386,6 +394,15 @@ type BaseToken = {
|
|
|
386
394
|
declare function wrapNativeToken<T extends BaseToken>(token: T): T;
|
|
387
395
|
declare function wrapNativeTokens<T extends BaseToken>(tokens: T[]): T[];
|
|
388
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
|
+
|
|
389
406
|
/**
|
|
390
407
|
* Truncate a transaction or address hash and optionally format with uppercase letters and a lowercase 'x'.
|
|
391
408
|
*/
|
|
@@ -409,4 +426,4 @@ declare function isValidatorProposer(status: GqlValidatorBlockUptimeStatus | und
|
|
|
409
426
|
*/
|
|
410
427
|
declare function isValidatorSigner(status: GqlValidatorBlockUptimeStatus | undefined): boolean | undefined;
|
|
411
428
|
|
|
412
|
-
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 };
|
package/dist/utils/exports.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
computePriceImpact,
|
|
3
3
|
wrapNativeToken,
|
|
4
4
|
wrapNativeTokens
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-FFB5LFDW.mjs";
|
|
6
6
|
import {
|
|
7
7
|
CAP_LIMIT_BUFFER,
|
|
8
8
|
DEFAULT_METAMASK_GAS_LIMIT,
|
|
@@ -29,28 +29,36 @@ import {
|
|
|
29
29
|
months,
|
|
30
30
|
monthsInSeconds,
|
|
31
31
|
msToSeconds,
|
|
32
|
+
sanitizeRpcUrl,
|
|
32
33
|
seconds,
|
|
33
34
|
truncateDecimal,
|
|
34
35
|
weeks,
|
|
35
36
|
weeksInSeconds,
|
|
36
37
|
years,
|
|
37
38
|
yearsInSeconds
|
|
38
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-CDFWPU2R.mjs";
|
|
39
40
|
import {
|
|
40
41
|
defaultFlags
|
|
41
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-BGMRHTBQ.mjs";
|
|
42
43
|
import {
|
|
43
44
|
beraToken,
|
|
44
45
|
getHoneyToken,
|
|
45
46
|
isToken,
|
|
46
|
-
parseBaseArgs,
|
|
47
47
|
wBeraToken
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-NPBQLVL3.mjs";
|
|
49
|
+
import {
|
|
50
|
+
parseBaseArgs
|
|
51
|
+
} from "../chunk-75M6TF7M.mjs";
|
|
52
|
+
import {
|
|
53
|
+
BeraTracing
|
|
54
|
+
} from "../chunk-SZ5C44L5.mjs";
|
|
49
55
|
import {
|
|
50
|
-
BeraError,
|
|
51
|
-
InvalidArgumentError,
|
|
52
56
|
RequestError
|
|
53
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-XIYN6AL6.mjs";
|
|
58
|
+
import {
|
|
59
|
+
BeraError,
|
|
60
|
+
InvalidArgumentError
|
|
61
|
+
} from "../chunk-J5I45WGQ.mjs";
|
|
54
62
|
|
|
55
63
|
// src/utils/formatInputTokenValue.ts
|
|
56
64
|
var formatInputTokenValue = (inputValue) => {
|
|
@@ -424,6 +432,11 @@ var contracts = [
|
|
|
424
432
|
"80094": "0xc8FD9a3fB3Dad4C22c9F8Cfa7cecC318A667A791",
|
|
425
433
|
name: "pol.rewardAllocationFactory"
|
|
426
434
|
},
|
|
435
|
+
{
|
|
436
|
+
"80069": "0xAf10B532cCC25B26a8e28913D5C4056a77e7a178",
|
|
437
|
+
"80094": "0xc41bbD6695AB6bdc6D04701b15f4CE5EbA2e2500",
|
|
438
|
+
name: "pol.lstStakerVaultFactory"
|
|
439
|
+
},
|
|
427
440
|
{
|
|
428
441
|
"80069": "0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",
|
|
429
442
|
"80094": "0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",
|
|
@@ -600,6 +613,31 @@ import {
|
|
|
600
613
|
defaultChainId as defaultChainId2,
|
|
601
614
|
getRpcUrls
|
|
602
615
|
} from "@berachain/config/internal";
|
|
616
|
+
|
|
617
|
+
// src/utils/tracedTransport.ts
|
|
618
|
+
function tracedTransport(transport) {
|
|
619
|
+
return ((opts) => {
|
|
620
|
+
const result = transport(opts);
|
|
621
|
+
const originalRequest = result.request;
|
|
622
|
+
result.request = async (args, options) => {
|
|
623
|
+
return BeraTracing.startSpan(
|
|
624
|
+
{
|
|
625
|
+
name: `RPC ${args.method}`,
|
|
626
|
+
op: "rpc.request",
|
|
627
|
+
attributes: {
|
|
628
|
+
"rpc.method": args.method,
|
|
629
|
+
"rpc.transport": result.config.type,
|
|
630
|
+
"rpc.url": sanitizeRpcUrl(result.value?.url)
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
() => originalRequest(args, options)
|
|
634
|
+
);
|
|
635
|
+
};
|
|
636
|
+
return result;
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
// src/utils/getServerSideClient.ts
|
|
603
641
|
var _clients = /* @__PURE__ */ new Map();
|
|
604
642
|
var getServerSidePublicClient = (args = {}) => {
|
|
605
643
|
const chainId = args.chainId ?? defaultChainId2;
|
|
@@ -612,9 +650,9 @@ var getServerSidePublicClient = (args = {}) => {
|
|
|
612
650
|
rpcs.jsonRpcUrl,
|
|
613
651
|
rpcs.alchemyJsonRpcUrl,
|
|
614
652
|
rpcs.publicJsonRpcUrl
|
|
615
|
-
].filter((i) => i).map((url) => http(url));
|
|
653
|
+
].filter((i) => i).map((url) => tracedTransport(http(url)));
|
|
616
654
|
if (fallbackTransports.length === 0) {
|
|
617
|
-
fallbackTransports.push(http());
|
|
655
|
+
fallbackTransports.push(tracedTransport(http()));
|
|
618
656
|
}
|
|
619
657
|
const chain = chainId === ChainId.MAINNET ? berachain : berachainBepolia;
|
|
620
658
|
const client = createPublicClient({
|
|
@@ -774,6 +812,7 @@ export {
|
|
|
774
812
|
parseBaseArgs,
|
|
775
813
|
parseWhiskToken,
|
|
776
814
|
seconds,
|
|
815
|
+
tracedTransport,
|
|
777
816
|
truncateDecimal,
|
|
778
817
|
truncateHash,
|
|
779
818
|
waitForLayerZeroMessageReceived,
|
|
@@ -784,4 +823,3 @@ export {
|
|
|
784
823
|
years,
|
|
785
824
|
yearsInSeconds
|
|
786
825
|
};
|
|
787
|
-
//# sourceMappingURL=exports.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@berachain/berajs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -11,37 +11,73 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@apollo/client": "4.1.6",
|
|
14
|
-
"@berachain-foundation/berancer-sdk": "1.1.
|
|
15
|
-
"@berachain/abis": "0.1.
|
|
16
|
-
"@berachain/config": "0.1.
|
|
17
|
-
"@berachain/graphql": "0.4.
|
|
18
|
-
"@ensofinance/sdk": "2.
|
|
14
|
+
"@berachain-foundation/berancer-sdk": "1.1.7",
|
|
15
|
+
"@berachain/abis": "0.1.2",
|
|
16
|
+
"@berachain/config": "0.1.16",
|
|
17
|
+
"@berachain/graphql": "0.4.17",
|
|
18
|
+
"@ensofinance/sdk": "2.3.1",
|
|
19
19
|
"@pythnetwork/hermes-client": "2.0.0",
|
|
20
20
|
"@wagmi/core": "2.22.1",
|
|
21
21
|
"gray-matter": "4.0.3",
|
|
22
22
|
"swr": "2.4.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/react-dom": "19.
|
|
26
|
-
"@types/react": "19.
|
|
25
|
+
"@types/react-dom": "19.2.3",
|
|
26
|
+
"@types/react": "19.2.14",
|
|
27
27
|
"@typescript/analyze-trace": "0.10.1",
|
|
28
28
|
"tsup": "8.5.1",
|
|
29
29
|
"typescript": "5.5.4",
|
|
30
30
|
"viem": "2.45.0",
|
|
31
31
|
"vitest": "3.2.4",
|
|
32
32
|
"@berachain/utils": "0.1.0",
|
|
33
|
-
"@berachain/wagmi": "0.4.2"
|
|
33
|
+
"@berachain/wagmi": "0.4.2-beta.6"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|
|
36
|
+
"./actions/*": {
|
|
37
|
+
"types": "./dist/actions/*/exports.d.ts",
|
|
38
|
+
"import": "./dist/actions/*/exports.mjs",
|
|
39
|
+
"require": "./dist/actions/*/exports.cjs",
|
|
40
|
+
"default": "./dist/actions/*/exports.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./hooks/*": {
|
|
43
|
+
"types": "./dist/hooks/*/exports.d.ts",
|
|
44
|
+
"import": "./dist/hooks/*/exports.mjs",
|
|
45
|
+
"require": "./dist/hooks/*/exports.cjs",
|
|
46
|
+
"default": "./dist/hooks/*/exports.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./enum/*": {
|
|
49
|
+
"types": "./dist/enum/*/exports.d.ts",
|
|
50
|
+
"import": "./dist/enum/*/exports.mjs",
|
|
51
|
+
"require": "./dist/enum/*/exports.cjs",
|
|
52
|
+
"default": "./dist/enum/*/exports.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./types/*": {
|
|
55
|
+
"types": "./dist/types/*/exports.d.ts",
|
|
56
|
+
"import": "./dist/types/*/exports.mjs",
|
|
57
|
+
"require": "./dist/types/*/exports.cjs",
|
|
58
|
+
"default": "./dist/types/*/exports.cjs"
|
|
59
|
+
},
|
|
36
60
|
"./*": {
|
|
37
61
|
"types": "./dist/*/exports.d.ts",
|
|
38
62
|
"import": "./dist/*/exports.mjs",
|
|
39
|
-
"
|
|
63
|
+
"require": "./dist/*/exports.cjs",
|
|
40
64
|
"default": "./dist/*/exports.cjs"
|
|
41
65
|
}
|
|
42
66
|
},
|
|
43
67
|
"typesVersions": {
|
|
44
68
|
"*": {
|
|
69
|
+
"actions/*": [
|
|
70
|
+
"dist/actions/*/exports.d.ts"
|
|
71
|
+
],
|
|
72
|
+
"hooks/*": [
|
|
73
|
+
"dist/hooks/*/exports.d.ts"
|
|
74
|
+
],
|
|
75
|
+
"enum/*": [
|
|
76
|
+
"dist/enum/*/exports.d.ts"
|
|
77
|
+
],
|
|
78
|
+
"types/*": [
|
|
79
|
+
"dist/types/*/exports.d.ts"
|
|
80
|
+
],
|
|
45
81
|
"*": [
|
|
46
82
|
"dist/*/exports.d.ts"
|
|
47
83
|
]
|
|
@@ -51,14 +87,25 @@
|
|
|
51
87
|
"react": "^19.1",
|
|
52
88
|
"react-dom": "^19.1",
|
|
53
89
|
"viem": "^2.41.2",
|
|
54
|
-
"@berachain/wagmi": "0.4.2"
|
|
90
|
+
"@berachain/wagmi": "0.4.2-beta.6"
|
|
91
|
+
},
|
|
92
|
+
"peerDependenciesMeta": {
|
|
93
|
+
"react": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
96
|
+
"react-dom": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
99
|
+
"viem": {
|
|
100
|
+
"optional": false
|
|
101
|
+
}
|
|
55
102
|
},
|
|
56
103
|
"scripts": {
|
|
57
|
-
"build": "tsup",
|
|
104
|
+
"build": "NODE_OPTIONS='--max-old-space-size=8192' tsup",
|
|
58
105
|
"prebuild": "pnpm contracts:update",
|
|
59
106
|
"test": "vitest",
|
|
60
107
|
"clean": "git clean -xdf dist .turbo node_modules",
|
|
61
|
-
"check-types": "tsup --dtsOnly",
|
|
108
|
+
"check-types": "NODE_OPTIONS='--max-old-space-size=8192' tsup --dtsOnly",
|
|
62
109
|
"precheck-types": "pnpm prebuild",
|
|
63
110
|
"dev": "tsup --watch",
|
|
64
111
|
"lint": "biome lint",
|