@berachain/berajs 0.2.11 → 0.2.12
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/actions/clients/exports.d.ts +5 -21
- package/dist/actions/clients/exports.mjs +5 -7
- package/dist/actions/exports.d.ts +65 -29
- package/dist/actions/exports.mjs +6 -36
- package/dist/actions/server/exports.mjs +2 -2
- package/dist/{chunk-UD5IUNCW.mjs → chunk-4ML4Y6UN.mjs} +14 -2
- package/dist/{chunk-7YVNSDXG.mjs → chunk-FGION6F6.mjs} +1 -1
- package/dist/{chunk-3JJLQ2JX.mjs → chunk-MKSFQIKC.mjs} +1 -4
- package/dist/{chunk-ZLTMIFCZ.mjs → chunk-RFJGL4MF.mjs} +3 -3
- package/dist/{chunk-Y6THHG77.mjs → chunk-T43JPYQS.mjs} +1 -1
- package/dist/{chunk-SXUNCX5E.mjs → chunk-W2VODV76.mjs} +3 -7
- package/dist/{chunk-VAA2FVPP.mjs → chunk-XDG26EG6.mjs} +90 -183
- package/dist/{chunk-MRQGHXAN.mjs → chunk-YLTWPFCJ.mjs} +2 -17
- package/dist/contexts/exports.mjs +4 -4
- package/dist/errors/exports.mjs +2 -2
- package/dist/{getApolloClient-BcUTGFUb.d.ts → getApolloClient-MWm_iq4u.d.ts} +4 -5
- package/dist/{getValidatorQueuedOperatorAddress-Cxt-DlL_.d.ts → getValidatorQueuedOperatorAddress-Cc05dlO3.d.ts} +6 -57
- package/dist/{global.d-q_LQWQqs.d.ts → global.d-CR3zicga.d.ts} +2 -7
- package/dist/hooks/exports.d.ts +109 -318
- package/dist/hooks/exports.mjs +102 -345
- package/dist/hooks/governance/exports.d.ts +10 -10
- package/dist/hooks/governance/exports.mjs +8 -20
- package/dist/types/exports.d.ts +1 -1
- package/dist/utils/exports.mjs +2 -2
- package/package.json +3 -3
- package/src/actions/clients/exports.ts +0 -1
- package/src/actions/clients/fetchBeep.ts +0 -7
- package/src/actions/clients/fetchOpenApi.ts +4 -4
- package/src/actions/clients/fetchOpenApi.unit.test.ts +3 -19
- package/src/actions/clients/getApolloClient.ts +4 -9
- package/src/actions/exports.ts +0 -1
- package/src/actions/honey/getChartData.ts +3 -44
- package/src/actions/honey/getHoney24hVolume.ts +2 -21
- package/src/actions/honey/getHoneyTxns.ts +1 -49
- package/src/actions/pol/__tests__/rewardVaults.integration.test.ts +3 -3
- package/src/actions/pol/getEarnedStakedBeraVault.ts +0 -15
- package/src/actions/pol/getGlobalData.ts +10 -29
- package/src/actions/pol/getRewardVaults.ts +4 -4
- package/src/actions/pol/getSWBeraVaultMetadata.ts +0 -7
- package/src/actions/pol/getStakingDailyAssets.ts +0 -14
- package/src/actions/validators/getApiEnrichedAllocation.ts +1 -1
- package/src/actions/validators/getValidatorIncentiveDistribution.ts +2 -24
- package/src/errors/RequestError.ts +3 -3
- package/src/hooks/bend/useGetConvertToAssets.ts +1 -8
- package/src/hooks/dex/useAggregatorsQuotes.ts +3 -1
- package/src/hooks/dex/useAggregatorsRouterFeeBps.ts +1 -6
- package/src/hooks/dex/useAllUserPools.ts +1 -8
- package/src/hooks/dex/useApiPool.ts +1 -8
- package/src/hooks/dex/useGlobalLiquidityAndSwapVolume.ts +0 -1
- package/src/hooks/dex/useOnChainPoolData.ts +2 -3
- package/src/hooks/dex/usePollPoolCreationRelayerApproval.ts +1 -7
- package/src/hooks/dex/usePoolHistoricalData.ts +1 -6
- package/src/hooks/dex/usePools.ts +2 -2
- package/src/hooks/enso/useBendZapSupply.ts +1 -1
- package/src/hooks/enso/useEnsoSwapBundle.ts +1 -1
- package/src/hooks/enso/useEnsoUserTokensWithBalances.ts +1 -5
- package/src/hooks/enso/useZapStakeBera.ts +0 -3
- package/src/hooks/governance/usePollProposal.ts +4 -7
- package/src/hooks/governance/usePollProposalThreshold.ts +1 -6
- package/src/hooks/governance/usePollUserDelegates.ts +1 -6
- package/src/hooks/governance/useProposalFromTx.ts +3 -5
- package/src/hooks/governance/useProposalSnapshot.ts +2 -2
- package/src/hooks/governance/useProposalState.ts +2 -2
- package/src/hooks/governance/useProposalTimelockState.ts +2 -2
- package/src/hooks/honey/useCappedGlobally.ts +1 -6
- package/src/hooks/honey/useCappedRelatively.ts +1 -6
- package/src/hooks/honey/useCollateralWeights.ts +1 -6
- package/src/hooks/honey/useHoney24hVolume.ts +1 -5
- package/src/hooks/honey/useHoneyBalances.ts +1 -6
- package/src/hooks/honey/useHoneyChartData.ts +3 -11
- package/src/hooks/honey/useHoneyVaultsBalance.ts +1 -6
- package/src/hooks/honey/useIsBadCollateralAsset.ts +1 -6
- package/src/hooks/honey/useIsBasketModeEnabled.ts +1 -6
- package/src/hooks/honey/usePythLatestPrices.ts +4 -6
- package/src/hooks/pol/useAutoclaimedIncentives.ts +1 -6
- package/src/hooks/pol/useAutoclaimedIncentivesTxHash.ts +1 -6
- package/src/hooks/pol/useBgtIncentiveDistributorPaused.ts +1 -6
- package/src/hooks/pol/useBgtUnstakedBalance.ts +1 -6
- package/src/hooks/pol/useClaimableFees.ts +1 -5
- package/src/hooks/pol/useHighestVaultsAPR.ts +2 -5
- package/src/hooks/pol/usePollGlobalData.ts +1 -6
- package/src/hooks/pol/usePollMarkets.ts +1 -6
- package/src/hooks/pol/useQueuedBeraUnlock.ts +1 -10
- package/src/hooks/pol/useRewardVault.ts +2 -2
- package/src/hooks/pol/useRewardVaultBalanceFromStakingToken.ts +2 -2
- package/src/hooks/pol/useRewardVaultFromToken.ts +23 -29
- package/src/hooks/pol/useRewardVaultIncentives.ts +1 -6
- package/src/hooks/pol/useRewardVaultRewards.ts +1 -6
- package/src/hooks/pol/useRewardVaults.ts +1 -6
- package/src/hooks/pol/useStakedAPR.ts +1 -6
- package/src/hooks/pol/useStakedSnapshots.ts +3 -8
- package/src/hooks/pol/useTotalStakedAmount.ts +1 -6
- package/src/hooks/pol/useUserVaultInfo.ts +1 -6
- package/src/hooks/pol/useUserVaults.ts +1 -5
- package/src/hooks/pol/useVaultHistory.ts +1 -6
- package/src/hooks/pol/useVaultValidators.ts +1 -6
- package/src/hooks/tokens/useMultipleTokenInformation.ts +1 -6
- package/src/hooks/tokens/usePollAllowances.ts +1 -7
- package/src/hooks/tokens/usePollBalance.ts +0 -3
- package/src/hooks/tokens/usePollWalletBalances.ts +1 -1
- package/src/hooks/tokens/useStakingTokenInformation.ts +1 -10
- package/src/hooks/tokens/useTokenInformation.ts +1 -6
- package/src/hooks/validators/useAllValidators.ts +1 -6
- package/src/hooks/validators/useApiValidator.ts +1 -6
- package/src/hooks/validators/useDailyValidatorBlockStats.ts +1 -3
- package/src/hooks/validators/useDefaultRewardAllocation.ts +1 -6
- package/src/hooks/validators/useManagedValidatorRole.ts +0 -1
- package/src/hooks/validators/useOnChainValidator.ts +1 -8
- package/src/hooks/validators/useStakingPoolBatch.ts +1 -6
- package/src/hooks/validators/useUserActiveValidators.ts +1 -6
- package/src/hooks/validators/useUserBoostsOnValidator.ts +1 -3
- package/src/hooks/validators/useUserClaimableIncentives.ts +2 -2
- package/src/hooks/validators/useUserStakingPositions.ts +1 -8
- package/src/hooks/validators/useValidatorAnalytics.ts +1 -3
- package/src/hooks/validators/useValidatorCommission.ts +1 -6
- package/src/hooks/validators/useValidatorIncentiveDistribution.ts +1 -3
- package/src/hooks/validators/useValidatorQueuedCommission.ts +1 -6
- package/src/hooks/validators/useValidatorQueuedOperatorAddress.ts +1 -6
- package/src/hooks/validators/useValidatorQueuedRewardAllocation.ts +1 -6
- package/src/hooks/validators/useValidatorRewardAllocation.ts +1 -6
- package/src/types/global.d.ts +5 -7
- package/src/actions/clients/fetchRailwayBackend.ts +0 -34
- package/src/actions/pol/getGlobalCuttingBoard.ts +0 -25
- package/src/actions/pol/getIncentiveFeeClaimStats.ts +0 -24
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
fetchBeep
|
|
3
|
-
|
|
4
|
-
} from "./chunk-MRQGHXAN.mjs";
|
|
2
|
+
fetchBeep
|
|
3
|
+
} from "./chunk-YLTWPFCJ.mjs";
|
|
5
4
|
import {
|
|
6
5
|
getApolloClient
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MKSFQIKC.mjs";
|
|
8
7
|
import {
|
|
9
8
|
pythAbi
|
|
10
9
|
} from "./chunk-CDK4YV3D.mjs";
|
|
@@ -15,7 +14,7 @@ import {
|
|
|
15
14
|
import {
|
|
16
15
|
BeraMonitoring,
|
|
17
16
|
initBeraError
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FGION6F6.mjs";
|
|
19
18
|
import {
|
|
20
19
|
assertAddress,
|
|
21
20
|
assertDefined,
|
|
@@ -37,7 +36,7 @@ import {
|
|
|
37
36
|
beraFetch,
|
|
38
37
|
beraFetchJson,
|
|
39
38
|
getErrorResponse
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-T43JPYQS.mjs";
|
|
41
40
|
import {
|
|
42
41
|
beraToken,
|
|
43
42
|
getHoneyToken,
|
|
@@ -48,7 +47,7 @@ import {
|
|
|
48
47
|
} from "./chunk-DQRH5VE3.mjs";
|
|
49
48
|
import {
|
|
50
49
|
RequestError
|
|
51
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-RFJGL4MF.mjs";
|
|
52
51
|
import {
|
|
53
52
|
BeraError,
|
|
54
53
|
InvalidArgumentError,
|
|
@@ -587,33 +586,11 @@ async function getChartData({
|
|
|
587
586
|
level: "error"
|
|
588
587
|
});
|
|
589
588
|
}
|
|
590
|
-
const { config } = parseBaseArgs({});
|
|
591
|
-
if (!config.beep) {
|
|
592
|
-
const params = new URLSearchParams({
|
|
593
|
-
interval: "day",
|
|
594
|
-
first: String(days)
|
|
595
|
-
});
|
|
596
|
-
const snapshots = await beraFetchJson({
|
|
597
|
-
url: `/api/honey/snapshots?${params}`,
|
|
598
|
-
name: "honey-snapshots",
|
|
599
|
-
type: "rest"
|
|
600
|
-
});
|
|
601
|
-
return snapshots.map(fromHoneySnapshot);
|
|
602
|
-
}
|
|
603
589
|
return fetchBeep("/v0/honey/snapshots/{interval}", {
|
|
604
590
|
path: { interval: "day" },
|
|
605
591
|
query: { perPage: String(days) }
|
|
606
592
|
});
|
|
607
593
|
}
|
|
608
|
-
function fromHoneySnapshot(snapshot) {
|
|
609
|
-
return {
|
|
610
|
-
timestamp: Math.floor(Number(snapshot.timestamp) / 1e6),
|
|
611
|
-
mintVolume: snapshot.mintVolume,
|
|
612
|
-
redeemVolume: snapshot.redeemVolume,
|
|
613
|
-
totalVolume: snapshot.totalVolume,
|
|
614
|
-
totalSupply: snapshot.totalSupply
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
594
|
|
|
618
595
|
// src/actions/honey/getCollateralWeights.ts
|
|
619
596
|
import { honeyFactoryAbi } from "@berachain/abis/honey/honeyFactory";
|
|
@@ -947,16 +924,6 @@ async function getHoney24hVolume() {
|
|
|
947
924
|
level: "error"
|
|
948
925
|
});
|
|
949
926
|
}
|
|
950
|
-
const { config } = parseBaseArgs({});
|
|
951
|
-
if (!config.beep) {
|
|
952
|
-
const params = new URLSearchParams({ interval: "hour", first: "24" });
|
|
953
|
-
const snapshots2 = await beraFetchJson({
|
|
954
|
-
url: `/api/honey/snapshots?${params}`,
|
|
955
|
-
name: "honey-snapshots",
|
|
956
|
-
type: "rest"
|
|
957
|
-
});
|
|
958
|
-
return sumTotalVolume(snapshots2);
|
|
959
|
-
}
|
|
960
927
|
const snapshots = await fetchBeep("/v0/honey/snapshots/{interval}", {
|
|
961
928
|
path: { interval: "hour" },
|
|
962
929
|
query: { perPage: "24" }
|
|
@@ -1602,14 +1569,6 @@ async function getEarnedStakedBeraVault({
|
|
|
1602
1569
|
account,
|
|
1603
1570
|
...args
|
|
1604
1571
|
}) {
|
|
1605
|
-
const { config } = parseBaseArgs(args);
|
|
1606
|
-
if (!config.beep) {
|
|
1607
|
-
return fetchRailwayBackend(
|
|
1608
|
-
"/vaults/{vault}/earnings/{owner}",
|
|
1609
|
-
{ path: { vault: address, owner: account } },
|
|
1610
|
-
args
|
|
1611
|
-
);
|
|
1612
|
-
}
|
|
1613
1572
|
return fetchBeep(
|
|
1614
1573
|
"/v0/stake/{vault}/earnings/{owner}",
|
|
1615
1574
|
{ path: { vault: address, owner: account } },
|
|
@@ -1617,70 +1576,6 @@ async function getEarnedStakedBeraVault({
|
|
|
1617
1576
|
);
|
|
1618
1577
|
}
|
|
1619
1578
|
|
|
1620
|
-
// src/actions/pol/getRewardVaults.ts
|
|
1621
|
-
import { formatUnits as formatUnits6 } from "viem";
|
|
1622
|
-
import { rewardVaultAbi as rewardVaultAbi2 } from "@berachain/abis/pol/rewards/rewardVault";
|
|
1623
|
-
import {
|
|
1624
|
-
GetVaults
|
|
1625
|
-
} from "@berachain/graphql/pol/api";
|
|
1626
|
-
async function getRewardVaults({
|
|
1627
|
-
filter,
|
|
1628
|
-
publicClient,
|
|
1629
|
-
...args
|
|
1630
|
-
} = {}) {
|
|
1631
|
-
const bexApiGraphqlClient = getApolloClient("api", args);
|
|
1632
|
-
const res = await bexApiGraphqlClient.query({
|
|
1633
|
-
query: GetVaults,
|
|
1634
|
-
variables: filter
|
|
1635
|
-
});
|
|
1636
|
-
const incentives = await Promise.allSettled(
|
|
1637
|
-
res.data.polGetRewardVaults.vaults.map(async (vault) => {
|
|
1638
|
-
if (!publicClient) return void 0;
|
|
1639
|
-
return Promise.allSettled(
|
|
1640
|
-
vault.activeIncentives.map(
|
|
1641
|
-
(incentive) => publicClient.readContract({
|
|
1642
|
-
abi: rewardVaultAbi2,
|
|
1643
|
-
address: vault.address,
|
|
1644
|
-
functionName: "incentives",
|
|
1645
|
-
args: [incentive.tokenAddress]
|
|
1646
|
-
})
|
|
1647
|
-
)
|
|
1648
|
-
);
|
|
1649
|
-
})
|
|
1650
|
-
);
|
|
1651
|
-
const vaults = res.data.polGetRewardVaults.vaults.map((vault, index) => {
|
|
1652
|
-
let totalIncentiveInUsdc = 0;
|
|
1653
|
-
const incentivesArray = vault.activeIncentives.map((apiIncentive, incIdx) => {
|
|
1654
|
-
const tokenPrice = Number(apiIncentive.remainingAmountUsd) && Number(apiIncentive.remainingAmount) ? Number(apiIncentive.remainingAmountUsd) / Number(apiIncentive.remainingAmount) : 0;
|
|
1655
|
-
const remainingAmount = incentives[index]?.status === "fulfilled" && incentives[index]?.value?.[incIdx]?.status === "fulfilled" ? formatUnits6(
|
|
1656
|
-
BigInt(incentives[index].value[incIdx].value[2]),
|
|
1657
|
-
apiIncentive.token.decimals
|
|
1658
|
-
) : apiIncentive.remainingAmount;
|
|
1659
|
-
totalIncentiveInUsdc += Number(remainingAmount) * Number(tokenPrice);
|
|
1660
|
-
return {
|
|
1661
|
-
...apiIncentive,
|
|
1662
|
-
remainingAmount
|
|
1663
|
-
};
|
|
1664
|
-
});
|
|
1665
|
-
return {
|
|
1666
|
-
...vault,
|
|
1667
|
-
dynamicData: {
|
|
1668
|
-
...vault.dynamicData,
|
|
1669
|
-
allTimeRewards: vault.dynamicData?.allTimeRewards ?? "0",
|
|
1670
|
-
rewardCapturePercentage: vault.dynamicData?.rewardCapturePercentage ?? 0,
|
|
1671
|
-
activeIncentivesValueUsd: totalIncentiveInUsdc.toString(),
|
|
1672
|
-
activeIncentivesRateUsd: vault.dynamicData?.activeIncentivesRateUsd ?? "0",
|
|
1673
|
-
rewardCapturePerBlock: vault.dynamicData?.rewardCapturePerBlock ?? 0
|
|
1674
|
-
},
|
|
1675
|
-
activeIncentives: incentivesArray
|
|
1676
|
-
};
|
|
1677
|
-
});
|
|
1678
|
-
return {
|
|
1679
|
-
pagination: res.data.polGetRewardVaults.pagination,
|
|
1680
|
-
gaugeList: vaults
|
|
1681
|
-
};
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
1579
|
// src/actions/pol/getBGTGlobalInfo.ts
|
|
1685
1580
|
import {
|
|
1686
1581
|
GlobalData
|
|
@@ -1747,36 +1642,10 @@ async function getBgtTokenTotalSupply({
|
|
|
1747
1642
|
}
|
|
1748
1643
|
}
|
|
1749
1644
|
|
|
1750
|
-
// src/actions/pol/getGlobalCuttingBoard.ts
|
|
1751
|
-
import {
|
|
1752
|
-
GqlRewardVaultOrderBy,
|
|
1753
|
-
GqlRewardVaultOrderDirection
|
|
1754
|
-
} from "@berachain/graphql/pol/api";
|
|
1755
|
-
async function getGlobalCuttingBoard(threshold) {
|
|
1756
|
-
const { gaugeList } = await getRewardVaults({
|
|
1757
|
-
filter: {
|
|
1758
|
-
// TODO sort by bgt capture percentage
|
|
1759
|
-
orderBy: GqlRewardVaultOrderBy.Apr,
|
|
1760
|
-
orderDirection: GqlRewardVaultOrderDirection.Desc,
|
|
1761
|
-
pageSize: threshold,
|
|
1762
|
-
where: {
|
|
1763
|
-
includeNonWhitelisted: false
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
});
|
|
1767
|
-
return gaugeList;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
1645
|
// src/actions/pol/getGlobalData.ts
|
|
1771
1646
|
async function getGlobalData(publicClient) {
|
|
1772
|
-
const [
|
|
1773
|
-
globalDataRes,
|
|
1774
|
-
globalCuttingBoardRes,
|
|
1775
|
-
bgtTotalSupplyRes,
|
|
1776
|
-
bgtTotalBoostsRes
|
|
1777
|
-
] = await Promise.allSettled([
|
|
1647
|
+
const [globalDataRes, bgtTotalSupplyRes, bgtTotalBoostsRes] = await Promise.allSettled([
|
|
1778
1648
|
getBGTGlobalInfo(),
|
|
1779
|
-
getGlobalCuttingBoard(300),
|
|
1780
1649
|
getBgtTokenTotalSupply({
|
|
1781
1650
|
publicClient
|
|
1782
1651
|
}),
|
|
@@ -1789,11 +1658,6 @@ async function getGlobalData(publicClient) {
|
|
|
1789
1658
|
initBeraError({ cause: globalDataRes.reason, level: "warning" })
|
|
1790
1659
|
);
|
|
1791
1660
|
}
|
|
1792
|
-
if (globalCuttingBoardRes.status === "rejected") {
|
|
1793
|
-
BeraMonitoring.captureException(
|
|
1794
|
-
initBeraError({ cause: globalCuttingBoardRes.reason, level: "warning" })
|
|
1795
|
-
);
|
|
1796
|
-
}
|
|
1797
1661
|
if (bgtTotalSupplyRes.status === "rejected") {
|
|
1798
1662
|
BeraMonitoring.captureException(
|
|
1799
1663
|
initBeraError({ cause: bgtTotalSupplyRes.reason, level: "warning" })
|
|
@@ -1806,27 +1670,11 @@ async function getGlobalData(publicClient) {
|
|
|
1806
1670
|
}
|
|
1807
1671
|
return {
|
|
1808
1672
|
bgtTotalSupply: bgtTotalSupplyRes.status === "fulfilled" ? bgtTotalSupplyRes.value : void 0,
|
|
1809
|
-
globalCuttingBoard: globalCuttingBoardRes.status === "fulfilled" ? globalCuttingBoardRes.value : [],
|
|
1810
1673
|
bgtTotalBoosts: bgtTotalBoostsRes.status === "fulfilled" ? bgtTotalBoostsRes.value : void 0,
|
|
1811
1674
|
...globalDataRes.status === "fulfilled" ? globalDataRes.value : {}
|
|
1812
1675
|
};
|
|
1813
1676
|
}
|
|
1814
1677
|
|
|
1815
|
-
// src/actions/pol/getIncentiveFeeClaimStats.ts
|
|
1816
|
-
async function getIncentiveFeeClaimStats() {
|
|
1817
|
-
if (typeof window === "undefined") {
|
|
1818
|
-
throw new BeraError({
|
|
1819
|
-
message: "getIncentiveFeeClaimStats is browser-only; call from a Client Component / SWR hook",
|
|
1820
|
-
level: "error"
|
|
1821
|
-
});
|
|
1822
|
-
}
|
|
1823
|
-
return beraFetchJson({
|
|
1824
|
-
url: "/api/pol/incentive-fee-claims",
|
|
1825
|
-
name: "pol-incentive-fee-claims",
|
|
1826
|
-
type: "rest"
|
|
1827
|
-
});
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
1678
|
// src/actions/pol/getMarkets.ts
|
|
1831
1679
|
async function getMarkets(args = {}) {
|
|
1832
1680
|
const { config } = parseBaseArgs(args);
|
|
@@ -1885,7 +1733,7 @@ async function getRewardProofsByValidator({
|
|
|
1885
1733
|
}
|
|
1886
1734
|
|
|
1887
1735
|
// src/actions/pol/getRewardTokenToBeraRate.ts
|
|
1888
|
-
import { formatUnits as
|
|
1736
|
+
import { formatUnits as formatUnits6, parseUnits as parseUnits5 } from "viem";
|
|
1889
1737
|
import { wberaStakerVaultAbi as stakeBeraVaultAbi } from "@berachain/abis/pol/wberaStakerVault";
|
|
1890
1738
|
async function getRewardTokenToBeraRate({
|
|
1891
1739
|
address,
|
|
@@ -1897,7 +1745,7 @@ async function getRewardTokenToBeraRate({
|
|
|
1897
1745
|
abi: stakeBeraVaultAbi,
|
|
1898
1746
|
functionName: "previewRedeem",
|
|
1899
1747
|
args: [parseUnits5("1", 18)]
|
|
1900
|
-
}).then((rate) => Number(
|
|
1748
|
+
}).then((rate) => Number(formatUnits6(rate, 18))).catch(() => 0);
|
|
1901
1749
|
}
|
|
1902
1750
|
|
|
1903
1751
|
// src/actions/pol/getRewardVault.ts
|
|
@@ -1933,9 +1781,9 @@ async function getRewardVault({
|
|
|
1933
1781
|
import { isSameAddress } from "@berachain-foundation/berancer-sdk";
|
|
1934
1782
|
import {
|
|
1935
1783
|
erc20Abi as erc20Abi4,
|
|
1936
|
-
formatUnits as
|
|
1784
|
+
formatUnits as formatUnits7
|
|
1937
1785
|
} from "viem";
|
|
1938
|
-
import { rewardVaultAbi as
|
|
1786
|
+
import { rewardVaultAbi as rewardVaultAbi2 } from "@berachain/abis/pol/rewards/rewardVault";
|
|
1939
1787
|
function multicallResult(result, fallback) {
|
|
1940
1788
|
return result.status === "success" ? result.result : fallback;
|
|
1941
1789
|
}
|
|
@@ -1946,7 +1794,7 @@ async function getRewardVaultIncentives({
|
|
|
1946
1794
|
}) {
|
|
1947
1795
|
const whitelistedTokens = await publicClient.readContract({
|
|
1948
1796
|
address,
|
|
1949
|
-
abi:
|
|
1797
|
+
abi: rewardVaultAbi2,
|
|
1950
1798
|
functionName: "getWhitelistedTokens"
|
|
1951
1799
|
});
|
|
1952
1800
|
const hasStakingTokenAsIncentiveToken = whitelistedTokens.findIndex(
|
|
@@ -1954,7 +1802,7 @@ async function getRewardVaultIncentives({
|
|
|
1954
1802
|
) !== -1;
|
|
1955
1803
|
const totalSupply = hasStakingTokenAsIncentiveToken ? await publicClient.readContract({
|
|
1956
1804
|
address,
|
|
1957
|
-
abi:
|
|
1805
|
+
abi: rewardVaultAbi2,
|
|
1958
1806
|
functionName: "totalSupply"
|
|
1959
1807
|
}) : 0n;
|
|
1960
1808
|
const incentives = await Promise.allSettled(
|
|
@@ -1964,7 +1812,7 @@ async function getRewardVaultIncentives({
|
|
|
1964
1812
|
contracts: [
|
|
1965
1813
|
{
|
|
1966
1814
|
address,
|
|
1967
|
-
abi:
|
|
1815
|
+
abi: rewardVaultAbi2,
|
|
1968
1816
|
functionName: "incentives",
|
|
1969
1817
|
args: [token]
|
|
1970
1818
|
},
|
|
@@ -2007,16 +1855,16 @@ async function getRewardVaultIncentives({
|
|
|
2007
1855
|
return {
|
|
2008
1856
|
token,
|
|
2009
1857
|
manager,
|
|
2010
|
-
minIncentiveRate:
|
|
2011
|
-
incentiveRate:
|
|
2012
|
-
remainingAmount:
|
|
1858
|
+
minIncentiveRate: formatUnits7(minIncentiveRate, decimalsResult),
|
|
1859
|
+
incentiveRate: formatUnits7(incentiveRate, decimalsResult),
|
|
1860
|
+
remainingAmount: formatUnits7(remainingAmount, decimalsResult),
|
|
2013
1861
|
name: multicallResult(name, void 0),
|
|
2014
1862
|
symbol: multicallResult(symbol, void 0),
|
|
2015
1863
|
decimals: decimalsResult,
|
|
2016
|
-
pendingAmount: isSameAddress(stakingToken, token) ?
|
|
1864
|
+
pendingAmount: isSameAddress(stakingToken, token) ? formatUnits7(
|
|
2017
1865
|
multicallResult(totalBalance, 0n) - totalSupply - remainingAmount,
|
|
2018
1866
|
decimalsResult
|
|
2019
|
-
) :
|
|
1867
|
+
) : formatUnits7(
|
|
2020
1868
|
multicallResult(totalBalance, 0n) - remainingAmount,
|
|
2021
1869
|
decimalsResult
|
|
2022
1870
|
)
|
|
@@ -2043,19 +1891,83 @@ async function getRewardVaultIncentives({
|
|
|
2043
1891
|
}
|
|
2044
1892
|
|
|
2045
1893
|
// src/actions/pol/getRewardVaultStakingToken.ts
|
|
2046
|
-
import { rewardVaultAbi as
|
|
1894
|
+
import { rewardVaultAbi as rewardVaultAbi3 } from "@berachain/abis/pol/rewards/rewardVault";
|
|
2047
1895
|
async function getRewardVaultStakingToken({
|
|
2048
1896
|
address,
|
|
2049
1897
|
publicClient
|
|
2050
1898
|
}) {
|
|
2051
1899
|
const vaultAddress = await publicClient.readContract({
|
|
2052
1900
|
address,
|
|
2053
|
-
abi:
|
|
1901
|
+
abi: rewardVaultAbi3,
|
|
2054
1902
|
functionName: "stakeToken"
|
|
2055
1903
|
});
|
|
2056
1904
|
return vaultAddress;
|
|
2057
1905
|
}
|
|
2058
1906
|
|
|
1907
|
+
// src/actions/pol/getRewardVaults.ts
|
|
1908
|
+
import { formatUnits as formatUnits8 } from "viem";
|
|
1909
|
+
import { rewardVaultAbi as rewardVaultAbi4 } from "@berachain/abis/pol/rewards/rewardVault";
|
|
1910
|
+
import {
|
|
1911
|
+
GetVaults
|
|
1912
|
+
} from "@berachain/graphql/pol/api";
|
|
1913
|
+
async function getRewardVaults({
|
|
1914
|
+
filter,
|
|
1915
|
+
publicClient,
|
|
1916
|
+
...args
|
|
1917
|
+
} = {}) {
|
|
1918
|
+
const bexApiGraphqlClient = getApolloClient("api", args);
|
|
1919
|
+
const res = await bexApiGraphqlClient.query({
|
|
1920
|
+
query: GetVaults,
|
|
1921
|
+
variables: filter
|
|
1922
|
+
});
|
|
1923
|
+
const incentives = await Promise.allSettled(
|
|
1924
|
+
res.data.polGetRewardVaults.vaults.map(async (vault) => {
|
|
1925
|
+
if (!publicClient) return void 0;
|
|
1926
|
+
return Promise.allSettled(
|
|
1927
|
+
vault.activeIncentives.map(
|
|
1928
|
+
(incentive) => publicClient.readContract({
|
|
1929
|
+
abi: rewardVaultAbi4,
|
|
1930
|
+
address: vault.address,
|
|
1931
|
+
functionName: "incentives",
|
|
1932
|
+
args: [incentive.tokenAddress]
|
|
1933
|
+
})
|
|
1934
|
+
)
|
|
1935
|
+
);
|
|
1936
|
+
})
|
|
1937
|
+
);
|
|
1938
|
+
const vaults = res.data.polGetRewardVaults.vaults.map((vault, index) => {
|
|
1939
|
+
let totalIncentiveInUsdc = 0;
|
|
1940
|
+
const incentivesArray = vault.activeIncentives.map((apiIncentive, incIdx) => {
|
|
1941
|
+
const tokenPrice = Number(apiIncentive.remainingAmountUsd) && Number(apiIncentive.remainingAmount) ? Number(apiIncentive.remainingAmountUsd) / Number(apiIncentive.remainingAmount) : 0;
|
|
1942
|
+
const remainingAmount = incentives[index]?.status === "fulfilled" && incentives[index]?.value?.[incIdx]?.status === "fulfilled" ? formatUnits8(
|
|
1943
|
+
BigInt(incentives[index].value[incIdx].value[2]),
|
|
1944
|
+
apiIncentive.token.decimals
|
|
1945
|
+
) : apiIncentive.remainingAmount;
|
|
1946
|
+
totalIncentiveInUsdc += Number(remainingAmount) * Number(tokenPrice);
|
|
1947
|
+
return {
|
|
1948
|
+
...apiIncentive,
|
|
1949
|
+
remainingAmount
|
|
1950
|
+
};
|
|
1951
|
+
});
|
|
1952
|
+
return {
|
|
1953
|
+
...vault,
|
|
1954
|
+
dynamicData: {
|
|
1955
|
+
...vault.dynamicData,
|
|
1956
|
+
allTimeRewards: vault.dynamicData?.allTimeRewards ?? "0",
|
|
1957
|
+
rewardCapturePercentage: vault.dynamicData?.rewardCapturePercentage ?? 0,
|
|
1958
|
+
activeIncentivesValueUsd: totalIncentiveInUsdc.toString(),
|
|
1959
|
+
activeIncentivesRateUsd: vault.dynamicData?.activeIncentivesRateUsd ?? "0",
|
|
1960
|
+
rewardCapturePerBlock: vault.dynamicData?.rewardCapturePerBlock ?? 0
|
|
1961
|
+
},
|
|
1962
|
+
activeIncentives: incentivesArray
|
|
1963
|
+
};
|
|
1964
|
+
});
|
|
1965
|
+
return {
|
|
1966
|
+
pagination: res.data.polGetRewardVaults.pagination,
|
|
1967
|
+
rewardVaultList: vaults
|
|
1968
|
+
};
|
|
1969
|
+
}
|
|
1970
|
+
|
|
2059
1971
|
// src/actions/pol/getStakedBeraAPR.ts
|
|
2060
1972
|
import {
|
|
2061
1973
|
GetSWberaVaultMetadata,
|
|
@@ -2154,8 +2066,7 @@ async function getSWBeraVaultMetadata({
|
|
|
2154
2066
|
oneShareWorthWindowAgo,
|
|
2155
2067
|
tvl24HoursAgo,
|
|
2156
2068
|
underlyingTotalSupply,
|
|
2157
|
-
lockPeriod
|
|
2158
|
-
incentiveFeeClaimStats
|
|
2069
|
+
lockPeriod
|
|
2159
2070
|
] = await Promise.all([
|
|
2160
2071
|
publicClient.readContract({
|
|
2161
2072
|
address,
|
|
@@ -2214,8 +2125,7 @@ async function getSWBeraVaultMetadata({
|
|
|
2214
2125
|
getStakeWithdrawalCooldown({
|
|
2215
2126
|
publicClient,
|
|
2216
2127
|
address
|
|
2217
|
-
})
|
|
2218
|
-
getIncentiveFeeClaimStats()
|
|
2128
|
+
})
|
|
2219
2129
|
]);
|
|
2220
2130
|
const exchangeRateWindowAgo = new bignumber_js_default(
|
|
2221
2131
|
oneShareWorthWindowAgo.toString()
|
|
@@ -2236,9 +2146,7 @@ async function getSWBeraVaultMetadata({
|
|
|
2236
2146
|
tvl: new bignumber_js_default(tvl24HoursAgo.toString()).dividedBy(1e18).toString()
|
|
2237
2147
|
},
|
|
2238
2148
|
totalWBeraIssued: new bignumber_js_default(underlyingTotalSupply.toString()).dividedBy(1e18).toString(),
|
|
2239
|
-
lockPeriod
|
|
2240
|
-
totalBuyBacks: incentiveFeeClaimStats.sumAllClaims,
|
|
2241
|
-
totalBuyBacksInLast24Hours: incentiveFeeClaimStats.sumClaimsInLast24Hours
|
|
2149
|
+
lockPeriod
|
|
2242
2150
|
};
|
|
2243
2151
|
} catch (error) {
|
|
2244
2152
|
console.error("Failed to get SW Bera Vault Metadata", error);
|
|
@@ -3468,7 +3376,7 @@ async function getApiEnrichedAllocation({
|
|
|
3468
3376
|
percentage: allocation2.percentage,
|
|
3469
3377
|
receiver: allocation2.receiver,
|
|
3470
3378
|
startBlock,
|
|
3471
|
-
receivingVault: vaults?.
|
|
3379
|
+
receivingVault: vaults?.rewardVaultList.find(
|
|
3472
3380
|
(vault) => isAddressEqual(vault.address, allocation2.receiver)
|
|
3473
3381
|
)
|
|
3474
3382
|
};
|
|
@@ -4127,15 +4035,14 @@ export {
|
|
|
4127
4035
|
getBgtAprSimulation,
|
|
4128
4036
|
getBgtIncentiveDistributorPaused,
|
|
4129
4037
|
getEarnedStakedBeraVault,
|
|
4130
|
-
getRewardVaults,
|
|
4131
4038
|
getGlobalData,
|
|
4132
|
-
getIncentiveFeeClaimStats,
|
|
4133
4039
|
getMarkets,
|
|
4134
4040
|
getRewardProofsByValidator,
|
|
4135
4041
|
getRewardTokenToBeraRate,
|
|
4136
4042
|
getRewardVault,
|
|
4137
4043
|
getRewardVaultIncentives,
|
|
4138
4044
|
getRewardVaultStakingToken,
|
|
4045
|
+
getRewardVaults,
|
|
4139
4046
|
getStakedBeraAPR,
|
|
4140
4047
|
getStakedBeraSnapshots,
|
|
4141
4048
|
getStakeWithdrawalCooldown,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
beraFetchJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T43JPYQS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
parseBaseArgs
|
|
6
6
|
} from "./chunk-DQRH5VE3.mjs";
|
|
@@ -30,25 +30,10 @@ function fetchOpenApi(link, path, params, fallbackName) {
|
|
|
30
30
|
// src/actions/clients/fetchBeep.ts
|
|
31
31
|
function fetchBeep(path, params, args = {}) {
|
|
32
32
|
const { config } = parseBaseArgs(args);
|
|
33
|
-
if (!config.beep) {
|
|
34
|
-
throw new Error("fetchBeep: `beep` backend is not configured.");
|
|
35
|
-
}
|
|
36
33
|
return fetchOpenApi(config.beep, path, params, "beep");
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
// src/actions/clients/fetchRailwayBackend.ts
|
|
40
|
-
function fetchRailwayBackend(path, params, args = {}) {
|
|
41
|
-
const { config } = parseBaseArgs(args);
|
|
42
|
-
return fetchOpenApi(
|
|
43
|
-
config.backend,
|
|
44
|
-
path,
|
|
45
|
-
params,
|
|
46
|
-
"backend-railway"
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
36
|
export {
|
|
51
37
|
fetchOpenApi,
|
|
52
|
-
fetchBeep
|
|
53
|
-
fetchRailwayBackend
|
|
38
|
+
fetchBeep
|
|
54
39
|
};
|
|
@@ -14,21 +14,21 @@ import {
|
|
|
14
14
|
useBexStatus,
|
|
15
15
|
useBlockTime,
|
|
16
16
|
useHoneyConfig
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-W2VODV76.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SWRConfig
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-4ML4Y6UN.mjs";
|
|
21
21
|
import "../chunk-HYDP32P6.mjs";
|
|
22
22
|
import "../chunk-HQCOU6GY.mjs";
|
|
23
23
|
import "../chunk-SGIJVHZO.mjs";
|
|
24
24
|
import {
|
|
25
25
|
BeraMonitoring
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-FGION6F6.mjs";
|
|
27
27
|
import "../chunk-GY6B3PD5.mjs";
|
|
28
28
|
import "../chunk-BGMRHTBQ.mjs";
|
|
29
29
|
import "../chunk-IXIBY5FP.mjs";
|
|
30
30
|
import "../chunk-DQRH5VE3.mjs";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-RFJGL4MF.mjs";
|
|
32
32
|
import {
|
|
33
33
|
BeraError
|
|
34
34
|
} from "../chunk-KHXJDYA4.mjs";
|
package/dist/errors/exports.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
BeraMonitoring,
|
|
7
7
|
initBeraError
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-FGION6F6.mjs";
|
|
9
9
|
import {
|
|
10
10
|
assertAddress,
|
|
11
11
|
assertAmount,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../chunk-SZ5C44L5.mjs";
|
|
19
19
|
import {
|
|
20
20
|
RequestError
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-RFJGL4MF.mjs";
|
|
22
22
|
import {
|
|
23
23
|
BeraError,
|
|
24
24
|
InvalidArgumentError,
|
|
@@ -29,12 +29,11 @@ declare class BeraApolloClient extends ApolloClient {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Browser-reachable Apollo client factory for `api` and Bend's `whisk`
|
|
32
|
-
* endpoints.
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* resolve server-side.
|
|
32
|
+
* endpoints. The pol subgraph client is server-only; browser data access goes
|
|
33
|
+
* through the typed `/api/pol/*` REST endpoints. Same auth shape as
|
|
34
|
+
* bend.whiskApi — non-public env values only resolve server-side.
|
|
36
35
|
*/
|
|
37
|
-
type GraphqlClient = "api" | "bend.whisk" | "
|
|
36
|
+
type GraphqlClient = "api" | "bend.whisk" | "pol.subgraph";
|
|
38
37
|
declare function getApolloClient(clientName: GraphqlClient, { ...args }: BeraJS.BaseFunctionArgs): BeraApolloClient;
|
|
39
38
|
|
|
40
39
|
export { BeraApolloClient as B, getApolloClient as g };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Address, PublicClient
|
|
1
|
+
import { Address, PublicClient } from 'viem';
|
|
2
2
|
import { BeraConfig, ChainId } from '@berachain/config/internal';
|
|
3
3
|
import { I as IAggregatorArgs, g as IRawAggregatorQuote, b as Token, d as HoneyConfigContextReturn, B as BalanceToken, P as PythLatestUpdates } from './HoneyConfigProvider-COOuDNra.js';
|
|
4
4
|
import { A as Aggregators } from './dex-C_BB0b0O.js';
|
|
5
|
-
import {
|
|
5
|
+
import { GlobalDataQuery, ApiVaultFragment, GetVaultsQueryVariables, GqlChain, GetVaultHistoryQueryVariables, GetVaultHistoryQuery, ApiValidatorInListFragment } from '@berachain/graphql/pol/api';
|
|
6
6
|
import { P as ProtocolMetadata } from './pol.d-CeRgXBL8.js';
|
|
7
7
|
|
|
8
8
|
interface GetConvertToAssetsProps {
|
|
@@ -99,54 +99,6 @@ declare abstract class BaseAggregator {
|
|
|
99
99
|
protected fetch(url: string | URL, options?: RequestInit): Promise<Response>;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
interface PoolStatus {
|
|
103
|
-
isPoolInRecoveryMode: boolean;
|
|
104
|
-
isPoolPaused: boolean;
|
|
105
|
-
}
|
|
106
|
-
declare function getPoolPausedState({ publicClient, poolAddress, }: {
|
|
107
|
-
publicClient: PublicClient;
|
|
108
|
-
poolAddress: Address;
|
|
109
|
-
}): Promise<PoolStatus>;
|
|
110
|
-
|
|
111
|
-
interface OnChainPool {
|
|
112
|
-
pausedState: PoolStatus;
|
|
113
|
-
address: Address;
|
|
114
|
-
id: Hex;
|
|
115
|
-
name: string;
|
|
116
|
-
poolTokens: [
|
|
117
|
-
/**
|
|
118
|
-
* The addresses of the tokens in the pool
|
|
119
|
-
*/
|
|
120
|
-
readonly Address[],
|
|
121
|
-
/**
|
|
122
|
-
* The balances of the tokens in the pool
|
|
123
|
-
*/
|
|
124
|
-
string[],
|
|
125
|
-
/**
|
|
126
|
-
* The last change block of the pool
|
|
127
|
-
*/
|
|
128
|
-
number
|
|
129
|
-
];
|
|
130
|
-
totalSupply: string;
|
|
131
|
-
swapFee: string;
|
|
132
|
-
decimals: number;
|
|
133
|
-
weights: readonly string[] | undefined;
|
|
134
|
-
version: unknown;
|
|
135
|
-
factory: Address;
|
|
136
|
-
type: GqlPoolType;
|
|
137
|
-
/**
|
|
138
|
-
* For example, if value is 300000n and precision is 1000n, the user-set amplification parameter would be 300000n / 1000n = 300n.
|
|
139
|
-
*
|
|
140
|
-
* The first number is the raw value, the second number is a boolean indicating if the amplification parameter is being updated, and the third number is the precision factor.
|
|
141
|
-
* @see https://github.com/balancer/docs-developers/blob/main/references/valuing-balancer-lp-tokens/pools/stablepools.md#getamplificationparameter
|
|
142
|
-
*/
|
|
143
|
-
amplificationParameter: readonly [number, boolean, number] | undefined;
|
|
144
|
-
}
|
|
145
|
-
declare function getOnChainPool({ poolId, publicClient, ...args }: {
|
|
146
|
-
poolId: string;
|
|
147
|
-
publicClient: PublicClient;
|
|
148
|
-
} & BeraJS.BaseFunctionArgs): Promise<OnChainPool>;
|
|
149
|
-
|
|
150
102
|
interface GetVaultsBalancesArgs extends BeraJS.BaseFunctionArgs {
|
|
151
103
|
client: PublicClient;
|
|
152
104
|
collateralList: Token[];
|
|
@@ -310,7 +262,6 @@ interface GlobalInfo extends Partial<ReturnedFromQuery> {
|
|
|
310
262
|
}
|
|
311
263
|
|
|
312
264
|
interface GlobalData extends GlobalInfo {
|
|
313
|
-
globalCuttingBoard: ApiVaultFragment[] | undefined;
|
|
314
265
|
bgtTotalSupply: string | undefined;
|
|
315
266
|
bgtTotalBoosts: string | undefined;
|
|
316
267
|
}
|
|
@@ -346,8 +297,8 @@ declare function getRewardVaultIncentives({ address, stakingToken, publicClient,
|
|
|
346
297
|
publicClient: PublicClient;
|
|
347
298
|
}): Promise<RewardVaultIncentive[]>;
|
|
348
299
|
|
|
349
|
-
interface
|
|
350
|
-
|
|
300
|
+
interface GetRewardVaultData {
|
|
301
|
+
rewardVaultList: ApiVaultFragment[];
|
|
351
302
|
pagination: {
|
|
352
303
|
currentPage: number;
|
|
353
304
|
totalCount: number;
|
|
@@ -356,7 +307,7 @@ interface GetGaugeData {
|
|
|
356
307
|
declare function getRewardVaults({ filter, publicClient, ...args }?: {
|
|
357
308
|
filter?: GetVaultsQueryVariables;
|
|
358
309
|
publicClient?: PublicClient | undefined;
|
|
359
|
-
} & BeraJS.BaseFunctionArgs): Promise<
|
|
310
|
+
} & BeraJS.BaseFunctionArgs): Promise<GetRewardVaultData>;
|
|
360
311
|
|
|
361
312
|
interface VaultMetadata {
|
|
362
313
|
current: {
|
|
@@ -373,8 +324,6 @@ interface VaultMetadata {
|
|
|
373
324
|
};
|
|
374
325
|
totalWBeraIssued: string;
|
|
375
326
|
lockPeriod?: number;
|
|
376
|
-
totalBuyBacks: number;
|
|
377
|
-
totalBuyBacksInLast24Hours: number;
|
|
378
327
|
address: Address;
|
|
379
328
|
}
|
|
380
329
|
/**
|
|
@@ -559,4 +508,4 @@ declare function getValidatorQueuedOperatorAddress({ client, pubKey, ...args }:
|
|
|
559
508
|
pubKey: Address;
|
|
560
509
|
} & BeraJS.BaseFunctionArgs): Promise<ValidatorQueuedOperatorAddress | undefined>;
|
|
561
510
|
|
|
562
|
-
export {
|
|
511
|
+
export { getRewardVaultIncentives as A, BaseAggregator as B, getRewardVaultRewards as C, getRewardVaults as D, getSWBeraVaultMetadata as E, getSWBeraWithdrawal as F, type GetBgtAprSimulationArgs as G, getUserActiveValidators as H, type IsBadCollateralArgs as I, getUserBoostsOnValidator as J, getUserStakingPositions as K, getUserVaults as L, getValidatorQueuedCommission as M, getValidatorQueuedOperatorAddress as N, getValidatorRewardAllocation as O, getVaultHistory as P, isBadCollateralAsset as Q, RewardVaultDistributionMode as R, type StakedBeraWithdrawal as S, isSameRewardAllocation as T, type UserBoostsOnValidator as U, type ValidatorRewardAllocation as V, type GetBgtAprSimulationResult as a, type GetConvertToAssetsProps as b, type GetHoneyVaultsBalanceResponse as c, type GetMarkets as d, type GetRewardVaultData as e, type GetRewardVaultRewardsReturn as f, type GetUserVaultsResponse as g, type GetVaultHistoryArgs as h, type GlobalData as i, type IsBadCollateralResponse as j, type RewardVaultIncentive as k, type UserStakingPoolPosition as l, type UserVault as m, type ValidatorQueuedCommission as n, type ValidatorQueuedOperatorAddress as o, type ValidatorRewardAllocationRaw as p, type ValidatorRewardAllocationUpdate as q, type ValidatorRewardAllocationUpdateWithExpiration as r, type ValidatorWithUserBoost as s, type VaultMetadata as t, formatValidatorRewardAllocation as u, getBgtAprSimulation as v, getConvertToAssets as w, getGlobalData as x, getHoneyVaultsBalance as y, getMarkets as z };
|