This repository has been archived on 2020-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
py-gva/pay.py

22 lines
423 B
Python
Raw Normal View History

2020-11-13 20:18:16 +01:00
#!/usr/bin/env python3
import sys
2020-11-17 06:09:06 +01:00
from libs.paylib import Transaction
2020-11-15 09:12:37 +01:00
# Get args
2020-11-14 18:47:42 +01:00
try:
2020-11-15 09:12:37 +01:00
recipient = sys.argv[1]
amount = int(sys.argv[2])
if len(sys.argv) > 3:
comment = sys.argv[3]
2020-11-17 06:06:45 +01:00
else:
comment = ""
except Exception as e:
2020-11-17 03:39:13 +01:00
print("Please enter the recipient's public and the amount\n" + str(e))
sys.exit(1)
2020-11-15 09:12:37 +01:00
2020-11-17 06:06:45 +01:00
# Create transaction and send it
trans = Transaction(recipient, amount, comment)
trans.send()
2020-11-13 20:18:16 +01:00