Merge pull request #1169 from waku-org/chore/bump-protons

This commit is contained in:
fryorcraken.eth 2023-02-11 15:11:31 +11:00 committed by GitHub
commit 9142a954b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 519 additions and 853 deletions

388
package-lock.json generated
View File

@ -22543,12 +22543,12 @@
} }
}, },
"node_modules/protons": { "node_modules/protons": {
"version": "5.1.0", "version": "7.0.2",
"resolved": "https://registry.npmjs.org/protons/-/protons-5.1.0.tgz", "resolved": "https://registry.npmjs.org/protons/-/protons-7.0.2.tgz",
"integrity": "sha512-U6FldjrEEIVF4ujIN5VrzAUkGKbYhYUGixy1SxlL38t85EXSnlYIvaHZHmvEdi4WTWyskQVD/zlgQdkRqkU/5Q==", "integrity": "sha512-6hecUJH2qR0KRYo3qPdQGvtgIrxrvWteIMYclaSx2qM4mteLfUl8V7NU0BI1FA6JRabPpR14Nd/nJZB1q6zKkw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"meow": "^10.1.2", "meow": "^11.0.0",
"protobufjs-cli": "^1.0.0" "protobufjs-cli": "^1.0.0"
}, },
"bin": { "bin": {
@ -22612,31 +22612,55 @@
"balanced-match": "^1.0.0" "balanced-match": "^1.0.0"
} }
}, },
"node_modules/protons/node_modules/camelcase": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
"integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
"dev": true,
"engines": {
"node": ">=14.16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/camelcase-keys": { "node_modules/protons/node_modules/camelcase-keys": {
"version": "7.0.2", "version": "8.0.2",
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-8.0.2.tgz",
"integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", "integrity": "sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"camelcase": "^6.3.0", "camelcase": "^7.0.0",
"map-obj": "^4.1.0", "map-obj": "^4.3.0",
"quick-lru": "^5.1.1", "quick-lru": "^6.1.1",
"type-fest": "^1.2.1" "type-fest": "^2.13.0"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=14.16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/camelcase-keys/node_modules/type-fest": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"dev": true,
"engines": {
"node": ">=12.20"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/protons/node_modules/decamelize": { "node_modules/protons/node_modules/decamelize": {
"version": "5.0.1", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
"integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=10" "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
@ -22664,22 +22688,6 @@
"source-map": "~0.6.1" "source-map": "~0.6.1"
} }
}, },
"node_modules/protons/node_modules/find-up": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"dependencies": {
"locate-path": "^6.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/glob": { "node_modules/protons/node_modules/glob": {
"version": "8.1.0", "version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
@ -22699,6 +22707,18 @@
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/protons/node_modules/hosted-git-info": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz",
"integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==",
"dev": true,
"dependencies": {
"lru-cache": "^7.5.1"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/protons/node_modules/indent-string": { "node_modules/protons/node_modules/indent-string": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
@ -22724,21 +22744,6 @@
"node": ">= 0.8.0" "node": ">= 0.8.0"
} }
}, },
"node_modules/protons/node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"dependencies": {
"p-locate": "^5.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/long": { "node_modules/protons/node_modules/long": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
@ -22746,27 +22751,36 @@
"dev": true, "dev": true,
"peer": true "peer": true
}, },
"node_modules/protons/node_modules/lru-cache": {
"version": "7.14.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
"integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/protons/node_modules/meow": { "node_modules/protons/node_modules/meow": {
"version": "10.1.5", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", "resolved": "https://registry.npmjs.org/meow/-/meow-11.0.0.tgz",
"integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", "integrity": "sha512-Cl0yeeIrko6d94KpUo1M+0X1sB14ikoaqlIGuTH1fW4I+E3+YljL54/hb/BWmVfrV9tTV9zU04+xjw08Fh2WkA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/minimist": "^1.2.2", "@types/minimist": "^1.2.2",
"camelcase-keys": "^7.0.0", "camelcase-keys": "^8.0.2",
"decamelize": "^5.0.0", "decamelize": "^6.0.0",
"decamelize-keys": "^1.1.0", "decamelize-keys": "^1.1.0",
"hard-rejection": "^2.1.0", "hard-rejection": "^2.1.0",
"minimist-options": "4.1.0", "minimist-options": "4.1.0",
"normalize-package-data": "^3.0.2", "normalize-package-data": "^4.0.1",
"read-pkg-up": "^8.0.0", "read-pkg-up": "^9.1.0",
"redent": "^4.0.0", "redent": "^4.0.0",
"trim-newlines": "^4.0.2", "trim-newlines": "^4.0.2",
"type-fest": "^1.2.2", "type-fest": "^3.1.0",
"yargs-parser": "^20.2.9" "yargs-parser": "^21.1.1"
}, },
"engines": { "engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" "node": ">=14.16"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
@ -22784,6 +22798,21 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/protons/node_modules/normalize-package-data": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz",
"integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==",
"dev": true,
"dependencies": {
"hosted-git-info": "^5.0.0",
"is-core-module": "^2.8.1",
"semver": "^7.3.5",
"validate-npm-package-license": "^3.0.4"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/protons/node_modules/optionator": { "node_modules/protons/node_modules/optionator": {
"version": "0.8.3", "version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
@ -22801,36 +22830,6 @@
"node": ">= 0.8.0" "node": ">= 0.8.0"
} }
}, },
"node_modules/protons/node_modules/p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"dependencies": {
"yocto-queue": "^0.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/p-locate": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"dependencies": {
"p-limit": "^3.0.2"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/prelude-ls": { "node_modules/protons/node_modules/prelude-ls": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
@ -22902,34 +22901,11 @@
"node": ">=4.0" "node": ">=4.0"
} }
}, },
"node_modules/protons/node_modules/read-pkg": { "node_modules/protons/node_modules/quick-lru": {
"version": "6.0.0", "version": "6.1.1",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.1.tgz",
"integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", "integrity": "sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==",
"dev": true, "dev": true,
"dependencies": {
"@types/normalize-package-data": "^2.4.0",
"normalize-package-data": "^3.0.2",
"parse-json": "^5.2.0",
"type-fest": "^1.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/protons/node_modules/read-pkg-up": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
"integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
"dev": true,
"dependencies": {
"find-up": "^5.0.0",
"read-pkg": "^6.0.0",
"type-fest": "^1.0.1"
},
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
@ -22993,26 +22969,17 @@
} }
}, },
"node_modules/protons/node_modules/type-fest": { "node_modules/protons/node_modules/type-fest": {
"version": "1.4.0", "version": "3.5.7",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.5.7.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", "integrity": "sha512-6J4bYzb4sdkcLBty4XW7F18VPI66M4boXNE+CY40532oq2OJe6AVMB5NmjOp6skt/jw5mRjz/hLRpuglz0U+FA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=10" "node": ">=14.16"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/protons/node_modules/yargs-parser": {
"version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/proxy-from-env": { "node_modules/proxy-from-env": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
@ -29289,7 +29256,7 @@
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"protons": "^5.1.0", "protons": "^7.0.2",
"rollup": "^3.14.0", "rollup": "^3.14.0",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"uint8arraylist": "^2.4.3" "uint8arraylist": "^2.4.3"
@ -34776,7 +34743,7 @@
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"protons": "^5.1.0", "protons": "^7.0.2",
"protons-runtime": "^5.0.0", "protons-runtime": "^5.0.0",
"rollup": "^3.14.0", "rollup": "^3.14.0",
"typescript": "^4.9.5", "typescript": "^4.9.5",
@ -47382,12 +47349,12 @@
} }
}, },
"protons": { "protons": {
"version": "5.1.0", "version": "7.0.2",
"resolved": "https://registry.npmjs.org/protons/-/protons-5.1.0.tgz", "resolved": "https://registry.npmjs.org/protons/-/protons-7.0.2.tgz",
"integrity": "sha512-U6FldjrEEIVF4ujIN5VrzAUkGKbYhYUGixy1SxlL38t85EXSnlYIvaHZHmvEdi4WTWyskQVD/zlgQdkRqkU/5Q==", "integrity": "sha512-6hecUJH2qR0KRYo3qPdQGvtgIrxrvWteIMYclaSx2qM4mteLfUl8V7NU0BI1FA6JRabPpR14Nd/nJZB1q6zKkw==",
"dev": true, "dev": true,
"requires": { "requires": {
"meow": "^10.1.2", "meow": "^11.0.0",
"protobufjs-cli": "^1.0.0" "protobufjs-cli": "^1.0.0"
}, },
"dependencies": { "dependencies": {
@ -47400,22 +47367,36 @@
"balanced-match": "^1.0.0" "balanced-match": "^1.0.0"
} }
}, },
"camelcase": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
"integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
"dev": true
},
"camelcase-keys": { "camelcase-keys": {
"version": "7.0.2", "version": "8.0.2",
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-8.0.2.tgz",
"integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", "integrity": "sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^6.3.0", "camelcase": "^7.0.0",
"map-obj": "^4.1.0", "map-obj": "^4.3.0",
"quick-lru": "^5.1.1", "quick-lru": "^6.1.1",
"type-fest": "^1.2.1" "type-fest": "^2.13.0"
},
"dependencies": {
"type-fest": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"dev": true
}
} }
}, },
"decamelize": { "decamelize": {
"version": "5.0.1", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
"integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
"dev": true "dev": true
}, },
"escodegen": { "escodegen": {
@ -47431,16 +47412,6 @@
"source-map": "~0.6.1" "source-map": "~0.6.1"
} }
}, },
"find-up": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"requires": {
"locate-path": "^6.0.0",
"path-exists": "^4.0.0"
}
},
"glob": { "glob": {
"version": "8.1.0", "version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
@ -47454,6 +47425,15 @@
"once": "^1.3.0" "once": "^1.3.0"
} }
}, },
"hosted-git-info": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz",
"integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==",
"dev": true,
"requires": {
"lru-cache": "^7.5.1"
}
},
"indent-string": { "indent-string": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
@ -47470,15 +47450,6 @@
"type-check": "~0.3.2" "type-check": "~0.3.2"
} }
}, },
"locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"requires": {
"p-locate": "^5.0.0"
}
},
"long": { "long": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
@ -47486,24 +47457,30 @@
"dev": true, "dev": true,
"peer": true "peer": true
}, },
"lru-cache": {
"version": "7.14.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
"integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
"dev": true
},
"meow": { "meow": {
"version": "10.1.5", "version": "11.0.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", "resolved": "https://registry.npmjs.org/meow/-/meow-11.0.0.tgz",
"integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", "integrity": "sha512-Cl0yeeIrko6d94KpUo1M+0X1sB14ikoaqlIGuTH1fW4I+E3+YljL54/hb/BWmVfrV9tTV9zU04+xjw08Fh2WkA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/minimist": "^1.2.2", "@types/minimist": "^1.2.2",
"camelcase-keys": "^7.0.0", "camelcase-keys": "^8.0.2",
"decamelize": "^5.0.0", "decamelize": "^6.0.0",
"decamelize-keys": "^1.1.0", "decamelize-keys": "^1.1.0",
"hard-rejection": "^2.1.0", "hard-rejection": "^2.1.0",
"minimist-options": "4.1.0", "minimist-options": "4.1.0",
"normalize-package-data": "^3.0.2", "normalize-package-data": "^4.0.1",
"read-pkg-up": "^8.0.0", "read-pkg-up": "^9.1.0",
"redent": "^4.0.0", "redent": "^4.0.0",
"trim-newlines": "^4.0.2", "trim-newlines": "^4.0.2",
"type-fest": "^1.2.2", "type-fest": "^3.1.0",
"yargs-parser": "^20.2.9" "yargs-parser": "^21.1.1"
} }
}, },
"minimatch": { "minimatch": {
@ -47515,6 +47492,18 @@
"brace-expansion": "^2.0.1" "brace-expansion": "^2.0.1"
} }
}, },
"normalize-package-data": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz",
"integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==",
"dev": true,
"requires": {
"hosted-git-info": "^5.0.0",
"is-core-module": "^2.8.1",
"semver": "^7.3.5",
"validate-npm-package-license": "^3.0.4"
}
},
"optionator": { "optionator": {
"version": "0.8.3", "version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
@ -47529,24 +47518,6 @@
"word-wrap": "~1.2.3" "word-wrap": "~1.2.3"
} }
}, },
"p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"requires": {
"yocto-queue": "^0.1.0"
}
},
"p-locate": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"requires": {
"p-limit": "^3.0.2"
}
},
"prelude-ls": { "prelude-ls": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
@ -47600,28 +47571,11 @@
} }
} }
}, },
"read-pkg": { "quick-lru": {
"version": "6.0.0", "version": "6.1.1",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.1.tgz",
"integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", "integrity": "sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==",
"dev": true, "dev": true
"requires": {
"@types/normalize-package-data": "^2.4.0",
"normalize-package-data": "^3.0.2",
"parse-json": "^5.2.0",
"type-fest": "^1.0.1"
}
},
"read-pkg-up": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
"integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
"dev": true,
"requires": {
"find-up": "^5.0.0",
"read-pkg": "^6.0.0",
"type-fest": "^1.0.1"
}
}, },
"redent": { "redent": {
"version": "4.0.0", "version": "4.0.0",
@ -47658,15 +47612,9 @@
} }
}, },
"type-fest": { "type-fest": {
"version": "1.4.0", "version": "3.5.7",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.5.7.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", "integrity": "sha512-6J4bYzb4sdkcLBty4XW7F18VPI66M4boXNE+CY40532oq2OJe6AVMB5NmjOp6skt/jw5mRjz/hLRpuglz0U+FA==",
"dev": true
},
"yargs-parser": {
"version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true "dev": true
} }
} }

