(fields: Array)
| 204 | /// @returns {Plaintext} The plaintext object. |
| 205 | #[wasm_bindgen(js_name = "fromFields")] |
| 206 | pub fn from_fields(fields: Array) -> Result<Plaintext, String> { |
| 207 | let native_fields = from_wasm_field_array!(fields, Field)?; |
| 208 | let native = PlaintextNative::from_fields(&native_fields).map_err(|e| e.to_string())?; |
| 209 | Ok(Self(native)) |
| 210 | } |
| 211 | |
| 212 | /// Get the field array representation of the plaintext. |
| 213 | /// |