{"_id":"@bitcoindevkit/bdk-wallet-web","_rev":"2-cc5c450b519f5cddbc8342c2fe0cb79c","name":"@bitcoindevkit/bdk-wallet-web","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@bitcoindevkit/bdk-wallet-web","version":"0.2.0","keywords":["bitcoin","descriptor","wasm","browser","node"],"license":"MIT OR Apache-2.0","_id":"@bitcoindevkit/bdk-wallet-web@0.2.0","maintainers":[{"name":"dario_nakamoto","email":"dario.anongba@gmail.com"}],"homepage":"https://github.com/bitcoindevkit/bdk-wasm#readme","bugs":{"url":"https://github.com/bitcoindevkit/bdk-wasm/issues"},"dist":{"shasum":"997068fa778d6bfd722e918dd0e1efbd4d9c4d42","tarball":"https://registry.npmjs.org/@bitcoindevkit/bdk-wallet-web/-/bdk-wallet-web-0.2.0.tgz","fileCount":7,"integrity":"sha512-aa6AOJeYMpGakrA/a2JKMkIp6YF87RDILmFJ6CMHNq3zYKVZKkP6MQacyO7unMgME3uhxwHM9Fd97rvmY5XVSg==","signatures":[{"sig":"MEQCIC9WCp+caJPVGOG0n+xmLLx+NpXawez50XAxB0JkEniWAiBWuJav+ZQBqsrguikt8pWYMoMEhYNDCc7TGYa2Vvh6RA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2337999},"main":"bitcoindevkit.js","type":"module","types":"bitcoindevkit.d.ts","gitHead":"1d1e82690a8a339ccc8cb27d619c56c4bddc5eaa","_npmUser":{"name":"dario_nakamoto","email":"dario.anongba@gmail.com"},"repository":{"url":"git+https://github.com/bitcoindevkit/bdk-wasm.git","type":"git"},"_npmVersion":"10.9.3","description":"A modern, lightweight, descriptor-based wallet library in WebAssembly for browsers and Node","directories":{},"sideEffects":["./bitcoindevkit.js","./snippets/*"],"_nodeVersion":"22.18.0","collaborators":["Bitcoin Developers"],"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdk-wallet-web_0.2.0_1756144742119_0.5184162284512133","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bitcoindevkit/bdk-wallet-web","type":"module","collaborators":["Bitcoin Developers"],"description":"A modern, lightweight, descriptor-based wallet library in WebAssembly for browsers and Node","version":"0.3.0","license":"MIT OR Apache-2.0","repository":{"type":"git","url":"git+https://github.com/bitcoindevkit/bdk-wasm.git"},"main":"bitcoindevkit.js","types":"bitcoindevkit.d.ts","sideEffects":["./bitcoindevkit.js","./snippets/*"],"keywords":["bitcoin","descriptor","wasm","browser","node"],"gitHead":"4c1602b6eefcfe05c2bf9b33570bfde2ab03cf43","_id":"@bitcoindevkit/bdk-wallet-web@0.3.0","bugs":{"url":"https://github.com/bitcoindevkit/bdk-wasm/issues"},"homepage":"https://github.com/bitcoindevkit/bdk-wasm#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-PutiQYKkjT4x9ydM0Y3JfaTLaFpcFUw5yQam8lPbOi1Z1EUiDRw+nfU3u+45oOgaGg9ZrzuIAWkwx/9Y0RxxMw==","shasum":"65f5f2980c5411e076ff4f5c59938055261fb62c","tarball":"https://registry.npmjs.org/@bitcoindevkit/bdk-wallet-web/-/bdk-wallet-web-0.3.0.tgz","fileCount":7,"unpackedSize":2352410,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHzYD2JfpB6SFaxvFqrgM8h6uFke2HkfELj1eo49gYgxAiEAh4AdAbOaWoTcHbc+mZyO9o7H+lduWMdxSAxa/+aJHQ0="}]},"_npmUser":{"name":"dario_nakamoto","email":"dario.anongba@gmail.com"},"directories":{},"maintainers":[{"name":"dario_nakamoto","email":"dario.anongba@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bdk-wallet-web_0.3.0_1773690560302_0.6808095947126278"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-25T17:59:02.033Z","modified":"2026-03-16T19:49:20.894Z","0.2.0":"2025-08-25T17:59:02.415Z","0.3.0":"2026-03-16T19:49:20.463Z"},"bugs":{"url":"https://github.com/bitcoindevkit/bdk-wasm/issues"},"license":"MIT OR Apache-2.0","homepage":"https://github.com/bitcoindevkit/bdk-wasm#readme","keywords":["bitcoin","descriptor","wasm","browser","node"],"repository":{"type":"git","url":"git+https://github.com/bitcoindevkit/bdk-wasm.git"},"description":"A modern, lightweight, descriptor-based wallet library in WebAssembly for browsers and Node","maintainers":[{"name":"dario_nakamoto","email":"dario.anongba@gmail.com"}],"readme":"<div align=\"center\">\n  <h1>The Bitcoin Dev Kit: WebAssembly</h1>\n\n  <img src=\"./static/bdk.png\" width=\"220\" />\n\n  <p>\n    <strong>The Bitcoin Dev Kit for Browsers, Node, and React Native</strong>\n  </p>\n\n  <p>\n    <a href=\"https://www.npmjs.com/package/@bitcoindevkit/bdk-wallet-web\"><img alt=\"NPM Package (Web)\" src=\"https://img.shields.io/npm/v/@bitcoindevkit/bdk-wallet-web.svg\"/></a>\n    <a href=\"https://www.npmjs.com/package/@bitcoindevkit/bdk-wallet-node\"><img alt=\"NPM Package (Node)\" src=\"https://img.shields.io/npm/v/@bitcoindevkit/bdk-wallet-node.svg\"/></a>\n    <a href=\"https://github.com/bitcoindevkit/bdk-wasm/blob/main/LICENSE-MIT\"><img alt=\"MIT or Apache-2.0 Licensed\" src=\"https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg\"/></a>\n    <a href=\"https://blog.rust-lang.org/2024/11/28/Rust-1.83.0.html\"><img alt=\"Rustc Version 1.83.0+\" src=\"https://img.shields.io/badge/rustc-1.83.0%2B-lightgrey.svg\"/></a>\n    <a href=\"https://discord.gg/d7NkDKm\"><img alt=\"Chat on Discord\" src=\"https://img.shields.io/discord/753336465005608961?logo=discord\"></a>\n  </p>\n\n</div>\n\n## About\n\nThe `bdk-wasm` library aims at providing access to the excellent [BitcoinDevKit](https://github.com/bitcoindevkit/bdk) to JS and Node environments (and eventually any device supporting WebAssembly).\nIt specializes in compiling BDK on the `wasm32-unknown-unknown` target and use [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) to create TypeScript bindings.\n\nThis repo handles the packaging and publishing of the `bdk-wallet-web` (for browsers) and `bdk-wallet-node` (for Node.js) NPM packages, using `wasm-pack`.\n\nThis library offers all the desired functionality to build a Bitcoin wallet out of the box:\n\n- UTXO management\n- Coin selection\n- Wallet upates by syncing and scanning the chain data\n- Bitcoin descriptors for flexibility in the definition of spending conditions. Supports all address types from legacy to Taproot.\n- State update and persistence\n- Transaction creation, signing and broadcasting\n- Dynamic addresses\n- and much more\n\nFor a lightweight library providing stateless utility functions, see [`bitcoinjs`](https://github.com/bitcoinjs/bitcoinjs-lib).\n\n## Installation\n\n### Browser/Web\n\n```sh\nyarn add @bitcoindevkit/bdk-wallet-web\n```\n\n### Node.js\n\n```sh\nyarn add @bitcoindevkit/bdk-wallet-node\n```\n\n## Notes on WASM Specific Considerations\n\n> [!WARNING]\n> There are several limitations to using BDK in WASM. Basically any functionality that requires the OS standard library is not directly available in WASM. However, there are viable workarounds documented below. Some key limitations include:\n>\n> - No access to the file system\n> - Network access is limited to http(s)\n\n### WASM Considerations Overview\n\n#### No access to the file system\n\nWith no direct access to the file system, persistence cannot be handled by BDK directly. Instead, an in memory wallet must be used in the WASM environment, and the data must be exported using `wallet.take_staged()`. This will export the changeset for the updates to the wallet state, which must then be merged with current wallet state in JS (will depend on your persistence strategy). The persisted `ChangeSet` can be passed to `wallet.load()` to recover the wallet.\n\n#### Network access is limited to http(s)\n\nThis essentially means the library only supports [Esplora](https://github.com/blockstream/esplora/blob/master/API.md) as blockchain client. Both RPC and Electrum clients require sockets and will not work for BDK in a WASM environment out of the box.\n\n## Development Environment\n\n### Requirements\n\n- Install [Rust](https://www.rust-lang.org/tools/install)\n- Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)\n\n#### MacOS special requirement\n\nRefers to [this section](./DEVELOPMENT.md#build-on-macos).\n\n### Build with `wasm-pack build`\n\n> [!IMPORTANT]\n> You need the `wasm32-unknown-unknown` toolchain to be installed:\n>\n> ```sh\n> rustup target add wasm32-unknown-unknown\n> ```\n\nTo build for browser/web:\n\n```sh\nwasm-pack build --target bundler --features \"esplora\"\n```\n\nTo build for Node.js:\n\n```sh\nwasm-pack build --target nodejs --all-features\n```\n\n### Test in Headless Browsers with `wasm-pack test`\n\n```sh\nwasm-pack test --headless --firefox\n```\n\n> Works with `--firefox`, `--chrome` or `--safari`.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <https://www.apache.org/licenses/LICENSE-2.0>)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/licenses/MIT>)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","readmeFilename":"README.md"}