New answers tagged

0

It looks like doing such a conversion is not well supported, nor is instantiating a private key as uncompressed unless you do so with a WIF key. However, you can change the compressed-ness by doing: key._public_key = key._pk.public_key.format(compressed=False) But this requires you do to this immediately after instantiation as otherwise precomputed ...


0

You need to send a version message (and receiving the correspondant verack) before sending anything else. Here is a quickly patched version of your script which handles the version message: import hashlib import random import socket import time import urllib.request PEER_IP = "127.0.0.1" PEER_PORT = 8333 nonce = (random.getrandbits(64)).to_bytes(8, ...


Top 50 recent answers are included