rooch icon indicating copy to clipboard operation
rooch copied to clipboard

[bitcoin-move] Implement Bitcoin script interpreter in Move

Open jolestar opened this issue 1 year ago • 6 comments

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

  • https://crates.io/crates/bitcoin-scripting

jolestar avatar May 04 '24 08:05 jolestar

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.

jolestar avatar Sep 14 '24 00:09 jolestar

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

jolestar avatar Feb 25 '25 13:02 jolestar