UNPKG

@thirdweb-dev/wallets

Version:

<p align="center"> <br /> <a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> <br /> </p> <h1 align="center">thirdweb Wallet SDK</h1> <p align="center"> <a href="ht

37 lines (29 loc) 810 B
import { defaultChains } from '@thirdweb-dev/chains'; import EventEmitter from 'eventemitter3'; class WagmiConnector extends EventEmitter { /** Unique connector id */ /** Connector name */ /** Chains connector supports */ /** Options to use with connector */ /** Whether connector is usable */ constructor(_ref) { let { chains = defaultChains, options } = _ref; super(); this.chains = chains; this.options = options; } getBlockExplorerUrls(chain) { const explorers = chain.explorers?.map(x => x.url) ?? []; return explorers.length > 0 ? explorers : undefined; } isChainUnsupported(chainId) { return !this.chains.some(x => x.chainId === chainId); } updateChains(chains) { this.chains = chains; } } export { WagmiConnector as W };