What is Nostr?
Rusty Russell [ARCHIVE] /
npub1zw7…khpx
2023-06-09 12:56:55
in reply to nevent1q…m2nc

Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2019-10-30 📝 Original message: Matt Corallo <lf-lists at ...

📅 Original date posted:2019-10-30
📝 Original message:
Matt Corallo <lf-lists at mattcorallo.com> writes:
> Why not stick with the original design from Adelaide with a spending path with a 1CSV that is anyone can spend (or that is revealed by spending another output).

The original design IIRC was a single anyone-can-spend anchor output.

If we need two anchor outputs, and want the other to turn into an
anyone-can-spend after it's mined, it's possible by gratuitously
mentioning the other key in the script, I think:

# If they provide a signature, they can push this:
OP_DEPTH OP_IF
<key1> OP_CHECKSIG
OP_ELSE
# Reveal the other key so you can spend the other anchor, too.
<key2> OP_DROP
# Now, anyone can spend after 1 block.
1 OP_CHECKSEQUENCEVERIFY
OP_TRUE
OP_ENDIF

The other anchor output reverses <key1> and <key2>.

Cheers,
Rusty.
Author Public Key
npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx