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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bbc1-simple-library

v0.1.2

Published

Name ===== BBc-1(Beyond Block-chain One) Library, written in Javascript.

Downloads

12

Readme

Name

BBc-1(Beyond Block-chain One) Library, written in Javascript.

Overview

The library is implemented bbclib and bbc-app-rest-api functions on platform of BBc-1. It provides make transaction function, sign and verify transaction function, serialize and deserialize function for some collection of data on BBc-1 platform. (They are BBcTransaction, BBcEvent, BBcAsset, BBcSignature, BBcRelation, BBcReference, BBcCrossRef, BBcPointer and BBcWitness). It works on modern browsers(Firefox, IE, Edge, Chrome and Safari) and Node.js. The module is totally written in ES6+ and needed to get transpiled with babel for legacy environments.

※The design and detail of BBc-1 is following. BBc-1: https://github.com/beyond-blockchain/bbc1

Installation

At your project directory, do either one of the following.

・From npm/yarn:

$ npm install --save js-bbclib
$ yarn add js-bbclib

・From GitHub:

$ git clone https://github.com/t-hashimoto249/js-bbclib.git

Usage

First, you set up bbccore(:9000) and bbc-app-rest(:3000) on localhost or anther node.

・Make, serialize and sign transaction.

import * as bbclib from 'js-bbclib.js'

//make transaction
let user = "4d48ba82dc8607c9";
let user_id = new Buffer(user, "hex");
let keypair = new bbclib.KeyPair();
keypair.generate(); // or keypair.set_key_pair(private_key, public_key)
let tx = await bbclib.helper.make_transaction(user_id, 1, 0, true); # return BBcTransaction

//sign and add signature in transaction
await bbclib.helper.sign_and_add_signature(tx, keypair)

//serialize transaction for bson
let bsonobj = await tx.serialize(false, true);

//insert transaction in BBc-1
let xhr = new XMLHttpRequest();
let ip = "127.0.0.1"
xhr.open('POST', 'http://' + ip + ':3000/insert_transaction/' + domain, false);
xhr.setRequestHeader('Content-Type', 'application/json');
let parameter = {
       'source_user_id': user1,
       'transaction_bson': bbclib.helper.Base64.encode(bsonobj)
};

xhr.addEventListener("load", function (event) {
    //get response from bbc-app-rest
    if( event.target.status == 200 || event.target.status == 304 ) {    
       
    }else{
       
    }
       
});
xhr.send(JSON.stringify(parameter));

・Search, deserialize and verify transaction.

import * as bbclib from 'js-bbclib.js'

//make transaction
let user = "4d48ba82dc8607c9";
let user_id = new Buffer(user, "hex");
let keypair = new bbclib.KeyPair();
keypair.generate(); // or keypair.set_key_pair(private_key, public_key)
let tx = await bbclib.helper.make_transaction(user_id, 1, 0, true); # return BBcTransaction

//sign and add signature in transaction
await bbclib.helper.sign_and_add_signature(tx, keypair)

//serialize transaction for bson
let bsonobj = await tx.serialize(false, true);

//insert transaction in BBc-1
let xhr = new XMLHttpRequest();
let ip = "127.0.0.1"
xhr.open('POST', 'http://' + ip + ':3000/insert_transaction/' + domain, false);
xhr.setRequestHeader('Content-Type', 'application/json');
let parameter = {
       'source_user_id': user1,
       'transaction_bson': bbclib.helper.Base64.encode(bsonobj)
};

xhr.addEventListener("load", function (event) {
    //get response from bbc-app-rest
    if( event.target.status == 200 || event.target.status == 304 ) {    
       
    }else{
       
    }
       
});
xhr.send(JSON.stringify(parameter));

License

Licensed under the MIT license, see LICENSE file.

keyword

BBc-1, Block-Chain,