Skip to content

Commit

Permalink
Merge branch 'master' into fix/add-max-lsiteners-dialler-relay
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad committed Oct 9, 2023
2 parents 90715cd + 70dbb97 commit 8482206
Show file tree
Hide file tree
Showing 121 changed files with 820 additions and 438 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"interop":"1.0.4","packages/crypto":"2.0.4","packages/interface":"0.1.2","packages/interface-compliance-tests":"4.1.0","packages/interface-internal":"0.1.5","packages/kad-dht":"10.0.8","packages/keychain":"3.0.4","packages/libp2p":"0.46.12","packages/logger":"3.0.2","packages/metrics-prometheus":"2.0.7","packages/multistream-select":"4.0.2","packages/peer-collections":"4.0.4","packages/peer-discovery-bootstrap":"9.0.7","packages/peer-discovery-mdns":"9.0.9","packages/peer-id":"3.0.2","packages/peer-id-factory":"3.0.4","packages/peer-record":"6.0.5","packages/peer-store":"9.0.5","packages/protocol-perf":"1.1.9","packages/pubsub":"8.0.6","packages/pubsub-floodsub":"8.0.8","packages/stream-multiplexer-mplex":"9.0.7","packages/transport-tcp":"8.0.8","packages/transport-webrtc":"3.2.1","packages/transport-websockets":"7.0.8","packages/transport-webtransport":"3.1.1","packages/utils":"4.0.3"}
{"interop":"1.0.5","packages/crypto":"2.0.5","packages/interface":"0.1.3","packages/interface-compliance-tests":"4.1.1","packages/interface-internal":"0.1.6","packages/kad-dht":"10.0.9","packages/keychain":"3.0.5","packages/libp2p":"0.46.13","packages/logger":"3.0.3","packages/metrics-prometheus":"2.0.8","packages/multistream-select":"4.0.3","packages/peer-collections":"4.0.5","packages/peer-discovery-bootstrap":"9.0.8","packages/peer-discovery-mdns":"9.0.10","packages/peer-id":"3.0.3","packages/peer-id-factory":"3.0.5","packages/peer-record":"6.0.6","packages/peer-store":"9.0.6","packages/protocol-perf":"1.1.10","packages/pubsub":"8.0.7","packages/pubsub-floodsub":"8.0.9","packages/stream-multiplexer-mplex":"9.0.8","packages/transport-tcp":"8.0.9","packages/transport-webrtc":"3.2.2","packages/transport-websockets":"7.0.9","packages/transport-webtransport":"3.1.2","packages/utils":"4.0.4"}
2 changes: 1 addition & 1 deletion doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@libp2p/mplex": "^9.0.0",
"@libp2p/prometheus-metrics": "^2.0.0",
"@libp2p/tcp": "^8.0.0",
"aegir": "^40.0.1",
"aegir": "^41.0.2",
"libp2p": "^0.46.0",
"prom-client": "^14.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/auto-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"libp2p": "^0.46.0"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"execa": "^8.0.1",
"p-defer": "^4.0.0",
"uint8arrays": "^4.0.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"execa": "^8.0.1",
"p-defer": "^4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/connection-encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
2 changes: 1 addition & 1 deletion examples/delegated-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"react-scripts": "^5.0.1"
},
"devDependencies": {
"aegir": "^40.0.8"
"aegir": "^41.0.2"
},
"browserslist": [
">0.2%",
Expand Down
2 changes: 1 addition & 1 deletion examples/discovery-mechanisms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"libp2p": "^0.46.0"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"execa": "^8.0.1",
"p-wait-for": "^5.0.2",
"uint8arrays": "^4.0.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/echo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"execa": "^8.0.1",
"p-defer": "^4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/peer-and-content-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"multiformats": "^12.0.1"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
2 changes: 1 addition & 1 deletion examples/pnet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
2 changes: 1 addition & 1 deletion examples/protocol-and-stream-muxing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
2 changes: 1 addition & 1 deletion examples/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"execa": "^8.0.1",
"p-defer": "^4.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/transports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"uint8arrays": "^4.0.6"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"test-ipfs-example": "^1.0.0"
},
"private": true
Expand Down
14 changes: 14 additions & 0 deletions interop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

