@dashevo/wasm-dpp 4.2.0-beta.1 → 4.2.0-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/wasm-dpp",
3
- "version": "4.2.0-beta.1",
3
+ "version": "4.2.0-beta.3",
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-beta.1",
47
+ "@dashevo/dpns-contract": "4.2.0-beta.3",
48
48
  "@types/bs58": "^4.0.1",
49
49
  "@types/node": "^20.10.0",
50
50
  "@yarnpkg/pnpify": "^4.0.0-rc.42",
@@ -25,6 +25,7 @@ impl TokenClaimTransitionWasm {
25
25
  match self.0.distribution_type() {
26
26
  TokenDistributionType::PreProgrammed => 0,
27
27
  TokenDistributionType::Perpetual => 1,
28
+ TokenDistributionType::OncePerIdentity => 2,
28
29
  }
29
30
  }
30
31
  }
@@ -66,12 +66,12 @@ use dpp::consensus::state::data_trigger::DataTriggerError::{
66
66
  DataTriggerConditionError, DataTriggerExecutionError, DataTriggerInvalidResultError,
67
67
  };
68
68
  use wasm_bindgen::{JsError, JsValue};
69
- use dpp::consensus::basic::data_contract::{ContestedUniqueIndexOnMutableDocumentTypeError, DataContractInvalidRequiredFieldsUpdateError, ContestedUniqueIndexWithUniqueIndexError, DataContractTokenConfigurationUpdateError, DecimalsOverLimitError, DuplicateKeywordsError, GroupExceedsMaxMembersError, GroupHasTooFewMembersError, GroupMemberHasPowerOfZeroError, GroupMemberHasPowerOverLimitError, GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, GroupPositionDoesNotExistError, GroupRequiredPowerIsInvalidError, GroupTotalPowerLessThanRequiredError, InvalidDescriptionLengthError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidKeywordCharacterError, InvalidKeywordLengthError, InvalidTokenBaseSupplyError, InvalidTokenDistributionFunctionDivideByZeroError, InvalidTokenDistributionFunctionIncoherenceError, InvalidTokenDistributionFunctionInvalidParameterError, InvalidTokenDistributionFunctionInvalidParameterTupleError, InvalidTokenLanguageCodeError, InvalidTokenNameCharacterError, InvalidTokenNameLengthError, MainGroupIsNotDefinedError, NewTokensDestinationIdentityOptionRequiredError, NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, RedundantDocumentPaidForByTokenWithContractId, TokenPaymentByBurningOnlyAllowedOnInternalTokenError, TooManyKeywordsError, UnknownDocumentActionTokenEffectError, UnknownDocumentCreationRestrictionModeError, UnknownGasFeesPaidByError, UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError};
69
+ use dpp::consensus::basic::data_contract::{ContestedUniqueIndexOnMutableDocumentTypeError, DataContractInvalidRequiredFieldsUpdateError, ContestedUniqueIndexWithUniqueIndexError, DataContractTokenConfigurationUpdateError, DecimalsOverLimitError, DuplicateKeywordsError, GroupExceedsMaxMembersError, GroupHasTooFewMembersError, GroupMemberHasPowerOfZeroError, GroupMemberHasPowerOverLimitError, GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, GroupPositionDoesNotExistError, GroupRequiredPowerIsInvalidError, GroupTotalPowerLessThanRequiredError, InvalidDescriptionLengthError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidKeywordCharacterError, InvalidKeywordLengthError, InvalidTokenBaseSupplyError, InvalidTokenDistributionFunctionDivideByZeroError, InvalidTokenDistributionFunctionIncoherenceError, InvalidTokenDistributionFunctionInvalidParameterError, InvalidTokenDistributionFunctionInvalidParameterTupleError, InvalidTokenLanguageCodeError, InvalidTokenNameCharacterError, InvalidTokenNameLengthError, MainGroupIsNotDefinedError, NewTokensDestinationIdentityOptionRequiredError, NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, PreProgrammedDistributionAmountOverLimitError, RedundantDocumentPaidForByTokenWithContractId, TokenPaymentByBurningOnlyAllowedOnInternalTokenError, TooManyKeywordsError, UnknownDocumentActionTokenEffectError, UnknownDocumentCreationRestrictionModeError, UnknownGasFeesPaidByError, UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError};
70
70
  use dpp::consensus::basic::document::{ContestedDocumentsTemporarilyNotAllowedError, DocumentCreationNotAllowedError, DocumentFieldMaxSizeExceededError, MaxDocumentsTransitionsExceededError, MissingPositionsInDocumentTypePropertiesError};
