The “Drop-In” Philosophy

Refract is built on a simple but powerful idea: you shouldn’t have to rewrite your dApp to unlock mobile distribution. Our Drop-in SDK is a multi-chain wallet bridge that automatically and intelligently routes dApp requests to the right place, whether it’s our secure, embedded Refract Passport or a user’s standard browser wallet.

This means you can use the libraries you already know and love—wagmi, ethers.js, Sui’s dApp Kit—and Refract handles the rest. We provide a polyfill for standard wallet interfaces (window.ethereum, window.solana, etc.), allowing your dApp to achieve maximum reach with minimum code changes.

How It Works: Replacing the Provider, Not Your Stack

The Refract SDK works by replacing only the lowest level of the wallet connection stack: the provider. Your dApp’s UI, business logic, and favorite chain libraries remain completely untouched.

Our SDK intelligently detects the runtime environment:

  1. Embedded in a Mobile Platform? When your dApp runs inside a host like TikTok or Telegram, the SDK acts as a bridge, forwarding all wallet requests securely to the parent Refract Passport application using postMessage.
  2. Opened in a Standard Browser? When opened directly, the SDK gracefully falls back, delegating all calls to the user’s installed browser extension wallet, like MetaMask or Phantom.

The result is a seamless experience for both you and your users. You write your code once, and it just works, everywhere. This zero-friction, “drop-in” approach is the foundation of the Refract Network SDK.