### [1.0.5](https://www.github.com/libp2p/js-libp2p/compare/multidim-interop-v1.0.4...multidim-interop-v1.0.5) (2023-10-06)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @libp2p/mplex bumped from ^9.0.7 to ^9.0.8
* @libp2p/tcp bumped from ^8.0.8 to ^8.0.9
* @libp2p/webrtc bumped from ^3.2.1 to ^3.2.2
* @libp2p/websockets bumped from ^7.0.8 to ^7.0.9
* @libp2p/webtransport bumped from ^3.1.1 to ^3.1.2
* libp2p bumped from ^0.46.12 to ^0.46.13

### [1.0.4](https://www.github.com/libp2p/js-libp2p/compare/multidim-interop-v1.0.3...multidim-interop-v1.0.4) (2023-10-01)


Expand Down
16 changes: 8 additions & 8 deletions interop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libp2p/multidim-interop",
"version": "1.0.4",
"version": "1.0.5",
"description": "Multidimensional interop tests",
"author": "Glen De Cauwsemaecker <[email protected]> / @marcopolo",
"license": "Apache-2.0 OR MIT",
Expand Down Expand Up @@ -52,15 +52,15 @@
"dependencies": {
"@chainsafe/libp2p-noise": "^13.0.0",
"@chainsafe/libp2p-yamux": "^5.0.0",
"@libp2p/mplex": "^9.0.7",
"@libp2p/tcp": "^8.0.8",
"@libp2p/webrtc": "^3.2.1",
"@libp2p/websockets": "^7.0.8",
"@libp2p/webtransport": "^3.1.1",
"@libp2p/mplex": "^9.0.8",
"@libp2p/tcp": "^8.0.9",
"@libp2p/webrtc": "^3.2.2",
"@libp2p/websockets": "^7.0.9",
"@libp2p/webtransport": "^3.1.2",
"@multiformats/mafmt": "^12.1.2",
"@multiformats/multiaddr": "^12.1.5",
"aegir": "^40.0.12",
"libp2p": "^0.46.12",
"aegir": "^41.0.2",
"libp2p": "^0.46.13",
"redis": "^4.5.1"
},
"browser": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude interop --exclude examples/auto-relay --exclude examples/chat --exclude examples/connection-encryption --exclude examples/delegated-routing --exclude examples/discovery-mechanisms --exclude examples/echo --exclude examples/peer-and-content-routing --exclude examples/pnet --exclude examples/protocol-and-stream-muxing --exclude examples/pubsub --exclude examples/transports --exclude doc"
},
"devDependencies": {
"aegir": "^40.0.1"
"aegir": "^41.0.2"
},
"eslintConfig": {
"extends": "ipfs",
Expand Down
9 changes: 9 additions & 0 deletions packages/crypto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@

* **dev:** bump aegir from 38.1.8 to 39.0.5 ([#320](https://github.com/libp2p/js-libp2p-crypto/issues/320)) ([f0b4c06](https://github.com/libp2p/js-libp2p-crypto/commit/f0b4c068a23d78b1376865c6adf6cce21ab91196))

### [2.0.5](https://www.github.com/libp2p/js-libp2p/compare/crypto-v2.0.4...crypto-v2.0.5) (2023-10-06)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @libp2p/interface bumped from ^0.1.2 to ^0.1.3

### [2.0.4](https://www.github.com/libp2p/js-libp2p/compare/crypto-v2.0.3...crypto-v2.0.4) (2023-09-15)


Expand Down
6 changes: 3 additions & 3 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libp2p/crypto",
"version": "2.0.4",
"version": "2.0.5",
"description": "Crypto primitives for libp2p",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/crypto#readme",
Expand Down Expand Up @@ -86,7 +86,7 @@
"generate": "protons ./src/keys/keys.proto"
},
"dependencies": {
"@libp2p/interface": "^0.1.2",
"@libp2p/interface": "^0.1.3",
"@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1",
"multiformats": "^12.0.1",
Expand All @@ -97,7 +97,7 @@
},
"devDependencies": {
"@types/mocha": "^10.0.0",
"aegir": "^40.0.8",
"aegir": "^41.0.2",
"benchmark": "^2.1.4",
"protons": "^7.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/aes/ciphers-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'

export interface Cipher {
update: (data: Uint8Array) => Uint8Array
update(data: Uint8Array): Uint8Array
}

export function createCipheriv (mode: any, key: Uint8Array, iv: Uint8Array): Cipher {
Expand Down
4 changes: 2 additions & 2 deletions packages/crypto/src/aes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { cipherMode } from './cipher-mode.js'
import * as ciphers from './ciphers.js'

export interface AESCipher {
encrypt: (data: Uint8Array) => Promise<Uint8Array>
decrypt: (data: Uint8Array) => Promise<Uint8Array>
encrypt(data: Uint8Array): Promise<Uint8Array>
decrypt(data: Uint8Array): Promise<Uint8Array>
}

export async function create (key: Uint8Array, iv: Uint8Array): Promise<AESCipher> {
Expand Down
4 changes: 2 additions & 2 deletions packages/crypto/src/ciphers/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export interface CreateOptions {
}

export interface AESCipher {
encrypt: (data: Uint8Array, password: string | Uint8Array) => Promise<Uint8Array>
decrypt: (data: Uint8Array, password: string | Uint8Array) => Promise<Uint8Array>
encrypt(data: Uint8Array, password: string | Uint8Array): Promise<Uint8Array>
decrypt(data: Uint8Array, password: string | Uint8Array): Promise<Uint8Array>
}
2 changes: 1 addition & 1 deletion packages/crypto/src/hmac/index-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const sign = async (key: CryptoKey, data: Uint8Array): Promise<Uint8Array> => {
return new Uint8Array(buf, 0, buf.byteLength)
}

export async function create (hashType: 'SHA1' | 'SHA256' | 'SHA512', secret: Uint8Array): Promise<{ digest: (data: Uint8Array) => Promise<Uint8Array>, length: number }> {
export async function create (hashType: 'SHA1' | 'SHA256' | 'SHA512', secret: Uint8Array): Promise<{ digest(data: Uint8Array): Promise<Uint8Array>, length: number }> {
const hash = hashTypes[hashType]

const key = await webcrypto.get().subtle.importKey(
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/hmac/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import crypto from 'crypto'
import lengths from './lengths.js'

export interface HMAC {
digest: (data: Uint8Array) => Promise<Uint8Array>
digest(data: Uint8Array): Promise<Uint8Array>
length: number
}

Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/keys/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface ECDHKeyPair {

export interface ECDHKey {
key: Uint8Array
genSharedKey: (theirPub: Uint8Array, forcePrivate?: ECDHKeyPair) => Promise<Uint8Array>
genSharedKey(theirPub: Uint8Array, forcePrivate?: ECDHKeyPair): Promise<Uint8Array>
}

export interface JWKEncodedPublicKey { kty: string, crv: 'P-256' | 'P-384' | 'P-521', x: string, y: string, ext: boolean }
Expand Down
4 changes: 2 additions & 2 deletions packages/crypto/src/keys/jwk2pem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import forge from 'node-forge/lib/forge.js'
import { base64urlToBigInteger } from '../util.js'

export interface JWK {
encrypt: (msg: string) => string
decrypt: (msg: string) => string
encrypt(msg: string): string
decrypt(msg: string): string
}

function convert (key: any, types: string[]): Array<typeof forge.jsbn.BigInteger> {
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/keys/rsa-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Explanation:
*/

function convertKey (key: JsonWebKey, pub: boolean, msg: Uint8Array, handle: (msg: string, key: { encrypt: (msg: string) => string, decrypt: (msg: string) => string }) => string): Uint8Array {
function convertKey (key: JsonWebKey, pub: boolean, msg: Uint8Array, handle: (msg: string, key: { encrypt(msg: string): string, decrypt(msg: string): string }) => string): Uint8Array {
const fkey = pub ? jwk2pub(key) : jwk2priv(key)
const fmsg = uint8ArrayToString(Uint8Array.from(msg), 'ascii')
const fomsg = handle(fmsg, fkey)
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'

export function bigIntegerToUintBase64url (num: { abs: () => any }, len?: number): string {
export function bigIntegerToUintBase64url (num: { abs(): any }, len?: number): string {
// Call `.abs()` to convert to unsigned
let buf = Uint8Array.from(num.abs().toByteArray()) // toByteArray converts to big endian

Expand Down
15 changes: 15 additions & 0 deletions packages/interface-compliance-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@

* bump aegir from 38.1.8 to 39.0.5 ([#393](https://github.com/libp2p/js-libp2p-interfaces/issues/393)) ([31f3797](https://github.com/libp2p/js-libp2p-interfaces/commit/31f3797b24f7c23f3f16e9db3a230bd5f7cd5175))

### [4.1.1](https://www.github.com/libp2p/js-libp2p/compare/interface-compliance-tests-v4.1.0...interface-compliance-tests-v4.1.1) (2023-10-06)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @libp2p/interface bumped from ^0.1.2 to ^0.1.3
* @libp2p/interface-internal bumped from ^0.1.5 to ^0.1.6
* @libp2p/logger bumped from ^3.0.2 to ^3.0.3
* @libp2p/multistream-select bumped from ^4.0.2 to ^4.0.3
* @libp2p/peer-collections bumped from ^4.0.4 to ^4.0.5
* @libp2p/peer-id bumped from ^3.0.2 to ^3.0.3
* @libp2p/peer-id-factory bumped from ^3.0.4 to ^3.0.5

## [4.1.0](https://www.github.com/libp2p/js-libp2p/compare/interface-compliance-tests-v4.0.6...interface-compliance-tests-v4.1.0) (2023-10-01)


Expand Down
18 changes: 9 additions & 9 deletions packages/interface-compliance-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libp2p/interface-compliance-tests",
"version": "4.1.0",
"version": "4.1.1",
"description": "Compliance tests for JS libp2p interfaces",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/interface-compliance-tests#readme",
Expand Down Expand Up @@ -103,16 +103,16 @@
"test:electron-main": "aegir test -t electron-main"
},
"dependencies": {
"@libp2p/interface": "^0.1.2",
"@libp2p/interface-internal": "^0.1.5",
"@libp2p/logger": "^3.0.2",
"@libp2p/multistream-select": "^4.0.2",
"@libp2p/peer-collections": "^4.0.4",
"@libp2p/peer-id": "^3.0.2",
"@libp2p/peer-id-factory": "^3.0.4",
"@libp2p/interface": "^0.1.3",
"@libp2p/interface-internal": "^0.1.6",
"@libp2p/logger": "^3.0.3",
"@libp2p/multistream-select": "^4.0.3",
"@libp2p/peer-collections": "^4.0.5",
"@libp2p/peer-id": "^3.0.3",
"@libp2p/peer-id-factory": "^3.0.5",
"@multiformats/multiaddr": "^12.1.5",
"abortable-iterator": "^5.0.1",
"aegir": "^40.0.11",
"aegir": "^41.0.2",
"delay": "^6.0.0",
"it-all": "^3.0.2",
"it-drain": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/interface-compliance-tests/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface TestSetup<T, SetupArgs = Record<string, unknown>> {
setup: (args?: SetupArgs) => Promise<T>
teardown: () => Promise<void>
setup(args?: SetupArgs): Promise<T>
teardown(): Promise<void>
}
4 changes: 2 additions & 2 deletions packages/interface-compliance-tests/src/transport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { Transport } from '@libp2p/interface/transport'
import type { Multiaddr } from '@multiformats/multiaddr'

export interface Connector {
delay: (ms: number) => void
restore: () => void
delay(ms: number): void
restore(): void
}

export interface TransportTestFixtures {
Expand Down
10 changes: 10 additions & 0 deletions packages/interface-internal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

### [0.1.6](https://www.github.com/libp2p/js-libp2p/compare/interface-internal-v0.1.5...interface-internal-v0.1.6) (2023-10-06)


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @libp2p/interface bumped from ^0.1.2 to ^0.1.3
* @libp2p/peer-collections bumped from ^4.0.4 to ^4.0.5

### [0.1.5](https://www.github.com/libp2p/js-libp2p/compare/interface-internal-v0.1.4...interface-internal-v0.1.5) (2023-09-15)


Expand Down
Loading

0 comments on commit 8482206

Please sign in to comment.