MCPcopy Create free account
hub / github.com/ProvableHQ/sdk / from_bits_le

Method from_bits_le

wasm/src/programs/data/ciphertext.rs:155–159  ·  view source on GitHub ↗
(bits: Array)

Source from the content-addressed store, hash-verified

153 /// @returns {Ciphertext} The ciphertext object.
154 #[wasm_bindgen(js_name = "fromBitsLe")]
155 pub fn from_bits_le(bits: Array) -> Result<Ciphertext, String> {
156 let rust_bits = from_js_typed_array!(bits, as_bool, "boolean")?;
157 let native = CiphertextNative::from_bits_le(&rust_bits).map_err(|e| e.to_string())?;
158 Ok(Ciphertext(native))
159 }
160
161 /// Get the left endian boolean array representation of the bits of the ciphertext.
162 #[wasm_bindgen(js_name = "toBitsLe")]

Callers

nothing calls this directly

Calls 2

CiphertextClass · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected