@layerzerolabs/ui-wallet-evm
TypeScript icon, indicating that this package has built-in type declarations

0.1.27 • Public • Published

LayerZero

@layerzerolabs/ui-wallet-evm

NPM Version Downloads Snyk Vulnerabilities for npm package version NPM License

Installation

yarn add @layerzerolabs/ui-wallet-evm

pnpm add @layerzerolabs/ui-wallet-evm

npm install @layerzerolabs/ui-wallet-evm

Usage

In this package you'll find abstract classes for generic EvmWallet's, generic InjectedWallet's, and implementations of a variety of those InjectedWallet's - MetaMask, CoinbaseWallet, etc. - and WalletConnect. These implementations are ready to use as is in your LayerZero dApp, simply import the wallets you'd like to support and assign them to your walletStore.

import {CoinbaseWallet, MetaMaskWallet, WalletConnect} from '@layerzerolabs/ui-wallet-evm';

const wallets = {
  metamaskWallet: new MetaMaskWallet(),
  coinbaseWallet: new coinbaseWallet(),
  walletConnect: new WalletConnect({
    projectId: '10b5df65476df304efbb9a6b0c42f8b0',
    chains: chains,
    showQrModal: true,
  }),
};

walletStore.addWallets(wallets);

To add your own EvmWallet, extend the abstract class and include a provider, implementation for autoConnect, and the type.

Readme

Keywords

none

Package Sidebar

Install

npm i @layerzerolabs/ui-wallet-evm

Weekly Downloads

38

Version

0.1.27

License

BUSL-1.1

Unpacked Size

131 kB

Total Files

7

Last publish

Collaborators

  • layerzero-bot