71
71
  use dpp::consensus::basic::group::GroupActionNotAllowedOnTransitionError;
72
72
  use dpp::consensus::basic::identity::{DataContractBoundsNotPresentError, DisablingKeyIdAlsoBeingAddedInSameTransitionError, InvalidIdentityCreditWithdrawalTransitionAmountError, InvalidIdentityUpdateTransitionDisableKeysError, InvalidIdentityUpdateTransitionEmptyError, InvalidKeyPurposeForContractBoundsError, TooManyMasterPublicKeyError, WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError};
73
73
  use dpp::consensus::basic::overflow_error::OverflowError;
74
- use dpp::consensus::basic::token::{ChoosingTokenMintRecipientNotAllowedError, ContractHasNoTokensError, DestinationIdentityForTokenMintingNotSetError, InvalidActionIdError, InvalidTokenAmountError, InvalidTokenConfigUpdateNoChangeError, InvalidTokenIdError, InvalidTokenNoteTooBigError, InvalidTokenPositionError, MissingDefaultLocalizationError, TokenNoteOnlyAllowedWhenProposerError, TokenPricingScheduleEmptyError, TokenTransferToOurselfError, InvalidTokenDistributionTimeIntervalNotMinuteAlignedError, InvalidTokenDistributionTimeIntervalTooShortError, InvalidTokenDistributionBlockIntervalTooShortError, InvalidTokenDistributionEpochIntervalTooShortError};
74
+ use dpp::consensus::basic::token::{ChoosingTokenMintRecipientNotAllowedError, ContractHasNoTokensError, DestinationIdentityForTokenMintingNotSetError, InvalidActionIdError, InvalidTokenAmountError, InvalidTokenConfigUpdateNoChangeError, InvalidTokenIdError, InvalidTokenNoteTooBigError, InvalidTokenPositionError, MissingDefaultLocalizationError, TokenNoteOnlyAllowedWhenProposerError, TokenPricingScheduleEmptyError, TokenTransferToOurselfError, InvalidTokenDistributionTimeIntervalNotMinuteAlignedError, InvalidTokenDistributionTimeIntervalTooShortError, InvalidTokenDistributionBlockIntervalTooShortError, InvalidTokenDistributionEpochIntervalTooShortError, InvalidTokenOncePerIdentityDistributionAmountError};
75
75
  use dpp::consensus::state::data_contract::data_contract_not_found_error::DataContractNotFoundError;
76
76
  use dpp::consensus::state::data_contract::data_contract_update_action_not_allowed_error::DataContractUpdateActionNotAllowedError;
77
77
  use dpp::consensus::state::data_contract::document_type_update_error::DocumentTypeUpdateError;
@@ -90,6 +90,23 @@ use dpp::consensus::basic::contract_group::{
90
90
  InvalidContractGroupDescriptionLengthError, InvalidContractGroupNameLengthError,
91
91
  InvalidContractGroupAdminsError, RedundantContractGroupMembershipError,
92
92
  };
