Update PyBlock.py

This commit is contained in:
Satoshi Nakamoto 2021-11-02 22:22:14 +01:00 committed by GitHub
parent 43f60ce118
commit 555d9be036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1428,6 +1428,44 @@ def APITallyCo():
\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()))
menuTallyCo(input("\033[1;32;40mSelect option: \033[0;37;40m"))
def WhaleApi():
clear()
blogo()
sysinfo()
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
\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;40mWhaleAlert
\033[1;32;40mA.\033[0;37;40m Whale Alert
\033[1;32;40mB.\033[0;37;40m Transactions
\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()))
menuWhaleA(input("\033[1;32;40mSelect option: \033[0;37;40m"))
#-------------------------------- SETTINGS -----------------------------------------------