{"_id":"@bitcoin-corporation/brc100-wallet","name":"@bitcoin-corporation/brc100-wallet","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bitcoin-corporation/brc100-wallet","version":"0.1.0","description":"Drop-in browser client for the BRC-100 Google Wallet API — sign in with Google, get a Bitcoin SV wallet.","author":{"name":"The Bitcoin Corporation Ltd"},"license":"MIT","main":"brc100-wallet.js","module":"brc100-wallet.js","browser":"brc100-wallet.js","types":"brc100-wallet.d.ts","unpkg":"brc100-wallet.js","jsdelivr":"brc100-wallet.js","exports":{".":{"types":"./brc100-wallet.d.ts","default":"./brc100-wallet.js"}},"keywords":["bsv","brc-100","brc100","wallet","bitcoin","google","sign-in","oauth","web3"],"sideEffects":false,"publishConfig":{"access":"public"},"_id":"@bitcoin-corporation/brc100-wallet@0.1.0","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-zvdL0tTG73BkEVYTBTmoack6oes4ai5IuAnuUzfsrflRf2a1QFn395GEHoUq9uCJhss4ORK0Rq9F3dGX8U8YYQ==","shasum":"eddd6cfc130acb9b9bb46dc23a65c9c7b3b02e33","tarball":"https://registry.npmjs.org/@bitcoin-corporation/brc100-wallet/-/brc100-wallet-0.1.0.tgz","fileCount":5,"unpackedSize":15730,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFj9vV1cx8AegjHnfh/nOQeUMC9Qu/n9R7ManC6yDc3fAiEAtvvDT7q2l3aQ4dhCHNDcPAcHDv6h0gaAWxLX5/ArPT4="}]},"_npmUser":{"name":"b0ase","email":"richardwboase@gmail.com"},"directories":{},"maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/brc100-wallet_0.1.0_1780657244016_0.4377031081423257"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-05T11:00:43.822Z","0.1.0":"2026-06-05T11:00:44.163Z","modified":"2026-06-05T11:00:44.425Z"},"maintainers":[{"name":"b0ase","email":"richardwboase@gmail.com"}],"description":"Drop-in browser client for the BRC-100 Google Wallet API — sign in with Google, get a Bitcoin SV wallet.","keywords":["bsv","brc-100","brc100","wallet","bitcoin","google","sign-in","oauth","web3"],"author":{"name":"The Bitcoin Corporation Ltd"},"license":"MIT","readme":"# @bitcoin-corporation/brc100-wallet\n\nDrop-in browser client for the [BRC-100 Google Wallet API](../README.md).\n**Sign in with Google → get a Bitcoin SV wallet**, in about five lines.\n\nMaintained by **The Bitcoin Corporation Ltd**.\n\n## Add it to your site\n\n### Option 1 — script tag (no build step)\n\n```html\n<div id=\"signin\"></div>\n\n<script src=\"https://YOUR-API-HOST/sdk/brc100-wallet.js\"></script>\n<script>\n  const wallet = new BRC100Wallet({ apiBase: 'https://YOUR-API-HOST' })\n\n  wallet.mountSignIn('#signin', {\n    onReady: async (s) => {\n      console.log('wallet:', s.wallet.identityKey, s.wallet.address)\n      console.log('balance:', (await wallet.balance()).satoshis, 'sat')\n    },\n  })\n</script>\n```\n\nThat's it. `mountSignIn` shows the real Google button if the API has a Client ID\nconfigured, or a dev-login form otherwise.\n\nYou can also load it from a CDN once published:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@bitcoin-corporation/brc100-wallet\"></script>\n```\n\n### Option 2 — npm\n\n```bash\nnpm install @bitcoin-corporation/brc100-wallet\n```\n\n```js\nimport BRC100Wallet from '@bitcoin-corporation/brc100-wallet'\n\nconst wallet = new BRC100Wallet({ apiBase: 'https://YOUR-API-HOST' })\nawait wallet.mountSignIn('#signin', { onReady: (s) => console.log(s.wallet) })\n```\n\n## API\n\n```js\nconst wallet = new BRC100Wallet({ apiBase, storageKey?, autoResume?, storage? })\n\n// auth\nwallet.mountSignIn(target, { onReady, onError, button })\nawait wallet.signInWithGoogleCredential(idToken)   // if you render your own button\nawait wallet.devSignIn('user-id')                  // dev only\nwallet.isSignedIn()\nwallet.signOut()\n\n// wallet\nawait wallet.getWallet()            // { network, identityKey, address }\nawait wallet.balance()              // { satoshis, outputs, basket }\nawait wallet.outputs({ limit })     // UTXOs\nawait wallet.actions({ limit })     // history\nawait wallet.pay({ to, satoshis, description })\nawait wallet.sign({ data })\nawait wallet.encrypt({ plaintext })\nawait wallet.decrypt({ ciphertext })\nawait wallet.exportKey()            // migrate to self-custody\n```\n\nThe session token is persisted (localStorage by default) so users stay signed in.\n\n## Publishing (maintainers)\n\nThe package is publish-ready (`npm pack --dry-run` ships 5 files, ~5 kB).\n\n```bash\n# one-time: create the @bitcoin-corporation org on npmjs.com, then:\nnpm login\n\ncd sdk\nnpm publish        # publishConfig.access is already \"public\"\n```\n\nNotes:\n- The `@bitcoin-corporation` scope must exist as an npm org you belong to.\n- Bump `version` in `package.json` before each publish.\n- After publishing, the CDN URL works automatically:\n  `https://cdn.jsdelivr.net/npm/@bitcoin-corporation/brc100-wallet`\n\n## License\n\nMIT © The Bitcoin Corporation Ltd\n","readmeFilename":"README.md","_rev":"1-8d012234d7616f7695d488fc9c9191fe"}