
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@gemini-wallet/rainbow
Advanced tools
RainbowKit connector for seamless Gemini Wallet integration with beautiful UI components.
@gemini-wallet/rainbow
provides a RainbowKit wallet adapter that enables easy integration of Gemini Wallet into applications using RainbowKit. It offers a polished, customizable wallet connection experience with minimal setup.
npm install @gemini-wallet/rainbow
# or
yarn add @gemini-wallet/rainbow
# or
pnpm add @gemini-wallet/rainbow
# or
bun add @gemini-wallet/rainbow
We've included a complete working example that you can run immediately:
cd example
bun install
bun run dev
# Open http://localhost:3000
The example demonstrates:
The Gemini wallet connector MUST be wrapped in a function when used with connectorsForWallets
:
// ✅ CORRECT - Wrapped in a function
wallets: [
() => geminiRainbowKitConnector({ ... }),
]
// ❌ WRONG - Will cause "createWallet is not a function" error
wallets: [
geminiRainbowKitConnector({ ... }),
]
import '@rainbow-me/rainbowkit/styles.css';
import { connectorsForWallets, RainbowKitProvider } from '@rainbow-me/rainbowkit';
import { WagmiProvider, createConfig, http } from 'wagmi';
import { mainnet, polygon, optimism, arbitrum } from 'wagmi/chains';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
import { geminiRainbowKitConnector } from '@gemini-wallet/rainbow';
import {
rainbowWallet,
metaMaskWallet,
coinbaseWallet,
walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';
const projectId = 'YOUR_PROJECT_ID'; // Get from https://cloud.walletconnect.com/
const connectors = connectorsForWallets(
[
{
groupName: 'Recommended',
wallets: [
// 🌟 Gemini Wallet - No API key needed!
// IMPORTANT: Must wrap in a function () => ...
() => geminiRainbowKitConnector({
appName: 'My DApp', // Required
appLogoUrl: 'https://mydapp.com/logo.png', // Optional
}),
// Other wallets
rainbowWallet,
metaMaskWallet,
coinbaseWallet,
walletConnectWallet,
],
},
],
{
appName: 'My DApp',
projectId,
}
);
const config = createConfig({
connectors,
chains: [mainnet, polygon, optimism, arbitrum],
transports: {
[mainnet.id]: http(),
[polygon.id]: http(),
[optimism.id]: http(),
[arbitrum.id]: http(),
},
ssr: true,
});
const queryClient = new QueryClient();
function App() {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<RainbowKitProvider>
<YourApp />
</RainbowKitProvider>
</QueryClientProvider>
</WagmiProvider>
);
}
import { ConnectButton } from '@rainbow-me/rainbowkit';
function YourApp() {
return (
<div>
<ConnectButton />
{/* Your app content */}
</div>
);
}
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { geminiRainbowKitConnector } from '@gemini-wallet/rainbow';
import {
metaMaskWallet,
walletConnectWallet,
coinbaseWallet
} from '@rainbow-me/rainbowkit/wallets';
const connectors = connectorsForWallets(
[
{
groupName: 'Recommended',
wallets: [
// Remember: Gemini must be wrapped in a function!
() => geminiRainbowKitConnector({
appName: 'My DApp',
appLogoUrl: 'https://mydapp.com/logo.png',
}),
metaMaskWallet,
],
},
{
groupName: 'Other',
wallets: [
walletConnectWallet,
coinbaseWallet,
],
},
],
{
appName: 'My DApp',
projectId: 'YOUR_PROJECT_ID',
}
);
import { RainbowKitProvider, darkTheme } from '@rainbow-me/rainbowkit';
function App() {
return (
<RainbowKitProvider
theme={darkTheme({
accentColor: '#7b3ff2',
accentColorForeground: 'white',
borderRadius: 'large',
fontStack: 'system',
})}
>
<YourApp />
</RainbowKitProvider>
);
}
import { ConnectButton } from '@rainbow-me/rainbowkit';
export const CustomConnectButton = () => {
return (
<ConnectButton.Custom>
{({
account,
chain,
openAccountModal,
openChainModal,
openConnectModal,
authenticationStatus,
mounted,
}) => {
const ready = mounted && authenticationStatus !== 'loading';
const connected =
ready &&
account &&
chain &&
(!authenticationStatus ||
authenticationStatus === 'authenticated');
return (
<div
{...(!ready && {
'aria-hidden': true,
'style': {
opacity: 0,
pointerEvents: 'none',
userSelect: 'none',
},
})}
>
{(() => {
if (!connected) {
return (
<button onClick={openConnectModal} type="button">
Connect Wallet
</button>
);
}
if (chain.unsupported) {
return (
<button onClick={openChainModal} type="button">
Wrong network
</button>
);
}
return (
<div style={{ display: 'flex', gap: 12 }}>
<button
onClick={openChainModal}
style={{ display: 'flex', alignItems: 'center' }}
type="button"
>
{chain.hasIcon && (
<div
style={{
background: chain.iconBackground,
width: 12,
height: 12,
borderRadius: 999,
overflow: 'hidden',
marginRight: 4,
}}
>
{chain.iconUrl && (
<img
alt={chain.name ?? 'Chain icon'}
src={chain.iconUrl}
style={{ width: 12, height: 12 }}
/>
)}
</div>
)}
{chain.name}
</button>
<button onClick={openAccountModal} type="button">
{account.displayName}
{account.displayBalance
? ` (${account.displayBalance})`
: ''}
</button>
</div>
);
})()}
</div>
);
}}
</ConnectButton.Custom>
);
};
geminiRainbowKitConnector(appMetadata?)
Creates a RainbowKit wallet configuration for Gemini Wallet.
appMetadata
(optional): Application metadata
appName
: Your application name (required)appLogo
: Your application logo URL (optional)A RainbowKit Wallet
object with:
id
: "gemini"
name
: "Gemini"
iconUrl
: Gemini logo URLiconAccent
: "#000"
iconBackground
: "#000"
The default configuration can be accessed via geminiRainbowKitConfig
:
import { geminiRainbowKitConfig } from '@gemini-wallet/rainbow';
console.log(geminiRainbowKitConfig);
// {
// desktop: {},
// downloadUrls: {},
// iconAccent: "#000",
// iconBackground: "#000",
// iconUrl: "https://cdn.worldvectorlogo.com/logos/gemini-4.svg",
// id: "gemini",
// mobile: {},
// name: "Gemini",
// }
import {
RainbowKitProvider,
lightTheme,
darkTheme,
midnightTheme
} from '@rainbow-me/rainbowkit';
// Light theme
<RainbowKitProvider theme={lightTheme()}>
// Dark theme
<RainbowKitProvider theme={darkTheme()}>
// Custom theme
<RainbowKitProvider
theme={lightTheme({
accentColor: '#00D4AA',
accentColorForeground: 'white',
borderRadius: 'medium',
})}
>
RainbowKit provides CSS variables that can be customized:
:root {
--rk-blurs-modalOverlay: blur(0px);
--rk-fonts-body: -apple-system, BlinkMacSystemFont, 'Segoe UI';
--rk-radii-connectButton: 12px;
}
import { createConfig, http } from 'wagmi';
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { geminiRainbowKitConnector } from '@gemini-wallet/rainbow';
import {
mainnet,
polygon,
optimism,
arbitrum,
base,
zora
} from 'wagmi/chains';
const connectors = connectorsForWallets(
[
{
groupName: 'Recommended',
wallets: [
() => geminiRainbowKitConnector({
appName: 'Multi-Chain App',
}),
// Add other wallets as needed
],
},
],
{
appName: 'Multi-Chain App',
projectId: 'YOUR_PROJECT_ID',
}
);
const config = createConfig({
connectors,
chains: [mainnet, polygon, optimism, arbitrum, base, zora],
transports: {
[mainnet.id]: http(),
[polygon.id]: http(),
[optimism.id]: http(),
[arbitrum.id]: http(),
[base.id]: http(),
[zora.id]: http(),
},
});
import { RainbowKitProvider } from '@rainbow-me/rainbowkit';
import { RainbowKitAuthenticationProvider } from '@rainbow-me/rainbowkit';
function App() {
const [authStatus, setAuthStatus] = useState('unauthenticated');
return (
<RainbowKitAuthenticationProvider
adapter={authenticationAdapter}
status={authStatus}
>
<RainbowKitProvider>
<YourApp />
</RainbowKitProvider>
</RainbowKitAuthenticationProvider>
);
}
"createWallet is not a function" Error
() => geminiRainbowKitConnector({ ... })
not just geminiRainbowKitConnector({ ... })
Styles not loading: Ensure @rainbow-me/rainbowkit/styles.css
is imported at the top of your app
Wallet not appearing: Check that you're using connectorsForWallets
and not the deprecated getDefaultWallets
Chain not supported: Add required chains to the configuration and their corresponding transports
Popup blocked: Ensure browser allows popups for wallet connection
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE for details.
FAQs
RainbowKit connector for Gemini Wallet integration
The npm package @gemini-wallet/rainbow receives a total of 150 weekly downloads. As such, @gemini-wallet/rainbow popularity was classified as not popular.
We found that @gemini-wallet/rainbow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.