
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@alchemy/aa-ethers
Advanced tools
@alchemy/aa-ethers
This package contains EthersProviderAdapter
and AccountSigner
, respective extensions of the JsonRpcProvider
and Signer
classes defined in ethers.js
external library.
If you currently rely ethers.js
for web3 development, you can use these ethers.js
-compatible JsonRpcProvider
and Signer
to integrate Account Abstraction into your dApp. You may also find the util
methods helpful.
This repo is community maintained and we welcome contributions!
If you are already using the @alchemy/aa-core
package, you can simply install this package and start using the EthersProviderAdapter
and AccountSigner
. If you are not using @alchemy/aa-core
, you can install it and follow the instructions in the "Getting started" docs to get started.
yarn add @alchemy/aa-ethers
npm i -s @alchemy/aa-ethers
pnpm i @alchemy/aa-ethers
You can create a provider and connect it to a signer account like so:
import {
LightSmartContractAccount,
getDefaultLightAccountFactoryAddress,
} from "@alchemy/aa-accounts";
import { EthersProviderAdapter } from "@alchemy/aa-ethers";
import { LocalAccountSigner, SmartAccountSigner } from "@alchemy/aa-core";
import { Alchemy, Network } from "alchemy-sdk";
import { polygonMumbai } from "@alchemy/aa-core";
const chain = polygonMumbai;
// 1. Create a provider using EthersProviderAdapter
const alchemy = new Alchemy({
apiKey: process.env.API_KEY!,
network: Network.MATIC_MUMBAI,
});
const ethersProvider = await alchemy.config.getProvider();
const provider = EthersProviderAdapter.fromEthersProvider(ethersProvider);
const signer: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner(
process.env.YOUR_OWNER_MNEMONIC!
);
// 2. Connect the provider to the smart account signer
export const signer = provider.connectToAccount(
(rpcClient) =>
new LightSmartContractAccount({
chain,
factoryAddress: getDefaultLightAccountFactoryAddress(chain),
rpcClient,
signer,
})
);
4.0.0-beta.0 (2024-08-28)
move plugingen from aa-sdk to account-kit since it depends on smart-contracts (073e8f6)
split aa-alchemy into account-kit packages (#704) (55e6632), closes #706
refactor!: move chain definitions out of aa-sdk core (#772) (1385441), closes #772
moves the chain definitions out of aa-sdk core and into account-kit/infra
@alchemy/plugingen has been moved to @account-kit/plugingen
@alchemy/aa-_ packages have been renamed to @aa-sdk/_
this removes the @alchemy/aa-alchemy package in favor of @account-kit/*
@alchemy/aa-accounts was deleted in favor of @account-kit/accounts
refactor: further rename packages
FAQs
Ethers.js wrapper for @alchemy/aa-core
The npm package @alchemy/aa-ethers receives a total of 79 weekly downloads. As such, @alchemy/aa-ethers popularity was classified as not popular.
We found that @alchemy/aa-ethers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.