pshenmic-dpp 1.1.2-dev.8 → 2.0.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -99
- package/dist/binaries/bindingsTypes.d.ts +1700 -0
- package/dist/binaries/bindingsTypes.js +99 -0
- package/dist/binaries/pshenmic_dpp.android.node/react-native-node-api-module +0 -0
- package/dist/binaries/pshenmic_dpp.android.node/x86_64/libpshenmic_dpp.so +0 -0
- package/dist/binaries/pshenmic_dpp.d.ts +166 -0
- package/dist/binaries/pshenmic_dpp.js +3 -0
- package/dist/binaries/wasm/wasmBytes.d.ts +2 -0
- package/dist/binaries/wasm/wasmBytes.js +2 -0
- package/dist/binaries/wasm.d.ts +166 -0
- package/dist/binaries/wasm.js +44 -0
- package/dist/src/dpp/constants.d.ts +4 -0
- package/dist/src/dpp/constants.js +19 -0
- package/dist/src/dpp/dpp.d.ts +110 -0
- package/dist/src/dpp/dpp.js +110 -0
- package/dist/src/dpp/enums.d.ts +1 -0
- package/dist/src/dpp/enums.js +1 -0
- package/dist/src/dpp/provider.d.ts +11 -0
- package/dist/src/dpp/provider.js +21 -0
- package/dist/src/dpp/structs/Address/AddressWitness.d.ts +12 -0
- package/dist/src/dpp/structs/Address/AddressWitness.js +23 -0
- package/dist/src/dpp/structs/Address/PlatformAddress.d.ts +14 -0
- package/dist/src/dpp/structs/Address/PlatformAddress.js +32 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.d.ts +38 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressCreditWithdrawalTransition.js +95 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.d.ts +35 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundingFromAssetLockTransition.js +85 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.d.ts +30 -0
- package/dist/src/dpp/structs/AddressTransitions/AddressFundsTransferTransition.js +72 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.d.ts +33 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreateFromAddressesTransition.js +82 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.d.ts +31 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityCreditTransferToAddressesTransition.js +77 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.d.ts +31 -0
- package/dist/src/dpp/structs/AddressTransitions/IdentityTopUpFromAddressesTransition.js +76 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.d.ts +12 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/AddressFundsFeeStrategyStep.js +26 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.d.ts +14 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/InputAddress.js +32 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.d.ts +12 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddress.js +26 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.d.ts +12 -0
- package/dist/src/dpp/structs/AddressTransitions/entities/OutputAddressNullableCredits.js +29 -0
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.d.ts +19 -0
- package/dist/src/dpp/structs/AssetLockProof/AssetLockProof.js +50 -0
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.d.ts +17 -0
- package/dist/src/dpp/structs/AssetLockProof/ChainAssetLockProof.js +36 -0
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.d.ts +24 -0
- package/dist/src/dpp/structs/AssetLockProof/InstantAssetLockProof.js +48 -0
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.d.ts +15 -0
- package/dist/src/dpp/structs/AssetLockProof/OutPoint.js +40 -0
- package/dist/src/dpp/structs/AssetLockProof/Transaction.d.ts +20 -0
- package/dist/src/dpp/structs/AssetLockProof/Transaction.js +49 -0
- package/dist/src/dpp/structs/AssetLockProof/TxIn.d.ts +17 -0
- package/dist/src/dpp/structs/AssetLockProof/TxIn.js +39 -0
- package/dist/src/dpp/structs/AssetLockProof/TxOut.d.ts +13 -0
- package/dist/src/dpp/structs/AssetLockProof/TxOut.js +34 -0
- package/dist/src/dpp/structs/AssetLockProof/Witness.d.ts +11 -0
- package/dist/src/dpp/structs/AssetLockProof/Witness.js +25 -0
- package/dist/src/dpp/structs/Batch/BatchTransition.d.ts +34 -0
- package/dist/src/dpp/structs/Batch/BatchTransition.js +95 -0
- package/dist/src/dpp/structs/Batch/BatchedTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/BatchedTransition.js +39 -0
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.d.ts +20 -0
- package/dist/src/dpp/structs/Batch/DocumentBaseTransition.js +54 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.d.ts +32 -0
- package/dist/src/dpp/structs/Batch/DocumentTransition.js +74 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.d.ts +23 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentCreateTransition.js +58 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentDeleteTransition.js +26 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentPurchaseTransition.js +39 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentReplaceTransition.js +40 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentTransferTransition.js +35 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.d.ts +17 -0
- package/dist/src/dpp/structs/Batch/DocumentTransitions/DocumentUpdatePriceTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.d.ts +9 -0
- package/dist/src/dpp/structs/Batch/PrefundedVotingBalance.js +19 -0
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.d.ts +20 -0
- package/dist/src/dpp/structs/Batch/TokenBaseTransition.js +49 -0
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.d.ts +19 -0
- package/dist/src/dpp/structs/Batch/TokenPaymentInfo.js +54 -0
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.d.ts +17 -0
- package/dist/src/dpp/structs/Batch/TokenPricingSchedule.js +41 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.d.ts +20 -0
- package/dist/src/dpp/structs/Batch/TokenTransition.js +92 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenBurnTransition.js +32 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenClaimTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenConfigUpdateTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.d.ts +16 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDestroyFrozenFundsTransition.js +34 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.d.ts +14 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenDirectPurchaseTransition.js +32 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenEmergencyActionTransition.js +33 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.d.ts +16 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenFreezeTransition.js +34 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.d.ts +18 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenMintTransition.js +43 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.d.ts +15 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenSetPriceForDirectPurchaseTransition.js +36 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.d.ts +21 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenTransferTransition.js +53 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.d.ts +16 -0
- package/dist/src/dpp/structs/Batch/TokenTransitions/TokenUnFreezeTransition.js +34 -0
- package/dist/src/dpp/structs/ConsensusError.d.ts +8 -0
- package/dist/src/dpp/structs/ConsensusError.js +22 -0
- package/dist/src/dpp/structs/ContractBounds.d.ts +17 -0
- package/dist/src/dpp/structs/ContractBounds.js +39 -0
- package/dist/src/dpp/structs/CoreScript.d.ts +15 -0
- package/dist/src/dpp/structs/CoreScript.js +37 -0
- package/dist/src/dpp/structs/DataContract.d.ts +36 -0
- package/dist/src/dpp/structs/DataContract.js +119 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.d.ts +23 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractCreateTransition.js +55 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.d.ts +23 -0
- package/dist/src/dpp/structs/DataContractTransitions/DataContractUpdateTransition.js +55 -0
- package/dist/src/dpp/structs/Document.d.ts +51 -0
- package/dist/src/dpp/structs/Document.js +184 -0
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.d.ts +13 -0
- package/dist/src/dpp/structs/EncryptedNote/PrivateEncryptedNote.js +31 -0
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.d.ts +13 -0
- package/dist/src/dpp/structs/EncryptedNote/SharedEncryptedNote.js +31 -0
- package/dist/src/dpp/structs/GroupStateTransitionInfo.d.ts +15 -0
- package/dist/src/dpp/structs/GroupStateTransitionInfo.js +33 -0
- package/dist/src/dpp/structs/Identifier.d.ts +17 -0
- package/dist/src/dpp/structs/Identifier.js +50 -0
- package/dist/src/dpp/structs/Identity.d.ts +26 -0
- package/dist/src/dpp/structs/Identity.js +73 -0
- package/dist/src/dpp/structs/IdentityPublicKey.d.ts +43 -0
- package/dist/src/dpp/structs/IdentityPublicKey.js +126 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.d.ts +30 -0
- package/dist/src/dpp/structs/IdentityPublicKeyInCreation.js +77 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.d.ts +29 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreateTransition.js +69 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.d.ts +33 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditTransfer.js +85 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.d.ts +42 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityCreditWithdrawalTransition.js +114 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.d.ts +30 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityTopUpTransition.js +75 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.d.ts +40 -0
- package/dist/src/dpp/structs/IdentityTransitions/IdentityUpdateTransition.js +108 -0
- package/dist/src/dpp/structs/InstantLock.d.ts +17 -0
- package/dist/src/dpp/structs/InstantLock.js +43 -0
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.d.ts +37 -0
- package/dist/src/dpp/structs/MasternodeVote/MasternodeVoteTransition.js +96 -0
- package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.d.ts +14 -0
- package/dist/src/dpp/structs/MasternodeVote/ResourceVoteChoice.js +29 -0
- package/dist/src/dpp/structs/MasternodeVote/Vote.d.ts +13 -0
- package/dist/src/dpp/structs/MasternodeVote/Vote.js +27 -0
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.d.ts +18 -0
- package/dist/src/dpp/structs/MasternodeVote/VotePoll.js +42 -0
- package/dist/src/dpp/structs/PartialIdentity.d.ts +26 -0
- package/dist/src/dpp/structs/PartialIdentity.js +69 -0
- package/dist/src/dpp/structs/PrivateKey.d.ts +20 -0
- package/dist/src/dpp/structs/PrivateKey.js +48 -0
- package/dist/src/dpp/structs/PublicKey.d.ts +15 -0
- package/dist/src/dpp/structs/PublicKey.js +37 -0
- package/dist/src/dpp/structs/StateTransition.d.ts +38 -0
- package/dist/src/dpp/structs/StateTransition.js +100 -0
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.d.ts +12 -0
- package/dist/src/dpp/structs/TokenConfiguration/ActionTaker.js +44 -0
- package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.d.ts +16 -0
- package/dist/src/dpp/structs/TokenConfiguration/AuthorizedActionTakers.js +43 -0
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.d.ts +23 -0
- package/dist/src/dpp/structs/TokenConfiguration/ChangeControlRules.js +52 -0
- package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/DistributionFunction.js +57 -0
- package/dist/src/dpp/structs/TokenConfiguration/Group.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/Group.js +44 -0
- package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.d.ts +13 -0
- package/dist/src/dpp/structs/TokenConfiguration/RewardDistributionType.js +40 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.d.ts +54 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfiguration.js +139 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.d.ts +47 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationChangeItem.js +140 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationConvention.js +47 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.d.ts +15 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenConfigurationLocalization.js +34 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.d.ts +14 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRecipient.js +31 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.d.ts +28 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenDistributionRules.js +75 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.d.ts +19 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenKeepsHistoryRules.js +49 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.d.ts +13 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenMarketplaceRules.js +27 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.d.ts +13 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPerpetualDistribution.js +27 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.d.ts +21 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenPreProgrammedDistribution.js +42 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.d.ts +9 -0
- package/dist/src/dpp/structs/TokenConfiguration/TokenTradeMode.js +17 -0
- package/dist/src/dpp/types.d.ts +273 -0
- package/dist/src/dpp/types.js +1 -0
- package/dist/src/dpp/utils.d.ts +5 -0
- package/dist/src/dpp/utils.js +78 -0
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.d.ts +3 -0
- package/dist/src/dpp/verify/Contested/verifyVotePollVoteStateProof.js +34 -0
- package/dist/src/dpp/verify/Contract/verifyContract.d.ts +2 -0
- package/dist/src/dpp/verify/Contract/verifyContract.js +14 -0
- package/dist/src/dpp/verify/Document/verifyDocumentsProof.d.ts +3 -0
- package/dist/src/dpp/verify/Document/verifyDocumentsProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentifierByNonUniquePublicKeyHashProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentifierByNonUniquePublicKeyHashProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityBalanceProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityBalanceProof.js +9 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByIdentifierProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByIdentifierProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByUniqueKeyHashProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityByUniqueKeyHashProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityContractNonceProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityContractNonceProof.js +9 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityKeysByIdentifierProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityKeysByIdentifierProof.js +10 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityNonceProof.d.ts +2 -0
- package/dist/src/dpp/verify/Identity/verifyIdentityNonceProof.js +9 -0
- package/dist/src/dpp/verify/StateTransition/utils.d.ts +2 -0
- package/dist/src/dpp/verify/StateTransition/utils.js +115 -0
- package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.d.ts +4 -0
- package/dist/src/dpp/verify/StateTransition/verifyStateTransitionResult.js +10 -0
- package/dist/src/dpp/verify/System/verifyEpochsInfoProof.d.ts +2 -0
- package/dist/src/dpp/verify/System/verifyEpochsInfoProof.js +16 -0
- package/dist/src/dpp/verify/System/verifyTotalCreditsProof.d.ts +2 -0
- package/dist/src/dpp/verify/System/verifyTotalCreditsProof.js +9 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenBalancesForIdentitiesProof.js +13 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenContractInfoProof.js +15 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenDirectPurchasePrices.js +14 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokenTotalSupplyProof.js +12 -0
- package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.d.ts +2 -0
- package/dist/src/dpp/verify/Tokens/verifyTokensBalancesForIdentityProof.js +13 -0
- package/dist/src/dpp/verify/verifySignatureDigest.d.ts +1 -0
- package/dist/src/dpp/verify/verifySignatureDigest.js +4 -0
- package/dist/src/react-native.d.ts +3 -0
- package/dist/src/react-native.js +6 -0
- package/dist/src/wasm.d.ts +3 -0
- package/dist/src/wasm.js +6 -0
- package/dist/utils/base122.d.ts +7 -0
- package/dist/utils/base122.js +63 -0
- package/package.json +30 -27
- package/tests/unit/DynamicValue.spec.ts +86 -0
- package/tests/unit/Identifier.spec.ts +105 -0
- package/tests/unit/Identity.spec.ts +119 -0
- package/tests/unit/IdentityPublicKey.spec.ts +126 -0
- package/dist/wasm/base122.d.ts +0 -1
- package/dist/wasm/base122.js +0 -67
- package/dist/wasm/index.d.ts +0 -148
- package/dist/wasm/index.js +0 -13
- package/dist/wasm/initAsync.d.ts +0 -4
- package/dist/wasm/initAsync.js +0 -20
- package/dist/wasm/initInterface.d.ts +0 -3
- package/dist/wasm/initInterface.js +0 -46
- package/dist/wasm/initWASM.d.ts +0 -1
- package/dist/wasm/initWASM.js +0 -28
- package/dist/wasm/pshenmic_dpp.d.ts +0 -5266
- package/dist/wasm/pshenmic_dpp.js +0 -25608
- package/dist/wasm/pshenmic_dpp_bg.d.ts +0 -3
- package/dist/wasm/pshenmic_dpp_bg.js +0 -2
- package/dist/wasm/pshenmic_dpp_bg.wasm.d.ts +0 -1636
- package/dist/wasm/pshenmic_dpp_zipped.d.ts +0 -3
- package/dist/wasm/pshenmic_dpp_zipped.js +0 -2
- package/dist/wasm/snippets/pshenmic_dpp_utils-23ab7381b198778d/stringify.js +0 -7
- package/tests/AssetLockProof.spec.cjs +0 -96
- package/tests/AsyncImportTest.spec.cjs +0 -930
- package/tests/AuthorizedActionTakers.spec.cjs +0 -75
- package/tests/BatchTransition.spec.cjs +0 -141
- package/tests/ChainLockProof.spec.cjs +0 -63
- package/tests/ChangeControlRules.spec.cjs +0 -184
- package/tests/CoreScript.spec.cjs +0 -37
- package/tests/DataContract.spec.cjs +0 -170
- package/tests/DataContractCreateStateTransition.spec.cjs +0 -102
- package/tests/DataContractUpdateStateTransition.spec.cjs +0 -103
- package/tests/DistributionFunction.spec.cjs +0 -416
- package/tests/Document.spec.cjs +0 -227
- package/tests/DocumentTransition.spec.cjs +0 -94
- package/tests/DocumentsTransitions.spec.cjs +0 -699
- package/tests/Identifier.spec.cjs +0 -82
- package/tests/Identity.spec.cjs +0 -107
- package/tests/IdentityCreateTransition.spec.cjs +0 -87
- package/tests/IdentityCreditTransferTransition.spec.cjs +0 -140
- package/tests/IdentityCreditWithdrawalTransition.spec.cjs +0 -186
- package/tests/IdentityPublicKey.spec.cjs +0 -166
- package/tests/IdentityTopUpTransition.spec.cjs +0 -125
- package/tests/IdentityUpdateTransition.spec.cjs +0 -141
- package/tests/InstantLockProof.spec.cjs +0 -91
- package/tests/OutPoint.spec.cjs +0 -49
- package/tests/PrivateKey.spec.cjs +0 -67
- package/tests/PublicKeyInCreation.spec.cjs +0 -252
- package/tests/RewardDistributionType.spec.cjs +0 -90
- package/tests/TokenBaseTransition.spec.cjs +0 -96
- package/tests/TokenConfiguration.spec.cjs +0 -188
- package/tests/TokenConfigurationConvention.spec.cjs +0 -93
- package/tests/TokenConfigurationLocalization.spec.cjs +0 -59
- package/tests/TokenDistributionRecipient.spec.cjs +0 -49
- package/tests/TokenDistributionRules.spec.cjs +0 -313
- package/tests/TokenKeepsHistoryRules.spec.cjs +0 -67
- package/tests/TokenPerpetualDistribution.spec.cjs +0 -130
- package/tests/TokenPreProgrammedDistribution.spec.cjs +0 -61
- package/tests/TokensTransitions.spec.cjs +0 -509
- package/tests/TxOut.spec.cjs +0 -70
- package/tests/mocks/DataContract/DataContract.json +0 -164
- package/tests/mocks/DataContract/index.js +0 -6
- package/tests/mocks/Document/DataContract.json +0 -23
- package/tests/mocks/Document/document.json +0 -3
- package/tests/mocks/Document/document2.json +0 -3
- package/tests/mocks/Document/index.js +0 -13
- package/tests/mocks/Identity/index.js +0 -13
- package/tests/mocks/Locks/index.js +0 -2
- package/tests/mocks/PrivateKey/index.js +0 -5
- package/tests/mocks/PublicKey/index.js +0 -13
- package/tests/mocks/TokenConfiguration/index.js +0 -5
- package/tests/utils/hex.js +0 -14
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TokenConfigurationLocalizationNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenConfigurationLocalizationJson } from '../../types.js';
|
|
3
|
+
export declare class TokenConfigurationLocalizationWASM {
|
|
4
|
+
/** @private **/
|
|
5
|
+
_rawTokenConfigurationLocalization: TokenConfigurationLocalizationNAPI;
|
|
6
|
+
constructor(shouldCapitalize: boolean, singularForm: string, pluralForm: string);
|
|
7
|
+
get shouldCapitalize(): boolean;
|
|
8
|
+
set shouldCapitalize(shouldCapitalize: boolean);
|
|
9
|
+
get pluralForm(): string;
|
|
10
|
+
set pluralForm(pluralForm: string);
|
|
11
|
+
get singularForm(): string;
|
|
12
|
+
set singularForm(singularForm: string);
|
|
13
|
+
toJSON(): TokenConfigurationLocalizationJson;
|
|
14
|
+
static createFromRawInstance(rawInstance: TokenConfigurationLocalizationNAPI): TokenConfigurationLocalizationWASM;
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
export class TokenConfigurationLocalizationWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenConfigurationLocalization;
|
|
5
|
+
constructor(shouldCapitalize, singularForm, pluralForm) {
|
|
6
|
+
this._rawTokenConfigurationLocalization = new dppProvider.dpp.TokenConfigurationLocalizationNAPI(shouldCapitalize, singularForm, pluralForm);
|
|
7
|
+
}
|
|
8
|
+
get shouldCapitalize() {
|
|
9
|
+
return this._rawTokenConfigurationLocalization.shouldCapitalize;
|
|
10
|
+
}
|
|
11
|
+
set shouldCapitalize(shouldCapitalize) {
|
|
12
|
+
this._rawTokenConfigurationLocalization.shouldCapitalize = shouldCapitalize;
|
|
13
|
+
}
|
|
14
|
+
get pluralForm() {
|
|
15
|
+
return this._rawTokenConfigurationLocalization.pluralForm;
|
|
16
|
+
}
|
|
17
|
+
set pluralForm(pluralForm) {
|
|
18
|
+
this._rawTokenConfigurationLocalization.pluralForm = pluralForm;
|
|
19
|
+
}
|
|
20
|
+
get singularForm() {
|
|
21
|
+
return this._rawTokenConfigurationLocalization.singularForm;
|
|
22
|
+
}
|
|
23
|
+
set singularForm(singularForm) {
|
|
24
|
+
this._rawTokenConfigurationLocalization.singularForm = singularForm;
|
|
25
|
+
}
|
|
26
|
+
toJSON() {
|
|
27
|
+
return this._rawTokenConfigurationLocalization.toJSON();
|
|
28
|
+
}
|
|
29
|
+
static createFromRawInstance(rawInstance) {
|
|
30
|
+
const instance = Object.create(this.prototype);
|
|
31
|
+
instance._rawTokenConfigurationLocalization = rawInstance;
|
|
32
|
+
return instance;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TokenDistributionRecipientNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { IdentifierLike } from '../../types.js';
|
|
3
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
4
|
+
export declare class TokenDistributionRecipientWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenDistributionRecipient: TokenDistributionRecipientNAPI;
|
|
7
|
+
private constructor();
|
|
8
|
+
getType(): string;
|
|
9
|
+
getValue(): IdentifierWASM | undefined;
|
|
10
|
+
static ContractOwner(): TokenDistributionRecipientWASM;
|
|
11
|
+
static Identity(id: IdentifierLike): TokenDistributionRecipientWASM;
|
|
12
|
+
static EvonodesByParticipation(): TokenDistributionRecipientWASM;
|
|
13
|
+
static createFromRawInstance(rawInstance: TokenDistributionRecipientNAPI): TokenDistributionRecipientWASM;
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
3
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
4
|
+
export class TokenDistributionRecipientWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenDistributionRecipient;
|
|
7
|
+
constructor(rawInstance) {
|
|
8
|
+
this._rawTokenDistributionRecipient = rawInstance;
|
|
9
|
+
}
|
|
10
|
+
getType() {
|
|
11
|
+
return this._rawTokenDistributionRecipient.getType();
|
|
12
|
+
}
|
|
13
|
+
getValue() {
|
|
14
|
+
const value = this._rawTokenDistributionRecipient.getValue();
|
|
15
|
+
if (value !== undefined) {
|
|
16
|
+
return IdentifierWASM.createFromRawInstance(value);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
static ContractOwner() {
|
|
20
|
+
return new TokenDistributionRecipientWASM(dppProvider.dpp.TokenDistributionRecipientNAPI.ContractOwner());
|
|
21
|
+
}
|
|
22
|
+
static Identity(id) {
|
|
23
|
+
return new TokenDistributionRecipientWASM(dppProvider.dpp.TokenDistributionRecipientNAPI.Identity(prepareIdentifierValue(id)));
|
|
24
|
+
}
|
|
25
|
+
static EvonodesByParticipation() {
|
|
26
|
+
return new TokenDistributionRecipientWASM(dppProvider.dpp.TokenDistributionRecipientNAPI.EvonodesByParticipation());
|
|
27
|
+
}
|
|
28
|
+
static createFromRawInstance(rawInstance) {
|
|
29
|
+
return new TokenDistributionRecipientWASM(rawInstance);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TokenDistributionRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenPerpetualDistributionWASM } from './TokenPerpetualDistribution.js';
|
|
3
|
+
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
4
|
+
import { TokenPreProgrammedDistributionWASM } from './TokenPreProgrammedDistribution.js';
|
|
5
|
+
import { IdentifierLike } from '../../types.js';
|
|
6
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
7
|
+
export declare class TokenDistributionRulesWASM {
|
|
8
|
+
/** @private **/
|
|
9
|
+
_rawTokenDistributionRules: TokenDistributionRulesNAPI;
|
|
10
|
+
constructor(perpetualDistributionRules: ChangeControlRulesWASM, newTokensDestinationIdentityRules: ChangeControlRulesWASM, mintingAllowChoosingDestination: boolean, mintingAllowChoosingDestinationRules: ChangeControlRulesWASM, changeDirectPurchasePricingRules: ChangeControlRulesWASM, perpetualDistribution?: TokenPerpetualDistributionWASM, preProgrammedDistribution?: TokenPreProgrammedDistributionWASM, newTokensDestinationIdentity?: IdentifierLike);
|
|
11
|
+
get perpetualDistribution(): TokenPerpetualDistributionWASM | undefined;
|
|
12
|
+
set perpetualDistribution(perpetualDistribution: TokenPerpetualDistributionWASM);
|
|
13
|
+
get perpetualDistributionRules(): ChangeControlRulesWASM;
|
|
14
|
+
set perpetualDistributionRules(rules: ChangeControlRulesWASM);
|
|
15
|
+
get preProgrammedDistribution(): TokenPreProgrammedDistributionWASM | undefined;
|
|
16
|
+
set preProgrammedDistribution(preProgrammedDistribution: TokenPreProgrammedDistributionWASM);
|
|
17
|
+
get newTokenDestinationIdentity(): IdentifierWASM | undefined;
|
|
18
|
+
set newTokenDestinationIdentity(destinationIdentity: IdentifierLike | undefined);
|
|
19
|
+
get newTokenDestinationIdentityRules(): ChangeControlRulesWASM;
|
|
20
|
+
set newTokenDestinationIdentityRules(rules: ChangeControlRulesWASM);
|
|
21
|
+
get mintingAllowChoosingDestination(): boolean;
|
|
22
|
+
set mintingAllowChoosingDestination(mintingAllowChoosingDestination: boolean);
|
|
23
|
+
get mintingAllowChoosingDestinationRules(): ChangeControlRulesWASM;
|
|
24
|
+
set mintingAllowChoosingDestinationRules(mintingAllowChoosingDestinationRules: ChangeControlRulesWASM);
|
|
25
|
+
get changeDirectPurchasePricingRules(): ChangeControlRulesWASM;
|
|
26
|
+
set changeDirectPurchasePricingRules(changeDirectPurchasePricingRules: ChangeControlRulesWASM);
|
|
27
|
+
static createFromRawInstance(rawInstance: TokenDistributionRulesNAPI): TokenDistributionRulesWASM;
|
|
28
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { TokenPerpetualDistributionWASM } from './TokenPerpetualDistribution.js';
|
|
2
|
+
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
3
|
+
import { TokenPreProgrammedDistributionWASM } from './TokenPreProgrammedDistribution.js';
|
|
4
|
+
import { dppProvider } from '../../provider.js';
|
|
5
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
6
|
+
import { IdentifierWASM } from '../Identifier.js';
|
|
7
|
+
export class TokenDistributionRulesWASM {
|
|
8
|
+
/** @private **/
|
|
9
|
+
_rawTokenDistributionRules;
|
|
10
|
+
constructor(perpetualDistributionRules, newTokensDestinationIdentityRules, mintingAllowChoosingDestination, mintingAllowChoosingDestinationRules, changeDirectPurchasePricingRules, perpetualDistribution, preProgrammedDistribution, newTokensDestinationIdentity) {
|
|
11
|
+
this._rawTokenDistributionRules = new dppProvider.dpp.TokenDistributionRulesNAPI(perpetualDistribution?._rawTokenPerpetualDistribution, perpetualDistributionRules._rawChangeControlRules, preProgrammedDistribution?._rawTokenPreProgrammedDistribution, newTokensDestinationIdentity != null ? prepareIdentifierValue(newTokensDestinationIdentity) : undefined, newTokensDestinationIdentityRules._rawChangeControlRules, mintingAllowChoosingDestination, mintingAllowChoosingDestinationRules?._rawChangeControlRules, changeDirectPurchasePricingRules?._rawChangeControlRules);
|
|
12
|
+
}
|
|
13
|
+
get perpetualDistribution() {
|
|
14
|
+
const dist = this._rawTokenDistributionRules.perpetualDistribution;
|
|
15
|
+
if (dist != null) {
|
|
16
|
+
return TokenPerpetualDistributionWASM.createFromRawInstance(dist);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
set perpetualDistribution(perpetualDistribution) {
|
|
20
|
+
this._rawTokenDistributionRules.perpetualDistribution = perpetualDistribution._rawTokenPerpetualDistribution;
|
|
21
|
+
}
|
|
22
|
+
get perpetualDistributionRules() {
|
|
23
|
+
return ChangeControlRulesWASM.createFromRawInstance(this._rawTokenDistributionRules.perpetualDistributionRules);
|
|
24
|
+
}
|
|
25
|
+
set perpetualDistributionRules(rules) {
|
|
26
|
+
this._rawTokenDistributionRules.perpetualDistributionRules = rules._rawChangeControlRules;
|
|
27
|
+
}
|
|
28
|
+
get preProgrammedDistribution() {
|
|
29
|
+
const dist = this._rawTokenDistributionRules.preProgrammedDistribution;
|
|
30
|
+
if (dist != null) {
|
|
31
|
+
return TokenPreProgrammedDistributionWASM.createFromRawInstance(dist);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
set preProgrammedDistribution(preProgrammedDistribution) {
|
|
35
|
+
this._rawTokenDistributionRules.preProgrammedDistribution = preProgrammedDistribution._rawTokenPreProgrammedDistribution;
|
|
36
|
+
}
|
|
37
|
+
get newTokenDestinationIdentity() {
|
|
38
|
+
const destination = this._rawTokenDistributionRules.newTokenDestinationIdentity;
|
|
39
|
+
if (destination != null) {
|
|
40
|
+
return IdentifierWASM.createFromRawInstance(destination);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
set newTokenDestinationIdentity(destinationIdentity) {
|
|
44
|
+
this._rawTokenDistributionRules.newTokenDestinationIdentity = destinationIdentity != null ? prepareIdentifierValue(destinationIdentity) : undefined;
|
|
45
|
+
}
|
|
46
|
+
get newTokenDestinationIdentityRules() {
|
|
47
|
+
return ChangeControlRulesWASM.createFromRawInstance(this._rawTokenDistributionRules.newTokenDestinationIdentityRules);
|
|
48
|
+
}
|
|
49
|
+
set newTokenDestinationIdentityRules(rules) {
|
|
50
|
+
this._rawTokenDistributionRules.newTokenDestinationIdentityRules = rules._rawChangeControlRules;
|
|
51
|
+
}
|
|
52
|
+
get mintingAllowChoosingDestination() {
|
|
53
|
+
return this._rawTokenDistributionRules.mintingAllowChoosingDestination;
|
|
54
|
+
}
|
|
55
|
+
set mintingAllowChoosingDestination(mintingAllowChoosingDestination) {
|
|
56
|
+
this._rawTokenDistributionRules.mintingAllowChoosingDestination = mintingAllowChoosingDestination;
|
|
57
|
+
}
|
|
58
|
+
get mintingAllowChoosingDestinationRules() {
|
|
59
|
+
return ChangeControlRulesWASM.createFromRawInstance(this._rawTokenDistributionRules.mintingAllowChoosingDestinationRules);
|
|
60
|
+
}
|
|
61
|
+
set mintingAllowChoosingDestinationRules(mintingAllowChoosingDestinationRules) {
|
|
62
|
+
this._rawTokenDistributionRules.mintingAllowChoosingDestinationRules = mintingAllowChoosingDestinationRules._rawChangeControlRules;
|
|
63
|
+
}
|
|
64
|
+
get changeDirectPurchasePricingRules() {
|
|
65
|
+
return ChangeControlRulesWASM.createFromRawInstance(this._rawTokenDistributionRules.changeDirectPurchasePricingRules);
|
|
66
|
+
}
|
|
67
|
+
set changeDirectPurchasePricingRules(changeDirectPurchasePricingRules) {
|
|
68
|
+
this._rawTokenDistributionRules.changeDirectPurchasePricingRules = changeDirectPurchasePricingRules._rawChangeControlRules;
|
|
69
|
+
}
|
|
70
|
+
static createFromRawInstance(rawInstance) {
|
|
71
|
+
const instance = Object.create(this.prototype);
|
|
72
|
+
instance._rawTokenDistributionRules = rawInstance;
|
|
73
|
+
return instance;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TokenKeepsHistoryRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
export declare class TokenKeepsHistoryRulesWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenKeepsHistoryRules: TokenKeepsHistoryRulesNAPI;
|
|
5
|
+
constructor(keepsTransferHistory: boolean, keepsFreezingHistory: boolean, keepsMintingHistory: boolean, keepsBurningHistory: boolean, keepsDirectPricingHistory: boolean, keepsDirectPurchaseHistory: boolean);
|
|
6
|
+
get keepsTransferHistory(): boolean;
|
|
7
|
+
set keepsTransferHistory(keepsTransferHistory: boolean);
|
|
8
|
+
get keepsFreezingHistory(): boolean;
|
|
9
|
+
set keepsFreezingHistory(keepsFreezingHistory: boolean);
|
|
10
|
+
get keepsMintingHistory(): boolean;
|
|
11
|
+
set keepsMintingHistory(keepsMintingHistory: boolean);
|
|
12
|
+
get keepsBurningHistory(): boolean;
|
|
13
|
+
set keepsBurningHistory(keepsBurningHistory: boolean);
|
|
14
|
+
get keepsDirectPricingHistory(): boolean;
|
|
15
|
+
set keepsDirectPricingHistory(keepsDirectPricingHistory: boolean);
|
|
16
|
+
get keepsDirectPurchaseHistory(): boolean;
|
|
17
|
+
set keepsDirectPurchaseHistory(keepsDirectPurchaseHistory: boolean);
|
|
18
|
+
static createFromRawInstance(rawInstance: TokenKeepsHistoryRulesNAPI): TokenKeepsHistoryRulesWASM;
|
|
19
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
export class TokenKeepsHistoryRulesWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenKeepsHistoryRules;
|
|
5
|
+
constructor(keepsTransferHistory, keepsFreezingHistory, keepsMintingHistory, keepsBurningHistory, keepsDirectPricingHistory, keepsDirectPurchaseHistory) {
|
|
6
|
+
this._rawTokenKeepsHistoryRules = new dppProvider.dpp.TokenKeepsHistoryRulesNAPI(keepsTransferHistory, keepsFreezingHistory, keepsMintingHistory, keepsBurningHistory, keepsDirectPricingHistory, keepsDirectPurchaseHistory);
|
|
7
|
+
}
|
|
8
|
+
get keepsTransferHistory() {
|
|
9
|
+
return this._rawTokenKeepsHistoryRules.keepsTransferHistory;
|
|
10
|
+
}
|
|
11
|
+
set keepsTransferHistory(keepsTransferHistory) {
|
|
12
|
+
this._rawTokenKeepsHistoryRules.keepsTransferHistory = keepsTransferHistory;
|
|
13
|
+
}
|
|
14
|
+
get keepsFreezingHistory() {
|
|
15
|
+
return this._rawTokenKeepsHistoryRules.keepsFreezingHistory;
|
|
16
|
+
}
|
|
17
|
+
set keepsFreezingHistory(keepsFreezingHistory) {
|
|
18
|
+
this._rawTokenKeepsHistoryRules.keepsFreezingHistory = keepsFreezingHistory;
|
|
19
|
+
}
|
|
20
|
+
get keepsMintingHistory() {
|
|
21
|
+
return this._rawTokenKeepsHistoryRules.keepsMintingHistory;
|
|
22
|
+
}
|
|
23
|
+
set keepsMintingHistory(keepsMintingHistory) {
|
|
24
|
+
this._rawTokenKeepsHistoryRules.keepsMintingHistory = keepsMintingHistory;
|
|
25
|
+
}
|
|
26
|
+
get keepsBurningHistory() {
|
|
27
|
+
return this._rawTokenKeepsHistoryRules.keepsBurningHistory;
|
|
28
|
+
}
|
|
29
|
+
set keepsBurningHistory(keepsBurningHistory) {
|
|
30
|
+
this._rawTokenKeepsHistoryRules.keepsBurningHistory = keepsBurningHistory;
|
|
31
|
+
}
|
|
32
|
+
get keepsDirectPricingHistory() {
|
|
33
|
+
return this._rawTokenKeepsHistoryRules.keepsDirectPricingHistory;
|
|
34
|
+
}
|
|
35
|
+
set keepsDirectPricingHistory(keepsDirectPricingHistory) {
|
|
36
|
+
this._rawTokenKeepsHistoryRules.keepsDirectPricingHistory = keepsDirectPricingHistory;
|
|
37
|
+
}
|
|
38
|
+
get keepsDirectPurchaseHistory() {
|
|
39
|
+
return this._rawTokenKeepsHistoryRules.keepsDirectPurchaseHistory;
|
|
40
|
+
}
|
|
41
|
+
set keepsDirectPurchaseHistory(keepsDirectPurchaseHistory) {
|
|
42
|
+
this._rawTokenKeepsHistoryRules.keepsDirectPurchaseHistory = keepsDirectPurchaseHistory;
|
|
43
|
+
}
|
|
44
|
+
static createFromRawInstance(rawInstance) {
|
|
45
|
+
const instance = Object.create(this.prototype);
|
|
46
|
+
instance._rawTokenKeepsHistoryRules = rawInstance;
|
|
47
|
+
return instance;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TokenMarketplaceRulesNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { TokenTradeModeWASM } from './TokenTradeMode.js';
|
|
3
|
+
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
4
|
+
export declare class TokenMarketplaceRulesWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenMarketplaceRules: TokenMarketplaceRulesNAPI;
|
|
7
|
+
constructor(tradeMode: TokenTradeModeWASM, tradeModeChangeRules: ChangeControlRulesWASM);
|
|
8
|
+
get tradeMode(): TokenTradeModeWASM;
|
|
9
|
+
set tradeMode(value: TokenTradeModeWASM);
|
|
10
|
+
get tradeModeChangeRules(): ChangeControlRulesWASM;
|
|
11
|
+
set tradeModeChangeRules(value: ChangeControlRulesWASM);
|
|
12
|
+
static createFromRawInstance(rawInstance: TokenMarketplaceRulesNAPI): TokenMarketplaceRulesWASM;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TokenTradeModeWASM } from './TokenTradeMode.js';
|
|
2
|
+
import { ChangeControlRulesWASM } from './ChangeControlRules.js';
|
|
3
|
+
import { dppProvider } from '../../provider.js';
|
|
4
|
+
export class TokenMarketplaceRulesWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenMarketplaceRules;
|
|
7
|
+
constructor(tradeMode, tradeModeChangeRules) {
|
|
8
|
+
this._rawTokenMarketplaceRules = new dppProvider.dpp.TokenMarketplaceRulesNAPI(tradeMode._rawTokenTradeMode, tradeModeChangeRules._rawChangeControlRules);
|
|
9
|
+
}
|
|
10
|
+
get tradeMode() {
|
|
11
|
+
return TokenTradeModeWASM.createFromRawInstance(this._rawTokenMarketplaceRules.tradeMode);
|
|
12
|
+
}
|
|
13
|
+
set tradeMode(value) {
|
|
14
|
+
this._rawTokenMarketplaceRules.tradeMode = value._rawTokenTradeMode;
|
|
15
|
+
}
|
|
16
|
+
get tradeModeChangeRules() {
|
|
17
|
+
return ChangeControlRulesWASM.createFromRawInstance(this._rawTokenMarketplaceRules.tradeModeChangeRules);
|
|
18
|
+
}
|
|
19
|
+
set tradeModeChangeRules(value) {
|
|
20
|
+
this._rawTokenMarketplaceRules.tradeModeChangeRules = value._rawChangeControlRules;
|
|
21
|
+
}
|
|
22
|
+
static createFromRawInstance(rawInstance) {
|
|
23
|
+
const instance = Object.create(this.prototype);
|
|
24
|
+
instance._rawTokenMarketplaceRules = rawInstance;
|
|
25
|
+
return instance;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TokenPerpetualDistributionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
import { RewardDistributionTypeWASM } from './RewardDistributionType.js';
|
|
3
|
+
import { TokenDistributionRecipientWASM } from './TokenDistributionRecipient.js';
|
|
4
|
+
export declare class TokenPerpetualDistributionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenPerpetualDistribution: TokenPerpetualDistributionNAPI;
|
|
7
|
+
constructor(rewardDistributionType: RewardDistributionTypeWASM, recipient: TokenDistributionRecipientWASM);
|
|
8
|
+
get distributionType(): RewardDistributionTypeWASM;
|
|
9
|
+
set distributionType(value: RewardDistributionTypeWASM);
|
|
10
|
+
get distributionRecipient(): TokenDistributionRecipientWASM;
|
|
11
|
+
set distributionRecipient(value: TokenDistributionRecipientWASM);
|
|
12
|
+
static createFromRawInstance(rawInstance: TokenPerpetualDistributionNAPI): TokenPerpetualDistributionWASM;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RewardDistributionTypeWASM } from './RewardDistributionType.js';
|
|
2
|
+
import { TokenDistributionRecipientWASM } from './TokenDistributionRecipient.js';
|
|
3
|
+
import { dppProvider } from '../../provider.js';
|
|
4
|
+
export class TokenPerpetualDistributionWASM {
|
|
5
|
+
/** @private **/
|
|
6
|
+
_rawTokenPerpetualDistribution;
|
|
7
|
+
constructor(rewardDistributionType, recipient) {
|
|
8
|
+
this._rawTokenPerpetualDistribution = new dppProvider.dpp.TokenPerpetualDistributionNAPI(rewardDistributionType._rawRewardDistributionType, recipient._rawTokenDistributionRecipient);
|
|
9
|
+
}
|
|
10
|
+
get distributionType() {
|
|
11
|
+
return RewardDistributionTypeWASM.createFromRawInstance(this._rawTokenPerpetualDistribution.distributionType);
|
|
12
|
+
}
|
|
13
|
+
set distributionType(value) {
|
|
14
|
+
this._rawTokenPerpetualDistribution.distributionType = value._rawRewardDistributionType;
|
|
15
|
+
}
|
|
16
|
+
get distributionRecipient() {
|
|
17
|
+
return TokenDistributionRecipientWASM.createFromRawInstance(this._rawTokenPerpetualDistribution.distributionRecipient);
|
|
18
|
+
}
|
|
19
|
+
set distributionRecipient(value) {
|
|
20
|
+
this._rawTokenPerpetualDistribution.distributionRecipient = value._rawTokenDistributionRecipient;
|
|
21
|
+
}
|
|
22
|
+
static createFromRawInstance(rawInstance) {
|
|
23
|
+
const instance = Object.create(this.prototype);
|
|
24
|
+
instance._rawTokenPerpetualDistribution = rawInstance;
|
|
25
|
+
return instance;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TokenPreProgrammedDistributionNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
export declare class TokenPreProgrammedDistributionWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenPreProgrammedDistribution: TokenPreProgrammedDistributionNAPI;
|
|
5
|
+
constructor(distributions: {
|
|
6
|
+
[timestamp: string]: {
|
|
7
|
+
[identifier: string]: bigint;
|
|
8
|
+
};
|
|
9
|
+
});
|
|
10
|
+
get distributions(): {
|
|
11
|
+
[timestamp: string]: {
|
|
12
|
+
[identifier: string]: bigint;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
set distributions(distributions: {
|
|
16
|
+
[timestamp: string]: {
|
|
17
|
+
[identifier: string]: bigint;
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
static createFromRawInstance(rawInstance: TokenPreProgrammedDistributionNAPI): TokenPreProgrammedDistributionWASM;
|
|
21
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
import { prepareIdentifierValue } from '../../utils.js';
|
|
3
|
+
function objectToDistributionArray(distributions) {
|
|
4
|
+
const timestamps = Object.keys(distributions);
|
|
5
|
+
const normalDistribution = [];
|
|
6
|
+
for (const timestamp of timestamps) {
|
|
7
|
+
const ids = Object.keys(distributions[timestamp]);
|
|
8
|
+
const identifiersWithAmount = [];
|
|
9
|
+
for (const identifier of ids) {
|
|
10
|
+
identifiersWithAmount.push([prepareIdentifierValue(identifier), distributions[timestamp][identifier].toString()]);
|
|
11
|
+
}
|
|
12
|
+
normalDistribution.push([timestamp, identifiersWithAmount]);
|
|
13
|
+
}
|
|
14
|
+
return normalDistribution;
|
|
15
|
+
}
|
|
16
|
+
export class TokenPreProgrammedDistributionWASM {
|
|
17
|
+
/** @private **/
|
|
18
|
+
_rawTokenPreProgrammedDistribution;
|
|
19
|
+
constructor(distributions) {
|
|
20
|
+
this._rawTokenPreProgrammedDistribution = new dppProvider.dpp.TokenPreProgrammedDistributionNAPI(objectToDistributionArray(distributions));
|
|
21
|
+
}
|
|
22
|
+
get distributions() {
|
|
23
|
+
const distributions = this._rawTokenPreProgrammedDistribution.distributions;
|
|
24
|
+
const out = {};
|
|
25
|
+
for (const [timestamp, identifiers] of distributions) {
|
|
26
|
+
const ids = {};
|
|
27
|
+
for (const [id, amount] of identifiers) {
|
|
28
|
+
ids[id.base58()] = BigInt(amount);
|
|
29
|
+
}
|
|
30
|
+
out[timestamp] = ids;
|
|
31
|
+
}
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
set distributions(distributions) {
|
|
35
|
+
this._rawTokenPreProgrammedDistribution.distributions = objectToDistributionArray(distributions);
|
|
36
|
+
}
|
|
37
|
+
static createFromRawInstance(rawInstance) {
|
|
38
|
+
const instance = Object.create(this.prototype);
|
|
39
|
+
instance._rawTokenPreProgrammedDistribution = rawInstance;
|
|
40
|
+
return instance;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TokenTradeModeNAPI } from '../../../../binaries/bindingsTypes.js';
|
|
2
|
+
export declare class TokenTradeModeWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenTradeMode: TokenTradeModeNAPI;
|
|
5
|
+
private constructor();
|
|
6
|
+
getValue(): string;
|
|
7
|
+
static NotTradeable(): TokenTradeModeWASM;
|
|
8
|
+
static createFromRawInstance(rawInstance: TokenTradeModeNAPI): TokenTradeModeWASM;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { dppProvider } from '../../provider.js';
|
|
2
|
+
export class TokenTradeModeWASM {
|
|
3
|
+
/** @private **/
|
|
4
|
+
_rawTokenTradeMode;
|
|
5
|
+
constructor(rawInstance) {
|
|
6
|
+
this._rawTokenTradeMode = rawInstance;
|
|
7
|
+
}
|
|
8
|
+
getValue() {
|
|
9
|
+
return this._rawTokenTradeMode.getValue();
|
|
10
|
+
}
|
|
11
|
+
static NotTradeable() {
|
|
12
|
+
return TokenTradeModeWASM.createFromRawInstance(dppProvider.dpp.TokenTradeModeNAPI.NotTradeable());
|
|
13
|
+
}
|
|
14
|
+
static createFromRawInstance(rawInstance) {
|
|
15
|
+
return new TokenTradeModeWASM(rawInstance);
|
|
16
|
+
}
|
|
17
|
+
}
|