feat(bitcoin): add MetaMask Bitcoin wallet support#805
Conversation
🦋 Changeset detectedLatest commit: 8415b7b The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
📦 Preview published under the Install the exact version(s) — npm i @lifi/wallet-management@0.0.0-preview-fe8dc5e6
npm i @lifi/widget-provider-bitcoin@0.0.0-preview-fe8dc5e6
npm i @lifi/widget-provider-ethereum@0.0.0-preview-fe8dc5e6
npm i @lifi/widget-provider-solana@0.0.0-preview-fe8dc5e6
npm i @lifi/widget-provider-sui@0.0.0-preview-fe8dc5e6
npm i @lifi/widget-provider-tron@0.0.0-preview-fe8dc5e6
npm i @lifi/widget-provider@0.0.0-preview-fe8dc5e6
npm i @lifi/widget@0.0.0-preview-fe8dc5e6 |
✅ E2E Dev Smoke — passing
4 passed · 0 failed · 0 skipped · 19s |
E2E Examples — all passedAll examples passed in the latest run. |
Testing the previewsTwo ways to test MetaMask Bitcoin against the preview build: A) This repo's playground (recommended — already wired): git checkout feature/emb-21-add-bitcoin-support-for-metamask
pnpm install # pnpm-workspace.yaml override pins @bigmi/client@0.0.0-preview-aab0339
pnpm dev # widget-playground-vite on :3000B) Installing the published widget preview elsewhere — NOT self-contained. // package.json
"@lifi/widget": "0.0.0-preview-fe8dc5e6",
"pnpm": { "overrides": {
"@bigmi/client": "0.0.0-preview-aab0339",
"@bigmi/react": "0.0.0-preview-aab0339"
}}Bigmi preview: lifinance/bigmi#60 → |
E2E Playground resultsDetails
📥 Download full HTML report (open the run → Artifacts → |
Mirror the reown()/dynamic() pattern: widget packages carry no @metamask/* deps. widget-provider-bitcoin reverts to no metamask in the default config; adds a connectors option on BitcoinProvider so integrators append metamask(). Keeps MetaMask BTC detection + icon. Playground demos the opt-in.
…tcoin Graduates off the preview pin to released @bigmi/client@0.9.0 (which ships the metamask() connector) + @bigmi/react@0.8.2; removes the pnpm preview override. bigmi 0.9.0 removed the phantom() connector (Phantom deprecated its BTC wallet), so drop phantom() from the default config and its installed-check case.


Description
Adds MetaMask Bitcoin support to the widget via the Bigmi
metamask()connector (lifinance/bigmi#60, released in@bigmi/client@0.9.0).MetaMask BTC is opt-in, mirroring how
reown()is wired — the widget packages add zero@metamask/*dependencies:widget-provider(isWalletInstalled): detects MetaMask Bitcoin (io.metamask.bitcoin) via the sharedwindow.ethereum.isMetaMasksignal (same extension as MetaMask EVM; a Wallet-Standard registry check would be a false positive since the adapter registers unconditionally).wallet-management(icons):io.metamask.bitcoinreuses the MetaMask icon, so it dedupes with MetaMask EVM in the wallet list.widget-provider-bitcoin:BitcoinProvidergains aconnectorsoption so integrators can appendmetamask(). The connector is not in the default config.@metamask/bitcoin-wallet-standard+@metamask/multichain-api-client, registers the adapter, and passesmetamask()viaconnectors.Integrators (e.g. Jumper) enable it by installing those two packages, calling
registerBitcoinWalletStandard({ client }), and addingmetamask()to their bigmiconnectors.Also bumps
@bigmi/client→^0.9.0and@bigmi/react→^0.8.2. (Phantom Bitcoin was removed separately in #804 — Phantom deprecated its BTC wallet.)The SDK needs no change —
sdk-provider-bitcoinis wallet-agnostic.Testing
pnpm build+pnpm check:types(full workspace) + biome — green.Linear: EMB-21