chore: update @waku/* packages (#77)

* update @waku/* packages

* fix typing

* remove type
This commit is contained in:
Sasha 2023-10-28 14:19:56 +02:00 committed by GitHub
parent fa49e29856
commit 7e8cb899be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6342 additions and 5224 deletions

11540
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -72,9 +72,9 @@
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"@waku/core": "^0.0.18",
"@waku/interfaces": "^0.0.13",
"@waku/message-encryption": "^0.0.16",
"@waku/core": "^0.0.24",
"@waku/interfaces": "^0.0.19",
"@waku/message-encryption": "^0.0.22",
"@web/rollup-plugin-import-meta-assets": "^1.0.7",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
@ -140,7 +140,7 @@
},
"dependencies": {
"@chainsafe/bls-keystore": "^3.0.0",
"@waku/utils": "^0.0.11",
"@waku/utils": "^0.0.12",
"@waku/zerokit-rln-wasm": "^0.0.10",
"ethereum-cryptography": "^2.1.2",
"ethers": "^5.7.2",

View File

@ -56,6 +56,10 @@ export class RLNEncoder implements IEncoder {
return proof;
}
get pubsubTopic(): string {
return this.encoder.pubsubTopic;
}
get contentTopic(): string {
return this.encoder.contentTopic;
}
@ -86,6 +90,10 @@ export class RLNDecoder<T extends IDecodedMessage>
{
constructor(private rlnInstance: RLNInstance, private decoder: IDecoder<T>) {}
get pubsubTopic(): string {
return this.decoder.pubsubTopic;
}
get contentTopic(): string {
return this.decoder.contentTopic;
}
@ -97,11 +105,11 @@ export class RLNDecoder<T extends IDecodedMessage>
}
async fromProtoObj(
pubSubTopic: string,
pubsubTopic: string,
proto: IProtoMessage
): Promise<RlnMessage<T> | undefined> {
const msg: T | undefined = await this.decoder.fromProtoObj(
pubSubTopic,
pubsubTopic,
proto
);
if (!msg) return;

View File

@ -14,7 +14,7 @@ export function toRLNSignal(contentTopic: string, msg: IMessage): Uint8Array {
}
export class RlnMessage<T extends IDecodedMessage> implements IDecodedMessage {
public pubSubTopic = "";
public pubsubTopic = "";
constructor(
public rlnInstance: RLNInstance,

View File

@ -1,5 +1,5 @@
import type { IRateLimitProof } from "@waku/interfaces";
import { default as init } from "@waku/zerokit-rln-wasm";
import init from "@waku/zerokit-rln-wasm";
import * as zerokitRLN from "@waku/zerokit-rln-wasm";
import { buildBigIntFromUint8Array, writeUIntLE } from "./byte_utils.js";
@ -48,7 +48,7 @@ async function loadZkey(): Promise<Uint8Array> {
* @returns RLNInstance
*/
export async function create(): Promise<RLNInstance> {
await init();
await (init as any)?.();
zerokitRLN.init_panic_hook();
const witnessCalculator = await loadWitnessCalculator();
const zkey = await loadZkey();