- A blockchain, originally block chain, is a growing list of records, called blocks, which are linked using cryptography.
- Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data (generally represented as a merkle tree root hash).
a block chain in golang with command line interface builtin.
USAGE:
• getbalance -address ADDRESS - get balance for address.
• createblockchain -address ADDRESS - creates a blockchain.
• printchain - prints the blocks in the blockchain.
• send -from FROM -to TO -amount AMOUNT - send amount from an address to an address.
• createwallet - creates a new wallet.
• listaddresses - lists the addresses in our wallet file.
- getbalance:
$ $EXECUTABLE getbalance -address ADDRESS- To get balance of address 'ADDRESS'.
- createblockchain:
$ $EXECUTABLE createblockchain -address ADDRESS- To create a blockchain and send reward to the address 'ADDRESS'.
- printchain:
$ $EXECUTABLE printchain- To print the blocks in the blockchain.
- send:
$ $EXECUTABLE send -from FROM -to TO -amount AMOUNT- To send amount AMOUNT from address 'FROM' to address 'TO'.
- createwallet:
$ $EXECUTABLE createwallet- To create a wallet and store it in the wallets database.
- listaddresses:
$ $EXECUTABLE listaddresses- To list all public addresses in the wallets database.
$EXECUTABLE evaluvates to:
- dev:
go run main.go - build:
- First build the module.
$ go build - After building the module.
$PWD/go-blockchain
- First build the module.


