@bze/bze-ui-kit 1.0.1 → 1.0.2

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 CHANGED
@@ -2,6 +2,8 @@ import BigNumber from 'bignumber.js';
2
2
  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
+ import * as _bze_bzejs_cosmos_base_v1beta1_coin from '@bze/bzejs/cosmos/base/v1beta1/coin';
6
+ import { Coin } from '@bze/bzejs/cosmos/base/v1beta1/coin';
5
7
  import * as _bze_bzejs_cosmos_staking_v1beta1_staking from '@bze/bzejs/cosmos/staking/v1beta1/staking';
6
8
  import { PoolSDKType, DelegationResponseSDKType, UnbondingDelegationSDKType, ValidatorSDKType, BondStatus } from '@bze/bzejs/cosmos/staking/v1beta1/staking';
7
9
  import * as _chain_registry_types from '@chain-registry/types';
@@ -35,8 +37,6 @@ import * as _bze_bzejs_bze_cointrunk_query_lcd from '@bze/bzejs/bze/cointrunk/qu
35
37
  import * as _bze_bzejs_bze_burner_query_lcd from '@bze/bzejs/bze/burner/query.lcd';
36
38
  import { bze } from '@bze/bzejs';
37
39
  import { PageRequest } from '@bze/bzejs/cosmos/base/query/v1beta1/pagination';
38
- import * as _bze_bzejs_cosmos_base_v1beta1_coin from '@bze/bzejs/cosmos/base/v1beta1/coin';
39
- import { Coin } from '@bze/bzejs/cosmos/base/v1beta1/coin';
40
40
  import { ParamsSDKType } from '@bze/bzejs/bze/burner/params';
41
41
  import { QueryAllBurnedCoinsResponseSDKType } from '@bze/bzejs/bze/burner/query';
42
42
  import { GetBlockByHeightResponseSDKType } from '@bze/bzejs/cosmos/base/tendermint/v1beta1/query';
