Blinks
Turn Solana Actions into shareable, embeddable links across the social web.
Recipe
https://your-blink-proxy.example/?action=https://actions.example.com/vote
When to reach for this:
- Distribution on X, Discord, and Blink-compatible surfaces.
- Growth loops where users share actionable links.
- Campaigns needing preview cards with icons.
Working Example
<!-- Partner sites embed via Blink provider URL + your action endpoint -->
<a href="https://dial.to/?action=https://actions.example.com/swap">
Swap on MyProtocol
</a>// Your action endpoint still implements GET metadata + POST transaction
// See actions-the-specWhat this demonstrates:
- Action URL must implement spec GET/POST.
- Blink provider unfurls GET metadata into interactive UI.
- HTTPS and CORS requirements still apply.
Deep Dive
How It Works
- Blink client fetches action metadata for rich card.
- User connects wallet in context of social app or portal.
- Transaction POST flow identical to Actions.
- Registry of blink providers evolves - test target platforms.
Gotchas
- Unverified action URLs - users sign malicious txs. Fix: domain allowlists in clients; educate users.
- Stale unfurl cache - wrong title after deploy. Fix: version query param on icon URL.
- Broken icon HTTPS - card fails render. Fix: CDN with valid TLS cert.
- Mainnet action on devnet wallet - failures. Fix: cluster in metadata when supported.
- Overprivileged transactions - drain risk. Fix: least-privilege instructions per action.
Alternatives
| Alternative | Use When | Don't Use When |
|---|---|---|
| QR Solana Pay | In-person | Social viral loops |
| Native dApp link | Full product | Lightweight CTA |
FAQs
App Router?
Providers in client layout.tsx; pages mix server + client components.
Secrets?
Server env only for keypairs; NEXT_PUBLIC_ for RPC URLs.
kit 7.0.0?
All examples use @solana/kit, not web3.js v1.
Wallet?
Signing only in client components.
Caching?
Revalidate on-chain reads carefully - chain is source of truth.
Actions?
HTTPS endpoints returning Solana Actions JSON.
Mobile?
Separate React Native app with MWA.
Testing?
Surfpool for integration; mock RPC in unit tests.
Mainnet?
Separate env files and program IDs.
Errors?
Decode simulation logs for user-facing messages.
Related
- Actions (the spec) - endpoint shape
- Security & Verification - trust
- Solana Pay Basics - payments
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.