{"_id":"@arthur2079/provider-ctrl","_rev":"2-1ed9b7d765107459ac5f34b99c55b058","name":"@arthur2079/provider-ctrl","dist-tags":{"next":"1.0.1-next.0","latest":"1.1.0"},"versions":{"1.0.1-next.0":{"name":"@arthur2079/provider-ctrl","version":"1.0.1-next.0","license":"MIT","_id":"@arthur2079/provider-ctrl@1.0.1-next.0","maintainers":[{"name":"arthur2079","email":"arthoor.200079@gmail.com"}],"dist":{"shasum":"8096f2118be243f72a9cc97111e2b046e3e55bc6","tarball":"https://registry.npmjs.org/@arthur2079/provider-ctrl/-/provider-ctrl-1.0.1-next.0.tgz","fileCount":43,"integrity":"sha512-ONkDUBjX4HlhDs61y/hAiIb+yGfjFrNvHC0QcNx50zXj1xdeEHPM6NkL/RbEQmrIpD690rGypXCSS7hgPUnSCA==","signatures":[{"sig":"MEUCICnSsI+XPdcz8UwKpGer8sJlHMszPSAeB+iFftoaUsK/AiEAlpge+GUjJSfOJpiJVMF/95T/IJuD3r+7lpCjygCv+R4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83433},"main":"./dist/mod.js","type":"module","source":"./src/mod.ts","exports":{".":"./dist/mod.js"},"gitHead":"bfb2df9e2b0952707c12670b8750ef3a6f4dcf70","scripts":{"lint":"eslint \"**/*.{ts,tsx}\"","build":"yarn run rangutopia library build","clean":"rimraf dist","format":"prettier --write '{.,src}/**/*.{ts,tsx}'","ts-check":"tsc --declaration --emitDeclarationOnly -p ./tsconfig.json"},"typings":"dist/mod.d.ts","_npmUser":{"name":"arthur2079","email":"arthoor.200079@gmail.com"},"_npmVersion":"11.17.0","description":"Ctrl Wallet integration for hub.   [Homepage](https://ctrl.xyz/) | [Docs](https://developers.ctrl.xyz/)","directories":{},"_nodeVersion":"24.19.0","dependencies":{"bs58":"^5.0.0","@hub3js/evm":"^0.3.3","@hub3js/std":"^0.2.3","rango-types":"^0.5.0","@hub3js/core":"^0.61.1","@hub3js/solana":"^0.3.3","@hub3js/namespaces":"^0.2.5","@arthur2079/signer-evm":"^1.0.1-next.0","@arthur2079/wallets-core":"^1.0.1-next.0","@arthur2079/signer-solana":"^1.0.1-next.0","@arthur2079/wallets-shared":"^1.0.1-next.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/provider-ctrl_1.0.1-next.0_1787069197641_0.9256385066960182","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@arthur2079/provider-ctrl","version":"1.1.0","license":"MIT","type":"module","source":"./src/mod.ts","main":"./dist/mod.js","exports":{".":"./dist/mod.js"},"typings":"dist/mod.d.ts","scripts":{"build":"yarn run rangutopia library build","ts-check":"tsc --declaration --emitDeclarationOnly -p ./tsconfig.json","clean":"rimraf dist","format":"prettier --write '{.,src}/**/*.{ts,tsx}'","lint":"eslint \"**/*.{ts,tsx}\""},"dependencies":{"@arthur2079/signer-evm":"^1.1.0","@arthur2079/signer-solana":"^1.1.0","@arthur2079/wallets-core":"^1.1.0","@arthur2079/wallets-shared":"^1.1.0","@hub3js/core":"^0.61.1","@hub3js/evm":"^0.3.3","@hub3js/namespaces":"^0.2.5","@hub3js/solana":"^0.3.3","@hub3js/std":"^0.2.3","bs58":"^5.0.0","rango-types":"^0.5.0"},"publishConfig":{"access":"public"},"gitHead":"2e0cd9f3b51b96edb474caf303b60f8de249141d","_id":"@arthur2079/provider-ctrl@1.1.0","description":"Ctrl Wallet integration for hub.   [Homepage](https://ctrl.xyz/) | [Docs](https://developers.ctrl.xyz/)","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-VsQfWnH5vrb0toNXqufM94SCGP1WRdpmdGiG5LBokr8LZTTeum0fFgnAQn5aI+ez9/CuJYxxHxOFa45P7rhCsQ==","shasum":"a33f1b7d0fe5ac181c289f7dd2a10215614b1945","tarball":"https://registry.npmjs.org/@arthur2079/provider-ctrl/-/provider-ctrl-1.1.0.tgz","fileCount":43,"unpackedSize":83398,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGO3pML3q6ROty107AdWjFird3dRqG7cGcR//0c7fw15AiEA+/U1mulIXg0yb/+wjk5O5oIxjx0xuy3/iFxe1bSForM="}]},"_npmUser":{"name":"arthur2079","email":"arthoor.200079@gmail.com"},"directories":{},"maintainers":[{"name":"arthur2079","email":"arthoor.200079@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/provider-ctrl_1.1.0_1787077735546_0.09515216818789285"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-18T16:06:37.416Z","modified":"2026-08-18T18:28:55.818Z","1.0.1-next.0":"2026-08-18T16:06:37.797Z","1.1.0":"2026-08-18T18:28:55.680Z"},"license":"MIT","description":"Ctrl Wallet integration for hub.   [Homepage](https://ctrl.xyz/) | [Docs](https://developers.ctrl.xyz/)","maintainers":[{"name":"arthur2079","email":"arthoor.200079@gmail.com"}],"readme":"# Ctrl (formerly XDEFI)\n\nCtrl Wallet integration for hub.  \n[Homepage](https://ctrl.xyz/) | [Docs](https://developers.ctrl.xyz/)\n\nMore about implementation status can be found [here](../readme.md).\n\n## Implementation notes/limitations\n\n### Group\n\n#### ✅ EVM\n\nSupports the full EVM set Rango exposes (`evmBlockchains`), plus arbitrary EVM\nchains via `wallet_addEthereumChain` / `wallet_switchEthereumChain`. Not limited to\na fixed list.\n\n#### ⚠️ UTXO\n\nA single UTXO namespace grouping **Bitcoin, Litecoin, Dogecoin, and Bitcoin Cash**\n(this is the only multi-chain UTXO wallet in the hub). `connect` returns the\naddresses of every available UTXO chain at once, each CAIP-encoded with its own\n`bip122` chain id.\n\nSigning differs per chain:\n\n- **Bitcoin** is signed and broadcast by the wallet via `sign_psbt` (PSBT, `broadcast: true`).\n- **Litecoin / Dogecoin / Bitcoin Cash** use the wallet's `transfer` method.\n\n#### ✅ Solana\n\nSupported. Message signing uses a custom signer because Ctrl exposes\n`signMessage(bytes)` directly (rather than the `request({ method: 'signMessage' })`\nform), then base58-encodes the signature.\n\n\n### Feature\n\n#### ⚠️ Switch Account\n\nEVM and Solana use their providers' native `accountsChanged` events.\n\nUTXO is different: Ctrl's UTXO providers emit `accountsChanged` with an **empty\n`{}` payload**, so they can't report the new account themselves, and re-fetching\nthem while disconnected opens a wallet popup. Because Ctrl switches the active\naccount across **all** chains at once and signals it reliably on the **EVM\nprovider**, the UTXO namespace is driven off the EVM `accountsChanged`: on a switch\n(non-empty array) it re-fetches all UTXO chains; on disconnect (empty array) it\ndisconnects. This means UTXO switch/disconnect detection relies on EVM being\nconnected alongside UTXO — always the case in practice, since Ctrl grants all chains\ntogether on connect.\n\n**Known issues — Ctrl-wallet behavior, not Rango logic, and currently not worked\naround here:**\n\n- **Live switching snaps back.** Ctrl pins the dApp to the account it connected with,\n  so switching the active account in the wallet (without disconnecting first) snaps\n  back to the connected one. To use a different account you must disconnect the dApp\n  (Ctrl → Connected dApps) → switch account → reconnect.\n- **Switching to a single-namespace (private-key-imported) account is unreliable,\n  because Ctrl's UTXO providers give no usable account info and the EVM `[]` signal is\n  ambiguous (full disconnect vs. switched-to-a-non-EVM account):**\n  - **→ EVM-only account:** the BTC/UTXO namespace may stay connected (stale) instead\n    of dropping.\n  - **→ BTC-only account:** the whole wallet may disconnect instead of keeping BTC\n    connected.\n\n#### ⚠️ Disconnect\n\nA wallet-initiated disconnect is detected through the EVM provider's empty\n`accountsChanged` (see Switch Account). The UTXO providers expose no usable\ndisconnect signal on their own.\n\n#### ⚠️ Cross Browser\n\nCtrl is supported **only on Chromium-based browsers** (e.g. Chrome, Brave).\n\n---\n\nMore wallet information can be found in [readme.md](../readme.md).","readmeFilename":"readme.md"}