mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	Update 8_1_Understanding_the_Foundation_of_P2SH.md
This commit is contained in:
		
							parent
							
								
									6ff1a795b8
								
							
						
					
					
						commit
						073bb11395
					
				| @ -102,7 +102,21 @@ Here's what the individual parts mean: | |||||||
| 
 | 
 | ||||||
| In other words, that `redeemScript` was a translation of of "2 0307fd375ed7cced0f50723e3e1a97bbe7ccff7318c815df4e99a59bc94dbcd819 0367c4f666f18279009c941e57fab3e42653c6553e5ca092c104d1db279e328a28 2 OP_CHECKMULTISIG"  | In other words, that `redeemScript` was a translation of of "2 0307fd375ed7cced0f50723e3e1a97bbe7ccff7318c815df4e99a59bc94dbcd819 0367c4f666f18279009c941e57fab3e42653c6553e5ca092c104d1db279e328a28 2 OP_CHECKMULTISIG"  | ||||||
| 
 | 
 | ||||||
| If you'd like a mechanical hand with this sort of translation in the future, take a look at the online [Chain Query](https://chainquery.com/bitcoin-api/decodescript), which translates from hexcode to opcode, or the Python [Transaction Script Compiler](https://github.com/Kefkius/txsc), which translates back and forth. | If you'd like a mechanical hand with this sort of translation in the future, you can use `bitcoin-cli decodescript`: | ||||||
|  | ``` | ||||||
|  | $ bitcoin-cli -named decodescript hexstring=52210307fd375ed7cced0f50723e3e1a97bbe7ccff7318c815df4e99a59bc94dbcd819210367c4f666f18279009c941e57fab3e42653c6553e5ca092c104d1db279e328a2852ae | ||||||
|  | { | ||||||
|  |   "asm": "2 0307fd375ed7cced0f50723e3e1a97bbe7ccff7318c815df4e99a59bc94dbcd819 0367c4f666f18279009c941e57fab3e42653c6553e5ca092c104d1db279e328a28 2 OP_CHECKMULTISIG", | ||||||
|  |   "reqSigs": 2, | ||||||
|  |   "type": "multisig", | ||||||
|  |   "addresses": [ | ||||||
|  |     "mg7YqyvK8HUFvpgZ5iYTfZ5vjfaJWnNTd9",  | ||||||
|  |     "mfduLxpR6Bq1ARctV2TauhetWwqnqH1vYS" | ||||||
|  |   ], | ||||||
|  |   "p2sh": "2NAGfA4nW6nrZkD5je8tSiAcYB9xL2xYMCz" | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  | Also consider the Python [Transaction Script Compiler](https://github.com/Kefkius/txsc), which translates back and forth. | ||||||
| 
 | 
 | ||||||
| _If this is intimidating, don't worry about it; as we said, this will usually be done with an API. As we lay bare the foundation of P2SH Scripting, we're mostly explaining what those APIs will do._ | _If this is intimidating, don't worry about it; as we said, this will usually be done with an API. As we lay bare the foundation of P2SH Scripting, we're mostly explaining what those APIs will do._ | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user