@dashevo/wasm-dpp 4.1.1 → 4.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/Cargo.toml +2 -2
  2. package/dist/wasm/wasm_dpp.d.ts +1553 -1065
  3. package/dist/wasm/wasm_dpp.js +290 -66
  4. package/dist/wasm/wasm_dpp_bg.js +1 -1
  5. package/lib/wasm/wasm_dpp.d.ts +1553 -1065
  6. package/package.json +2 -2
  7. package/src/data_contract/state_transition/data_contract_create_transition/mod.rs +3 -2
  8. package/src/data_contract/state_transition/data_contract_update_transition/mod.rs +3 -2
  9. package/src/document/factory.rs +1 -1
  10. package/src/document/state_transition/batch_transition/document_transition/mod.rs +9 -0
  11. package/src/errors/consensus/basic/identity/contract_group_bound_key_not_allowed_in_shielded_identity_creation_error.rs +36 -0
  12. package/src/errors/consensus/basic/identity/mod.rs +2 -0
  13. package/src/errors/consensus/consensus_error.rs +158 -2
  14. package/src/errors/consensus/deserialize.rs +2 -2
  15. package/src/errors/consensus/signature/contract_bounded_key_non_batch_error.rs +29 -0
  16. package/src/errors/consensus/signature/contract_bounded_key_out_of_bounds_error.rs +29 -0
  17. package/src/errors/consensus/signature/mod.rs +6 -0
  18. package/src/errors/consensus/state/document/mod.rs +2 -0
  19. package/src/errors/consensus/state/document/referenced_entity_not_found_error.rs +44 -0
  20. package/src/identity/identity.rs +3 -2
  21. package/src/identity/identity_public_key/mod.rs +3 -2
  22. package/src/identity/mod.rs +1 -1
  23. package/src/lib.rs +4 -0
  24. package/src/state_transition/state_transition_factory.rs +6 -1
  25. package/src/utils.rs +2 -2
  26. package/src/validation/validation_result.rs +0 -8
package/src/utils.rs CHANGED
@@ -5,7 +5,7 @@ use anyhow::{anyhow, bail, Context};
5
5
  use dpp::{consensus::ConsensusError, ProtocolError};
6
6
 
7
7
  use dpp::platform_value::Value;
8
- use dpp::serialization::PlatformDeserializable;
8
+ use dpp::serialization::PlatformDeserializableUntrusted;
9
9
  use js_sys::{Function, Uint8Array};
10
10
  use serde::de::DeserializeOwned;
11
11
  use serde_json::Value as JsonValue;
@@ -355,7 +355,7 @@ pub(crate) fn consensus_errors_from_buffers(
355
355
  .to_vec()
356
356
  })
357
357
  .map(|error_bytes| {
358
- ConsensusError::deserialize_from_bytes(&error_bytes.to_vec()).with_js_error()
358
+ ConsensusError::deserialize_from_bytes_untrusted(&error_bytes.to_vec()).with_js_error()
359
359
  })
360
360
  .collect::<Result<Vec<ConsensusError>, JsValue>>()
361
361
  }
@@ -4,7 +4,6 @@ use crate::{
4
4
  };
5
5
 
6
6
  use dpp::{consensus::ConsensusError, validation::ConsensusValidationResult};
7
- use js_sys::JsString;
8
7
  use wasm_bindgen::prelude::*;
9
8
 
10
9
  #[wasm_bindgen(js_name=ValidationResult)]
@@ -35,13 +34,6 @@ impl ValidationResultWasm {
35
34
  Ok(Self(ConsensusValidationResult::new_with_errors(vec![])))
36
35
  }
37
36
 
38
- /// This is just a test method - doesn't need to be in the resulted binding. Please
39
- /// remove before shipping
40
- #[wasm_bindgen(js_name=errorsText)]
41
- pub fn errors_text(&self) -> Vec<JsString> {
42
- self.0.errors.iter().map(|e| e.to_string().into()).collect()
43
- }
44
-
45
37
  #[wasm_bindgen(js_name=isValid)]
46
38
  pub fn is_valid(&self) -> bool {
47
39
  self.0.is_valid()