node

module
v0.0.0-...-902e17f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: MIT

README

Mediacoin Blockchain Node

Install Node

Install Golang (version ≥ 1.11)

for Linux

apt-get install golang

or

wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.11.5.linux-amd64.tar.gz

or follow the installation instructions: https://golang.org/doc/install

Install or update node
go get -u -v github.com/mediacoin-pro/node/cmd/mdcnode
go build -o mdcnode github.com/mediacoin-pro/node/cmd/mdcnode
Show Node version, arguments
./mdcnode -version
./mdcnode -help

Start Node

nohup ./mdcnode -http=127.0.0.1:8888 -dir=$HOME/mdc </dev/null >/var/log/mdcnode.log 2>&1 &

Node REST API

http://127.0.0.1:8888/<command>? [&pretty] &<param>=<value>.... 
Get general node and blockchain information
GET /info 
Get block
GET /block/<blockNum> 
Get blocks
GET /blocks?offset=<blockNum>&limit=<countBlocks> 
Get transaction
GET /tx/<txID:hex> 
Get address info
GET /address/<address> 
GET /address/@<username>
GET /address/0x<userID:hex> 
GET /address/?address=<address> 
Generate address with Memo
GET /address/?address&memo  
Get address info + memo code
GET /address/?address=<address>&memo=<memo> 
Get transaction list by address (+memo)
GET /txs/?address=<address> [&memo=<num|hex>] [&limit=<int>] [&order="asc"|"desc"] [&offset=<hex>]
Generate new key pair, address by secret-phrase
GET /new-key?seed=<secret_phrase>
Register user in blockchain
POST /new-user?login=<login>&password=<password>
Transfer founds to address
POST /new-transfer? &(seed|login&password|private) &address=<address> [&memo=<num|hex>] &amount=<num> [&comment] [&nonce=<num|hex>] 

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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