Skip to content

Commit

Permalink
packages/kit: Remove barrel files and place explicit exports in root …
Browse files Browse the repository at this point in the history
…index
  • Loading branch information
corbanbrook committed May 15, 2024
1 parent d0e199a commit 40083ce
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 32 deletions.
1 change: 0 additions & 1 deletion packages/kit/src/components/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/kit/src/contexts/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/kit/src/hooks/index.ts

This file was deleted.

71 changes: 65 additions & 6 deletions packages/kit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,65 @@
export * from './components'
export * from './constants'
export * from './hooks'
export * from './contexts'
export * from './utils'
export * from './types'
// Provider
export { KitProvider } from './components/KitProvider'

// Types
export type {
Wallet,
WalletField,
WalletProperties,
DisplayedAsset,
ExtendedConnector,
EthAuthSettings,
Theme,
ModalPosition,
KitConfig,
StorageItem
} from './types'

// Constants
export { LocalStorageKey, defaultSignInOptions, DEFAULT_SESSION_EXPIRATION } from './constants'

// Utils
export { getKitConnectWallets } from './utils/getKitConnectWallets'
export { isEmailValid, compareAddress, formatDisplay } from './utils/helpers'
export { defaultNativeTokenInfo, getNativeTokenInfoByChainId, getChainIdList } from './utils/tokens'
export { createGenericContext } from './utils/genericContext'
export { getModalPositionCss } from './utils/styling'
export { getNetwork, getNetworkColor, getNetworkBackgroundColor } from './utils/networks'
export { walletClientToSigner, publicClientToProvider } from './utils/adapters'
export { signEthAuthProof, validateEthProof } from './utils/ethAuth'
export { capitalize } from './utils/string'

// Contexts
export { useKitConfig, KitConfigContextProvider } from './contexts/KitConfig'
export { useAnalyticsContext, AnalyticsContextProvider } from './contexts/Analytics'
export { useConnectModalContext, ConnectModalContextProvider } from './contexts/ConnectModal'
export { useThemeContext, ThemeContextProvider } from './contexts/Theme'
export { useWalletConfigContext, WalletConfigContextProvider } from './contexts/WalletSettings'

// Hooks
export { useOpenConnectModal } from './hooks/useOpenConnectModal'
export { useTheme } from './hooks/useTheme'
export { useWalletSettings } from './hooks/useWalletSettings'
export { useWaasFeeOptions } from './hooks/useWaasFeeOptions'
export { useProjectAccessKey } from './hooks/useProjectAccessKey'
export { useAPIClient } from './hooks/useAPIClient'
export { useMetadataClient } from './hooks/useMetadataClient'
export { useIndexerClient, useIndexerClients } from './hooks/useIndexerClient'
export { useStorage, useStorageItem } from './hooks/useStorage'
export {
getNativeTokenBalance,
getCollectionBalance,
getCoinPrices,
getTransactionHistory,
useBalances,
useExchangeRate,
getTokenBalances,
useCoinBalance,
useCoinPrices,
useCollectionBalance,
useCollectibleBalance,
useCollectiblePrices,
useTokenMetadata,
useContractInfo,
useTransactionHistory
} from './hooks/data'
9 changes: 0 additions & 9 deletions packages/kit/src/utils/index.ts

This file was deleted.

0 comments on commit 40083ce

Please sign in to comment.