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

@spacesprotocol/fabric

v0.0.1

Published

| <img src="./logo.png" width="340"/> | <h1 align="left">Fabric</h1> <p align="left">Fabric is a trustless, distributed DNS resolver for [spaces](https://spacesprotocol.org), enabling spaces to publish Bitcoin-signed zone files on a permissionless DHT wit

Downloads

17

Readme

| | Fabric Fabric is a trustless, distributed DNS resolver for spaces, enabling spaces to publish Bitcoin-signed zone files on a permissionless DHT without storing anything on-chain! | |-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

Fabric is a trustless, distributed DNS resolver built on top of hyperdht, extending its capabilities to allow publishing signed zone files using spaces as keys authenticated by Bitcoin. Spaces are sovereign Bitcoin identities and serve as a trust anchor, while Fabric DHT enables publishing records off-chain without adding any unnecessary on-chain bloat.

Note: Fabric currently defaults to Bitcoin testnet4 since spaces are not yet on Bitcoin mainnet.

Prerequisites

To use fabric and beam, you need to:

  • Run Bitcoin Core on testnet4
  • Install and sync spaces

You may use this guide to set these up.

Installation

After setting up spaces, install Fabric:

npm install -g spacesprotocol/fabric

How to query spaces?

Use beam it's like a distributed dig!

beam @onion TXT

Space @now also has TXT records published.

Note: beam will automatically connect to a locally run spaces node using its default port for testnet4 to verify answers from the DHT.

How to publish records for a Space?

  1. Create a zone file (e.g., example.zone) with an SOA record and the records you want to publish:
@ORIGIN @example.

; YOU MUST INCREMENT ZONE SERIAL WITH EACH UPDATE
@    3600 CLASS2  SOA  . . ( 1 3600 600 604800 3600 )
@    3600 CLASS2  TXT "Hello spaces!"
  1. Find the space's private key using space-cli
space-cli --chain testnet4 exportwallet | grep '"spaces_descriptor"' | sed -E 's/.*(tprv[^\/]*).*/\1/'

it should look something like this:

tprv8ZgxMBicQKsPeUUxV746bQ9JmsytoyEeioAd9b962bQxcq7PfK8vRbFkSR7JD7ySoBoyswHX5vQvnhS95dHKUxW2maG2Tt7bJcCHsY66gNF
  1. Use beam to sign your zone file example.zone:
beam sign example.zone --private-key <private-key>

Distribute the signed zone file (example.zone.signed) to the network:

You can either:

  • Place it in the --watch directory of a running Fabric node
  • OR Share it with other Fabric node operators to have them keep it alive

Running a Fabric node

Run a node if you want to publish your own zones and also contribute to the network. Specify a reachable ip/port:

Note: Fabric will automatically connect to a locally run spaces node using its default port for testnet4.

fabric --host <ip-address> --port <public-port>

Specify a directory to watch for publishing space zones:

fabirc --host <ip-address> --port <public-port> --watch /path/to/signed/zone/files/directory

After about 30 minutes of uptime, your node will become persistent and contribute to the network's storage.

Contributing Bootstrap Nodes

Note: If you do not intened to submit a pull request you should ignore these instructions.

We could use more bootstrap nodes:

  1. Run a node with a reachable IP/Port specifying --bootstrap option
fabric --host <ip-address> --port <port> --bootstrap
  1. Create a pull request updating constants.js to include your bootstrap node.

Encrypted Noise Connections

Basic support for encrypted connections over named spaces is available. Use beam serve and beam connect and follow the CLI instructions.

Contributing

We welcome contributions to Fabric! Please feel free to submit issues, feature requests, or pull requests to help improve the project.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.