pyblock/pybitblock/PyBlock.py

7254 lines
241 KiB
Python
Raw Permalink Normal View History

2020-05-10 21:11:21 -03:00
#Developer: Curly60e
2021-11-28 14:32:02 -03:00
#Tester: __B__T__C__
2022-02-12 11:25:12 -03:00
#𝕪𝔹𝕃𝕆𝕂 𝕚𝕥𝕤 𝕒 𝔹𝕚𝕥𝕔𝕠𝕚𝕟 𝔻𝕒𝕤𝕙𝕓𝕠𝕒𝕣𝕕 𝕨𝕚𝕥𝕙 𝕪𝕡𝕙𝕖𝕣𝕡𝕦𝕟𝕜 𝕒𝕖𝕤𝕥𝕙𝕖𝕥𝕚𝕔.
2020-05-10 21:11:21 -03:00
2020-05-06 16:34:55 -03:00
import os
import os.path
2020-05-06 16:34:55 -03:00
import time as t
import pickle
import psutil
2020-05-29 11:52:29 -03:00
import qrcode
2020-06-19 17:51:28 -03:00
import random
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-12-07 20:56:35 -03:00
import numpy as np
2022-03-16 20:52:13 -03:00
from SPV.spvblock import *
from cfonts import render, say
from clone import *
from donation import *
from feed import *
from art import *
from logos import *
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
from nodeconnection import *
2020-05-29 11:52:29 -03:00
from terminal_matrix.matrix import *
2020-12-07 20:56:35 -03:00
from PIL import Image
from robohash import Robohash
2022-12-21 21:47:49 +01:00
from binascii import unhexlify
from embit import bip39
from embit.wordlists.bip39 import WORDLIST
2020-05-06 16:34:55 -03:00
2022-12-22 09:40:59 -03:00
version = "2.0.12"
2021-09-24 09:00:59 -03:00
def close():
2022-03-09 02:14:10 +01:00
print("<<< Ctrl + C.\n\n")
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")
2022-09-27 19:39:22 +00:00
print(
f" \033[3;33;40mMemory Usage: \033[1;32;40m{int(psutil.virtual_memory().percent)}% \033[0;37;40m"
)
print(" \033[0;37;40m----------------------")
2022-03-13 23:59:13 -03:00
def rectangle(n):
x = n - 3
y = n - x
[
print(''.join(i))
for i in
(
''*x
if i in (0,y-1)
else
(
f'{""*n}{"|"*n}{""*n}'
if i >= (n+1)/2 and i <= (1*n)/2
else
2022-03-22 23:18:44 +01:00
f'\u001b[38;5;27m{""*(x-1)}'
2022-03-13 23:59:13 -03:00
)
for i in range(y)
)
]
def rpc(method, params=[]):
payload = json.dumps({
"jsonrpc": "2.0",
"id": "minebet",
"method": method,
"params": params
})
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
2022-03-16 00:31:26 -03:00
if os.path.isfile('config/bclock.conf'): # Check if the file 'bclock.conf' is in the same folder
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
return requests.post(path['ip_port'], auth=(path['rpcuser'], path['rpcpass']), data=payload).json()['result']
2022-03-17 21:37:11 -03:00
def pathexec():
global path
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
2022-03-07 00:04:06 -03:00
2022-03-17 21:37:11 -03:00
def lndconnectexec():
global lndconnectload
lndconnectData = pickle.load(open("config/blndconnect.conf", "rb")) # Load the file 'bclock.conf'
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
2022-03-07 23:51:30 +01:00
#-----------------------------Slush--------------------------------
2022-03-18 18:44:47 -03:00
def counttxs():
2022-03-20 20:29:22 -03:00
try:
2022-03-20 16:47:23 -03:00
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
2022-03-20 20:29:22 -03:00
a = b
2022-03-20 16:47:23 -03:00
pathexec()
2022-03-20 20:29:22 -03:00
clear()
2022-03-20 16:47:23 -03:00
getrawmempool = " getrawmempool"
gna = os.popen(path['bitcoincli'] + getrawmempool)
gnaa = gna.read()
gna1 = str(gnaa)
d = json.loads(gna1)
e = len(d)
n = e / 10
2022-03-20 20:29:22 -03:00
nn = n
2022-03-22 22:20:00 +00:00
getrawmempool = " getrawmempool"
2022-03-20 20:29:22 -03:00
while True:
x = a
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
pathexec()
gna = os.popen(path['bitcoincli'] + getrawmempool)
gnaa = gna.read()
gna1 = str(gnaa)
d = json.loads(gna1)
e = len(d)
n = e / 10
if e > nn:
clear()
2022-03-22 22:20:00 +00:00
outputtxs = render(
f'{e} txs',
colors=[settingsClock['colorA'], settingsClock['colorB']],
align='center',
font='tiny',
)
2022-03-20 20:29:22 -03:00
print("\x1b[?25l" + outputtxs)
shq = int(n)
ss = str(rectangle(shq))
qq = ss.replace("None","")
print(f"\033[A{qq}\033[A")
nn = e
if b > a:
print("\n\n\n")
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
print("\a\x1b[?25l" + output)
bitcoinclient = f'{path["bitcoincli"]} getbestblockhash'
bb = os.popen(str(bitcoinclient)).read()
ll = bb
bitcoinclientgetblock = f'{path["bitcoincli"]} getblock {ll}'
qq = os.popen(bitcoinclientgetblock).read()
yy = json.loads(qq)
mm = yy
outputtxs = render(str(mm['nTx']) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
print("\x1b[?25l" + outputtxs)
2022-03-20 20:33:32 -03:00
sh = int(mm['nTx']) / 10
2022-03-20 20:29:22 -03:00
shq = int(sh)
ss = str(rectangle(shq))
print(ss.replace("None",""))
t.sleep(5)
2022-03-21 10:27:19 -03:00
txs = str(mm['nTx'])
if txs == "1":
try:
p = subprocess.Popen(['curl', 'https://poptart.spinda.net'])
p.wait(5)
except subprocess.TimeoutExpired:
p.kill()
print("\033[0;37;40m\x1b[?25l")
2022-03-25 11:28:03 -03:00
clear()
2022-03-20 20:29:22 -03:00
a = b
nn = e
except:
pass
2022-03-18 18:44:47 -03:00
2022-03-07 23:51:30 +01:00
def slDIFFConn():
try:
2022-03-09 08:59:25 -03:00
conn = """curl -s https://insights.braiins.com/api/v1.0/difficulty-stats"""
2022-03-07 23:51:30 +01:00
a = os.popen(conn).read()
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render("difficulty", colors=['yellow'], align='left', font='tiny')
2022-03-07 23:51:30 +01:00
print(output)
2022-03-09 08:59:25 -03:00
b = json.loads(a)
print(f"""\n
Block epoch: {b['blocks_epoch']}
Difficulty: {b['difficulty']}
Epoch block time: {b['epoch_block_time']}
Estimated adjustment: {b['estimated_adjustment']}
Estimated adjustemnt date: {b['estimated_adjustment_date']}
Estimated next differece: {b['estimated_next_diff']}
Previous adjustment: {b['previous_adjustment']}
""")
2022-03-07 23:51:30 +01:00
input("\a\nContinue...")
except:
pass
def slHASHConn():
try:
2022-03-09 08:59:25 -03:00
conn = """curl -s https://insights.braiins.com/api/v1.0/hash-rate-stats"""
2022-03-07 23:51:30 +01:00
a = os.popen(conn).read()
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render("hash rate", colors=['yellow'], align='left', font='tiny')
2022-03-07 23:51:30 +01:00
print(output)
2022-03-09 08:59:25 -03:00
b = json.loads(a)
print(f"""\n
Averiage fees per block: {b['avg_fees_per_block']}
Current hashrate: {b['current_hashrate']}
Fees percent: {b['fees_percent']}
Hash price: {b['hash_price']}
Hash rate 30: {b['hash_rate_30']}
Hash value: {b['hash_value']}
Rev. USD: {b['rev_usd']}
""")
2022-03-07 23:51:30 +01:00
input("\a\nContinue...")
except:
pass
2022-03-07 21:51:32 -03:00
2022-03-07 23:51:30 +01:00
def slPOOLConn():
try:
conn = """curl -s https://insights.braiins.com/api/v1.0/pool-stats?json=1 | jq -C '.[]' | tr -d '{|}|]|,' | xargs -L 1 | grep -E " " """
a = os.popen(conn).read()
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render("pool", colors=['yellow'], align='left', font='tiny')
2022-03-07 23:51:30 +01:00
print(output)
print(a)
input("\a\nContinue...")
except:
pass
2022-03-07 21:51:32 -03:00
2022-03-07 23:51:30 +01:00
def slHISTConn():
try:
conn = """curl -s https://insights.braiins.com/api/v1.0/hashrate-and-difficulty-history?json=1 | jq -C '.[]' | tr -d '{|}|]|,' | xargs -L 1 | grep -E " " """
a = os.popen(conn).read()
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render("history", colors=['yellow'], align='left', font='tiny')
2022-03-07 23:51:30 +01:00
print(output)
print(a)
input("\a\nContinue...")
except:
pass
2022-03-07 21:51:32 -03:00
2022-03-07 00:04:06 -03:00
def getPoolSlushCheck():
s = ""
sq = s
api = ""
2022-03-08 20:36:01 -03:00
try:
if os.path.isfile("config/slushAPI.conf"):
apiv = pickle.load(open("config/slushAPI.conf", "rb"))
api = apiv
else:
clear()
blogo()
api = input("Insert Slush API KEY: ")
pickle.dump(api, open("config/slushAPI.conf", "wb"))
except:
pass
2022-03-07 00:04:06 -03:00
while True:
try:
2022-03-12 02:05:30 +00:00
slushpoolbtc = f"curl https://slushpool.com/accounts/profile/json/btc/ -H 'SlushPool-Auth-Token: {api}' 2>/dev/null"
slushpoolbtcblock = f"curl https://slushpool.com/stats/json/btc/ -H 'SlushPool-Auth-Token: {api}' 2>/dev/null"
2022-03-07 00:04:06 -03:00
b = os.popen(slushpoolbtc)
c = b.read()
d = json.loads(c)
f = d['btc']
bblock = os.popen(slushpoolbtcblock)
cblock = bblock.read()
dblock = json.loads(cblock)
fblock = dblock['btc']
eblock = fblock['blocks']
for i in eblock:
qnq = sorted(eblock)
for n in qnq:
s = n
if s > sq:
2022-09-27 19:39:22 +00:00
newblock = f"\a\n\n\t\t\u001b[31;1m New Block Mined \u001b[38;5;27m{s}\u001b[31;1m! \u001b[38;5;202mFresh sats for you!\033[0;37;40m"
sq = s
2022-03-07 00:04:06 -03:00
else:
2022-09-27 19:39:22 +00:00
newblock = s
2022-03-07 00:04:06 -03:00
clear()
blogo()
print("""\033[A
--------------------------------------------------------------------------------------------
2022-10-04 11:06:07 -03:00
\033[0;37;40mBraiins Pool
2022-03-07 00:04:06 -03:00
Username: {}
Confirmed reward: \u001b[38;5;40m{}\033[0;37;40m BTC
Unconfirmed reward: \u001b[33;1m{}\033[0;37;40m BTC
Estimated reward: {} BTC
All Time reward: {} BTC
Hash Rate 5m: {} Gh/s
Hash Rate 60m: {} Gh/s
Hash Rate 24h: {} Gh/s
Hash Rate Scoring: \u001b[38;5;27m{}\033[0;37;40m Gh/s
Hash Rate Yesterday: {} Gh/s
Connected Workers: {}
Disconnected Workers: {}
Last Block discovered: {}
--------------------------------------------------------------------------------------------
\033[A""".format(d['username'], f['confirmed_reward'], f['unconfirmed_reward'], f['estimated_reward'], f['all_time_reward'], f['hash_rate_5m'], f['hash_rate_60m'], f['hash_rate_24h'], f['hash_rate_scoring'], f['hash_rate_yesterday'], f['ok_workers'], f['off_workers'],newblock))
t.sleep(10)
except:
break
2022-03-07 23:56:34 +01:00
#-----------------------------END Slush--------------------------------
2022-03-07 23:51:30 +01:00
2022-03-17 20:13:43 -03:00
def ckpoolpoolLOCALOnchainONLY():
2022-03-17 21:21:37 +01:00
s = ""
sq = s
api = ""
try:
if os.path.isfile("config/CKPOOLAPI.conf"):
apiv = pickle.load(open("config/CKPOOLAPI.conf", "rb"))
api = apiv
else:
clear()
blogo()
api = input("Insert CKPool Wallet.Worker: ")
2022-03-17 19:48:04 -03:00
pickle.dump(api, open("config/CKPOOLAPI.conf", "wb"))
2022-03-17 21:21:37 +01:00
except:
pass
while True:
try:
2022-03-17 20:13:43 -03:00
ckpool = f"curl https://solo.ckpool.org/users/{api} 2>/dev/null"
2022-03-17 21:21:37 +01:00
2022-03-17 19:48:04 -03:00
b = os.popen(ckpool)
2022-03-17 21:21:37 +01:00
c = b.read()
d = json.loads(c)
2022-03-17 19:48:04 -03:00
f = d['worker']
e = f[0]
2022-03-17 21:21:37 +01:00
clear()
blogo()
print("""\033[A
--------------------------------------------------------------------------------------------
\033[0;37;40mCKPool BTC
Username: {}
2022-03-17 19:48:04 -03:00
Hash Rate 1m: {}
Hash Rate 5m: {}
Hash Rate 1h: {}
Hash Rate 1d: {}
Hash Rate 7d: {}
Last Share: \u001b[38;5;27m{}\033[0;37;40m
Shares: {}
Best Share: {}
Best Ever: {}
Workers: {}
2022-03-17 21:21:37 +01:00
--------------------------------------------------------------------------------------------
2022-03-17 19:48:04 -03:00
\033[A""".format(e['workername'], e['hashrate1m'], e['hashrate5m'], e['hashrate1hr'], e['hashrate1d'], e['hashrate7d'], e['lastshare'], e['shares'], e['bestshare'], e['bestever'], d['workers']))
2022-03-17 21:21:37 +01:00
2022-03-17 19:58:42 -03:00
t.sleep(10)
2022-03-17 21:21:37 +01:00
except:
break
2022-03-07 23:51:30 +01:00
def getblock(): # get access to bitcoin-cli with the command getblockchaininfo
while True:
try:
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print(d)
clear()
blogo()
2021-09-24 09:00:59 -03:00
close()
2022-03-08 23:03:11 +00:00
output = render("CHAIN INFO", colors=['yellow'], align='left', font='tiny')
2021-11-27 10:53:51 -03:00
print(output)
print("""
2021-09-24 09:00:59 -03:00
----------------------------------------------------------------------------
Chain: {}
Blocks: {}
Best BlockHash: {}
Difficulty: {}
Verification Progress: {}
Size on Disk: {}
Pruned: {}
2021-09-24 09:00:59 -03:00
----------------------------------------------------------------------------
""".format(d['chain'], d['blocks'], d['bestblockhash'], d['difficulty'], d['verificationprogress'], d['size_on_disk'], d['pruned']))
t.sleep(10)
except:
break
2021-12-11 15:53:43 -03:00
def searchTXS():
2021-12-20 16:29:23 -03:00
try:
2022-09-27 19:39:22 +00:00
gettxout = " gettxout "
2021-12-11 15:53:43 -03:00
while True:
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render("search txs", colors=['yellow'], align='left', font='tiny')
2021-12-11 15:53:43 -03:00
print(output)
tx = input("Search Tx ID: ")
2021-12-20 16:29:23 -03:00
gnt = os.popen(path['bitcoincli'] + gettxout + tx + " 1")
gnta = gnt.read()
gnt1 = str(gnta)
gnt2 = json.loads(gnt1)
if gnt2['bestblock']:
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render("search txs", colors=['yellow'], align='left', font='tiny')
2021-12-20 16:29:23 -03:00
print(output)
2022-09-27 19:39:22 +00:00
scriptPubKey = gnt2['scriptPubKey']
2021-12-20 16:29:23 -03:00
print("""
-------------------------------------------------------------------------------
Tx: \u001b[38;5;40m{} \033[0;37;40m
-------------------------------------------------------------------------------
\u001b[31;1mBestblockhash: \u001b[31;1m{}
\u001b[31;1mConfirmations: \u001b[38;5;27m{}
\u001b[31;1mAmount: \u001b[38;5;202m{} BTC
\u001b[31;1mAddress: \u001b[33;1m{}\033[0;37;40m
-------------------------------------------------------------------------------
""".format(tx, gnt2['bestblock'], gnt2['confirmations'], gnt2['value'], scriptPubKey['address']))
else:
print("Is this a \u001b[38;5;40m Coinbase\033[0;37;40m tx?")
input("\n\033[?25l\033[0;37;40m\n\033[AContinue...\033[A")
except:
pass
2021-12-11 15:53:43 -03:00
2021-11-26 00:57:45 -03:00
def untxsConn():
try:
while True:
clear()
blogo()
closed()
2022-03-08 23:03:11 +00:00
output = render(
"unconfirmed txs", colors=['yellow'], align='left', font='tiny'
)
2021-11-26 17:23:28 -03:00
print(output)
2021-11-26 00:57:45 -03:00
getrawmempool = " getrawmempool"
gna = os.popen(path['bitcoincli'] + getrawmempool)
gnaa = gna.read()
gna1 = str(gnaa)
d = json.loads(gna1)
2021-11-26 20:25:00 +00:00
getrawtrans = " getrawtransaction "
2021-11-26 00:57:45 -03:00
for b in d:
n = "".join(map(str, b))
m = getrawtrans + n + " 1"
gnb = os.popen(path['bitcoincli'] + m)
gnba = gnb.read()
gnb1 = str(gnba)
2021-11-26 17:23:28 -03:00
abc = json.loads(gnb1)
ab = abc['vout']
2021-11-26 22:21:14 +00:00
knz = 'address'
2021-12-06 20:29:23 +00:00
for value in ab:
2021-11-26 17:23:28 -03:00
knx = value['scriptPubKey']
2021-11-26 19:20:09 -03:00
if knz in knx:
2022-09-27 19:39:22 +00:00
print(
f"TxID: \u001b[38;5;40m{b} \033[0;37;40m| \u001b[31;1mAmount: \u001b[38;5;202m{value['value']} BTC \033[0;37;40m| \u001b[31;1mAddress: \u001b[33;1m{knx['address']}\033[0;37;40m | \u001b[31;1mType: \u001b[31;1m{knx['type']}\u001b[33;1m"
)
2021-11-26 19:20:09 -03:00
else:
2022-09-27 19:39:22 +00:00
print(
f"TxID: \u001b[38;5;40m{b} \033[0;37;40m| \u001b[31;1mAmount: \u001b[38;5;202m{value['value']} BTC \033[0;37;40m| \u001b[31;1mOP_RETURN: \u001b[38;5;27m{knx['asm']}\033[0;37;40m | \u001b[31;1mType: \u001b[31;1m{knx['type']}\u001b[33;1m"
)
2022-03-12 02:05:30 +00:00
decodeTX = (
path['bitcoincli']
+ f" getrawtransaction {b}"
+ " | xxd -r -p | hexyl -n 256"
)
print("OP_RETURN Hex: ")
os.system(decodeTX)
input("\n\033[?25l\033[0;37;40m\n\033[AContinue...\033[A")
2021-11-26 00:57:45 -03:00
except:
pass
2021-11-24 07:47:40 -03:00
def getnewaddressOnchain():
2021-11-24 19:56:39 -03:00
try:
clear()
blogo()
close()
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)
getadd = " getnewaddress"
getbal = " getbalance"
getfeemempool = " getmempoolinfo"
getunconfirm = " getunconfirmedbalance"
gna = os.popen(path['bitcoincli'] + getadd)
gnaa = gna.read()
gna1 = str(gnaa)
gnb = os.popen(path['bitcoincli'] + getbal)
gnbb= gnb.read()
gnb1 = str(gnbb)
2021-11-24 19:56:39 -03:00
gnu = os.popen(path['bitcoincli'] + getunconfirm)
gnua= gnu.read()
gnub = str(gnua)
2022-02-12 14:26:59 +00:00
output = render(
str(f'{gnb1} BTC'), colors=['yellow'], align='left', font='tiny'
)
2021-11-24 19:56:39 -03:00
print("""---------------------------------------------------------------
{}
---------------------------------------------------------------""".format(output))
2021-11-24 19:56:39 -03:00
print("Unconfrmed: \u001b[31;1m{} BTC\033[0;37;40m".format(gnub.replace("\n","")))
print("---------------------------------------------------------------")
print("\033[1;30;47m")
qr.add_data(gna1.replace("\n",""))
qr.print_ascii()
print("\033[0;37;40m")
qr.clear()
print("\x1b[?25l" + "Bitcoin Address: " + gna1)
gna.close()
a = gnub
b = gnb1
getbal = " getbalance"
while True:
x = a
z = b
gnb = os.popen(path['bitcoincli'] + getbal)
gnbb= gnb.read()
gnb1 = str(gnbb)
2021-11-24 07:47:40 -03:00
gnaq = os.popen(path['bitcoincli'] + getfeemempool)
gnaaq = gnaq.read()
gna1q = str(gnaaq)
2021-11-24 19:56:39 -03:00
gnu = os.popen(path['bitcoincli'] + getunconfirm)
gnua= gnu.read()
gnub = str(gnua)
2021-11-24 07:47:40 -03:00
d = json.loads(gna1q)
2021-11-24 19:56:39 -03:00
if gnub > a or gnb1 > b:
clear()
blogo()
close()
getadd = " getnewaddress"
gna = os.popen(path['bitcoincli'] + getadd)
gnaa = gna.read()
gna1 = str(gnaa)
2022-02-12 14:29:58 +00:00
output = render(
str(f'{gnb1} BTC'),
colors=['yellow'],
align='left',
font='tiny',
)
2021-11-24 19:56:39 -03:00
print("""---------------------------------------------------------------
{}
---------------------------------------------------------------""".format(output))
print("Unconfrmed: \u001b[31;1m{} BTC\033[0;37;40m".format(gnub.replace("\n","")))
print("---------------------------------------------------------------")
getfeemempool = " getmempoolinfo"
gnaq = os.popen(path['bitcoincli'] + getfeemempool)
gnaaq = gnaq.read()
gna1q = str(gnaaq)
d = json.loads(gna1q)
print("\033[1;30;47m")
qr.add_data(gna1.replace("\n",""))
qr.print_ascii()
print("\033[0;37;40m")
qr.clear()
print("\x1b[?25l" + "Bitcoin Address: " + gna1)
gna.close()
a = gnub
b = gnb1
2021-12-02 08:30:19 -03:00
nn = float(d['total_fee']) / float(d['bytes']) * float(100000000)
2022-09-27 19:39:22 +00:00
print(f"\n\033[ALive Fee: ~{nn} sat/vB \033[A")
2021-12-02 08:30:19 -03:00
t.sleep(10)
2021-11-24 19:56:39 -03:00
except:
walletmenuLOCALOnchainONLY()
2021-11-24 07:47:40 -03:00
def gettransactionsOnchain():
2021-11-24 19:56:39 -03:00
try:
2022-03-07 22:57:31 +00:00
listtxs = " listunspent"
2021-11-24 19:56:39 -03:00
while True:
clear()
blogo()
close()
gna = os.popen(path['bitcoincli'] + listtxs)
gnaa = gna.read()
gna1 = str(gnaa)
d = json.loads(gna1)
2022-03-07 22:57:31 +00:00
gnb = os.popen(path['bitcoincli'] + " getbalance")
2021-11-24 19:56:39 -03:00
gnbb= gnb.read()
gnb1 = str(gnbb)
sort_order = sorted(d, key=lambda x:x['confirmations'], reverse=True)
2022-03-08 23:03:11 +00:00
output = render("transactions", colors=['yellow'], align='left', font='tiny')
2021-11-26 17:23:28 -03:00
print(output)
2021-11-24 19:56:39 -03:00
for q in sort_order:
2022-03-08 23:03:11 +00:00
print(
2022-09-27 19:39:22 +00:00
(
(
(
(
f"TxID: \u001b[38;5;40m{str(q['txid'])}\033[0;37;40m | Amount: "
+ f"\u001b[38;5;202m{str(q['amount'])} BTC\033[0;37;40m"
)
+ " | "
)
+ "Conf: "
)
+ f"\u001b[33;1m{str(q['confirmations'])}\033[0;37;40m"
2022-03-08 23:03:11 +00:00
)
)
2021-11-24 19:56:39 -03:00
2022-09-27 19:39:22 +00:00
2021-11-24 19:56:39 -03:00
print("\nTotal Balance: \u001b[38;5;202m{} BTC \033[0;37;40m".format(gnb1.replace("\n", "")))
input("\nRefresh...")
except:
walletmenuLOCALOnchainONLY()
2022-12-24 11:24:44 -03:00
def dumppk(): #
2022-12-23 02:42:46 +01:00
try:
clear()
blogo()
output = render("Dumpprivkey", colors=['yellow'], align='left', font='tiny')
print(output)
responseC = input("Bitcoin Address: ")
bitcoincli = " dumpprivkey"
2022-12-24 11:24:44 -03:00
os.system(path['bitcoincli'] + bitcoincli + f"{responseC}")
2022-12-23 02:42:46 +01:00
input("\a\nContinue...")
except:
walletmenuLOCALOnchainONLY()
2022-12-24 11:24:44 -03:00
2022-12-25 03:32:46 +01:00
def wallmenu(): #
try:
clear()
blogo()
output = render("Wallet info", colors=['yellow'], align='left', font='tiny')
print(output)
bitcoincli = " getwalletinfo"
os.system(path['bitcoincli'] + bitcoincli)
input("\a\nContinue...")
except:
walletmenuLOCALOnchainONLY()
def getblockcount(): # get access to bitcoin-cli with the command getblockcount
bitcoincli = " getblockcount"
os.system(path['bitcoincli'] + bitcoincli)
def getbestblockhash(): # get access to bitcoin-cli with the command getblockcount
bitcoincli = " getbestblockhash"
os.system(path['bitcoincli'] + bitcoincli)
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
2022-03-08 23:03:11 +00:00
output = render("genesis", colors=['yellow'], align='left', font='tiny')
2021-11-28 14:32:02 -03:00
print(output)
bitcoincli = " getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 0 | xxd -r -p | hexyl -n 256"
os.system(path['bitcoincli'] + bitcoincli)
2020-06-10 19:02:49 -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: ")
2022-03-12 02:05:30 +00:00
decodeBlock = (
path['bitcoincli']
+ f" getblock {hexa} {blocknumber}"
+ " | xxd -r -p | hexyl -n 256"
)
os.system(decodeBlock)
2020-06-10 19:02:49 -03:00
def readHexTx(): # Hex Decoder using Hexyl on an external node
hexa = input("Add the Transaction ID. you want to decode: ")
2022-03-12 02:05:30 +00:00
decodeTX = (
path['bitcoincli']
+ f" getrawtransaction {hexa}"
2022-03-18 20:22:58 -03:00
+ " | xxd -r -p | hexyl -n 256"
2022-03-12 02:05:30 +00:00
)
os.system(decodeTX)
2020-06-10 19:02:49 -03:00
def tmp():
t.sleep(15)
def console(): # get into the console from bitcoin-cli
2021-11-24 20:52:59 -03:00
print("\t\033[0;37;40mThis is \033[1;33;40mBitcoin-cli's \033[0;37;40mconsole. Type 'help' for more information.\n\n")
while True:
cle = input("\u001b[38;5;202m₿ console >: \033[0;37;40m")
if cle == "clear":
clear()
blogo()
sysinfo()
close()
console()
2022-02-12 14:26:59 +00:00
lsd = os.popen(f'{path["bitcoincli"]} {cle}')
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()
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
#------------------------------------------------------
def artist(): # here we convert the result of the command 'getblockcount' on a random art design
while True:
try:
clear()
close()
design()
except:
break
2020-05-10 21:11:21 -03:00
def design():
2021-12-11 15:53:43 -03:00
if os.path.isfile('config/pyblocksettingsClock.conf') or os.path.isfile('config/pyblocksettingsClock.conf'): # Check if the file 'bclock.conf' is in the same folder
settingsv = pickle.load(open("config/pyblocksettingsClock.conf", "rb")) # Load the file 'bclock.conf'
settingsClock = settingsv # Copy the variable pathv to 'path'
else:
settingsClock = {"gradient":"", "design":"block", "colorA":"green", "colorB":"yellow"}
2021-12-11 15:53:43 -03:00
pickle.dump(settingsClock, open("config/pyblocksettingsClock.conf", "wb"))
2022-02-12 14:26:59 +00:00
bitcoinclient = f'{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
a = b
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
2022-03-07 00:04:06 -03:00
print("\033[0;37;40m\x1b[?25l" + output)
while True:
x = a
2022-02-12 14:29:58 +00:00
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
2020-10-18 02:17:26 +00:00
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
if b > a:
clear()
close()
2020-10-18 02:17:26 +00:00
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
2020-12-25 09:09:57 -03:00
print("\a\x1b[?25l" + output)
2022-02-12 14:26:59 +00:00
bitcoinclient = f'{path["bitcoincli"]} getbestblockhash'
bb = os.popen(str(bitcoinclient)).read()
ll = bb
2022-02-12 14:26:59 +00:00
bitcoinclientgetblock = f'{path["bitcoincli"]} getblock {ll}'
qq = os.popen(bitcoinclientgetblock).read()
yy = json.loads(qq)
mm = yy
outputsize = render(str(mm['size']) + " bytes", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
2020-12-25 09:09:57 -03:00
print("\x1b[?25l" + outputsize)
outputtxs = render(str(mm['nTx']) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
2020-12-25 09:09:57 -03:00
print("\x1b[?25l" + outputtxs)
2022-03-13 23:59:13 -03:00
sh = int(mm['nTx']) / 4
shq = int(sh)
ss = str(rectangle(shq))
print(ss.replace("None",""))
2020-10-18 02:17:26 +00:00
t.sleep(10)
2022-03-06 18:08:50 -03:00
txs = str(mm['nTx'])
2022-03-07 09:23:39 -03:00
if txs == "1":
2022-03-07 00:04:06 -03:00
try:
2022-03-07 09:23:39 -03:00
p = subprocess.Popen(['curl', 'https://poptart.spinda.net'])
2022-03-07 00:04:06 -03:00
p.wait(5)
except subprocess.TimeoutExpired:
p.kill()
print("\033[0;37;40m\x1b[?25l")
2020-10-18 02:17:26 +00:00
clear()
close()
a = b
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
2020-12-25 09:09:57 -03:00
print("\x1b[?25l" + output)
#--------------------------------- Hex Block Decoder Functions -------------------------------------
def getrawtx(): # show confirmatins from transactions
while True:
try:
clear()
blogo()
close()
tx = input("Insert your TxID: ")
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""")
else:
2020-06-25 18:53:52 +00:00
bitcoincli = " getrawtransaction "
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)
2022-09-27 19:39:22 +00:00
print(
"\033[0;37;40mTransaction "
+ f"\033[1;31;40m{tx}\033[0;37;40m"
+ " has:\n"
+ f"\033[1;31;40m{lsdc}\033[0;37;40m"
)
2020-05-27 17:34:26 -03:00
tmp()
lsd.close()
2020-11-29 23:53:05 +00:00
input("Continue...")
except:
break
2020-08-25 20:08:40 -03:00
def runthenumbers():
bitcoincli = " gettxoutsetinfo"
os.system(path['bitcoincli'] + bitcoincli)
input("\nContinue...")
def countdownblock():
2022-02-12 14:29:58 +00:00
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
2020-12-06 22:28:13 -03:00
try:
a = input("Insert your block target: ")
clear()
blogo()
print("""
--------------------- BLOCK {} COUNTDOWN ---------------------
""".format(a))
n = int(b)
print("\nCountDown:", b)
q = int(a) - int(b)
2022-02-17 00:54:00 +00:00
print(f'Remaining: {str(q)}' + " Blocks\n")
2020-12-06 22:28:13 -03:00
while a > b:
try:
2022-02-12 14:26:59 +00:00
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
2020-12-06 22:28:13 -03:00
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
if a == b:
break
elif n != int(b):
print("CountDown: ", b)
q = int(a) - int(b)
2022-02-17 00:54:00 +00:00
print(f'Remaining: {str(q)}' + " Blocks\n")
2020-12-06 22:28:13 -03:00
n = int(b)
except:
break
2022-02-17 00:54:00 +00:00
print(f'#RunTheNumbers {str(a)} PyBLOCK')
2020-12-06 22:28:13 -03:00
input("\nContinue...")
except:
menuSelection()
2020-12-07 20:56:35 -03:00
2020-12-07 15:59:19 -03:00
def countdownblockConn():
b = rpc('getblockcount')
c = str(b)
try:
a = int(input("Insert your block target: "))
clear()
blogo()
print("""
--------------------- BLOCK {} COUNTDOWN ---------------------
""".format(a))
print("\nCountDown:", int(c))
n = int(c)
2022-03-08 23:03:11 +00:00
q = a - int(c)
2022-02-17 00:54:00 +00:00
print(f'Remaining: {str(q)}' + " Blocks\n")
2020-12-07 15:59:19 -03:00
while a > int(c):
try:
b = rpc('getblockcount')
c = str(b)
if a == c:
break
elif n != int(c):
print("CountDown: ", c)
2022-03-08 23:03:11 +00:00
q = a - int(c)
2022-02-17 00:54:00 +00:00
print(f'Remaining: {str(q)}' + " Blocks\n")
2020-12-07 15:59:19 -03:00
n = int(c)
except:
break
2022-02-17 00:54:00 +00:00
print(f'#RunTheNumbers {a} PyBLOCK')
2020-12-07 15:59:19 -03:00
input("\nContinue...")
except:
menuSelection()
2020-12-07 20:56:35 -03:00
def localHalving():
2022-02-12 14:26:59 +00:00
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
2020-09-26 23:01:37 -03:00
b = block
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-12 22:36:56 -03:00
\033[0;37;40m------------------- HALVING CLOCK -------------------
1st Halving: in {} Blocks {}
2nd Halving: in {} Blocks {}
3rd Halving: in {} Blocks {}
4th Halving: in {} Blocks {}
5th Halving: in {} Blocks {}
6th Halving: in {} Blocks {}
7th Halving: in {} Blocks {}
8th Halving: in {} Blocks {}
9th Halving: in {} Blocks {}
10th 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("\nContinue...")
2022-10-03 22:45:05 +02:00
def epoch():
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
c = b
2022-10-04 18:26:06 +02:00
oneh = 0 + int(c) / 2016
2022-12-20 10:14:37 -03:00
2022-10-03 22:45:05 +02:00
q = """
\033[0;37;40m------------------- EPOCH CLOCK -------------------
2022-10-03 23:52:24 +02:00
Epoch {} Status {}
2022-12-20 10:14:37 -03:00
2022-10-04 17:55:29 +02:00
---------------------------------------------------
2022-10-04 17:51:19 +02:00
""".format("0" if int(c) == 6930000 else oneh,"\033[1;32;40mON\033[0;37;40m")
2022-10-03 22:45:05 +02:00
print(q)
input("\nContinue...")
#--------------------------------- End Hex Block Decoder Functions -------------------------------------
2020-05-24 14:15:12 -03:00
def pdfconvert():
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
2022-03-13 20:58:54 -03:00
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
2022-03-13 20:58:54 -03:00
if not os.path.isfile("config/bitcoin.pdf"):
clear()
blogo()
close()
print("""
-----------------------------------------
The Bitcoin Whitepaper
is not in this
directory
-----------------------------------------
""")
a = input("Do you want to download it from the Blockchain? Y/n: ")
if a in ["y", "Y"]:
clear()
blogo()
close()
print("""
---------------------------------
You are going to
download the
Whitepaper from
the Blockchain
This file will
be save in the
main PyBLOCK
folder as
bitcoin.pdf
---------------------------------
""")
input("Continue...")
2022-09-14 11:51:55 -03:00
bitcoincli = """seq 0 947 | (while read -r n; do bitcoin-cli gettxout 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 $n | jq -r '.scriptPubKey.asm' | awk '{ print $2 $3 $4 }'; done) | tr -d '\n' | cut -c 17-368600 | xxd -r -p > bitcoin.pdf """
2022-09-14 11:54:14 -03:00
os.system(bitcoincli)
clear()
blogo()
close()
os.system("pdf2txt.py bitcoin.pdf")
input("Continue...")
else:
clear()
blogo()
close()
os.system("pdf2txt.py bitcoin.pdf")
input("Continue...")
2020-12-07 20:56:35 -03:00
#--------------------------------- NYMs -----------------------------------
def get_ansi_color_code(r, g, b):
2022-02-12 14:26:59 +00:00
if r == g == b:
2020-12-07 20:56:35 -03:00
if r < 8:
return 16
2022-09-27 19:39:22 +00:00
return 231 if r > 248 else round(((r - 8) / 247) * 24) + 232
2020-12-07 20:56:35 -03:00
return 16 + (36 * round(r / 255 * 5)) + (6 * round(g / 255 * 5)) + round(b / 255 * 5)
def get_color(r, g, b):
2022-09-27 19:39:22 +00:00
return f"\x1b[48;5;{int(get_ansi_color_code(r, g, b))}m \x1b[0m"
2020-12-07 20:56:35 -03:00
def robotNym():
try:
if path['bitcoincli']:
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-12-07 20:56:35 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
hash = alias['identity_pubkey']
rh = Robohash(hash)
rh.assemble(roboset='set1')
with open("file.png", "wb") as f:
rh.img.save(f, format="png")
img_path = open("file.png", "rb")
img = Image.open(img_path)
h = 40
w = int((img.width / img.height) * 90)
img = img.resize((w,h), Image.ANTIALIAS)
img_arr = np.asarray(img)
h,w,c = img_arr.shape
for x in range(h):
for y in range(w):
pix = img_arr[x][y]
print(get_color(pix[0], pix[1], pix[2]), sep='', end='')
print()
image = "\n\t\t\t\t\t \u001b[31;1mNode\u001b[38;5;93mNym\033[0;37;40m\n"+ "\n\t \u001b[33;1m" + alias['identity_pubkey'] + "\033[0;37;40m"
print(image)
input("\n\nContinue...")
except:
menuSelection()
2020-12-12 18:48:14 -03:00
#---------------------------------Sat Sale----------------------------------
def callGitSatSale():
if not os.path.isdir('SatSale'):
git = "git clone https://github.com/nickfarrow/SatSale.git"
os.system(git)
os.system("cd SatSale && python3 satsale.py")
2022-12-20 10:14:37 -03:00
2022-09-27 21:38:08 +02:00
#---------------------------------Cashu----------------------------------
def callGitCashu():
if not os.path.isdir('Cashu'):
2022-09-28 21:47:03 +02:00
git = "pip3 install cashu && mkdir Cashu"
2022-09-27 21:38:08 +02:00
os.system(git)
2022-12-20 10:14:37 -03:00
os.system("cd Cashu && cashu")
2022-10-03 19:28:06 +02:00
#-----------------------------Block Templates--------------------------------
def blockTmpConn():
try:
conn = """curl -s https://miningpool.observer/template-and-block | html2text | grep "Template and Block for" -A 13 """
a = os.popen(conn).read()
clear()
blogo()
closed()
output = render("Templates and Blocks", colors=['yellow'], align='left', font='tiny')
print(output)
print(a)
input("\a\nContinue...")
except:
pass
2022-12-20 10:14:37 -03:00
#-----------------------------END Block Templates--------------------------------
2020-12-12 18:48:14 -03:00
#---------------------------------Warden Terminal----------------------------------
def callGitWardenTerminal():
2020-12-12 21:49:02 +00:00
if not os.path.isdir('warden_terminal'):
2020-12-12 18:48:14 -03:00
git = "git clone https://github.com/pxsocs/warden_terminal.git"
os.system(git)
2020-12-12 21:49:02 +00:00
os.system("cd warden_terminal && python3 node_warden.py")
2022-12-20 10:14:37 -03:00
2022-12-19 16:02:43 +01:00
#---------------------------------Nostr Terminal----------------------------------
def callGitNostrMacTerminal():
try:
clear()
blogo()
output = render(
"Nostr Console macOS", colors=['yellow'], align='left', font='tiny'
)
2022-12-20 10:14:37 -03:00
if os.path.isdir ('nostr_console_pyblock'):
2022-12-22 13:33:52 +01:00
os.system("cd nostr_console_pyblock && rm -rf nostr_console_macOS && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_macOS")
2022-12-20 10:14:37 -03:00
else: # Check if the file 'bclock.conf' is in the same folder
2022-12-20 18:37:27 +01:00
os.system("mkdir nostr_console_pyblock && cd nostr_console_pyblock && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_macOS")
2022-12-20 10:14:37 -03:00
clear()
blogo()
2022-12-22 09:16:03 -03:00
2022-12-19 16:02:43 +01:00
print(output)
responseC = input("Paste your PrivateKey: ")
2022-12-26 18:44:22 +01:00
os.system(f"cd nostr_console_pyblock && ./nostr_console_macOS -k {responseC} -r wss://relay.stoner.com,wss://nostr.w3ird.tech,wss://nostr.bongbong.com,wss://nostr.hugo.md,wss://nostr.slothy.win,wss://nostr.robotechy.com,wss://nostr.nodeofsven.com,wss://nostrrelay.com,wss://nostr.mwmdev.com,wss://nostr.sandwich.farm -l")
2022-12-19 15:18:44 -03:00
except:
menuSelection()
2022-12-20 10:14:37 -03:00
2022-12-19 16:02:43 +01:00
def callGitNostrWinTerminal():
try:
clear()
blogo()
output = render(
"Nostr Console Windows", colors=['yellow'], align='left', font='tiny'
)
2022-12-20 10:14:37 -03:00
if os.path.isdir ('nostr_console_pyblock'):
2022-12-22 13:33:52 +01:00
os.system("cd nostr_console_pyblock && rm -rf nostr_console_win64.exe && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_win64.exe")
2022-12-20 10:14:37 -03:00
else: # Check if the file 'bclock.conf' is in the same folder
2022-12-20 18:37:27 +01:00
os.system("mkdir nostr_console_pyblock && cd nostr_console_pyblock && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_win64.exe")
2022-12-20 10:14:37 -03:00
clear()
blogo()
2022-12-19 16:02:43 +01:00
print(output)
responseC = input("Paste your PrivateKey: ")
2022-12-26 18:44:22 +01:00
os.system(f"cd nostr_console_pyblock && ./nostr_console_win64.exe -k {responseC} -r wss://relay.stoner.com,wss://nostr.w3ird.tech,wss://nostr.bongbong.com,wss://nostr.hugo.md,wss://nostr.slothy.win,wss://nostr.robotechy.com,wss://nostr.nodeofsven.com,wss://nostrrelay.com,wss://nostr.mwmdev.com,wss://nostr.sandwich.farm -l")
2022-12-19 15:18:44 -03:00
except:
menuSelection()
2022-12-20 10:14:37 -03:00
2022-12-19 16:02:43 +01:00
def callGitNostrLinTerminal():
try:
clear()
blogo()
output = render(
2022-12-19 21:31:42 +01:00
"Nostr Console Linux", colors=['yellow'], align='left', font='tiny'
2022-12-19 16:02:43 +01:00
)
2022-12-20 10:14:37 -03:00
if os.path.isdir ('nostr_console_pyblock'):
2022-12-22 09:16:03 -03:00
os.system("cd nostr_console_pyblock && rm -rf nostr_console_elf64 && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
2022-12-20 10:14:37 -03:00
else: # Check if the file 'bclock.conf' is in the same folder
2022-12-20 10:58:41 -03:00
os.system("mkdir nostr_console_pyblock && cd nostr_console_pyblock && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
2022-12-20 10:14:37 -03:00
clear()
blogo()
2022-12-19 16:02:43 +01:00
print(output)
responseC = input("Paste your PrivateKey: ")
2022-12-26 18:44:22 +01:00
os.system(f"cd nostr_console_pyblock && ./nostr_console_elf64 -k {responseC} -r wss://relay.stoner.com,wss://nostr.w3ird.tech,wss://nostr.bongbong.com,wss://nostr.hugo.md,wss://nostr.slothy.win,wss://nostr.robotechy.com,wss://nostr.nodeofsven.com,wss://nostrrelay.com,wss://nostr.mwmdev.com,wss://nostr.sandwich.farm -l")
2022-12-19 15:18:44 -03:00
except:
menuSelection()
2022-12-28 01:52:25 +01:00
def callGitNostrMacarmTerminal():
try:
clear()
blogo()
output = render(
"Nostr Console Linux", colors=['yellow'], align='left', font='tiny'
)
if os.path.isdir ('nostr_console_pyblock'):
os.system("cd nostr_console_pyblock && rm -rf nostr_console_elf64 && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
else: # Check if the file 'bclock.conf' is in the same folder
os.system("mkdir nostr_console_pyblock && cd nostr_console_pyblock && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
clear()
blogo()
print(output)
responseC = input("Paste your PrivateKey: ")
os.system(f"cd nostr_console_pyblock && ./nostr_console_elf64 -k {responseC} -r wss://relay.stoner.com,wss://nostr.w3ird.tech,wss://nostr.bongbong.com,wss://nostr.hugo.md,wss://nostr.slothy.win,wss://nostr.robotechy.com,wss://nostr.nodeofsven.com,wss://nostrrelay.com,wss://nostr.mwmdev.com,wss://nostr.sandwich.farm -l")
except:
menuSelection()
def callGitNostrLinarmTerminal():
try:
clear()
blogo()
output = render(
"Nostr Console Linux", colors=['yellow'], align='left', font='tiny'
)
if os.path.isdir ('nostr_console_pyblock'):
os.system("cd nostr_console_pyblock && rm -rf nostr_console_elf64 && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
else: # Check if the file 'bclock.conf' is in the same folder
os.system("mkdir nostr_console_pyblock && cd nostr_console_pyblock && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
clear()
blogo()
print(output)
responseC = input("Paste your PrivateKey: ")
os.system(f"cd nostr_console_pyblock && ./nostr_console_elf64 -k {responseC} -r wss://relay.stoner.com,wss://nostr.w3ird.tech,wss://nostr.bongbong.com,wss://nostr.hugo.md,wss://nostr.slothy.win,wss://nostr.robotechy.com,wss://nostr.nodeofsven.com,wss://nostrrelay.com,wss://nostr.mwmdev.com,wss://nostr.sandwich.farm -l")
except:
menuSelection()
2022-12-28 20:28:21 +01:00
def callGitNostrWinarmTerminal():
try:
clear()
blogo()
output = render(
"Nostr Console Linux", colors=['yellow'], align='left', font='tiny'
)
if os.path.isdir ('nostr_console_pyblock'):
os.system("cd nostr_console_pyblock && rm -rf nostr_console_elf64 && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
else: # Check if the file 'bclock.conf' is in the same folder
os.system("mkdir nostr_console_pyblock && cd nostr_console_pyblock && wget https://raw.githubusercontent.com/curly60e/pyblock/master/pybitblock/nostr_console_pyblock/nostr_console_elf64 && chmod 777 *")
clear()
blogo()
print(output)
responseC = input("Paste your PrivateKey: ")
os.system(f"cd nostr_console_pyblock && ./nostr_console_elf64 -k {responseC} -r wss://relay.stoner.com,wss://nostr.w3ird.tech,wss://nostr.bongbong.com,wss://nostr.hugo.md,wss://nostr.slothy.win,wss://nostr.robotechy.com,wss://nostr.nodeofsven.com,wss://nostrrelay.com,wss://nostr.mwmdev.com,wss://nostr.sandwich.farm -l")
except:
menuSelection()
2022-12-21 21:47:49 +01:00
def callGitNostrSeedTerminal():
try:
clear()
blogo()
output = render(
"Nostr BIP39", colors=['yellow'], align='left', font='tiny'
)
if os.path.isdir ('nostr_seed'):
print("...pass...")
else: # Check if the file 'bclock.conf' is in the same folder
os.system("mkdir nostr_seed && cd nostr_seed && wget https://gist.githubusercontent.com/odudex/93cfb5628b22f8675ab1939fd43133f4/raw/b48f047c0358a9ae50c2027106bdf5e37ee1fe5c/nostr_seed.py")
clear()
blogo()
print(output)
2022-12-22 17:58:07 +01:00
responseC = input("Hex to BIP39 & BIP39 to Hex: ")
2022-12-21 21:47:49 +01:00
os.system(f"cd nostr_seed && python3 nostr_seed.py {responseC}")
input("\a\nContinue...")
except:
2022-12-22 09:16:03 -03:00
menuSelection()
2022-12-20 10:14:37 -03:00
2020-12-22 19:21:10 -03:00
#---------------------------------ColdCore-----------------------------------------
def callColdCore():
clear()
blogo()
close()
try:
2021-12-03 23:55:49 -03:00
if not os.path.isfile('$HOME/.pyblock/public.txt'):
2020-12-22 19:21:10 -03:00
msg = """
\033[0;37;40m-------------------------\a\u001b[31;1mFILE NOT FOUND\033[0;37;40m----------------------------
To ColdCore works it needs to import your wallet's
public information on your coldcard, go to
-----------------------------------------
| |
| \033[1;37;40mAdvanced > MicroSD > Dump Summary\033[0;37;40m |
| |
-----------------------------------------
Copy the file \033[1;37;40mpublic.txt\033[0;37;40m inside
the main \u001b[31;1mpyblock\033[0;37;40m folder
(see: https://coldcardwallet.com/docs/microsd#dump-summary-file)
-------------------------------------------------------------------"""
print(msg)
input("\nContinue...")
else:
2021-12-03 23:55:49 -03:00
if not os.path.isdir('$HOME/.pyblock/coldcore'):
2020-12-22 19:21:10 -03:00
git = "git clone https://github.com/jamesob/coldcore.git"
install = "cd coldcore && chmod +x coldcore && cp coldcore ~/.local/bin/coldcore"
os.system(git)
os.system(install)
os.system("coldcore")
except:
menuSelection()
#--------------------------------- Menu section -----------------------------------
def MainMenuLOCAL(): #Main Menu
2020-05-13 19:47:58 -03:00
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-10-18 20:58:29 +00:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
2020-05-13 19:47:58 -03:00
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m\a
\033[1;37;40mVersion\033[0;37;40m: {}
2020-12-07 20:56:35 -03:00
2020-11-24 22:04:22 -03:00
\u001b[31;1mA.\033[0;37;40m PyBLOCK
\u001b[38;5;202mB.\033[0;37;40m Bitcoin Core
\u001b[33;1mL.\033[0;37;40m Lightning Network
\u001b[38;5;40mP.\033[0;37;40m Platforms
\u001b[38;5;27mS.\033[0;37;40m Settings
\u001b[38;5;15mX.\033[0;37;40m Donate
\u001b[38;5;93mQ.\033[0;37;40m Exit
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n, alias['alias'], d['blocks'], version, checkupdate()))
mainmenuLOCALcontrol(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def MainMenuLOCALChainONLY(): #Main Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m\a
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[31;1mA.\033[0;37;40m PyBLOCK
\u001b[38;5;202mB.\033[0;37;40m Bitcoin Core
\u001b[38;5;40mP.\033[0;37;40m Platforms
\u001b[38;5;27mS.\033[0;37;40m Settings
\u001b[38;5;15mX.\033[0;37;40m Donate
\u001b[38;5;93mQ.\033[0;37;40m Exit
\n\n\x1b[?25h""".format(n,d['blocks'], version, checkupdate()))
mainmenuLOCALcontrolOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def MainMenuREMOTE(): #Main Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2022-03-16 20:52:13 -03:00
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m\a
\033[1;37;40mVersion\033[0;37;40m: {}
2020-12-07 20:56:35 -03:00
2020-11-24 22:04:22 -03:00
\u001b[31;1mA.\033[0;37;40m PyBLOCK
\u001b[38;5;202mB.\033[0;37;40m Bitcoin Core
\u001b[33;1mL.\033[0;37;40m Lightning Network
\u001b[38;5;40mP.\033[0;37;40m Platforms
\u001b[38;5;27mS.\033[0;37;40m Settings
\u001b[38;5;15mX.\033[0;37;40m Donate
\u001b[38;5;93mQ.\033[0;37;40m Exit
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(a, alias['alias'], d['blocks'], version, checkupdate()))
mainmenuREMOTEcontrol(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def bitcoincoremenuLOCAL():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-24 22:04:22 -03:00
\u001b[38;5;202mA.\033[0;37;40m Bitcoin-cli Console
\u001b[38;5;202mB.\033[0;37;40m Show Genesis Block
\u001b[38;5;202mC.\033[0;37;40m Show Blockchain Information
\u001b[38;5;202mD.\033[0;37;40m Run the Numbers
\u001b[38;5;202mE.\033[0;37;40m Decode in HEX
\u001b[38;5;202mF.\033[0;37;40m Show QR from a Bitcoin Address
\u001b[38;5;202mG.\033[0;37;40m Show confirmations from a transaction
\u001b[38;5;202mH.\033[0;37;40m Miscellaneous
2020-12-22 19:21:10 -03:00
\u001b[38;5;202mI.\033[0;37;40m ColdCore
\u001b[38;5;202mJ.\033[0;37;40m Whitepaper
2022-05-09 20:40:50 +02:00
\u001b[38;5;202mM.\033[0;37;40m Moscow Time
2021-05-17 15:00:06 -03:00
\u001b[38;5;202mO.\033[0;37;40m OP_RETURN
2021-11-24 20:52:59 -03:00
\u001b[38;5;202mZ.\033[0;37;40m Stats
2022-11-11 14:04:38 +01:00
\u001b[38;5;202mQ.\033[0;37;40m Hashrate
\u001b[38;5;202mU.\033[0;37;40m Unconfirmed Txs
2022-03-18 18:44:47 -03:00
\u001b[38;5;202mS.\033[0;37;40m Mempool
2020-11-25 16:43:43 -03:00
\u001b[33;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n, alias['alias'], d['blocks'], version, checkupdate()))
bitcoincoremenuLOCALcontrolA(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def bitcoincoremenuLOCALOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Bitcoin-cli Console
\u001b[38;5;202mB.\033[0;37;40m Show Genesis Block
\u001b[38;5;202mC.\033[0;37;40m Show Blockchain Information
\u001b[38;5;202mD.\033[0;37;40m Run the Numbers
\u001b[38;5;202mE.\033[0;37;40m Decode in HEX
\u001b[38;5;202mF.\033[0;37;40m Show QR from a Bitcoin Address
\u001b[38;5;202mG.\033[0;37;40m Show confirmations from a transaction
\u001b[38;5;202mH.\033[0;37;40m Miscellaneous
\u001b[38;5;202mI.\033[0;37;40m ColdCore
\u001b[38;5;202mJ.\033[0;37;40m Whitepaper
2022-05-09 20:40:50 +02:00
\u001b[38;5;202mM.\033[0;37;40m Moscow Time
2021-12-01 16:57:56 -03:00
\u001b[38;5;202mO.\033[0;37;40m OP_RETURN
\u001b[38;5;202mW.\033[0;37;40m Wallet
2021-11-24 20:01:52 -03:00
\u001b[38;5;202mZ.\033[0;37;40m Stats
2022-11-11 14:04:38 +01:00
\u001b[38;5;202mQ.\033[0;37;40m Hashrate
\u001b[38;5;202mU.\033[0;37;40m Unconfirmed Txs
2022-03-18 18:44:47 -03:00
\u001b[38;5;202mS.\033[0;37;40m Mempool
\u001b[33;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n,d['blocks'], version, checkupdate()))
bitcoincoremenuLOCALcontrolAOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-24 07:47:40 -03:00
def walletmenuLOCALOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-24 07:47:40 -03:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Deposit
\u001b[38;5;202mB.\033[0;37;40m Show transactions
2022-12-23 02:42:46 +01:00
\u001b[38;5;202mC.\033[0;37;40m Dump Private Key
2022-12-25 03:32:46 +01:00
\u001b[38;5;202mD.\033[0;37;40m Info
2021-11-24 07:47:40 -03:00
\u001b[33;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n,d['blocks'], version, checkupdate()))
walletmenuLOCALcontrolAOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-05-17 15:00:06 -03:00
def bitcoincoremenuLOCALOPRETURN():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2021-05-17 15:00:06 -03:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Send OP_RETURN
\u001b[38;5;202mB.\033[0;37;40m View OP_RETURN
2021-12-06 16:56:40 +01:00
\u001b[38;5;202mC.\033[0;37;40m View Decoded Coinbase
2021-05-17 15:00:06 -03:00
\u001b[33;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, alias['alias'], d['blocks'], version, checkupdate()))
bitcoincoremenuLOCALcontrolO(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-12-01 16:57:56 -03:00
def bitcoincoremenuLOCALOPRETURNOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-12-01 16:57:56 -03:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Send OP_RETURN
\u001b[38;5;202mB.\033[0;37;40m View OP_RETURN
\u001b[38;5;202mC.\033[0;37;40m View Decoded Coinbase
\u001b[33;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
bitcoincoremenuLOCALcontrolOOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def bitcoincoremenuREMOTE():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-24 22:04:22 -03:00
\u001b[38;5;202mA.\033[0;37;40m Bitcoin-cli Console
\u001b[38;5;202mB.\033[0;37;40m Show Blockchain Information
\u001b[38;5;202mC.\033[0;37;40m Run the Numbers
\u001b[38;5;202mD.\033[0;37;40m Show QR from a Bitcoin Address
\u001b[38;5;202mE.\033[0;37;40m Miscellaneous
2022-05-09 20:40:50 +02:00
\u001b[38;5;202mM.\033[0;37;40m Moscow Time
2021-05-17 15:00:06 -03:00
\u001b[38;5;202mO.\033[0;37;40m OP_RETURN
2022-10-03 18:13:14 +02:00
\u001b[38;5;202mR.\033[0;37;40m Hashrate
2020-11-25 16:43:43 -03:00
\u001b[33;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(a, alias['alias'], d['blocks'], version, checkupdate()))
bitcoincoremenuREMOTEcontrol(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-05-17 15:00:06 -03:00
def bitcoincoremenuREMOTEOPRETURN():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2021-05-17 15:00:06 -03:00
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-05-17 15:00:06 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Send OP_RETURN
\u001b[38;5;202mB.\033[0;37;40m View OP_RETURN
2021-12-06 16:56:40 +01:00
\u001b[38;5;202mC.\033[0;37;40m View Decoded Coinbase
2021-05-17 15:00:06 -03:00
\u001b[33;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(a, alias['alias'], d['blocks'], version, checkupdate()))
bitcoincoremenuREMOTEcontrolO(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def lightningnetworkLOCAL():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-24 22:04:22 -03:00
\u001b[33;1mA.\033[0;37;40m Lncli Console
\u001b[33;1mB.\033[0;37;40m New Invoice
\u001b[33;1mC.\033[0;37;40m Pay Invoice
\u001b[33;1mD.\033[0;37;40m Make a KeySend Payment
\u001b[33;1mE.\033[0;37;40m New Bitcoin Address
\u001b[33;1mF.\033[0;37;40m List Invoices
\u001b[33;1mG.\033[0;37;40m Channel Balance
\u001b[33;1mH.\033[0;37;40m Show Channels
\u001b[33;1mI.\033[0;37;40m Rebalance Channel
\u001b[33;1mJ.\033[0;37;40m Show Peers
\u001b[33;1mK.\033[0;37;40m Connect Peers
\u001b[33;1mL.\033[0;37;40m Onchain Balance
\u001b[33;1mM.\033[0;37;40m List Onchain Transactions
\u001b[33;1mN.\033[0;37;40m Get Node Info
\u001b[33;1mO.\033[0;37;40m Get Network Information
2022-03-05 16:03:11 -03:00
\u001b[33;1mP.\033[0;37;40m PyChat
\u001b[33;1mZ.\033[0;37;40m Stats
\u001b[33;1mT.\033[0;37;40m Ranking
\u001b[33;1mQ.\033[0;37;40m LNBits List LNURL \033[3;35;40m{lnbitspaid}\033[0;37;40m
\u001b[33;1mS.\033[0;37;40m LNBits Create LNURL \033[3;35;40m{lnbitspaid}\033[0;37;40m
2020-11-25 16:43:43 -03:00
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, alias['alias'], d['blocks'], version, checkupdate(), lnbitspaid = "UNLOCKED" if os.path.isfile("lnbitSN.conf") else "LOCKED"))
lightningnetworkLOCALcontrol(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-05 16:03:11 -03:00
2022-02-17 21:32:04 +01:00
def chatConn():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2022-02-17 21:32:04 +01:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2022-03-05 16:03:11 -03:00
lncli = " getinfo"
2022-02-17 21:32:04 +01:00
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Open
\u001b[38;5;202mB.\033[0;37;40m Close
2022-03-05 16:03:11 -03:00
\u001b[38;5;202mC.\033[0;37;40m Hidden
2022-02-17 21:32:04 +01:00
\u001b[31;1mQ.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
2022-03-05 16:41:53 -03:00
chatConnA(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-05 16:03:11 -03:00
2022-02-17 21:32:04 +01:00
def pyCHATA():
2022-02-17 01:52:56 +01:00
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2022-02-17 01:52:56 +01:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2022-03-05 16:03:11 -03:00
lncli = " getinfo"
2022-02-17 01:52:56 +01:00
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Write
\u001b[38;5;202mB.\033[0;37;40m Read
2022-03-05 16:03:11 -03:00
\u001b[38;5;202mC.\033[0;37;40m List
2022-02-17 01:52:56 +01:00
\u001b[31;1mQ.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
2022-03-05 16:41:53 -03:00
chatConnB(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-05 16:03:11 -03:00
2022-02-17 21:32:04 +01:00
def pyCHATB():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2022-02-17 21:32:04 +01:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2022-03-05 16:03:11 -03:00
lncli = " getinfo"
2022-02-17 21:32:04 +01:00
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
2020-05-24 14:15:12 -03:00
2022-02-17 21:32:04 +01:00
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Write
\u001b[38;5;202mB.\033[0;37;40m Read
2022-03-05 16:03:11 -03:00
\u001b[38;5;202mC.\033[0;37;40m List
2022-02-17 21:32:04 +01:00
\u001b[31;1mQ.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
2022-03-05 16:41:53 -03:00
chatConnC(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-05 16:03:11 -03:00
2022-02-17 21:32:04 +01:00
def pyCHATC():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2022-02-17 21:32:04 +01:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2022-03-05 16:03:11 -03:00
lncli = " getinfo"
2022-02-17 21:32:04 +01:00
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Write
\u001b[38;5;202mB.\033[0;37;40m Read
2022-03-05 16:03:11 -03:00
\u001b[38;5;202mC.\033[0;37;40m List
2022-02-17 21:32:04 +01:00
\u001b[31;1mQ.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
2022-03-05 16:41:53 -03:00
chatConnD(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-05 16:03:11 -03:00
def lightningnetworkREMOTE():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-10-18 20:58:29 +00:00
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-24 22:15:21 -03:00
\u001b[33;1mA.\033[0;37;40m New Invoice
\u001b[33;1mB.\033[0;37;40m Pay Invoice
\u001b[33;1mC.\033[0;37;40m New Bitcoin Address
\u001b[33;1mD.\033[0;37;40m List Invoices
\u001b[33;1mE.\033[0;37;40m Channel Balance
\u001b[33;1mF.\033[0;37;40m Show Channels
\u001b[33;1mG.\033[0;37;40m Onchain Balance
\u001b[33;1mH.\033[0;37;40m List Onchain Transactions
\u001b[33;1mI.\033[0;37;40m Get Node Info
\u001b[33;1mZ.\033[0;37;40m Stats
\u001b[33;1mT.\033[0;37;40m Ranking
\u001b[33;1mQ.\033[0;37;40m LNBits List LNURL \033[3;35;40m{lnbitspaid}\033[0;37;40m
\u001b[33;1mS.\033[0;37;40m LNBits Create LNURL \033[3;35;40m{lnbitspaid}\033[0;37;40m
2020-11-25 16:43:43 -03:00
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(a, alias['alias'], d['blocks'], version, checkupdate(), lnbitspaid = "UNLOCKED" if os.path.isfile("lnbitSN.conf") else "LOCKED"))
lightningnetworkREMOTEcontrol(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APIMenuLOCAL():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2020-11-26 13:05:51 -03:00
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
2020-11-26 13:05:51 -03:00
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
2020-11-24 22:04:22 -03:00
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2021-11-27 04:25:55 +01:00
\033[1;32;40mA.\033[0;37;40m TippinMe FREE
\033[1;32;40mB.\033[0;37;40m Tallycoin FREE
\033[1;32;40mC.\033[0;37;40m Mempool FREE
\033[1;32;40mD.\033[0;37;40m CoinGecko FREE
\033[1;32;40mE.\033[0;37;40m Rate.sx FREE
2021-11-28 14:32:02 -03:00
\033[1;32;40mF.\033[0;37;40m BWT FREE
2021-11-27 04:25:55 +01:00
\033[1;32;40mG.\033[0;37;40m LNBits \033[3;35;40m{lnbitspaid}\033[0;37;40m
\033[1;32;40mH.\033[0;37;40m LNPay \033[3;35;40m{lnpaypaid}\033[0;37;40m
\033[1;32;40mI.\033[0;37;40m OpenNode \033[3;35;40m{opennodepaid}\033[0;37;40m
\033[1;32;40mJ.\033[0;37;40m SatNode FREE
\033[1;32;40mK.\033[0;37;40m Weather FREE
\033[1;32;40mL.\033[0;37;40m Arcade FREE
2021-11-27 04:30:22 +01:00
\033[1;32;40mM.\033[0;37;40m Whale Alert FREE
2022-12-19 16:02:43 +01:00
\033[1;32;40mN.\033[0;37;40m Nostr FREE
2022-03-08 23:58:27 +01:00
\033[1;32;40mS.\033[0;37;40m Slush Pool FREE
2022-03-17 21:21:37 +01:00
\033[1;32;40mW.\033[0;37;40m CKPool FREE
2020-11-25 16:43:43 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate(),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-11-24 22:04:22 -03:00
platfformsLOCALcontrol(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APIMenuLOCALOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2022-10-04 11:13:24 -03:00
\033[1;32;40mA.\033[0;37;40m TippinMe FREE
\033[1;32;40mB.\033[0;37;40m Tallycoin FREE
\033[1;32;40mC.\033[0;37;40m Mempool FREE
\033[1;32;40mD.\033[0;37;40m CoinGecko FREE
\033[1;32;40mE.\033[0;37;40m Rate.sx FREE
\033[1;32;40mF.\033[0;37;40m BWT FREE
\033[1;32;40mG.\033[0;37;40m LNBits \033[3;35;40m{lnbitspaid}\033[0;37;40m
\033[1;32;40mH.\033[0;37;40m LNPay \033[3;35;40m{lnpaypaid}\033[0;37;40m
\033[1;32;40mI.\033[0;37;40m OpenNode \033[3;35;40m{opennodepaid}\033[0;37;40m
\033[1;32;40mJ.\033[0;37;40m SatNode FREE
\033[1;32;40mK.\033[0;37;40m Weather FREE
\033[1;32;40mL.\033[0;37;40m Arcade FREE
\033[1;32;40mM.\033[0;37;40m Whale Alert FREE
2022-12-19 16:02:43 +01:00
\033[1;32;40mN.\033[0;37;40m Nostr FREE
2022-10-04 11:13:24 -03:00
\033[1;32;40mS.\033[0;37;40m Braiins Pool FREE
\033[1;32;40mW.\033[0;37;40m CKPool FREE
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate(),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"))
platfformsLOCALcontrolOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2020-11-24 22:04:22 -03:00
def decodeHex():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-24 22:04:22 -03:00
\u001b[38;5;202mA.\033[0;37;40m Decode Blocks in HEX
\u001b[38;5;202mB.\033[0;37;40m Decode Transactions in HEX
\u001b[31;1mQ.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n, alias['alias'], d['blocks'], version, checkupdate()))
2020-11-24 22:04:22 -03:00
decodeHexLOCAL(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def decodeHexOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Decode Blocks in HEX
\u001b[38;5;202mB.\033[0;37;40m Decode Transactions in HEX
\u001b[31;1mQ.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
decodeHexLOCALOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2020-11-24 22:04:22 -03:00
def miscellaneousLOCAL():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2020-11-24 22:04:22 -03:00
2020-11-26 13:05:51 -03:00
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
2020-11-24 22:04:22 -03:00
2020-11-26 13:05:51 -03:00
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
2020-11-24 22:04:22 -03:00
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2021-12-06 16:56:40 +01:00
\u001b[38;5;202mA.\033[0;37;40m Ascii
\u001b[38;5;202mB.\033[0;37;40m System
\u001b[38;5;202mC.\033[0;37;40m Dates
\u001b[38;5;202mD.\033[0;37;40m Quotes
2022-03-12 16:31:38 +01:00
\u001b[38;5;202mP.\033[0;37;40m PGP
2022-03-12 03:04:11 +01:00
\u001b[38;5;202mS.\033[0;37;40m Satoshi Nakamoto
2020-11-26 13:05:51 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
2020-11-24 22:04:22 -03:00
miscellaneousLOCALmenu(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def miscellaneousLOCALOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2021-12-06 16:56:40 +01:00
\u001b[38;5;202mA.\033[0;37;40m Ascii
\u001b[38;5;202mB.\033[0;37;40m System
\u001b[38;5;202mC.\033[0;37;40m Dates
\u001b[38;5;202mD.\033[0;37;40m Quotes
2022-03-12 16:31:38 +01:00
\u001b[38;5;202mP.\033[0;37;40m PGP
2022-03-12 03:04:11 +01:00
\u001b[38;5;202mS.\033[0;37;40m Satoshi Nakamoto
2021-11-26 20:26:36 -03:00
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
miscellaneousLOCALmenuOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-08 20:36:01 -03:00
2022-03-08 23:58:27 +01:00
def slushpoolREMOTEOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2022-03-08 23:58:27 +01:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2022-03-08 23:58:27 +01:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Difficulty
\u001b[38;5;202mB.\033[0;37;40m Hash Rate
\u001b[38;5;202mC.\033[0;37;40m Pool
\u001b[38;5;202mD.\033[0;37;40m History
\u001b[38;5;202mE.\033[0;37;40m Miner
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
2022-03-09 08:59:25 -03:00
slushpoolLOCALOnchainONLYMenu(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2022-03-08 20:36:01 -03:00
2022-03-08 23:58:27 +01:00
def slushpoolLOCALOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2022-03-08 23:58:27 +01:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2022-03-08 23:58:27 +01:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Difficulty
\u001b[38;5;202mB.\033[0;37;40m Hash Rate
\u001b[38;5;202mC.\033[0;37;40m Pool
\u001b[38;5;202mD.\033[0;37;40m History
\u001b[38;5;202mE.\033[0;37;40m Miner
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
2022-03-08 20:36:01 -03:00
slushpoolLOCALOnchainONLYMenu(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
2020-11-26 13:05:51 -03:00
def runTheNumbersMenu():
2020-11-24 22:04:22 -03:00
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2020-11-24 22:04:22 -03:00
2020-11-26 13:05:51 -03:00
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
2020-11-24 22:04:22 -03:00
2020-11-26 13:05:51 -03:00
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
2020-11-24 22:04:22 -03:00
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Countdown Block
\033[1;32;40mB.\033[0;37;40m Countdown Halving
\033[1;32;40mC.\033[0;37;40m Audit
2022-10-03 19:28:06 +02:00
\033[1;32;40mD.\033[0;37;40m Templates & Blocks
2022-10-03 22:45:05 +02:00
\033[1;32;40mE.\033[0;37;40m Epoch
2020-11-25 16:53:21 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
runTheNumbersControl(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def runTheNumbersMenuOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
2022-03-18 20:21:25 -03:00
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Countdown Block
\033[1;32;40mB.\033[0;37;40m Countdown Halving
\033[1;32;40mC.\033[0;37;40m Audit
2022-10-03 19:28:06 +02:00
\033[1;32;40mD.\033[0;37;40m Templates & Blocks
2022-10-03 22:45:05 +02:00
\033[1;32;40mE.\033[0;37;40m Epoch
2021-11-26 20:26:36 -03:00
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
runTheNumbersControlOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def runTheNumbersMenuConn():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
2020-11-24 22:04:22 -03:00
2020-11-26 13:05:51 -03:00
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-26 13:05:51 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Countdown Block
\033[1;32;40mB.\033[0;37;40m Countdown Halving
\033[1;32;40mC.\033[0;37;40m Audit
2022-10-03 19:28:06 +02:00
\033[1;32;40mD.\033[0;37;40m Templates & Blocks
2022-10-03 22:45:05 +02:00
\033[1;32;40mE.\033[0;37;40m Epoch
2020-11-25 16:53:21 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
runTheNumbersControlConn(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def weatherMenuOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Version 1
\033[1;32;40mB.\033[0;37;40m Version 2
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuWeatherOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def weatherMenu():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-26 13:05:51 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Version 1
\033[1;32;40mB.\033[0;37;40m Version 2
2020-11-25 16:53:21 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuWeather(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def dnt(): # Donation selection menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-05-24 14:15:12 -03:00
2020-11-25 16:43:43 -03:00
\u001b[38;5;15mA.\033[0;37;40m Developers Donation
\u001b[38;5;15mB.\033[0;37;40m Testers Donation
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuC(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2020-05-24 14:15:12 -03:00
def dntOnchainONLY(): # Donation selection menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;15mA.\033[0;37;40m Developers Donation
\u001b[38;5;15mB.\033[0;37;40m Testers Donation
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuCOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def dntDev(): # Dev Donation Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
2021-11-22 14:52:04 -03:00
alias = json.loads(lsd0)
2020-11-26 13:05:51 -03:00
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-26 13:05:51 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-05-24 14:15:12 -03:00
2021-04-14 00:08:55 -03:00
\u001b[38;5;202mA.\033[0;37;40m Samourai PayNym
\u001b[38;5;202mB.\033[0;37;40m Bitcoin Address
\u001b[33;1mC.\033[0;37;40m Lightning Network
2020-11-25 16:43:43 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuE(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2020-05-24 14:15:12 -03:00
def dntDevOnchainONLY(): # Dev Donation Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Samourai PayNym
\u001b[38;5;202mB.\033[0;37;40m Bitcoin Address
\u001b[33;1mC.\033[0;37;40m Lightning Network
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuEOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def dntTst(): # Tester Donation Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-26 13:05:51 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 02:05:30 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-26 13:05:51 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-26 13:05:51 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-05-24 14:15:12 -03:00
2020-11-25 16:43:43 -03:00
\u001b[38;5;202mA.\033[0;37;40m Bitcoin Address
\u001b[33;1mB.\033[0;37;40m Lightning Network
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuF(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2020-05-24 14:15:12 -03:00
def dntTstOnchainONLY(): # Tester Donation Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 15:32:42 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;202mA.\033[0;37;40m Bitcoin Address
\u001b[33;1mB.\033[0;37;40m Lightning Network
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuFOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def satnodeMenu(): # Satnode Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 15:32:42 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Start SatNode
\033[1;32;40mB.\033[0;37;40m Feed
\033[1;32;40mC.\033[0;37;40m Setup
\033[1;34;40mS.\033[0;37;40m Send a Message to Space
2020-11-25 16:43:43 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuD(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def satnodeMenuOnchainONLY(): # Satnode Menu
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 15:32:42 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Start SatNode
\033[1;32;40mB.\033[0;37;40m Feed
\033[1;32;40mC.\033[0;37;40m Setup
\033[1;34;40mS.\033[0;37;40m Send a Message to Space
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuD(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def rateSX():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 15:32:42 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Rate
\033[1;32;40mB.\033[0;37;40m Chart
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
rateSXMenu(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def rateSXOncainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-12 15:32:42 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Rate
\033[1;32;40mB.\033[0;37;40m Chart
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
rateSXMenuOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def mempoolmenu():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-17 20:37:55 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Blocks
\033[1;32;40mB.\033[0;37;40m Recommended Fee
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
mempoolmenuS(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def mempoolmenuOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-17 20:37:55 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Blocks
\033[1;32;40mB.\033[0;37;40m Recommended Fee
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
mempoolmenuSOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APILnbit():
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'
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-17 20:37:55 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mLNBits SN:{} \033[1;34;40mPremium\033[0;37;40m
\033[1;32;40mA.\033[0;37;40m New Invoice
\033[1;32;40mB.\033[0;37;40m Pay Invoice
\033[1;32;40mC.\033[0;37;40m New PayWall
\033[1;32;40mD.\033[0;37;40m Delete PayWall
\033[1;32;40mE.\033[0;37;40m List PayWalls
\033[1;32;40mF.\033[0;37;40m Create LNURL
\033[1;32;40mG.\033[0;37;40m List LNURL
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, bitLN['NN'], checkupdate()))
menuLNBPI(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def APILnbitOnchainONLY():
2022-03-17 21:37:11 -03:00
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
lndconnectData = pickle.load(open("config/blndconnect.conf", "rb")) # Load the file 'bclock.conf'
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
2021-11-26 20:26:36 -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'
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mLNBits SN:{} \033[1;34;40mPremium\033[0;37;40m
\033[1;32;40mA.\033[0;37;40m New Invoice
\033[1;32;40mB.\033[0;37;40m Pay Invoice
\033[1;32;40mC.\033[0;37;40m New PayWall
\033[1;32;40mD.\033[0;37;40m Delete PayWall
\033[1;32;40mE.\033[0;37;40m List PayWalls
\033[1;32;40mF.\033[0;37;40m Create LNURL
\033[1;32;40mG.\033[0;37;40m List LNURL
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, bitLN['NN'], checkupdate()))
menuLNBPIOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APILnPay():
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'
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mLNPay SN:{} \033[1;34;40mPremium\033[0;37;40m
\033[1;32;40mA.\033[0;37;40m New Invoice
\033[1;32;40mB.\033[0;37;40m Pay Invoice
\033[1;32;40mC.\033[0;37;40m Wallet Balance
\033[1;32;40mD.\033[0;37;40m List Invoices
\033[1;32;40mE.\033[0;37;40m Transfer Between Wallets
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, bitLN['NN'], checkupdate()))
menuLNPAY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def APILnPayOnchainONLY():
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'
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mLNPay SN:{} \033[1;34;40mPremium\033[0;37;40m
\033[1;32;40mA.\033[0;37;40m New Invoice
\033[1;32;40mB.\033[0;37;40m Pay Invoice
\033[1;32;40mC.\033[0;37;40m Wallet Balance
\033[1;32;40mD.\033[0;37;40m List Invoices
\033[1;32;40mE.\033[0;37;40m Transfer Between Wallets
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, bitLN['NN'], checkupdate()))
menuLNPAYOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APIOpenNode():
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'
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
2021-11-26 20:26:36 -03:00
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mOpenNode SN:{} \033[1;34;40mPremium\033[0;37;40m
\033[1;32;40mA.\033[0;37;40m New Invoice
\033[1;32;40mB.\033[0;37;40m Pay Invoice
\033[1;32;40mC.\033[0;37;40m Wallet Balance
\033[1;32;40mD.\033[0;37;40m List Payments
\033[1;32;40mS.\033[0;37;40m Status
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, bitLN['NN'], checkupdate()))
menuOpenNode(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APIOpenNodeOnchainONLY():
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'
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mOpenNode SN:{} \033[1;34;40mPremium\033[0;37;40m
\033[1;32;40mA.\033[0;37;40m New Invoice
\033[1;32;40mB.\033[0;37;40m Pay Invoice
\033[1;32;40mC.\033[0;37;40m Wallet Balance
\033[1;32;40mD.\033[0;37;40m List Payments
\033[1;32;40mS.\033[0;37;40m Status
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, bitLN['NN'], checkupdate()))
menuOpenNodeOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APITippinMe():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mTippinMe
\033[1;32;40mA.\033[0;37;40m New Invoice
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuTippinMe(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def APITippinMeOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2021-11-26 20:26:36 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2021-11-26 20:26:36 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
2020-11-25 23:16:31 -03:00
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2021-11-26 20:26:36 -03:00
\033[0;37;40mTippinMe
\033[1;32;40mA.\033[0;37;40m New Invoice
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2021-11-26 20:26:36 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuTippinMeOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def APITallyCo():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2021-11-26 20:26:36 -03:00
\033[0;37;40mTallyCoin
2021-11-26 20:26:36 -03:00
\033[1;32;40mA.\033[0;37;40m Get Payment
\033[1;32;40mB.\033[0;37;40m Tip User
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
2021-11-26 20:26:36 -03:00
menuTallyCo(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2021-11-26 20:26:36 -03:00
def APITallyCoOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[0;37;40mTallyCoin
\033[1;32;40mA.\033[0;37;40m Get Payment
\033[1;32;40mB.\033[0;37;40m Tip User
2020-11-25 23:16:31 -03:00
\u001b[31;1mR.\033[0;37;40m Return
2021-11-26 20:26:36 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, checkupdate()))
menuTallyCoOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
#-------------------------------- SETTINGS -----------------------------------------------
2020-05-24 14:15:12 -03:00
def settings4Local():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-25 16:43:43 -03:00
\u001b[38;5;27mA.\033[0;37;40m Change Logo Design
\u001b[38;5;27mB.\033[0;37;40m Change Logo Colors
\u001b[38;5;27mC.\033[0;37;40m Change Clock Colors
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n, alias['alias'], d['blocks'], version, checkupdate()))
menuSettingsLocal(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def settings4LocalOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\u001b[38;5;27mA.\033[0;37;40m Change Logo Design
\u001b[38;5;27mB.\033[0;37;40m Change Logo Colors
\u001b[38;5;27mC.\033[0;37;40m Change Clock Colors
\u001b[31;1mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n, d['blocks'], version, checkupdate()))
menuSettingsLocalOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def settings4Remote():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2020-11-25 16:43:43 -03:00
\u001b[38;5;27mA.\033[0;37;40m Change Logo Design
\u001b[38;5;27mB.\033[0;37;40m Change Logo Colors
\u001b[38;5;27mC.\033[0;37;40m Change Clock Colors
\u001b[31;1mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(a, alias['alias'], d['blocks'], version, checkupdate()))
menuSettingsRemote(input("\033[1;32;40mSelect option: \033[0;37;40m"))
2020-07-26 14:22:22 -03:00
def designQ():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Block
\033[1;31;40mB.\033[0;37;40m Slick
\033[1;31;40mC.\033[0;37;40m Tiny
\033[1;31;40mD.\033[0;37;40m Grid
\033[1;31;40mE.\033[0;37;40m Pallet
\033[1;31;40mF.\033[0;37;40m Shade
\033[1;31;40mG.\033[0;37;40m Chrome
\033[1;31;40mH.\033[0;37;40m Simple
\033[1;31;40mI.\033[0;37;40m Simple Block
\033[1;31;40mJ.\033[0;37;40m 3D
\033[1;31;40mK.\033[0;37;40m Simple 3D
\033[1;31;40mL.\033[0;37;40m Huge
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuDesign(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def designQOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Block
\033[1;31;40mB.\033[0;37;40m Slick
\033[1;31;40mC.\033[0;37;40m Tiny
\033[1;31;40mD.\033[0;37;40m Grid
\033[1;31;40mE.\033[0;37;40m Pallet
\033[1;31;40mF.\033[0;37;40m Shade
\033[1;31;40mG.\033[0;37;40m Chrome
\033[1;31;40mH.\033[0;37;40m Simple
\033[1;31;40mI.\033[0;37;40m Simple Block
\033[1;31;40mJ.\033[0;37;40m 3D
\033[1;31;40mK.\033[0;37;40m Simple 3D
\033[1;31;40mL.\033[0;37;40m Huge
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuDesignOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def designC():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Block
\033[1;31;40mB.\033[0;37;40m Slick
\033[1;31;40mC.\033[0;37;40m Tiny
\033[1;31;40mD.\033[0;37;40m Grid
\033[1;31;40mE.\033[0;37;40m Pallet
\033[1;31;40mF.\033[0;37;40m Shade
\033[1;31;40mG.\033[0;37;40m Chrome
\033[1;31;40mH.\033[0;37;40m Simple
\033[1;31;40mI.\033[0;37;40m Simple Block
\033[1;31;40mJ.\033[0;37;40m 3D
\033[1;31;40mK.\033[0;37;40m Simple 3D
\033[1;31;40mL.\033[0;37;40m Huge
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuDesignClock(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def designCOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Block
\033[1;31;40mB.\033[0;37;40m Slick
\033[1;31;40mC.\033[0;37;40m Tiny
\033[1;31;40mD.\033[0;37;40m Grid
\033[1;31;40mE.\033[0;37;40m Pallet
\033[1;31;40mF.\033[0;37;40m Shade
\033[1;31;40mG.\033[0;37;40m Chrome
\033[1;31;40mH.\033[0;37;40m Simple
\033[1;31;40mI.\033[0;37;40m Simple Block
\033[1;31;40mJ.\033[0;37;40m 3D
\033[1;31;40mK.\033[0;37;40m Simple 3D
\033[1;31;40mL.\033[0;37;40m Huge
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuDesignClockOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def designCRemote():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Block
\033[1;31;40mB.\033[0;37;40m Slick
\033[1;31;40mC.\033[0;37;40m Tiny
\033[1;31;40mD.\033[0;37;40m Grid
\033[1;31;40mE.\033[0;37;40m Pallet
\033[1;31;40mF.\033[0;37;40m Shade
\033[1;31;40mG.\033[0;37;40m Chrome
\033[1;31;40mH.\033[0;37;40m Simple
\033[1;31;40mI.\033[0;37;40m Simple Block
\033[1;31;40mJ.\033[0;37;40m 3D
\033[1;31;40mK.\033[0;37;40m Simple 3D
\033[1;31;40mL.\033[0;37;40m Huge
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuDesignClockRemote(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colors():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Front Color
\033[1;31;40mB.\033[0;37;40m Back Color
\033[1;31;40mC.\033[0;37;40m Rainbow
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColors(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Front Color
\033[1;31;40mB.\033[0;37;40m Back Color
\033[1;31;40mC.\033[0;37;40m Rainbow
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuColorsOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsC():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Front Color
\033[1;31;40mB.\033[0;37;40m Back Color
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsClock(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsCOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Front Color
\033[1;31;40mB.\033[0;37;40m Back Color
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuColorsClockOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsCRemote():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-19 02:26:27 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Front Color
\033[1;31;40mB.\033[0;37;40m Back Color
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsClockRemote(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectFront():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-22 22:20:00 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectFront(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectFrontOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-22 22:20:00 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a ,d['blocks'], version, checkupdate()))
menuColorsSelectFrontOncainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectFrontClock():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-22 22:20:00 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectFrontClock(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectFrontClockOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-22 22:20:00 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
2020-11-25 23:16:31 -03:00
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, checkupdate()))
menuColorsSelectFrontClockOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectFrontClockRemote():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-22 22:20:00 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectFrontClockRemote(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectBack():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-03-22 22:20:00 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectBack(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectBackOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "RemotcolorsCe"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-04-12 21:04:45 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
menuColorsSelectBackOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectBackClock():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectBackClock(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectBackClockOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, checkupdate()))
menuColorsSelectBackClockOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectBackClockRemote():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectBackClockRemote(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectRainbow():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Start Color
\033[1;31;40mB.\033[0;37;40m End Color
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectRainbow(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectRainbowOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Start Color
\033[1;31;40mB.\033[0;37;40m End Color
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, checkupdate()))
menuColorsSelectRainbowOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectRainbowStart():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectRainbowStart(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectRainbowStartOnchaiONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
2022-10-03 16:14:20 +00:00
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, checkupdate()))
menuColorsSelectRainbowStartOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectRainbowEnd():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
2020-12-25 09:09:57 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , alias['alias'], d['blocks'], version, checkupdate()))
menuColorsSelectRainbowEnd(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def colorsSelectRainbowEndOnchainONLY():
clear()
blogo()
sysinfo()
2022-03-17 21:37:11 -03:00
pathexec()
lndconnectexec()
2020-11-25 23:16:31 -03:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
2020-11-25 23:16:31 -03:00
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
\033[1;32;40mA.\033[0;37;40m Black
\033[1;31;40mB.\033[0;37;40m Red
\033[1;31;40mC.\033[0;37;40m Green
\033[1;31;40mD.\033[0;37;40m Yellow
\033[1;31;40mE.\033[0;37;40m Blue
\033[1;31;40mF.\033[0;37;40m Magenta
\033[1;31;40mG.\033[0;37;40m Cyan
\033[1;31;40mH.\033[0;37;40m White
\033[1;31;40mI.\033[0;37;40m Gray
2020-11-25 16:43:43 -03:00
\033[1;36;40mR.\033[0;37;40m Return
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a , d['blocks'], version, checkupdate()))
menuColorsSelectRainbowEndOnchainONLY(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def menuSelection():
2022-03-16 00:31:26 -03:00
chln = {"fullbtclnd":"","fullbtc":"","cropped":""}
if os.path.isfile('config/intro.conf'):
chain = pickle.load(open("config/intro.conf", "rb"))
chln = chain
2022-03-16 00:31:26 -03:00
print(chln + "\n")
2022-03-16 20:52:13 -03:00
if chln == "B":
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
MainMenuLOCALChainONLY()
elif chln == "A":
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
MainMenuLOCAL()
elif chln == "C":
MainMenuCROPPED()
else:
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/blndconnect.conf'):
chln['offchain'] = "offchain"
else:
chln['onchain'] = "onchain"
2021-11-24 10:49:20 +00:00
2021-12-03 23:55:49 -03:00
pickle.dump(chln, open("config/selection.conf", "wb"))
def menuSelectionLN():
2020-06-10 19:02:49 -03:00
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "lncli":""}
2021-12-03 23:55:49 -03:00
lndconnectData = pickle.load(open("config/blndconnect.conf", "rb")) # Load the file 'bclock.conf'
2020-06-10 19:02:49 -03:00
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
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":""}
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/lnbitSN.conf'):
bitData= pickle.load(open("config/lnbitSN.conf", "rb"))
2020-06-22 22:51:41 -03:00
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)
2021-06-17 18:07:00 -03:00
curl = 'curl -X POST https://lnbits.com/api/v1/payments -d ' + "'{" + """"out": false, "amount": 1000, "memo": "LNBits on PyBLOCK {}" """.format(bitLN['NN']) + "}'" + """ -H "X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H "Content-type: application/json" """
2020-06-22 22:51:41 -03:00
sh = os.popen(curl).read()
2020-06-24 17:08:28 -03:00
clear()
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-11-15 23:27:32 +00:00
if db is not True:
2020-06-22 22:51:41 -03:00
continue
2020-11-15 23:27:32 +00:00
clear()
blogo()
tick()
bitLN['pd'] = "PAID"
2021-12-03 23:55:49 -03:00
pickle.dump(bitLN, open("config/lnbitSN.conf", "wb"))
2020-11-15 23:27:32 +00:00
createFileConnLNBits()
break
2020-06-22 22:51:41 -03:00
except:
clear()
blogo()
print("\n\tSERIAL 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":""}
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/lnpaySN.conf'): # Check if the file 'bclock.conf' is in the same folder
bitData= pickle.load(open("config/lnpaySN.conf", "rb")) # Load the file 'bclock.conf'
2020-06-22 22:51:41 -03:00
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)
2021-06-17 18:07:00 -03:00
curl = 'curl -X POST https://lnbits.com/api/v1/payments -d ' + "'{" + """"out": false, "amount": 1000, "memo": "LNPay on PyBLOCK {}" """.format(bitLN['NN']) + "}'" + """ -H "X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H "Content-type: application/json" """
2020-06-22 22:51:41 -03:00
sh = os.popen(curl).read()
2020-06-24 17:08:28 -03:00
clear()
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-11-15 23:27:32 +00:00
if db is not True:
2020-06-22 22:51:41 -03:00
continue
2020-11-15 23:27:32 +00:00
clear()
blogo()
tick()
bitLN['pd'] = "PAID"
2021-12-03 23:55:49 -03:00
pickle.dump(bitLN, open("config/lnpaySN.conf", "wb"))
2020-11-15 23:27:32 +00:00
createFileConnLNPay()
break
2020-11-24 22:04:22 -03:00
2020-06-22 22:51:41 -03:00
except:
clear()
blogo()
print("\n\tSERIAL 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":""}
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/opennodeSN.conf'): # Check if the file 'bclock.conf' is in the same folder
bitData= pickle.load(open("config/opennodeSN.conf", "rb")) # Load the file 'bclock.conf'
2020-06-22 22:51:41 -03:00
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)
2021-06-17 18:07:00 -03:00
curl = 'curl -X POST https://lnbits.com/api/v1/payments -d ' + "'{" + """"out": false, "amount": 1000, "memo": "OpenNode on PyBLOCK {}" """.format(bitLN['NN']) + "}'" + """ -H "X-Api-Key: 1d646820055e4e2da218e801eaacfc94 " -H "Content-type: application/json" """
2020-06-22 22:51:41 -03:00
sh = os.popen(curl).read()
2020-06-24 17:08:28 -03:00
clear()
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-11-15 23:27:32 +00:00
if db is not True:
2020-06-22 22:51:41 -03:00
continue
2020-11-15 23:27:32 +00:00
clear()
blogo()
tick()
bitLN['pd'] = "PAID"
2021-12-03 23:55:49 -03:00
pickle.dump(bitLN, open("config/opennodeSN.conf", "wb"))
2020-11-15 23:27:32 +00:00
createFileConnOpenNode()
break
2020-11-24 22:04:22 -03:00
2020-06-22 22:51:41 -03:00
except:
clear()
blogo()
print("\n\tSERIAL NUMBER NOT FOUND\n")
input("Continue...")
def aaccPPiTippinMe():
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/tippinme.conf'): # Check if the file 'bclock.conf' is in the same folder
APITippinMe()
else:
2020-06-22 22:02:00 -03:00
createFileTippinMe()
def aaccPPiTallyCo():
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/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:
print("\n ------------------------------------------")
2021-12-04 08:14:11 -03:00
q = print(" \033[1;31;40mNew version available\033[0;37;40m > Exit and $pip3 install pybitblock -U ")
print(" ------------------------------------------")
2020-07-13 19:28:56 -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"
2021-12-03 23:55:49 -03:00
pickle.dump(settings, open("config/pyblocksettings.conf", "wb"))
except:
pass
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"
2021-12-03 23:55:49 -03:00
pickle.dump(settings, open("config/pyblocksettings.conf", "wb"))
except:
pass
def testClock():
2022-03-17 21:37:11 -03:00
pathexec()
#lndconnectexec()
bitcoinclient = path['bitcoincli'] + " getblockcount"
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
b = block
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='left')
print(output)
print("""
-------------------------
Front Color: {}
Back Color: {}
-------------------------
""".format(settingsClock['colorA'], settingsClock['colorB']))
try:
print("<<< Cancel Control + C")
input("Enter To Apply...")
settingsClock["gradient"] = "color"
2021-12-03 23:55:49 -03:00
pickle.dump(settingsClock, open("config/pyblocksettingsClock.conf", "wb"))
except:
pass
2020-06-10 19:02:49 -03:00
#--------------------------------- End Menu section -----------------------------------
#--------------------------------- Main Menu execution --------------------------------
def menuSettingsLocal(menuSTT):
if menuSTT in ["A", "a"]:
clear()
blogo()
2020-07-26 14:22:22 -03:00
designQ()
elif menuSTT in ["B", "b"]:
clear()
blogo()
colors()
elif menuSTT in ["C", "c"]:
clear()
blogo()
colorsC()
def menuSettingsLocalOnchainONLY(menuSTT):
if menuSTT in ["A", "a"]:
clear()
blogo()
designQOnchainONLY()
elif menuSTT in ["B", "b"]:
clear()
blogo()
colorsOnchainONLY()
elif menuSTT in ["C", "c"]:
clear()
blogo()
colorsCOnchainONLY()
def menuSettingsRemote(menuSTT):
if menuSTT in ["A", "a"]:
clear()
blogo()
designQ()
elif menuSTT in ["B", "b"]:
clear()
blogo()
colors()
elif menuSTT in ["C", "c"]:
clear()
blogo()
colorsCRemote()
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 menuColorsOnchainONLY(menuCLS):
if menuCLS in ["A", "a"]:
colorsSelectFrontOnchainONLY()
elif menuCLS in ["B", "b"]:
colorsSelectBackOnchainONLY()
elif menuCLS in ["C", "c"]:
colorsSelectRainbowOnchainONLY()
elif menuCLS in ["F", "f"]:
colorsOnchainONLY()
def menuColorsClock(menuCLS):
if menuCLS in ["A", "a"]:
colorsSelectFrontClock()
elif menuCLS in ["B", "b"]:
colorsSelectBackClock()
elif menuCLS in ["F", "f"]:
colors()
def menuColorsClockOnchainONLY(menuCLS):
if menuCLS in ["A", "a"]:
colorsSelectFrontClockOnchainONLY()
elif menuCLS in ["B", "b"]:
colorsSelectBackClockOnchainONLY()
elif menuCLS in ["F", "f"]:
colorsOnchainONLY()
def menuColorsClockRemote(menuCLS):
if menuCLS in ["A", "a"]:
colorsSelectFrontClockRemote()
elif menuCLS in ["B", "b"]:
colorsSelectBackClockRemote()
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 menuColorsSelectRainbowOnchainONLY(menuRF):
if menuRF in ["A", "a"]:
colorsSelectRainbowStartOnchaiONLY()
elif menuRF in ["B", "b"]:
colorsSelectRainbowEndOnchainONLY()
elif menuRF in ["F", "f"]:
colorsOnchainONLY()
def menuColorsSelectRainbowEnd(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorB"] = "black"
testlogoRB()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorB"] = "red"
testlogoRB()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorB"] = "green"
testlogoRB()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorB"] = "yellow"
testlogo()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorB"] = "blue"
testlogoRB()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorB"] = "magenta"
testlogoRB()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorB"] = "cyan"
testlogoRB()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorB"] = "white"
testlogoRB()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorB"] = "gray"
testlogoRB()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectRainbowEndOnchainONLY(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorB"] = "black"
testlogoRB()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorB"] = "red"
testlogoRB()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorB"] = "green"
testlogoRB()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorB"] = "yellow"
testlogo()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorB"] = "blue"
testlogoRB()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorB"] = "magenta"
testlogoRB()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorB"] = "cyan"
testlogoRB()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorB"] = "white"
testlogoRB()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorB"] = "gray"
testlogoRB()
elif menuCF in ["R", "r"]:
colorsOnchainONLY()
def menuColorsSelectRainbowStart(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorA"] = "black"
testlogoRB()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorA"] = "red"
testlogoRB()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorA"] = "green"
testlogoRB()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorA"] = "yellow"
testlogoRB()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorA"] = "blue"
testlogoRB()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorA"] = "magenta"
testlogoRB()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorA"] = "cyan"
testlogoRB()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorA"] = "white"
testlogoRB()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorA"] = "gray"
testlogoRB()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectRainbowStartOnchainONLY(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorA"] = "black"
testlogoRB()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorA"] = "red"
testlogoRB()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorA"] = "green"
testlogoRB()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorA"] = "yellow"
testlogoRB()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorA"] = "blue"
testlogoRB()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorA"] = "magenta"
testlogoRB()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorA"] = "cyan"
testlogoRB()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorA"] = "white"
testlogoRB()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorA"] = "gray"
testlogoRB()
elif menuCF in ["R", "r"]:
colorsOnchainONLY()
def menuColorsSelectBack(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorB"] = "black"
testlogo()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorB"] = "red"
testlogo()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorB"] = "green"
testlogo()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorB"] = "yellow"
testlogo()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorB"] = "blue"
testlogo()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorB"] = "magenta"
testlogo()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorB"] = "cyan"
testlogo()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorB"] = "white"
testlogo()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorB"] = "gray"
testlogo()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectBackOnchainONLY(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorB"] = "black"
testlogo()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorB"] = "red"
testlogo()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorB"] = "green"
testlogo()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorB"] = "yellow"
testlogo()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorB"] = "blue"
testlogo()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorB"] = "magenta"
testlogo()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorB"] = "cyan"
testlogo()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorB"] = "white"
testlogo()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorB"] = "gray"
testlogo()
elif menuCF in ["R", "r"]:
colorsOnchainONLY()
def menuColorsSelectFront(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorA"] = "black"
testlogo()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorA"] = "red"
testlogo()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorA"] = "green"
testlogo()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorA"] = "yellow"
testlogo()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorA"] = "blue"
testlogo()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorA"] = "magenta"
testlogo()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorA"] = "cyan"
testlogo()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorA"] = "white"
testlogo()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorA"] = "gray"
testlogo()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectFrontOncainONLY(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settings["colorA"] = "black"
testlogo()
elif menuCF in ["B", "b"]:
clear()
blogo()
settings["colorA"] = "red"
testlogo()
elif menuCF in ["C", "c"]:
clear()
blogo()
settings["colorA"] = "green"
testlogo()
elif menuCF in ["D", "d"]:
clear()
blogo()
settings["colorA"] = "yellow"
testlogo()
elif menuCF in ["E", "e"]:
clear()
blogo()
settings["colorA"] = "blue"
testlogo()
elif menuCF in ["F", "f"]:
clear()
blogo()
settings["colorA"] = "magenta"
testlogo()
elif menuCF in ["G", "g"]:
clear()
blogo()
settings["colorA"] = "cyan"
testlogo()
elif menuCF in ["H", "h"]:
clear()
blogo()
settings["colorA"] = "white"
testlogo()
elif menuCF in ["I", "i"]:
clear()
blogo()
settings["colorA"] = "gray"
testlogo()
elif menuCF in ["R", "r"]:
colorsOnchainONLY()
def menuColorsSelectFrontClock(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settingsClock["colorA"] = "black"
testClock()
elif menuCF in ["B", "b"]:
clear()
blogo()
settingsClock["colorA"] = "red"
testClock()
elif menuCF in ["C", "c"]:
clear()
blogo()
settingsClock["colorA"] = "green"
testClock()
elif menuCF in ["D", "d"]:
clear()
blogo()
settingsClock["colorA"] = "yellow"
testClock()
elif menuCF in ["E", "e"]:
clear()
blogo()
settingsClock["colorA"] = "blue"
testClock()
elif menuCF in ["F", "f"]:
clear()
blogo()
settingsClock["colorA"] = "magenta"
testClock()
elif menuCF in ["G", "g"]:
clear()
blogo()
settingsClock["colorA"] = "cyan"
testClock()
elif menuCF in ["H", "h"]:
clear()
blogo()
settingsClock["colorA"] = "white"
testClock()
elif menuCF in ["I", "i"]:
clear()
blogo()
settingsClock["colorA"] = "gray"
testClock()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectFrontClockOnchainONLY(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settingsClock["colorA"] = "black"
testClock()
elif menuCF in ["B", "b"]:
clear()
blogo()
settingsClock["colorA"] = "red"
testClock()
elif menuCF in ["C", "c"]:
clear()
blogo()
settingsClock["colorA"] = "green"
testClock()
elif menuCF in ["D", "d"]:
clear()
blogo()
settingsClock["colorA"] = "yellow"
testClock()
elif menuCF in ["E", "e"]:
clear()
blogo()
settingsClock["colorA"] = "blue"
testClock()
elif menuCF in ["F", "f"]:
clear()
blogo()
settingsClock["colorA"] = "magenta"
testClock()
elif menuCF in ["G", "g"]:
clear()
blogo()
settingsClock["colorA"] = "cyan"
testClock()
elif menuCF in ["H", "h"]:
clear()
blogo()
settingsClock["colorA"] = "white"
testClock()
elif menuCF in ["I", "i"]:
clear()
blogo()
settingsClock["colorA"] = "gray"
testClock()
elif menuCF in ["R", "r"]:
colorsOnchainONLY()
def menuColorsSelectBackClock(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settingsClock["colorB"] = "black"
testClock()
elif menuCF in ["B", "b"]:
clear()
blogo()
settingsClock["colorB"] = "red"
testClock()
elif menuCF in ["C", "c"]:
clear()
blogo()
settingsClock["colorB"] = "green"
testClock()
elif menuCF in ["D", "d"]:
clear()
blogo()
settingsClock["colorB"] = "yellow"
testClock()
elif menuCF in ["E", "e"]:
clear()
blogo()
settingsClock["colorB"] = "blue"
testClock()
elif menuCF in ["F", "f"]:
clear()
blogo()
settingsClock["colorB"] = "magenta"
testClock()
elif menuCF in ["G", "g"]:
clear()
blogo()
settingsClock["colorB"] = "cyan"
testClock()
elif menuCF in ["H", "h"]:
clear()
blogo()
settingsClock["colorB"] = "white"
testClock()
elif menuCF in ["I", "i"]:
clear()
blogo()
settingsClock["colorB"] = "gray"
testClock()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectBackClockOnchainONLY(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settingsClock["colorB"] = "black"
testClock()
elif menuCF in ["B", "b"]:
clear()
blogo()
settingsClock["colorB"] = "red"
testClock()
elif menuCF in ["C", "c"]:
clear()
blogo()
settingsClock["colorB"] = "green"
testClock()
elif menuCF in ["D", "d"]:
clear()
blogo()
settingsClock["colorB"] = "yellow"
testClock()
elif menuCF in ["E", "e"]:
clear()
blogo()
settingsClock["colorB"] = "blue"
testClock()
elif menuCF in ["F", "f"]:
clear()
blogo()
settingsClock["colorB"] = "magenta"
testClock()
elif menuCF in ["G", "g"]:
clear()
blogo()
settingsClock["colorB"] = "cyan"
testClock()
elif menuCF in ["H", "h"]:
clear()
blogo()
settingsClock["colorB"] = "white"
testClock()
elif menuCF in ["I", "i"]:
clear()
blogo()
settingsClock["colorB"] = "gray"
testClock()
elif menuCF in ["R", "r"]:
colorsOnchainONLY()
def menuColorsSelectFrontClockRemote(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settingsClock["colorA"] = "black"
testClockRemote()
elif menuCF in ["B", "b"]:
clear()
blogo()
settingsClock["colorA"] = "red"
testClockRemote()
elif menuCF in ["C", "c"]:
clear()
blogo()
settingsClock["colorA"] = "green"
testClockRemote()
elif menuCF in ["D", "d"]:
clear()
blogo()
settingsClock["colorA"] = "yellow"
testClockRemote()
elif menuCF in ["E", "e"]:
clear()
blogo()
settingsClock["colorA"] = "blue"
testClockRemote()
elif menuCF in ["F", "f"]:
clear()
blogo()
settingsClock["colorA"] = "magenta"
testClockRemote()
elif menuCF in ["G", "g"]:
clear()
blogo()
settingsClock["colorA"] = "cyan"
testClockRemote()
elif menuCF in ["H", "h"]:
clear()
blogo()
settingsClock["colorA"] = "white"
testClockRemote()
elif menuCF in ["I", "i"]:
clear()
blogo()
settingsClock["colorA"] = "gray"
testClockRemote()
elif menuCF in ["R", "r"]:
colors()
def menuColorsSelectBackClockRemote(menuCF):
if menuCF in ["A", "a"]:
clear()
blogo()
settingsClock["colorB"] = "black"
testClockRemote()
elif menuCF in ["B", "b"]:
clear()
blogo()
settingsClock["colorB"] = "red"
testClockRemote()
elif menuCF in ["C", "c"]:
clear()
blogo()
settingsClock["colorB"] = "green"
testClockRemote()
elif menuCF in ["D", "d"]:
clear()
blogo()
settingsClock["colorB"] = "yellow"
testClockRemote()
elif menuCF in ["E", "e"]:
clear()
blogo()
settingsClock["colorB"] = "blue"
testClockRemote()
elif menuCF in ["F", "f"]:
clear()
blogo()
settingsClock["colorB"] = "magenta"
testClockRemote()
elif menuCF in ["G", "g"]:
clear()
blogo()
settingsClock["colorB"] = "cyan"
testClockRemote()
elif menuCF in ["H", "h"]:
clear()
blogo()
settingsClock["colorB"] = "white"
testClockRemote()
elif menuCF in ["I", "i"]:
clear()
blogo()
settingsClock["colorB"] = "gray"
testClockRemote()
elif menuCF in ["R", "r"]:
colors()
def menuDesign(menuDSN):
if menuDSN in ["A", "a"]:
clear()
blogo()
settings["design"] = "block"
testlogo()
elif menuDSN in ["B", "b"]:
clear()
blogo()
settings['design'] = "slick"
testlogo()
elif menuDSN in ["C", "c"]:
clear()
blogo()
settings['design'] = "tiny"
testlogo()
elif menuDSN in ["D", "d"]:
clear()
blogo()
settings['design'] = "grid"
testlogo()
elif menuDSN in ["E", "e"]:
clear()
blogo()
settings['design'] = "pallet"
testlogo()
elif menuDSN in ["F", "f"]:
clear()
blogo()
settings['design'] = "shade"
testlogo()
elif menuDSN in ["G", "g"]:
clear()
blogo()
settings['design'] = "chrome"
testlogo()
elif menuDSN in ["H", "h"]:
clear()
blogo()
settings['design'] = "simple"
testlogo()
elif menuDSN in ["I", "i"]:
clear()
blogo()
settings['design'] = "simpleBlock"
testlogo()
elif menuDSN in ["J", "j"]:
clear()
blogo()
settings['design'] = "3d"
testlogo()
elif menuDSN in ["K", "k"]:
clear()
blogo()
settings['design'] = "simple3d"
testlogo()
elif menuDSN in ["L", "l"]:
clear()
blogo()
settings['design'] = "huge"
testlogo()
def menuDesignOnchainONLY(menuDSN):
if menuDSN in ["A", "a"]:
clear()
blogo()
settings["design"] = "block"
testlogo()
elif menuDSN in ["B", "b"]:
clear()
blogo()
settings['design'] = "slick"
testlogo()
elif menuDSN in ["C", "c"]:
clear()
blogo()
settings['design'] = "tiny"
testlogo()
elif menuDSN in ["D", "d"]:
clear()
blogo()
settings['design'] = "grid"
testlogo()
elif menuDSN in ["E", "e"]:
clear()
blogo()
settings['design'] = "pallet"
testlogo()
elif menuDSN in ["F", "f"]:
clear()
blogo()
settings['design'] = "shade"
testlogo()
elif menuDSN in ["G", "g"]:
clear()
blogo()
settings['design'] = "chrome"
testlogo()
elif menuDSN in ["H", "h"]:
clear()
blogo()
settings['design'] = "simple"
testlogo()
elif menuDSN in ["I", "i"]:
clear()
blogo()
settings['design'] = "simpleBlock"
testlogo()
elif menuDSN in ["J", "j"]:
clear()
blogo()
settings['design'] = "3d"
testlogo()
elif menuDSN in ["K", "k"]:
clear()
blogo()
settings['design'] = "simple3d"
testlogo()
elif menuDSN in ["L", "l"]:
clear()
blogo()
settings['design'] = "huge"
testlogo()
#------------API---------------------
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"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2020-07-14 20:04:00 -03:00
2021-11-26 20:26:36 -03:00
def mempoolmenuSOnchainONLY(menuMem):
if menuMem in ["A", "a"]:
blocks()
elif menuMem in ["B", "b"]:
fee()
elif menuMem in ["R", "r"]:
menuSelection()
def menuTallyCo(menuTLC):
if menuTLC in ["A", "a"]:
tallycoGetPayment()
elif menuTLC in ["B", "b"]:
tallycoDonateid()
elif menuTLC in ["R", "r"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2021-11-26 20:26:36 -03:00
def menuTallyCoOnchainONLY(menuTLC):
if menuTLC in ["A", "a"]:
tallycoGetPayment()
elif menuTLC in ["B", "b"]:
tallycoDonateid()
elif menuTLC in ["R", "r"]:
menuSelection()
def menuTippinMe(menuTM):
2020-06-25 18:53:52 +00:00
if menuTM in ["A", "a"]:
tippinmeGetInvoice()
2020-06-25 16:03:22 -03:00
elif menuTM in ["R", "r"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2021-11-26 20:26:36 -03:00
def menuTippinMeOnchainONLY(menuTM):
if menuTM in ["A", "a"]:
tippinmeGetInvoice()
elif menuTM in ["R", "r"]:
menuSelection()
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()
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()
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()
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()
blogo()
2020-06-22 14:26:07 -03:00
OpenNodeListPayments()
elif menuOP in ["S", "s"]:
clear()
blogo()
OpenNodeCheckStatus()
2020-06-25 16:03:22 -03:00
elif menuOP in ["R", "r"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2020-06-22 14:26:07 -03:00
2021-11-26 20:26:36 -03:00
def menuOpenNodeOnchainONLY(menuOP):
if menuOP in ["A", "a"]:
clear()
blogo()
OpenNodecreatecharge()
elif menuOP in ["B", "b"]:
clear()
blogo()
OpenNodeiniciatewithdrawal()
elif menuOP in ["C", "c"]:
clear()
blogo()
OpenNodelistfunds()
elif menuOP in ["D", "d"]:
clear()
blogo()
OpenNodeListPayments()
elif menuOP in ["S", "s"]:
clear()
blogo()
OpenNodeCheckStatus()
elif menuOP in ["R", "r"]:
menuSelection()
2020-06-22 14:26:07 -03:00
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()
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()
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()
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()
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()
blogo()
2020-06-22 14:26:07 -03:00
lnpayTransBWallets()
2020-06-25 16:03:22 -03:00
elif menuNW in ["R", "r"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2020-06-22 14:26:07 -03:00
2021-11-26 20:26:36 -03:00
def menuLNPAYOnchainONLY(menuNW):
if menuNW in ["A", "a"]:
clear()
blogo()
lnpayCreateInvoice()
elif menuNW in ["B", "b"]:
clear()
blogo()
lnpayPayInvoice()
elif menuNW in ["C", "c"]:
clear()
blogo()
lnpayGetBalance()
elif menuNW in ["D", "d"]:
clear()
blogo()
lnpayGetTransactions()
elif menuNW in ["E", "e"]:
clear()
blogo()
lnpayTransBWallets()
elif menuNW in ["R", "r"]:
menuSelection()
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()
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()
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()
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()
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()
blogo()
2020-06-19 17:51:28 -03:00
lnbitListPawWall()
elif menuLNQ in ["F", "f"]:
clear()
blogo()
lnbitsLNURLw()
elif menuLNQ in ["G", "g"]:
clear()
blogo()
lnbitsLNURLwList()
2020-06-25 16:03:22 -03:00
elif menuLNQ in ["R", "r"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2020-06-19 17:51:28 -03:00
2021-11-26 20:26:36 -03:00
def menuLNBPIOnchainONLY(menuLNQ):
if menuLNQ in ["A", "a"]:
clear()
blogo()
lnbitCreateNewInvoice()
elif menuLNQ in ["B", "b"]:
clear()
blogo()
lnbitPayInvoice()
elif menuLNQ in ["C", "c"]:
clear()
blogo()
lnbitCreatePayWall()
elif menuLNQ in ["D", "d"]:
clear()
blogo()
lnbitDeletePayWall()
elif menuLNQ in ["E", "e"]:
clear()
blogo()
lnbitListPawWall()
elif menuLNQ in ["F", "f"]:
clear()
blogo()
lnbitsLNURLw()
elif menuLNQ in ["G", "g"]:
clear()
blogo()
lnbitsLNURLwList()
elif menuLNQ in ["R", "r"]:
menuSelection()
def rateSXMenu(menuSX):
if menuSX in ["A", "a"]:
clear()
blogo()
rateSXList()
elif menuSX in ["B", "b"]:
clear()
blogo()
rateSXGraph()
elif menuSX in ["R", "r"]:
2020-11-25 23:16:31 -03:00
menuSelection()
2021-11-26 20:26:36 -03:00
def rateSXMenuOnchainONLY(menuSX):
if menuSX in ["A", "a"]:
clear()
blogo()
rateSXList()
elif menuSX in ["B", "b"]:
clear()
blogo()
rateSXGraph()
elif menuSX in ["R", "r"]:
menuSelection()
#---------------END API-----------
def runTheNumbersControl(menuNumbers):
if menuNumbers in ["A", "a"]:
clear()
blogo()
countdownblock()
elif menuNumbers in ["B", "b"]:
clear()
blogo()
localHalving()
elif menuNumbers in ["C", "c"]:
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()
2022-10-03 19:28:06 +02:00
elif menuNumbers in ["D", "d"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
blockTmpConn()
2022-10-08 19:22:25 +02:00
elif menuNumbers in ["E", "e"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
epoch()
2021-11-26 20:26:36 -03:00
def runTheNumbersControlOnchainONLY(menuNumbers):
if menuNumbers in ["A", "a"]:
clear()
blogo()
countdownblock()
elif menuNumbers in ["B", "b"]:
clear()
blogo()
localHalving()
elif menuNumbers in ["C", "c"]:
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()
2022-10-03 19:28:06 +02:00
elif menuNumbers in ["D", "d"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
blockTmpConn()
2022-10-03 22:45:05 +02:00
elif menuNumbers in ["E", "e"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
epoch()
def runTheNumbersControlConn(menuNumbersconn):
if menuNumbersconn in ["A", "a"]:
clear()
blogo()
countdownblockConn()
elif menuNumbersconn in ["B", "b"]:
clear()
blogo()
remoteHalving()
elif menuNumbersconn in ["C", "c"]:
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()
2022-10-03 19:28:06 +02:00
elif menuNumbers in ["D", "d"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
blockTmpConn()
2022-10-03 22:45:05 +02:00
elif menuNumbers in ["E", "e"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
epoch()
def menuWeather(menuWD):
if menuWD in ["A", "a"]:
wttrDataV1()
elif menuWD in ["B", "b"]:
wttrDataV2()
2021-11-26 20:26:36 -03:00
def menuWeatherOnchainONLY(menuWD):
if menuWD in ["A", "a"]:
wttrDataV1()
elif menuWD in ["B", "b"]:
wttrDataV2()
def mainmenuLOCALcontrol(menuS): #Execution of the Main Menu options
2020-06-25 18:53:52 +00:00
if menuS in ["A", "a"]:
artist()
2020-06-25 18:53:52 +00:00
elif menuS in ["B", "b"]:
bitcoincoremenuLOCAL()
2020-06-25 18:53:52 +00:00
elif menuS in ["L", "l"]:
lightningnetworkLOCAL()
elif menuS in ["S", "s"]:
settings4Local()
elif menuS in ["P", "p"]:
APIMenuLOCAL()
elif menuS in ["X", "x"]:
dnt()
2020-06-25 18:53:52 +00:00
elif menuS in ["Q", "q"]:
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 ["T", "t"]:
2020-06-24 17:08:28 -03:00
clear()
delay_print("\033[1;32;40mWake up, Neo...")
2020-06-24 17:08:28 -03:00
t.sleep(2)
clear()
delay_print("The Matrix has you...")
2020-06-24 17:08:28 -03:00
t.sleep(2)
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)
screensv()
2020-12-07 20:56:35 -03:00
elif menuS in ["nym", "Nym", "NYM", "nYm", "nyM", "NYm", "NyM", "nYM"]:
clear()
blogo()
robotNym()
2020-12-12 18:48:14 -03:00
elif menuS in ["wt", "WT", "Wt", "wT"]:
clear()
blogo()
callGitWardenTerminal()
elif menuS in ["ss", "SS", "Ss", "sS"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
callGitSatSale()
2022-09-27 21:38:08 +02:00
elif menuS in ["CA", "ca", "Ca", "cA"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
callGitCashu()
2020-12-06 22:28:13 -03:00
def mainmenuLOCALcontrolOnchainONLY(menuS): #Execution of the Main Menu options
if menuS in ["A", "a"]:
artist()
elif menuS in ["B", "b"]:
bitcoincoremenuLOCALOnchainONLY()
elif menuS in ["S", "s"]:
settings4LocalOnchainONLY()
elif menuS in ["P", "p"]:
APIMenuLOCALOnchainONLY()
elif menuS in ["X", "x"]:
dntOnchainONLY()
elif menuS in ["Q", "q"]:
os._exit(0)
apisnd.close()
donation.close()
clone.close()
logos.close()
feed.close()
sysinf.close()
nodeconnection.close()
exit()
elif menuS in ["T", "t"]:
clear()
delay_print("\033[1;32;40mWake up, Neo...")
t.sleep(2)
clear()
delay_print("The Matrix has you...")
t.sleep(2)
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)
screensv()
elif menuS in ["nym", "Nym", "NYM", "nYm", "nyM", "NYm", "NyM", "nYM"]:
clear()
blogo()
robotNym()
elif menuS in ["wt", "WT", "Wt", "wT"]:
clear()
blogo()
callGitWardenTerminal()
elif menuS in ["ss", "SS", "Ss", "sS"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
callGitSatSale()
2022-09-27 21:38:08 +02:00
elif menuS in ["CA", "ca", "Ca", "cA"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
callGitCashu()
2022-03-07 21:51:32 -03:00
2022-03-08 20:36:01 -03:00
def slushpoolLOCALOnchainONLYMenu(slush):
if slush in ["A", "a"]:
2022-03-07 23:51:30 +01:00
clear()
blogo()
slDIFFConn()
2022-03-08 20:36:01 -03:00
elif slush in ["B", "b"]:
2022-03-07 23:51:30 +01:00
clear()
blogo()
slHASHConn()
2022-03-08 20:36:01 -03:00
elif slush in ["C", "c"]:
2022-03-07 23:51:30 +01:00
clear()
blogo()
slPOOLConn()
2022-03-09 08:59:25 -03:00
elif slush in ["D", "d"]:
2022-03-07 23:51:30 +01:00
clear()
blogo()
2022-03-07 21:51:32 -03:00
slHISTConn()
2022-03-08 20:36:01 -03:00
elif slush in ["E", "e"]:
2022-03-07 00:04:06 -03:00
clear()
blogo()
getPoolSlushCheck()
2022-03-17 21:21:37 +01:00
def ckpoolLOCALOnchainONLYMenu(slush):
if ckpool in ["A", "a"]:
clear()
blogo()
getPoolCKCheck()
2022-03-17 19:48:04 -03:00
2022-03-17 21:21:37 +01:00
def ckpoolREMOTEOnchainONLYMenu(slush):
if ckpool in ["A", "a"]:
clear()
blogo()
getPoolCKCheck()
def bitcoincoremenuLOCALcontrolA(bcore):
if bcore in ["A", "a"]:
while True:
try:
clear()
blogo()
sysinfo()
close()
console()
t.sleep(5)
2020-06-13 19:23:52 -03:00
except:
break
elif bcore in ["B", "b"]:
clear()
blogo()
getgenesis()
input("Continue...")
menuSelection()
elif bcore in ["C", "c"]:
getblock()
elif bcore in ["D", "d"]:
runTheNumbersMenu()
elif bcore in ["E", "e"]:
2020-11-24 22:04:22 -03:00
decodeHex()
elif bcore in ["F", "f"]:
try:
clear()
blogo()
sysinfo()
close()
decodeQR()
input("Continue...")
except:
pass
elif bcore in ["G", "g"]:
getrawtx()
2020-11-24 22:04:22 -03:00
elif bcore in ["H", "h"]:
miscellaneousLOCAL()
2020-12-22 19:21:10 -03:00
elif bcore in ["I", "i"]:
callColdCore()
elif bcore in ["J", "j"]:
pdfconvert()
2022-05-09 20:40:50 +02:00
elif bcore in ["M", "m"]:
2022-12-20 10:14:37 -03:00
mtConn()
2021-05-17 15:00:06 -03:00
elif bcore in ["O", "o"]:
bitcoincoremenuLOCALOPRETURN()
2021-11-24 20:01:52 -03:00
elif bcore in ["Z", "z"]:
2021-11-26 01:08:52 -03:00
statsConn()
2022-11-11 14:04:38 +01:00
elif bcore in ["Q", "q"]:
2021-12-06 17:52:33 -03:00
miningConn()
elif bcore in ["U", "u"]:
2021-11-26 00:57:45 -03:00
untxsConn()
2022-03-18 18:44:47 -03:00
elif bcore in ["Q", "q"]:
searchTXS()
elif bcore in ["S", "s"]:
counttxs()
2021-05-03 20:59:14 -03:00
def bitcoincoremenuLOCALcontrolAOnchainONLY(bcore):
if bcore in ["A", "a"]:
while True:
try:
clear()
blogo()
sysinfo()
close()
console()
t.sleep(5)
except:
break
elif bcore in ["B", "b"]:
clear()
blogo()
getgenesis()
input("Continue...")
menuSelection()
elif bcore in ["C", "c"]:
getblock()
elif bcore in ["D", "d"]:
2021-11-26 20:26:36 -03:00
runTheNumbersMenuOnchainONLY()
elif bcore in ["E", "e"]:
2021-11-26 20:26:36 -03:00
decodeHexOnchainONLY()
elif bcore in ["F", "f"]:
try:
clear()
blogo()
sysinfo()
close()
decodeQR()
input("Continue...")
except:
pass
elif bcore in ["G", "g"]:
getrawtx()
elif bcore in ["H", "h"]:
2021-11-26 20:26:36 -03:00
miscellaneousLOCALOnchainONLY()
elif bcore in ["I", "i"]:
callColdCore()
elif bcore in ["J", "j"]:
pdfconvert()
2022-05-09 20:40:50 +02:00
elif bcore in ["M", "m"]:
2022-12-20 10:14:37 -03:00
mtConn()
2021-12-01 16:57:56 -03:00
elif bcore in ["O", "o"]:
bitcoincoremenuLOCALOPRETURNOnchainONLY()
elif bcore in ["W", "w"]:
2021-11-24 07:47:40 -03:00
walletmenuLOCALOnchainONLY()
2021-11-24 20:01:52 -03:00
elif bcore in ["Z", "z"]:
2021-11-26 01:08:52 -03:00
statsConn()
2022-11-11 14:04:38 +01:00
elif bcore in ["Q", "q"]:
2021-12-06 17:52:33 -03:00
miningConn()
elif bcore in ["U", "u"]:
2021-11-26 00:57:45 -03:00
untxsConn()
2022-03-18 18:44:47 -03:00
elif bcore in ["Q", "q"]:
2021-12-11 15:53:43 -03:00
searchTXS()
2022-03-18 18:44:47 -03:00
elif bcore in ["S", "s"]:
counttxs()
2021-11-26 00:57:45 -03:00
2021-11-24 07:47:40 -03:00
def walletmenuLOCALcontrolAOnchainONLY(walletmnu):
if walletmnu in ["A", "a"]:
getnewaddressOnchain()
elif walletmnu in ["B", "b"]:
gettransactionsOnchain()
2022-12-23 02:42:46 +01:00
elif walletmnu in ["C", "c"]:
2022-12-24 11:24:44 -03:00
dumppk()
2022-12-25 03:32:46 +01:00
elif walletmnu in ["D", "d"]:
wallmenu()
2021-05-17 15:00:06 -03:00
def bitcoincoremenuLOCALcontrolO(oreturn):
if oreturn in ["A", "a"]:
clear()
blogo()
opreturn()
elif oreturn in ["B", "b"]:
clear()
blogo()
opreturn_view()
2021-12-06 16:56:40 +01:00
elif oreturn in ["C", "c"]:
clear()
blogo()
2021-12-06 17:52:33 -03:00
opretminer()
2021-05-17 15:00:06 -03:00
2021-12-01 16:57:56 -03:00
def bitcoincoremenuLOCALcontrolOOnchainONLY(oreturn):
if oreturn in ["A", "a"]:
clear()
blogo()
opreturnOnchainONLY()
elif oreturn in ["B", "b"]:
clear()
blogo()
opreturn_view()
elif oreturn in ["C", "c"]:
clear()
blogo()
opretminer()
2020-11-24 22:04:22 -03:00
def miscellaneousLOCALmenu(misce):
2022-03-12 10:51:07 -03:00
if misce in ["A", "a"]:
while True:
2020-11-24 22:04:22 -03:00
try:
clear()
blogo()
close()
logoA()
tmp()
clear()
blogo()
close()
logoB()
tmp()
clear()
blogo()
close()
logoC()
tmp()
except:
break
2022-03-12 10:51:07 -03:00
elif misce in ["B", "b"]:
clear()
blogo()
close()
sysinfoDetail()
elif misce in ["C", "c"]:
clear()
blogo()
datesConn()
elif misce in ["D", "d"]:
clear()
blogo()
quotesConn()
2022-03-12 16:31:38 +01:00
elif misce in ["P", "p"]:
clear()
blogo()
2022-03-13 20:58:54 -03:00
pgpConn()
2022-03-12 10:51:07 -03:00
elif misce in ["S", "s"]:
clear()
blogo()
satoshiConn()
elif misce in ["R", "r"]:
menuSelection()
2022-03-05 16:03:11 -03:00
2021-11-26 20:26:36 -03:00
def miscellaneousLOCALmenuOnchainONLY(misce):
2021-12-06 17:52:33 -03:00
if misce in ["A", "a"]:
while True:
2021-11-26 20:26:36 -03:00
try:
clear()
blogo()
close()
logoA()
tmp()
clear()
blogo()
close()
logoB()
tmp()
clear()
blogo()
close()
logoC()
tmp()
2021-12-06 17:52:33 -03:00
except:
2022-03-12 10:51:07 -03:00
break
2021-12-06 17:52:33 -03:00
elif misce in ["B", "b"]:
2022-03-12 10:26:00 -03:00
clear()
blogo()
close()
sysinfoDetail()
2021-12-06 17:52:33 -03:00
elif misce in ["D", "d"]:
2022-03-12 10:26:00 -03:00
clear()
blogo()
quotesConn()
2021-12-06 17:52:33 -03:00
elif misce in ["C", "c"]:
2022-03-12 10:26:00 -03:00
clear()
blogo()
datesConn()
2022-03-12 16:31:38 +01:00
elif misce in ["P", "p"]:
clear()
blogo()
2022-03-13 20:58:54 -03:00
pgpConn()
2022-03-12 03:04:11 +01:00
elif misce in ["S", "s"]:
2022-03-12 10:26:00 -03:00
clear()
blogo()
satoshiConn()
2021-12-06 17:52:33 -03:00
elif misce in ["R", "r"]:
menuSelection()
2021-11-26 20:26:36 -03:00
2020-11-24 22:04:22 -03:00
def decodeHexLOCAL(hexloc):
if hexloc in ["A", "a"]:
clear()
blogo()
close()
try:
readHexBlock()
while True:
r = input("Do you want to continue decoding? Y/n: ")
if r in ["Y", "y"]:
clear()
blogo()
readHexBlock()
else:
break
except:
pass
elif hexloc in ["B", "b"]:
clear()
blogo()
close()
try:
readHexTx()
while True:
r = input("Do you want to continue decoding? Y/n: ")
2020-11-25 20:02:37 +00:00
if r not in ["Y", "y"]:
2020-11-24 22:04:22 -03:00
break
2020-11-25 20:02:37 +00:00
clear()
blogo()
sysinfo()
readHexTx()
2020-11-24 22:04:22 -03:00
except:
pass
2021-11-26 20:26:36 -03:00
def decodeHexLOCALOnchainONLY(hexloc):
if hexloc in ["A", "a"]:
clear()
blogo()
close()
try:
readHexBlock()
while True:
r = input("Do you want to continue decoding? Y/n: ")
if r in ["Y", "y"]:
clear()
blogo()
readHexBlock()
else:
break
except:
pass
elif hexloc in ["B", "b"]:
clear()
blogo()
close()
try:
readHexTx()
while True:
r = input("Do you want to continue decoding? Y/n: ")
if r not in ["Y", "y"]:
break
clear()
blogo()
sysinfo()
readHexTx()
except:
pass
def lightningnetworkLOCALcontrol(lncore):
if lncore in ["A", "a"]:
while True:
try:
clear()
blogo()
sysinfo()
close()
consoleLN()
t.sleep(5)
2020-06-13 19:23:52 -03:00
except:
break
elif lncore in ["B", "b"]:
clear()
blogo()
localaddinvoice()
elif lncore in ["C", "c"]:
clear()
blogo()
localpayinvoice()
elif lncore in ["D", "d"]:
clear()
blogo()
localkeysend()
elif lncore in ["E", "e"]:
clear()
blogo()
localnewaddress()
elif lncore in ["F", "f"]:
clear()
blogo()
locallistinvoices()
elif lncore in ["G", "g"]:
clear()
blogo()
localchannelbalance()
elif lncore in ["H", "h"]:
clear()
blogo()
locallistchannels()
elif lncore in ["I", "i"]:
clear()
blogo()
localrebalancelnd()
elif lncore in ["J", "j"]:
clear()
blogo()
locallistpeersQQ()
elif lncore in ["K", "k"]:
clear()
blogo()
localconnectpeer()
elif lncore in ["L", "l"]:
clear()
blogo()
localbalanceOC()
elif lncore in ["M", "m"]:
clear()
blogo()
locallistchaintxns()
elif lncore in ["N", "n"]:
clear()
blogo()
localgetinfo()
elif lncore in ["O", "o"]:
clear()
blogo()
localgetnetworkinfo()
2022-02-17 01:52:56 +01:00
elif lncore in ["P", "p"]:
clear()
blogo()
2022-03-05 16:03:11 -03:00
chatConn()
elif lncore in ["Z", "z"]:
clear()
blogo()
stalnConn()
elif lncore in ["T", "t"]:
clear()
blogo()
ranConn()
elif lncore in ["Q", "q"]:
if os.path.isfile("lnbitSN.conf"):
lnbitsLNURLwList()
elif lncore in ["S", "s"]:
if os.path.isfile("lnbitSN.conf"):
lnbitsLNURLw()
2020-11-25 16:43:43 -03:00
elif lncore in ["R", "r"]:
2020-11-24 22:04:22 -03:00
menuSelection()
2022-03-05 16:03:11 -03:00
2022-03-05 16:41:53 -03:00
def chatConnA(menuch):
2022-02-17 21:32:04 +01:00
if menuch in ["A", "a"]:
pyCHATA()
elif menuch in ["B", "b"]:
pyCHATB()
elif menuch in ["C", "c"]:
pyCHATC()
2022-03-05 16:03:11 -03:00
2022-03-05 16:41:53 -03:00
def chatConnB(pyCHATA):
2022-02-17 21:32:04 +01:00
if pyCHATA in ["A", "a"]:
clear()
blogo()
localchatsendA()
elif pyCHATA in ["B", "b"]:
clear()
blogo()
localchatnewA()
elif pyCHATA in ["C", "c"]:
clear()
blogo()
localchatlistA()
2022-03-05 16:03:11 -03:00
2022-03-05 16:41:53 -03:00
def chatConnC(pyCHATB):
2022-02-17 21:32:04 +01:00
if pyCHATB in ["A", "a"]:
clear()
blogo()
localchatsendB()
elif pyCHATB in ["B", "b"]:
clear()
blogo()
localchatnewB()
elif pyCHATB in ["C", "c"]:
clear()
blogo()
2022-03-05 16:03:11 -03:00
localchatlistB()
2022-03-05 16:41:53 -03:00
def chatConnD(pyCHATC):
2022-02-17 21:32:04 +01:00
if pyCHATC in ["A", "a"]:
2022-02-17 01:52:56 +01:00
clear()
blogo()
2022-02-17 21:32:04 +01:00
localchatsendC()
elif pyCHATC in ["B", "b"]:
2022-02-17 01:52:56 +01:00
clear()
blogo()
2022-02-17 21:32:04 +01:00
localchatnewC()
elif pyCHATC in ["C", "c"]:
2022-02-17 01:52:56 +01:00
clear()
blogo()
2022-03-05 16:03:11 -03:00
localchatlistC()
def platfformsLOCALcontrol(platf):
if platf in ["A", "a"]:
aaccPPiTippinMe()
elif platf in ["B", "b"]:
aaccPPiTallyCo()
elif platf in ["C", "c"]:
mempoolmenu()
elif platf in ["D", "d"]:
clear()
blogo()
CoingeckoPP()
elif platf in ["E", "e"]:
rateSX()
2021-11-28 14:32:02 -03:00
elif platf in ["F", "f"]:
bwtConn()
elif platf in ["G", "g"]:
aaccPPiLNBits()
elif platf in ["H", "h"]:
aaccPPiLNPay()
elif platf in ["I", "i"]:
aaccPPiOpenNode()
2020-11-24 22:04:22 -03:00
elif platf in ["J", "j"]:
satnodeMenu()
elif platf in ["K", "k"]:
weatherMenu()
elif platf in ["L", "l"]:
gameroom()
2021-11-27 10:23:08 -03:00
elif platf in ["M", "m"]:
whalalConn()
2022-12-19 16:02:43 +01:00
elif platf in ["N", "n"]:
2022-12-20 10:14:37 -03:00
nostrConn()
2022-03-08 23:58:27 +01:00
elif platf in ["S", "s"]:
2022-03-08 20:36:01 -03:00
slushpoolLOCALOnchainONLY()
2022-03-17 21:21:37 +01:00
elif platf in ["W", "w"]:
2022-03-17 19:48:04 -03:00
ckpoolpoolLOCALOnchainONLY()
2020-11-26 13:05:51 -03:00
elif platf in ["R", "r"]:
menuSelection()
2020-11-24 22:04:22 -03:00
def platfformsLOCALcontrolOnchainONLY(platf):
if platf in ["A", "a"]:
2021-11-26 20:26:36 -03:00
aaccPPiTippin()
elif platf in ["B", "b"]:
aaccPPiTallyCo()
elif platf in ["C", "c"]:
2021-11-26 20:26:36 -03:00
mempoolmenuOnchainONLY()
elif platf in ["D", "d"]:
clear()
blogo()
CoingeckoPP()
elif platf in ["E", "e"]:
2021-11-26 20:26:36 -03:00
rateSXOncainONLY()
2021-11-28 14:32:02 -03:00
elif platf in ["F", "f"]:
bwtConn()
elif platf in ["G", "g"]:
aaccPPiLNBits()
elif platf in ["H", "h"]:
aaccPPiLNPay()
elif platf in ["I", "i"]:
aaccPPiOpenNode()
elif platf in ["J", "j"]:
2021-11-26 20:26:36 -03:00
satnodeMenuOnchainONLY()
elif platf in ["K", "k"]:
2021-11-26 20:26:36 -03:00
weatherMenuOnchainONLY()
elif platf in ["L", "l"]:
gameroom()
2021-11-27 10:23:08 -03:00
elif platf in ["M", "m"]:
whalalConn()
2022-12-19 16:02:43 +01:00
elif platf in ["N", "n"]:
2022-12-20 10:14:37 -03:00
nostrConn()
2022-03-08 23:58:27 +01:00
elif platf in ["S", "s"]:
2022-03-08 20:36:01 -03:00
slushpoolLOCALOnchainONLY()
2022-03-17 21:21:37 +01:00
elif platf in ["W", "w"]:
2022-03-17 19:48:04 -03:00
ckpoolpoolLOCALOnchainONLY()
elif platf in ["R", "r"]:
menuSelection()
2022-03-17 19:48:04 -03:00
2022-03-17 21:21:37 +01:00
def ckpool(menuch):
if menuch in ["A", "a"]:
2022-03-17 19:48:04 -03:00
ckpool()
2022-12-20 10:14:37 -03:00
2022-12-19 16:02:43 +01:00
def nostrmenu(menunos):
if menunos in ["A", "a"]:
callGitNostrLinTerminal()
2022-12-28 20:28:21 +01:00
elif menunos in ["C", "c"]:
2022-12-19 16:02:43 +01:00
callGitNostrWinTerminal()
2022-12-28 01:52:25 +01:00
elif menunos in ["B", "b"]:
2022-12-20 10:14:37 -03:00
callGitNostrMacTerminal()
2022-12-28 20:28:21 +01:00
elif menunos in ["E", "e"]:
2022-12-28 01:52:25 +01:00
callGitNostrMacarmTerminal()
2022-12-28 20:28:21 +01:00
elif menunos in ["D", "d"]:
2022-12-28 01:52:25 +01:00
callGitNostrLinarmTerminal()
2022-12-28 20:28:21 +01:00
elif menunos in ["F", "f"]:
callGitNostrWinarmTerminal()
2022-12-21 21:47:49 +01:00
elif menunos in ["S", "s"]:
2022-12-28 01:52:25 +01:00
callGitNostrSeedTerminal()
2022-12-22 09:16:03 -03:00
2020-11-24 22:04:22 -03:00
#----------------------------REMOTE MENUS
def mainmenuREMOTEcontrol(menuS): #Execution of the Main Menu options
if menuS in ["A", "a"]:
while True:
try:
clear()
close()
remotegetblock()
tmp()
except:
break
elif menuS in ["B", "b"]:
bitcoincoremenuREMOTE()
elif menuS in ["L", "l"]:
lightningnetworkREMOTE()
elif menuS in ["P", "p"]:
2020-11-26 13:05:51 -03:00
APIMenuLOCAL()
elif menuS in ["X", "x"]:
dnt()
elif menuS in ["S", "s"]:
settings4Remote()
2020-06-25 18:53:52 +00:00
elif menuS in ["Q", "q"]:
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()
exit()
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()
delay_print("\033[1;32;40mWake up, Neo...")
2020-06-24 17:08:28 -03:00
t.sleep(2)
clear()
delay_print("The Matrix has you...")
2020-06-24 17:08:28 -03:00
t.sleep(2)
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-12-07 20:56:35 -03:00
elif menuS in ["nym", "Nym", "NYM", "nYm", "nyM", "NYm", "NyM", "nYM"]:
clear()
blogo()
robotNym()
2020-12-13 12:44:38 -03:00
elif menuS in ["wt", "WT", "Wt", "wT"]:
clear()
blogo()
callGitWardenTerminal()
elif menuS in ["ss", "SS", "Ss", "sS"]:
clear()
blogo()
2022-12-20 10:14:37 -03:00
callGitSatSale()
def bitcoincoremenuREMOTEcontrol(bcore):
if bcore in ["A", "a"]:
while True:
try:
clear()
blogo()
sysinfo()
close()
remoteconsole()
t.sleep(5)
except:
break
elif bcore in ["B", "b"]:
remotegetblockcount()
elif bcore in ["C", "c"]:
runTheNumbersMenuConn()
2020-11-24 22:04:22 -03:00
elif bcore in ["D", "d"]:
try:
clear()
blogo()
sysinfo()
close()
decodeQR()
input("Continue...")
except:
pass
elif bcore in ["E", "e"]:
2020-11-26 13:05:51 -03:00
miscellaneousLOCAL()
2022-05-09 20:40:50 +02:00
elif bcore in ["M", "m"]:
2022-12-20 10:14:37 -03:00
mtConn()
2021-05-17 15:00:06 -03:00
elif bcore in ["O", "o"]:
bitcoincoremenuREMOTEOPRETURN()
2021-12-06 16:56:40 +01:00
elif bcore in ["Z", "z"]:
statsConn()
2022-11-11 14:04:38 +01:00
elif bcore in ["Q", "q"]:
2021-12-06 17:52:33 -03:00
miningConn()
2021-12-06 16:56:40 +01:00
elif bcore in ["U", "u"]:
2021-12-06 17:52:33 -03:00
untxsConn()
2021-05-17 15:00:06 -03:00
def bitcoincoremenuREMOTEcontrolO(oreturn):
if oreturn in ["A", "a"]:
clear()
blogo()
opreturn()
elif oreturn in ["B", "b"]:
clear()
blogo()
opreturn_view()
2021-12-06 16:56:40 +01:00
elif oreturn in ["C", "c"]:
clear()
blogo()
2021-12-06 17:52:33 -03:00
opretminer()
def lightningnetworkREMOTEcontrol(lncore):
if lncore in ["A", "a"]:
2020-05-29 11:52:29 -03:00
clear()
blogo()
2020-06-10 19:02:49 -03:00
getnewinvoice()
elif lncore in ["B", "b"]:
2020-05-29 11:52:29 -03:00
clear()
blogo()
payinvoice()
elif lncore in ["C", "c"]:
clear()
blogo()
getnewaddress()
elif lncore in ["D", "d"]:
clear()
blogo()
listinvoice()
elif lncore in ["E", "e"]:
clear()
blogo()
channelbalance()
elif lncore in ["F", "f"]:
clear()
blogo()
channels()
elif lncore in ["G", "g"]:
clear()
blogo()
2020-06-10 19:02:49 -03:00
balanceOC()
elif lncore in ["H", "h"]:
2020-06-10 19:02:49 -03:00
clear()
blogo()
listonchaintxs()
elif lncore in ["I", "i"]:
2020-08-30 12:30:37 -03:00
clear()
blogo()
getinfo()
elif lncore in ["Z", "z"]:
clear()
blogo()
stalnConn()
elif lncore in ["T", "t"]:
clear()
blogo()
ranConn()
elif lncore in ["Q", "q"]:
if os.path.isfile("lnbitSN.conf"):
lnbitsLNURLwList()
elif lncore in ["S", "s"]:
if os.path.isfile("lnbitSN.conf"):
lnbitsLNURLw()
2020-11-25 16:43:43 -03:00
elif lncore in ["R", "r"]:
2020-11-24 22:19:57 -03:00
menuSelection()
def menuC(menuO): # Donation access Menu
2020-06-25 18:53:52 +00:00
if menuO in ["A", "a"]:
dntDev()
2020-06-25 18:53:52 +00:00
elif menuO in ["B", "b"]:
dntTst()
2020-06-25 18:53:52 +00:00
elif menuO in ["R", "r"]:
menuSelection()
2020-05-24 14:15:12 -03:00
def menuCOnchainONLY(menuO): # Donation access Menu
if menuO in ["A", "a"]:
dntDevOnchainONLY()
elif menuO in ["B", "b"]:
dntTstOnchainONLY()
elif menuO in ["R", "r"]:
menuSelection()
def menuD(menuN): # Satnode access Menu
2020-06-25 18:53:52 +00:00
if menuN in ["A", "a"]:
satnode()
2020-06-25 18:53:52 +00:00
elif menuN in ["B", "b"]:
readFile()
2020-06-25 18:53:52 +00:00
elif menuN in ["S", "s"]:
try:
2020-11-25 20:43:58 -03:00
clear()
blogo()
close()
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"]:
try:
clear()
blogo()
close()
apisenderFile()
2020-05-26 20:48:23 -03:00
t.sleep(30)
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
2020-06-25 18:53:52 +00:00
elif message in ["T", "t"]:
try:
clear()
blogo()
close()
apisender()
2020-05-26 20:48:23 -03:00
t.sleep(30)
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
2020-06-25 18:53:52 +00:00
elif menuN in ["C", "c"]:
2020-11-25 20:43:58 -03:00
try:
print("\n\t This only will work on Linux or Unix systems.\n")
a = input("Do we continue? Y/n: ")
if a in ["Y", "y"]:
gitclone()
else:
menuSelection()
except:
pass
2020-11-25 16:43:43 -03:00
elif menuN in ["R", "r"]:
menuSelection()
2020-05-24 14:15:12 -03:00
def menuE(menuQ): # Dev Donation access Menu
2020-06-25 18:53:52 +00:00
if menuQ in ["A", "a"]:
try:
clear()
blogo()
close()
2021-04-14 00:08:55 -03:00
donationPayNym()
t.sleep(50)
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
elif menuQ in ["B", "b"]:
2021-04-14 00:08:55 -03:00
try:
clear()
blogo()
close()
donationAddr()
t.sleep(50)
menuSelection()
except:
menuSelection()
elif menuQ in ["C", "c"]:
try:
clear()
blogo()
close()
donationLN()
t.sleep(50)
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
2020-06-25 18:53:52 +00:00
elif menuQ in ["R", "r"]:
menuSelection()
2020-05-24 14:15:12 -03:00
def menuEOnchainONLY(menuQ): # Dev Donation access Menu
if menuQ in ["A", "a"]:
try:
clear()
blogo()
close()
donationPayNym()
t.sleep(50)
menuSelection()
except:
menuSelection()
elif menuQ in ["B", "b"]:
try:
clear()
blogo()
close()
donationAddr()
t.sleep(50)
menuSelection()
except:
menuSelection()
elif menuQ in ["C", "c"]:
try:
clear()
blogo()
close()
donationLN()
t.sleep(50)
menuSelection()
except:
menuSelection()
elif menuQ in ["R", "r"]:
menuSelection()
def menuF(menuV): # Tester Donation access Menu
2020-06-25 18:53:52 +00:00
if menuV in ["A", "a"]:
try:
clear()
blogo()
close()
donationAddrTst()
t.sleep(50)
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
2020-06-25 18:53:52 +00:00
elif menuV in ["B", "b"]:
try:
clear()
blogo()
close()
donationLNTst()
t.sleep(50)
menuSelection()
2020-06-13 19:23:52 -03:00
except:
menuSelection()
2020-06-25 18:53:52 +00:00
elif menuV in ["R", "r"]:
menuSelection()
def menuFOnchainONLY(menuV): # Tester Donation access Menu
if menuV in ["A", "a"]:
try:
clear()
blogo()
close()
donationAddrTst()
t.sleep(50)
menuSelection()
except:
menuSelection()
elif menuV in ["B", "b"]:
try:
clear()
blogo()
close()
donationLNTst()
t.sleep(50)
menuSelection()
except:
menuSelection()
elif menuV in ["R", "r"]:
menuSelection()
#---------------------------------------------------------------------------------
2022-12-19 16:02:43 +01:00
def nostrConn():
clear()
blogo()
sysinfo()
2022-12-20 10:14:37 -03:00
2022-12-19 16:02:43 +01:00
if path['bitcoincli']:
n = "Local" if path['bitcoincli'] else "Remote"
bitcoincli = " getblockchaininfo"
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
2022-12-20 10:14:37 -03:00
2022-12-19 16:02:43 +01:00
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mBlock\033[0;37;40m: \033[1;32;40m{}\033[0;37;40m
\033[1;37;40mVersion\033[0;37;40m: {}
2022-12-28 20:28:21 +01:00
\033[1;32;40mA.\033[0;37;40m Linux x64
\033[1;32;40mB.\033[0;37;40m Mac x64
\033[1;32;40mC.\033[0;37;40m Windows x64
\033[1;32;40mD.\033[0;37;40m Linux arm64
\033[1;32;40mE.\033[0;37;40m Mac arm64
\033[1;32;40mF.\033[0;37;40m Windows arm64
2022-12-21 21:47:49 +01:00
\033[1;32;40mS.\033[0;37;40m Bip39
2022-12-19 16:02:43 +01:00
\u001b[31;1mR.\033[0;37;40m Return
2022-12-19 15:35:50 -03:00
\n\n\x1b[?25h""".format(n if path['bitcoincli'] else a, d['blocks'], version, checkupdate()))
2022-12-19 16:02:43 +01:00
nostrmenu(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def testClockRemote():
b = rpc('getblockcount')
c = str(b)
a = c
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='left')
print(output)
print("""
-------------------------
Front Color: {}
Back Color: {}
-------------------------
""".format(settingsClock['colorA'], settingsClock['colorB']))
try:
print("<<< Cancel Control + C")
input("Enter To Apply...")
settingsClock["gradient"] = "color"
pickle.dump(settingsClock, open("pyblocksettingsClock.conf", "wb"))
except:
pass
2020-12-07 20:56:35 -03:00
2022-03-16 00:31:26 -03:00
def commandsINIT(initCONF):
intCONF = {"fullbtclnd":"","fullbtc":"","cropped":""}
if not os.path.isdir("config"):
dir = 'mkdir config'
os.system(dir)
if os.path.isfile('config/intro.conf'):
intro = pickle.load(open("config/intro.conf", "rb"))
initCONF = intro
if initCONF['fullbtclnd']:
fullbtclnd()
elif initCONF['fullbtc']:
fullbtc()
elif initCONF['cropped']:
cropped()
else:
if initCONF in ["A", "a"]:
initDATA = "A"
intCONF['fullbtclnd'] = initDATA
initPATH = intCONF['fullbtclnd']
pickle.dump(initPATH, open("config/intro.conf", "wb"))
clear()
fullbtclnd()
elif initCONF in ["B", "b"]:
initDATA = "B"
intCONF['fullbtc'] = initDATA
initPATH = intCONF['fullbtc']
pickle.dump(initPATH, open("config/intro.conf", "wb"))
clear()
fullbtc()
elif initCONF in ["C", "c"]:
initDATA = "C"
intCONF['cropped'] = initDATA
initPATH = intCONF['cropped']
pickle.dump(initPATH, open("config/intro.conf", "wb"))
clear()
2022-03-16 21:11:20 -03:00
menuSelection()
2022-03-16 00:31:26 -03:00
def fullbtc():
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
if not os.path.isdir("config"):
dir = 'mkdir config'
os.system(dir)
2020-05-24 14:15:12 -03:00
2022-03-16 00:31:26 -03:00
if os.path.isfile('config/bclock.conf') or os.path.isfile('config/blnclock.conf'): # Check if the file 'bclock.conf' is in the same folder
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
else:
blogo()
print("Welcome to \033[1;31;40mPyBLOCK\033[0;37;40m\n\n")
print("\n\tIf 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\tLocal Bitcoin Core Node connection.\n")
path['bitcoincli']= input("Insert the Path to Bitcoin-Cli: ")
pickle.dump(path, open("config/bclock.conf", "wb"))
menuSelection()
def fullbtclnd():
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
if not os.path.isdir("config"):
dir = 'mkdir config'
os.system(dir)
if os.path.isfile('config/bclock.conf') or os.path.isfile('config/blnclock.conf'): # Check if the file 'bclock.conf' is in the same folder
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
path = pathv # Copy the variable pathv to 'path'
else:
blogo()
print("Welcome to \033[1;31;40mPyBLOCK\033[0;37;40m\n\n")
2022-03-17 21:36:46 +01:00
print("\n\tIf you are going to use your local node leave IP:PORT/USER/PASSWORD in 𝗕𝗟𝗔𝗡𝗞.\n")
2022-03-16 00:31:26 -03:00
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\tLocal Bitcoin Core Node connection.\n")
2022-03-19 03:25:00 +01:00
path['bitcoincli']= input("Insert the Path to Bitcoin-Cli. Normally you just need to type 𝙗𝙞𝙩𝙘𝙤𝙞𝙣-𝙘𝙡𝙞: ")
2022-03-16 00:31:26 -03:00
pickle.dump(path, open("config/bclock.conf", "wb"))
if os.path.isfile('config/blndconnect.conf'): # Check if the file 'bclock.conf' is in the same folder
lndconnectData= pickle.load(open("config/blndconnect.conf", "rb")) # Load the file 'bclock.conf'
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
else:
clear()
blogo()
if os.path.isfile('config/init.conf'):
pqr = pickle.load(open("config/init.conf", "rb"))
yesno = pqr
else:
yesno = input("Do you want to connect your Lightning Node? yes/no: ")
pickle.dump(yesno, open("config/init.conf", "wb"))
if yesno in ["YES", "yes", "yES", "yeS", "Yes", "YEs"]:
2022-03-17 21:36:46 +01:00
print("\n\tIf you are going to use your local node leave IP:PORT/CERT/MACAROONS in 𝗕𝗟𝗔𝗡𝗞.\n")
2022-03-16 00:31:26 -03:00
lndconnectload["ip_port"] = input("Insert IP:PORT to your node: ") # path to the bitcoin-cli
lndconnectload["tls"] = input("Insert the path to tls.cert file: ")
lndconnectload["macaroon"] = input("Insert the path to admin.macaroon: ")
print("\n\tLocal Lightning Node connection.\n")
2022-03-19 03:25:00 +01:00
lndconnectload["ln"] = input("Insert the Path to Lncli. Normally you just need to type 𝙡𝙣𝙘𝙡𝙞: ")
2022-03-16 00:31:26 -03:00
pickle.dump(lndconnectload, open("config/blndconnect.conf", "wb")) # Save the file 'bclock.conf'
menuSelection()
def introINIT():
if not os.path.isdir("config"):
dir = 'mkdir config'
os.system(dir)
clear()
blogo()
#sysinfo()
print("""\t\t
2022-03-19 16:56:52 -03:00
Welcome 𝓒𝔂𝓹𝓱𝓮𝓻𝓹𝓾𝓷𝓴.
2022-03-19 03:25:00 +01:00
Connect 𝗣𝘆𝗕𝗟Ø𝗖𝗞 to your Nodes or Run the Cropped option.
2022-03-16 00:31:26 -03:00
2022-03-17 21:36:46 +01:00
\u001b[31;1mA.\033[0;37;40m 𝗣𝘆𝗕𝗟Ø𝗖𝗞 (Bitcoin & Lightning)
\u001b[38;5;202mB.\033[0;37;40m 𝗣𝘆𝗕𝗟Ø𝗖𝗞 (Bitcoin)
2022-03-20 13:27:00 -03:00
\u001b[33;1mC.\033[0;37;40m 𝗣𝘆𝗕𝗟Ø𝗖𝗞 (Cropped)
2022-03-16 00:31:26 -03:00
\n\n\x1b[?25h""")
commandsINIT(input("\033[1;32;40mSelect option: \033[0;37;40m"))
#--------------------------------- End Main Menu execution --------------------------------
settings = {"gradient":"", "design":"block", "colorA":"green", "colorB":"yellow"}
settingsClock = {"gradient":"", "colorA":"green", "colorB":"yellow"}
2020-06-02 22:59:20 -03:00
while True: # Loop
2022-12-19 15:55:08 -03:00
try:
2021-11-26 00:57:45 -03:00
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/bclock.conf') or os.path.isfile('config/blnclock.conf'): # Check if the file 'bclock.conf' is in the same folder
pathv = pickle.load(open("config/bclock.conf", "rb")) # Load the file 'bclock.conf'
2021-11-26 00:57:45 -03:00
path = pathv # Copy the variable pathv to 'path'
2021-12-03 23:55:49 -03:00
if os.path.isfile('config/blndconnect.conf'): # Check if the file 'bclock.conf' is in the same folder
lndconnectData= pickle.load(open("config/blndconnect.conf", "rb")) # Load the file 'bclock.conf'
2021-11-26 00:57:45 -03:00
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
2022-03-16 00:31:26 -03:00
clear()
if not os.path.isfile('config/intro.conf'):
introINIT()
2021-11-22 15:53:28 -03:00
else:
2022-03-16 00:31:26 -03:00
menuSelection()
2022-12-19 15:55:08 -03:00
except:
print("\n")
sys.exit(101)