Introduction

Stackup is a blockchain infrastructure provider that specializes in account abstraction. Stackup’s ERC-4337 transaction infrastructure powers the most popular account abstraction projects in the Ethereum ecosystem.

Getting Started

Create an account at https://app.stackup.sh/. Follow the instructions to create an API key, and check out Stackup’s getting started guide to create applications with ERC-4337.

Connecting Stackup to a Capsule

Stackup Integration
import { ethers } from "ethers";
import { Presets, Client } from "userop";

// create a capsule ethers signer
const provider = new ethers.JsonRpcProvider(rpcUrl, chain);
const signer = new CapsuleEthersSigner(capsule, rpcUrl);

// create a Stackup account
const builder = await Presets.Builder.SimpleAccount.init(signer, rpcUrl);

const address = builder.getSender();
console.log(`Smart Account address: ${address}`);

Note: For simplicity, Capsule imports are not included in the above example. It is assumed that the Capsule object has been instantiated and the user has created a wallet.

If you need access to Capsule or help getting set up, please refer to our quick start guide:

Getting Started

Learn how to set up and use the Capsule SDK in your project