Startale AA SDK

website·Indexed 34 days ago

https://docs.startale.com

A developer toolkit for building smart account experiences on Soneium. The SDK enables account abstraction (AA) features including sponsored and ERC-20 paymasters, social recovery via ERC-7579, smart sessions, and EIP-7702 EOA upgrades. It integrates with auth providers like Dynamic and Privy and supports atomic batched calls via EIP-5792.

Tokens
48.4K
Snippets
205
Records
337
Agent score
56%

What's inside Startale AA SDK

  1. Overview of EIP-7702 Smart Account Upgrade

    EIP-7702 allows an existing EOA to delegate execution to a smart contract implementation while maintaining the same address. By delegating an EOA to the Startale account implementation, users can utilize Account Abstraction (AA) features—such as sponsored gas, ERC-20 gas payments, sessions, recovery, and batched calls—without migrating funds or changing addresses. The delegation is applied by adding a 23-byte indicator (0xef0100 || implementation) to the address code. This process is reversible by signing an authorization pointing to the zero address.
  2. Overview of Startale AA SDK and Modular Accounts

    The Startale AA SDK implements ERC-7579 modular accounts, replacing standard EOA transactions with UserOperations. This architecture allows developers to implement advanced features such as gas sponsorship, ERC-20 gas payments, social recovery, smart sessions, batched calls, and EIP-7702 delegation without managing the underlying infrastructure.
  3. Overview of Startale AA SDK for Soneium

    The Startale AA SDK is a TypeScript toolkit for implementing ERC-4337 account abstraction on the Soneium network. It provides a managed bundler and paymaster infrastructure and utilizes ERC-7579 modular accounts, allowing developers to extend account behavior via validators, executors, hooks, and fallbacks. The SDK is published as the @startale-scs/aa-sdk package.
  4. Overview of Social Recovery for Startale Smart Accounts

    Social recovery allows a configurable set of guardians to cooperate to rotate the signing key of a Startale smart account when the user loses access. This is implemented as an ERC-7579 validator module (the Rhinestone Social Recovery validator) installed on top of the Startale Smart Account. A recovery occurs when a UserOperation is validated by the Social Recovery module instead of the default validator, provided the number of guardian signatures meets the configured threshold.
  5. Overview of Startale Developer SDKs on Soneium

    Startale provides two primary SDKs for developers building on the Soneium ecosystem:

    1. App SDK (@startale/app-sdk): An integration library used to connect web applications to the Startale App. It manages user authentication, smart account provisioning, and on-chain transactions using a standard EIP-1193 provider and wagmi connector.
    2. AA SDK (@startale-scs/aa-sdk): A lower-level toolkit designed for building custom ERC-4337 account abstraction flows, session keys, or backend scripts by interacting directly with SCS bundler and paymaster infrastructure.
  6. Overview of Smart Sessions in Startale AA SDK

    Smart sessions allow a dApp to act on a user's behalf within an explicit policy (allowed contracts, function selectors, and an expiry). The user signs once to grant the session; subsequent UserOperations that fit the policy can be executed by a session signer without further user prompts. This is implemented as an ERC-7579 validator module based on the Rhinestone Smart Sessions module.
  7. Use Startale ERC-4337 smart accounts with standard Ethereum libraries

    Every Startale user is provisioned with an ERC-4337 smart account upon signing in. The SDK exposes this account via a standard EIP-1193 provider, ensuring compatibility with popular libraries such as wagmi, viem, and ethers without requiring modifications.
  8. Understand the Startale Mini App wallet architecture

    Mini Apps run in a sandboxed iframe and cannot communicate directly with browser extensions or external wallets. Instead, EIP-1193 calls are routed via a Comlink RPC channel over postMessage to the Startale App host. The host validates the method, rewrites the from address to the user's smart account, and triggers an in-app approval modal for sensitive operations. The iframe never has access to private keys.
  9. Understand Startale Mini App architecture

    A Startale Mini App is a web application served over HTTPS that runs inside an embedded frame within the Startale App on mobile and desktop. It leverages the host's wallet and provides access to user STAR Points and verified linked Externally Owned Accounts (EOAs).

    Technically, Startale implements the Farcaster Mini App protocol for iframe communication and manifest formats, but it does not require users to have Farcaster accounts, nor does it support Farcaster social features (like cast composition or social graphs).

  10. Display NFTs in the Startale App Collectibles UI

    The Startale App automatically surfaces NFTs held in a user's smart account within the Collectibles UI. There is no registration API; display is driven entirely by standard on-chain metadata.

    UI Surfaces:

    • Home screen (Collectibles tab): Groups NFTs by issuing contract, showing up to 8 collection tiles. A count badge appears for collections with multiple tokens. If more than 8 collections are held, a 'View all' link leads to the /wallet screen.
    • /wallet screen (Collectibles tab): Displays all held collections via infinite scroll (25 collections per page).

    Note on Loading: Newly received NFTs may show a gray placeholder while backend enrichment occurs. The app polls for updates every 15 seconds for up to 60 seconds. If the placeholder persists beyond this window, it indicates a metadata issue.

  11. Understand gas sponsorship flows in App SDK

    The @startale/app-sdk handles gas for transactions (ERC-4337 UserOperations) based on the execution environment and configuration:

    1. Mini Apps (inside Startale App): Gas is automatically sponsored by the host paymaster. No configuration is required. Methods like eth_sendTransaction and wallet_sendCalls are sponsored.
    2. Standalone dApps with Paymaster: Gas is sponsored by the developer's configured paymaster. Requires paymasterOptions configuration.
    3. Standalone dApps without Paymaster: The end user pays gas using ETH held directly in their smart account address.
  12. Understand parallel transactions with ERC-7579 lanes

    ERC-7579 smart accounts use a two-dimensional nonce consisting of a nonceKey (the lane) and a nonce (the position within that lane). While UserOperations within a single lane are strictly ordered, operations across different lanes are independent. This allows developers to send multiple UserOperations concurrently without them blocking each other if one fails or is delayed.

    Common use cases include:

    • Independent flows (e.g., a token claim and a swap) that should not block one another.
    • Multiple worker processes signing for the same account, where each worker uses a distinct lane to avoid nonce collisions.
    • High-throughput dapps batching operations for many users, assigning one lane per user.