bitcoinnova-webwallet-go

module
v0.0.0-...-6e82365 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2019 License: MIT

README

Official Bitcoin Nova Web Wallet

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 Bitcoin Nova service

Run this once. ~$ ./Bitcoinnova-service --container-file <container name> -p <password> -g

Start Bitcoinnova-service ~$ ./Bitcoinnova-service --rpc-password <password> --container-file <container name> -p <container password> -d

Point Bitcoinnova-service at an existing daemon like this ~$ ./Bitcoinnova-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://wallet.bitcoinnova.org' \ # Web wallet address
HOST_PORT=':80' \ # 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=<Bitcoinnova-service RPC password>  \ # Your Bitcoinnova-service RPC password
RPC_PORT=':8070' \ # Your Bitcoinnova-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
  • Bitcoin Nova Wallet Daemon

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL