Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@dario_nakamoto/bdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@dario_nakamoto/bdk

A modern, lightweight, descriptor-based wallet library for WASM and JS/TS

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

The Bitcoin Dev Kit: WebAssembly

The Bitcoin Dev Kit for Browsers and Node

NPM Package MIT or Apache-2.0 Licensed Rustc Version 1.63.0+ Chat on Discord

Built with 🦀🕸 by The Rust and WebAssembly Working Group

About

The bdk-wasm library aims at providing access to the excellent BitcoinDevKit to JS and Node environments (and eventually any device supporting WebAssembly). It specializes in compiling BDK on the wasm32-unknown-unknown target and use wasm-bindgen to create TypeScript bindings.

This repo handles the packaging and publishing of the bdk NPM package, using wasm-pack.

This library offers all the desired functionality to build a Bitcoin wallet out of the box:

  • UTXO management
  • Coin selection
  • Wallet upates by syncing and scanning the chain data
  • Bitcoin descriptors for flexibility in the definition of spending conditions. Supports all address types from legacy to Taproot.
  • State update and persistence
  • Transaction creation, signing and broadcasting
  • Dynamic addresses
  • and much more

For a lightweight library providing stateless utility functions, see bitcoinjs.

Browser Usage

yarn add bdk

Development Environment

Requirements

MacOS special requirement

On MacOS, you should replace the default llvm with the one from brew:

brew install llvm

We recommend creating a .cargo folder at the root of the repo with the following config.toml file:

[env]
AR = "/opt/homebrew/opt/llvm/bin/llvm-ar"
CC = "/opt/homebrew/opt/llvm/bin/clang"

Build with wasm-pack build

wasm-pack build

Choose your desired features when building: wasm-pack build --features "esplora default snap bitcoind"

Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox

Works with --firefox, --chrome or safari.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Keywords

bitcoin

FAQs

Package last updated on 16 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts