Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Multi-Sig Safe with Time-Lock Recovery (Stellar)

A comprehensive multi-signature wallet solution built on Stellar with time-lock recovery mechanisms, featuring a full-stack application for secure digital asset management.

πŸ—οΈ Project Structure

stellar-multisig-safe/
β”œβ”€β”€ πŸ“ contracts/              # Stellar smart contracts
β”‚   β”œβ”€β”€ πŸ“ soroban/           # Soroban Rust contracts
β”‚   └── πŸ“ wasm/              # Compiled WASM contracts
β”œβ”€β”€ πŸ“ backend/               # Node.js API server
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ πŸ“ tests/
β”‚   └── πŸ“ docs/
β”œβ”€β”€ πŸ“ frontend/              # React frontend application
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ πŸ“ public/
β”‚   └── πŸ“ tests/
β”œβ”€β”€ πŸ“ docs/                  # Project documentation
β”œβ”€β”€ πŸ“ scripts/               # Development and deployment scripts
β”œβ”€β”€ πŸ“ .github/               # GitHub workflows and templates
└── πŸ“ tools/                 # Development tools and utilities

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Rust 1.70+
  • Docker (optional)
  • Git

Installation

# Clone the repository
git clone <repository-url>
cd stellar-multisig-safe

# Install dependencies for all components
npm run install:all

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

# Start development environment
npm run dev

πŸ“‹ Available Scripts

Root Level Commands

npm run install:all          # Install dependencies for all packages
npm run dev                  # Start all services in development mode
npm run build                # Build all packages
npm run test                 # Run all tests
npm run lint                 # Lint all packages
npm run clean                # Clean build artifacts

Smart Contracts

npm run contract:build       # Build Stellar contracts
npm run contract:test        # Run contract tests
npm run contract:deploy      # Deploy to testnet
npm run contract:optimize    # Optimize WASM contracts

Backend

npm run backend:dev          # Start backend in development mode
npm run backend:build        # Build backend for production
npm run backend:test         # Run backend tests
npm run backend:lint         # Lint backend code

Frontend

npm run frontend:dev         # Start frontend in development mode
npm run frontend:build       # Build frontend for production
npm run frontend:test        # Run frontend tests
npm run frontend:lint        # Lint frontend code

πŸ› οΈ Development Workflow

1. Setting Up Your Development Environment

# Install Rust and Soroban CLI
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install soroban-cli

# Install Node.js dependencies
npm run install:all

# Start local Stellar network
docker run -d --name stellar -p 8000:8000 stellar/quickstart:latest

2. Making Changes

  1. Smart Contracts: Modify Rust contracts in contracts/soroban/
  2. Backend API: Update Node.js server in backend/src/
  3. Frontend UI: Update React components in frontend/src/

3. Testing Your Changes

# Run all tests
npm run test

# Run specific package tests
npm run contract:test
npm run backend:test
npm run frontend:test

🀝 Contributing

We welcome contributions! Please read our Contributing Guide for details on:

  • Code of Conduct
  • Development workflow
  • Pull request process
  • Issue reporting guidelines

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following our coding standards
  4. Test your changes thoroughly
  5. Commit your changes with descriptive messages
  6. Push to your fork and submit a Pull Request

πŸ“ Issues and Project Management

Issue Templates

We provide templates for different types of issues:

Project Boards

  • Backlog: Features and improvements to be prioritized
  • In Progress: Currently being worked on
  • Review: Ready for code review
  • Done: Completed and merged

Labels

  • bug: Bug reports and fixes
  • enhancement: New features and improvements
  • documentation: Documentation updates
  • good first issue: Good for new contributors
  • help wanted: Community help needed
  • priority/high: High priority issues
  • security: Security-related issues

πŸ—οΈ Architecture Overview

Smart Contracts (Stellar/Soroban)

  • MultiSig Contract: Core multi-signature logic
  • TimeLock Contract: Time-delayed recovery mechanisms
  • Recovery Contract: Emergency recovery procedures

Backend API (Node.js/Express)

  • RESTful API: Endpoints for wallet operations
  • Stellar Integration: Contract interaction and transaction handling
  • Database: PostgreSQL for persistent data storage
  • Authentication: JWT-based user authentication

Frontend (React/TypeScript)

  • Modern UI: Responsive design with Material-UI
  • Wallet Interface: Multi-signature transaction management
  • Real-time Updates: WebSocket integration for live updates
  • Security: Secure key management and transaction signing

πŸ”§ Technology Stack

Smart Contracts

  • Rust: Contract development language
  • Soroban: Stellar smart contract platform
  • WASM: WebAssembly compilation target

Backend

  • Node.js: Runtime environment
  • Express.js: Web framework
  • TypeScript: Type-safe JavaScript
  • PostgreSQL: Database
  • Prisma: ORM
  • Stellar SDK: Stellar blockchain integration

Frontend

  • React: UI framework
  • TypeScript: Type-safe development
  • Material-UI: Component library
  • React Router: Navigation
  • Axios: HTTP client
  • React Query: Data fetching and caching

Development Tools

  • ESLint: Code linting
  • Prettier: Code formatting
  • Jest: Testing framework
  • Docker: Containerization
  • GitHub Actions: CI/CD

πŸ”’ Security Considerations

  • Multi-signature: No single point of failure
  • Time-locks: Prevents rapid unauthorized changes
  • Key Management: Secure key storage and handling
  • Audit Trail: Complete transaction history
  • Input Validation: Comprehensive input sanitization

πŸ“š Documentation

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Stellar Development Foundation for the Soroban platform
  • OpenZeppelin for security best practices
  • The multi-sig community for inspiration and feedback

πŸ“ž Support


Built with ❀️ for the Stellar ecosystem

About

"Secure multi-signature wallet with time-lock recovery for Stellar network" "Decentralized multi-sig wallet with emergency recovery on Stellar" "Stellar Soroban smart contract for multi-signature wallet management" "Time-locked multi-signature safe for the Stellar ecosystem"

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages