Ready-to-Sign Transactions
APIs that return transaction data ready for user signing
Rich UI Metadata
Optimized metadata for building beautiful user experiences
Clear Error Handling
User-friendly error messages for better debugging
What You’ll Learn
By the end of this guide, you’ll understand how to:- Fetch blink metadata (titles, descriptions, parameters)
- Build POST requests with user wallet addresses and parameters
- Handle transaction responses
- Sign and send transactions to Solana
Understanding Blinks
Blinks (blockchain links) are URLs that return ready-to-sign transactions following the Solana Actions specification. They eliminate the need to integrate protocol-specific SDKs. For more information about blinks, please see the Blinks section. You’ll encounter blink URLs in several places:- Markets API responses: In the
actionsobject (e.g.,actions.deposit.blinkUrl) - Direct protocol URLs: Like
https://jupiter.dial.to/api/v0/swap/USDC-SOL - Standard Blinks Library: A set of curated blinks from top Solana ecosystem projects
1
GET Request
Fetch metadata (title, description, parameters)
2
POST Request
Submit wallet address + parameters → Get transaction
3
Sign Transaction
Sign transaction with wallet → Send to blockchain
Step 1: Understand Blink Metadata (GET Request)
Blink metadata provides the title, description, icon, and parameters needed to interact with a blink. This information helps you understand the link structure and can be used to build custom UIs (if you don’t want to use our UI components).Fetching Metadata Programmatically
If you need to fetch metadata dynamically (e.g., for automation or custom integrations), use the following approach:The
X-Blink-Client-Key can be requested in our dashboard. See Request API Keys for details.Response Structure
The GET response contains all the information needed to render and interact with the blink:Understanding Actions
Thelinks.actions array contains available operations:
-
Button actions: Pre-defined values (25%, 50%, 100%)
- Use the
hrefdirectly in POST request - No additional parameters needed
- Use the
-
Parameter actions: User-provided values (custom amounts)
- Check
parametersarray for input requirements - Replace
{amount}inhrefwith user input (e.g.,?amount=100for 100 USDC)
- Check
Step 2: Build the POST Request
Once you know which action to execute, submit a POST request with the user’s wallet address and the required parameters to return a transaction.Percentage Actions
Our example response supports total amounts as well as percentages. For the latter, you can use thepercentage query parameter. The blink endpoint will automatically fetch the wallet balance and calculate the amount based on the percentage:
Custom Input Actions
The example response also supports custom input actions, in this case the user can enter the amount of USDC they want to deposit by using theamount query parameter:
POST Response
The response contains a base64-encoded transaction ready for signing:Step 3: Sign and Send the Transaction
After receiving the transaction from the POST request, simply sign and send it with your wallet.Complete Code Example
Here’s a complete example that combines Steps 2 and 3:TypeScript
Advanced Topics
Multiple Transactions
Some complex operations require multiple sequential transactions. The response will havetype: "transactions" (plural) with an array:
Multiple transactions are experimental and not part of the official Solana Actions spec. See Handling Multiple Transactions for details.
Action Chaining
Some blinks support multi-step workflows where one action leads to another. This is useful for complex operations like opening a leveraged position. The response will include anext field with the URL for the next step.
Learn more in the Headless Integration guide.