npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eip7702-sweeper

v1.0.2

Published

Automated sweeper bot for EIP-7702 delegated accounts

Downloads

187

Readme

EIP-7702 Sweeper

Automated sweeper bot for EIP-7702 delegated accounts.

eip7702-sweeper is a lightweight Node.js library that helps automate fund sweeping from delegated EIP-7702 accounts using a sponsor wallet. It simplifies the process of authorizing and forwarding transactions via delegate contracts across multiple EVM networks.


Features

  • 🔁 Automatic delegation and sweeping of EIP-7702 wallets
  • ⛽ Gas estimation with configurable buffer
  • 🌐 Multi-chain support
  • 🛡️ Validation of input parameters
  • 🔍 Optional delegate monitoring mode
  • 🚀 Easy integration in JavaScript/TypeScript projects

Installation

Install the package using npm:

npm install eip7702-sweeper

Usage

Basic Example

import bot from "eip7702-sweeper";

bot({
  targetWallet: "0xTARGET_PRIVATE_KEY",
  sponsorWallet: "0xSPONSOR_PRIVATE_KEY",
  fundSweepRecipient: "0xRECIPIENT_ADDRESS",
  rpcUrl: "https://your-rpc-url",
});

Configuration Options

Required Parameters

| Parameter | Type | Description | |--------------------|--------|-------------| | targetWallet | string | Private key of the wallet to be delegated | | sponsorWallet | string | Private key of the wallet paying for gas | | fundSweepRecipient | string | Address where swept funds will be forwarded | | rpcUrl | string | RPC endpoint URL |


Optional Settings

You can pass an optional setting object:

await bot({
  targetWallet,
  sponsorWallet,
  fundSweepRecipient,
  rpcUrl,
  setting: {
    delegateMode: true,
    delegateModeInterval: 10,
    gasBuffer: 1.2,
  },
});

| Option | Type | Default | Description | |------|------|---------|-------------| | delegateMode | boolean | false | Keep monitoring delegation status | | delegateModeInterval | number | 0 | Interval between checks (seconds) | | gasBuffer | number | 1.2 | Multiplier added to estimated gas |


Supported Networks

The package supports multiple EVM-compatible networks including:

  • Ethereum Mainnet
  • Ethereum Sepolia
  • Binance Smart Chain
  • Base
  • Arbitrum
  • polygon
  • Optimism
  • Avalanche
  • Gnosis
  • Scroll
  • Zora
  • Celo
  • Sonic
  • Berachain
  • Unichain
  • Ronin

Networks are automatically detected from the provided RPC URL.


How It Works

  1. Validates input parameters
  2. Connects to provided RPC
  3. Creates wallet clients for target and sponsor
  4. Signs EIP-7702 authorization
  5. Encodes delegate contract call
  6. Estimates gas and submits transaction
  7. Optionally monitors delegation status

Dependencies

  • ethers – Ethereum utilities
  • viemic – EIP-7702 interaction library

Error Handling

All errors are caught and returned as messages:

const result = await bot(params);

if (typeof result === "string") {
  console.error("Error:", result);
}

License

ISC


Author

0x


Contributing

Contributions and improvements are welcome. Feel free to open issues or submit pull requests.


Disclaimer

Use this tool responsibly. Ensure you understand the security implications of using private keys and delegated accounts.


Happy Sweeping! 🚀