Documentation Index
Fetch the complete documentation index at: https://tfh-murph-idkit-intro.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Use this Quick Action to deep link into the Swap interface with prefilled parameters.
Parameters
Target app id for the Swap quick action:
app_6c5c5717c77abe83be8814c032c3a6f9.
Path inside the target app. Use ’/’ for Swap.
Token address for the “from” token.
Token address for the “to” token.
Amount of the from token in base token units.
app_id of the app that uses this quick action.
Name of the app that uses this quick action.
Helper function
export interface ActionLinkProps {
targetAppId: string; // app_6c5c5717c77abe83be8814c032c3a6f9 for Swap quick action
path: string; // '/' for Swap quick action
params: Record<string, string>;
}
const MAIN_ACTION_URL = "https://worldcoin.org/mini-app";
export function getActionLink({ targetAppId, path, params }: ActionLinkProps) {
let fullPath = path;
if (Object.keys(params).length > 0) {
const paramParts = Object.entries(params).map(([key, value]) => {
return `${key}=${value}`;
});
fullPath += `?${paramParts.join("&")}`;
}
const queryString = `${MAIN_ACTION_URL}?app_id=${targetAppId}&path=${encodeURIComponent(fullPath)}`;
return queryString;
}
// Example usage
const link = getActionLink({
targetAppId: "app_6c5c5717c77abe83be8814c032c3a6f9",
path: "/",
params: {
fromToken: "0x2cFc85d8E48F8EAB294be644d9E25C3030863003",
toToken: "0x4200000000000000000000000000000000000006",
amount: "1234500",
sourceAppId: "app_source1234567890abcdef",
sourceAppName: "My%20App",
},
});
console.log(link);
Example link
https://worldcoin.org/mini-app?app_id=app_6c5c5717c77abe83be8814c032c3a6f9&path=%2F%3FfromToken%3D0x2cFc85d8E48F8EAB294be644d9E25C3030863003