pshenmic-dpp 1.1.2-dev.7 → 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 -128
- 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 -4789
- package/dist/wasm/pshenmic_dpp.js +0 -23182
- 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 -1477
- 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,40 @@
|
|
|
1
|
+
import { dppProvider } from '../../../provider.js';
|
|
2
|
+
import { valueFromDynamicValue, valueToDynamicValue } from '../../../utils.js';
|
|
3
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
4
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
5
|
+
export class DocumentReplaceTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawDocumentReplaceTransition;
|
|
8
|
+
constructor(document, identityContractNonce, tokenPaymentInfo) {
|
|
9
|
+
this._rawDocumentReplaceTransition = new dppProvider.dpp.DocumentReplaceTransitionNAPI(document._rawDocument, identityContractNonce.toString(), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
10
|
+
}
|
|
11
|
+
get data() {
|
|
12
|
+
return valueFromDynamicValue(this._rawDocumentReplaceTransition.data);
|
|
13
|
+
}
|
|
14
|
+
set data(value) {
|
|
15
|
+
this._rawDocumentReplaceTransition.data = valueToDynamicValue(value);
|
|
16
|
+
}
|
|
17
|
+
get base() {
|
|
18
|
+
return DocumentBaseTransitionWASM.createFromRawInstance(this._rawDocumentReplaceTransition.base);
|
|
19
|
+
}
|
|
20
|
+
set base(value) {
|
|
21
|
+
this._rawDocumentReplaceTransition.base = value._rawDocumentBaseTransition;
|
|
22
|
+
}
|
|
23
|
+
get revision() {
|
|
24
|
+
return BigInt(this._rawDocumentReplaceTransition.revision);
|
|
25
|
+
}
|
|
26
|
+
set revision(value) {
|
|
27
|
+
this._rawDocumentReplaceTransition.revision = value.toString();
|
|
28
|
+
}
|
|
29
|
+
toDocumentTransition() {
|
|
30
|
+
return DocumentTransitionWASM.createFromRawInstance(this._rawDocumentReplaceTransition.toDocumentTransition());
|
|
31
|
+
}
|
|
32
|
+
static fromDocumentTransition(transition) {
|
|
33
|
+
return DocumentReplaceTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentReplaceTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
34
|
+
}
|
|
35
|
+
static createFromRawInstance(rawInstance) {
|
|
36
|
+
const instance = Object.create(this.prototype);
|
|
37
|
+
instance._rawDocumentReplaceTransition = rawInstance;
|
|
38
|
+
return instance;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocumentTransferTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { DocumentWASM } from '../../Document.js';
|
|
3
|
+
import { IdentifierLike } from '../../../types.js';
|
|
4
|
+
import { TokenPaymentInfoWASM } from '../TokenPaymentInfo.js';
|
|
5
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
6
|
+
import { IdentifierWASM } from '../../Identifier.js';
|
|
7
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
8
|
+
export declare class DocumentTransferTransitionWASM {
|
|
9
|
+
/** @private **/
|
|
10
|
+
_rawDocumentTransferTransition: DocumentTransferTransitionNAPI;
|
|
11
|
+
constructor(document: DocumentWASM, identityContractNonce: bigint, recipient: IdentifierLike, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
12
|
+
get base(): DocumentBaseTransitionWASM;
|
|
13
|
+
set base(value: DocumentBaseTransitionWASM);
|
|
14
|
+
get recipientId(): IdentifierWASM;
|
|
15
|
+
set recipientId(value: IdentifierLike);
|
|
16
|
+
toDocumentTransition(): DocumentTransitionWASM;
|
|
17
|
+
static fromDocumentTransition(transition: DocumentTransitionWASM): DocumentTransferTransitionWASM;
|
|
18
|
+
static createFromRawInstance(rawInstance: DocumentTransferTransitionNAPI): DocumentTransferTransitionWASM;
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { dppProvider } from '../../../provider.js';
|
|
2
|
+
import { prepareIdentifierValue } from '../../../utils.js';
|
|
3
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
4
|
+
import { IdentifierWASM } from '../../Identifier.js';
|
|
5
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
6
|
+
export class DocumentTransferTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawDocumentTransferTransition;
|
|
9
|
+
constructor(document, identityContractNonce, recipient, tokenPaymentInfo) {
|
|
10
|
+
this._rawDocumentTransferTransition = new dppProvider.dpp.DocumentTransferTransitionNAPI(document._rawDocument, identityContractNonce.toString(), prepareIdentifierValue(recipient), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
11
|
+
}
|
|
12
|
+
get base() {
|
|
13
|
+
return DocumentBaseTransitionWASM.createFromRawInstance(this._rawDocumentTransferTransition.base);
|
|
14
|
+
}
|
|
15
|
+
set base(value) {
|
|
16
|
+
this._rawDocumentTransferTransition.base = value._rawDocumentBaseTransition;
|
|
17
|
+
}
|
|
18
|
+
get recipientId() {
|
|
19
|
+
return IdentifierWASM.createFromRawInstance(this._rawDocumentTransferTransition.recipientId);
|
|
20
|
+
}
|
|
21
|
+
set recipientId(value) {
|
|
22
|
+
this._rawDocumentTransferTransition.recipientId = prepareIdentifierValue(value);
|
|
23
|
+
}
|
|
24
|
+
toDocumentTransition() {
|
|
25
|
+
return DocumentTransitionWASM.createFromRawInstance(this._rawDocumentTransferTransition.toDocumentTransition());
|
|
26
|
+
}
|
|
27
|
+
static fromDocumentTransition(transition) {
|
|
28
|
+
return DocumentTransferTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentTransferTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
29
|
+
}
|
|
30
|
+
static createFromRawInstance(rawInstance) {
|
|
31
|
+
const instance = Object.create(this.prototype);
|
|
32
|
+
instance._rawDocumentTransferTransition = rawInstance;
|
|
33
|
+
return instance;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DocumentUpdatePriceTransitionNAPI } 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 DocumentUpdatePriceTransitionWASM {
|
|
7
|
+
/** @private **/
|
|
8
|
+
_rawDocumentUpdatePriceTransition: DocumentUpdatePriceTransitionNAPI;
|
|
9
|
+
constructor(document: DocumentWASM, identityContractNonce: bigint, price: bigint, tokenPaymentInfo?: TokenPaymentInfoWASM);
|
|
10
|
+
get base(): DocumentBaseTransitionWASM;
|
|
11
|
+
set base(value: DocumentBaseTransitionWASM);
|
|
12
|
+
get price(): bigint;
|
|
13
|
+
set price(value: bigint);
|
|
14
|
+
toDocumentTransition(): DocumentTransitionWASM;
|
|
15
|
+
static fromDocumentTransition(transition: DocumentTransitionWASM): DocumentUpdatePriceTransitionWASM;
|
|
16
|
+
static createFromRawInstance(rawInstance: DocumentUpdatePriceTransitionNAPI): DocumentUpdatePriceTransitionWASM;
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { dppProvider } from '../../../provider.js';
|
|
2
|
+
import { DocumentBaseTransitionWASM } from '../DocumentBaseTransition.js';
|
|
3
|
+
import { DocumentTransitionWASM } from '../DocumentTransition.js';
|
|
4
|
+
export class DocumentUpdatePriceTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawDocumentUpdatePriceTransition;
|
|
7
|
+
constructor(document, identityContractNonce, price, tokenPaymentInfo) {
|
|
8
|
+
this._rawDocumentUpdatePriceTransition = new dppProvider.dpp.DocumentUpdatePriceTransitionNAPI(document._rawDocument, identityContractNonce.toString(), price.toString(), tokenPaymentInfo?._rawTokenPaymentInfo);
|
|
9
|
+
}
|
|
10
|
+
get base() {
|
|
11
|
+
return DocumentBaseTransitionWASM.createFromRawInstance(this._rawDocumentUpdatePriceTransition.base);
|
|
12
|
+
}
|
|
13
|
+
set base(value) {
|
|
14
|
+
this._rawDocumentUpdatePriceTransition.base = value._rawDocumentBaseTransition;
|
|
15
|
+
}
|
|
16
|
+
get price() {
|
|
17
|
+
return BigInt(this._rawDocumentUpdatePriceTransition.price);
|
|
18
|
+
}
|
|
19
|
+
set price(value) {
|
|
20
|
+
this._rawDocumentUpdatePriceTransition.price = value.toString();
|
|
21
|
+
}
|
|
22
|
+
toDocumentTransition() {
|
|
23
|
+
return DocumentTransitionWASM.createFromRawInstance(this._rawDocumentUpdatePriceTransition.toDocumentTransition());
|
|
24
|
+
}
|
|
25
|
+
static fromDocumentTransition(transition) {
|
|
26
|
+
return DocumentUpdatePriceTransitionWASM.createFromRawInstance(dppProvider.dpp.DocumentUpdatePriceTransitionNAPI.fromDocumentTransition(transition._rawTransition));
|
|
27
|
+
}
|
|
28
|
+
static createFromRawInstance(rawInstance) {
|
|
29
|
+
const instance = Object.create(this.prototype);
|
|
30
|
+
instance._rawDocumentUpdatePriceTransition = rawInstance;
|
|
31
|
+
return instance;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PrefundedVotingBalanceNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
export declare class PrefundedVotingBalanceWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawPrefundedVotingBalance: PrefundedVotingBalanceNAPI;
|
|
5
|
+
constructor(indexName: string, credits: bigint);
|
|
6
|
+
get indexName(): string;
|
|
7
|
+
get credits(): bigint;
|
|
8
|
+
static createFromRawInstance(rawInstance: PrefundedVotingBalanceNAPI): PrefundedVotingBalanceWASM;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
export class PrefundedVotingBalanceWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawPrefundedVotingBalance;
|
|
5
|
+
constructor(indexName, credits) {
|
|
6
|
+
this._rawPrefundedVotingBalance = new dppProvider.dpp.PrefundedVotingBalanceNAPI(indexName, credits?.toString());
|
|
7
|
+
}
|
|
8
|
+
get indexName() {
|
|
9
|
+
return this._rawPrefundedVotingBalance.indexName;
|
|
10
|
+
}
|
|
11
|
+
get credits() {
|
|
12
|
+
return BigInt(this._rawPrefundedVotingBalance.credits);
|
|
13
|
+
}
|
|
14
|
+
static createFromRawInstance(rawInstance) {
|
|
15
|
+
const instance = Object.create(this.prototype);
|
|
16
|
+
instance._rawPrefundedVotingBalance = rawInstance;
|
|
17
|
+
return instance;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TokenBaseTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { IdentifierLike } from '../../types.js';
|
|
3
|
+
import { GroupStateTransitionInfoWASM } from '../GroupStateTransitionInfo.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
export declare class TokenBaseTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawTokenBaseTransition: TokenBaseTransitionNAPI;
|
|
8
|
+
constructor(identityContractNonce: bigint, tokenContractPosition: number, dataContractId: IdentifierLike, tokenId: IdentifierLike, usingGroupInfo?: GroupStateTransitionInfoWASM);
|
|
9
|
+
get identityContractNonce(): bigint;
|
|
10
|
+
set identityContractNonce(value: bigint);
|
|
11
|
+
get tokenContractPosition(): number;
|
|
12
|
+
set tokenContractPosition(value: number);
|
|
13
|
+
get dataContractId(): IdentifierWASM;
|
|
14
|
+
set dataContractId(value: IdentifierLike);
|
|
15
|
+
get tokenId(): IdentifierWASM;
|
|
16
|
+
set tokenId(value: IdentifierLike);
|
|
17
|
+
get usingGroupInfo(): GroupStateTransitionInfoWASM | undefined;
|
|
18
|
+
set usingGroupInfo(value: GroupStateTransitionInfoWASM | undefined);
|
|
19
|
+
static createFromRawInstance(rawInstance: TokenBaseTransitionNAPI): TokenBaseTransitionWASM;
|
|
20
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GroupStateTransitionInfoWASM } from '../GroupStateTransitionInfo.js';
|
|
2
|
+
import { dppProvider } from '../../provider.js';
|
|
3
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
4
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
5
|
+
export class TokenBaseTransitionWASM {
|
|
6
|
+
/** @private **/
|
|
7
|
+
_rawTokenBaseTransition;
|
|
8
|
+
constructor(identityContractNonce, tokenContractPosition, dataContractId, tokenId, usingGroupInfo) {
|
|
9
|
+
this._rawTokenBaseTransition = new dppProvider.dpp.TokenBaseTransitionNAPI(identityContractNonce.toString(), tokenContractPosition, prepareIdentifierValue(dataContractId), prepareIdentifierValue(tokenId), usingGroupInfo?._rawGroupStateTransitionInfo);
|
|
10
|
+
}
|
|
11
|
+
get identityContractNonce() {
|
|
12
|
+
return BigInt(this._rawTokenBaseTransition.identityContractNonce);
|
|
13
|
+
}
|
|
14
|
+
set identityContractNonce(value) {
|
|
15
|
+
this._rawTokenBaseTransition.identityContractNonce = value.toString();
|
|
16
|
+
}
|
|
17
|
+
get tokenContractPosition() {
|
|
18
|
+
return this._rawTokenBaseTransition.tokenContractPosition;
|
|
19
|
+
}
|
|
20
|
+
set tokenContractPosition(value) {
|
|
21
|
+
this._rawTokenBaseTransition.tokenContractPosition = value;
|
|
22
|
+
}
|
|
23
|
+
get dataContractId() {
|
|
24
|
+
return IdentifierWASM.createFromRawInstance(this._rawTokenBaseTransition.dataContractId);
|
|
25
|
+
}
|
|
26
|
+
set dataContractId(value) {
|
|
27
|
+
this._rawTokenBaseTransition.dataContractId = prepareIdentifierValue(value);
|
|
28
|
+
}
|
|
29
|
+
get tokenId() {
|
|
30
|
+
return IdentifierWASM.createFromRawInstance(this._rawTokenBaseTransition.tokenId);
|
|
31
|
+
}
|
|
32
|
+
set tokenId(value) {
|
|
33
|
+
this._rawTokenBaseTransition.tokenId = prepareIdentifierValue(value);
|
|
34
|
+
}
|
|
35
|
+
get usingGroupInfo() {
|
|
36
|
+
const info = this._rawTokenBaseTransition.usingGroupInfo;
|
|
37
|
+
if (info != null) {
|
|
38
|
+
return GroupStateTransitionInfoWASM.createFromRawInstance(info);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
set usingGroupInfo(value) {
|
|
42
|
+
this._rawTokenBaseTransition.usingGroupInfo = value?._rawGroupStateTransitionInfo;
|
|
43
|
+
}
|
|
44
|
+
static createFromRawInstance(rawInstance) {
|
|
45
|
+
const instance = Object.create(this.prototype);
|
|
46
|
+
instance._rawTokenBaseTransition = rawInstance;
|
|
47
|
+
return instance;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TokenPaymentInfoNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { GasFeesPaidByLike, IdentifierLike } from '../../types.js';
|
|
3
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
4
|
+
export declare class TokenPaymentInfoWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenPaymentInfo: TokenPaymentInfoNAPI;
|
|
7
|
+
constructor(tokenContractPosition: number, paymentTokenContractId?: IdentifierLike, minimumTokenCost?: bigint, maximumTokenCost?: bigint, gasFeesPaidBy?: GasFeesPaidByLike);
|
|
8
|
+
get paymentTokenContractId(): IdentifierWASM | undefined;
|
|
9
|
+
set paymentTokenContractId(id: IdentifierWASM | undefined);
|
|
10
|
+
get tokenContractPosition(): number;
|
|
11
|
+
set tokenContractPosition(position: number);
|
|
12
|
+
get minimumTokenCost(): bigint | undefined;
|
|
13
|
+
set minimumTokenCost(cost: bigint | undefined);
|
|
14
|
+
get maximumTokenCost(): bigint | undefined;
|
|
15
|
+
set maximumTokenCost(cost: bigint | undefined);
|
|
16
|
+
get gasFeesPaidBy(): string;
|
|
17
|
+
set gasFeesPaidBy(value: GasFeesPaidByLike);
|
|
18
|
+
static crateFromRawInstance(rawInstance: TokenPaymentInfoNAPI): TokenPaymentInfoWASM;
|
|
19
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { prepareIdentifierValue, valueToDynamicValue } from '../../utils.js';
|
|
3
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
4
|
+
export class TokenPaymentInfoWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenPaymentInfo;
|
|
7
|
+
constructor(tokenContractPosition, paymentTokenContractId, minimumTokenCost, maximumTokenCost, gasFeesPaidBy) {
|
|
8
|
+
this._rawTokenPaymentInfo = new dppProvider.dpp.TokenPaymentInfoNAPI(paymentTokenContractId != null ? prepareIdentifierValue(paymentTokenContractId) : undefined, tokenContractPosition, minimumTokenCost?.toString(), maximumTokenCost?.toString(), valueToDynamicValue(gasFeesPaidBy));
|
|
9
|
+
}
|
|
10
|
+
get paymentTokenContractId() {
|
|
11
|
+
const id = this._rawTokenPaymentInfo.paymentTokenContractId;
|
|
12
|
+
if (id != null) {
|
|
13
|
+
return IdentifierWASM.createFromRawInstance(id);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
set paymentTokenContractId(id) {
|
|
17
|
+
this._rawTokenPaymentInfo.paymentTokenContractId = id != null ? prepareIdentifierValue(id) : undefined;
|
|
18
|
+
}
|
|
19
|
+
get tokenContractPosition() {
|
|
20
|
+
return this._rawTokenPaymentInfo.tokenContractPosition;
|
|
21
|
+
}
|
|
22
|
+
set tokenContractPosition(position) {
|
|
23
|
+
this._rawTokenPaymentInfo.tokenContractPosition = position;
|
|
24
|
+
}
|
|
25
|
+
get minimumTokenCost() {
|
|
26
|
+
const cost = this._rawTokenPaymentInfo.minimumTokenCost;
|
|
27
|
+
if (cost != null) {
|
|
28
|
+
return BigInt(cost);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
set minimumTokenCost(cost) {
|
|
32
|
+
this._rawTokenPaymentInfo.minimumTokenCost = cost?.toString();
|
|
33
|
+
}
|
|
34
|
+
get maximumTokenCost() {
|
|
35
|
+
const cost = this._rawTokenPaymentInfo.maximumTokenCost;
|
|
36
|
+
if (cost != null) {
|
|
37
|
+
return BigInt(cost);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
set maximumTokenCost(cost) {
|
|
41
|
+
this._rawTokenPaymentInfo.maximumTokenCost = cost?.toString();
|
|
42
|
+
}
|
|
43
|
+
get gasFeesPaidBy() {
|
|
44
|
+
return this._rawTokenPaymentInfo.gasFeesPaidBy;
|
|
45
|
+
}
|
|
46
|
+
set gasFeesPaidBy(value) {
|
|
47
|
+
this._rawTokenPaymentInfo.gasFeesPaidBy = valueToDynamicValue(value);
|
|
48
|
+
}
|
|
49
|
+
static crateFromRawInstance(rawInstance) {
|
|
50
|
+
const instance = Object.create(this.prototype);
|
|
51
|
+
instance._rawTokenPaymentInfo = rawInstance;
|
|
52
|
+
return instance;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TokenPricingScheduleNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
export declare class TokenPricingScheduleWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenPricingSchedule: TokenPricingScheduleNAPI;
|
|
5
|
+
constructor(prices: bigint | {
|
|
6
|
+
[key: string]: bigint;
|
|
7
|
+
});
|
|
8
|
+
getScheduleType(): string;
|
|
9
|
+
getValue(): bigint | {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
static SinglePrice(prices: bigint): TokenPricingScheduleWASM;
|
|
13
|
+
static SetPrices(prices: {
|
|
14
|
+
[key: string]: bigint;
|
|
15
|
+
}): TokenPricingScheduleWASM;
|
|
16
|
+
static createFromRawInstance(rawInstance: TokenPricingScheduleNAPI): TokenPricingScheduleWASM;
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { valueFromDynamicValue, valueToDynamicValue } from '../../utils.js';
|
|
3
|
+
export class TokenPricingScheduleWASM {
|
|
4
|
+
/** @private **/
|
|
5
|
+
_rawTokenPricingSchedule;
|
|
6
|
+
constructor(prices) {
|
|
7
|
+
if (typeof prices === 'bigint') {
|
|
8
|
+
return TokenPricingScheduleWASM.SinglePrice(prices);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return TokenPricingScheduleWASM.SetPrices(prices);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
getScheduleType() {
|
|
15
|
+
return this._rawTokenPricingSchedule.getScheduleType();
|
|
16
|
+
}
|
|
17
|
+
getValue() {
|
|
18
|
+
const value = this._rawTokenPricingSchedule.getValue();
|
|
19
|
+
if (typeof value === 'string') {
|
|
20
|
+
return BigInt(value);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const normalValue = valueFromDynamicValue(value);
|
|
24
|
+
for (const key of Object.keys(normalValue)) {
|
|
25
|
+
normalValue[key] = BigInt(normalValue[key]);
|
|
26
|
+
}
|
|
27
|
+
return normalValue;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static SinglePrice(prices) {
|
|
31
|
+
return TokenPricingScheduleWASM.createFromRawInstance(dppProvider.dpp.TokenPricingScheduleNAPI.SinglePrice(prices.toString()));
|
|
32
|
+
}
|
|
33
|
+
static SetPrices(prices) {
|
|
34
|
+
return TokenPricingScheduleWASM.createFromRawInstance(dppProvider.dpp.TokenPricingScheduleNAPI.SetPrices(valueToDynamicValue(prices)));
|
|
35
|
+
}
|
|
36
|
+
static createFromRawInstance(rawInstance) {
|
|
37
|
+
const instance = Object.create(this.prototype);
|
|
38
|
+
instance._rawTokenPricingSchedule = rawInstance;
|
|
39
|
+
return instance;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TokenTransitionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { IdentifierLike, TokenTransitionLike } from '../../types.js';
|
|
3
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
4
|
+
export declare class TokenTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenTransition: TokenTransitionNAPI;
|
|
7
|
+
constructor(transition: TokenTransitionLike);
|
|
8
|
+
get identityContractNonce(): bigint;
|
|
9
|
+
set identityContractNonce(value: bigint);
|
|
10
|
+
get tokenId(): IdentifierWASM;
|
|
11
|
+
set tokenId(value: IdentifierLike);
|
|
12
|
+
get contractId(): IdentifierWASM;
|
|
13
|
+
set contractId(value: IdentifierWASM);
|
|
14
|
+
getTransition(): TokenTransitionLike;
|
|
15
|
+
getTransitionTypeNumber(): number;
|
|
16
|
+
getTransitionType(): string;
|
|
17
|
+
getHistoricalDocumentTypeName(): string;
|
|
18
|
+
getHistoricalDocumentId(ownerId: IdentifierLike): IdentifierWASM;
|
|
19
|
+
static createFromRawInstance(rawInstance: TokenTransitionNAPI): TokenTransitionWASM;
|
|
20
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { TokenBurnTransitionWASM } from './TokenTransitions/TokenBurnTransition.js';
|
|
3
|
+
import { TokenDestroyFrozenFundsTransitionWASM } from './TokenTransitions/TokenDestroyFrozenFundsTransition.js';
|
|
4
|
+
import { TokenConfigUpdateTransitionWASM } from './TokenTransitions/TokenConfigUpdateTransition.js';
|
|
5
|
+
import { TokenClaimTransitionWASM } from './TokenTransitions/TokenClaimTransition.js';
|
|
6
|
+
import { TokenSetPriceForDirectPurchaseTransitionWASM } from './TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js';
|
|
7
|
+
import { TokenTransferTransitionWASM } from './TokenTransitions/TokenTransferTransition.js';
|
|
8
|
+
import { TokenUnFreezeTransitionWASM } from './TokenTransitions/TokenUnFreezeTransition.js';
|
|
9
|
+
import { TokenMintTransitionWASM } from './TokenTransitions/TokenMintTransition.js';
|
|
10
|
+
import { TokenFreezeTransitionWASM } from './TokenTransitions/TokenFreezeTransition.js';
|
|
11
|
+
import { TokenEmergencyActionTransitionWASM } from './TokenTransitions/TokenEmergencyActionTransition.js';
|
|
12
|
+
import { TokenDirectPurchaseTransitionWASM } from './TokenTransitions/TokenDirectPurchaseTransition.js';
|
|
13
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
14
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
15
|
+
export class TokenTransitionWASM {
|
|
16
|
+
/** @private **/
|
|
17
|
+
_rawTokenTransition;
|
|
18
|
+
constructor(transition) {
|
|
19
|
+
this._rawTokenTransition = new dppProvider.dpp.TokenTransitionNAPI(transition._rawTransition);
|
|
20
|
+
}
|
|
21
|
+
get identityContractNonce() {
|
|
22
|
+
return BigInt(this._rawTokenTransition.identityContractNonce);
|
|
23
|
+
}
|
|
24
|
+
set identityContractNonce(value) {
|
|
25
|
+
this._rawTokenTransition.identityContractNonce = value.toString();
|
|
26
|
+
}
|
|
27
|
+
get tokenId() {
|
|
28
|
+
return IdentifierWASM.createFromRawInstance(this._rawTokenTransition.tokenId);
|
|
29
|
+
}
|
|
30
|
+
set tokenId(value) {
|
|
31
|
+
this._rawTokenTransition.tokenId = prepareIdentifierValue(value);
|
|
32
|
+
}
|
|
33
|
+
get contractId() {
|
|
34
|
+
return IdentifierWASM.createFromRawInstance(this._rawTokenTransition.contractId);
|
|
35
|
+
}
|
|
36
|
+
set contractId(value) {
|
|
37
|
+
this._rawTokenTransition.contractId = prepareIdentifierValue(value);
|
|
38
|
+
}
|
|
39
|
+
getTransition() {
|
|
40
|
+
const transition = this._rawTokenTransition.getTransition();
|
|
41
|
+
if (transition instanceof dppProvider.dpp.TokenBurnTransitionNAPI) {
|
|
42
|
+
return TokenBurnTransitionWASM.createFromRawInstance(transition);
|
|
43
|
+
}
|
|
44
|
+
else if (transition instanceof dppProvider.dpp.TokenClaimTransitionNAPI) {
|
|
45
|
+
return TokenClaimTransitionWASM.createFromRawInstance(transition);
|
|
46
|
+
}
|
|
47
|
+
else if (transition instanceof dppProvider.dpp.TokenConfigUpdateTransitionNAPI) {
|
|
48
|
+
return TokenConfigUpdateTransitionWASM.createFromRawInstance(transition);
|
|
49
|
+
}
|
|
50
|
+
else if (transition instanceof dppProvider.dpp.TokenDestroyFrozenFundsTransitionNAPI) {
|
|
51
|
+
return TokenDestroyFrozenFundsTransitionWASM.createFromRawInstance(transition);
|
|
52
|
+
}
|
|
53
|
+
else if (transition instanceof dppProvider.dpp.TokenDirectPurchaseTransitionNAPI) {
|
|
54
|
+
return TokenDirectPurchaseTransitionWASM.createFromRawInstance(transition);
|
|
55
|
+
}
|
|
56
|
+
else if (transition instanceof dppProvider.dpp.TokenEmergencyActionTransitionNAPI) {
|
|
57
|
+
return TokenEmergencyActionTransitionWASM.createFromRawInstance(transition);
|
|
58
|
+
}
|
|
59
|
+
else if (transition instanceof dppProvider.dpp.TokenFreezeTransitionNAPI) {
|
|
60
|
+
return TokenFreezeTransitionWASM.createFromRawInstance(transition);
|
|
61
|
+
}
|
|
62
|
+
else if (transition instanceof dppProvider.dpp.TokenMintTransitionNAPI) {
|
|
63
|
+
return TokenMintTransitionWASM.createFromRawInstance(transition);
|
|
64
|
+
}
|
|
65
|
+
else if (transition instanceof dppProvider.dpp.TokenSetPriceForDirectPurchaseTransitionNAPI) {
|
|
66
|
+
return TokenSetPriceForDirectPurchaseTransitionWASM.createFromRawInstance(transition);
|
|
67
|
+
}
|
|
68
|
+
else if (transition instanceof dppProvider.dpp.TokenTransferTransitionNAPI) {
|
|
69
|
+
return TokenTransferTransitionWASM.createFromRawInstance(transition);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return TokenUnFreezeTransitionWASM.createFromRawInstance(transition);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
getTransitionTypeNumber() {
|
|
76
|
+
return this._rawTokenTransition.getTransitionTypeNumber();
|
|
77
|
+
}
|
|
78
|
+
getTransitionType() {
|
|
79
|
+
return this._rawTokenTransition.getTransitionType();
|
|
80
|
+
}
|
|
81
|
+
getHistoricalDocumentTypeName() {
|
|
82
|
+
return this._rawTokenTransition.getHistoricalDocumentTypeName();
|
|
83
|
+
}
|
|
84
|
+
getHistoricalDocumentId(ownerId) {
|
|
85
|
+
return IdentifierWASM.createFromRawInstance(this._rawTokenTransition.getHistoricalDocumentId(prepareIdentifierValue(ownerId)));
|
|
86
|
+
}
|
|
87
|
+
static createFromRawInstance(rawInstance) {
|
|
88
|
+
const instance = Object.create(this.prototype);
|
|
89
|
+
instance._rawTokenTransition = rawInstance;
|
|
90
|
+
return instance;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenBurnTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
3
|
+
export declare class TokenBurnTransitionWASM {
|
|
4
|
+
/** @private **/
|
|
5
|
+
_rawTransition: TokenBurnTransitionNAPI;
|
|
6
|
+
constructor(base: TokenBaseTransitionWASM, burnAmount: bigint, publicNote?: string);
|
|
7
|
+
get base(): TokenBaseTransitionWASM;
|
|
8
|
+
set base(value: TokenBaseTransitionWASM);
|
|
9
|
+
get burnAmount(): bigint;
|
|
10
|
+
set burnAmount(value: bigint);
|
|
11
|
+
get publicNote(): string | undefined;
|
|
12
|
+
set publicNote(value: string | undefined);
|
|
13
|
+
static createFromRawInstance(rawInstance: TokenBurnTransitionNAPI): TokenBurnTransitionWASM;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
2
|
+
import { dppProvider } from '../../../provider.js';
|
|
3
|
+
export class TokenBurnTransitionWASM {
|
|
4
|
+
/** @private **/
|
|
5
|
+
_rawTransition;
|
|
6
|
+
constructor(base, burnAmount, publicNote) {
|
|
7
|
+
this._rawTransition = new dppProvider.dpp.TokenBurnTransitionNAPI(base._rawTokenBaseTransition, burnAmount.toString(), publicNote);
|
|
8
|
+
}
|
|
9
|
+
get base() {
|
|
10
|
+
return TokenBaseTransitionWASM.createFromRawInstance(this._rawTransition.base);
|
|
11
|
+
}
|
|
12
|
+
set base(value) {
|
|
13
|
+
this._rawTransition.base = value._rawTokenBaseTransition;
|
|
14
|
+
}
|
|
15
|
+
get burnAmount() {
|
|
16
|
+
return BigInt(this._rawTransition.burnAmount);
|
|
17
|
+
}
|
|
18
|
+
set burnAmount(value) {
|
|
19
|
+
this._rawTransition.burnAmount = value.toString();
|
|
20
|
+
}
|
|
21
|
+
get publicNote() {
|
|
22
|
+
return this._rawTransition.publicNote ?? undefined;
|
|
23
|
+
}
|
|
24
|
+
set publicNote(value) {
|
|
25
|
+
this._rawTransition.publicNote = value;
|
|
26
|
+
}
|
|
27
|
+
static createFromRawInstance(rawInstance) {
|
|
28
|
+
const instance = Object.create(this.prototype);
|
|
29
|
+
instance._rawTransition = rawInstance;
|
|
30
|
+
return instance;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TokenClaimTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
3
|
+
import { TokenDistributionLike } from '../../../types.js';
|
|
4
|
+
export declare class TokenClaimTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTransition: TokenClaimTransitionNAPI;
|
|
7
|
+
constructor(base: TokenBaseTransitionWASM, distributionType: TokenDistributionLike, publicNote?: string);
|
|
8
|
+
get base(): TokenBaseTransitionWASM;
|
|
9
|
+
set base(value: TokenBaseTransitionWASM);
|
|
10
|
+
get distributionType(): string;
|
|
11
|
+
set distributionType(value: TokenDistributionLike);
|
|
12
|
+
get publicNote(): string | undefined;
|
|
13
|
+
set publicNote(value: string | undefined);
|
|
14
|
+
static createFromRawInstance(rawInstance: TokenClaimTransitionNAPI): TokenClaimTransitionWASM;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
2
|
+
import { dppProvider } from '../../../provider.js';
|
|
3
|
+
import { valueToDynamicValue } from '../../../utils.js';
|
|
4
|
+
export class TokenClaimTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTransition;
|
|
7
|
+
constructor(base, distributionType, publicNote) {
|
|
8
|
+
this._rawTransition = new dppProvider.dpp.TokenClaimTransitionNAPI(base._rawTokenBaseTransition, valueToDynamicValue(distributionType), publicNote);
|
|
9
|
+
}
|
|
10
|
+
get base() {
|
|
11
|
+
return TokenBaseTransitionWASM.createFromRawInstance(this._rawTransition.base);
|
|
12
|
+
}
|
|
13
|
+
set base(value) {
|
|
14
|
+
this._rawTransition.base = value._rawTokenBaseTransition;
|
|
15
|
+
}
|
|
16
|
+
get distributionType() {
|
|
17
|
+
return this._rawTransition.distributionType;
|
|
18
|
+
}
|
|
19
|
+
set distributionType(value) {
|
|
20
|
+
this._rawTransition.distributionType = valueToDynamicValue(value);
|
|
21
|
+
}
|
|
22
|
+
get publicNote() {
|
|
23
|
+
return this._rawTransition.publicNote ?? undefined;
|
|
24
|
+
}
|
|
25
|
+
set publicNote(value) {
|
|
26
|
+
this._rawTransition.publicNote = value;
|
|
27
|
+
}
|
|
28
|
+
static createFromRawInstance(rawInstance) {
|
|
29
|
+
const instance = Object.create(this.prototype);
|
|
30
|
+
instance._rawTransition = rawInstance;
|
|
31
|
+
return instance;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TokenConfigUpdateTransitionNAPI } from '../../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
3
|
+
import { TokenConfigurationChangeItemWASM } from '../../TokenConfiguration/TokenConfigurationChangeItem.js';
|
|
4
|
+
export declare class TokenConfigUpdateTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTransition: TokenConfigUpdateTransitionNAPI;
|
|
7
|
+
constructor(base: TokenBaseTransitionWASM, updateTokenConfigurationItem: TokenConfigurationChangeItemWASM, publicNote?: string);
|
|
8
|
+
get base(): TokenBaseTransitionWASM;
|
|
9
|
+
set base(value: TokenBaseTransitionWASM);
|
|
10
|
+
get publicNote(): string | undefined;
|
|
11
|
+
set publicNote(value: string | undefined);
|
|
12
|
+
get updateTokenConfigurationItem(): TokenConfigurationChangeItemWASM;
|
|
13
|
+
set updateTokenConfigurationItem(value: TokenConfigurationChangeItemWASM);
|
|
14
|
+
static createFromRawInstance(rawInstance: TokenConfigUpdateTransitionNAPI): TokenConfigUpdateTransitionWASM;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TokenBaseTransitionWASM } from '../TokenBaseTransition.js';
|
|
2
|
+
import { TokenConfigurationChangeItemWASM } from '../../TokenConfiguration/TokenConfigurationChangeItem.js';
|
|
3
|
+
import { dppProvider } from '../../../provider.js';
|
|
4
|
+
export class TokenConfigUpdateTransitionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTransition;
|
|
7
|
+
constructor(base, updateTokenConfigurationItem, publicNote) {
|
|
8
|
+
this._rawTransition = new dppProvider.dpp.TokenConfigUpdateTransitionNAPI(base._rawTokenBaseTransition, updateTokenConfigurationItem._rawTokenConfigurationChangeItem, publicNote);
|
|
9
|
+
}
|
|
10
|
+
get base() {
|
|
11
|
+
return TokenBaseTransitionWASM.createFromRawInstance(this._rawTransition.base);
|
|
12
|
+
}
|
|
13
|
+
set base(value) {
|
|
14
|
+
this._rawTransition.base = value._rawTokenBaseTransition;
|
|
15
|
+
}
|
|
16
|
+
get publicNote() {
|
|
17
|
+
return this._rawTransition.publicNote ?? undefined;
|
|
18
|
+
}
|
|
19
|
+
set publicNote(value) {
|
|
20
|
+
this._rawTransition.publicNote = value;
|
|
21
|
+
}
|
|
22
|
+
get updateTokenConfigurationItem() {
|
|
23
|
+
return TokenConfigurationChangeItemWASM.createFromRawInstance(this._rawTransition.updateTokenConfigurationItem);
|
|
24
|
+
}
|
|
25
|
+
set updateTokenConfigurationItem(value) {
|
|
26
|
+
this._rawTransition.updateTokenConfigurationItem = value._rawTokenConfigurationChangeItem;
|
|
27
|
+
}
|
|
28
|
+
static createFromRawInstance(rawInstance) {
|
|
29
|
+
const instance = Object.create(this.prototype);
|
|
30
|
+
instance._rawTransition = rawInstance;
|
|
31
|
+
return instance;
|
|
32
|
+
}
|
|
33
|
+
}
|