Bitcoin Asked by Subhra Mazumdar on December 4, 2021
So I want to write a bitcoin script so that after a certain time period (say for example after 30 mins), the verification fails and transaction is marked invalid even if it gets broadcasted. Time locks are used so that a transaction is considered valid after a certain time period. I want the opposite to happen. So can I just enter some bogus lines of code after OP_CHECKLOCKTIMEVERIFY so that script check intentionally fails? Or is there any opcode by which I can achieve the same functionality?
This isn't possible with a single bitcoin sript, but your example can be realized quite easily by simply adding one more transaction to the equation:
So the premise is that given an input, it can be spent by either party A or party B. The restriction is that party B must spend it within the 1st 30 mins else after that A must spend it.
This depends on party A publishing the second transaction, but that step could also be automated and happen during the initial setup of the multisig address. The second transaction could even have a timelock added, such that it could not be published early (though party A can otherwise spend the coins at any time, so this seems unnecessary).
Otherwise, as mentioned in the comments, this sort of construction isn't possible using bitcoin script alone.
Answered by chytrik on December 4, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP