pshenmic-dpp 1.1.2-dev.8 → 2.0.0-dev.2
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/README.md +14 -99
- package/dist/binaries/bindingsTypes.d.ts +1700 -0
- package/dist/binaries/bindingsTypes.js +99 -0
- package/dist/binaries/pshenmic_dpp.android.node/react-native-node-api-module +0 -0
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +166 -0
- package/dist/binaries/pshenmic_dpp.js +3 -0
- package/dist/binaries/wasm/wasmBytes.d.ts +2 -0
- package/dist/binaries/wasm/wasmBytes.js +2 -0
- package/dist/binaries/wasm.d.ts +166 -0
- package/dist/binaries/wasm.js +44 -0
- package/dist/src/dpp/constants.d.ts +4 -0
- package/dist/src/dpp/constants.js +19 -0
- package/dist/src/dpp/dpp.d.ts +110 -0
- package/dist/src/dpp/dpp.js +110 -0
- package/dist/src/dpp/enums.d.ts +1 -0
- package/dist/src/dpp/enums.js +1 -0
- package/dist/src/dpp/provider.d.ts +11 -0
- package/dist/src/dpp/provider.js +21 -0
- package/dist/src/dpp/structs/Address/AddressWitness.d.ts +12 -0
- package/dist/src/dpp/structs/Address/AddressWitness.js +23 -0
- package/dist/src/dpp/structs/Address/PlatformAddress.d.ts +14 -0
- package/dist/src/dpp/structs/Address/PlatformAddress.js +32 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +38 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +95 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +35 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +85 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +30 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +72 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +33 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +82 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts +31 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +77 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +31 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +76 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.d.ts +12 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.js +26 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +14 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +32 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +12 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +26 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +12 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +29 -0
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.d.ts +19 -0
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +50 -0
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.d.ts +17 -0
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +36 -0
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.d.ts +24 -0
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +48 -0
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.d.ts +15 -0
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +40 -0
- package/dist/src/dpp/structs/AssetLockProof/Transaction.d.ts +20 -0
- package/dist/src/dpp/structs/AssetLockProof/Transaction.js +49 -0
- package/dist/src/dpp/structs/AssetLockProof/TxIn.d.ts +17 -0
- package/dist/src/dpp/structs/AssetLockProof/TxIn.js +39 -0
- package/dist/src/dpp/structs/AssetLockProof/TxOut.d.ts +13 -0
- package/dist/src/dpp/structs/AssetLockProof/TxOut.js +34 -0
- package/dist/src/dpp/structs/AssetLockProof/Witness.d.ts +11 -0
- package/dist/src/dpp/structs/AssetLockProof/Witness.js +25 -0
- package/dist/src/dpp/structs/Batch/BatchTransition.d.ts +34 -0
- package/dist/src/dpp/structs/Batch/BatchTransition.js +95 -0
- package/dist/src/dpp/structs/Batch/BatchedTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/BatchedTransition.js +39 -0
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.d.ts +20 -0
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +54 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +32 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.js +74 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +23 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +58 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +26 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +39 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +40 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +35 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.d.ts +17 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.d.ts +9 -0
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +19 -0
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.d.ts +20 -0
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +49 -0
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +54 -0
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.d.ts +17 -0
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +41 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +20 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.js +92 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +32 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.d.ts +16 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +34 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +32 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.d.ts +16 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +34 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.d.ts +18 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +43 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +36 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +21 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +53 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.d.ts +16 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +34 -0
- package/dist/src/dpp/structs/ConsensusError.d.ts +8 -0
- package/dist/src/dpp/structs/ConsensusError.js +22 -0
- package/dist/src/dpp/structs/ContractBounds.d.ts +17 -0
- package/dist/src/dpp/structs/ContractBounds.js +39 -0
- package/dist/src/dpp/structs/CoreScript.d.ts +15 -0
- package/dist/src/dpp/structs/CoreScript.js +37 -0
- package/dist/src/dpp/structs/DataContract.d.ts +36 -0
- package/dist/src/dpp/structs/DataContract.js +119 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.d.ts +23 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +55 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.d.ts +23 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +55 -0
- package/dist/src/dpp/structs/Document.d.ts +51 -0
- package/dist/src/dpp/structs/Document.js +184 -0
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.d.ts +13 -0
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +31 -0
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.d.ts +13 -0
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +31 -0
- package/dist/src/dpp/structs/GroupStateTransitionInfo.d.ts +15 -0
- package/dist/src/dpp/structs/GroupStateTransitionInfo.js +33 -0
- package/dist/src/dpp/structs/Identifier.d.ts +17 -0
- package/dist/src/dpp/structs/Identifier.js +50 -0
- package/dist/src/dpp/structs/Identity.d.ts +26 -0
- package/dist/src/dpp/structs/Identity.js +73 -0
- package/dist/src/dpp/structs/IdentityPublicKey.d.ts +43 -0
- package/dist/src/dpp/structs/IdentityPublicKey.js +126 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +30 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +77 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.d.ts +29 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +69 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.d.ts +33 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +85 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.d.ts +42 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +114 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.d.ts +30 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +75 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.d.ts +40 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +108 -0
- package/dist/src/dpp/structs/InstantLock.d.ts +17 -0
- package/dist/src/dpp/structs/InstantLock.js +43 -0
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +37 -0
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +96 -0
- package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.d.ts +14 -0
- package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.js +29 -0
- package/dist/src/dpp/structs/MasternodeVote/Vote.d.ts +13 -0
- package/dist/src/dpp/structs/MasternodeVote/Vote.js +27 -0
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +18 -0
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +42 -0
- package/dist/src/dpp/structs/PartialIdentity.d.ts +26 -0
- package/dist/src/dpp/structs/PartialIdentity.js +69 -0
- package/dist/src/dpp/structs/PrivateKey.d.ts +20 -0
- package/dist/src/dpp/structs/PrivateKey.js +48 -0
- package/dist/src/dpp/structs/PublicKey.d.ts +15 -0
- package/dist/src/dpp/structs/PublicKey.js +37 -0
- package/dist/src/dpp/structs/StateTransition.d.ts +38 -0
- package/dist/src/dpp/structs/StateTransition.js +100 -0
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.d.ts +12 -0
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.js +44 -0
- package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.d.ts +16 -0
- package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.js +43 -0
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.d.ts +23 -0
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.js +52 -0
- package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.js +57 -0
- package/dist/src/dpp/structs/TokenConfiguration/Group.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/Group.js +44 -0
- package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.d.ts +13 -0
- package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.js +40 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.d.ts +54 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.js +139 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.d.ts +47 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.js +140 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.js +47 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.d.ts +15 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.js +34 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.d.ts +14 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.js +31 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.d.ts +28 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.js +75 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.js +49 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.d.ts +13 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.js +27 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.d.ts +13 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.js +27 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.d.ts +21 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.js +42 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.d.ts +9 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.js +17 -0
- package/dist/src/dpp/types.d.ts +273 -0
- package/dist/src/dpp/types.js +1 -0
- package/dist/src/dpp/utils.d.ts +5 -0
- package/dist/src/dpp/utils.js +78 -0
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +3 -0
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +34 -0
- package/dist/src/dpp/verify/Contract/verifyContract.d.ts +2 -0
- package/dist/src/dpp/verify/Contract/verifyContract.js +14 -0
- package/dist/src/dpp/verify/Document/verifyDocumentsProof.d.ts +3 -0
- package/dist/src/dpp/verify/Document/verifyDocumentsProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentifierByNonUniquePublicKeyHashProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentifierByNonUniquePublicKeyHashProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityBalanceProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityBalanceProof.js +9 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByIdentifierProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByIdentifierProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByUniqueKeyHashProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByUniqueKeyHashProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityContractNonceProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityContractNonceProof.js +9 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityKeysByIdentifierProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityKeysByIdentifierProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityNonceProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityNonceProof.js +9 -0
- package/dist/src/dpp/verify/StateTransition/utils.d.ts +2 -0
- package/dist/src/dpp/verify/StateTransition/utils.js +115 -0
- package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.d.ts +4 -0
- package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.js +10 -0
- package/dist/src/dpp/verify/System/verifyEpochsInfoProof.d.ts +2 -0
- package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +16 -0
- package/dist/src/dpp/verify/System/verifyTotalCreditsProof.d.ts +2 -0
- package/dist/src/dpp/verify/System/verifyTotalCreditsProof.js +9 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +13 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.js +15 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.js +14 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.js +12 -0
- package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +13 -0
- package/dist/src/dpp/verify/verifySignatureDigest.d.ts +1 -0
- package/dist/src/dpp/verify/verifySignatureDigest.js +4 -0
- package/dist/src/react-native.d.ts +3 -0
- package/dist/src/react-native.js +6 -0
- package/dist/src/wasm.d.ts +3 -0
- package/dist/src/wasm.js +6 -0
- package/dist/utils/base122.d.ts +7 -0
- package/dist/utils/base122.js +63 -0
- package/package.json +30 -27
- package/tests/unit/DynamicValue.spec.ts +86 -0
- package/tests/unit/Identifier.spec.ts +105 -0
- package/tests/unit/Identity.spec.ts +119 -0
- package/tests/unit/IdentityPublicKey.spec.ts +126 -0
- package/dist/wasm/base122.d.ts +0 -1
- package/dist/wasm/base122.js +0 -67
- package/dist/wasm/index.d.ts +0 -148
- package/dist/wasm/index.js +0 -13
- package/dist/wasm/initAsync.d.ts +0 -4
- package/dist/wasm/initAsync.js +0 -20
- package/dist/wasm/initInterface.d.ts +0 -3
- package/dist/wasm/initInterface.js +0 -46
- package/dist/wasm/initWASM.d.ts +0 -1
- package/dist/wasm/initWASM.js +0 -28
- package/dist/wasm/pshenmic_dpp.d.ts +0 -5266
- package/dist/wasm/pshenmic_dpp.js +0 -25608
- package/dist/wasm/pshenmic_dpp_bg.d.ts +0 -3
- package/dist/wasm/pshenmic_dpp_bg.js +0 -2
- package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +0 -1636
- package/dist/wasm/pshenmic_dpp_zipped.d.ts +0 -3
- package/dist/wasm/pshenmic_dpp_zipped.js +0 -2
- package/dist/wasm/snippets/pshenmic_dpp_utils-23ab7381b198778d/stringify.js +0 -7
- package/tests/AssetLockProof.spec.cjs +0 -96
- package/tests/AsyncImportTest.spec.cjs +0 -930
- package/tests/AuthorizedActionTakers.spec.cjs +0 -75
- package/tests/BatchTransition.spec.cjs +0 -141
- package/tests/ChainLockProof.spec.cjs +0 -63
- package/tests/ChangeControlRules.spec.cjs +0 -184
- package/tests/CoreScript.spec.cjs +0 -37
- package/tests/DataContract.spec.cjs +0 -170
- package/tests/DataContractCreateStateTransition.spec.cjs +0 -102
- package/tests/DataContractUpdateStateTransition.spec.cjs +0 -103
- package/tests/DistributionFunction.spec.cjs +0 -416
- package/tests/Document.spec.cjs +0 -227
- package/tests/DocumentTransition.spec.cjs +0 -94
- package/tests/DocumentsTransitions.spec.cjs +0 -699
- package/tests/Identifier.spec.cjs +0 -82
- package/tests/Identity.spec.cjs +0 -107
- package/tests/IdentityCreateTransition.spec.cjs +0 -87
- package/tests/IdentityCreditTransferTransition.spec.cjs +0 -140
- package/tests/IdentityCreditWithdrawalTransition.spec.cjs +0 -186
- package/tests/IdentityPublicKey.spec.cjs +0 -166
- package/tests/IdentityTopUpTransition.spec.cjs +0 -125
- package/tests/IdentityUpdateTransition.spec.cjs +0 -141
- package/tests/InstantLockProof.spec.cjs +0 -91
- package/tests/OutPoint.spec.cjs +0 -49
- package/tests/PrivateKey.spec.cjs +0 -67
- package/tests/PublicKeyInCreation.spec.cjs +0 -252
- package/tests/RewardDistributionType.spec.cjs +0 -90
- package/tests/TokenBaseTransition.spec.cjs +0 -96
- package/tests/TokenConfiguration.spec.cjs +0 -188
- package/tests/TokenConfigurationConvention.spec.cjs +0 -93
- package/tests/TokenConfigurationLocalization.spec.cjs +0 -59
- package/tests/TokenDistributionRecipient.spec.cjs +0 -49
- package/tests/TokenDistributionRules.spec.cjs +0 -313
- package/tests/TokenKeepsHistoryRules.spec.cjs +0 -67
- package/tests/TokenPerpetualDistribution.spec.cjs +0 -130
- package/tests/TokenPreProgrammedDistribution.spec.cjs +0 -61
- package/tests/TokensTransitions.spec.cjs +0 -509
- package/tests/TxOut.spec.cjs +0 -70
- package/tests/mocks/DataContract/DataContract.json +0 -164
- package/tests/mocks/DataContract/index.js +0 -6
- package/tests/mocks/Document/DataContract.json +0 -23
- package/tests/mocks/Document/document.json +0 -3
- package/tests/mocks/Document/document2.json +0 -3
- package/tests/mocks/Document/index.js +0 -13
- package/tests/mocks/Identity/index.js +0 -13
- package/tests/mocks/Locks/index.js +0 -2
- package/tests/mocks/PrivateKey/index.js +0 -5
- package/tests/mocks/PublicKey/index.js +0 -13
- package/tests/mocks/TokenConfiguration/index.js +0 -5
- package/tests/utils/hex.js +0 -14
package/tests/Document.spec.cjs
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
const assert = require('assert')
|
|
2
|
-
const { describe, it } = require('mocha')
|
|
3
|
-
const {
|
|
4
|
-
document, dataContractId, ownerId, documentTypeName, revision, dataContractValue, id, document2, documentBytes
|
|
5
|
-
} = require('./mocks/Document/index.js')
|
|
6
|
-
const { fromHexString } = require('./utils/hex')
|
|
7
|
-
const { default: wasm } = require('..')
|
|
8
|
-
|
|
9
|
-
describe('Document', function () {
|
|
10
|
-
describe('serialization / deserialization', function () {
|
|
11
|
-
it('should allows to create Document from values', function () {
|
|
12
|
-
const dataContractIdentifier = new wasm.IdentifierWASM(dataContractId)
|
|
13
|
-
const ownerIdentifier = new wasm.IdentifierWASM(ownerId)
|
|
14
|
-
|
|
15
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractIdentifier, ownerIdentifier)
|
|
16
|
-
|
|
17
|
-
assert.notEqual(documentInstance.__wbg_ptr, 0)
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
it('should allows to create Document from values with custom id', function () {
|
|
21
|
-
const dataContractIdentifier = new wasm.IdentifierWASM(dataContractId)
|
|
22
|
-
const ownerIdentifier = new wasm.IdentifierWASM(ownerId)
|
|
23
|
-
const identifier = new wasm.IdentifierWASM(id)
|
|
24
|
-
|
|
25
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractIdentifier, ownerIdentifier, identifier)
|
|
26
|
-
|
|
27
|
-
assert.notEqual(documentInstance.__wbg_ptr, 0)
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
it('should allows to create Document from bytes and convert to bytes', function () {
|
|
31
|
-
const dataContract = wasm.DataContractWASM.fromValue(dataContractValue, false)
|
|
32
|
-
const documentInstance = wasm.DocumentWASM.fromBytes(fromHexString(documentBytes), dataContract, 'note')
|
|
33
|
-
|
|
34
|
-
const bytes = documentInstance.bytes(dataContract, wasm.PlatformVersionWASM.PLATFORM_V1)
|
|
35
|
-
|
|
36
|
-
assert.equal(documentInstance.dataContractId.base58(), dataContract.id.base58())
|
|
37
|
-
assert.deepEqual(bytes, fromHexString(documentBytes))
|
|
38
|
-
assert.notEqual(dataContract.__wbg_ptr, 0)
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
describe('getters', function () {
|
|
43
|
-
it('should return document id', () => {
|
|
44
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
45
|
-
|
|
46
|
-
assert.deepEqual(documentInstance.id.base58(), id)
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
it('should return owner id', () => {
|
|
50
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
51
|
-
|
|
52
|
-
assert.deepEqual(documentInstance.ownerId.base58(), ownerId)
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
it('should return data contract id', () => {
|
|
56
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
57
|
-
|
|
58
|
-
assert.deepEqual(documentInstance.dataContractId.base58(), dataContractId)
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
it('should return properties', () => {
|
|
62
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
63
|
-
|
|
64
|
-
assert.deepEqual(documentInstance.properties, document)
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
it('should return revision', () => {
|
|
68
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
69
|
-
|
|
70
|
-
assert.deepEqual(documentInstance.revision, revision)
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
describe('setters', function () {
|
|
75
|
-
it('should allow to set document id', () => {
|
|
76
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
77
|
-
|
|
78
|
-
documentInstance.id = ownerId
|
|
79
|
-
|
|
80
|
-
assert.deepEqual(documentInstance.id.base58(), ownerId)
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
it('should allow to set document owner id', () => {
|
|
84
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
85
|
-
|
|
86
|
-
documentInstance.ownerId = id
|
|
87
|
-
|
|
88
|
-
assert.deepEqual(documentInstance.ownerId.base58(), id)
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
it('should allow to set entropy', () => {
|
|
92
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
93
|
-
|
|
94
|
-
const newEntropy = new Array(documentInstance.entropy.length).fill(0)
|
|
95
|
-
|
|
96
|
-
documentInstance.entropy = newEntropy
|
|
97
|
-
|
|
98
|
-
assert.deepEqual(Array.from(documentInstance.entropy), newEntropy)
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
it('should allow to set properties', () => {
|
|
102
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
103
|
-
|
|
104
|
-
documentInstance.properties = document2
|
|
105
|
-
|
|
106
|
-
assert.deepEqual(documentInstance.properties, document2)
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
it('should allow to set revision', () => {
|
|
110
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
111
|
-
|
|
112
|
-
const newRevision = BigInt(1000)
|
|
113
|
-
|
|
114
|
-
documentInstance.revision = newRevision
|
|
115
|
-
|
|
116
|
-
assert.deepEqual(documentInstance.revision, newRevision)
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
it('should allow to set created at', () => {
|
|
120
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
121
|
-
|
|
122
|
-
const createdAt = BigInt(new Date(1123).getTime())
|
|
123
|
-
|
|
124
|
-
documentInstance.createdAt = createdAt
|
|
125
|
-
|
|
126
|
-
assert.deepEqual(documentInstance.createdAt, createdAt)
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
it('should allow to set updated at', () => {
|
|
130
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
131
|
-
|
|
132
|
-
const updatedAt = BigInt(new Date(1123).getTime())
|
|
133
|
-
|
|
134
|
-
documentInstance.updatedAt = updatedAt
|
|
135
|
-
|
|
136
|
-
assert.deepEqual(documentInstance.updatedAt, updatedAt)
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
it('should allow to set transferred at', () => {
|
|
140
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
141
|
-
|
|
142
|
-
const transferredAt = BigInt(new Date(11231).getTime())
|
|
143
|
-
|
|
144
|
-
documentInstance.transferredAt = transferredAt
|
|
145
|
-
|
|
146
|
-
assert.deepEqual(documentInstance.transferredAt, transferredAt)
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
it('should allow to set create at Block Height', () => {
|
|
150
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
151
|
-
|
|
152
|
-
const createdAtHeight = BigInt(9172)
|
|
153
|
-
|
|
154
|
-
documentInstance.createdAtBlockHeight = createdAtHeight
|
|
155
|
-
|
|
156
|
-
assert.deepEqual(documentInstance.createdAtBlockHeight, createdAtHeight)
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
it('should allow to set updated at Block Height', () => {
|
|
160
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
161
|
-
|
|
162
|
-
const updatedAtHeight = BigInt(9172)
|
|
163
|
-
|
|
164
|
-
documentInstance.updatedAtBlockHeight = updatedAtHeight
|
|
165
|
-
|
|
166
|
-
assert.deepEqual(documentInstance.updatedAtBlockHeight, updatedAtHeight)
|
|
167
|
-
})
|
|
168
|
-
|
|
169
|
-
it('should allow to set transferred at Block Height', () => {
|
|
170
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
171
|
-
|
|
172
|
-
const transferredAtHeight = BigInt(9172)
|
|
173
|
-
|
|
174
|
-
documentInstance.transferredAtBlockHeight = transferredAtHeight
|
|
175
|
-
|
|
176
|
-
assert.deepEqual(documentInstance.transferredAtBlockHeight, transferredAtHeight)
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
it('should allow to set create at core Block Height', () => {
|
|
180
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
181
|
-
|
|
182
|
-
const createdAtHeight = 91721
|
|
183
|
-
|
|
184
|
-
documentInstance.createdAtCoreBlockHeight = createdAtHeight
|
|
185
|
-
|
|
186
|
-
assert.deepEqual(documentInstance.createdAtCoreBlockHeight, createdAtHeight)
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
it('should allow to set updated at Block Height', () => {
|
|
190
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
191
|
-
|
|
192
|
-
const updatedAtHeight = 91722
|
|
193
|
-
|
|
194
|
-
documentInstance.updatedAtCoreBlockHeight = updatedAtHeight
|
|
195
|
-
|
|
196
|
-
assert.deepEqual(documentInstance.updatedAtCoreBlockHeight, updatedAtHeight)
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
it('should allow to set transferred at Block Height', () => {
|
|
200
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
201
|
-
|
|
202
|
-
const transferredAtHeight = 91723
|
|
203
|
-
|
|
204
|
-
documentInstance.transferredAtCoreBlockHeight = transferredAtHeight
|
|
205
|
-
|
|
206
|
-
assert.deepEqual(documentInstance.transferredAtCoreBlockHeight, transferredAtHeight)
|
|
207
|
-
})
|
|
208
|
-
|
|
209
|
-
it('should allow to set document type name', () => {
|
|
210
|
-
const documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
211
|
-
|
|
212
|
-
const newDocumentTypeName = 'bbbb'
|
|
213
|
-
|
|
214
|
-
documentInstance.documentTypeName = newDocumentTypeName
|
|
215
|
-
|
|
216
|
-
assert.deepEqual(documentInstance.documentTypeName, newDocumentTypeName)
|
|
217
|
-
})
|
|
218
|
-
})
|
|
219
|
-
|
|
220
|
-
describe('static', function () {
|
|
221
|
-
it('should allow to generate id', () => {
|
|
222
|
-
const generatedId = wasm.DocumentWASM.generateId('note', ownerId, dataContractId)
|
|
223
|
-
|
|
224
|
-
assert.equal(Array.from(generatedId).length, 32)
|
|
225
|
-
})
|
|
226
|
-
})
|
|
227
|
-
})
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
const assert = require('assert')
|
|
2
|
-
const { describe, it, before } = require('mocha')
|
|
3
|
-
const { document, documentTypeName, revision, dataContractId, ownerId, id } = require('./mocks/Document/index.js')
|
|
4
|
-
const { default: wasm } = require('..')
|
|
5
|
-
|
|
6
|
-
let documentInstance
|
|
7
|
-
let createTransition
|
|
8
|
-
let replaceTransition
|
|
9
|
-
|
|
10
|
-
describe('DocumentTransition', function () {
|
|
11
|
-
before(async function () {
|
|
12
|
-
documentInstance = new wasm.DocumentWASM(document, documentTypeName, revision, dataContractId, ownerId, id)
|
|
13
|
-
createTransition = new wasm.DocumentCreateTransitionWASM(documentInstance, BigInt(1))
|
|
14
|
-
replaceTransition = new wasm.DocumentReplaceTransitionWASM(documentInstance, BigInt(1))
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
describe('serialization / deserialization', function () {
|
|
18
|
-
it('should allow to create from documents document_transitions', function () {
|
|
19
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
20
|
-
|
|
21
|
-
assert.notEqual(documentTransition.__wbg_ptr, 0)
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
describe('getters', function () {
|
|
26
|
-
it('should allow to get action type', function () {
|
|
27
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
28
|
-
|
|
29
|
-
assert.equal(documentTransition.actionType, 'create')
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
it('should allow to get dataContractId', function () {
|
|
33
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
34
|
-
|
|
35
|
-
assert.deepEqual(documentTransition.dataContractId.base58(), documentInstance.dataContractId.base58())
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
it('should allow to get id', function () {
|
|
39
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
40
|
-
|
|
41
|
-
assert.deepEqual(documentTransition.id.base58(), documentInstance.id.base58())
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
it('should allow to get documentTypeName', function () {
|
|
45
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
46
|
-
|
|
47
|
-
assert.equal(documentTransition.documentTypeName, documentTypeName)
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
it('should allow to get identityContractNonce', function () {
|
|
51
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
52
|
-
|
|
53
|
-
assert.equal(documentTransition.identityContractNonce, BigInt(1))
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
it('should allow to get revision', function () {
|
|
57
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
58
|
-
|
|
59
|
-
assert.equal(documentTransition.revision, BigInt(1))
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
it('should allow to get entropy', function () {
|
|
63
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
64
|
-
|
|
65
|
-
assert.deepEqual(documentTransition.entropy, documentInstance.entropy)
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
describe('setters', function () {
|
|
70
|
-
it('should allow to set dataContractId', function () {
|
|
71
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
72
|
-
|
|
73
|
-
documentTransition.dataContractId = new Uint8Array(32)
|
|
74
|
-
|
|
75
|
-
assert.deepEqual(documentTransition.dataContractId.bytes(), new Uint8Array(32))
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
it('should allow to set identityContractNonce', function () {
|
|
79
|
-
const documentTransition = createTransition.toDocumentTransition()
|
|
80
|
-
|
|
81
|
-
documentTransition.identityContractNonce = BigInt(3333)
|
|
82
|
-
|
|
83
|
-
assert.equal(documentTransition.identityContractNonce, BigInt(3333))
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
it('should allow to set revision', function () {
|
|
87
|
-
const documentTransition = replaceTransition.toDocumentTransition()
|
|
88
|
-
|
|
89
|
-
documentTransition.revision = BigInt(123)
|
|
90
|
-
|
|
91
|
-
assert.equal(documentTransition.revision, BigInt(123))
|
|
92
|
-
})
|
|
93
|
-
})
|
|
94
|
-
})
|