@bze/bze-ui-kit 0.3.1 → 0.4.1

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bze/bze-ui-kit
2
2
 
3
- Shared utilities, hooks, query clients, and services for BZE ecosystem frontend apps.
3
+ Shared hooks, utilities, query clients, services, UI components, and types for BZE ecosystem frontend apps.
4
4
 
5
5
  ## Installation
6
6
 
@@ -13,10 +13,10 @@ npm install @bze/bze-ui-kit
13
13
  The consuming app must have these installed (they are **not** bundled):
14
14
 
15
15
  ```sh
16
- npm install @bze/bzejs @cosmjs/stargate bignumber.js chain-registry \
16
+ npm install @bze/bzejs @chakra-ui/react @cosmjs/stargate bignumber.js chain-registry \
17
17
  @chain-registry/types @chain-registry/utils @chain-registry/v2 \
18
18
  @interchain-kit/core @interchain-kit/react @interchainjs/encoding \
19
- react react-dom
19
+ interchainjs next-themes react react-dom react-icons
20
20
  ```
21
21
 
22
22
  ## Usage
@@ -67,14 +67,15 @@ The library exports the `AssetsContext` and `AssetsContextType` but each app mus
67
67
 
68
68
  | Module | Description |
69
69
  |--------|-------------|
70
- | `types/` | TypeScript interfaces for assets, balances, markets, pools, staking, IBC, events, settings |
70
+ | `types/` | TypeScript interfaces for assets, balances, markets, pools, staking, IBC, events, settings, burn, block |
71
71
  | `utils/` | Pure functions: amount math, denom helpers, formatting, address validation, staking APR, chart periods |
72
- | `constants/` | Chain config, RPC/REST endpoints, asset lists, keplr fallbacks, testnet definitions |
72
+ | `constants/` | Chain config, RPC/REST endpoints, asset lists, keplr fallbacks, testnet, ecosystem navigation |
73
73
  | `storage/` | localStorage wrapper with TTL + app settings persistence |
74
74
  | `service/` | AmmRouter (Dijkstra swap routing), BlockchainEventManager (pub-sub), assets_factory, keplr suggest chain |
75
- | `query/` | REST clients for bank, staking, markets, liquidity pools, epochs, IBC, burner, rewards, aggregator, prices |
76
- | `hooks/` | React hooks: useAssets, useBalances, useMarkets, useLiquidityPools, usePrices, useEpochs, useSigningClient, useSettings, useFeeTokens, useAssetsValue, useConnectionType |
75
+ | `query/` | REST clients for bank, staking, markets, liquidity pools, epochs, IBC, burner, raffle, block, module, rewards, aggregator, prices |
76
+ | `hooks/` | React hooks: useAssets, useBalances, useMarkets, useLiquidityPools, useLiquidityPool, usePrices, useEpochs, useSigningClient, useSettings, useFeeTokens, useAssetsValue, useConnectionType, useToast, useSDKTx/useBZETx/useIBCTx |
77
77
  | `contexts/` | Base `AssetsContextType` interface + `AssetsContext` React context |
78
+ | `components/` | Sidebar, WalletSidebarContent, SettingsSidebarContent, SettingsToggle, Toaster, HighlightText |
78
79
 
79
80
  ## Required environment variables
80
81
 
@@ -133,12 +134,11 @@ The library reads these `NEXT_PUBLIC_*` env vars at build time (inlined by Next.
133
134
 
134
135
  These are **not** in the library — each app keeps its own:
135
136
 
136
- - **useToast / useTx** — depend on app-specific Chakra UI toaster component
137
137
  - **useBlockchainListener** — different WebSocket event subscriptions per app
138
138
  - **useNavigation** — completely different route structures
139
- - **AssetsProvider** — each app composes the shared base with app-specific state
140
- - **Burner-only**: raffle queries, burn history hooks, block queries
141
- - **Dex-only**: locked liquidity hook, native staking data hook, rewards staking data hook
139
+ - **AssetsProvider** (`contexts/assets_context.tsx`) — each app composes the shared base `AssetsContextType` with app-specific state
140
+ - **Burner-only**: `useBurnerContext` (typed wrapper for extended context), `useBurningHistory`, `useNextBurning`, `useRaffles`
141
+ - **Dex-only**: `useLockedLiquidity`, `useNativeStakingData`, `useRewardsStakingData`
142
142
 
143
143
  ## Development
144
144
 
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import * as _bze_bzejs_bze_tradebin_store from '@bze/bzejs/bze/tradebin/store';
3
3
  import { LiquidityPoolSDKType, AggregatedOrderSDKType, MarketSDKType, OrderSDKType } from '@bze/bzejs/bze/tradebin/store';
4
4
  import { StakingRewardParticipantSDKType, PendingUnlockParticipantSDKType, StakingRewardSDKType } from '@bze/bzejs/bze/rewards/store';
5
5
  import * as _bze_bzejs_cosmos_staking_v1beta1_staking from '@bze/bzejs/cosmos/staking/v1beta1/staking';
6
- import { PoolSDKType, UnbondingDelegationSDKType } from '@bze/bzejs/cosmos/staking/v1beta1/staking';
6
+ import { PoolSDKType, DelegationResponseSDKType, UnbondingDelegationSDKType, ValidatorSDKType, BondStatus } from '@bze/bzejs/cosmos/staking/v1beta1/staking';
7
7
  import * as _chain_registry_types from '@chain-registry/types';
8
8
  import { Chain } from '@chain-registry/types';
9
9
  import * as _chain_registry_v2_types from '@chain-registry/v2-types';
@@ -943,7 +943,7 @@ declare function getPendingUnlockParticipants(): Promise<QueryAllPendingUnlockPa
943
943
  declare function getStakingRewardParticipantByAddress(address: string): Promise<QueryStakingRewardParticipantResponseSDKType>;
944
944
  declare function getAddressStakingRewards(address: string): Promise<AddressRewardsStaking>;
945
945
 
946
- declare const getAddressDelegations: (address: string) => Promise<_bze_bzejs_cosmos_staking_v1beta1_staking.DelegationResponseSDKType[]>;
946
+ declare const getAddressDelegations: (address: string) => Promise<DelegationResponseSDKType[]>;
947
947
  declare const getAddressNativeDelegatedBalance: (address: string) => Promise<Balance>;
948
948
  declare const getAddressUnbondingDelegations: (address: string) => Promise<UnbondingDelegationSDKType[]>;
949
949
  declare const getAddressUnbondingDelegationsSummary: (address: string) => Promise<NativeUnbondingSummary>;
@@ -959,6 +959,10 @@ declare const getStakingParams: () => Promise<_bze_bzejs_cosmos_staking_v1beta1_
959
959
  bond_denom: string;
960
960
  }>;
