added gettoraddress private endpoint
This commit is contained in:
		
							parent
							
								
									7d8c3f75e4
								
							
						
					
					
						commit
						6c75c525d2
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -20,6 +20,7 @@ from onionrutils import mnemonickeys | |||
| from onionrutils import bytesconverter | ||||
| from etc import onionrvalues | ||||
| from utils import reconstructhash | ||||
| from utils.gettransports import get as get_tor | ||||
| """ | ||||
|     This program is free software: you can redistribute it and/or modify | ||||
|     it under the terms of the GNU General Public License as published by | ||||
|  | @ -140,3 +141,8 @@ class PrivateEndpoints: | |||
|         def is_tor_ready(): | ||||
|             """If Tor is starting up, the web UI is not ready to be used.""" | ||||
|             return Response(str(g.too_many.get(NetController).readyState).lower()) | ||||
|          | ||||
|         @private_endpoints_bp.route('/gettoraddress') | ||||
|         def get_tor_address(): | ||||
|             """Return public Tor v3 Onion address for this node""" | ||||
|             return Response(get_tor()[0]) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue