You do not use the single key pair data to create an extended public key. The single address you generated with the API is not relevant in this situation. The HD Wallet Endpoint is a feature where you can provide your own extended public key from an external wallet (not blockcyphers).
Related question/answer on extended public keys: How to generate a new ...
I have written a program in Python3 that allows you to search for any address on bitcoin core whether it belongs to your wallet or not.
Here is the github link:
Let me know what you think or if you have any improvements you might have.
P2SH Bitcoin addresses are just Base58Check encoded script hashes. A P2SH transaction output will mention this same script hash. So if we're just interested in the balance of the P2SH address, we just Base58Check decode the P2SH Bitcoin address to the script hash it encodes, and look for UTXOs that have that same script hash.
You don't need the script or any ...
Yes, finding bugs in Bitcoin would be valuable. However this doesn't seem to be one.
What's shown here is a series of supposed "signatures". However, a cryptographic signature is only meaningful in the context of the message it signs. To verify a signature, you need three inputs: 1) the message, 2) the signature, 3) the public key. Generating a &...
Instead of compressing 'by hand' you can have OpenSSL do it:
openssl ec -in privatekey.pem -pubout -conv_form compressed -outform der | tail -c 33 | xxd -p -c 33 >compressedpub.hex
And .pem is usually used to mean PEM format, while the files you are creating are totally not at all or in any way PEM format, so that's very misleading and confusing. I used ....
Here is a snippet code that demonstrate how one can create a Bitcoin address from scriptPubKey:
script_pub_key_hex = "410400d0ade32217e076945e0946ef7bed72d9aea035aa8891e4bf0749ae6e24f8a7d3ea56efafe472ac3943dbed3af7c093729720ac9ab04e8eba09286e3a00fe41ac"
# generate public key hash from scriptPubKey hex
The following regex should work for validating that a string starts with one of xpub, ypub, Ypub, zpub, Zpub, tpub, upub, Upub, vpub or Vpub and is followed by 79-108 characters that are one of 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz (the Base58 alphabet) which is as close as you can get to validating BIP32 keys with regex:
P2PK scripts have the form PUSH <KEY> OP_CHECKSIG.
Means push 0x41 (65) bytes. This is followed by the public key (starting with 04 incidicating it is an uncompressed public key). Finally, 0xac is ...
Observe that the type of the output is:
Pay-to-Public-Key (P2PK) outputs do not have addresses. They pay directly to a public key rather than the hash of the public key, as the name suggests. Bitcoin addresses encode public key hashes, for example, addresses starting with a 1 are known as Pay-to-Public-Key-Hash (P2PKH) ...