You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/douglasmakey/blockchain

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/douglasmakey/blockchain

v0.0.0-20180314031109-1558acbf46f1
Source
Go
Version published
Created
Source

Blockchain with Go

Simple example to understand and learn about Blockchain.

go build

Next

$ ./blockchain history
Mining the block with data "GenesisBlock"
00002bcb38688ce4b1ca7b4b7dd28a079d5de93c01e8fae26e326f8b1c983fc3

Prev. hash:
Data: GenesisBlock
Hash: 00002bcb38688ce4b1ca7b4b7dd28a079d5de93c01e8fae26e326f8b1c983fc3
PoW Validation: true

$ ./blockchain add -data "Pay 1 BTC for a car"
Mining the block with data "Pay 1 BTC for a car"
0000613f831bf20420fe5465405b23631d5422514161d8fa9db4b1abe69d6d1b

Done!

$ ./blockchain history
Prev. hash: 00002bcb38688ce4b1ca7b4b7dd28a079d5de93c01e8fae26e326f8b1c983fc3
Data: Pay 1 BTC for a car
Hash: 0000613f831bf20420fe5465405b23631d5422514161d8fa9db4b1abe69d6d1b
PoW Validation: true

Prev. hash:
Data: GenesisBlock
Hash: 00002bcb38688ce4b1ca7b4b7dd28a079d5de93c01e8fae26e326f8b1c983fc3
PoW Validation: true

FAQs

Package last updated on 14 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts