How hoblayerta/stellar-account-abstraction-sdk works
Project type and purpose
• This is a client-centric dApp project composed of three parts:
• A Soroban Rust smart-contracts module under contracts/
• A TypeScript SDK (stellar-social-sdk/) that abstracts social authentication and blockchain interactions
• A Next.js demo front-end (demo-app/) showcasing login, account management, and payments
• Purpose: let web apps onboard users with Google/Facebook/phone/Freighter, deterministically generate Stellar keypairs, and manage a social wallet via on-chain contracts.
File structure
• Top-level directories:
• contracts/social-account/ – Rust code, tests, build scripts for the on-chain logic
• stellar-social-sdk/ – a rollup’d TS library exposing SDK methods (authenticateWithGoogle(), connectFreighter(), sendPayment(), etc.)
• demo-app/ – Next.js front-end integrating the SDK, with pages under src/app and static assets under public
• Config and build files:
• Rust/Cargo files in contracts
• rollup.config.js, tsconfig.json in stellar-social-sdk
• next.config.js, ESLint, PostCSS in demo-app
• No separate backend service—everything runs in the browser or on the Soroban network.
README for additional insights
• SDK config (contract ID, network) points at the Soroban RPC/Horizon endpoints
• Demo connects directly to OAuth providers (Google/Facebook mock), phone OTP, and the Freighter browser extension
• Smart contracts handle account initialization, auth-method CRUD, and transaction validation on-chain
Essential elements
• Don’t forget environment/config: contract ID, network (testnet/mainnet)
• Testing tools: Friendbot, Cargo tests, SDK dev mode
• Deterministic key-generation step and how auth methods map to on-chain storage