@phantom/wallet-sdk
v0.0.10
Published
### Integrating the Embedded Wallet: Getting Started
Downloads
165
Keywords
Readme
@phantom/wallet-sdk
Integrating the Embedded Wallet: Getting Started
- Install the Phantom SDK (https://github.com/phantom/wallet-sdk)
yarn | npm | pnpm add @phantom/wallet-sdk
- Load the embedded wallet and the launcher
import { createPhantom } from "@phantom/wallet-sdk"
const opts: CreatePhantomConfig = {
zIndex: 10_000,
hideLauncherBeforeOnboarded: true,
}
const App = () => {
useEffect(() => {
createPhantom(opts);
}, []);
...
}
Options
- hideLauncherBeforeOnboarded: Set to true to avoid showing the launcher button until a user has onboarded to the Phantom Wallet.
- zIndex: Pass a custom zIndex to the Phantom Wallet iframe
- colorScheme: If the Phantom Wallet iframe has an opaque background on your site. You should set this color scheme to match the color scheme of your site.