@libp2p/noise 1.0.0-55b7e5fea → 1.0.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/README.md +1 -1
- package/dist/index.min.js +12 -11
- package/dist/index.min.js.map +4 -4
- package/dist/src/crypto/js.js +4 -4
- package/dist/src/crypto/js.js.map +1 -1
- package/dist/typedoc-urls.json +11 -0
- package/package.json +16 -16
- package/src/crypto/js.ts +4 -4
package/dist/src/crypto/js.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { chacha20poly1305 } from '@noble/ciphers/chacha
|
|
2
|
-
import { x25519 } from '@noble/curves/ed25519
|
|
3
|
-
import { extract, expand } from '@noble/hashes/hkdf
|
|
4
|
-
import { sha256 } from '@noble/hashes/sha2
|
|
1
|
+
import { chacha20poly1305 } from '@noble/ciphers/chacha';
|
|
2
|
+
import { x25519 } from '@noble/curves/ed25519';
|
|
3
|
+
import { extract, expand } from '@noble/hashes/hkdf';
|
|
4
|
+
import { sha256 } from '@noble/hashes/sha2';
|
|
5
5
|
export const pureJsCrypto = {
|
|
6
6
|
hashSHA256(data) {
|
|
7
7
|
return sha256(data.subarray());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/crypto/js.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../src/crypto/js.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAK3C,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C,UAAU,CAAE,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AAa;QAC/G,OAAO,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAA;IACrE,CAAC;IAED,uBAAuB,CAAE,UAAuC,EAAE,KAAiB,EAAE,EAAc,EAAE,CAAa,EAAE,GAAgB;QAClI,OAAO,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAA;IAC3E,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ICryptoInterface": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_noise.ICryptoInterface.html",
|
|
3
|
+
"KeyPair": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_noise.KeyPair.html",
|
|
4
|
+
"NoiseComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_noise.NoiseComponents.html",
|
|
5
|
+
".:NoiseComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_noise.NoiseComponents.html",
|
|
6
|
+
"NoiseExtensions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_noise.NoiseExtensions.html",
|
|
7
|
+
"NoiseInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_noise.NoiseInit.html",
|
|
8
|
+
"pureJsCrypto": "https://libp2p.github.io/js-libp2p/variables/_libp2p_noise.pureJsCrypto.html",
|
|
9
|
+
"noise": "https://libp2p.github.io/js-libp2p/functions/_libp2p_noise.noise.html",
|
|
10
|
+
".:noise": "https://libp2p.github.io/js-libp2p/functions/_libp2p_noise.noise.html"
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/noise",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Noise libp2p handshake for js-libp2p",
|
|
5
5
|
"author": "ChainSafe <info@chainsafe.io>",
|
|
6
6
|
"license": "Apache-2.0 OR MIT",
|
|
@@ -54,33 +54,33 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@chainsafe/as-chacha20poly1305": "^0.1.0",
|
|
56
56
|
"@chainsafe/as-sha256": "^1.2.0",
|
|
57
|
-
"@libp2p/crypto": "5.1.9
|
|
58
|
-
"@libp2p/interface": "3.0.0
|
|
59
|
-
"@libp2p/peer-id": "6.0.0
|
|
60
|
-
"@libp2p/utils": "7.0.0
|
|
61
|
-
"@noble/ciphers": "^
|
|
62
|
-
"@noble/curves": "^
|
|
63
|
-
"@noble/hashes": "^
|
|
57
|
+
"@libp2p/crypto": "^5.1.9",
|
|
58
|
+
"@libp2p/interface": "^3.0.0",
|
|
59
|
+
"@libp2p/peer-id": "^6.0.0",
|
|
60
|
+
"@libp2p/utils": "^7.0.0",
|
|
61
|
+
"@noble/ciphers": "^1.3.0",
|
|
62
|
+
"@noble/curves": "^1.9.7",
|
|
63
|
+
"@noble/hashes": "^1.8.0",
|
|
64
64
|
"protons-runtime": "^5.6.0",
|
|
65
65
|
"uint8arraylist": "^2.4.8",
|
|
66
66
|
"uint8arrays": "^5.1.0",
|
|
67
67
|
"wherearewe": "^2.0.1"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@libp2p/daemon-client": "10.0.0
|
|
71
|
-
"@libp2p/daemon-server": "9.0.0
|
|
72
|
-
"@libp2p/interface-compliance-tests": "7.0.0
|
|
73
|
-
"@libp2p/interop": "14.0.0
|
|
74
|
-
"@libp2p/logger": "6.0.0
|
|
75
|
-
"@libp2p/tcp": "11.0.0
|
|
76
|
-
"@libp2p/yamux": "8.0.0
|
|
70
|
+
"@libp2p/daemon-client": "^10.0.0",
|
|
71
|
+
"@libp2p/daemon-server": "^9.0.0",
|
|
72
|
+
"@libp2p/interface-compliance-tests": "^7.0.0",
|
|
73
|
+
"@libp2p/interop": "^14.0.0",
|
|
74
|
+
"@libp2p/logger": "^6.0.0",
|
|
75
|
+
"@libp2p/tcp": "^11.0.0",
|
|
76
|
+
"@libp2p/yamux": "^8.0.0",
|
|
77
77
|
"@multiformats/multiaddr": "^13.0.1",
|
|
78
78
|
"@types/sinon": "^17.0.4",
|
|
79
79
|
"aegir": "^47.0.22",
|
|
80
80
|
"execa": "^9.6.0",
|
|
81
81
|
"go-libp2p": "^1.6.0",
|
|
82
82
|
"iso-random-stream": "^2.0.2",
|
|
83
|
-
"libp2p": "3.0.0
|
|
83
|
+
"libp2p": "^3.0.0",
|
|
84
84
|
"mkdirp": "^3.0.1",
|
|
85
85
|
"multiformats": "^13.4.0",
|
|
86
86
|
"p-defer": "^4.0.1",
|
package/src/crypto/js.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { chacha20poly1305 } from '@noble/ciphers/chacha
|
|
2
|
-
import { x25519 } from '@noble/curves/ed25519
|
|
3
|
-
import { extract, expand } from '@noble/hashes/hkdf
|
|
4
|
-
import { sha256 } from '@noble/hashes/sha2
|
|
1
|
+
import { chacha20poly1305 } from '@noble/ciphers/chacha'
|
|
2
|
+
import { x25519 } from '@noble/curves/ed25519'
|
|
3
|
+
import { extract, expand } from '@noble/hashes/hkdf'
|
|
4
|
+
import { sha256 } from '@noble/hashes/sha2'
|
|
5
5
|
import type { ICryptoInterface } from '../crypto.js'
|
|
6
6
|
import type { KeyPair } from '../types.js'
|
|
7
7
|
import type { Uint8ArrayList } from 'uint8arraylist'
|