Compare commits

...

2 Commits

Author SHA1 Message Date
Michał Sałaban 14c96dfb7f Remove tools for integrated addresses, as they are obsolete
3 years ago
Michał Sałaban 8be7dc6f05 Reformat to match growing difficulty
3 years ago

@ -32,10 +32,10 @@ def get_daemon():
d = get_daemon() d = get_daemon()
info = d.info() info = d.info()
print("Net: {net:>15s}net\n" print("Net: {net:>20s}net\n"
"Height: {height:10d}\n" "Height: {height:15d}\n"
"Difficulty: {difficulty:10d}\n" "Difficulty: {difficulty:15d}\n"
"Alt blocks: {alt_blocks_count:10d}\n".format( "Alt blocks: {alt_blocks_count:15d}\n".format(
net='test' if info['testnet'] \ net='test' if info['testnet'] \
else 'stage' if info['stagenet'] \ else 'stage' if info['stagenet'] \
else 'main' if info['mainnet'] else 'unknown', else 'main' if info['mainnet'] else 'unknown',

@ -1,15 +0,0 @@
#!/usr/bin/python
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))

@ -1,15 +1,13 @@
#!/usr/bin/python #!/usr/bin/python
import argparse import argparse
from decimal import Decimal
import operator import operator
import logging import logging
import os import os
import random
import re import re
import monero import monero
from monero.address import address from monero.address import address
from monero.numbers import PaymentID, as_monero from monero.numbers import as_monero
from monero.wallet import Wallet from monero.wallet import Wallet
from monero.backends.jsonrpc import JSONRPCWallet from monero.backends.jsonrpc import JSONRPCWallet
@ -33,9 +31,6 @@ argsparser.add_argument('-a', dest='account', default=0, type=int, help="Source
argsparser.add_argument('-p', dest='prio', argsparser.add_argument('-p', dest='prio',
choices=['unimportant', 'normal', 'elevated', 'priority'], choices=['unimportant', 'normal', 'elevated', 'priority'],
default='normal') default='normal')
argsparser.add_argument('-i', dest='payment_id', nargs='?', type=PaymentID,
const=PaymentID(random.randint(0, 2**256)),
help="Payment ID")
argsparser.add_argument('--save', dest='outdir', nargs='?', default=None, const='.', argsparser.add_argument('--save', dest='outdir', nargs='?', default=None, const='.',
help="Save to file, optionally follow by destination directory (default is .)\n" help="Save to file, optionally follow by destination directory (default is .)\n"
"Transaction will be not relayed to the network.") "Transaction will be not relayed to the network.")
@ -53,7 +48,7 @@ logging.basicConfig(level=level, format="%(asctime)-15s %(message)s")
w = Wallet(JSONRPCWallet(timeout=args.timeout, **args.wallet_rpc_url)) w = Wallet(JSONRPCWallet(timeout=args.timeout, **args.wallet_rpc_url))
txns = w.accounts[args.account].transfer_multiple( txns = w.accounts[args.account].transfer_multiple(
args.destinations, priority=prio, payment_id=args.payment_id, args.destinations, priority=prio,
relay=args.outdir is None) relay=args.outdir is None)
for tx in txns: for tx in txns:
print(u"Transaction {hash}:\nfee: {fee:21.12f}\n" print(u"Transaction {hash}:\nfee: {fee:21.12f}\n"

Loading…
Cancel
Save