This page is the bridge between Installation and the feature tutorials. By the end you will have a smart account, an account client wired to the SCS bundler and paymaster, and a place to keep them in your app’s state.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.
Source:
StartaleGroup/scs-aa-sdk. Every symbol on this page is exported from @startale-scs/aa-sdk or viem.What you will build
StartaleAccountClient is the object you actually call sendUserOperation and ERC-7579 module actions on. The smart account and paymaster clients are wired into it once at setup time.
Account creation
| Parameter | Required | Source | Notes |
|---|---|---|---|
signer | yes | your auth provider | LocalAccount, viem WalletClient, EIP-1193 EthereumProvider, or EthersWallet. See Installation. |
chain | yes | viem/chains | Use soneiumMinato for testnet and soneium for mainnet. |
transport | yes | viem | RPC transport used internally for chain reads (nonces, code). |
index | optional | your code | A bigint salt that determines the counterfactual address. Different index values with the same signer produce different accounts. |
accountAddress | optional | your code | Pin a known smart account address. Useful for EIP-7702 delegation and for skipping address derivation. |
validators, executors, prevalidationHooks, hook, fallbacks | optional | @startale-scs/aa-sdk | ERC-7579 modules to install at deployment time. See Smart sessions and Social recovery for module examples. |
Account client (sponsored gas)
Wrap the account, the paymaster, and the bundler transport in a single client:| Symbol | Source | Role |
|---|---|---|
createSCSPaymasterClient | @startale-scs/aa-sdk | Connects to the SCS Paymaster RPC. Returns a SCSPaymasterClient. |
createSmartAccountClient | @startale-scs/aa-sdk | Builds a StartaleAccountClient with bundler, paymaster, and ERC-7579 module actions. |
paymasterContext.paymasterId | SCS Portal | The id of the paymaster you provisioned. Both managed and self-funded paymasters return one. |
Account client (ERC-20 gas)
To accept ERC-20 tokens as gas instead of sponsoring, swap thepaymasterId field for a token address:
Persisting the client in a React app
A common pattern is to lift the smart account and clients into a context provider so they survive component remounts and are available everywhere in the tree.StartaleProvider.tsx
| Hook / type | Source | Role |
|---|---|---|
StartaleSmartAccount | @startale-scs/aa-sdk | Type alias for the account returned by toStartaleSmartAccount. |
StartaleAccountClient | @startale-scs/aa-sdk | Type alias for the client returned by createSmartAccountClient. |
Environment variables in this snippet use a framework-agnostic placeholder. The SDK does not require any specific prefix; pick whichever your framework expects (
process.env.X, import.meta.env.X, runtime config, etc.).Useful account methods
Once you have the account, you can call these without building a UserOperation first:Next steps
Contract interactions
Send single and batched calls through
sendUserOperation.Sponsored paymaster
Send sponsored UserOperations end to end with policies.
ERC-20 paymaster
Charge users in ASTR, USDC, or other tokens.
Smart sessions
Reduce signature friction with scoped session keys.