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

Helper Function
Returns
A string representing the complete deeplink URL to the DNA application with the specified parameters.Example Usage
Generated Deeplink URL:
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).