Solflare Wallet
  • ☀️Introduction
    • The Power of Self-Custody
    • Benefits of Non-Custodial Wallets
    • Digital Wallet Best Practices
    • Bigger Picture
  • Onboarding
    • 📞Mobile
      • Generate a New Wallet
      • Connect a Ledger Wallet
      • Import any Solana Wallet
    • 🖥️Web App & Extension
      • Generate a New Wallet
      • Import Your Ledger Device
      • Import Your Keystone Device
      • Import any Solana Wallet
    • 🚶Next Steps
  • Integrations
    • ⛓️Integrate Solflare
      • MetaMask
      • Using the Solana Wallet Adapter
      • Solflare Wallet SDK
    • 🎭Profile Picture Protocol
      • Get a Wallet's Profile Picture
      • Set NFT as Profile Picture
      • Remove a Profile Picture
    • ⚡Solflare Notifications
      • Sending Notifications
      • User's Perspective
        • Notification Center
        • Receiving Notifications
        • Subscription Management
      • API Endpoints
        • Broadcast Endpoint
        • Unicast Endpoint
        • List Casts Endpoint
        • View Cast Endpoint
        • Check Public Key Subscription Status for Domain
    • 🖼️NFT Standard
      • URI JSON Schema
      • CDN hosted files
      • Collections
      • Additional Attributes Specification
      • Order of JSON Fields
    • 🔗Deeplinks
      • Provider Methods
        • Connect
        • Disconnect
        • SignAndSendTransaction
        • SignAllTransactions
        • SignTransaction
        • SignMessage
      • Other Methods
        • Browse
      • Handling Sessions
      • Specifying Redirects
      • Encryption
      • Limitations
Powered by GitBook
On this page

Was this helpful?

  1. Integrations
  2. Integrate Solflare

Using the Solana Wallet Adapter

If your dApp uses the Solana Wallet Adapter, you just have to add the Solflare Wallet Adapter to the list of supported wallets.

Install the latest wallets package with

npm install @solana/wallet-adapter-wallets@latest

Then update the code to look like this:

import {
  SolflareWalletAdapter,
  /* ... other adapters ... */
} from '@solana/wallet-adapter-wallets';

const wallets = useMemo(
  () => [
    new SolflareWalletAdapter(),
    // ... other adapters ...
  ],
  []
);

<WalletProvider autoConnect wallets={wallets}>

Alternatively, you can install only the Solflare adapter directly

npm install @solana/wallet-adapter-solflare@latest

Then update the code:

import { SolflareWalletAdapter } from '@solana/wallet-adapter-solflare';
import { /* ... other adapters ... */ } from '@solana/wallet-adapter-wallets';


const wallets = useMemo(
  () => [
    new SolflareWalletAdapter(),
    // ... other adapters ...
  ],
  []
);

<WalletProvider autoConnect wallets={wallets}>
PreviousMetaMaskNextSolflare Wallet SDK

Last updated 1 year ago

Was this helpful?

⛓️