Fix for NIP88 Subscriptions, add non-follower content discovery

This commit is contained in:
Believethehype
2024-07-11 10:10:42 +02:00
parent dc52ef27d0
commit 56bd4d4f76
11 changed files with 542 additions and 59 deletions

View File

@@ -1,3 +1,4 @@
import asyncio
import os
from pathlib import Path
@@ -9,13 +10,13 @@ from nostr_dvm.utils.nwc_tools import nwc_zap
from nostr_dvm.utils.zap_utils import create_bolt11_lud16, zaprequest
def playground():
async def playground():
connectionstr = os.getenv("TEST_NWC")
keys = Keys.parse(os.getenv("TEST_USER"))
bolt11 = zaprequest("bot@nostrdvm.com", 5, "test", None, PublicKey.parse("npub1cc79kn3phxc7c6mn45zynf4gtz0khkz59j4anew7dtj8fv50aqrqlth2hf"), keys, dvmconfig.DVMConfig.RELAY_LIST, zaptype="private")
print(bolt11)
result = nwc_zap(connectionstr, bolt11, keys, externalrelay=None)
result = await nwc_zap(connectionstr, bolt11, keys, externalrelay=None)
print(result)
@@ -30,4 +31,4 @@ if __name__ == '__main__':
dotenv.load_dotenv(env_path, verbose=True, override=True)
else:
raise FileNotFoundError(f'.env file not found at {env_path} ')
playground()
asyncio.run(playground())