@@ -369,6 +369,17 @@ declare function formatTimeRemainingFromEpochs(endEpoch: bigint | number | BigNu
369
369
  declare function sleep(ms: number): Promise<void>;
370
370
  declare const openExternalLink: (url: string) => void;
371
371
 
372
+ /**
373
+ * Creates a list of coins with one element. Mirrors cosmjs `coins()` from @cosmjs/amino.
374
+ */
375
+ declare const coins: (amount: number | string, denom: string) => Coin[];
376
+ /**
377
+ * Parses a coins string like "819966000ucosm,700000000ustake" into a Coin array.
378
+ * Mirrors cosmjs `parseCoins()` from @cosmjs/amino.
379
+ * Denom regex follows Cosmos SDK 0.53 (cosmos-sdk/types/coin.go).
380
+ */
381
+ declare const parseCoins: (input: string) => Coin[];
382
+
372
383
  declare const canDepositFromIBC: (ibcData: IBCData) => boolean;
373
384
  declare const canSendToIBC: (ibcData: IBCData) => boolean;
374
385
  /** Compute the denom on the first-hop (counterparty) chain, using only this trace. */
@@ -1283,4 +1294,4 @@ declare function SettingsToggle({ accentColor }: SettingsToggleProps): react_jsx
1283
1294
 
1284
1295
  declare const TestnetBanner: () => react_jsx_runtime.JSX.Element | null;
1285
1296
 
1286
- 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, useValidatorLogos, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
1297
+ 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, 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
@@ -2,6 +2,8 @@ import BigNumber from 'bignumber.js';
2
2
  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
+ import * as _bze_bzejs_cosmos_base_v1beta1_coin from '@bze/bzejs/cosmos/base/v1beta1/coin';
6
+ import { Coin } from '@bze/bzejs/cosmos/base/v1beta1/coin';
5
7
  import * as _bze_bzejs_cosmos_staking_v1beta1_staking from '@bze/bzejs/cosmos/staking/v1beta1/staking';
6
8
  import { PoolSDKType, DelegationResponseSDKType, UnbondingDelegationSDKType, ValidatorSDKType, BondStatus } from '@bze/bzejs/cosmos/staking/v1beta1/staking';
7
9
  import * as _chain_registry_types from '@chain-registry/types';
@@ -35,8 +37,6 @@ import * as _bze_bzejs_bze_cointrunk_query_lcd from '@bze/bzejs/bze/cointrunk/qu
35
37
  import * as _bze_bzejs_bze_burner_query_lcd from '@bze/bzejs/bze/burner/query.lcd';
36
38
  import { bze } from '@bze/bzejs';
37
39
  import { PageRequest } from '@bze/bzejs/cosmos/base/query/v1beta1/pagination';
38
- import * as _bze_bzejs_cosmos_base_v1beta1_coin from '@bze/bzejs/cosmos/base/v1beta1/coin';
39
- import { Coin } from '@bze/bzejs/cosmos/base/v1beta1/coin';
40
40
  import { ParamsSDKType } from '@bze/bzejs/bze/burner/params';
41
41
  import { QueryAllBurnedCoinsResponseSDKType } from '@bze/bzejs/bze/burner/query';
42
42
  import { GetBlockByHeightResponseSDKType } from '@bze/bzejs/cosmos/base/tendermint/v1beta1/query';
@@ -369,6 +369,17 @@ declare function formatTimeRemainingFromEpochs(endEpoch: bigint | number | BigNu
369
369
  declare function sleep(ms: number): Promise<void>;
370
370
  declare const openExternalLink: (url: string) => void;
371
371
 
372
+ /**
373
+ * Creates a list of coins with one element. Mirrors cosmjs `coins()` from @cosmjs/amino.
374
+ */
375
+ declare const coins: (amount: number | string, denom: string) => Coin[];
376
+ /**
377
+ * Parses a coins string like "819966000ucosm,700000000ustake" into a Coin array.
378
+ * Mirrors cosmjs `parseCoins()` from @cosmjs/amino.
379
+ * Denom regex follows Cosmos SDK 0.53 (cosmos-sdk/types/coin.go).
380
+ */
381
+ declare const parseCoins: (input: string) => Coin[];
382
+
372
383
  declare const canDepositFromIBC: (ibcData: IBCData) => boolean;
373
384
  declare const canSendToIBC: (ibcData: IBCData) => boolean;
374
385
  /** Compute the denom on the first-hop (counterparty) chain, using only this trace. */
@@ -1283,4 +1294,4 @@ declare function SettingsToggle({ accentColor }: SettingsToggleProps): react_jsx
1283
1294
 
1284
1295
  declare const TestnetBanner: () => react_jsx_runtime.JSX.Element | null;
1285
1296
 
1286
- 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, useValidatorLogos, validateBZEBech32Address, validateBech32Address, validateEndpoints, validateRestEndpoint, validateRpcEndpoint };
1297
+ 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, 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
@@ -127,6 +127,7 @@ __export(index_exports, {
127
127
  canSendToIBC: () => canSendToIBC,
128
128
  cancelDebounce: () => cancelDebounce,
129
129
  checkAddressWonRaffle: () => checkAddressWonRaffle,
130
+ coins: () => coins,
130
131
  convertToWebSocketUrl: () => convertToWebSocketUrl,
131
132
  counterpartyChainForChannel: () => counterpartyChainForChannel,
132
133
  createMarketId: () => createMarketId,
@@ -258,6 +259,7 @@ __export(index_exports, {
258
259
  keplrSuggestChain: () => keplrSuggestChain,
259
260
  mapEventAttributes: () => mapEventAttributes,
260
261
  openExternalLink: () => openExternalLink,
262
+ parseCoins: () => parseCoins,
261
263
  parseUnbondingDays: () => parseUnbondingDays,
262
264
  poolIdFromPoolDenom: () => poolIdFromPoolDenom,
263
265
  prettyAmount: () => prettyAmount,
@@ -1008,6 +1010,36 @@ var openExternalLink = (url) => {
1008
1010
  window.open(url, "_blank", "noopener,noreferrer");
1009
1011
  };
1010
1012
 
1013
+ // src/utils/coins.ts
1014
+ var coin = (amount, denom) => {
1015
+ let outAmount;
1016
+ if (typeof amount === "number") {
1017
+ if (!Number.isInteger(amount) || amount < 0 || amount > Number.MAX_SAFE_INTEGER) {
1018
+ throw new Error("Given amount is not a safe integer. Consider using a string instead to overcome the limitations of JS numbers.");
1019
+ }
1020
+ outAmount = String(amount);
1021
+ } else {
1022
+ if (!amount.match(/^[0-9]+$/)) {
1023
+ throw new Error("Invalid unsigned integer string format");
1024
+ }
1025
+ outAmount = amount.replace(/^0*/, "") || "0";
1026
+ }
1027
+ return { amount: outAmount, denom };
1028
+ };
1029
+ var coins = (amount, denom) => {
1030
+ return [coin(amount, denom)];
1031
+ };
1032
+ var parseCoins = (input) => {
1033
+ return input.replace(/\s/g, "").split(",").filter(Boolean).map((part) => {
1034
+ const match = part.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/:._-]{2,127})$/);
1035
+ if (!match) throw new Error("Got an invalid coin string");
1036
+ return {
1037
+ amount: match[1].replace(/^0+/, "") || "0",
1038
+ denom: match[2]
1039
+ };
1040
+ });
1041
+ };
1042
+
1011
1043
  // src/utils/ibc.ts
1012
1044
  var import_bignumber3 = __toESM(require("bignumber.js"));
1013
1045
  var canDepositFromIBC = (ibcData2) => {
@@ -4030,7 +4062,7 @@ var useToast = () => {
4030
4062
  var import_react15 = require("@interchain-kit/react");
4031
4063
  var import_bignumber13 = __toESM(require("bignumber.js"));
4032
4064
  var import_react16 = require("react");
4033
- var coins = (amount, denom) => [{ amount: String(amount), denom }];
4065
+ var coins2 = (amount, denom) => [{ amount: String(amount), denom }];
4034
4066
  var TxStatus = /* @__PURE__ */ ((TxStatus2) => {
4035
4067
  TxStatus2["Failed"] = "Transaction Failed";
4036
4068
  TxStatus2["Successful"] = "Transaction Successful";
@@ -4038,7 +4070,7 @@ var TxStatus = /* @__PURE__ */ ((TxStatus2) => {
4038
4070
  return TxStatus2;
4039
4071
  })(TxStatus || {});
4040
4072
  var defaultFee = {
4041
- amount: coins(2e4, getChainNativeAssetDenom()),
4073
+ amount: coins2(2e4, getChainNativeAssetDenom()),
4042
4074
  gas: "500000"
4043
4075
  };
4044
4076
  var useSDKTx = (chainName) => {
@@ -4084,7 +4116,7 @@ var useTx = (chainName) => {
4084
4116
  const gasAmount = (0, import_bignumber13.default)(gasEstimated).multipliedBy(1.5);
4085
4117
  const gasPayment = gasAmount.multipliedBy(gasPrice);
4086
4118
  const nativeFee = {
4087
- amount: coins(gasPayment.toFixed(0).toString(), nativeDenom),
4119
+ amount: coins2(gasPayment.toFixed(0).toString(), nativeDenom),
4088
4120
  gas: gasAmount.toFixed(0)
4089
4121
  };
4090
4122
  if (feeDenom === nativeDenom) {
@@ -4103,7 +4135,7 @@ var useTx = (chainName) => {
4103
4135
  expectedAmount = toBigNumber(1).dividedBy(pool.fee).integerValue(import_bignumber13.default.ROUND_CEIL);
4104
4136
  }
4105
4137
  return {
4106
- amount: coins(expectedAmount.toFixed(0).toString(), feeDenom),
4138
+ amount: coins2(expectedAmount.toFixed(0).toString(), feeDenom),
4107
4139
  gas: gasAmount.multipliedBy(1.5).toFixed(0)
4108
4140
  };
4109
4141
  }, [signingClient, address, feeDenom, getDenomsPool]);
@@ -4719,15 +4751,15 @@ var import_core = require("@interchain-kit/core");
4719
4751
  var import_bignumber14 = __toESM(require("bignumber.js"));
4720
4752
  var import_bzejs4 = require("@bze/bzejs");
4721
4753
  var import_jsx_runtime5 = require("react/jsx-runtime");
4722
- var validateAmount = (amount, coin, onError) => {
4723
- if (!coin) return;
4754
+ var validateAmount = (amount, coin2, onError) => {
4755
+ if (!coin2) return;
4724
4756
  if (amount === "") return;
4725
4757
  const amountNumber = (0, import_bignumber14.default)(amount);
4726
4758
  if (amountNumber.isNaN()) {
4727
4759
  onError("Invalid amount");
4728
4760
  return;
4729
4761
  }
4730
- const coinBalance = uAmountToBigNumberAmount(coin.amount, coin.decimals);
4762
+ const coinBalance = uAmountToBigNumberAmount(coin2.amount, coin2.decimals);
4731
4763
  if (coinBalance.isLessThan(amount)) {
4732
4764
  onError("Insufficient balance");
4733
4765
  } else {
@@ -5371,6 +5403,7 @@ var TestnetBanner = () => {
5371
5403
  canSendToIBC,
5372
5404
  cancelDebounce,
5373
5405
  checkAddressWonRaffle,
5406
+ coins,
5374
5407
  convertToWebSocketUrl,
5375
5408
  counterpartyChainForChannel,
5376
5409
  createMarketId,
@@ -5502,6 +5535,7 @@ var TestnetBanner = () => {
5502
5535
  keplrSuggestChain,
5503
5536
  mapEventAttributes,
5504
5537
  openExternalLink,
5538
+ parseCoins,
5505
5539
  parseUnbondingDays,
5506
5540
  poolIdFromPoolDenom,
5507
5541
  prettyAmount,