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

@functional-bitcoin/cli

v0.1.0-beta.2

Published

**🚨 Alert: Functional Bitcoin is VERY beta software with frequent breaking changes. Brave pioneers only until the beta tag is removed.**

Downloads

9

Readme

license

Functional Bitcoin :: CLI

🚨 Alert: Functional Bitcoin is VERY beta software with frequent breaking changes. Brave pioneers only until the beta tag is removed.

Command line utility to help author and publish functions to the Bitcoin (SV) blockchain, for use in extensible Bitcoin application protocols.

Installation

# Install cli
$ npm install -g @functional-bitcoin/cli@beta

# List available commands
$ fb --help 

Usage

Initialise your working directory. This will generate a .bit environemnt file containing your publishing address and private key.

$ fb init --help

$ fb init .

Create new functions. This will generate a blank function in the src folder of your working directory.

$ fb new --help

$ fb new my/function -a arg1 -a arg2

Publish functions to the blockchain. It is necessary to fund your publishing address (in the .bit file) with a few satoshis before publishing.

$ fb publish --help

$ fb publish my/function

Creating functions

A generated function will look like this:

function main(ctx, arg1, arg2)
  return ctx
end

Functions are scripts that define a main() function, although within the script any other necessary functions, classes and variables can be defined. The script is written using Lua, and executed within a sandboxed environment with the file and io modules removed.

A function represents a "cell" - an atomic subroutine within a "tape" (a transaction output). The return value of each cell is passed to the next cell in the tape. Thus cell by cell the tapes' result is calculated - pure functional programming on bitcoin!