@libp2p/interop 9.0.0 → 9.0.1

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.
@@ -1,15 +1,15 @@
1
- import { pbStream } from 'it-pb-stream';
2
1
  import { pipe } from 'it-pipe';
2
+ import { pbStream } from 'it-protobuf-stream';
3
3
  import { HopMessage } from './pb/index.js';
4
4
  const RELAY_V2_HOP = '/libp2p/circuit/relay/0.2.0/hop';
5
5
  export const reserve = async (d, peerID, message) => {
6
6
  const stream = await d.client.openStream(peerID, RELAY_V2_HOP);
7
7
  const pb = pbStream(stream);
8
- pb.writePB({
8
+ await pb.write({
9
9
  type: HopMessage.Type.RESERVE,
10
10
  ...(message ?? {})
11
11
  }, HopMessage);
12
- return pb.readPB(HopMessage);
12
+ return pb.read(HopMessage);
13
13
  };
14
14
  export const echoHandler = {
15
15
  protocol: '/echo/1.0.0',
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/relay/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAM1C,MAAM,YAAY,GAAG,iCAAiC,CAAA;AAEtD,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,CAAS,EAAE,MAAc,EAAE,OAA6B,EAAuB,EAAE;IAC7G,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IAC9D,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC3B,EAAE,CAAC,OAAO,CAAC;QACT,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO;QAC7B,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;KACnB,EAAE,UAAU,CAAC,CAAA;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AAE,MAA6F,EAAE,EAAE;QAC/G,MAAM,IAAI,CACR,MAAM,EACN,KAAK,SAAU,CAAC,EAAE,GAAG;YACnB,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,EAAE;gBAC3B,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAA;aACrB;QACH,CAAC,EACD,MAAM,CACP,CAAA;IACH,CAAC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/interop",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Interoperability Tests for libp2p",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/interop#readme",
@@ -141,7 +141,7 @@
141
141
  "it-all": "^3.0.1",
142
142
  "it-first": "^3.0.1",
143
143
  "it-handshake": "^4.1.2",
144
- "it-pb-stream": "^4.0.0",
144
+ "it-protobuf-stream": "^1.0.0",
145
145
  "it-pipe": "^3.0.0",
146
146
  "it-stream-types": "^2.0.1",
147
147
  "multiformats": "^12.0.1",
package/src/relay/util.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { pbStream } from 'it-pb-stream'
2
1
  import { pipe } from 'it-pipe'
2
+ import { pbStream } from 'it-protobuf-stream'
3
3
  import { HopMessage } from './pb/index.js'
4
4
  import type { Daemon } from '../index.js'
5
5
  import type { PeerId } from '@libp2p/interface-peer-id'
@@ -11,12 +11,12 @@ const RELAY_V2_HOP = '/libp2p/circuit/relay/0.2.0/hop'
11
11
  export const reserve = async (d: Daemon, peerID: PeerId, message?: Partial<HopMessage>): Promise<HopMessage> => {
12
12
  const stream = await d.client.openStream(peerID, RELAY_V2_HOP)
13
13
  const pb = pbStream(stream)
14
- pb.writePB({
14
+ await pb.write({
15
15
  type: HopMessage.Type.RESERVE,
16
16
  ...(message ?? {})
17
17
  }, HopMessage)
18
18
 
19
- return pb.readPB(HopMessage)
19
+ return pb.read(HopMessage)
20
20
  }
21
21
 
22
22
  export const echoHandler = {