Skip to content

Commit a5dac22

Browse files
author
Lucien Grondin
committed
simplify synopsis
1 parent 9ff39cd commit a5dac22

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bitcoin bash tools
22

3-
This is a set of bash functions to manipulate bitcoin addresses, but mostly to generate keys for cold storage.
3+
This is a set of bash functions to generate bitcoin private keys and addresses.
44

55
When I first conceived these functions, tools like
66
[sx](https://sx.dyne.org/index.html) or its successor
@@ -11,37 +11,23 @@ utility does everything that I wanted to do and more, except it's not written in
1111
I like bash for its ''out-of-the-box'' availibility in a GNU system, so I will likely continue
1212
to developp bitcoin-bash-tools, aiming at making it a translation of bx into bash.
1313

14-
1514
## Synopsis
1615

1716
$ git clone https://github.com/grondilu/bitcoin-bash-tools.git
1817
$ cd bitcoin-bash-tools/
1918
$ . bitcoin.sh
2019

21-
$ let -i a=RANDOM b=RANDOM
22-
$ secp256k1 $a
23-
$ secp256k1 $b
24-
$ for i in $a $b; do secp256k1 $i; done | secp256k1
25-
$ secp256k1 $((a+b))
26-
27-
$ # Bitcoin book, chap. 04, example 6 :
28-
$ prv=3aba4162c7251c891207b747840551a71939b0de081f85c4e44cf7c13e41daa6
29-
$ secp256k1 "$prv"
30-
025C0DE3B9C8AB18DD04E3511243EC2952002DBFADC864B9628910169D9B9B00EC
31-
$ bitcoinAddress "$(!!)"
32-
14cxpo3MBCYYWCgF74SWTdcmxipnGUsPw3
33-
$ bitcoinAddress "$(secp256k1 -u "$prv")"
34-
1thMirt546nngXqyPEz532S8fLwbozud8
35-
$ newBitcoinKey -u "$prv"
36-
5JG9hT3beGTJuUAmCQEmNaxAuMacCTfXuw1R3FCXig23RQHMr4K
37-
$ newBitcoinKey "$prv"
38-
KyBsPXxTuVD82av65KZkrGrWi5qLMah5SdNq6uftawDbgKa2wv6S
20+
$ newBitcoinKey
3921

4022
$ . bip-0032.sh
4123
$ openssl rand 64 > entropy
4224
$ m="$(bip32 < entropy)"
4325
$ bip32 $m/N
4426
$ bip32 $m/0h/5/7
27+
28+
$ . bip-0173.sh
29+
$ segwitAddress -p 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
30+
$ bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
4531

4632
$ prove t/*.t.sh
4733

0 commit comments

Comments
 (0)