1.0.2 • Published 8 months ago
blockmate-wallet-connect-autoconnect v1.0.2
WalletConnect
If you use WalletConnect, it is possible to have your users connected to Blockmate automatically, directly from your website. This is done by integrating our autoconnector package to your website.
1/ Get your public API key
Sign in to the Developer portal and go to your project settings, where you can directly generate a public API key.
Public API keys allow you to connect users of your application to your Blockmate project automatically.
2/ Add our autoconnector to your website
Take the following steps:
- Install our package using
npm install blockmate-wallet-connect-autoconnect
- Initialize the automatic connector using this snippet:
import WalletConnectAutoconnector from 'blockmate-wallet-connect-autoconnect';
const autoconnector = new WalletConnectAutoconnector({
publicApiKey: '<YOUR-BLOCKMATE-PUBLIC-API-KEY>',
blockmateApiUrl: 'https://api.blockmate.io',
walletConnectProjectId: '<YOUR-WALLETCONNECT-PROJECT-ID>',
});
- Add this line wherever you want to gather all of the user's connected addresses and connect them to Blockmate.
await autoconnector.performConnect();