Friday, November 22, 2024

script – conditional spending from P2WSH deal with

What im doing flawed?
Sinse I came upon that Bitcoin is programmable cash Im making an attempt to make use of it potential.
Utilizing this website https://improvein.github.io/bitcoin-forge/?#/script/create I’ve created a conditional script that holds 2 time locks for 2 pub keys.

OP_IF 1694275749 OP_CHECKLOCKTIMEVERIFY OP_DROP 03cd18ace3a339fcd0039fd87d7a7a8377537cd9a9f2afa2a3e76f40e53112a535 OP_CHECKSIG OP_ELSE 1694277749 OP_CHECKLOCKTIMEVERIFY OP_DROP 036bb176ed8fe2e38949a63ff964eed3c5e79fd88ac011cad1eecf22702ea65d23 OP_CHECKSIG OP_ENDIF

Script 63051694275749b1752103cd18ace3a339fcd0039fd87d7a7a8377537cd9a9f2afa2a3e76f40e53112a535ac67051694277749b17521036bb176ed8fe2e38949a63ff964eed3c5e79fd88ac011cad1eecf22702ea65d23ac68

Used this script to create with this instrument
https://improvein.github.io/bitcoin-forge/?#/deal with/create Fee to Witness Script Hash
deal with bc1qes2v6ts5ckxuz5mkwdeukcn62hkac05kf97gugc4jnu3kj3wg5as3nes34

Now I’m utilizing bitcoin core cli to signal the enter and create uncooked transaction. And I’m fully stack at this level. How and what to signal and learn how to put this puzzle for unlocking transaction.

The scope of this script is to offer to member of the family some funds locked in future with means to be spend it with considered one of 2 privet keys. If he unfastened his key, I can spend it with op_else situation. I’ll present some information

gettxout 14290ef656c05f8e0c06b6d99a6ae72c77a8809b3a69dd5fb00f07ce9cee1637  vout 133


{
  "bestblock": "0000000000000000000528fb0e92c1e79378a1b241eb144ca0f97054fdf42dfb",
  "confirmations": 155,
  "worth": 0.00007726,
  "scriptPubKey": {
    "asm": "0 cc14cd2e14c58dc153767373cb627a55eddc3e96497c8e231594f91b4a2e453b",
    "desc": "addr(bc1qes2v6ts5ckxuz5mkwdeukcn62hkac05kf97gugc4jnu3kj3wg5as3nes34)#k8s5es0p",
    "hex": "0020cc14cd2e14c58dc153767373cb627a55eddc3e96497c8e231594f91b4a2e453b",
    "deal with": "bc1qes2v6ts5ckxuz5mkwdeukcn62hkac05kf97gugc4jnu3kj3wg5as3nes34",
    "sort": "witness_v0_scripthash"
  },
  "coinbase": false
}

the locking script

{
  "asm": "1692429480 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_IF 03cd18ace3a339fcd0039fd87d7a7a8377537cd9a9f2afa2a3e76f40e53112a535 OP_CHECKSIG OP_ELSE 1692602280 OP_CHECKLOCKTIMEVERIFY OP_DROP 036bb176ed8fe2e38949a63ff964eed3c5e79fd88ac011cad1eecf22702ea65d23 OP_CHECKSIG OP_ENDIF",
  "desc": "uncooked(04a86ce064b175632103cd18ace3a339fcd0039fd87d7a7a8377537cd9a9f2afa2a3e76f40e53112a535ac6704a80fe364b17521036bb176ed8fe2e38949a63ff964eed3c5e79fd88ac011cad1eecf22702ea65d23ac68)#r3dcxvh2",
  "sort": "nonstandard",
  "p2sh": "38cTqVJf1jPBDCjg8wKdFx476uHX3qgEaB",
  "segwit": {
    "asm": "0 69672524bb7737429280e9c862b3fdcea0dc22037cbaaa755d6132b4841811e4",
    "desc": "wsh(uncooked(04a86ce064b175632103cd18ace3a339fcd0039fd87d7a7a8377537cd9a9f2afa2a3e76f40e53112a535ac6704a80fe364b17521036bb176ed8fe2e38949a63ff964eed3c5e79fd88ac011cad1eecf22702ea65d23ac68))#7uzehfsr",
    "hex": "002069672524bb7737429280e9c862b3fdcea0dc22037cbaaa755d6132b4841811e4",
    "deal with": "bc1qd9nj2f9mwum59y5qa8yx9vlae6sdcgsr0ja25a2avyetfpqcz8jqg69shh",
    "sort": "witness_v0_scripthash",
    "p2sh-segwit": "3NqDPiKTsbYA18GRWzrsE5wYYxGhH9XS96"
  }
}

and 2nd query

how segwit time locked script will work contemplating The “Yr 2038 drawback” when subject arises as a result of a 32-bit signed integer can characterize a most worth of two,147,483,647 seconds, which is roughly 68 years. The Unix epoch began on January 1, 1970, so including 68 years to this date brings us to January 19, 2038. so query is : funds time locked after January 19, 2038 shall be spendable identical method like at present?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles