Code Monkey home page Code Monkey logo

bitcoin-address-tutorial's Introduction

bitcoin-address-tutorial

Rust CLI application that generates different Bitcoin addresses

  • P2PKH
  • P2SH
  • P2WSH ( WIP )

Help

  1. Generate P2PKH address
$ cargo run -- --type p2pkh --private_key a966eb6058f8ec9f47074a2faadd3dab42e2c60ed05bc34d39d6c0e1d32b8bdf

Output

================= Generating P2PKH Address =================
P2PKH Address: 
16JrGhLx5bcBSA34kew9V6Mufa4aXhFe9X
======================================
  1. Generate simple P2SH address
$ cargo run -- --type p2sh --spending_pub_key 020ae29f86f404e4b302cfa17ff15d93149af6a54c80a4172d47e41f55f6a78d73

Output

================= Generating P2SH address =================
Redeem Script: 
21020ae29f86f404e4b302cfa17ff15d93149af6a54c80a4172d47e41f55f6a78d73ac
P2SH Address: 
38RgUAR367PFbFFgS57BYcERHkpqHEMBvA
======================================
  1. Generate 2-3 Multisig P2SH address
cargo run -- --type p2sh --spending_pub_key 020ae29f86f404e4b302cfa17ff15d93149af6a54c80a4172d47e41f55f6a78d73,03664d528eb80096671ef9011c533ceb5df133238e3690d88f2960c786398b86b1,029a449ea4a2155ea10002d704604bb3e8606631d35af20889a74b82b2dab572f6

Output

================= Generating P2SH address =================
Redeem Script: 
5221020ae29f86f404e4b302cfa17ff15d93149af6a54c80a4172d47e41f55f6a78d732103664d528eb80096671ef9011c533ceb5df133238e3690d88f2960c786398b86b121029a449ea4a2155ea10002d704604bb3e8606631d35af20889a74b82b2dab572f653ae
P2SH Address: 
3DD4YP2T75TQtf84KrHzYVLYgNAeaHWqxq
======================================
  1. Generate sample public and compressed private key pairs
$ cargo run -- -k                       

Output

================= key pair =================
Private Key
3b76757db8d6cef7ebb95c96f2ab67f947d09b76692cefcb3b916aead1631dc6
Public Key
02b026bbc7233a3f5a0c107b5f74578712a7db9bf8
======================================

LICENSE

MIT

bitcoin-address-tutorial's People

Contributors

samparsky avatar

Watchers

 avatar  avatar  avatar

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.