wallet-connect-web-examples/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts
2023-01-05 18:22:17 +01:00

18 lines
552 B
TypeScript

import SignClient from '@walletconnect/sign-client'
export let signClient: SignClient
export async function createSignClient(relayerRegionURL: string) {
signClient = await SignClient.init({
logger: 'debug',
projectId: process.env.NEXT_PUBLIC_PROJECT_ID,
relayUrl: relayerRegionURL ?? process.env.NEXT_PUBLIC_RELAY_URL,
metadata: {
name: 'React Wallet',
description: 'React Wallet for WalletConnect',
url: 'https://walletconnect.com/',
icons: ['https://avatars.githubusercontent.com/u/37784886']
}
})
}