In-app interactions
Users never leave your application
Contextual data
Rich information to build informed UIs
Reduced complexity
Blinks handle protocol integrations
Faster user action
Complete transactions in seconds
Currently supports lending protocols (Jupiter Borrow), with more protocols and use cases coming soon.
Example: Liquidation Warning Flow
For this example, we’ll use Jupiter Borrow as the protocol and a scenario where a user’s lending position reaches a critical LTV threshold.Scenario
- User has a SOL/USDC lending position on Jupiter Borrow
- Position reaches 78% LTV (liquidation threshold is 80%)
- User receives a liquidation warning alert
Step 1: Send the Alert
Your backend sends an alert with the protocol website URL:Step 2: Client Receives Enriched Alert
Dialect detects the Jupiter Borrow URL and enriches the response:Step 3: Fetch Position Data
When the user clicks a button in the alert, fetch the position data from the Markets and Positions API:View complete API response with all fields
View complete API response with all fields
Step 4: Build the UI
With the response data, you can build rich UIs ranging from simple action buttons in your notification feed to full detail screens with position cards, input interfaces, and transaction controls. The response includes all the data you need: protocol information, token details, position health metrics, blink URLs for actions, and more. For more details on available data fields, and ideas on how to use the data, see using the data.Step 5: Execute Transaction
When the user submits:- Call the blink URL with user’s wallet address and amount
- Receive ready-to-sign transaction
- Prompt user to sign with their wallet
- Submit transaction to blockchain
- Show success state and updated position metrics
Key Concepts
Mapping Service
Dialect’s mapping service automatically detects supported protocol URLs in your alerts and enriches them with actionable context. Here’s the flow:1
URL Detection
Your app sends an alert with a protocol URL (e.g.,
https://jup.ag/lend/borrow/1/nfts/2433
). The mapping service recognizes the URL pattern from supported protocols.2
Context Enrichment
The service extracts position identifiers from the URL (vault ID, position ID, wallet address) and adds a
context
object to the notification action containing:type
: The kind of data available (e.g.,"position"
)apiUrl
: A pre-filled API endpoint to fetch detailed dataaction
: The suggested action for the user (e.g.,"deposit"
)
3
Client Receives Enhanced Alert
Your client receives the original alert plus the enriched context. The context object is only present when the URL is recognized. The original protocol URL remains available as a fallback.
Context Object
Thecontext
object provides everything your client needs to fetch additional data and build interactive experiences:
type
: Determines what kind of data theapiUrl
will return. Currently"position"
for lending/borrowing positions. Additional types will be added in the future.apiUrl
: Complete API endpoint with all required parameters already filled in. Call this URL to get detailed position, market, and blink data.action
: The recommended action for the user based on the alert context (e.g.,"deposit"
)
type
field is important because it tells your client how to interpret and display the data from the API response.