@dashevo/wasm-dpp 4.2.0-dev.2 → 4.2.0-dev.5
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/dist/wasm/wasm_dpp.d.ts +914 -888
- package/dist/wasm/wasm_dpp.js +36 -24
- package/dist/wasm/wasm_dpp_bg.js +1 -1
- package/lib/wasm/wasm_dpp.d.ts +914 -888
- package/package.json +2 -2
- package/src/document/state_transition/batch_transition/document_transition/mod.rs +9 -0
- package/src/errors/consensus/consensus_error.rs +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/wasm-dpp",
|
|
3
|
-
"version": "4.2.0-dev.
|
|
3
|
+
"version": "4.2.0-dev.5",
|
|
4
4
|
"description": "The JavaScript implementation of the Dash Platform Protocol",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/core": "^7.26.10",
|
|
45
45
|
"@babel/preset-env": "^7.26.9",
|
|
46
46
|
"@dashevo/dashcore-lib": "~0.22.0",
|
|
47
|
-
"@dashevo/dpns-contract": "4.2.0-dev.
|
|
47
|
+
"@dashevo/dpns-contract": "4.2.0-dev.5",
|
|
48
48
|
"@types/bs58": "^4.0.1",
|
|
49
49
|
"@types/node": "^20.10.0",
|
|
50
50
|
"@yarnpkg/pnpify": "^4.0.0-rc.42",
|
|
@@ -23,6 +23,7 @@ use dpp::state_transition::batch_transition::document_replace_transition::v0::v0
|
|
|
23
23
|
use dpp::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods;
|
|
24
24
|
use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods;
|
|
25
25
|
use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods;
|
|
26
|
+
use dpp::state_transition::batch_transition::batched_transition::document_index_only_delete_transition::v0::v0_methods::DocumentIndexOnlyDeleteTransitionV0Methods;
|
|
26
27
|
use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods;
|
|
27
28
|
use crate::{
|
|
28
29
|
buffer::Buffer,
|
|
@@ -67,6 +68,12 @@ impl DocumentTransitionWasm {
|
|
|
67
68
|
DocumentTransition::Transfer(_) => JsValue::null(),
|
|
68
69
|
DocumentTransition::UpdatePrice(_) => JsValue::null(),
|
|
69
70
|
DocumentTransition::Purchase(_) => JsValue::null(),
|
|
71
|
+
DocumentTransition::IndexOnlyDelete(index_only_delete) => {
|
|
72
|
+
let json_value = index_only_delete.data().to_json_value().unwrap();
|
|
73
|
+
json_value
|
|
74
|
+
.serialize(&serde_wasm_bindgen::Serializer::json_compatible())
|
|
75
|
+
.unwrap()
|
|
76
|
+
}
|
|
70
77
|
}
|
|
71
78
|
}
|
|
72
79
|
|
|
@@ -110,6 +117,7 @@ impl DocumentTransitionWasm {
|
|
|
110
117
|
DocumentTransition::Transfer(_) => None,
|
|
111
118
|
DocumentTransition::UpdatePrice(update_price) => Some(update_price.price()),
|
|
112
119
|
DocumentTransition::Purchase(purchase) => Some(purchase.price()),
|
|
120
|
+
DocumentTransition::IndexOnlyDelete(_) => None,
|
|
113
121
|
}
|
|
114
122
|
}
|
|
115
123
|
|
|
@@ -122,6 +130,7 @@ impl DocumentTransitionWasm {
|
|
|
122
130
|
DocumentTransition::Transfer(transfer) => Some(transfer.recipient_owner_id().into()),
|
|
123
131
|
DocumentTransition::UpdatePrice(_) => None,
|
|
124
132
|
DocumentTransition::Purchase(_) => None,
|
|
133
|
+
DocumentTransition::IndexOnlyDelete(_) => None,
|
|
125
134
|
}
|
|
126
135
|
}
|
|
127
136
|
|
|
@@ -95,6 +95,8 @@ use dpp::consensus::state::address_funds::{AddressDoesNotExistError, AddressInva
|
|
|
95
95
|
use dpp::consensus::state::document::referenced_document_type_deletable_error::ReferencedDocumentTypeDeletableError;
|
|
96
96
|
use dpp::consensus::state::document::referenced_identity_key_disabled_error::ReferencedIdentityKeyDisabledError;
|
|
97
97
|
use dpp::consensus::state::document::referenced_identity_key_not_found_error::ReferencedIdentityKeyNotFoundError;
|
|
98
|
+
use dpp::consensus::state::document::referenced_document_property_agreement_invalid_error::ReferencedDocumentPropertyAgreementInvalidError;
|
|
99
|
+
use dpp::consensus::state::document::referenced_document_property_mismatch_error::ReferencedDocumentPropertyMismatchError;
|
|
98
100
|
use dpp::consensus::state::document::referenced_key_id_property_invalid_error::ReferencedKeyIdPropertyInvalidError;
|
|
99
101
|
use dpp::consensus::state::document::referenced_document_type_not_found_error::ReferencedDocumentTypeNotFoundError;
|
|
100
102
|
use dpp::consensus::state::shielded::insufficient_pool_notes_error::InsufficientPoolNotesError;
|
|
@@ -495,6 +497,12 @@ pub fn from_state_error(state_error: &StateError) -> JsValue {
|
|
|
495
497
|
StateError::ReferencedKeyIdPropertyInvalidError(e) => {
|
|
496
498
|
generic_consensus_error!(ReferencedKeyIdPropertyInvalidError, e).into()
|
|
497
499
|
}
|
|
500
|
+
StateError::ReferencedDocumentPropertyAgreementInvalidError(e) => {
|
|
501
|
+
generic_consensus_error!(ReferencedDocumentPropertyAgreementInvalidError, e).into()
|
|
502
|
+
}
|
|
503
|
+
StateError::ReferencedDocumentPropertyMismatchError(e) => {
|
|
504
|
+
generic_consensus_error!(ReferencedDocumentPropertyMismatchError, e).into()
|
|
505
|
+
}
|
|
498
506
|
}
|
|
499
507
|
}
|
|
500
508
|
|