@dashevo/wasm-dpp 4.2.0-beta.5 → 4.2.0-beta.7
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 +1013 -935
- package/dist/wasm/wasm_dpp.js +72 -36
- package/dist/wasm/wasm_dpp_bg.js +1 -1
- package/lib/wasm/wasm_dpp.d.ts +1013 -935
- package/package.json +2 -2
- package/src/errors/consensus/consensus_error.rs +24 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/wasm-dpp",
|
|
3
|
-
"version": "4.2.0-beta.
|
|
3
|
+
"version": "4.2.0-beta.7",
|
|
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.
|
|
47
|
+
"@dashevo/dpns-contract": "4.2.0-beta.7",
|
|
48
48
|
"@types/bs58": "^4.0.1",
|
|
49
49
|
"@types/node": "^20.10.0",
|
|
50
50
|
"@yarnpkg/pnpify": "^4.0.0-rc.42",
|
|
@@ -67,7 +67,7 @@ use dpp::consensus::state::data_trigger::DataTriggerError::{
|
|
|
67
67
|
};
|
|
68
68
|
use wasm_bindgen::{JsError, JsValue};
|
|
69
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
|
-
use dpp::consensus::basic::document::{ContestedDocumentsTemporarilyNotAllowedError, DocumentCreationNotAllowedError, DocumentFieldMaxSizeExceededError, DocumentPropertyConstraintViolatedError, DocumentPropertyMaxBytesExceededError, DocumentPropertyNotDistinctError, InvalidEncryptedPropertyShapeError, MaxDocumentsTransitionsExceededError, MissingPositionsInDocumentTypePropertiesError};
|
|
70
|
+
use dpp::consensus::basic::document::{ContestedDocumentsTemporarilyNotAllowedError, DocumentCreationNotAllowedError, DocumentFieldMaxSizeExceededError, DocumentPropertyConstraintViolatedError, DocumentPropertyMaxBytesExceededError, DocumentPropertyNotDistinctError, DocumentPropertyNotGeneratedError, DocumentReferencePreimageInvalidError, InvalidEncryptedPropertyShapeError, 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;
|
|
@@ -79,6 +79,7 @@ use dpp::consensus::state::document::document_contest_currently_locked_error::Do
|
|
|
79
79
|
use dpp::consensus::state::document::document_contest_document_with_same_id_already_present_error::DocumentContestDocumentWithSameIdAlreadyPresentError;
|
|
80
80
|
use dpp::consensus::state::document::document_contest_identity_already_contestant::DocumentContestIdentityAlreadyContestantError;
|
|
81
81
|
use dpp::consensus::state::document::document_contest_maximum_contenders_reached_error::DocumentContestMaximumContendersReachedError;
|
|
82
|
+
use dpp::consensus::state::document::referenced_document_requirement_not_met_error::ReferencedDocumentRequirementNotMetError;
|
|
82
83
|
use dpp::consensus::state::document::document_contest_index_mismatch_error::DocumentContestIndexMismatchError;
|
|
83
84
|
use dpp::consensus::state::document::document_contest_not_joinable_error::DocumentContestNotJoinableError;
|
|
84
85
|
use dpp::consensus::state::document::document_contest_not_paid_for_error::DocumentContestNotPaidForError;
|
|
@@ -92,7 +93,8 @@ use dpp::consensus::basic::contract_group::{
|
|
|
92
93
|
InvalidContractGroupAdminsError, RedundantContractGroupMembershipError,
|
|
93
94
|
};
|
|
94
95
|
use dpp::consensus::basic::contract_moderation::{
|
|
95
|
-
ContractModerationReasonTooLongError,
|
|
96
|
+
ContractModerationReasonTooLongError, InvalidContractModerationDocumentFieldsError,
|
|
97
|
+
InvalidContractModerationReasonDocumentsError, ContractModerationSelfTargetError,
|
|
96
98
|
DocumentActionFeesWithoutModerationError,
|
|
97
99
|
InvalidContractModerationConfigError,
|
|
98
100
|
};
|
|
@@ -111,7 +113,8 @@ use dpp::consensus::state::contract_moderation::{
|
|
|
111
113
|
ContractUserAlreadyBannedError, ContractUserBannedError, ContractUserNotBannedError,
|
|
112
114
|
ContractUserNotSuspendedError, ContractUserNotWarnedError, ContractUserSuspendedError,
|
|
113
115
|
ContractUserWarningLimitReachedError, ContractDocumentAlreadyRestoredError,
|
|
114
|
-
ContractDocumentRemovalNotFoundError,
|
|
116
|
+
ContractDocumentRemovalNotFoundError, DocumentFieldNotChangeableByModeratorsError,
|
|
117
|
+
DocumentModerationWindowElapsedError, DocumentModeratorFieldNotWritableError,
|
|
115
118
|
DocumentRestoreHashMismatchError, DocumentRestoreWindowElapsedError,
|
|
116
119
|
DocumentTypeNotDeletableByModeratorsError, IdentityNotContractModeratorError,
|
|
117
120
|
};
|
|
@@ -725,6 +728,15 @@ pub fn from_state_error(state_error: &StateError) -> JsValue {
|
|
|
725
728
|
StateError::DocumentContestMaximumContendersReachedError(e) => {
|
|
726
729
|
generic_consensus_error!(DocumentContestMaximumContendersReachedError, e).into()
|
|
727
730
|
}
|
|
731
|
+
StateError::DocumentFieldNotChangeableByModeratorsError(e) => {
|
|
732
|
+
generic_consensus_error!(DocumentFieldNotChangeableByModeratorsError, e).into()
|
|
733
|
+
}
|
|
734
|
+
StateError::DocumentModeratorFieldNotWritableError(e) => {
|
|
735
|
+
generic_consensus_error!(DocumentModeratorFieldNotWritableError, e).into()
|
|
736
|
+
}
|
|
737
|
+
StateError::ReferencedDocumentRequirementNotMetError(e) => {
|
|
738
|
+
generic_consensus_error!(ReferencedDocumentRequirementNotMetError, e).into()
|
|
739
|
+
}
|
|
728
740
|
}
|
|
729
741
|
}
|
|
730
742
|
|
|
@@ -1320,6 +1332,15 @@ fn from_basic_error(basic_error: &BasicError) -> JsValue {
|
|
|
1320
1332
|
BasicError::DocumentPropertyConstraintViolatedError(e) => {
|
|
1321
1333
|
generic_consensus_error!(DocumentPropertyConstraintViolatedError, e).into()
|
|
1322
1334
|
}
|
|
1335
|
+
BasicError::DocumentPropertyNotGeneratedError(e) => {
|
|
1336
|
+
generic_consensus_error!(DocumentPropertyNotGeneratedError, e).into()
|
|
1337
|
+
}
|
|
1338
|
+
BasicError::InvalidContractModerationDocumentFieldsError(e) => {
|
|
1339
|
+
generic_consensus_error!(InvalidContractModerationDocumentFieldsError, e).into()
|
|
1340
|
+
}
|
|
1341
|
+
BasicError::DocumentReferencePreimageInvalidError(e) => {
|
|
1342
|
+
generic_consensus_error!(DocumentReferencePreimageInvalidError, e).into()
|
|
1343
|
+
}
|
|
1323
1344
|
}
|
|
1324
1345
|
}
|
|
1325
1346
|
|