@waku/rln 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,126 @@
1
+ {
2
+ "name": "@waku/rln",
3
+ "version": "0.0.1",
4
+ "description": "Rate Limit Nullifier for js-waku",
5
+ "types": "./dist/index.d.ts",
6
+ "module": "./dist/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "type": "module",
14
+ "repository": "https://github.com/waku-org/js-rln",
15
+ "license": "MIT OR Apache-2.0",
16
+ "keywords": [
17
+ "waku",
18
+ "decentralised",
19
+ "communication",
20
+ "web3",
21
+ "ethereum",
22
+ "dapps"
23
+ ],
24
+ "scripts": {
25
+ "prepare": "husky install",
26
+ "build": "run-s build:**",
27
+ "build:tsc": "tsc",
28
+ "build:bundle": "rollup --config rollup.config.js",
29
+ "size": "npm run build && size-limit",
30
+ "fix": "run-s fix:*",
31
+ "fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.*js\" \".github/**/*.yml\" --write",
32
+ "fix:lint": "eslint src --ext .ts --ext .cjs --fix",
33
+ "test": "run-s test:*",
34
+ "test:lint": "eslint src --ext .ts",
35
+ "test:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.*js\" \".github/**/*.yml\" --list-different",
36
+ "test:spelling": "cspell \"{*.md,.github/*.md,src/**/*.ts}\"",
37
+ "test:tsc": "tsc -p tsconfig.dev.json",
38
+ "test:node": "TS_NODE_PROJECT=./tsconfig.dev.json mocha",
39
+ "test:browser": "karma start karma.conf.cjs",
40
+ "watch:build": "tsc -p tsconfig.json -w",
41
+ "watch:test": "mocha --watch",
42
+ "prepublish": "npm run build",
43
+ "reset-hard": "git clean -dfx && git reset --hard && npm i && npm run build"
44
+ },
45
+ "browser": {
46
+ "crypto": false
47
+ },
48
+ "engines": {
49
+ "node": ">=16"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public",
53
+ "registry": "https://registry.npmjs.org/"
54
+ },
55
+ "devDependencies": {
56
+ "@rollup/plugin-commonjs": "^22.0.2",
57
+ "@rollup/plugin-json": "^4.1.0",
58
+ "@rollup/plugin-node-resolve": "^13.3.0",
59
+ "@rollup/plugin-wasm": "^5.2.0",
60
+ "@size-limit/preset-big-lib": "^8.0.0",
61
+ "@types/app-root-path": "^1.2.4",
62
+ "@types/chai": "^4.2.15",
63
+ "@types/debug": "^4.1.7",
64
+ "@types/mocha": "^9.1.0",
65
+ "@types/node": "^17.0.6",
66
+ "@types/tail": "^2.0.0",
67
+ "@types/uuid": "^8.3.0",
68
+ "@typescript-eslint/eslint-plugin": "^5.8.1",
69
+ "@typescript-eslint/parser": "^5.8.1",
70
+ "app-root-path": "^3.0.0",
71
+ "chai": "^4.3.4",
72
+ "cspell": "^5.14.0",
73
+ "eslint": "^8.6.0",
74
+ "eslint-config-prettier": "^8.3.0",
75
+ "eslint-plugin-eslint-comments": "^3.2.0",
76
+ "eslint-plugin-functional": "^4.0.2",
77
+ "eslint-plugin-import": "^2.25.3",
78
+ "eslint-plugin-prettier": "^4.0.0",
79
+ "fast-check": "^2.14.0",
80
+ "gh-pages": "^3.2.3",
81
+ "husky": "^7.0.4",
82
+ "ignore-loader": "^0.1.2",
83
+ "isomorphic-fetch": "^3.0.0",
84
+ "jsdom": "^19.0.0",
85
+ "jsdom-global": "^3.0.2",
86
+ "karma": "^6.3.12",
87
+ "karma-chrome-launcher": "^3.1.0",
88
+ "karma-mocha": "^2.0.1",
89
+ "karma-webpack": "^5.0.0",
90
+ "lint-staged": "^13.0.3",
91
+ "mocha": "^9.1.3",
92
+ "npm-run-all": "^4.1.5",
93
+ "p-timeout": "^4.1.0",
94
+ "prettier": "^2.1.1",
95
+ "process": "^0.11.10",
96
+ "puppeteer": "^13.0.1",
97
+ "rollup": "^2.75.0",
98
+ "rollup-plugin-copy": "^3.4.0",
99
+ "size-limit": "^8.0.0",
100
+ "tail": "^2.2.0",
101
+ "ts-loader": "^9.3.1",
102
+ "ts-node": "^10.9.1",
103
+ "typedoc": "^0.23.10",
104
+ "typescript": "^4.5.5"
105
+ },
106
+ "files": [
107
+ "dist",
108
+ "bundle",
109
+ "src/*.ts",
110
+ "src/lib/**/*.ts",
111
+ "src/proto/**/*.ts",
112
+ "!**/*.spec.*",
113
+ "!**/*.json",
114
+ "CHANGELOG.md",
115
+ "LICENSE",
116
+ "README.md"
117
+ ],
118
+ "lint-staged": {
119
+ "*.ts": [
120
+ "eslint --fix"
121
+ ],
122
+ "*.{ts,md,json,conf*.*js}": [
123
+ "prettier --write"
124
+ ]
125
+ }
126
+ }
package/src/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { RLNInstance } from "./rln";
2
+
3
+ // reexport the create function, dynamically imported from rln.ts
4
+ export async function create(): Promise<RLNInstance> {
5
+ // A dependency graph that contains any wasm must all be imported
6
+ // asynchronously. This file does the single async import, so
7
+ // that no one else needs to worry about it again.
8
+ const rlnModule = await import("./rln");
9
+
10
+ return await rlnModule.create();
11
+ }