@gethashd/bytecave-browser 1.0.25 → 1.0.26

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.
@@ -5706,16 +5706,26 @@ var P2PProtocolClient = class {
5706
5706
  console.log(`[ByteCave P2P] Store timeout: ${Math.round(timeoutMs / 1e3)}s for ${fileSizeMB.toFixed(2)}MB`);
5707
5707
  const storePromise = (async () => {
5708
5708
  console.log("[ByteCave P2P] Step 1: Checking existing connections to peer", peerId.slice(0, 12));
5709
+ console.log("[ByteCave P2P] Full peer ID:", peerId);
5709
5710
  const existingConns = this.node.getConnections(peerIdObj);
5710
5711
  console.log("[ByteCave P2P] Existing connections:", existingConns.length);
5711
5712
  existingConns.forEach((conn, idx) => {
5712
5713
  console.log(`[ByteCave P2P] Connection ${idx}:`, {
5713
5714
  remoteAddr: conn.remoteAddr.toString(),
5715
+ remotePeer: conn.remotePeer.toString(),
5714
5716
  status: conn.status,
5715
5717
  direction: conn.direction,
5718
+ streams: conn.streams.length,
5716
5719
  timeline: conn.timeline
5717
5720
  });
5718
5721
  });
5722
+ const peerStore = this.node.peerStore;
5723
+ try {
5724
+ const peer = await peerStore.get(peerIdObj);
5725
+ console.log("[ByteCave P2P] Peer protocols from peerStore:", peer.protocols);
5726
+ } catch (e) {
5727
+ console.warn("[ByteCave P2P] Could not get peer info from peerStore:", e);
5728
+ }
5719
5729
  console.log("[ByteCave P2P] Step 2: Dialing store protocol /bytecave/store/1.0.0...");
5720
5730
  const dialStart = Date.now();
5721
5731
  let stream;
package/dist/index.cjs CHANGED
@@ -5774,16 +5774,26 @@ var P2PProtocolClient = class {
5774
5774
  console.log(`[ByteCave P2P] Store timeout: ${Math.round(timeoutMs / 1e3)}s for ${fileSizeMB.toFixed(2)}MB`);
5775
5775
  const storePromise = (async () => {
5776
5776
  console.log("[ByteCave P2P] Step 1: Checking existing connections to peer", peerId.slice(0, 12));
5777
+ console.log("[ByteCave P2P] Full peer ID:", peerId);
5777
5778
  const existingConns = this.node.getConnections(peerIdObj);
5778
5779
  console.log("[ByteCave P2P] Existing connections:", existingConns.length);
5779
5780
  existingConns.forEach((conn, idx) => {
5780
5781
  console.log(`[ByteCave P2P] Connection ${idx}:`, {
5781
5782
  remoteAddr: conn.remoteAddr.toString(),
5783
+ remotePeer: conn.remotePeer.toString(),
5782
5784
  status: conn.status,
5783
5785
  direction: conn.direction,
5786
+ streams: conn.streams.length,
5784
5787
  timeline: conn.timeline
5785
5788
  });
5786
5789
  });
5790
+ const peerStore = this.node.peerStore;
5791
+ try {
5792
+ const peer = await peerStore.get(peerIdObj);
5793
+ console.log("[ByteCave P2P] Peer protocols from peerStore:", peer.protocols);
5794
+ } catch (e) {
5795
+ console.warn("[ByteCave P2P] Could not get peer info from peerStore:", e);
5796
+ }
5787
5797
  console.log("[ByteCave P2P] Step 2: Dialing store protocol /bytecave/store/1.0.0...");
5788
5798
  const dialStart = Date.now();
5789
5799
  let stream;
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  useHashdImage,
14
14
  useHashdMedia,
15
15
  useHashdUrl
16
- } from "./chunk-MVXA47HN.js";
16
+ } from "./chunk-XMU2N2NN.js";
17
17
  import {
18
18
  clearHashdCache,
19
19
  createHashdUrl,
@@ -6029,16 +6029,26 @@ var P2PProtocolClient = class {
6029
6029
  console.log(`[ByteCave P2P] Store timeout: ${Math.round(timeoutMs / 1e3)}s for ${fileSizeMB.toFixed(2)}MB`);
6030
6030
  const storePromise = (async () => {
6031
6031
  console.log("[ByteCave P2P] Step 1: Checking existing connections to peer", peerId.slice(0, 12));
6032
+ console.log("[ByteCave P2P] Full peer ID:", peerId);
6032
6033
  const existingConns = this.node.getConnections(peerIdObj);
6033
6034
  console.log("[ByteCave P2P] Existing connections:", existingConns.length);
6034
6035
  existingConns.forEach((conn, idx) => {
6035
6036
  console.log(`[ByteCave P2P] Connection ${idx}:`, {
6036
6037
  remoteAddr: conn.remoteAddr.toString(),
6038
+ remotePeer: conn.remotePeer.toString(),
6037
6039
  status: conn.status,
6038
6040
  direction: conn.direction,
6041
+ streams: conn.streams.length,
6039
6042
  timeline: conn.timeline
6040
6043
  });
6041
6044
  });
6045
+ const peerStore = this.node.peerStore;
6046
+ try {
6047
+ const peer = await peerStore.get(peerIdObj);
6048
+ console.log("[ByteCave P2P] Peer protocols from peerStore:", peer.protocols);
6049
+ } catch (e) {
6050
+ console.warn("[ByteCave P2P] Could not get peer info from peerStore:", e);
6051
+ }
6042
6052
  console.log("[ByteCave P2P] Step 2: Dialing store protocol /bytecave/store/1.0.0...");
6043
6053
  const dialStart = Date.now();
6044
6054
  let stream;
@@ -8,7 +8,7 @@ import {
8
8
  useHashdImage,
9
9
  useHashdMedia,
10
10
  useHashdUrl
11
- } from "../chunk-MVXA47HN.js";
11
+ } from "../chunk-XMU2N2NN.js";
12
12
  import "../chunk-EEZWRIUI.js";
13
13
  export {
14
14
  HashdAudio,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethashd/bytecave-browser",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "ByteCave browser client for WebRTC P2P connections to storage nodes",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -125,17 +125,29 @@ export class P2PProtocolClient {
125
125
  // Wrap the entire operation in a timeout
126
126
  const storePromise = (async () => {
127
127
  console.log('[ByteCave P2P] Step 1: Checking existing connections to peer', peerId.slice(0, 12));
128
+ console.log('[ByteCave P2P] Full peer ID:', peerId);
128
129
  const existingConns = this.node!.getConnections(peerIdObj);
129
130
  console.log('[ByteCave P2P] Existing connections:', existingConns.length);
130
131
  existingConns.forEach((conn, idx) => {
131
132
  console.log(`[ByteCave P2P] Connection ${idx}:`, {
132
133
  remoteAddr: conn.remoteAddr.toString(),
134
+ remotePeer: conn.remotePeer.toString(),
133
135
  status: conn.status,
134
136
  direction: conn.direction,
137
+ streams: conn.streams.length,
135
138
  timeline: conn.timeline
136
139
  });
137
140
  });
138
141
 
142
+ // Check what protocols the peer supports
143
+ const peerStore = this.node!.peerStore;
144
+ try {
145
+ const peer = await peerStore.get(peerIdObj);
146
+ console.log('[ByteCave P2P] Peer protocols from peerStore:', peer.protocols);
147
+ } catch (e) {
148
+ console.warn('[ByteCave P2P] Could not get peer info from peerStore:', e);
149
+ }
150
+
139
151
  // Step 2: Dial store protocol with retry (node may need time to register handlers after startup)
140
152
  console.log('[ByteCave P2P] Step 2: Dialing store protocol /bytecave/store/1.0.0...');
141
153
  const dialStart = Date.now();