const HOLDSTATION_APP_ID = "app_0d4b759921490adc1f2bd569fda9b53a";
function getHoldstationDeeplinkUrl({
address,
from,
amount,
}: {
address: string;
from: string;
amount: string;
}) {
const path = `/token/buy?address=${address}&from=${from}&amount=${amount}`;
const encodedPath = encodeURIComponent(path);
return `https://worldcoin.org/mini-app?app_id=${HOLDSTATION_APP_ID}&path=${encodedPath}`;
}
// Buy $1 worth of WLD using USDC
console.log(
getHoldstationDeeplinkUrl({
address: "0x2cFc85d8E48F8EAB294be644d9E25C3030863003", // WLD token address
from: "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1", // USDC token address
amount: "1",
})
);