@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
|
|
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
|
|
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
package/dist/react/index.js
CHANGED
package/package.json
CHANGED
|
@@ -59,27 +59,10 @@ export class StorageWebTransportClient {
|
|
|
59
59
|
|
|
60
60
|
console.log('[WebTransport] Connecting to node:', url);
|
|
61
61
|
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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');
|