Skip to main content

Solana Blinks and Actions

Blinks and actions allow sharing Solana functionality anywhere on the internet, enabling users to interact with blockchain features directly from platforms like Twitter.

Value Proposition

  1. Unfurling the internet: Blinks aim to upgrade the concept of link previews, allowing for more interactive and actionable content directly within platforms like Twitter.
  2. Reducing friction: Blinks narrow the gap between seeing a call-to-action and taking an on-chain action, potentially revolutionizing e-commerce and other use cases.
  3. Improved developer experience: Actions and blinks offer a simpler way for developers to create interactive blockchain experiences without building full dApps or websites.
  4. Leveraging existing infrastructure: The technology uses crypto wallet browser extensions that most users already have installed, making adoption easier.
  5. Open protocol: Actions and blinks are designed as an open specification, allowing for widespread adoption and integration across the Solana ecosystem.
  6. Mobile-friendly: There's a strong focus on developing mobile SDKs to expand blinks beyond just desktop browser usage.

Use Case Potential

  1. E-commerce: Blinks can significantly reduce the time to action for purchases, potentially increasing conversion rates.
  2. Gaming: Allowing users to interact with games directly from social media feeds or other platforms.
  3. Governance: Enabling users to vote on proposals directly from their social media feed or other platforms.
  4. Token swaps and trading: Facilitating quick and easy token trades directly from shared links.
  5. NFT minting and distribution: Simplifying the process of minting or acquiring NFTs through shareable links.
  6. Social experiments: Creating new types of social interactions built on top of blockchain primitives.
  7. Personalized experiences: With upcoming features like message signing, blinks could offer more tailored interactions based on a user's wallet.
  8. Multi-step transactions: The planned "actions chaining" feature could enable more complex interactions, expanding use case possibilities.
  9. Bot prevention: Potentially using small transaction costs to disincentivize bot activity on social platforms.
  10. Cross-platform integration: The potential to integrate blinks into various platforms beyond just Twitter, expanding their reach and utility.

Engineering

Leverages existing web technologies (HTTP, URLs) and crypto wallet infrastructure to create a seamless integration of blockchain actions into regular web browsing.

Action Provider API

  • Actions are implemented as HTTP APIs that conform to a specific specification.
  • The API has two main endpoints: a) GET request: Returns metadata about the action, including title, description, available options, etc. b) POST request: Accepts parameters and returns a serialized Solana transaction for signing.

Actions URL Scheme

  • Actions use a custom URL scheme: solana-action:<action_url>
  • This allows for easy identification and parsing of action URLs.
  • Blinks are implemented as URLs with a specific query parameter format: https://example.domain/?action=<encoded_action_url>
  • The action URL is URL-encoded to avoid conflicts with other parameters.

Wallet Integration

  • Wallet extensions (like Phantom, Backpack, etc.) detect Blink URLs on web pages.
  • They parse the URL, make the API calls to the action provider, and render a UI for the user.

Transaction Flow

When a user interacts with a Blink:

  1. The wallet fetches metadata from the action provider (GET request)
  2. It displays options to the user in a custom UI
  3. Upon user selection, it makes a POST request to get the transaction
  4. The wallet then handles signing and sending the transaction

Security Measures

  • There's a registry of approved action providers to prevent malicious actions.
  • Wallets perform additional checks, like domain verification, before interacting with actions.

Cross-Origin Considerations

Action providers must implement proper CORS headers to allow requests from different origins.

Mobile SDK

A mobile SDK has been developed to enable similar functionality in mobile apps, addressing the limitations of browser extensions on mobile.

Composability

The action specification allows for chaining multiple actions, enabling more complex interactions.

Developer Tools

  • SDKs like @solana/actions are available to simplify the process of creating action providers.
  • Tools like the Blinks Inspector help developers test and debug their implementations.

Extensibility

The system is designed to be extensible, allowing for future improvements like message signing for personalization.

Browser Extensions

The current browser extension approach is a starting point to prove the concept, but the goal is to evolve towards more seamless, native integrations across various platforms and devices.

Advantages

  1. Ubiquity: Almost everyone who uses crypto already has wallet browser extensions installed, like Phantom or Backpack. This provides a large existing user base.
  2. DOM manipulation: Browser extensions have the ability to read from and write to the DOM (Document Object Model) of web pages. This allows them to detect blink URLs and inject the interactive UI elements.
  3. Security: Wallet extensions provide a secure way to sign transactions without exposing private keys to websites.
  4. Ease of adoption: Users don't need to install any new software to use blinks, as they already have the necessary wallet extensions.

Limitations

The current browser extension approach has limitations, especially for mobile. Potential improvements to UX and security include:

  1. Mobile SDK: Dialect has launched a mobile SDK to enable native blinks experiences in mobile wallet apps.
  2. Native platform integration: The long-term goal is for platforms like Twitter to natively integrate blinks, rather than relying on extension injection.
  3. Improved discoverability: Making it easier for average users to discover and enable blinks functionality.
  4. Expanded capabilities: Adding features like message signing for personalization and action chaining for more complex interactions.
  5. Better security measures: Implementing features like assertion instructions and potentially using burner wallets for added protection.
  6. Cross-platform support: Expanding blinks beyond just Twitter to other websites and messaging platforms.

How to Get Started

  1. Visit the Solana documentation at solana.com/docs/actions for a getting started guide, specifications, and tutorials.
  2. Check out dialect.to for UI-related resources and documentation on the blinks client.
  3. Developers can use dial.to to quickly create shareable actions without building a full frontend.
  4. The dialect blinks GitHub repository provides client libraries for integrating blinks into applications.

Who to Follow

  • Dialect
    • Chris Osborne
  • Solana Foundation
    • Nick

Summary

  • The technology is still early, with ongoing work to improve discoverability and mobile support.
  • There's a focus on making the developer experience as smooth as possible to encourage adoption.
  • Dialect is hiring for those interested in working on this technology.