theseus/bundled-addons/bchwallet/lib
Local Dev 5880ba3507 feat(theseus/aegis): EIP-1193 + Solana wallet-adapter bridges; BTC signet
Aegis now integrates with the two dapp-wallet APIs the wider ecosystem
actually uses — MetaMask-style window.ethereum for Ethereum, Phantom-style
window.solana for Solana — plus BTC signet as a third Bitcoin network
alongside mainnet + testnet3.

- wallet-inject.js: adds a main-world bridge, installed via a one-shot
  <script textContent=…> appended to <head> and immediately removed.
  Electron's contextBridge shallow-copies args and strips methods, which
  means BCH- and Tron-shaped params (plain data) work in the isolated
  world but Solana's wallet-adapter dapps — which pass @solana/web3.js
  Transaction objects and expect .serializeMessage()/.addSignature() to
  fire on them — need code that lives in the same world as the dapp.
  Bridge talks back to the isolated world via window.postMessage on a
  namespaced envelope (aegisTag = "aegis-" + addonId), which forwards to
  theseus.invoke. Same pattern MetaMask + Phantom use.
- window.ethereum (EIP-1193): request({method, params}), on(),
  removeListener(), chainId, networkVersion, selectedAddress. Handles
  eth_requestAccounts, eth_accounts, eth_chainId, net_version,
  personal_sign, eth_sign, eth_sendTransaction, wallet_switchEthereumChain
  (rejects with "use the Aegis picker"), wallet_addEthereumChain
  (rejects, chains come from Settings), wallet_get/requestPermissions.
  Every other eth_*/net_*/web3_* method passes through to the wallet's
  configured RPC via a new eth.rpc handler. EIP-6963 announceProvider
  event fires so wagmi / RainbowKit / any 6963-aware dapp discovers
  Aegis alongside MetaMask instead of racing for window.ethereum.
- window.solana (wallet-adapter shape): connect(), disconnect(),
  publicKey (with toString/toBase58/toBytes/equals — the PublicKey
  interface dapps check), signMessage(u8) → {publicKey, signature: u8},
  signTransaction(tx) → mutates + returns the same tx with the
  signature added, signAndSendTransaction(tx) → returns {signature: txid},
  signAllTransactions([tx]), request({method, params}). isPhantom flag
  set true so dapps that gate on it pick us. on/off events for connect
  / disconnect / accountChanged.
- Handlers in index.js registerPageMessages: eth.requestAccounts,
  eth.personalSign, eth.sendTransaction, eth.switchChain, eth.rpc,
  sol.connect, sol.signMessage, sol.signAndSend. Every write path is
  per-origin gated + goes through api.approvalModal with the wallet
  label + network in the row list so the user always knows which
  Aegis wallet is about to sign.
- Signet added to chain-btc.js — signet shares testnet3's address
  format and SLIP-44 coin type (BIP-325 only changed consensus/signing),
  so bitcoinjs-lib.networks.testnet handles derivation unchanged. Only
  the electrum pool (aranguren + wakiyamap) + explorer (mempool.space
  /signet) + faucet (signetfaucet.com) differ. Registered as
  btc:signet in COINS with per-network coinType lookup.

Known limits (follow-ups in the same shape as existing chains):
- SOL signAndSendTransaction is single-signer only; dapps that combine
  the wallet's sig with co-signer sigs need the wire assembled on the
  dapp side.
- ETH eth_signTypedData_v4 (EIP-712) is not wired — the handler set
  covers personal_sign only.
2026-09-07 22:08:56 +02:00
..
dgb feat(theseus/aegis): DGB adapter on @dgb-wallet/{core,psbt} vendored packages 2026-09-07 02:19:44 +02:00
sia feat(theseus/aegis): fold Sia into the addon; add DGB (BIP84 native SegWit) 2026-09-07 01:56:25 +02:00
base58check.js feat(theseus/aegis): multi-wallet + Tron mainnet + Tron Nile in the bundled addon 2026-09-06 22:00:27 +02:00
cashaddr.js feat(theseus/bchwallet): receive + history — vault-derived keys, cashaddr, QR, electrum 2026-09-06 02:46:41 +02:00
chain-bch.js feat(theseus/aegis): SVG coin logos, two-step coin/network picker, BCH Chipnet 2026-09-07 01:07:31 +02:00
chain-btc.js feat(theseus/aegis): EIP-1193 + Solana wallet-adapter bridges; BTC signet 2026-09-07 22:08:56 +02:00
chain-dgb.js feat(theseus/aegis): DGB adapter on @dgb-wallet/{core,psbt} vendored packages 2026-09-07 02:19:44 +02:00
chain-eth.js feat(theseus/aegis): Ethereum + Solana adapters, DGB address-family picker, Aegis-branded shield 2026-09-07 20:31:27 +02:00
chain-sia.js feat(theseus/aegis): fold Sia into the addon; add DGB (BIP84 native SegWit) 2026-09-07 01:56:25 +02:00
chain-sol.js feat(theseus/aegis): Ethereum + Solana adapters, DGB address-family picker, Aegis-branded shield 2026-09-07 20:31:27 +02:00
chain-tron.js feat(theseus/aegis): multi-wallet + Tron mainnet + Tron Nile in the bundled addon 2026-09-06 22:00:27 +02:00
electrum.js feat(theseus/bchwallet): receive + history — vault-derived keys, cashaddr, QR, electrum 2026-09-06 02:46:41 +02:00
keys.js feat(theseus/bchwallet): receive + history — vault-derived keys, cashaddr, QR, electrum 2026-09-06 02:46:41 +02:00
tx.js feat(theseus/bchwallet): receive + history — vault-derived keys, cashaddr, QR, electrum 2026-09-06 02:46:41 +02:00
wallet.js feat(theseus/bchwallet): receive + history — vault-derived keys, cashaddr, QR, electrum 2026-09-06 02:46:41 +02:00