npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@tetherto/wdk-wallet-evm-erc-4337

1.0.0-beta.9

@GitHub Actions

npmHomeRepoSnykSocket
Downloads:48707
$ npm install @tetherto/wdk-wallet-evm-erc-4337
DailyWeeklyMonthlyYearly

@tetherto/wdk-wallet-evm-erc-4337

npm version npm downloads license docs

Note: This package is currently in beta. Please test thoroughly in development environments before using in production.

A simple and secure package to manage ERC-4337 compliant wallets for EVM-compatible blockchains. This package provides a clean API for creating, managing, and interacting with account abstraction wallets using BIP-39 seed phrases and EVM-specific derivation paths.

About WDK

This module is part of the WDK (Wallet Development Kit) project, which empowers developers to build secure, non-custodial wallets with unified blockchain access, stateless architecture, and complete user control.

For detailed documentation about the complete WDK ecosystem, visit docs.wdk.tether.io.

Installation

npm install @tetherto/wdk-wallet-evm-erc-4337

Quick Start

import WalletManagerEvmErc4337 from '@tetherto/wdk-wallet-evm-erc-4337'

const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'

const wallet = new WalletManagerEvmErc4337(seedPhrase, {
  chainId: 11155111, // Sepolia
  provider: 'https://sepolia.drpc.org',
  bundlerUrl: 'https://api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_KEY',
  safeModulesVersion: '0.3.0',
  useNativeCoins: true,
})

const account = await wallet.getAccount(0)
const address = await account.getAddress()
console.log('Smart account address:', address)

wallet.dispose()

Key Capabilities

  • ERC-4337 Account Abstraction: Full implementation of the ERC-4337 standard
  • Multiple Gas Payment Modes: Pay fees with native coins, ERC-20 tokens via paymaster, or sponsored transactions
  • UserOperation Management: Create and send UserOperations through bundlers
  • BIP-44 Derivation Paths: Standard Ethereum derivation (m/44'/60')
  • Multi-Account Management: Derive multiple smart accounts from a single seed phrase
  • ERC-20 Token Support: Query balances and transfer tokens via UserOperations
  • Message Signing: Sign and verify messages with the underlying EOA key
  • Per-Call Config Overrides: Switch gas payment modes on a per-transaction basis
  • Secure Memory Disposal: Clear private keys from memory when done

Compatibility

  • Ethereum Mainnet and testnets (Sepolia)
  • Layer 2 Networks: Arbitrum, Optimism, Base
  • Other EVM Chains: Polygon, Avalanche C-Chain, and any EVM-compatible chain with ERC-4337 support

Documentation

TopicDescriptionLink
OverviewModule overview and feature summaryWallet EVM ERC-4337 Overview
UsageEnd-to-end integration walkthroughWallet EVM ERC-4337 Usage
ConfigurationProvider, bundler, paymaster, and network setupWallet EVM ERC-4337 Configuration
API ReferenceComplete class and type referenceWallet EVM ERC-4337 API Reference

Examples

ExampleDescription
Create WalletInitialize ERC-4337 wallets with paymaster token and native coins modes
Manage AccountsWork with multiple smart accounts and custom derivation paths
Check BalancesQuery native token and ERC-20 balances for smart accounts
Read-Only AccountMonitor smart account balances and estimate fees without a private key
Send TransactionSend transactions via UserOperations through the bundler
Token TransferTransfer ERC-20 tokens via UserOperations with gas mode overrides
Sign & Verify MessageSign messages and verify signatures with ERC-4337 accounts
Fee ManagementRetrieve current bundler fee rates
Memory ManagementSecurely dispose smart wallets and clear private keys from memory

For detailed walkthroughs, see the Usage Guide. See all runnable examples in the wdk-examples repository.

Community

Join the WDK Discord to connect with other developers.

Support

For support, please open an issue on GitHub or reach out via email.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.