0.0.4 • Published 8 months ago
phantom-iframe-connector v0.0.4
Phantom Iframe Connector
Description
This repository offers a streamlined solution for DApps operating within an iframe to establish a connection with the Phantom Wallet browser extension.
Usage
Installing
Install package as a dependency of your project: yarn add phantom-iframe-connector
or npm install phantom-iframe-connector
Usage
Example using React.js:
import { enablePhantomWalletExtension } from "phantom-iframe-connector";
const Component = () => {
useEffect(() => {
// Run this once client side is ready
enablePhantomWalletExtension({ iframeOrigin: 'https://solana.frenslink.dev' });
}, []);
return (
// The D-APP that runs inside iframe
<iframe src="https://solana.frenslink.dev/multilinks?tokenAddress=Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr" />
);
};