@thirdweb-dev/wallets
Version:
<p align="center"> <br /> <a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> <br /> </p> <h1 align="center">thirdweb Wallet SDK</h1> <p align="center"> <a h
41 lines (38 loc) • 1.3 kB
JavaScript
import { _ as _defineProperty } from '../../../../dist/defineProperty-350fc508.browser.esm.js';
import { W as WagmiAdapter } from '../../../../dist/connector-05689d68.browser.esm.js';
import { a as AbstractClientWallet } from '../../../../dist/base-a72d5b10.browser.esm.js';
import 'eventemitter3';
import '@thirdweb-dev/chains';
import '../../abstract/dist/thirdweb-dev-wallets-evm-wallets-abstract.browser.esm.js';
import 'ethers';
import '@thirdweb-dev/sdk';
import '../../../../dist/headers-733a8199.browser.esm.js';
/**
* @internal
*/
class InjectedWallet extends AbstractClientWallet {
get walletName() {
return "Injected Wallet";
}
constructor(options) {
super(InjectedWallet.id, options);
}
async getConnector() {
if (!this.connector) {
// import the connector dynamically
const {
InjectedConnector
} = await import('../../../connectors/injected/dist/thirdweb-dev-wallets-evm-connectors-injected.browser.esm.js');
this.connector = new WagmiAdapter(new InjectedConnector({
chains: this.chains,
connectorStorage: this.walletStorage,
options: {
shimDisconnect: true
}
}));
}
return this.connector;
}
}
_defineProperty(InjectedWallet, "id", "injected");
export { InjectedWallet };