Skip to content

Commit

Permalink
chore: update deps (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain authored Jun 17, 2022
1 parent dd735dd commit 0bdab0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/libp2p-daemon-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@
"@libp2p/interface-peer-info": "^1.0.1",
"@libp2p/logger": "^2.0.0",
"@libp2p/peer-id": "^1.1.10",
"@libp2p/tcp": "^2.0.0",
"@libp2p/tcp": "^3.0.0",
"@multiformats/multiaddr": "^10.1.8",
"err-code": "^3.0.1",
"it-stream-types": "^1.0.4",
"multiformats": "^9.6.4"
},
"devDependencies": {
"@libp2p/components": "^1.0.0",
"@libp2p/components": "^2.0.0",
"@libp2p/daemon-server": "^2.0.0",
"@libp2p/interface-compliance-tests": "^3.0.1",
"@libp2p/interface-dht": "^1.0.0",
"@libp2p/interface-mocks": "^1.0.1",
"@libp2p/interface-mocks": "^2.0.1",
"@libp2p/interface-peer-store": "^1.0.0",
"@libp2p/interface-pubsub": "^1.0.1",
"@libp2p/peer-id-factory": "^1.0.9",
Expand Down
6 changes: 3 additions & 3 deletions packages/libp2p-daemon-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@
},
"dependencies": {
"@libp2p/daemon-protocol": "^2.0.0",
"@libp2p/interface-connection": "^1.0.1",
"@libp2p/interface-connection": "^2.0.0",
"@libp2p/interface-dht": "^1.0.0",
"@libp2p/interface-peer-id": "^1.0.2",
"@libp2p/interface-registrar": "^1.0.0",
"@libp2p/interface-registrar": "^2.0.1",
"@libp2p/interface-transport": "^1.0.0",
"@libp2p/interfaces": "^3.0.2",
"@libp2p/logger": "^2.0.0",
"@libp2p/peer-id": "^1.1.10",
"@libp2p/tcp": "^2.0.0",
"@libp2p/tcp": "^3.0.0",
"@multiformats/multiaddr": "^10.1.8",
"it-drain": "^1.0.5",
"it-length-prefixed": "^7.0.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/libp2p-daemon-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ export class Server implements Libp2pServer {
const peerId = peerIdFromBytes(peer)

const connection = await this.libp2p.dial(peerId)
const { stream, protocol } = await connection.newStream(proto)
const stream = await connection.newStream(proto)

return {
streamInfo: {
peer: peerId.toBytes(),
addr: connection.remoteAddr.bytes,
proto: protocol
proto: stream.stat.protocol ?? ''
},
connection: stream
}
Expand Down Expand Up @@ -157,11 +157,11 @@ export class Server implements Libp2pServer {
await Promise.all(
protocols.map(async (proto) => {
// Connect the client socket with the libp2p connection
await this.libp2p.handle(proto, ({ connection, stream, protocol }) => {
await this.libp2p.handle(proto, ({ connection, stream }) => {
const message = StreamInfo.encode({
peer: connection.remotePeer.toBytes(),
addr: connection.remoteAddr.bytes,
proto: protocol
proto: stream.stat.protocol ?? ''
})
const encodedMessage = lp.encode.single(message)

Expand Down

0 comments on commit 0bdab0e

Please sign in to comment.