Giter VIP home page Giter VIP logo

ethwallet's Introduction

本项目是ETH钱包的实现

了解知识

现在的平台的数字货币钱包都是中心化的,一般会为个人开一个账户,然后机构开一个账户

当外部账户充值到平台一般是先充值到个人账户然后再转账到机构账户

两笔转账都是走公链,转账到机构账户以后方便平台自己清算。

实现功能

用户注册

申请钱包

转账充值

服务端实现技术

服务器采用node.js

数据库使用mongodb

ETH 客户端使用 Ganache

使用jwt 来做客户端token

数据库使用mongoose 进行对象管理和数据库连接

测试框架采用mocha

执行测试案例 npm test

运行项目npm start

服务端配置文件

配置在config 文件夹下面

{
    "appConfig": {
      "dbConfig": {
        "host": "localhost",
        "port": 5984,
        "dbName": "mydb"
      },
      "server":{
          "host":"localhost",
          "port":3005
      },
      "jwtConfig":{
          "jwtTokenSecret":"!qaz2WSX#edc4RFV'"
      },
      "web3":{
          "host":"127.0.0.1",
          "port":"7545"
      }
    }
  }

客户端

客户端使用react create app 构建

npm i

npm run start

参考

http://web3js.readthedocs.io/en/1.0/

https://github.com/lukaswhite/jwt-node-express

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.