@gethashd/bytecave-browser 1.0.56 → 1.0.57

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.
@@ -6251,21 +6251,7 @@ var StorageWebTransportClient = class {
6251
6251
  };
6252
6252
  }
6253
6253
  console.log("[WebTransport] Connecting to node:", url);
6254
- const certHash = this.extractCertHash(this.nodeMultiaddr);
6255
- if (!certHash) {
6256
- return {
6257
- success: false,
6258
- error: "No certificate hash in WebTransport multiaddr"
6259
- };
6260
- }
6261
- const sha256Hash = await this.certHashToSHA256(certHash);
6262
- console.log("[WebTransport] Using certificate hash:", sha256Hash);
6263
- const transport = new WebTransport(url, {
6264
- serverCertificateHashes: [{
6265
- algorithm: "sha-256",
6266
- value: sha256Hash
6267
- }]
6268
- });
6254
+ const transport = new WebTransport(url);
6269
6255
  await transport.ready;
6270
6256
  console.log("[WebTransport] Connected, opening bidirectional stream");
6271
6257
  const stream = await transport.createBidirectionalStream();
package/dist/index.cjs CHANGED
@@ -6304,21 +6304,7 @@ var StorageWebTransportClient = class {
6304
6304
  };
6305
6305
  }
6306
6306
  console.log("[WebTransport] Connecting to node:", url);
6307
- const certHash = this.extractCertHash(this.nodeMultiaddr);
6308
- if (!certHash) {
6309
- return {
6310
- success: false,
6311
- error: "No certificate hash in WebTransport multiaddr"
6312
- };
6313
- }
6314
- const sha256Hash = await this.certHashToSHA256(certHash);
6315
- console.log("[WebTransport] Using certificate hash:", sha256Hash);
6316
- const transport = new WebTransport(url, {
6317
- serverCertificateHashes: [{
6318
- algorithm: "sha-256",
6319
- value: sha256Hash
6320
- }]
6321
- });
6307
+ const transport = new WebTransport(url);
6322
6308
  await transport.ready;
6323
6309
  console.log("[WebTransport] Connected, opening bidirectional stream");
6324
6310
  const stream = await transport.createBidirectionalStream();
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  useHashdImage,
14
14
  useHashdMedia,
15
15
  useHashdUrl
16
- } from "./chunk-PLWUCLI2.js";
16
+ } from "./chunk-TQKA66LZ.js";
17
17
  import {
18
18
  clearHashdCache,
19
19
  createHashdUrl,
@@ -8,7 +8,7 @@ import {
8
8
  useHashdImage,
9
9
  useHashdMedia,
10
10
  useHashdUrl
11
- } from "../chunk-PLWUCLI2.js";
11
+ } from "../chunk-TQKA66LZ.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.56",
3
+ "version": "1.0.57",
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",
@@ -59,27 +59,10 @@ export class StorageWebTransportClient {
59
59
 
60
60
  console.log('[WebTransport] Connecting to node:', url);
61
61
 
62
- // Extract certificate hash from multiaddr for self-signed cert verification
63
- const certHash = this.extractCertHash(this.nodeMultiaddr);
64
- if (!certHash) {
65
- return {
66
- success: false,
67
- error: 'No certificate hash in WebTransport multiaddr'
68
- };
69
- }
70
-
71
- // Convert base58 multihash to SHA-256 hash for serverCertificateHashes
72
- const sha256Hash = await this.certHashToSHA256(certHash);
73
-
74
- console.log('[WebTransport] Using certificate hash:', sha256Hash);
75
-
76
- // Create WebTransport connection with self-signed certificate support
77
- const transport = new WebTransport(url, {
78
- serverCertificateHashes: [{
79
- algorithm: 'sha-256',
80
- value: sha256Hash
81
- }]
82
- });
62
+ // Create WebTransport connection
63
+ // For localhost development with mkcert, the certificate is trusted by the system CA
64
+ // For production with proper SSL, no serverCertificateHashes needed
65
+ const transport = new WebTransport(url);
83
66
  await transport.ready;
84
67
 
85
68
  console.log('[WebTransport] Connected, opening bidirectional stream');