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

@the-word-pse/cli

v0.2.3

Published

``` _____ _ __ __ _ |_ _| |__ ___ \ \ / /__ _ __ __| | | | | '_ \ / _ \ \ \ /\ / / _ \| '__/ _` | | | | | | | __/ \ V V / (_) | | | (_| | |_| |_| |_|\___| \_/\_/ \___/|_| \__,_|

Downloads

2

Readme

The Word

  _____ _           __        __            _ 
 |_   _| |__   ___  \ \      / /__  _ __ __| |
   | | | '_ \ / _ \  \ \ /\ / / _ \| '__/ _` |
   | | | | | |  __/   \ V  V / (_) | | | (_| |
   |_| |_| |_|\___|    \_/\_/ \___/|_|  \__,_|
                                              

A game to see how large a secret can grow before it becomes to big to keep!

See subfolder's readmes for additional info on running yourslef (TODO)

Installing the CLI

  1. Requires Node & NPM. Built on Node v18.17.1

  2. Install the CLI with npm i -g @the-word-pse/cli

  3. Once the package has been installed and the executable linked, you should be able to access the command in your terminal: the-word

# Output from running `the-word`
  _____ _           __        __            _ 
 |_   _| |__   ___  \ \      / /__  _ __ __| |
   | | | '_ \ / _ \  \ \ /\ / / _ \| '__/ _` |
   | | | | | |  __/   \ V  V / (_) | | | (_| |
   |_| |_| |_|\___|    \_/\_/ \___/|_|  \__,_|
                                              
Usage: cli [options] [command]

A game to see how big a secret can become before it's too big to keep

Options:
  -V, --version                        output the version number
  -h, --help                           display help for command

Commands:
  get <round>                          Get information about a round
  whisper <round> <phrase> <username>  Whisper a secret phrase
  shout <round> <phrase> <username>    Shout a secret phrase
  help [command]                       display help for command

Using the CLI

The CLI points to a server running at https://theword.mach34.space linked to a smart contract at https://etherscan.io/address/0x0070a09d0c7a3c91806e6a3eff8c025a1324748c#code. You can use the CLI to interact with deployed rounds. If someone has told you the secret phrase for a given round, you can "whisper" or "shout" the phrase using the CLI. See below for more details.

Whispering the solution to a round

You can prove you know the solution to a secret without exposing the secret to others, you can "Whisper" the solution by running the-word whisper <round> <phrase> <username>. The CLI will hash the secret phrase and generate a zk proof of the secret phrase. The CLI then sends the proof to the server which checks the veracity of the proof and tracks you as a whisperer. No onchain action is taken at this point.

  • "round": This is the round number that is used to look up/ target a secret phrase.
  • "phrase": This is the phrase you are asserting is the secret of a given round.
  • "username": This is an arbitrary username that is used to constrain the proof to a unique domain Example:
the-word whisper \
  1 \
  "hunter2" \
  "u53rn@m3" \

Whispering the solution from the CLI will also save the generated Groth16 proof of knowledge of the secret. You can share this file with others if you want to convince them you know the secret phrase!

Shouting the solution to a round

Instead of whispering a solution and "growing" the secret, you can end the round for everyone by shouting the solution publicly by running the-word shout <round> <phrase> <username>. The CLI will simply send off the solution to the server, which in turn will post the secret to the smart contract where it is hashed and compared to the commitment. If they're a match, the round ends and any prize attached to the round will be burned! Once a secret has been shouted, it is publicly known and users can no longer whisper the solution to grow the secret.

  • "round": This is the round number that is used to look up/ target a secret phrase.
  • "phrase": This is the phrase you are asserting is the secret of a given round.
  • "username": This is an arbitrary username that is used to constrain the proof to a unique domain Example:
the-word shout \
  1 \
  "hunter2" \
  "u53rn@m3" \

The currently active round #1 (as of October 16, 2023) has .1 eth in it. While whispering the solution can have social benefits, you can choose to shout the solution, burn the .1 eth, and end the round for everyone!

Retrieving round information

You can retrieve information about a round by running the word get <round>. If the secret in a round is still secret, it will return a hint and the number of whisperers. If the secret has already been shouted, it will also return the secret phrase and the username of the user who shouted the solution. Example:

the-word get 1