@waku/rln 0.1.6-16328a3.0 → 0.1.6-3730abc.0
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/bundle/_virtual/utils.js +2 -2
- package/bundle/_virtual/utils2.js +2 -2
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/_sha2.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/hmac.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/pbkdf2.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/scrypt.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/sha256.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/sha512.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/@noble/hashes/utils.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
- package/bundle/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +2 -2
- package/bundle/packages/core/dist/lib/filter/filter.js +2 -0
- package/bundle/packages/core/dist/lib/light_push/light_push.js +2 -0
- package/bundle/packages/core/dist/lib/light_push/light_push_v3.js +30 -0
- package/bundle/packages/core/dist/lib/light_push/status_codes.js +25 -0
- package/bundle/packages/core/dist/lib/light_push/status_codes_v3.js +31 -0
- package/bundle/packages/core/dist/lib/message/version_0.js +3 -4
- package/bundle/packages/core/dist/lib/metadata/metadata.js +2 -0
- package/bundle/packages/core/dist/lib/store/store.js +2 -0
- package/bundle/packages/proto/dist/generated/light_push.js +28 -22
- package/bundle/packages/proto/dist/generated/light_push_v2.js +389 -0
- package/bundle/packages/proto/dist/generated/light_push_v3.js +348 -0
- package/bundle/packages/rln/dist/message.js +25 -0
- package/bundle/packages/rln/dist/rln.js +14 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/message.d.ts +5 -4
- package/dist/message.js +2 -0
- package/dist/message.js.map +1 -1
- package/package.json +1 -1
- package/src/message.ts +7 -4
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@waku/rln","version":"0.1.6-
|
1
|
+
{"name":"@waku/rln","version":"0.1.6-3730abc.0","description":"RLN (Rate Limiting Nullifier) implementation for Waku","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"type":"module","homepage":"https://github.com/waku-org/js-waku/tree/master/packages/rln#readme","repository":{"type":"git","url":"https://github.com/waku-org/js-waku.git"},"bugs":{"url":"https://github.com/waku-org/js-waku/issues"},"license":"MIT OR Apache-2.0","keywords":["waku","rln","rate-limiting","privacy","web3"],"scripts":{"build":"run-s build:**","build:copy":"mkdir -p dist/resources && cp -r src/resources/* dist/resources/","build:esm":"tsc","build:bundle":"rollup --config rollup.config.js","fix":"run-s fix:*","fix:lint":"eslint src *.js --fix","check":"run-s check:*","check:tsc":"tsc -p tsconfig.dev.json","check:lint":"eslint \"src/!(resources)/**/*.{ts,js}\" *.js","check:spelling":"cspell \"{README.md,src/**/*.ts}\"","test":"NODE_ENV=test run-s test:*","test:browser":"karma start karma.conf.cjs","watch:build":"tsc -p tsconfig.json -w","watch:test":"mocha --watch","prepublish":"npm run build","reset-hard":"git clean -dfx -e .idea && git reset --hard && npm i && npm run build"},"engines":{"node":">=20"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.2.3","@types/chai":"^5.0.1","@types/chai-spies":"^1.0.6","@waku/interfaces":"0.0.31-3730abc.0","@types/deep-equal-in-any-order":"^1.0.4","@types/lodash":"^4.17.15","@types/sinon":"^17.0.3","@waku/build-utils":"^1.0.0","@waku/message-encryption":"0.0.34-3730abc.0","deep-equal-in-any-order":"^2.0.6","fast-check":"^3.23.2","rollup-plugin-copy":"^3.5.0"},"files":["dist","bundle","src/**/*.ts","!**/*.spec.*","!**/*.json","CHANGELOG.md","LICENSE","README.md"],"dependencies":{"@chainsafe/bls-keystore":"3.0.0","@waku/core":"0.0.36-3730abc.0","@waku/utils":"0.0.24-3730abc.0","@noble/hashes":"^1.2.0","@waku/zerokit-rln-wasm":"^0.0.13","ethereum-cryptography":"^3.1.0","ethers":"^5.7.2","lodash":"^4.17.21","uuid":"^11.0.5","chai":"^5.1.2","chai-as-promised":"^8.0.1","chai-spies":"^1.1.0","chai-subset":"^1.6.0","sinon":"^19.0.2"}}
|
package/src/message.ts
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
import { message } from "@waku/core";
|
1
2
|
import type {
|
2
3
|
IDecodedMessage,
|
3
4
|
IMessage,
|
4
|
-
IRateLimitProof
|
5
|
+
IRateLimitProof,
|
6
|
+
IRlnMessage
|
5
7
|
} from "@waku/interfaces";
|
6
8
|
import * as utils from "@waku/utils/bytes";
|
7
9
|
|
@@ -13,12 +15,13 @@ export function toRLNSignal(contentTopic: string, msg: IMessage): Uint8Array {
|
|
13
15
|
return new Uint8Array([...(msg.payload ?? []), ...contentTopicBytes]);
|
14
16
|
}
|
15
17
|
|
16
|
-
export class RlnMessage<T extends IDecodedMessage> implements
|
18
|
+
export class RlnMessage<T extends IDecodedMessage> implements IRlnMessage {
|
17
19
|
public pubsubTopic = "";
|
20
|
+
public version = message.version_0.Version;
|
18
21
|
|
19
22
|
public constructor(
|
20
|
-
|
21
|
-
|
23
|
+
private rlnInstance: RLNInstance,
|
24
|
+
private msg: T,
|
22
25
|
public rateLimitProof: IRateLimitProof | undefined
|
23
26
|
) {}
|
24
27
|
|