Earn 5.75% APY staking with Solana Compass + help grow Solana's ecosystem

Stake natively or with our LST compassSOL to earn a market leading APY

Conference Talk Breakpoint 23

Breakpoint 2023: How Phantom Integrated With Solana Mobile In Purely React Native

Solana 🧭 Compass By Solana 🧭 Compass Nov 09, 2023 5 min read

An in-depth look at Phantom's integration with Solana Mobile using React Native

The notes below are AI generated and may not be 100% accurate. Watch the video to be sure!
Note: these notes were generated by AI to help surface more Solana content

Summary

In a detailed breakdown at Breakpoint 2023, Nick Cruz, a software engineer at Phantom, delved into how Phantom, a popular cryptocurrency wallet, achieved integration with Solana Mobile using a predominantly React Native framework. React Native, a popular framework for mobile app development, enables developers to build mobile applications using JavaScript and TypeScript. Cruz, who has a background in native Android development, shared his insights on how native modules in React Native bridge the gap between JavaScript and native Android code, particularly focusing on the integration with the seed vault functionality of the Solana Mobile Stack.

Key Points:

The Integration Process

Nick Cruz opened the discussion by outlining the need for integrating the Phantom mobile app with the Solana blockchain, an endeavor that would allow for safe and seamless cryptocurrency transactions. The integration process is complex, involving a journey from user interface interactions to the actual transaction on the blockchain. This process includes various steps: starting in the React Native layer, bridging to the native Kotlin layer, interacting with the seed vault, and then reverting the signed transaction back to React Native for dispatch to the blockchain. What stands out in Cruz's explanation is the meticulous design behind the workflow, ensuring secure and efficient user transactions.

React Native's Role

React Native's role is significant as it supports cross-platform development while still allowing developers to execute native code when necessary. This approach provides a balance between the speed of development in React Native and the power and specificity of native development in Kotlin or Swift. Cruz highlighted the convenience and efficiency of this architecture, demonstrating how Phantom could leverage the strength of both JavaScript and native modules.

Seed Vault and Security

Cruz emphasized the security benefits of Solana Mobile's seed vault, which is a secure enclave for storing cryptographic keys embedded in the Saga phone hardware. This feature signifies a substantial advance in mobile wallet security, as it ensures that private keys never leave the safety of the secure enclave and are not directly handled by the Phantom app. Transactions require user approval, further bolstering the wallet's security profile.

Facts + Figures

  • Nick Cruz is a software engineer at Phantom, who previously worked at Airbnb and the life sciences division of Alphabet.
  • Phantom's codebase is 99.5% TypeScript or JavaScript with a tiny percentage (0.5%) of Kotlin.
  • Phantom Mobile is a React Native application, indicating a preference for cross-platform capable frameworks.
  • The seed vault is currently exclusive to the Saga phone and it is where private keys are securely stored.
  • The communication with the seed vault is facilitated using native Android APIs and is not managed in JavaScript.
  • The process of sending a transaction involves packaging a request into an 'intent' which is transferred to the seed vault.
  • The user's approval of a transaction is captured in the seed vault’s UI, which then produces a signed transaction.
  • Signed transactions are returned to Phantom to finalize the transaction and send it to the Solana blockchain.
  • The entire transaction process happens almost instantaneously, emphasizing efficiency and user experience.

Top quotes

  • "Phantom Mobile is a React Native app and this is actually a language breakdown of our Monorepo."
  • "The seed vault then does its thing. It shows signing UI. It approves, we get an approval from the user and it actually signs the transaction."
  • "This is where I'm going to talk about Intents now with Intents are basically messages."
  • "This is what it meant to wrap an intent. We took all this data and put it in this intent api, intent message."
  • "We haven't done a Swift integration, but we might soon."
  • "You don't need to be a fully native app to integrate with the Solana mobile stack, you can be React Native."

Questions Answered

Who is Nick Cruz?

Nick Cruz is a software engineer at Phantom and has the experience of being a native Android engineer at Airbnb and the life sciences division of Alphabet before joining Phantom.

What is Phantom Mobile and why is the integration with Solana Mobile significant?

Phantom Mobile is a cryptocurrency wallet application developed using React Native, aiming to provide a secure and user-friendly platform for crypto transactions. Integrating with Solana Mobile is significant as it allows Phantom to harness the advanced security features of the Solana Mobile stack, particularly the seed vault for secure transaction signing.

