New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@tetherto/wdk-uikit-react-native

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tetherto/wdk-uikit-react-native

A set of reusable, stateless components for the WDK UI Kit.

latest
Source
npmnpm
Version
1.0.0-beta.2
Version published
Weekly downloads
23
109.09%
Maintainers
3
Weekly downloads
 
Created
Source

@tetherto/wdk-uikit-react-native

A set of reusable, stateless components anyone can use to ship production-quality wallet or wallet-enabled apps fast.

To see it in action, please check the Wallet WDK React Native Starter, a complete wallet application built with WDK and WDK UI Kit.

🔍 About WDK

This repository is part of the WDK (Wallet Development Kit) project, which empowers developers to build secure, non-custodial wallets with unified blockchain access, stateless architecture, and complete user control.

For detailed documentation about the complete WDK ecosystem, visit docs.wallet.tether.io.

🌟 Features

  • Ready-made wallet building blocks: amount input, asset selector, address input, QR code, balance, transaction item/list, seed phrase
  • Themeable out of the box: light/dark modes, brand colors, ThemeProvider and useTheme API
  • Type-safe, documented props and theme types for excellent DX
  • Composable and unopinionated: no business logic; wire in your own data/state from WDK or elsewhere
  • Mobile-first: React Native primitives with sensible defaults and accessible touch targets
  • Customizable visuals: override per-component variants via componentVariants or fine-tune with componentOverrides

⬇️ Install

npm install @tetherto/wdk-uikit-react-native

🚀 Quick Start

Wrap your app with the theme and render a list.

import { ThemeProvider, lightTheme, TransactionList } from '@tetherto/wdk-uikit-react-native'

export default function App() {
  const transactions = [{ id: '1', token: 'USDT', amount: '10.00', fiatAmount: '10.00', fiatCurrency: 'USD', network: 'Ethereum', type: 'received' }]

  return (
    <ThemeProvider initialTheme={lightTheme}>
      <TransactionList transactions={transactions} />
    </ThemeProvider>
  )
}

🔌 Use with WDK

Wire data from WDK into these UI components.

import * as React from 'react'
import WDK from '@tetherto/wdk'
import WalletManagerEvm from '@tetherto/wdk-wallet-evm'
import WalletManagerBtc from '@tetherto/wdk-wallet-btc'
import { ThemeProvider, lightTheme, Balance, CryptoAddressInput, AmountInput } from '@tetherto/wdk-uikit-react-native'

export function WalletScreen() {
  const [balance, setBalance] = React.useState<number | null>(null)
  const [error, setError] = React.useState<string | null>(null)

  React.useEffect(() => {
    async function bootstrap() {
      try {

        const wdkWithWallets = new WDK('your seed phrase')
          .registerWallet('bitcoin', WalletManagerBtc, { provider: 'https://blockstream.info/api' })

        const accounts = await wdkWithWallets.getAccount('bitcoin', 0)
        const address = await accounts.getAddress()
        const balance = await accounts.getBalance()

        setBalance(balance)
      } catch (e: any) {
        setError(e?.message ?? 'Unknown error')
      }
    }

    bootstrap()
  }, [])

  return (
    <ThemeProvider initialTheme={lightTheme}>
      <CryptoAddressInput onQRScan={() => {/** do something */}} />
      <AmountInput
        label="Enter Amount"
        tokenSymbol="BTC"
        value={amount}
        onChangeText={setAmount}
        tokenBalance={balance ?? '0'}
        inputMode={'token'}
        onUseMax={() => setAmount(balance ?? 0)}
      />
      <Balance value={balance ?? 0} currency="BTC" />
    </ThemeProvider>
  )
}

📚 Components

ComponentDescription
AmountInputNumeric input with token/fiat toggle, balance helper and Max action.
AssetSelectorToken search & pick list with recent items and empty states.
NetworkSelectorNetwork picker with gas level indicators and colors.
BalanceDisplays a balance value with optional masking and custom loader.
CryptoAddressInputAddress input with QR scan and paste helpers, validation state.
QRCodeQR renderer for addresses/payment requests with labeling and styling.
TransactionItemSingle transaction row (sent/received) with token, amounts, network.
TransactionListVirtualized list of transactions using TransactionItem.
SeedPhraseGrid of seed words with optional editing and loading states.

🧾 Component APIs

Each component exposes a typed, minimal API designed to work with WDK data models. Below are the primary props. For example usage, see the Quick Start and the Template Wallet.

AmountInput

PropTypeRequiredDefaultNotes
labelstringno'Enter Amount'Field label
valuestringyesAmount text
onChangeText(text: string) => voidyesCalled when text changes
tokenSymbolstringyesToken code, e.g. 'ETH'
tokenBalancestringyesToken balance (e.g. '1.23')
tokenBalanceUSDstringyesBalance in fiat (e.g. '$4200.00')
inputMode'token''fiat'yes
onToggleInputMode() => voidyesSwitch token/fiat
onUseMax() => voidyesFill with max amount
errorstringnoError message
editablebooleannotrueDisable input when false

AssetSelector

