MCPcopy Index your code
hub / github.com/rainbow-me/rainbow

github.com/rainbow-me/rainbow @v2.0.38 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.38 ↗
7,190 symbols 28,767 edges 2,480 files 212 documented · 3%
README

🌈️ Rainbow

the Ethereum wallet that lives in your pocket!

📲️ Available on the iOS App Store.

🤖 Android available on the Google Play Store

💻 Browser extension available on, Chrome, Brave, Edge, FireFox, and Arc.

𝕏 Follow us on X

Setup

[!TIP] > Internal developers can also use the rainbow-me/rainbow-setup script to install all dependencies and configure the project in one step.

Prerequisites

  1. Install nvm: https://github.com/creationix/nvm
  2. Install the required Node.js version: nvm install
  3. Install Ruby (version specified in .ruby-version). macOS system Ruby is too old and will not work. Use a version manager such as rbenv or rvm.
  4. Enable yarn: corepack enable

Note: On future terminal sessions, run nvm use to activate the correct Node.js version. Alternatively, set up automatic nvm switching in your shell.

Internal developers

Set up these before running yarn install, as the postinstall script reads .env and rainbow-scripts to generate build configs and run prebuild hooks.

  1. Copy dotenv from rainbow-me/rainbow-env to .env in the project root.
  2. Copy android/app/google-services.json from the same repo to android/app/ in this project.
  3. Clone rainbow-me/rainbow-scripts into the project root (the postinstall prebuild hooks depend on it).
  4. Install dependencies and run setup: yarn install && yarn setup

External contributors

  1. Copy .env.example to .env and fill in your own API keys. Note that some features are currently not accessible; we are working with our Data Providers to provide open source API Keys.
  2. Etherscan: https://etherscan.io/apis
  3. Infura: https://infura.io/
  4. ETH Gas Station: https://docs.ethgasstation.info/
  5. Imgix: https://www.imgix.com/
  6. Provide your own google-services.json in android/app/ from a personal Firebase project registered under the package name me.rainbow.
  7. Install dependencies and run setup: yarn install && yarn setup

The iOS GoogleService-Info.plist is already in the repo and gets its API key patched by the postinstall script from GOOGLE_SERVICE_API_KEY in your .env.

iOS (macOS only)

  1. Install the Xcode version pinned in .xcode-version. Recommended: use the xcodes CLI, which reads .xcode-version automatically: sh brew install xcodesorg/made/xcodes xcodes install Alternatively, download the pinned version from developer.apple.com/download. CI and Bitrise build against the same pin, so local parity matters.
  2. Install Watchman: brew install watchman
  3. Install the required bundles and Pods: yarn install-bundle && yarn install-pods

Android

  1. Install JDK 17. Do not use the JDK bundled with Android Studio (it's JDK 21, which causes build failures). On macOS: sh brew install --cask zulu@17
  2. Add to your shell profile (~/.zshrc or ~/.bashrc):

sh export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home export ANDROID_HOME=$HOME/Library/Android/sdk # macOS # export ANDROID_HOME=$HOME/Android/Sdk # Linux export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/platform-tools

On Linux, also install system dependencies: sudo apt install libsecret-tools watchman

  1. Install Android Studio (the standard setup wizard is fine).
  2. Increase the IDE memory: Android Studio > Settings > Memory Settings and set the heap to at least 4096 MB. This project is large enough that the default 2048 MB will cause slow syncs and builds.
  3. Set the Gradle JDK: Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK and select the JAVA_HOME (Azul Zulu 17) entry. The default points to the bundled JDK 21.
  4. Restart any open terminals so the new environment variables take effect.
  5. Create an emulator via Android Studio > Device Manager (unless using a physical device).
  6. Run the first build from the terminal to generate native headers that Android Studio needs for Gradle sync: cd android && ./gradlew assembleDebug && cd ..
  7. Quit Android Studio completely, then reopen it from the terminal so Gradle sync picks up the generated headers: open -a "Android Studio" # macOS Always launch Android Studio this way so it inherits your shell PATH (including node from nvm). Launching from Spotlight or the Dock will cause Gradle sync to fail with "Cannot run program node".

Developing

Start Metro in one terminal:

yarn start

Then build and run:

  • iOS: Open ios/Rainbow.xcworkspace in Xcode (not the .xcodeproj) and press Cmd+R, or run yarn ios from the terminal.
  • Android: Open the android/ folder in Android Studio, or run yarn android from the terminal.

Extension points exported contracts — how you extend this code

AuthSession (Interface)
(no doc) [3 implementers]
src/features/cash/services/authSession.ts
ReactQueryCache (Interface)
* Represents the entire persisted React Query cache.
src/react-query/reactQueryUtils.ts
ChartsState (Interface)
* Represents the current `charts` state.
src/redux/charts.ts
Array (Interface)
(no doc)
reset.d.ts
RadialGradientProps (Interface)
(no doc)
types/react-native-radial-gradient.d.ts
Tab (Interface)
(no doc)
src/browser/messenger.ts
DeprecatedShadowValue (Interface)
(no doc)
src/design-system/layout/shadow.ts
FixedRemoteMessage (Interface)
(no doc)
src/notifications/types.ts

Core symbols most depended-on inside this repo

opacity
called by 782
src/framework/ui/utils/opacity.ts
r
called by 552
InjectedJSBundle.js
r
called by 552
android/app/src/main/res/raw/injected_js_bundle.js
error
called by 388
src/logger/index.ts
debug
called by 360
src/logger/index.ts
filter
called by 352
reset.d.ts
styled
called by 297
src/framework/ui/styled-thing/index.tsx
useColorMode
called by 295
src/design-system/color/ColorMode.tsx

Shape

Function 5,402
Method 880
Interface 565
Class 234
Enum 109

Languages

TypeScript99%
Java1%

Modules by API surface

android/app/src/main/res/raw/injected_js_bundle.js418 symbols
InjectedJSBundle.js418 symbols
src/helpers/utilities.ts61 symbols
src/features/charts/candlestick/components/CandlestickChart.tsx58 symbols
src/model/wallet.ts52 symbols
src/features/charts/polymarket/classes/PolymarketChartManager.ts43 symbols
src/helpers/buildWalletSections.tsx39 symbols
src/handlers/web3.ts35 symbols
src/model/migrations.ts33 symbols
src/features/ens/utils/handlers.ts33 symbols
src/utils/ethereumUtils.ts31 symbols
src/framework/core/safeMath.ts31 symbols

Dependencies from manifests, versioned

@babel/core7.25.2 · 1×
@babel/parser7.25.0 · 1×
@babel/plugin-transform-export-namespace-from7.25.9 · 1×
@babel/plugin-transform-runtime7.25.0 · 1×
@babel/runtime7.25.0 · 1×
@bankify/react-native-animate-number0.2.1 · 1×
@bradgarropy/use-countdown1.4.1 · 1×
@candlefinance/faster-image1.6.2 · 1×
@capsizecss/core3.0.0 · 1×
@coinbase/mobile-wallet-protocol-host0.1.7 · 1×
@domir/react-native-measure-text0.1.8 · 1×
@ensdomains/address-encoder0.2.16 · 1×

For agents

$ claude mcp add rainbow \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact