{"_id":"@bze/hub-connector","_rev":"5-94c025d8236d0b1d4cd0dd1ce07d37eb","name":"@bze/hub-connector","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@bze/hub-connector","version":"0.1.0","keywords":["bze","beezee","cosmos","keplr","wallet","hub","connector","blockchain","web3"],"author":{"name":"BZE Alpha Team"},"license":"MIT","_id":"@bze/hub-connector@0.1.0","maintainers":[{"name":"faneatiku","email":"faneatiku@yahoo.com"}],"homepage":"https://github.com/bze-alphateam/hub-connector#readme","bugs":{"url":"https://github.com/bze-alphateam/hub-connector/issues"},"dist":{"shasum":"ccef0f237898f62e6a2d8bd96eeacc393e67f448","tarball":"https://registry.npmjs.org/@bze/hub-connector/-/hub-connector-0.1.0.tgz","fileCount":8,"integrity":"sha512-djOV8Fp5bSax1gptJsvXvLbRvq63ePHTiBtP+UTNSCqnuh54dP4Vo5dP23WDvUZlifG0vn4UO/1bxu6mNeb+jw==","signatures":[{"sig":"MEQCIEuRSMtiNc6WMIg91brTW3hUY54QPUbmlcLrw5dg1J3vAiBk72++2ERR/t5xtRhLv9t39zfSkZ5KxvQJsd7nwzk5CA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55072},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"76a2611cc70ac811075979f5433c43fa2c2c80b9","scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"faneatiku","email":"faneatiku@yahoo.com"},"repository":{"url":"git+https://github.com/bze-alphateam/hub-connector.git","type":"git"},"_npmVersion":"11.6.1","description":"Connect any BZE dApp to BZE Hub app — creates a Keplr-compatible wallet bridge via postMessage","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hub-connector_0.1.0_1774887225049_0.6862700557962684","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bze/hub-connector","version":"0.1.1","keywords":["bze","beezee","cosmos","keplr","wallet","hub","connector","blockchain","web3"],"author":{"name":"BZE Alpha Team"},"license":"MIT","_id":"@bze/hub-connector@0.1.1","maintainers":[{"name":"faneatiku","email":"faneatiku@yahoo.com"}],"homepage":"https://github.com/bze-alphateam/hub-connector#readme","bugs":{"url":"https://github.com/bze-alphateam/hub-connector/issues"},"dist":{"shasum":"58e98290b4c969e17fe00d53db34b4ed52670af0","tarball":"https://registry.npmjs.org/@bze/hub-connector/-/hub-connector-0.1.1.tgz","fileCount":8,"integrity":"sha512-MA8dinhUEGkGpPvE60iFMH/p5MacMuFEJ4NpSIq0iumgkrkbUWPZmh21kucudKavgfjEwC8crG+zuKMIuAsvlw==","signatures":[{"sig":"MEYCIQDsGn+IuPfGuPFUPq7vuIFO036C3zoaCjDk6Z9UxH1BDAIhAIvtLEYxiUmkQMncGFnMtV1e5GpueeSxHEdXyAw8b7bo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55702},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"302dcb010cd7effc3f9038280c5144b6f0fb7e4b","scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"faneatiku","email":"faneatiku@yahoo.com"},"repository":{"url":"git+https://github.com/bze-alphateam/hub-connector.git","type":"git"},"_npmVersion":"11.6.1","description":"Connect any BZE dApp to BZE Hub app — creates a Keplr-compatible wallet bridge via postMessage","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hub-connector_0.1.1_1774889199627_0.952819539245267","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bze/hub-connector","version":"0.1.2","keywords":["bze","beezee","cosmos","keplr","wallet","hub","connector","blockchain","web3"],"author":{"name":"BZE Alpha Team"},"license":"MIT","_id":"@bze/hub-connector@0.1.2","maintainers":[{"name":"faneatiku","email":"faneatiku@yahoo.com"}],"homepage":"https://github.com/bze-alphateam/hub-connector#readme","bugs":{"url":"https://github.com/bze-alphateam/hub-connector/issues"},"dist":{"shasum":"e0f019e6494487933ea0275d69adcd74cd0c0d68","tarball":"https://registry.npmjs.org/@bze/hub-connector/-/hub-connector-0.1.2.tgz","fileCount":8,"integrity":"sha512-i5f5uYChjL41zCNezRR0aTyyBjcDx3hbM/oQ5OvRBL3mZ2ik9b9V0iWk8z4aOF8VmiX3/xefpqxa5u8c9AJ3IQ==","signatures":[{"sig":"MEQCIGSc1GzvKZmatCjIGpFryD1e3QHVnwsUhAsk9GM8bvlYAiBUJNmuXM/amxtBwTyimDFrGd+9flGVfiFAneGvvN5FPw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62206},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"dc4e3ae5c7e7a0a6433d17fe96d0526a08d742eb","scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"faneatiku","email":"faneatiku@yahoo.com"},"repository":{"url":"git+https://github.com/bze-alphateam/hub-connector.git","type":"git"},"_npmVersion":"11.6.1","description":"Connect any BZE dApp to BZE Hub app — creates a Keplr-compatible wallet bridge via postMessage","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hub-connector_0.1.2_1774904330759_0.8282940325633528","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bze/hub-connector","version":"0.1.3","keywords":["bze","beezee","cosmos","keplr","wallet","hub","connector","blockchain","web3"],"author":{"name":"BZE Alpha Team"},"license":"MIT","_id":"@bze/hub-connector@0.1.3","maintainers":[{"name":"faneatiku","email":"faneatiku@yahoo.com"}],"homepage":"https://github.com/bze-alphateam/hub-connector#readme","bugs":{"url":"https://github.com/bze-alphateam/hub-connector/issues"},"dist":{"shasum":"f7b2d156795158ca0d1920d2b1f7867c4ae986e5","tarball":"https://registry.npmjs.org/@bze/hub-connector/-/hub-connector-0.1.3.tgz","fileCount":8,"integrity":"sha512-JuJxEDA4mmJrH6ooRAvgdHgmDoQUJfdjfctYnGDoJ0yAfabjv1mTAosARQ3CHbVMe0yg7nQLMmmnJnhX0Vnd5w==","signatures":[{"sig":"MEUCIQC6A/khMqxDS2Xxnq4TM8P3QY9BA04tDWrkm0N19ztDfwIgJSSuME4Z6CpApPDb0WW2cXkwhxtLwxbyl3Ps3JGMSI8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66676},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"b8220672cbe93080bd2fb9e0c412f6d3ad61af27","scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"faneatiku","email":"faneatiku@yahoo.com"},"repository":{"url":"git+https://github.com/bze-alphateam/hub-connector.git","type":"git"},"_npmVersion":"11.6.1","description":"Connect any BZE dApp to BZE Hub app — creates a Keplr-compatible wallet bridge via postMessage","directories":{},"sideEffects":false,"_nodeVersion":"24.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","react":"^19.0.0","typescript":"^5.0.0","@types/react":"^19.0.0"},"peerDependencies":{"react":">=18"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/hub-connector_0.1.3_1774971283239_0.4223652519341148","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bze/hub-connector","version":"0.1.4","description":"Connect any BZE dApp to BZE Hub app — creates a Keplr-compatible wallet bridge via postMessage","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","prepublishOnly":"npm run build"},"keywords":["bze","beezee","cosmos","keplr","wallet","hub","connector","blockchain","web3"],"author":{"name":"BZE Alpha Team"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bze-alphateam/hub-connector.git"},"homepage":"https://github.com/bze-alphateam/hub-connector#readme","bugs":{"url":"https://github.com/bze-alphateam/hub-connector/issues"},"publishConfig":{"access":"public"},"sideEffects":false,"peerDependencies":{"react":">=18"},"peerDependenciesMeta":{"react":{"optional":true}},"devDependencies":{"@types/react":"^19.0.0","react":"^19.0.0","tsup":"^8.0.0","typescript":"^5.0.0"},"gitHead":"6dec210e5b9d2a9cb66ef9ec9a533723bb259cf0","_id":"@bze/hub-connector@0.1.4","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-2BfhleemR0TIaiopn817zq5vYSNznmyuKivL/IIjDun1ZIy8KLR4I/uczZrwB1aRpGMLdEfm6qfWOmeU+BjBCg==","shasum":"e684e8f3b5aa65dd2573d39ea8751f8ce5f20e13","tarball":"https://registry.npmjs.org/@bze/hub-connector/-/hub-connector-0.1.4.tgz","fileCount":8,"unpackedSize":70646,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBKq9Nl1athPLNPOZEwiDQI2jCJC1NHgtfKza6cy/xuwAiAul/V+mdZE69/E7LbSpgIeyC14f/9zNNirtYj0FXE6BA=="}]},"_npmUser":{"name":"faneatiku","email":"faneatiku@yahoo.com"},"directories":{},"maintainers":[{"name":"faneatiku","email":"faneatiku@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hub-connector_0.1.4_1775000163754_0.23093275646016487"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-30T16:13:44.947Z","modified":"2026-03-31T23:36:04.013Z","0.1.0":"2026-03-30T16:13:45.236Z","0.1.1":"2026-03-30T16:46:39.798Z","0.1.2":"2026-03-30T20:58:50.918Z","0.1.3":"2026-03-31T15:34:43.434Z","0.1.4":"2026-03-31T23:36:03.906Z"},"bugs":{"url":"https://github.com/bze-alphateam/hub-connector/issues"},"author":{"name":"BZE Alpha Team"},"license":"MIT","homepage":"https://github.com/bze-alphateam/hub-connector#readme","keywords":["bze","beezee","cosmos","keplr","wallet","hub","connector","blockchain","web3"],"repository":{"type":"git","url":"git+https://github.com/bze-alphateam/hub-connector.git"},"description":"Connect any BZE dApp to BZE Hub app — creates a Keplr-compatible wallet bridge via postMessage","maintainers":[{"name":"faneatiku","email":"faneatiku@yahoo.com"}],"readme":"# @bze/hub-connector\n\nConnect any Cosmos dApp to [BZE Hub](https://github.com/bze-alphateam/bze-hub) — the BeeZee desktop wallet and node manager.\n\nWhen your dApp runs inside BZE Hub, this library automatically creates a Keplr-compatible `window.keplr` API that delegates signing to the Hub's secure wallet. When running outside the Hub (normal browser), it does nothing.\n\n## Installation\n\n```bash\nnpm install @bze/hub-connector\n```\n\n## Usage\n\nCall `initHubConnector()` once at app startup, before your wallet provider initializes:\n\n```typescript\nimport { initHubConnector } from '@bze/hub-connector';\n\n// Call early in your app's entry point\ninitHubConnector();\n```\n\nThat's it. If the dApp is running inside BZE Hub:\n- `window.keplr` is created automatically\n- Wallet libraries (@interchain-kit, CosmJS, etc.) detect it as Keplr\n- Signing requests are routed to the Hub's wallet via postMessage\n- REST/RPC endpoints are set to the Hub's local proxy\n\nIf the dApp is NOT in BZE Hub, nothing happens — your existing Keplr/Leap integration works as usual.\n\n## API\n\n### `initHubConnector(): Promise<boolean>`\n\nInitialize the connector. Returns `true` if running in BZE Hub, `false` otherwise.\n\n### `isInHub(): boolean`\n\nSynchronous check. Returns `false` until `initHubConnector()` completes.\n\n### `getHubConfig(): HubConfig | null`\n\nGet the Hub configuration (chain ID, proxy ports, active address). Returns `null` if not in Hub.\n\n## What it does\n\n1. Detects if running in a BZE Hub iframe (500ms handshake timeout)\n2. Creates `window.keplr` with full Keplr API compatibility\n3. Routes all signing calls to the Hub's Go wallet backend via postMessage\n4. Writes the Hub's proxy endpoints to localStorage (so your REST client uses the local node)\n5. Listens for account/endpoint changes from the Hub shell\n\n## Keplr API Coverage\n\n- `enable(chainId)`\n- `getKey(chainId)`\n- `getOfflineSigner(chainId)`\n- `getOfflineSignerOnlyAmino(chainId)`\n- `signDirect(chainId, signer, signDoc)`\n- `signAmino(chainId, signer, signDoc)`\n- `experimentalSuggestChain(chainInfo)`\n- `signArbitrary(chainId, signer, data)`\n","readmeFilename":"README.md"}