open-index/open-npm huggingface dataset:
npm package: @privacy-protocol/cipher-contracts
Description: Privacy Protocol Cipher Solidity contracts for Hardhat projects
Latest version: 0.0.1

# Cipher Contracts

Cipher Contracts is the smart contract package for **Cipher** — a series of toolkits for building confidential dApps on EVM blockchains.

The goal of Cipher is to help smart contract developers add privacy-preserving features to their dApps without having to build the entire cryptography stack from scratch.

---

## Overview

Cipher Contracts provides reusable Solidity contracts and toolkit modules for confidential application logic.

The first toolkit available is the **DAO Toolkit**, which is designed for private governance use cases such as - hidden votes onchain, encrypted tallying, private eligibility checks, nullifier-based replay protection. All these features are enabled through combining mathematical cryptography primitives like [ZK using Noir](https://noir-lang.org/) and [FHE using Zama](https://docs.zama.org/homepage).

More toolkits will be added over time to Cipher.

---

## Installation

Install Cipher Contracts in a Hardhat project with:

```bash
npm install @privacy-protocol/cipher-contracts @openzeppelin/contracts @fhevm/solidity
```

---

## Usage

`cipher-contracts` is designed to be used as a deployed adapter contract that your DAO or governance contract talks to, but you can also use our own deployments.

**Addresses:**

- `PrivateDaoAdapter`: `0x8274C53d82C5874455E67F80603F2792C9757cBE`
- `HonkVerifier`: `0x76A2d7a3F4927AaB90d2247eA541c305Ee8615F1`

Import the contract (for customization) or interface (quicker) into your Solidity code:

```solidity
import {PrivateDaoAdapter} from "@privacy-protocol/cipher-contracts/src/DaoToolkit/PrivateDaoAdapter.sol";
import {IPrivateDaoAdapter} from "@privacy-protocol/cipher-contracts/src/DaoToolkit/interface/IPrivateDaoAdapter.sol";
```

Check [Docs](https:www.privacyprotocol.org/docs) for example DAO integration pattern.

Note: this package contains the Solidity contracts only. Your application is still responsible for generating the zk proof, encrypted vote payload, and final decryption inputs expected by the adapter.

### What the DAO Toolkit provides

The DAO Toolkit is intended to support confidential governance flows such as:

- proposal registration with private voting config
- encrypted vote submission
- encrypted tally storage
- private membership verification
- nullifier-based one-vote enforcement
- final tally reveal

---

## Contribute

Contributions are welcome.

If you want to contribute:

1. Fork the repository
2. Create a new branch for your feature or fix
3. Make your changes
4. Add or update tests where necessary
5. Open a pull request

When contributing, please keep changes focused and clearly explain the reasoning behind architectural or security-related updates.

For major changes, it is best to open an issue first to discuss the proposal before implementation.

---

## License

MIT
npm package: @privacybydesign/irma-console
Description: A console based front-end for IRMA flows. Useful for testing or use in nodejs
Latest version: 0.4.3
Deprecated: Please use the Yivi frontend packages instead, see: https://github.com/privacybydesign/yivi-frontend-packages

# IRMA console

This plugin contains a console based front-end for IRMA flows. It's mostly
useful for testing purposes or for use in `nodejs` applications.

This plugin takes no special options or parameters to the start method. It will
render a QR code to either the local `nodejs` terminal or the browser console.

## Usage

```javascript
const IrmaCore = require('@privacybydesign/irma-core');
const Console  = require('@privacybydesign/irma-console');

const irma = new IrmaCore(/* options */);
irma.use(Console);
irma.start();
```

## Extra behaviour
The `irma-console` plugin makes it possible for users to abort the session without
completing it. When using this plugin, the `start` method of `irma-core` will
reject its promise in this scenario using the callback message `Aborted`.
npm package: @privacybydesign/irma-css
Description: Styling to standardize the IRMA login flow and make it look pretty
Latest version: 0.4.3
Deprecated: Please use the Yivi frontend packages instead, see: https://github.com/privacybydesign/yivi-frontend-packages

# IRMA css

This is a package that contains all the necessary CSS to make IRMA flows look
pretty and have a standardized look and feel. See
[the style guide](https://privacybydesign.github.io/irma-frontend-packages/styleguide)
for visual examples and code snippets.

This package has been designed and tested to work with the browsers Chrome,
Firefox, Safari, Opera, Edge and IE11.

## Embedding in your application

This package only contains CSS. So basically you just include the CSS file(s)
and find the right HTML snippets [in the styleguide](https://privacybydesign.github.io/irma-frontend-packages/styleguide/section-examples.html).
The modules based on `irma-web` (so also `irma-popup`) make use of these snippets.

### Import: the old fashioned way

There is a [normal version and a minified version](https://gitlab.science.ru.nl/irma/github-mirrors/irma-frontend-packages/-/jobs/artifacts/master/browse/irma-css/dist?job=irma-css)
of the styles that you can include in your project. The CSS can be linked into
your website the regular way. You have to host the CSS file yourself.

```html
<link rel="stylesheet" href="assets/irma.css" />
```

### Import: the way the cool kids do it

Alternatively, you can install it as an npm package. This can be useful if you
want to use (parts of) the SCSS behind it and override some variables, if you
need to package it in some complicated way and if you want more control over
updates.

```bash
$ npm install irma-css
```

You can then pull from the entire thing or just bits and pieces of it in your
SCSS/SASS files:

```scss
# The entire thing:
@import "~irma-css";

# Or just bits and pieces of it:
@import "~irma-css/src/components/irma-form";
```

Or require the CSS in your javascript if you use a tool like Webpack:

```javascript
require('@privacybydesign/irma-css');
```

## Contributing

### Compiling locally

Requires a working `git` and `npm` on your machine.

```bash
# Install dependencies
$ cd irma-css
$ npm install

# Run the compiler & dev server
$ npm run dev
```

The style guide has been updated in the `docs/styleguide` directory in
the root of this project. To show the styleguide, the docs
directory can simply be hosted using an HTTP
server. You can use the [`irma` CLI tool](https://github.com/privacybydesign/irmago/releases/latest)
to do this.

```bash
irma server --static-path=../docs/styleguide
```

It will be available in your browser at http://localhost:8088.

Any change you make to the stylesheets will trigger a rebuild of the style guide
and will be shown after a browser refresh.

### Making PRs

Please only commit your changes to the SCSS files, not any of the generated
files:

```bash
$ git add irma-css/src/
$ git commit -m "Update button shadows to reflect new design"
```
npm package: @privacybydesign/irma-dummy
Description: A dummy back-end for IRMA flows. Useful for testing without an actual server
Latest version: 0.4.3
Deprecated: Please use the Yivi frontend packages instead, see: https://github.com/privacybydesign/yivi-frontend-packages

# IRMA dummy

This plugin contains a test dummy back-end for IRMA flows. With the dummy you
can simulate different issues that may be hard to test otherwise, which is
especially useful for developing front-end IRMA flow plugins.

This plugin takes no special parameters to the start method, but it can be
configured through the options. See below.

## Usage

```javascript
const IrmaCore = require('@privacybydesign/irma-core');
const Dummy    = require('@privacybydesign/irma-dummy');

const irma = new IrmaCore({
  debugging: true,
  dummy: 'happy path'
});

irma.use(Dummy);
irma.start();
```

## Options

### dummy

The dummy option can take one of these values:

 * `happy path`          ⸺ Fake everything just working™️
 * `pairing`             ⸺ Fake everything just working with pairing enabled™️
 * `mobile`              ⸺ Fake everything just working for scanning a QR on mobile™️
 * `timeout`             ⸺ Fake a session time out on the server
 * `cancel`              ⸺ Fake cancellation in the IRMA app (don't have attributes or reject disclosure)
 * `connection error`    ⸺ Fake error connecting to the server on the initial session start
 * `browser unsupported` ⸺ Fake an unsupported browser detected

### debugging

This plugin listens to the `debugging` option, and will render some basic
information when debugging is enabled.

### qrPayload

If you want to customize what is shown in the QR code, you can pass anything to
the `qrPayload` option.

### successPayload

If you want to customize what the Promise resolves to, you can pass anything to
the `successPayload` option.

### timing

Finally, you can customize the timings of the different stages. Maybe you want
to use the dummy in automated tests, and you set the time for each step to zero
milliseconds. Maybe you want to make a nice interactive demo of something, and
have more realistic timings. It's up to you.

These are the defaults:

```javascript
const irma = new IrmaCore({
  timing: {
    start: 1000,
    scan: 2000,
    app: 2000
  }
});
```
npm package: @privacybydesign/irma-frontend
Description: A simplified package of irma-frontend modules to get started easily
Latest version: 0.4.3
Deprecated: Please use the Yivi frontend packages instead, see: https://github.com/privacybydesign/yivi-frontend-packages

# IRMA frontend

This is a thin wrapper around `irma-core`, `irma-web`, `irma-popup`,
`irma-client` and `irma-css`. The intended use of this package is to provide
an all-in-one Javascript file that developers can include to get started:

```html
<script src="assets/irma.js" type="text/javascript"></script>
```

or as JavaScript import:
```javascript
const irma = require('@privacybydesign/irma-frontend');
```

## Documentation
More documentation on how to use this module can be found in the
[IRMA documentation](https://irma.app/docs/irma-frontend/#irma-frontend).

## Usage
When you want to use an embedded web element,
then you can instantiate `irma-frontend` like so:

```javascript
const example = irma.newWeb({
  debugging: false,            // Enable to get helpful output in the browser console
  element:   '#irma-web-form', // Which DOM element to render to

  // Back-end options
  session: {
    // Configure your flow here, see code examples in root README file
  },

  ...
});
```

When you want to use a popup overlay that renders on top of the content of
your website, then you can instantiate `irma-frontend` like so:

```javascript
const example = irma.newPopup({
  debugging: false, // Enable to get helpful output in the browser console

  // Back-end options
  session: {
    // Configure your flow here, see code examples in root README file
  },

  ...
});
```

Finally, you can start your IRMA flow:

```javascript
example.start()
.then(result => console.log("Successful disclosure! 🎉", result))
.catch(error => console.error("Couldn't do what you asked 😢", error));
```

Be aware that you can start an instance of `irma-core` only once.
When you want to call `start()` again, you have to create a new instance.

## Download
A bundled JavaScript file can be found [here](https://gitlab.science.ru.nl/irma/github-mirrors/irma-frontend-packages/-/jobs/artifacts/master/browse/irma-frontend/dist?job=irma-frontend).
Please download this file and host it yourself. Versions can change and we do not want to break your website.

## Development
You can link local versions of modules easily using `npm link`. There is
an explanation about how to use `npm link` in the README of the
[`irma-frontend-packages` root directory](https://github.com/privacybydesign/irma-frontend-packages).
npm package: @privacybydesign/irma-jwt
Description: Backend library to make and verify IRMA JWTs
Author: Ivar Derksen
Latest version: 0.1.2

## IRMA JWT
This module can be used for generating and verifying IRMA JWTs in the following way:
```javascript
const IrmaJwt = require('@privacybydesign/irma-jwt');
const irmaJwt = new IrmaJwt(method, options);
```

#### Constructor parameters
 - `method` concerns the algorithm that is used to sign the JWT. Currently IRMA supports the methods
   `hmac` for a HS256 signed JWT and `publickey` for a RS256 signed JWT.
 - `options` is a struct that defines the specific options related to the chosen `method`:
    - `secretKey` field indicates the secret key that is going to be used. For the method `hmac` this
    field is required, since the HS256 secret key is both used for signing and verification. 
    For the method `publickey` the secretKey is only used for signing. In that case the `publicKey`
    is used for verification. Therefore, if you only need verification, you can omit the `secretKey` field.
    - `publicKey` field indicates the public key that is going to be used. This field is only relevant
    when using JWT verification using the method `publickey`. Otherwise you can omit this field. 
    - `iss` field concerns the name being recorded in the 'issuer' field (iss) of the JWT. This parameter is only
   required if you want to sign JWTs.

#### Available methods
##### `signSessionRequest(request)`
This method signs the [session request object](https://irma.app/docs/session-requests/)
being passed and returns the JWT.

##### `verify(jwt)`
This method verifies whether the JWT is valid according to the specified key material.
It returns the JWT body of the supplied [session request JWT](https://irma.app/docs/session-requests/#jwts-signed-session-requests)
or [session result JWT](https://irma.app/docs/api-irma-server/#get-session-token-result-jwt),
depending on the JWT type.

#### Code example
Below a small example of how `irma-backend` can be used:
```javascript
const IrmaJwt = require('@privacybydesign/irma-jwt');
const irmaJwt = new IrmaJwt('hmac', {secretKey: 'test-key', iss: 'localhost'});

const irmaRequest = {
  '@context': 'https://irma.app/ld/request/disclosure/v2',
  'disclose': [
    [
      [ 'irma-demo.MijnOverheid.ageLower.over18' ]
    ]
  ]
};


// Sign a session request
const jwt = irmaJwt.signSessionRequest(irmaRequest);

// Verify the JWT
const verifiedJwt = irmaJwt.verify(jwt);
```
npm package: @privacybydesign/irma-popup
Description: A frond-end plugin to show the IRMA form in a popup
Latest version: 0.4.3
Deprecated: Please use the Yivi frontend packages instead, see: https://github.com/privacybydesign/yivi-frontend-packages

# IRMA popup

This plugin contains a popup for IRMA flows in the web browser. It is a pop-up
variant of the [`irma-web` plugin](https://github.com/privacybydesign/irma-frontend-packages/tree/master/plugins/irma-web).

Because this plugin is based on `irma-web`, it is also designed to be used with
[`irma-css`](https://github.com/privacybydesign/irma-frontend-packages/tree/master/plugins/irma-css). 
`irma-css` is not a dependency of this package by design. This means that the CSS must be imported
separately. How to do this, you can check in the README of `irma-css`. In this way you can also
adapt `irma-css` to your own design and import this custom style instead.

If you *do* want to use `irma-css` (which is recommended), you may also consider using
[the `irma-frontend` package](https://github.com/privacybydesign/irma-frontend-packages/tree/master/irma-frontend)
instead for ease of use, or take a look at
[the `irma-popup` example](https://github.com/privacybydesign/irma-frontend-packages/tree/master/examples/browser/irma-web)
for a more hands-on implementation example.

## Usage

```javascript
const IrmaCore = require('@privacybydesign/irma-core');
const Popup    = require('@privacybydesign/irma-popup');

require('@privacybydesign/irma-css');

const irma = new IrmaCore(/* options */);
irma.use(Popup);
irma.start();
```

## Options

This plugin can handle all the options that the [`irma-web` plugin](https://github.com/privacybydesign/irma-frontend-packages/tree/master/plugins/irma-web#options)
accepts. It introduces one additional option:

### closePopupDelay
This option determines how long the popup will remain open, after a session has been
succeeded or got into some other irrecoverable end state, before it automatically closes.
In this way the user can see the animation that indicates the reason why the popup is closing.
The default is `2000` milliseconds.

## Extra behaviour
The `irma-popup` plugin makes it possible for users to abort the session by closing
the popup. When using this plugin, the `start` method of `irma-core` will
reject its promise in this scenario using the callback message `Aborted`.
npm package: @privacycloud/eslint-config
Description: PrivacyCloud eslint configuration
Author: PrivacyCloud Developers
Latest version: 2.0.2

# `@privacycloud/eslint-config`

## Usage

Shareable configs are designed to work with the `extends` feature in the eslint configuration options.

```json
{
  "extends": "@privacycloud/eslint-config"
}
```
npm package: @privacycloud/eslint-config-nextjs
Description: PrivacyCloud eslint configuration for NEXT.js
Author: PrivacyCloud Developers
Latest version: 2.0.1

# `@privacycloud/eslint-config-nextjs`

## Usage

Shareable configs are designed to work with the `extends` feature in the eslint configuration options.

```json
{
  "extends": "@privacycloud/eslint-config-nextjs"
}
```
npm package: @privacycloud/linter
Description: PrivacyCloud Code Linter
Author: PrivacyCloud Developers
Latest version: 1.1.0

# Privacy Cloud Code Linter configuration

These are common TSLint, ESLint and Prettier configurations.

## TSLint configuration

### Install

```
yarn add --dev typescript tslint @privacycloud/linter
```

### Extending configuration

Project `tslint.json`

For example, client side:

```
{
  "extends": "@privacycloud/linter/lib/tslint/base"
}
```

server side:

```
{
  "extends": "@privacycloud/linter/lib/tslint/server"
}
```

## Prettier configuration

### Install

```
yarn add --dev prettier @privacycloud/linter
```

### Extending configuration

You can define a `.prettierrc.js` file.

```js
module.exports = require('@privacycloud/linter/lib/prettier');
```

## Updating package

To publish package:

```
yarn upload
```

 ## How to try new rules

In order to try new rules we have added a playground folder with an `example.ts` file. This folder has Prettier and ESLint configured to work with our local rules.

Remember to build (`yarn build`) the project to actually see the inline errors in your VSCode editor
npm package: @privacycloud/prettierrc
Description: Shared configuration to format project code by using Prettier
Author: Sergio Sánchez
Latest version: 2.0.0

# PrivacyCloud shared Prettier configuration

## How to use it?

First, you need to install all the required dependencies:

```
$: npm i --save-dev prettier @privacycloud/prettierrc
```

Setup your local Prettier configuration. Create a `.prettierrc.js` file in the root folder and add:

```js

module.exports = require('@privacycloud/prettierrc');

```

Once every is installed and configured, you can add the Prettier extension to your editor.

### Visual Studio Code

Prettier can be installed by using the extensions sidebar. Search for `Prettier-Code formatter`.

If you want to format your code every time you save a file, add `"editor.formatOnSave": true` to your vscode settings file.

## Contributing

In order to publish any update from this package to the npm registry, please follow the following instructions about [publishing packages to npm](https://docs.npmjs.com/getting-started/publishing-npm-packages) and [working with scoped packages on npm](https://docs.npmjs.com/getting-started/scoped-packages).

### TL;DR

```
$: npm adduser # "npm login" if you already have an account
$: npm publish --access=public
```

> NOTE: Your user must be a member of the @privacycloud organization on npm.
npm package: @privacycloud/tslint-config
Description: Shared configuration for TypeScript projects with TSLint
Author: Sergio Álvarez
Latest version: 2.0.1

# PrivacyCloud shared TSLint configuration

## Usage

First, you need to install all the required dependencies:

```sh
npm i --save-dev typescript tslint @privacycloud/tslint-config
```

Once every package is installed, it is time to setup your local TSLint configuration. Depending on the project, you may want to extend one file or another from the shared configuration.

> NOTE: you can still overwrite any extended rule in your local configuration.

### Client-side projects

`tslint.json`:

```json
{
  "extends": "@privacycloud/tslint-config"
}
```

### Server-side projects

`tslint.json`:

```json
{
  "extends": "@privacycloud/tslint-config/server"
}
```

`privacycloud-tslint-config/server` inherits the whole `base` configuration but it overwrites some rules for server-side projects (i.e. it disables the `no-console` rule).

## Contributing

In order to publish any update from this package to the npm registry, please follow the following instructions about [publishing packages to npm](https://docs.npmjs.com/getting-started/publishing-npm-packages) and [working with scoped packages on npm](https://docs.npmjs.com/getting-started/scoped-packages).

### TL;DR

```sh
npm adduser # "npm login" if you already have an account
npm publish --access=public
```

> NOTE: Your user must be a member of the @privacycloud organization on npm.
npm package: @privacypillar/pii-shield-opencode
Description: Privacy-first PII and secret detection plugin for OpenCode. Blocks API keys, passwords, SSNs, credit cards, and 25+ other sensitive data types from reaching any LLM. All detection is local — no data ever leaves your machine.
Author: PrivacyPillar
Latest version: 0.0.1-alpha.6

# @privacypillar/pii-shield-opencode

Privacy-first PII and secret detection plugin for **OpenCode**.

Blocks API keys, passwords, SSNs, credit cards, and 25+ other sensitive data types from reaching any LLM. All detection is **local** — no data ever leaves your machine.

## Install

```bash
npm install -g @privacypillar/pii-shield-opencode
```

The `postinstall` script automatically copies the plugin to `~/.config/opencode/plugins/pii-shield/`. OpenCode picks it up on the next session start — no further configuration needed.

## What it protects against

| Severity | Examples |
|---|---|
| CRITICAL | OpenAI / Anthropic / Google API keys, AWS credentials, GitHub tokens, private keys, Stripe live keys, database URLs, SSNs, credit cards |
| HIGH | JWTs, Bearer tokens, Slack tokens, SendGrid keys, Twilio SIDs, passport numbers, URLs with embedded credentials |
| MEDIUM | Emails, US phone numbers, public IPs, dates of birth, Stripe test keys |
| LOW | Private IP addresses |

## How it works

- **Before** every `write`/`edit`/`bash` tool call: scans content and **throws an error** to block the call if CRITICAL or HIGH secrets are found
- **After** every `read`/`bash`/`webfetch`/`grep` tool call: scans output and appends a warning so the LLM does not echo the secret
- **Session start**: initialises a volatile JSONL audit log in `os.tmpdir()`

## Optional: forbidden terms

Add project-specific sensitive terms (codenames, internal hostnames, etc.) to:

- `~/.config/opencode/plugins/pii-shield/forbidden.txt` — applies to all projects
- `.opencode/forbidden.txt` in any project root — project-specific
- `~/.pii-shield/forbidden.txt` — user-global

## Skills

| Skill | What it does |
|---|---|
| Load `pii-shield-scan` skill | Scan a file or text for PII and secrets |
| Load `pii-shield-report` skill | Read the session log and produce a privacy report |
| Load `pii-shield-redact` skill | Redact secrets from a file in-place |

## Deep audit agent

```
@pii-guardian audit the src/ directory
```

Performs a comprehensive multi-file privacy audit, reporting file paths, line numbers, and remediation steps.

## Privacy guarantees

- Zero network calls — pure JavaScript regex + Luhn algorithm
- No external npm dependencies
- Session log stores only redacted snippets (never full secret values)
- Log is volatile — destroyed when OS recycles temp files

## License

MIT — Copyright © 2025 Privacy Pillar
npm package: @privado-langchain-sdk/agent-id-sdk
Description: A SDK for signing and verifying AI agent responses using Lit Protocol
Author: Your Name
Latest version: 1.0.0

# @privado/agent-id-sdk

A SDK for signing and verifying AI agent responses using Lit Protocol.

## Installation

```bash
npm install @privado/agent-id-sdk
```

## Quick Start

```javascript
const { createPrivadoCallback } = require('@privado/agent-id-sdk');
const { createOpenAIFunctionsAgent, AgentExecutor } = require("langchain/agents");
const { ChatOpenAI } = require("langchain/chat_models/openai");

async function main() {
    // Create callback handler
    const privadoCallback = createPrivadoCallback({
        litPkpPublicKey: process.env.LIT_PKP_PUBLIC_KEY,
        ethereumPrivateKey: process.env.ETHEREUM_PRIVATE_KEY,
    });

    // Initialize agent
    const llm = new ChatOpenAI({
        temperature: 0,
        modelName: "gpt-3.5-turbo",
    });

    const agent = await createOpenAIFunctionsAgent({
        llm,
        tools: [],
    });

    const executor = new AgentExecutor({
        agent,
        tools: [],
        callbacks: [privadoCallback],
    });

    // Run the agent
    const result = await executor.invoke({
        input: "What is the capital of France?"
    });

    console.log("Agent response:", result);
    console.log("Signed message:", result.signedMessage);
    console.log("Agent DID:", result.agentDID);
}
```

## Configuration

The SDK requires two environment variables:

- `LIT_PKP_PUBLIC_KEY`: Your Lit Protocol PKP public key
- `ETHEREUM_PRIVATE_KEY`: Your Ethereum private key

## Features

- Sign AI agent responses using Ethereum private keys
- Generate Decentralized Identifiers (DIDs) for agent responses
- Verify the authenticity of agent responses
- Seamless integration with LangChain

## API Reference

### createPrivadoCallback(config)

Creates a new PrivadoCallback instance.

#### Parameters

- `config` (Object):
  - `litPkpPublicKey` (string): Your Lit Protocol PKP public key
  - `ethereumPrivateKey` (string): Your Ethereum private key

#### Returns

- `PrivadoCallback`: A callback handler instance

## License

MIT