go-blockchain

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 3 Imported by: 0

README

golanggolang Block Chain

MIT License

GitHub Gitter

Blockchain

  • 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).

Description

a block chain in golang with command line interface builtin.

Language

Usage

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.

Utilities

  • 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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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