mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-14 12:43:15 +02:00
Update PyBlock.py
This commit is contained in:
parent
43f60ce118
commit
555d9be036
1 changed files with 38 additions and 0 deletions
38
PyBlock.py
38
PyBlock.py
|
|
@ -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 -----------------------------------------------
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue