feat(theseus/bchwallet): bundled Bitcoin Cash wallet add-on skeleton
Manifest declaring sidebar-panel, vault-derive, page-inject (https://*.x) and approval-modal; registers the Wallet sidebar panel. Shows up in Settings > Extensions and opens from the sidebar.
This commit is contained in:
parent
ffeda26345
commit
dcab5c10ec
4 changed files with 53 additions and 0 deletions
14
bundled-addons/bchwallet/addon.json
Normal file
14
bundled-addons/bchwallet/addon.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"id": "bchwallet",
|
||||
"name": "Bitcoin Cash Wallet",
|
||||
"version": "0.1.0",
|
||||
"description": "Send, receive and sign with a BCH wallet derived from your Theseus vault. Dapps on .x sites can request payments through window.bitcoincash.",
|
||||
"author": "Silent Mode",
|
||||
"icon": "₿",
|
||||
"main": "index.js",
|
||||
"capabilities": ["sidebar-panel", "vault-derive", "page-inject", "approval-modal"],
|
||||
"page-inject": {
|
||||
"preload": "wallet-inject.js",
|
||||
"origins": ["https://*.x/*"]
|
||||
}
|
||||
}
|
||||
9
bundled-addons/bchwallet/index.js
Normal file
9
bundled-addons/bchwallet/index.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// Bitcoin Cash Wallet — bundled Theseus add-on. activate() runs in the main
|
||||
// process; all key material lives here, in memory, and is re-derived from the
|
||||
// password vault on every launch.
|
||||
module.exports = {
|
||||
activate(api) {
|
||||
api.registerSidebarPanel({ id: "main", title: "Wallet", icon: "₿", page: "panel.html" });
|
||||
api.log("wallet panel registered");
|
||||
},
|
||||
};
|
||||
29
bundled-addons/bchwallet/panel.html
Normal file
29
bundled-addons/bchwallet/panel.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bitcoin Cash Wallet</title>
|
||||
<style>
|
||||
:root { color-scheme: light dark;
|
||||
--bg:#0e131c; --panel:#141a24; --line:rgba(255,255,255,.09);
|
||||
--ink:#e7eaf1; --mut:#8b98a9; --dim:#5e6678; --acid:#d6ff3d; }
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root { --bg:#f8faff; --panel:#ffffff; --line:rgba(0,0,0,.10);
|
||||
--ink:#1a1f2b; --mut:#5c6577; --dim:#8a93a5; }
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; height: 100%; }
|
||||
body { background: var(--bg); color: var(--ink);
|
||||
font: 14px/1.55 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
||||
display: flex; flex-direction: column; }
|
||||
header { display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
|
||||
header .t { font-weight: 600; display: flex; gap: 8px; align-items: center; }
|
||||
main { flex: 1; padding: 14px 16px; color: var(--mut); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header><div class="t"><span>₿</span><span>Bitcoin Cash Wallet</span></div></header>
|
||||
<main>Loading…</main>
|
||||
</body>
|
||||
</html>
|
||||
1
bundled-addons/bchwallet/wallet-inject.js
Normal file
1
bundled-addons/bchwallet/wallet-inject.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Placeholder — filled in by the dapp-bridge step.
|
||||
Loading…
Add table
Reference in a new issue