External Wallet Support
Route purchased tokens directly to any Ethereum address by setting the externalWalletAddress parameter.
Overview
Usage example
// In your JavaScript when configuring the widget:
const integratorId = "xxx"; // Your actual integrator ID
const externalWalletAddress = "0xabc...123"; // External wallet address to receive purchased tokens
const IFRAME_BASE_URI = "https://app.swapper.finance";
const iframe = document.getElementById("swapperFinanceWidget");
// Build query string
const queryParams = new URLSearchParams({
integratorId,
externalWalletAddress
}).toString();
// Assign to iframe
if (iframe) {
const iframeSrc = `${IFRAME_BASE_URI}?${queryParams}`;
iframe.src = iframeSrc
console.log("Swapper Finance Widget: URL configured with query parameters.");
console.log("Full URL:", iframeSrc);
} else {
console.error("Iframe element not found: please ensure its id is 'swapperFinanceWidget'.");
}
Last updated