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

@socialcap/protocol

v0.1.4

Published

As a base for anonymity we implemented an [o1js](https://docs.minaprotocol.com/zkapps/o1js) a version of the [Semaphore protocol](./docs/semaphore.md). It includes the following components:

Downloads

9

Readme

Socialcap Anonymous Voting

As a base for anonymity we implemented an o1js a version of the Semaphore protocol. It includes the following components:

Semaphore:

These are the base components of the protocol, implemented using o1js for proofs and crypto primitives (hashing, encryption, private and public key generation, merkles).

In src/semaphore folder:

  • identity : create and register identities
  • groups: register in groups
  • prover: create ZK proofs as required by the protocol
  • requests: send requests to the relayer or services.
  • signals: prepare signals for broadcasting

Relayer:

Its role to is preserve the anonymity of the user broadcasting a message with Semaphore.

We implement this using NATS.io messaging.

The NATS server (which can be easily decentralized) acts as a simple relayer, transforming a call to any NATS server to a published message (from an unknown origin) that can be resolved by any service suscribed to that message.

Services

As we have no decentralized server contracts in MINA Protocol we emulate them with a centralized service, running in Socialcap hosts.

This service has three roles:

  • Provide services related to the Semaphore protocol itself, for example: add an Identity to a Group or provide a Witness of a given key when needing to create a proof.

  • Relay signals to applications built over the Semaphore protocol. These applications will process the signal by doing specific tasks such as assign random electors or count votes.

  • Provide services to these applications, such as providing a Witness or accessing a shared object needed by the application.

In src/services folder:

  • listeners: listen to subscribed messages
  • identities: manages the identity register
  • groups: manages the groups register
  • merkles: create and operate on IndexedMerkleMaps
  • kvs: manage the LMDB key-value store
  • signals: validates received signals when appropiate
  • dispatcher: dispatchs tasks to application handlers
  • verifiers: verifies received proofs
  • logger: log to file (pino logger)
  • utils: general utilities

Application (Voting)

Implements the full voting process.

In src/voting folder

  • selection: selects the electors who will participate in voting for each claim
  • assignments: assigns the voting tasks to each elector
  • reception: receives batch of vote from electors
  • aggregation: aggregates the votes per claim to produce results
  • issuer: issues credentials based on results
  • settlement: settles results on MINA voting accounts

It will settle results for each claim using the corresponding MINA VotingAccountContract linked to that claim.