Use
import { WalletConnectSigner } from '@symfoni/walletconnect-v2-ethers-signer';
// Create a signer with a RPC endpoint
return new WalletConnectSigner().connect(new ethers.providers.JsonRpcProvider(RPC_URL));
// Listen for URI
walletConnectSigner.on(SIGNER_EVENTS.uri, (uri) => {
// Show URI so that a wallet can pair (not handled here yet)
});
await walletConnectSigner.open(); // This will trigger a session creation where an URI will be created or it will connect to old session.
const address = await walletConnectSigner.getAddress();
License
Licensed under the APLv2. See the LICENSE file for details.