smoldot 2.0.7 → 2.0.9

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.
@@ -120,7 +120,6 @@ export interface ConnectionConfig {
120
120
  onMultistreamHandshakeInfo: (info: {
121
121
  handshake: 'webrtc';
122
122
  localTlsCertificateSha256: Uint8Array;
123
- remoteTlsCertificateSha256: Uint8Array;
124
123
  }) => void;
125
124
  /**
126
125
  * Callback called when the connection transitions to the `Reset` state.
@@ -106,7 +106,6 @@ export interface Instance {
106
106
  connectionMultiStreamSetHandshakeInfo: (connectionId: number, info: {
107
107
  handshake: 'webrtc';
108
108
  localTlsCertificateSha256: Uint8Array;
109
- remoteTlsCertificateSha256: Uint8Array;
110
109
  }) => void;
111
110
  connectionReset: (connectionId: number, message: string) => void;
112
111
  streamWritableBytes: (connectionId: number, numExtra: number, streamId?: number) => void;
@@ -407,10 +407,9 @@ function startLocalInstance(config, wasmModule, eventCallback) {
407
407
  connectionMultiStreamSetHandshakeInfo: (connectionId, info) => {
408
408
  if (!state.instance)
409
409
  return;
410
- const handshakeTy = new Uint8Array(1 + info.localTlsCertificateSha256.length + info.remoteTlsCertificateSha256.length);
410
+ const handshakeTy = new Uint8Array(1 + info.localTlsCertificateSha256.length);
411
411
  buffer.writeUInt8(handshakeTy, 0, 0);
412
412
  handshakeTy.set(info.localTlsCertificateSha256, 1);
413
- handshakeTy.set(info.remoteTlsCertificateSha256, 1 + info.localTlsCertificateSha256.length);
414
413
  state.bufferIndices[0] = handshakeTy;
415
414
  state.instance.exports.connection_multi_stream_set_handshake_info(connectionId, 0);
416
415
  delete state.bufferIndices[0];
@@ -382,7 +382,6 @@ function connect(config) {
382
382
  config.onMultistreamHandshakeInfo({
383
383
  handshake: 'webrtc',
384
384
  localTlsCertificateSha256,
385
- remoteTlsCertificateSha256,
386
385
  });
387
386
  }));
388
387
  return {