diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs index 9b37d79d34..c29852e78a 100644 --- a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs +++ b/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs @@ -18,6 +18,7 @@ use serde::Serialize; use serde_json::Value as JsonValue; use wasm_bindgen::prelude::*; use dpp::platform_value::converter::serde_json::BTreeValueJsonConverter; +use dpp::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; use dpp::state_transition::documents_batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; use crate::{ @@ -79,6 +80,11 @@ impl DocumentTransitionWasm { Ok(()) } + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_contract_nonce(&self) -> JsValue { + match self.0.base() { DocumentBaseTransition::V0(v0) => JsValue::from(v0.identity_contract_nonce) } + } + #[wasm_bindgen(js_name=getRevision)] pub fn get_revision(&self) -> JsValue { if let Some(revision) = self.0.revision() {