Reverting unicode characters
This commit is contained in:
parent
1130572738
commit
fc66596db0
@ -2,7 +2,7 @@
|
||||
|
||||
A simple program to create test PSBT files, that are plausible and
|
||||
self-consistent so that PSBT-signing tools will actually sign them.
|
||||
Does not involve any blockchains… completely made up inputs and
|
||||
Does not involve any blockchains... completely made up inputs and
|
||||
output addresses are chosen at random.
|
||||
|
||||
You should use the XPUB of the Coldcard you want experiment against.
|
||||
@ -35,7 +35,7 @@ Options:
|
||||
-c, --num-change INTEGER Number of change outputs (default 1)
|
||||
-v, --value INTEGER Total BTC value of inputs (integer, default
|
||||
3)
|
||||
-f, --fee INTEGER Miner’s fee in Satoshis
|
||||
-f, --fee INTEGER Miner's fee in Satoshis
|
||||
-s, --segwit Make ins/outs be segwit style
|
||||
-a, --styles [p2wpkh|p2wsh|p2sh|p2pkh|p2wsh-p2sh|p2wpkh-p2sh|p2tr]
|
||||
Output address style (multiple ok)
|
||||
|
||||
@ -47,8 +47,8 @@ def str2ipath(s):
|
||||
yield here
|
||||
|
||||
def xfp2str(xfp):
|
||||
# Standardized way to show an xpub’s fingerprint... it’s a 4-byte string
|
||||
# and not really an integer. Used to show as '0x%08x' but that’s wrong endian.
|
||||
# Standardized way to show an xpub's fingerprint... it's a 4-byte string
|
||||
# and not really an integer. Used to show as '0x%08x' but that's wrong endian.
|
||||
return b2a_hex(struct.pack('>I', xfp)).upper()
|
||||
|
||||
def str2path(xfp, s):
|
||||
@ -62,7 +62,7 @@ def str2path(xfp, s):
|
||||
@click.option('--num-outs', '-n', help="Number of outputs (default 1)", default=1)
|
||||
@click.option('--num-change', '-c', help="Number of change outputs (default 1)", default=1)
|
||||
@click.option('--value', '-v', help="Total BTC value of inputs (integer, default 3)", default=3)
|
||||
@click.option('--fee', '-f', help="Miner’s fee in Satoshis", default=1000)
|
||||
@click.option('--fee', '-f', help="Miner's fee in Satoshis", default=1000)
|
||||
@click.option('--segwit', '-s', help="Make ins/outs be segwit style", is_flag=True, default=False)
|
||||
@click.option('--styles', '-a', help="Output address style (multiple ok)", multiple=True, default=None, type=click.Choice(ADDR_STYLES))
|
||||
@click.option('--base64', '-6', help="Output base64 (default binary)", is_flag=True, default=False)
|
||||
|
||||
@ -20,7 +20,7 @@ def prandom(count):
|
||||
return bytes(random.randint(0, 255) for i in range(count))
|
||||
|
||||
def fake_dest_addr(style='p2pkh'):
|
||||
# Make a plausible output address, but it’s random garbage. Cant use for change outs
|
||||
# Make a plausible output address, but it's random garbage. Cant use for change outs
|
||||
|
||||
# See CTxOut.get_address() in ../shared/serializations
|
||||
|
||||
@ -78,8 +78,8 @@ def fake_txn(num_ins, num_outs, master_xpub=None, subpath="0/%d", fee=10000,
|
||||
change_style='p2pkh', partial=False,
|
||||
change_outputs=[]):
|
||||
|
||||
# make various size txn’s ... completely fake and pointless values
|
||||
# - but has UTXO’s to match needs
|
||||
# make various size txn's ... completely fake and pointless values
|
||||
# - but has UTXO's to match needs
|
||||
# - input total = num_inputs * 1BTC
|
||||
from pycoin.tx.Tx import Tx
|
||||
from pycoin.tx.TxIn import TxIn
|
||||
|
||||
Loading…
Reference in New Issue
Block a user