open-index/open-npm huggingface dataset:
npm package: @hazae41/networker
Description: Generate Network secrets in a worker
Author: hazae41
Latest version: 1.0.16

# NetWorker

Generate Network secrets in a worker

```bash
npm i @hazae41/networker
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/networker)

## Features

### Current features

- 100% TypeScript and ESM
- No external dependencies
- Pre-bundled
- WebAssembly

## Usage

```tsx
import { NetWorker, NetWorkerCreateParams } from "./worker/index.js";

using worker = new NetWorker()

const chainIdString = "1"
const contractZeroHex = "0xF1eC047cbd662607BBDE9Badd572cf0A23E1130B"
const receiverZeroHex = "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
const nonceZeroHex = "0x9537efb9ece40a1d72241f1fd5dcbb32e8eae43df579d02bf861b339a9126c64"

await using mixin = await worker.createOrThrow({ chainIdString, contractZeroHex, receiverZeroHex, nonceZeroHex })

const minimumZeroHex = "0x0000000000000000000000000000000000000000000000000000000000000001"

const { secretZeroHex, proofZeroHex } = await mixin.generateOrThrow(minimumZeroHex)

const proofValueZeroHex = await mixin.verifyProofOrThrow(proofZeroHex)
const secretValueZeroHex = await mixin.verifySecretOrThrow(secretZeroHex)

console.log(proofValueZeroHex)
console.log(secretValueZeroHex)
```
npm package: @hazae41/next-sidebuild
Description: Build workers and scripts during your Next.js build
Author: hazae41
Latest version: 1.0.4

# Sidebuild for Next.js

Build workers and scripts during your Next.js build

```bash
npm i -D @hazae41/next-sidebuild
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/next-sidebuild)

## Example

<img width="696" src="https://github.com/user-attachments/assets/0e423e12-129d-4236-aa7f-9a9316ff40bb">

## Setup

Install `@hazae41/next-sidebuild` as `devDependencies`

```bash
npm i -D @hazae41/next-sidebuild
```

Modify your `next.config.js` to build your scripts

```js
const path = require("path")
const { NextSidebuild, withNextSidebuild } = require("@hazae41/next-sidebuild")

async function compileServiceWorker(wpconfig) {
  await NextSidebuild.compile({
    /**
     * Name of your script for display on logs
     */
    name: "service_worker",

    /**
     * Use "webworker" for in-worker scripts or "web" for in-page scripts
     */
    target: "webworker",

    /**
     * Your script source code path
     */
    entry: "./src/mods/scripts/service_worker/index.ts",

    output: {
      /**
       * Output file relative to `./out`
       */
      filename: "./service_worker.js",

      /**
       * DNTUYKWYD
       */
      path: path.join(process.cwd(), ".webpack")
    },
     
    /**
     * Use same config as Next.js
     */
    mode: wpconfig.mode,
    resolve: wpconfig.resolve,
    resolveLoader: wpconfig.resolveLoader,
    module: wpconfig.module,
    plugins: wpconfig.plugins,

    /**
     * Configure minimizer
     */
    optimization: {
      minimize: true,
      minimizer: wpconfig.optimization.minimizer
    },

    /**
     * DNTUYKWYD
     */
    devtool: false,
  })
}

module.exports = withNextSidebuild({
  sidebuilds: function* (wpconfig) {
    yield compileServiceWorker(wpconfig)
  }
})
```