This is a simple demo let's you create Solana Actions and will parse Solana action URLs to their respective actions.
The demo uses Next.js 14 project bootstrapped with create-next-app.
Solana Actions provide a standardized way to deliver signable transactions or messages from an application directly to a user. Blinks are client apps that convert Solana Actions into shareable, metadata-rich UIs for interacting with and executing Actions. For more information, check out our Guide on Solana Actions.
Open the project dictory:
cd sample-dapps/solana-action-blinkerThen, install the dependencies:
npm install
# or
yarn
# or
pnpm install
# or
bun installMake sure you have a Quicknode endpoint handy--you can get one free here.
- Rename
.env.exampleto.env.localand update with your Quicknode Solana Node Endpoint. - Make sure to update the cluster to ensure your transaction URLs point to the correct explorer (use only of the enum values provided in the
.env.examplefile).
QN_ENDPOINT=https://example.solana-mainnet.quiknode.pro/123456
NEXT_PUBLIC_CLUSTER=mainnet-beta # mainnet-beta | devnet | testnet | localFirst, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
- Enter a valid Solana Action URL in the input field. You may copy and paste one of the example links on the homepage.
- Click "Parse Action" to see the parsed action details.
- You will see the parsed details of the action URL. To see and execute available actions, connect a wallet.
- Click any of the available actions to execute the action (you will need to sign the transaction when prompted by your wallet).
- You may create additional actions by following the structure in
solana-action-blinker/app/api/actions
src/
├── app/
│ ├── page.tsx # Main page for Blink
│ └── layout.tsx # layout for the page
│ └── api/
│ └── solana/
│ └── sendAndConfirm/route.ts # Send and Confirm Transaction
│ └── actions/
│ └── memo/route.ts # Creates a Memo Solana Action
│ └── donate/route.ts # Creates a Donate Solana Action
└── components/
│ ├── ActionComponents/ # includes components for parsing and executing Solana Actions
│ ├── Blink.tsx # Main component
│ ├── SolanaProviders.tsx # Wallet Adapter Context providers
│ └── [supporting components]
└── hooks/
│ ├── useActionFetch.ts # Fetches and parses Solana Actions from URLs
│ └── useTransactionProcessor.ts # Executes Solana Transactions
└── utils/ # includes various utility functions and constants
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

