rooch-network / rooch

VApp Container with Move Language for Bitcoin ecosystem
https://rooch.network
Apache License 2.0
163 stars 86 forks source link

[bitcoin-move] Implement Bitcoin script interpreter in Move #1651

Open jolestar opened 6 months ago

jolestar commented 6 months ago

Motivation

If a UTXO is locked via a script, not a public key or public key hash. The UTXO Objet in Rooch is owned by the system address.

If the developer wants to provide a method to handle the UTXO, they need an approach to unlock the UTXO.

So, we must provide the Bitcoin script interpreter in Move and enable the Move & Bitcoin script mix programming.

Use case

  1. Unlock UTXO(multi-sign, no-standard script)
  2. Support Taproot script and BitVM

Reference

feliciss commented 2 months ago

May I look into this issue?

jolestar commented 2 months ago

We should first find a Bitcoin script interpreter in Rust.

https://github.com/BitVM/rust-bitcoin-scriptexec is also a candidate.

feliciss commented 2 months ago

https://github.com/BitVM/rust-bitcoin-scriptexec

For the first use case, I'll recommend that we use https://crates.io/crates/bitcoin-scripting for implementing the multi-sig script. After BitVM's library gets mature, we could use Taproot script and BitVM's library.

feliciss commented 2 months ago

I'll look at https://crates.io/crates/bitcoin-scripting for now.