@waku/rln 0.0.8-964df01 → 0.0.8-b5f0cbb

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/index.js CHANGED
@@ -46084,6 +46084,50 @@ class WakuRelay extends GossipSub {
46084
46084
  WakuRelay.multicodec = RelayCodecs[0];
46085
46085
  WakuRelay.multicodec = RelayCodecs[RelayCodecs.length - 1];
46086
46086
 
46087
+ const DefaultEpochUnitSeconds = 10; // the rln-relay epoch length in seconds
46088
+ function dateToEpoch(timestamp, epochUnitSeconds = DefaultEpochUnitSeconds) {
46089
+ const time = timestamp.getTime();
46090
+ return Math.floor(time / 1000 / epochUnitSeconds);
46091
+ }
46092
+ function epochIntToBytes(epoch) {
46093
+ const bytes = new Uint8Array(32);
46094
+ const db = new DataView(bytes.buffer);
46095
+ db.setUint32(0, epoch, true);
46096
+ return bytes;
46097
+ }
46098
+ function epochBytesToInt(bytes) {
46099
+ const dv = new DataView(bytes.buffer);
46100
+ return dv.getUint32(0, true);
46101
+ }
46102
+
46103
+ class RlnMessage {
46104
+ constructor(rlnInstance, msg, rateLimitProof) {
46105
+ this.rlnInstance = rlnInstance;
46106
+ this.msg = msg;
46107
+ this.rateLimitProof = rateLimitProof;
46108
+ }
46109
+ verify() {
46110
+ return this.rateLimitProof
46111
+ ? this.rlnInstance.verifyProof(this.rateLimitProof)
46112
+ : undefined;
46113
+ }
46114
+ get payload() {
46115
+ return this.msg.payload;
46116
+ }
46117
+ get contentTopic() {
46118
+ return this.msg.contentTopic;
46119
+ }
46120
+ get timestamp() {
46121
+ return this.msg.timestamp;
46122
+ }
46123
+ get epoch() {
46124
+ const bytes = this.msg.rateLimitProof?.epoch;
46125
+ if (!bytes)
46126
+ return;
46127
+ return epochBytesToInt(bytes);
46128
+ }
46129
+ }
46130
+
46087
46131
  const log = debug("waku:message:rln-encoder");
46088
46132
  class RLNEncoder {
46089
46133
  constructor(encoder, rlnInstance, index, membershipKey) {
@@ -46114,9 +46158,12 @@ class RLNEncoder {
46114
46158
  }
46115
46159
  }
46116
46160
  class RLNDecoder {
46117
- constructor(decoder) {
46161
+ constructor(rlnInstance, decoder) {
46162
+ this.rlnInstance = rlnInstance;
46118
46163
  this.decoder = decoder;
46119
- this.contentTopic = decoder.contentTopic;
46164
+ }
46165
+ get contentTopic() {
46166
+ return this.decoder.contentTopic;
46120
46167
  }
46121
46168
  decodeProto(bytes) {
46122
46169
  const protoMessage = WakuMessage$4.decode(bytes);
@@ -46125,10 +46172,9 @@ class RLNDecoder {
46125
46172
  }
46126
46173
  async decode(proto) {
46127
46174
  const msg = await this.decoder.decode(proto);
46128
- if (msg) {
46129
- msg.rateLimitProof = proto.rateLimitProof;
46130
- }
46131
- return msg;
46175
+ if (!msg)
46176
+ return;
46177
+ return new RlnMessage(this.rlnInstance, msg, proto.rateLimitProof);
46132
46178
  }
46133
46179
  }
46134
46180
  function toRLNSignal(msg) {
@@ -46714,6 +46760,30 @@ async function init(input) {
46714
46760
  return finalizeInit(instance, module);
46715
46761
  }
46716
46762
 
46763
+ // Adapted from https://github.com/feross/buffer
46764
+ function checkInt(buf, value, offset, ext, max, min) {
46765
+ if (value > max || value < min)
46766
+ throw new RangeError('"value" argument is out of bounds');
46767
+ if (offset + ext > buf.length)
46768
+ throw new RangeError("Index out of range");
46769
+ }
46770
+ function writeUIntLE(buf, value, offset, byteLength, noAssert) {
46771
+ value = +value;
46772
+ offset = offset >>> 0;
46773
+ byteLength = byteLength >>> 0;
46774
+ if (!noAssert) {
46775
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1;
46776
+ checkInt(buf, value, offset, byteLength, maxBytes, 0);
46777
+ }
46778
+ let mul = 1;
46779
+ let i = 0;
46780
+ buf[offset] = value & 0xff;
46781
+ while (++i < byteLength && (mul *= 0x100)) {
46782
+ buf[offset + i] = (value / mul) & 0xff;
46783
+ }
46784
+ return buf;
46785
+ }
46786
+
46717
46787
  const verificationKey = {
46718
46788
  "protocol": "groth16",
46719
46789
  "curve": "bn128",
@@ -47178,34 +47248,6 @@ class MembershipKey {
47178
47248
  return new MembershipKey(idKey, idCommitment);
47179
47249
  }
47180
47250
  }
47181
- // Adapted from https://github.com/feross/buffer
47182
- function checkInt(buf, value, offset, ext, max, min) {
47183
- if (value > max || value < min)
47184
- throw new RangeError('"value" argument is out of bounds');
47185
- if (offset + ext > buf.length)
47186
- throw new RangeError("Index out of range");
47187
- }
47188
- const writeUIntLE = function writeUIntLE(buf, value, offset, byteLength, noAssert) {
47189
- value = +value;
47190
- offset = offset >>> 0;
47191
- byteLength = byteLength >>> 0;
47192
- if (!noAssert) {
47193
- const maxBytes = Math.pow(2, 8 * byteLength) - 1;
47194
- checkInt(buf, value, offset, byteLength, maxBytes, 0);
47195
- }
47196
- let mul = 1;
47197
- let i = 0;
47198
- buf[offset] = value & 0xff;
47199
- while (++i < byteLength && (mul *= 0x100)) {
47200
- buf[offset + i] = (value / mul) & 0xff;
47201
- }
47202
- return buf;
47203
- };
47204
- const DefaultEpochUnitSeconds = 10; // the rln-relay epoch length in seconds
47205
- function toEpoch(timestamp, epochUnitSeconds = DefaultEpochUnitSeconds) {
47206
- const unix = Math.floor(timestamp.getTime() / 1000 / epochUnitSeconds);
47207
- return writeUIntLE(new Uint8Array(32), unix, 0, 8);
47208
- }
47209
47251
  const proofOffset = 128;
47210
47252
  const rootOffset = proofOffset + 32;
47211
47253
  const epochOffset = rootOffset + 32;
@@ -47252,10 +47294,10 @@ class RLNInstance {
47252
47294
  }
47253
47295
  async generateProof(msg, index, epoch, idKey) {
47254
47296
  if (epoch == undefined) {
47255
- epoch = toEpoch(new Date());
47297
+ epoch = epochIntToBytes(dateToEpoch(new Date()));
47256
47298
  }
47257
47299
  else if (epoch instanceof Date) {
47258
- epoch = toEpoch(epoch);
47300
+ epoch = epochIntToBytes(dateToEpoch(epoch));
47259
47301
  }
47260
47302
  if (epoch.length != 32)
47261
47303
  throw "invalid epoch";
@@ -47286,7 +47328,6 @@ var rln = /*#__PURE__*/Object.freeze({
47286
47328
  __proto__: null,
47287
47329
  create: create$1,
47288
47330
  MembershipKey: MembershipKey,
47289
- toEpoch: toEpoch,
47290
47331
  Proof: Proof,
47291
47332
  RLNInstance: RLNInstance
47292
47333
  });
package/dist/.tsbuildinfo CHANGED
@@ -1 +1 @@
1
- {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/@types/ms/index.d.ts","../node_modules/@types/debug/index.d.ts","../node_modules/js-waku/dist/lib/constants.d.ts","../node_modules/@noble/secp256k1/lib/index.d.ts","../node_modules/js-waku/dist/lib/crypto.d.ts","../node_modules/js-waku/dist/lib/enr/constants.d.ts","../node_modules/multiformats/types/src/bases/interface.d.ts","../node_modules/multiformats/types/src/hashes/interface.d.ts","../node_modules/multiformats/types/src/cid.d.ts","../node_modules/@libp2p/interface-peer-id/dist/src/index.d.ts","../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/js-waku/dist/lib/enr/keypair/types.d.ts","../node_modules/js-waku/dist/lib/enr/keypair/secp256k1.d.ts","../node_modules/js-waku/dist/lib/enr/keypair/index.d.ts","../node_modules/js-waku/dist/lib/enr/types.d.ts","../node_modules/js-waku/dist/lib/enr/waku2_codec.d.ts","../node_modules/js-waku/dist/lib/enr/enr.d.ts","../node_modules/js-waku/dist/lib/enr/index.d.ts","../node_modules/js-waku/dist/lib/utils.d.ts","../node_modules/uint8arraylist/dist/src/index.d.ts","../node_modules/protons-runtime/dist/src/codec.d.ts","../node_modules/protons-runtime/dist/src/decode.d.ts","../node_modules/protons-runtime/dist/src/encode.d.ts","../node_modules/protons-runtime/dist/src/codecs/enum.d.ts","../node_modules/protons-runtime/dist/src/codecs/message.d.ts","../node_modules/protons-runtime/dist/src/index.d.ts","../node_modules/js-waku/dist/proto/message.d.ts","../node_modules/js-waku/dist/proto/topic_only_message.d.ts","../node_modules/@libp2p/interface-connection/dist/src/status.d.ts","../node_modules/it-stream-types/dist/src/index.d.ts","../node_modules/@libp2p/interfaces/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection/dist/src/index.d.ts","../node_modules/@libp2p/interfaces/dist/src/events.d.ts","../node_modules/@libp2p/interfaces/dist/src/startable.d.ts","../node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-transport/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-info/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-info/dist/src/index.d.ts","../node_modules/@libp2p/interface-content-routing/dist/src/index.d.ts","../node_modules/@libp2p/interface-address-manager/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-address-manager/dist/src/index.d.ts","../node_modules/@libp2p/interface-metrics/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-routing/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-store/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-record/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-store/dist/src/index.d.ts","../node_modules/@libp2p/interface-registrar/dist/src/index.d.ts","../node_modules/interface-store/dist/src/index.d.ts","../node_modules/multiformats/types/src/bases/base.d.ts","../node_modules/uint8arrays/types/src/util/bases.d.ts","../node_modules/uint8arrays/types/src/to-string.d.ts","../node_modules/interface-datastore/dist/src/key.d.ts","../node_modules/interface-datastore/dist/src/index.d.ts","../node_modules/it-pushable/dist/src/fifo.d.ts","../node_modules/it-pushable/dist/src/index.d.ts","../node_modules/@libp2p/interface-pubsub/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-discovery/dist/src/index.d.ts","../node_modules/@libp2p/interface-dht/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection-manager/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection-manager/dist/src/index.d.ts","../node_modules/@libp2p/components/dist/src/index.d.ts","../node_modules/libp2p/dist/src/transport-manager.d.ts","../node_modules/libp2p/dist/src/identify/pb/message.d.ts","../node_modules/libp2p/dist/src/identify/index.d.ts","../node_modules/libp2p/dist/src/circuit/index.d.ts","../node_modules/@libp2p/interface-stream-muxer/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection-encrypter/dist/src/index.d.ts","../node_modules/libp2p/dist/src/keychain/cms.d.ts","../node_modules/libp2p/dist/src/keychain/index.d.ts","../node_modules/libp2p/dist/src/connection-manager/latency-monitor.d.ts","../node_modules/timeout-abort-controller/dist/index.d.ts","../node_modules/libp2p/dist/src/connection-manager/dialer/dial-request.d.ts","../node_modules/libp2p/dist/src/connection-manager/dialer/index.d.ts","../node_modules/libp2p/dist/src/connection-manager/index.d.ts","../node_modules/libp2p/dist/src/ping/index.d.ts","../node_modules/libp2p/dist/src/fetch/index.d.ts","../node_modules/libp2p/dist/src/index.d.ts","../node_modules/js-waku/dist/proto/filter.d.ts","../node_modules/js-waku/dist/lib/waku_filter/filter_rpc.d.ts","../node_modules/js-waku/dist/lib/waku_filter/index.d.ts","../node_modules/js-waku/dist/proto/light_push.d.ts","../node_modules/js-waku/dist/lib/waku_light_push/index.d.ts","../node_modules/protobufjs/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.d.ts","../node_modules/@libp2p/interface-keys/dist/src/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message-cache.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-stats.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.d.ts","../node_modules/denque/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/metrics.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/tracer.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/config.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/stream.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.d.ts","../node_modules/js-waku/dist/lib/waku_relay/index.d.ts","../node_modules/js-waku/dist/proto/store_v2beta3.d.ts","../node_modules/js-waku/dist/proto/store_v2beta4.d.ts","../node_modules/js-waku/dist/lib/waku_store/constants.d.ts","../node_modules/js-waku/dist/lib/waku_store/history_rpc.d.ts","../node_modules/js-waku/dist/lib/waku_store/index.d.ts","../node_modules/js-waku/dist/lib/interfaces.d.ts","../node_modules/js-waku/dist/lib/waku.d.ts","../node_modules/js-waku/dist/index.d.ts","../node_modules/@waku/zerokit-rln-wasm/rln_wasm.d.ts","../src/resources/verification_key.js","../src/witness_calculator.d.ts","../src/rln.ts","../src/encoder.ts","../src/index.ts","../src/witness_calculator.js","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","78828b06c0d3b586954015e9ebde5480b009e166c71244763bda328ec0920f41","6299d01ee802437d2fdb53f47a689062510a9f7a23c62fb74e375de1a7ae53af","32d21255d0e9e84cf7ec2b6619667f272dd2bf24ab65da803fd0550d978d207e","9c97b7b6137838f43665aa58080150368941b5be758d0d97be42ba5283e78112","02745a73c954228b9ee7fdb90451051e3f93a14f4a20ec3190113b37d101a021","930446bf32192f698b78f8ea4b309d8c2cfe02ab5ad78e4db907417405ebf5e7","5d3e07dbeabff37885262d9b4bd21c3185d95a09a268ab795f81135046a32bf4","7d309fbde13b5e30eff77c07a28b66451b0b50b83564d0cfa6a2a52c8b69aae6","7b542336a694a2f25b504dc444b52c77de252a775227bed2ca5e925fcef13d5a","27cd03a4713d26b0b52b5550a42090d9eef70114a4c3a83fcfe412e580adf0ba","a07051fa95231541a136adf29905db4b0f9f8c2616519673c55f90cc537c6808","7251b051302d5fb8c081d740a584df2b8a980a98b281382ae774b0f7d2348f5e","d0344d7d04ba77f5a158ffa9d8210b6fdd7e89e4d3fe5864cdf31df9a10eed10","1351122b0d74eb3b36904b3e61903e93d271424e5c276b84a3c291ece34f90bd","b0fe8eac1572e0b0a06fc85da636a0ddf475cc62e7eec90cb8e9b1973dba2a31","2440044d6f19586922ac3c16a348836eb4a93d111f65ace2929964b1f57e878f","64e84c0558ead00ce0c7b44c37b189a81f04c8abc987e3968331999b280cb043","fa83c09609a2eba873b864792931e6477855278d97bcc9fdd11bf4ff05ce80b9","f98f7fd5c208374f072a67a46306ab9b3f914554b4ebb673fb805e13a4119b6c","dd49c9b32796fc4d04995ff4e69a4d23b7fd36605a9223e33a090b7bf8e25980","cb5cbcc8bc0e686fc503dd4db148679f6eb1bf6d593fd1f0add504b7d8de4c7d","667c9ac7c2f61c4a36220c2fa02f848a170aa96d3a58be32a5831aad86330da2","eb15dfd1f8b6da5f546fe29a6a0f0de4ae6dbd4a5577af4eba4c8a54548ef0a2","01443e5da049881a99f223c72617d4bb1d8854930d03deceb628e4be83df1e4a","76513b0c51c81a929f4f90694edf4dcc85f71bb46121b4192b5530e0601f9d81","b266fc05b22d884f2b3d3f4b55f000c33bca5f9b9f936a243110b88368710e2e","2dd78be12842d8dc0816822645bcaf68f09ae3e3983ea5c0ba83d6cc7632b47e","5821f60fa027b9d7633ddbc56ccdb4c5ef90c0b2b95e717b565b4fa054afaa2c","6666d48a46dbfd565490e7f8789093e2392c5bdcc3a380dfdd91c77237e43101","02416ac1a9fe3c5ec70dfaed050f1a26aa65c50f655402dcb91223fbe51bccb4","26fe6126240601801a30c33b18616c4f798de6e866967f000a7f975a5392285c","928eca07b95937e5491919c6f5fa79025301d65364837d7c3f9f07d61cfc2e03","331f961a57d2ac8fd1f4b36e240e0dbae91f97ce3f49f6d2a8be4a5d3b2897df","16c594cd8a44be9f5398d3fc7dbc9575f0b67d91a6553f35bd3576136862b32b","27cd03a4713d26b0b52b5550a42090d9eef70114a4c3a83fcfe412e580adf0ba","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","38cc9434f53457647573eede8d402b6819531582b5acd2d7bc209d3142316356","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","edb50eace77052203c3bc6eb251fe31f44ab0107e2b6d949ec983a918726aaf4","fe6af38652dbbc61cd25ab3f462896fadf71449ab0364db2f58c0940ca97591b","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","a50f0a71401b3c8247ab8ac54d5e44a6ac9c39d47a58fbbd5a0cee79a98d33f5","f7a9d2ebac14acf7ccab184c61bdabefa9c61e0fca2bd544dcd8999eb153c777","0d014fe6ff00590303942d67fcf6725188eaef7662627404296d934837e4cf03","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","866f0c4f16380a56653adc6cbeac08c58c626dabb431f0fa6cc2ba07874836d8","dd0caaa689028bc3d8d3230e24c1f98da0339c54a465c2195edd9ee23ea33434","539bef6bb223dc9ac66a89acf514ad9b16bd5039a633452b3191e559873dcb59","ca657fafdab00d4bd4c92b72bd68d1bde04f7f4476446ad47c7fc7ce9151577e","729b819a6779d842c3a6908ba4ed93d9fe50e2533d989f05f55a4811b3dd9910","c6591dc2b834e9be50f97edb393c4673e9b66f5689c90d69a71c7da962a0563a","7c515715da56f17e695e2c3611cf073d2cebfd417497652b35f9042b7235d5b2","531556008024c69163c0d120823a69e7a6a5be1279ea87fc725a63dc386278b7","df99b5b6041e9e37b46c876cd487020e4bc9e02a519fa4a735cbe18f5c4f2f38","274bc8a207e66c24bf59952d15da5d4b70ec412b3182739a82b7f1bd67a5bcc7","b5b6d20512b7d92b6de850a19ac29c548c7e5a105bcc1f22967e0efd5310fb2b","ccbeec89ab92cd041ebc17c5cb5dcca14a1fa0a636a818a10d5f20089b54e7f2","70cbb43b1e838bb77b16e1085115494c8b6925a954edf7fbdd494ad56a88adb8","986b7e3cf584813d300921ae7aa5b4073192e8c0f50344db1f9961975a30a77f","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","88ad228320e3076d53e30f26bd4358b9322cb68fd0d0ccd9895fceeba235e960","0334ade018e6a48ba2ac1bf782758df77cd2dcd3ae0270edc257fe2f7942f249","56290429d838ecda4c6ebf20352c68eaeb5783f0750393ffa5566d5d976dd4af","0820608ae5bf3995d77eedf0fa7f987c0d5c7c9592fdc0bcb391fb742d5067a0","a00910424a6d9ba16e3acfbd9fbc5f80ebc8e9bd57f8740dab34a2caee60207c","a4884d181eaed3e9d77cbabf01047fd99f03dc713b93c0ac0a956d2ac337daa1","d651c9e54a1387fbf0a60bc4d54472aa86e6248fe99c8b60030104db291eb5de","e9421d9417a6f97b6f1fab42d1f92b4cdc1f1bc7df1eca572d6c015ab5936afb","995a3938e28f1a7e359847f83b43951c05727b6ca42398982778adc8b9a58609","fdf29515c4323693532f4e4f3cd8833d778ad8aa20465146377cd90ae766602c","d8a63ecc9188f8ef5fce8c82ea2c691acce9a152b8bd07d75a6531c7d4c07df9","f83ca4c2157040bc3dc3edc59900f83cb4ca98c08357b8547401119cac667f57","b474a024807159ea4e8d0922a86da3cdd0580bc23f1d8415f5bfe782f3329dae","1a4d7457432a0774351c3582c2c7afdd045d6dd9fcae9b25bc8196a1f3caddc9","1ba6fafef4b1847388480a86f7014af9fd3cf604978b08e3be8acca4cd28a754","2ff50746755e37483881b3f33a676fd1bbb3b4e7dcd6332197507bd268df68a0","9febe93b8dd42425ec39a4d8e20b35c038e005c590b92524991858136833be6d","7cf03ed8cb512625bbfe7074cd09264037cbfd2db889c56ff4026693f5effba6","ef9c484bef2e1a893aafb481c538eae694875a121627d6f443e87caed4f9e820","88aa0657df43db4d4a7f0b78e9108e02bd63f753b8cd6256ee34c50b6be279ce","e96858dc11f9174115b2a5f4e3af58a39c79245b1991adad5179130dcb13fa4c","7872c02afbba864693cb3a2129b070de5ae92f9ee61aa455ce1d697b6bbaaf8c","fb65c3df97aace64613c43d8926b99ec08c20c6033e82a71964e614632995f67","1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da","925a8770415572378b7b62dcd714e744b7ffed86de59bdbe1d25c68d9d1f7f51","0e4c4e3b7f9bddce2bfa2d4536da74ee8c9579ef0ef654e975d44ded342201a2","1c78addfbffb6d1ba38007875d7445b65cd076fc41d600a511cefe1263eebd01","a5fc37a5017ad0097ee70196f66018119db1e22b525a6afd4edc1ce6bbbd0b16","831f1ad45e156fa12bf736f4895329cb6e785f1c940fc58043718409d9845a43","32ffd3e74601a33cbf6a7596e00338eba67cf598faed2903be4281ba7ec076b5","f0e189b1e6f438e57ef5e091052193f69aa09103758940d926ef448802100e3c","bc78b25c3aaf139ca527952875c53bff67360e6b5812b82a8fa89fdefb720879","460f30d6ea494bbf076853e1588d30ec4651efcc26cbfcd2c91362f7efc87e89","b96a5c8de20ea0ec0bd266593fdafce71126c8d9f02cb292ed106dccc1bc45b5","2724c926dbbded3b51c9a7d3a141f8123cf9b0da102f91b2dda835bda27af606","579db9f817e749e6f4c373119fbf2a21f0e68ef9e2fff5f59a47ab779f364e6e","ce218e7127b5c109cc128316dcafb71146b483c3476cb6e30c4a84e38a4ea7e7","fbf1861ccb6cd611ab076684d2b95748c79aa8ea2b3193f4b19c93b056acbd35","60ca66c2e560e891c4bbac8a6664edeb14a2757c1269bc4a5be91859fe70b14e","e88e0b5cc0507cd875a465563d4cf2b15b587f0acfbb165ece0003355cb6ee29","a23ff524a4ef2fdd66e1f819e18aabca86d8dbafb3148fe5bdeff347cc7fd17f","c6eda7de7c92223f4f3bee04b23f3150aa1381d746691aed46d74b18b1d377f7","9b0ce3d469d412754e0c32473c53940407a8abb6492f2b0aefa8d0d344a2d074","a6d46e32b64a5734441a2f2013c22860ca0638f65eb09e5aea33bb7eeb008eea","ca0a8b3f2b5a49904787170788b158c7dd043903f253f960d4556f155355c401","2db27d0f3a1ca4b7ed5d731bad4b93b82c52d96846030e0d8d83f95abb2ef699","44a90a28932df305585f63fad8e60e44c2b8432ae11a3e2cb41a915d0ecbb8d1","f4f919d65c5a4aca999f026c07c763a5a7ea5ce2c23bbf0b7bd43612012b6bfc","93b1bbfb5aff051840f7566b4cbc3d9471dfa1b842433b392df460483d3d015b","bafc4f9ad6e84627b20ff4ba5ad7c17ebc87525e543b96bcd27e7521214d54b4","75c9b7689a1a1d946866a34ab936eaf661ad4ea6eb2dda6b56e1971934893cb5",{"version":"9abb5669e34589039c2d856596fdbb05af84df6c57dd948582bb6cf33c7786a5","signature":"8e87acd8260ebbda136579bdf35e3535475864e40a3fd7ed09f45bd731fa6c3a"},"23c811b86e2e70be10ba78aba44942fb7dea4d7ca01cfbc14524508c5efbdc27",{"version":"fe90eb538e5725d200e35d94abd4e8cb0a527866570404254fedf6119f7e0d69","signature":"75d3d66f444c2ac8c00d793e0f8b3dbec57bde2604eda5b90a060fbdfa1384d2"},{"version":"61cc2dad0745cc35855fdeff2abc44a101772c953dd4e73782682f6fcb6ca031","signature":"258b7642bd378df176200916fae1ee62231d778d6981986bea9d5436fc5f4c60"},{"version":"08b494dc10a8b9cee2badde8b730964c6fe721f4921a8ebcd341b31337536b69","signature":"b6f55608c45fc864d021a3a1c8fe73db9b3dae803582dd4a24b53658444cec0d"},{"version":"cb732dfea79ca2a9a5fd4ed240df67d6c47fd5b66fe188c645367efd1762ed24","signature":"39257e47f71a52d198342c47d3a6b35338a3c8618e4335b56530f2cb3b0dc511"},"0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"e5979905796fe2740d85fbaf4f11f42b7ee1851421afe750823220813421b1af",{"version":"fcdcb42da18dd98dc286b1876dd425791772036012ae61263c011a76b13a190f","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5b30f550565fd0a7524282c81c27fe8534099e2cd26170ca80852308f07ae68d","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","d97cd8a4a42f557fc62271369ed0461c8e50d47b7f9c8ad0b5462f53306f6060","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"b8aca9d0c81abb02bec9b7621983ae65bde71da6727580070602bd2500a9ce2a","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","063f53ff674228c190efa19dd9448bcbd540acdbb48a928f4cf3a1b9f9478e43","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"287b21dc1d1b9701c92e15e7dd673dfe6044b15812956377adffb6f08825b1bc","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"4cd4cff679c9b3d9239fd7bf70293ca4594583767526916af8e5d5a47d0219c7","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"af9771b066ec35ffa1c7db391b018d2469d55e51b98ae95e62b6cbef1b0169ca","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true}],"options":{"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"module":6,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[203],[51,75,99,104,127,129,130,137,139,140,141,142,203],[127,129,203],[126,203],[127,129,132,203],[131,133,203],[131,132,138,203],[135,203],[104,129,131,133,134,136,137,203],[129,203],[62,74,203],[129,137,203],[51,53,99,127,128,203],[51,74,76,79,82,84,85,86,89,90,96,99,101,103,203],[75,78,203],[77,203],[51,72,203],[51,73,74,75,78,203],[51,53,62,71,72,73,203],[50,73,81,203],[50,51,73,81,100,203],[75,81,203],[49,50,203],[51,78,203],[51,73,81,203],[51,75,78,81,88,203],[51,62,74,75,98,203],[51,62,203],[51,74,203],[72,73,74,203],[72,73,74,75,78,203],[52,203],[42,203],[160,203],[163,203],[164,169,203],[165,175,176,183,192,202,203],[165,166,175,183,203],[167,203],[168,169,176,184,203],[169,192,199,203],[170,172,175,183,203],[171,203],[172,173,203],[174,175,203],[175,203],[175,176,177,192,202,203],[175,176,177,192,203],[203,207],[178,183,192,202,203],[175,176,178,179,183,192,199,202,203],[178,180,192,199,202,203],[160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209],[175,181,203],[182,202,203],[172,175,183,192,203],[184,203],[185,203],[163,186,203],[187,201,203,207],[188,203],[189,203],[175,190,203],[190,191,203,205],[175,192,193,194,203],[192,194,203],[192,193,203],[195,203],[196,203],[175,197,198,203],[197,198,203],[169,183,192,199,203],[200,203],[183,201,203],[164,178,189,202,203],[169,203],[192,203,204],[203,205],[203,206],[164,169,175,177,186,192,202,203,205,207],[192,203,208],[91,95,203],[94,203],[97,203],[44,46,60,61,69,70,123,125,144,149,151,203],[45,203],[51,53,56,57,58,203],[47,56,57,58,59,203],[51,54,55,203],[54,203],[51,53,74,120,123,125,144,149,151,203],[51,53,74,120,123,125,144,149,150,203],[121,203],[51,89,120,122,150,203],[51,89,120,124,150,203],[129,143,150,203],[62,145,146,147,203],[44,51,89,120,148,150,203],[62,68,203],[76,89,104,120,203],[53,73,74,116,203],[51,53,73,74,76,85,89,104,114,115,203],[51,53,73,74,75,76,89,103,104,113,116,203],[75,203],[51,73,74,76,90,104,203],[53,73,74,76,90,104,106,203],[51,53,73,74,75,76,79,81,82,85,86,89,90,96,99,100,101,103,105,107,108,109,110,112,117,118,119,203],[112,203],[51,104,111,203],[51,73,76,90,104,203],[53,73,74,75,76,79,104,203],[48,203],[48,49,203],[68,203],[63,203],[63,68,203],[62,63,203],[63,64,65,66,67,203],[93,203],[48,92,203],[43,150,152,156,203],[156,157,203],[150,153,154,155,203],[150,156],[156,157],[150,155]],"referencedMap":[[141,1],[143,2],[130,3],[127,4],[137,5],[134,6],[139,7],[136,8],[131,1],[132,1],[138,9],[133,10],[142,11],[140,12],[129,13],[104,14],[84,15],[83,16],[110,17],[103,18],[102,16],[74,19],[71,1],[82,20],[101,21],[128,1],[85,17],[100,22],[51,23],[81,24],[80,16],[86,25],[89,26],[87,16],[99,27],[88,28],[90,29],[109,30],[79,31],[78,16],[77,1],[75,1],[73,1],[76,1],[53,32],[52,1],[45,1],[43,33],[211,1],[42,1],[160,34],[161,34],[163,35],[164,36],[165,37],[166,38],[167,39],[168,40],[169,41],[170,42],[171,43],[172,44],[173,44],[174,45],[175,46],[176,47],[177,48],[162,49],[209,1],[178,50],[179,51],[180,52],[210,53],[181,54],[182,55],[183,56],[184,57],[185,58],[186,59],[187,60],[188,61],[189,62],[190,63],[191,64],[192,65],[194,66],[193,67],[195,68],[196,69],[197,70],[198,71],[199,72],[200,73],[201,74],[202,75],[203,76],[204,77],[205,78],[206,79],[207,80],[208,81],[153,1],[135,1],[96,82],[95,83],[91,1],[97,1],[98,84],[72,1],[152,85],[44,1],[46,86],[47,1],[59,87],[60,88],[56,89],[55,90],[54,1],[57,1],[58,1],[150,91],[61,1],[151,92],[122,93],[123,94],[125,95],[144,96],[147,1],[148,97],[149,98],[121,99],[124,99],[69,99],[145,99],[146,99],[70,99],[108,100],[115,101],[116,102],[117,103],[113,104],[119,105],[107,106],[106,99],[120,107],[111,108],[112,109],[118,110],[105,111],[92,112],[48,1],[50,113],[49,1],[126,1],[63,114],[66,115],[67,116],[64,117],[65,115],[68,118],[114,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[62,1],[94,119],[93,120],[157,121],[158,122],[154,1],[156,123],[155,1],[159,1]],"exportedModulesMap":[[141,1],[143,2],[130,3],[127,4],[137,5],[134,6],[139,7],[136,8],[131,1],[132,1],[138,9],[133,10],[142,11],[140,12],[129,13],[104,14],[84,15],[83,16],[110,17],[103,18],[102,16],[74,19],[71,1],[82,20],[101,21],[128,1],[85,17],[100,22],[51,23],[81,24],[80,16],[86,25],[89,26],[87,16],[99,27],[88,28],[90,29],[109,30],[79,31],[78,16],[77,1],[75,1],[73,1],[76,1],[53,32],[52,1],[45,1],[43,33],[211,1],[42,1],[160,34],[161,34],[163,35],[164,36],[165,37],[166,38],[167,39],[168,40],[169,41],[170,42],[171,43],[172,44],[173,44],[174,45],[175,46],[176,47],[177,48],[162,49],[209,1],[178,50],[179,51],[180,52],[210,53],[181,54],[182,55],[183,56],[184,57],[185,58],[186,59],[187,60],[188,61],[189,62],[190,63],[191,64],[192,65],[194,66],[193,67],[195,68],[196,69],[197,70],[198,71],[199,72],[200,73],[201,74],[202,75],[203,76],[204,77],[205,78],[206,79],[207,80],[208,81],[153,1],[135,1],[96,82],[95,83],[91,1],[97,1],[98,84],[72,1],[152,85],[44,1],[46,86],[47,1],[59,87],[60,88],[56,89],[55,90],[54,1],[57,1],[58,1],[150,91],[61,1],[151,92],[122,93],[123,94],[125,95],[144,96],[147,1],[148,97],[149,98],[121,99],[124,99],[69,99],[145,99],[146,99],[70,99],[108,100],[115,101],[116,102],[117,103],[113,104],[119,105],[107,106],[106,99],[120,107],[111,108],[112,109],[118,110],[105,111],[92,112],[48,1],[50,113],[49,1],[126,1],[63,114],[66,115],[67,116],[64,117],[65,115],[68,118],[114,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[62,1],[94,119],[93,120],[157,124],[158,125],[156,126],[155,1]],"semanticDiagnosticsPerFile":[141,143,130,127,137,134,139,136,131,132,138,133,142,140,129,104,84,83,110,103,102,74,71,82,101,128,85,100,51,81,80,86,89,87,99,88,90,109,79,78,77,75,73,76,53,52,45,43,211,42,160,161,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,162,209,178,179,180,210,181,182,183,184,185,186,187,188,189,190,191,192,194,193,195,196,197,198,199,200,201,202,203,204,205,206,207,208,153,135,96,95,91,97,98,72,152,44,46,47,59,60,56,55,54,57,58,150,61,151,122,123,125,144,147,148,149,121,124,69,145,146,70,108,115,116,117,113,119,107,106,120,111,112,118,105,92,48,50,49,126,63,66,67,64,65,68,114,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,1,41,62,94,93,157,158,154,156,155,159]},"version":"4.8.2"}
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/byte_utils.ts","../node_modules/@types/ms/index.d.ts","../node_modules/@types/debug/index.d.ts","../node_modules/js-waku/dist/lib/constants.d.ts","../node_modules/@noble/secp256k1/lib/index.d.ts","../node_modules/js-waku/dist/lib/crypto.d.ts","../node_modules/js-waku/dist/lib/enr/constants.d.ts","../node_modules/multiformats/types/src/bases/interface.d.ts","../node_modules/multiformats/types/src/hashes/interface.d.ts","../node_modules/multiformats/types/src/cid.d.ts","../node_modules/@libp2p/interface-peer-id/dist/src/index.d.ts","../node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/js-waku/dist/lib/enr/keypair/types.d.ts","../node_modules/js-waku/dist/lib/enr/keypair/secp256k1.d.ts","../node_modules/js-waku/dist/lib/enr/keypair/index.d.ts","../node_modules/js-waku/dist/lib/enr/types.d.ts","../node_modules/js-waku/dist/lib/enr/waku2_codec.d.ts","../node_modules/js-waku/dist/lib/enr/enr.d.ts","../node_modules/js-waku/dist/lib/enr/index.d.ts","../node_modules/js-waku/dist/lib/utils.d.ts","../node_modules/uint8arraylist/dist/src/index.d.ts","../node_modules/protons-runtime/dist/src/codec.d.ts","../node_modules/protons-runtime/dist/src/decode.d.ts","../node_modules/protons-runtime/dist/src/encode.d.ts","../node_modules/protons-runtime/dist/src/codecs/enum.d.ts","../node_modules/protons-runtime/dist/src/codecs/message.d.ts","../node_modules/protons-runtime/dist/src/index.d.ts","../node_modules/js-waku/dist/proto/message.d.ts","../node_modules/js-waku/dist/proto/topic_only_message.d.ts","../node_modules/@libp2p/interface-connection/dist/src/status.d.ts","../node_modules/it-stream-types/dist/src/index.d.ts","../node_modules/@libp2p/interfaces/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection/dist/src/index.d.ts","../node_modules/@libp2p/interfaces/dist/src/events.d.ts","../node_modules/@libp2p/interfaces/dist/src/startable.d.ts","../node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/protocols-table.d.ts","../node_modules/@libp2p/interface-transport/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-transport/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-info/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-info/dist/src/index.d.ts","../node_modules/@libp2p/interface-content-routing/dist/src/index.d.ts","../node_modules/@libp2p/interface-address-manager/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-address-manager/dist/src/index.d.ts","../node_modules/@libp2p/interface-metrics/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-routing/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-store/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-record/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-store/dist/src/index.d.ts","../node_modules/@libp2p/interface-registrar/dist/src/index.d.ts","../node_modules/interface-store/dist/src/index.d.ts","../node_modules/multiformats/types/src/bases/base.d.ts","../node_modules/uint8arrays/types/src/util/bases.d.ts","../node_modules/uint8arrays/types/src/to-string.d.ts","../node_modules/interface-datastore/dist/src/key.d.ts","../node_modules/interface-datastore/dist/src/index.d.ts","../node_modules/it-pushable/dist/src/fifo.d.ts","../node_modules/it-pushable/dist/src/index.d.ts","../node_modules/@libp2p/interface-pubsub/dist/src/index.d.ts","../node_modules/@libp2p/interface-peer-discovery/dist/src/index.d.ts","../node_modules/@libp2p/interface-dht/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection-manager/node_modules/@multiformats/multiaddr/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection-manager/dist/src/index.d.ts","../node_modules/@libp2p/components/dist/src/index.d.ts","../node_modules/libp2p/dist/src/transport-manager.d.ts","../node_modules/libp2p/dist/src/identify/pb/message.d.ts","../node_modules/libp2p/dist/src/identify/index.d.ts","../node_modules/libp2p/dist/src/circuit/index.d.ts","../node_modules/@libp2p/interface-stream-muxer/dist/src/index.d.ts","../node_modules/@libp2p/interface-connection-encrypter/dist/src/index.d.ts","../node_modules/libp2p/dist/src/keychain/cms.d.ts","../node_modules/libp2p/dist/src/keychain/index.d.ts","../node_modules/libp2p/dist/src/connection-manager/latency-monitor.d.ts","../node_modules/timeout-abort-controller/dist/index.d.ts","../node_modules/libp2p/dist/src/connection-manager/dialer/dial-request.d.ts","../node_modules/libp2p/dist/src/connection-manager/dialer/index.d.ts","../node_modules/libp2p/dist/src/connection-manager/index.d.ts","../node_modules/libp2p/dist/src/ping/index.d.ts","../node_modules/libp2p/dist/src/fetch/index.d.ts","../node_modules/libp2p/dist/src/index.d.ts","../node_modules/js-waku/dist/proto/filter.d.ts","../node_modules/js-waku/dist/lib/waku_filter/filter_rpc.d.ts","../node_modules/js-waku/dist/lib/waku_filter/index.d.ts","../node_modules/js-waku/dist/proto/light_push.d.ts","../node_modules/js-waku/dist/lib/waku_light_push/index.d.ts","../node_modules/protobufjs/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/rpc.d.ts","../node_modules/@libp2p/interface-keys/dist/src/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/types.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/message-cache.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-params.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score-thresholds.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-stats.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/compute-score.d.ts","../node_modules/denque/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/message-deliveries.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/metrics.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/peer-score.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/score/index.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/tracer.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/config.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/stream.d.ts","../node_modules/@chainsafe/libp2p-gossipsub/dist/src/index.d.ts","../node_modules/js-waku/dist/lib/waku_relay/index.d.ts","../node_modules/js-waku/dist/proto/store_v2beta3.d.ts","../node_modules/js-waku/dist/proto/store_v2beta4.d.ts","../node_modules/js-waku/dist/lib/waku_store/constants.d.ts","../node_modules/js-waku/dist/lib/waku_store/history_rpc.d.ts","../node_modules/js-waku/dist/lib/waku_store/index.d.ts","../node_modules/js-waku/dist/lib/interfaces.d.ts","../node_modules/js-waku/dist/lib/waku.d.ts","../node_modules/js-waku/dist/index.d.ts","../src/epoch.ts","../node_modules/@waku/zerokit-rln-wasm/rln_wasm.d.ts","../src/resources/verification_key.js","../src/witness_calculator.d.ts","../src/rln.ts","../src/message.ts","../src/codec.ts","../src/index.ts","../src/witness_calculator.js","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"ea0a30e70b372a2ab9e9d1f6fa2b5850be0cadc47cb5fa8fa45a9df4b88831f7","signature":"49dc7187ccbcf7bc5b5f95b7d10765053bb2f4cf4f344ce48ce85b79db7cb596"},"6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","78828b06c0d3b586954015e9ebde5480b009e166c71244763bda328ec0920f41","6299d01ee802437d2fdb53f47a689062510a9f7a23c62fb74e375de1a7ae53af","32d21255d0e9e84cf7ec2b6619667f272dd2bf24ab65da803fd0550d978d207e","9c97b7b6137838f43665aa58080150368941b5be758d0d97be42ba5283e78112","02745a73c954228b9ee7fdb90451051e3f93a14f4a20ec3190113b37d101a021","930446bf32192f698b78f8ea4b309d8c2cfe02ab5ad78e4db907417405ebf5e7","5d3e07dbeabff37885262d9b4bd21c3185d95a09a268ab795f81135046a32bf4","7d309fbde13b5e30eff77c07a28b66451b0b50b83564d0cfa6a2a52c8b69aae6","7b542336a694a2f25b504dc444b52c77de252a775227bed2ca5e925fcef13d5a","27cd03a4713d26b0b52b5550a42090d9eef70114a4c3a83fcfe412e580adf0ba","a07051fa95231541a136adf29905db4b0f9f8c2616519673c55f90cc537c6808","7251b051302d5fb8c081d740a584df2b8a980a98b281382ae774b0f7d2348f5e","d0344d7d04ba77f5a158ffa9d8210b6fdd7e89e4d3fe5864cdf31df9a10eed10","1351122b0d74eb3b36904b3e61903e93d271424e5c276b84a3c291ece34f90bd","b0fe8eac1572e0b0a06fc85da636a0ddf475cc62e7eec90cb8e9b1973dba2a31","2440044d6f19586922ac3c16a348836eb4a93d111f65ace2929964b1f57e878f","64e84c0558ead00ce0c7b44c37b189a81f04c8abc987e3968331999b280cb043","fa83c09609a2eba873b864792931e6477855278d97bcc9fdd11bf4ff05ce80b9","f98f7fd5c208374f072a67a46306ab9b3f914554b4ebb673fb805e13a4119b6c","dd49c9b32796fc4d04995ff4e69a4d23b7fd36605a9223e33a090b7bf8e25980","cb5cbcc8bc0e686fc503dd4db148679f6eb1bf6d593fd1f0add504b7d8de4c7d","667c9ac7c2f61c4a36220c2fa02f848a170aa96d3a58be32a5831aad86330da2","eb15dfd1f8b6da5f546fe29a6a0f0de4ae6dbd4a5577af4eba4c8a54548ef0a2","01443e5da049881a99f223c72617d4bb1d8854930d03deceb628e4be83df1e4a","76513b0c51c81a929f4f90694edf4dcc85f71bb46121b4192b5530e0601f9d81","b266fc05b22d884f2b3d3f4b55f000c33bca5f9b9f936a243110b88368710e2e","2dd78be12842d8dc0816822645bcaf68f09ae3e3983ea5c0ba83d6cc7632b47e","5821f60fa027b9d7633ddbc56ccdb4c5ef90c0b2b95e717b565b4fa054afaa2c","6666d48a46dbfd565490e7f8789093e2392c5bdcc3a380dfdd91c77237e43101","02416ac1a9fe3c5ec70dfaed050f1a26aa65c50f655402dcb91223fbe51bccb4","26fe6126240601801a30c33b18616c4f798de6e866967f000a7f975a5392285c","928eca07b95937e5491919c6f5fa79025301d65364837d7c3f9f07d61cfc2e03","331f961a57d2ac8fd1f4b36e240e0dbae91f97ce3f49f6d2a8be4a5d3b2897df","16c594cd8a44be9f5398d3fc7dbc9575f0b67d91a6553f35bd3576136862b32b","27cd03a4713d26b0b52b5550a42090d9eef70114a4c3a83fcfe412e580adf0ba","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","38cc9434f53457647573eede8d402b6819531582b5acd2d7bc209d3142316356","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","edb50eace77052203c3bc6eb251fe31f44ab0107e2b6d949ec983a918726aaf4","fe6af38652dbbc61cd25ab3f462896fadf71449ab0364db2f58c0940ca97591b","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","a50f0a71401b3c8247ab8ac54d5e44a6ac9c39d47a58fbbd5a0cee79a98d33f5","f7a9d2ebac14acf7ccab184c61bdabefa9c61e0fca2bd544dcd8999eb153c777","0d014fe6ff00590303942d67fcf6725188eaef7662627404296d934837e4cf03","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","866f0c4f16380a56653adc6cbeac08c58c626dabb431f0fa6cc2ba07874836d8","dd0caaa689028bc3d8d3230e24c1f98da0339c54a465c2195edd9ee23ea33434","539bef6bb223dc9ac66a89acf514ad9b16bd5039a633452b3191e559873dcb59","ca657fafdab00d4bd4c92b72bd68d1bde04f7f4476446ad47c7fc7ce9151577e","729b819a6779d842c3a6908ba4ed93d9fe50e2533d989f05f55a4811b3dd9910","c6591dc2b834e9be50f97edb393c4673e9b66f5689c90d69a71c7da962a0563a","7c515715da56f17e695e2c3611cf073d2cebfd417497652b35f9042b7235d5b2","531556008024c69163c0d120823a69e7a6a5be1279ea87fc725a63dc386278b7","df99b5b6041e9e37b46c876cd487020e4bc9e02a519fa4a735cbe18f5c4f2f38","274bc8a207e66c24bf59952d15da5d4b70ec412b3182739a82b7f1bd67a5bcc7","b5b6d20512b7d92b6de850a19ac29c548c7e5a105bcc1f22967e0efd5310fb2b","ccbeec89ab92cd041ebc17c5cb5dcca14a1fa0a636a818a10d5f20089b54e7f2","70cbb43b1e838bb77b16e1085115494c8b6925a954edf7fbdd494ad56a88adb8","986b7e3cf584813d300921ae7aa5b4073192e8c0f50344db1f9961975a30a77f","2ea9a5510eb2d9ea6c1ea8273718ecf89a24e1efb21c2ed156d6fdbadcf9ccb0","88ad228320e3076d53e30f26bd4358b9322cb68fd0d0ccd9895fceeba235e960","0334ade018e6a48ba2ac1bf782758df77cd2dcd3ae0270edc257fe2f7942f249","56290429d838ecda4c6ebf20352c68eaeb5783f0750393ffa5566d5d976dd4af","0820608ae5bf3995d77eedf0fa7f987c0d5c7c9592fdc0bcb391fb742d5067a0","a00910424a6d9ba16e3acfbd9fbc5f80ebc8e9bd57f8740dab34a2caee60207c","a4884d181eaed3e9d77cbabf01047fd99f03dc713b93c0ac0a956d2ac337daa1","d651c9e54a1387fbf0a60bc4d54472aa86e6248fe99c8b60030104db291eb5de","e9421d9417a6f97b6f1fab42d1f92b4cdc1f1bc7df1eca572d6c015ab5936afb","995a3938e28f1a7e359847f83b43951c05727b6ca42398982778adc8b9a58609","fdf29515c4323693532f4e4f3cd8833d778ad8aa20465146377cd90ae766602c","d8a63ecc9188f8ef5fce8c82ea2c691acce9a152b8bd07d75a6531c7d4c07df9","f83ca4c2157040bc3dc3edc59900f83cb4ca98c08357b8547401119cac667f57","b474a024807159ea4e8d0922a86da3cdd0580bc23f1d8415f5bfe782f3329dae","1a4d7457432a0774351c3582c2c7afdd045d6dd9fcae9b25bc8196a1f3caddc9","1ba6fafef4b1847388480a86f7014af9fd3cf604978b08e3be8acca4cd28a754","2ff50746755e37483881b3f33a676fd1bbb3b4e7dcd6332197507bd268df68a0","9febe93b8dd42425ec39a4d8e20b35c038e005c590b92524991858136833be6d","7cf03ed8cb512625bbfe7074cd09264037cbfd2db889c56ff4026693f5effba6","ef9c484bef2e1a893aafb481c538eae694875a121627d6f443e87caed4f9e820","88aa0657df43db4d4a7f0b78e9108e02bd63f753b8cd6256ee34c50b6be279ce","e96858dc11f9174115b2a5f4e3af58a39c79245b1991adad5179130dcb13fa4c","7872c02afbba864693cb3a2129b070de5ae92f9ee61aa455ce1d697b6bbaaf8c","fb65c3df97aace64613c43d8926b99ec08c20c6033e82a71964e614632995f67","1558c642e03689d42843e7b047b9c20e77ee09ab388ff854484db5dcfbed11da","925a8770415572378b7b62dcd714e744b7ffed86de59bdbe1d25c68d9d1f7f51","0e4c4e3b7f9bddce2bfa2d4536da74ee8c9579ef0ef654e975d44ded342201a2","1c78addfbffb6d1ba38007875d7445b65cd076fc41d600a511cefe1263eebd01","a5fc37a5017ad0097ee70196f66018119db1e22b525a6afd4edc1ce6bbbd0b16","831f1ad45e156fa12bf736f4895329cb6e785f1c940fc58043718409d9845a43","32ffd3e74601a33cbf6a7596e00338eba67cf598faed2903be4281ba7ec076b5","f0e189b1e6f438e57ef5e091052193f69aa09103758940d926ef448802100e3c","bc78b25c3aaf139ca527952875c53bff67360e6b5812b82a8fa89fdefb720879","460f30d6ea494bbf076853e1588d30ec4651efcc26cbfcd2c91362f7efc87e89","b96a5c8de20ea0ec0bd266593fdafce71126c8d9f02cb292ed106dccc1bc45b5","2724c926dbbded3b51c9a7d3a141f8123cf9b0da102f91b2dda835bda27af606","579db9f817e749e6f4c373119fbf2a21f0e68ef9e2fff5f59a47ab779f364e6e","ce218e7127b5c109cc128316dcafb71146b483c3476cb6e30c4a84e38a4ea7e7","fbf1861ccb6cd611ab076684d2b95748c79aa8ea2b3193f4b19c93b056acbd35","60ca66c2e560e891c4bbac8a6664edeb14a2757c1269bc4a5be91859fe70b14e","e88e0b5cc0507cd875a465563d4cf2b15b587f0acfbb165ece0003355cb6ee29","a23ff524a4ef2fdd66e1f819e18aabca86d8dbafb3148fe5bdeff347cc7fd17f","c6eda7de7c92223f4f3bee04b23f3150aa1381d746691aed46d74b18b1d377f7","9b0ce3d469d412754e0c32473c53940407a8abb6492f2b0aefa8d0d344a2d074","a6d46e32b64a5734441a2f2013c22860ca0638f65eb09e5aea33bb7eeb008eea","ca0a8b3f2b5a49904787170788b158c7dd043903f253f960d4556f155355c401","2db27d0f3a1ca4b7ed5d731bad4b93b82c52d96846030e0d8d83f95abb2ef699","44a90a28932df305585f63fad8e60e44c2b8432ae11a3e2cb41a915d0ecbb8d1","f4f919d65c5a4aca999f026c07c763a5a7ea5ce2c23bbf0b7bd43612012b6bfc","93b1bbfb5aff051840f7566b4cbc3d9471dfa1b842433b392df460483d3d015b","bafc4f9ad6e84627b20ff4ba5ad7c17ebc87525e543b96bcd27e7521214d54b4",{"version":"359a6b5add122e8b4106495ecf9c4d7ab57fcfc391b42437c0ef9c3b87339e52","signature":"b5b1f8f8b94f35a0a1b59e923899562482f6c99b912a0c2fa9424410fdd6f910"},"75c9b7689a1a1d946866a34ab936eaf661ad4ea6eb2dda6b56e1971934893cb5",{"version":"9abb5669e34589039c2d856596fdbb05af84df6c57dd948582bb6cf33c7786a5","signature":"8e87acd8260ebbda136579bdf35e3535475864e40a3fd7ed09f45bd731fa6c3a"},"23c811b86e2e70be10ba78aba44942fb7dea4d7ca01cfbc14524508c5efbdc27",{"version":"4cd9a34f645b03852da7a346a979fa1b2a3e023039cbe31f978536b20e3ed34f","signature":"409980245edb22f02fe5a2f86e97dfe6d83eb5c3ea852eacc74aca38de870fc0"},{"version":"a3395f0961e4a6ecb9d870a67b35022cb88d79c4012919077668d32fee34e3b6","signature":"e6f0bd0dd9408a7802d384ae66622e6678a88c80cbe3726a27df56dd5ef8af93"},{"version":"d83d9088625e1ee77ceaae0cc7422b0c06f8ad3b66e58e306fb2dbc6b55c6acb","signature":"bcba3bf13956a89b9f61b240072fc245ffd11eb0ffc9759fa18f6b59abcdb155"},{"version":"9fb6b368ca0ac23248775dee5d151606c7f0c1850030ab2e257dd14970da0225","signature":"1010b5cf10f3c529969d61d8375c3efed47ca05702895b1a2913f1db2a291f05"},{"version":"cb732dfea79ca2a9a5fd4ed240df67d6c47fd5b66fe188c645367efd1762ed24","signature":"39257e47f71a52d198342c47d3a6b35338a3c8618e4335b56530f2cb3b0dc511"},"0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"e5979905796fe2740d85fbaf4f11f42b7ee1851421afe750823220813421b1af",{"version":"fcdcb42da18dd98dc286b1876dd425791772036012ae61263c011a76b13a190f","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5b30f550565fd0a7524282c81c27fe8534099e2cd26170ca80852308f07ae68d","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","d97cd8a4a42f557fc62271369ed0461c8e50d47b7f9c8ad0b5462f53306f6060","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"b8aca9d0c81abb02bec9b7621983ae65bde71da6727580070602bd2500a9ce2a","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","063f53ff674228c190efa19dd9448bcbd540acdbb48a928f4cf3a1b9f9478e43","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"287b21dc1d1b9701c92e15e7dd673dfe6044b15812956377adffb6f08825b1bc","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"4cd4cff679c9b3d9239fd7bf70293ca4594583767526916af8e5d5a47d0219c7","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"af9771b066ec35ffa1c7db391b018d2469d55e51b98ae95e62b6cbef1b0169ca","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true}],"options":{"alwaysStrict":true,"declaration":true,"esModuleInterop":true,"module":6,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[206],[52,76,100,105,128,130,131,138,140,141,142,143,206],[128,130,206],[127,206],[128,130,133,206],[132,134,206],[132,133,139,206],[136,206],[105,130,132,134,135,137,138,206],[130,206],[63,75,206],[130,138,206],[52,54,100,128,129,206],[52,75,77,80,83,85,86,87,90,91,97,100,102,104,206],[76,79,206],[78,206],[52,73,206],[52,74,75,76,79,206],[52,54,63,72,73,74,206],[51,74,82,206],[51,52,74,82,101,206],[76,82,206],[50,51,206],[52,79,206],[52,74,82,206],[52,76,79,82,89,206],[52,63,75,76,99,206],[52,63,206],[52,75,206],[73,74,75,206],[73,74,75,76,79,206],[53,206],[43,206],[163,206],[166,206],[167,172,206],[168,178,179,186,195,205,206],[168,169,178,186,206],[170,206],[171,172,179,187,206],[172,195,202,206],[173,175,178,186,206],[174,206],[175,176,206],[177,178,206],[178,206],[178,179,180,195,205,206],[178,179,180,195,206],[206,210],[181,186,195,205,206],[178,179,181,182,186,195,202,205,206],[181,183,195,202,205,206],[163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212],[178,184,206],[185,205,206],[175,178,186,195,206],[187,206],[188,206],[166,189,206],[190,204,206,210],[191,206],[192,206],[178,193,206],[193,194,206,208],[178,195,196,197,206],[195,197,206],[195,196,206],[198,206],[199,206],[178,200,201,206],[200,201,206],[172,186,195,202,206],[203,206],[186,204,206],[167,181,192,205,206],[172,206],[195,206,207],[206,208],[206,209],[167,172,178,180,189,195,205,206,208,210],[195,206,211],[92,96,206],[95,206],[98,206],[45,47,61,62,70,71,124,126,145,150,152,206],[46,206],[52,54,57,58,59,206],[48,57,58,59,60,206],[52,55,56,206],[55,206],[52,54,75,121,124,126,145,150,152,206],[52,54,75,121,124,126,145,150,151,206],[122,206],[52,90,121,123,151,206],[52,90,121,125,151,206],[130,144,151,206],[63,146,147,148,206],[45,52,90,121,149,151,206],[63,69,206],[77,90,105,121,206],[54,74,75,117,206],[52,54,74,75,77,86,90,105,115,116,206],[52,54,74,75,76,77,90,104,105,114,117,206],[76,206],[52,74,75,77,91,105,206],[54,74,75,77,91,105,107,206],[52,54,74,75,76,77,80,82,83,86,87,90,91,97,100,101,102,104,106,108,109,110,111,113,118,119,120,206],[113,206],[52,105,112,206],[52,74,77,91,105,206],[54,74,75,76,77,80,105,206],[49,206],[49,50,206],[69,206],[64,206],[64,69,206],[63,64,206],[64,65,66,67,68,206],[94,206],[49,93,206],[44,151,153,158,159,206],[158,160,206],[151,154,158,206],[42,151,154,155,156,157,206],[151,158,159],[158,160],[151,158],[151,157]],"referencedMap":[[142,1],[144,2],[131,3],[128,4],[138,5],[135,6],[140,7],[137,8],[132,1],[133,1],[139,9],[134,10],[143,11],[141,12],[130,13],[105,14],[85,15],[84,16],[111,17],[104,18],[103,16],[75,19],[72,1],[83,20],[102,21],[129,1],[86,17],[101,22],[52,23],[82,24],[81,16],[87,25],[90,26],[88,16],[100,27],[89,28],[91,29],[110,30],[80,31],[79,16],[78,1],[76,1],[74,1],[77,1],[54,32],[53,1],[46,1],[44,33],[214,1],[43,1],[163,34],[164,34],[166,35],[167,36],[168,37],[169,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,44],[177,45],[178,46],[179,47],[180,48],[165,49],[212,1],[181,50],[182,51],[183,52],[213,53],[184,54],[185,55],[186,56],[187,57],[188,58],[189,59],[190,60],[191,61],[192,62],[193,63],[194,64],[195,65],[197,66],[196,67],[198,68],[199,69],[200,70],[201,71],[202,72],[203,73],[204,74],[205,75],[206,76],[207,77],[208,78],[209,79],[210,80],[211,81],[155,1],[136,1],[97,82],[96,83],[92,1],[98,1],[99,84],[73,1],[153,85],[45,1],[47,86],[48,1],[60,87],[61,88],[57,89],[56,90],[55,1],[58,1],[59,1],[151,91],[62,1],[152,92],[123,93],[124,94],[126,95],[145,96],[148,1],[149,97],[150,98],[122,99],[125,99],[70,99],[146,99],[147,99],[71,99],[109,100],[116,101],[117,102],[118,103],[114,104],[120,105],[108,106],[107,99],[121,107],[112,108],[113,109],[119,110],[106,111],[93,112],[49,1],[51,113],[50,1],[127,1],[64,114],[67,115],[68,116],[65,117],[66,115],[69,118],[115,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[63,1],[95,119],[94,120],[42,1],[160,121],[154,1],[161,122],[159,123],[156,1],[158,124],[157,1],[162,1]],"exportedModulesMap":[[142,1],[144,2],[131,3],[128,4],[138,5],[135,6],[140,7],[137,8],[132,1],[133,1],[139,9],[134,10],[143,11],[141,12],[130,13],[105,14],[85,15],[84,16],[111,17],[104,18],[103,16],[75,19],[72,1],[83,20],[102,21],[129,1],[86,17],[101,22],[52,23],[82,24],[81,16],[87,25],[90,26],[88,16],[100,27],[89,28],[91,29],[110,30],[80,31],[79,16],[78,1],[76,1],[74,1],[77,1],[54,32],[53,1],[46,1],[44,33],[214,1],[43,1],[163,34],[164,34],[166,35],[167,36],[168,37],[169,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,44],[177,45],[178,46],[179,47],[180,48],[165,49],[212,1],[181,50],[182,51],[183,52],[213,53],[184,54],[185,55],[186,56],[187,57],[188,58],[189,59],[190,60],[191,61],[192,62],[193,63],[194,64],[195,65],[197,66],[196,67],[198,68],[199,69],[200,70],[201,71],[202,72],[203,73],[204,74],[205,75],[206,76],[207,77],[208,78],[209,79],[210,80],[211,81],[155,1],[136,1],[97,82],[96,83],[92,1],[98,1],[99,84],[73,1],[153,85],[45,1],[47,86],[48,1],[60,87],[61,88],[57,89],[56,90],[55,1],[58,1],[59,1],[151,91],[62,1],[152,92],[123,93],[124,94],[126,95],[145,96],[148,1],[149,97],[150,98],[122,99],[125,99],[70,99],[146,99],[147,99],[71,99],[109,100],[116,101],[117,102],[118,103],[114,104],[120,105],[108,106],[107,99],[121,107],[112,108],[113,109],[119,110],[106,111],[93,112],[49,1],[51,113],[50,1],[127,1],[64,114],[67,115],[68,116],[65,117],[66,115],[69,118],[115,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[63,1],[95,119],[94,120],[160,125],[161,126],[159,127],[158,128],[157,1]],"semanticDiagnosticsPerFile":[142,144,131,128,138,135,140,137,132,133,139,134,143,141,130,105,85,84,111,104,103,75,72,83,102,129,86,101,52,82,81,87,90,88,100,89,91,110,80,79,78,76,74,77,54,53,46,44,214,43,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,165,212,181,182,183,213,184,185,186,187,188,189,190,191,192,193,194,195,197,196,198,199,200,201,202,203,204,205,206,207,208,209,210,211,155,136,97,96,92,98,99,73,153,45,47,48,60,61,57,56,55,58,59,151,62,152,123,124,126,145,148,149,150,122,125,70,146,147,71,109,116,117,118,114,120,108,107,121,112,113,119,106,93,49,51,50,127,64,67,68,65,66,69,115,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,1,41,63,95,94,42,160,154,161,159,156,158,157,162]},"version":"4.8.2"}
@@ -0,0 +1 @@
1
+ export declare function writeUIntLE(buf: Uint8Array, value: number, offset: number, byteLength: number, noAssert?: boolean): Uint8Array;
@@ -0,0 +1,24 @@
1
+ // Adapted from https://github.com/feross/buffer
2
+ function checkInt(buf, value, offset, ext, max, min) {
3
+ if (value > max || value < min)
4
+ throw new RangeError('"value" argument is out of bounds');
5
+ if (offset + ext > buf.length)
6
+ throw new RangeError("Index out of range");
7
+ }
8
+ export function writeUIntLE(buf, value, offset, byteLength, noAssert) {
9
+ value = +value;
10
+ offset = offset >>> 0;
11
+ byteLength = byteLength >>> 0;
12
+ if (!noAssert) {
13
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1;
14
+ checkInt(buf, value, offset, byteLength, maxBytes, 0);
15
+ }
16
+ let mul = 1;
17
+ let i = 0;
18
+ buf[offset] = value & 0xff;
19
+ while (++i < byteLength && (mul *= 0x100)) {
20
+ buf[offset + i] = (value / mul) & 0xff;
21
+ }
22
+ return buf;
23
+ }
24
+ //# sourceMappingURL=byte_utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"byte_utils.js","sourceRoot":"","sources":["../src/byte_utils.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,SAAS,QAAQ,CACf,GAAe,EACf,KAAa,EACb,MAAc,EACd,GAAW,EACX,GAAW,EACX,GAAW;IAEX,IAAI,KAAK,GAAG,GAAG,IAAI,KAAK,GAAG,GAAG;QAC5B,MAAM,IAAI,UAAU,CAAC,mCAAmC,CAAC,CAAC;IAC5D,IAAI,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,MAAM;QAAE,MAAM,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,GAAe,EACf,KAAa,EACb,MAAc,EACd,UAAkB,EAClB,QAAkB;IAElB,KAAK,GAAG,CAAC,KAAK,CAAC;IACf,MAAM,GAAG,MAAM,KAAK,CAAC,CAAC;IACtB,UAAU,GAAG,UAAU,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QACjD,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;KACvD;IAED,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,CAAC,GAAG,UAAU,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE;QACzC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;KACxC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Decoder, Encoder, Message, ProtoMessage } from "js-waku/lib/interfaces";
2
+ import { RlnMessage } from "./message.js";
2
3
  import { MembershipKey, RLNInstance } from "./rln.js";
3
4
  export declare class RLNEncoder implements Encoder {
4
5
  private encoder;
@@ -10,10 +11,11 @@ export declare class RLNEncoder implements Encoder {
10
11
  encode(message: Message): Promise<Uint8Array | undefined>;
11
12
  encodeProto(message: Message): Promise<ProtoMessage | undefined>;
12
13
  }
13
- export declare class RLNDecoder implements Decoder<Message> {
14
+ export declare class RLNDecoder<T extends Message> implements Decoder<RlnMessage<T>> {
15
+ private rlnInstance;
14
16
  private decoder;
15
- contentTopic: string;
16
- constructor(decoder: Decoder<Message>);
17
+ constructor(rlnInstance: RLNInstance, decoder: Decoder<T>);
18
+ get contentTopic(): string;
17
19
  decodeProto(bytes: Uint8Array): Promise<ProtoMessage | undefined>;
18
- decode(proto: ProtoMessage): Promise<Message | undefined>;
20
+ decode(proto: ProtoMessage): Promise<RlnMessage<T> | undefined>;
19
21
  }
@@ -1,5 +1,6 @@
1
1
  import debug from "debug";
2
2
  import { proto_message, utils } from "js-waku";
3
+ import { RlnMessage } from "./message.js";
3
4
  const log = debug("waku:message:rln-encoder");
4
5
  export class RLNEncoder {
5
6
  constructor(encoder, rlnInstance, index, membershipKey) {
@@ -30,9 +31,12 @@ export class RLNEncoder {
30
31
  }
31
32
  }
32
33
  export class RLNDecoder {
33
- constructor(decoder) {
34
+ constructor(rlnInstance, decoder) {
35
+ this.rlnInstance = rlnInstance;
34
36
  this.decoder = decoder;
35
- this.contentTopic = decoder.contentTopic;
37
+ }
38
+ get contentTopic() {
39
+ return this.decoder.contentTopic;
36
40
  }
37
41
  decodeProto(bytes) {
38
42
  const protoMessage = proto_message.WakuMessage.decode(bytes);
@@ -41,14 +45,13 @@ export class RLNDecoder {
41
45
  }
42
46
  async decode(proto) {
43
47
  const msg = await this.decoder.decode(proto);
44
- if (msg) {
45
- msg.rateLimitProof = proto.rateLimitProof;
46
- }
47
- return msg;
48
+ if (!msg)
49
+ return;
50
+ return new RlnMessage(this.rlnInstance, msg, proto.rateLimitProof);
48
51
  }
49
52
  }
50
53
  function toRLNSignal(msg) {
51
54
  const contentTopicBytes = utils.utf8ToBytes(msg.contentTopic ?? "");
52
55
  return new Uint8Array([...(msg.payload ?? []), ...contentTopicBytes]);
53
56
  }
54
- //# sourceMappingURL=encoder.js.map
57
+ //# sourceMappingURL=codec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAQ/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,GAAG,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAE9C,MAAM,OAAO,UAAU;IAIrB,YACU,OAAgB,EAChB,WAAwB,EACxB,KAAa,EACrB,aAA4B;QAHpB,YAAO,GAAP,OAAO,CAAS;QAChB,gBAAW,GAAX,WAAW,CAAa;QACxB,UAAK,GAAL,KAAK,CAAQ;QAGrB,IAAI,KAAK,GAAG,CAAC;YAAE,MAAM,0BAA0B,CAAC;QAChD,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,MAAM,C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GAAG,GAAkB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,GAAG;YAAE,OAAO;QACjB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACrE,CAAC;CACF;AAED,SAAS,WAAW,CAAC,GAAY;IAC/B,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;IACpE,OAAO,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,GAAG,iBAAiB,CAAC,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function dateToEpoch(timestamp: Date, epochUnitSeconds?: number): number;
2
+ export declare function epochIntToBytes(epoch: number): Uint8Array;
3
+ export declare function epochBytesToInt(bytes: Uint8Array): number;
package/dist/epoch.js ADDED
@@ -0,0 +1,16 @@
1
+ const DefaultEpochUnitSeconds = 10; // the rln-relay epoch length in seconds
2
+ export function dateToEpoch(timestamp, epochUnitSeconds = DefaultEpochUnitSeconds) {
3
+ const time = timestamp.getTime();
4
+ return Math.floor(time / 1000 / epochUnitSeconds);
5
+ }
6
+ export function epochIntToBytes(epoch) {
7
+ const bytes = new Uint8Array(32);
8
+ const db = new DataView(bytes.buffer);
9
+ db.setUint32(0, epoch, true);
10
+ return bytes;
11
+ }
12
+ export function epochBytesToInt(bytes) {
13
+ const dv = new DataView(bytes.buffer);
14
+ return dv.getUint32(0, true);
15
+ }
16
+ //# sourceMappingURL=epoch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"epoch.js","sourceRoot":"","sources":["../src/epoch.ts"],"names":[],"mappings":"AAAA,MAAM,uBAAuB,GAAG,EAAE,CAAC,CAAC,wCAAwC;AAE5E,MAAM,UAAU,WAAW,CACzB,SAAe,EACf,mBAA2B,uBAAuB;IAElD,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IACjC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,GAAG,gBAAgB,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAiB;IAC/C,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AAC/B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RLNDecoder, RLNEncoder } from "./encoder.js";
1
+ import { RLNDecoder, RLNEncoder } from "./codec.js";
2
2
  import type { Proof, RLNInstance } from "./rln.js";
3
3
  import { MembershipKey } from "./rln.js";
4
4
  export declare function create(): Promise<RLNInstance>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { RLNDecoder, RLNEncoder } from "./encoder.js";
1
+ import { RLNDecoder, RLNEncoder } from "./codec.js";
2
2
  import { MembershipKey } from "./rln.js";
3
3
  // reexport the create function, dynamically imported from rln.ts
4
4
  export async function create() {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,iEAAiE;IACjE,6DAA6D;IAC7D,kDAAkD;IAClD,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3C,OAAO,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;AAClC,CAAC;AAED,OAAO,EAAe,aAAa,EAAS,UAAU,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,iEAAiE;IACjE,6DAA6D;IAC7D,kDAAkD;IAClD,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3C,OAAO,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;AAClC,CAAC;AAED,OAAO,EAAe,aAAa,EAAS,UAAU,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Message, RateLimitProof } from "js-waku/lib/interfaces";
2
+ import { RLNInstance } from "./rln.js";
3
+ export declare class RlnMessage<T extends Message> implements Message {
4
+ rlnInstance: RLNInstance;
5
+ msg: T;
6
+ rateLimitProof?: RateLimitProof | undefined;
7
+ constructor(rlnInstance: RLNInstance, msg: T, rateLimitProof?: RateLimitProof | undefined);
8
+ verify(): boolean | undefined;
9
+ get payload(): Uint8Array | undefined;
10
+ get contentTopic(): string | undefined;
11
+ get timestamp(): Date | undefined;
12
+ get epoch(): number | undefined;
13
+ }
@@ -0,0 +1,29 @@
1
+ import { epochBytesToInt } from "./epoch.js";
2
+ export class RlnMessage {
3
+ constructor(rlnInstance, msg, rateLimitProof) {
4
+ this.rlnInstance = rlnInstance;
5
+ this.msg = msg;
6
+ this.rateLimitProof = rateLimitProof;
7
+ }
8
+ verify() {
9
+ return this.rateLimitProof
10
+ ? this.rlnInstance.verifyProof(this.rateLimitProof)
11
+ : undefined;
12
+ }
13
+ get payload() {
14
+ return this.msg.payload;
15
+ }
16
+ get contentTopic() {
17
+ return this.msg.contentTopic;
18
+ }
19
+ get timestamp() {
20
+ return this.msg.timestamp;
21
+ }
22
+ get epoch() {
23
+ const bytes = this.msg.rateLimitProof?.epoch;
24
+ if (!bytes)
25
+ return;
26
+ return epochBytesToInt(bytes);
27
+ }
28
+ }
29
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,MAAM,OAAO,UAAU;IACrB,YACS,WAAwB,EACxB,GAAM,EACN,cAA+B;QAF/B,gBAAW,GAAX,WAAW,CAAa;QACxB,QAAG,GAAH,GAAG,CAAG;QACN,mBAAc,GAAd,cAAc,CAAiB;IACrC,CAAC;IAEG,MAAM;QACX,OAAO,IAAI,CAAC,cAAc;YACxB,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC;YACnD,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;IAC1B,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;IAC/B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;IAC5B,CAAC;IAED,IAAI,KAAK;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC;QAC7C,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF"}
package/dist/rln.d.ts CHANGED
@@ -11,7 +11,6 @@ export declare class MembershipKey {
11
11
  constructor(IDKey: Uint8Array, IDCommitment: Uint8Array);
12
12
  static fromBytes(memKeys: Uint8Array): MembershipKey;
13
13
  }
14
- export declare function toEpoch(timestamp: Date, epochUnitSeconds?: number): Uint8Array;
15
14
  export declare class Proof implements RateLimitProof {
16
15
  readonly proof: Uint8Array;
17
16
  readonly merkleRoot: Uint8Array;
package/dist/rln.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import init, * as zerokitRLN from "@waku/zerokit-rln-wasm";
2
+ import { writeUIntLE } from "./byte_utils.js";
3
+ import { dateToEpoch, epochIntToBytes } from "./epoch.js";
2
4
  import verificationKey from "./resources/verification_key.js";
3
5
  import * as wc from "./witness_calculator.js";
4
6
  /**
@@ -55,34 +57,6 @@ export class MembershipKey {
55
57
  return new MembershipKey(idKey, idCommitment);
56
58
  }
57
59
  }
58
- // Adapted from https://github.com/feross/buffer
59
- function checkInt(buf, value, offset, ext, max, min) {
60
- if (value > max || value < min)
61
- throw new RangeError('"value" argument is out of bounds');
62
- if (offset + ext > buf.length)
63
- throw new RangeError("Index out of range");
64
- }
65
- const writeUIntLE = function writeUIntLE(buf, value, offset, byteLength, noAssert) {
66
- value = +value;
67
- offset = offset >>> 0;
68
- byteLength = byteLength >>> 0;
69
- if (!noAssert) {
70
- const maxBytes = Math.pow(2, 8 * byteLength) - 1;
71
- checkInt(buf, value, offset, byteLength, maxBytes, 0);
72
- }
73
- let mul = 1;
74
- let i = 0;
75
- buf[offset] = value & 0xff;
76
- while (++i < byteLength && (mul *= 0x100)) {
77
- buf[offset + i] = (value / mul) & 0xff;
78
- }
79
- return buf;
80
- };
81
- const DefaultEpochUnitSeconds = 10; // the rln-relay epoch length in seconds
82
- export function toEpoch(timestamp, epochUnitSeconds = DefaultEpochUnitSeconds) {
83
- const unix = Math.floor(timestamp.getTime() / 1000 / epochUnitSeconds);
84
- return writeUIntLE(new Uint8Array(32), unix, 0, 8);
85
- }
86
60
  const proofOffset = 128;
87
61
  const rootOffset = proofOffset + 32;
88
62
  const epochOffset = rootOffset + 32;
@@ -129,10 +103,10 @@ export class RLNInstance {
129
103
  }
130
104
  async generateProof(msg, index, epoch, idKey) {
131
105
  if (epoch == undefined) {
132
- epoch = toEpoch(new Date());
106
+ epoch = epochIntToBytes(dateToEpoch(new Date()));
133
107
  }
134
108
  else if (epoch instanceof Date) {
135
- epoch = toEpoch(epoch);
109
+ epoch = epochIntToBytes(dateToEpoch(epoch));
136
110
  }
137
111
  if (epoch.length != 32)
138
112
  throw "invalid epoch";
package/dist/rln.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rln.js","sourceRoot":"","sources":["../src/rln.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAG3D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAG9C;;;;GAIG;AACH,SAAS,WAAW,CAAC,GAAG,KAAmB;IACzC,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,WAAW,IAAI,GAAG,CAAC,MAAM,CAAC;KAC3B;IACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACxB,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC;KACtB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,aAAa,GAAG,IAAI,WAAW,EAAE,CAAC;AAExC,MAAM,KAAK,GAAG,EAAE,CAAC;AAEjB,KAAK,UAAU,qBAAqB;IAClC,MAAM,GAAG,GAAG,IAAI,GA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4
  "description": "Rate Limit Nullifier for js-waku",
5
5
  "types": "./dist/index.d.ts",
6
6
  "module": "./dist/index.js",
@@ -76,7 +76,7 @@
76
76
  "eslint-plugin-functional": "^4.0.2",
77
77
  "eslint-plugin-import": "^2.25.3",
78
78
  "eslint-plugin-prettier": "^4.0.0",
79
- "fast-check": "^2.14.0",
79
+ "fast-check": "^2.25.0",
80
80
  "gh-pages": "^3.2.3",
81
81
  "husky": "^7.0.4",
82
82
  "ignore-loader": "^0.1.2",
@@ -0,0 +1,39 @@
1
+ // Adapted from https://github.com/feross/buffer
2
+
3
+ function checkInt(
4
+ buf: Uint8Array,
5
+ value: number,
6
+ offset: number,
7
+ ext: number,
8
+ max: number,
9
+ min: number
10
+ ): void {
11
+ if (value > max || value < min)
12
+ throw new RangeError('"value" argument is out of bounds');
13
+ if (offset + ext > buf.length) throw new RangeError("Index out of range");
14
+ }
15
+
16
+ export function writeUIntLE(
17
+ buf: Uint8Array,
18
+ value: number,
19
+ offset: number,
20
+ byteLength: number,
21
+ noAssert?: boolean
22
+ ): Uint8Array {
23
+ value = +value;
24
+ offset = offset >>> 0;
25
+ byteLength = byteLength >>> 0;
26
+ if (!noAssert) {
27
+ const maxBytes = Math.pow(2, 8 * byteLength) - 1;
28
+ checkInt(buf, value, offset, byteLength, maxBytes, 0);
29
+ }
30
+
31
+ let mul = 1;
32
+ let i = 0;
33
+ buf[offset] = value & 0xff;
34
+ while (++i < byteLength && (mul *= 0x100)) {
35
+ buf[offset + i] = (value / mul) & 0xff;
36
+ }
37
+
38
+ return buf;
39
+ }
@@ -7,6 +7,7 @@ import {
7
7
  ProtoMessage,
8
8
  } from "js-waku/lib/interfaces";
9
9
 
10
+ import { RlnMessage } from "./message.js";
10
11
  import { MembershipKey, RLNInstance } from "./rln.js";
11
12
 
12
13
  const log = debug("waku:message:rln-encoder");
@@ -53,11 +54,11 @@ export class RLNEncoder implements Encoder {
53
54
  }
54
55
  }
55
56
 
56
- export class RLNDecoder implements Decoder<Message> {
57
- public contentTopic: string;
57
+ export class RLNDecoder<T extends Message> implements Decoder<RlnMessage<T>> {
58
+ constructor(private rlnInstance: RLNInstance, private decoder: Decoder<T>) {}
58
59
 
59
- constructor(private decoder: Decoder<Message>) {
60
- this.contentTopic = decoder.contentTopic;
60
+ get contentTopic(): string {
61
+ return this.decoder.contentTopic;
61
62
  }
62
63
 
63
64
  decodeProto(bytes: Uint8Array): Promise<ProtoMessage | undefined> {
@@ -66,12 +67,10 @@ export class RLNDecoder implements Decoder<Message> {
66
67
  return Promise.resolve(protoMessage);
67
68
  }
68
69
 
69
- async decode(proto: ProtoMessage): Promise<Message | undefined> {
70
- const msg = await this.decoder.decode(proto);
71
- if (msg) {
72
- msg.rateLimitProof = proto.rateLimitProof;
73
- }
74
- return msg;
70
+ async decode(proto: ProtoMessage): Promise<RlnMessage<T> | undefined> {
71
+ const msg: T | undefined = await this.decoder.decode(proto);
72
+ if (!msg) return;
73
+ return new RlnMessage(this.rlnInstance, msg, proto.rateLimitProof);
75
74
  }
76
75
  }
77
76
 
package/src/epoch.ts ADDED
@@ -0,0 +1,21 @@
1
+ const DefaultEpochUnitSeconds = 10; // the rln-relay epoch length in seconds
2
+
3
+ export function dateToEpoch(
4
+ timestamp: Date,
5
+ epochUnitSeconds: number = DefaultEpochUnitSeconds
6
+ ): number {
7
+ const time = timestamp.getTime();
8
+ return Math.floor(time / 1000 / epochUnitSeconds);
9
+ }
10
+
11
+ export function epochIntToBytes(epoch: number): Uint8Array {
12
+ const bytes = new Uint8Array(32);
13
+ const db = new DataView(bytes.buffer);
14
+ db.setUint32(0, epoch, true);
15
+ return bytes;
16
+ }
17
+
18
+ export function epochBytesToInt(bytes: Uint8Array): number {
19
+ const dv = new DataView(bytes.buffer);
20
+ return dv.getUint32(0, true);
21
+ }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RLNDecoder, RLNEncoder } from "./encoder.js";
1
+ import { RLNDecoder, RLNEncoder } from "./codec.js";
2
2
  import type { Proof, RLNInstance } from "./rln.js";
3
3
  import { MembershipKey } from "./rln.js";
4
4
 
package/src/message.ts ADDED
@@ -0,0 +1,37 @@
1
+ import { Message, RateLimitProof } from "js-waku/lib/interfaces";
2
+
3
+ import { epochBytesToInt } from "./epoch.js";
4
+ import { RLNInstance } from "./rln.js";
5
+
6
+ export class RlnMessage<T extends Message> implements Message {
7
+ constructor(
8
+ public rlnInstance: RLNInstance,
9
+ public msg: T,
10
+ public rateLimitProof?: RateLimitProof
11
+ ) {}
12
+
13
+ public verify(): boolean | undefined {
14
+ return this.rateLimitProof
15
+ ? this.rlnInstance.verifyProof(this.rateLimitProof)
16
+ : undefined;
17
+ }
18
+
19
+ get payload(): Uint8Array | undefined {
20
+ return this.msg.payload;
21
+ }
22
+
23
+ get contentTopic(): string | undefined {
24
+ return this.msg.contentTopic;
25
+ }
26
+
27
+ get timestamp(): Date | undefined {
28
+ return this.msg.timestamp;
29
+ }
30
+
31
+ get epoch(): number | undefined {
32
+ const bytes = this.msg.rateLimitProof?.epoch;
33
+ if (!bytes) return;
34
+
35
+ return epochBytesToInt(bytes);
36
+ }
37
+ }
package/src/rln.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import init, * as zerokitRLN from "@waku/zerokit-rln-wasm";
2
2
  import { RateLimitProof } from "js-waku/lib/interfaces";
3
3
 
4
+ import { writeUIntLE } from "./byte_utils.js";
5
+ import { dateToEpoch, epochIntToBytes } from "./epoch.js";
4
6
  import verificationKey from "./resources/verification_key.js";
5
7
  import * as wc from "./witness_calculator.js";
6
8
  import { WitnessCalculator } from "./witness_calculator.js";
@@ -67,56 +69,6 @@ export class MembershipKey {
67
69
  }
68
70
  }
69
71
 
70
- // Adapted from https://github.com/feross/buffer
71
-
72
- function checkInt(
73
- buf: Uint8Array,
74
- value: number,
75
- offset: number,
76
- ext: number,
77
- max: number,
78
- min: number
79
- ): void {
80
- if (value > max || value < min)
81
- throw new RangeError('"value" argument is out of bounds');
82
- if (offset + ext > buf.length) throw new RangeError("Index out of range");
83
- }
84
-
85
- const writeUIntLE = function writeUIntLE(
86
- buf: Uint8Array,
87
- value: number,
88
- offset: number,
89
- byteLength: number,
90
- noAssert?: boolean
91
- ): Uint8Array {
92
- value = +value;
93
- offset = offset >>> 0;
94
- byteLength = byteLength >>> 0;
95
- if (!noAssert) {
96
- const maxBytes = Math.pow(2, 8 * byteLength) - 1;
97
- checkInt(buf, value, offset, byteLength, maxBytes, 0);
98
- }
99
-
100
- let mul = 1;
101
- let i = 0;
102
- buf[offset] = value & 0xff;
103
- while (++i < byteLength && (mul *= 0x100)) {
104
- buf[offset + i] = (value / mul) & 0xff;
105
- }
106
-
107
- return buf;
108
- };
109
-
110
- const DefaultEpochUnitSeconds = 10; // the rln-relay epoch length in seconds
111
-
112
- export function toEpoch(
113
- timestamp: Date,
114
- epochUnitSeconds: number = DefaultEpochUnitSeconds
115
- ): Uint8Array {
116
- const unix = Math.floor(timestamp.getTime() / 1000 / epochUnitSeconds);
117
- return writeUIntLE(new Uint8Array(32), unix, 0, 8);
118
- }
119
-
120
72
  const proofOffset = 128;
121
73
  const rootOffset = proofOffset + 32;
122
74
  const epochOffset = rootOffset + 32;
@@ -200,9 +152,9 @@ export class RLNInstance {
200
152
  idKey: Uint8Array
201
153
  ): Promise<RateLimitProof> {
202
154
  if (epoch == undefined) {
203
- epoch = toEpoch(new Date());
155
+ epoch = epochIntToBytes(dateToEpoch(new Date()));
204
156
  } else if (epoch instanceof Date) {
205
- epoch = toEpoch(epoch);
157
+ epoch = epochIntToBytes(dateToEpoch(epoch));
206
158
  }
207
159
 
208
160
  if (epoch.length != 32) throw "invalid epoch";
@@ -1 +0,0 @@
1
- {"version":3,"file":"encoder.js","sourceRoot":"","sources":["../src/encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAU/C,MAAM,GAAG,GAAG,KAAK,CAAC,0BAA0B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