{"_id":"@bwalletx/connect","_rev":"14-5d469a93bfbf5d115322643ab008fcd2","name":"@bwalletx/connect","dist-tags":{"latest":"0.9.2"},"versions":{"0.0.0-stage":{"name":"@bwalletx/connect","version":"0.0.0-stage","_id":"@bwalletx/connect@0.0.0-stage","stub":true,"maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"dist":{"shasum":"93050e3041a20db34c31b8e97d594924259fb3c3","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-6fyJCzbysGgrX8QQ1myZuwgYNJIawZFOMQgI6Tx8PmkYJYZe3K4sOV7csYe/kLm2tX8Cc+CnK5qFEiVqPyT/dA==","signatures":[{"sig":"MEQCIDF3Q3Emtnf1G4X8e3s1IovQTU2VIwu9fU+2xUfVpekmAiAYaQiod9yTMbbcu/yJOyQiJcZKzvV1IlbK3QbSxQiFxA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":339},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"name":"@bwalletx/connect","version":"0.1.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication"],"license":"MIT","_id":"@bwalletx/connect@0.1.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"dist":{"shasum":"900740edd5cfff3ed93108e15fbb154a631194d8","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.1.0.tgz","fileCount":17,"integrity":"sha512-J+pCHB7SfqB9R4r7VBVJZSGtOH5E34kMgP9/KBllzg/ZoIzoQ6Giaf3tfwxXCvp2NjG4QIV0LeB7/rIMdjtkyw==","signatures":[{"sig":"MEUCIQCis3lJEVEi0N5uP/MUMTjZJvSW3rMVSy1CipOo9x6GWAIgcREd7eW8uJYxobt1XoMA3WUtPIpp6HRGii4GuHFNr0c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDar79DR2DHIuRQHl6VoRvCCaX5ij3e0Q/vPdOrD6vwtgIgA2zyTYE2Gca3MfKbGE3pvREMr+E1lyEWwFp2NxkHGYw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":853778},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./package.json":"./package.json"},"gitHead":"fc59b0c0d7e198e84edaef34935e112717e5cbf2","scripts":{"test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","_npmVersion":"10.9.8","description":"Sign in with bWalletX: wallet discovery, phone pairing and server-side challenge verification","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","typescript":"^5.9.3","@types/node":"^26.6.4"},"peerDependencies":{"@bsv/sdk":">=2.2.0 <4"},"_npmOperationalInternal":{"tmp":"tmp/connect_0.1.0_1791343845162_0.9900766296728463","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bwalletx/connect","version":"0.2.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button"],"license":"MIT","_id":"@bwalletx/connect@0.2.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"7a04792b063b96cb1f65cd33608f21234539f31c","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.2.0.tgz","fileCount":39,"integrity":"sha512-ZKUbtgssEs5e6mnNj5hr1k/lAY8pg/Jl7O67Rj23MP7tP7JTHLPltmCfhYtiZ66cc9plz9YnzM6H7W9Wq+N2Vg==","signatures":[{"sig":"MEQCIBgH7F1W+5pvC5vNSLtrPiPC3JbcdJmkLD1rU85BBxLKAiASzpmP7uCT0ZfwyxewACJLtFpY66VEQpY38T3xeY18yA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bwalletx%2fconnect@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1164200},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./package.json":"./package.json"},"gitHead":"a0af3b8087ff7d4ca14816c41cf46f6bfa3b6cde","scripts":{"test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"b0ase","email":"richardwboase@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"5472fb45-3362-422e-a17a-99a84702f4bf"}},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"12.2.0","description":"Sign in with bWalletX: the standard button (web component + React), wallet discovery, phone pairing and server-side challenge verification","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js"],"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0"},"peerDependencies":{"react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.2.0_1791497687825_0.6467013224426035","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bwalletx/connect","version":"0.3.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell"],"license":"MIT","_id":"@bwalletx/connect@0.3.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"03a22f4fd791dd808f5780f49d7a157d0ad9bb7a","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.3.0.tgz","fileCount":58,"integrity":"sha512-U8XrVorkuH7pIykXs5sxVY6PH7kCZeKGlQrIFmxIkrDC9I3juOFn9dqSsoa/YVnafMRokX3Tj1ngn9l+yaf7lA==","signatures":[{"sig":"MEYCIQC+YQgd4Ii5rG3O01o6XPWXGjVyk0q0nFZiZezsg8h0SAIhALWiC8bPW3AokItDAWbJtA5giQDj/qe53J60ZXm6+GPj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bwalletx%2fconnect@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1480700},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"gitHead":"a507696de4ea005b1619a9177d65e5c84ba5ab73","scripts":{"test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"b0ase","email":"richardwboase@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"5472fb45-3362-422e-a17a-99a84702f4bf"}},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"12.2.0","description":"Sign in with bWalletX (button, discovery, pairing, server verification) and the bApp shell (5-slot bar, top bar, drawer, bapp.json manifest)","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0"},"peerDependencies":{"react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.3.0_1791501151286_0.9609589417982045","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@bwalletx/connect","version":"0.4.1","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.4.1","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"47153b132f72030d76e1df254682f2b3b5ba13b5","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.4.1.tgz","fileCount":71,"integrity":"sha512-4VtdOWH9AMT3SwPP7J/D1HO2XzFh0PgJEF/nm1FnrypDGcmhM2vSry5cMviBvdtl+f9eU5xXrZDaRE2Gbkjg3w==","signatures":[{"sig":"MEUCIDVPdFqR/86nBdQ5B8msghsGlmDt+FOl2iuASvwY3z4lAiEA03ZwsPWAI0LG6evBoyKtflfLAQWUIxx+HaIu18ljHjc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCkbZCSUCsTgxiPxbOxtKYqnbmrHgkyvz35sJUuAhIWPAIhAI1MqGyvWuA8JrLAa0h0JRFzv5SzsUmSJa1XjU1h9IGE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3754370},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"dependencies":{"qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.4.1_1791831796443_0.9682923606716114","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@bwalletx/connect","version":"0.5.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.5.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"ff972490dd21b80d3f85815704049a075bd381e6","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.5.0.tgz","fileCount":81,"integrity":"sha512-Tjmjzf1kddD7/fmW0hVzAPLdAG0ZxPvXdlePiVmdnY3yjWYMgULr6U1dNFui1j7avuf5jqf5/3tdc8E7WTJQxg==","signatures":[{"sig":"MEMCIBtN8LqWXGJSym8EVJhoA5oovZ4RUJS9bvVk5n6IKde5Ah8w4mLCLRieFhlVvQMf2zqmWzuSojMmVd2ky58j55r8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCByMMQaiRPnw8W5YYsBO/DYeltPv+e1msAuwwO1EKBiwIhAPJVML0q6sFScdAX6LI6E4YHPX0iuNfyGN264m2U92Wc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4881586},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"10.9.8","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"22.22.3","dependencies":{"qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.5.0_1792191511653_0.9231366433150978","host":"s3://npm-registry-packages-npm-production"}},"0.5.3":{"name":"@bwalletx/connect","version":"0.5.3","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.5.3","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"03ccd7161ba3f9a6e44d4aded616280a7c8f5983","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.5.3.tgz","fileCount":81,"integrity":"sha512-2PLOr0Eo5uHffe3PgSRSOTVB4k06DkJt4O6pLv5/P3CL9lLpRQxFU/pKcECAZE/Ab/fvEoU4OWbJQ9etZ/dUhw==","signatures":[{"sig":"MEUCIAuJdyOzyVXVlUKS3BWyOSzEiEq2H6iHlK1fUmSB6Un8AiEAg4GSPZnY0KgVp584V8t/nyBIkdhCkxbROjnflXt01kE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIDdsPwrkBVwhE4k7V9BC1g8qzRwgaw+KpFNeBORs3eJkAiEA6BTbW8IhS5RbQYz/XYWjwMhuDRLp5/Vj22aGZwMF+Wc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4952254},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"gitHead":"913d6909c257acfe52f1adf761ccd77eaac1c33d","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"10.9.8","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"22.22.3","dependencies":{"qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.5.3_1792952871027_0.26447649902864545","host":"s3://npm-registry-packages-npm-production"}},"0.5.4":{"name":"@bwalletx/connect","version":"0.5.4","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.5.4","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"9d1d73f948882486d6cbb7698282a748289b14b8","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.5.4.tgz","fileCount":81,"integrity":"sha512-fWqwX8wY0sSGSi27SeIyG2Y5Dbm+Cf78dDAfgINzpJpBNA05q+Eq87hBFwJvDqASc+A4ZU+4YQGOqd764NKm1w==","signatures":[{"sig":"MEQCIDC+gXdJ616lLk+Gb+UjH3qXrfXYH5Ofcp/Ud/MdpacSAiAaOUp3BLZyYUNmPLM8s91m+G7gPGAIZsO2ySyOSNn56Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCn3e5IyHKSFyG0POkViqUS6zQohPEDNAmiwxQBGbmRogIhAMOCIpQtCY46t6Ya4eQLTVOZGbE+O+BYfTjig+GVQqI8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5008310},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"dependencies":{"qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.5.4_1793163027538_0.9029874091457469","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@bwalletx/connect","version":"0.7.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.7.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"5bb77999c5e7dabe0da061b2d2522fa726895553","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.7.0.tgz","fileCount":85,"integrity":"sha512-y1KZ2ejpFgVUORokqD+xsvhZOA2wkm/JZAeiqXB2zQwSW90cCiOGnUKMFnY3WHxe+Q3IuPSJUy8gmSJ8msSGGA==","signatures":[{"sig":"MEQCIGsrsCM8+Y9HHrSkBB4lnzN4RrrbMb8+xO2K7XZUHh/UAiB7LHnT8M1j7GNPyXiow8+YW2IcJpJa1WZYFZX3H2bVeA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCHoJ4b4O5fHgIqoMBkr1QIjn9p2oXqvVJf47BXU+G5ngIgRJrltzkRdLqWXMp+GRYhcbP9UX9vP5nQeU4Q3gcJoGw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6298429},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"11.20.0","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"26.13.0","dependencies":{"qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.7.0_1793949361629_0.9525517537823258","host":"s3://npm-registry-packages-npm-production"}},"0.5.6":{"name":"@bwalletx/connect","version":"0.5.6","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.5.6","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"2fa58e2d63b5fca82f6f10c8b357998b0df2068b","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.5.6.tgz","fileCount":85,"integrity":"sha512-AIndFGZDQX9Ei2aLeOblrHrvtrV8PGHb8wbsNkEIuQDvTbdi0kGCpxVmNVyn+W0UoqL03iSR9kavYDLwclxVkA==","signatures":[{"sig":"MEQCIEleeZDANmUHav0E2cXRdnp5BbXLeA8gQ5Jvr+5N5Wk9AiAZRG8EabPUQUpFthEp68hbJ2Nj/2OlXzocswhp76yB1g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDiLmGhLPHhnU/XmUjZAJRDUSIG8Qrt5pP2DGdVZkj78AIgc3NWYjOfU52rHXG60lqA1cJ+9Eo42VRCumK1edNA47c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5797222},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"11.20.0","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"26.13.0","dependencies":{"qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@bsv/sdk":"^2.8.11","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18","@bsv/sdk":">=2.2.0 <4"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.5.6_1793949385162_0.345057897925625","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@bwalletx/connect","version":"0.8.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.8.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"e6e1815dd6d28ef09c32f3a16bda6ea681c3faf0","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.8.0.tgz","fileCount":108,"integrity":"sha512-MXhTC2/k0CqLt4MErk5c81pUWbm0Ge/K/3RJMY5QhI1dzjLEDXV+f2p5LwH9Z8lyROOoxjSVsiXT1evUkWMLhA==","signatures":[{"sig":"MEUCIEaKP/ZbJlx+CmoL2k/w80jM5zJgTFSbwuot0Zd1K/juAiEAuisYmDXgi0vEeCurb76nouVmlAZk1eq+uIBCbzrXpCc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bwalletx%2fconnect@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6449599},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"gitHead":"48e3c7f0423c4f53ee9ea9ac83ecb3062f6b1b22","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","licenses":"node scripts/third-party-licenses.mjs","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"node scripts/third-party-licenses.mjs --check && pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"b0ase","email":"richardwboase@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"5472fb45-3362-422e-a17a-99a84702f4bf"}},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"12.2.1","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"24.22.2","dependencies":{"@bsv/sdk":"^4.0.1","qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@bsv/sdk-v1":"npm:@bsv/sdk@1.9.31","@bsv/sdk-v2":"npm:@bsv/sdk@2.8.11","@bsv/sdk-v4":"npm:@bsv/sdk@4.0.1","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.8.0_1794997555232_0.20552133176867915","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@bwalletx/connect","version":"0.9.0","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.9.0","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"5b43802a9455de70711ddac0e48f8e037e838f89","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.9.0.tgz","fileCount":108,"integrity":"sha512-oDL9ZUfosvXywFN5hRRAw8Z9oHhNkh28sDdYgP6y0YtKQZ3iVcs/1B+rd7G85WsiPQ+EG3aDaCMEZbsJhNP1BA==","signatures":[{"sig":"MEUCIF9USgLCfVAYqtyIB8hrrG9YB4JtYrxukQ67Urs0pyWPAiEAjtLN9ect6UPpwAqYHabBAp0OfRjVCT9rNsdu7n8uU0E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bwalletx%2fconnect@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6878620},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"gitHead":"c4e2c134c0e746d48ee4814644009deac9930c90","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","licenses":"node scripts/third-party-licenses.mjs","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"node scripts/third-party-licenses.mjs --check && pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"b0ase","email":"richardwboase@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"5472fb45-3362-422e-a17a-99a84702f4bf"}},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"12.2.1","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"24.22.3","dependencies":{"@bsv/sdk":"^4.0.1","qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@bsv/sdk-v1":"npm:@bsv/sdk@1.9.31","@bsv/sdk-v2":"npm:@bsv/sdk@2.8.11","@bsv/sdk-v4":"npm:@bsv/sdk@4.0.1","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.9.0_1795367721699_0.7614079127008895","host":"s3://npm-registry-packages-npm-production"}},"0.9.1":{"name":"@bwalletx/connect","version":"0.9.1","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"license":"MIT","_id":"@bwalletx/connect@0.9.1","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"homepage":"https://bwalletx.com/sign-in-button","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"10ec8466b2600357d38696bbec4ae197cdc0894e","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.9.1.tgz","fileCount":108,"integrity":"sha512-UYktFqW+789IoXzpSAMonJ1py39Xy/JQ/XNTKrWZZ+U79xV/JZppJZ1/ofLRuWNBGazLzKHS+SaPjJB9ZTvFBw==","signatures":[{"sig":"MEUCIQDuMmH2Wt7Rz47n5w3QT+Oh2u3CwQa6FKTMHrgEE5ddWAIgBI2/l+x/i/qbCeMRJI7ug++Ij75l/oKXvm11REaQ7NY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bwalletx%2fconnect@0.9.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6881978},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"gitHead":"aa765666580fc5c34fbe5c6b9bfb11ed3bc6cbc5","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","licenses":"node scripts/third-party-licenses.mjs","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"node scripts/third-party-licenses.mjs --check && pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"b0ase","email":"richardwboase@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"5472fb45-3362-422e-a17a-99a84702f4bf"}},"jsdelivr":"./dist/bwalletx-connect.global.js","repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"12.2.1","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"24.22.3","dependencies":{"@bsv/sdk":"^4.0.1","qrcode-generator":"^1.5.2"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@bsv/sdk-v1":"npm:@bsv/sdk@1.9.31","@bsv/sdk-v2":"npm:@bsv/sdk@2.8.11","@bsv/sdk-v4":"npm:@bsv/sdk@4.0.1","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/connect_0.9.1_1795388332281_0.40452976381703365","host":"s3://npm-registry-packages-npm-production"}},"0.9.2":{"_id":"@bwalletx/connect@0.9.2","bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"dist":{"shasum":"75146d468a5d1afe6382a528f7e5005caa5d76e2","tarball":"https://registry.npmjs.org/@bwalletx/connect/-/connect-0.9.2.tgz","integrity":"sha512-L0F/ZDnTUUCzCr8Yhw7oGhc+05zKAqYmzWbg8/pixI3Jx4FQsd+OqpFtqvJ7G0QaNUU+KrAOea+nLI4H9GWQRQ==","fileCount":108,"unpackedSize":7022662,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bwalletx%2fconnect@0.9.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCtb84FzVw8Kti47LHP2IBlWn14uZQR0NCkfOG7OpU/cgIgKXcc6Mw5yXsAG3Kb+hJT7hyC4nGT0Zh1fX8MWoqyNG8="}]},"main":"./dist/index.cjs","name":"@bwalletx/connect","type":"module","types":"./dist/index.d.ts","unpkg":"./dist/bwalletx-connect.global.js","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next.d.ts","default":"./dist/next.js"},"require":{"types":"./dist/next.d.cts","default":"./dist/next.cjs"}},"./react":{"import":{"types":"./dist/react.d.ts","default":"./dist/react.js"},"require":{"types":"./dist/react.d.cts","default":"./dist/react.cjs"}},"./shell":{"import":{"types":"./dist/shell.d.ts","default":"./dist/shell.js"},"require":{"types":"./dist/shell.d.cts","default":"./dist/shell.cjs"}},"./server":{"import":{"types":"./dist/server.d.ts","default":"./dist/server.js"},"require":{"types":"./dist/server.d.cts","default":"./dist/server.cjs"}},"./browser":"./dist/bwalletx-connect.global.js","./element":{"import":{"types":"./dist/element.d.ts","default":"./dist/element.js"},"require":{"types":"./dist/element.d.cts","default":"./dist/element.cjs"}},"./assets/*":"./assets/*","./shell/react":{"import":{"types":"./dist/shell-react.d.ts","default":"./dist/shell-react.js"},"require":{"types":"./dist/shell-react.d.cts","default":"./dist/shell-react.cjs"}},"./package.json":"./package.json","./shell/browser":"./dist/bwalletx-shell.global.js","./schema/bapp.schema.json":"./schema/bapp.schema.json"},"gitHead":"f3e0bdc05d8943c91a9a5cc45dabe5cd5c42a05c","license":"MIT","scripts":{"lint":"eslint src test","test":"vitest run","build":"tsup","licenses":"node scripts/third-party-licenses.mjs","test:live":"LIVE_RELAY=1 vitest run test/live-relay.test.ts","typecheck":"tsc --noEmit","prepublishOnly":"node scripts/third-party-licenses.mjs --check && pnpm typecheck && pnpm lint && pnpm test && pnpm build"},"version":"0.9.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5472fb45-3362-422e-a17a-99a84702f4bf"},"approver":{"name":"b0ase","email":"richardwboase@gmail.com"}},"homepage":"https://bwalletx.com/sign-in-button","jsdelivr":"./dist/bwalletx-connect.global.js","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"_npmVersion":"12.2.1","description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","directories":{},"maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"sideEffects":["./dist/element.js","./dist/element.cjs","./dist/bwalletx-connect.global.js","./dist/bwalletx-shell.global.js"],"_nodeVersion":"24.22.3","dependencies":{"@bsv/sdk":"^4.0.1","qrcode-generator":"^1.5.2"},"devDependencies":{"ws":"^8.22.0","tsup":"^8.5.1","react":"^19.3.0","eslint":"^9.39.5","vitest":"^5.0.3","@types/ws":"^8.18.2","happy-dom":"^20.14.5","@eslint/js":"^9.39.5","typescript":"^5.9.3","@bsv/sdk-v1":"npm:@bsv/sdk@1.9.31","@bsv/sdk-v2":"npm:@bsv/sdk@2.8.11","@bsv/sdk-v4":"npm:@bsv/sdk@4.0.1","@types/node":"^26.6.4","@types/react":"^19.3.0","typescript-eslint":"^8.71.1"},"peerDependencies":{"next":">=14","react":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/connect_0.9.2_1795446702781_0.6189505441878026"},"_hasShrinkwrap":false}},"time":{"created":"2026-10-07T03:29:08.170Z","modified":"2026-11-23T15:11:43.400Z","0.0.0-stage":"2026-10-07T03:29:08.170Z","0.1.0":"2026-10-07T03:30:45.275Z","0.2.0":"2026-10-08T22:14:47.948Z","0.3.0":"2026-10-08T23:12:31.408Z","0.4.1":"2026-10-12T19:03:16.567Z","0.5.0":"2026-10-16T22:58:31.774Z","0.5.3":"2026-10-25T18:27:51.154Z","0.5.4":"2026-10-28T04:50:27.642Z","0.7.0":"2026-11-06T07:16:01.831Z","0.5.6":"2026-11-06T07:16:25.362Z","0.8.0":"2026-11-18T10:25:55.383Z","0.9.0":"2026-11-22T17:15:21.865Z","0.9.1":"2026-11-22T22:58:52.435Z","0.9.2":"2026-11-23T15:11:42.935Z"},"bugs":{"url":"https://github.com/bitcoin-corp/bwalletx-connect/issues"},"license":"MIT","homepage":"https://bwalletx.com/sign-in-button","keywords":["bsv","brc-100","wallet","bwalletx","sign-in","authentication","web-component","sign-in-button","bapp","app-shell","nextjs","react","payments","handcash-alternative"],"repository":{"url":"git+https://github.com/bitcoin-corp/bwalletx-connect.git","type":"git"},"description":"Sign in with bWalletX or any BRC-100 wallet: button, React provider, Next.js sessions, nonce stores, pay/tip helpers, payment verification, wallet picker, and the bApp shell","maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"readme":"# @bwalletx/connect\n\nAdd \"Sign in with bWalletX\" to a website. Built on the open BRC-100 wallet interface, so every BRC-100 wallet works the same way, with bWalletX first.\n\nThe user's wallet signs a one-time challenge from your server with a key derived from its identity key. Your server checks the signature and signs the user in as that identity key. You don't need an API key or an account with us, and nothing passes through bwalletx.com. The only service of ours involved is the encrypted pairing relay (`relay.bwallet.space`), and only when the user signs in from a phone or the web wallet.\n\nThe full protocol is described at https://bwalletx.com/connect.md. This package is the same code, packaged.\n\n## Install\n\n```sh\npnpm add @bwalletx/connect\n```\n\n### Requirements\n\n- **Node 22 or later** on the server (and for builds): `@bsv/sdk` 4.x requires it. Any current browser.\n- **No `@bsv/sdk` needed from you.** Since 0.8.0, connect depends on its own `@bsv/sdk` (^4.0.1) instead of using your app's copy, so your app can stay on any version (1.9, 2.x or 4.x). The wallet clients connect builds itself (in the bWalletX frame over XDM, desktop wallets with `probeLocal`, and Metanet Desktop via `metanetOption()`) are 4.x `WalletClient`s whatever your version: arguments are validated before they reach the wallet, answers are validated (createAction/signAction answers checked against the request), and every XDM call times out after `XDM_RESPONSE_TIMEOUT_MS` (10 minutes) instead of waiting forever. Wallets the page already has (the extension's announcement, `window.CWI`, a phone pairing) are used as they are.\n  - App on **4.x**: the package manager shares one copy (pnpm, checked, resolves connect's ^4.0.1 to the app's 4.x, even a pinned 4.0.1). No extra size.\n  - App on **1.9 or 2.x**: you get two copies. In a browser bundle connect's copy adds about 417 KB minified (about 125 KB gzipped) on top of yours. If that matters, load the sign-in code lazily (`import('@bwalletx/connect')` on click).\n- **Nothing crosses as an `@bsv/sdk` object.** Pass wallets as any BRC-100 wallet: the `Brc100Wallet` type accepts a `WalletInterface` from any `@bsv/sdk` version, or a plain object with the same methods. Everything else goes in and out as strings and byte arrays: txids, hex, BEEF/Atomic BEEF bytes, DER signatures as `number[]`. Don't `instanceof`-check what connect returns against your own `@bsv/sdk` classes.\n- Wallets connect hands back (`useBwalletX().wallet`, `SignInResult.wallet`, `findBwalletX()`) are typed as connect's own (4.x) `WalletInterface`. In a codebase typed against 1.9, cast before passing one to 1.9-typed code: 4.x types byte results as `number[] | Uint8Array`, 1.9 as `number[]`.\n- `react` 18+ and `next` 14+ are optional peers, only for `/react` and `/next`.\n\n## Next.js quick start (App Router)\n\nWorks with bWalletX and any other BRC-100 wallet. Set a session secret (32+ characters) in your environment. There is no default: the routes throw without it.\n\n```sh\n# .env.local (never commit it)\nBWALLETX_SESSION_SECRET=   # e.g. the output of: openssl rand -base64 48\nAPP_ORIGIN=https://example.com\n```\n\n```ts\n// lib/bwalletx.ts\nimport { createBwalletXAuth, pgStore, signInOrLink } from '@bwalletx/connect/next';\nimport { query } from './db'; // (sql, params) => Promise<{ rows }>\n\nexport const auth = createBwalletXAuth({\n  origin: process.env.APP_ORIGIN!,\n  store: pgStore({ query }),            // or redisStore({ client: upstash })\n  // Optional: link the identity key to your user table.\n  onVerified: async (identityKey) => {\n    const r = await signInOrLink(identityKey, {\n      findUserByIdentityKey: async (k) => (await query('select user_id from wallet_links where identity_key = $1', [k])).rows[0]?.user_id ?? null,\n      attach: async (uid, k) => void (await query('insert into wallet_links (user_id, identity_key) values ($1, $2)', [uid, k])),\n      createUser: async () => (await query('insert into users default values returning id', [])).rows[0].id,\n    });\n    return { uid: r.userId ?? undefined };\n  },\n});\n```\n\n```ts\n// app/api/bwalletx/challenge/route.ts\nimport { auth } from '@/lib/bwalletx';\nexport const POST = auth.challenge;\n// app/api/bwalletx/verify/route.ts  → export const POST = auth.verify;\n// app/api/bwalletx/logout/route.ts  → export const POST = auth.logout;\n// app/api/bwalletx/session/route.ts → export const GET = auth.session;\n```\n\n```tsx\n// any server component or route handler\nconst session = await auth.getSession(); // { sub: identityKey, uid?, handle?, paymail?, exp } | null\n```\n\nThe cookie (`bwx_session`) is `HttpOnly; SameSite=Lax; Secure` (Secure when the origin is https), HMAC-SHA256 signed, 7 days by default (`maxAge`). Both POST routes check the `Origin` header against `origin`. `signSession` / `verifySession` are also exported from `@bwalletx/connect/server` if you want the token without the adapter.\n\nCreate the nonce table once (a migration): `pgNonceTableSql()` returns the SQL.\n\n**Hydration warning.** bWalletX for Chrome adds a `data-bwalletx-ext` attribute to `<html>` and `<body>` before React hydrates, so Next.js logs a harmless hydration mismatch. Put `suppressHydrationWarning` on both in `app/layout.tsx`: `<html lang=\"en\" suppressHydrationWarning>` and `<body suppressHydrationWarning>`. It only silences attribute differences on those two elements, not in your components.\n\n**One sheet needs the server too.** The client and the challenge route must both be 0.5.5 or newer: an older `createChallenge` refuses a challenge without an identity key, and the client then falls back to asking for the key first (two wallet sheets).\n\n## React quick start\n\n```tsx\n'use client';\nimport { BwalletXProvider, useBwalletX } from '@bwalletx/connect/react';\n\nexport function Providers({ children }: { children: React.ReactNode }) {\n  return (\n    <BwalletXProvider\n      challengeUrl=\"/api/bwalletx/challenge\"\n      verifyUrl=\"/api/bwalletx/verify\"\n      logoutUrl=\"/api/bwalletx/logout\"\n      sessionUrl=\"/api/bwalletx/session\">\n      {children}\n    </BwalletXProvider>\n  );\n}\n\nfunction Account() {\n  const { status, identityKey, handle, connect, disconnect, tip } = useBwalletX();\n  if (status !== 'connected') return <button onClick={() => connect()}>Connect wallet</button>;\n  return (\n    <>\n      <span>{handle ?? identityKey?.slice(0, 10)}</span>\n      <button onClick={() => tip({ to: 'author@example.com', usd: 0.05 })}>Tip 5¢</button>\n      <button onClick={disconnect}>Sign out</button>\n    </>\n  );\n}\n```\n\n`useBwalletX()` gives `status` (`idle | restoring | connecting | connected | error`), `identityKey`, `handle`, `paymail`, `wallet` (the BRC-100 `WalletInterface`), `walletId`, `signedIn`, `error`, `wallets`, `connect({ walletId? })`, `disconnect()`, `listWallets()`, `pay`, `tip` and `buyToken`.\n\n`connect()` finds wallets and signs in through your routes when `challengeUrl` and `verifyUrl` are set, with **one wallet sheet**: the challenge comes first (no key), then the identity key and the signature are asked for together, and a repeat sign-in on the same site is the signature alone. With bWalletX in the browser there is no chooser at all (0.5.6); without it the chooser opens with \"Get bWalletX\" first, and another wallet is used only when picked (see \"Which wallet signs in\"). Nothing touches `window` during render, so the provider is safe in server-rendered pages. After a reload the session comes back from `sessionUrl`, but `wallet` stays `null` until the user calls `connect()` again.\n\n### Drop-in: provider + one element + 3 routes\n\nThe official element follows the provider, so one element gives the whole experience: **Sign in with bWalletX** → **Approve in bWalletX…** (with one line: \"Sign in: shares only your public identity key, moves no money\") → a signed-in badge (bAvatar, $handle or a short key, gold dot) whose menu has **Copy paymail/key** and **Disconnect**. A reload restores the badge from `sessionUrl` with no wallet prompt. A no in the wallet reads \"Sign-in cancelled\" with **Retry**.\n\n```tsx\n<BwalletXProvider challengeUrl=\"/api/bwalletx/challenge\" verifyUrl=\"/api/bwalletx/verify\"\n  logoutUrl=\"/api/bwalletx/logout\" sessionUrl=\"/api/bwalletx/session\">\n  <BwalletxSignin size=\"sm\" />   {/* in your header; that's all */}\n</BwalletXProvider>\n```\n\nYour own UI instead: `const { status, identityKey, paymail, handle, label, avatarUrl, error, login, logout } = useBwalletXAccount();` (`status`: `restoring | signed-out | pending | signed-in | error`).\n\n**Upgrade the server too.** The one-sheet order needs a challenge route that accepts no key: `createChallenge` / `createBwalletXAuth` from 0.5.5. Against an older server the browser sees the refusal and falls back to the old order (two sheets) by itself; `challengeNeedsIdentityKey` skips the attempt.\n\n## Payments\n\nOther bCorp apps: use `tip()` for the default Tip button (the same one-sheet tip bWalletX shows on artists, NFTs, chat, Friends and Spaces).\n\n```ts\nimport { pay, tip, buyToken } from '@bwalletx/connect';\n\nawait pay(wallet, { to: 'alice@example.com', sats: 5000, memo: 'Album' }); // paymail\nawait pay(wallet, { to: '1Abc...', usd: 1 });                              // address; WhatsOnChain rate, or pass usdPerBsv\nconst r = await pay(wallet, { to: identityKeyHex, sats: 100 });            // BRC-29; r.remittance goes to the recipient\nawait buyToken(wallet, { token: '$BOASE', amount: 100, quote: (q) => fetch('/api/quote', { method: 'POST', body: JSON.stringify(q) }).then((x) => x.json()) });\n```\n\nEach call makes one `createAction`, and nothing is ever retried. Failures throw a `PaymentError` with a `code` (`BAD_REQUEST`, `RESOLVE_FAILED`, `RATE_FAILED`, `WALLET_REJECTED`, `WALLET_ERROR`, `NOT_SUPPORTED`, `INSUFFICIENT_FUNDS`). A wallet with no coins for the fee (0.7.0: the SDK's `WERR_INSUFFICIENT_FUNDS`, also over Metanet Desktop's JSON API, or a wallet's own \"insufficient funds\") gives `INSUFFICIENT_FUNDS` with `maybeSent: false` and one plain line you can show as is: \"Your wallet doesn't have enough to cover this payment and its small network fee. Add a little and try again.\" (`NO_COINS_TEXT`; `isInsufficientFunds(e)` for your own calls). When `maybeSent` is true, the wallet may already have broadcast the payment, so check before you ask the user again. That includes a call that timed out in the bWalletX frame (`XDM_RESPONSE_TIMEOUT_MS`, 10 minutes, 0.8.0): the sheet may still be open and the wallet can still send it, so reconcile on your server (`verifyPayment`, or your own payment record) before offering a retry, and deliver only after server-side verification. Browsers often can't resolve paymails themselves because of CORS, so pass `resolvePaymail` to do it on your server.\n\n**Verify payments on your server.** A txid or BEEF that comes back to the page is only what the page was told: a\nbrowser extension, a modified page or (before 0.5.2) a parent frame posing as the wallet can return a fake one.\nDeliver nothing until your server has checked the payment:\n\n```ts\nimport { verifyPayment } from '@bwalletx/connect/server';\n\nconst r = await verifyPayment({\n  tx: body.tx ?? body.txid,                       // Atomic BEEF / BEEF / raw hex, or a txid (fetched from WhatsOnChain)\n  expected: [{ address: SELLER_ADDRESS, satoshis: price }], // or { script: hex, satoshis }\n  requireSeen: true,                              // status from WhatsOnChain; or status: 'arc', arcUrl, arcApiKey\n});\n```\n\nEvery expected output has to be matched by a different output that carries at least the expected amount. Otherwise `verifyPayment` throws a `PaymentVerificationError` with a `code` (`OUTPUT_MISSING`, `TX_NOT_FOUND`, `NOT_SEEN`, `REJECTED`, `SPV_FAILED`, `BAD_TX`, `NETWORK`). Pass `spv: chainTracker` to check the merkle proofs in a BEEF as well.\n\n## Wallets and the picker\n\n`discoverWallets()` lists everything it can find, with bWalletX first:\n\n- every wallet that announces itself through BRC-100 discovery (bWalletX, Yours, Metanet and others)\n- bWalletX in its own app frame (XDM, only from bWalletX's origins)\n- a `window.CWI` that nobody announced, under a neutral name (\"Browser wallet\"); it is never taken for bWalletX\n- desktop wallets on localhost ports 3321 and 3301 (only with `probeLocal: true`; prefer `desktopOption()`, below)\n- phone pairing (`pairing: pairingModal()`)\n- any adapters you add in `extra`\n\n`pairingModal()` returns `PairingOptions` that draw the QR code and match code, so you no longer need your own QR library. On phones and tablets it shows an **Open bWalletX** button (the pairing universal link opens the app) and a web.bwalletx.com fallback instead of a QR; pass `mode: 'qr'` or `'app'` to force one.\n\n### Which wallet signs in (0.5.6)\n\nbWalletX is the default on our sites, and no other wallet may take the sign-in flow:\n\n1. **bWalletX is recognised by its own announcement** (`com.bwalletx.extension`, `space.bwallet.mobile`) or by the bWalletX app frame, never by who holds `window.CWI`. Metanet / BSV Desktop or Yours can set or overwrite `window.CWI`; `discoverBwalletX()` no longer takes it.\n2. **bWalletX here → straight to its sheet.** No site chooser. A small **Other wallets** link under the button opens the chooser (phone QR, other browser wallets, desktop wallets).\n3. **No bWalletX → the chooser, \"Get bWalletX\" first**, then what was detected. Another wallet is connected only when the user picks it, even when it is the only one.\n4. **No localhost probe on load.** \"Use Metanet Desktop or another BRC-100 wallet\" in the chooser (0.7.0; was \"Desktop wallet\") looks on localhost:3321 only when tapped, so Chrome's Local Network Access prompt follows a tap. `desktopOption()` (3321 / 3301) is still exported.\n\n`decideWallet(list, { chooser, picker, walletId, fastPath })` is the rule as a pure function; `runConnect`, `BwalletXProvider` and `<bwalletx-signin>` all use it. `chooseWallet(list)` is the chooser UI (`pickWallet` is the 0.5.5 one, still exported). If your site has its own chooser, call `decideWallet` first and show yours only when it answers `{ reason: 'chooser' }`:\n\n```ts\nimport { discoverWallets, decideWallet, chooseWallet, pairingModal } from '@bwalletx/connect';\n\nconst list = await discoverWallets({ pairing: () => pairingModal() });\nconst { option, reason } = decideWallet(list);            // bWalletX here → option, no chooser\nconst chosen = option ?? (reason === 'chooser' ? await chooseWallet(list) : null);\n```\n\n`BwalletXProvider fastPath={false}` (or `runConnect({ fastPath: false })`) restores the 0.5.5 picker rule. `connect({ chooser: true })` is the \"Other wallets\" link. `<bwalletx-signin other-wallets=\"auto|on|off\">` controls the link (auto: shown at lg/md when the element signs in).\n\n### Returning visitors (0.6.0 line, first published in 0.7.0)\n\nAfter a sign-in the user explicitly picked, the wallet **type** is remembered for the origin (`localStorage['bwx:wallet']`, e.g. `{ \"type\": \"io.yours\", \"substrate\": \"injected\" }`; never a key). The next tap goes straight to that wallet, with no chooser. On load nothing that could prompt fires: with a live session the provider picks the remembered wallet up by discovery alone, so `pay`/`tip` work after a reload; without one, the next tap connects. If the remembered wallet isn't bWalletX, the element shows **Some features need bWalletX · Switch** (and \"Switch to bWalletX\" in its menu); `useBwalletX()` exposes `needsBwalletX` and `switchToBwalletX()` for your own UI. Disconnect forgets the choice. Turn it off with `rememberChoice={false}` / `autoConnect={false}` on the provider or `remember=\"off\"` on the element.\n\n### Metanet Desktop and other BRC-100 wallets (0.7.0)\n\n**Use Metanet Desktop or another BRC-100 wallet** · *Metanet Desktop must be running on this computer.* A small link under `<bwalletx-signin>` (lg/md; `metanet=\"auto|on|off\"`), a row in the chooser, `useBwalletX().connectMetanet()` or `runConnect({ metanet: true })`. The same rules as the bChatX door:\n\n1. **bWalletX stays the default.** It is found by its own announcement only; the button's discovery never picks Metanet, remembered or not. No desktop wallet on localhost is picked without its own tap: not by `autoChoice` / `fastPath={false}`, not after `probeLocal`, and not from a remembered 0.6.0 \"Desktop wallet\" (`isLocalDesktop`).\n2. **Pinned, and only on its own tap.** `WalletClient('json-api')` on localhost:3321, never `'auto'` (which would let the bWalletX extension or `window.CWI` answer). A first visit makes no :3321 call on page load.\n3. **Remembered:** the wallet type (`bwx:wallet = { \"type\": \"metanet\", \"substrate\": \"json-api\" }`) and the identity keys known on this origin (`bwx:known-keys`, public keys only). A key counts as known only after your verify route accepted its sign-in (or it matches the server session); a plain connect adds nothing.\n4. **Back with Metanet remembered:** one silent attempt per page load, a 2 s window (`trySilentMetanet` / `runSilentMetanet`). It goes on only if Metanet returns an identity key already known here, since whatever answers on :3321 might be another profile or another local process. Otherwise the normal choice, with no error banner and no retry. With a server session, it only attaches the wallet when it holds the session's key.\n5. **\"Not you? Use another wallet\"** (shown while Metanet is remembered) and Disconnect forget the choice; `useBwalletX().forgetWallet()` for your own UI. A sign-in dropped this way lands nobody (`logoutUrl` ends a session its verify already set).\n6. **Computers only**, never inside a frame (`metanetOffered()`).\n7. **The minimum:** `getVersion`, `isAuthenticated` (never prompts), the identity key, then the sign-in signature, one request at a time. No protocol permission requests at connect.\n\nNothing on :3321 after a tap shows \"We couldn’t reach Metanet Desktop. Open it, then try again.\"\n\n**`logoutUrl` / `logout-url` is required whenever `verifyUrl` / `verify-url` is set.** \"Not you? Use another wallet\" and Disconnect end the session the verify route created by POSTing to it; without it a silent Metanet sign-in the person rejected would stay signed in. In development the provider and the element `console.warn` once when it is missing.\n\n**Telemetry.** `onAttempt` (provider prop, `runConnect` option) and the element's `bwalletx-attempt` event report one record per attempt: `{ walletType, substrate, outcome, ms }`. `walletType` is `'bwalletx'` or the other wallet's rdns / option id; `substrate` is how it reached the page (`extension`, `in-app`, `xdm`, `injected`, `window.CWI`, `json-api`, `cicada`, `pairing`, `adapter`); `outcome` is `signed-in`, `connected`, `cancelled`, `rejected`, `not-found` or `error`. No keys, addresses or identity data.\n\n## Migrating from HandCash Connect\n\n1. Keep your HandCash login for now and put it behind the same picker:\n   ```ts\n   import { handcashAdapter } from '@bwalletx/connect';\n   const handcash = handcashAdapter({\n     login: () => myExistingHandCashLogin(), // resolves { handle, paymail? } once signed in\n     pay: (req) => fetch('/api/handcash/pay', { method: 'POST', body: JSON.stringify(req) }).then((r) => r.json()),\n   });\n   <BwalletXProvider extraWallets={[handcash]} ... />\n   ```\n   **This adapter is transitional.** It wraps your own HandCash code; this package does not import any HandCash SDK. HandCash announced BRC-100 support in October 2026. Once that ships, HandCash shows up as an ordinary BRC-100 wallet and you can delete the adapter.\n2. Let existing users link their wallet. When someone already signed in with HandCash connects bWalletX, call `signInOrLink(identityKey, { currentUserId, ... })` (or `linkIdentity`) in `onVerified`. This links the identity to their existing account instead of creating a new one. If the identity is already linked to someone else, `IdentityLinkConflictError` turns into a 409 response.\n3. Replace HandCash payment calls with `pay` / `tip` / `buyToken`, and check them on the server with `verifyPayment` instead of HandCash payment webhooks.\n4. Remove the adapter when your users have moved over.\n\n## The nav wallet control: use only `<bwalletx-button>`\n\n**Use only this element for your site's wallet control. Don't add your own \"Get bWalletX\" or \"Connect\" links or buttons next to it.** It renders exactly one thing by state:\n\n| State | Shows |\n|---|---|\n| No wallet in this browser | **Get bWalletX** (a link: bwalletx.com/extension on desktop Chrome, /iphone, /android, else /get) |\n| A wallet here, not connected | **Connect bWalletX** (extension, in-app browser, or a QR to the phone app) |\n| Connected | The **$handle chip** (click to disconnect) |\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@bwalletx/connect/dist/bwalletx-connect.global.js\"></script>\n<header>… <bwalletx-button></bwalletx-button></header>\n```\n\nOr `import '@bwalletx/connect/element'`. Attributes: `size` (sm, md, lg), `get-url`, `discover-ms`, `lookup-url`. Events: `bwalletx-connected` `{ identityKey }` and `bwalletx-disconnected`.\n\n**Guard:** there is one per page. A second `<bwalletx-button>` hides itself. Legacy controls inside the same `<header>`/`<nav>` (`[data-bwx-connect]`, `.nav-connect`, `.nav-acct`, links to bwalletx.com/get) are hidden too. Each one hidden logs a console warning. Links in your page content are left alone.\n\n## The button\n\n`<bwalletx-signin>` is the standard \"Sign in with bWalletX\" button: a web component with no dependencies (Shadow DOM), plus a React wrapper. It is the gold button from bit-sign's sign-in card.\n\n```html\n<script src=\"https://unpkg.com/@bwalletx/connect@0.2.0\"></script>\n<bwalletx-signin challenge-url=\"/auth/bwalletx/challenge\" verify-url=\"/auth/bwalletx/verify\"></bwalletx-signin>\n<script>\n  document.addEventListener('bwalletx-signed-in', (e) => location.assign('/'));\n</script>\n```\n\nWith a bundler: `import '@bwalletx/connect/element'` registers the element. In React:\n\n```tsx\nimport { BwalletxSignin } from '@bwalletx/connect/react';\n\n<BwalletxSignin challengeUrl=\"/auth/bwalletx/challenge\" verifyUrl=\"/auth/bwalletx/verify\" onSignedIn={(d) => console.log(d.identityKey)} />\n```\n\n| Attribute | Values |\n|---|---|\n| `size` | `lg` (default), `md`, `sm`, `icon` |\n| `theme` | `gold` (default), `dark`, `light` |\n| `label` | `signin` (default), `continue`, `connect` |\n| `brand` | `bWalletX` (default), `bWallet` (store edition) |\n| `subtitle` | `on`, `off`, or your own text. Default \"also works with bWallet\" on lg/md |\n| `full-width`, `loading`, `disabled` | flags |\n| `challenge-url`, `verify-url` | run the sign-in flow on click: POST `{}` (one sheet; `{ identityKey }` on a repeat sign-in), then POST `{ identityKey, nonce, signature }` |\n| `session-url`, `logout-url` | restore the signed-in badge on load (no wallet prompt); POST on Disconnect |\n| `lookup-url` | paymail lookup for the badge (default pay.bwallet.space; `off`) |\n| `stateless` | the pre-0.5.5 plain button: no badge, no pending/error states |\n| `state` (+ `identity-key`, `paymail`, `handle`, `avatar-url`, `error`) | drive the states yourself; `<BwalletxSignin>` inside `<BwalletXProvider>` does this for you |\n| `get-url`, `web-url` | where \"Get bWalletX\" and the web wallet link go (bwalletx.com/get, web.bwalletx.com) |\n| `href` | navigate on click instead |\n| `authorize-url`, `client-id`, `redirect-uri`, `scope` | OAuth 2.1 redirect with S256 PKCE (verifier, state and nonce in `sessionStorage[\"bwalletx:oauth\"]`). For auth.bwalletx.com, which is planned and not live yet |\n\nEvents (bubbling, composed): `bwalletx-signin` on every click (call `preventDefault()` to run your own flow instead), `bwalletx-signed-in` with `{ identityKey, method, nonce, signature, response }`, `bwalletx-not-found` (the button then shows \"Get bWalletX\" and a web wallet link), `bwalletx-error` with `{ error }`, `bwalletx-disconnect` (cancelable; Disconnect in the badge menu) and `bwalletx-signed-out`.\n\nStates: signed out → pending (\"Approve in bWalletX…\" plus one plain line) → signed in (the badge; its menu is a body-level portal, so an `overflow:hidden` header never clips it, and it is keyboard operable: Enter/↓ opens, arrows move, Esc closes) or error (one line plus Retry).\n\nWithout `challenge-url`, `href` or `authorize-url` the button only fires `bwalletx-signin`. The built-in flow uses the extension or in-app browser only. For phone pairing, listen for `bwalletx-signin`, call `preventDefault()`, and call `signInWithBwalletX` with `pairing` as shown above.\n\nSVG files, and an HTML/CSS version with no JavaScript, are in `assets/`. All variants: `examples/buttons.html`. Placement, sizes and do/don't: [BRAND.md](./BRAND.md). The names and logo are not MIT licensed: [TRADEMARKS.md](./TRADEMARKS.md).\n\n## Sign in on the same phone (0.9.0)\n\nOn a phone, \"Sign in with bWalletX\" opens the bWalletX app, which signs in on its Connect card and sends the user back\nto your site. Needs bWalletX 5.2.61+. The provider and `<bwalletx-signin>` do all of it with no extra setup: no keys,\nno new routes. `pairBwalletX` and `resumeReturnedPairing` are the parts.\n\n**Load connect before any third-party script** (analytics, session replay, history sync). The wallet's return lands as\n`#bwx=ok&…`; connect removes it from the address bar the moment its module loads, and on every `hashchange`, so a\nscript that loads later never reads it.\n\nWhat each piece stops:\n\n| Piece | Stops |\n| ----- | ----- |\n| Reconnect on `visibilitychange`/`pageshow`, re-send on `ready` | The sign-in hanging because iOS froze the tab and killed its socket. |\n| Only reads are re-sent (not even the sign-in signature); an unsent call goes once | A second payment sheet after a reconnect (bWalletX's answered-id record is in memory). |\n| The wallet returns only to the ROOT of the exact origin the relay saw; the page is kept in this browser | A link sending the user to a path or subdomain someone else chose; OAuth codes or tokens leaking into the link. |\n| The sign-in signature travels ONLY in the return fragment, never over the relay | A script that claims your origin to the relay (it can set any `Origin` header) taking the signature: the wallet opens the fragment in the user's own browser, at that origin. |\n| The fragment counts only after the relay's wallet says hello with the same key; it is taken once, then deleted | Someone holding the link forging a fragment that pairs your page with their wallet or signs the user into their account. |\n| The fragment is stripped at module load and on `hashchange` | Analytics, session replay or history sync reading a fragment before it is used. |\n| Every sheet sent over the relay says \"a site that claims to be <host>\" | Users trusting a host name the relay can't vouch for. (No origin proofs: a proof route can't tell a browser from a script.) |\n| A card expires with its code and signs with the account it opened under | A stale card, or a sign-in under an account switched to meanwhile. |\n\n## Server\n\n```ts\nimport { createChallenge, verifySignIn, originAllowed, memoryStore } from '@bwalletx/connect/server';\n\nconst ORIGIN = 'https://example.com'; // your site, from config. Never from the request.\nconst store = memoryStore();          // dev only. See \"Nonce store\" below.\n\n// POST /auth/bwalletx/challenge   body: {} (or { identityKey })\napp.post('/auth/bwalletx/challenge', async (req, res) => {\n  if (!originAllowed(req.get('origin'), ORIGIN)) return res.status(403).end();\n  try {\n    res.json(await createChallenge({ origin: ORIGIN, identityKey: req.body?.identityKey, store }));\n  } catch (e) {\n    res.status(400).json({ error: (e as Error).message });\n  }\n});\n\n// POST /auth/bwalletx/verify   body: { identityKey, nonce, signature }\napp.post('/auth/bwalletx/verify', async (req, res) => {\n  if (!originAllowed(req.get('origin'), ORIGIN)) return res.status(403).end();\n  const identityKey = await verifySignIn({ origin: ORIGIN, store, ...req.body });\n  if (!identityKey) return res.status(401).json({ error: 'That signature was not accepted. Start again.' });\n  // Find or create the user keyed on identityKey, then start your own session.\n  res.json({ identityKey });\n});\n```\n\n`verifySignIn` returns the identity key (66 lowercase hex characters) or `null`. It refuses a nonce that was already used, has expired (2 minutes), was issued for another origin or another identity key, or whose signature doesn't verify. Since 0.5.5 `identityKey` is optional in `createChallenge`: a challenge made without one binds the key the browser claims at verify, and the signature only verifies for that key. That lets the browser ask the wallet for the key and the signature in one sheet.\n\nThe text the wallet signs:\n\n```\nSign in to example.com with bWallet\n\nThis proves you hold this wallet. It does not spend anything.\n\nOrigin: https://example.com\nNonce: <nonce>\nExpires: <ISO time>\n```\n\nIt is signed with BRC-100 `createSignature`, protocol `[2, 'bwallet sign in']`, keyID = the nonce, counterparty `'anyone'`. bChat and bit-sign use the same format.\n\n### Nonce store\n\n```ts\ninterface NonceStore {\n  put(nonce: string, c: PendingChallenge): Promise<void> | void;\n  take(nonce: string): Promise<PendingChallenge | null> | PendingChallenge | null; // read AND delete\n}\n```\n\n`take` must read and delete in one step. `verifySignIn` calls it before checking anything else, so each nonce gets exactly one attempt.\n\n`memoryStore()` keeps challenges in the process. It is lost on restart and isn't shared between processes or serverless instances, so it prints a warning the first time it is used. If you leave out `store`, a shared in-memory store is used and you get the same warning. In production it warns louder. Use one of the built-in shared stores, which need no driver dependency because you pass your own client:\n\n- `redisStore({ client })`: Upstash, Vercel KV or node-redis as they are, or ioredis with `flavor: 'ioredis'`. It uses `GETDEL`, so you need Redis 6.2 or later.\n- `pgStore({ query })`: any `(sql, params)` function (node-postgres, postgres.js, Neon). It deletes each nonce with `DELETE ... RETURNING`, and `pgNonceTableSql()` gives you the table.\n\nAlso rate-limit the challenge route per IP. It is unauthenticated.\n\n## Browser\n\n```ts\nimport { signInWithBwalletX, renderButton } from '@bwalletx/connect';\nimport QRCode from 'qrcode'; // any QR library\n\nconst panel = document.getElementById('bwx-pair')!;\n\nrenderButton('#bwx-button', {\n  onClick: async (button) => {\n    button.disabled = true;\n    try {\n      const r = await signInWithBwalletX({\n        challenge: (identityKey) => post('/auth/bwalletx/challenge', { identityKey }),\n        pairing: {\n          onLink: async (link) => {\n            panel.innerHTML = `<img src=\"${await QRCode.toDataURL(link)}\" alt=\"Scan with bWalletX\">`;\n          },\n          onCode: (code) => panel.append(`Check bWalletX shows ${code}, then tap Connect.`),\n        },\n      });\n      await post('/auth/bwalletx/verify', { identityKey: r.identityKey, nonce: r.nonce, signature: r.signature });\n      // r.method is 'extension', 'in-app' or 'pairing'\n    } finally {\n      button.disabled = false;\n    }\n  },\n});\n\nasync function post(url: string, body: unknown) {\n  const res = await fetch(url, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) });\n  if (!res.ok) throw new Error((await res.json().catch(() => ({}))).error ?? `HTTP ${res.status}`);\n  return res.json();\n}\n```\n\n`signInWithBwalletX` finds a wallet in this order:\n\n1. The bWalletX Chrome extension: BRC-100 discovery, `rdns` `com.bwalletx.extension`. Gives `method: 'extension'`.\n2. The bWalletX app's in-app browser: `rdns` `space.bwallet.mobile`, or `window.CWI` if nothing announced. Gives `method: 'in-app'`. Note that `window.CWI` can also be set by another wallet.\n3. A pairing stored by an earlier sign-in on this browser (`reusePairing`, default on).\n4. A new pairing, if you passed `pairing`. Show the link as a QR code for the phone, and as text the user can paste into web.bwalletx.com. Both screens show the same 4-digit code. Gives `method: 'pairing'`.\n\nIf none of these works, it throws an error with `code: 'NOT_FOUND'`.\n\nIt returns `{ identityKey, signature, nonce, method, wallet }`. Post the first three to your verify route. `wallet` is a BRC-100 `WalletInterface` you can keep using.\n\n### Lower-level pieces\n\n| Export | What it does |\n|---|---|\n| `findBwalletX(ms?)` | The extension or in-app wallet, or `null`. |\n| `discoverBwalletX(ms?)` | The same, plus `method` and `rdns`. |\n| `pairBwalletX({ onLink, onCode, storage?, signal?, socket?, origin?, relay? })` | Pair over the relay. Resolves with a wallet when the user taps Connect. |\n| `restorePairing({ storage? })` | The wallet from a stored pairing, or `null`. It connects on the first call. |\n| `clearPairing()` | Delete the stored pairing without telling the wallet. |\n| `wallet.close()` / `wallet.forget()` | On a paired wallet: close the socket, or unpair and delete it. |\n| `connectBwalletX(opts)` | The wallet-finding half of `signInWithBwalletX`. |\n| `renderButton(el, { onClick?, subtitle? })` | Draws the gold button into `el`. |\n| `inOrder(handler)` | Wraps an async WebSocket handler so frames run one at a time, in order. |\n\n### Pairing storage\n\nThe pairing is saved under `bwalletx.connect.pairing.v1` in `localStorage` by default. It holds a random pairing key (not a wallet key), the wallet's pairing public key, the channel, and the message counters. To store it elsewhere, pass `storage` (anything with `getItem`, `setItem` and `removeItem`, sync or async). Pass `storage: null` to keep it in memory only.\n\n### Frame order\n\nThe phone sends a plain `hello` and then, as soon as the user taps Connect, an encrypted `ready`. An async `onmessage` handler that is still deriving the key from `hello` when `ready` arrives drops `ready`, and pairing never finishes. This package handles frames one at a time in arrival order (`inOrder`). `test/pair.test.ts` reproduces the race.\n\n### Relay claims\n\nSince 0.5.4 the site side sends a role claim to the relay on every connect, and a digest of the QR-bound wallet claim when it opens a channel. Only the socket with your claim can take the site role, and only a phone that scanned your QR can take the wallet role. The relay (relay.bwallet.space) keeps a compatibility window for older sites and wallets until **30 Nov 2026**: until then a site without a claim can still open a channel and an older wallet can still join one. After that date the relay refuses both, so update `@bwalletx/connect` (or a copied `protocol.ts` + pairing code) before then. Sites that copied the pairing code must send `claim` on every site socket (keep it with the pairing) and `wc = claimDigest(await walletClaimFor(channel, sitePub))` when opening a new channel.\n\n## One script tag\n\n```html\n<script src=\"https://unpkg.com/@bwalletx/connect/dist/bwalletx-connect.global.js\"></script>\n<script>\n  const { signInWithBwalletX, renderButton } = window.bWalletXConnect;\n</script>\n```\n\nThis build includes `@bsv/sdk` and `qrcode-generator` (the whole build is about 555 KB minified, 170 KB gzipped). The server functions are not in it. It starts with a licence banner; if you self-host the file, keep `THIRD_PARTY_LICENSES.md` and `third-party/bsv-sdk/` from the package with it (`@bsv/sdk`'s notices ask for that).\n\n## bApp shell\n\n`@bwalletx/connect/shell` gives every bApp the same 5-slot bar as the bWalletX dock: **Wallet · Exchange · (b) · Feed · Chat**, each scoped to your app. Your app's Home and sections live in a drawer opened from the app icon, top left. On the web the package draws the bar; inside bWalletX it hides it and the wallet's native dock drives your app instead.\n\n![bApp shell at 390px](docs/screens/shell-390.png)\n\n1. Serve `/.well-known/bapp.json` (schema: [`schema/bapp.schema.json`](schema/bapp.schema.json), sample: [`examples/bapp.bmovies.json`](examples/bapp.bmovies.json)). All paths are same-origin; a slot you don't use is `\"enabled\": false` (shown greyed out, never hidden).\n2. Add the elements:\n\n```html\n<bwalletx-topbar drawer=\"sections\"></bwalletx-topbar>\n<main>…</main>\n<bwalletx-drawer id=\"sections\"></bwalletx-drawer>\n<bwalletx-bar active=\"feed\"></bwalletx-bar>\n<script type=\"module\">\n  import { defineBappShell, loadManifest, applyManifest, startShellBridge } from '@bwalletx/connect/shell';\n  defineBappShell();\n  const manifest = await loadManifest();      // fetches and validates /.well-known/bapp.json\n  applyManifest(manifest);\n  startShellBridge({ manifest });             // inside bWalletX: hide the bar, follow the wallet's dock\n</script>\n```\n\nReact:\n\n```tsx\nimport { BappTopbar, BappDrawer, BappBar } from '@bwalletx/connect/shell/react';\n<BappTopbar manifest={m} drawer=\"sections\" />\n<BappDrawer id=\"sections\" manifest={m} manualNavigation onNavigate={(d) => router.push(d.path!)} />\n<BappBar manifest={m} active={slot} manualNavigation onNavigate={(d) => router.push(d.path!)} />\n```\n\nNo bundler: `<script src=\"https://unpkg.com/@bwalletx/connect/dist/bwalletx-shell.global.js\">` registers the elements and exposes `window.bWalletXShell`.\n\n| Element | Attributes | Events (bubble, composed) |\n|---|---|---|\n| `<bwalletx-bar>` | `active`, `in-wallet` (`auto`/`true`/`false`), `navigate=\"manual\"`; property `manifest` | `bapp-navigate {slot, path}` (cancelable), `bapp-active {slot}`, `bapp-b-press`, `bapp-b-hold {phase}` |\n| `<bwalletx-topbar>` | `title`, `subtitle`, `drawer` (id), `menu=\"true\"`, `strip=\"off\"`, `in-wallet`; slots `strip-left`, `strip-right`, `tools` | `bapp-menu`, `bapp-close`, `bapp-drawer-toggle` (cancelable) |\n| `<bwalletx-drawer>` | `open`, `current` (path), `in-wallet`, `navigate=\"manual\"` | `bapp-navigate {path}` (cancelable), `bapp-close` |\n\n`bapp-navigate` goes to the manifest path with `location.assign` unless you call `preventDefault()` or set `navigate=\"manual\"`, so SPAs route themselves. Inside the wallet, ☰ and ✕ appear in the top bar and the drawer gets \"Back to bWalletX\".\n\nAPI: `validateManifest(json)` → `{ok, manifest, errors}`, `parseManifest`, `loadManifest(path?)`, `isSameOriginPath`, `slotPath`, `detectWalletUA(ua?)`, `walletState()`, `ShellBridge` / `startShellBridge({manifest, walletOrigins?})`, `defineBappShell()`, `applyManifest(m)`, `TOKENS`. The wallet message protocol is in [docs/SHELL-PROTOCOL.md](docs/SHELL-PROTOCOL.md). Demo: `examples/shell.html` (after `pnpm build`; `?wallet=1` shows the in-wallet top bar, `#drawer` opens the drawer).\n\n## Limits\n\n- Sign-in proves the identity key and nothing else: no handle, paymail or name. Use `onVerified` to look them up and add them yourself.\n- The identity key is the same on every site that uses this method, so two sites can tell it is the same wallet.\n- `relay.bwallet.space` is run by The Bitcoin Corporation. It has no published uptime guarantee and allows about 60 frames a minute per channel.\n- There is no hosted sign-in page or OAuth-style redirect (auth.bwalletx.com is planned). You run the routes yourself; `@bwalletx/connect/next` gives you ready-made ones.\n\n## Testing\n\n```sh\npnpm test        # unit tests: challenge/verify, frame order, reload, sign-in paths\npnpm test:live   # pairs with a simulated phone over the real relay.bwallet.space\n```\n\nTo test your own server without a wallet, sign with `new ProtoWallet(PrivateKey.fromRandom()).createSignature(...)` using the same arguments. That is the signature bWalletX makes.\n\n`src/protocol.ts` is copied unchanged from bWalletX `src/pair/protocol.ts`. Don't edit it; the app must understand every byte.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}