Skip to main content
Generate deep links to the DNA app for quick actions like Swap and Send. DNA now supports a Quick Action to deeplink directly into the wallet interface, allowing users to perform specific actions like sending tokens or swapping assets with predefined parameters.

Parameters

string
required
Supports deep linking to the swap and send tabs.
string
The contract address of the token being sent (fromToken).
string
The contract address of the token being received (toToken). This is used in swap actions.
string
The recipient’s wallet address or username for sending tokens.
string
The amount of the fromToken to be sent, specified in its base unit .
string
The application ID of the source app initiating the deeplink.
A deeplink path from the source application, which will be URL-encoded.
Send Screen

Helper Function

Returns

A string representing the complete deeplink URL to the DNA application with the specified parameters.

Example Usage

Note

  • Ensure that the amount is specified in the unit of the fromToken (e.g., wei for Ethereum-based tokens).
  • The sourceDeeplinkPath is URL-encoded to ensure it is correctly interpreted when the deeplink is accessed.
  • The DNA_APP_ID should be defined in your environment to match the application ID assigned to your DNA instance.
  • If the tab is Send, it is necessary/recommended to provide fromToken, amount, and the recipient’s address or username (toToken is not required).
  • If the tab is Swap, it is necessary/recommended to provide fromToken, toToken, and amount (in base unit).
This function facilitates the creation of deeplink URLs that can be used to direct users seamlessly into specific actions within the DNA application, enhancing the user experience by pre-filling transaction details.