@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.
- package/dist/RequestError-BRIiJgHk.d.ts +144 -0
- package/dist/RequestError-DSUzJ1Iy.d.cts +144 -0
- package/dist/abi/exports.cjs.map +1 -1
- package/dist/actions/exports.cjs +1 -1
- package/dist/actions/exports.cjs.map +1 -1
- package/dist/actions/exports.d.cts +22 -105
- package/dist/actions/exports.d.ts +22 -105
- package/dist/actions/exports.mjs +1 -1
- package/dist/actions/exports.mjs.map +1 -1
- package/dist/actions/governance/exports.cjs +2 -0
- package/dist/actions/governance/exports.cjs.map +1 -0
- package/dist/actions/governance/exports.d.cts +140 -0
- package/dist/actions/governance/exports.d.ts +140 -0
- package/dist/actions/governance/exports.mjs +2 -0
- package/dist/actions/governance/exports.mjs.map +1 -0
- package/dist/chunk-33XNWMPP.cjs +2 -0
- package/dist/chunk-33XNWMPP.cjs.map +1 -0
- package/dist/chunk-4TALWNXE.cjs +2 -0
- package/dist/chunk-4TALWNXE.cjs.map +1 -0
- package/dist/chunk-54BTOQE3.cjs +2 -0
- package/dist/chunk-54BTOQE3.cjs.map +1 -0
- package/dist/chunk-5QAFKFM5.mjs +2 -0
- package/dist/chunk-5QAFKFM5.mjs.map +1 -0
- package/dist/chunk-6DIA6PXV.cjs +2 -0
- package/dist/chunk-6DIA6PXV.cjs.map +1 -0
- package/dist/{chunk-NMH7LHPW.cjs → chunk-6JJIZCVY.cjs} +2 -2
- package/dist/chunk-6JJIZCVY.cjs.map +1 -0
- package/dist/chunk-BE6B4PQF.cjs +2 -0
- package/dist/chunk-BE6B4PQF.cjs.map +1 -0
- package/dist/chunk-CHFETMC6.cjs +4 -0
- package/dist/chunk-CHFETMC6.cjs.map +1 -0
- package/dist/{chunk-I7M43BB4.cjs → chunk-D6L7LTA2.cjs} +2 -2
- package/dist/chunk-D6L7LTA2.cjs.map +1 -0
- package/dist/chunk-DDEQFR3M.cjs.map +1 -1
- package/dist/chunk-ENT2OSXT.mjs +2 -0
- package/dist/chunk-ENT2OSXT.mjs.map +1 -0
- package/dist/{chunk-74QD4JAH.mjs → chunk-GXV2JA36.mjs} +2 -2
- package/dist/chunk-GXV2JA36.mjs.map +1 -0
- package/dist/chunk-H6ZO4SLB.mjs +4 -0
- package/dist/chunk-H6ZO4SLB.mjs.map +1 -0
- package/dist/chunk-JDDRTHFG.mjs +2 -0
- package/dist/chunk-JDDRTHFG.mjs.map +1 -0
- package/dist/{chunk-T5FSQ3YE.mjs → chunk-JDZGYU5T.mjs} +2 -2
- package/dist/{chunk-T5FSQ3YE.mjs.map → chunk-JDZGYU5T.mjs.map} +1 -1
- package/dist/chunk-JIPSTWKO.mjs +2 -0
- package/dist/{chunk-COMMLZ3O.mjs.map → chunk-JIPSTWKO.mjs.map} +1 -1
- package/dist/chunk-JSTCUTXP.cjs +2 -0
- package/dist/chunk-JSTCUTXP.cjs.map +1 -0
- package/dist/{chunk-MJZHJFZO.mjs → chunk-JXM5S4IU.mjs} +2 -2
- package/dist/chunk-K5L2B4DU.mjs +2 -0
- package/dist/{chunk-FM3WDBFH.mjs.map → chunk-K5L2B4DU.mjs.map} +1 -1
- package/dist/chunk-KUQEX7H3.mjs +2 -0
- package/dist/chunk-KUQEX7H3.mjs.map +1 -0
- package/dist/chunk-NXXMW2O7.mjs +2 -0
- package/dist/chunk-NXXMW2O7.mjs.map +1 -0
- package/dist/chunk-OIYXOKTT.cjs.map +1 -1
- package/dist/chunk-OUD27MU7.cjs.map +1 -1
- package/dist/chunk-PRLVZIKD.mjs +2 -0
- package/dist/chunk-PRLVZIKD.mjs.map +1 -0
- package/dist/chunk-QVIAMSZ6.cjs +2 -0
- package/dist/chunk-QVIAMSZ6.cjs.map +1 -0
- package/dist/chunk-RCWM55DE.cjs +2 -0
- package/dist/chunk-RCWM55DE.cjs.map +1 -0
- package/dist/chunk-REWME3FY.cjs +2 -0
- package/dist/chunk-REWME3FY.cjs.map +1 -0
- package/dist/chunk-RJN36GBU.mjs +2 -0
- package/dist/chunk-RJN36GBU.mjs.map +1 -0
- package/dist/chunk-RWOICHRW.cjs.map +1 -1
- package/dist/chunk-S4CDSVLK.cjs +2 -0
- package/dist/chunk-S4CDSVLK.cjs.map +1 -0
- package/dist/chunk-WLJHFHKF.mjs +2 -0
- package/dist/chunk-WLJHFHKF.mjs.map +1 -0
- package/dist/chunk-WRFDB3QJ.cjs.map +1 -1
- package/dist/chunk-XNJLSA6P.cjs.map +1 -1
- package/dist/chunk-XZC34BHM.cjs +2 -0
- package/dist/chunk-XZC34BHM.cjs.map +1 -0
- package/dist/chunk-Y2FETC6T.cjs +2 -0
- package/dist/chunk-Y2FETC6T.cjs.map +1 -0
- package/dist/chunk-ZW2N63FI.mjs +2 -0
- package/dist/chunk-ZW2N63FI.mjs.map +1 -0
- package/dist/contexts/exports.cjs +1 -1
- package/dist/contexts/exports.cjs.map +1 -1
- package/dist/contexts/exports.mjs +1 -1
- package/dist/contexts/exports.mjs.map +1 -1
- package/dist/enum/exports.cjs +1 -1
- package/dist/enum/exports.cjs.map +1 -1
- package/dist/enum/exports.d.cts +1 -1
- package/dist/enum/exports.d.ts +1 -1
- package/dist/enum/exports.mjs +1 -1
- package/dist/enum/exports.mjs.map +1 -1
- package/dist/enum/governance/exports.cjs +2 -0
- package/dist/enum/governance/exports.cjs.map +1 -0
- package/dist/enum/governance/exports.d.cts +60 -0
- package/dist/enum/governance/exports.d.ts +60 -0
- package/dist/enum/governance/exports.mjs +2 -0
- package/dist/enum/governance/exports.mjs.map +1 -0
- package/dist/errors/exports.cjs +1 -1
- package/dist/errors/exports.cjs.map +1 -1
- package/dist/errors/exports.d.cts +3 -89
- package/dist/errors/exports.d.ts +3 -89
- package/dist/errors/exports.mjs +1 -1
- package/dist/{getValidatorQueuedOperatorAddress-BfKrMaui.d.cts → getValidatorQueuedOperatorAddress-CPuIw7n5.d.cts} +2 -2
- package/dist/{getValidatorQueuedOperatorAddress-Bef1e1c_.d.ts → getValidatorQueuedOperatorAddress-CbZQ0kv2.d.ts} +2 -2
- package/dist/{global.d-DW7dpBsz.d.cts → global.d-B2WavzCY.d.cts} +3 -239
- package/dist/{global.d-CrPSEwwf.d.ts → global.d-D8byjWYx.d.ts} +3 -239
- package/dist/hooks/exports.cjs +3 -3
- package/dist/hooks/exports.cjs.map +1 -1
- package/dist/hooks/exports.d.cts +19 -198
- package/dist/hooks/exports.d.ts +19 -198
- package/dist/hooks/exports.mjs +3 -3
- package/dist/hooks/exports.mjs.map +1 -1
- package/dist/hooks/governance/exports.cjs +2 -0
- package/dist/hooks/governance/exports.cjs.map +1 -0
- package/dist/hooks/governance/exports.d.cts +181 -0
- package/dist/hooks/governance/exports.d.ts +181 -0
- package/dist/hooks/governance/exports.mjs +2 -0
- package/dist/hooks/governance/exports.mjs.map +1 -0
- package/dist/pol.d-o6Iw75bK.d.cts +134 -0
- package/dist/pol.d-qR8bGEP5.d.ts +134 -0
- package/dist/{txnEnum-CCuQUFlh.d.cts → txnEnum-CwAJN4zV.d.cts} +3 -60
- package/dist/{txnEnum-CCuQUFlh.d.ts → txnEnum-CwAJN4zV.d.ts} +3 -60
- package/dist/types/exports.cjs.map +1 -1
- package/dist/types/exports.d.cts +7 -7
- package/dist/types/exports.d.ts +7 -7
- package/dist/types/governance/exports.cjs +1 -0
- package/dist/types/governance/exports.cjs.map +1 -0
- package/dist/types/governance/exports.d.cts +109 -0
- package/dist/types/governance/exports.d.ts +109 -0
- package/dist/types/governance/exports.mjs +1 -0
- package/dist/types/governance/exports.mjs.map +1 -0
- package/dist/utils/exports.cjs +1 -1
- package/dist/utils/exports.cjs.map +1 -1
- package/dist/utils/exports.d.cts +10 -2
- package/dist/utils/exports.d.ts +10 -2
- package/dist/utils/exports.mjs +1 -1
- package/dist/utils/exports.mjs.map +1 -1
- package/package.json +16 -7
- package/src/actions/clients/BeraApolloClient.ts +9 -0
- package/src/actions/clients/getApolloClient.ts +23 -6
- package/src/actions/dex/getOnChainPool.ts +1 -1
- package/src/actions/enso/getBendMultiplyBundle.ts +9 -2
- package/src/actions/enso/util.ts +6 -8
- package/src/actions/exports.ts +1 -10
- package/src/actions/governance/checkProposalField.ts +108 -54
- package/src/actions/governance/computeActualStatus.ts +7 -3
- package/src/actions/governance/exports.ts +9 -0
- package/src/actions/governance/getAllProposals.ts +15 -8
- package/src/actions/governance/getBodyErrors.ts +13 -5
- package/src/actions/governance/getDecodedFunctionData.ts +31 -22
- package/src/actions/governance/getProposalDetails.ts +8 -4
- package/src/actions/governance/getProposalFromTx.ts +19 -10
- package/src/actions/governance/getProposalParams.ts +17 -17
- package/src/actions/governance/getProposalVotes.ts +7 -3
- package/src/actions/governance/getQuorum.ts +7 -7
- package/src/actions/governance/parseProposalBody.ts +19 -9
- package/src/actions/honey/getChartData.ts +5 -5
- package/src/actions/honey/getHoney24hVolume.ts +30 -0
- package/src/actions/honey/getHoneyPythPriceOracle.ts +1 -1
- package/src/actions/honey/getHoneyRootPriceOracle.ts +1 -1
- package/src/actions/pol/getEarnedStakedBeraVault.ts +12 -2
- package/src/actions/pol/getRewardVaultBeaconImplementation.ts +1 -1
- package/src/actions/pol/getRewardVaultIncentives.ts +15 -15
- package/src/actions/pol/getStakingDailyAssets.ts +7 -1
- package/src/actions/pol/getTotalStakedAmount.ts +1 -1
- package/src/actions/pol/getUserClaimableIncentives.ts +1 -1
- package/src/actions/pol/getUserVaultsReward.ts +1 -1
- package/src/actions/tokens/getTokenInformation.ts +8 -15
- package/src/actions/tokens/getUnderlyingToken.ts +1 -1
- package/src/actions/validators/getUserBoosts.ts +1 -1
- package/src/enum/exports.ts +0 -1
- package/src/enum/governance/exports.ts +1 -0
- package/src/enum/txnEnum.ts +2 -0
- package/src/errors/BeraError.ts +7 -2
- package/src/errors/RequestError.ts +2 -1
- package/src/hooks/dex/usePoolHistoricalData.ts +1 -1
- package/src/hooks/enso/useBendZapSupply.ts +1 -1
- package/src/hooks/exports.ts +1 -15
- package/src/hooks/governance/exports.ts +14 -0
- package/src/hooks/honey/useHoney24hVolume.ts +16 -0
- package/src/hooks/perps/usePythUpdateFee.ts +1 -1
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -1
- package/src/types/exports.ts +0 -1
- package/src/types/governance/exports.ts +1 -0
- package/src/utils/beraFetch.ts +70 -15
- package/src/utils/getErrorResponse.ts +1 -1
- package/dist/RequestError-A8XJ6QR9.d.cts +0 -57
- package/dist/RequestError-Dk97z8rm.d.ts +0 -57
- package/dist/chunk-2YBHAMDV.cjs +0 -2
- package/dist/chunk-2YBHAMDV.cjs.map +0 -1
- package/dist/chunk-57RINXU6.cjs +0 -2
- package/dist/chunk-57RINXU6.cjs.map +0 -1
- package/dist/chunk-74QD4JAH.mjs.map +0 -1
- package/dist/chunk-74WA35RI.cjs +0 -2
- package/dist/chunk-74WA35RI.cjs.map +0 -1
- package/dist/chunk-BEKH5EYT.mjs +0 -2
- package/dist/chunk-BEKH5EYT.mjs.map +0 -1
- package/dist/chunk-CF3LFNXG.cjs +0 -2
- package/dist/chunk-CF3LFNXG.cjs.map +0 -1
- package/dist/chunk-COMMLZ3O.mjs +0 -2
- package/dist/chunk-DK42F2ZM.cjs +0 -2
- package/dist/chunk-DK42F2ZM.cjs.map +0 -1
- package/dist/chunk-FCZ72ML6.mjs +0 -4
- package/dist/chunk-FCZ72ML6.mjs.map +0 -1
- package/dist/chunk-FM3WDBFH.mjs +0 -2
- package/dist/chunk-I7M43BB4.cjs.map +0 -1
- package/dist/chunk-IDFMLLDY.mjs +0 -2
- package/dist/chunk-IDFMLLDY.mjs.map +0 -1
- package/dist/chunk-LHR24OO7.cjs +0 -4
- package/dist/chunk-LHR24OO7.cjs.map +0 -1
- package/dist/chunk-LNVR4BW6.cjs +0 -2
- package/dist/chunk-LNVR4BW6.cjs.map +0 -1
- package/dist/chunk-NMH7LHPW.cjs.map +0 -1
- package/dist/chunk-NVHV2LDK.cjs +0 -2
- package/dist/chunk-NVHV2LDK.cjs.map +0 -1
- package/dist/chunk-PLIH6KQM.mjs +0 -2
- package/dist/chunk-PLIH6KQM.mjs.map +0 -1
- package/dist/chunk-QRAIGQF2.mjs +0 -2
- package/dist/chunk-QRAIGQF2.mjs.map +0 -1
- package/src/actions/honey/getHoneyGlobalData.ts +0 -21
- package/src/hooks/honey/useHoneyGlobalData.ts +0 -23
- /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 {
|
|
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 {
|
|
238
|
+
export type { DefaultHookOptions as D, IContractWrite as I, TxnEventKeys as T, UseContractWriteApi as U, DefaultHookReturnType as a, IUseContractWriteArgs as b, IContractWriteFn as c };
|