docs: Bitcoin library research & testnet setup guide (Phase 0)#598
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
docs: Bitcoin library research & testnet setup guide (Phase 0)#598devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Phase 0 Team B research deliverable for Bitcoin native support: - Library comparison matrix (bitcoinjs-lib vs @scure/btc-signer vs @noble/*) - Recommended library stack with justification - Testnet/signet connection guide with verified API endpoints - UTXO management recommendations (coin selection, fee estimation, RBF) - PoC code snippets for key operations - Known risks and limitations analysis Co-Authored-By: Phil Bedford <phil.bedford@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Devin Review
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 0 — Team B (Research) deliverable for Bitcoin native support in MetaMask Mobile. This PR adds a comprehensive research document evaluating Bitcoin libraries for React Native compatibility, documenting testnet/signet setup procedures, and providing UTXO management recommendations.
Key Findings
Recommended library stack:
@scure/btc-signer+@noble/curves+@noble/hashes+@scure/bip32+@scure/bip39@noble/hashesand@metamask/scure-bip39already in MM dependency tree@scure/btc-signer(vs ~80-120KB forbitcoinjs-lib)Testnet recommendation: Signet (primary) + Testnet4 (secondary)
UTXO management:
exactBiggest/accumSmalleststrategy recommended; RBF enabled by default; BIP84 (P2WPKH) as default address typeDocument Contents
bitcoinjs-libcomparisonReview & Testing Checklist for Human
bitcoinjs-libor@scure/btc-signer)selectUTXOusage and derivation pathsm/84'/0'/0') matches the existingBtcAccountType.P2wpkhimplementation in the SnapNotes
@metamask/bitcoin-wallet-snapuses a Snap-based architecture. The research document flags the "Snap vs native" architecture decision as a key risk to resolve early.mempool.json npm is an unrelated memory pooling library — document recommends direct REST API usage withfetch.Link to Devin session: https://app.devin.ai/sessions/4381153a30024e619faa91702c128aab
Requested by: @dr-phil