2020-05-10 21:11:21 -03:00
#Developer: Curly60e
2020-05-25 19:35:24 -03:00
#PyBLOCK its a clock of the Bitcoin blockchain.
2020-05-10 21:11:21 -03:00
2020-05-06 16:34:55 -03:00
import os
2020-05-16 00:21:47 -03:00
import os . path
2020-05-06 16:34:55 -03:00
import time as t
2020-05-16 00:21:47 -03:00
import pickle
2020-05-25 19:35:24 -03:00
import psutil
2020-05-29 11:52:29 -03:00
import qrcode
2020-06-19 17:51:28 -03:00
import random
2020-06-27 17:30:01 -03:00
import xmltodict
2020-06-24 17:08:28 -03:00
import sys
2020-06-25 11:25:36 -03:00
import subprocess
2020-07-13 19:28:56 -03:00
import requests
import json
import simplejson as json
2020-07-15 22:44:08 -03:00
from cfonts import render , say
2020-05-23 08:50:38 -03:00
from clone import *
2020-05-20 20:32:31 -03:00
from donation import *
2020-05-23 08:50:38 -03:00
from feed import *
2020-05-08 08:37:26 -03:00
from art import *
2020-05-18 22:25:55 -03:00
from logos import *
2020-05-25 19:35:24 -03:00
from sysinf import *
from pblogo import *
from apisnd import *
2020-06-19 17:51:28 -03:00
from ppi import *
2020-08-25 20:08:40 -03:00
from termcolor import colored , cprint
2020-05-30 21:46:11 -03:00
from nodeconnection import *
2020-05-29 11:52:29 -03:00
from terminal_matrix . matrix import *
2020-05-06 16:34:55 -03:00
2020-05-09 18:22:43 -03:00
2020-10-05 22:53:40 -03:00
version = " 0.8.0 "
2020-05-30 21:46:11 -03:00
def sysinfo ( ) : #Cpu and memory usage
print ( " \033 [0;37;40m---------------------- " )
print ( " \033 [3;33;40mCPU Usage: \033 [1;32;40m " + str ( psutil . cpu_percent ( ) ) + " % \033 [0;37;40m " )
print ( " \033 [3;33;40mMemory Usage: \033 [1;32;40m " " {} % \033 [0;37;40m " . format ( int ( psutil . virtual_memory ( ) . percent ) ) )
print ( " \033 [0;37;40m---------------------- " )
2020-09-24 21:08:56 -03:00
print ( " \a " )
2020-05-30 21:46:11 -03:00
def getblock ( ) : # get access to bitcoin-cli with the command getblockchaininfo
bitcoincli = " getblockchaininfo "
2020-06-25 12:15:27 -03:00
a = os . popen ( path [ ' bitcoincli ' ] + bitcoincli ) . read ( )
2020-06-11 16:40:02 -03:00
b = json . loads ( a )
d = b
print ( d )
clear ( )
print ( " \033 [1;32;40m " )
blogo ( )
print ( " \033 [0;37;40m " )
print ( " <<< Back to the Main Menu Press Control + C. \n \n " )
2020-06-25 20:27:22 -03:00
print ( " \n ---------------------------------------------------------------------------------------------------- " )
2020-06-11 16:40:02 -03:00
print ( """
Chain : { }
Blocks : { }
Best BlockHash : { }
Difficulty : { }
Verification Progress : { }
Size on Disk : { }
Pruned : { }
""" .format(d[ ' chain ' ], d[ ' blocks ' ], d[ ' bestblockhash ' ], d[ ' difficulty ' ], d[ ' verificationprogress ' ], d[ ' size_on_disk ' ], d[ ' pruned ' ]))
2020-06-25 20:27:22 -03:00
print ( " ---------------------------------------------------------------------------------------------------- \n " )
2020-05-30 21:46:11 -03:00
def getblockcount ( ) : # get access to bitcoin-cli with the command getblockcount
bitcoincli = " getblockcount "
2020-06-11 16:40:02 -03:00
os . system ( path [ ' bitcoincli ' ] + bitcoincli )
2020-05-30 21:46:11 -03:00
def clear ( ) : # clear the screen
os . system ( ' cls ' if os . name == ' nt ' else ' clear ' )
2020-06-10 19:02:49 -03:00
def getgenesis ( ) : # get and decode Genesis block
2020-05-30 21:46:11 -03:00
bitcoincli = " getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 0 | xxd -r -p | hexyl -n 256 "
2020-06-11 16:40:02 -03:00
os . system ( path [ ' bitcoincli ' ] + bitcoincli )
2020-06-10 19:02:49 -03:00
2020-05-30 21:46:11 -03:00
def close ( ) :
2020-07-25 10:52:44 -03:00
print ( " <<< Back Control + C. \n \n " )
2020-06-10 19:02:49 -03:00
2020-05-30 21:46:11 -03:00
def readHexBlock ( ) : # Hex Decoder using Hexyl on local node
hexa = input ( " Add the Block Hash you want to decode: " )
blocknumber = input ( " Add the Block number: " )
2020-06-11 16:40:02 -03:00
decodeBlock = path [ ' bitcoincli ' ] + " getblock {} {} " . format ( hexa , blocknumber ) + " | xxd -r -p | hexyl -n 256 "
2020-05-30 21:46:11 -03:00
os . system ( decodeBlock )
2020-06-10 19:02:49 -03:00
2020-05-30 21:46:11 -03:00
def readHexTx ( ) : # Hex Decoder using Hexyl on an external node
hexa = input ( " Add the Transaction ID. you want to decode: " )
2020-06-11 16:40:02 -03:00
decodeTX = path [ ' bitcoincli ' ] + " getrawtransaction {} " . format ( hexa ) + " | xxd -r -p | hexyl -n 256 "
2020-05-30 21:46:11 -03:00
os . system ( decodeTX )
2020-06-10 19:02:49 -03:00
2020-05-30 21:46:11 -03:00
def tmp ( ) :
t . sleep ( 15 )
2020-05-18 22:25:55 -03:00
def console ( ) : # get into the console from bitcoin-cli
2020-05-25 19:35:24 -03:00
print ( " \t \033 [0;37;40mThis is \033 [1;33;40mBitcoin-cli ' s \033 [0;37;40mconsole. Type your respective commands you want to display. \n \n " )
2020-05-18 22:25:55 -03:00
while True :
2020-05-25 19:35:24 -03:00
cle = input ( " \033 [1;32;40mconsole $>: \033 [0;37;40m " )
2020-06-11 16:40:02 -03:00
lsd = os . popen ( path [ ' bitcoincli ' ] + " " + cle )
2020-05-27 08:59:36 -03:00
lsd0 = lsd . read ( )
lsd1 = str ( lsd0 )
print ( lsd1 )
lsd . close ( )
2020-05-29 11:52:29 -03:00
def screensv ( ) :
try :
doit ( )
except ( KeyboardInterrupt , SystemExit ) :
matrix . close ( )
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-29 11:52:29 -03:00
menu ( )
2020-06-24 17:08:28 -03:00
def delay_print ( s ) :
for c in s :
sys . stdout . write ( c )
sys . stdout . flush ( )
time . sleep ( 0.25 )
2020-06-04 14:28:45 -03:00
#------------------------------------------------------
2020-05-06 17:04:20 -03:00
2020-05-09 18:22:43 -03:00
def connected ( info ) : # here we complete the connection to the external node
2020-06-25 18:53:52 +00:00
if info in [ " Y " , " y " ] :
2020-05-13 19:47:58 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-13 19:47:58 -03:00
print ( " \n Add your node information \n " )
2020-05-15 07:41:42 -03:00
menuUserConn ( )
2020-05-09 18:22:43 -03:00
else :
2020-05-13 19:47:58 -03:00
menu ( )
2020-05-24 14:15:12 -03:00
2020-05-09 18:22:43 -03:00
def artist ( ) : # here we convert the result of the command 'getblockcount' on a random art design
2020-09-24 21:08:56 -03:00
while True :
try :
clear ( )
close ( )
design ( )
tmp ( )
except ( KeyboardInterrupt , SystemExit ) :
menu ( )
raise
2020-05-16 12:51:30 -03:00
2020-05-10 21:11:21 -03:00
def design ( ) :
2020-06-11 16:40:02 -03:00
bitcoinclient = path [ ' bitcoincli ' ] + " getblockcount "
2020-05-10 21:11:21 -03:00
block = os . popen ( str ( bitcoinclient ) ) . read ( ) # 'getblockcount' convert to string
2020-05-24 14:15:12 -03:00
b = block
2020-09-24 21:08:56 -03:00
a = b
while True :
bitcoinclient = path [ ' bitcoincli ' ] + " getblockcount "
block = os . popen ( str ( bitcoinclient ) ) . read ( ) # 'getblockcount' convert to string
b = block
if b > a :
print ( " \033 [1;32;40m " )
tprint ( b , font = " rnd-large " )
print ( " \a \033 [0;37;40m " )
t . sleep ( 10 )
break
elif b == a :
print ( " \033 [1;32;40m " )
tprint ( b , font = " rnd-large " )
print ( " \033 [0;37;40m " )
t . sleep ( 10 )
clear ( )
closed ( )
else :
break
2020-06-11 19:49:41 -03:00
2020-05-07 10:59:47 -03:00
2020-05-16 00:21:47 -03:00
#--------------------------------- Hex Block Decoder Functions -------------------------------------
2020-05-25 19:35:24 -03:00
def getrawtx ( ) : # show confirmatins from transactions
tx = input ( " Insert your TxID: " )
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
close ( )
2020-05-27 17:34:26 -03:00
if tx == " 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b " :
print ( """ \t \t \n \033 [1;35;40mThis transaction it ' s the first one of the Bitcoin Blockchain on Block 0 by Satoshi Nakamoto.
You can decode that block in HEX and see what ' s inside. \033 [0;37;40m " " " )
t . sleep ( 10 )
else :
2020-06-25 18:53:52 +00:00
bitcoincli = " getrawtransaction "
2020-06-11 16:40:02 -03:00
lsd = os . popen ( path [ ' bitcoincli ' ] + bitcoincli + tx + " 1 " )
2020-05-27 17:34:26 -03:00
lsd0 = lsd . read ( )
lsd1 = str ( lsd0 )
lsda = lsd1 . split ( ' , ' )
lsdb = lsda [ - 3 ]
2020-06-10 19:02:49 -03:00
lsdc = str ( lsdb )
print ( " \033 [0;37;40mTransaction " + " \033 [1;31;40m {} \033 [0;37;40m " . format ( tx ) + " has: \n " + " \033 [1;31;40m {} \033 [0;37;40m " . format ( lsdc ) )
2020-05-27 17:34:26 -03:00
tmp ( )
lsd . close ( )
2020-05-25 19:35:24 -03:00
except ( KeyboardInterrupt , SystemExit ) :
menu ( )
2020-08-25 20:08:40 -03:00
def runthenumbers ( ) :
bitcoincli = " gettxoutsetinfo "
os . system ( path [ ' bitcoincli ' ] + bitcoincli )
input ( " \n Continue... " )
2020-09-25 19:56:40 -03:00
def countdownblock ( ) :
bitcoinclient = path [ ' bitcoincli ' ] + " getblockcount "
block = os . popen ( str ( bitcoinclient ) ) . read ( ) # 'getblockcount' convert to string
b = block
a = input ( " Insert your block target: " )
clear ( )
blogo ( )
print ( """
2020-09-25 20:10:29 -03:00
- - - - - - - - - - - - - - - - - - - - - BLOCK { } COUNTDOWN - - - - - - - - - - - - - - - - - - - - -
2020-09-25 19:56:40 -03:00
""" .format(a))
n = int ( b )
print ( " \n CountDown: " , b )
q = int ( a ) - int ( b )
print ( " Remaining: " + str ( q ) + " Blocks \n " )
while a > b :
try :
bitcoinclient = path [ ' bitcoincli ' ] + " getblockcount "
block = os . popen ( str ( bitcoinclient ) ) . read ( ) # 'getblockcount' convert to string
b = block
2020-09-25 21:00:38 -03:00
if a == b :
2020-09-25 19:56:40 -03:00
break
elif n != int ( b ) :
print ( " CountDown: " , b )
q = int ( a ) - int ( b )
print ( " Remaining: " + str ( q ) + " Blocks \n " )
n = int ( b )
except :
break
2020-09-25 21:08:56 -03:00
print ( " #RunTheNumbers " + str ( a ) + " PyBLOCK " )
2020-09-25 20:53:22 -03:00
input ( " \n Continue... " )
2020-09-26 22:55:48 -03:00
def localHalving ( ) :
bitcoinclient = path [ ' bitcoincli ' ] + " getblockcount "
block = os . popen ( str ( bitcoinclient ) ) . read ( ) # 'getblockcount' convert to string
2020-09-26 23:01:37 -03:00
b = block
2020-09-26 22:55:48 -03:00
c = b
oneh = 0 - int ( c ) + 210000
twoh = 210000 - int ( c ) + 210000
thrh = 420000 - int ( c ) + 210000
forh = 630000 - int ( c ) + 210000
fifh = 840000 - int ( c ) + 210000
sixh = 1050000 - int ( c ) + 210000
sevh = 1260000 - int ( c ) + 210000
eith = 1470000 - int ( c ) + 210000
ninh = 1680000 - int ( c ) + 210000
tenh = 1890000 - int ( c ) + 210000
q = """
2020-10-05 20:55:22 -03:00
\033 [ 0 ; 37 ; 40 - - - - - - - - - - - - - - - - - - - HALVING CLOCK - - - - - - - - - - - - - - - - - - -
2020-09-26 22:55:48 -03:00
1 st Halving : in { } Blocks { }
2 nd Halving : in { } Blocks { }
3 rd Halving : in { } Blocks { }
4 th Halving : in { } Blocks { }
5 th Halving : in { } Blocks { }
6 th Halving : in { } Blocks { }
7 th Halving : in { } Blocks { }
8 th Halving : in { } Blocks { }
9 th Halving : in { } Blocks { }
10 th Halving : in { } Blocks { }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
""" .format( " 0 " if int(c) == 210000 else oneh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " , " 0 " if int(c) == 420000 else twoh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " , " 0 " if int(c) == 630000 else thrh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " , " 0 " if int(c) == 840000 else forh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 840000 else " \033 [1;35;40mPENDING \033 [0;37;40m " , " 0 " if int(c) >= 1050000 else fifh , " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 1050000 else " \033 [1;35;40mPENDING \033 [0;37;40m " , sixh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 1260000 else " \033 [1;35;40mPENDING \033 [0;37;40m " , sevh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 1470000 else " \033 [1;35;40mPENDING \033 [0;37;40m " , eith, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 1680000 else " \033 [1;35;40mPENDING \033 [0;37;40m " , ninh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 1890000 else " \033 [1;35;40mPENDING \033 [0;37;40m " , tenh, " \033 [1;32;40mCOMPLETE \033 [0;37;40m " if int(c) >= 1890000 else " \033 [1;35;40mPENDING \033 [0;37;40m " )
print ( q )
input ( " \n Continue... " )
2020-05-16 00:21:47 -03:00
#--------------------------------- End Hex Block Decoder Functions -------------------------------------
2020-05-24 14:15:12 -03:00
2020-05-16 00:21:47 -03:00
#--------------------------------- Menu section -----------------------------------
def menu ( ) : #Main Menu
2020-05-13 19:47:58 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-13 19:47:58 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-06-11 16:40:02 -03:00
Local Node
2020-07-25 10:52:44 -03:00
Version { }
2020-05-25 19:35:24 -03:00
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 31 ; 40 mA . \033 [ 0 ; 37 ; 40 m Run PyBLOCK
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Show Blockchain information
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Show the Genesis Block
\033 [ 1 ; 32 ; 40 mD . \033 [ 0 ; 37 ; 40 m Decode in HEX any block
\033 [ 1 ; 32 ; 40 mE . \033 [ 0 ; 37 ; 40 m Decode in HEX any transaction
\033 [ 1 ; 32 ; 40 mF . \033 [ 0 ; 37 ; 40 m Show confirmations from a transaction
2020-08-25 20:08:40 -03:00
\033 [ 1 ; 32 ; 40 mG . \033 [ 0 ; 37 ; 40 m Run the Numbers
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mH . \033 [ 0 ; 37 ; 40 m Advanced
2020-05-29 11:52:29 -03:00
\033 [ 1 ; 33 ; 40 mL . \033 [ 0 ; 37 ; 40 m Lightning Network
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 34 ; 40 mS . \033 [ 0 ; 37 ; 40 m SatNode
2020-09-19 22:54:27 -03:00
\033 [ 1 ; 32 ; 40 mW . \033 [ 0 ; 37 ; 40 m Weather
2020-06-19 17:51:28 -03:00
\033 [ 3 ; 33 ; 40 mP . \033 [ 0 ; 37 ; 40 m Premium
2020-10-06 21:17:26 -03:00
\033 [ 3 ; 34 ; 40 mM . \033 [ 0 ; 37 ; 40 m Arcade
2020-08-25 21:42:25 -03:00
\033 [ 1 ; 32 ; 40 mN . \033 [ 0 ; 37 ; 40 m Settings
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 35 ; 40 mX . \033 [ 0 ; 37 ; 40 m Donate
\033 [ 1 ; 33 ; 40 mQ . \033 [ 0 ; 37 ; 40 m Exit
2020-07-25 10:52:44 -03:00
\n \n """ .format(version, checkupdate()))
2020-05-25 19:35:24 -03:00
menuA ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-24 14:15:12 -03:00
2020-05-16 00:21:47 -03:00
def menuUserConn ( ) : #Menu before connection over ssh
2020-05-15 07:41:42 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-15 07:41:42 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-06-11 16:40:02 -03:00
Remote Node RPC
2020-07-25 10:52:44 -03:00
Version { }
2020-05-25 19:35:24 -03:00
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 31 ; 40 mA . \033 [ 0 ; 37 ; 40 m Run PyBLOCK
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Show Blockchain information
2020-08-25 20:08:40 -03:00
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Run the Numbers
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 32 ; 40 mH . \033 [ 0 ; 37 ; 40 m Advanced
2020-08-25 20:08:40 -03:00
\033 [ 1 ; 33 ; 40 mL . \033 [ 0 ; 37 ; 40 m Lightning Network
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 34 ; 40 mS . \033 [ 0 ; 37 ; 40 m SatNode
2020-09-19 22:54:27 -03:00
\033 [ 1 ; 32 ; 40 mW . \033 [ 0 ; 37 ; 40 m Weather
2020-06-19 17:51:28 -03:00
\033 [ 3 ; 33 ; 40 mP . \033 [ 0 ; 37 ; 40 m Premium
2020-10-06 21:17:26 -03:00
\033 [ 3 ; 34 ; 40 mM . \033 [ 0 ; 37 ; 40 m Arcade
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mG . \033 [ 0 ; 37 ; 40 m Settings
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 35 ; 40 mX . \033 [ 0 ; 37 ; 40 m Donate
\033 [ 1 ; 33 ; 40 mQ . \033 [ 0 ; 37 ; 40 m Exit
2020-07-25 10:52:44 -03:00
\n \n """ .format(version, checkupdate()))
2020-06-11 16:40:02 -03:00
menuRemote ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-24 14:15:12 -03:00
2020-09-25 19:56:40 -03:00
def runTheNumbersMenu ( ) :
clear ( )
blogo ( )
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Local Run the Numbers Menu
Version { }
2020-09-26 22:55:48 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Countdown Block
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Countdown Halving
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Audit
2020-09-25 19:56:40 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
\n \n """ .format(version))
runTheNumbersControl ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def runTheNumbersMenuConn ( ) :
clear ( )
blogo ( )
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Remote Run the Numbers Menu
Version { }
2020-09-26 22:55:48 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Countdown Block
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Countdown Halving
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Audit
2020-09-25 19:56:40 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
\n \n """ .format(version))
runTheNumbersControlConn ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-09-19 22:54:27 -03:00
def weatherMenu ( ) :
clear ( )
blogo ( )
sysinfo ( )
print ( """ \t \t
2020-09-25 19:56:40 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Weather Menu
2020-09-19 22:54:27 -03:00
Version { }
2020-09-25 19:56:40 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Version 1
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Version 2
2020-09-19 22:54:27 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
\n \n """ .format(version))
menuWeather ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-25 19:35:24 -03:00
def advanceMenu ( ) : # Advanced Menu
2020-05-18 22:25:55 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-18 22:25:55 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Bitconi - cli Console
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m FunB
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Show QR from a Bitcoin Address
\033 [ 1 ; 32 ; 40 mS . \033 [ 0 ; 37 ; 40 m Sysinfo
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-05-25 19:35:24 -03:00
menuB ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-15 07:41:42 -03:00
2020-06-11 18:46:16 -03:00
def remoteadvanceMenu ( ) : # Advanced Menu
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-06-11 18:46:16 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Bitconi - cli Console
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m FunB
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Show QR from a Bitcoin Address
\033 [ 1 ; 32 ; 40 mS . \033 [ 0 ; 37 ; 40 m Sysinfo
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-06-11 18:46:16 -03:00
menuBA ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-25 19:35:24 -03:00
def dnt ( ) : # Donation selection menu
2020-05-20 20:32:31 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-20 20:32:31 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Developers Donation
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Testers Donation
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-05-25 19:35:24 -03:00
menuC ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
def dntDev ( ) : # Dev Donation Menu
2020-05-23 08:50:38 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-23 08:50:38 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m PayNym
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Bitcoin Address
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Lightning Network
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-05-25 19:35:24 -03:00
menuE ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
def dntTst ( ) : # Tester Donation Menu
2020-05-23 08:50:38 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-23 08:50:38 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Bitcoin Address
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Lightning Network
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-05-25 19:35:24 -03:00
menuF ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
def satnodeMenu ( ) : # Satnode Menu
2020-05-23 08:50:38 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-23 08:50:38 -03:00
print ( """ \t \t
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-05-25 19:35:24 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Start SatNode
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Feed
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Setup
\033 [ 1 ; 34 ; 40 mS . \033 [ 0 ; 37 ; 40 m Send a Message to Space
\033 [ 1 ; 36 ; 40 mD . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-05-25 19:35:24 -03:00
menuD ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-20 20:32:31 -03:00
2020-05-29 11:52:29 -03:00
def menuLND ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-29 11:52:29 -03:00
sysinfo ( )
print ( """ \t \t
2020-05-29 16:06:45 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Lightning Network Menu
2020-06-01 22:38:56 -03:00
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-05-29 11:52:29 -03:00
2020-05-29 16:06:45 -03:00
\033 [ 1 ; 32 ; 40 mI . \033 [ 0 ; 37 ; 40 m New Invoice
2020-05-29 11:52:29 -03:00
\033 [ 1 ; 31 ; 40 mP . \033 [ 0 ; 37 ; 40 m Pay Invoice
2020-06-04 14:28:45 -03:00
\033 [ 1 ; 32 ; 40 mQ . \033 [ 0 ; 37 ; 40 m Channel Balance
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 31 ; 40 mL . \033 [ 0 ; 37 ; 40 m List Invoices
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Show Channels
2020-06-01 22:38:56 -03:00
\033 [ 1 ; 33 ; 40 mB . \033 [ 0 ; 37 ; 40 m New Bitcoin Address
2020-06-11 16:40:02 -03:00
\033 [ 1 ; 33 ; 40 mX . \033 [ 0 ; 37 ; 40 m List Onchain Transactions
2020-06-04 14:28:45 -03:00
\033 [ 1 ; 32 ; 40 mN . \033 [ 0 ; 37 ; 40 m Get Node Info
\033 [ 1 ; 32 ; 40 mO . \033 [ 0 ; 37 ; 40 m Onchain Balance
2020-05-29 11:52:29 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-05-29 11:52:29 -03:00
menuLN ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-05-24 14:15:12 -03:00
2020-07-15 22:44:08 -03:00
def settings4 ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Change Logo Design
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Change Logo Colors
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuSettings ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-07-26 14:22:22 -03:00
def designQ ( ) :
2020-07-15 22:44:08 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Design Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Block
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Slick
\033 [ 1 ; 31 ; 40 mC . \033 [ 0 ; 37 ; 40 m Tiny
\033 [ 1 ; 31 ; 40 mD . \033 [ 0 ; 37 ; 40 m Grid
\033 [ 1 ; 31 ; 40 mE . \033 [ 0 ; 37 ; 40 m Pallet
\033 [ 1 ; 31 ; 40 mF . \033 [ 0 ; 37 ; 40 m Shade
\033 [ 1 ; 31 ; 40 mG . \033 [ 0 ; 37 ; 40 m Chrome
\033 [ 1 ; 31 ; 40 mH . \033 [ 0 ; 37 ; 40 m Simple
\033 [ 1 ; 31 ; 40 mI . \033 [ 0 ; 37 ; 40 m Simple Block
\033 [ 1 ; 31 ; 40 mJ . \033 [ 0 ; 37 ; 40 m 3 D
\033 [ 1 ; 31 ; 40 mK . \033 [ 0 ; 37 ; 40 m Simple 3 D
\033 [ 1 ; 31 ; 40 mL . \033 [ 0 ; 37 ; 40 m Huge
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuDesign ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def colors ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Colors Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Front Color
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Back Color
\033 [ 1 ; 31 ; 40 mC . \033 [ 0 ; 37 ; 40 m Rainbow
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuColors ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def colorsSelectFront ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Colors > Front Color Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Black
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Red
\033 [ 1 ; 31 ; 40 mC . \033 [ 0 ; 37 ; 40 m Green
\033 [ 1 ; 31 ; 40 mD . \033 [ 0 ; 37 ; 40 m Yellow
\033 [ 1 ; 31 ; 40 mE . \033 [ 0 ; 37 ; 40 m Blue
\033 [ 1 ; 31 ; 40 mF . \033 [ 0 ; 37 ; 40 m Magenta
\033 [ 1 ; 31 ; 40 mG . \033 [ 0 ; 37 ; 40 m Cyan
\033 [ 1 ; 31 ; 40 mH . \033 [ 0 ; 37 ; 40 m White
\033 [ 1 ; 31 ; 40 mI . \033 [ 0 ; 37 ; 40 m Gray
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuColorsSelectFront ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def colorsSelectBack ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Colors > Back Color Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Black
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Red
\033 [ 1 ; 31 ; 40 mC . \033 [ 0 ; 37 ; 40 m Green
\033 [ 1 ; 31 ; 40 mD . \033 [ 0 ; 37 ; 40 m Yellow
\033 [ 1 ; 31 ; 40 mE . \033 [ 0 ; 37 ; 40 m Blue
\033 [ 1 ; 31 ; 40 mF . \033 [ 0 ; 37 ; 40 m Magenta
\033 [ 1 ; 31 ; 40 mG . \033 [ 0 ; 37 ; 40 m Cyan
\033 [ 1 ; 31 ; 40 mH . \033 [ 0 ; 37 ; 40 m White
\033 [ 1 ; 31 ; 40 mI . \033 [ 0 ; 37 ; 40 m Gray
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuColorsSelectBack ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def colorsSelectRainbow ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Colors > Rainbow Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Start Color
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m End Color
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuColorsSelectRainbow ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def colorsSelectRainbowStart ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Colors > Rainbow Start Color Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Black
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Red
\033 [ 1 ; 31 ; 40 mC . \033 [ 0 ; 37 ; 40 m Green
\033 [ 1 ; 31 ; 40 mD . \033 [ 0 ; 37 ; 40 m Yellow
\033 [ 1 ; 31 ; 40 mE . \033 [ 0 ; 37 ; 40 m Blue
\033 [ 1 ; 31 ; 40 mF . \033 [ 0 ; 37 ; 40 m Magenta
\033 [ 1 ; 31 ; 40 mG . \033 [ 0 ; 37 ; 40 m Cyan
\033 [ 1 ; 31 ; 40 mH . \033 [ 0 ; 37 ; 40 m White
\033 [ 1 ; 31 ; 40 mI . \033 [ 0 ; 37 ; 40 m Gray
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuColorsSelectRainbowStart ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def colorsSelectRainbowEnd ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Settings > Colors > Rainbow End Color Menu
Remote node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-07-15 22:44:08 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Black
\033 [ 1 ; 31 ; 40 mB . \033 [ 0 ; 37 ; 40 m Red
\033 [ 1 ; 31 ; 40 mC . \033 [ 0 ; 37 ; 40 m Green
\033 [ 1 ; 31 ; 40 mD . \033 [ 0 ; 37 ; 40 m Yellow
\033 [ 1 ; 31 ; 40 mE . \033 [ 0 ; 37 ; 40 m Blue
\033 [ 1 ; 31 ; 40 mF . \033 [ 0 ; 37 ; 40 m Magenta
\033 [ 1 ; 31 ; 40 mG . \033 [ 0 ; 37 ; 40 m Cyan
\033 [ 1 ; 31 ; 40 mH . \033 [ 0 ; 37 ; 40 m White
\033 [ 1 ; 31 ; 40 mI . \033 [ 0 ; 37 ; 40 m Gray
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-15 22:44:08 -03:00
menuColorsSelectRainbowEnd ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-06-10 19:02:49 -03:00
def menuLNDLOCAL ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Lightning Network Menu
Local node connection
2020-07-25 10:52:44 -03:00
Version { }
2020-06-10 19:02:49 -03:00
\033 [ 1 ; 32 ; 40 mI . \033 [ 0 ; 37 ; 40 m New Invoice
\033 [ 1 ; 31 ; 40 mP . \033 [ 0 ; 37 ; 40 m Pay Invoice
2020-06-10 20:28:39 -03:00
\033 [ 1 ; 32 ; 40 mK . \033 [ 0 ; 37 ; 40 m Make a KeySend Payment
\033 [ 1 ; 31 ; 40 mL . \033 [ 0 ; 37 ; 40 m List Invoices
2020-06-10 19:02:49 -03:00
\033 [ 1 ; 32 ; 40 mQ . \033 [ 0 ; 37 ; 40 m Channel Balance
2020-08-30 12:30:37 -03:00
\033 [ 1 ; 32 ; 40 mE . \033 [ 0 ; 37 ; 40 m Show Peers
2020-08-30 12:23:39 -03:00
\033 [ 1 ; 32 ; 40 mZ . \033 [ 0 ; 37 ; 40 m Connect Peers
2020-06-10 20:28:39 -03:00
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Show Channels
2020-06-10 19:02:49 -03:00
\033 [ 1 ; 32 ; 40 mN . \033 [ 0 ; 37 ; 40 m Get Node Info
\033 [ 1 ; 32 ; 40 mW . \033 [ 0 ; 37 ; 40 m Get Network Information
2020-06-19 17:51:28 -03:00
\033 [ 1 ; 32 ; 40 mJ . \033 [ 0 ; 37 ; 40 m Lncli Console
2020-06-10 20:28:39 -03:00
\033 [ 1 ; 33 ; 40 mB . \033 [ 0 ; 37 ; 40 m New Bitcoin Address
\033 [ 1 ; 33 ; 40 mX . \033 [ 0 ; 37 ; 40 m List Onchain Transactions
\033 [ 1 ; 32 ; 40 mO . \033 [ 0 ; 37 ; 40 m Onchain Balance
2020-06-10 19:02:49 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-06-10 19:02:49 -03:00
menuLNlocal ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-06-19 17:51:28 -03:00
def APIMenu ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m API \033 [ 1 ; 34 ; 40 mPremium \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-06-19 17:51:28 -03:00
2020-07-14 09:21:33 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m TippinMe FREE
2020-07-14 16:26:40 +10:00
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Tallycoin FREE
2020-07-14 20:04:00 -03:00
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Mempool FREE
2020-09-09 20:19:16 -03:00
\033 [ 1 ; 32 ; 40 mD . \033 [ 0 ; 37 ; 40 m CoinGecko FREE
2020-09-18 19:34:48 -03:00
\033 [ 1 ; 32 ; 40 mE . \033 [ 0 ; 37 ; 40 m Rate . sx FREE
2020-10-05 20:55:22 -03:00
\033 [ 1 ; 32 ; 40 mF . \033 [ 0 ; 37 ; 40 m BWT FREE
\033 [ 1 ; 32 ; 40 mG . \033 [ 0 ; 37 ; 40 m LNBits \033 [ 3 ; 35 ; 40 m { lnbitspaid } \033 [ 0 ; 37 ; 40 m
\033 [ 1 ; 32 ; 40 mH . \033 [ 0 ; 37 ; 40 m LNPay \033 [ 3 ; 35 ; 40 m { lnpaypaid } \033 [ 0 ; 37 ; 40 m
\033 [ 1 ; 32 ; 40 mI . \033 [ 0 ; 37 ; 40 m OpenNode \033 [ 3 ; 35 ; 40 m { opennodepaid } \033 [ 0 ; 37 ; 40 m
2020-06-19 17:51:28 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-26 14:34:13 -03:00
\n \n """ .format(version,lnbitspaid = " PAID " if os.path.isfile( " lnbitSN.conf " ) else " PREMIUM " , lnpaypaid = " PAID " if os.path.isfile( " lnpaySN.conf " ) else " PREMIUM " , opennodepaid = " PAID " if os.path.isfile( " opennodeSN.conf " ) else " PREMIUM " ))
2020-06-19 17:51:28 -03:00
menuPI ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-10-05 22:53:40 -03:00
def GamesMenu ( ) :
clear ( )
blogo ( )
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 1 ; 34 ; 40 mGames \033 [ 0 ; 37 ; 40 m Menu
Version { }
2020-10-06 21:17:26 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m 1984. ws \033 [ 3 ; 35 ; 40 m { sn1984 } \033 [ 0 ; 37 ; 40 m
2020-10-05 22:53:40 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-10-06 21:17:26 -03:00
\n \n """ .format(version,sn1984 = " PAID " if os.path.isfile( " 1984SN.conf " ) else " PREMIUM " ))
2020-10-05 22:53:40 -03:00
menuGamesPI ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-09-18 19:34:48 -03:00
def rateSX ( ) :
clear ( )
blogo ( )
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Rate . sx \033 [ 1 ; 34 ; 40 mFree \033 [ 0 ; 37 ; 40 m Menu
Version { }
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Rate
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Chart
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
\n \n """ .format(version))
rateSXMenu ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-07-14 20:04:00 -03:00
def mempoolmenu ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-14 20:04:00 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m Mempool . space \033 [ 1 ; 34 ; 40 mFree \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-07-14 20:04:00 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Blocks
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Recommended Fee
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-14 20:04:00 -03:00
mempoolmenuS ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-06-19 17:51:28 -03:00
def APILnbit ( ) :
2020-06-22 20:57:57 -03:00
bitLN = { " NN " : " " , " pd " : " " }
if os . path . isfile ( ' lnbitSN.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
bitData = pickle . load ( open ( " lnbitSN.conf " , " rb " ) ) # Load the file 'bclock.conf'
bitLN = bitData # Copy the variable pathv to 'path'
2020-06-19 17:51:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
sysinfo ( )
print ( """ \t \t
2020-06-22 20:57:57 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m LNBits SN : { } \033 [ 1 ; 34 ; 40 mPremium \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-06-19 17:51:28 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m New Invoice
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Pay Invoice
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m New PayWall
\033 [ 1 ; 32 ; 40 mD . \033 [ 0 ; 37 ; 40 m Delete PayWall
\033 [ 1 ; 32 ; 40 mE . \033 [ 0 ; 37 ; 40 m List PayWalls
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version,bitLN[ ' NN ' ]))
2020-06-19 17:51:28 -03:00
menuLNBPI ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-06-22 14:26:07 -03:00
def APILnPay ( ) :
2020-06-22 20:57:57 -03:00
bitLN = { " NN " : " " , " pd " : " " }
if os . path . isfile ( ' lnpaySN.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
bitData = pickle . load ( open ( " lnpaySN.conf " , " rb " ) ) # Load the file 'bclock.conf'
bitLN = bitData # Copy the variable pathv to 'path'
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
sysinfo ( )
print ( """ \t \t
2020-06-22 20:57:57 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m LNPay SN : { } \033 [ 1 ; 34 ; 40 mPremium \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-06-22 14:26:07 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m New Invoice
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Pay Invoice
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Wallet Balance
\033 [ 1 ; 32 ; 40 mD . \033 [ 0 ; 37 ; 40 m List Invoices
\033 [ 1 ; 32 ; 40 mE . \033 [ 0 ; 37 ; 40 m Transfer Between Wallets
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version,bitLN[ ' NN ' ]))
2020-06-22 14:26:07 -03:00
menuLNPAY ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
def APIOpenNode ( ) :
2020-06-22 20:57:57 -03:00
bitLN = { " NN " : " " , " pd " : " " }
if os . path . isfile ( ' opennodeSN.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
bitData = pickle . load ( open ( " opennodeSN.conf " , " rb " ) ) # Load the file 'bclock.conf'
bitLN = bitData # Copy the variable pathv to 'path'
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
sysinfo ( )
print ( """ \t \t
2020-06-22 20:57:57 -03:00
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m OpenNode SN : { } \033 [ 1 ; 34 ; 40 mPremium \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-06-22 14:26:07 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m New Invoice
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Pay Invoice
\033 [ 1 ; 32 ; 40 mC . \033 [ 0 ; 37 ; 40 m Wallet Balance
\033 [ 1 ; 32 ; 40 mD . \033 [ 0 ; 37 ; 40 m List Payments
2020-06-27 17:30:01 -03:00
\033 [ 1 ; 32 ; 40 mS . \033 [ 0 ; 37 ; 40 m Status
2020-06-22 14:26:07 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version,bitLN[ ' NN ' ]))
2020-06-22 14:26:07 -03:00
menuOpenNode ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-06-22 20:57:57 -03:00
def APITippinMe ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 20:57:57 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m TippinMe \033 [ 1 ; 34 ; 40 mFree \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-06-22 20:57:57 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m New Invoice
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-06-22 20:57:57 -03:00
menuTippinMe ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-07-09 19:41:54 -03:00
def APITallyCo ( ) :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-09 19:41:54 -03:00
sysinfo ( )
print ( """ \t \t
\033 [ 1 ; 31 ; 40 mPyBLOCK \033 [ 0 ; 37 ; 40 m TallyCoin \033 [ 1 ; 34 ; 40 mFree \033 [ 0 ; 37 ; 40 m Menu
2020-07-25 10:52:44 -03:00
Version { }
2020-07-09 19:41:54 -03:00
\033 [ 1 ; 32 ; 40 mA . \033 [ 0 ; 37 ; 40 m Get Payment
2020-07-10 14:54:43 -03:00
\033 [ 1 ; 32 ; 40 mB . \033 [ 0 ; 37 ; 40 m Tip User
2020-07-09 19:41:54 -03:00
\033 [ 1 ; 36 ; 40 mR . \033 [ 0 ; 37 ; 40 m Return Main Menu
2020-07-25 10:52:44 -03:00
\n \n """ .format(version))
2020-07-09 19:41:54 -03:00
menuTallyCo ( input ( " \033 [1;32;40mSelect option: \033 [0;37;40m " ) )
2020-06-11 19:49:41 -03:00
def menuSelection ( ) :
path = { " ip_port " : " " , " rpcuser " : " " , " rpcpass " : " " , " bitcoincli " : " " }
2020-06-11 16:40:02 -03:00
pathv = pickle . load ( open ( " bclock.conf " , " rb " ) ) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
if path [ ' bitcoincli ' ] :
menu ( )
else :
menuUserConn ( )
2020-06-11 19:49:41 -03:00
2020-06-11 16:40:02 -03:00
def menuSelectionLN ( ) :
2020-06-10 19:02:49 -03:00
lndconnectload = { " ip_port " : " " , " tls " : " " , " macaroon " : " " , " lncli " : " " }
lndconnectData = pickle . load ( open ( " blndconnect.conf " , " rb " ) ) # Load the file 'bclock.conf'
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
2020-06-11 19:49:41 -03:00
if lndconnectload [ ' ln ' ] :
2020-06-10 19:02:49 -03:00
menuLNDLOCAL ( )
else :
menuLND ( )
2020-06-19 17:51:28 -03:00
def aaccPPiLNBits ( ) :
2020-06-22 22:51:41 -03:00
try :
bitLN = { " NN " : " " , " pd " : " " }
if os . path . isfile ( ' lnbitSN.conf ' ) :
bitData = pickle . load ( open ( " lnbitSN.conf " , " rb " ) )
bitLN = bitData
APILnbit ( )
else :
qr = qrcode . QRCode (
version = 1 ,
error_correction = qrcode . constants . ERROR_CORRECT_L ,
box_size = 10 ,
border = 4 ,
)
bitLN [ ' NN ' ] = randrange ( 10000000 )
curl = ' curl -X POST https://lnbits.com/api/v1/payments -d ' + " ' { " + """ " out " : false, " amount " : 100000, " memo " : " LNBits on PyBLOCK {} " """ . format ( bitLN [ ' NN ' ] ) + " } ' " + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
sh = os . popen ( curl ) . read ( )
2020-06-24 17:08:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 22:51:41 -03:00
n = str ( sh )
d = json . loads ( n )
q = d [ ' payment_request ' ]
c = q . lower ( )
while True :
print ( " \033 [1;30;47m " )
qr . add_data ( c )
qr . print_ascii ( )
print ( " \033 [0;37;40m " )
qr . clear ( )
print ( " Lightning Invoice: " + c )
dn = str ( d [ ' checking_id ' ] )
t . sleep ( 10 )
checkcurl = ' curl -X GET https://lnbits.com/api/v1/payments/ ' + dn + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
rsh = os . popen ( checkcurl ) . read ( )
2020-06-19 17:51:28 -03:00
clear ( )
blogo ( )
2020-06-22 22:51:41 -03:00
nn = str ( rsh )
dd = json . loads ( nn )
db = dd [ ' paid ' ]
2020-06-25 11:25:36 -03:00
if db is True :
2020-06-22 22:51:41 -03:00
clear ( )
blogo ( )
tick ( )
bitLN [ ' pd ' ] = " PAID "
pickle . dump ( bitLN , open ( " lnbitSN.conf " , " wb " ) )
createFileConnLNBits ( )
break
else :
continue
except :
clear ( )
blogo ( )
print ( " \n \t SERIAL NUMBER NOT FOUND \n " )
input ( " Continue... " )
2020-06-19 17:51:28 -03:00
2020-06-22 14:26:07 -03:00
def aaccPPiLNPay ( ) :
2020-06-22 22:51:41 -03:00
try :
bitLN = { " NN " : " " , " pd " : " " }
if os . path . isfile ( ' lnpaySN.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
bitData = pickle . load ( open ( " lnpaySN.conf " , " rb " ) ) # Load the file 'bclock.conf'
bitLN = bitData # Copy the variable pathv to 'path'
APILnPay ( )
else :
qr = qrcode . QRCode (
version = 1 ,
error_correction = qrcode . constants . ERROR_CORRECT_L ,
box_size = 10 ,
border = 4 ,
)
bitLN [ ' NN ' ] = randrange ( 10000000 )
curl = ' curl -X POST https://lnbits.com/api/v1/payments -d ' + " ' { " + """ " out " : false, " amount " : 100000, " memo " : " LNPay on PyBLOCK {} " """ . format ( bitLN [ ' NN ' ] ) + " } ' " + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
sh = os . popen ( curl ) . read ( )
2020-06-24 17:08:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 22:51:41 -03:00
n = str ( sh )
d = json . loads ( n )
q = d [ ' payment_request ' ]
c = q . lower ( )
while True :
print ( " \033 [1;30;47m " )
qr . add_data ( c )
qr . print_ascii ( )
print ( " \033 [0;37;40m " )
qr . clear ( )
print ( " Lightning Invoice: " + c )
dn = str ( d [ ' checking_id ' ] )
t . sleep ( 10 )
checkcurl = ' curl -X GET https://lnbits.com/api/v1/payments/ ' + dn + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
rsh = os . popen ( checkcurl ) . read ( )
2020-06-22 14:26:07 -03:00
clear ( )
blogo ( )
2020-06-22 22:51:41 -03:00
nn = str ( rsh )
dd = json . loads ( nn )
db = dd [ ' paid ' ]
2020-06-25 11:25:36 -03:00
if db is True :
2020-06-22 22:51:41 -03:00
clear ( )
blogo ( )
tick ( )
bitLN [ ' pd ' ] = " PAID "
pickle . dump ( bitLN , open ( " lnpaySN.conf " , " wb " ) )
createFileConnLNPay ( )
break
else :
continue
except :
clear ( )
blogo ( )
print ( " \n \t SERIAL NUMBER NOT FOUND \n " )
input ( " Continue... " )
2020-06-22 14:26:07 -03:00
def aaccPPiOpenNode ( ) :
2020-06-22 22:51:41 -03:00
try :
bitLN = { " NN " : " " , " pd " : " " }
if os . path . isfile ( ' opennodeSN.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
bitData = pickle . load ( open ( " opennodeSN.conf " , " rb " ) ) # Load the file 'bclock.conf'
bitLN = bitData # Copy the variable pathv to 'path'
APIOpenNode ( )
else :
qr = qrcode . QRCode (
version = 1 ,
error_correction = qrcode . constants . ERROR_CORRECT_L ,
box_size = 10 ,
border = 4 ,
)
bitLN [ ' NN ' ] = randrange ( 10000000 )
curl = ' curl -X POST https://lnbits.com/api/v1/payments -d ' + " ' { " + """ " out " : false, " amount " : 100000, " memo " : " OpenNode on PyBLOCK {} " """ . format ( bitLN [ ' NN ' ] ) + " } ' " + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
sh = os . popen ( curl ) . read ( )
2020-06-24 17:08:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 22:51:41 -03:00
n = str ( sh )
d = json . loads ( n )
q = d [ ' payment_request ' ]
c = q . lower ( )
while True :
print ( " \033 [1;30;47m " )
qr . add_data ( c )
qr . print_ascii ( )
print ( " \033 [0;37;40m " )
qr . clear ( )
print ( " Lightning Invoice: " + c )
dn = str ( d [ ' checking_id ' ] )
t . sleep ( 10 )
checkcurl = ' curl -X GET https://lnbits.com/api/v1/payments/ ' + dn + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
rsh = os . popen ( checkcurl ) . read ( )
2020-06-22 14:26:07 -03:00
clear ( )
blogo ( )
2020-06-22 22:51:41 -03:00
nn = str ( rsh )
dd = json . loads ( nn )
db = dd [ ' paid ' ]
2020-06-25 11:25:36 -03:00
if db is True :
2020-06-22 22:51:41 -03:00
clear ( )
blogo ( )
tick ( )
bitLN [ ' pd ' ] = " PAID "
pickle . dump ( bitLN , open ( " opennodeSN.conf " , " wb " ) )
createFileConnOpenNode ( )
break
else :
continue
except :
clear ( )
blogo ( )
print ( " \n \t SERIAL NUMBER NOT FOUND \n " )
input ( " Continue... " )
2020-06-22 20:57:57 -03:00
2020-10-05 22:53:40 -03:00
def aaccPPiGorched ( ) :
a = """
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TO PLAY THIS GAME YOU ' LL
NEED TO PAY 10000 SATS
JUST ONE TIME
SAVE YOUR SN . CONF IN A SAFE PLACE
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"""
try :
bitLN = { " NN " : " " , " pd " : " " }
2020-10-06 21:17:26 -03:00
if os . path . isfile ( ' 1984SN.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
bitData = pickle . load ( open ( " 1984SN.conf " , " rb " ) ) # Load the file 'bclock.conf'
2020-10-05 22:53:40 -03:00
bitLN = bitData # Copy the variable pathv to 'path'
2020-10-06 21:17:26 -03:00
sn1984 ( )
2020-10-05 22:53:40 -03:00
else :
clear ( )
blogo ( )
print ( a )
node_not = input ( " Do you want to pay this Game Access with your node? Y/n: " )
if node_not in [ " Y " , " y " ] :
lndconnectload = { " ip_port " : " " , " tls " : " " , " macaroon " : " " , " ln " : " " }
lndconnectData = pickle . load ( open ( " blndconnect.conf " , " rb " ) ) # Load the file 'bclock.conf'
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
bitLN [ ' NN ' ] = randrange ( 10000000 )
curl = ' curl -X POST https://lnbits.com/api/v1/payments -d ' + " ' { " + """ " out " : false, " amount " : 10000, " memo " : " Games on PyBLOCK {} " """ . format ( bitLN [ ' NN ' ] ) + " } ' " + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
sh = os . popen ( curl ) . read ( )
clear ( )
blogo ( )
n = str ( sh )
d = json . loads ( n )
q = d [ ' payment_request ' ]
c = q . lower ( )
if lndconnectload [ ' ip_port ' ] :
while True :
print ( " Lightning Invoice: " + c )
payinvoice ( )
dn = str ( d [ ' checking_id ' ] )
t . sleep ( 10 )
checkcurl = ' curl -X GET https://lnbits.com/api/v1/payments/ ' + dn + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
rsh = os . popen ( checkcurl ) . read ( )
clear ( )
blogo ( )
nn = str ( rsh )
dd = json . loads ( nn )
db = dd [ ' paid ' ]
if db is True :
clear ( )
blogo ( )
tick ( )
bitLN [ ' pd ' ] = " PAID "
2020-10-06 21:17:26 -03:00
pickle . dump ( bitLN , open ( " 1984SN.conf " , " wb " ) )
sn1984 ( )
2020-10-05 22:53:40 -03:00
break
else :
continue
elif lndconnectload [ ' ln ' ] :
while True :
print ( " Lightning Invoice: " + c )
localpayinvoice ( )
dn = str ( d [ ' checking_id ' ] )
t . sleep ( 10 )
checkcurl = ' curl -X GET https://lnbits.com/api/v1/payments/ ' + dn + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
rsh = os . popen ( checkcurl ) . read ( )
clear ( )
blogo ( )
nn = str ( rsh )
dd = json . loads ( nn )
db = dd [ ' paid ' ]
if db is True :
clear ( )
blogo ( )
tick ( )
bitLN [ ' pd ' ] = " PAID "
2020-10-06 21:17:26 -03:00
pickle . dump ( bitLN , open ( " 1984SN.conf " , " wb " ) )
sn1984 ( )
2020-10-05 22:53:40 -03:00
break
else :
continue
else :
qr = qrcode . QRCode (
version = 1 ,
error_correction = qrcode . constants . ERROR_CORRECT_L ,
box_size = 10 ,
border = 4 ,
)
bitLN [ ' NN ' ] = randrange ( 10000000 )
2020-10-06 21:17:26 -03:00
curl = ' curl -X POST https://lnbits.com/api/v1/payments -d ' + " ' { " + """ " out " : false, " amount " : 10000, " memo " : " Games on PyBLOCK {} " """ . format ( bitLN [ ' NN ' ] ) + " } ' " + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
2020-10-05 22:53:40 -03:00
sh = os . popen ( curl ) . read ( )
clear ( )
blogo ( )
n = str ( sh )
d = json . loads ( n )
q = d [ ' payment_request ' ]
c = q . lower ( )
while True :
print ( " \033 [1;30;47m " )
qr . add_data ( c )
qr . print_ascii ( )
print ( " \033 [0;37;40m " )
qr . clear ( )
print ( " Lightning Invoice: " + c )
dn = str ( d [ ' checking_id ' ] )
t . sleep ( 10 )
checkcurl = ' curl -X GET https://lnbits.com/api/v1/payments/ ' + dn + """ -H " X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H " Content-type: application/json " """
rsh = os . popen ( checkcurl ) . read ( )
clear ( )
blogo ( )
nn = str ( rsh )
dd = json . loads ( nn )
db = dd [ ' paid ' ]
if db is True :
clear ( )
blogo ( )
tick ( )
bitLN [ ' pd ' ] = " PAID "
2020-10-06 21:17:26 -03:00
pickle . dump ( bitLN , open ( " 1984SN.conf " , " wb " ) )
2020-10-05 22:53:40 -03:00
gorched ( )
break
else :
continue
except :
clear ( )
blogo ( )
print ( " \n \t SERIAL NUMBER NOT FOUND \n " )
input ( " Continue... " )
2020-06-22 20:57:57 -03:00
def aaccPPiTippinMe ( ) :
if os . path . isfile ( ' tippinme.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
APITippinMe ( )
else :
2020-06-22 22:02:00 -03:00
createFileTippinMe ( )
2020-07-09 19:41:54 -03:00
def aaccPPiTallyCo ( ) :
if os . path . isfile ( ' tallyco.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
APITallyCo ( )
else :
createFileConnTallyCo ( )
2020-07-13 19:28:56 -03:00
def checkupdate ( ) :
r = requests . get ( ' https://raw.githubusercontent.com/curly60e/pyblock/master/ver.txt ' )
r . headers [ ' Content-Type ' ]
n = r . text
di = json . loads ( n )
if di [ ' version ' ] == version :
q = print ( " " )
2020-07-13 22:30:35 +00:00
else :
2020-07-13 19:28:56 -03:00
print ( " \n --------------------------------------------------- " )
q = print ( " \n \033 [1;31;40mNew version available \033 [0;37;40m > Press U to Upgrade \n " )
print ( " --------------------------------------------------- " )
def upgrade ( ) :
2020-07-13 19:38:24 -03:00
gitfetch = " git fetch "
2020-07-13 19:28:56 -03:00
gitchekcout = " git checkout origin/master -- PyBlock.py ppi.py pblogo.py sysinf.py apisnd.py clone.py donation.py feed.py logos.py nodeconnection.py "
clear ( )
blogo ( )
2020-07-13 19:38:24 -03:00
b = os . popen ( gitfetch ) . read ( )
2020-07-13 19:28:56 -03:00
a = os . popen ( gitchekcout ) . read ( )
2020-07-13 19:38:24 -03:00
print ( b )
2020-07-13 19:28:56 -03:00
print ( a )
2020-07-13 19:50:40 -03:00
print ( " \n --------------------------------------------------- " )
2020-07-13 19:51:47 -03:00
print ( " \n \t \033 [1;31;40mYou ' ll need to restart PyBLOCK \033 [0;37;40m \n " )
print ( " --------------------------------------------------- \n " )
2020-07-13 19:38:24 -03:00
input ( " Continue... " )
2020-07-15 22:44:08 -03:00
def testlogo ( ) :
output = render ( ' PyBLOCK ' , colors = [ settings [ ' colorA ' ] , settings [ ' colorB ' ] ] , align = ' left ' , font = settings [ ' design ' ] )
print ( output )
print ( """
- - - - - - - - - - - - - - - - - - - - - - - - -
Design : { }
Front Color : { }
Back Color : { }
- - - - - - - - - - - - - - - - - - - - - - - - -
""" .format(settings[ ' design ' ], settings[ ' colorA ' ], settings[ ' colorB ' ]))
try :
print ( " <<< Cancel Control + C " )
input ( " Enter To Apply... " )
settings [ " gradient " ] = " color "
pickle . dump ( settings , open ( " pyblocksettings.conf " , " wb " ) )
except :
settings4 ( )
def testlogoRB ( ) :
output = render ( ' PyBLOCK ' , gradient = [ settings [ ' colorA ' ] , settings [ ' colorB ' ] ] , align = ' left ' , font = settings [ ' design ' ] )
print ( output )
print ( """
- - - - - - - - - - - - - - - - - - - - - - - - -
Design : { }
Start Color : { }
End Color : { }
- - - - - - - - - - - - - - - - - - - - - - - - -
""" .format(settings[ ' design ' ], settings[ ' colorA ' ], settings[ ' colorB ' ]))
try :
print ( " <<< Cancel Control + C " )
input ( " Enter To Apply... " )
settings [ " gradient " ] = " grd "
pickle . dump ( settings , open ( " pyblocksettings.conf " , " wb " ) )
except :
settings4 ( )
2020-06-10 19:02:49 -03:00
#--------------------------------- End Menu section -----------------------------------
2020-05-16 12:51:30 -03:00
#--------------------------------- Main Menu execution --------------------------------
2020-07-15 22:44:08 -03:00
def menuSettings ( menuSTT ) :
if menuSTT in [ " A " , " a " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-26 14:22:22 -03:00
designQ ( )
2020-07-15 22:44:08 -03:00
elif menuSTT in [ " B " , " b " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
colors ( )
def menuColors ( menuCLS ) :
if menuCLS in [ " A " , " a " ] :
colorsSelectFront ( )
elif menuCLS in [ " B " , " b " ] :
colorsSelectBack ( )
elif menuCLS in [ " C " , " c " ] :
colorsSelectRainbow ( )
elif menuCLS in [ " F " , " f " ] :
colors ( )
def menuColorsSelectRainbow ( menuRF ) :
if menuRF in [ " A " , " a " ] :
colorsSelectRainbowStart ( )
elif menuRF in [ " B " , " b " ] :
colorsSelectRainbowEnd ( )
elif menuRF in [ " F " , " f " ] :
colors ( )
def menuColorsSelectRainbowEnd ( menuCF ) :
if menuCF in [ " A " , " a " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " black "
testlogoRB ( )
elif menuCF in [ " B " , " b " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " red "
testlogoRB ( )
elif menuCF in [ " C " , " c " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " green "
testlogoRB ( )
elif menuCF in [ " D " , " d " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " yellow "
testlogo ( )
elif menuCF in [ " E " , " e " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " blue "
testlogoRB ( )
elif menuCF in [ " F " , " f " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " magenta "
testlogoRB ( )
elif menuCF in [ " G " , " g " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " cyan "
testlogoRB ( )
elif menuCF in [ " H " , " h " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " white "
testlogoRB ( )
elif menuCF in [ " I " , " i " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " gray "
testlogoRB ( )
elif menuCF in [ " R " , " r " ] :
colors ( )
def menuColorsSelectRainbowStart ( menuCF ) :
if menuCF in [ " A " , " a " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " black "
testlogoRB ( )
elif menuCF in [ " B " , " b " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " red "
testlogoRB ( )
elif menuCF in [ " C " , " c " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " green "
testlogoRB ( )
elif menuCF in [ " D " , " d " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " yellow "
testlogoRB ( )
elif menuCF in [ " E " , " e " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " blue "
testlogoRB ( )
elif menuCF in [ " F " , " f " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " magenta "
testlogoRB ( )
elif menuCF in [ " G " , " g " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " cyan "
testlogoRB ( )
elif menuCF in [ " H " , " h " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " white "
testlogoRB ( )
elif menuCF in [ " I " , " i " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " gray "
testlogoRB ( )
elif menuCF in [ " R " , " r " ] :
colors ( )
def menuColorsSelectBack ( menuCF ) :
if menuCF in [ " A " , " a " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " black "
testlogo ( )
elif menuCF in [ " B " , " b " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " red "
testlogo ( )
elif menuCF in [ " C " , " c " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " green "
testlogo ( )
elif menuCF in [ " D " , " d " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " yellow "
testlogo ( )
elif menuCF in [ " E " , " e " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " blue "
testlogo ( )
elif menuCF in [ " F " , " f " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " magenta "
testlogo ( )
elif menuCF in [ " G " , " g " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " cyan "
testlogo ( )
elif menuCF in [ " H " , " h " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " white "
testlogo ( )
elif menuCF in [ " I " , " i " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorB " ] = " gray "
testlogo ( )
elif menuCF in [ " R " , " r " ] :
colors ( )
def menuColorsSelectFront ( menuCF ) :
if menuCF in [ " A " , " a " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " black "
testlogo ( )
elif menuCF in [ " B " , " b " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " red "
testlogo ( )
elif menuCF in [ " C " , " c " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " green "
testlogo ( )
elif menuCF in [ " D " , " d " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " yellow "
testlogo ( )
elif menuCF in [ " E " , " e " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " blue "
testlogo ( )
elif menuCF in [ " F " , " f " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " magenta "
testlogo ( )
elif menuCF in [ " G " , " g " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " cyan "
testlogo ( )
elif menuCF in [ " H " , " h " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " white "
testlogo ( )
elif menuCF in [ " I " , " i " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " colorA " ] = " gray "
testlogo ( )
elif menuCF in [ " R " , " r " ] :
colors ( )
def menuDesign ( menuDSN ) :
if menuDSN in [ " A " , " a " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ " design " ] = " block "
testlogo ( )
elif menuDSN in [ " B " , " b " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " slick "
testlogo ( )
elif menuDSN in [ " C " , " c " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " tiny "
testlogo ( )
elif menuDSN in [ " D " , " d " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " grid "
testlogo ( )
elif menuDSN in [ " E " , " e " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " pallet "
testlogo ( )
elif menuDSN in [ " F " , " f " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " shade "
testlogo ( )
elif menuDSN in [ " G " , " g " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " chrome "
testlogo ( )
elif menuDSN in [ " H " , " h " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " simple "
testlogo ( )
elif menuDSN in [ " I " , " i " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " simpleBlock "
testlogo ( )
elif menuDSN in [ " J " , " j " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " 3d "
testlogo ( )
elif menuDSN in [ " K " , " k " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " simple3d "
testlogo ( )
elif menuDSN in [ " L " , " l " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-07-15 22:44:08 -03:00
settings [ ' design ' ] = " huge "
testlogo ( )
2020-09-18 19:34:48 -03:00
#------------API---------------------
2020-10-05 22:53:40 -03:00
def menuGamesPI ( menuGMS ) :
if menuGMS in [ " A " , " a " ] :
aaccPPiGorched ( )
2020-06-19 17:51:28 -03:00
def menuPI ( menuWN ) :
2020-06-25 18:53:52 +00:00
if menuWN in [ " A " , " a " ] :
2020-06-22 20:57:57 -03:00
aaccPPiTippinMe ( )
2020-06-25 16:03:22 -03:00
elif menuWN in [ " B " , " b " ] :
2020-07-09 19:41:54 -03:00
aaccPPiTallyCo ( )
2020-06-25 16:03:22 -03:00
elif menuWN in [ " C " , " c " ] :
2020-07-14 20:04:00 -03:00
mempoolmenu ( )
2020-06-25 16:03:22 -03:00
elif menuWN in [ " D " , " d " ] :
2020-09-09 20:19:16 -03:00
clear ( )
blogo ( )
CoingeckoPP ( )
2020-07-09 19:41:54 -03:00
elif menuWN in [ " E " , " e " ] :
2020-09-18 19:34:48 -03:00
rateSX ( )
2020-07-14 20:04:00 -03:00
elif menuWN in [ " F " , " f " ] :
2020-10-05 20:55:22 -03:00
bwtConn ( )
2020-09-09 20:19:16 -03:00
elif menuWN in [ " G " , " g " ] :
2020-10-05 20:55:22 -03:00
aaccPPiLNBits ( )
2020-09-18 19:34:48 -03:00
elif menuWN in [ " H " , " h " ] :
2020-10-05 20:55:22 -03:00
aaccPPiLNPay ( )
elif menuWN in [ " I " , " i " ] :
2020-06-22 14:26:07 -03:00
aaccPPiOpenNode ( )
2020-07-14 20:04:00 -03:00
def mempoolmenuS ( menuMem ) :
if menuMem in [ " A " , " a " ] :
blocks ( )
elif menuMem in [ " B " , " b " ] :
fee ( )
elif menuMem in [ " R " , " r " ] :
APIMenu ( )
2020-07-09 19:41:54 -03:00
def menuTallyCo ( menuTLC ) :
if menuTLC in [ " A " , " a " ] :
tallycoGetPayment ( )
elif menuTLC in [ " B " , " b " ] :
tallycoDonateid ( )
elif menuTLC in [ " R " , " r " ] :
APIMenu ( )
2020-06-22 20:57:57 -03:00
def menuTippinMe ( menuTM ) :
2020-06-25 18:53:52 +00:00
if menuTM in [ " A " , " a " ] :
2020-06-22 20:57:57 -03:00
tippinmeGetInvoice ( )
2020-06-25 16:03:22 -03:00
elif menuTM in [ " R " , " r " ] :
2020-06-22 20:57:57 -03:00
APIMenu ( )
2020-06-22 14:26:07 -03:00
def menuOpenNode ( menuOP ) :
2020-06-25 18:53:52 +00:00
if menuOP in [ " A " , " a " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
OpenNodecreatecharge ( )
2020-06-25 16:03:22 -03:00
elif menuOP in [ " B " , " b " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
OpenNodeiniciatewithdrawal ( )
2020-06-25 16:03:22 -03:00
elif menuOP in [ " C " , " c " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
OpenNodelistfunds ( )
2020-06-25 16:03:22 -03:00
elif menuOP in [ " D " , " d " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
OpenNodeListPayments ( )
2020-06-27 17:30:01 -03:00
elif menuOP in [ " S " , " s " ] :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-27 17:30:01 -03:00
OpenNodeCheckStatus ( )
2020-06-25 16:03:22 -03:00
elif menuOP in [ " R " , " r " ] :
2020-06-22 14:26:07 -03:00
APIMenu ( )
def menuLNPAY ( menuNW ) :
2020-06-25 18:53:52 +00:00
if menuNW in [ " A " , " a " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
lnpayCreateInvoice ( )
2020-06-25 16:03:22 -03:00
elif menuNW in [ " B " , " b " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
lnpayPayInvoice ( )
2020-06-25 16:03:22 -03:00
elif menuNW in [ " C " , " c " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
lnpayGetBalance ( )
2020-06-25 16:03:22 -03:00
elif menuNW in [ " D " , " d " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
lnpayGetTransactions ( )
2020-06-25 16:03:22 -03:00
elif menuNW in [ " E " , " e " ] :
2020-06-22 14:26:07 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-22 14:26:07 -03:00
lnpayTransBWallets ( )
2020-06-25 16:03:22 -03:00
elif menuNW in [ " R " , " r " ] :
2020-06-22 14:26:07 -03:00
APIMenu ( )
2020-06-19 17:51:28 -03:00
def menuLNBPI ( menuLNQ ) :
2020-06-25 18:53:52 +00:00
if menuLNQ in [ " A " , " a " ] :
2020-06-19 17:51:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
lnbitCreateNewInvoice ( )
2020-06-25 16:03:22 -03:00
elif menuLNQ in [ " B " , " b " ] :
2020-06-19 17:51:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
lnbitPayInvoice ( )
2020-06-25 16:03:22 -03:00
elif menuLNQ in [ " C " , " c " ] :
2020-06-19 17:51:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
lnbitCreatePayWall ( )
2020-06-25 16:03:22 -03:00
elif menuLNQ in [ " D " , " d " ] :
2020-06-19 17:51:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
lnbitDeletePayWall ( )
2020-06-25 16:03:22 -03:00
elif menuLNQ in [ " E " , " e " ] :
2020-06-19 17:51:28 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
lnbitListPawWall ( )
2020-06-25 16:03:22 -03:00
elif menuLNQ in [ " R " , " r " ] :
2020-06-19 17:51:28 -03:00
APIMenu ( )
2020-09-18 19:34:48 -03:00
def rateSXMenu ( menuSX ) :
if menuSX in [ " A " , " a " ] :
clear ( )
blogo ( )
rateSXList ( )
elif menuSX in [ " B " , " b " ] :
clear ( )
blogo ( )
rateSXGraph ( )
elif menuSX in [ " R " , " r " ] :
APIMenu ( )
#---------------END API-----------
2020-09-25 19:56:40 -03:00
def runTheNumbersControl ( menuNumbers ) :
if menuNumbers in [ " A " , " a " ] :
clear ( )
blogo ( )
countdownblock ( )
elif menuNumbers in [ " B " , " b " ] :
2020-09-26 22:55:48 -03:00
clear ( )
blogo ( )
localHalving ( )
elif menuNumbers in [ " C " , " c " ] :
2020-09-25 19:56:40 -03:00
clear ( )
blogo ( )
calc = """
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING
THE NUMBERS
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
"""
comeback = """
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
MAKE YOURSELF A COFFEE
AND COME BACK IN A
MOMENT
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
"""
cprint ( comeback , ' yellow ' )
cprint ( calc , ' red ' , attrs = [ ' blink ' ] )
runthenumbers ( )
def runTheNumbersControlConn ( menuNumbersconn ) :
if menuNumbersconn in [ " A " , " a " ] :
clear ( )
blogo ( )
countdownblockConn ( )
elif menuNumbersconn in [ " B " , " b " ] :
2020-09-26 22:55:48 -03:00
clear ( )
blogo ( )
remoteHalving ( )
elif menuNumbersconn in [ " C " , " c " ] :
2020-09-25 19:56:40 -03:00
clear ( )
blogo ( )
calc = """
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING
THE NUMBERS
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
"""
comeback = """
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
MAKE YOURSELF A COFFEE
AND COME BACK IN A
MOMENT
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
"""
cprint ( comeback , ' yellow ' )
cprint ( calc , ' red ' , attrs = [ ' blink ' ] )
runthenumbersConn ( )
2020-09-26 22:55:48 -03:00
2020-09-19 22:54:27 -03:00
def menuWeather ( menuWD ) :
if menuWD in [ " A " , " a " ] :
wttrDataV1 ( )
elif menuWD in [ " B " , " b " ] :
wttrDataV2 ( )
2020-05-16 00:21:47 -03:00
def menuA ( menuS ) : #Execution of the Main Menu options
2020-06-25 18:53:52 +00:00
if menuS in [ " A " , " a " ] :
2020-05-16 12:51:30 -03:00
artist ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " B " , " b " ] :
2020-05-13 19:47:58 -03:00
while True :
2020-05-16 12:51:30 -03:00
try :
clear ( )
close ( )
getblock ( )
tmp ( )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuS in [ " C " , " c " ] :
2020-05-15 07:41:42 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-15 07:41:42 -03:00
getgenesis ( )
a = input ( " Do you want to return to the Main Menu? Y/n: " )
2020-06-25 18:53:52 +00:00
if a in [ " Y " , " y " ] :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-05-15 07:41:42 -03:00
else :
b = input ( " Do you want to exit? Y/n: " )
2020-06-25 18:53:52 +00:00
if b in [ " Y " , " y " ] :
2020-05-27 08:59:36 -03:00
os . _exit ( 0 )
apisnd . close ( )
donation . close ( )
clone . close ( )
logos . close ( )
feed . close ( )
2020-05-27 11:01:03 -03:00
sysinf . close ( )
2020-06-01 09:25:57 -03:00
nodeconnection . close ( )
2020-05-15 07:41:42 -03:00
exit ( )
else :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " D " , " d " ] :
2020-05-16 00:21:47 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-16 00:21:47 -03:00
readHexBlock ( )
while True :
r = input ( " Do you want to continue decoding? Y/n: " )
2020-06-25 18:53:52 +00:00
if r in [ " Y " , " y " ] :
2020-05-16 00:21:47 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-16 00:21:47 -03:00
readHexBlock ( )
else :
2020-06-13 19:23:52 -03:00
break
2020-06-25 18:53:52 +00:00
elif menuS in [ " E " , " e " ] :
2020-05-16 12:51:30 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-16 12:51:30 -03:00
readHexTx ( )
while True :
r = input ( " Do you want to continue decoding? Y/n: " )
2020-06-25 18:53:52 +00:00
if r in [ " Y " , " y " ] :
2020-05-16 12:51:30 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-16 12:51:30 -03:00
readHexTx ( )
else :
2020-06-13 19:23:52 -03:00
break
2020-06-25 18:53:52 +00:00
elif menuS in [ " F " , " f " ] :
2020-05-25 19:35:24 -03:00
getrawtx ( )
2020-08-25 22:06:10 -03:00
elif menuS in [ " G " , " g " ] :
2020-09-25 19:56:40 -03:00
runTheNumbersMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " H " , " h " ] :
2020-05-25 19:35:24 -03:00
advanceMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " L " , " l " ] :
2020-05-29 11:52:29 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 16:40:02 -03:00
menuSelectionLN ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " Q " , " q " ] :
2020-06-11 16:40:02 -03:00
os . _exit ( 0 )
apisnd . close ( )
donation . close ( )
clone . close ( )
logos . close ( )
feed . close ( )
sysinf . close ( )
nodeconnection . close ( )
exit ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " S " , " s " ] :
2020-06-11 16:40:02 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 16:40:02 -03:00
satnodeMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " P " , " p " ] :
2020-06-19 17:51:28 -03:00
APIMenu ( )
2020-10-05 22:53:40 -03:00
elif menuS in [ " M " , " m " ] :
GamesMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " X " , " x " ] :
2020-06-11 16:40:02 -03:00
dnt ( )
2020-07-13 19:28:56 -03:00
elif menuS in [ " U " , " u " ] :
upgrade ( )
2020-09-19 22:54:27 -03:00
elif menuS in [ " W " , " w " ] :
weatherMenu ( )
2020-08-25 22:06:10 -03:00
elif menuS in [ " N " , " n " ] :
2020-08-25 21:42:25 -03:00
settings4 ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " T " , " t " ] :
2020-06-24 17:08:28 -03:00
clear ( )
2020-06-25 15:53:20 -03:00
delay_print ( " \033 [1;32;40mWake up, Neo... " )
2020-06-24 17:08:28 -03:00
t . sleep ( 2 )
2020-06-25 15:53:20 -03:00
clear ( )
delay_print ( " The Matrix has you... " )
2020-06-24 17:08:28 -03:00
t . sleep ( 2 )
2020-06-25 15:53:20 -03:00
clear ( )
delay_print ( " Follow the white rabbit. " )
t . sleep ( 3 )
clear ( )
print ( " Knock, knock, Neo. \033 [0;37;40m \n " )
t . sleep ( 2 )
clear ( )
t . sleep ( 3 )
2020-06-11 16:40:02 -03:00
screensv ( )
2020-06-11 19:49:41 -03:00
2020-06-11 16:40:02 -03:00
def menuRemote ( menuS ) : #Execution of the Main Menu options
2020-06-25 18:53:52 +00:00
if menuS in [ " A " , " a " ] :
2020-06-11 16:40:02 -03:00
while True :
try :
clear ( )
close ( )
remotegetblock ( )
tmp ( )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuS in [ " B " , " b " ] :
2020-06-11 16:40:02 -03:00
while True :
try :
clear ( )
close ( )
remotegetblockcount ( )
tmp ( )
2020-06-13 19:23:52 -03:00
except :
break
2020-08-25 20:08:40 -03:00
elif menuS in [ " C " , " c " ] :
2020-09-25 19:56:40 -03:00
runTheNumbersMenuConn ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " H " , " h " ] :
2020-06-11 18:46:16 -03:00
remoteadvanceMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " L " , " l " ] :
2020-06-11 16:40:02 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 16:40:02 -03:00
menuSelectionLN ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " Q " , " q " ] :
2020-05-27 08:59:36 -03:00
os . _exit ( 0 )
apisnd . close ( )
donation . close ( )
clone . close ( )
logos . close ( )
feed . close ( )
2020-05-27 11:01:03 -03:00
sysinf . close ( )
2020-06-01 09:25:57 -03:00
nodeconnection . close ( )
2020-05-15 07:41:42 -03:00
exit ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " S " , " s " ] :
2020-05-25 19:35:24 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
satnodeMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " P " , " p " ] :
2020-06-19 17:51:28 -03:00
APIMenu ( )
2020-10-05 22:53:40 -03:00
elif menuS in [ " M " , " m " ] :
GamesMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " X " , " x " ] :
2020-05-20 20:32:31 -03:00
dnt ( )
2020-07-13 19:28:56 -03:00
elif menuS in [ " U " , " u " ] :
upgrade ( )
2020-07-15 22:44:08 -03:00
elif menuS in [ " G " , " g " ] :
settings4 ( )
2020-09-19 22:54:27 -03:00
elif menuS in [ " W " , " w " ] :
weatherMenu ( )
2020-06-25 18:53:52 +00:00
elif menuS in [ " T " , " t " ] : #Test feature fast access
2020-06-24 17:08:28 -03:00
clear ( )
2020-06-25 15:53:20 -03:00
delay_print ( " \033 [1;32;40mWake up, Neo... " )
2020-06-24 17:08:28 -03:00
t . sleep ( 2 )
2020-06-25 15:53:20 -03:00
clear ( )
delay_print ( " The Matrix has you... " )
2020-06-24 17:08:28 -03:00
t . sleep ( 2 )
2020-06-25 15:53:20 -03:00
clear ( )
delay_print ( " Follow the white rabbit. " )
t . sleep ( 3 )
clear ( )
print ( " Knock, knock, Neo. \033 [0;37;40m \n " )
t . sleep ( 2 )
clear ( )
t . sleep ( 3 )
2020-05-29 11:52:29 -03:00
screensv ( )
2020-06-10 19:02:49 -03:00
#------------------------------------------REMOTE
2020-05-29 11:52:29 -03:00
def menuLN ( menuLL ) :
2020-06-25 18:53:52 +00:00
if menuLL in [ " I " , " i " ] :
2020-05-29 11:52:29 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
getnewinvoice ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " P " , " p " ] :
2020-05-29 11:52:29 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-29 16:06:45 -03:00
payinvoice ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " Q " , " q " ] :
2020-06-01 22:38:56 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-04 14:28:45 -03:00
channelbalance ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " L " , " l " ] :
2020-06-11 16:40:02 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 16:40:02 -03:00
listinvoice ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " X " , " x " ] :
2020-06-11 16:40:02 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 16:40:02 -03:00
listonchaintxs ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " C " , " c " ] :
2020-06-11 16:40:02 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 16:40:02 -03:00
channels ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " B " , " b " ] :
2020-06-01 22:38:56 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-04 14:28:45 -03:00
getnewaddress ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " N " , " n " ] :
2020-06-01 22:38:56 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
getinfo ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " O " , " o " ] :
2020-06-03 18:26:59 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
balanceOC ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " R " , " r " ] :
2020-06-11 16:40:02 -03:00
menuUserConn ( )
2020-06-10 19:02:49 -03:00
#------------------------------------------END REMOTE
#------------------------------------------LOCAL
def menuLNlocal ( menuLL ) :
2020-06-25 18:53:52 +00:00
if menuLL in [ " I " , " i " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localaddinvoice ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " P " , " p " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localpayinvoice ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " Q " , " q " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localchannelbalance ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " L " , " l " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 20:28:39 -03:00
locallistinvoices ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " X " , " x " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 20:28:39 -03:00
locallistchaintxns ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " C " , " c " ] :
2020-06-10 20:28:39 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 20:28:39 -03:00
locallistchannels ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " B " , " b " ] :
2020-06-10 20:28:39 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 20:28:39 -03:00
localnewaddress ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " N " , " n " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localgetinfo ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " O " , " o " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localbalanceOC ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " W " , " w " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localgetnetworkinfo ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " J " , " j " ] :
2020-06-19 17:51:28 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-19 17:51:28 -03:00
sysinfo ( )
close ( )
consoleLN ( )
t . sleep ( 5 )
except :
break
2020-06-25 18:53:52 +00:00
elif menuLL in [ " K " , " k " ] :
2020-06-10 19:02:49 -03:00
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-10 19:02:49 -03:00
localkeysend ( )
2020-08-30 12:30:37 -03:00
elif menuLL in [ " E " , " e " ] :
clear ( )
blogo ( )
locallistpeersQQ ( )
2020-08-30 12:23:39 -03:00
elif menuLL in [ " Z " , " z " ] :
clear ( )
blogo ( )
localconnectpeer ( )
2020-06-25 18:53:52 +00:00
elif menuLL in [ " R " , " r " ] :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-10 19:02:49 -03:00
#------------------------------------------END LOCAL
2020-05-25 19:35:24 -03:00
def menuB ( menuR ) : # Advanced access Menu
2020-06-25 18:53:52 +00:00
if menuR in [ " A " , " a " ] :
2020-05-18 22:25:55 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-18 22:25:55 -03:00
close ( )
console ( )
t . sleep ( 5 )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " B " , " b " ] :
2020-05-18 22:25:55 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-18 22:25:55 -03:00
close ( )
logoA ( )
tmp ( )
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-18 22:25:55 -03:00
close ( )
logoB ( )
tmp ( )
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-18 22:25:55 -03:00
close ( )
logoC ( )
tmp ( )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " C " , " c " ] :
2020-05-20 20:32:31 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
sysinfo ( )
2020-05-20 20:32:31 -03:00
close ( )
decodeQR ( )
t . sleep ( 50 )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " S " , " s " ] :
2020-05-25 19:35:24 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
close ( )
sysinfoDetail ( )
t . sleep ( 1 )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " R " , " r " ] :
2020-05-27 16:19:42 -03:00
try :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-05-27 16:19:42 -03:00
os . _exit ( 0 )
apisnd . close ( )
donation . close ( )
clone . close ( )
logos . close ( )
feed . close ( )
sysinf . close ( )
exit ( )
2020-06-11 19:49:41 -03:00
2020-06-11 18:46:16 -03:00
def menuBA ( menuR ) : # Advanced access Menu
2020-06-25 18:53:52 +00:00
if menuR in [ " A " , " a " ] :
2020-06-11 18:46:16 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
sysinfo ( )
close ( )
remoteconsole ( )
t . sleep ( 5 )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " B " , " b " ] :
2020-06-11 18:46:16 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
close ( )
logoA ( )
tmp ( )
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
close ( )
logoB ( )
tmp ( )
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
close ( )
logoC ( )
tmp ( )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " C " , " c " ] :
2020-06-11 18:46:16 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
sysinfo ( )
close ( )
decodeQR ( )
t . sleep ( 50 )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " S " , " s " ] :
2020-06-11 18:46:16 -03:00
while True :
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-06-11 18:46:16 -03:00
close ( )
sysinfoDetail ( )
t . sleep ( 1 )
2020-06-13 19:23:52 -03:00
except :
break
2020-06-25 18:53:52 +00:00
elif menuR in [ " R " , " r " ] :
2020-06-11 18:46:16 -03:00
try :
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 18:46:16 -03:00
os . _exit ( 0 )
apisnd . close ( )
donation . close ( )
clone . close ( )
logos . close ( )
feed . close ( )
sysinf . close ( )
exit ( )
2020-06-10 19:02:49 -03:00
2020-05-25 19:35:24 -03:00
def menuC ( menuO ) : # Donation access Menu
2020-06-25 18:53:52 +00:00
if menuO in [ " A " , " a " ] :
2020-05-23 08:50:38 -03:00
dntDev ( )
2020-06-25 18:53:52 +00:00
elif menuO in [ " B " , " b " ] :
2020-05-23 08:50:38 -03:00
dntTst ( )
2020-06-25 18:53:52 +00:00
elif menuO in [ " R " , " r " ] :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
def menuD ( menuN ) : # Satnode access Menu
2020-06-25 18:53:52 +00:00
if menuN in [ " A " , " a " ] :
2020-05-23 08:50:38 -03:00
satnode ( )
2020-06-25 18:53:52 +00:00
elif menuN in [ " B " , " b " ] :
2020-05-23 08:50:38 -03:00
readFile ( )
2020-06-25 18:53:52 +00:00
elif menuN in [ " S " , " s " ] :
2020-05-25 19:35:24 -03:00
try :
close ( )
2020-05-26 14:20:20 -03:00
message = input ( " \n \033 [0;37;40mYour message it ' s a \033 [1;34;40mF \033 [0;37;40mile or a plain \033 [1;32;40mT \033 [0;37;40mext? \033 [1;34;40mF \033 [0;37;40m/ \033 [1;32;40mT \033 [0;37;40m: " )
2020-06-25 18:53:52 +00:00
if message in [ " F " , " f " ] :
2020-05-26 14:20:20 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-26 14:20:20 -03:00
close ( )
apisenderFile ( )
2020-05-26 20:48:23 -03:00
t . sleep ( 30 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif message in [ " T " , " t " ] :
2020-05-26 14:20:20 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-26 14:20:20 -03:00
close ( )
apisender ( )
2020-05-26 20:48:23 -03:00
t . sleep ( 30 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuN in [ " C " , " c " ] :
2020-05-23 08:50:38 -03:00
print ( " \n \t This only will work on Linux or Unix systems. \n " )
a = input ( " Do we continue? Y/n: " )
2020-06-25 18:53:52 +00:00
if a in [ " Y " , " y " ] :
2020-05-23 08:50:38 -03:00
gitclone ( )
else :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuN in [ " D " , " d " ] :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
def menuE ( menuQ ) : # Dev Donation access Menu
2020-06-25 18:53:52 +00:00
if menuQ in [ " A " , " a " ] :
2020-05-20 20:32:31 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-20 20:32:31 -03:00
close ( )
donationPN ( )
t . sleep ( 50 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuQ in [ " B " , " b " ] :
2020-05-20 20:32:31 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-20 20:32:31 -03:00
close ( )
donationAddr ( )
t . sleep ( 50 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuQ in [ " C " , " c " ] :
2020-05-20 20:32:31 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-20 20:32:31 -03:00
close ( )
donationLN ( )
t . sleep ( 50 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuQ in [ " R " , " r " ] :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-05-24 14:15:12 -03:00
2020-05-25 19:35:24 -03:00
def menuF ( menuV ) : # Tester Donation access Menu
2020-06-25 18:53:52 +00:00
if menuV in [ " A " , " a " ] :
2020-05-23 08:50:38 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-23 08:50:38 -03:00
close ( )
donationAddrTst ( )
t . sleep ( 50 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuV in [ " B " , " b " ] :
2020-05-23 08:50:38 -03:00
try :
clear ( )
2020-08-30 12:23:39 -03:00
blogo ( )
2020-05-23 08:50:38 -03:00
close ( )
donationLNTst ( )
t . sleep ( 50 )
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-13 19:23:52 -03:00
except :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-06-25 18:53:52 +00:00
elif menuV in [ " R " , " r " ] :
2020-06-11 16:40:02 -03:00
menuSelection ( )
2020-05-23 08:50:38 -03:00
2020-05-16 12:51:30 -03:00
#--------------------------------- End Main Menu execution --------------------------------
2020-05-24 14:15:12 -03:00
2020-07-15 22:44:08 -03:00
settings = { " gradient " : " " , " design " : " block " , " colorA " : " green " , " colorB " : " yellow " }
2020-06-02 22:59:20 -03:00
while True : # Loop
clear ( )
2020-06-11 19:49:41 -03:00
path = { " ip_port " : " " , " rpcuser " : " " , " rpcpass " : " " , " bitcoincli " : " " }
2020-06-11 16:40:02 -03:00
2020-05-29 11:52:29 -03:00
if os . path . isfile ( ' bclock.conf ' ) or os . path . isfile ( ' blnclock.conf ' ) : # Check if the file 'bclock.conf' is in the same folder
2020-05-16 00:21:47 -03:00
pathv = pickle . load ( open ( " bclock.conf " , " rb " ) ) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
else :
2020-08-30 12:50:19 -03:00
blogo ( )
2020-05-25 19:35:24 -03:00
print ( " Welcome to \033 [1;31;40mPyBLOCK \033 [0;37;40m \n \n " )
2020-06-11 16:40:02 -03:00
print ( " \n \t If you are going to use your local node leave IP:PORT/USER/PASSWORD in blank. \n " )
path [ ' ip_port ' ] = " http:// {} " . format ( input ( " Insert IP:PORT to access your remote Bitcoin-Cli node: " ) )
path [ ' rpcuser ' ] = input ( " RPC User: " )
path [ ' rpcpass ' ] = input ( " RPC Password: " )
print ( " \n \t Local Bitcoin Core Node connection. \n " )
path [ ' bitcoincli ' ] = input ( " Insert the Path to Bitcoin-Cli: " )
2020-06-10 19:02:49 -03:00
pickle . dump ( path , open ( " bclock.conf " , " wb " ) )
2020-06-25 18:53:52 +00:00
menuSelection ( )