๐ How to Integrate My dApp with PolkaGate snap
For Developers Only
To connect with the injected Snap, start by adding the @polkagate/extension-dapp
package to your dApp. Use web3Enable('your-app-name')
to fetch the injected extensions, including PolkaGate Snap. If you only want to enable the Snap and not other extensions, call web3Enable('snapOnly')
. After that, you can access your Snap account(s) using web3Accounts()
. Below is a simple code example illustrating these processes:
This integration allows your dApp to interact seamlessly with the PolkaGate snap through the injected information within the window. These are familiar calls if you've worked with other existing Polkadot ecosystem extensions. The rest remains the same.
Last updated