How capgoblin/argonaut works
A smart contract module written in Cairo for Starknet (in the “argonaut” directory).
2. A Telegram bot backend (in the “bot” directory) implemented in Node.js/TypeScript that handles Telegram commands, interacts with the on-chain contract via Starknet.js, and integrates ArgentTMA SDK.
3. A frontend mini-app (in the “tma” directory) built with Next.js and React that provides a user interface for initiating multisig transactions and viewing their status.
Main components
• Smart Contract Layer: Represent the multisig wallet contract developed in Cairo (files like “src/lib.cairo”, “multisig.cairo”, etc.). Indicate that this contract handles proposals, confirmations, revocations, and executions on Starknet.
• Backend/Telegram Bot Layer: Highlight the “bot” directory’s components as the Telegram command processor which interprets commands, calls API methods (e.g., /listTxns, /listSigners), and interacts with the smart contract via Starknet.js.
• Frontend Mini-App Layer: Represent the “tma” directory components as the user interface layer (Next.js, React with Tailwind CSS) that users interact with to submit transactions and observe wallet activity.
Relationships and interactions
• Integration with external APIs where applicable:
• Telegram Bot API (for the bot layer).
• Starknet RPC APIs (for smart contract interactions).
• ArgentTMA SDK (as a further abstraction for managing wallet actions).
• Also, illustrate how data flows between the user interface, command processor backend, and the smart contract. For example, a “submit transaction” flow will start from the user (tma), continue to the bot (backend), and then be committed on-chain.
Architectural patterns and design principles
• Separation of concerns: Note the clear separation between contract logic (blockchain), business logic (Telegram bot commands and transaction handling in Node.js), and front-end UI display.
• Use of modern web architectural standards: Next.js for the frontend, TypeScript for the backend, and Cairo for blockchain contracts.
• Modular design: Demonstrated by having separate directories/modules for tests, configurations, and distinct functionalities (e.g., libraries under bot/controller/lib and tma/components/ui).
Technology details
• Backend: Node.js, TypeScript, and Starknet.js.
• Smart contract: Cairo (for Starknet).
• Frontend: Next.js, Tailwind CSS, and React.
• Use of external integrations/APIs like Telegram Bot API and ArgentTMA SDK.