93
+ use dpp::consensus::basic::contract_moderation::{
94
+ ContractModerationReasonTooLongError, ContractModerationSelfTargetError,
95
+ DocumentActionFeesWithoutModerationError,
96
+ InvalidContractModerationConfigError,
97
+ };
98
+ use dpp::consensus::state::contract_moderation::{
99
+ ContractFeeClaimNotAllowedError, ContractFeesAlreadyClaimedThisEpochError,
100
+ ContractFeesNothingToClaimError,
101
+ ContractModerationNotEnabledError, ContractModerationTargetNotAllowedError,
102
+ ContractModerationCounterpartyBarredError, ContractModerationTargetNotFoundError,
103
+ ContractModeratorIdentityNotFoundError,
104
+ ContractSuspensionNotInFutureError,
105
+ ContractUserAlreadyBannedError, ContractUserBannedError, ContractUserNotBannedError,
106
+ ContractUserNotSuspendedError, ContractUserSuspendedError,
107
+ DocumentModerationWindowElapsedError, DocumentTypeNotDeletableByModeratorsError,
108
+ IdentityNotContractModeratorError,
109
+ };
93
110
  use dpp::consensus::state::contract_group::{
94
111
  ContractGroupAdminNotFoundError, ContractGroupAlreadyExistsError, ContractGroupNotFoundError,
95
112
  IdentityNotContractGroupOwnerOrAdminError,
@@ -98,12 +115,17 @@ use dpp::consensus::state::group::{GroupActionAlreadyCompletedError, GroupAction
98
115
  use dpp::consensus::state::identity::identity_for_token_configuration_not_found_error::IdentityInTokenConfigurationNotFoundError;
99
116
  use dpp::consensus::state::identity::identity_public_key_already_exists_for_unique_contract_bounds_error::IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError;
100
117
  use dpp::consensus::basic::identity::{
101
- IdentityPublicKeyLimitsNotAllowedError,
118
+ IdentityKeyLimitsUpdateEmptyError, IdentityPublicKeyLimitsNotAllowedError,
102
119
  IdentityPublicKeyLimitsNotAllowedInShieldedIdentityCreationError,
103
120
  InvalidIdentityPublicKeyBudgetError,
104
121
  };
105
- use dpp::consensus::signature::{PublicKeyBudgetExhaustedError, PublicKeyExpiredError};
122
+ use dpp::consensus::signature::{
123
+ PublicKeyBudgetExhaustedError, PublicKeyExpiredError,
124
+ PublicKeyWithLimitsCannotUpdateKeyLimitsError,
125
+ };
106
126
  use dpp::consensus::state::identity::identity_public_key_already_expired_error::IdentityPublicKeyAlreadyExpiredError;
127
+ use dpp::consensus::state::identity::identity_public_key_limit_not_raised_error::IdentityPublicKeyLimitNotRaisedError;
128
+ use dpp::consensus::state::identity::identity_public_key_limit_not_set_error::IdentityPublicKeyLimitNotSetError;
107
129
  use dpp::consensus::state::identity::identity_public_key_budget_exceeded_error::IdentityPublicKeyBudgetExceededError;
108
130
  use dpp::consensus::state::identity::identity_to_freeze_does_not_exist_error::IdentityToFreezeDoesNotExistError;
109
131
  use dpp::consensus::state::identity::master_public_key_update_error::MasterPublicKeyUpdateError;
@@ -112,13 +134,20 @@ use dpp::consensus::state::identity::no_transfer_key_for_core_withdrawal_availab
112
134
  use dpp::consensus::state::identity::RecipientIdentityDoesNotExistError;
113
135
  use dpp::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_insufficient_error::PrefundedSpecializedBalanceInsufficientError;
114
136
  use dpp::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_not_found_error::PrefundedSpecializedBalanceNotFoundError;
115
- use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountNotFrozenError, IdentityTokenAccountFrozenError, TokenIsPausedError, IdentityTokenAccountAlreadyFrozenError, UnauthorizedTokenActionError, TokenSettingMaxSupplyToLessThanCurrentSupplyError, TokenMintPastMaxSupplyError, NewTokensDestinationIdentityDoesNotExistError, NewAuthorizedActionTakerIdentityDoesNotExistError, NewAuthorizedActionTakerGroupDoesNotExistError, NewAuthorizedActionTakerMainGroupNotSetError, InvalidGroupPositionError, TokenAlreadyPausedError, TokenNotPausedError, InvalidTokenClaimPropertyMismatch, InvalidTokenClaimNoCurrentRewards, InvalidTokenClaimWrongClaimant, TokenTransferRecipientIdentityNotExistError, PreProgrammedDistributionTimestampInPastError, IdentityHasNotAgreedToPayRequiredTokenAmountError, RequiredTokenPaymentInfoNotSetError, IdentityTryingToPayWithWrongTokenError, TokenDirectPurchaseUserPriceTooLow, TokenAmountUnderMinimumSaleAmount, TokenNotForDirectSale, InvalidTokenPositionStateError};
137
+ use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountNotFrozenError, IdentityTokenAccountFrozenError, TokenIsPausedError, IdentityTokenAccountAlreadyFrozenError, UnauthorizedTokenActionError, TokenSettingMaxSupplyToLessThanCurrentSupplyError, TokenMintPastMaxSupplyError, NewTokensDestinationIdentityDoesNotExistError, NewAuthorizedActionTakerIdentityDoesNotExistError, NewAuthorizedActionTakerGroupDoesNotExistError, NewAuthorizedActionTakerMainGroupNotSetError, InvalidGroupPositionError, TokenAlreadyPausedError, TokenNotPausedError, InvalidTokenClaimPropertyMismatch, InvalidTokenClaimNoCurrentRewards, InvalidTokenClaimWrongClaimant, TokenTransferRecipientIdentityNotExistError, PreProgrammedDistributionTimestampInPastError, IdentityHasNotAgreedToPayRequiredTokenAmountError, RequiredTokenPaymentInfoNotSetError, IdentityTryingToPayWithWrongTokenError, TokenDirectPurchaseUserPriceTooLow, TokenAmountUnderMinimumSaleAmount, TokenNotForDirectSale, InvalidTokenPositionStateError, TokenOncePerIdentityDistributionAlreadyClaimedError};
116
138
  use dpp::consensus::state::address_funds::{AddressDoesNotExistError, AddressInvalidNonceError, AddressNotEnoughFundsError, AddressesNotEnoughFundsError};
