pshenmic-dpp 1.1.2-dev.8 → 2.0.0-dev.1
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 +1696 -0
- package/dist/binaries/bindingsTypes.js +98 -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 +51 -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 +13 -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 +35 -0
- package/dist/src/dpp/structs/DataContract.js +116 -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 +274 -0
- package/dist/src/dpp/types.js +1 -0
- package/dist/src/dpp/utils.d.ts +5 -0
- package/dist/src/dpp/utils.js +64 -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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
export class TxOutWASM {
|
|
3
|
+
_rawTxOut;
|
|
4
|
+
constructor(value, scriptPubKey) {
|
|
5
|
+
const rsValue = value.toString();
|
|
6
|
+
this._rawTxOut = new dppProvider.dpp.TxOutNAPI(rsValue, scriptPubKey);
|
|
7
|
+
}
|
|
8
|
+
get value() {
|
|
9
|
+
return BigInt(this._rawTxOut.value);
|
|
10
|
+
}
|
|
11
|
+
set value(value) {
|
|
12
|
+
this._rawTxOut.value = value.toString();
|
|
13
|
+
}
|
|
14
|
+
get scriptPubKeyHex() {
|
|
15
|
+
return this._rawTxOut.scriptPubKeyHex;
|
|
16
|
+
}
|
|
17
|
+
set scriptPubKeyHex(script) {
|
|
18
|
+
this._rawTxOut.scriptPubKeyHex = script;
|
|
19
|
+
}
|
|
20
|
+
get scriptPubKeyBytes() {
|
|
21
|
+
return this._rawTxOut.scriptPubKeyBytes;
|
|
22
|
+
}
|
|
23
|
+
set scriptPubKeyBytes(script) {
|
|
24
|
+
this._rawTxOut.scriptPubKeyBytes = script;
|
|
25
|
+
}
|
|
26
|
+
getScriptPubKeyASM() {
|
|
27
|
+
return this._rawTxOut.getScriptPubKeyASM();
|
|
28
|
+
}
|
|
29
|
+
static createFromRawInstance(rawInstance) {
|
|
30
|
+
const instance = Object.create(this.prototype);
|
|
31
|
+
instance._rawTxOut = rawInstance;
|
|
32
|
+
return instance;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WitnessNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
export declare class WitnessWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawWitness: WitnessNAPI;
|
|
5
|
+
constructor(bytes?: Uint8Array[]);
|
|
6
|
+
getBytes(): Uint8Array[];
|
|
7
|
+
isEmpty(): boolean;
|
|
8
|
+
clear(): void;
|
|
9
|
+
push(value: Uint8Array): void;
|
|
10
|
+
static createFromRawInstance(rawInstance: WitnessNAPI): WitnessWASM;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
export class WitnessWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawWitness;
|
|
5
|
+
constructor(bytes) {
|
|
6
|
+
this._rawWitness = new dppProvider.dpp.WitnessNAPI(bytes);
|
|
7
|
+
}
|
|
8
|
+
getBytes() {
|
|
9
|
+
return this._rawWitness.getBytes();
|
|
10
|
+
}
|
|
11
|
+
isEmpty() {
|
|
12
|
+
return this._rawWitness.isEmpty();
|
|
13
|
+
}
|
|
14
|
+
clear() {
|
|
15
|
+
this._rawWitness.clear();
|
|
16
|
+
}
|
|
17
|
+
push(value) {
|
|
18
|
+
this._rawWitness.push(value);
|
|
19
|
+
}
|
|
20
|
+
static createFromRawInstance(rawInstance) {
|
|
21
|
+
const instance = Object.create(this.prototype);
|
|
22
|
+
instance._rawWitness = rawInstance;
|
|
23
|
+
return instance;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BatchTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { IdentifierLike } from '../../types.js';
|
|
3
|
+
import { BatchedTransitionWASM } from './BatchedTransition.js';
|
|
4
|
+
import { DocumentTransitionWASM } from './DocumentTransition.js';
|
|
5
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
6
|
+
import { StateTransitionWASM } from '../StateTransition.js';
|
|
7
|
+
export declare class BatchTransitionWASM {
|
|
8
|
+
/** @private **/
|
|
9
|
+
_rawBatchTransition: BatchTransitionNAPI;
|
|
10
|
+
constructor(transitions: BatchedTransitionWASM[], ownerId: IdentifierLike, userFeeIncrease?: number, signaturePublicKeyId?: number, signature?: Uint8Array);
|
|
11
|
+
constructor(transitions: DocumentTransitionWASM[], ownerId: IdentifierLike, userFeeIncrease?: number, signaturePublicKeyId?: number, signature?: Uint8Array);
|
|
12
|
+
get transitions(): BatchedTransitionWASM[];
|
|
13
|
+
set transitions(value: BatchedTransitionWASM[]);
|
|
14
|
+
get signature(): Uint8Array;
|
|
15
|
+
set signature(value: Uint8Array);
|
|
16
|
+
get signaturePublicKeyId(): number;
|
|
17
|
+
set signaturePublicKeyId(value: number);
|
|
18
|
+
get allPurchasesAmount(): bigint | undefined;
|
|
19
|
+
get ownerId(): IdentifierWASM;
|
|
20
|
+
get modifiedDataIds(): IdentifierWASM[];
|
|
21
|
+
get allConflictingIndexCollateralVotingFunds(): bigint | undefined;
|
|
22
|
+
setIdentityContractNonce(nonce: bigint): void;
|
|
23
|
+
bytes(): Uint8Array;
|
|
24
|
+
hex(): string;
|
|
25
|
+
base64(): string;
|
|
26
|
+
toStateTransition(): StateTransitionWASM;
|
|
27
|
+
static fromV1BatchedTransitions(batchedTransitions: BatchedTransitionWASM[], ownerId: IdentifierLike, userFeeIncrease?: number, signaturePublicKeyId?: number, signature?: Uint8Array): BatchTransitionWASM;
|
|
28
|
+
static fromV0Transitions(documentTransitions: DocumentTransitionWASM[], ownerId: IdentifierLike, userFeeIncrease?: number, signaturePublicKeyId?: number, signature?: Uint8Array): BatchTransitionWASM;
|
|
29
|
+
static fromBytes(bytes: Uint8Array): BatchTransitionWASM;
|
|
30
|
+
static fromBase64(base64: string): BatchTransitionWASM;
|
|
31
|
+
static fromHex(hex: string): BatchTransitionWASM;
|
|
32
|
+
static fromStateTransition(stateTransition: StateTransitionWASM): BatchTransitionWASM;
|
|
33
|
+
static createFromRawInstance(rawInstance: BatchTransitionNAPI): BatchTransitionWASM;
|
|
34
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { BatchedTransitionWASM } from './BatchedTransition.js';
|
|
3
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
import { StateTransitionWASM } from '../StateTransition.js';
|
|
6
|
+
export class BatchTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawBatchTransition;
|
|
9
|
+
constructor(transitions, ownerId, userFeeIncrease, signaturePublicKeyId, signature) {
|
|
10
|
+
if (transitions.length === 0) {
|
|
11
|
+
throw new Error('transitions array must not be empty');
|
|
12
|
+
}
|
|
13
|
+
const [transition] = transitions;
|
|
14
|
+
if (transition instanceof BatchedTransitionWASM) {
|
|
15
|
+
this._rawBatchTransition = dppProvider.dpp.BatchTransitionNAPI.fromV1BatchedTransitions(transitions.map(t => t._rawTransition), prepareIdentifierValue(ownerId), userFeeIncrease, signaturePublicKeyId, signature);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this._rawBatchTransition = dppProvider.dpp.BatchTransitionNAPI.fromV0Transitions(transitions.map(t => t._rawTransition), prepareIdentifierValue(ownerId), userFeeIncrease, signaturePublicKeyId, signature);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
get transitions() {
|
|
22
|
+
return this._rawBatchTransition.transitions.map(BatchedTransitionWASM.createFromRawInstance);
|
|
23
|
+
}
|
|
24
|
+
set transitions(value) {
|
|
25
|
+
this._rawBatchTransition.transitions = value.map(t => t._rawTransition);
|
|
26
|
+
}
|
|
27
|
+
get signature() {
|
|
28
|
+
return this._rawBatchTransition.signature;
|
|
29
|
+
}
|
|
30
|
+
set signature(value) {
|
|
31
|
+
this._rawBatchTransition.signature = value;
|
|
32
|
+
}
|
|
33
|
+
get signaturePublicKeyId() {
|
|
34
|
+
return this._rawBatchTransition.signaturePublicKeyId;
|
|
35
|
+
}
|
|
36
|
+
set signaturePublicKeyId(value) {
|
|
37
|
+
this._rawBatchTransition.signaturePublicKeyId = value;
|
|
38
|
+
}
|
|
39
|
+
get allPurchasesAmount() {
|
|
40
|
+
const amount = this._rawBatchTransition.allPurchasesAmount;
|
|
41
|
+
if (amount != null) {
|
|
42
|
+
return BigInt(amount);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
get ownerId() {
|
|
46
|
+
return IdentifierWASM.createFromRawInstance(this._rawBatchTransition.ownerId);
|
|
47
|
+
}
|
|
48
|
+
get modifiedDataIds() {
|
|
49
|
+
return this._rawBatchTransition.modifiedDataIds.map(IdentifierWASM.createFromRawInstance);
|
|
50
|
+
}
|
|
51
|
+
get allConflictingIndexCollateralVotingFunds() {
|
|
52
|
+
const funds = this._rawBatchTransition.allConflictingIndexCollateralVotingFunds;
|
|
53
|
+
if (funds != null) {
|
|
54
|
+
return BigInt(funds);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
setIdentityContractNonce(nonce) {
|
|
58
|
+
this._rawBatchTransition.setIdentityContractNonce(nonce.toString());
|
|
59
|
+
}
|
|
60
|
+
bytes() {
|
|
61
|
+
return this._rawBatchTransition.bytes();
|
|
62
|
+
}
|
|
63
|
+
hex() {
|
|
64
|
+
return this._rawBatchTransition.hex();
|
|
65
|
+
}
|
|
66
|
+
base64() {
|
|
67
|
+
return this._rawBatchTransition.base64();
|
|
68
|
+
}
|
|
69
|
+
toStateTransition() {
|
|
70
|
+
return StateTransitionWASM.createFromRawInstance(this._rawBatchTransition.toStateTransition());
|
|
71
|
+
}
|
|
72
|
+
static fromV1BatchedTransitions(batchedTransitions, ownerId, userFeeIncrease, signaturePublicKeyId, signature) {
|
|
73
|
+
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromV1BatchedTransitions(batchedTransitions.map(t => t._rawTransition), prepareIdentifierValue(ownerId), userFeeIncrease, signaturePublicKeyId, signature));
|
|
74
|
+
}
|
|
75
|
+
static fromV0Transitions(documentTransitions, ownerId, userFeeIncrease, signaturePublicKeyId, signature) {
|
|
76
|
+
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromV0Transitions(documentTransitions.map(t => t._rawTransition), prepareIdentifierValue(ownerId), userFeeIncrease, signaturePublicKeyId, signature));
|
|
77
|
+
}
|
|
78
|
+
static fromBytes(bytes) {
|
|
79
|
+
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromBytes(bytes));
|
|
80
|
+
}
|
|
81
|
+
static fromBase64(base64) {
|
|
82
|
+
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromBase64(base64));
|
|
83
|
+
}
|
|
84
|
+
static fromHex(hex) {
|
|
85
|
+
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromHex(hex));
|
|
86
|
+
}
|
|
87
|
+
static fromStateTransition(stateTransition) {
|
|
88
|
+
return BatchTransitionWASM.createFromRawInstance(dppProvider.dpp.BatchTransitionNAPI.fromStateTransition(stateTransition._rawStateTransition));
|
|
89
|
+
}
|
|
90
|
+
static createFromRawInstance(rawInstance) {
|
|
91
|
+
const instance = Object.create(this.prototype);
|
|
92
|
+
instance._rawBatchTransition = rawInstance;
|
|
93
|
+
return instance;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BatchedTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenTransitionWASM } from './TokenTransition.js';
|
|
3
|
+
import { DocumentTransitionWASM } from './DocumentTransition.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
export declare class BatchedTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawTransition: BatchedTransitionNAPI;
|
|
8
|
+
constructor(transition: TokenTransitionWASM | DocumentTransitionWASM);
|
|
9
|
+
get dataContractId(): IdentifierWASM;
|
|
10
|
+
set dataContractId(value: IdentifierWASM);
|
|
11
|
+
toTransition(): DocumentTransitionWASM | TokenTransitionWASM;
|
|
12
|
+
static createFromRawInstance(rawInstance: BatchedTransitionNAPI): BatchedTransitionWASM;
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TokenTransitionWASM } from './TokenTransition.js';
|
|
2
|
+
import { DocumentTransitionWASM } from './DocumentTransition.js';
|
|
3
|
+
import { dppProvider } from '../../provider.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
6
|
+
export class BatchedTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawTransition;
|
|
9
|
+
constructor(transition) {
|
|
10
|
+
let raw;
|
|
11
|
+
if (transition instanceof DocumentTransitionWASM) {
|
|
12
|
+
raw = new dppProvider.dpp.BatchedTransitionNAPI(transition._rawTransition);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
raw = new dppProvider.dpp.BatchedTransitionNAPI(transition._rawTokenTransition);
|
|
16
|
+
}
|
|
17
|
+
this._rawTransition = raw;
|
|
18
|
+
}
|
|
19
|
+
get dataContractId() {
|
|
20
|
+
return IdentifierWASM.createFromRawInstance(this._rawTransition.dataContractId);
|
|
21
|
+
}
|
|
22
|
+
set dataContractId(value) {
|
|
23
|
+
this._rawTransition.dataContractId = prepareIdentifierValue(value);
|
|
24
|
+
}
|
|
25
|
+
toTransition() {
|
|
26
|
+
const raw = this._rawTransition.toTransition();
|
|
27
|
+
if (raw instanceof dppProvider.dpp.DocumentTransitionNAPI) {
|
|
28
|
+
return DocumentTransitionWASM.createFromRawInstance(raw);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return TokenTransitionWASM.createFromRawInstance(raw);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
static createFromRawInstance(rawInstance) {
|
|
35
|
+
const instance = Object.create(this.prototype);
|
|
36
|
+
instance._rawTransition = rawInstance;
|
|
37
|
+
return instance;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DocumentBaseTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { IdentifierLike } from '../../types.js';
|
|
3
|
+
import { TokenPaymentInfoWASM } from './TokenPaymentInfo.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
export declare class DocumentBaseTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawDocumentBaseTransition: DocumentBaseTransitionNAPI;
|
|
8
|
+
constructor(documentId: IdentifierLike, identityContractNonce: bigint, documentTypeName: string, dataContractId: IdentifierLike, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
9
|
+
get id(): IdentifierWASM;
|
|
10
|
+
set id(id: IdentifierWASM);
|
|
11
|
+
get identityContractNonce(): bigint;
|
|
12
|
+
set identityContractNonce(identityContractNonce: bigint);
|
|
13
|
+
get dataContractId(): IdentifierWASM;
|
|
14
|
+
set dataContractId(id: IdentifierWASM);
|
|
15
|
+
get documentTypeName(): string;
|
|
16
|
+
set documentTypeName(name: string);
|
|
17
|
+
get tokenPaymentInfo(): TokenPaymentInfoWASM | undefined;
|
|
18
|
+
set tokenPaymentInfo(tokenPaymentInfo: TokenPaymentInfoWASM | undefined);
|
|
19
|
+
static createFromRawInstance(rawInstance: DocumentBaseTransitionNAPI): DocumentBaseTransitionWASM;
|
|
20
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { TokenPaymentInfoWASM } from './TokenPaymentInfo.js';
|
|
2
|
+
import { dppProvider } from '../../provider.js';
|
|
3
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
export class DocumentBaseTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawDocumentBaseTransition;
|
|
8
|
+
constructor(documentId, identityContractNonce, documentTypeName, dataContractId, tokenPaymentInfo) {
|
|
9
|
+
this._rawDocumentBaseTransition = new dppProvider.dpp.DocumentBaseTransitionNAPI(prepareIdentifierValue(documentId), identityContractNonce?.toString(), documentTypeName, prepareIdentifierValue(dataContractId), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
10
|
+
}
|
|
11
|
+
get id() {
|
|
12
|
+
return IdentifierWASM.createFromRawInstance(this._rawDocumentBaseTransition.id);
|
|
13
|
+
}
|
|
14
|
+
set id(id) {
|
|
15
|
+
this._rawDocumentBaseTransition.id = id._rawIdentifier;
|
|
16
|
+
}
|
|
17
|
+
get identityContractNonce() {
|
|
18
|
+
return BigInt(this._rawDocumentBaseTransition.identityContractNonce);
|
|
19
|
+
}
|
|
20
|
+
set identityContractNonce(identityContractNonce) {
|
|
21
|
+
this._rawDocumentBaseTransition.identityContractNonce = identityContractNonce?.toString();
|
|
22
|
+
}
|
|
23
|
+
get dataContractId() {
|
|
24
|
+
return IdentifierWASM.createFromRawInstance(this._rawDocumentBaseTransition.dataContractId);
|
|
25
|
+
}
|
|
26
|
+
set dataContractId(id) {
|
|
27
|
+
this._rawDocumentBaseTransition.dataContractId = id._rawIdentifier;
|
|
28
|
+
}
|
|
29
|
+
get documentTypeName() {
|
|
30
|
+
return this._rawDocumentBaseTransition.documentTypeName;
|
|
31
|
+
}
|
|
32
|
+
set documentTypeName(name) {
|
|
33
|
+
this._rawDocumentBaseTransition.documentTypeName = name;
|
|
34
|
+
}
|
|
35
|
+
get tokenPaymentInfo() {
|
|
36
|
+
const info = this._rawDocumentBaseTransition.tokenPaymentInfo;
|
|
37
|
+
if (info != null) {
|
|
38
|
+
return TokenPaymentInfoWASM.crateFromRawInstance(info);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
set tokenPaymentInfo(tokenPaymentInfo) {
|
|
42
|
+
if (tokenPaymentInfo != null) {
|
|
43
|
+
this._rawDocumentBaseTransition.tokenPaymentInfo = tokenPaymentInfo._rawTokenPaymentInfo;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this._rawDocumentBaseTransition.clearTokenPaymentInfo();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static createFromRawInstance(rawInstance) {
|
|
50
|
+
const instance = Object.create(this.prototype);
|
|
51
|
+
instance._rawDocumentBaseTransition = rawInstance;
|
|
52
|
+
return instance;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DocumentTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { DocumentCreateTransitionWASM } from './DocumentTransitions/DocumentCreateTransition.js';
|
|
3
|
+
import { DocumentReplaceTransitionWASM } from './DocumentTransitions/DocumentReplaceTransition.js';
|
|
4
|
+
import { DocumentDeleteTransitionWASM } from './DocumentTransitions/DocumentDeleteTransition.js';
|
|
5
|
+
import { DocumentPurchaseTransitionWASM } from './DocumentTransitions/DocumentPurchaseTransition.js';
|
|
6
|
+
import { DocumentTransferTransitionWASM } from './DocumentTransitions/DocumentTransferTransition.js';
|
|
7
|
+
import { DocumentUpdatePriceTransitionWASM } from './DocumentTransitions/DocumentUpdatePriceTransition.js';
|
|
8
|
+
import { DocumentTransitionLike, IdentifierLike } from '../../types.js';
|
|
9
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
10
|
+
export declare class DocumentTransitionWASM {
|
|
11
|
+
/** @private **/
|
|
12
|
+
_rawTransition: DocumentTransitionNAPI;
|
|
13
|
+
constructor(transition: DocumentTransitionLike);
|
|
14
|
+
get actionType(): string;
|
|
15
|
+
get actionTypeNumber(): number;
|
|
16
|
+
get dataContractId(): IdentifierWASM;
|
|
17
|
+
set dataContractId(value: IdentifierLike);
|
|
18
|
+
get id(): IdentifierWASM;
|
|
19
|
+
get documentTypeName(): string;
|
|
20
|
+
get identityContractNonce(): bigint;
|
|
21
|
+
set identityContractNonce(value: bigint);
|
|
22
|
+
get revision(): bigint | undefined;
|
|
23
|
+
set revision(value: bigint);
|
|
24
|
+
get entropy(): Uint8Array | undefined;
|
|
25
|
+
get createTransition(): DocumentCreateTransitionWASM;
|
|
26
|
+
get deleteTransition(): DocumentDeleteTransitionWASM;
|
|
27
|
+
get purchaseTransition(): DocumentPurchaseTransitionWASM;
|
|
28
|
+
get replaceTransition(): DocumentReplaceTransitionWASM;
|
|
29
|
+
get transferTransition(): DocumentTransferTransitionWASM;
|
|
30
|
+
get updatePriceTransition(): DocumentUpdatePriceTransitionWASM;
|
|
31
|
+
static createFromRawInstance(rawInstance: DocumentTransitionNAPI): DocumentTransitionWASM;
|
|
32
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { DocumentCreateTransitionWASM } from './DocumentTransitions/DocumentCreateTransition.js';
|
|
2
|
+
import { DocumentReplaceTransitionWASM } from './DocumentTransitions/DocumentReplaceTransition.js';
|
|
3
|
+
import { DocumentDeleteTransitionWASM } from './DocumentTransitions/DocumentDeleteTransition.js';
|
|
4
|
+
import { DocumentPurchaseTransitionWASM } from './DocumentTransitions/DocumentPurchaseTransition.js';
|
|
5
|
+
import { DocumentTransferTransitionWASM } from './DocumentTransitions/DocumentTransferTransition.js';
|
|
6
|
+
import { DocumentUpdatePriceTransitionWASM } from './DocumentTransitions/DocumentUpdatePriceTransition.js';
|
|
7
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
8
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
9
|
+
export class DocumentTransitionWASM {
|
|
10
|
+
/** @private **/
|
|
11
|
+
_rawTransition;
|
|
12
|
+
constructor(transition) {
|
|
13
|
+
this._rawTransition = transition.toDocumentTransition()._rawTransition;
|
|
14
|
+
}
|
|
15
|
+
get actionType() {
|
|
16
|
+
return this._rawTransition.actionType;
|
|
17
|
+
}
|
|
18
|
+
get actionTypeNumber() {
|
|
19
|
+
return this._rawTransition.actionTypeNumber;
|
|
20
|
+
}
|
|
21
|
+
get dataContractId() {
|
|
22
|
+
return IdentifierWASM.createFromRawInstance(this._rawTransition.dataContractId);
|
|
23
|
+
}
|
|
24
|
+
set dataContractId(value) {
|
|
25
|
+
this._rawTransition.dataContractId = prepareIdentifierValue(value);
|
|
26
|
+
}
|
|
27
|
+
get id() {
|
|
28
|
+
return IdentifierWASM.createFromRawInstance(this._rawTransition.id);
|
|
29
|
+
}
|
|
30
|
+
get documentTypeName() {
|
|
31
|
+
return this._rawTransition.documentTypeName;
|
|
32
|
+
}
|
|
33
|
+
get identityContractNonce() {
|
|
34
|
+
return BigInt(this._rawTransition.identityContractNonce);
|
|
35
|
+
}
|
|
36
|
+
set identityContractNonce(value) {
|
|
37
|
+
this._rawTransition.identityContractNonce = value.toString();
|
|
38
|
+
}
|
|
39
|
+
get revision() {
|
|
40
|
+
const rev = this._rawTransition.revision;
|
|
41
|
+
if (rev != null) {
|
|
42
|
+
return BigInt(rev);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
set revision(value) {
|
|
46
|
+
this._rawTransition.revision = value.toString();
|
|
47
|
+
}
|
|
48
|
+
get entropy() {
|
|
49
|
+
return this._rawTransition.entropy ?? undefined;
|
|
50
|
+
}
|
|
51
|
+
get createTransition() {
|
|
52
|
+
return DocumentCreateTransitionWASM.createFromRawInstance(this._rawTransition.createTransition);
|
|
53
|
+
}
|
|
54
|
+
get deleteTransition() {
|
|
55
|
+
return DocumentDeleteTransitionWASM.createFromRawInstance(this._rawTransition.deleteTransition);
|
|
56
|
+
}
|
|
57
|
+
get purchaseTransition() {
|
|
58
|
+
return DocumentPurchaseTransitionWASM.createFromRawInstance(this._rawTransition.purchaseTransition);
|
|
59
|
+
}
|
|
60
|
+
get replaceTransition() {
|
|
61
|
+
return DocumentReplaceTransitionWASM.createFromRawInstance(this._rawTransition.replaceTransition);
|
|
62
|
+
}
|
|
63
|
+
get transferTransition() {
|
|
64
|
+
return DocumentTransferTransitionWASM.createFromRawInstance(this._rawTransition.transferTransition);
|
|
65
|
+
}
|
|
66
|
+
get updatePriceTransition() {
|
|
67
|
+
return DocumentUpdatePriceTransitionWASM.createFromRawInstance(this._rawTransition.updatePriceTransition);
|
|
68
|
+
}
|
|
69
|
+
static createFromRawInstance(rawInstance) {
|
|
70
|
+
const instance = Object.create(this.prototype);
|
|
71
|
+
instance._rawTransition = rawInstance;
|
|
72
|
+
return instance;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DocumentCreateTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { DocumentWASM } from '../../Document.js';
|
|
3
|
+
import { PrefundedVotingBalanceWASM } from '../PrefundedVotingBalance.js';
|
|
4
|
+
import { TokenPaymentInfoWASM } from '../TokenPaymentInfo.js';
|
|
5
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
6
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
7
|
+
export declare class DocumentCreateTransitionWASM {
|
|
8
|
+
/** @private **/
|
|
9
|
+
_rawDocumentCreateTransition: DocumentCreateTransitionNAPI;
|
|
10
|
+
constructor(document: DocumentWASM, identityContractNonce: bigint, prefundedVotingBalance?: PrefundedVotingBalanceWASM, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
11
|
+
get data(): object;
|
|
12
|
+
set data(value: object);
|
|
13
|
+
get base(): DocumentBaseTransitionWASM;
|
|
14
|
+
set base(value: DocumentBaseTransitionWASM);
|
|
15
|
+
get entropy(): Uint8Array;
|
|
16
|
+
set entropy(value: Uint8Array);
|
|
17
|
+
get prefundedVotingBalance(): PrefundedVotingBalanceWASM | undefined;
|
|
18
|
+
set prefundedVotingBalance(value: PrefundedVotingBalanceWASM | undefined);
|
|
19
|
+
clearPrefundedVotingBalance(): void;
|
|
20
|
+
toDocumentTransition(): DocumentTransitionWASM;
|
|
21
|
+
static fromDocumentTransition(transition: DocumentTransitionWASM): DocumentCreateTransitionWASM;
|
|
22
|
+
static createFromRawInstance(rawInstance: DocumentCreateTransitionNAPI): DocumentCreateTransitionWASM;
|
|
23
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PrefundedVotingBalanceWASM } from '../PrefundedVotingBalance.js';
|
|
2
|
+
import { dppProvider } from '../../../provider.js';
|
|
3
|
+
import { valueFromDynamicValue, valueToDynamicValue } from '../../../utils.js';
|
|
4
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
5
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
6
|
+
export class DocumentCreateTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawDocumentCreateTransition;
|
|
9
|
+
constructor(document, identityContractNonce, prefundedVotingBalance, tokenPaymentInfo) {
|
|
10
|
+
this._rawDocumentCreateTransition = new dppProvider.dpp.DocumentCreateTransitionNAPI(document._rawDocument, identityContractNonce.toString(), prefundedVotingBalance?._rawPrefundedVotingBalance, tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
11
|
+
}
|
|
12
|
+
get data() {
|
|
13
|
+
return valueFromDynamicValue(this._rawDocumentCreateTransition.data);
|
|
14
|
+
}
|
|
15
|
+
set data(value) {
|
|
16
|
+
this._rawDocumentCreateTransition.data = valueToDynamicValue(value);
|
|
17
|
+
}
|
|
18
|
+
get base() {
|
|
19
|
+
return DocumentBaseTransitionWASM.createFromRawInstance(this._rawDocumentCreateTransition.base);
|
|
20
|
+
}
|
|
21
|
+
set base(value) {
|
|
22
|
+
this._rawDocumentCreateTransition.base = value._rawDocumentBaseTransition;
|
|
23
|
+
}
|
|
24
|
+
get entropy() {
|
|
25
|
+
return this._rawDocumentCreateTransition.entropy;
|
|
26
|
+
}
|
|
27
|
+
set entropy(value) {
|
|
28
|
+
this._rawDocumentCreateTransition.entropy = value;
|
|
29
|
+
}
|
|
30
|
+
get prefundedVotingBalance() {
|
|
31
|
+
const balance = this._rawDocumentCreateTransition.prefundedVotingBalance;
|
|
32
|
+
if (balance != null) {
|
|
33
|
+
return PrefundedVotingBalanceWASM.createFromRawInstance(balance);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
set prefundedVotingBalance(value) {
|
|
37
|
+
if (value != null) {
|
|
38
|
+
this._rawDocumentCreateTransition.prefundedVotingBalance = value._rawPrefundedVotingBalance;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this._rawDocumentCreateTransition.clearPrefundedVotingBalance();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
clearPrefundedVotingBalance() {
|
|
45
|
+
this._rawDocumentCreateTransition.clearPrefundedVotingBalance();
|
|
46
|
+
}
|
|
47
|
+
toDocumentTransition() {
|
|
48
|
+
return DocumentTransitionWASM.createFromRawInstance(this._rawDocumentCreateTransition.toDocumentTransition());
|
|
49
|
+
}
|
|
50
|
+
static fromDocumentTransition(transition) {
|
|
51
|
+
return DocumentCreateTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentCreateTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
52
|
+
}
|
|
53
|
+
static createFromRawInstance(rawInstance) {
|
|
54
|
+
const instance = Object.create(this.prototype);
|
|
55
|
+
instance._rawDocumentCreateTransition = rawInstance;
|
|
56
|
+
return instance;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DocumentDeleteTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { DocumentWASM } from '../../Document.js';
|
|
3
|
+
import { TokenPaymentInfoWASM } from '../TokenPaymentInfo.js';
|
|
4
|
+
import { DocumentBaseTransitionWASM, DocumentTransitionWASM } from '../../../dpp.js';
|
|
5
|
+
export declare class DocumentDeleteTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawDocumentDeleteTransition: DocumentDeleteTransitionNAPI;
|
|
8
|
+
constructor(document: DocumentWASM, identityContractNonce: bigint, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
9
|
+
get base(): DocumentBaseTransitionWASM;
|
|
10
|
+
set base(value: DocumentBaseTransitionWASM);
|
|
11
|
+
toDocumentTransition(): DocumentTransitionWASM;
|
|
12
|
+
static fromDocumentTransition(transition: DocumentTransitionWASM): DocumentDeleteTransitionWASM;
|
|
13
|
+
static createFromRawInstance(rawInstance: DocumentDeleteTransitionNAPI): DocumentDeleteTransitionWASM;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DocumentBaseTransitionWASM, DocumentTransitionWASM } from '../../../dpp.js';
|
|
2
|
+
import { dppProvider } from '../../../provider.js';
|
|
3
|
+
export class DocumentDeleteTransitionWASM {
|
|
4
|
+
/** @private **/
|
|
5
|
+
_rawDocumentDeleteTransition;
|
|
6
|
+
constructor(document, identityContractNonce, tokenPaymentInfo) {
|
|
7
|
+
this._rawDocumentDeleteTransition = new dppProvider.dpp.DocumentDeleteTransitionNAPI(document._rawDocument, identityContractNonce?.toString(), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
8
|
+
}
|
|
9
|
+
get base() {
|
|
10
|
+
return DocumentBaseTransitionWASM.createFromRawInstance(this._rawDocumentDeleteTransition.base);
|
|
11
|
+
}
|
|
12
|
+
set base(value) {
|
|
13
|
+
this._rawDocumentDeleteTransition.base = value._rawDocumentBaseTransition;
|
|
14
|
+
}
|
|
15
|
+
toDocumentTransition() {
|
|
16
|
+
return DocumentTransitionWASM.createFromRawInstance(this._rawDocumentDeleteTransition.toDocumentTransition());
|
|
17
|
+
}
|
|
18
|
+
static fromDocumentTransition(transition) {
|
|
19
|
+
return DocumentDeleteTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentDeleteTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
20
|
+
}
|
|
21
|
+
static createFromRawInstance(rawInstance) {
|
|
22
|
+
const instance = Object.create(this.prototype);
|
|
23
|
+
instance._rawDocumentDeleteTransition = rawInstance;
|
|
24
|
+
return instance;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocumentPurchaseTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { DocumentWASM } from '../../Document.js';
|
|
3
|
+
import { TokenPaymentInfoWASM } from '../TokenPaymentInfo.js';
|
|
4
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
5
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
6
|
+
export declare class DocumentPurchaseTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawDocumentPurchaseTransition: DocumentPurchaseTransitionNAPI;
|
|
9
|
+
constructor(document: DocumentWASM, identityContractNonce: bigint, amount: bigint, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
10
|
+
get base(): DocumentBaseTransitionWASM;
|
|
11
|
+
set base(value: DocumentBaseTransitionWASM);
|
|
12
|
+
get price(): bigint;
|
|
13
|
+
set price(value: bigint);
|
|
14
|
+
get revision(): bigint;
|
|
15
|
+
set revision(value: bigint);
|
|
16
|
+
toDocumentTransition(): DocumentTransitionWASM;
|
|
17
|
+
static fromDocumentTransition(transition: DocumentTransitionWASM): DocumentPurchaseTransitionWASM;
|
|
18
|
+
static createFromRawInstance(rawInstance: DocumentPurchaseTransitionNAPI): DocumentPurchaseTransitionWASM;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { dppProvider } from '../../../provider.js';
|
|
2
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
3
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
4
|
+
export class DocumentPurchaseTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawDocumentPurchaseTransition;
|
|
7
|
+
constructor(document, identityContractNonce, amount, tokenPaymentInfo) {
|
|
8
|
+
this._rawDocumentPurchaseTransition = new dppProvider.dpp.DocumentPurchaseTransitionNAPI(document._rawDocument, identityContractNonce.toString(), amount.toString(), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
9
|
+
}
|
|
10
|
+
get base() {
|
|
11
|
+
return DocumentBaseTransitionWASM.createFromRawInstance(this._rawDocumentPurchaseTransition.base);
|
|
12
|
+
}
|
|
13
|
+
set base(value) {
|
|
14
|
+
this._rawDocumentPurchaseTransition.base = value._rawDocumentBaseTransition;
|
|
15
|
+
}
|
|
16
|
+
get price() {
|
|
17
|
+
return BigInt(this._rawDocumentPurchaseTransition.price);
|
|
18
|
+
}
|
|
19
|
+
set price(value) {
|
|
20
|
+
this._rawDocumentPurchaseTransition.price = value.toString();
|
|
21
|
+
}
|
|
22
|
+
get revision() {
|
|
23
|
+
return BigInt(this._rawDocumentPurchaseTransition.revision);
|
|
24
|
+
}
|
|
25
|
+
set revision(value) {
|
|
26
|
+
this._rawDocumentPurchaseTransition.revision = value.toString();
|
|
27
|
+
}
|
|
28
|
+
toDocumentTransition() {
|
|
29
|
+
return DocumentTransitionWASM.createFromRawInstance(this._rawDocumentPurchaseTransition.toDocumentTransition());
|
|
30
|
+
}
|
|
31
|
+
static fromDocumentTransition(transition) {
|
|
32
|
+
return DocumentPurchaseTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentPurchaseTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
33
|
+
}
|
|
34
|
+
static createFromRawInstance(rawInstance) {
|
|
35
|
+
const instance = Object.create(this.prototype);
|
|
36
|
+
instance._rawDocumentPurchaseTransition = rawInstance;
|
|
37
|
+
return instance;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocumentReplaceTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { DocumentWASM } from '../../Document.js';
|
|
3
|
+
import { TokenPaymentInfoWASM } from '../TokenPaymentInfo.js';
|
|
4
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
5
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
6
|
+
export declare class DocumentReplaceTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawDocumentReplaceTransition: DocumentReplaceTransitionNAPI;
|
|
9
|
+
constructor(document: DocumentWASM, identityContractNonce: bigint, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
10
|
+
get data(): object;
|
|
11
|
+
set data(value: object);
|
|
12
|
+
get base(): DocumentBaseTransitionWASM;
|
|
13
|
+
set base(value: DocumentBaseTransitionWASM);
|
|
14
|
+
get revision(): bigint;
|
|
15
|
+
set revision(value: bigint);
|
|
16
|
+
toDocumentTransition(): DocumentTransitionWASM;
|
|
17
|
+
static fromDocumentTransition(transition: DocumentTransitionWASM): DocumentReplaceTransitionWASM;
|
|
18
|
+
static createFromRawInstance(rawInstance: DocumentReplaceTransitionNAPI): DocumentReplaceTransitionWASM;
|
|
19
|
+
}
|