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

@bitcoin-computer/node

v0.12.0-beta.0

Published

Server Side Library for the Bitcoin Computer

Downloads

24

Readme

This library is the server side counterpart to the Bitcoin Computer Lib.

Installation

Clone the Bitcoin Computer Monorepo from GitHub. Move to monorepo/packages/node and copy the file .env.example into a file .env in the root folder.

You need to have Docker and yarn installed. You can install them manually or run the script setup.sh in the folder scripts.

Then close and reopen the terminal window to make sure that the Docker daemon is running and run yarn install.

git clone https://github.com/bitcoin-computer/monorepo.git
cd monorepo/packages/node
cp .env.example .env
./scripts/setup.sh
yarn install

Usage

Start the Node

To start the Bitcoin Computer Node on Litecoin (LTC) regtest run:

yarn up

You will see the logs of the services that make up the Bitcoin Computer Node: a Litecoin Node called node, a database called db and api server called bcn. Until the database is up and running, messages indicating connection attempts are be logged.

Use the -t option to start the node on testnet. Type yarn up -h to get the list of all configuration options. The node will start to download and sync to the Litecoin testnet blockchain.

yarn up -t

Fund the Wallet

You need to fund the wallet before you can run the tests. On regtest you can run

yarn fund-ltc <address1> [<address2> ... <addressN>]

On mainnet you need to send Litecoin to the address in question (you can find the address in the error message).

Run the Tests

To run the tests, execute

yarn test

Stop the Node

To stop the Bitcoin Computer Node run

yarn down

To stop the Bitcoin Computer Node, reset the database, delete all blockchain data, and stop all docker containers, run the following command

yarn reset

Syncing in parallel

If your machine has more than 4 cores you can run the sync process in parallel to shorten the synchronization time. This is only required on testnet and mainnet.

By default synchronization process is carried out in parallel by using all your available cores. Also, you can use a flag to indicate an specific number of dedicated cores.

yarn up -t -cpus 16

The synchronization process can be stopped at any time with the command yarn down. When you restart the process, it will continue from the last block processed.

Connect to Bitcoin Computer Lib

Have a look at the documentation for how to connect a Bitcoin Computer Lib instance to your Bitcoin Computer Node.

Server Costs

The following table shows the estimated times and costs for syncing to a Litecoin node on testnet. The costs are estimated using an AWS EC2 instance prices. All experiments were run using a 50GB SSD storage.

| CPUs | RAM | Sync Time | Monthly Costs | |------|------|-----------|----------------| | 2 | 16GB | 28h | 66.82 USD | | 4 | 16GB | 10h 30m | 108.28 USD | | 8 | 32GB | 7h 10m | 239.62 USD | | 16 | 32GB | 4h 44m | 440.64 USD |

Transaction Costs

While it is free to develop a Bitcoin Computer application, there is a small fee to run the application on the Bitcoin Computer on mainnet. The fees are used to support the development of the Bitcoin Computer.

Testnet and Regtest: The Bitcoin Computer will be free forever on regtest and testnet.

Mainnet The fees for the Bitcoin Computer are on average the same as the miners fees.

For example, if the miner transaction fees is $0.01, then you will pay $0.02: one cent to the miners, and one cent to support the development of the Bitcoin Computer.

Development Status

We are still aware of security issues so we do not recommend to use Bitcoin Computer in production yet. We are working on an internal audit to identify and fix all remaining security issues. We estimate that the audit and bug fixes will be completed in January 2023.

Documentation and Help

Have a look at the Bitcoin Computer Docs. If you find a bug or have any questions, please let us know in our Telegram group, on Twitter, or by email [email protected].

License

Creative Commons Attribution-NoDerivs 3.0 Unported

You are free to: share, copy, and redistribute the material in any medium or format for any purpose, even commercially under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material.

This is a human-readable summary of (and not a substitute for) the license.