117
139
  use dpp::consensus::state::document::referenced_document_type_deletable_error::ReferencedDocumentTypeDeletableError;
140
+ use dpp::consensus::state::document::referenced_document_type_not_deletable_error::ReferencedDocumentTypeNotDeletableError;
118
141
  use dpp::consensus::state::document::referenced_identity_key_disabled_error::ReferencedIdentityKeyDisabledError;
119
142
  use dpp::consensus::state::document::referenced_identity_key_not_found_error::ReferencedIdentityKeyNotFoundError;
120
143
  use dpp::consensus::state::document::referenced_document_property_agreement_invalid_error::ReferencedDocumentPropertyAgreementInvalidError;
121
144
  use dpp::consensus::state::document::referenced_document_property_mismatch_error::ReferencedDocumentPropertyMismatchError;
145
+ use dpp::consensus::state::document::document_immutable_property_changed_error::DocumentImmutablePropertyChangedError;
146
+ use dpp::consensus::state::identity::gas_sponsor_insufficient_balance_error::GasSponsorInsufficientBalanceError;
147
+ use dpp::consensus::state::token::{GasFeesPaidByNotAllowedError, InconsistentGasFeesPaidByInBatchError};
148
+ use dpp::consensus::state::document::document_action_fee_agreement_mismatch_error::DocumentActionFeeAgreementMismatchError;
149
+ use dpp::consensus::state::document::document_action_fee_agreement_not_set_error::DocumentActionFeeAgreementNotSetError;
150
+ use dpp::consensus::state::document::document_action_fee_multiplier_not_tolerated_error::DocumentActionFeeMultiplierNotToleratedError;
122
151
  use dpp::consensus::state::document::referenced_key_id_property_invalid_error::ReferencedKeyIdPropertyInvalidError;
123
152
  use dpp::consensus::state::document::referenced_document_type_not_found_error::ReferencedDocumentTypeNotFoundError;
124
153
  use dpp::consensus::state::shielded::insufficient_pool_notes_error::InsufficientPoolNotesError;
