[bitcoin-move] Implement Bitcoin script interpreter in Move
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
- Unlock UTXO(multi-sign, no-standard script)
- Support Taproot script and BitVM
Reference
- https://crates.io/crates/bitcoin-scripting
May I look into this issue?
We should first find a Bitcoin script interpreter in Rust.
https://github.com/BitVM/rust-bitcoin-scriptexec is also a candidate.
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.
I'll look at https://crates.io/crates/bitcoin-scripting for now.
https://github.com/alpenlabs/bitcoin-bosd/blob/main/SPECIFICATION.md.
I don't know if this is more likely for a solution to a Bitcoin script interpreter as it translates UTXO payload to a Bitcoin address or OP_RETURN payload forth and back.
We could use wasm <-> Move to support this in the future. #2485