Docs & wasm

This commit is contained in:
Alex Emmet 2026-06-25 12:28:14 +02:00
commit be4b76dcd5
7 changed files with 953 additions and 6 deletions

View file

@ -90,7 +90,7 @@ impl WasmClient {
#[wasm_bindgen]
pub async fn connect(&mut self, config: &ConnectionConfig) -> Result<(), JsValue> {
self.set_state(ConnectionState::Connecting);
let transport = WasmTransport::connect(&config.url).await?;
let transport = WasmTransport::connect(&config.url, config.server_certificate_hashes.clone()).await?;
let inner = transport.inner().clone();
let version_str = format!("{}", PROTOCOL_VERSION);
@ -157,7 +157,7 @@ impl WasmClient {
.add_typed_default(DataType::Signature, DataValue::Bytes(signature))
.to_bytes();
let transport = WasmTransport::connect(&config.url).await?;
let transport = WasmTransport::connect(&config.url, config.server_certificate_hashes.clone()).await?;
let inner = transport.inner().clone();
transport.send_frame(&frame).await?;
@ -249,7 +249,7 @@ impl WasmClient {
.add_typed_default(DataType::Signature, DataValue::Bytes(signature))
.to_bytes();
let transport = WasmTransport::connect(&config.url).await?;
let transport = WasmTransport::connect(&config.url, config.server_certificate_hashes.clone()).await?;
let inner = transport.inner().clone();
transport.send_frame(&frame).await?;