import WalletConnect from '@walletconnect/client';
import QRCodeModal from '@walletconnect/qrcode-modal';
import { Sdk, Env, EnvNames, WalletConnectWalletProvider } from 'etherspot';
Env.defaultName = 'testnets' as EnvNames;
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);