@dashevo/wasm-dpp 0.25.0-dev.13 → 0.25.0-dev.15
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.
- package/Cargo.toml +1 -1
- package/README.md +11 -6
- package/dist/wasm/wasm_dpp.d.ts +107 -91
- package/dist/wasm/wasm_dpp.js +1188 -1178
- package/dist/wasm/wasm_dpp_bg.js +1 -1
- package/lib/wasm/wasm_dpp.d.ts +107 -91
- package/package.json +3 -3
- package/scripts/build-wasm.sh +10 -3
- package/src/document/document_facade.rs +12 -0
- package/src/document/factory.rs +17 -0
- package/src/errors/consensus/basic/data_contract/data_contract_have_new_unique_index_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/data_contract_immutable_properties_update_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/data_contract_invalid_index_definition_update_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/data_contract_max_depth_exceed_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/data_contract_unique_indices_changed_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/duplicate_index_name_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/incompatible_data_contract_schema_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/incompatible_re2_pattern_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/duplicate_index_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/invalid_compound_index_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/invalid_index_property_type_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/invalid_indexed_property_constraint_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/system_property_index_already_present_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/undefined_index_property_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/index_error/unique_indices_limit_reached_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/invalid_data_contract_id_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/invalid_data_contract_version_error.rs +1 -0
- package/src/errors/consensus/basic/data_contract/invalid_json_schema_ref_error.rs +1 -0
- package/src/errors/consensus/basic/decode/protocol_version_parsing_error.rs +1 -0
- package/src/errors/consensus/basic/decode/serialized_object_parsing_error.rs +1 -0
- package/src/errors/consensus/basic/document/data_contract_not_present_error.rs +1 -0
- package/src/errors/consensus/basic/document/duplicate_document_transitions_with_ids_error.rs +1 -0
- package/src/errors/consensus/basic/document/duplicate_document_transitions_with_indices_error.rs +1 -0
- package/src/errors/consensus/basic/document/inconsistent_compound_index_data_error.rs +1 -0
- package/src/errors/consensus/basic/document/invalid_document_transition_action_error.rs +1 -0
- package/src/errors/consensus/basic/document/invalid_document_transition_id_error.rs +1 -0
- package/src/errors/consensus/basic/document/invalid_document_type_error.rs +1 -0
- package/src/errors/consensus/basic/document/missing_data_contract_id_error.rs +1 -0
- package/src/errors/consensus/basic/document/missing_document_transition_action_error.rs +1 -0
- package/src/errors/consensus/basic/document/missing_document_transition_type_error.rs +1 -0
- package/src/errors/consensus/basic/document/missing_document_type_error.rs +1 -0
- package/src/errors/consensus/basic/identity/duplicated_identity_public_key_error.rs +1 -0
- package/src/errors/consensus/basic/identity/duplicated_identity_public_key_id_error.rs +1 -0
- package/src/errors/consensus/basic/identity/identity_asset_lock_proof_locked_transaction_mismatch_error.rs +1 -0
- package/src/errors/consensus/basic/identity/identity_asset_lock_transaction_is_not_found_error.rs +1 -0
- package/src/errors/consensus/basic/identity/identity_asset_lock_transaction_out_point_already_exists_error.rs +1 -0
- package/src/errors/consensus/basic/identity/identity_asset_lock_transaction_output_not_found_error.rs +1 -0
- package/src/errors/consensus/basic/identity/identity_insufficient_balance_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_asset_lock_proof_core_chain_height_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_asset_lock_proof_transaction_height_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_asset_lock_transaction_output_return_size_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_asset_lock_transaction_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_asset_lock_transaction_output_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_credit_withdrawal_transition_core_fee_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_credit_withdrawal_transition_output_script_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_credit_withdrawal_transition_pooling_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_key_signature_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_public_key_data_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_public_key_security_level_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_identity_public_key_type_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_instant_asset_lock_proof_error.rs +1 -0
- package/src/errors/consensus/basic/identity/invalid_instant_asset_lock_proof_signature_error.rs +1 -0
- package/src/errors/consensus/basic/identity/missing_master_public_key_error.rs +1 -0
- package/src/errors/consensus/basic/identity/missing_public_key_error.rs +1 -0
- package/src/errors/consensus/basic/incompatible_protocol_version_error.rs +1 -0
- package/src/errors/consensus/basic/invalid_identifier_error.rs +1 -0
- package/src/errors/consensus/basic/invalid_signature_public_key_security_level_error.rs +1 -0
- package/src/errors/consensus/basic/invalid_state_transition_signature_error.rs +1 -0
- package/src/errors/consensus/basic/json_schema_compilation_error.rs +1 -0
- package/src/errors/consensus/basic/json_schema_error.rs +2 -2
- package/src/errors/consensus/basic/public_key_is_disabled_error.rs +1 -0
- package/src/errors/consensus/basic/public_key_security_level_not_met_error.rs +2 -2
- package/src/errors/consensus/basic/state_transition/invalid_state_transition_type_error.rs +1 -0
- package/src/errors/consensus/basic/state_transition/missing_state_transition_type_error.rs +1 -0
- package/src/errors/consensus/basic/state_transition/state_transition_max_size_exceeded_error.rs +1 -0
- package/src/errors/consensus/basic/unsupported_protocol_version_error.rs +1 -0
- package/src/errors/consensus/basic/wrong_public_key_purpose_error.rs +1 -0
- package/src/errors/consensus/deserialize.rs +1 -0
- package/src/errors/consensus/fee/balance_is_not_enough_error.rs +1 -0
- package/src/errors/consensus/signature/basic_bls_error.rs +1 -0
- package/src/errors/consensus/signature/basic_ecdsa_error.rs +1 -0
- package/src/errors/consensus/signature/identity_not_found_error.rs +1 -0
- package/src/errors/consensus/signature/signature_should_not_be_present_error.rs +1 -0
- package/src/errors/consensus/state/data_contract/data_contract_already_present_error.rs +1 -0
- package/src/errors/consensus/state/data_contract/data_trigger/data_trigger_condition_error.rs +1 -0
- package/src/errors/consensus/state/data_contract/data_trigger/data_trigger_execution_error.rs +1 -0
- package/src/errors/consensus/state/data_contract/data_trigger/data_trigger_invalid_result_error.rs +1 -0
- package/src/errors/consensus/state/document/document_already_present_error.rs +1 -0
- package/src/errors/consensus/state/document/document_not_found_error.rs +1 -0
- package/src/errors/consensus/state/document/document_owner_id_mismatch_error.rs +1 -0
- package/src/errors/consensus/state/document/document_timestamp_window_violation_error.rs +1 -0
- package/src/errors/consensus/state/document/document_timestamps_are_equal_error.rs +1 -0
- package/src/errors/consensus/state/document/document_timestamps_mismatch_error.rs +1 -0
- package/src/errors/consensus/state/document/duplicate_unique_index_error.rs +1 -0
- package/src/errors/consensus/state/document/invalid_document_revision_error.rs +1 -0
- package/src/errors/consensus/state/identity/duplicated_identity_public_key_id_state_error.rs +1 -0
- package/src/errors/consensus/state/identity/duplicated_identity_public_key_state_error.rs +1 -0
- package/src/errors/consensus/state/identity/identity_already_exists_error.rs +1 -0
- package/src/errors/consensus/state/identity/identity_public_key_disabled_at_window_violation_error.rs +1 -0
- package/src/errors/consensus/state/identity/identity_public_key_is_disabled_error.rs +1 -0
- package/src/errors/consensus/state/identity/identity_public_key_is_read_only_error.rs +1 -0
- package/src/errors/consensus/state/identity/invalid_identity_public_key_id_error.rs +1 -0
- package/src/errors/consensus/state/identity/invalid_identity_revision_error.rs +1 -0
- package/src/errors/consensus/state/identity/max_identity_public_key_limit_reached_error.rs +1 -0
- package/src/errors/consensus/value_error.rs +1 -0
- package/src/state_transition/errors/invalid_state_transition_error.rs +2 -4
- package/src/utils.rs +2 -1
- package/src/validation/validation_result.rs +1 -0
package/src/errors/consensus/state/data_contract/data_trigger/data_trigger_execution_error.rs
CHANGED
|
@@ -3,6 +3,7 @@ use dpp::consensus::codes::ErrorWithCode;
|
|
|
3
3
|
use dpp::consensus::state::data_trigger::data_trigger_execution_error::DataTriggerExecutionError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
5
|
use dpp::identifier::Identifier;
|
|
6
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
8
9
|
#[wasm_bindgen(js_name=DataTriggerExecutionError)]
|
package/src/errors/consensus/state/data_contract/data_trigger/data_trigger_invalid_result_error.rs
CHANGED
|
@@ -4,6 +4,7 @@ use dpp::consensus::codes::ErrorWithCode;
|
|
|
4
4
|
use dpp::consensus::state::data_trigger::data_trigger_invalid_result_error::DataTriggerInvalidResultError;
|
|
5
5
|
use dpp::consensus::ConsensusError;
|
|
6
6
|
use dpp::identifier::Identifier;
|
|
7
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
7
8
|
use wasm_bindgen::prelude::*;
|
|
8
9
|
|
|
9
10
|
#[wasm_bindgen(js_name=DataTriggerInvalidResultError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::document_already_present_error::DocumentAlreadyPresentError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DocumentAlreadyPresentError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::document_not_found_error::DocumentNotFoundError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DocumentNotFoundError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::document_owner_id_mismatch_error::DocumentOwnerIdMismatchError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DocumentOwnerIdMismatchError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::document_timestamp_window_violation_error::DocumentTimestampWindowViolationError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DocumentTimestampWindowViolationError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::document_timestamps_are_equal_error::DocumentTimestampsAreEqualError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DocumentTimestampsAreEqualError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::document_timestamps_mismatch_error::DocumentTimestampsMismatchError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DocumentTimestampsMismatchError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::document::duplicate_unique_index_error::DuplicateUniqueIndexError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use js_sys::JsString;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
@@ -3,6 +3,7 @@ use dpp::consensus::codes::ErrorWithCode;
|
|
|
3
3
|
use dpp::consensus::state::document::invalid_document_revision_error::InvalidDocumentRevisionError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
5
|
use dpp::prelude::Revision;
|
|
6
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
8
9
|
#[wasm_bindgen(js_name=InvalidDocumentRevisionError)]
|
package/src/errors/consensus/state/identity/duplicated_identity_public_key_id_state_error.rs
CHANGED
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::identity::duplicated_identity_public_key_id_state_error::DuplicatedIdentityPublicKeyIdStateError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DuplicatedIdentityPublicKeyIdStateError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::identity::duplicated_identity_public_key_state_error::DuplicatedIdentityPublicKeyStateError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=DuplicatedIdentityPublicKeyStateError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::identity::IdentityAlreadyExistsError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=IdentityAlreadyExistsError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::identity::identity_public_key_disabled_at_window_violation_error::IdentityPublicKeyDisabledAtWindowViolationError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=IdentityPublicKeyDisabledAtWindowViolationError)]
|
|
@@ -3,6 +3,7 @@ use dpp::consensus::codes::ErrorWithCode;
|
|
|
3
3
|
use dpp::consensus::state::identity::identity_public_key_is_disabled_error::IdentityPublicKeyIsDisabledError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
5
|
use dpp::identity::KeyID;
|
|
6
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
8
9
|
#[wasm_bindgen(js_name=IdentityPublicKeyIsDisabledError)]
|
|
@@ -3,6 +3,7 @@ use dpp::consensus::codes::ErrorWithCode;
|
|
|
3
3
|
use dpp::consensus::state::identity::identity_public_key_is_read_only_error::IdentityPublicKeyIsReadOnlyError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
5
|
use dpp::identity::KeyID;
|
|
6
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
8
9
|
#[wasm_bindgen(js_name=IdentityPublicKeyIsReadOnlyError)]
|
|
@@ -3,6 +3,7 @@ use dpp::consensus::codes::ErrorWithCode;
|
|
|
3
3
|
use dpp::consensus::state::identity::invalid_identity_public_key_id_error::InvalidIdentityPublicKeyIdError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
5
|
use dpp::identity::KeyID;
|
|
6
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
8
9
|
#[wasm_bindgen(js_name=InvalidIdentityPublicKeyIdError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::identity::invalid_identity_revision_error::InvalidIdentityRevisionError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use js_sys::Number;
|
|
6
7
|
use wasm_bindgen::prelude::*;
|
|
7
8
|
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::codes::ErrorWithCode;
|
|
3
3
|
use dpp::consensus::state::identity::max_identity_public_key_limit_reached_error::MaxIdentityPublicKeyLimitReachedError;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=MaxIdentityPublicKeyLimitReachedError)]
|
|
@@ -2,6 +2,7 @@ use crate::buffer::Buffer;
|
|
|
2
2
|
use dpp::consensus::basic::value_error::ValueError;
|
|
3
3
|
use dpp::consensus::codes::ErrorWithCode;
|
|
4
4
|
use dpp::consensus::ConsensusError;
|
|
5
|
+
use dpp::serialization_traits::PlatformSerializable;
|
|
5
6
|
use wasm_bindgen::prelude::*;
|
|
6
7
|
|
|
7
8
|
#[wasm_bindgen(js_name=ValueError, inspectable)]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
use dpp::consensus::ConsensusError;
|
|
2
2
|
use serde::Serialize;
|
|
3
|
-
|
|
4
3
|
use wasm_bindgen::{prelude::wasm_bindgen, JsError, JsValue};
|
|
5
4
|
|
|
6
5
|
use crate::{
|
|
@@ -53,9 +52,8 @@ impl InvalidStateTransitionErrorWasm {
|
|
|
53
52
|
let errors = serde_json::to_value(&self.errors)
|
|
54
53
|
.map_err(|_| JsError::new("Can't serialize consensus errors to json"))?;
|
|
55
54
|
let ser = serde_wasm_bindgen::Serializer::json_compatible();
|
|
56
|
-
|
|
55
|
+
errors
|
|
57
56
|
.serialize(&ser)
|
|
58
|
-
.map_err(|_| JsError::new("Can't serialize consensus errors to json"))
|
|
59
|
-
val
|
|
57
|
+
.map_err(|_| JsError::new("Can't serialize consensus errors to json"))
|
|
60
58
|
}
|
|
61
59
|
}
|
package/src/utils.rs
CHANGED
|
@@ -9,6 +9,7 @@ use dpp::{
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
use dpp::platform_value::Value;
|
|
12
|
+
use dpp::serialization_traits::PlatformDeserializable;
|
|
12
13
|
use js_sys::{Function, Uint8Array};
|
|
13
14
|
use serde::de::DeserializeOwned;
|
|
14
15
|
use serde_json::Value as JsonValue;
|
|
@@ -193,7 +194,7 @@ pub fn generic_of_js_val<T: RefFromWasmAbi<Abi = u32>>(
|
|
|
193
194
|
.name();
|
|
194
195
|
|
|
195
196
|
if ctor_name == class_name {
|
|
196
|
-
let ptr = js_sys::Reflect::get(js_value, &JsValue::from_str("
|
|
197
|
+
let ptr = js_sys::Reflect::get(js_value, &JsValue::from_str("__wbg_ptr"))?;
|
|
197
198
|
let ptr_u32: u32 = ptr
|
|
198
199
|
.as_f64()
|
|
199
200
|
.ok_or_else(|| JsValue::from(JsError::new("Invalid JS object pointer")))?
|
|
@@ -3,6 +3,7 @@ use crate::{
|
|
|
3
3
|
errors::consensus::consensus_error::from_consensus_error_ref,
|
|
4
4
|
utils::{consensus_errors_from_buffers, WithJsError},
|
|
5
5
|
};
|
|
6
|
+
use dpp::serialization_traits::PlatformDeserializable;
|
|
6
7
|
use dpp::{consensus::ConsensusError, validation::ConsensusValidationResult};
|
|
7
8
|
use js_sys::{JsString, Uint8Array};
|
|
8
9
|
use wasm_bindgen::prelude::*;
|