wownero-python/utils/integraddr.py

16 lines
332 B
Python
Raw Normal View History

#!/usr/bin/python
2018-01-11 02:14:45 +00:00
import sys
from monero.address import address
from monero.numbers import PaymentID
USAGE = "{0} <address> <payment_id>"
try:
addr = address(sys.argv[1])
pid = PaymentID(sys.argv[2])
except IndexError:
print(USAGE.format(*sys.argv), file=sys.stderr)
sys.exit(-1)
print(addr.with_payment_id(pid))