Git Product home page Git Product logo

skycoin's Introduction

skycoin GoDoc Go Report Card

Skycoin is a next-generation cryptocurrency.

Skycoin improves on Bitcoin in too many ways to be addressed here.

Skycoin is small part of OP Redecentralize and OP Darknet Plan.

Installation

For OSX:

  1. Install homebrew, if you don't have it yet
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Install the latest version of golang
$ brew install go
  1. Setup $GOPATH variable, add it to ~/.bash_profile (or bashrc). After editing, open a new tab Add to bashrc or bash_profile
$ export GOPATH=/Users/<username>/go
$ export PATH=$PATH:$GOPATH/bin
  1. Install Mercurial and Bazaar
$ brew install mercurial bzr
  1. Fetch the latest code of skycoin from the github repository
$ go get github.com/skycoin/skycoin
  1. Change your current directory to $GOPATH/src/github.com/skycoin/skycoin
$ cd $GOPATH/src/github.com/skycoin/skycoin
  1. Running Wallet
$ ./run.sh
OR
# go run ./cmd/skycoin/skycoin.go
For Options
# go run ./cmd/skycoin/skycoin.go --help

For linux:

$ sudo apt-get install curl git mercurial make binutils gcc bzr bison libgmp3-dev screen -y

#Setup Golang

  • use gvm
  • else download binary and follow instructions

#Golang ENV setup with gvm

In China, use --source=https://github.com/golang/go to bypass firewall when fetching golang source

$ sudo apt-get install bison curl git mercurial make binutils bison gcc build-essential
$ bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
$ source $HOME/.gvm/scripts/gvm

$ gvm install go1.4 --source=https://github.com/golang/go
$ gvm use go1.4
$ gvm install go1.8
$ gvm use go1.8 --default

If you open up new terminal and the go command is not found then add this to .bashrc . GVM should add this automatically

$ [[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
$ gvm use go1.8 >/dev/null

The skycoin repo must be in $GOPATH, under src/github.com/skycoin. Otherwise golang programs cannot import the libraries.

#pull skycoin repo into the gopath
#note: puts the skycoin folder in $GOPATH/src/github.com/skycoin/skycoin
go get -v github.com/skycoin/skycoin/...

#create symlink of the repo
$ cd $HOME
$ ln -s $GOPATH/src/github.com/skycoin/skycoin skycoin

Dependencies

Dependencies are managed with gvt.

To install gvt:

$ go get -u github.com/FiloSottile/gvt

gvt vendors all dependencies into the repo.

If you change the dependencies, you should update them as needed with gvt fetch, gvt update, gvt delete, etc.

Refer to the gvt documentation or gvt help for further instructions.

Running A Skycoin Node

$ cd skycoin
$ screen
$ go run ./cmd/skycoin/skycoin.go
#then ctrl+A then D to exit screen
#screen -x to reattach screen

##Todo

Use gvm package set, so repo does not need to be symlinked. Does this have a default option?

$ gvm pkgset create skycoin
$ gvm pkgset use skycoin
$ git clone https://github.com/skycoin/skycoin
$ cd skycoin
$ go install

##Cross Compilation

Install Gox:

$ go get github.com/mitchellh/gox

Compile:

$ gox --help
$ gox [options] cmd/skycoin/

Local Server API

Run the skycoin client then

http://127.0.0.1:6420/wallets
- to get your wallet seed. Write this down

http://127.0.0.1:6420/wallet/balance?id=2016_02_17_9671.wlt
- to get wallet balance (use wallet filename as id)
- TODO: allow addresses for balance check

http://127.0.0.1:6420/outputs to see outputs (address balances)

http://127.0.0.1:6420/blocks?start=0&end=5000 to see all blocks and transactions.

http://127.0.0.1:6420/network/connections to check network connections

http://127.0.0.1:6420/blockchain/metadata to check blockchain head

Skycoin explorer

http://explorer.skycoin.net

Modules

/src/cipher - cryptography library
/src/coin - the blockchain
/src/daemon - networking and wire protocol
/src/visor - the top level, client
/src/gui - the web wallet and json client interface
/src/wallet - the private key storage library

Meshnet

$ go run ./cmd/mesh/*.go -config=cmd/mesh/sample/config_a.json
$ go run ./cmd/mesh/*.go -config=cmd/mesh/sample/config_b.json

Meshnet reminders

  • one way latency
  • two way latency (append), latency between packet and ack
  • service handler (ability to append services to meshnet)
  • uploading bandwidth, latency measurements over time
  • end-to-end route instrumentation

Rebuilding Wallet HTML

$ npm install
$ gulp build

Release Builds

$ npm install
$ gulp dist

CLI

See the doc of command line interface here.

WebRPC

See the doc of webrpc here.

skycoin's People

Contributors

iketheadore avatar gz-c avatar spurserh avatar nakulpandey avatar zgordan-vv avatar polarislee1984 avatar karlob avatar dmitrybugrov avatar logrusorgru avatar masthead avatar morphium avatar cryptrol avatar johnstuartmill avatar cell4711 avatar

Watchers

James Cloos avatar Dima avatar

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.