|
May 19, 2017, 12:38:14 AM |
|
I would like some of the more experienced developers to respond to this especially if you are a good Python dev.
So since all my accounts on BitHalo and BitBay are multisig there is a strange dilemma now that I am adding FULL checklocktimeverify support in the UI with friend ways of describing and interacting with these scripts.
All seemed okay until I realized that to pay a CLTV transaction normally you list the public keys for a multisignature you intend to pay as so: 2 pubkey1 pubkey2 2 OP_CHECKMULTISIG
The problem is normally in BitHalo or BitBay you would not know the persons public keys to their multisignature in advance. As all of the accounts are already P2SH how could I send to P2SH within the P2SH script(for CLTV) and what would the redeem even look like? I use pyblackcointools which is a custom derivative of pybitcointools. So anyone who wants to help code a way of signing these fancy scripts I will pay to do so. Or if you can just advise if its even POSSIBLE to pay a P2SH within a P2SH and somehow redeem it. I considered something like this:
Script timestamp checklocktimeverify drop dup p2sh
The redeem script I want to do would be like this: sig1 sig2 multisigscript SCRIPT
So in theory it would verify the script then duplicate the p2sh script, compare it to the hash, then evaluate the script
But all my attempts have not worked. And I don't want this to be labeled nonstandard(although I can manage if it is and just make the daemons accept it).
For those who are curious this is how the script would look normally.
timestamp checklocktimeverify drop 2 pubkey1 pubkey2 2 checkmultisig
You might argue "just do that, it works" but the problem is my users are not psychic, they don't know the public keys of a brand new account and to even find the public keys of an intended recipient of a freeze transfer they would have to check a registration address or scan their recent transactions and look into their input for the public keys (that is a very hack solution!!) I don't want to have to over-engineer this.
So this is a two part question. First, what would the redeem script look like, is it even possible to pay a p2sh within a p2sh?? (without knowing the pubkeys)
With that said, would I sign the script or the multisig or the script of the checklocktimeverify script address?! Is this compatible with my pyblackcointools library even?! (its just pybitcointools with minor changes)
And the second part is, who out there is a master in Python who might want to help me update my pyblackcointools library to I can start making a friendly way to sign and detect and script these things? I will write it myself if need be but it is a very tedious scope creep from my already mammoth amount of work coding BitHalo/BitBay
Thanks!
|