mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-11-13 19:38:56 +00:00
Cleaned up script, enclosed in quotes, removed spaces #403
This commit is contained in:
parent
f5c0df0ed5
commit
19952cdec0
@ -651,8 +651,10 @@ script hash = RIPEMD160(SHA256(script))
|
||||
The resulting "script hash" is encoded with Base58Check with a version prefix of 5, which results in an encoded address starting with a +3+. An example of a P2SH address is +3F6i6kwkevjR7AsAd4te2YB2zZyASEm1HM+, which can be derived using the Bitcoin Explorer commands +script-encode+, +sha256+, +ripemd160+, and +base58check-encode+ (see <<appdx_bx>>) as follows:
|
||||
|
||||
----
|
||||
$ echo dup hash160 [89abcdefabbaabbaabbaabbaabbaabbaabbaabba] equalverify checksig > script
|
||||
$ bx script-encode < script | bx sha256 | bx ripemd160 | bx base58check-encode --version 5
|
||||
$ echo \
|
||||
'DUP HASH160 [89abcdefabbaabbaabbaabbaabbaabbaabbaabba] EQUALVERIFY CHECKSIG' > script
|
||||
$ bx script-encode < script | bx sha256 | bx ripemd160 \
|
||||
| bx base58check-encode --version 5
|
||||
3F6i6kwkevjR7AsAd4te2YB2zZyASEm1HM
|
||||
----
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user