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

ssb-invite

v2.1.8

Published

Invite-token system, mainly used for pubs. Creates invite codes as one of ways of onboarding.

Downloads

190

Readme

ssb-invite

Invite-token system, mainly used for pubs. Creates invite codes as one of ways of onboarding.

Generally this ends being used for pubs:

  • Users choose a pub from a list of pubs.
  • The chosen pub gives out an invite code to the user via the pub's website.
  • The user installs a Scuttlebutt client and copy and paste the invite code into the client's "accept invite" prompt.
  • The pub validates the invite code and follows back the new user, making them visible to other Scuttlebutt users.

Soon, hopefully supercededed by ssb-peer-invites but supported for backwards compatibity.

api

create ({uses, note, external, modern}, cb(err, invite_code))

Create a new invite code.

  • uses (number): How many times the invite can be used before it expires.
  • note (string): A note to associate with the invite code. The ssb-server instance will include this note in the follow message that it creates when use is called.
  • external (string): An external hostname to use
  • modern (boolean): if true the invite code will be a valid multiserver address.
    • if modern is enabled, uses will be set to 1.
    • :warning: "modern" invites with ipv6 addresses currently have some problems

This produces an invite-code which encodes the ssb-server instance's public address, and a keypair seed. The keypair seed is used to generate a keypair, which is then used to authenticate a connection with the ssb-server instance. The ssb-server instance will then grant access to the use call.

accept(invite_code, cb)

Use an invite code.

  • invite_code (string): an invite code returned by create

This connects to the server address encoded in the invite-code, then calls use() on the server. It will cause the server to follow the local user.

use ({feed:feedId}), cb)

This method is used internally, it is called on the remote pub by your local instance when you call accept. To call use you must authenticate as a guest, by using the seed in an invite code, that was created by this pub.

use({feed: feed_id}, cb)

This commands the receiving server to follow the given feed.

An invite-code encodes the ssb-server instance's address, and a keypair seed. The keypair seed must be used to generate a keypair, then authenticate a connection with the ssb-server instance, in order to use this function.

  • feed (feedid): The feed the server should follow.

License

MIT