Author

Topic: Lock funds in transaction A until transaction B? (Read 573 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
You cannot lock them until a certain transaction exists. However, what you can do is have a script can only be spent from when a certain secret is known. That secret could be published in another transaction.

Interesting.

Which opcodes are involved in this "lock-until-secret-published" strategy? Is this P2SH?

I'd love to learn more about this.
The address to lock the coins in is a p2sh address.

The script itself may look something like:
Code:
OP_SHA256 OP_EQUALVERIFY
OP_CHECKSIG
This would mean that the person who is spending it must own the private key for the and must know the secret so that when the secret is put through the SHA256 hash, you get .
newbie
Activity: 2
Merit: 1
You cannot lock them until a certain transaction exists. However, what you can do is have a script can only be spent from when a certain secret is known. That secret could be published in another transaction.

Interesting.

Which opcodes are involved in this "lock-until-secret-published" strategy? Is this P2SH?

I'd love to learn more about this.
staff
Activity: 3458
Merit: 6793
Just writing some code
I am learning about Bitcoin script, and wondering if something like the following is possible:

Is there a way to create a transaction which will lock funds until another transaction from someone else with a certain metadata exists?


You cannot lock them until a certain transaction exists. However, what you can do is have a script can only be spent from when a certain secret is known. That secret could be published in another transaction.

You can also lock to a certain date or block height.
newbie
Activity: 2
Merit: 1
I am learning about Bitcoin script, and wondering if something like the following is possible:

Is there a way to create a transaction which will lock funds until another transaction from someone else with a certain metadata exists?

Jump to: