mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
There are several instances in functional tests and the framework
(MiniWallet, feature_block.py, p2p_segwit.py) where we create a legacy
ECDSA signature for a certain transaction's input by doing the following
steps:
1) calculate the `LegacySignatureHash` with the desired sighash type
2) create the actual digital signature by calling `ECKey.sign_ecdsa`
on the signature message hash calculated above
3) put the DER-encoded result as CScript data push into
tx input's scriptSig
Create a new helper `sign_input_legacy` which hides those details and
takes only the necessary parameters (tx, input index, relevant
scriptPubKey, private key, sighash type [SIGHASH_ALL by default]). For
further convenience, the signature is prepended to already existing
data-pushes in scriptSig, in order to avoid rehashing the transaction
after calling the new signing function.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| address.py | ||
| authproxy.py | ||
| bdb.py | ||
| bip340_test_vectors.csv | ||
| blockfilter.py | ||
| blocktools.py | ||
| coverage.py | ||
| descriptors.py | ||
| ellswift.py | ||
| ellswift_decode_test_vectors.csv | ||
| key.py | ||
| messages.py | ||
| muhash.py | ||
| netutil.py | ||
| p2p.py | ||
| psbt.py | ||
| ripemd160.py | ||
| script.py | ||
| script_util.py | ||
| secp256k1.py | ||
| segwit_addr.py | ||
| siphash.py | ||
| socks5.py | ||
| test_framework.py | ||
| test_node.py | ||
| test_shell.py | ||
| util.py | ||
| wallet.py | ||
| wallet_util.py | ||
| xswiftec_inv_test_vectors.csv | ||