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
Account client (sponsored gas)
Wrap the account, the paymaster, and the bundler transport in a single client: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
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.