Closed nohea closed 6 years ago
Why would you create a script address based on a public or private key? Script addresses are based on scripts.
Hm @hrobeers good point. Now that i think about it, i did this last month to generate a bunch of script addresses for tests. Doesn't seem very useful generally now! Closing.
@nohea for generating P2SH addresses (and redeem scripts) satin-blocks could use a block to plug behind the satin-compile block https://github.com/hrobeers/satin-blocks
Thanks - satin-blocks i can use to get up to speed on P2SH
If you just want to learn and play with P2SH, I suggest to look at: https://medium.com/@hrobeers/p2sh-bitcoin-script-puzzle-explained-26c8cb03ff90
It also explains how to use peerscript-labs which is fully functional for creating and spending P2SH transactions on the peercoin testnet.
But feel free to contribute to satin-blocks. It is meant to replace the peerscript labs js libs.
I needed to add
--output-type script-address
for a coin project. So here's my patch for the upstream project.Usage example:
./bitcoin-tool --network bitcoin --input-type private-key-wif --input-format base58check --input 5JZjfs5wJv1gNkJXCmYpyj6VxciqPkwmK4yHW8zMmPN1PW7Hk7F --output-type script-address --output-format base58check