(fields: Array)
| 171 | /// @returns {Ciphertext} The ciphertext object. |
| 172 | #[wasm_bindgen(js_name = "fromFields")] |
| 173 | pub fn from_fields(fields: Array) -> Result<Ciphertext, String> { |
| 174 | let native_fields = from_wasm_field_array!(fields, Field)?; |
| 175 | let native = CiphertextNative::from_fields(&native_fields).map_err(|e| e.to_string())?; |
| 176 | Ok(Self(native)) |
| 177 | } |
| 178 | |
| 179 | /// Get the field array representation of the ciphertext. |
| 180 | #[wasm_bindgen(js_name = "toFields")] |