How does React Native fit into the integration process with Solana Mobile?

React Native plays a central role in the Phantom app, serving as the cross-platform framework for UI development. However, for actions that require native functionality, such as interactions with Solana's seed vault, Phantom uses native modules in React Native, enabling the app to execute native Android code within the JavaScript environment.

What is the seed vault and how does it enhance security?

The seed vault is a secure component within the Saga phone that stores cryptographic keys within the phone's hardware. It enhances security by ensuring that the keys remain protected in the secure enclave and by requiring user confirmation for transactions, thus reducing the risk of unauthorized access.

Can React Native fully replace native development in blockchain applications?

While React Native offers extensive capabilities and the convenience of cross-platform development, it does not entirely replace native development. As demonstrated by Phantom's integration with Solana Mobile, certain aspects, such as interfacing with hardware security features, still require native code. Native modules in React Native bridge this gap, allowing developers to invoke native functionality as needed.


Comments

Please login to leave a comment.

Related Content

Phantom CEO: The Next Chapter For Phantom | Brandon Millman & Sam Rosenblum

Phantom CEO Brandon Millman reveals the wallet's transformation into a consumer finance super app, discusses IPO considerations, aggressive M&A strategy, and drops alpha on next-gen key management.

Phantom Wallet: The Best Web3 Wallet? Interview with CEO Brandon Miller

Discover how Phantom Wallet is transforming the Web3 experience on Solana. CEO Brandon Miller discusses growth, mobile plans, and the future of crypto wallets.

How Phantom Became Solana's Largest Wallet | Brandon Millman & Donnie Dinch

Discover how Phantom became Solana's leading wallet, its recent Bitski acquisition, and plans for revolutionizing user onboarding in crypto

Phantom Wallet: The most popular Solana wallet (w/ Brandon M, CEO/co-founder) - Solfate Podcast #44

Explore how Phantom Wallet is revolutionizing the Solana ecosystem with user-focused design, multi-chain support, and innovative growth strategies.

Phantom CEO: Will Phantom IPO In The Future?

Phantom CEO Brandon Millman and President Sam Rosenblum discuss IPO considerations, why going public is a tool not a goal, and how they're building toward mainstream crypto adoption.

Solana's Mobile Future w/ Andrew, DRiP.haus Mobile Engineer

Explore the future of Solana mobile development with DRiP.haus engineer Andrew. Learn about cross-platform tools, Web3 challenges, and the importance of user experience in blockchain apps.

Breakpoint 2024: Keynote: Phantom (Donnie Dinch)

Phantom unveils free embedded wallet with full UI, account support, and monetization opportunities for dApps

Building Your Financial Life Onchain: Phantom

Phantom unveils prediction markets, Stripe-powered cash features, and developer tools at Solana Breakpoint 2024 - transforming crypto wallets into complete financial accounts

Ship or Die at Accelerate 2025: From Crypto Product to Finance Platform

Phantom's plan to revolutionize crypto wallets and take on TradFi giants

The Next Chapter Of Solana Mobile | Emmett Hollyer

Emmett Hollyer discusses Solana Mobile's ambitious plans to disrupt the mobile industry, improve crypto UX, and build a thriving ecosystem with the upcoming Solana Seeker phone.

The 10 Year Vision For Solana Mobile

Emmett Hollyer reveals Solana Mobile's ambitious roadmap: hardware partnerships, global expansion beyond US markets, and building a permissionless device network.

Unlayered Episode 3: The Key to the Next Billion - Solana's Mobile Strategy

Discover how Solana's Saga phone and SMS are revolutionizing crypto on mobile, paving the way for mass adoption and seamless Web3 experiences.

Validated | Why Crypto Needs a Mobile Revolution

Explore how mobile-first apps like Dialect are driving crypto adoption, the impact of state compression, and why chat could be the gateway to Web3.

Breakpoint 2023: Phantom Quests

Phantom introduces an engaging incentive program to explore new features and understand the Solana ecosystem with Phantom Quests.

Retaining the Next Billion Users with Phantom at Breakpoint 2023

Phantom's latest initiatives to boost crypto user retention and smooth the user experience.

Solana tokens

Solana Token Markets

Explore all tokens →