This package contains React helpers for interacting with Bitte Wallet.
-
BitteWalletContextProvider (default) : The default Bitte Wallet provider
npm install @bitte-ai/react
npm install @near-wallet-selector/modal-ui
yarn add @bitte-ai/react
yarn add @near-wallet-selector/modal-ui
pnpm install @bitte-ai/react
pnpm install @near-wallet-selector/modal-ui
the default way of interacting with Bitte Wallet is using the BitteWalletContextProvider
network : mainnet | testnet - NEAR network to connect to
contractAddress : string - Contract address for the wallet modal
wallets : SupportedWalletType[] - Array of wallet keywords you want to include
walletOptions : Record<SupportedWalletType, WalletSetupOptions> - Configuration options for each wallet
additionalWallets : WalletModuleFactory[] - Extra wallets setup
onlyBitteWallet : boolean - Only show Bitte wallet
walletUrl : string - Custom Bitte wallet URL
import "@near-wallet-selector/modal-ui/styles.css";
import { BitteWalletContextProvider, SupportedWalletType } from '@bitte-ai/react'
// Choose exactly which wallets you want
const wallets: SupportedWalletType[] = ["bitte", "intear", "meteor", "okx", "hot"];
<BitteWalletContextProvider
network="mainnet"
wallets={wallets}
>
<Component {...pageProps} />
</BitteWalletContextProvider>import "@near-wallet-selector/modal-ui/styles.css";
import { BitteWalletContextProvider } from '@bitte-ai/react'
<BitteWalletContextProvider
network="mainnet"
>
<Component {...pageProps} />
</BitteWalletContextProvider>"bitte"- Bitte Wallet"meteor"- Meteor Wallet"here"- HERE Wallet"mynear"- MyNearWallet"intear"- Intear Wallet"okx"- OKX Wallet"hot"- HOT Wallet
<BitteWalletContextProvider
network="mainnet"
wallets={["bitte"]}
>
<YourApp />
</BitteWalletContextProvider><BitteWalletContextProvider
network="mainnet"
wallets={["bitte", "meteor", "intear", "okx", "hot"]}
walletOptions={{
bitte: { walletUrl: "https://custom.wallet.url" }
}}
>
<YourApp />
</BitteWalletContextProvider>For more detailed examples and migration guide, see WALLET_CUSTOMIZATION.md.
The wallet runs only on client-side.
Any other questions or issues you can contact support on our Telegram Channel.
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0).