Skip to content

Commit d4cc3c6

Browse files
committed
added test examples for pay lnurl and paylnaddress in test_userwallet.py
1 parent 7d9e9e9 commit d4cc3c6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_userwallet.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ async def main():
4343
res = await uw.pay_invoice(True, bolt)
4444
print(res)
4545

46+
# pay lnurl
47+
# This is a fictional LNURL for example purposes. Replace with your own.
48+
paylnurl = "LNURL1DP68GURN8GHJ7MRWW4EXCTNZD3SHXCTE0D3SKUM0W4KHU7DF89KHK7YM89KCMRDV0658QSTVV4RY"
49+
# pay_lnurl(lnurl, amount, comment, description)
50+
res = await uw.pay_lnurl(paylnurl, 10, "hello", "hello")
51+
print(res)
52+
53+
# pay lnaddress
54+
# This is a fictional lightning address for example purposes. Replace with your own.
55+
lnaddress = "[email protected]"
56+
# pay_lnaddress(lnurl, amount, comment, description)
57+
res = await uw.pay_lnaddress(lnaddress, 10, "sunshine", "hello")
58+
print(res)
59+
4660

4761
loop = asyncio.get_event_loop()
4862
loop.run_until_complete(main())

0 commit comments

Comments
 (0)