rooch-network / rooch

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

[CLI] Implement rooch bitcoin command to suppor taproot multisign and bump bitcoin to 0.32.2 #2595

Closed jolestar closed 2 months ago

jolestar commented 2 months ago

Summary

  1. Implement rooch bitcoin command
  2. bump bitcoin to 0.32.2, and remove nostr

close #2414 and close #2581

Usage:

  1. Create multisign
rooch account create-multisign -t 2 -p $Pubkey1 -p $Pubkey2 -p $Pubkey3

Got the multisign_bitcoin_address

  1. Build tx
rooch bitcoin build-tx --sender $multisign_bitcoin_address -o $to_address:amount_sats
{
  "content": "hex content",
  "output_type": "psbt",
  "path": "/tmp/xxxxx.psbt"
}
  1. Sign tx
rooch bitcoin sign-tx -s $Pubkey1_address /tmp/xxxxx.psbt
rooch bitcoin sign-tx -s $Pubkey2_address /tmp/xxxxx.psbt

Got xxxxx.tx

  1. Broadcast tx
rooch bitcoin broadcast-tx /tmp/xxxxx.tx

Note: the taproot multisign signature order in the witness should be reversed with the public key order in the script. Thanks to https://github.com/rust-bitcoin/rust-bitcoin/issues/2241

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 8:05am
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 8:05am
1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **rooch** | ⬜️ Ignored ([Inspect](https://vercel.com/rooch/rooch/AD6gujL4gdX1kvhKBJEKvVePBifo)) | [Visit Preview](https://rooch-git-clibitcoin-rooch.vercel.app) | | Sep 11, 2024 8:05am |
github-actions[bot] commented 2 months ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
cargo/bitcoinconsensus 0.105.0+25.1 :green_circle: 4.8
Details
CheckScoreReason
Code-Review:green_circle: 10all changesets reviewed
Maintained:green_circle: 44 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4
CII-Best-Practices:warning: 0no effort to earn an OpenSSF best practices badge detected
License:green_circle: 10license file detected
Signed-Releases:warning: -1no releases found
Packaging:warning: -1packaging workflow not detected
Dangerous-Workflow:green_circle: 10no dangerous workflow patterns detected
Token-Permissions:warning: 0detected GitHub workflow tokens with excessive permissions
Branch-Protection:warning: 0branch protection not enabled on development/release branches
SAST:warning: 0SAST tool is not run on all commits -- score normalized to 0
Binary-Artifacts:green_circle: 10no binaries found in the repo
Vulnerabilities:green_circle: 100 existing vulnerabilities detected
Fuzzing:warning: 0project is not fuzzed
Security-Policy:warning: 0security policy file not detected
Pinned-Dependencies:warning: 0dependency not pinned by hash detected -- score normalized to 0
cargo/bitcoincore-rpc 0.19.0 :green_circle: 4.5
Details
CheckScoreReason
Code-Review:green_circle: 10all changesets reviewed
Maintained:warning: 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
CII-Best-Practices:warning: 0no effort to earn an OpenSSF best practices badge detected
Signed-Releases:warning: -1no releases found
Branch-Protection:warning: -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Dangerous-Workflow:green_circle: 10no dangerous workflow patterns detected
Packaging:warning: -1packaging workflow not detected
Binary-Artifacts:green_circle: 10no binaries found in the repo
License:warning: 0license file not detected
Token-Permissions:warning: 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies:warning: 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing:warning: 0project is not fuzzed
Vulnerabilities:green_circle: 100 existing vulnerabilities detected
Security-Policy:warning: 0security policy file not detected
SAST:warning: 0SAST tool is not run on all commits -- score normalized to 0
cargo/bitcoincore-rpc-json 0.19.0 :green_circle: 4.5
Details
CheckScoreReason
Code-Review:green_circle: 10all changesets reviewed
Maintained:warning: 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
CII-Best-Practices:warning: 0no effort to earn an OpenSSF best practices badge detected
Signed-Releases:warning: -1no releases found
Branch-Protection:warning: -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Dangerous-Workflow:green_circle: 10no dangerous workflow patterns detected
Packaging:warning: -1packaging workflow not detected
Binary-Artifacts:green_circle: 10no binaries found in the repo
License:warning: 0license file not detected
Token-Permissions:warning: 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies:warning: 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing:warning: 0project is not fuzzed
Vulnerabilities:green_circle: 100 existing vulnerabilities detected
Security-Policy:warning: 0security policy file not detected
SAST:warning: 0SAST tool is not run on all commits -- score normalized to 0
cargo/jsonrpc 0.18.0 :green_circle: 4.7
Details
CheckScoreReason
Code-Review:green_circle: 9Found 10/11 approved changesets -- score normalized to 9
Maintained:warning: 0project is archived
CII-Best-Practices:warning: 0no effort to earn an OpenSSF best practices badge detected
Signed-Releases:warning: -1no releases found
License:green_circle: 10license file detected
Binary-Artifacts:green_circle: 10no binaries found in the repo
Dangerous-Workflow:green_circle: 10no dangerous workflow patterns detected
Packaging:warning: -1packaging workflow not detected
Token-Permissions:warning: 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies:warning: 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy:warning: 0security policy file not detected
Vulnerabilities:green_circle: 100 existing vulnerabilities detected
Fuzzing:warning: 0project is not fuzzed
Branch-Protection:warning: -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
SAST:warning: 0SAST tool is not run on all commits -- score normalized to 0
cargo/minreq 2.12.0 :green_circle: 4
Details
CheckScoreReason
Code-Review:warning: 1Found 5/30 approved changesets -- score normalized to 1
Maintained:green_circle: 56 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
CII-Best-Practices:warning: 0no effort to earn an OpenSSF best practices badge detected
License:green_circle: 10license file detected
Signed-Releases:warning: -1no releases found
Dangerous-Workflow:green_circle: 10no dangerous workflow patterns detected
Packaging:warning: -1packaging workflow not detected
Binary-Artifacts:green_circle: 10no binaries found in the repo
Branch-Protection:warning: 0branch protection not enabled on development/release branches
Pinned-Dependencies:warning: 0dependency not pinned by hash detected -- score normalized to 0
Token-Permissions:warning: 0detected GitHub workflow tokens with excessive permissions
Security-Policy:warning: 0security policy file not detected
Fuzzing:warning: 0project is not fuzzed
Vulnerabilities:green_circle: 100 existing vulnerabilities detected
SAST:warning: 0SAST tool is not run on all commits -- score normalized to 0

Scanned Manifest Files

Cargo.lock
  • bitcoinconsensus@0.105.0+25.1
  • bitcoincore-rpc@0.19.0
  • bitcoincore-rpc-json@0.19.0
  • jsonrpc@0.18.0
  • minreq@2.12.0
  • bech32@0.10.0-beta
  • bip39@2.0.0
  • bitcoin@0.31.2
  • bitcoin-internals@0.2.0
  • bitcoin_hashes@0.11.0
  • bitcoin_hashes@0.13.0
  • bitcoincore-rpc@0.18.0
  • bitcoincore-rpc-json@0.18.0
  • hex-conservative@0.1.2
  • jsonrpc@0.14.1
  • miniscript@12.2.0
  • musig2@0.0.11
  • nostr@0.22.0
  • secp@0.2.4
  • secp256k1@0.28.2
  • secp256k1-sys@0.9.2
  • tokio-socks@0.5.1