pshenmic-dpp 1.1.2-dev.8 → 2.0.0-dev.10
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 +1721 -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 +171 -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 +171 -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 +112 -0
- package/dist/src/dpp/dpp.js +112 -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/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 +15 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +33 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +13 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +27 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +13 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +30 -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 +33 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.js +77 -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 +21 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.js +95 -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 +24 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +60 -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 +38 -0
- package/dist/src/dpp/structs/DataContract.js +125 -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 +44 -0
- package/dist/src/dpp/structs/IdentityPublicKey.js +131 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +31 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +82 -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/PlatformAddress/AddressWitness.d.ts +12 -0
- package/dist/src/dpp/structs/PlatformAddress/AddressWitness.js +23 -0
- package/dist/src/dpp/structs/PlatformAddress/PlatformAddress.d.ts +16 -0
- package/dist/src/dpp/structs/PlatformAddress/PlatformAddress.js +38 -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 +39 -0
- package/dist/src/dpp/structs/StateTransition.js +103 -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 +284 -0
- package/dist/src/dpp/types.js +1 -0
- package/dist/src/dpp/utils.d.ts +6 -0
- package/dist/src/dpp/utils.js +96 -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/PlatformAddress/verifyPlatformAddressInfo.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressInfo.js +12 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.d.ts +2 -0
- package/dist/src/dpp/verify/PlatformAddress/verifyPlatformAddressesInfos.js +14 -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 +126 -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
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
const assert = require('assert')
|
|
2
|
-
const { describe, it } = require('mocha')
|
|
3
|
-
const { default: wasm } = require('..')
|
|
4
|
-
|
|
5
|
-
describe('TokenPerpetualDistribution', function () {
|
|
6
|
-
describe('serialization / deserialization', function () {
|
|
7
|
-
it('should allow to create from values', () => {
|
|
8
|
-
const recipient = wasm.TokenDistributionRecipientWASM.ContractOwner()
|
|
9
|
-
|
|
10
|
-
const distributionFunction = wasm.DistributionFunctionWASM.FixedAmountDistribution(
|
|
11
|
-
BigInt(111)
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
const distributionType = wasm.RewardDistributionTypeWASM.BlockBasedDistribution(
|
|
15
|
-
BigInt(111),
|
|
16
|
-
distributionFunction
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
const distribution = new wasm.TokenPerpetualDistributionWASM(
|
|
20
|
-
distributionType,
|
|
21
|
-
recipient
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
assert.notEqual(recipient.__wbg_ptr, 0)
|
|
25
|
-
assert.notEqual(distributionFunction.__wbg_ptr, 0)
|
|
26
|
-
assert.notEqual(distributionType.__wbg_ptr, 0)
|
|
27
|
-
assert.notEqual(distribution.__wbg_ptr, 0)
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
describe('getters', function () {
|
|
32
|
-
it('should allow to get distributionType', () => {
|
|
33
|
-
const recipient = wasm.TokenDistributionRecipientWASM.ContractOwner()
|
|
34
|
-
|
|
35
|
-
const distributionFunction = wasm.DistributionFunctionWASM.FixedAmountDistribution(
|
|
36
|
-
BigInt(111)
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
const distributionType = wasm.RewardDistributionTypeWASM.BlockBasedDistribution(
|
|
40
|
-
BigInt(111),
|
|
41
|
-
distributionFunction
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
const distribution = new wasm.TokenPerpetualDistributionWASM(
|
|
45
|
-
distributionType,
|
|
46
|
-
recipient
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
assert.deepEqual(distribution.distributionType.constructor.name, 'RewardDistributionTypeWASM')
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
it('should allow to get distributionRecipient', () => {
|
|
53
|
-
const recipient = wasm.TokenDistributionRecipientWASM.ContractOwner()
|
|
54
|
-
|
|
55
|
-
const distributionFunction = wasm.DistributionFunctionWASM.FixedAmountDistribution(
|
|
56
|
-
BigInt(111)
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
const distributionType = wasm.RewardDistributionTypeWASM.BlockBasedDistribution(
|
|
60
|
-
BigInt(111),
|
|
61
|
-
distributionFunction
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
const distribution = new wasm.TokenPerpetualDistributionWASM(
|
|
65
|
-
distributionType,
|
|
66
|
-
recipient
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
assert.deepEqual(distribution.distributionRecipient.constructor.name, 'TokenDistributionRecipientWASM')
|
|
70
|
-
assert.deepEqual(distribution.distributionRecipient.getType(), 'ContractOwner')
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
describe('setters', function () {
|
|
75
|
-
it('should allow to set distributionType', () => {
|
|
76
|
-
const recipient = wasm.TokenDistributionRecipientWASM.ContractOwner()
|
|
77
|
-
|
|
78
|
-
const distributionFunction = wasm.DistributionFunctionWASM.FixedAmountDistribution(
|
|
79
|
-
BigInt(111)
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
const distributionType = wasm.RewardDistributionTypeWASM.BlockBasedDistribution(
|
|
83
|
-
BigInt(111),
|
|
84
|
-
distributionFunction
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
const distribution = new wasm.TokenPerpetualDistributionWASM(
|
|
88
|
-
distributionType,
|
|
89
|
-
recipient
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
const newDistribution = wasm.RewardDistributionTypeWASM.TimeBasedDistribution(
|
|
93
|
-
BigInt(111),
|
|
94
|
-
distributionFunction
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
distribution.distributionType = newDistribution
|
|
98
|
-
|
|
99
|
-
assert.notEqual(newDistribution.__wbg_ptr, 0)
|
|
100
|
-
assert.deepEqual(distribution.distributionType.constructor.name, 'RewardDistributionTypeWASM')
|
|
101
|
-
assert.deepEqual(distribution.distributionType.getDistribution().constructor.name, 'TimeBasedDistributionWASM')
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
it('should allow to set distributionRecipient', () => {
|
|
105
|
-
const recipient = wasm.TokenDistributionRecipientWASM.ContractOwner()
|
|
106
|
-
|
|
107
|
-
const distributionFunction = wasm.DistributionFunctionWASM.FixedAmountDistribution(
|
|
108
|
-
BigInt(111)
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
const distributionType = wasm.RewardDistributionTypeWASM.BlockBasedDistribution(
|
|
112
|
-
BigInt(111),
|
|
113
|
-
distributionFunction
|
|
114
|
-
)
|
|
115
|
-
|
|
116
|
-
const distribution = new wasm.TokenPerpetualDistributionWASM(
|
|
117
|
-
distributionType,
|
|
118
|
-
recipient
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
const newRecipient = wasm.TokenDistributionRecipientWASM.EvonodesByParticipation()
|
|
122
|
-
|
|
123
|
-
distribution.distributionRecipient = newRecipient
|
|
124
|
-
|
|
125
|
-
assert.notEqual(newRecipient.__wbg_ptr, 0)
|
|
126
|
-
assert.deepEqual(distribution.distributionRecipient.constructor.name, 'TokenDistributionRecipientWASM')
|
|
127
|
-
assert.deepEqual(distribution.distributionRecipient.getType(), 'EvonodesByParticipation')
|
|
128
|
-
})
|
|
129
|
-
})
|
|
130
|
-
})
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
const assert = require('assert')
|
|
2
|
-
const { describe, it } = require('mocha')
|
|
3
|
-
const { default: wasm } = require('..')
|
|
4
|
-
|
|
5
|
-
describe('TokenPreProgrammedDistribution', function () {
|
|
6
|
-
describe('serialization / deserialization', function () {
|
|
7
|
-
it('should allow to create from values', () => {
|
|
8
|
-
const preProgrammedDistribution = new wasm.TokenPreProgrammedDistributionWASM(
|
|
9
|
-
{
|
|
10
|
-
1750140416485: {
|
|
11
|
-
PJUBWbXWmzEYCs99rAAbnCiHRzrnhKLQrXbmSsuPBYB: BigInt(10000)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
assert.notEqual(preProgrammedDistribution.__wbg_ptr, 0)
|
|
17
|
-
})
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
describe('getters', function () {
|
|
21
|
-
it('should allow to get distributions', () => {
|
|
22
|
-
const preProgrammedDistribution = new wasm.TokenPreProgrammedDistributionWASM(
|
|
23
|
-
{
|
|
24
|
-
1750140416485: {
|
|
25
|
-
PJUBWbXWmzEYCs99rAAbnCiHRzrnhKLQrXbmSsuPBYB: BigInt(10100)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
assert.deepEqual(preProgrammedDistribution.distributions, {
|
|
31
|
-
1750140416485: {
|
|
32
|
-
PJUBWbXWmzEYCs99rAAbnCiHRzrnhKLQrXbmSsuPBYB: BigInt(10100)
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
describe('setters', function () {
|
|
39
|
-
it('should allow to set distributions', () => {
|
|
40
|
-
const preProgrammedDistribution = new wasm.TokenPreProgrammedDistributionWASM(
|
|
41
|
-
{
|
|
42
|
-
1750140416485: {
|
|
43
|
-
PJUBWbXWmzEYCs99rAAbnCiHRzrnhKLQrXbmSsuPBYB: BigInt(10100)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
preProgrammedDistribution.distributions = {
|
|
49
|
-
1750140416415: {
|
|
50
|
-
PJUBWbXWmzEYCs99rAAbnCiHRzrnhKLQrXbmSsuPBYB: BigInt(9999999)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
assert.deepEqual(preProgrammedDistribution.distributions, {
|
|
55
|
-
1750140416415: {
|
|
56
|
-
PJUBWbXWmzEYCs99rAAbnCiHRzrnhKLQrXbmSsuPBYB: BigInt(9999999)
|
|
57
|
-
}
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
})
|
|
61
|
-
})
|
|
@@ -1,509 +0,0 @@
|
|
|
1
|
-
const { describe, it, before } = require('mocha')
|
|
2
|
-
const assert = require('assert')
|
|
3
|
-
const { dataContractId, ownerId } = require('./mocks/Document/index.js')
|
|
4
|
-
const { default: wasm } = require('..')
|
|
5
|
-
|
|
6
|
-
let baseTransition
|
|
7
|
-
|
|
8
|
-
describe('TokenTransitions', function () {
|
|
9
|
-
before(async function () {
|
|
10
|
-
baseTransition = new wasm.TokenBaseTransitionWASM(BigInt(1), 1, dataContractId, ownerId)
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
describe('serialize/deserialize', function () {
|
|
14
|
-
it('should allow to create burn transition', function () {
|
|
15
|
-
const burnTransition = new wasm.TokenBurnTransitionWASM(baseTransition, BigInt(11), 'bbbb')
|
|
16
|
-
|
|
17
|
-
assert.equal(burnTransition.constructor.name, 'TokenBurnTransitionWASM')
|
|
18
|
-
assert.notEqual(burnTransition.__wbg_ptr, 0)
|
|
19
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
it('should allow to create mint transition', function () {
|
|
23
|
-
const mintTransition = new wasm.TokenMintTransitionWASM(baseTransition, ownerId, BigInt(11), 'bbbb')
|
|
24
|
-
|
|
25
|
-
assert.equal(mintTransition.constructor.name, 'TokenMintTransitionWASM')
|
|
26
|
-
assert.notEqual(mintTransition.__wbg_ptr, 0)
|
|
27
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
it('should allow to create transfer transition', function () {
|
|
31
|
-
const transferTransition = new wasm.TokenTransferTransitionWASM(
|
|
32
|
-
baseTransition,
|
|
33
|
-
ownerId,
|
|
34
|
-
BigInt(11),
|
|
35
|
-
'bbbb'
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
assert.equal(transferTransition.constructor.name, 'TokenTransferTransitionWASM')
|
|
39
|
-
assert.notEqual(transferTransition.__wbg_ptr, 0)
|
|
40
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
it('should allow to create transfer transition with shared encrypted note', function () {
|
|
44
|
-
const sharedEncryptedNote = new wasm.SharedEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
45
|
-
|
|
46
|
-
const transferTransition = new wasm.TokenTransferTransitionWASM(
|
|
47
|
-
baseTransition,
|
|
48
|
-
ownerId,
|
|
49
|
-
BigInt(11),
|
|
50
|
-
'bbbb',
|
|
51
|
-
sharedEncryptedNote
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
assert.equal(sharedEncryptedNote.constructor.name, 'SharedEncryptedNoteWASM')
|
|
55
|
-
assert.equal(transferTransition.constructor.name, 'TokenTransferTransitionWASM')
|
|
56
|
-
assert.notEqual(transferTransition.__wbg_ptr, 0)
|
|
57
|
-
assert.notEqual(sharedEncryptedNote.__wbg_ptr, 0)
|
|
58
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
it('should allow to create transfer transition with private encrypted note', function () {
|
|
62
|
-
const privateEncryptedNote = new wasm.PrivateEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
63
|
-
|
|
64
|
-
const transferTransition = new wasm.TokenTransferTransitionWASM(
|
|
65
|
-
baseTransition,
|
|
66
|
-
ownerId,
|
|
67
|
-
BigInt(11),
|
|
68
|
-
'bbbb',
|
|
69
|
-
undefined,
|
|
70
|
-
privateEncryptedNote
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
assert.equal(privateEncryptedNote.constructor.name, 'PrivateEncryptedNoteWASM')
|
|
74
|
-
assert.equal(transferTransition.constructor.name, 'TokenTransferTransitionWASM')
|
|
75
|
-
assert.notEqual(transferTransition.__wbg_ptr, 0)
|
|
76
|
-
assert.notEqual(privateEncryptedNote.__wbg_ptr, 0)
|
|
77
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
it('should allow to create freeze transition', function () {
|
|
81
|
-
const freezeTransition = new wasm.TokenFreezeTransitionWASM(
|
|
82
|
-
baseTransition,
|
|
83
|
-
ownerId,
|
|
84
|
-
'bbbb'
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
assert.equal(freezeTransition.constructor.name, 'TokenFreezeTransitionWASM')
|
|
88
|
-
assert.notEqual(freezeTransition.__wbg_ptr, 0)
|
|
89
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
it('should allow to create unfreeze transition', function () {
|
|
93
|
-
const unfreezeTransition = new wasm.TokenUnFreezeTransitionWASM(
|
|
94
|
-
baseTransition,
|
|
95
|
-
ownerId,
|
|
96
|
-
'bbbb'
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
assert.equal(unfreezeTransition.constructor.name, 'TokenUnFreezeTransitionWASM')
|
|
100
|
-
assert.notEqual(unfreezeTransition.__wbg_ptr, 0)
|
|
101
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
it('should allow to create destroy frozen funds transition', function () {
|
|
105
|
-
const tokenDestroyFrozenFundsTransition = new wasm.TokenDestroyFrozenFundsTransitionWASM(
|
|
106
|
-
baseTransition,
|
|
107
|
-
ownerId,
|
|
108
|
-
'bbbb'
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
assert.equal(tokenDestroyFrozenFundsTransition.constructor.name, 'TokenDestroyFrozenFundsTransitionWASM')
|
|
112
|
-
assert.notEqual(tokenDestroyFrozenFundsTransition.__wbg_ptr, 0)
|
|
113
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
it('should allow to create claim transition', function () {
|
|
117
|
-
const claimTransition = new wasm.TokenClaimTransitionWASM(
|
|
118
|
-
baseTransition,
|
|
119
|
-
wasm.TokenDistributionTypeWASM.PreProgrammed,
|
|
120
|
-
'bbbb'
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
assert.equal(claimTransition.constructor.name, 'TokenClaimTransitionWASM')
|
|
124
|
-
assert.notEqual(claimTransition.__wbg_ptr, 0)
|
|
125
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
it('should allow to create claim transition without distribution type', function () {
|
|
129
|
-
const claimTransition = new wasm.TokenClaimTransitionWASM(
|
|
130
|
-
baseTransition
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
assert.equal(claimTransition.constructor.name, 'TokenClaimTransitionWASM')
|
|
134
|
-
assert.notEqual(claimTransition.__wbg_ptr, 0)
|
|
135
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
it('should allow to create emergency action transition', function () {
|
|
139
|
-
const emergencyActionTransition = new wasm.TokenEmergencyActionTransitionWASM(
|
|
140
|
-
baseTransition,
|
|
141
|
-
wasm.TokenDistributionTypeWASM.PreProgrammed,
|
|
142
|
-
'bbbb'
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
assert.equal(emergencyActionTransition.constructor.name, 'TokenEmergencyActionTransitionWASM')
|
|
146
|
-
assert.notEqual(emergencyActionTransition.__wbg_ptr, 0)
|
|
147
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
it('should allow to create config update transition', function () {
|
|
151
|
-
const tradeMode = wasm.TokenTradeModeWASM.NotTradeable()
|
|
152
|
-
|
|
153
|
-
const configUpdateTransition = new wasm.TokenConfigUpdateTransitionWASM(
|
|
154
|
-
baseTransition,
|
|
155
|
-
wasm.TokenConfigurationChangeItemWASM.MarketplaceTradeModeItem(tradeMode),
|
|
156
|
-
'bbbb'
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
assert.equal(configUpdateTransition.constructor.name, 'TokenConfigUpdateTransitionWASM')
|
|
160
|
-
assert.notEqual(configUpdateTransition.__wbg_ptr, 0)
|
|
161
|
-
assert.notEqual(tradeMode.__wbg_ptr, 0)
|
|
162
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
it('should allow to create direct purchase transition', function () {
|
|
166
|
-
const directPurchaseTransition = new wasm.TokenDirectPurchaseTransitionWASM(
|
|
167
|
-
baseTransition,
|
|
168
|
-
BigInt(111),
|
|
169
|
-
BigInt(111)
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
assert.equal(directPurchaseTransition.constructor.name, 'TokenDirectPurchaseTransitionWASM')
|
|
173
|
-
assert.notEqual(directPurchaseTransition.__wbg_ptr, 0)
|
|
174
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
it('should allow to create set price direct purchase transition', function () {
|
|
178
|
-
const price = wasm.TokenPricingScheduleWASM.SetPrices({ 100: 1000 })
|
|
179
|
-
|
|
180
|
-
const setPriceDirectPurchaseTransition = new wasm.TokenSetPriceForDirectPurchaseTransitionWASM(
|
|
181
|
-
baseTransition,
|
|
182
|
-
price,
|
|
183
|
-
'bbbb'
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
assert.equal(price.constructor.name, 'TokenPricingScheduleWASM')
|
|
187
|
-
assert.equal(setPriceDirectPurchaseTransition.constructor.name, 'TokenSetPriceForDirectPurchaseTransitionWASM')
|
|
188
|
-
assert.notEqual(setPriceDirectPurchaseTransition.__wbg_ptr, 0)
|
|
189
|
-
assert.notEqual(price.__wbg_ptr, 0)
|
|
190
|
-
assert.notEqual(baseTransition.__wbg_ptr, 0)
|
|
191
|
-
})
|
|
192
|
-
})
|
|
193
|
-
|
|
194
|
-
describe('getters', () => {
|
|
195
|
-
it('should allow to read getters burn transition', function () {
|
|
196
|
-
const burnTransition = new wasm.TokenBurnTransitionWASM(baseTransition, BigInt(11), 'bbbb')
|
|
197
|
-
|
|
198
|
-
assert.equal(burnTransition.burnAmount, BigInt(11))
|
|
199
|
-
assert.equal(burnTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
200
|
-
assert.equal(burnTransition.publicNote, 'bbbb')
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
it('should allow to read getters mint transition', function () {
|
|
204
|
-
const mintTransition = new wasm.TokenMintTransitionWASM(baseTransition, ownerId, BigInt(11), 'bbbb')
|
|
205
|
-
|
|
206
|
-
assert.equal(mintTransition.amount, BigInt(11))
|
|
207
|
-
assert.equal(mintTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
208
|
-
assert.equal(mintTransition.publicNote, 'bbbb')
|
|
209
|
-
})
|
|
210
|
-
|
|
211
|
-
it('should allow to read getters transfer transition', function () {
|
|
212
|
-
const sharedEncryptedNote = new wasm.SharedEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
213
|
-
const privateEncryptedNote = new wasm.PrivateEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
214
|
-
|
|
215
|
-
const transferTransition = new wasm.TokenTransferTransitionWASM(
|
|
216
|
-
baseTransition,
|
|
217
|
-
ownerId,
|
|
218
|
-
BigInt(11),
|
|
219
|
-
'bbbb',
|
|
220
|
-
sharedEncryptedNote,
|
|
221
|
-
privateEncryptedNote
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
assert.equal(transferTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
225
|
-
assert.equal(transferTransition.amount, BigInt(11))
|
|
226
|
-
assert.equal(transferTransition.publicNote, 'bbbb')
|
|
227
|
-
assert.equal(transferTransition.sharedEncryptedNote.constructor.name, 'SharedEncryptedNoteWASM')
|
|
228
|
-
assert.equal(transferTransition.privateEncryptedNote.constructor.name, 'PrivateEncryptedNoteWASM')
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
it('should allow to read getters freeze transition', function () {
|
|
232
|
-
const freezeTransition = new wasm.TokenFreezeTransitionWASM(
|
|
233
|
-
baseTransition,
|
|
234
|
-
ownerId,
|
|
235
|
-
'bbbb'
|
|
236
|
-
)
|
|
237
|
-
|
|
238
|
-
assert.equal(freezeTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
239
|
-
assert.equal(freezeTransition.frozenIdentityId.base58(), ownerId)
|
|
240
|
-
assert.equal(freezeTransition.publicNote, 'bbbb')
|
|
241
|
-
})
|
|
242
|
-
|
|
243
|
-
it('should allow to read getters unfreeze transition', function () {
|
|
244
|
-
const unfreezeTransition = new wasm.TokenUnFreezeTransitionWASM(
|
|
245
|
-
baseTransition,
|
|
246
|
-
ownerId,
|
|
247
|
-
'bbbb'
|
|
248
|
-
)
|
|
249
|
-
|
|
250
|
-
assert.equal(unfreezeTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
251
|
-
assert.equal(unfreezeTransition.frozenIdentityId.base58(), ownerId)
|
|
252
|
-
assert.equal(unfreezeTransition.publicNote, 'bbbb')
|
|
253
|
-
})
|
|
254
|
-
|
|
255
|
-
it('should allow to read getters destroy frozen funds transition', function () {
|
|
256
|
-
const tokenDestroyFrozenFundsTransition = new wasm.TokenDestroyFrozenFundsTransitionWASM(
|
|
257
|
-
baseTransition,
|
|
258
|
-
ownerId,
|
|
259
|
-
'bbbb'
|
|
260
|
-
)
|
|
261
|
-
|
|
262
|
-
assert.equal(tokenDestroyFrozenFundsTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
263
|
-
assert.equal(tokenDestroyFrozenFundsTransition.frozenIdentityId.base58(), ownerId)
|
|
264
|
-
assert.equal(tokenDestroyFrozenFundsTransition.publicNote, 'bbbb')
|
|
265
|
-
})
|
|
266
|
-
|
|
267
|
-
it('should allow to read getters claim transition', function () {
|
|
268
|
-
const claimTransition = new wasm.TokenClaimTransitionWASM(
|
|
269
|
-
baseTransition,
|
|
270
|
-
wasm.TokenDistributionTypeWASM.PreProgrammed,
|
|
271
|
-
'bbbb'
|
|
272
|
-
)
|
|
273
|
-
|
|
274
|
-
assert.equal(claimTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
275
|
-
assert.equal(claimTransition.distributionType, 'PreProgrammed')
|
|
276
|
-
assert.equal(claimTransition.publicNote, 'bbbb')
|
|
277
|
-
})
|
|
278
|
-
|
|
279
|
-
it('should allow to read getters emergency action transition', function () {
|
|
280
|
-
const emergencyActionTransition = new wasm.TokenEmergencyActionTransitionWASM(
|
|
281
|
-
baseTransition,
|
|
282
|
-
wasm.TokenEmergencyActionWASM.Pause,
|
|
283
|
-
'bbbb'
|
|
284
|
-
)
|
|
285
|
-
|
|
286
|
-
assert.equal(emergencyActionTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
287
|
-
assert.equal(emergencyActionTransition.emergencyAction, 'Pause')
|
|
288
|
-
assert.equal(emergencyActionTransition.publicNote, 'bbbb')
|
|
289
|
-
})
|
|
290
|
-
|
|
291
|
-
it('should allow to read getters config update transition', function () {
|
|
292
|
-
const tradeMode = wasm.TokenTradeModeWASM.NotTradeable()
|
|
293
|
-
|
|
294
|
-
const configUpdateTransition = new wasm.TokenConfigUpdateTransitionWASM(
|
|
295
|
-
baseTransition,
|
|
296
|
-
wasm.TokenConfigurationChangeItemWASM.MarketplaceTradeModeItem(tradeMode),
|
|
297
|
-
'bbbb'
|
|
298
|
-
)
|
|
299
|
-
|
|
300
|
-
assert.equal(configUpdateTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
301
|
-
assert.equal(configUpdateTransition.updateTokenConfigurationItem.constructor.name, 'TokenConfigurationChangeItemWASM')
|
|
302
|
-
assert.equal(configUpdateTransition.publicNote, 'bbbb')
|
|
303
|
-
})
|
|
304
|
-
|
|
305
|
-
it('should allow to read getters direct purchase transition', function () {
|
|
306
|
-
const directPurchaseTransition = new wasm.TokenDirectPurchaseTransitionWASM(
|
|
307
|
-
baseTransition,
|
|
308
|
-
BigInt(111),
|
|
309
|
-
BigInt(111)
|
|
310
|
-
)
|
|
311
|
-
|
|
312
|
-
assert.equal(directPurchaseTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
313
|
-
assert.equal(directPurchaseTransition.tokenCount, BigInt(111))
|
|
314
|
-
assert.equal(directPurchaseTransition.totalAgreedPrice, BigInt(111))
|
|
315
|
-
})
|
|
316
|
-
|
|
317
|
-
it('should allow to read getters set price direct purchase transition', function () {
|
|
318
|
-
const price = wasm.TokenPricingScheduleWASM.SetPrices({ 100: 1000 })
|
|
319
|
-
|
|
320
|
-
const setPriceDirectPurchaseTransition = new wasm.TokenSetPriceForDirectPurchaseTransitionWASM(
|
|
321
|
-
baseTransition,
|
|
322
|
-
price,
|
|
323
|
-
'bbbb'
|
|
324
|
-
)
|
|
325
|
-
|
|
326
|
-
assert.equal(setPriceDirectPurchaseTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
327
|
-
assert.equal(setPriceDirectPurchaseTransition.price.constructor.name, 'TokenPricingScheduleWASM')
|
|
328
|
-
assert.equal(setPriceDirectPurchaseTransition.publicNote, 'bbbb')
|
|
329
|
-
})
|
|
330
|
-
})
|
|
331
|
-
|
|
332
|
-
describe('setters', () => {
|
|
333
|
-
it('should allow to set values burn transition', function () {
|
|
334
|
-
const burnTransition = new wasm.TokenBurnTransitionWASM(baseTransition, BigInt(11), 'bbbb')
|
|
335
|
-
|
|
336
|
-
burnTransition.burnAmount = BigInt(222)
|
|
337
|
-
burnTransition.publicNote = 'aaaa'
|
|
338
|
-
|
|
339
|
-
assert.equal(burnTransition.burnAmount, BigInt(222))
|
|
340
|
-
assert.equal(burnTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
341
|
-
assert.equal(burnTransition.publicNote, 'aaaa')
|
|
342
|
-
})
|
|
343
|
-
|
|
344
|
-
it('should allow to set values mint transition', function () {
|
|
345
|
-
const mintTransition = new wasm.TokenMintTransitionWASM(baseTransition, ownerId, BigInt(11), 'bbbb')
|
|
346
|
-
|
|
347
|
-
mintTransition.amount = BigInt(222)
|
|
348
|
-
mintTransition.publicNote = 'aaaa'
|
|
349
|
-
|
|
350
|
-
assert.equal(mintTransition.amount, BigInt(222))
|
|
351
|
-
assert.equal(mintTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
352
|
-
assert.equal(mintTransition.publicNote, 'aaaa')
|
|
353
|
-
})
|
|
354
|
-
|
|
355
|
-
it('should allow to set values transfer transition', function () {
|
|
356
|
-
const sharedEncryptedNote = new wasm.SharedEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
357
|
-
const privateEncryptedNote = new wasm.PrivateEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
358
|
-
|
|
359
|
-
const transferTransition = new wasm.TokenTransferTransitionWASM(
|
|
360
|
-
baseTransition,
|
|
361
|
-
ownerId,
|
|
362
|
-
BigInt(11),
|
|
363
|
-
'bbbb',
|
|
364
|
-
sharedEncryptedNote,
|
|
365
|
-
privateEncryptedNote
|
|
366
|
-
)
|
|
367
|
-
|
|
368
|
-
const sharedEncryptedNote2 = new wasm.SharedEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
369
|
-
const privateEncryptedNote2 = new wasm.PrivateEncryptedNoteWASM(0, 0, [0, 0, 0])
|
|
370
|
-
|
|
371
|
-
transferTransition.sharedEncryptedNote = sharedEncryptedNote2
|
|
372
|
-
transferTransition.privateEncryptedNote = privateEncryptedNote2
|
|
373
|
-
transferTransition.amount = BigInt(222)
|
|
374
|
-
transferTransition.publicNote = 'aaaa'
|
|
375
|
-
|
|
376
|
-
assert.equal(transferTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
377
|
-
assert.equal(transferTransition.amount, BigInt(222))
|
|
378
|
-
assert.equal(transferTransition.publicNote, 'aaaa')
|
|
379
|
-
assert.equal(transferTransition.sharedEncryptedNote.constructor.name, 'SharedEncryptedNoteWASM')
|
|
380
|
-
assert.equal(transferTransition.privateEncryptedNote.constructor.name, 'PrivateEncryptedNoteWASM')
|
|
381
|
-
assert.notEqual(sharedEncryptedNote2.__wbg_ptr, 0)
|
|
382
|
-
assert.notEqual(privateEncryptedNote2.__wbg_ptr, 0)
|
|
383
|
-
})
|
|
384
|
-
|
|
385
|
-
it('should allow to set values freeze transition', function () {
|
|
386
|
-
const freezeTransition = new wasm.TokenFreezeTransitionWASM(
|
|
387
|
-
baseTransition,
|
|
388
|
-
ownerId,
|
|
389
|
-
'bbbb'
|
|
390
|
-
)
|
|
391
|
-
|
|
392
|
-
freezeTransition.frozenIdentityId = dataContractId
|
|
393
|
-
freezeTransition.publicNote = 'aaaa'
|
|
394
|
-
|
|
395
|
-
assert.equal(freezeTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
396
|
-
assert.equal(freezeTransition.frozenIdentityId.base58(), dataContractId)
|
|
397
|
-
assert.equal(freezeTransition.publicNote, 'aaaa')
|
|
398
|
-
})
|
|
399
|
-
|
|
400
|
-
it('should allow to set values unfreeze transition', function () {
|
|
401
|
-
const unfreezeTransition = new wasm.TokenUnFreezeTransitionWASM(
|
|
402
|
-
baseTransition,
|
|
403
|
-
ownerId,
|
|
404
|
-
'bbbb'
|
|
405
|
-
)
|
|
406
|
-
|
|
407
|
-
unfreezeTransition.frozenIdentityId = dataContractId
|
|
408
|
-
unfreezeTransition.publicNote = 'aaaa'
|
|
409
|
-
|
|
410
|
-
assert.equal(unfreezeTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
411
|
-
assert.equal(unfreezeTransition.frozenIdentityId.base58(), dataContractId)
|
|
412
|
-
assert.equal(unfreezeTransition.publicNote, 'aaaa')
|
|
413
|
-
})
|
|
414
|
-
|
|
415
|
-
it('should allow to set values destroy frozen funds transition', function () {
|
|
416
|
-
const tokenDestroyFrozenFundsTransition = new wasm.TokenDestroyFrozenFundsTransitionWASM(
|
|
417
|
-
baseTransition,
|
|
418
|
-
ownerId,
|
|
419
|
-
'bbbb'
|
|
420
|
-
)
|
|
421
|
-
|
|
422
|
-
tokenDestroyFrozenFundsTransition.frozenIdentityId = dataContractId
|
|
423
|
-
tokenDestroyFrozenFundsTransition.publicNote = 'aaaa'
|
|
424
|
-
|
|
425
|
-
assert.equal(tokenDestroyFrozenFundsTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
426
|
-
assert.equal(tokenDestroyFrozenFundsTransition.frozenIdentityId.base58(), dataContractId)
|
|
427
|
-
assert.equal(tokenDestroyFrozenFundsTransition.publicNote, 'aaaa')
|
|
428
|
-
})
|
|
429
|
-
|
|
430
|
-
it('should allow to set values claim transition', function () {
|
|
431
|
-
const claimTransition = new wasm.TokenClaimTransitionWASM(
|
|
432
|
-
baseTransition,
|
|
433
|
-
wasm.TokenDistributionTypeWASM.Perpetual,
|
|
434
|
-
'bbbb'
|
|
435
|
-
)
|
|
436
|
-
|
|
437
|
-
claimTransition.distributionType = wasm.TokenDistributionTypeWASM.Perpetual
|
|
438
|
-
claimTransition.publicNote = 'aaaa'
|
|
439
|
-
|
|
440
|
-
assert.equal(claimTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
441
|
-
assert.equal(claimTransition.distributionType, 'Perpetual')
|
|
442
|
-
assert.equal(claimTransition.publicNote, 'aaaa')
|
|
443
|
-
})
|
|
444
|
-
|
|
445
|
-
it('should allow to set values emergency action transition', function () {
|
|
446
|
-
const emergencyActionTransition = new wasm.TokenEmergencyActionTransitionWASM(
|
|
447
|
-
baseTransition,
|
|
448
|
-
wasm.TokenEmergencyActionWASM.Pause,
|
|
449
|
-
'bbbb'
|
|
450
|
-
)
|
|
451
|
-
|
|
452
|
-
emergencyActionTransition.emergencyAction = wasm.TokenEmergencyActionWASM.Resume
|
|
453
|
-
emergencyActionTransition.publicNote = 'aaaa'
|
|
454
|
-
|
|
455
|
-
assert.equal(emergencyActionTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
456
|
-
assert.equal(emergencyActionTransition.emergencyAction, 'Resume')
|
|
457
|
-
assert.equal(emergencyActionTransition.publicNote, 'aaaa')
|
|
458
|
-
})
|
|
459
|
-
|
|
460
|
-
it('should allow to set values config update transition', function () {
|
|
461
|
-
// At this moment available only one trade mode
|
|
462
|
-
const tradeMode = wasm.TokenTradeModeWASM.NotTradeable()
|
|
463
|
-
|
|
464
|
-
const configUpdateTransition = new wasm.TokenConfigUpdateTransitionWASM(
|
|
465
|
-
baseTransition,
|
|
466
|
-
wasm.TokenConfigurationChangeItemWASM.MarketplaceTradeModeItem(tradeMode),
|
|
467
|
-
'bbbb'
|
|
468
|
-
)
|
|
469
|
-
|
|
470
|
-
configUpdateTransition.publicNote = 'aaaa'
|
|
471
|
-
|
|
472
|
-
assert.equal(configUpdateTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
473
|
-
assert.equal(configUpdateTransition.updateTokenConfigurationItem.constructor.name, 'TokenConfigurationChangeItemWASM')
|
|
474
|
-
assert.equal(configUpdateTransition.publicNote, 'aaaa')
|
|
475
|
-
})
|
|
476
|
-
|
|
477
|
-
it('should allow to set values direct purchase transition', function () {
|
|
478
|
-
const directPurchaseTransition = new wasm.TokenDirectPurchaseTransitionWASM(
|
|
479
|
-
baseTransition,
|
|
480
|
-
BigInt(111),
|
|
481
|
-
BigInt(111)
|
|
482
|
-
)
|
|
483
|
-
|
|
484
|
-
directPurchaseTransition.tokenCount = BigInt(222)
|
|
485
|
-
directPurchaseTransition.totalAgreedPrice = BigInt(222)
|
|
486
|
-
|
|
487
|
-
assert.equal(directPurchaseTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
488
|
-
assert.equal(directPurchaseTransition.tokenCount, BigInt(222))
|
|
489
|
-
assert.equal(directPurchaseTransition.totalAgreedPrice, BigInt(222))
|
|
490
|
-
})
|
|
491
|
-
|
|
492
|
-
it('should allow to set values set price direct purchase transition', function () {
|
|
493
|
-
const price = wasm.TokenPricingScheduleWASM.SetPrices({ 100: 1000 })
|
|
494
|
-
|
|
495
|
-
const setPriceDirectPurchaseTransition = new wasm.TokenSetPriceForDirectPurchaseTransitionWASM(
|
|
496
|
-
baseTransition,
|
|
497
|
-
price,
|
|
498
|
-
'bbbb'
|
|
499
|
-
)
|
|
500
|
-
|
|
501
|
-
setPriceDirectPurchaseTransition.price = wasm.TokenPricingScheduleWASM.SetPrices({ 101: 1010 })
|
|
502
|
-
setPriceDirectPurchaseTransition.publicNote = 'aaaa'
|
|
503
|
-
|
|
504
|
-
assert.equal(setPriceDirectPurchaseTransition.base.constructor.name, 'TokenBaseTransitionWASM')
|
|
505
|
-
assert.equal(setPriceDirectPurchaseTransition.price.constructor.name, 'TokenPricingScheduleWASM')
|
|
506
|
-
assert.equal(setPriceDirectPurchaseTransition.publicNote, 'aaaa')
|
|
507
|
-
})
|
|
508
|
-
})
|
|
509
|
-
})
|