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 🙏

© 2024 – Pkg Stats / Ryan Hefner

abstractionkit

v0.2.0

Published

Account Abstraction 4337 SDK by Candidelabs

Downloads

48,193

Readme

A Typescript Library to easily build and send ERC-4337 UserOperations, with first class support for Safe Accounts.

AbstractionKit is agnostic of:

  • Ethereum interface libraries: ethers, web3.js, viem/wagmi
  • Bundlers: Plug and play from any bundler provider
  • Paymasters: Candide Paymaster is supported , but you can use any 3rd party paymaster to sponsor gas
  • Accounts: The Safe Account first class supported, but you can use use Bundlers and Paymasters with any account

Docs

For full detailed documentation visit our docs page.

Installation

npm install abstractionkit

Quickstart

Safe Account

AbstractionKit features the Safe Account. It uses the original Safe Singleton and adds ERC-4337 functionality using a fallback handler module. The contracts have been developed by the Safe Team. It has been audited by Ackee Blockchain. To learn more about the contracts and audits, visit safe-global/safe-modules.

import { SafeAccountV0_3_0 as SafeAccount } from "abstractionkit";

const ownerPublicAddress = "0xBdbc5FBC9cA8C3F514D073eC3de840Ac84FC6D31";
const smartAccount = SafeAccount.initializeNewAccount([ownerPublicAddress]);

Then you can consume accout methods:

const safeAddress = smartAccount.accountAddress;

Bundler

Initialize a Bundler with your desired bundler RPC url. Find more public bundler endpoints on our docs

import { Bundler } from "abstractionkit";

const bundlerRPC = "https://sepolia.voltaire.candidewallet.com/rpc";

const bundler: Bundler = new Bundler(bundlerRPC);

Then you can consume Bundler methods:

const entrypointAddresses = await bundler.supportedEntryPoints();

Paymaster

Initialize a Candide Paymaster with your RPC url. Get one from the dashboard.

import { CandidePaymaster } from "abstractionkit";

const paymasterRpc = "https://api.candide.dev/paymaster/$version/$network/$apikey";

const paymaster: CandidePaymaster = new CandidePaymaster(paymasterRPC);

Then you can consume Paymaster methods:

const supportedERC20TokensAndPaymasterMetadata = await paymaster.fetchSupportedERC20TokensAndPaymasterMetadata();

Guides

| Title | Description | -----------------------------------------------------------------------------------------| -------------------------------------------------------------------------------- | | Send your first user operation | Learn how to create a smart wallet and to send your first user operation | | Send a Gasless Transaction | Learn how to send gasless transactions using a paymaster | | Pay Gas in ERC-20 | Learn how to offer the ability for users to pay gas in ERC-20s using a Paymaster |

npm package

npm

License

MIT

Acknowledgments

  • EIP-4337: Account Abstraction via Entry Point Contract specification
  • Safe modules