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

Method from_bytes_le

wasm/src/programs/data/plaintext.rs:112–116  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

110 /// @returns {Plaintext} The plaintext object.
111 #[wasm_bindgen(js_name = "fromBytesLe")]
112 pub fn from_bytes_le(bytes: Uint8Array) -> Result<Plaintext, String> {
113 let rust_bytes = bytes.to_vec();
114 let native = PlaintextNative::from_bytes_le(rust_bytes.as_slice()).map_err(|e| e.to_string())?;
115 Ok(Self(native))
116 }
117
118 /// Get the little endian byte array representation of the plaintext.
119 ///

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected