Skip to content

Commit

Permalink
feat(js-sdk): getIdentityContractNonce() to document transition main …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
pshenmic committed Jan 2, 2025
1 parent e21ae53 commit 2c94941
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 2c94941

Please sign in to comment.