npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bitmask-segwit

v0.7.0-rc.22

Published

Core functionality for the BitMask wallet

Downloads

61

Readme

BitMask Core

Core functionality for the BitMask wallet - https://bitmask.app

BitMask is a Bitcoin-only web wallet and browser extension for accessing decentralized web applications on the Bitcoin timechain. It is designed to support UTXO-based smart contracting protocols such as RGB, in addition to Lightning payments.

Build status Crates.io npm: bitmask-core License: MIT+APACHE Telegram

Uses

Build

This should work with either wasm-pack, trunk, or x86-64.

Some environment variables may be needed in order to compile on macos-aarch64, for more, see this.

If there are issues compiling, be sure to check you're compiling with the latest Rust version.

To build this as a NodeJS module, use: wasm-pack build --release --target bundler

Test

  1. Lint against wasm32: cargo clippy --target wasm32-unknown-unknown
  2. Run tests in browser: TEST_WALLET_SEED="replace with a 12 word mnemonic for a wallet containing testnet sats" wasm-pack test --headless --chrome

Run

To run the bitmaskd node with REST server, either for testing the web wallet, or simply for increased privacy:

cargo install --features=server --path .

Then run bitmaskd.

Development

Parts of this application are built with conditional compilation statements for wasm32 support. This is a helpful command for checking linting and correctness while also developing on desktop platforms:

cargo clippy --target wasm32-unknown-unknown --no-default-features --release

Release

Upon a new release, follow these steps:

  1. Run cargo update to update to latest deps.
  2. Run cargo +nightly udeps to see if there are any unused dependencies.

Docker

For running bitmask-core tests in Regtest Mode, please follow the steps below:

Initial Setup

  1. Load the command line: source .commands or if using fish shell, bass source .commands
  2. Build bitcoin node + electrum: docker-compose build.
  3. Up and running Docker containers: docker-compose up -d bitcoin1 electrs carbonado rgb-proxy.
  4. Download and install BDK cli: cargo install bdk-cli (We will use BDK to generate the mnemonic).
  5. Generate a new mnemonic: bdk-cli key generate.
  6. Create an environment variable called TEST_WALLET_SEED with mnemonic generated in the step 5 (only wasm32).
  7. Run the test to get regtest address for bitcoin and rgb: cargo test --test wallet -- create_wallet --exact --nocapture.
  8. Load your wallet in the bitcoin node: bc1 loadwallet default, or if using a new wallet, bc1 createwallet default.
  9. Generate new first 500 blocks: bc1 -generate 500.
  10. Send some coins to the main wallet address: bc1 sendtoaddress {MAIN_VAULT_ADDRESS} 10. Change {MAIN_VAULT_ADDRESS} with the address generated in the step 7.
  11. Mine a new block: bc1 -generate 1

Running the tests

Running the tests: cargo test -- --test-threads 1

Troubleshooting

1. After restarting the container

A.The bitcoin node does not work?

Check if your wallet is loaded. For that, run the command bitcoin1 loadwallet default.

B.The electrs node does not work?

To stop the electrs freeze, run bitcoin1 -generate.