Skip to content

NonceGeek/feather-multi-chain-wallet-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺΆ Feather Multi Chain Wallet System

πŸͺΆ Feather Multi Chain Wallet System, 基于 deno ηš„ε€šι“Ύζ”―ζŒηš„ι’±εŒ…η³»η»ŸοΌŒεƒηΎ½ζ―›δΈ€ζ ·θ½»γ€‚

The Full Structure:

+---------------------------+
| Multi Chain Wallet System |
+---------------------------+
APIS about Priv     |      | APIs
HTTPS&IN SAME Server|      |                 +----------+
+-------------+     |      +-----------------| Frontend |
| Private Key |-----+      |                 +----------+
|    Vault🏦  |            |                 +----------------+
+-------------+            +-----------------| Other Services |
                                             +----------------+

Multi-Chain Wallet System Backend

A Deno-based backend service for managing multi-chain cryptocurrency wallets, supporting Ethereum and TRON networks.

Features

  • Multi-chain support (Ethereum, Tron, Bitcoin, Aptos, Sui...)
  • Account management and generation
  • Token operations (USDT transfers, sweeping)
  • Password-protected administrative operations
  • Balance checking and monitoring
  • Network configuration management
  • Comprehensive API documentation

Prerequisites

  • Deno version 1.x or higher
  • Access to Ethereum and TRON networks (mainnet/testnet)
  • Environment for secure key management

Installation

  1. Clone the repository:
git clone [repository-url]
cd feather-multi-chain-wallet-system
  1. Install Deno (if not already installed):
  • macOS/Linux:
curl -fsSL https://deno.land/x/install/install.sh | sh
  • Windows:
iwr https://deno.land/x/install/install.ps1 -useb | iex

Running the Server

cd deno

Start the server in development mode:

deno task dev

Start the server in prod mode:

deno task start

The server will start on port 8000 by default.

Deploy to the deno:


deployctl deploy --prod --project=[proj-name] app.ts

Security Considerations

⚠️ IMPORTANT SECURITY ADVISORY:

  • Operations involving private keys should only be performed within internal networks for service-to-service interactions
  • Currently, two types of APIs handle private keys:
    1. /eth/sweep/*
    2. /eth/transfer/*
  • Implement proper security measures in production environments
  • Never expose private key operations to public networks

API Overview

The API is organized into several sections:

System Status

  • GET / - Check API status
  • GET /docs - View API documentation

Password Management

  • GET /set_env_password - Set/update environment password
  • GET /check_env_password - Verify password validity

Token Management

  • GET /eth/add_token_address/:tokenAddress - Add token address
  • GET /eth/remove_token_address/:tokenAddress - Remove token address

USDT Operations

  • GET /eth/sweep/usdt - Sweep USDT to admin address
  • GET /eth/transfer/usdt - Transfer USDT between addresses

Network Configuration

  • GET /eth/set_network - Set Ethereum network
  • GET /eth/set_min_balance - Set minimum balance threshold, it will be check when sweep

Account Management

  • GET /eth/acct_gen_admin - Generate admin account
  • GET /eth/get_admin - Get Admin Info
  • GET /eth/acct_gen - Generate new account
  • GET /eth/balances/:addr - Get Balance of Addr

TRON Operations(TBD)

  • Various endpoints for TRON address management and transactions

For detailed API documentation, visit /docs endpoint after starting the server.

Error Handling

The API uses standard HTTP status codes:

  • 200: Success
  • 400: Bad request
  • 401: Unauthorized
  • 404: Not found
  • 500: Server error

Development

Project Structure

deno/
β”œβ”€β”€ app.ts              # Application entry point
β”œβ”€β”€ routes/            
β”‚   β”œβ”€β”€ ethereum.ts     # Ethereum-related routes
β”‚   β”œβ”€β”€ tron.ts        # TRON-related routes
β”‚   └── misc.ts        # Miscellaneous routes
β”œβ”€β”€ services/
β”‚   └── ethereum.ts     # Ethereum service implementations
└── utils/
    β”œβ”€β”€ auth.ts        # Authentication utilities
    └── utils.ts       # General utilities

Dependencies

  • Oak - HTTP server framework
  • CORS - CORS middleware
  • Various blockchain-related libraries

Production Deployment

For production deployment:

  1. Implement proper authentication mechanisms
  2. Set up rate limiting
  3. Use secure environment variables
  4. Configure CORS appropriately
  5. Implement monitoring and logging
  6. Use HTTPS
  7. Regular security audits

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

MIT License

Copyright (c) 2024 Feather Multi Chain Wallet System

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Multi-Chain Wallet System Frontend

TODO.

About

A multi-chain wallet solution based on deno, as light as a feather πŸͺΆ.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages