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.Documentation Index
Fetch the complete documentation index at: https://docs.startale.com/llms.txt
Use this file to discover all available pages before exploring further.
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 plusviem:
@startale-scs/aa-sdk:
| Package | Add it when | Why |
|---|---|---|
@rhinestone/module-sdk | You install or build custom ERC-7579 modules. | Provides typed helpers for module init data. |
wagmi + @tanstack/react-query | You already use wagmi for connection state. | Lets you reuse wagmi’s WalletClient as the signer. |
@dynamic-labs/sdk-react-core | You authenticate with Dynamic. | Provides the wallet that exposes the signer. |
@privy-io/react-auth | You authenticate with Privy. | Provides the embedded wallet that exposes the signer. |
ethers | You already pass ethers wallets around your codebase. | The SDK accepts EthersWallet directly as a signer. |
Configure runtime credentials
The SDK takes the bundler URL, paymaster URL, andpaymasterId at call time. Where you store them is up to your framework. A plain .env file works for any Node-based runtime:
.env
Pick a signer
toStartaleSmartAccount accepts any of the signer types below. The choice is yours and depends on how your app already manages keys.
- Viem LocalAccount (server / scripts)
- Viem WalletClient (browser, raw viem)
- EIP-1193 provider (Privy, Dynamic, MetaMask)
- Ethers Wallet (legacy code)
A
LocalAccount holds a private key directly. Best for backend services, scheduled jobs, or developer scripts.| Symbol | Source | Role |
|---|---|---|
privateKeyToAccount | viem/accounts | Builds a LocalAccount from a hex private key. |
Optional: wagmi alongside the SDK
If your app already uses wagmi for connection state, you can keep wagmi for connection management and feed itsWalletClient into toStartaleSmartAccount as a signer. wagmi is not required by the SDK.
| Symbol | Source | Role |
|---|---|---|
useWalletClient | wagmi | Hook that returns a viem WalletClient for the currently connected wallet. |
toStartaleSmartAccount | @startale-scs/aa-sdk | Builds the smart account from any supported signer. |
http | viem | HTTP transport used by the smart account for RPC reads. |
Sanity check
Before moving on, confirm you can read your smart account address on Soneium Minato: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.