@waku/message-encryption 0.0.27-a7bf4fd.0 → 0.0.27-fd60cc2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{ecies-UXXI4x4o.js → ecies-DlMcfLOj.js} +1 -1
- package/bundle/ecies.js +2 -2
- package/bundle/{encryption-DPSBvI6K.js → encryption-DI7bQxAe.js} +7 -8
- package/bundle/index.js +3 -3
- package/bundle/{symmetric-4Q6jplJ9.js → symmetric-UMCBgDF-.js} +1 -1
- package/bundle/symmetric.js +2 -2
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { L as Logger, d as determinePubsubTopic, D as DefaultPubsubTopic, W as WakuMessage, p as preCipher, e as encryptAsymmetric, a as Decoder$1, b as decryptAsymmetric, c as postCipher, f as DecodedMessage } from './encryption-
|
1
|
+
import { L as Logger, d as determinePubsubTopic, D as DefaultPubsubTopic, W as WakuMessage, p as preCipher, e as encryptAsymmetric, a as Decoder$1, b as decryptAsymmetric, c as postCipher, f as DecodedMessage } from './encryption-DI7bQxAe.js';
|
2
2
|
import { V as Version, O as OneMillion, g as generatePrivateKey } from './symmetric-qyNI8P98.js';
|
3
3
|
|
4
4
|
const log = new Logger("message-encryption:ecies");
|
package/bundle/ecies.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { b as decryptAsymmetric, e as encryptAsymmetric, c as postCipher, p as preCipher } from './encryption-
|
1
|
+
export { b as decryptAsymmetric, e as encryptAsymmetric, c as postCipher, p as preCipher } from './encryption-DI7bQxAe.js';
|
2
2
|
export { g as generatePrivateKey } from './symmetric-qyNI8P98.js';
|
3
|
-
export { a as createDecoder, c as createEncoder } from './ecies-
|
3
|
+
export { a as createDecoder, c as createEncoder } from './ecies-DlMcfLOj.js';
|
@@ -4250,23 +4250,22 @@ function contentTopicToShardIndex(contentTopic, networkShards = 8) {
|
|
4250
4250
|
return Number(dataview.getBigUint64(0, false) % BigInt(networkShards));
|
4251
4251
|
}
|
4252
4252
|
function contentTopicToPubsubTopic(contentTopic, clusterId = DEFAULT_CLUSTER_ID, networkShards = 8) {
|
4253
|
+
if (!contentTopic) {
|
4254
|
+
throw Error("Content topic must be specified");
|
4255
|
+
}
|
4253
4256
|
const shardIndex = contentTopicToShardIndex(contentTopic, networkShards);
|
4254
4257
|
return `/waku/2/rs/${clusterId}/${shardIndex}`;
|
4255
4258
|
}
|
4256
4259
|
/**
|
4257
4260
|
* Used when creating encoders/decoders to determine which pubsub topic to use
|
4258
4261
|
*/
|
4259
|
-
function determinePubsubTopic(contentTopic, pubsubTopicShardInfo
|
4262
|
+
function determinePubsubTopic(contentTopic, pubsubTopicShardInfo) {
|
4260
4263
|
if (typeof pubsubTopicShardInfo == "string") {
|
4261
4264
|
return pubsubTopicShardInfo;
|
4262
4265
|
}
|
4263
|
-
|
4264
|
-
|
4265
|
-
|
4266
|
-
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
|
4267
|
-
: contentTopicToPubsubTopic(contentTopic, pubsubTopicShardInfo.clusterId)
|
4268
|
-
: DefaultPubsubTopic;
|
4269
|
-
}
|
4266
|
+
return pubsubTopicShardInfo?.shard
|
4267
|
+
? singleShardInfoToPubsubTopic(pubsubTopicShardInfo)
|
4268
|
+
: contentTopicToPubsubTopic(contentTopic, pubsubTopicShardInfo?.clusterId || DEFAULT_CLUSTER_ID);
|
4270
4269
|
}
|
4271
4270
|
|
4272
4271
|
var browser = {exports: {}};
|
package/bundle/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { i as crypto } from './index-DxtaUQnt.js';
|
2
|
-
export { e as ecies } from './ecies-
|
3
|
-
export { s as symmetric } from './symmetric-
|
2
|
+
export { e as ecies } from './ecies-DlMcfLOj.js';
|
3
|
+
export { s as symmetric } from './symmetric-UMCBgDF-.js';
|
4
4
|
export { g as generatePrivateKey, a as generateSymmetricKey, b as getPublicKey } from './symmetric-qyNI8P98.js';
|
5
|
-
import './encryption-
|
5
|
+
import './encryption-DI7bQxAe.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { L as Logger, d as determinePubsubTopic, D as DefaultPubsubTopic, W as WakuMessage, p as preCipher, g as encryptSymmetric, a as Decoder$1, h as decryptSymmetric, c as postCipher, f as DecodedMessage } from './encryption-
|
1
|
+
import { L as Logger, d as determinePubsubTopic, D as DefaultPubsubTopic, W as WakuMessage, p as preCipher, g as encryptSymmetric, a as Decoder$1, h as decryptSymmetric, c as postCipher, f as DecodedMessage } from './encryption-DI7bQxAe.js';
|
2
2
|
import { V as Version, O as OneMillion, a as generateSymmetricKey } from './symmetric-qyNI8P98.js';
|
3
3
|
|
4
4
|
const log = new Logger("message-encryption:symmetric");
|
package/bundle/symmetric.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { h as decryptSymmetric, g as encryptSymmetric, c as postCipher, p as preCipher } from './encryption-
|
1
|
+
export { h as decryptSymmetric, g as encryptSymmetric, c as postCipher, p as preCipher } from './encryption-DI7bQxAe.js';
|
2
2
|
export { a as generateSymmetricKey } from './symmetric-qyNI8P98.js';
|
3
|
-
export { a as createDecoder, c as createEncoder } from './symmetric-
|
3
|
+
export { a as createDecoder, c as createEncoder } from './symmetric-UMCBgDF-.js';
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@waku/message-encryption","version":"0.0.27-
|
1
|
+
{"name":"@waku/message-encryption","version":"0.0.27-fd60cc2.0","description":"Waku Message Payload Encryption","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ecies":{"types":"./dist/ecies.d.ts","import":"./dist/ecies.js"},"./symmetric":{"types":"./dist/symmetric.d.ts","import":"./dist/symmetric.js"},"./crypto":{"types":"./dist/crypto/index.d.ts","import":"./dist/crypto/index.js"}},"typesVersions":{"*":{"*":["*","dist/*","dist/*/index"]}},"type":"module","author":"Waku Team","homepage":"https://github.com/waku-org/js-waku/tree/master/packages/message-encryption#readme","repository":{"type":"git","url":"https://github.com/waku-org/js-waku.git"},"bugs":{"url":"https://github.com/waku-org/js-waku/issues"},"license":"MIT OR Apache-2.0","keywords":["waku","decentralized","secure","communication","web3","ethereum","dapps","privacy"],"scripts":{"build":"run-s build:**","build:esm":"tsc","build:bundle":"rollup --config rollup.config.js","fix":"run-s fix:*","fix:lint":"eslint src *.js --fix","check":"run-s check:*","check:lint":"eslint src *.js","check:spelling":"cspell \"{README.md,src/**/*.ts}\"","check:tsc":"tsc -p tsconfig.dev.json","test":"NODE_ENV=test run-s test:*","test:node":"NODE_ENV=test TS_NODE_PROJECT=./tsconfig.dev.json mocha","test:browser":"NODE_ENV=test karma start karma.conf.cjs","prepublish":"npm run build","reset-hard":"git clean -dfx -e .idea && git reset --hard && npm i && npm run build"},"engines":{"node":">=18"},"browser":{"crypto":false},"dependencies":{"@noble/secp256k1":"^1.7.1","@waku/core":"0.0.29-fd60cc2.0","@waku/interfaces":"0.0.24-fd60cc2.0","@waku/proto":"0.0.7-fd60cc2.0","@waku/utils":"0.0.17-fd60cc2.0","debug":"^4.3.4","js-sha3":"^0.9.2","uint8arrays":"^5.0.1"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.2.3","@types/chai":"^4.3.11","@types/mocha":"^10.0.6","@waku/build-utils":"*","chai":"^4.3.10","cspell":"^8.6.1","fast-check":"^3.15.1","mocha":"^10.3.0","npm-run-all":"^4.1.5","process":"^0.11.10","rollup":"^4.12.0"},"peerDependencies":{"@waku/core":"0.0.29-fd60cc2.0","@waku/interfaces":"0.0.24-fd60cc2.0","@waku/proto":"0.0.7-fd60cc2.0","@waku/utils":"0.0.17-fd60cc2.0"},"peerDependenciesMeta":{"@waku/interfaces":{"optional":true}},"files":["dist","bundle","src/**/*.ts","!**/*.spec.*","!**/*.json","CHANGELOG.md","LICENSE","README.md"]}
|