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

plebnames

v0.2.4

Published

PlebNames are piggybacked names on Bitcoin. Just the Bitcoin chain and normal block explorers are required, no other server infrastructure or sidechain.\ A PlebName is unique and is owned by one clear pleb at a time (or with multisig a group of plebs).\

Downloads

211

Readme

About PlebNames

PlebNames are piggybacked names on Bitcoin. Just the Bitcoin chain and normal block explorers are required, no other server infrastructure or sidechain.
A PlebName is unique and is owned by one clear pleb at a time (or with multisig a group of plebs).
The owner of a Plebname (the one who claimed the name first) can attach data to it, like a Lightning Address or Nostr npub.
Try it out at http://plebnames.org.

Usage

npm install plebnames
import { bitcoinExplorer } from 'plebnames'

const nameHistory: PlebNameHistory|'unclaimed' = await bitcoinExplorer.followNameHistory('test')
if (nameHistory === 'unclaimed') {
	console.log('Name is not claimed yet.')
} else {
	console.log(nameHistory.getData())
	// {
	// 	owner: "bc1q88758c9etpsvntxncg68ydvhrzh728802aaq7w",
	// 	nostr: "npub1pcqz0y5zt6cfafazcu6h2vf9trghshxhdwypm0g8jf2nmuhmd6rqdcd82u",
	// 	website: "https://bitcoin.org"
	// }
}

Why PlebNames

PlebNames give every pleb a clear unique name that can be spoken and easily remembered.
For example when doing a transaction: Instead of typing in a long address you just type in the PlebName of a pleb. The wallet then looks in the Bitcoin mainchain to whom the PlebName belongs and resolves the PlebName to the actual address.

How can I get my PlebName

For example "Ego" is a great name, but there is one problem: How to let everbody know that we claimed "Ego" first because it is not indexed.
Fortunately Bitcoin addresses are indexed by every Bitcoin explorer, then let's convert our name to a Bitcoin address:
Convert your name to Bech32. As Bech32 is missing some letters let's agree b converts to 8, i to 7 and o to 0.
So in our example, "Ego" converts to "eg0". Problem: "eg0" is not a valid Bitcoin address. Luckily there is one very obvious and deterministic way:
Prefix it with "bc1q" and as you are proud of your name repeat it as long as possible (reach 32 letters), then suffix it with the 6 letter checksum.
We get "bc1qeg0eg0eg0eg0eg0eg0eg0eg0eg0eg0egt7y40w" (exactly 42=2*21 letters, awesome!) and call it PlebAddress, the PlebAddress of a name is unambiguous, there is exactly one PlebAddress for a name.
In a Bitcoin explorer of your choice search for your PlebAddress to ensure it is not claimed yet.
Send or burn the smallest satoshi count to your PlebAddress that is distributed in the mempool and accepted by miners (atm 546 SATs).
We agree the first one who sent to a PlebAddress claimed the related PlebName.

What can you do with your PlebName

You can own it, really own it.
You can publish the most precious information about your name that should be able to be fastly looked-up by everyone. E.g. your current lightningAddress.
You can update these most precious information and transfer a PlebName to somebody else.

Why do PlebNames abuse Bitcoin-Addresses?

Bitcoin addresses are indexed by every bitcoin explorer. This makes it very easy to find out when a PlebAddress first occured.
It enables a very simple code snipped to look-up when a PlebName was first claimed.
This makes PlebNames a simple, ubiquitous, uncensorable and fast Protocol.

What about unspendable UTXOs?

Yes, claiming a PlebName creates an unspendable UTXO, but taking into account that everybody who uses the Bitcoin mainchain has about 10 to 20 UTXOs on average
one or two additional UTXOs for having one or two names on average do not fall into account and are imho worth it to have convenient names on just Bitcoin.

Develop

Prerequisites

Install the JavaScript runtime Deno: https://docs.deno.com/runtime/manual
When working with VS Code the Deno extension by denoland is recommended: https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno
To get an overview of the code base try out Mammutmap: https://marketplace.visualstudio.com/items?itemName=mammutmap.mammutmap

Build

deno run -A build.run.ts

or more precise

deno run --allow-env --allow-read --allow-run build.run.ts

Start Website

Just open ./out/website/index.html in a web browser (after you built the project).

Start Chrome Extension

In Chrome go to chrome://extensions/ and ensure that on the top right 'Developer mode' is toggled on. After that click Load unpacked and select the ./out/chromeExtension folder of this repository.
Ensure that conflicting extensions are not running in the background (i.e. other extensions that redirect the same Top Level Domain).
For further information about Chrome Extensions see https://developer.chrome.com/docs/extensions.

Run Tests

deno test --allow-net