961
961
  declare const getStakingPool: () => Promise<_bze_bzejs_cosmos_staking_v1beta1_staking.PoolSDKType>;
962
+ declare const getValidators: (status?: BondStatus) => Promise<ValidatorSDKType[]>;
963
+ declare const getDelegatorValidators: (address: string) => Promise<ValidatorSDKType[]>;
964
+ declare const getDelegatorDelegations: (address: string) => Promise<DelegationResponseSDKType[]>;
965
+ declare const getValidatorDelegatorRewards: (address: string, validatorAddress: string) => Promise<_bze_bzejs_cosmos_base_v1beta1_coin.DecCoinSDKType[]>;
962
966
 
963
967
  declare function getAllTickers(): Promise<MarketData[]>;
964
968
  declare function getMarketOrdersHistory(marketId: string, limit?: number): Promise<HistoryOrder[]>;
@@ -1258,4 +1262,6 @@ interface SettingsToggleProps {
1258
1262
  }
1259
1263
  declare function SettingsToggle({ accentColor }: SettingsToggleProps): react_jsx_runtime.JSX.Element;
1260
1264
 
1261
- export { ASSET_TYPE_FACTORY, ASSET_TYPE_IBC, ASSET_TYPE_LP, ASSET_TYPE_NATIVE, type ActiveOrders, type AddressRewardsStaking, type AddressValidationResult, type AppSettings, type Asset, type AssetBalance, AssetsContext, type AssetsContextType, type Attribute, BZE_CIRCLE_LOGO, BZE_TESTNET_2_SUGGEST_CHAIN, BZE_TESTNET_NETWORK, type Balance, type BeeZeeEndpoints, type BlockResults, type BurnHistoryItem, CHART_1D, CHART_1Y, CHART_30D, CHART_4H, CHART_7D, CONNECTION_TYPE_NONE, CONNECTION_TYPE_POLLING, CONNECTION_TYPE_WS, CURRENT_WALLET_BALANCE_EVENT, type ChainAssets, type ConnectionType, type CounterpartyChainForChannel, DEFAULT_SETTINGS, DEFAULT_TX_MEMO, type DenomTrace, ECOSYSTEM_MENU_LABEL, EPOCH_START_EVENT, EXCLUDED_ASSETS, EXCLUDED_MARKETS, type EcosystemApp, type EndpointValidationResults, type EventCallback, type ExtendedPendingUnlockParticipantSDKType, HighlightText, type HistoryOrder, type IBCCounterparty, type IBCData, type IbcTransitionMock, type InternalEvent, LOCK_CHANGED_EVENT, LP_ASSETS_DECIMALS, type LiquidityPoolData, MAINNET_CHAIN_INFO_FALLBACK, type Market, type MarketData, NEXT_BURN_CHANGED_EVENT, type NativeStakingData, type NativeUnbondingSummary, type NextBurn, ORDER_BOOK_CHANGED_EVENT, ORDER_EXECUTED_EVENT, ORDER_TYPE_BUY, ORDER_TYPE_SELL, type PrettyBalance, type PriceApiResponse, RAFFLE_CHANGED_EVENT, SETTINGS_STORAGE_KEY, STABLE_COINS, SUPPLY_CHANGED_EVENT, SWAP_EXECUTED_EVENT, SettingsSidebarContent, SettingsToggle, Sidebar, type SwapHistory, type SwapRouteResult, TESTNET_CHAIN_INFO_FALLBACK, TOKEN_LOGO_PLACEHOLDER, TTL_NO_EXPIRY, type TendermintEvent, Toaster, type TradeViewChart, type TxOptions, TxStatus, type UserNativeStakingData, type UserNativeStakingRewards, type UserPoolData, VALIDATION_ERRORS, VERIFIED_ASSETS, type ValidationResult, WalletSidebarContent, addDebounce, addMultipleDebounce, ammRouter, amountToBigNumberUAmount, amountToUAmount, blockchainEventManager, calcNativeStakingApr, calculateAmountFromPrice, calculatePoolOppositeAmount, calculatePoolPrice, calculatePricePerUnit, calculateRewardsStakingApr, calculateRewardsStakingPendingRewards, calculateTotalAmount, calculateUserPoolData, canDepositFromIBC, canSendToIBC, cancelDebounce, checkAddressWonRaffle, convertToWebSocketUrl, counterpartyChainForChannel, createMarketId, createPoolId, createRestClient, denomOnFirstHopChainFromTrace, formatDate, formatTimeRemaining, formatTimeRemainingFromEpochs, formatUsdAmount, getAddressBalances, getAddressDelegations, getAddressFullMarketOrders, getAddressHistory, getAddressMarketOrders, getAddressNativeDelegatedBalance, getAddressNativeTotalRewards, getAddressPendingUnlock, getAddressRewards, getAddressStakingRewards, getAddressSwapHistory, getAddressUnbondingDelegations, getAddressUnbondingDelegationsSummary, getAggregatorHost, getAllBurnedCoins, getAllSupply, getAllSupplyMetadata, getAllTickers, getAnnualProvisions, getAppName, getArchwayRestURL, getArchwayRpcURL, getAssetLists, getAtomOneRestURL, getAtomOneRpcUrl, getBZEUSDPrice, getBlockDetailsByHeight, getBlockResults, getBlockTimeByHeight, getBurnerModuleAddress, getBurnerParams, getBurnerParamsWithClient, getChainAddressPrefix, getChainAssets, getChainByChainId, getChainByName, getChainExplorerURL, getChainId, getChainName, getChainNativeAssetDenom, getChains, getChartIntervalsLimit, getChartMinutes, getCurrentEpoch, getCurrentWeekEpochEndTime, getDefaultTxMemo, getDenomType, getDistributionParams, getEcosystemApps, getEpochDurationByIdentifier, getEpochsInfo, getFactoryDenomAdminAddress, getFromLocalStorage, getHardcodedLockAddress, getHashIBCTrace, getHourEpochInfo, getIBCAssetList, getIBCTraces, getIbcTransferTimeout, getJackalRestURL, getJackalRpcUrl, getKeyExpiry, getLiquidityPool, getLiquidityPools, getLockedBalances, getLockerAddress, getMarketBuyOrders, getMarketEventKey, getMarketHistory, getMarketOrder, getMarketOrderBookChangedEvent, getMarketOrders, getMarketOrdersHistory, getMarketSellOrders, getMarkets, getMinAmount, getModuleAddress, getNextBurning, getNoOfIntervalsNeeded, getNobleRestURL, getNobleRpcUrl, getOmniFlixRestURL, getOmniFlixRpcUrl, getOsmosisRestURL, getOsmosisRpcUrl, getPageRequestWithLimit, getPendingUnlockParticipants, getPeriodicEpochEndTime, getPeriodicWeekEpochEndTime, getRaffleModuleAddress, getRaffleWinners, getRaffles, getRestClient, getRestURL, getRpcURL, getSettings, getStakingParams, getStakingPool, getStakingRewardParticipantByAddress, getStakingRewards, getTradingViewIntervals, getUSDCDenom, getValidatorPageUrl, getValidatorSupportedDenoms, getWalletChainsNames, getWeekEpochInfo, intlDateFormat, isFactoryDenom, isIbcAsset, isIbcDenom, isLpDenom, isNativeDenom, isPoolSupportedByValidator, isTestnetChain, keplrSuggestChain, mapEventAttributes, openExternalLink, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, toBigNumber, toPercentage, truncateAddress, truncateDenom, uAmountToAmount, uAmountToBigNumberAmount, uPriceToBigNumberPrice, uPriceToPrice, useAsset, useAssetLiquidityPools, useAssetMarkets, useAssetPrice, useAssets, useAssetsContext, useAssetsManager, useAssetsValue, useBZETx, useBalance, useBalances, useConnectionType, useEpochs, useEpochsManager, useFeeTokens, useIBCChains, useIBCTx, useLiquidityPool, useLiquidityPools, useMarket, useMarkets, useMarketsManager, useSDKTx, useSettings, useSigningClient, useToast, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
1265
+ declare const TestnetBanner: () => react_jsx_runtime.JSX.Element | null;
1266
+
1267
+ export { ASSET_TYPE_FACTORY, ASSET_TYPE_IBC, ASSET_TYPE_LP, ASSET_TYPE_NATIVE, type ActiveOrders, type AddressRewardsStaking, type AddressValidationResult, type AppSettings, type Asset, type AssetBalance, AssetsContext, type AssetsContextType, type Attribute, BZE_CIRCLE_LOGO, BZE_TESTNET_2_SUGGEST_CHAIN, BZE_TESTNET_NETWORK, type Balance, type BeeZeeEndpoints, type BlockResults, type BurnHistoryItem, CHART_1D, CHART_1Y, CHART_30D, CHART_4H, CHART_7D, CONNECTION_TYPE_NONE, CONNECTION_TYPE_POLLING, CONNECTION_TYPE_WS, CURRENT_WALLET_BALANCE_EVENT, type ChainAssets, type ConnectionType, type CounterpartyChainForChannel, DEFAULT_SETTINGS, DEFAULT_TX_MEMO, type DenomTrace, ECOSYSTEM_MENU_LABEL, EPOCH_START_EVENT, EXCLUDED_ASSETS, EXCLUDED_MARKETS, type EcosystemApp, type EndpointValidationResults, type EventCallback, type ExtendedPendingUnlockParticipantSDKType, HighlightText, type HistoryOrder, type IBCCounterparty, type IBCData, type IbcTransitionMock, type InternalEvent, LOCK_CHANGED_EVENT, LP_ASSETS_DECIMALS, type LiquidityPoolData, MAINNET_CHAIN_INFO_FALLBACK, type Market, type MarketData, NEXT_BURN_CHANGED_EVENT, type NativeStakingData, type NativeUnbondingSummary, type NextBurn, ORDER_BOOK_CHANGED_EVENT, ORDER_EXECUTED_EVENT, ORDER_TYPE_BUY, ORDER_TYPE_SELL, type PrettyBalance, type PriceApiResponse, RAFFLE_CHANGED_EVENT, SETTINGS_STORAGE_KEY, STABLE_COINS, SUPPLY_CHANGED_EVENT, SWAP_EXECUTED_EVENT, SettingsSidebarContent, SettingsToggle, Sidebar, type SwapHistory, type SwapRouteResult, TESTNET_CHAIN_INFO_FALLBACK, TOKEN_LOGO_PLACEHOLDER, TTL_NO_EXPIRY, type TendermintEvent, TestnetBanner, Toaster, type TradeViewChart, type TxOptions, TxStatus, type UserNativeStakingData, type UserNativeStakingRewards, type UserPoolData, VALIDATION_ERRORS, VERIFIED_ASSETS, type ValidationResult, WalletSidebarContent, addDebounce, addMultipleDebounce, ammRouter, amountToBigNumberUAmount, amountToUAmount, blockchainEventManager, calcNativeStakingApr, calculateAmountFromPrice, calculatePoolOppositeAmount, calculatePoolPrice, calculatePricePerUnit, calculateRewardsStakingApr, calculateRewardsStakingPendingRewards, calculateTotalAmount, calculateUserPoolData, canDepositFromIBC, canSendToIBC, cancelDebounce, checkAddressWonRaffle, convertToWebSocketUrl, counterpartyChainForChannel, createMarketId, createPoolId, createRestClient, denomOnFirstHopChainFromTrace, formatDate, formatTimeRemaining, formatTimeRemainingFromEpochs, formatUsdAmount, getAddressBalances, getAddressDelegations, getAddressFullMarketOrders, getAddressHistory, getAddressMarketOrders, getAddressNativeDelegatedBalance, getAddressNativeTotalRewards, getAddressPendingUnlock, getAddressRewards, getAddressStakingRewards, getAddressSwapHistory, getAddressUnbondingDelegations, getAddressUnbondingDelegationsSummary, getAggregatorHost, getAllBurnedCoins, getAllSupply, getAllSupplyMetadata, getAllTickers, getAnnualProvisions, getAppName, getArchwayRestURL, getArchwayRpcURL, getAssetLists, getAtomOneRestURL, getAtomOneRpcUrl, getBZEUSDPrice, getBlockDetailsByHeight, getBlockResults, getBlockTimeByHeight, getBurnerModuleAddress, getBurnerParams, getBurnerParamsWithClient, getChainAddressPrefix, getChainAssets, getChainByChainId, getChainByName, getChainExplorerURL, getChainId, getChainName, getChainNativeAssetDenom, getChains, getChartIntervalsLimit, getChartMinutes, getCurrentEpoch, getCurrentWeekEpochEndTime, getDefaultTxMemo, getDelegatorDelegations, getDelegatorValidators, getDenomType, getDistributionParams, getEcosystemApps, getEpochDurationByIdentifier, getEpochsInfo, getFactoryDenomAdminAddress, getFromLocalStorage, getHardcodedLockAddress, getHashIBCTrace, getHourEpochInfo, getIBCAssetList, getIBCTraces, getIbcTransferTimeout, getJackalRestURL, getJackalRpcUrl, getKeyExpiry, getLiquidityPool, getLiquidityPools, getLockedBalances, getLockerAddress, getMarketBuyOrders, getMarketEventKey, getMarketHistory, getMarketOrder, getMarketOrderBookChangedEvent, getMarketOrders, getMarketOrdersHistory, getMarketSellOrders, getMarkets, getMinAmount, getModuleAddress, getNextBurning, getNoOfIntervalsNeeded, getNobleRestURL, getNobleRpcUrl, getOmniFlixRestURL, getOmniFlixRpcUrl, getOsmosisRestURL, getOsmosisRpcUrl, getPageRequestWithLimit, getPendingUnlockParticipants, getPeriodicEpochEndTime, getPeriodicWeekEpochEndTime, getRaffleModuleAddress, getRaffleWinners, getRaffles, getRestClient, getRestURL, getRpcURL, getSettings, getStakingParams, getStakingPool, getStakingRewardParticipantByAddress, getStakingRewards, getTradingViewIntervals, getUSDCDenom, getValidatorDelegatorRewards, getValidatorPageUrl, getValidatorSupportedDenoms, getValidators, getWalletChainsNames, getWeekEpochInfo, intlDateFormat, isFactoryDenom, isIbcAsset, isIbcDenom, isLpDenom, isNativeDenom, isPoolSupportedByValidator, isTestnetChain, keplrSuggestChain, mapEventAttributes, openExternalLink, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, toBigNumber, toPercentage, truncateAddress, truncateDenom, uAmountToAmount, uAmountToBigNumberAmount, uPriceToBigNumberPrice, uPriceToPrice, useAsset, useAssetLiquidityPools, useAssetMarkets, useAssetPrice, useAssets, useAssetsContext, useAssetsManager, useAssetsValue, useBZETx, useBalance, useBalances, useConnectionType, useEpochs, useEpochsManager, useFeeTokens, useIBCChains, useIBCTx, useLiquidityPool, useLiquidityPools, useMarket, useMarkets, useMarketsManager, useSDKTx, useSettings, useSigningClient, useToast, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as _bze_bzejs_bze_tradebin_store from '@bze/bzejs/bze/tradebin/store';
3
3
  import { LiquidityPoolSDKType, AggregatedOrderSDKType, MarketSDKType, OrderSDKType } from '@bze/bzejs/bze/tradebin/store';
4
4
  import { StakingRewardParticipantSDKType, PendingUnlockParticipantSDKType, StakingRewardSDKType } from '@bze/bzejs/bze/rewards/store';
5
5
  import * as _bze_bzejs_cosmos_staking_v1beta1_staking from '@bze/bzejs/cosmos/staking/v1beta1/staking';
6
- import { PoolSDKType, UnbondingDelegationSDKType } from '@bze/bzejs/cosmos/staking/v1beta1/staking';
6
+ import { PoolSDKType, DelegationResponseSDKType, UnbondingDelegationSDKType, ValidatorSDKType, BondStatus } from '@bze/bzejs/cosmos/staking/v1beta1/staking';
7
7
  import * as _chain_registry_types from '@chain-registry/types';
8
8
  import { Chain } from '@chain-registry/types';
9
9
  import * as _chain_registry_v2_types from '@chain-registry/v2-types';
@@ -943,7 +943,7 @@ declare function getPendingUnlockParticipants(): Promise<QueryAllPendingUnlockPa
943
943
  declare function getStakingRewardParticipantByAddress(address: string): Promise<QueryStakingRewardParticipantResponseSDKType>;
944
944
  declare function getAddressStakingRewards(address: string): Promise<AddressRewardsStaking>;
945
945
 
946
- declare const getAddressDelegations: (address: string) => Promise<_bze_bzejs_cosmos_staking_v1beta1_staking.DelegationResponseSDKType[]>;
946
+ declare const getAddressDelegations: (address: string) => Promise<DelegationResponseSDKType[]>;
947
947
  declare const getAddressNativeDelegatedBalance: (address: string) => Promise<Balance>;
948
948
  declare const getAddressUnbondingDelegations: (address: string) => Promise<UnbondingDelegationSDKType[]>;
949
949
  declare const getAddressUnbondingDelegationsSummary: (address: string) => Promise<NativeUnbondingSummary>;
@@ -959,6 +959,10 @@ declare const getStakingParams: () => Promise<_bze_bzejs_cosmos_staking_v1beta1_
959
959
  bond_denom: string;
960
960
  }>;
961
961
  declare const getStakingPool: () => Promise<_bze_bzejs_cosmos_staking_v1beta1_staking.PoolSDKType>;
962
+ declare const getValidators: (status?: BondStatus) => Promise<ValidatorSDKType[]>;
963
+ declare const getDelegatorValidators: (address: string) => Promise<ValidatorSDKType[]>;
964
+ declare const getDelegatorDelegations: (address: string) => Promise<DelegationResponseSDKType[]>;
965
+ declare const getValidatorDelegatorRewards: (address: string, validatorAddress: string) => Promise<_bze_bzejs_cosmos_base_v1beta1_coin.DecCoinSDKType[]>;
962
966
 
963
967
  declare function getAllTickers(): Promise<MarketData[]>;
964
968
  declare function getMarketOrdersHistory(marketId: string, limit?: number): Promise<HistoryOrder[]>;
@@ -1258,4 +1262,6 @@ interface SettingsToggleProps {
1258
1262
  }
1259
1263
  declare function SettingsToggle({ accentColor }: SettingsToggleProps): react_jsx_runtime.JSX.Element;
1260
1264
 
1261
- export { ASSET_TYPE_FACTORY, ASSET_TYPE_IBC, ASSET_TYPE_LP, ASSET_TYPE_NATIVE, type ActiveOrders, type AddressRewardsStaking, type AddressValidationResult, type AppSettings, type Asset, type AssetBalance, AssetsContext, type AssetsContextType, type Attribute, BZE_CIRCLE_LOGO, BZE_TESTNET_2_SUGGEST_CHAIN, BZE_TESTNET_NETWORK, type Balance, type BeeZeeEndpoints, type BlockResults, type BurnHistoryItem, CHART_1D, CHART_1Y, CHART_30D, CHART_4H, CHART_7D, CONNECTION_TYPE_NONE, CONNECTION_TYPE_POLLING, CONNECTION_TYPE_WS, CURRENT_WALLET_BALANCE_EVENT, type ChainAssets, type ConnectionType, type CounterpartyChainForChannel, DEFAULT_SETTINGS, DEFAULT_TX_MEMO, type DenomTrace, ECOSYSTEM_MENU_LABEL, EPOCH_START_EVENT, EXCLUDED_ASSETS, EXCLUDED_MARKETS, type EcosystemApp, type EndpointValidationResults, type EventCallback, type ExtendedPendingUnlockParticipantSDKType, HighlightText, type HistoryOrder, type IBCCounterparty, type IBCData, type IbcTransitionMock, type InternalEvent, LOCK_CHANGED_EVENT, LP_ASSETS_DECIMALS, type LiquidityPoolData, MAINNET_CHAIN_INFO_FALLBACK, type Market, type MarketData, NEXT_BURN_CHANGED_EVENT, type NativeStakingData, type NativeUnbondingSummary, type NextBurn, ORDER_BOOK_CHANGED_EVENT, ORDER_EXECUTED_EVENT, ORDER_TYPE_BUY, ORDER_TYPE_SELL, type PrettyBalance, type PriceApiResponse, RAFFLE_CHANGED_EVENT, SETTINGS_STORAGE_KEY, STABLE_COINS, SUPPLY_CHANGED_EVENT, SWAP_EXECUTED_EVENT, SettingsSidebarContent, SettingsToggle, Sidebar, type SwapHistory, type SwapRouteResult, TESTNET_CHAIN_INFO_FALLBACK, TOKEN_LOGO_PLACEHOLDER, TTL_NO_EXPIRY, type TendermintEvent, Toaster, type TradeViewChart, type TxOptions, TxStatus, type UserNativeStakingData, type UserNativeStakingRewards, type UserPoolData, VALIDATION_ERRORS, VERIFIED_ASSETS, type ValidationResult, WalletSidebarContent, addDebounce, addMultipleDebounce, ammRouter, amountToBigNumberUAmount, amountToUAmount, blockchainEventManager, calcNativeStakingApr, calculateAmountFromPrice, calculatePoolOppositeAmount, calculatePoolPrice, calculatePricePerUnit, calculateRewardsStakingApr, calculateRewardsStakingPendingRewards, calculateTotalAmount, calculateUserPoolData, canDepositFromIBC, canSendToIBC, cancelDebounce, checkAddressWonRaffle, convertToWebSocketUrl, counterpartyChainForChannel, createMarketId, createPoolId, createRestClient, denomOnFirstHopChainFromTrace, formatDate, formatTimeRemaining, formatTimeRemainingFromEpochs, formatUsdAmount, getAddressBalances, getAddressDelegations, getAddressFullMarketOrders, getAddressHistory, getAddressMarketOrders, getAddressNativeDelegatedBalance, getAddressNativeTotalRewards, getAddressPendingUnlock, getAddressRewards, getAddressStakingRewards, getAddressSwapHistory, getAddressUnbondingDelegations, getAddressUnbondingDelegationsSummary, getAggregatorHost, getAllBurnedCoins, getAllSupply, getAllSupplyMetadata, getAllTickers, getAnnualProvisions, getAppName, getArchwayRestURL, getArchwayRpcURL, getAssetLists, getAtomOneRestURL, getAtomOneRpcUrl, getBZEUSDPrice, getBlockDetailsByHeight, getBlockResults, getBlockTimeByHeight, getBurnerModuleAddress, getBurnerParams, getBurnerParamsWithClient, getChainAddressPrefix, getChainAssets, getChainByChainId, getChainByName, getChainExplorerURL, getChainId, getChainName, getChainNativeAssetDenom, getChains, getChartIntervalsLimit, getChartMinutes, getCurrentEpoch, getCurrentWeekEpochEndTime, getDefaultTxMemo, getDenomType, getDistributionParams, getEcosystemApps, getEpochDurationByIdentifier, getEpochsInfo, getFactoryDenomAdminAddress, getFromLocalStorage, getHardcodedLockAddress, getHashIBCTrace, getHourEpochInfo, getIBCAssetList, getIBCTraces, getIbcTransferTimeout, getJackalRestURL, getJackalRpcUrl, getKeyExpiry, getLiquidityPool, getLiquidityPools, getLockedBalances, getLockerAddress, getMarketBuyOrders, getMarketEventKey, getMarketHistory, getMarketOrder, getMarketOrderBookChangedEvent, getMarketOrders, getMarketOrdersHistory, getMarketSellOrders, getMarkets, getMinAmount, getModuleAddress, getNextBurning, getNoOfIntervalsNeeded, getNobleRestURL, getNobleRpcUrl, getOmniFlixRestURL, getOmniFlixRpcUrl, getOsmosisRestURL, getOsmosisRpcUrl, getPageRequestWithLimit, getPendingUnlockParticipants, getPeriodicEpochEndTime, getPeriodicWeekEpochEndTime, getRaffleModuleAddress, getRaffleWinners, getRaffles, getRestClient, getRestURL, getRpcURL, getSettings, getStakingParams, getStakingPool, getStakingRewardParticipantByAddress, getStakingRewards, getTradingViewIntervals, getUSDCDenom, getValidatorPageUrl, getValidatorSupportedDenoms, getWalletChainsNames, getWeekEpochInfo, intlDateFormat, isFactoryDenom, isIbcAsset, isIbcDenom, isLpDenom, isNativeDenom, isPoolSupportedByValidator, isTestnetChain, keplrSuggestChain, mapEventAttributes, openExternalLink, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, toBigNumber, toPercentage, truncateAddress, truncateDenom, uAmountToAmount, uAmountToBigNumberAmount, uPriceToBigNumberPrice, uPriceToPrice, useAsset, useAssetLiquidityPools, useAssetMarkets, useAssetPrice, useAssets, useAssetsContext, useAssetsManager, useAssetsValue, useBZETx, useBalance, useBalances, useConnectionType, useEpochs, useEpochsManager, useFeeTokens, useIBCChains, useIBCTx, useLiquidityPool, useLiquidityPools, useMarket, useMarkets, useMarketsManager, useSDKTx, useSettings, useSigningClient, useToast, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
1265
+ declare const TestnetBanner: () => react_jsx_runtime.JSX.Element | null;
1266
+
1267
+ export { ASSET_TYPE_FACTORY, ASSET_TYPE_IBC, ASSET_TYPE_LP, ASSET_TYPE_NATIVE, type ActiveOrders, type AddressRewardsStaking, type AddressValidationResult, type AppSettings, type Asset, type AssetBalance, AssetsContext, type AssetsContextType, type Attribute, BZE_CIRCLE_LOGO, BZE_TESTNET_2_SUGGEST_CHAIN, BZE_TESTNET_NETWORK, type Balance, type BeeZeeEndpoints, type BlockResults, type BurnHistoryItem, CHART_1D, CHART_1Y, CHART_30D, CHART_4H, CHART_7D, CONNECTION_TYPE_NONE, CONNECTION_TYPE_POLLING, CONNECTION_TYPE_WS, CURRENT_WALLET_BALANCE_EVENT, type ChainAssets, type ConnectionType, type CounterpartyChainForChannel, DEFAULT_SETTINGS, DEFAULT_TX_MEMO, type DenomTrace, ECOSYSTEM_MENU_LABEL, EPOCH_START_EVENT, EXCLUDED_ASSETS, EXCLUDED_MARKETS, type EcosystemApp, type EndpointValidationResults, type EventCallback, type ExtendedPendingUnlockParticipantSDKType, HighlightText, type HistoryOrder, type IBCCounterparty, type IBCData, type IbcTransitionMock, type InternalEvent, LOCK_CHANGED_EVENT, LP_ASSETS_DECIMALS, type LiquidityPoolData, MAINNET_CHAIN_INFO_FALLBACK, type Market, type MarketData, NEXT_BURN_CHANGED_EVENT, type NativeStakingData, type NativeUnbondingSummary, type NextBurn, ORDER_BOOK_CHANGED_EVENT, ORDER_EXECUTED_EVENT, ORDER_TYPE_BUY, ORDER_TYPE_SELL, type PrettyBalance, type PriceApiResponse, RAFFLE_CHANGED_EVENT, SETTINGS_STORAGE_KEY, STABLE_COINS, SUPPLY_CHANGED_EVENT, SWAP_EXECUTED_EVENT, SettingsSidebarContent, SettingsToggle, Sidebar, type SwapHistory, type SwapRouteResult, TESTNET_CHAIN_INFO_FALLBACK, TOKEN_LOGO_PLACEHOLDER, TTL_NO_EXPIRY, type TendermintEvent, TestnetBanner, Toaster, type TradeViewChart, type TxOptions, TxStatus, type UserNativeStakingData, type UserNativeStakingRewards, type UserPoolData, VALIDATION_ERRORS, VERIFIED_ASSETS, type ValidationResult, WalletSidebarContent, addDebounce, addMultipleDebounce, ammRouter, amountToBigNumberUAmount, amountToUAmount, blockchainEventManager, calcNativeStakingApr, calculateAmountFromPrice, calculatePoolOppositeAmount, calculatePoolPrice, calculatePricePerUnit, calculateRewardsStakingApr, calculateRewardsStakingPendingRewards, calculateTotalAmount, calculateUserPoolData, canDepositFromIBC, canSendToIBC, cancelDebounce, checkAddressWonRaffle, convertToWebSocketUrl, counterpartyChainForChannel, createMarketId, createPoolId, createRestClient, denomOnFirstHopChainFromTrace, formatDate, formatTimeRemaining, formatTimeRemainingFromEpochs, formatUsdAmount, getAddressBalances, getAddressDelegations, getAddressFullMarketOrders, getAddressHistory, getAddressMarketOrders, getAddressNativeDelegatedBalance, getAddressNativeTotalRewards, getAddressPendingUnlock, getAddressRewards, getAddressStakingRewards, getAddressSwapHistory, getAddressUnbondingDelegations, getAddressUnbondingDelegationsSummary, getAggregatorHost, getAllBurnedCoins, getAllSupply, getAllSupplyMetadata, getAllTickers, getAnnualProvisions, getAppName, getArchwayRestURL, getArchwayRpcURL, getAssetLists, getAtomOneRestURL, getAtomOneRpcUrl, getBZEUSDPrice, getBlockDetailsByHeight, getBlockResults, getBlockTimeByHeight, getBurnerModuleAddress, getBurnerParams, getBurnerParamsWithClient, getChainAddressPrefix, getChainAssets, getChainByChainId, getChainByName, getChainExplorerURL, getChainId, getChainName, getChainNativeAssetDenom, getChains, getChartIntervalsLimit, getChartMinutes, getCurrentEpoch, getCurrentWeekEpochEndTime, getDefaultTxMemo, getDelegatorDelegations, getDelegatorValidators, getDenomType, getDistributionParams, getEcosystemApps, getEpochDurationByIdentifier, getEpochsInfo, getFactoryDenomAdminAddress, getFromLocalStorage, getHardcodedLockAddress, getHashIBCTrace, getHourEpochInfo, getIBCAssetList, getIBCTraces, getIbcTransferTimeout, getJackalRestURL, getJackalRpcUrl, getKeyExpiry, getLiquidityPool, getLiquidityPools, getLockedBalances, getLockerAddress, getMarketBuyOrders, getMarketEventKey, getMarketHistory, getMarketOrder, getMarketOrderBookChangedEvent, getMarketOrders, getMarketOrdersHistory, getMarketSellOrders, getMarkets, getMinAmount, getModuleAddress, getNextBurning, getNoOfIntervalsNeeded, getNobleRestURL, getNobleRpcUrl, getOmniFlixRestURL, getOmniFlixRpcUrl, getOsmosisRestURL, getOsmosisRpcUrl, getPageRequestWithLimit, getPendingUnlockParticipants, getPeriodicEpochEndTime, getPeriodicWeekEpochEndTime, getRaffleModuleAddress, getRaffleWinners, getRaffles, getRestClient, getRestURL, getRpcURL, getSettings, getStakingParams, getStakingPool, getStakingRewardParticipantByAddress, getStakingRewards, getTradingViewIntervals, getUSDCDenom, getValidatorDelegatorRewards, getValidatorPageUrl, getValidatorSupportedDenoms, getValidators, getWalletChainsNames, getWeekEpochInfo, intlDateFormat, isFactoryDenom, isIbcAsset, isIbcDenom, isLpDenom, isNativeDenom, isPoolSupportedByValidator, isTestnetChain, keplrSuggestChain, mapEventAttributes, openExternalLink, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, toBigNumber, toPercentage, truncateAddress, truncateDenom, uAmountToAmount, uAmountToBigNumberAmount, uPriceToBigNumberPrice, uPriceToPrice, useAsset, useAssetLiquidityPools, useAssetMarkets, useAssetPrice, useAssets, useAssetsContext, useAssetsManager, useAssetsValue, useBZETx, useBalance, useBalances, useConnectionType, useEpochs, useEpochsManager, useFeeTokens, useIBCChains, useIBCTx, useLiquidityPool, useLiquidityPools, useMarket, useMarkets, useMarketsManager, useSDKTx, useSettings, useSigningClient, useToast, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
package/dist/index.js CHANGED
@@ -102,6 +102,7 @@ __export(index_exports, {
102
102
  TESTNET_CHAIN_INFO_FALLBACK: () => TESTNET_CHAIN_INFO_FALLBACK,
103
103
  TOKEN_LOGO_PLACEHOLDER: () => TOKEN_LOGO_PLACEHOLDER,
104
104
  TTL_NO_EXPIRY: () => TTL_NO_EXPIRY,
105
+ TestnetBanner: () => TestnetBanner,
105
106
  Toaster: () => Toaster,
106
107
  TxStatus: () => TxStatus,
107
108
  VALIDATION_ERRORS: () => VALIDATION_ERRORS,
@@ -182,6 +183,8 @@ __export(index_exports, {
182
183
  getCurrentEpoch: () => getCurrentEpoch,
183
184
  getCurrentWeekEpochEndTime: () => getCurrentWeekEpochEndTime,
184
185
  getDefaultTxMemo: () => getDefaultTxMemo,
186
+ getDelegatorDelegations: () => getDelegatorDelegations,
187
+ getDelegatorValidators: () => getDelegatorValidators,
185
188
  getDenomType: () => getDenomType,
186
189
  getDistributionParams: () => getDistributionParams,
187
190
  getEcosystemApps: () => getEcosystemApps,
@@ -238,8 +241,10 @@ __export(index_exports, {
238
241
  getStakingRewards: () => getStakingRewards,
239
242
  getTradingViewIntervals: () => getTradingViewIntervals,
240
243
  getUSDCDenom: () => getUSDCDenom,
244
+ getValidatorDelegatorRewards: () => getValidatorDelegatorRewards,
241
245
  getValidatorPageUrl: () => getValidatorPageUrl,
242
246
  getValidatorSupportedDenoms: () => getValidatorSupportedDenoms,
247
+ getValidators: () => getValidators,
243
248
  getWalletChainsNames: () => getWalletChainsNames,
244
249
  getWeekEpochInfo: () => getWeekEpochInfo,
245
250
  intlDateFormat: () => intlDateFormat,
@@ -2879,6 +2884,7 @@ async function mapPendingUnlock(pending) {
2879
2884
  // src/query/staking.ts
2880
2885
  var import_pagination5 = require("@bze/bzejs/cosmos/base/query/v1beta1/pagination");
2881
2886
  var import_bignumber7 = __toESM(require("bignumber.js"));
2887
+ var import_staking = require("@bze/bzejs/cosmos/staking/v1beta1/staking");
2882
2888
  var getAddressDelegations = async (address) => {
2883
2889
  try {
2884
2890
  const client = await getRestClient();
@@ -3045,6 +3051,65 @@ var getStakingPool = async () => {
3045
3051
  };
3046
3052
  }
3047
3053
  };
3054
+ var getValidators = async (status = import_staking.BondStatus.BOND_STATUS_BONDED) => {
3055
+ try {
3056
+ const client = await getRestClient();
3057
+ const statusStr = status === import_staking.BondStatus.BOND_STATUS_BONDED ? "BOND_STATUS_BONDED" : status === import_staking.BondStatus.BOND_STATUS_UNBONDING ? "BOND_STATUS_UNBONDING" : status === import_staking.BondStatus.BOND_STATUS_UNBONDED ? "BOND_STATUS_UNBONDED" : "";
3058
+ const resp = await client.cosmos.staking.v1beta1.validators({
3059
+ status: statusStr,
3060
+ pagination: import_pagination5.PageRequest.fromPartial({
3061
+ limit: BigInt(500)
3062
+ })
3063
+ });
3064
+ return resp.validators;
3065
+ } catch (e) {
3066
+ console.error("failed to get validators", e);
3067
+ return [];
3068
+ }
3069
+ };
3070
+ var getDelegatorValidators = async (address) => {
3071
+ try {
3072
+ const client = await getRestClient();
3073
+ const resp = await client.cosmos.staking.v1beta1.delegatorValidators({
3074
+ delegatorAddr: address,
3075
+ pagination: import_pagination5.PageRequest.fromPartial({
3076
+ limit: BigInt(500)
3077
+ })
3078
+ });
3079
+ return resp.validators;
3080
+ } catch (e) {
3081
+ console.error("failed to get delegator validators", e);
3082
+ return [];
3083
+ }
3084
+ };
3085
+ var getDelegatorDelegations = async (address) => {
3086
+ try {
3087
+ const client = await getRestClient();
3088
+ const resp = await client.cosmos.staking.v1beta1.delegatorDelegations({
3089
+ delegatorAddr: address,
3090
+ pagination: import_pagination5.PageRequest.fromPartial({
3091
+ limit: BigInt(1e3)
3092
+ })
3093
+ });
3094
+ return resp.delegation_responses;
3095
+ } catch (e) {
3096
+ console.error("failed to get delegator delegations", e);
3097
+ return [];
3098
+ }
3099
+ };
3100
+ var getValidatorDelegatorRewards = async (address, validatorAddress) => {
3101
+ try {
3102
+ const client = await getRestClient();
3103
+ const resp = await client.cosmos.distribution.v1beta1.delegationRewards({
3104
+ delegatorAddress: address,
3105
+ validatorAddress
3106
+ });
3107
+ return resp.rewards;
3108
+ } catch (e) {
3109
+ console.error("failed to get validator delegator rewards", e);
3110
+ return [];
3111
+ }
3112
+ };
3048
3113
 
3049
3114
  // src/query/aggregator.ts
3050
3115
  var getAllTickersUrl = () => {
@@ -5119,6 +5184,33 @@ function SettingsToggle({ accentColor }) {
5119
5184
  }
5120
5185
  );
5121
5186
  }
5187
+
5188
+ // src/components/testnet-banner.tsx
5189
+ var import_react28 = require("@chakra-ui/react");
5190
+ var import_jsx_runtime7 = require("react/jsx-runtime");
5191
+ var TestnetBanner = () => {
5192
+ if (!isTestnetChain()) {
5193
+ return null;
5194
+ }
5195
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
5196
+ import_react28.Box,
5197
+ {
5198
+ position: "fixed",
5199
+ bottom: "0",
5200
+ left: "0",
5201
+ right: "0",
5202
+ bg: "red.600",
5203
+ color: "white",
5204
+ textAlign: "center",
5205
+ py: "1",
5206
+ zIndex: "banner",
5207
+ fontSize: "xs",
5208
+ fontWeight: "bold",
5209
+ letterSpacing: "wide",
5210
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react28.Text, { children: "YOU ARE ON TESTNET" })
5211
+ }
5212
+ );
5213
+ };
5122
5214
  // Annotate the CommonJS export names for ESM import in node:
5123
5215
  0 && (module.exports = {
5124
5216
  ASSET_TYPE_FACTORY,
@@ -5164,6 +5256,7 @@ function SettingsToggle({ accentColor }) {
5164
5256
  TESTNET_CHAIN_INFO_FALLBACK,
5165
5257
  TOKEN_LOGO_PLACEHOLDER,
5166
5258
  TTL_NO_EXPIRY,
5259
+ TestnetBanner,
5167
5260
  Toaster,
5168
5261
  TxStatus,
5169
5262
  VALIDATION_ERRORS,
@@ -5244,6 +5337,8 @@ function SettingsToggle({ accentColor }) {
5244
5337
  getCurrentEpoch,
5245
5338
  getCurrentWeekEpochEndTime,
5246
5339
  getDefaultTxMemo,
5340
+ getDelegatorDelegations,
5341
+ getDelegatorValidators,
5247
5342
  getDenomType,
5248
5343
  getDistributionParams,
5249
5344
  getEcosystemApps,
@@ -5300,8 +5395,10 @@ function SettingsToggle({ accentColor }) {
5300
5395
  getStakingRewards,
5301
5396
  getTradingViewIntervals,
5302
5397
  getUSDCDenom,
5398
+ getValidatorDelegatorRewards,
5303
5399
  getValidatorPageUrl,
5304
5400
  getValidatorSupportedDenoms,
5401
+ getValidators,
5305
5402
  getWalletChainsNames,
5306
5403
  getWeekEpochInfo,
5307
5404
  intlDateFormat,