2023-05-25 22:40:32 +02:00
|
|
|
|
#Developer: Curly60e
|
|
|
|
|
|
#Tester: __B__T__C__
|
|
|
|
|
|
#ℙ𝕪𝔹𝕃𝕆ℂ𝕂 𝕚𝕥𝕤 𝕒 𝔹𝕚𝕥𝕔𝕠𝕚𝕟 𝔻𝕒𝕤𝕙𝕓𝕠𝕒𝕣𝕕 𝕨𝕚𝕥𝕙 ℂ𝕪𝕡𝕙𝕖𝕣𝕡𝕦𝕟𝕜 𝕒𝕖𝕤𝕥𝕙𝕖𝕥𝕚𝕔.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import base64, codecs, json, requests
|
2026-04-01 10:24:47 -03:00
|
|
|
|
import subprocess
|
2023-05-25 22:40:32 +02:00
|
|
|
|
import os
|
|
|
|
|
|
import os.path
|
|
|
|
|
|
import qrcode
|
|
|
|
|
|
import xmltodict
|
|
|
|
|
|
import time as t
|
|
|
|
|
|
import simplejson as json
|
|
|
|
|
|
from cfonts import render, say
|
2026-04-01 12:03:52 -03:00
|
|
|
|
from pblogo import blogo
|
|
|
|
|
|
from logos import logoB
|
2023-12-07 10:46:46 -03:00
|
|
|
|
#from lnpay_py.wallet import LNPayWallet
|
2023-05-25 22:40:32 +02:00
|
|
|
|
from pycoingecko import CoinGeckoAPI
|
|
|
|
|
|
|
|
|
|
|
|
def clear(): # clear the screen
|
2026-04-01 10:24:47 -03:00
|
|
|
|
subprocess.run(['clear'] if os.name != 'nt' else ['cls'], shell=(os.name == 'nt'))
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
def closed():
|
|
|
|
|
|
print("<<< Back Control + C.\n\n")
|
|
|
|
|
|
|
|
|
|
|
|
def opreturnOnchainONLY():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"OP_RETURN Message", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
message = input("Message: ")
|
|
|
|
|
|
|
|
|
|
|
|
while len(message) > 70:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("Error! Only 80 characters allowed!")
|
|
|
|
|
|
message = input("\nMessage: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
resp = requests.post('https://opreturnbot.com/api/create', json={'message': message + '...PyBLOCK'})
|
|
|
|
|
|
b = resp.text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(b)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'LND Invoice: {b}')
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
if lndconnectload['ln']:
|
|
|
|
|
|
invoiceN = b
|
|
|
|
|
|
invoice = invoiceN.lower()
|
|
|
|
|
|
lncli = " payinvoice "
|
2026-04-01 10:24:47 -03:00
|
|
|
|
lsd = subprocess.run([lndconnectload["ln"], "decodepayreq", invoice], capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
lsd0 = str(lsd)
|
|
|
|
|
|
d = json.loads(lsd0)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url = f"https://opreturnbot.com/api/status/{d['payment_hash']}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
cert_path = lndconnectload["tls"]
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open(lndconnectload["macaroon"], 'rb') as f:
|
|
|
|
|
|
macaroon = codecs.encode(f.read(), 'hex')
|
2023-05-25 22:40:32 +02:00
|
|
|
|
headers = {'Grpc-Metadata-macaroon': macaroon}
|
|
|
|
|
|
url = f'https://{lndconnectload["ip_port"]}/v1/payreq/{b}'
|
|
|
|
|
|
r = requests.get(url, headers=headers, verify=cert_path)
|
|
|
|
|
|
s = r.json()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url = f"https://opreturnbot.com/api/status/{s['payment_hash']}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
response = requests.get(url)
|
|
|
|
|
|
responseB = str(response.text)
|
|
|
|
|
|
responseC = responseB
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\nTransaction ID: " + responseC)
|
|
|
|
|
|
input("\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def opreturn():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
try:
|
|
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
|
|
|
|
|
if os.path.isfile('blndconnect.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\n\tIf you are going to use your local node leave IP:PORT/CERT/MACAROONS in blank.\n")
|
|
|
|
|
|
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")
|
|
|
|
|
|
lndconnectload["ln"] = input("Insert the path to lncli: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("blndconnect.conf", "w") as f:
|
|
|
|
|
|
json.dump(lndconnectload, f) # Save the file 'bclock.conf'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
path = {"ip_port":"", "rpcuser":"", "rpcpass":"", "bitcoincli":""}
|
|
|
|
|
|
if os.path.isfile('bclock.conf') or os.path.isfile('blnclock.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("bclock.conf", "r") as f:
|
|
|
|
|
|
pathv = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
path = pathv # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
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'
|
|
|
|
|
|
] = f'http://{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: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("bclock.conf", "w") as f:
|
|
|
|
|
|
json.dump(path, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"OP_RETURN Message", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
message = input("Message: ")
|
|
|
|
|
|
|
|
|
|
|
|
while len(message) > 70:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("Error! Only 80 characters allowed!")
|
|
|
|
|
|
message = input("\nMessage: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
resp = requests.post('https://opreturnbot.com/api/create', json={'message': message + '...PyBLOCK'})
|
|
|
|
|
|
b = resp.text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
node_not = input("\nDo you want to pay this invoice with your node? Y/n: ")
|
|
|
|
|
|
if node_not in ["Y", "y"]:
|
|
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
if lndconnectload['ip_port']:
|
|
|
|
|
|
print("\nInvoice: " + b + "\n")
|
|
|
|
|
|
payinvoice()
|
|
|
|
|
|
cert_path = lndconnectload["tls"]
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open(lndconnectload["macaroon"], 'rb') as f:
|
|
|
|
|
|
macaroon = codecs.encode(f.read(), 'hex')
|
2023-05-25 22:40:32 +02:00
|
|
|
|
headers = {'Grpc-Metadata-macaroon': macaroon}
|
|
|
|
|
|
url = f'https://{lndconnectload["ip_port"]}/v1/payreq/{b}'
|
|
|
|
|
|
r = requests.get(url, headers=headers, verify=cert_path)
|
|
|
|
|
|
s = r.json()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url = f"https://opreturnbot.com/api/status/{s['payment_hash']}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
response = requests.get(url)
|
|
|
|
|
|
responseB = str(response.text)
|
|
|
|
|
|
responseC = responseB
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\nTransaction ID: " + responseC)
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
elif lndconnectload['ln']:
|
|
|
|
|
|
print("\nInvoice: " + b + "\n")
|
|
|
|
|
|
localpayinvoice()
|
|
|
|
|
|
invoiceN = b
|
|
|
|
|
|
invoice = invoiceN.lower()
|
|
|
|
|
|
lncli = " payinvoice "
|
2026-04-01 10:24:47 -03:00
|
|
|
|
lsd = subprocess.run([lndconnectload["ln"], "decodepayreq", invoice], capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
lsd0 = str(lsd)
|
|
|
|
|
|
d = json.loads(lsd0)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url = f"https://opreturnbot.com/api/status/{d['payment_hash']}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
response = requests.get(url)
|
|
|
|
|
|
responseB = str(response.text)
|
|
|
|
|
|
responseC = responseB
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\nTransaction ID: " + responseC)
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(b)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'LND Invoice: {b}')
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
if lndconnectload['ln']:
|
|
|
|
|
|
invoiceN = b
|
|
|
|
|
|
invoice = invoiceN.lower()
|
|
|
|
|
|
lncli = " payinvoice "
|
2026-04-01 10:24:47 -03:00
|
|
|
|
lsd = subprocess.run([lndconnectload["ln"], "decodepayreq", invoice], capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
lsd0 = str(lsd)
|
|
|
|
|
|
d = json.loads(lsd0)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url = f"https://opreturnbot.com/api/status/{d['payment_hash']}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
cert_path = lndconnectload["tls"]
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open(lndconnectload["macaroon"], 'rb') as f:
|
|
|
|
|
|
macaroon = codecs.encode(f.read(), 'hex')
|
2023-05-25 22:40:32 +02:00
|
|
|
|
headers = {'Grpc-Metadata-macaroon': macaroon}
|
|
|
|
|
|
url = f'https://{lndconnectload["ip_port"]}/v1/payreq/{b}'
|
|
|
|
|
|
r = requests.get(url, headers=headers, verify=cert_path)
|
|
|
|
|
|
s = r.json()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url = f"https://opreturnbot.com/api/status/{s['payment_hash']}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
response = requests.get(url)
|
|
|
|
|
|
responseB = str(response.text)
|
|
|
|
|
|
responseC = responseB
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\nTransaction ID: " + responseC)
|
|
|
|
|
|
input("\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def opreturn_view():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"OP_RETURN Message", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
responseC = input("TX ID: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
url2 = f'https://opreturnbot.com/api/view/{responseC}'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
r = requests.get(url2)
|
|
|
|
|
|
r2 = str(r.text)
|
|
|
|
|
|
r3 = r2
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\nTransaction ID: " + responseC)
|
|
|
|
|
|
print(f'OP_RETURN Message: {r3}')
|
|
|
|
|
|
input("\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def opretminer():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s 'https://bitcointicker.co/latestblocks/' | xargs --null | html2text | grep "Coinbase" -A 70 | tr -d '|' | grep -v "Coinbase" | grep '6.25'"""
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"decoded coinbase", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------GAMES--------------------------------
|
|
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def gameroom():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""
|
|
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
INITIATE ARCADE?
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------
|
|
|
|
|
|
""".format(closed()))
|
|
|
|
|
|
input("\a\nContinue...")
|
|
|
|
|
|
conn = "ssh gameroom@bitreich.org"
|
2026-04-01 10:24:47 -03:00
|
|
|
|
subprocess.run(conn, shell=True)
|
|
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------Stats--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def statsConn():
|
|
|
|
|
|
try:
|
2026-04-01 11:52:26 -03:00
|
|
|
|
conn = """curl -s https://www.bitcoinblockhalf.com/ | html2text | grep -E "Total" -A 10 | grep -v -E "\\--" | tr -d '*' | tr -d '"' """
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("stats", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END Stats--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------PGP--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def pgpConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s https://web.archive.org/web/20110228054007/http://www.bitcoin.org/Satoshi_Nakamoto.asc """
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"pgp", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END PGP--------------------------------
|
|
|
|
|
|
|
2024-07-23 08:01:59 -03:00
|
|
|
|
#-----------------------------MoscowT--------------------------------
|
2024-07-23 11:42:52 -03:00
|
|
|
|
def mtConn(): # here we convert the result of the command 'getblockcount' on a random art design
|
2023-05-25 22:40:32 +02:00
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
2024-07-23 02:11:05 +02:00
|
|
|
|
conn = """curl -s 'https://blockchain.info/tobtc?currency=USD&value=1' """
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout.strip() # Leer y eliminar espacios en blanco
|
2024-07-23 11:42:52 -03:00
|
|
|
|
sats = a.lstrip('0.') # Eliminar ceros iniciales y el punto decimal
|
2024-07-23 02:04:36 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("Moscow Time", colors=['yellow'], align='left', font='tiny')
|
2024-07-23 11:42:52 -03:00
|
|
|
|
outputT = render(f"{sats[:4]} sats", colors=['green'], align='left', font='tiny') # Mostrar solo los primeros 4 dígitos
|
2024-07-23 02:04:36 +02:00
|
|
|
|
print(output)
|
2024-07-23 16:28:33 +02:00
|
|
|
|
print(outputT)
|
2024-07-23 02:04:36 +02:00
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2024-07-23 08:01:59 -03:00
|
|
|
|
break
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
def mtclock():
|
2023-06-15 23:11:48 +02:00
|
|
|
|
try:
|
2024-07-23 02:11:05 +02:00
|
|
|
|
conn = """curl -s 'https://blockchain.info/tobtc?currency=USD&value=1' """
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2024-07-23 01:36:43 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
2024-07-23 16:28:33 +02:00
|
|
|
|
output = render("Moscow Time", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
outputT = render(f"{a} sats", colors=['green'], align='left', font='tiny')
|
2023-06-15 23:11:48 +02:00
|
|
|
|
print(output)
|
2024-07-23 16:28:33 +02:00
|
|
|
|
print(outputT)
|
2024-07-23 01:36:43 +02:00
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2024-07-23 16:33:34 +02:00
|
|
|
|
pass
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
#-----------------------------END MT--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------Satoshi--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def satoshiConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s https://www.metzdowd.com/pipermail/cryptography/2009-January/014994.html | html2text | tail -n 82 | grep -v "Unsubscribe" | grep -v "Next message" | grep -v "Previous message"| grep -v "Messages sorted" | grep -v "More information" | grep -v "list]" """
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"𝐒𝐚𝐭𝐨𝐬𝐡𝐢 𝐍𝐚𝐤𝐚𝐦𝐨𝐭𝐨. 𝟎𝐱𝟏𝟖𝐂𝟎𝟗𝐄𝟖𝟔𝟓𝐄𝐂𝟗𝟒𝟖𝐀𝟏. 𝐃𝐄𝟒𝐄 𝐅𝐂𝐀𝟑 𝐄𝟏𝐀𝐁 𝟗𝐄𝟒𝟏 𝐂𝐄𝟗𝟔 𝐂𝐄𝐂𝐁 𝟏𝟖𝐂𝟎 𝟗𝐄𝟖𝟔 𝟓𝐄𝐂𝟗 𝟒𝟖𝐀𝟏.", colors=['green'], align='left', font='console'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END Satoshi--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------Whale Alert--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def whalalConn():
|
|
|
|
|
|
try:
|
2026-04-01 11:52:26 -03:00
|
|
|
|
api_key = os.environ.get("WHALE_ALERT_API_KEY", "")
|
|
|
|
|
|
if not api_key:
|
|
|
|
|
|
print("\n\033[1;31;40mSet WHALE_ALERT_API_KEY environment variable to use Whale Alert.\033[0;37;40m")
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
return
|
|
|
|
|
|
url = "https://api.whale-alert.io/v1/transactions"
|
|
|
|
|
|
params = {"api_key": api_key, "limit": 7, "min_value": 5000000, "currency": "btc"}
|
|
|
|
|
|
response = requests.get(url, params=params)
|
|
|
|
|
|
data = response.json()
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("whale alert", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
2026-04-01 11:52:26 -03:00
|
|
|
|
for tx in data.get("transactions", []):
|
|
|
|
|
|
blockchain = tx.get("blockchain", "unknown")
|
|
|
|
|
|
amount = tx.get("amount", 0)
|
|
|
|
|
|
amount_usd = tx.get("amount_usd", 0)
|
|
|
|
|
|
print(f" WHALE ALERT ₿ {amount} =${amount_usd:.0f}")
|
2023-05-25 22:40:32 +02:00
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END Whale Alert--------------------------------
|
|
|
|
|
|
#-----------------------------bwt.dev--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def bwtConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = "curl -s https://bwt.dev/banner.txt"
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END bwt.dev--------------------------------
|
|
|
|
|
|
#-----------------------------Dates--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def datesConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s "https://bitcoinexplorer.org/fun" | html2text | grep "20" | grep -v -E "https" | grep -E " " | head -n 46 | tr -d '[' | tr -d ','"""
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("dates", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END Dates--------------------------------
|
|
|
|
|
|
#-----------------------------Quotes--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def quotesConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s "https://bitcoinexplorer.org/api/quotes/all" | jq -C '.[]' | tr -d '{|}|]|,' | sed 's/text/Quote/g' | sed 's/speaker/By/g' | sed 's/url/Link/g' | sed 's/date/Date/g' | grep -v -E 'conQuote'"""
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("quotes", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END Quotes--------------------------------
|
|
|
|
|
|
#-----------------------------Hashrate--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def miningConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s "https://bitcoinexplorer.org/api/mining/hashrate" | jq -C '.[]' | tr -d '{|}|]|,' | tr -d '"'"""
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("hashrate", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END Hashrate--------------------------------
|
|
|
|
|
|
#-----------------------------StatsLN--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def stalnConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s 'https://1ml.com' | html2text | xargs -L 1 | grep -E "Number" -A 8"""
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"lightning stats", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END StatsLN--------------------------------
|
|
|
|
|
|
#-----------------------------StatRanking--------------------------------
|
|
|
|
|
|
def ranConn():
|
|
|
|
|
|
try:
|
|
|
|
|
|
conn = """curl -s 'https://1ml.com/node?order=capacity&json=true' | jq -C '.[]' | xargs -L 1 | tr -d '{|}|]|,' | grep -v -E "last_update|color|noderank" | sed 's/alias/Node/g' | grep -v -E "addresses" | grep -E " " | sed 's/capacity/RANK/g'
|
|
|
|
|
|
"""
|
2026-04-01 10:24:47 -03:00
|
|
|
|
a = subprocess.run(conn, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
output = render("ranking", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
#-----------------------------END Ranking--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def trustednode():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
addv = """
|
|
|
|
|
|
---------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
REMEMBER TO INITIALIZE \033[1;35;40mTOR\033[0;37;40m ON THE SHELL
|
|
|
|
|
|
|
|
|
|
|
|
$ source torsocks on
|
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(addv)
|
|
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
conn = ["telnet", "cut45oarvxfvfydrjery6slyeca4zpal7tljygdt5bji7l3jsrrgwkad.onion", "6023"]
|
|
|
|
|
|
subprocess.run(conn)
|
|
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
#-----------------------------END GAMES--------------------------------
|
|
|
|
|
|
|
2023-09-04 21:04:21 +02:00
|
|
|
|
#-----------------------------Node Miner--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def CoreMiner():
|
2023-09-04 21:40:42 +02:00
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
output = render("Core Miner", colors=['yellow'], align='left', font='tiny')
|
|
|
|
|
|
print(output)
|
2023-09-05 20:42:01 +02:00
|
|
|
|
input("\a\n...Mining...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
subprocess.run([path['bitcoincli'], "-generate", "1", "2147483647"])
|
2023-09-04 21:40:42 +02:00
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-09-04 21:40:42 +02:00
|
|
|
|
pass
|
2023-09-04 21:04:21 +02:00
|
|
|
|
|
2023-09-10 18:20:16 +02:00
|
|
|
|
def OwnNodeMinerComputer():
|
2023-09-04 21:40:42 +02:00
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"Own Node Miner", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
if os.path.isdir ('OwnNodeMiner'):
|
2023-09-05 20:42:01 +02:00
|
|
|
|
print("...Follow the steps...")
|
2023-09-04 21:40:42 +02:00
|
|
|
|
else: # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 10:24:47 -03:00
|
|
|
|
os.makedirs("OwnNodeMiner", exist_ok=True)
|
|
|
|
|
|
subprocess.run(["wget", "https://github.com/pooler/cpuminer/releases/download/v2.5.1/pooler-cpuminer-2.5.1-linux-x86_64.tar.gz"], cwd="OwnNodeMiner")
|
|
|
|
|
|
subprocess.run(["tar", "-xf", "pooler-cpuminer-2.5.1-linux-x86_64.tar.gz"], cwd="OwnNodeMiner")
|
2023-09-05 18:45:49 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print(output)
|
2023-09-04 21:40:42 +02:00
|
|
|
|
responseC = input("Your RPC User: ")
|
|
|
|
|
|
responseD = input("Your RPC Pass: ")
|
|
|
|
|
|
responseE = input("Your Bitcoin Address: ")
|
|
|
|
|
|
responseF = input("Select Your Threads, 2, 4, 6, 8, 10, ..: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
subprocess.run(["./minerd", "-a", "sha256d", "-O", f"{responseC}:{responseD}", "-o", "http://127.0.0.1:8332", f"--coinbase-addr={responseE}", "-t", responseF], cwd="OwnNodeMiner")
|
2023-09-04 21:40:42 +02:00
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-09-04 21:40:42 +02:00
|
|
|
|
pass
|
2023-09-10 18:01:53 +02:00
|
|
|
|
|
2023-09-10 18:20:16 +02:00
|
|
|
|
def OwnNodeMinerRaspberry():
|
2023-09-10 18:01:53 +02:00
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
output = render(
|
|
|
|
|
|
"Own Node Miner", colors=['yellow'], align='left', font='tiny'
|
|
|
|
|
|
)
|
|
|
|
|
|
if os.path.isdir ('OwnNodeMiner'):
|
|
|
|
|
|
print("...Follow the steps...")
|
|
|
|
|
|
else: # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 10:24:47 -03:00
|
|
|
|
os.makedirs("OwnNodeMiner", exist_ok=True)
|
|
|
|
|
|
subprocess.run(["git", "clone", "https://github.com/jojapoppa/cpuminer-multi-arm.git"], cwd="OwnNodeMiner")
|
2023-09-10 18:01:53 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print(output)
|
|
|
|
|
|
responseC = input("Your RPC User: ")
|
|
|
|
|
|
responseD = input("Your RPC Pass: ")
|
|
|
|
|
|
responseE = input("Your Bitcoin Address: ")
|
|
|
|
|
|
responseF = input("Select Your Threads, 2, 4, 6, 8, 10, ..: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
subprocess.run(["./cpuminer", "-a", "sha256d", "-O", f"{responseC}:{responseD}", "-o", "http://127.0.0.1:8332", f"--coinbase-addr={responseE}", "-t", responseF], cwd="OwnNodeMiner/cpuminer-multi-arm")
|
2023-09-10 18:01:53 +02:00
|
|
|
|
input("\a\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-09-10 18:01:53 +02:00
|
|
|
|
pass
|
2023-09-04 21:04:21 +02:00
|
|
|
|
#-----------------------------Node Miner--------------------------------
|
|
|
|
|
|
|
2023-05-25 22:40:32 +02:00
|
|
|
|
#-----------------------------wttr.in--------------------------------
|
|
|
|
|
|
def wttrDataV1():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
weatherList = """
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m uruguay # city name
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m ~Giza+pyramid # any location (+ for spaces)
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m Москва # Unicode name of any location in any language
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m muc # airport code (3 letters)
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m @lightninghood.com # domain name
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m 94107 # area codes
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m -78.46,106.79 # GPS coordinates
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m moon # Moon phase (add ,+US or ,+France for these cities)
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m moon@2009-01-03 # Moon phase for the date (@2016-10-25)
|
|
|
|
|
|
|
|
|
|
|
|
PRESS \033[1;32;40mM\033[0;37;40m TO INSERT MORE DATA
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(weatherList)
|
|
|
|
|
|
selectData = input("Insert your data \033[1;31;40m*\033[0;37;40m : ")
|
|
|
|
|
|
if selectData in ['M', 'm']:
|
|
|
|
|
|
moreData = """
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
Supported languages
|
|
|
|
|
|
|
|
|
|
|
|
ar af be ca da de el es et fr fa hi hu ia id it nb nl
|
|
|
|
|
|
oc pl pt-br ro ru tr th uk vi zh-cn zh-tw (supported)
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
Units
|
|
|
|
|
|
|
|
|
|
|
|
m # metric (SI) (used by default everywhere except US)
|
|
|
|
|
|
u # USCS (used by default in US)
|
|
|
|
|
|
M # show wind speed in m/s
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(moreData)
|
|
|
|
|
|
selectData2 = input("Insert your data \033[1;31;40m*\033[0;37;40m : ")
|
|
|
|
|
|
lang = input("Insert your language: ")
|
|
|
|
|
|
unit = input("Insert your metric units: ")
|
2026-04-02 14:28:30 -03:00
|
|
|
|
url = f"https://{lang}.wttr.in/{selectData2}?F&{unit}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
2026-04-02 14:28:30 -03:00
|
|
|
|
url = f"https://wttr.in/{selectData}?F"
|
|
|
|
|
|
a = requests.get(url, headers={"User-Agent": "curl"}, timeout=15).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("Continue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def wttrDataV2():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
weatherList = """
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m uruguay # city name
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m ~Giza+pyramid # any location (+ for spaces)
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m Москва # Unicode name of any location in any language
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m muc # airport code (3 letters)
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m @lightninghood.com # domain name
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m 94107 # area codes
|
|
|
|
|
|
\033[1;31;40m*\033[0;37;40m -78.46,106.79 # GPS coordinates
|
|
|
|
|
|
|
|
|
|
|
|
PRESS \033[1;32;40mM\033[0;37;40m TO INSERT MORE DATA
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(weatherList)
|
|
|
|
|
|
selectData = input("Insert your data \033[1;31;40m*\033[0;37;40m : ")
|
|
|
|
|
|
if selectData in ['M', 'm']:
|
|
|
|
|
|
moreData = """
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
Supported languages
|
|
|
|
|
|
|
|
|
|
|
|
ar af be ca da de el es et fr fa hi hu ia id it nb nl
|
|
|
|
|
|
oc pl pt-br ro ru tr th uk vi zh-cn zh-tw (supported)
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
Units
|
|
|
|
|
|
|
|
|
|
|
|
m # metric (SI) (used by default everywhere except US)
|
|
|
|
|
|
u # USCS (used by default in US)
|
|
|
|
|
|
M # show wind speed in m/s
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(moreData)
|
|
|
|
|
|
selectData2 = input("Insert your data \033[1;31;40m*\033[0;37;40m : ")
|
|
|
|
|
|
lang = input("Insert your language: ")
|
|
|
|
|
|
unit = input("Insert your metric units: ")
|
2026-04-02 14:28:30 -03:00
|
|
|
|
url = f"https://v2.wttr.in/{selectData2}?{unit}&F&lang={lang}"
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
2026-04-02 14:28:30 -03:00
|
|
|
|
url = f"https://v2.wttr.in/{selectData}?F"
|
|
|
|
|
|
a = requests.get(url, headers={"User-Agent": "curl"}, timeout=15).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
input("Continue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END wttr.in--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------RATE.SX--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def rateSXList():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
fiat = """
|
|
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
AUD Australian dollar
|
|
|
|
|
|
BRL Brazilian real
|
|
|
|
|
|
CAD Canadian dollar
|
|
|
|
|
|
CHF Swiss franc
|
|
|
|
|
|
CLP Chilean peso
|
|
|
|
|
|
CNY Chinese yuan
|
|
|
|
|
|
CZK Czech koruna
|
|
|
|
|
|
DKK Danish krone
|
|
|
|
|
|
EUR Euro
|
|
|
|
|
|
GBP Pound sterling
|
|
|
|
|
|
HKD Hong Kong dollar
|
|
|
|
|
|
HUF Hungarian forint
|
|
|
|
|
|
IDR Indonesian rupiah
|
|
|
|
|
|
ILS Israeli shekel
|
|
|
|
|
|
INR Indian rupee
|
|
|
|
|
|
JPY Japanese yen
|
|
|
|
|
|
KRW South Korean won
|
|
|
|
|
|
MXN Mexican peso
|
|
|
|
|
|
MYR Malaysian ringgit
|
|
|
|
|
|
NOK Norwegian krone
|
|
|
|
|
|
NZD New Zealand dollar
|
|
|
|
|
|
PHP Philippine peso
|
|
|
|
|
|
PKR Pakistani rupee
|
|
|
|
|
|
PLN Polish zloty
|
|
|
|
|
|
RUB Russian ruble
|
|
|
|
|
|
SEK Swedish krona
|
|
|
|
|
|
SGD Singapore dollar
|
|
|
|
|
|
THB Thai baht
|
|
|
|
|
|
TRY Turkish lira
|
|
|
|
|
|
TWD New Taiwan dollar
|
|
|
|
|
|
USD Dollars
|
|
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(fiat)
|
|
|
|
|
|
selectFiat = input("Insert a Fiat currency: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
2026-04-01 12:10:49 -03:00
|
|
|
|
cmd = "curl -s '" + selectFiat + ".rate.sx/?F&n=1'"
|
|
|
|
|
|
a = subprocess.run(cmd, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
t.sleep(20)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
def rateSXGraph():
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
fiat = """
|
|
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
AUD Australian dollar
|
|
|
|
|
|
BRL Brazilian real
|
|
|
|
|
|
CAD Canadian dollar
|
|
|
|
|
|
CHF Swiss franc
|
|
|
|
|
|
CLP Chilean peso
|
|
|
|
|
|
CNY Chinese yuan
|
|
|
|
|
|
CZK Czech koruna
|
|
|
|
|
|
DKK Danish krone
|
|
|
|
|
|
EUR Euro
|
|
|
|
|
|
GBP Pound sterling
|
|
|
|
|
|
HKD Hong Kong dollar
|
|
|
|
|
|
HUF Hungarian forint
|
|
|
|
|
|
IDR Indonesian rupiah
|
|
|
|
|
|
ILS Israeli shekel
|
|
|
|
|
|
INR Indian rupee
|
|
|
|
|
|
JPY Japanese yen
|
|
|
|
|
|
KRW South Korean won
|
|
|
|
|
|
MXN Mexican peso
|
|
|
|
|
|
MYR Malaysian ringgit
|
|
|
|
|
|
NOK Norwegian krone
|
|
|
|
|
|
NZD New Zealand dollar
|
|
|
|
|
|
PHP Philippine peso
|
|
|
|
|
|
PKR Pakistani rupee
|
|
|
|
|
|
PLN Polish zloty
|
|
|
|
|
|
RUB Russian ruble
|
|
|
|
|
|
SEK Swedish krona
|
|
|
|
|
|
SGD Singapore dollar
|
|
|
|
|
|
THB Thai baht
|
|
|
|
|
|
TRY Turkish lira
|
|
|
|
|
|
TWD New Taiwan dollar
|
|
|
|
|
|
USD Dollars
|
|
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
"""
|
|
|
|
|
|
print(fiat)
|
|
|
|
|
|
selectFiat = input("Insert a Fiat currency: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
2026-04-01 12:10:49 -03:00
|
|
|
|
cmd = "curl -s '" + selectFiat + """.rate.sx/btc' | grep -v -E 'Use'"""
|
|
|
|
|
|
a = subprocess.run(cmd, shell=True, capture_output=True, text=True).stdout
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
closed()
|
|
|
|
|
|
print(a)
|
|
|
|
|
|
t.sleep(20)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END RATE.SX--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------COINGECKO--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def CoingeckoPP():
|
|
|
|
|
|
try:
|
|
|
|
|
|
btcInfo = CoinGeckoAPI()
|
|
|
|
|
|
n = btcInfo.get_price(ids='bitcoin', vs_currencies='usd,eur,gbp,jpy,aud')
|
|
|
|
|
|
q = n['bitcoin']
|
|
|
|
|
|
usd = q['usd']
|
|
|
|
|
|
eur = q['eur']
|
|
|
|
|
|
gbp = q['gbp']
|
|
|
|
|
|
jpy = q['jpy']
|
|
|
|
|
|
aud = q['aud']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("""
|
|
|
|
|
|
--------------------COINGECKO BITCOIN PRICE-----------------------
|
|
|
|
|
|
|
|
|
|
|
|
1 BTC = {} USD
|
|
|
|
|
|
1 BTC = {} EUR
|
|
|
|
|
|
1 BTC = {} GBP
|
|
|
|
|
|
1 BTC = {} JPY
|
|
|
|
|
|
1 BTC = {} AUD
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
...BUT...
|
|
|
|
|
|
|
|
|
|
|
|
1 BTC = 1 BTC
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------
|
|
|
|
|
|
""".format(usd,eur,gbp,jpy,aud))
|
|
|
|
|
|
input("Continue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END COINGECKO--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------LNBITS--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def loadFileConnLNBits(lnbitLoad):
|
|
|
|
|
|
lnbitLoad = {"wallet_name":"", "wallet_id":"", "admin_key":"", "invoice_read_key":""}
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.isfile('lnbit.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("lnbit.conf", "r") as f:
|
|
|
|
|
|
lnbitData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lnbitLoad = lnbitData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO LNBITS.COM.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mlnbitSN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
lnbitLoad["wallet_name"] = input("Wallet name: ") # path to the bitcoin-cli
|
|
|
|
|
|
lnbitLoad["wallet_id"] = input("Wallet ID: ")
|
|
|
|
|
|
lnbitLoad["admin_key"] = input("Admin key: ")
|
|
|
|
|
|
lnbitLoad["invoice_read_key"] = input("Invoice/read key: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("lnbit.conf", "w") as f:
|
|
|
|
|
|
json.dump(lnbitLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
return lnbitLoad
|
|
|
|
|
|
|
|
|
|
|
|
def createFileConnLNBits():
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO LNBITS.COM.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mlnbitSN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
lnbitLoad = {
|
|
|
|
|
|
'wallet_id': '',
|
|
|
|
|
|
'admin_key': '',
|
|
|
|
|
|
'invoice_read_key': '',
|
|
|
|
|
|
'wallet_name': input("Wallet name: "),
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
lnbitLoad["wallet_id"] = input("Wallet ID: ")
|
|
|
|
|
|
lnbitLoad["admin_key"] = input("Admin key: ")
|
|
|
|
|
|
lnbitLoad["invoice_read_key"] = input("Invoice/read key: ")
|
|
|
|
|
|
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("lnbit.conf", "w") as f:
|
|
|
|
|
|
json.dump(lnbitLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
def lnbitCreateNewInvoice():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
try:
|
|
|
|
|
|
print("\n\tLNBITS CREATE INVOICE\n")
|
|
|
|
|
|
amt = input("Amount: ")
|
|
|
|
|
|
memo = input("Memo: ")
|
|
|
|
|
|
a = loadFileConnLNBits(['invoice_read_key'])
|
|
|
|
|
|
b = str(a['invoice_read_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b, "Content-type": "application/json"}
|
|
|
|
|
|
payload = {"out": False, "amount": int(amt), "memo": f"{memo} -PyBLOCK"}
|
|
|
|
|
|
sh = requests.post("https://legend.lnbits.com/api/v1/payments", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
q = d['payment_request']
|
|
|
|
|
|
c = q.lower()
|
|
|
|
|
|
node_not = input("Do you want to pay this invoice with your node? Y/n: ")
|
|
|
|
|
|
|
|
|
|
|
|
while True:
|
|
|
|
|
|
if node_not in ["Y", "y"]:
|
|
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
if lndconnectload['ip_port']:
|
|
|
|
|
|
print("\nInvoice: " + c + "\n")
|
|
|
|
|
|
payinvoice()
|
|
|
|
|
|
elif lndconnectload['ln']:
|
|
|
|
|
|
print("\nInvoice: " + c + "\n")
|
|
|
|
|
|
localpayinvoice()
|
|
|
|
|
|
elif node_not in ["N", "n"]:
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(c)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
print(f'Lightning Invoice: {c}')
|
|
|
|
|
|
t.sleep(10)
|
|
|
|
|
|
dn = str(d['checking_id'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b, "Content-type": "application/json"}
|
|
|
|
|
|
rsh = requests.get(f"https://legend.lnbits.com/api/v1/payments/{dn}", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
nn = str(rsh)
|
|
|
|
|
|
dd = json.loads(nn)
|
|
|
|
|
|
db = dd['paid']
|
|
|
|
|
|
if db != True:
|
|
|
|
|
|
continue
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
tick()
|
|
|
|
|
|
t.sleep(2)
|
|
|
|
|
|
break
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def lnbitPayInvoice():
|
|
|
|
|
|
bolt = input("Invoice: ")
|
|
|
|
|
|
a = loadFileConnLNBits(['admin_key'])
|
|
|
|
|
|
b = str(a['admin_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b, "Content-type": "application/json"}
|
|
|
|
|
|
payload = {"out": True, "bolt11": bolt}
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
try:
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
sh = requests.post("https://legend.lnbits.com/api/v1/payments", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
dn = str(d['checking_id'])
|
|
|
|
|
|
a = loadFileConnLNBits(['invoice_read_key'])
|
|
|
|
|
|
b = str(a['invoice_read_key'])
|
|
|
|
|
|
while True:
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b, "Content-type": "application/json"}
|
|
|
|
|
|
rsh = requests.get(f"https://legend.lnbits.com/api/v1/payments/{dn}", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
nn = str(rsh)
|
|
|
|
|
|
dd = json.loads(nn)
|
|
|
|
|
|
db = dd['paid']
|
|
|
|
|
|
if db != True:
|
|
|
|
|
|
continue
|
|
|
|
|
|
tick()
|
|
|
|
|
|
t.sleep(2)
|
|
|
|
|
|
break
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def lnbitCreatePayWall():
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
|
|
|
|
|
url = input("Url: ")
|
|
|
|
|
|
memo = input("Memo: ")
|
|
|
|
|
|
desc = input("Description: ")
|
|
|
|
|
|
amt = input("Amount in sats: ")
|
|
|
|
|
|
remb = input("Remembers Y/n: ")
|
|
|
|
|
|
a = loadFileConnLNBits(['admin_key'])
|
|
|
|
|
|
if remb in ["Y", "y"]:
|
|
|
|
|
|
remember = "true"
|
|
|
|
|
|
elif remb in ["N", "n"]:
|
|
|
|
|
|
remember = "false"
|
|
|
|
|
|
b = str(a['admin_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b, "Content-type": "application/json"}
|
|
|
|
|
|
payload = {"url": url, "memo": memo, "description": desc, "amount": int(amt), "remembers": remember == "true"}
|
|
|
|
|
|
sh = requests.post("https://legend.lnbits.com/paywall/api/v1/paywalls", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
print("\n\tPAYWALL CREATED SUCCESSFULLY\n")
|
|
|
|
|
|
t.sleep(2)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
aa = loadFileConnLNBits(['invoice_read_key'])
|
|
|
|
|
|
bb = str(a['invoice_read_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": bb}
|
|
|
|
|
|
sh = requests.get("https://legend.lnbits.com/paywall/api/v1/paywalls", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
while True:
|
|
|
|
|
|
print("\n\tLNBITS PAYWALL LIST\n")
|
|
|
|
|
|
for item_ in d:
|
|
|
|
|
|
s = item_
|
|
|
|
|
|
print(f'ID: {s["id"]}')
|
|
|
|
|
|
nd = input("\nSelect ID: ")
|
|
|
|
|
|
for item in d:
|
|
|
|
|
|
s = item
|
|
|
|
|
|
nn = s['id']
|
|
|
|
|
|
if nd == nn:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print(
|
|
|
|
|
|
"""
|
|
|
|
|
|
\tLNBITS PAYWALL DECODED
|
|
|
|
|
|
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
Description: {}
|
|
|
|
|
|
Memo: {}
|
|
|
|
|
|
Extras: {}
|
|
|
|
|
|
Remembers: {}
|
|
|
|
|
|
URL: {}
|
|
|
|
|
|
Wallet: {}
|
|
|
|
|
|
""".format(
|
|
|
|
|
|
nn,
|
|
|
|
|
|
s['amount'],
|
|
|
|
|
|
s['description'],
|
|
|
|
|
|
s['memo'],
|
|
|
|
|
|
s['extras'],
|
|
|
|
|
|
s['remembers'],
|
|
|
|
|
|
s['url'],
|
|
|
|
|
|
s['wallet'],
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
input("Continue...")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
def lnbitListPawWall():
|
|
|
|
|
|
a = loadFileConnLNBits(['invoice_read_key'])
|
|
|
|
|
|
b = str(a['invoice_read_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b}
|
|
|
|
|
|
sh = requests.get("https://legend.lnbits.com/paywall/api/v1/paywalls", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
while True:
|
|
|
|
|
|
print("\n\tLNBITS PAYWALL LIST\n")
|
|
|
|
|
|
try:
|
|
|
|
|
|
for item_ in d:
|
|
|
|
|
|
s = item_
|
|
|
|
|
|
print(f'ID: {s["id"]}')
|
|
|
|
|
|
nd = input("\nSelect ID: ")
|
|
|
|
|
|
for item in d:
|
|
|
|
|
|
s = item
|
|
|
|
|
|
nn = s['id']
|
|
|
|
|
|
if nd == nn:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tLNBITS PAYWALL DECODED
|
|
|
|
|
|
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
Description: {}
|
|
|
|
|
|
Memo: {}
|
|
|
|
|
|
Extras: {}
|
|
|
|
|
|
Remembers: {}
|
|
|
|
|
|
URL: {}
|
|
|
|
|
|
Wallet: {}
|
|
|
|
|
|
""".format(s['id'], s['amount'], s['description'], s['memo'], s['extras'], s['remembers'], s['url'], s['wallet']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------------------\n")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
input("Continue...")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
|
|
|
|
|
|
def lnbitDeletePayWall():
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
|
|
|
|
|
a = loadFileConnLNBits(['invoice_read_key'])
|
|
|
|
|
|
b = str(a['invoice_read_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b}
|
|
|
|
|
|
sh = requests.get("https://legend.lnbits.com/paywall/api/v1/paywalls", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
while True:
|
|
|
|
|
|
print("\n\tLNBITS PAYWALL LIST\n")
|
|
|
|
|
|
try:
|
|
|
|
|
|
for item_ in d:
|
|
|
|
|
|
s = item_
|
|
|
|
|
|
print(f'ID: {s["id"]}')
|
|
|
|
|
|
nd = input("\nSelect ID: ")
|
|
|
|
|
|
for item in d:
|
|
|
|
|
|
s = item
|
|
|
|
|
|
nn = s['id']
|
|
|
|
|
|
if nd == nn:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tLNBITS PAYWALL DECODED
|
|
|
|
|
|
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
Description: {}
|
|
|
|
|
|
Memo: {}
|
|
|
|
|
|
Extras: {}
|
|
|
|
|
|
Remembers: {}
|
|
|
|
|
|
URL: {}
|
|
|
|
|
|
Wallet: {}
|
|
|
|
|
|
""".format(s['id'], s['amount'], s['description'], s['memo'], s['extras'], s['remembers'], s['url'], s['wallet']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------------------\n")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
input("Continue...")
|
|
|
|
|
|
break
|
|
|
|
|
|
print("\n\tDELETE PAYWALL\n")
|
|
|
|
|
|
a = loadFileConnLNBits(['admin_key'])
|
|
|
|
|
|
b = str(a['admin_key'])
|
|
|
|
|
|
id = input("Insert PayWall ID: ")
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b}
|
|
|
|
|
|
sh = requests.delete(f"https://legend.lnbits.com/paywall/api/v1/paywalls/{id}", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\n\tPAYWALL DELETED SUCCESSFULLY\n")
|
|
|
|
|
|
t.sleep(2)
|
|
|
|
|
|
clear()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
def lnbitsLNURLw():
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""
|
|
|
|
|
|
----------------------
|
|
|
|
|
|
CREATE LNURL
|
|
|
|
|
|
----------------------\n""")
|
|
|
|
|
|
title = input("Title: ")
|
|
|
|
|
|
minwith = input("Minimum Withdraw: ")
|
|
|
|
|
|
maxwith = input("Maximum Withdraw: ")
|
|
|
|
|
|
usesw = input("Uses: ")
|
|
|
|
|
|
waittime = input("Wait Time: ")
|
|
|
|
|
|
isunique = input("Is unique? true/false: ")
|
|
|
|
|
|
a = loadFileConnLNBits(['admin_key'])
|
|
|
|
|
|
b = str(a['admin_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b, "Content-type": "application/json"}
|
|
|
|
|
|
payload = {"title": title, "min_withdrawable": int(minwith), "max_withdrawable": int(maxwith), "uses": int(usesw), "wait_time": int(waittime), "is_unique": isunique == "true"}
|
|
|
|
|
|
sh = requests.post("https://legend.lnbits.com/withdraw/api/v1/links", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
print("\n\tLNURLW CREATED SUCCESSFULLY\n")
|
|
|
|
|
|
t.sleep(2)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
while True:
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b}
|
|
|
|
|
|
sh = requests.get("https://legend.lnbits.com/withdraw/api/v1/links", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
print("\n\tLNBITS LNURLW LIST\n")
|
|
|
|
|
|
for item_ in d:
|
|
|
|
|
|
s = item_
|
|
|
|
|
|
print(f'ID: {s["id"]} Uses: ' + str(s['uses']) + " Used: " + str(s['used']))
|
|
|
|
|
|
nd = input("\nSelect ID: ")
|
|
|
|
|
|
for item in d:
|
|
|
|
|
|
s = item
|
|
|
|
|
|
nn = s['id']
|
|
|
|
|
|
if nd == nn:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tLNBITS LNURLW DECODED
|
|
|
|
|
|
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
LNURL: {}
|
|
|
|
|
|
Wait Time: {}
|
|
|
|
|
|
Uses: {}
|
|
|
|
|
|
Used: {}
|
|
|
|
|
|
Minimum Withdraw: {}
|
|
|
|
|
|
Maximum Withdraw: {}
|
|
|
|
|
|
""".format(s['id'], s['lnurl'], s['wait_time'], s['uses'], s['used'], s['min_withdrawable'], s['max_withdrawable']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
input("Continue...")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
def lnbitsLNURLwList():
|
|
|
|
|
|
try:
|
|
|
|
|
|
while True:
|
|
|
|
|
|
a = loadFileConnLNBits(['admin_key'])
|
|
|
|
|
|
b = str(a['admin_key'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"X-Api-Key": b}
|
|
|
|
|
|
sh = requests.get("https://legend.lnbits.com/withdraw/api/v1/links", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
print("\n\tLNBITS LNURLW LIST\n")
|
|
|
|
|
|
for item_ in d:
|
|
|
|
|
|
s = item_
|
|
|
|
|
|
print(f'ID: {s["id"]} Uses: ' + str(s['uses']) + " Used: " + str(s['used']))
|
|
|
|
|
|
nd = input("\nSelect ID: ")
|
|
|
|
|
|
for item in d:
|
|
|
|
|
|
s = item
|
|
|
|
|
|
nn = s['id']
|
|
|
|
|
|
if nd == nn:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tLNBITS LNURLW DECODED
|
|
|
|
|
|
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
LNURL: {}
|
|
|
|
|
|
Wait Time: {}
|
|
|
|
|
|
Uses: {}
|
|
|
|
|
|
Used: {}
|
|
|
|
|
|
Minimum Withdraw: {}
|
|
|
|
|
|
Maximum Withdraw: {}
|
|
|
|
|
|
""".format(s['id'], s['lnurl'], s['wait_time'], s['uses'], s['used'], s['min_withdrawable'], s['max_withdrawable']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
input("Continue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
print("\n")
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------1d646820055e4e2da218e801eaacfc94----END LNBITS--------------------------------
|
|
|
|
|
|
#-----------------------------LNPAY--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def loadFileConnLNPay(lnpayLoad):
|
|
|
|
|
|
lnpayLoad = {"key":""}
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.isfile('lnpay.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("lnpay.conf", "r") as f:
|
|
|
|
|
|
lnpayData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lnpayLoad = lnpayData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO LNPAY.CO.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mlnpaySN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
lnpayLoad["key"] = input("API Key: ")
|
|
|
|
|
|
print("\n\tWALLET ACCESS KEYS\n")
|
|
|
|
|
|
lnpayLoad["wallet_key_id"] = input("Wallet Admin: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("lnpay.conf", "w") as f:
|
|
|
|
|
|
json.dump(lnpayLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
return lnpayLoad
|
|
|
|
|
|
|
|
|
|
|
|
def createFileConnLNPay():
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO LNPAY.CO.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mlnpaySN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
lnpayLoad["key"] = input("API Key: ")
|
|
|
|
|
|
print("\n\tWALLET ACCESS KEYS\n")
|
|
|
|
|
|
lnpayLoad["wallet_key_id"] = input("Wallet Admin: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("lnpay.conf", "w") as f:
|
|
|
|
|
|
json.dump(lnpayLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END LNPAY--------------------------------
|
|
|
|
|
|
#-----------------------------OPENNODE--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def loadFileConnOpenNode(opennodeLoad):
|
|
|
|
|
|
opennodeLoad = {"key":"","wdr":"","inv":""}
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.isfile('opennode.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("opennode.conf", "r") as f:
|
|
|
|
|
|
opennodeData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
opennodeLoad = opennodeData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO OPENNODE.COM.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mopennodeSN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
opennodeLoad["key"] = input("API Read Only Key: ")
|
|
|
|
|
|
opennodeLoad["wdr"] = input("API Withdrawall Key: ")
|
|
|
|
|
|
opennodeLoad["inv"] = input("API Invoices Key: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("opennode.conf", "w") as f:
|
|
|
|
|
|
json.dump(opennodeLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
return opennodeLoad
|
|
|
|
|
|
|
|
|
|
|
|
def createFileConnOpenNode():
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO OPENNODE.COM.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mopennodeSN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
opennodeLoad = {'wdr': '', 'inv': '', 'key': input("API Read Only Key: ")}
|
|
|
|
|
|
opennodeLoad["wdr"] = input("API Withdrawall Key: ")
|
|
|
|
|
|
opennodeLoad["inv"] = input("API Invoices Key: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("opennode.conf", "w") as f:
|
|
|
|
|
|
json.dump(opennodeLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
def OpenNodelistfunds():
|
|
|
|
|
|
a = loadFileConnOpenNode(['wdr'])
|
|
|
|
|
|
b = str(a['wdr'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Content-Type": "application/json", "Authorization": b}
|
|
|
|
|
|
sh = requests.get("https://api.opennode.co/v1/account/balance", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
r = d['data']
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
p = r['balance']
|
|
|
|
|
|
print("""
|
|
|
|
|
|
OPENNODE BALANCE
|
|
|
|
|
|
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
""".format(p['BTC']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
input("Continue...")
|
|
|
|
|
|
|
|
|
|
|
|
def OpenNodeCheckStatus():
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
sh = requests.get("https://status.opennode.com/history.rss").text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
my_dict=xmltodict.parse(sh)
|
|
|
|
|
|
n=json.dumps(my_dict)
|
|
|
|
|
|
nn = str(n)
|
|
|
|
|
|
qq = json.loads(n)
|
|
|
|
|
|
a = qq['rss']
|
|
|
|
|
|
b = a['channel']
|
|
|
|
|
|
c = b['title']
|
|
|
|
|
|
d = b['item']
|
|
|
|
|
|
dd = d[0]
|
|
|
|
|
|
e = dd['title']
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\n----------------------------------------------------------------------------------------------------
|
|
|
|
|
|
\n\t{}
|
|
|
|
|
|
|
|
|
|
|
|
{}\n
|
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
\n----------------------------------------------------------------------------------------------------
|
|
|
|
|
|
""".format(c.upper(),e,b['pubDate']))
|
|
|
|
|
|
input("Enter to Continue...")
|
|
|
|
|
|
|
|
|
|
|
|
def OpenNodecreatecharge():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
a = loadFileConnOpenNode(['key'])
|
|
|
|
|
|
b = str(a['key'])
|
|
|
|
|
|
fiat = input("Are you going to pay in FIAT? Y/n:")
|
|
|
|
|
|
if fiat in ["Y", "y"]:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tFIAT supported on OpenNode:
|
|
|
|
|
|
|
|
|
|
|
|
AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,
|
|
|
|
|
|
BYN,BZD,CAD,CDF,CHF,CLF,CLP,CNH,CNY,COP,CRC,CUC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,
|
|
|
|
|
|
FJD,FKP,GBP,GEL,GGP,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,IMP,INR,IQD,IRR,ISK,
|
|
|
|
|
|
JEP,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,
|
|
|
|
|
|
MMK,MNT,MOP,MRO,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,
|
|
|
|
|
|
PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLL,SOS,SRD,SSP,STD,SVC,SYP,SZL,THB,TJS,
|
|
|
|
|
|
TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XAG,XAU,XCD,XDR,XOF,XPD,
|
|
|
|
|
|
XPF,XPT,YER,ZAR,ZMW,ZWL,USDC.
|
|
|
|
|
|
""")
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
selection = input("Select a FIAT currency: ")
|
|
|
|
|
|
amt = input(f"Amount in {selection}: ")
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Authorization": b, "Content-Type": "application/json"}
|
|
|
|
|
|
payload = {"amount": amt, "currency": selection.upper()}
|
|
|
|
|
|
sh = requests.post("https://api.opennode.co/v1/charges", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
dd = d['data']
|
|
|
|
|
|
qq = dd['lightning_invoice']
|
|
|
|
|
|
pp = dd['address']
|
|
|
|
|
|
nn = qq['payreq']
|
|
|
|
|
|
mm = nn.lower()
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE PAYMENT REQUEST
|
|
|
|
|
|
|
|
|
|
|
|
Amount: {} {}
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
Status: {}
|
|
|
|
|
|
Invoice: {}
|
|
|
|
|
|
Onchain Address: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
""".format(amt, selection.upper(), dd['id'], dd['status'], mm, pp, dd['amount']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
pay = input("Invoice or Onchain Address? I/O: ")
|
|
|
|
|
|
if pay in ["I", "i"]:
|
|
|
|
|
|
node_not = input("Do you want to pay this invoice with your node? Y/n: ")
|
|
|
|
|
|
if node_not in ["Y", "y"]:
|
|
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
if lndconnectload['ip_port']:
|
|
|
|
|
|
print("\nInvoice: " + mm + "\n")
|
|
|
|
|
|
payinvoice()
|
|
|
|
|
|
elif lndconnectload['ln']:
|
|
|
|
|
|
print("\nInvoice: " + mm + "\n")
|
|
|
|
|
|
localpayinvoice()
|
|
|
|
|
|
elif node_not in ["N", "n"]:
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(mm)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
print("\nLightning Invoice: " + mm)
|
|
|
|
|
|
elif pay in ["O", "o"]:
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(pp)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
print("\nAmount in sats: {} sats".format(dd['amount']))
|
|
|
|
|
|
print("\nOnchain Address: " + pp)
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
elif fiat in ["N", "n"]:
|
|
|
|
|
|
amt = input("Amount in sats: ")
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Authorization": b, "Content-Type": "application/json"}
|
|
|
|
|
|
payload = {"amount": amt, "currency": "BTC"}
|
|
|
|
|
|
sh = requests.post("https://api.opennode.co/v1/charges", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
dd = d['data']
|
|
|
|
|
|
qq = dd['lightning_invoice']
|
|
|
|
|
|
nn = qq['payreq']
|
|
|
|
|
|
pp = dd['address']
|
|
|
|
|
|
mm = nn.lower()
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE PAYMENT REQUEST
|
|
|
|
|
|
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
Status: {}
|
|
|
|
|
|
Invoice: {}
|
|
|
|
|
|
Onchain Address: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
""".format(amt, dd['id'], dd['status'], mm, pp, dd['amount']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
pay = input("Invoice or Onchain Address? I/O: ")
|
|
|
|
|
|
if pay in ["I", "i"]:
|
|
|
|
|
|
node_not = input("Do you want to pay this invoice with your node? Y/n: ")
|
|
|
|
|
|
if node_not in ["Y", "y"]:
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
|
|
|
|
|
if lndconnectload['ip_port']:
|
|
|
|
|
|
print("\nInvoice: " + mm + "\n")
|
|
|
|
|
|
payinvoice()
|
|
|
|
|
|
elif lndconnectload['ln']:
|
|
|
|
|
|
print("\nInvoice: " + mm + "\n")
|
|
|
|
|
|
localpayinvoice()
|
|
|
|
|
|
elif node_not in ["N", "n"]:
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(mm)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
print("\nLightning Invoice: " + mm)
|
|
|
|
|
|
elif pay in ["O", "o"]:
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(pp)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
print("\nAmount in sats: {} sats".format(dd['amount']))
|
|
|
|
|
|
print("\nOnchain Address: " + pp)
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
def OpenNodeiniciatewithdrawal():
|
|
|
|
|
|
a = loadFileConnOpenNode(['wdr'])
|
|
|
|
|
|
b = str(a['wdr'])
|
|
|
|
|
|
c = loadFileConnOpenNode(['key'])
|
|
|
|
|
|
d = str(a['key'])
|
|
|
|
|
|
lnchain = input("Are you going to pay with Lightning or Onchain? L/O: ")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
if lnchain in ["L", "l"]:
|
|
|
|
|
|
try:
|
|
|
|
|
|
while True:
|
|
|
|
|
|
invoice = input("\nInvoice: ")
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Authorization": b, "Content-Type": "application/json"}
|
|
|
|
|
|
payload = {"pay_req": invoice}
|
|
|
|
|
|
ssh = requests.post("https://api.opennode.co/v1/charge/decode", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
nn = str(ssh)
|
|
|
|
|
|
dd = json.loads(nn)
|
|
|
|
|
|
print(dd)
|
|
|
|
|
|
if invoice != "":
|
|
|
|
|
|
break
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE TRANSFER REQUEST
|
|
|
|
|
|
|
|
|
|
|
|
Message: {}
|
|
|
|
|
|
""".format(dd['message']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
rr = dd['data']
|
|
|
|
|
|
ss = rr['pay_req']
|
|
|
|
|
|
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE TRANSFER REQUEST
|
|
|
|
|
|
|
|
|
|
|
|
Network: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
Destination: {}
|
|
|
|
|
|
Hash: {}
|
|
|
|
|
|
""".format(ss['network'],ss['amount'],ss['pub_key'],ss['hash']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
print("<<< Cancel Control + C")
|
|
|
|
|
|
input("\nEnter to Continue... ")
|
|
|
|
|
|
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Authorization": b, "Content-Type": "application/json"}
|
|
|
|
|
|
payload = {"type": "ln", "address": invoice, "callback_url": ""}
|
|
|
|
|
|
sh = requests.post("https://api.opennode.co/v2/withdrawals", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
tick()
|
|
|
|
|
|
t.sleep(2)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
elif lnchain in ["O", "o"]:
|
|
|
|
|
|
try:
|
|
|
|
|
|
while True:
|
|
|
|
|
|
print("\n\tOPENNODE TRANSFER REQUEST\n")
|
|
|
|
|
|
print("\n\tMinimum amount 200000 sats\n")
|
|
|
|
|
|
address = input("\nBitcoin Address: ")
|
|
|
|
|
|
amt = int(input("Amount in sats: "))
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Authorization": b, "Content-Type": "application/json"}
|
|
|
|
|
|
payload = {"type": "chain", "amount": amt, "address": address, "callback_url": ""}
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
if amt < 199999:
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
sh = requests.post("https://api.opennode.co/v2/withdrawals", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE TRANSFER REQUEST
|
|
|
|
|
|
|
|
|
|
|
|
Message: {}
|
|
|
|
|
|
""".format(d['message']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
elif amt > 200000:
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
sh = requests.post("https://api.opennode.co/v2/withdrawals", json=payload, headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
dd = d['data']
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE TRANSFER REQUEST
|
|
|
|
|
|
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
Address Destination: {}
|
|
|
|
|
|
Fee: {}
|
|
|
|
|
|
Status: {}
|
|
|
|
|
|
""".format(dd['amount'],dd['address'],dd['fee'], dd['status']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
input("\nContinue... ")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
logoB()
|
|
|
|
|
|
t.sleep(2)
|
|
|
|
|
|
break
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def OpenNodeListPayments():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
a = loadFileConnOpenNode(['wdr'])
|
|
|
|
|
|
b = str(a['wdr'])
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
headers = {"Content-Type": "application/json", "Authorization": b}
|
|
|
|
|
|
sh = requests.get("https://api.opennode.co/v1/withdrawals", headers=headers).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\n\tOPENNODE TRANSACTIONS LIST\n")
|
|
|
|
|
|
n = str(sh)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
da = d['data']
|
|
|
|
|
|
while True:
|
|
|
|
|
|
try:
|
|
|
|
|
|
for item_ in da:
|
|
|
|
|
|
s = item_
|
|
|
|
|
|
n = s['status']
|
|
|
|
|
|
q = str(n)
|
|
|
|
|
|
print(f'ID: {s["id"]} {q}')
|
|
|
|
|
|
nd = input("\nSelect ID: ")
|
|
|
|
|
|
for item in da:
|
|
|
|
|
|
s = item
|
|
|
|
|
|
nn = s['id']
|
|
|
|
|
|
if nd == nn:
|
|
|
|
|
|
print("\n----------------------------------------------------------------------------------------------------")
|
|
|
|
|
|
print("""
|
|
|
|
|
|
\tOPENNODE TRANSACTION DECODED
|
|
|
|
|
|
ID: {}
|
|
|
|
|
|
Amount: {} sats
|
|
|
|
|
|
Type: {}
|
|
|
|
|
|
Invoice or Tx ID: {}
|
|
|
|
|
|
Status: {}
|
|
|
|
|
|
""".format(s['id'], s['amount'], s['type'], s['reference'], s['status']))
|
|
|
|
|
|
print("----------------------------------------------------------------------------------------------------\n")
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(s['reference'])
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("Continue...")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\n\tOPENNODE TRANSACTIONS LIST\n")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END OPENNODE--------------------------------
|
|
|
|
|
|
#-----------------------------TIPPINME--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def loadFileTippinMe(tippinmeLoad):
|
|
|
|
|
|
tippinmeLoad = {"key":""}
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.isfile('tippinme.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("tippinme.conf", "r") as f:
|
|
|
|
|
|
tippinmeData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
tippinmeLoad = tippinmeData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOUR CONFIGURATION INFORMATION WILL BE SAVE IN '\033[1;33;40mtippinme.conf\033[0;37;40m'
|
|
|
|
|
|
IF YOU NEED TO START AGAIN, DELETE IT.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
tippinmeLoad["key"] = input("Twitter @user: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("tippinme.conf", "w") as f:
|
|
|
|
|
|
json.dump(tippinmeLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
return tippinmeLoad
|
|
|
|
|
|
|
|
|
|
|
|
def createFileTippinMe():
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOUR CONFIGURATION INFORMATION WILL BE SAVE IN '\033[1;33;40mtippinme.conf\033[0;37;40m'
|
|
|
|
|
|
IF YOU NEED TO START AGAIN, DELETE IT.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
tippinmeLoad = {'key': input("Twitter @user: ")}
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("tippinme.conf", "w") as f:
|
|
|
|
|
|
json.dump(tippinmeLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
def tippinmeGetInvoice():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
a = loadFileTippinMe(['key'])
|
|
|
|
|
|
b = str(a['key'])
|
|
|
|
|
|
try:
|
|
|
|
|
|
print("\n\tTIPPINME GENERATE INVOICE\n")
|
|
|
|
|
|
q = input("Amount in Sats: ")
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
url = f'https://api.tippin.me/v1/public/addinvoice/{b}/{q}'
|
|
|
|
|
|
response = requests.get(url)
|
|
|
|
|
|
responseB = str(response.text)
|
|
|
|
|
|
responseC = responseB
|
|
|
|
|
|
lnreq = responseC.split(',')
|
|
|
|
|
|
lnurl = lnreq[1]
|
|
|
|
|
|
lnurlS = str(lnurl)
|
|
|
|
|
|
lnurlR = lnurlS.split(':')
|
|
|
|
|
|
lnurlW = lnurlR[1]
|
|
|
|
|
|
ln = str(lnurlW)
|
|
|
|
|
|
ln1 = ln.strip('"')
|
|
|
|
|
|
node_not = input("Do you want to pay this invoice with your node? Y/n: ")
|
|
|
|
|
|
if node_not in ["Y", "y"]:
|
|
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
if lndconnectload['ip_port']:
|
|
|
|
|
|
print("\nInvoice: " + ln1 + "\n")
|
|
|
|
|
|
payinvoice()
|
|
|
|
|
|
elif lndconnectload['ln']:
|
|
|
|
|
|
print("\nInvoice: " + ln1 + "\n")
|
|
|
|
|
|
localpayinvoice()
|
|
|
|
|
|
elif node_not in ["N", "n"]:
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(ln1)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'LND Invoice: {ln1}')
|
|
|
|
|
|
response.close()
|
|
|
|
|
|
input("Continue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END TIPPINME--------------------------------
|
|
|
|
|
|
#-----------------------------TALLYCOIN------------------------------
|
|
|
|
|
|
def loadFileConnTallyCo(tallycoLoad):
|
|
|
|
|
|
tallycoLoad = {"tallyco.conf":"","id":""}
|
|
|
|
|
|
|
|
|
|
|
|
if os.path.isfile('tallyco.conf'): # Check if the file 'bclock.conf' is in the same folder
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("tallyco.conf", "r") as f:
|
|
|
|
|
|
tallyData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
tallycoLoad = tallyData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
else:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO TALLYCO.IN.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mtallycoSN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
print("\nEXAMPLE: https://tallyco.in/s/{fundraiser_id}/\n")
|
|
|
|
|
|
tallycoLoad["id"] = input("User ID or Twitter @USER: ")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("tallyco.conf", "w") as f:
|
|
|
|
|
|
json.dump(tallycoLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
return tallycoLoad
|
|
|
|
|
|
|
|
|
|
|
|
def createFileConnTallyCo():
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""\n\t \033[1;33;40mATENTION\033[0;37;40m: YOU ARE GOING TO CREATE A FILE WITH YOUR INFORMATION OF CONNECTION TO TALLYCO.IN.
|
|
|
|
|
|
WE WILL NEED SOME INFORMATION FROM YOUR ACCOUNT THAT THE ONLY ONE THAT WILL HAVE ACCESS IS YOU.
|
|
|
|
|
|
IF YOU DELETE THIS FILE YOU WILL NEED TO PAY AGAIN TO GET ACCESS FROM PyBLOCK.
|
|
|
|
|
|
SAVE THE FILE '\033[1;33;40mtallycoSN.conf\033[0;37;40m' IN A SAFE PLACE.\n
|
|
|
|
|
|
""")
|
|
|
|
|
|
print("\nEXAMPLE: https://tallyco.in/s/{fundraiser_id}/\n")
|
|
|
|
|
|
tallycoLoad = {'fundraiser_id': '', 'id': input("User ID or Twitter @USER: ")}
|
2026-04-01 10:24:47 -03:00
|
|
|
|
with open("tallyco.conf", "w") as f:
|
|
|
|
|
|
json.dump(tallycoLoad, f)
|
2023-05-25 22:40:32 +02:00
|
|
|
|
|
|
|
|
|
|
def tallycoGetPayment():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
c = loadFileConnTallyCo(['id'])
|
|
|
|
|
|
d = str(c['id'])
|
|
|
|
|
|
try:
|
|
|
|
|
|
amount = input("Amount in Sats: ")
|
|
|
|
|
|
print("""\nPayment Method Example: 'ln' or 'btc'
|
|
|
|
|
|
'ln' = Lightnin Netowrk
|
|
|
|
|
|
'btc'= Bitcoin Onchain Payment
|
|
|
|
|
|
\n""")
|
|
|
|
|
|
lnd_onchain = input("Payment Method: ")
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
payload = {"type": "profile", "id": d, "satoshi_amount": amount, "payment_method": lnd_onchain}
|
|
|
|
|
|
tallycomethod = requests.post("https://api.tallyco.in/v1/payment/request/", data=payload).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
n = str(tallycomethod)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
if lnd_onchain == "ln":
|
|
|
|
|
|
e = d['lightning_pay_request']
|
|
|
|
|
|
f = e.lower()
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(f)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'LND Invoice: {f}')
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
elif lnd_onchain == "btc":
|
|
|
|
|
|
e = d['btc_address']
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(e)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'Amount: {d["cost"]}')
|
|
|
|
|
|
print(f'Bitcoin Address: {e}')
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def tallycoDonateid():
|
|
|
|
|
|
qr = qrcode.QRCode(
|
|
|
|
|
|
version=1,
|
|
|
|
|
|
error_correction=qrcode.constants.ERROR_CORRECT_L,
|
|
|
|
|
|
box_size=10,
|
|
|
|
|
|
border=4,
|
|
|
|
|
|
)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
try:
|
|
|
|
|
|
donate = input("Donate to ID: ")
|
|
|
|
|
|
amount = input("Amount in Sats: ")
|
|
|
|
|
|
print("""\nPayment Method Example: 'ln' or 'btc'
|
|
|
|
|
|
'ln' = Lightnin Netowrk
|
|
|
|
|
|
'btc'= Bitcoin Onchain Payment
|
|
|
|
|
|
\n""")
|
|
|
|
|
|
lnd_onchain = input("Payment Method: ")
|
Convert LNBits, OpenNode, and TallyCoin curl calls to requests library
Replace 23 subprocess curl API calls with native Python requests:
- LNBits: create/check invoice, pay invoice, paywall CRUD, LNURL withdraw
- OpenNode: create charge, list funds, list payments, initiate withdrawal,
check status (RSS), decode invoice
- TallyCoin: payment requests (2 functions)
Remaining shell=True in ppi.py are pipe chains (curl|grep|html2text)
that require shell for processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:27:41 -03:00
|
|
|
|
payload = {"type": "profile", "id": donate, "satoshi_amount": amount, "payment_method": lnd_onchain}
|
|
|
|
|
|
tallycomethod = requests.post("https://api.tallyco.in/v1/payment/request/", data=payload).text
|
2023-05-25 22:40:32 +02:00
|
|
|
|
n = str(tallycomethod)
|
|
|
|
|
|
d = json.loads(n)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
if lnd_onchain in ["ln", "lN", "Ln", "LN"]:
|
|
|
|
|
|
node_not = input("Do you want to pay this tip with your node? Y/n: ")
|
|
|
|
|
|
if node_not in ["Y", "y"]:
|
|
|
|
|
|
lndconnectload = {"ip_port":"", "tls":"", "macaroon":"", "ln":""}
|
2026-04-01 11:52:26 -03:00
|
|
|
|
with open("blndconnect.conf", "r") as f:
|
|
|
|
|
|
lndconnectData = json.load(f) # Load the file 'bclock.conf'
|
|
|
|
|
|
lndconnectload = lndconnectData # Copy the variable pathv to 'path'
|
2023-05-25 22:40:32 +02:00
|
|
|
|
if lndconnectload['ip_port']:
|
|
|
|
|
|
e = d['lightning_pay_request']
|
|
|
|
|
|
f = e.lower()
|
|
|
|
|
|
print("\nInvoice: " + f + "\n")
|
|
|
|
|
|
payinvoice()
|
|
|
|
|
|
elif lndconnectload['ln']:
|
|
|
|
|
|
e = d['lightning_pay_request']
|
|
|
|
|
|
f = e.lower()
|
|
|
|
|
|
print("\nInvoice: " + f + "\n")
|
|
|
|
|
|
localpayinvoice()
|
|
|
|
|
|
elif node_not in ["N", "n"]:
|
|
|
|
|
|
e = d['lightning_pay_request']
|
|
|
|
|
|
f = e.lower()
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(f)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'LND Invoice: {f}')
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("\nContinue...")
|
|
|
|
|
|
elif lnd_onchain in ["btc", "bTC", "BtC", "BTC", "BTc", "btC"]:
|
|
|
|
|
|
e = d['btc_address']
|
|
|
|
|
|
print("\033[1;30;47m")
|
|
|
|
|
|
qr.add_data(e)
|
|
|
|
|
|
qr.print_ascii()
|
|
|
|
|
|
print("\033[0;37;40m")
|
|
|
|
|
|
print(f'Amount: {d["cost"]}')
|
|
|
|
|
|
print(f'Bitcoin Address: {e}')
|
|
|
|
|
|
qr.clear()
|
|
|
|
|
|
input("\nContinue...")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END TALLYCOIN------------------------------
|
|
|
|
|
|
#-----------------------------MEMPOOL.SPACE------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
def fee():
|
|
|
|
|
|
try:
|
|
|
|
|
|
while True:
|
|
|
|
|
|
r = requests.get('https://mempool.space/api/v1/fees/recommended')
|
|
|
|
|
|
r.headers['Content-Type']
|
|
|
|
|
|
n = r.text
|
|
|
|
|
|
di = json.loads(n)
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""
|
|
|
|
|
|
------------------------
|
|
|
|
|
|
Fastest Fee: {}
|
|
|
|
|
|
Half Hour Fee: {}
|
|
|
|
|
|
Hour Fee: {}
|
|
|
|
|
|
------------------------
|
|
|
|
|
|
<<< Back Control + C
|
|
|
|
|
|
""".format(di['fastestFee'], di['halfHourFee'], di['hourFee']))
|
|
|
|
|
|
t.sleep(5)
|
|
|
|
|
|
print("\n\t Getting New Information")
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def blocks():
|
|
|
|
|
|
try:
|
|
|
|
|
|
while True:
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("\n\t Getting New Information")
|
|
|
|
|
|
r = requests.get('https://mempool.space/api/v1/fees/mempool-blocks')
|
|
|
|
|
|
r.headers['Content-Type']
|
|
|
|
|
|
n = r.text
|
|
|
|
|
|
di = json.loads(n)
|
|
|
|
|
|
for n in range(len(di)):
|
|
|
|
|
|
q = di[n]
|
|
|
|
|
|
clear()
|
|
|
|
|
|
blogo()
|
|
|
|
|
|
print("""
|
|
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
BLOCK
|
|
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
Block Size: {} bytes
|
|
|
|
|
|
Block VSize: {} bytes
|
|
|
|
|
|
Transactions: {}
|
|
|
|
|
|
Total Fees: {}
|
|
|
|
|
|
Median Fee: {}
|
|
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
<<< Back Control + C
|
|
|
|
|
|
""".format(q['blockSize'], q['blockVSize'], q['nTx'], q['totalFees'], q['medianFee']))
|
|
|
|
|
|
t.sleep(3)
|
2026-04-01 10:24:47 -03:00
|
|
|
|
except Exception:
|
2023-05-25 22:40:32 +02:00
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#-----------------------------END MEMPOOL.SPACE------------------------------
|