@libp2p/pnet 3.0.16 → 3.0.18-20bfcb3f9

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.
@@ -2,8 +2,8 @@ import { AbstractMultiaddrConnection } from '@libp2p/utils';
2
2
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';
3
3
  import { toString as uint8ArrayToString } from 'uint8arrays/to-string';
4
4
  import xsalsa20 from 'xsalsa20';
5
- import * as Errors from './errors.js';
6
- import { KEY_LENGTH } from './key-generator.js';
5
+ import * as Errors from "./errors.js";
6
+ import { KEY_LENGTH } from "./key-generator.js";
7
7
  export class BoxMessageStream extends AbstractMultiaddrConnection {
8
8
  maConn;
9
9
  inboundXor;
@@ -56,7 +56,7 @@
56
56
  * ```
57
57
  */
58
58
  import type { ComponentLogger, ConnectionProtector } from '@libp2p/interface';
59
- export { generateKey } from './key-generator.js';
59
+ export { generateKey } from './key-generator.ts';
60
60
  export interface ProtectorInit {
61
61
  /**
62
62
  * A pre-shared key. This must be the same byte value for all peers in the
package/dist/src/index.js CHANGED
@@ -58,9 +58,9 @@
58
58
  import { randomBytes } from '@libp2p/crypto';
59
59
  import { InvalidParametersError } from '@libp2p/interface';
60
60
  import { byteStream } from '@libp2p/utils';
61
- import { BoxMessageStream, decodeV1PSK } from './crypto.js';
62
- import { NONCE_LENGTH } from './key-generator.js';
63
- export { generateKey } from './key-generator.js';
61
+ import { BoxMessageStream, decodeV1PSK } from "./crypto.js";
62
+ import { NONCE_LENGTH } from "./key-generator.js";
63
+ export { generateKey } from "./key-generator.js";
64
64
  class PreSharedKeyConnectionProtector {
65
65
  tag;
66
66
  psk;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/pnet",
3
- "version": "3.0.16",
3
+ "version": "3.0.18-20bfcb3f9",
4
4
  "description": "Implementation of Connection protection management via a shared secret",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/pnet#readme",
@@ -26,7 +26,8 @@
26
26
  "exports": {
27
27
  ".": {
28
28
  "types": "./dist/src/index.d.ts",
29
- "import": "./dist/src/index.js"
29
+ "import": "./dist/src/index.js",
30
+ "module-sync": "./dist/src/index.js"
30
31
  }
31
32
  },
32
33
  "scripts": {
@@ -43,9 +44,9 @@
43
44
  "doc-check": "aegir doc-check"
44
45
  },
45
46
  "dependencies": {
46
- "@libp2p/crypto": "^5.1.15",
47
- "@libp2p/interface": "^3.2.0",
48
- "@libp2p/utils": "^7.0.15",
47
+ "@libp2p/crypto": "5.1.17-20bfcb3f9",
48
+ "@libp2p/interface": "3.2.2-20bfcb3f9",
49
+ "@libp2p/utils": "7.0.17-20bfcb3f9",
49
50
  "uint8arraylist": "^2.4.8",
50
51
  "uint8arrays": "^5.1.0",
51
52
  "xsalsa20": "^1.2.0"
package/src/crypto.ts CHANGED
@@ -2,8 +2,8 @@ import { AbstractMultiaddrConnection } from '@libp2p/utils'
2
2
  import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
3
3
  import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
4
4
  import xsalsa20 from 'xsalsa20'
5
- import * as Errors from './errors.js'
6
- import { KEY_LENGTH } from './key-generator.js'
5
+ import * as Errors from './errors.ts'
6
+ import { KEY_LENGTH } from './key-generator.ts'
7
7
  import type { AbortOptions, MultiaddrConnection } from '@libp2p/interface'
8
8
  import type { MessageStreamInit, SendResult } from '@libp2p/utils'
9
9
  import type { Uint8ArrayList } from 'uint8arraylist'
package/src/index.ts CHANGED
@@ -59,11 +59,11 @@
59
59
  import { randomBytes } from '@libp2p/crypto'
60
60
  import { InvalidParametersError } from '@libp2p/interface'
61
61
  import { byteStream } from '@libp2p/utils'
62
- import { BoxMessageStream, decodeV1PSK } from './crypto.js'
63
- import { NONCE_LENGTH } from './key-generator.js'
62
+ import { BoxMessageStream, decodeV1PSK } from './crypto.ts'
63
+ import { NONCE_LENGTH } from './key-generator.ts'
64
64
  import type { ComponentLogger, ConnectionProtector, MultiaddrConnection, AbortOptions } from '@libp2p/interface'
65
65
 
66
- export { generateKey } from './key-generator.js'
66
+ export { generateKey } from './key-generator.ts'
67
67
 
68
68
  export interface ProtectorInit {
69
69
  /**
@@ -1,9 +0,0 @@
1
- {
2
- "ProtectorComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_pnet.ProtectorComponents.html",
3
- ".:ProtectorComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_pnet.ProtectorComponents.html",
4
- "ProtectorInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_pnet.ProtectorInit.html",
5
- ".:ProtectorInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_pnet.ProtectorInit.html",
6
- "generateKey": "https://libp2p.github.io/js-libp2p/functions/_libp2p_pnet.generateKey.html",
7
- "preSharedKey": "https://libp2p.github.io/js-libp2p/functions/_libp2p_pnet.preSharedKey.html",
8
- ".:preSharedKey": "https://libp2p.github.io/js-libp2p/functions/_libp2p_pnet.preSharedKey.html"
9
- }