@etherspot/sdk-walletconnect-provider
v1.0.0-alpha.2
Published
ETHERspot sdk WalletConnect provider
Downloads
1
Readme
ETHERspot sdk WalletConnect provider
Installation
$ npm i @etherspot/sdk-walletconnect-provider -S
Usage
import WalletConnect from '@walletconnect/client';
import QRCodeModal from '@walletconnect/qrcode-modal';
import { WalletConnectProvider } from '@etherspot/sdk-walletconnect-provider';
import { Sdk } from 'etherspot';
async function main() {
// see: https://docs.walletconnect.org/quick-start/dapps/client#initiate-connection
const walletConnect = new WalletConnect({
bridge: 'https://bridge.walletconnect.org',
qrcodeModal: QRCodeModal,
});
if (!walletConnect.connected) {
await walletConnect.createSession();
}
const walletProvider = new WalletConnectProvider(walletConnect);
const sdk = new Sdk(walletProvider);
}
main().catch(console.error);
License
MIT