Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 2.48 KB

README.md

File metadata and controls

53 lines (45 loc) · 2.48 KB

Sponsor TypeScript version Node.js version APLv2 Build Status - Travis Build Status - GitHub Actions

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.