Skip to main content
This page covers the framework-agnostic setup: installing the SDK, configuring environment variables, and choosing a signer. The SDK does not assume Next.js, React, wagmi, or any particular auth provider; pick whichever signer fits your project.
The SDK source is at StartaleGroup/scs-aa-sdk and the published package is @startale-scs/aa-sdk.

Install the SDK

The minimum runtime dependencies are the SDK itself plus viem:
Add the optional packages below only if your app uses them. None of them are required by @startale-scs/aa-sdk:

Configure runtime credentials

The SDK takes the bundler URL, paymaster URL, and paymasterId at call time. Where you store them is up to your framework. A plain .env file works for any Node-based runtime:
.env
Keep your API key on the server when possible. If you must expose it to the browser (for example, in a single-page app without a backend), prefer per-domain SCS API keys with a tight gas policy so a leak has bounded blast radius. The SDK does not require any specific environment variable prefix; framework-specific prefixes like NEXT_PUBLIC_* or VITE_* are not part of the SDK’s contract.

Pick a signer

toStartaleSmartAccount accepts any of the signer types below. The choice is yours and depends on how your app already manages keys.
A LocalAccount holds a private key directly. Best for backend services, scheduled jobs, or developer scripts.

Optional: wagmi alongside the SDK

If your app already uses wagmi for connection state, you can keep wagmi for connection management and feed its WalletClient into toStartaleSmartAccount as a signer. wagmi is not required by the SDK.

Sanity check

Before moving on, confirm you can read your smart account address on Soneium Minato:
If the address prints, the SDK can talk to Soneium and you are ready for Smart account setup.

Next steps

Smart account setup

Wrap the account in a React provider and initialise sponsored and ERC-20 clients.

Contract interactions

Send single and batched calls through the smart account.

Auth providers

Plug Dynamic or Privy into the signer slot for social login.

Portal setup

If you have not provisioned a paymaster yet, do that first.