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. Profile Picture Protocol

Get a Wallet's Profile Picture

Use the functionality below to fetch a wallet's profile picture in order to display it on your own protocol's front-end.

function getProfilePicture (connection: Connection, publicKey: PublicKey, config: ProfilePictureConfig): Promise<ProfilePicture>

Params

  • connection - RPC connection object

  • publicKey - The public key of the wallet

  • config (optional)

    • fallback - Boolean, use a fallback generated image (default true)

    • resize - Object with Cloudflare image resize params (default { widht: 100 })

  • fallback - Boolean, use a fallback generated image (default true)

Return value

Object with the following fields:

  • isAvailable - Boolean, true if there is a profile picture for the given wallet

  • url - The URL of the profile image, is always populated (either a fallback image or an empty-image icon), you can choose to ignore it if isAvailable is false

  • name - NFT name (only if isAvailable: true)

  • metadata - NFT metadata object (only if isAvailable: true)

  • tokenAccount - The public key of the token account that holds the NFT (only if isAvailable: true)

  • mintAccount - The public key of the NFT's mint (only if isAvailable: true)

PreviousProfile Picture ProtocolNextSet NFT as Profile Picture

Last updated 2 years ago

Was this helpful?

🎭