An intent-based interface for interacting with Abstracted Smart Accounts on Base Sepolia. This project demonstrates how natural language inputs can be translated into on-chain execution using Account Abstraction.
The goal of this project is to simplify blockchain interactions by removing the need for users to manually handle transaction construction, gas management, and hexadecimal signatures.
Instead of traditional UI flows, Sentient Wallet uses an agentic workflow:
- Input: User provides a natural language command (e.g., "Swap 1 ETH").
- Parsing: The system resolves the intent (Action, Asset, Amount).
- Execution: The system initializes a Modular Smart Account via Alchemy's Account Kit and constructs the necessary UserOperation.
The codebase is modularized into three core components:
- Agent (agent.js): Manages the Command Line Interface (CLI) and user session loop.
- Parser (parser.js): Handles the logic for mapping text inputs to executable transaction parameters.
- Wallet Engine (wallet.js): Integrates with the Alchemy SDK and Viem to manage keys, deploy smart accounts (ERC-4337), and sign transactions.
Note: For the demonstration build, these modules are aggregated into demo.js to ensure a single, stable runtime environment.
- Runtime: Node.js
- Infrastructure: Alchemy Account Kit (AA-SDK)
- Network: Base Sepolia (Layer 2 Testnet)
- Ethereum Library: Viem
- Node.js (v18 or higher recommended)
- npm or yarn
- An Alchemy API Key for Base Sepolia
-
Clone the repository: git clone https://github.com/samarthgupta128/Sentinel-wallet.git cd Sentinel-wallet
-
Install dependencies: npm install
-
Environment Configuration: Create a file named .env in the root directory and add the following keys:
ALCHEMY_API_KEY=your_alchemy_api_key_here PRIVATE_KEY=your_private_key_here
(If PRIVATE_KEY is omitted, a new random key will be generated for the session).
To run the full demonstration:
node demo.js
Once the system initializes, you can enter commands such as:
swap 1 eth
The system will output the derived intent, the generated Smart Account address, and the transaction hash upon execution.
- LLM Integration: Replace the current deterministic parser with a Large Language Model to handle complex, multi-step intents.
- Paymaster Integration: Implement gas sponsorship to allow for gasless transactions.
- Voice Interface: Add speech-to-text capabilities for mobile interactions.