import WalletConnect from '@walletconnect/client';
import QRCodeModal from '@walletconnect/qrcode-modal';
import { Sdk, WalletConnectWalletProvider } from 'etherspot';
async function main() {
const walletConnect = new WalletConnect({
bridge: 'https://bridge.walletconnect.org',
qrcodeModal: QRCodeModal,
});
if (!walletConnect.connected) {
await walletConnect.createSession();
}
const walletProvider = WalletConnectWalletProvider.connect(walletConnect);
const sdk = new Sdk(walletProvider);
console.info('SDK created');
}
main().catch(console.error);