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

@someping/somepingd

v1.0.3

Published

A decentralized chat protocol

Downloads

7

Readme

Somepingd - decentralized chat protocol

My goal is to create a fully encrypted and decentralized message protocol. A message sent from one user to another must be fully anonymous and sent without the need of any parties knowing each others identity or destination. To solve this, all sent messages can be encrypted with the recepients public key and broadcasted to all users over the network. Only the user whom owns the matching private key will be able to read the message - all other nodes will help by forwarding the message to their network. To reduce the problem with spam and flood, nodes will only broadcast messages that has an id generated with proof of work.

I have some other ideas that could make this work to. But I'll add them here later.

v1.0.0-alpha

  • Host a node and listen for peers
  • Broadcast messages to peers (clients)
  • Connect to other nodes

v1.0.1 todo

  • CLI: List connected peers
  • CLI: Connect to new node
  • Save all available nodes in a list.
  • CLI: List connected nodes
  • Broadcast messages to all nodes.

v1.0.2 todo (current - not stable)

  • Encrypt messages with recepients public key before broadcasting them.
  • Decode base64, check if recepient matches with owned public key and decrypt message with private key.

v1.0.3 todo

  • Sign each relaying nodes identifier in a blockchain to track number of relays.
  • Stop broadcasting message when blockchain have X relayblocks.
  • Split message into 3 chunks and send via different nodes.

Installation

Install latest stable (cooming soon)

$ npm install -g someping

Install development version (master branch)

$ git clone [email protected]:kjellberg/someping.git
$ cd someping && npm install
$ npm link # link binaries

Start server daemon

$ somepingd [--port 44545] [--host 127.0.0.1]

API console

Open the api console by browsing to http://217.0.0.1:44555

Connect to a node

#! http://217.0.0.1:45555
# Command: CONNECT <host[:port]>

$ connect 51.15.78.19
03:40:10 Connected to node: 51.15.78.19:44545

Generate a public key for receiving messages

#! http://217.0.0.1:45555
# Command: GENERATEPUBKEY

$ generatepubkey
03:40:14 Generating a new public key:
03:40:14 LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZ3d0RRWUpLb1pJaHZjTkFR
RUJCUUFEU3dBd1NBSkJBS3pvOUt3WDFPbThNcjE2bWkyTnpHc0xMOTZIRFlJawpYTR0ST
BHSGcxTFJsNEI5VHNXSGxsMVFaa3dBRUg1dGZWK1AvRU5QUHhVajdpdlZnZW12aGRzQ0F
3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==
03:40:14 Give your public key the users you want to receive messages from.

Send an encrypted message to a public key

#! http://217.0.0.1:45555
# Command: SENDMSG <pubkey> message...

$ sendmsg LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZ3d0RRWUpLb1pJaHZjTkFRRUJCUUFEU3dBd1NBSkJBTmxkbnAxa285V0NmYVNMWlpWby9qRktFbnhQYUtuLwpZandLNjlBeUhScmhxYUNZRFNHMHN1VXFYbEtkdjhHYnF4cFZ1SG43T0RSTlJYZ0ZLNkNaRTU4Q0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ== Hello, my friend!

List peers

#! http://217.0.0.1:45555
# Command: PEERS

$ peers
03:46:25 Total number of connected peers: 1
03:46:25 [{"address":"82.243.23.231","port":null,"public":false}]

List nodes

#! http://217.0.0.1:45555
# Command: NODES

$ nodes
03:40:25 Total number of connected nodes: 1
03:40:25 [{"address":"51.15.78.19","port":44545}]