@@ -543,6 +572,90 @@ pub fn from_state_error(state_error: &StateError) -> JsValue {
543
572
  StateError::IdentityPublicKeyAlreadyExpiredError(e) => {
544
573
  generic_consensus_error!(IdentityPublicKeyAlreadyExpiredError, e).into()
545
574
  }
575
+ StateError::IdentityPublicKeyLimitNotSetError(e) => {
576
+ generic_consensus_error!(IdentityPublicKeyLimitNotSetError, e).into()
577
+ }
578
+ StateError::IdentityPublicKeyLimitNotRaisedError(e) => {
579
+ generic_consensus_error!(IdentityPublicKeyLimitNotRaisedError, e).into()
580
+ }
581
+ StateError::DocumentImmutablePropertyChangedError(e) => {
582
+ generic_consensus_error!(DocumentImmutablePropertyChangedError, e).into()
583
+ }
584
+ StateError::TokenOncePerIdentityDistributionAlreadyClaimedError(e) => {
585
+ generic_consensus_error!(TokenOncePerIdentityDistributionAlreadyClaimedError, e).into()
586
+ }
587
+ StateError::GasFeesPaidByNotAllowedError(e) => {
588
+ generic_consensus_error!(GasFeesPaidByNotAllowedError, e).into()
589
+ }
590
+ StateError::InconsistentGasFeesPaidByInBatchError(e) => {
591
+ generic_consensus_error!(InconsistentGasFeesPaidByInBatchError, e).into()
592
+ }
593
+ StateError::DocumentActionFeeAgreementNotSetError(e) => {
594
+ generic_consensus_error!(DocumentActionFeeAgreementNotSetError, e).into()
595
+ }
596
+ StateError::DocumentActionFeeAgreementMismatchError(e) => {
597
+ generic_consensus_error!(DocumentActionFeeAgreementMismatchError, e).into()
598
+ }
599
+ StateError::DocumentActionFeeMultiplierNotToleratedError(e) => {
600
+ generic_consensus_error!(DocumentActionFeeMultiplierNotToleratedError, e).into()
601
+ }
602
+ StateError::GasSponsorInsufficientBalanceError(e) => {
603
+ generic_consensus_error!(GasSponsorInsufficientBalanceError, e).into()
604
+ }
605
+ StateError::ContractModerationNotEnabledError(e) => {
606
+ generic_consensus_error!(ContractModerationNotEnabledError, e).into()
607
+ }
608
+ StateError::IdentityNotContractModeratorError(e) => {
609
+ generic_consensus_error!(IdentityNotContractModeratorError, e).into()
610
+ }
611
+ StateError::ContractModerationTargetNotAllowedError(e) => {
612
+ generic_consensus_error!(ContractModerationTargetNotAllowedError, e).into()
613
+ }
614
+ StateError::ContractUserAlreadyBannedError(e) => {
615
+ generic_consensus_error!(ContractUserAlreadyBannedError, e).into()
616
+ }
617
+ StateError::ContractUserNotBannedError(e) => {
618
+ generic_consensus_error!(ContractUserNotBannedError, e).into()
619
+ }
620
+ StateError::ContractUserNotSuspendedError(e) => {
621
+ generic_consensus_error!(ContractUserNotSuspendedError, e).into()
622
+ }
623
+ StateError::ContractSuspensionNotInFutureError(e) => {
624
+ generic_consensus_error!(ContractSuspensionNotInFutureError, e).into()
625
+ }
626
+ StateError::ContractUserBannedError(e) => {
627
+ generic_consensus_error!(ContractUserBannedError, e).into()
628
+ }
629
+ StateError::ContractUserSuspendedError(e) => {
630
+ generic_consensus_error!(ContractUserSuspendedError, e).into()
631
+ }
632
+ StateError::ContractModerationTargetNotFoundError(e) => {
633
+ generic_consensus_error!(ContractModerationTargetNotFoundError, e).into()
634
+ }
635
+ StateError::ContractModeratorIdentityNotFoundError(e) => {
636
+ generic_consensus_error!(ContractModeratorIdentityNotFoundError, e).into()
637
+ }
638
+ StateError::ContractModerationCounterpartyBarredError(e) => {
639
+ generic_consensus_error!(ContractModerationCounterpartyBarredError, e).into()
640
+ }
641
+ StateError::ContractFeesAlreadyClaimedThisEpochError(e) => {
642
+ generic_consensus_error!(ContractFeesAlreadyClaimedThisEpochError, e).into()
643
+ }
644
+ StateError::ContractFeesNothingToClaimError(e) => {
645
+ generic_consensus_error!(ContractFeesNothingToClaimError, e).into()
646
+ }
647
+ StateError::ContractFeeClaimNotAllowedError(e) => {
648
+ generic_consensus_error!(ContractFeeClaimNotAllowedError, e).into()
649
+ }
650
+ StateError::ReferencedDocumentTypeNotDeletableError(e) => {
651
+ generic_consensus_error!(ReferencedDocumentTypeNotDeletableError, e).into()
652
+ }
653
+ StateError::DocumentTypeNotDeletableByModeratorsError(e) => {
654
+ generic_consensus_error!(DocumentTypeNotDeletableByModeratorsError, e).into()
655
+ }
656
+ StateError::DocumentModerationWindowElapsedError(e) => {
657
+ generic_consensus_error!(DocumentModerationWindowElapsedError, e).into()
658
+ }
546
659
  }
