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

abstractionkit

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstractionkit

Account Abstraction 4337 SDK by Candidelabs

  • 0.1.16
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Supported by Safe Grants

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_2_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 erc20s = await paymaster.getSupportedERC20TokensAndPaymasterMetadata();

Guides

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

npm package

npm

License

MIT

Keywords

FAQs

Package last updated on 29 Aug 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