Why Nostr? What is Njump?
2024-03-30 16:18:33
in reply to

nym on Nostr: You could use Bitcoin Script. // Main script OP_OVER OP_HASH160 ...

You could use Bitcoin Script.

// Main script
OP_OVER OP_HASH160 <recipient_pubkey_hash> OP_EQUALVERIFY OP_DEPTH 0 OP_GREATERTHAN
OP_IF
<verify_nostr_event>
OP_VERIFY
<unlock_utxo>
OP_ELSE
OP_RETURN
OP_ENDIF

// <verify_nostr_event>
<push_event_id> <push_event_pubkey> <push_event_content> OP_CAT OP_HASH256
<push_event_signature> OP_SWAP OP_CHECKSIG
OP_VERIFY
<check_event_conditions>
OP_BOOLAND

// <check_event_conditions>
// Example condition: check if the event content contains a specific string
<push_expected_string> <push_event_content> OP_SWAP OP_SUBSTR OP_NIP OP_EQUALVERIFY

// <unlock_utxo>
// Example: Unlock the UTXO by sending the funds to a specific address
<push_destination_address> OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG
Author Public Key
npub1hn4zhxzsd5w4m5kvq326gqnsrc6zcakhparw8pee4tw7wlxw70ysawhtl5