547
660
  }
548
661
 
@@ -963,6 +1076,9 @@ fn from_basic_error(basic_error: &BasicError) -> JsValue {
963
1076
  BasicError::InvalidTokenDistributionEpochIntervalTooShortError(e) => {
964
1077
  generic_consensus_error!(InvalidTokenDistributionEpochIntervalTooShortError, e).into()
965
1078
  }
1079
+ BasicError::InvalidTokenOncePerIdentityDistributionAmountError(e) => {
1080
+ generic_consensus_error!(InvalidTokenOncePerIdentityDistributionAmountError, e).into()
1081
+ }
966
1082
  BasicError::RedundantDocumentPaidForByTokenWithContractId(e) => {
967
1083
  generic_consensus_error!(RedundantDocumentPaidForByTokenWithContractId, e).into()
968
1084
  }
@@ -1096,6 +1212,24 @@ fn from_basic_error(basic_error: &BasicError) -> JsValue {
1096
1212
  )
1097
1213
  .into()
1098
1214
  }
1215
+ BasicError::IdentityKeyLimitsUpdateEmptyError(e) => {
1216
+ generic_consensus_error!(IdentityKeyLimitsUpdateEmptyError, e).into()
1217
+ }
1218
+ BasicError::PreProgrammedDistributionAmountOverLimitError(e) => {
1219
+ generic_consensus_error!(PreProgrammedDistributionAmountOverLimitError, e).into()
1220
+ }
1221
+ BasicError::InvalidContractModerationConfigError(e) => {
1222
+ generic_consensus_error!(InvalidContractModerationConfigError, e).into()
1223
+ }
1224
+ BasicError::ContractModerationSelfTargetError(e) => {
1225
+ generic_consensus_error!(ContractModerationSelfTargetError, e).into()
1226
+ }
1227
+ BasicError::DocumentActionFeesWithoutModerationError(e) => {
1228
+ generic_consensus_error!(DocumentActionFeesWithoutModerationError, e).into()
1229
+ }
1230
+ BasicError::ContractModerationReasonTooLongError(e) => {
1231
+ generic_consensus_error!(ContractModerationReasonTooLongError, e).into()
1232
+ }
1099
1233
  }
1100
1234
  }
1101
1235
 
@@ -1144,6 +1278,9 @@ fn from_signature_error(signature_error: &SignatureError) -> JsValue {
1144
1278
  SignatureError::PublicKeyExpiredError(e) => {
1145
1279
  generic_consensus_error!(PublicKeyExpiredError, e).into()
1146
1280
  }
1281
+ SignatureError::PublicKeyWithLimitsCannotUpdateKeyLimitsError(e) => {
1282
+ generic_consensus_error!(PublicKeyWithLimitsCannotUpdateKeyLimitsError, e).into()
1283
+ }
1147
1284
  }
1148
1285
  }
1149
1286
 
@@ -89,6 +89,15 @@ impl StateTransitionFactoryWasm {
89
89
  | StateTransition::IdentityTopUpFromShieldedPool(_) => Err(JsValue::from_str(
90
90
  "shielded transitions are not yet supported in wasm-dpp StateTransitionFactory",
91
91
  )),
92
+ StateTransition::IdentityKeyLimitsUpdate(_) => Err(JsValue::from_str(
93
+ "identity key limits update transitions are not supported in wasm-dpp StateTransitionFactory; use wasm-dpp2",
94
+ )),
95
+ StateTransition::ContractUserModeration(_) => Err(JsValue::from_str(
96
+ "contract user moderation transitions are not supported in wasm-dpp StateTransitionFactory; use wasm-dpp2",
97
+ )),
98
+ StateTransition::ContractFeeClaim(_) => Err(JsValue::from_str(
99
+ "contract fee claim transitions are not supported in wasm-dpp StateTransitionFactory; use wasm-dpp2",
100
+ )),
92
101
  },
93
102
  Err(dpp::ProtocolError::StateTransitionError(e)) => match e {
94
103
  StateTransitionError::InvalidStateTransitionError {
@@ -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()