Git Product home page Git Product logo

go-bitcoin-demo's Introduction

概述

该项目介绍了比特币的基本原理,通过5个版本(da1-day5分支)的迭代,逐步介绍了:区块链、哈希、UTXO、梅克尔根、非对称加密、签名、私钥地址、ECDSA等晦涩概念,从而打下进入web3世界坚实的基础。

  • 建议配套阅读《精通比特币》一书,差缺补漏,事半功倍。
  • 以太坊学习请移步github:solidity-expert

项目资源

关于作者

国内第一批区块链布道者;2017年开始专注于区块链教育(btc, eth, fabric),目前base新加坡一线交易所,专注海外defi,dex,元宇宙等业务方向。

扫码入群

image-20220810134215759

安装

go mod init go-bitcoin
go mod tidy

编译

# ./build.sh
go build -o blockchain *.go

运行

./blockchain

blockchain

创建钱包

./blockchain createWallet

createwallet

打印钱包

./blockchain listAddress

listaddress

创世块

./blockchain create 15xGXrzZqrCHjZNcZSQyjDaToPX4agz9R7

getbalance

查询余额

./blockchain getBalance 1Q2DT2JithztxChbLhzEUTShrv78EW3duo

getbalance

转账

./blockchain send \
	1EiLdWg278u261DNs5Vb2Wyh7opscWvV6G \
	1Q2DT2JithztxChbLhzEUTShrv78EW3duo \
	5 1NkNkQUYXWwrw3ewNw3XSdMjdv5keVK1L3 \
	"send 5 btc"

send

打印交易

./blockchain printTx

printtx

go-bitcoin-demo's People

Contributors

dukedaily avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-bitcoin-demo's Issues

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.