mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 18:37:36 +00:00 
			
		
		
		
	Update 03_3__Interlude_Using_Command-Line_Variables.md
As explained in previous file of this book, if the "legacy" option is not used, the signature can't be made. $ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress) $ echo $NEW_ADDRESS_1 2MxuvthTutriscciS5WkjixoMDneEizSwVW $ NEW_SIG_1=$(bitcoin-cli signmessage $NEW_ADDRESS_1 "Hello World") error code: -3 error message: Address does not refer to key
This commit is contained in:
		
							parent
							
								
									0323d71d99
								
							
						
					
					
						commit
						7332ef2820
					
				| @ -13,7 +13,7 @@ That's a simple command substitution, the equivalent to ``VARIABLE=`command` ``. | |||||||
| To create a new address would then look like this: | To create a new address would then look like this: | ||||||
| ``` | ``` | ||||||
| $ unset NEW_ADDRESS_1 | $ unset NEW_ADDRESS_1 | ||||||
| $ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress) | $ NEW_ADDRESS_1=$(bitcoin-cli getnewaddress "" legacy) | ||||||
| ``` | ``` | ||||||
| These commands clear the NEW_ADDRESS_1 variable, just to be sure, then fill it with the results of the `bitcoin-cli getnewaddress` command. | These commands clear the NEW_ADDRESS_1 variable, just to be sure, then fill it with the results of the `bitcoin-cli getnewaddress` command. | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user