-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer V2 #2873
Composer V2 #2873
Conversation
utxos = inputs_set.split(",") | ||
utxos = [utxo.split(":")[0] for utxo in utxos] | ||
for tx_hash in utxos: | ||
def search_pubkey_in_transactions(pubkeyhash, tx_hashes): |
Check warning
Code scanning / pylint
Too many branches (16/12). Warning
utxos = [utxo.split(":")[0] for utxo in utxos] | ||
for tx_hash in utxos: | ||
def search_pubkey_in_transactions(pubkeyhash, tx_hashes): | ||
for tx_hash in tx_hashes: |
Check warning
Code scanning / pylint
Too many nested blocks (6/5). Warning
utxos = [utxo.split(":")[0] for utxo in utxos] | ||
for tx_hash in utxos: | ||
def search_pubkey_in_transactions(pubkeyhash, tx_hashes): | ||
for tx_hash in tx_hashes: |
Check warning
Code scanning / pylint
Too many nested blocks (6/5). Warning
@@ -58,3 +60,45 @@ | |||
unspent["address"] = address | |||
unspents += address_unspents | |||
return unspents | |||
|
|||
|
|||
def pubkey_from_tx(tx, pubkeyhash): |
Check warning
Code scanning / pylint
Too many branches (15/12). Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful! super clean!
@@ -0,0 +1,179 @@ | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think we're going to be removing P2SH encoding soon-ish (once we add support for encoding in witness data). In the meantime, we can re-enable this? Will reduce fees for some users.
transaction.py
andtransaction_helper/*
withcomposer.py
bitcoin-utils
library to generate transactionschange_address
: allows defining the change addressmore_outputs
: allows adding an arbitrary number of outputs in the form<value>:<address>
or<value>:<script_pubkey>
use_all_inputs_set
: forces the use of all UTXOs provided withinputs_set
sat_per_vbyte
: allows defining transaction feesmax_fee
: defines the maximum fees to be paidverbose
: includes transaction details, notablydata
andpsbt
multisig_pubkey
: public key allowing the redemption of multisig data outputsfee_per_kb
,fee_provided
,dust_return_pubkey
,return_psbt
,regular_dust_size
,multisig_dust_size
,extended_tx_info
,old_style_api
,p2sh_pretx_txid
,segwit
,unspent_tx_hash
script_pubkey
(lock script) where thescript_sig
(unlock script) should be.verbose=true
, the composer also returns alock_scripts
field that contains thescript_pubkey
of the UTXOs used by the transaction.invalid UTXOs: <utxo(s)> (<reason>)