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

@othentic/othentic-cli

v1.4.3

Published

Othentic CLI

Downloads

1,980

Readme

🍀 Othentic CLI

Stateless Rollups (i.e. oracle, bridge, rollup watchers) provide services to other networks without being constrained by any particular blockchain. However, infrastructure for the submission and auditing of the Operators' work is required. One of the primary goals of Othentic is to support diverse node tasks to enable AVS’s Operators to submit unique task specifications. Operator tasks can be classified into two primary categories: On-chain tasks - include arbitrary transactions that Operators are required to execute as part of core responsibilities. Off-chain tasks - occur outside the blockchain and require a different approach for submission and validation.

You can find more information in our gitbook: https://othentic.gitbook.io/

🎮 Usage

Prerequisites

  • Node 22.6 (preferably via NVM)
  • OpenSSL

Install the Othentic CLI via npm:

npm i -g @othentic/cli

It is also possible to run othentic-cli via npx with:

npx othentic-cli [args]

Commands

The available commands are divided into subcommands:

  • othentic-cli node <mode> [args]
  • othentic-cli network <action> [args]
  • othentic-cli operator <action> [args]
  • othentic-cli wallet <action> [args]

Use the -h flag to see the help text for each command.

⚙️ P2P Setup

.env file

Change the .env.example file to .env and add the empty values as per the documentation.

[!NOTE] The .env.example file contains a bootstrap seed & id. While you can use these for starters, it is recommended to generate a new seed & id (see below).

Aggregator node

An Aggregator node is required for the AVS to function. Run it using the following command:

othentic-cli node aggregator

Attester nodes

You can have as many attester nodes as you like. Every participant in your AVS should be able (or even required) to run an attester node. Attester nodes need to know the address of the Aggregator node, as the aggregator node also acts as a bootstrap node (see below for details about the architecture).

To run an attester node, use the following command:

othentic-cli node attester /ip4/<BOOTSTRAP_IP>/tcp/9876/p2p/<BOOTSTRAP_NODE_ID>

To use DNS resolution, use this format:

othentic-cli node attester /dns/<DOMAIN_NAME>/tcp/9876/p2p/<BOOTSTRAP_NODE_ID>

Generating bootstrap seed & id

Your bootstrap node requires a seed for its encrypted transport. A bootstrap seed is simply a random 32-byte sequence.

To generate a new bootstrap seed, use openssl:

openssl rand -hex 32

If you like to immediately insert it into the .env, use the following command:

echo "OTHENTIC_BOOTSTRAP_SEED=$(openssl rand -hex 32)" >> .env

Once you added the new seed to your .env, use the aggregator get-id command:

othentic-cli node aggregator get-id
...
Your node ID is:
12D3KooWBNFG1QjuF3UKAKvqhdXcxh9iBmj88cM5eU2EK5Pa91KB
✨  Done in 3.72s.

Copy the generated node ID and save it in your .env:

OTHENTIC_BOOTSTRAP_ID=12D3KooWBNFG1QjuF3UKAKvqhdXcxh9iBmj88cM5eU2EK5Pa91KB

📐 Architecture

The Othentic Framework utilizes libp2p for inter-node communication.

Two node types exist:

  • Attesters
  • Aggregator

The Othentic Framework lets you deploy a whole network including boostrapped peer discovery which allows nodes to find each other over the network.

Bootstrap node

The Aggregator node also plays the part of a bootstrap node. A bootstrap node is the node responsible for connecting peers on the network. Every peer initially connects to the bootstrap node to discover other peers. You can also run multiple bootstrap nodes spread out geographically.

[!NOTE] The bootstrap node is a crucial part of your P2P network. It should have high availability so new nodes can join the network. If the bootstrap node is down, new nodes cannot join the network (existing nodes continue to work).

Aggregator

The Aggregator (which also plays the role of a bootstrap node) listens to events from the Attester nodes and monitors the necessary voting power which validated each task. If enough voting power validated the task, the Attester submits the task onchain.

[!NOTE] Currently the Aggregator node also acts as your bootstrap node. This might change in the future.

Attesters

The Attester nodes are responsible for attesting to tasks. Every task they see must be attested as either "valid" or "invalid". If enough Attester nodes attest a task as "valid", the aggregator will submit this task onchain.