3.12.1 • Published 1 day ago

@alchemy/aa-core v3.12.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

@alchemy/aa-core

This package contains the core interfaces and components for interacting with 4337 infrastructure. The primary interfaces that it exports are the SmartAccountProvider and BaseSmartContractAccount.

The SmartAccountProvider is an EIP-1193 compliant Provider that wraps JSON RPC methods and some Wallet Methods (signing, sendTransaction, etc). With this Provider, you can submit User Operations to RPC providers, estimate gas, configure a Paymaster, send standard JSON RPC requests, and more. It is not opinionated about which RPC provider you are using and is configurable to work with any RPC provider. Because it implements EIP-1193, it can be used with any web3 library.

The BaseSmartContractAccount interface defines how you would interact with your Smart Contract Account. Any class that extends BaseSmartContractAccount may also expose additional methods that allow its connecting SmartAccountProvider to provide ergonomic utilities for building and submitting User Operations.

Getting started

To get started, first install the package:

yarn add @alchemy/aa-core
npm i -s @alchemy/aa-core
pnpm i @alchemy/aa-core

Usage

You can create a provider like so:

import { createMultiOwnerModularAccount } from "@alchemy/aa-accounts";
import {
  LocalAccountSigner,
  SmartAccountSigner,
  createSmartAccountClient,
  polygonMumbai,
} from "@alchemy/aa-core";
import { http } from "viem";

const chain = polygonMumbai;
const signer: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner(
  "YOUR_OWNER_MNEMONIC"
);
const rpcTransport = http("https://polygon-mumbai.g.alchemy.com/v2/demo");

export const smartAccountClient = createSmartAccountClient({
  transport: rpcTransport,
  chain,
  account: await createMultiOwnerModularAccount({
    transport: rpcTransport,
    chain,
    signer,
  }),
});
3.12.1

1 day ago

3.12.0

6 days ago

3.11.0

8 days ago

3.11.1

8 days ago

3.10.0

9 days ago

3.9.0

14 days ago

3.8.2-alpha.1

21 days ago

3.8.2-alpha.0

22 days ago

3.8.1

27 days ago

3.8.0

28 days ago

3.6.1

2 months ago

3.6.0

2 months ago

2.5.0

2 months ago

3.5.1

2 months ago

3.5.0

2 months ago

3.4.2

2 months ago

3.4.0

2 months ago

3.2.1

2 months ago

3.0.1

3 months ago

3.0.0

3 months ago

3.1.1

3 months ago

3.1.0

3 months ago

3.0.0-alpha.13

3 months ago

3.0.0-alpha.9

3 months ago

3.0.0-alpha.10

3 months ago

3.0.0-alpha.5

3 months ago

3.0.0-alpha.3

3 months ago

3.0.0-alpha.4

3 months ago

3.0.0-alpha.1

3 months ago

3.0.0-alpha.0

3 months ago

2.3.1

3 months ago

2.3.0

4 months ago

2.2.1

4 months ago

2.2.0

4 months ago

2.0.0

4 months ago

1.2.4

4 months ago

1.2.3

5 months ago

1.2.2

5 months ago

1.2.1

5 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago

0.3.0

6 months ago

0.2.0

6 months ago

0.1.0-alpha.30

8 months ago

0.1.0-alpha.32

8 months ago

0.1.0-alpha.31

8 months ago

0.1.0-alpha.14

10 months ago

0.1.0-alpha.16

10 months ago

0.1.0-alpha.15

10 months ago

0.1.0-alpha.18

10 months ago

0.1.0-alpha.17

10 months ago

0.1.0-alpha.19

9 months ago

0.1.0-alpha.21

9 months ago

0.1.0-alpha.20

9 months ago

0.1.0-alpha.23

9 months ago

0.1.0-alpha.22

9 months ago

0.1.0-alpha.25

9 months ago

0.1.0-alpha.24

9 months ago

0.1.0-alpha.27

9 months ago

0.1.0-alpha.26

9 months ago

0.1.0-alpha.29

8 months ago

0.1.0-alpha.28

9 months ago

0.1.0

7 months ago

0.1.1

7 months ago

0.1.0-alpha.10

11 months ago

0.1.0-alpha.11

11 months ago

0.1.0-alpha.5

11 months ago

0.1.0-alpha.4

11 months ago

0.1.0-alpha.7

11 months ago

0.1.0-alpha.1

11 months ago

0.1.0-alpha.0

11 months ago

0.1.0-alpha.2

11 months ago

0.0.1-alpha.2

12 months ago

0.0.1-alpha.1

12 months ago

0.0.1-alpha.0

12 months ago