Skip to content

Commit 4803ffd

Browse files
authored
fix: add noise extension to return type (#243)
So we can use the types in listeners for interested transports like WebTransport.
1 parent f5ef4ee commit 4803ffd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { ConnectionEncrypter } from '@libp2p/interface-connection-encrypter'
22
import { Noise } from './noise.js'
33
import type { NoiseInit } from './noise.js'
4+
import type { NoiseExtensions } from './proto/payload.js'
45
export * from './crypto.js'
56
export * from './crypto/stablelib.js'
67

7-
export function noise (init: NoiseInit = {}): () => ConnectionEncrypter {
8+
export function noise (init: NoiseInit = {}): () => ConnectionEncrypter<NoiseExtensions> {
89
return () => new Noise(init)
910
}

0 commit comments

Comments
 (0)