Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@sqds/iframe-adapter
Advanced tools
Wallet adapter for interacting with Squads via iframe message passing
The Squads iframe-adapter
package is an easy way to get your app functioning within the Squads Apps ecosystem on Solana. It creates a bridge between your app and Squads
so that any transaction from within your app is created as a Squads Multisig transaction on behalf of a multisig vault or authority.
The iframe-adapter
operates very similar to a normal wallet, but will need the following in order to properly bridge your app to Squads
@sqds/iframe-adapter
npm package.Content-Security-Policy: frame-ancestors https://iframe-preview.squads.so
Add the package to your project:
npm install @sqds/iframe-adapter
or
yarn add @sqds/iframe-adapter
Add the proper CSP header:
Content-Security-Policy: frame-ancestors https://iframe-preview.squads.so;
Add the following code where your wallet adapter context is initialized:
import {detectEmbeddedInSquadsIframe, SquadsEmbeddedWalletAdapter} from @sqds/iframe-adapter
...
// then add the following conditional (or similar) where your supported wallets are loaded
let wallets = detectEmbeddedInSquadsIframe() ? [new SquadsEmbeddedWalletAdapter("https://iframe-preview.squads.so")] : [ new PhantomWalletAdapter(), new ExodusWalletAdapter()];
// the rest of your code
return (
<WalletProvider wallets={wallets} autoConnect>
// etc
Head over to https://iframe-preview.squads.so/apps/test/{yourSquadId}
replacing the {yourSquadId}
with the address of your Squad (NOT your vault). You can similarly go to your
Squad multisig and simply change the URL to match the pattern mentioned here.
You'll be asked to enter the URL of your app and a title, after which you can test to see that your app is properly configured to use Squads.
After you've validated that your App is ready to be integrated with Squads, send us a message on Telegram or Discord for final testing and implementation.
During this process the url https://iframe-preview.squads.so
will be change for the classic https://v3.squads.so
FAQs
Wallet adapter for interacting with Squads via iframe message passing
We found that @sqds/iframe-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.