Giter Club home page Giter Club logo

shellnet-webwallet-go's Introduction

Shellnet

screenshot

Setup on Ubuntu 16.04+

Install the required packages.
sudo apt install git postgresql postgresql-contrib redis-server
Install golang-1.10

Don't forget to make your GOPATH export persistent.

Install the necessary go libraries

go get \
	github.com/gomodule/redigo/redis \
	github.com/julienschmidt/httprouter \
	github.com/lib/pq \
	github.com/opencoff/go-srp \
	github.com/ulule/limiter \
	github.com/ulule/limiter/drivers/middleware/stdlib \
	github.com/ulule/limiter/drivers/store/memory \
	github.com/dchest/captcha

Clone the Shellnet repo in your ${GOPATH}/src.

Postgres Setup

Configure postgres user

Setup user database
~$ cat user_db.sql | psql -U <username> -h <host>
Setup transactions database
~$ cat transaction_db.sql | psql -U <username> -h <host>

Setup Turtlecoin service

Run this once to generate a wallet container. ~$ ./turtle-service --container-file <container name> -p <password> -g

Point turtle-service at an existing daemon like this ~$ ./turtle-service --rpc-password <rpc password> --container-file <container name> -p <container password> -d --daemon-address <daemon DNS or IP address> --daemon-port <daemon port>

Start redis-server

Configure and start run scripts

Edit these files:

  • services/main/run.sh
#!/usr/bin/env bash
HOST_URI='https://shellnet.pw' \ # Web wallet address
HOST_PORT=':8080' \ # Internal server port
USER_URI='http://localhost:8081' \ # Internal requests to user api
WALLET_URI='http://localhost:8082' \ # Internal requests to wallet api
go run main.go utils.go
  • services/wallet/run.sh
#!/usr/bin/env bash
DB_USER=<postgres username> \ # Postgres DB username, NOT system account username
DB_PWD=<postgres password> \ # Postgres DB password, NOT system account password
HOST_URI='http://localhost' \ # Internal wallet api
HOST_PORT=':8082' \ # Internal wallet api port
RPC_PWD=<turtle-service RPC password>  \ # Your turtle-service RPC password
RPC_PORT=':8070' \ # Your turtle-service RPC port
go run wallet.go utils.go
  • services/user/run.sh
#!/usr/bin/env bash
DB_USER=<postgres username> \ # Postgres DB username, NOT system account username
DB_PWD=<postgres password> \ # Postgres DB password, NOT system account password
HOST_URI='http://localhost' \ # Internal user api
HOST_PORT=':8081' \ # Internal user api port
WALLET_URI='http://localhost:8082' \ # Internal wallet api
go run users.go utils.go

~$ cd services/main ; ./run.sh & disown
~$ cd services/wallet ; ./run.sh & disown
~$ cd services/user ; ./run.sh & disown

Todo

  • Finish walletd integration
  • Make Front-end pretty
  • add documentation
  • automate tasks
  • add tests

Dependencies

  • Redis
  • Postgresql
  • Go
  • TurtleCoin wallet daemon

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.