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

@test-org122/hypernet-core

v0.0.5

Published

Hypernet Core. Represents the SDK for running the Hypernet Protocol.

Downloads

2

Readme

core

Purpose

Hypernet Core is meant to be a drop-in component of applications that wish to quickly and easily send funds from a service or product consumer to a service or product provider. It is meant to be a payment protocol that allows funds to be sent quickly, often, and with minimal (or no!) fees (most of the time). While developers that build on top of Hypernet Core may need to somewhat know how it works, the goal is for the Core to be completely transparent to end users - they shouldn't even need to know how blockchain works, or even what blockchain is, in order to use the Core.

Key Concepts

As a developer or contributor to the Core, there are a few key concepts that need to be understood; most relate to blockchain and the underlying technologies used by the core.

Hypernet Core as a Serverless Payment Infrastructure Protocol

Most payment protocols requires a central server infrastructure; Visa processes credit card transactions via mainframes; Stripe processes payments in their cloud.

Hypernet Core is peer to peer and serverless - mostly. Right now (as of Q4 2020), two clients communicate with each other via a central NATS messaging server, and payments are routed (via the Vector protocol) via a routing node to the end participant.

Though the routing node is an active participant in transfers, it has no knowledge of participant activity otherwise; it simply routes a payment from one person to another. Routing nodes never have custody of end user funds, and if they go (even permanently) offline, funds are not lost (though the end users that had active payment channels open will have to submit a blockchain transaction in order to claim their funds; more on that in the payment channels section!)

Blockchain, Payment Channels, & Layer 2

Developers will need to know the basics of how blockchain works, as well as what payment channels are and how they work at a high level overview, in order to develop Hypernet Core.

Blockchain & Ethereum

Though most of the payments and activity occur at Layer 2 (see below), the Core must go down to Layer 1 for disputes, deposits, withdrawals, and other (hopefully rare) occasions.

As of Q4 2020, the Ethereum blockchain is capable of processing only 15 transactions per second; the supply and demand market for the fees associated with transactions on the blockchain, paired with this slow transaction speed, mean that individual transactions can be costly (sometimes as much as a few dollars!)

Helpful links / primers on blockchain, smart contracts, and Ethereum below:

Payment Channels & Layer 2

As noted above, transacting on Ethereum itself is still slow. Thus, "Layer 2" solutions are needed. Layer 2 refers to the group of solutions that allow applications to transact "off-chain", and return to the chain when trust or communication breaks down. The below link is a very good primer & high level overview on layer 2 in general. Pay particular attention to the section on "Channels" - this is what Hypernet Core uses.

Hypernet Core specifically uses the payment channel framework developed by Connext called "Vector". In-progress documentation and a quick start guide on Vector can be found at the below link.

Definitions & Key Terms

Hypernet Link

A Hypernet Link is an abstraction representing the collective group of payments & transfers between two participants in the Hypernet Core ecosystem - namely, a service/product provider and a service/product consumer.

There can be up to two Hypernet Links between two individuals/clients - one where Alice is a consumer and Bob is a provider, and one where Alice is a provider and Bob is a consumer.

Payment Channel

Similar to a Hypernet Link, but at a lower level of abstraction; a payment channel represents an agreed-upon set of parameters between two participants on the Ethereum blockchain. When using the term payment channel henceforth, we are specifically referring to payment channels within the Connext/Vector framework.

Important - Note the difference between a Hypernet Link and a Payment Channel, and at what layers they each live. It can be very easy to confuse the two if one isn't careful

System Architecture

Hypernet Core is built using a layered architecture with 4 layers; see the system diagram below for a brief description of each one and a sample of the modules within.

HypernetCore System Architecture

Usage

This will be one of the last sections filled in. For now, see the web-demo package.

const core = require('core');	
// TODO: DEMONSTRATE API