Holdstation Wallet is a simple, secure token wallet that allows you to buy, sell, swap, or send tokens.
address
string
required
The token address the user wants to buy.
from
string
required
The token address the user will use to pay (payment token).
amount
string
required
The dollar amount the user wants to buy.
app_id
string
required
The unique ID for the Holdstation mini app.
path
string
required
URL-encoded path to the buy token screen with parameters.
Buy WLD Screen

Helper function

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",
  })
);
https://worldcoin.org/mini-app?app_id=app_0d4b759921490adc1f2bd569fda9b53a&path=%2Ftoken%2Fbuy%3Faddress%3D0x2cFc85d8E48F8EAB294be644d9E25C3030863003%26from%3D0x79A02482A880bCE3F13e09Da970dC34db4CD24d1%26amount%3D1