UNPKG

@waku/rln

Version:

RLN (Rate Limiting Nullifier) implementation for Waku

11 lines (8 loc) 414 B
import { poseidonHash as poseidonHash$1 } from '../../../../node_modules/@waku/zerokit-rln-wasm/rln_wasm.js'; import { BytesUtils } from './bytes.js'; function poseidonHash(...input) { const inputLen = BytesUtils.writeUIntLE(new Uint8Array(8), input.length, 0, 8); const lenPrefixedData = BytesUtils.concatenate(inputLen, ...input); return poseidonHash$1(lenPrefixedData); } export { poseidonHash };