New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kev1n-peters/wallet-aggregator-evm

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kev1n-peters/wallet-aggregator-evm

Implements the base abstractions for EVM-compatible blockchains, using [wagmi](https://github.com/wagmi-dev/wagmi) under the hood to handle connection implementations.

  • 0.0.1-beta.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Wallet Aggregator - EVM

Implements the base abstractions for EVM-compatible blockchains, using wagmi under the hood to handle connection implementations.

Wallets implemented so far:

WalletLink
Injected wallets (e.g: Brave)
Metamaskhttps://metamask.io
WalletConnecthttps://walletconnect.com
Bitget Wallethttps://web3.bitget.com
Coinbase Wallethttps://www.coinbase.com/wallet
Ledger Connecthttps://www.ledger.com

Usage

The base EVMWallet configuration allows for the following parameters:

  • chains: an array of chain information objects. While the information is the same as in the {@link https://eips.ethereum.org/EIPS/eip-3085 EIP-3085}, the structure is slightly different. Defaults to all chains.
  • preferredChain: an EVM chain id (e.g. 5 for Görli, 43113 for Avalanche Fuji Testnet, etc.). When connecting, the wallet will try to switch to this chain if the provider's network's chain id differs.
  • autoSwitch: indicates whether the wallet should attempt to switch the network back to the preferredChain upon detecting a chainChanged event (if set).
  • confirmations: Amount of confirmations/blocks to wait a transaction for

Additionally, each specific wallet has its own specific options.

import {
  MetamaskWallet,
  WalletConnectWallet,
  BitgetWallet,
  CoinbaseWallet,
  LedgerWallet,
  InjectedWallet,
} from "@xlabs-libs/wallet-aggregator-evm";

const injected = new InjectedWallet();
const metamask = new MetamaskWallet({
  preferredChain: 5,
  autoSwitch: true,
});
const walletConnect = new WalletConnectWallet({
  preferredChain: 43113,
});
const bitgetWallet = new BitgetWallet({
  options: {
    appName: "My App",
  },
});
const coinbase = new CoinbaseWallet({
  options: {
    reloadOnDisconnect: false,
    appName: "My App",
  },
});
const ledger = new LedgerWallet();

FAQs

Package last updated on 26 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc