UNPKG

@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

50 lines (46 loc) 1.82 kB
import { _ as _defineProperty } from '../../../../dist/defineProperty-350fc508.browser.esm.js'; import { SmartWallet } from '../../smart-wallet/dist/thirdweb-dev-wallets-evm-wallets-smart-wallet.browser.esm.js'; import { w as walletIds } from '../../../../dist/walletIds-dff6dced.browser.esm.js'; import { E as ERC6551_REGISTRY } from '../../../../dist/utils-f58e7acc.browser.esm.js'; import '../../../../dist/base-a72d5b10.browser.esm.js'; import '@thirdweb-dev/chains'; import '../../abstract/dist/thirdweb-dev-wallets-evm-wallets-abstract.browser.esm.js'; import 'ethers'; import 'eventemitter3'; import '@thirdweb-dev/sdk'; import '../../../../dist/headers-733a8199.browser.esm.js'; import '../../../../dist/url-a45219bd.browser.esm.js'; import '@account-abstraction/contracts'; /** * A smart wallet controlled by the holder of a particular NFT. */ /** * @wallet */ class TokenBoundSmartWallet extends SmartWallet { get walletName() { return "Token Bound Smart Wallet"; } constructor(options) { super({ ...options, factoryAddress: options.registryAddress || ERC6551_REGISTRY }); this.tbaOptions = options; } async getConnector() { if (!this.tbaConnector) { const { TokenBoundSmartWalletConnector } = await import('../../../connectors/token-bound-smart-wallet/dist/thirdweb-dev-wallets-evm-connectors-token-bound-smart-wallet.browser.esm.js'); this.tbaConnector = new TokenBoundSmartWalletConnector(this.tbaOptions); } return this.tbaConnector; } } _defineProperty(TokenBoundSmartWallet, "meta", { name: "Token Bound Smart Wallet", iconURL: "ipfs://QmeAJVqn17aDNQhjEU3kcWVZCFBrfta8LzaDGkS8Egdiyk/smart-wallet.svg" }); _defineProperty(TokenBoundSmartWallet, "id", walletIds.tokenBoundSmartWallet); export { TokenBoundSmartWallet };