# External Wallet Support

### Overview

The **External Wallet Support** feature lets integrators specify a public Ethereum address (EOA) to which all purchased tokens will be automatically delivered.

* **Standard Mode**
  * User signs in via Privy.
  * Purchased tokens are sent to their Smart Wallet, which they can view via the Account tab and from which they can later transfer tokens to any other wallet.
* **External Wallet Mode**
  * User still signs in via **Privy**, but no **Smart Wallet** UI and no **Sell** tab are shown (selling from an external address isn’t supported).
  * After purchase, tokens are sent  to the `externalWalletAddress` you provided.

### Usage example

```javascript
// 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'.");
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swapper.finance/swapper-widget/external-wallet-support.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
