WalletConnect auto-connector
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.
2/ Add our auto connector to your website
Take the following steps:
- Install our package using the
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();
Updated about 1 year ago