@bze/bze-ui-kit 1.0.7 → 1.0.8
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/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +90 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +80 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -358,6 +358,16 @@ declare const isIbcAsset: (asset: Asset) => boolean;
|
|
|
358
358
|
declare const getMarketOrderBookChangedEvent: (marketId: string) => string;
|
|
359
359
|
declare const getMarketEventKey: (eventType: string, marketId: string) => string;
|
|
360
360
|
declare const mapEventAttributes: (attributes: Attribute[]) => Record<string, string>;
|
|
361
|
+
declare const getEventKeyValue: (event: TendermintEvent, key: string) => string | undefined;
|
|
362
|
+
declare const getEventMarketId: (event: TendermintEvent) => string | undefined;
|
|
363
|
+
declare const isAddressTransfer: (address: string, event: TendermintEvent) => boolean;
|
|
364
|
+
declare const isOrderBookEvent: (event: TendermintEvent) => boolean;
|
|
365
|
+
declare const isOrderExecutedEvent: (event: TendermintEvent) => boolean;
|
|
366
|
+
declare const isSwapEvent: (event: TendermintEvent) => boolean;
|
|
367
|
+
declare const isCoinbaseEvent: (event: TendermintEvent) => boolean;
|
|
368
|
+
declare const isBurnEvent: (event: TendermintEvent) => boolean;
|
|
369
|
+
declare const isEpochStartEvent: (event: TendermintEvent) => boolean;
|
|
370
|
+
declare const getMintedAmount: (event: TendermintEvent) => _bze_bzejs_cosmos_base_v1beta1_coin.Coin[];
|
|
361
371
|
|
|
362
372
|
declare const formatUsdAmount: (priceNum: BigNumber) => string;
|
|
363
373
|
declare function shortNumberFormat(amount: BigNumber): string;
|
|
@@ -1316,4 +1326,4 @@ declare function SettingsToggle({ accentColor }: SettingsToggleProps): react_jsx
|
|
|
1316
1326
|
|
|
1317
1327
|
declare const TestnetBanner: () => react_jsx_runtime.JSX.Element | null;
|
|
1318
1328
|
|
|
1319
|
-
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, coins, 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, parseCoins, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, subscribeToBlockchainEvents, 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, useValidatorLogos, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
|
|
1329
|
+
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, coins, 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, getEventKeyValue, getEventMarketId, 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, getMintedAmount, 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, isAddressTransfer, isBurnEvent, isCoinbaseEvent, isEpochStartEvent, isFactoryDenom, isIbcAsset, isIbcDenom, isLpDenom, isNativeDenom, isOrderBookEvent, isOrderExecutedEvent, isPoolSupportedByValidator, isSwapEvent, isTestnetChain, keplrSuggestChain, mapEventAttributes, openExternalLink, parseCoins, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, subscribeToBlockchainEvents, 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, useValidatorLogos, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
|
package/dist/index.d.ts
CHANGED
|
@@ -358,6 +358,16 @@ declare const isIbcAsset: (asset: Asset) => boolean;
|
|
|
358
358
|
declare const getMarketOrderBookChangedEvent: (marketId: string) => string;
|
|
359
359
|
declare const getMarketEventKey: (eventType: string, marketId: string) => string;
|
|
360
360
|
declare const mapEventAttributes: (attributes: Attribute[]) => Record<string, string>;
|
|
361
|
+
declare const getEventKeyValue: (event: TendermintEvent, key: string) => string | undefined;
|
|
362
|
+
declare const getEventMarketId: (event: TendermintEvent) => string | undefined;
|
|
363
|
+
declare const isAddressTransfer: (address: string, event: TendermintEvent) => boolean;
|
|
364
|
+
declare const isOrderBookEvent: (event: TendermintEvent) => boolean;
|
|
365
|
+
declare const isOrderExecutedEvent: (event: TendermintEvent) => boolean;
|
|
366
|
+
declare const isSwapEvent: (event: TendermintEvent) => boolean;
|
|
367
|
+
declare const isCoinbaseEvent: (event: TendermintEvent) => boolean;
|
|
368
|
+
declare const isBurnEvent: (event: TendermintEvent) => boolean;
|
|
369
|
+
declare const isEpochStartEvent: (event: TendermintEvent) => boolean;
|
|
370
|
+
declare const getMintedAmount: (event: TendermintEvent) => _bze_bzejs_cosmos_base_v1beta1_coin.Coin[];
|
|
361
371
|
|
|
362
372
|
declare const formatUsdAmount: (priceNum: BigNumber) => string;
|
|
363
373
|
declare function shortNumberFormat(amount: BigNumber): string;
|
|
@@ -1316,4 +1326,4 @@ declare function SettingsToggle({ accentColor }: SettingsToggleProps): react_jsx
|
|
|
1316
1326
|
|
|
1317
1327
|
declare const TestnetBanner: () => react_jsx_runtime.JSX.Element | null;
|
|
1318
1328
|
|
|
1319
|
-
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, coins, 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, parseCoins, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, subscribeToBlockchainEvents, 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, useValidatorLogos, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
|
|
1329
|
+
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, coins, 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, getEventKeyValue, getEventMarketId, 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, getMintedAmount, 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, isAddressTransfer, isBurnEvent, isCoinbaseEvent, isEpochStartEvent, isFactoryDenom, isIbcAsset, isIbcDenom, isLpDenom, isNativeDenom, isOrderBookEvent, isOrderExecutedEvent, isPoolSupportedByValidator, isSwapEvent, isTestnetChain, keplrSuggestChain, mapEventAttributes, openExternalLink, parseCoins, parseUnbondingDays, poolIdFromPoolDenom, prettyAmount, prettyError, priceToBigNumberUPrice, priceToUPrice, removeFromLocalStorage, removeLeadingZeros, sanitizeIntegerInput, sanitizeNumberInput, setDefaultTxMemo, setInLocalStorage, setKeyExpiry, setSettings, setStorageKeyVersion, shortNumberFormat, sleep, stringTruncateFromCenter, subscribeToBlockchainEvents, 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, useValidatorLogos, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
|
package/dist/index.js
CHANGED
|
@@ -191,6 +191,8 @@ __export(index_exports, {
|
|
|
191
191
|
getEcosystemApps: () => getEcosystemApps,
|
|
192
192
|
getEpochDurationByIdentifier: () => getEpochDurationByIdentifier,
|
|
193
193
|
getEpochsInfo: () => getEpochsInfo,
|
|
194
|
+
getEventKeyValue: () => getEventKeyValue,
|
|
195
|
+
getEventMarketId: () => getEventMarketId,
|
|
194
196
|
getFactoryDenomAdminAddress: () => getFactoryDenomAdminAddress,
|
|
195
197
|
getFromLocalStorage: () => getFromLocalStorage,
|
|
196
198
|
getHardcodedLockAddress: () => getHardcodedLockAddress,
|
|
@@ -216,6 +218,7 @@ __export(index_exports, {
|
|
|
216
218
|
getMarketSellOrders: () => getMarketSellOrders,
|
|
217
219
|
getMarkets: () => getMarkets,
|
|
218
220
|
getMinAmount: () => getMinAmount,
|
|
221
|
+
getMintedAmount: () => getMintedAmount,
|
|
219
222
|
getModuleAddress: () => getModuleAddress,
|
|
220
223
|
getNextBurning: () => getNextBurning,
|
|
221
224
|
getNoOfIntervalsNeeded: () => getNoOfIntervalsNeeded,
|
|
@@ -249,12 +252,19 @@ __export(index_exports, {
|
|
|
249
252
|
getWalletChainsNames: () => getWalletChainsNames,
|
|
250
253
|
getWeekEpochInfo: () => getWeekEpochInfo,
|
|
251
254
|
intlDateFormat: () => intlDateFormat,
|
|
255
|
+
isAddressTransfer: () => isAddressTransfer,
|
|
256
|
+
isBurnEvent: () => isBurnEvent,
|
|
257
|
+
isCoinbaseEvent: () => isCoinbaseEvent,
|
|
258
|
+
isEpochStartEvent: () => isEpochStartEvent,
|
|
252
259
|
isFactoryDenom: () => isFactoryDenom,
|
|
253
260
|
isIbcAsset: () => isIbcAsset,
|
|
254
261
|
isIbcDenom: () => isIbcDenom,
|
|
255
262
|
isLpDenom: () => isLpDenom,
|
|
256
263
|
isNativeDenom: () => isNativeDenom,
|
|
264
|
+
isOrderBookEvent: () => isOrderBookEvent,
|
|
265
|
+
isOrderExecutedEvent: () => isOrderExecutedEvent,
|
|
257
266
|
isPoolSupportedByValidator: () => isPoolSupportedByValidator,
|
|
267
|
+
isSwapEvent: () => isSwapEvent,
|
|
258
268
|
isTestnetChain: () => isTestnetChain,
|
|
259
269
|
keplrSuggestChain: () => keplrSuggestChain,
|
|
260
270
|
mapEventAttributes: () => mapEventAttributes,
|
|
@@ -895,12 +905,82 @@ function truncateDenom(denom) {
|
|
|
895
905
|
}
|
|
896
906
|
var isIbcAsset = (asset) => asset.type === ASSET_TYPE_IBC;
|
|
897
907
|
|
|
908
|
+
// src/utils/coins.ts
|
|
909
|
+
var coin = (amount, denom) => {
|
|
910
|
+
let outAmount;
|
|
911
|
+
if (typeof amount === "number") {
|
|
912
|
+
if (!Number.isInteger(amount) || amount < 0 || amount > Number.MAX_SAFE_INTEGER) {
|
|
913
|
+
throw new Error("Given amount is not a safe integer. Consider using a string instead to overcome the limitations of JS numbers.");
|
|
914
|
+
}
|
|
915
|
+
outAmount = String(amount);
|
|
916
|
+
} else {
|
|
917
|
+
if (!amount.match(/^[0-9]+$/)) {
|
|
918
|
+
throw new Error("Invalid unsigned integer string format");
|
|
919
|
+
}
|
|
920
|
+
outAmount = amount.replace(/^0*/, "") || "0";
|
|
921
|
+
}
|
|
922
|
+
return { amount: outAmount, denom };
|
|
923
|
+
};
|
|
924
|
+
var coins = (amount, denom) => {
|
|
925
|
+
return [coin(amount, denom)];
|
|
926
|
+
};
|
|
927
|
+
var parseCoins = (input) => {
|
|
928
|
+
return input.replace(/\s/g, "").split(",").filter(Boolean).map((part) => {
|
|
929
|
+
const match = part.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/:._-]{2,127})$/);
|
|
930
|
+
if (!match) throw new Error("Got an invalid coin string");
|
|
931
|
+
return {
|
|
932
|
+
amount: match[1].replace(/^0+/, "") || "0",
|
|
933
|
+
denom: match[2]
|
|
934
|
+
};
|
|
935
|
+
});
|
|
936
|
+
};
|
|
937
|
+
|
|
898
938
|
// src/utils/events.ts
|
|
899
939
|
var getMarketOrderBookChangedEvent = (marketId) => getMarketEventKey(ORDER_BOOK_CHANGED_EVENT, marketId);
|
|
900
940
|
var getMarketEventKey = (eventType, marketId) => `${eventType}:${marketId}`;
|
|
901
941
|
var mapEventAttributes = (attributes) => {
|
|
902
942
|
return attributes.reduce((acc, attr) => __spreadProps(__spreadValues({}, acc), { [attr.key]: attr.value.replace('"', "").replace('"', "") }), {});
|
|
903
943
|
};
|
|
944
|
+
var getEventKeyValue = (event, key) => {
|
|
945
|
+
var _a2;
|
|
946
|
+
return (_a2 = event.attributes.find((attribute) => attribute.key === key)) == null ? void 0 : _a2.value;
|
|
947
|
+
};
|
|
948
|
+
var getEventMarketId = (event) => {
|
|
949
|
+
var _a2;
|
|
950
|
+
return (_a2 = getEventKeyValue(event, "market_id")) == null ? void 0 : _a2.replaceAll('"', "");
|
|
951
|
+
};
|
|
952
|
+
var isAddressTransfer = (address, event) => {
|
|
953
|
+
if (address === "" || event.type !== "transfer") return false;
|
|
954
|
+
return event.attributes.find((attribute) => attribute.value === address) !== void 0;
|
|
955
|
+
};
|
|
956
|
+
var isOrderBookEvent = (event) => {
|
|
957
|
+
return event.type.includes("bze.tradebin.Order");
|
|
958
|
+
};
|
|
959
|
+
var isOrderExecutedEvent = (event) => {
|
|
960
|
+
return event.type.includes("bze.tradebin.OrderExecutedEvent");
|
|
961
|
+
};
|
|
962
|
+
var isSwapEvent = (event) => {
|
|
963
|
+
return event.type.includes("bze.tradebin.SwapEvent");
|
|
964
|
+
};
|
|
965
|
+
var isCoinbaseEvent = (event) => {
|
|
966
|
+
return event.type.includes("coinbase");
|
|
967
|
+
};
|
|
968
|
+
var isBurnEvent = (event) => {
|
|
969
|
+
return event.type.includes("burn");
|
|
970
|
+
};
|
|
971
|
+
var isEpochStartEvent = (event) => {
|
|
972
|
+
return event.type.includes("bze.epochs.EpochStartEvent");
|
|
973
|
+
};
|
|
974
|
+
var getMintedAmount = (event) => {
|
|
975
|
+
const defaultCoin = coins(0, getChainNativeAssetDenom());
|
|
976
|
+
try {
|
|
977
|
+
const amountAttribute = event.attributes.find((attribute) => attribute.key === "amount");
|
|
978
|
+
return amountAttribute ? parseCoins(amountAttribute.value) : defaultCoin;
|
|
979
|
+
} catch (e) {
|
|
980
|
+
console.error("Failed to parse minted amount from coinbase event", e);
|
|
981
|
+
return defaultCoin;
|
|
982
|
+
}
|
|
983
|
+
};
|
|
904
984
|
|
|
905
985
|
// src/utils/formatter.ts
|
|
906
986
|
var import_bignumber2 = __toESM(require("bignumber.js"));
|
|
@@ -1015,36 +1095,6 @@ var openExternalLink = (url) => {
|
|
|
1015
1095
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
1016
1096
|
};
|
|
1017
1097
|
|
|
1018
|
-
// src/utils/coins.ts
|
|
1019
|
-
var coin = (amount, denom) => {
|
|
1020
|
-
let outAmount;
|
|
1021
|
-
if (typeof amount === "number") {
|
|
1022
|
-
if (!Number.isInteger(amount) || amount < 0 || amount > Number.MAX_SAFE_INTEGER) {
|
|
1023
|
-
throw new Error("Given amount is not a safe integer. Consider using a string instead to overcome the limitations of JS numbers.");
|
|
1024
|
-
}
|
|
1025
|
-
outAmount = String(amount);
|
|
1026
|
-
} else {
|
|
1027
|
-
if (!amount.match(/^[0-9]+$/)) {
|
|
1028
|
-
throw new Error("Invalid unsigned integer string format");
|
|
1029
|
-
}
|
|
1030
|
-
outAmount = amount.replace(/^0*/, "") || "0";
|
|
1031
|
-
}
|
|
1032
|
-
return { amount: outAmount, denom };
|
|
1033
|
-
};
|
|
1034
|
-
var coins = (amount, denom) => {
|
|
1035
|
-
return [coin(amount, denom)];
|
|
1036
|
-
};
|
|
1037
|
-
var parseCoins = (input) => {
|
|
1038
|
-
return input.replace(/\s/g, "").split(",").filter(Boolean).map((part) => {
|
|
1039
|
-
const match = part.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/:._-]{2,127})$/);
|
|
1040
|
-
if (!match) throw new Error("Got an invalid coin string");
|
|
1041
|
-
return {
|
|
1042
|
-
amount: match[1].replace(/^0+/, "") || "0",
|
|
1043
|
-
denom: match[2]
|
|
1044
|
-
};
|
|
1045
|
-
});
|
|
1046
|
-
};
|
|
1047
|
-
|
|
1048
1098
|
// src/utils/ibc.ts
|
|
1049
1099
|
var import_bignumber3 = __toESM(require("bignumber.js"));
|
|
1050
1100
|
var canDepositFromIBC = (ibcData2) => {
|
|
@@ -5693,6 +5743,8 @@ var TestnetBanner = () => {
|
|
|
5693
5743
|
getEcosystemApps,
|
|
5694
5744
|
getEpochDurationByIdentifier,
|
|
5695
5745
|
getEpochsInfo,
|
|
5746
|
+
getEventKeyValue,
|
|
5747
|
+
getEventMarketId,
|
|
5696
5748
|
getFactoryDenomAdminAddress,
|
|
5697
5749
|
getFromLocalStorage,
|
|
5698
5750
|
getHardcodedLockAddress,
|
|
@@ -5718,6 +5770,7 @@ var TestnetBanner = () => {
|
|
|
5718
5770
|
getMarketSellOrders,
|
|
5719
5771
|
getMarkets,
|
|
5720
5772
|
getMinAmount,
|
|
5773
|
+
getMintedAmount,
|
|
5721
5774
|
getModuleAddress,
|
|
5722
5775
|
getNextBurning,
|
|
5723
5776
|
getNoOfIntervalsNeeded,
|
|
@@ -5751,12 +5804,19 @@ var TestnetBanner = () => {
|
|
|
5751
5804
|
getWalletChainsNames,
|
|
5752
5805
|
getWeekEpochInfo,
|
|
5753
5806
|
intlDateFormat,
|
|
5807
|
+
isAddressTransfer,
|
|
5808
|
+
isBurnEvent,
|
|
5809
|
+
isCoinbaseEvent,
|
|
5810
|
+
isEpochStartEvent,
|
|
5754
5811
|
isFactoryDenom,
|
|
5755
5812
|
isIbcAsset,
|
|
5756
5813
|
isIbcDenom,
|
|
5757
5814
|
isLpDenom,
|
|
5758
5815
|
isNativeDenom,
|
|
5816
|
+
isOrderBookEvent,
|
|
5817
|
+
isOrderExecutedEvent,
|
|
5759
5818
|
isPoolSupportedByValidator,
|
|
5819
|
+
isSwapEvent,
|
|
5760
5820
|
isTestnetChain,
|
|
5761
5821
|
keplrSuggestChain,
|
|
5762
5822
|
mapEventAttributes,
|