View File

@ -64,7 +64,7 @@
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^2.8.4", "prettier": "^2.8.4",
"protons": "^5.1.0", "protons": "^7.0.2",
"rollup": "^3.14.0", "rollup": "^3.14.0",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"uint8arraylist": "^2.4.3" "uint8arraylist": "^2.4.3"

View File

@ -1,9 +1,12 @@
/* eslint-disable import/export */ /* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
/* eslint-disable @typescript-eslint/no-empty-interface */
import { encodeMessage, decodeMessage, message } from "protons-runtime"; import { encodeMessage, decodeMessage, message } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
import type { Codec } from "protons-runtime"; import type { Codec } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
export interface FilterRequest { export interface FilterRequest {
subscribe?: boolean; subscribe?: boolean;
@ -22,18 +25,18 @@ export namespace FilterRequest {
export const codec = (): Codec<ContentFilter> => { export const codec = (): Codec<ContentFilter> => {
if (_codec == null) { if (_codec == null) {
_codec = message<ContentFilter>( _codec = message<ContentFilter>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(10); w.uint32(10);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -62,7 +65,7 @@ export namespace FilterRequest {
return _codec; return _codec;
}; };
export const encode = (obj: ContentFilter): Uint8Array => { export const encode = (obj: Partial<ContentFilter>): Uint8Array => {
return encodeMessage(obj, ContentFilter.codec()); return encodeMessage(obj, ContentFilter.codec());
}; };
@ -76,34 +79,30 @@ export namespace FilterRequest {
export const codec = (): Codec<FilterRequest> => { export const codec = (): Codec<FilterRequest> => {
if (_codec == null) { if (_codec == null) {
_codec = message<FilterRequest>( _codec = message<FilterRequest>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.subscribe != null) { if (obj.subscribe != null) {
writer.uint32(8); w.uint32(8);
writer.bool(obj.subscribe); w.bool(obj.subscribe);
} }
if (obj.topic != null) { if (obj.topic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.topic); w.string(obj.topic);
} }
if (obj.contentFilters != null) { if (obj.contentFilters != null) {
for (const value of obj.contentFilters) { for (const value of obj.contentFilters) {
writer.uint32(26); w.uint32(26);
FilterRequest.ContentFilter.codec().encode(value, writer); FilterRequest.ContentFilter.codec().encode(value, w);
} }
} else {
throw new Error(
'Protocol error: required field "contentFilters" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -145,7 +144,7 @@ export namespace FilterRequest {
return _codec; return _codec;
}; };
export const encode = (obj: FilterRequest): Uint8Array => { export const encode = (obj: Partial<FilterRequest>): Uint8Array => {
return encodeMessage(obj, FilterRequest.codec()); return encodeMessage(obj, FilterRequest.codec());
}; };
@ -164,24 +163,20 @@ export namespace MessagePush {
export const codec = (): Codec<MessagePush> => { export const codec = (): Codec<MessagePush> => {
if (_codec == null) { if (_codec == null) {
_codec = message<MessagePush>( _codec = message<MessagePush>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.messages != null) { if (obj.messages != null) {
for (const value of obj.messages) { for (const value of obj.messages) {
writer.uint32(10); w.uint32(10);
WakuMessage.codec().encode(value, writer); WakuMessage.codec().encode(value, w);
} }
} else {
throw new Error(
'Protocol error: required field "messages" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -214,7 +209,7 @@ export namespace MessagePush {
return _codec; return _codec;
}; };
export const encode = (obj: MessagePush): Uint8Array => { export const encode = (obj: Partial<MessagePush>): Uint8Array => {
return encodeMessage(obj, MessagePush.codec()); return encodeMessage(obj, MessagePush.codec());
}; };
@ -235,28 +230,28 @@ export namespace FilterRPC {
export const codec = (): Codec<FilterRPC> => { export const codec = (): Codec<FilterRPC> => {
if (_codec == null) { if (_codec == null) {
_codec = message<FilterRPC>( _codec = message<FilterRPC>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.requestId != null) { if (obj.requestId != null) {
writer.uint32(10); w.uint32(10);
writer.string(obj.requestId); w.string(obj.requestId);
} }
if (obj.request != null) { if (obj.request != null) {
writer.uint32(18); w.uint32(18);
FilterRequest.codec().encode(obj.request, writer); FilterRequest.codec().encode(obj.request, w);
} }
if (obj.push != null) { if (obj.push != null) {
writer.uint32(26); w.uint32(26);
MessagePush.codec().encode(obj.push, writer); MessagePush.codec().encode(obj.push, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -294,7 +289,7 @@ export namespace FilterRPC {
return _codec; return _codec;
}; };
export const encode = (obj: FilterRPC): Uint8Array => { export const encode = (obj: Partial<FilterRPC>): Uint8Array => {
return encodeMessage(obj, FilterRPC.codec()); return encodeMessage(obj, FilterRPC.codec());
}; };
@ -319,76 +314,48 @@ export namespace RateLimitProof {
export const codec = (): Codec<RateLimitProof> => { export const codec = (): Codec<RateLimitProof> => {
if (_codec == null) { if (_codec == null) {
_codec = message<RateLimitProof>( _codec = message<RateLimitProof>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.proof != null) { if (obj.proof != null && obj.proof.byteLength > 0) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.proof); w.bytes(obj.proof);
} else {
throw new Error(
'Protocol error: required field "proof" was not found in object'
);
} }
if (obj.merkleRoot != null) { if (obj.merkleRoot != null && obj.merkleRoot.byteLength > 0) {
writer.uint32(18); w.uint32(18);
writer.bytes(obj.merkleRoot); w.bytes(obj.merkleRoot);
} else {
throw new Error(
'Protocol error: required field "merkleRoot" was not found in object'
);
} }
if (obj.epoch != null) { if (obj.epoch != null && obj.epoch.byteLength > 0) {
writer.uint32(26); w.uint32(26);
writer.bytes(obj.epoch); w.bytes(obj.epoch);
} else {
throw new Error(
'Protocol error: required field "epoch" was not found in object'
);
} }
if (obj.shareX != null) { if (obj.shareX != null && obj.shareX.byteLength > 0) {
writer.uint32(34); w.uint32(34);
writer.bytes(obj.shareX); w.bytes(obj.shareX);
} else {
throw new Error(
'Protocol error: required field "shareX" was not found in object'
);
} }
if (obj.shareY != null) { if (obj.shareY != null && obj.shareY.byteLength > 0) {
writer.uint32(42); w.uint32(42);
writer.bytes(obj.shareY); w.bytes(obj.shareY);
} else {
throw new Error(
'Protocol error: required field "shareY" was not found in object'
);
} }
if (obj.nullifier != null) { if (obj.nullifier != null && obj.nullifier.byteLength > 0) {
writer.uint32(50); w.uint32(50);
writer.bytes(obj.nullifier); w.bytes(obj.nullifier);
} else {
throw new Error(
'Protocol error: required field "nullifier" was not found in object'
);
} }
if (obj.rlnIdentifier != null) { if (obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0) {
writer.uint32(58); w.uint32(58);
writer.bytes(obj.rlnIdentifier); w.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -435,48 +402,6 @@ export namespace RateLimitProof {
} }
} }
if (obj.proof == null) {
throw new Error(
'Protocol error: value for required field "proof" was not found in protobuf'
);
}
if (obj.merkleRoot == null) {
throw new Error(
'Protocol error: value for required field "merkleRoot" was not found in protobuf'
);
}
if (obj.epoch == null) {
throw new Error(
'Protocol error: value for required field "epoch" was not found in protobuf'
);
}
if (obj.shareX == null) {
throw new Error(
'Protocol error: value for required field "shareX" was not found in protobuf'
);
}
if (obj.shareY == null) {
throw new Error(
'Protocol error: value for required field "shareY" was not found in protobuf'
);
}
if (obj.nullifier == null) {
throw new Error(
'Protocol error: value for required field "nullifier" was not found in protobuf'
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj; return obj;
} }
); );
@ -485,7 +410,7 @@ export namespace RateLimitProof {
return _codec; return _codec;
}; };
export const encode = (obj: RateLimitProof): Uint8Array => { export const encode = (obj: Partial<RateLimitProof>): Uint8Array => {
return encodeMessage(obj, RateLimitProof.codec()); return encodeMessage(obj, RateLimitProof.codec());
}; };
@ -510,48 +435,48 @@ export namespace WakuMessage {
export const codec = (): Codec<WakuMessage> => { export const codec = (): Codec<WakuMessage> => {
if (_codec == null) { if (_codec == null) {
_codec = message<WakuMessage>( _codec = message<WakuMessage>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.payload != null) { if (obj.payload != null) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.payload); w.bytes(obj.payload);
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (obj.version != null) { if (obj.version != null) {
writer.uint32(24); w.uint32(24);
writer.uint32(obj.version); w.uint32(obj.version);
} }
if (obj.timestampDeprecated != null) { if (obj.timestampDeprecated != null) {
writer.uint32(33); w.uint32(33);
writer.double(obj.timestampDeprecated); w.double(obj.timestampDeprecated);
} }
if (obj.timestamp != null) { if (obj.timestamp != null) {
writer.uint32(80); w.uint32(80);
writer.sint64(obj.timestamp); w.sint64(obj.timestamp);
} }
if (obj.rateLimitProof != null) { if (obj.rateLimitProof != null) {
writer.uint32(170); w.uint32(170);
RateLimitProof.codec().encode(obj.rateLimitProof, writer); RateLimitProof.codec().encode(obj.rateLimitProof, w);
} }
if (obj.ephemeral != null) { if (obj.ephemeral != null) {
writer.uint32(248); w.uint32(248);
writer.bool(obj.ephemeral); w.bool(obj.ephemeral);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -601,7 +526,7 @@ export namespace WakuMessage {
return _codec; return _codec;
}; };
export const encode = (obj: WakuMessage): Uint8Array => { export const encode = (obj: Partial<WakuMessage>): Uint8Array => {
return encodeMessage(obj, WakuMessage.codec()); return encodeMessage(obj, WakuMessage.codec());
}; };

View File

@ -1,9 +1,12 @@
/* eslint-disable import/export */ /* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
/* eslint-disable @typescript-eslint/no-empty-interface */
import { encodeMessage, decodeMessage, message } from "protons-runtime"; import { encodeMessage, decodeMessage, message } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
import type { Codec } from "protons-runtime"; import type { Codec } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
export interface PushRequest { export interface PushRequest {
pubSubTopic?: string; pubSubTopic?: string;
@ -16,23 +19,23 @@ export namespace PushRequest {
export const codec = (): Codec<PushRequest> => { export const codec = (): Codec<PushRequest> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PushRequest>( _codec = message<PushRequest>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.pubSubTopic != null) { if (obj.pubSubTopic != null) {
writer.uint32(10); w.uint32(10);
writer.string(obj.pubSubTopic); w.string(obj.pubSubTopic);
} }
if (obj.message != null) { if (obj.message != null) {
writer.uint32(18); w.uint32(18);
WakuMessage.codec().encode(obj.message, writer); WakuMessage.codec().encode(obj.message, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -67,7 +70,7 @@ export namespace PushRequest {
return _codec; return _codec;
}; };
export const encode = (obj: PushRequest): Uint8Array => { export const encode = (obj: Partial<PushRequest>): Uint8Array => {
return encodeMessage(obj, PushRequest.codec()); return encodeMessage(obj, PushRequest.codec());
}; };
@ -87,23 +90,23 @@ export namespace PushResponse {
export const codec = (): Codec<PushResponse> => { export const codec = (): Codec<PushResponse> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PushResponse>( _codec = message<PushResponse>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.isSuccess != null) { if (obj.isSuccess != null) {
writer.uint32(8); w.uint32(8);
writer.bool(obj.isSuccess); w.bool(obj.isSuccess);
} }
if (obj.info != null) { if (obj.info != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.info); w.string(obj.info);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -135,7 +138,7 @@ export namespace PushResponse {
return _codec; return _codec;
}; };
export const encode = (obj: PushResponse): Uint8Array => { export const encode = (obj: Partial<PushResponse>): Uint8Array => {
return encodeMessage(obj, PushResponse.codec()); return encodeMessage(obj, PushResponse.codec());
}; };
@ -156,28 +159,28 @@ export namespace PushRPC {
export const codec = (): Codec<PushRPC> => { export const codec = (): Codec<PushRPC> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PushRPC>( _codec = message<PushRPC>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.requestId != null) { if (obj.requestId != null) {
writer.uint32(10); w.uint32(10);
writer.string(obj.requestId); w.string(obj.requestId);
} }
if (obj.request != null) { if (obj.request != null) {
writer.uint32(18); w.uint32(18);
PushRequest.codec().encode(obj.request, writer); PushRequest.codec().encode(obj.request, w);
} }
if (obj.response != null) { if (obj.response != null) {
writer.uint32(26); w.uint32(26);
PushResponse.codec().encode(obj.response, writer); PushResponse.codec().encode(obj.response, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -218,7 +221,7 @@ export namespace PushRPC {
return _codec; return _codec;
}; };
export const encode = (obj: PushRPC): Uint8Array => { export const encode = (obj: Partial<PushRPC>): Uint8Array => {
return encodeMessage(obj, PushRPC.codec()); return encodeMessage(obj, PushRPC.codec());
}; };
@ -243,76 +246,48 @@ export namespace RateLimitProof {
export const codec = (): Codec<RateLimitProof> => { export const codec = (): Codec<RateLimitProof> => {
if (_codec == null) { if (_codec == null) {
_codec = message<RateLimitProof>( _codec = message<RateLimitProof>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.proof != null) { if (obj.proof != null && obj.proof.byteLength > 0) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.proof); w.bytes(obj.proof);
} else {
throw new Error(
'Protocol error: required field "proof" was not found in object'
);
} }
if (obj.merkleRoot != null) { if (obj.merkleRoot != null && obj.merkleRoot.byteLength > 0) {
writer.uint32(18); w.uint32(18);
writer.bytes(obj.merkleRoot); w.bytes(obj.merkleRoot);
} else {
throw new Error(
'Protocol error: required field "merkleRoot" was not found in object'
);
} }
if (obj.epoch != null) { if (obj.epoch != null && obj.epoch.byteLength > 0) {
writer.uint32(26); w.uint32(26);
writer.bytes(obj.epoch); w.bytes(obj.epoch);
} else {
throw new Error(
'Protocol error: required field "epoch" was not found in object'
);
} }
if (obj.shareX != null) { if (obj.shareX != null && obj.shareX.byteLength > 0) {
writer.uint32(34); w.uint32(34);
writer.bytes(obj.shareX); w.bytes(obj.shareX);
} else {
throw new Error(
'Protocol error: required field "shareX" was not found in object'
);
} }
if (obj.shareY != null) { if (obj.shareY != null && obj.shareY.byteLength > 0) {
writer.uint32(42); w.uint32(42);
writer.bytes(obj.shareY); w.bytes(obj.shareY);
} else {
throw new Error(
'Protocol error: required field "shareY" was not found in object'
);
} }
if (obj.nullifier != null) { if (obj.nullifier != null && obj.nullifier.byteLength > 0) {
writer.uint32(50); w.uint32(50);
writer.bytes(obj.nullifier); w.bytes(obj.nullifier);
} else {
throw new Error(
'Protocol error: required field "nullifier" was not found in object'
);
} }
if (obj.rlnIdentifier != null) { if (obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0) {
writer.uint32(58); w.uint32(58);
writer.bytes(obj.rlnIdentifier); w.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -359,48 +334,6 @@ export namespace RateLimitProof {
} }
} }
if (obj.proof == null) {
throw new Error(
'Protocol error: value for required field "proof" was not found in protobuf'
);
}
if (obj.merkleRoot == null) {
throw new Error(
'Protocol error: value for required field "merkleRoot" was not found in protobuf'
);
}
if (obj.epoch == null) {
throw new Error(
'Protocol error: value for required field "epoch" was not found in protobuf'
);
}
if (obj.shareX == null) {
throw new Error(
'Protocol error: value for required field "shareX" was not found in protobuf'
);
}
if (obj.shareY == null) {
throw new Error(
'Protocol error: value for required field "shareY" was not found in protobuf'
);
}
if (obj.nullifier == null) {
throw new Error(
'Protocol error: value for required field "nullifier" was not found in protobuf'
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj; return obj;
} }
); );
@ -409,7 +342,7 @@ export namespace RateLimitProof {
return _codec; return _codec;
}; };
export const encode = (obj: RateLimitProof): Uint8Array => { export const encode = (obj: Partial<RateLimitProof>): Uint8Array => {
return encodeMessage(obj, RateLimitProof.codec()); return encodeMessage(obj, RateLimitProof.codec());
}; };
@ -434,48 +367,48 @@ export namespace WakuMessage {
export const codec = (): Codec<WakuMessage> => { export const codec = (): Codec<WakuMessage> => {
if (_codec == null) { if (_codec == null) {
_codec = message<WakuMessage>( _codec = message<WakuMessage>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.payload != null) { if (obj.payload != null) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.payload); w.bytes(obj.payload);
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (obj.version != null) { if (obj.version != null) {
writer.uint32(24); w.uint32(24);
writer.uint32(obj.version); w.uint32(obj.version);
} }
if (obj.timestampDeprecated != null) { if (obj.timestampDeprecated != null) {
writer.uint32(33); w.uint32(33);
writer.double(obj.timestampDeprecated); w.double(obj.timestampDeprecated);
} }
if (obj.timestamp != null) { if (obj.timestamp != null) {
writer.uint32(80); w.uint32(80);
writer.sint64(obj.timestamp); w.sint64(obj.timestamp);
} }
if (obj.rateLimitProof != null) { if (obj.rateLimitProof != null) {
writer.uint32(170); w.uint32(170);
RateLimitProof.codec().encode(obj.rateLimitProof, writer); RateLimitProof.codec().encode(obj.rateLimitProof, w);
} }
if (obj.ephemeral != null) { if (obj.ephemeral != null) {
writer.uint32(248); w.uint32(248);
writer.bool(obj.ephemeral); w.bool(obj.ephemeral);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -525,7 +458,7 @@ export namespace WakuMessage {
return _codec; return _codec;
}; };
export const encode = (obj: WakuMessage): Uint8Array => { export const encode = (obj: Partial<WakuMessage>): Uint8Array => {
return encodeMessage(obj, WakuMessage.codec()); return encodeMessage(obj, WakuMessage.codec());
}; };

View File

@ -1,9 +1,12 @@
/* eslint-disable import/export */ /* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
/* eslint-disable @typescript-eslint/no-empty-interface */
import { encodeMessage, decodeMessage, message } from "protons-runtime"; import { encodeMessage, decodeMessage, message } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
import type { Codec } from "protons-runtime"; import type { Codec } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
export interface RateLimitProof { export interface RateLimitProof {
proof: Uint8Array; proof: Uint8Array;
@ -21,76 +24,48 @@ export namespace RateLimitProof {
export const codec = (): Codec<RateLimitProof> => { export const codec = (): Codec<RateLimitProof> => {
if (_codec == null) { if (_codec == null) {
_codec = message<RateLimitProof>( _codec = message<RateLimitProof>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.proof != null) { if (obj.proof != null && obj.proof.byteLength > 0) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.proof); w.bytes(obj.proof);
} else {
throw new Error(
'Protocol error: required field "proof" was not found in object'
);
} }
if (obj.merkleRoot != null) { if (obj.merkleRoot != null && obj.merkleRoot.byteLength > 0) {
writer.uint32(18); w.uint32(18);
writer.bytes(obj.merkleRoot); w.bytes(obj.merkleRoot);
} else {
throw new Error(
'Protocol error: required field "merkleRoot" was not found in object'
);
} }
if (obj.epoch != null) { if (obj.epoch != null && obj.epoch.byteLength > 0) {
writer.uint32(26); w.uint32(26);
writer.bytes(obj.epoch); w.bytes(obj.epoch);
} else {
throw new Error(
'Protocol error: required field "epoch" was not found in object'
);
} }
if (obj.shareX != null) { if (obj.shareX != null && obj.shareX.byteLength > 0) {
writer.uint32(34); w.uint32(34);
writer.bytes(obj.shareX); w.bytes(obj.shareX);
} else {
throw new Error(
'Protocol error: required field "shareX" was not found in object'
);
} }
if (obj.shareY != null) { if (obj.shareY != null && obj.shareY.byteLength > 0) {
writer.uint32(42); w.uint32(42);
writer.bytes(obj.shareY); w.bytes(obj.shareY);
} else {
throw new Error(
'Protocol error: required field "shareY" was not found in object'
);
} }
if (obj.nullifier != null) { if (obj.nullifier != null && obj.nullifier.byteLength > 0) {
writer.uint32(50); w.uint32(50);
writer.bytes(obj.nullifier); w.bytes(obj.nullifier);
} else {
throw new Error(
'Protocol error: required field "nullifier" was not found in object'
);
} }
if (obj.rlnIdentifier != null) { if (obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0) {
writer.uint32(58); w.uint32(58);
writer.bytes(obj.rlnIdentifier); w.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -137,48 +112,6 @@ export namespace RateLimitProof {
} }
} }
if (obj.proof == null) {
throw new Error(
'Protocol error: value for required field "proof" was not found in protobuf'
);
}
if (obj.merkleRoot == null) {
throw new Error(
'Protocol error: value for required field "merkleRoot" was not found in protobuf'
);
}
if (obj.epoch == null) {
throw new Error(
'Protocol error: value for required field "epoch" was not found in protobuf'
);
}
if (obj.shareX == null) {
throw new Error(
'Protocol error: value for required field "shareX" was not found in protobuf'
);
}
if (obj.shareY == null) {
throw new Error(
'Protocol error: value for required field "shareY" was not found in protobuf'
);
}
if (obj.nullifier == null) {
throw new Error(
'Protocol error: value for required field "nullifier" was not found in protobuf'
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj; return obj;
} }
); );
@ -187,7 +120,7 @@ export namespace RateLimitProof {
return _codec; return _codec;
}; };
export const encode = (obj: RateLimitProof): Uint8Array => { export const encode = (obj: Partial<RateLimitProof>): Uint8Array => {
return encodeMessage(obj, RateLimitProof.codec()); return encodeMessage(obj, RateLimitProof.codec());
}; };
@ -212,48 +145,48 @@ export namespace WakuMessage {
export const codec = (): Codec<WakuMessage> => { export const codec = (): Codec<WakuMessage> => {
if (_codec == null) { if (_codec == null) {
_codec = message<WakuMessage>( _codec = message<WakuMessage>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.payload != null) { if (obj.payload != null) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.payload); w.bytes(obj.payload);
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (obj.version != null) { if (obj.version != null) {
writer.uint32(24); w.uint32(24);
writer.uint32(obj.version); w.uint32(obj.version);
} }
if (obj.timestampDeprecated != null) { if (obj.timestampDeprecated != null) {
writer.uint32(33); w.uint32(33);
writer.double(obj.timestampDeprecated); w.double(obj.timestampDeprecated);
} }
if (obj.timestamp != null) { if (obj.timestamp != null) {
writer.uint32(80); w.uint32(80);
writer.sint64(obj.timestamp); w.sint64(obj.timestamp);
} }
if (obj.rateLimitProof != null) { if (obj.rateLimitProof != null) {
writer.uint32(170); w.uint32(170);
RateLimitProof.codec().encode(obj.rateLimitProof, writer); RateLimitProof.codec().encode(obj.rateLimitProof, w);
} }
if (obj.ephemeral != null) { if (obj.ephemeral != null) {
writer.uint32(248); w.uint32(248);
writer.bool(obj.ephemeral); w.bool(obj.ephemeral);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -303,7 +236,7 @@ export namespace WakuMessage {
return _codec; return _codec;
}; };
export const encode = (obj: WakuMessage): Uint8Array => { export const encode = (obj: Partial<WakuMessage>): Uint8Array => {
return encodeMessage(obj, WakuMessage.codec()); return encodeMessage(obj, WakuMessage.codec());
}; };

View File

@ -1,9 +1,12 @@
/* eslint-disable import/export */ /* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
/* eslint-disable @typescript-eslint/no-empty-interface */
import { encodeMessage, decodeMessage, message } from "protons-runtime"; import { encodeMessage, decodeMessage, message } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
import type { Codec } from "protons-runtime"; import type { Codec } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
export interface PeerInfo { export interface PeerInfo {
enr?: Uint8Array; enr?: Uint8Array;
@ -15,18 +18,18 @@ export namespace PeerInfo {
export const codec = (): Codec<PeerInfo> => { export const codec = (): Codec<PeerInfo> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PeerInfo>( _codec = message<PeerInfo>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.enr != null) { if (obj.enr != null) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.enr); w.bytes(obj.enr);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -55,7 +58,7 @@ export namespace PeerInfo {
return _codec; return _codec;
}; };
export const encode = (obj: PeerInfo): Uint8Array => { export const encode = (obj: Partial<PeerInfo>): Uint8Array => {
return encodeMessage(obj, PeerInfo.codec()); return encodeMessage(obj, PeerInfo.codec());
}; };
@ -74,18 +77,18 @@ export namespace PeerExchangeQuery {
export const codec = (): Codec<PeerExchangeQuery> => { export const codec = (): Codec<PeerExchangeQuery> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PeerExchangeQuery>( _codec = message<PeerExchangeQuery>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.numPeers != null) { if (obj.numPeers != null) {
writer.uint32(8); w.uint32(8);
writer.uint64(obj.numPeers); w.uint64(obj.numPeers);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -114,7 +117,7 @@ export namespace PeerExchangeQuery {
return _codec; return _codec;
}; };
export const encode = (obj: PeerExchangeQuery): Uint8Array => { export const encode = (obj: Partial<PeerExchangeQuery>): Uint8Array => {
return encodeMessage(obj, PeerExchangeQuery.codec()); return encodeMessage(obj, PeerExchangeQuery.codec());
}; };
@ -135,24 +138,20 @@ export namespace PeerExchangeResponse {
export const codec = (): Codec<PeerExchangeResponse> => { export const codec = (): Codec<PeerExchangeResponse> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PeerExchangeResponse>( _codec = message<PeerExchangeResponse>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.peerInfos != null) { if (obj.peerInfos != null) {
for (const value of obj.peerInfos) { for (const value of obj.peerInfos) {
writer.uint32(10); w.uint32(10);
PeerInfo.codec().encode(value, writer); PeerInfo.codec().encode(value, w);
} }
} else {
throw new Error(
'Protocol error: required field "peerInfos" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -185,7 +184,7 @@ export namespace PeerExchangeResponse {
return _codec; return _codec;
}; };
export const encode = (obj: PeerExchangeResponse): Uint8Array => { export const encode = (obj: Partial<PeerExchangeResponse>): Uint8Array => {
return encodeMessage(obj, PeerExchangeResponse.codec()); return encodeMessage(obj, PeerExchangeResponse.codec());
}; };
@ -207,23 +206,23 @@ export namespace PeerExchangeRPC {
export const codec = (): Codec<PeerExchangeRPC> => { export const codec = (): Codec<PeerExchangeRPC> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PeerExchangeRPC>( _codec = message<PeerExchangeRPC>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.query != null) { if (obj.query != null) {
writer.uint32(10); w.uint32(10);
PeerExchangeQuery.codec().encode(obj.query, writer); PeerExchangeQuery.codec().encode(obj.query, w);
} }
if (obj.response != null) { if (obj.response != null) {
writer.uint32(18); w.uint32(18);
PeerExchangeResponse.codec().encode(obj.response, writer); PeerExchangeResponse.codec().encode(obj.response, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -261,7 +260,7 @@ export namespace PeerExchangeRPC {
return _codec; return _codec;
}; };
export const encode = (obj: PeerExchangeRPC): Uint8Array => { export const encode = (obj: Partial<PeerExchangeRPC>): Uint8Array => {
return encodeMessage(obj, PeerExchangeRPC.codec()); return encodeMessage(obj, PeerExchangeRPC.codec());
}; };

View File

@ -1,5 +1,8 @@
/* eslint-disable import/export */ /* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
/* eslint-disable @typescript-eslint/no-empty-interface */
import { import {
encodeMessage, encodeMessage,
@ -7,8 +10,8 @@ import {
message, message,
enumeration, enumeration,
} from "protons-runtime"; } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
import type { Codec } from "protons-runtime"; import type { Codec } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
export interface Index { export interface Index {
digest?: Uint8Array; digest?: Uint8Array;
@ -23,33 +26,33 @@ export namespace Index {
export const codec = (): Codec<Index> => { export const codec = (): Codec<Index> => {
if (_codec == null) { if (_codec == null) {
_codec = message<Index>( _codec = message<Index>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.digest != null) { if (obj.digest != null) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.digest); w.bytes(obj.digest);
} }
if (obj.receivedTime != null) { if (obj.receivedTime != null) {
writer.uint32(16); w.uint32(16);
writer.sint64(obj.receivedTime); w.sint64(obj.receivedTime);
} }
if (obj.senderTime != null) { if (obj.senderTime != null) {
writer.uint32(24); w.uint32(24);
writer.sint64(obj.senderTime); w.sint64(obj.senderTime);
} }
if (obj.pubsubTopic != null) { if (obj.pubsubTopic != null) {
writer.uint32(34); w.uint32(34);
writer.string(obj.pubsubTopic); w.string(obj.pubsubTopic);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -87,7 +90,7 @@ export namespace Index {
return _codec; return _codec;
}; };
export const encode = (obj: Index): Uint8Array => { export const encode = (obj: Partial<Index>): Uint8Array => {
return encodeMessage(obj, Index.codec()); return encodeMessage(obj, Index.codec());
}; };
@ -114,7 +117,7 @@ export namespace PagingInfo {
} }
export namespace Direction { export namespace Direction {
export const codec = () => { export const codec = (): Codec<Direction> => {
return enumeration<Direction>(__DirectionValues); return enumeration<Direction>(__DirectionValues);
}; };
} }
@ -124,28 +127,28 @@ export namespace PagingInfo {
export const codec = (): Codec<PagingInfo> => { export const codec = (): Codec<PagingInfo> => {
if (_codec == null) { if (_codec == null) {
_codec = message<PagingInfo>( _codec = message<PagingInfo>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.pageSize != null) { if (obj.pageSize != null) {
writer.uint32(8); w.uint32(8);
writer.uint64(obj.pageSize); w.uint64(obj.pageSize);
} }
if (obj.cursor != null) { if (obj.cursor != null) {
writer.uint32(18); w.uint32(18);
Index.codec().encode(obj.cursor, writer); Index.codec().encode(obj.cursor, w);
} }
if (obj.direction != null) { if (obj.direction != null) {
writer.uint32(24); w.uint32(24);
PagingInfo.Direction.codec().encode(obj.direction, writer); PagingInfo.Direction.codec().encode(obj.direction, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -180,7 +183,7 @@ export namespace PagingInfo {
return _codec; return _codec;
}; };
export const encode = (obj: PagingInfo): Uint8Array => { export const encode = (obj: Partial<PagingInfo>): Uint8Array => {
return encodeMessage(obj, PagingInfo.codec()); return encodeMessage(obj, PagingInfo.codec());
}; };
@ -199,18 +202,18 @@ export namespace ContentFilter {
export const codec = (): Codec<ContentFilter> => { export const codec = (): Codec<ContentFilter> => {
if (_codec == null) { if (_codec == null) {
_codec = message<ContentFilter>( _codec = message<ContentFilter>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(10); w.uint32(10);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -239,7 +242,7 @@ export namespace ContentFilter {
return _codec; return _codec;
}; };
export const encode = (obj: ContentFilter): Uint8Array => { export const encode = (obj: Partial<ContentFilter>): Uint8Array => {
return encodeMessage(obj, ContentFilter.codec()); return encodeMessage(obj, ContentFilter.codec());
}; };
@ -262,44 +265,40 @@ export namespace HistoryQuery {
export const codec = (): Codec<HistoryQuery> => { export const codec = (): Codec<HistoryQuery> => {
if (_codec == null) { if (_codec == null) {
_codec = message<HistoryQuery>( _codec = message<HistoryQuery>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.pubSubTopic != null) { if (obj.pubSubTopic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.pubSubTopic); w.string(obj.pubSubTopic);
} }
if (obj.contentFilters != null) { if (obj.contentFilters != null) {
for (const value of obj.contentFilters) { for (const value of obj.contentFilters) {
writer.uint32(26); w.uint32(26);
ContentFilter.codec().encode(value, writer); ContentFilter.codec().encode(value, w);
} }
} else {
throw new Error(
'Protocol error: required field "contentFilters" was not found in object'
);
} }
if (obj.pagingInfo != null) { if (obj.pagingInfo != null) {
writer.uint32(34); w.uint32(34);
PagingInfo.codec().encode(obj.pagingInfo, writer); PagingInfo.codec().encode(obj.pagingInfo, w);
} }
if (obj.startTime != null) { if (obj.startTime != null) {
writer.uint32(40); w.uint32(40);
writer.sint64(obj.startTime); w.sint64(obj.startTime);
} }
if (obj.endTime != null) { if (obj.endTime != null) {
writer.uint32(48); w.uint32(48);
writer.sint64(obj.endTime); w.sint64(obj.endTime);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -347,7 +346,7 @@ export namespace HistoryQuery {
return _codec; return _codec;
}; };
export const encode = (obj: HistoryQuery): Uint8Array => { export const encode = (obj: Partial<HistoryQuery>): Uint8Array => {
return encodeMessage(obj, HistoryQuery.codec()); return encodeMessage(obj, HistoryQuery.codec());
}; };
@ -374,7 +373,7 @@ export namespace HistoryResponse {
} }
export namespace HistoryError { export namespace HistoryError {
export const codec = () => { export const codec = (): Codec<HistoryError> => {
return enumeration<HistoryError>(__HistoryErrorValues); return enumeration<HistoryError>(__HistoryErrorValues);
}; };
} }
@ -384,34 +383,30 @@ export namespace HistoryResponse {
export const codec = (): Codec<HistoryResponse> => { export const codec = (): Codec<HistoryResponse> => {
if (_codec == null) { if (_codec == null) {
_codec = message<HistoryResponse>( _codec = message<HistoryResponse>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.messages != null) { if (obj.messages != null) {
for (const value of obj.messages) { for (const value of obj.messages) {
writer.uint32(18); w.uint32(18);
WakuMessage.codec().encode(value, writer); WakuMessage.codec().encode(value, w);
} }
} else {
throw new Error(
'Protocol error: required field "messages" was not found in object'
);
} }
if (obj.pagingInfo != null) { if (obj.pagingInfo != null) {
writer.uint32(26); w.uint32(26);
PagingInfo.codec().encode(obj.pagingInfo, writer); PagingInfo.codec().encode(obj.pagingInfo, w);
} }
if (obj.error != null) { if (obj.error != null) {
writer.uint32(32); w.uint32(32);
HistoryResponse.HistoryError.codec().encode(obj.error, writer); HistoryResponse.HistoryError.codec().encode(obj.error, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -453,7 +448,7 @@ export namespace HistoryResponse {
return _codec; return _codec;
}; };
export const encode = (obj: HistoryResponse): Uint8Array => { export const encode = (obj: Partial<HistoryResponse>): Uint8Array => {
return encodeMessage(obj, HistoryResponse.codec()); return encodeMessage(obj, HistoryResponse.codec());
}; };
@ -474,28 +469,28 @@ export namespace HistoryRPC {
export const codec = (): Codec<HistoryRPC> => { export const codec = (): Codec<HistoryRPC> => {
if (_codec == null) { if (_codec == null) {
_codec = message<HistoryRPC>( _codec = message<HistoryRPC>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.requestId != null) { if (obj.requestId != null) {
writer.uint32(10); w.uint32(10);
writer.string(obj.requestId); w.string(obj.requestId);
} }
if (obj.query != null) { if (obj.query != null) {
writer.uint32(18); w.uint32(18);
HistoryQuery.codec().encode(obj.query, writer); HistoryQuery.codec().encode(obj.query, w);
} }
if (obj.response != null) { if (obj.response != null) {
writer.uint32(26); w.uint32(26);
HistoryResponse.codec().encode(obj.response, writer); HistoryResponse.codec().encode(obj.response, w);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -536,7 +531,7 @@ export namespace HistoryRPC {
return _codec; return _codec;
}; };
export const encode = (obj: HistoryRPC): Uint8Array => { export const encode = (obj: Partial<HistoryRPC>): Uint8Array => {
return encodeMessage(obj, HistoryRPC.codec()); return encodeMessage(obj, HistoryRPC.codec());
}; };
@ -561,76 +556,48 @@ export namespace RateLimitProof {
export const codec = (): Codec<RateLimitProof> => { export const codec = (): Codec<RateLimitProof> => {
if (_codec == null) { if (_codec == null) {
_codec = message<RateLimitProof>( _codec = message<RateLimitProof>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.proof != null) { if (obj.proof != null && obj.proof.byteLength > 0) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.proof); w.bytes(obj.proof);
} else {
throw new Error(
'Protocol error: required field "proof" was not found in object'
);
} }
if (obj.merkleRoot != null) { if (obj.merkleRoot != null && obj.merkleRoot.byteLength > 0) {
writer.uint32(18); w.uint32(18);
writer.bytes(obj.merkleRoot); w.bytes(obj.merkleRoot);
} else {
throw new Error(
'Protocol error: required field "merkleRoot" was not found in object'
);
} }
if (obj.epoch != null) { if (obj.epoch != null && obj.epoch.byteLength > 0) {
writer.uint32(26); w.uint32(26);
writer.bytes(obj.epoch); w.bytes(obj.epoch);
} else {
throw new Error(
'Protocol error: required field "epoch" was not found in object'
);
} }
if (obj.shareX != null) { if (obj.shareX != null && obj.shareX.byteLength > 0) {
writer.uint32(34); w.uint32(34);
writer.bytes(obj.shareX); w.bytes(obj.shareX);
} else {
throw new Error(
'Protocol error: required field "shareX" was not found in object'
);
} }
if (obj.shareY != null) { if (obj.shareY != null && obj.shareY.byteLength > 0) {
writer.uint32(42); w.uint32(42);
writer.bytes(obj.shareY); w.bytes(obj.shareY);
} else {
throw new Error(
'Protocol error: required field "shareY" was not found in object'
);
} }
if (obj.nullifier != null) { if (obj.nullifier != null && obj.nullifier.byteLength > 0) {
writer.uint32(50); w.uint32(50);
writer.bytes(obj.nullifier); w.bytes(obj.nullifier);
} else {
throw new Error(
'Protocol error: required field "nullifier" was not found in object'
);
} }
if (obj.rlnIdentifier != null) { if (obj.rlnIdentifier != null && obj.rlnIdentifier.byteLength > 0) {
writer.uint32(58); w.uint32(58);
writer.bytes(obj.rlnIdentifier); w.bytes(obj.rlnIdentifier);
} else {
throw new Error(
'Protocol error: required field "rlnIdentifier" was not found in object'
);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -677,48 +644,6 @@ export namespace RateLimitProof {
} }
} }
if (obj.proof == null) {
throw new Error(
'Protocol error: value for required field "proof" was not found in protobuf'
);
}
if (obj.merkleRoot == null) {
throw new Error(
'Protocol error: value for required field "merkleRoot" was not found in protobuf'
);
}
if (obj.epoch == null) {
throw new Error(
'Protocol error: value for required field "epoch" was not found in protobuf'
);
}
if (obj.shareX == null) {
throw new Error(
'Protocol error: value for required field "shareX" was not found in protobuf'
);
}
if (obj.shareY == null) {
throw new Error(
'Protocol error: value for required field "shareY" was not found in protobuf'
);
}
if (obj.nullifier == null) {
throw new Error(
'Protocol error: value for required field "nullifier" was not found in protobuf'
);
}
if (obj.rlnIdentifier == null) {
throw new Error(
'Protocol error: value for required field "rlnIdentifier" was not found in protobuf'
);
}
return obj; return obj;
} }
); );
@ -727,7 +652,7 @@ export namespace RateLimitProof {
return _codec; return _codec;
}; };
export const encode = (obj: RateLimitProof): Uint8Array => { export const encode = (obj: Partial<RateLimitProof>): Uint8Array => {
return encodeMessage(obj, RateLimitProof.codec()); return encodeMessage(obj, RateLimitProof.codec());
}; };
@ -752,48 +677,48 @@ export namespace WakuMessage {
export const codec = (): Codec<WakuMessage> => { export const codec = (): Codec<WakuMessage> => {
if (_codec == null) { if (_codec == null) {
_codec = message<WakuMessage>( _codec = message<WakuMessage>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.payload != null) { if (obj.payload != null) {
writer.uint32(10); w.uint32(10);
writer.bytes(obj.payload); w.bytes(obj.payload);
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (obj.version != null) { if (obj.version != null) {
writer.uint32(24); w.uint32(24);
writer.uint32(obj.version); w.uint32(obj.version);
} }
if (obj.timestampDeprecated != null) { if (obj.timestampDeprecated != null) {
writer.uint32(33); w.uint32(33);
writer.double(obj.timestampDeprecated); w.double(obj.timestampDeprecated);
} }
if (obj.timestamp != null) { if (obj.timestamp != null) {
writer.uint32(80); w.uint32(80);
writer.sint64(obj.timestamp); w.sint64(obj.timestamp);
} }
if (obj.rateLimitProof != null) { if (obj.rateLimitProof != null) {
writer.uint32(170); w.uint32(170);
RateLimitProof.codec().encode(obj.rateLimitProof, writer); RateLimitProof.codec().encode(obj.rateLimitProof, w);
} }
if (obj.ephemeral != null) { if (obj.ephemeral != null) {
writer.uint32(248); w.uint32(248);
writer.bool(obj.ephemeral); w.bool(obj.ephemeral);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -843,7 +768,7 @@ export namespace WakuMessage {
return _codec; return _codec;
}; };
export const encode = (obj: WakuMessage): Uint8Array => { export const encode = (obj: Partial<WakuMessage>): Uint8Array => {
return encodeMessage(obj, WakuMessage.codec()); return encodeMessage(obj, WakuMessage.codec());
}; };

View File

@ -1,9 +1,12 @@
/* eslint-disable import/export */ /* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
/* eslint-disable @typescript-eslint/no-empty-interface */
import { encodeMessage, decodeMessage, message } from "protons-runtime"; import { encodeMessage, decodeMessage, message } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
import type { Codec } from "protons-runtime"; import type { Codec } from "protons-runtime";
import type { Uint8ArrayList } from "uint8arraylist";
export interface TopicOnlyMessage { export interface TopicOnlyMessage {
contentTopic?: string; contentTopic?: string;
@ -15,18 +18,18 @@ export namespace TopicOnlyMessage {
export const codec = (): Codec<TopicOnlyMessage> => { export const codec = (): Codec<TopicOnlyMessage> => {
if (_codec == null) { if (_codec == null) {
_codec = message<TopicOnlyMessage>( _codec = message<TopicOnlyMessage>(
(obj, writer, opts = {}) => { (obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.fork(); w.fork();
} }
if (obj.contentTopic != null) { if (obj.contentTopic != null) {
writer.uint32(18); w.uint32(18);
writer.string(obj.contentTopic); w.string(obj.contentTopic);
} }
if (opts.lengthDelimited !== false) { if (opts.lengthDelimited !== false) {
writer.ldelim(); w.ldelim();
} }
}, },
(reader, length) => { (reader, length) => {
@ -55,7 +58,7 @@ export namespace TopicOnlyMessage {
return _codec; return _codec;
}; };
export const encode = (obj: TopicOnlyMessage): Uint8Array => { export const encode = (obj: Partial<TopicOnlyMessage>): Uint8Array => {
return encodeMessage(obj, TopicOnlyMessage.codec()); return encodeMessage(obj, TopicOnlyMessage.codec());
}; };