rebuild so each dvm runs on its own.

This commit is contained in:
Believethehype
2023-11-20 22:09:38 +01:00
parent 5a3f5606df
commit 13bffaea96
13 changed files with 547 additions and 482 deletions

View File

@@ -33,6 +33,7 @@ def parse_bolt11_invoice(invoice):
return int(number)
def create_bolt11_ln_bits(sats, config):
url = config.LNBITS_URL + "/api/v1/payments"
data = {'out': False, 'amount': sats, 'memo': "Nostr-DVM"}
@@ -45,6 +46,7 @@ def create_bolt11_ln_bits(sats, config):
print(e)
return None
def check_bolt11_ln_bits_is_paid(payment_hash, config):
url = config.LNBITS_URL + "/api/v1/payments/" + payment_hash
headers = {'X-API-Key': config.LNBITS_INVOICE_KEY, 'Content-Type': 'application/json', 'charset': 'UTF-8'}
@@ -92,4 +94,3 @@ def decrypt_private_zap_message(msg, privkey, pubkey):
return decoded
except Exception as ex:
return str(ex)