PropTypeRequiredDefaultNotes
tokensToken[]yesFull list of tokens to display/filter
recentTokensstring[]yesArray of recent token names to show in the Recent row
onSelectToken(t: Token) => voidyesCalled when user picks a token; disabled when hasBalance is false

Token type:

type Token = {
  id: string
  symbol: string
  name: string
  balance: string
  balanceUSD: string
  icon: ImageSourcePropType
  color: string
  network?: string
  hasBalance: boolean
}

Balance

PropTypeRequiredDefaultNotes
valuenumberno0Balance number
isLoadingbooleannofalseShow loader state
LoaderReact.ComponentTypenoCustom loader component
showHidebooleannotrueToggle hide/show balance
currencystringno'USD'Currency label
EyeOpenIconReact.ComponentTypenodefaultShown when hidden
EyeClosedIconReact.ComponentTypenodefaultShown when visible

CryptoAddressInput

PropTypeRequiredDefaultNotes
labelstringno'Recipient Address'Field label
valuestringyesAddress text
onChangeText(text: string) => voidyesCalled when text changes
placeholderstringno'T08p3BGPIuh1l934IIflu....Kc2GXhKc'Hint text
onPaste() => voidnoPaste action handler
onQRScan() => voidnoOpen QR scanner
editablebooleannotrueDisable input when false
errorstringnoError message

QRCode

PropTypeRequiredDefaultNotes
valuestringyesData to encode
sizenumberno200QR side in px
colorstringnotheme.primaryDot color
backgroundColorstringno'transparent'Background behind QR
labelstringnoOptional title above QR
containerStyleViewStylenoWrapper style
labelStyleanynoStyle for label

TransactionItem

PropTypeRequiredDefaultNotes
transaction{ id: string; token: string; amount: string; fiatAmount: string; fiatCurrency: string; network: string; type: 'sent''received' }yes
onPress() => voidnoRow press handler

TransactionList

PropTypeRequiredDefaultNotes
transactionsTransaction[]yesList of transactions

NetworkSelector

PropTypeRequiredDefaultNotes
networks{ id: string; name: string; gasLevel: 'High''Normal''Low'; gasColor: string; icon: stringany; color: string }[]
onSelectNetwork(network: Network) => voidyesCalled when a network is chosen

SeedPhrase

PropTypeRequiredDefaultNotes
wordsstring[]yesSeed words list (12/24, etc.)
editablebooleannofalseAllow editing inputs
onWordChange(index: number, word: string) => voidnoCalled on word edit
onKeyPress(index: number, key: string) => voidnoHandle key press (e.g. Backspace navigation)
isLoadingbooleannofalseShow generating/loading state

🎨 Theming

Use a built-in theme or create one from your brand. The theming system is lightweight and flexible:

  • Follow system light/dark or force a mode
  • Start with lightTheme/darkTheme, or generate from brand colors via createThemeFromBrand
  • Access theme values anywhere with useTheme
  • Customize visuals globally with componentVariants and surgically with componentOverrides

See full guidance in THEME_USAGE.md.

import { ThemeProvider, darkTheme, createThemeFromBrand } from '@tetherto/wdk-uikit-react-native'

const brandTheme = createThemeFromBrand({
  primaryColor: '#0F62FE',
  secondaryColor: '#6F6F6F',
  fontFamily: { regular: 'System', bold: 'System' },
}, 'light')

export function Root() {
  return (
    <ThemeProvider initialTheme={brandTheme /* or darkTheme */}>
      {/* your UI */}
    </ThemeProvider>
  )
}

Theme API

Key types: Theme, ThemeMode, ColorPalette, Typography, Spacing, BorderRadius, ComponentVariant, ComponentOverrides, BrandConfig.

Theme shape:

type Theme = {
  mode: 'light' | 'dark' | 'auto'
  colors: ColorPalette
  typography: Typography
  spacing: Spacing
  borderRadius: BorderRadius
  componentVariants?: ComponentVariant
  componentOverrides?: ComponentOverrides
}

BrandConfig for createThemeFromBrand:

type BrandConfig = {
  primaryColor: string
  secondaryColor?: string
  fontFamily?: {
    regular?: string
    medium?: string
    semiBold?: string
    bold?: string
  }
}

Notes:

  • mode can be 'light', 'dark', or 'auto' (follows system settings).
  • componentVariants sets default variants/styles per component key (e.g., AmountInput.default, TransactionItem.compact).
  • componentOverrides enables targeted overrides for specific component parts (e.g., paddings, font sizes, colors).

Key theme pieces at a glance:

TokenPurpose
colorsBrand palette and semantic UI colors.
typographyFont families, sizes, weights.
spacingConsistent spacing scale for paddings/margins.
borderRadiusRounded corners scale.
componentVariantsDefault visual variants by component.
componentOverridesFine-grained style overrides by component part.

🧪 Full Example Integration

Check the WDK React Native Starter Wallet, a complete wallet application built with WDK and WDK UI Kit.

🛠️ Development

npm install
npm run lint
npm test

📜 License

This project is licensed under the Apache-2.0 - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🆘 Support

For support, please open an issue on the GitHub repository.

Keywords

react-native

FAQs

Package last updated on 09 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts