|
February 05, 2014, 11:15:39 PM |
|
Is there a way to check what is the version byte of the address associated with the public key current on the stack?
The idea is this: During the execution of OP_CHECKSIG, I want to check if the version byte of the address associated with the public key current on the stack is, let's say 0xCB, and if it is, I want to do some pre-processing on the public key before proceeding with the validation.
Because the way I see it, during OP_CHECKSIG I'll have access (normally) to the public key and a signature. But only from the public key I can't construct the address, I can only construct the HASH160 (which is lacking the checksum and the first version byte). Of course I could only append this two, but I can't do that because I don't know the version byte beforehand, I can only know the version byte by looking at the address.
I hope I made it clear...
Anyone has an insight on this?
Cheers,
|