1
0

follow-up moving some funcs from ecc.py to bitcoin.py

follow-up 2f3d89f415
This commit is contained in:
SomberNight
2024-09-03 16:58:41 +00:00
parent fcb4d06421
commit a674a22155
3 changed files with 8 additions and 8 deletions

View File

@@ -845,7 +845,6 @@ def control_block_for_taproot_script_spend(
# user message signing
def usermessage_magic(message: bytes) -> bytes:
from .bitcoin import var_int
length = var_int(len(message))
return b"\x18Bitcoin Signed Message:\n" + length + message
@@ -855,7 +854,6 @@ def ecdsa_sign_usermessage(ec_privkey, message: Union[bytes, str], *, is_compres
return ec_privkey.ecdsa_sign_recoverable(msg32, is_compressed=is_compressed)
def verify_usermessage_with_address(address: str, sig65: bytes, message: bytes, *, net=None) -> bool:
from .bitcoin import pubkey_to_address
from .ecc import ECPubkey
assert_bytes(sig65, message)
if net is None: net = constants.net