Socket
Socket
Sign inDemoInstall

@alchemy/aa-accounts

Package Overview
Dependencies
17
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @alchemy/aa-accounts

A collection of ERC-4337 compliant smart contract account interfaces


Version published
Weekly downloads
7.1K
increased by23.16%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

3.0.0-alpha.0 (2024-01-30)

Bug Fixes

  • add back the alchemy enhanced api actions to alchemy client (75d1741)
  • allow for dynamic setting of the owner on owned accounts (df333ee)
  • update Alchemy links with affiliate links (#384) (b47c61b)

Code Refactoring

  • aa-alchemy: migrate aa-alchemy to new viem interfaces (bf7b49d)

  • aa-core: complete migration to viem based approach in aa-core (9bff625)

  • aa-ethers: refactor aa-ethers to use the viem client and accounts (6cc2051)

  • refactor(aa-accounts)!: migrate aa-accounts to viem approach (37a5b48)

Features

  • hoist account signing methods (5bcfac8)
  • update session key plugindef abi and config (#382) (a47978e)

BREAKING CHANGES

  • aa-ethers: aa-ethers has had some functionality removed and apis changed
  • inputs to the ProviderAdapter now require a SmartAccountClient
  • with* methods have been removed, middleware config now exists on the SmartAccountClient
  • the Account Signer has been updated to take a SmartContractAccount as input
  • all interfaces now use the new smart account client and smart account models that match viem more closely
  • aa-alchemy: all of aa-alchemy now uses viem interfaces in aa-core
  • aa-core: all interfaces have been migrated to use the new viem style clients and accounts

Readme

Source

@alchemy/aa-accounts

This package contains various implementations of the BaseSmartContractAccount class defined in aa-core. This repo is community maintained and we welcome contributions!

Getting started

If you are already using the @alchemy/aa-core package, you can simply install this package and start using the accounts. If you are not using @alchemy/aa-core, you can install it and follow the instructions in the Getting Started docs to get started.

via yarn

yarn add @alchemy/aa-accounts

via npm

npm i -s @alchemy/aa-accounts

via pnpm

pnpm i @alchemy/aa-accounts

Contributing

If you are looking to add a new account type, please follow the following structure.

  1. Create a new folder in src with the name of your account type in kebab-case (we're following kebab casing for files throughout the project).
  2. Create a new file in the folder you just created called account.ts and add your implementation for BaseSmartContractAccount
  3. If needed, create a sub-folder in your account folder called abis and add your abis as .ts files. eg:
export const MyContractAbi = [] as const; // the as const is important so we can get correct typing from viem
  1. If you need to extend the SmartAccountProvider class, add a file called provider.ts and add your implementation for SmartAccountProvider.
  • Ideally, your Account impl should just work with the base provider provided by aa-core.
  • If not, consider generalizing the use case and updating SmartAccountProvider
  1. Add some tests for your account and provider (if created) by creating a subfolder in your account/my-account called __tests__ and make sure your files end with the .test.ts suffix
  2. export the classes and types you've defined in src/index.ts
  3. Open a PR and we'll review it as soon as possible!

FAQs

Last updated on 30 Jan 2024

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc