nem-libray 2.0.0-RC4
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/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/src/NEMLibrary.d.ts +25 -0
- package/dist/src/NEMLibrary.js +69 -0
- package/dist/src/NEMLibrary.js.map +1 -0
- package/dist/src/infrastrcture.d.ts +13 -0
- package/dist/src/infrastrcture.js +44 -0
- package/dist/src/infrastrcture.js.map +1 -0
- package/dist/src/infrastructure/AccountHttp.d.ts +204 -0
- package/dist/src/infrastructure/AccountHttp.js +415 -0
- package/dist/src/infrastructure/AccountHttp.js.map +1 -0
- package/dist/src/infrastructure/AccountListener.d.ts +20 -0
- package/dist/src/infrastructure/AccountListener.js +71 -0
- package/dist/src/infrastructure/AccountListener.js.map +1 -0
- package/dist/src/infrastructure/AllTransactionsPageable.d.ts +1 -0
- package/dist/src/infrastructure/AllTransactionsPageable.js +35 -0
- package/dist/src/infrastructure/AllTransactionsPageable.js.map +1 -0
- package/dist/src/infrastructure/AssetHttp.d.ts +36 -0
- package/dist/src/infrastructure/AssetHttp.js +85 -0
- package/dist/src/infrastructure/AssetHttp.js.map +1 -0
- package/dist/src/infrastructure/BlockHttp.d.ts +14 -0
- package/dist/src/infrastructure/BlockHttp.js +54 -0
- package/dist/src/infrastructure/BlockHttp.js.map +1 -0
- package/dist/src/infrastructure/BlockchainListener.d.ts +24 -0
- package/dist/src/infrastructure/BlockchainListener.js +93 -0
- package/dist/src/infrastructure/BlockchainListener.js.map +1 -0
- package/dist/src/infrastructure/ChainHttp.d.ts +23 -0
- package/dist/src/infrastructure/ChainHttp.js +68 -0
- package/dist/src/infrastructure/ChainHttp.js.map +1 -0
- package/dist/src/infrastructure/ConfirmedTransactionListener.d.ts +20 -0
- package/dist/src/infrastructure/ConfirmedTransactionListener.js +76 -0
- package/dist/src/infrastructure/ConfirmedTransactionListener.js.map +1 -0
- package/dist/src/infrastructure/HarvestInfoPageable.d.ts +1 -0
- package/dist/src/infrastructure/HarvestInfoPageable.js +52 -0
- package/dist/src/infrastructure/HarvestInfoPageable.js.map +1 -0
- package/dist/src/infrastructure/HttpEndpoint.d.ts +15 -0
- package/dist/src/infrastructure/HttpEndpoint.js +132 -0
- package/dist/src/infrastructure/HttpEndpoint.js.map +1 -0
- package/dist/src/infrastructure/IncomingTransactionsPageable.d.ts +1 -0
- package/dist/src/infrastructure/IncomingTransactionsPageable.js +29 -0
- package/dist/src/infrastructure/IncomingTransactionsPageable.js.map +1 -0
- package/dist/src/infrastructure/Listener.d.ts +14 -0
- package/dist/src/infrastructure/Listener.js +101 -0
- package/dist/src/infrastructure/Listener.js.map +1 -0
- package/dist/src/infrastructure/NamespaceHttp.d.ts +27 -0
- package/dist/src/infrastructure/NamespaceHttp.js +78 -0
- package/dist/src/infrastructure/NamespaceHttp.js.map +1 -0
- package/dist/src/infrastructure/NamespacesPageable.d.ts +1 -0
- package/dist/src/infrastructure/NamespacesPageable.js +28 -0
- package/dist/src/infrastructure/NamespacesPageable.js.map +1 -0
- package/dist/src/infrastructure/NodeHttp.d.ts +45 -0
- package/dist/src/infrastructure/NodeHttp.js +116 -0
- package/dist/src/infrastructure/NodeHttp.js.map +1 -0
- package/dist/src/infrastructure/OutgoingTransactionsPageable.d.ts +1 -0
- package/dist/src/infrastructure/OutgoingTransactionsPageable.js +59 -0
- package/dist/src/infrastructure/OutgoingTransactionsPageable.js.map +1 -0
- package/dist/src/infrastructure/Pageable.d.ts +10 -0
- package/dist/src/infrastructure/Pageable.js +55 -0
- package/dist/src/infrastructure/Pageable.js.map +1 -0
- package/dist/src/infrastructure/TransactionHttp.d.ts +20 -0
- package/dist/src/infrastructure/TransactionHttp.js +68 -0
- package/dist/src/infrastructure/TransactionHttp.js.map +1 -0
- package/dist/src/infrastructure/UnconfirmedTransactionListener.d.ts +20 -0
- package/dist/src/infrastructure/UnconfirmedTransactionListener.js +76 -0
- package/dist/src/infrastructure/UnconfirmedTransactionListener.js.map +1 -0
- package/dist/src/infrastructure/account/AccountHistoricalDataViewModelDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/AccountHistoricalDataViewModelDTO.js +26 -0
- package/dist/src/infrastructure/account/AccountHistoricalDataViewModelDTO.js.map +1 -0
- package/dist/src/infrastructure/account/AccountImportanceViewModelDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/AccountImportanceViewModelDTO.js +26 -0
- package/dist/src/infrastructure/account/AccountImportanceViewModelDTO.js.map +1 -0
- package/dist/src/infrastructure/account/AccountInfoDTO.d.ts +10 -0
- package/dist/src/infrastructure/account/AccountInfoDTO.js +26 -0
- package/dist/src/infrastructure/account/AccountInfoDTO.js.map +1 -0
- package/dist/src/infrastructure/account/AccountMetaDataDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/AccountMetaDataDTO.js +26 -0
- package/dist/src/infrastructure/account/AccountMetaDataDTO.js.map +1 -0
- package/dist/src/infrastructure/account/AccountMetaDataPairDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/AccountMetaDataPairDTO.js +26 -0
- package/dist/src/infrastructure/account/AccountMetaDataPairDTO.js.map +1 -0
- package/dist/src/infrastructure/account/AccountPrivateKeyTransactionsPageDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/AccountPrivateKeyTransactionsPageDTO.js +26 -0
- package/dist/src/infrastructure/account/AccountPrivateKeyTransactionsPageDTO.js.map +1 -0
- package/dist/src/infrastructure/account/HarvestInfoDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/HarvestInfoDTO.js +26 -0
- package/dist/src/infrastructure/account/HarvestInfoDTO.js.map +1 -0
- package/dist/src/infrastructure/account/KeyPairViewModelDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/KeyPairViewModelDTO.js +26 -0
- package/dist/src/infrastructure/account/KeyPairViewModelDTO.js.map +1 -0
- package/dist/src/infrastructure/account/PrivateKeyDTO.d.ts +1 -0
- package/dist/src/infrastructure/account/PrivateKeyDTO.js +26 -0
- package/dist/src/infrastructure/account/PrivateKeyDTO.js.map +1 -0
- package/dist/src/infrastructure/asset/MosaicDTO.d.ts +1 -0
- package/dist/src/infrastructure/asset/MosaicDTO.js +26 -0
- package/dist/src/infrastructure/asset/MosaicDTO.js.map +1 -0
- package/dist/src/infrastructure/asset/MosaicDefinitionDTO.d.ts +1 -0
- package/dist/src/infrastructure/asset/MosaicDefinitionDTO.js +26 -0
- package/dist/src/infrastructure/asset/MosaicDefinitionDTO.js.map +1 -0
- package/dist/src/infrastructure/asset/MosaicDefinitionMetaDataPairDTO.d.ts +1 -0
- package/dist/src/infrastructure/asset/MosaicDefinitionMetaDataPairDTO.js +26 -0
- package/dist/src/infrastructure/asset/MosaicDefinitionMetaDataPairDTO.js.map +1 -0
- package/dist/src/infrastructure/asset/MosaicIdDTO.d.ts +1 -0
- package/dist/src/infrastructure/asset/MosaicIdDTO.js +26 -0
- package/dist/src/infrastructure/asset/MosaicIdDTO.js.map +1 -0
- package/dist/src/infrastructure/asset/MosaicLevyDTO.d.ts +1 -0
- package/dist/src/infrastructure/asset/MosaicLevyDTO.js +26 -0
- package/dist/src/infrastructure/asset/MosaicLevyDTO.js.map +1 -0
- package/dist/src/infrastructure/asset/MosaicPropertyDTO.d.ts +8 -0
- package/dist/src/infrastructure/asset/MosaicPropertyDTO.js +26 -0
- package/dist/src/infrastructure/asset/MosaicPropertyDTO.js.map +1 -0
- package/dist/src/infrastructure/blockchain/BlockChainScoreDTO.d.ts +1 -0
- package/dist/src/infrastructure/blockchain/BlockChainScoreDTO.js +26 -0
- package/dist/src/infrastructure/blockchain/BlockChainScoreDTO.js.map +1 -0
- package/dist/src/infrastructure/blockchain/BlockDTO.d.ts +6 -0
- package/dist/src/infrastructure/blockchain/BlockDTO.js +26 -0
- package/dist/src/infrastructure/blockchain/BlockDTO.js.map +1 -0
- package/dist/src/infrastructure/blockchain/BlockHeightDTO.d.ts +1 -0
- package/dist/src/infrastructure/blockchain/BlockHeightDTO.js +26 -0
- package/dist/src/infrastructure/blockchain/BlockHeightDTO.js.map +1 -0
- package/dist/src/infrastructure/blockchain/ExplorerBlockViewModelDTO.d.ts +1 -0
- package/dist/src/infrastructure/blockchain/ExplorerBlockViewModelDTO.js +26 -0
- package/dist/src/infrastructure/blockchain/ExplorerBlockViewModelDTO.js.map +1 -0
- package/dist/src/infrastructure/debug/AuditCollectionDTO.d.ts +22 -0
- package/dist/src/infrastructure/debug/AuditCollectionDTO.js +26 -0
- package/dist/src/infrastructure/debug/AuditCollectionDTO.js.map +1 -0
- package/dist/src/infrastructure/debug/NemAsyncTimerVisitorDTO.d.ts +1 -0
- package/dist/src/infrastructure/debug/NemAsyncTimerVisitorDTO.js +26 -0
- package/dist/src/infrastructure/debug/NemAsyncTimerVisitorDTO.js.map +1 -0
- package/dist/src/infrastructure/debug/NisNodeInfoDTO.d.ts +1 -0
- package/dist/src/infrastructure/debug/NisNodeInfoDTO.js +26 -0
- package/dist/src/infrastructure/debug/NisNodeInfoDTO.js.map +1 -0
- package/dist/src/infrastructure/debug/TimeSynchronizationResultDTO.d.ts +1 -0
- package/dist/src/infrastructure/debug/TimeSynchronizationResultDTO.js +26 -0
- package/dist/src/infrastructure/debug/TimeSynchronizationResultDTO.js.map +1 -0
- package/dist/src/infrastructure/namespace/NamespaceDTO.d.ts +1 -0
- package/dist/src/infrastructure/namespace/NamespaceDTO.js +26 -0
- package/dist/src/infrastructure/namespace/NamespaceDTO.js.map +1 -0
- package/dist/src/infrastructure/namespace/NamespaceMetaDataPairDTO.d.ts +1 -0
- package/dist/src/infrastructure/namespace/NamespaceMetaDataPairDTO.js +26 -0
- package/dist/src/infrastructure/namespace/NamespaceMetaDataPairDTO.js.map +1 -0
- package/dist/src/infrastructure/node/ApplicationMetaDataDTO.d.ts +1 -0
- package/dist/src/infrastructure/node/ApplicationMetaDataDTO.js +26 -0
- package/dist/src/infrastructure/node/ApplicationMetaDataDTO.js.map +1 -0
- package/dist/src/infrastructure/node/BootNodeRequestDTO.d.ts +1 -0
- package/dist/src/infrastructure/node/BootNodeRequestDTO.js +26 -0
- package/dist/src/infrastructure/node/BootNodeRequestDTO.js.map +1 -0
- package/dist/src/infrastructure/node/CommunicationTimeStampsDTO.d.ts +1 -0
- package/dist/src/infrastructure/node/CommunicationTimeStampsDTO.js +26 -0
- package/dist/src/infrastructure/node/CommunicationTimeStampsDTO.js.map +1 -0
- package/dist/src/infrastructure/node/ExtendedNodeExperiencePairDTO.d.ts +1 -0
- package/dist/src/infrastructure/node/ExtendedNodeExperiencePairDTO.js +26 -0
- package/dist/src/infrastructure/node/ExtendedNodeExperiencePairDTO.js.map +1 -0
- package/dist/src/infrastructure/node/NodeCollectionDTO.d.ts +1 -0
- package/dist/src/infrastructure/node/NodeCollectionDTO.js +26 -0
- package/dist/src/infrastructure/node/NodeCollectionDTO.js.map +1 -0
- package/dist/src/infrastructure/node/NodeDTO.d.ts +19 -0
- package/dist/src/infrastructure/node/NodeDTO.js +26 -0
- package/dist/src/infrastructure/node/NodeDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/CreateTransactionFromDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/CreateTransactionFromDTO.js +162 -0
- package/dist/src/infrastructure/transaction/CreateTransactionFromDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/CreateUnconfirmedTransactionFromDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/CreateUnconfirmedTransactionFromDTO.js +104 -0
- package/dist/src/infrastructure/transaction/CreateUnconfirmedTransactionFromDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/ErrorObjectDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/ErrorObjectDTO.js +26 -0
- package/dist/src/infrastructure/transaction/ErrorObjectDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/HashData.d.ts +10 -0
- package/dist/src/infrastructure/transaction/HashData.js +26 -0
- package/dist/src/infrastructure/transaction/HashData.js.map +1 -0
- package/dist/src/infrastructure/transaction/ImportanceTransferTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/ImportanceTransferTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/ImportanceTransferTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/Message.d.ts +1 -0
- package/dist/src/infrastructure/transaction/Message.js +26 -0
- package/dist/src/infrastructure/transaction/Message.js.map +1 -0
- package/dist/src/infrastructure/transaction/MosaicDefinitionCreationTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/MosaicDefinitionCreationTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/MosaicDefinitionCreationTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/MosaicSupplyChangeTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/MosaicSupplyChangeTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/MosaicSupplyChangeTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/MultisigAggregateModificationTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/MultisigAggregateModificationTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/MultisigAggregateModificationTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/MultisigCosignatoryModificationDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/MultisigCosignatoryModificationDTO.js +26 -0
- package/dist/src/infrastructure/transaction/MultisigCosignatoryModificationDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/MultisigSignatureTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/MultisigSignatureTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/MultisigSignatureTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/MultisigTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/MultisigTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/MultisigTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/NemAnnounceResultDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/NemAnnounceResultDTO.js +26 -0
- package/dist/src/infrastructure/transaction/NemAnnounceResultDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/NemRequestResultDTO.d.ts +10 -0
- package/dist/src/infrastructure/transaction/NemRequestResultDTO.js +26 -0
- package/dist/src/infrastructure/transaction/NemRequestResultDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/ProvisionNamespaceTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/ProvisionNamespaceTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/ProvisionNamespaceTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/RequestPrepareAnnonceDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/RequestPrepareAnnonceDTO.js +26 -0
- package/dist/src/infrastructure/transaction/RequestPrepareAnnonceDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/TransactionDTO.d.ts +31 -0
- package/dist/src/infrastructure/transaction/TransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/TransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/TransactionMetaDataDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/TransactionMetaDataDTO.js +26 -0
- package/dist/src/infrastructure/transaction/TransactionMetaDataDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/TransactionMetaDataPairDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/TransactionMetaDataPairDTO.js +26 -0
- package/dist/src/infrastructure/transaction/TransactionMetaDataPairDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/TransferTransactionDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/TransferTransactionDTO.js +26 -0
- package/dist/src/infrastructure/transaction/TransferTransactionDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataDTO.js +26 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataPairDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataPairDTO.js +26 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataPairDTO.js.map +1 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionsDTO.d.ts +1 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionsDTO.js +26 -0
- package/dist/src/infrastructure/transaction/UnconfirmedTransactionsDTO.js.map +1 -0
- package/dist/src/models/account/Account.d.ts +52 -0
- package/dist/src/models/account/Account.js +136 -0
- package/dist/src/models/account/Account.js.map +1 -0
- package/dist/src/models/account/AccountHarvestInfo.d.ts +25 -0
- package/dist/src/models/account/AccountHarvestInfo.js +55 -0
- package/dist/src/models/account/AccountHarvestInfo.js.map +1 -0
- package/dist/src/models/account/AccountHistoricalInfo.d.ts +25 -0
- package/dist/src/models/account/AccountHistoricalInfo.js +58 -0
- package/dist/src/models/account/AccountHistoricalInfo.js.map +1 -0
- package/dist/src/models/account/AccountImportanceInfo.d.ts +35 -0
- package/dist/src/models/account/AccountImportanceInfo.js +77 -0
- package/dist/src/models/account/AccountImportanceInfo.js.map +1 -0
- package/dist/src/models/account/AccountInfo.d.ts +79 -0
- package/dist/src/models/account/AccountInfo.js +129 -0
- package/dist/src/models/account/AccountInfo.js.map +1 -0
- package/dist/src/models/account/Address.d.ts +25 -0
- package/dist/src/models/account/Address.js +80 -0
- package/dist/src/models/account/Address.js.map +1 -0
- package/dist/src/models/account/Balance.d.ts +17 -0
- package/dist/src/models/account/Balance.js +42 -0
- package/dist/src/models/account/Balance.js.map +1 -0
- package/dist/src/models/account/NodeHarvestInfo.d.ts +10 -0
- package/dist/src/models/account/NodeHarvestInfo.js +38 -0
- package/dist/src/models/account/NodeHarvestInfo.js.map +1 -0
- package/dist/src/models/account/PublicAccount.d.ts +25 -0
- package/dist/src/models/account/PublicAccount.js +82 -0
- package/dist/src/models/account/PublicAccount.js.map +1 -0
- package/dist/src/models/asset/Asset.d.ts +20 -0
- package/dist/src/models/asset/Asset.js +59 -0
- package/dist/src/models/asset/Asset.js.map +1 -0
- package/dist/src/models/asset/AssetDefinition.d.ts +83 -0
- package/dist/src/models/asset/AssetDefinition.js +136 -0
- package/dist/src/models/asset/AssetDefinition.js.map +1 -0
- package/dist/src/models/asset/AssetId.d.ts +31 -0
- package/dist/src/models/asset/AssetId.js +77 -0
- package/dist/src/models/asset/AssetId.js.map +1 -0
- package/dist/src/models/asset/AssetLevy.d.ts +40 -0
- package/dist/src/models/asset/AssetLevy.js +76 -0
- package/dist/src/models/asset/AssetLevy.js.map +1 -0
- package/dist/src/models/asset/AssetTransferable.d.ts +65 -0
- package/dist/src/models/asset/AssetTransferable.js +88 -0
- package/dist/src/models/asset/AssetTransferable.js.map +1 -0
- package/dist/src/models/asset/XEM.d.ts +49 -0
- package/dist/src/models/asset/XEM.js +83 -0
- package/dist/src/models/asset/XEM.js.map +1 -0
- package/dist/src/models/blockchain/Block.d.ts +57 -0
- package/dist/src/models/blockchain/Block.js +81 -0
- package/dist/src/models/blockchain/Block.js.map +1 -0
- package/dist/src/models/namespace/Namespace.d.ts +23 -0
- package/dist/src/models/namespace/Namespace.js +64 -0
- package/dist/src/models/namespace/Namespace.js.map +1 -0
- package/dist/src/models/node/ExtendedNodeExperience.d.ts +34 -0
- package/dist/src/models/node/ExtendedNodeExperience.js +79 -0
- package/dist/src/models/node/ExtendedNodeExperience.js.map +1 -0
- package/dist/src/models/node/NetworkTypes.d.ts +17 -0
- package/dist/src/models/node/NetworkTypes.js +44 -0
- package/dist/src/models/node/NetworkTypes.js.map +1 -0
- package/dist/src/models/node/NisNodeInfo.d.ts +39 -0
- package/dist/src/models/node/NisNodeInfo.js +79 -0
- package/dist/src/models/node/NisNodeInfo.js.map +1 -0
- package/dist/src/models/node/Node.d.ts +76 -0
- package/dist/src/models/node/Node.js +131 -0
- package/dist/src/models/node/Node.js.map +1 -0
- package/dist/src/models/node/NodeCollection.d.ts +22 -0
- package/dist/src/models/node/NodeCollection.js +54 -0
- package/dist/src/models/node/NodeCollection.js.map +1 -0
- package/dist/src/models/transaction/AssetDefinitionCreationTransaction.d.ts +39 -0
- package/dist/src/models/transaction/AssetDefinitionCreationTransaction.js +94 -0
- package/dist/src/models/transaction/AssetDefinitionCreationTransaction.js.map +1 -0
- package/dist/src/models/transaction/AssetSupplyChangeTransaction.d.ts +48 -0
- package/dist/src/models/transaction/AssetSupplyChangeTransaction.js +94 -0
- package/dist/src/models/transaction/AssetSupplyChangeTransaction.js.map +1 -0
- package/dist/src/models/transaction/EncryptedMessage.d.ts +8 -0
- package/dist/src/models/transaction/EncryptedMessage.js +86 -0
- package/dist/src/models/transaction/EncryptedMessage.js.map +1 -0
- package/dist/src/models/transaction/HexMessage.d.ts +10 -0
- package/dist/src/models/transaction/HexMessage.js +37 -0
- package/dist/src/models/transaction/HexMessage.js.map +1 -0
- package/dist/src/models/transaction/ImportanceTransferTransaction.d.ts +45 -0
- package/dist/src/models/transaction/ImportanceTransferTransaction.js +92 -0
- package/dist/src/models/transaction/ImportanceTransferTransaction.js.map +1 -0
- package/dist/src/models/transaction/Message.d.ts +12 -0
- package/dist/src/models/transaction/Message.js +110 -0
- package/dist/src/models/transaction/Message.js.map +1 -0
- package/dist/src/models/transaction/MultisigAggregateModificationTransaction.d.ts +55 -0
- package/dist/src/models/transaction/MultisigAggregateModificationTransaction.js +112 -0
- package/dist/src/models/transaction/MultisigAggregateModificationTransaction.js.map +1 -0
- package/dist/src/models/transaction/MultisigSignatureTransaction.d.ts +35 -0
- package/dist/src/models/transaction/MultisigSignatureTransaction.js +92 -0
- package/dist/src/models/transaction/MultisigSignatureTransaction.js.map +1 -0
- package/dist/src/models/transaction/MultisigTransaction.d.ts +49 -0
- package/dist/src/models/transaction/MultisigTransaction.js +102 -0
- package/dist/src/models/transaction/MultisigTransaction.js.map +1 -0
- package/dist/src/models/transaction/NemAnnounceResult.d.ts +77 -0
- package/dist/src/models/transaction/NemAnnounceResult.js +66 -0
- package/dist/src/models/transaction/NemAnnounceResult.js.map +1 -0
- package/dist/src/models/transaction/PlainMessage.d.ts +19 -0
- package/dist/src/models/transaction/PlainMessage.js +77 -0
- package/dist/src/models/transaction/PlainMessage.js.map +1 -0
- package/dist/src/models/transaction/ProvisionNamespaceTransaction.d.ts +57 -0
- package/dist/src/models/transaction/ProvisionNamespaceTransaction.js +117 -0
- package/dist/src/models/transaction/ProvisionNamespaceTransaction.js.map +1 -0
- package/dist/src/models/transaction/SignedTransaction.d.ts +13 -0
- package/dist/src/models/transaction/SignedTransaction.js +26 -0
- package/dist/src/models/transaction/SignedTransaction.js.map +1 -0
- package/dist/src/models/transaction/TimeWindow.d.ts +24 -0
- package/dist/src/models/transaction/TimeWindow.js +84 -0
- package/dist/src/models/transaction/TimeWindow.js.map +1 -0
- package/dist/src/models/transaction/Transaction.d.ts +56 -0
- package/dist/src/models/transaction/Transaction.js +98 -0
- package/dist/src/models/transaction/Transaction.js.map +1 -0
- package/dist/src/models/transaction/TransactionInfo.d.ts +39 -0
- package/dist/src/models/transaction/TransactionInfo.js +60 -0
- package/dist/src/models/transaction/TransactionInfo.js.map +1 -0
- package/dist/src/models/transaction/TransactionTypes.d.ts +80 -0
- package/dist/src/models/transaction/TransactionTypes.js +159 -0
- package/dist/src/models/transaction/TransactionTypes.js.map +1 -0
- package/dist/src/models/transaction/TransferTransaction.d.ts +78 -0
- package/dist/src/models/transaction/TransferTransaction.js +176 -0
- package/dist/src/models/transaction/TransferTransaction.js.map +1 -0
- package/dist/src/models/wallet/BrainPassword.d.ts +11 -0
- package/dist/src/models/wallet/BrainPassword.js +42 -0
- package/dist/src/models/wallet/BrainPassword.js.map +1 -0
- package/dist/src/models/wallet/BrainWallet.d.ts +34 -0
- package/dist/src/models/wallet/BrainWallet.js +101 -0
- package/dist/src/models/wallet/BrainWallet.js.map +1 -0
- package/dist/src/models/wallet/EncryptedPrivateKey.d.ts +13 -0
- package/dist/src/models/wallet/EncryptedPrivateKey.js +56 -0
- package/dist/src/models/wallet/EncryptedPrivateKey.js.map +1 -0
- package/dist/src/models/wallet/Password.d.ts +14 -0
- package/dist/src/models/wallet/Password.js +41 -0
- package/dist/src/models/wallet/Password.js.map +1 -0
- package/dist/src/models/wallet/SimpleWallet.d.ts +47 -0
- package/dist/src/models/wallet/SimpleWallet.js +143 -0
- package/dist/src/models/wallet/SimpleWallet.js.map +1 -0
- package/dist/src/models/wallet/Wallet.d.ts +51 -0
- package/dist/src/models/wallet/Wallet.js +81 -0
- package/dist/src/models/wallet/Wallet.js.map +1 -0
- package/dist/src/models.d.ts +46 -0
- package/dist/src/models.js +74 -0
- package/dist/src/models.js.map +1 -0
- package/dist/src/services/AccountOwnedAssetService.d.ts +30 -0
- package/dist/src/services/AccountOwnedAssetService.js +63 -0
- package/dist/src/services/AccountOwnedAssetService.js.map +1 -0
- package/dist/src/services/AssetService.d.ts +23 -0
- package/dist/src/services/AssetService.js +87 -0
- package/dist/src/services/AssetService.js.map +1 -0
- package/dist/src/services/QRService.d.ts +66 -0
- package/dist/src/services/QRService.js +155 -0
- package/dist/src/services/QRService.js.map +1 -0
- package/dist/src/services.d.ts +3 -0
- package/dist/src/services.js +32 -0
- package/dist/src/services.js.map +1 -0
- package/dist/src/vendor/sockjs-0.3.4.d.ts +25 -0
- package/dist/src/vendor/sockjs-0.3.4.js +2516 -0
- package/dist/src/vendor/sockjs-0.3.4.min.js +27 -0
- package/package.json +87 -0
- package/z4bfo2p7.cjs +1 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
import { TransactionDTO } from "../../infrastructure/transaction/TransactionDTO";
|
2
|
+
import { PublicAccount } from "../account/PublicAccount";
|
3
|
+
import { TimeWindow } from "./TimeWindow";
|
4
|
+
import { Transaction } from "./Transaction";
|
5
|
+
/**
|
6
|
+
* The mode. Possible values are:
|
7
|
+
* 1: Activate remote harvesting.
|
8
|
+
* 2: Deactivate remote harvesting.
|
9
|
+
*/
|
10
|
+
export declare enum ImportanceMode {
|
11
|
+
Activate = 1,
|
12
|
+
Deactivate = 2,
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* NIS has the ability to transfer the importance of one account to another account for harvesting.
|
16
|
+
* The account receiving the importance is called the remote account.
|
17
|
+
* Importance transfer transactions are part of the secure harvesting feature of NEM.
|
18
|
+
* Once an importance transaction has been included in a block it needs 6 hours to become active.
|
19
|
+
*/
|
20
|
+
export declare class ImportanceTransferTransaction extends Transaction {
|
21
|
+
/**
|
22
|
+
* The fee for the transaction. The higher the fee, the higher the priority of the transaction. Transactions with high priority get included in a block before transactions with lower priority.
|
23
|
+
*/
|
24
|
+
readonly fee: number;
|
25
|
+
/**
|
26
|
+
* The public key of the receiving account as hexadecimal string.
|
27
|
+
*/
|
28
|
+
readonly remoteAccount: PublicAccount;
|
29
|
+
/**
|
30
|
+
* The mode, activate or deactivate
|
31
|
+
*/
|
32
|
+
readonly mode: ImportanceMode;
|
33
|
+
/**
|
34
|
+
* Create DTO of ImportanceTransferTransaction
|
35
|
+
*/
|
36
|
+
toDTO(): TransactionDTO;
|
37
|
+
/**
|
38
|
+
* Create a ImportanceTransferTransaction object
|
39
|
+
* @param timeWindow
|
40
|
+
* @param mode
|
41
|
+
* @param remoteAccount
|
42
|
+
* @returns {ImportanceTransferTransaction}
|
43
|
+
*/
|
44
|
+
static create(timeWindow: TimeWindow, mode: ImportanceMode, remoteAccount: PublicAccount): ImportanceTransferTransaction;
|
45
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* The MIT License (MIT)
|
4
|
+
*
|
5
|
+
* Copyright (c) 2017 NEM
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
15
|
+
* copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
* SOFTWARE.
|
24
|
+
*/
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
const Transaction_1 = require("./Transaction");
|
27
|
+
const TransactionTypes_1 = require("./TransactionTypes");
|
28
|
+
/**
|
29
|
+
* The mode. Possible values are:
|
30
|
+
* 1: Activate remote harvesting.
|
31
|
+
* 2: Deactivate remote harvesting.
|
32
|
+
*/
|
33
|
+
var ImportanceMode;
|
34
|
+
(function (ImportanceMode) {
|
35
|
+
ImportanceMode[ImportanceMode["Activate"] = 1] = "Activate";
|
36
|
+
ImportanceMode[ImportanceMode["Deactivate"] = 2] = "Deactivate";
|
37
|
+
})(ImportanceMode = exports.ImportanceMode || (exports.ImportanceMode = {}));
|
38
|
+
/**
|
39
|
+
* NIS has the ability to transfer the importance of one account to another account for harvesting.
|
40
|
+
* The account receiving the importance is called the remote account.
|
41
|
+
* Importance transfer transactions are part of the secure harvesting feature of NEM.
|
42
|
+
* Once an importance transaction has been included in a block it needs 6 hours to become active.
|
43
|
+
*/
|
44
|
+
class ImportanceTransferTransaction extends Transaction_1.Transaction {
|
45
|
+
/**
|
46
|
+
* @internal
|
47
|
+
* @param timeWindow
|
48
|
+
* @param version
|
49
|
+
* @param mode
|
50
|
+
* @param remoteAccount
|
51
|
+
* @param fee
|
52
|
+
* @param signature
|
53
|
+
* @param sender
|
54
|
+
* @param transactionInfo
|
55
|
+
*/
|
56
|
+
constructor(timeWindow, version, mode, remoteAccount, fee, signature, sender, transactionInfo) {
|
57
|
+
super(TransactionTypes_1.TransactionTypes.IMPORTANCE_TRANSFER, version, timeWindow, signature, sender, transactionInfo);
|
58
|
+
this.mode = mode;
|
59
|
+
this.remoteAccount = remoteAccount;
|
60
|
+
this.fee = fee;
|
61
|
+
}
|
62
|
+
/**
|
63
|
+
* Create DTO of ImportanceTransferTransaction
|
64
|
+
*/
|
65
|
+
toDTO() {
|
66
|
+
const version = this.networkVersion ? this.networkVersion : this.version;
|
67
|
+
return this.serializeDTO({
|
68
|
+
signer: this.signer ? this.signer.publicKey : undefined,
|
69
|
+
deadline: this.timeWindow.deadlineToDTO(),
|
70
|
+
timeStamp: this.timeWindow.timeStampToDTO(),
|
71
|
+
type: this.type,
|
72
|
+
fee: this.fee,
|
73
|
+
signature: this.signature,
|
74
|
+
version,
|
75
|
+
remoteAccount: this.remoteAccount.publicKey,
|
76
|
+
mode: this.mode,
|
77
|
+
});
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* Create a ImportanceTransferTransaction object
|
81
|
+
* @param timeWindow
|
82
|
+
* @param mode
|
83
|
+
* @param remoteAccount
|
84
|
+
* @returns {ImportanceTransferTransaction}
|
85
|
+
*/
|
86
|
+
static create(timeWindow, mode, remoteAccount) {
|
87
|
+
const fee = Math.floor(3.0 * 0.05 * 1000000.0);
|
88
|
+
return new ImportanceTransferTransaction(timeWindow, 1, mode, remoteAccount, fee);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
exports.ImportanceTransferTransaction = ImportanceTransferTransaction;
|
92
|
+
//# sourceMappingURL=ImportanceTransferTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ImportanceTransferTransaction.js","sourceRoot":"","sources":["../../../../src/models/transaction/ImportanceTransferTransaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAMH,+CAA0C;AAE1C,yDAAoD;AAEpD;;;;GAIG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,2DAAY,CAAA;IACZ,+DAAc,CAAA;AAChB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED;;;;;GAKG;AACH,mCAA2C,SAAQ,yBAAW;IAgB5D;;;;;;;;;;OAUG;IACH,YAAY,UAAsB,EACtB,OAAe,EACf,IAAoB,EACpB,aAA4B,EAC5B,GAAW,EACX,SAAkB,EAClB,MAAsB,EACtB,eAAiC;QAC3C,KAAK,CAAC,mCAAgB,CAAC,mBAAmB,EACxC,OAAO,EACP,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,KAAK;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACzE,OAAO,IAAI,CAAC,YAAY,CAAC;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACvD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;YACzC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE;YAC3C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO;YACP,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS;YAC3C,IAAI,EAAE,IAAI,CAAC,IAAI;SACoB,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,UAAsB,EAC7B,IAAoB,EACpB,aAA4B;QACxC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;QAC/C,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IACpF,CAAC;CACF;AA1ED,sEA0EC"}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* The MIT License (MIT)
|
4
|
+
*
|
5
|
+
* Copyright (c) 2017 NEM
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
15
|
+
* copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
* SOFTWARE.
|
24
|
+
*/
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
const utf8 = require("utf8");
|
27
|
+
/**
|
28
|
+
* Message model
|
29
|
+
*/
|
30
|
+
class Message {
|
31
|
+
/**
|
32
|
+
* @internal
|
33
|
+
* @param payload
|
34
|
+
*/
|
35
|
+
constructor(payload) {
|
36
|
+
this.payload = payload;
|
37
|
+
}
|
38
|
+
isHexMessage() {
|
39
|
+
return this.isPlain() && this.payload.indexOf("fe") === 0;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* @internal
|
43
|
+
* @param message
|
44
|
+
* @returns {string}
|
45
|
+
*/
|
46
|
+
static encodeHex(message) {
|
47
|
+
const rawString = this.rstr2utf8(message);
|
48
|
+
let hex = "";
|
49
|
+
for (let i = 0; i < rawString.length; i++) {
|
50
|
+
hex += this.strlpad(rawString.charCodeAt(i).toString(16), "0", 2);
|
51
|
+
}
|
52
|
+
return utf8.encode(hex);
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* @internal
|
56
|
+
* @param hex
|
57
|
+
* @returns {string}
|
58
|
+
*/
|
59
|
+
static decodeHex(hex) {
|
60
|
+
let str = "";
|
61
|
+
for (let i = 0; i < hex.length; i += 2)
|
62
|
+
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
|
63
|
+
try {
|
64
|
+
return utf8.decode(str);
|
65
|
+
}
|
66
|
+
catch (e) {
|
67
|
+
return str;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* @internal
|
72
|
+
* @param input
|
73
|
+
* @returns {string}
|
74
|
+
*/
|
75
|
+
static rstr2utf8(input) {
|
76
|
+
let output = "";
|
77
|
+
for (let n = 0; n < input.length; n++) {
|
78
|
+
const c = input.charCodeAt(n);
|
79
|
+
if (c < 128) {
|
80
|
+
output += String.fromCharCode(c);
|
81
|
+
}
|
82
|
+
else if ((c > 127) && (c < 2048)) {
|
83
|
+
output += String.fromCharCode((c >> 6) | 192);
|
84
|
+
output += String.fromCharCode((c & 63) | 128);
|
85
|
+
}
|
86
|
+
else {
|
87
|
+
output += String.fromCharCode((c >> 12) | 224);
|
88
|
+
output += String.fromCharCode(((c >> 6) & 63) | 128);
|
89
|
+
output += String.fromCharCode((c & 63) | 128);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
return output;
|
93
|
+
}
|
94
|
+
/**
|
95
|
+
* @internal
|
96
|
+
* Padding helper for above function
|
97
|
+
* @param str
|
98
|
+
* @param pad
|
99
|
+
* @param len
|
100
|
+
* @returns {any}
|
101
|
+
*/
|
102
|
+
static strlpad(str, pad, len) {
|
103
|
+
while (str.length < len) {
|
104
|
+
str = pad + str;
|
105
|
+
}
|
106
|
+
return str;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
exports.Message = Message;
|
110
|
+
//# sourceMappingURL=Message.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../src/models/transaction/Message.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH,6BAA6B;AAG7B;;GAEG;AACH;IAME;;;OAGG;IACH,YAAY,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAMM,YAAY;QACjB,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,OAAe;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACzC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;SACnE;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,GAAW;QACjC,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;YACpC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC7D,IAAI;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACzB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,GAAG,CAAC;SACZ;IACH,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,KAAK;QAC3B,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAE9B,IAAI,CAAC,GAAG,GAAG,EAAE;gBACX,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;aAClC;iBAAM,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE;gBAClC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;gBAC9C,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;aAC/C;iBAAM;gBACL,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;gBAC/C,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;gBACrD,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;aAC/C;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG;QACjC,OAAO,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE;YACvB,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;SACjB;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CAMF;AAjGD,0BAiGC"}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { TransactionDTO } from "../../infrastructure/transaction/TransactionDTO";
|
2
|
+
import { PublicAccount } from "../account/PublicAccount";
|
3
|
+
import { TimeWindow } from "./TimeWindow";
|
4
|
+
import { Transaction } from "./Transaction";
|
5
|
+
/**
|
6
|
+
* Multisig aggregate modification transactions are part of the NEM's multisig account system.
|
7
|
+
* A multisig aggregate modification transaction holds an array of multisig cosignatory modifications and a single multisig minimum cosignatories modification inside the transaction.
|
8
|
+
* A multisig aggregate modification transaction can be wrapped by a multisig transaction.
|
9
|
+
*/
|
10
|
+
export declare class MultisigAggregateModificationTransaction extends Transaction {
|
11
|
+
/**
|
12
|
+
* The fee for the transaction. The higher the fee, the higher the priority of the transaction. Transactions with high priority get included in a block before transactions with lower priority.
|
13
|
+
*/
|
14
|
+
fee: number;
|
15
|
+
/**
|
16
|
+
* Value indicating the relative change of the minimum cosignatories.
|
17
|
+
*/
|
18
|
+
readonly relativeChange?: number;
|
19
|
+
/**
|
20
|
+
* The JSON array of multisig modifications.
|
21
|
+
*/
|
22
|
+
readonly modifications: CosignatoryModification[];
|
23
|
+
/**
|
24
|
+
* Create DTO of MultisigAggregateModificationTransaction
|
25
|
+
* @returns {MultisigAggregateModificationTransactionDTO}
|
26
|
+
*/
|
27
|
+
toDTO(): TransactionDTO;
|
28
|
+
/**
|
29
|
+
* Create a MultisigAggregateModificationTransaction object
|
30
|
+
* @param timeWindow
|
31
|
+
* @param modifications
|
32
|
+
* @param relativeChange
|
33
|
+
* @returns {MultisigAggregateModificationTransaction}
|
34
|
+
*/
|
35
|
+
static create(timeWindow: TimeWindow, modifications: CosignatoryModification[], relativeChange?: number): MultisigAggregateModificationTransaction;
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* The type of modification. Possible values are:
|
39
|
+
* 1: Add a new cosignatory.
|
40
|
+
* 2: Delete an existing cosignatory.
|
41
|
+
*/
|
42
|
+
export declare enum CosignatoryModificationAction {
|
43
|
+
ADD = 1,
|
44
|
+
DELETE = 2,
|
45
|
+
}
|
46
|
+
export declare class CosignatoryModification {
|
47
|
+
readonly cosignatoryAccount: PublicAccount;
|
48
|
+
readonly action: CosignatoryModificationAction;
|
49
|
+
/**
|
50
|
+
* constructor
|
51
|
+
* @param cosignatoryAccount
|
52
|
+
* @param action
|
53
|
+
*/
|
54
|
+
constructor(cosignatoryAccount: PublicAccount, action: CosignatoryModificationAction);
|
55
|
+
}
|
@@ -0,0 +1,112 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* The MIT License (MIT)
|
4
|
+
*
|
5
|
+
* Copyright (c) 2017 NEM
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
15
|
+
* copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
* SOFTWARE.
|
24
|
+
*/
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
const Transaction_1 = require("./Transaction");
|
27
|
+
const TransactionTypes_1 = require("./TransactionTypes");
|
28
|
+
/**
|
29
|
+
* Multisig aggregate modification transactions are part of the NEM's multisig account system.
|
30
|
+
* A multisig aggregate modification transaction holds an array of multisig cosignatory modifications and a single multisig minimum cosignatories modification inside the transaction.
|
31
|
+
* A multisig aggregate modification transaction can be wrapped by a multisig transaction.
|
32
|
+
*/
|
33
|
+
class MultisigAggregateModificationTransaction extends Transaction_1.Transaction {
|
34
|
+
/**
|
35
|
+
* @internal
|
36
|
+
* @param timeWindow
|
37
|
+
* @param version
|
38
|
+
* @param relativeChange
|
39
|
+
* @param modifications
|
40
|
+
* @param fee
|
41
|
+
* @param signature
|
42
|
+
* @param sender
|
43
|
+
* @param transactionInfo
|
44
|
+
*/
|
45
|
+
constructor(timeWindow, version, modifications, fee, signature, relativeChange, sender, transactionInfo) {
|
46
|
+
super(TransactionTypes_1.TransactionTypes.MULTISIG_AGGREGATE_MODIFICATION, version, timeWindow, signature, sender, transactionInfo);
|
47
|
+
this.relativeChange = relativeChange;
|
48
|
+
this.modifications = modifications;
|
49
|
+
this.fee = fee;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Create DTO of MultisigAggregateModificationTransaction
|
53
|
+
* @returns {MultisigAggregateModificationTransactionDTO}
|
54
|
+
*/
|
55
|
+
toDTO() {
|
56
|
+
const version = this.networkVersion ? this.networkVersion : this.version;
|
57
|
+
return this.serializeDTO({
|
58
|
+
signer: this.signer ? this.signer.publicKey : undefined,
|
59
|
+
deadline: this.timeWindow.deadlineToDTO(),
|
60
|
+
timeStamp: this.timeWindow.timeStampToDTO(),
|
61
|
+
type: this.type,
|
62
|
+
version,
|
63
|
+
signature: this.signature,
|
64
|
+
fee: this.fee,
|
65
|
+
minCosignatories: this.relativeChange === undefined ? undefined : {
|
66
|
+
relativeChange: this.relativeChange,
|
67
|
+
},
|
68
|
+
modifications: this.modifications.map((modification) => {
|
69
|
+
return {
|
70
|
+
cosignatoryAccount: modification.cosignatoryAccount.publicKey,
|
71
|
+
modificationType: modification.action,
|
72
|
+
};
|
73
|
+
}),
|
74
|
+
});
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* Create a MultisigAggregateModificationTransaction object
|
78
|
+
* @param timeWindow
|
79
|
+
* @param modifications
|
80
|
+
* @param relativeChange
|
81
|
+
* @returns {MultisigAggregateModificationTransaction}
|
82
|
+
*/
|
83
|
+
static create(timeWindow, modifications, relativeChange) {
|
84
|
+
const fee = Math.floor(10 * 0.05 * 1000000);
|
85
|
+
const version = relativeChange ? 2 : 1;
|
86
|
+
return new MultisigAggregateModificationTransaction(timeWindow, version, modifications, fee, undefined, relativeChange);
|
87
|
+
}
|
88
|
+
}
|
89
|
+
exports.MultisigAggregateModificationTransaction = MultisigAggregateModificationTransaction;
|
90
|
+
/**
|
91
|
+
* The type of modification. Possible values are:
|
92
|
+
* 1: Add a new cosignatory.
|
93
|
+
* 2: Delete an existing cosignatory.
|
94
|
+
*/
|
95
|
+
var CosignatoryModificationAction;
|
96
|
+
(function (CosignatoryModificationAction) {
|
97
|
+
CosignatoryModificationAction[CosignatoryModificationAction["ADD"] = 1] = "ADD";
|
98
|
+
CosignatoryModificationAction[CosignatoryModificationAction["DELETE"] = 2] = "DELETE";
|
99
|
+
})(CosignatoryModificationAction = exports.CosignatoryModificationAction || (exports.CosignatoryModificationAction = {}));
|
100
|
+
class CosignatoryModification {
|
101
|
+
/**
|
102
|
+
* constructor
|
103
|
+
* @param cosignatoryAccount
|
104
|
+
* @param action
|
105
|
+
*/
|
106
|
+
constructor(cosignatoryAccount, action) {
|
107
|
+
this.cosignatoryAccount = cosignatoryAccount;
|
108
|
+
this.action = action;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
exports.CosignatoryModification = CosignatoryModification;
|
112
|
+
//# sourceMappingURL=MultisigAggregateModificationTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MultisigAggregateModificationTransaction.js","sourceRoot":"","sources":["../../../../src/models/transaction/MultisigAggregateModificationTransaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAUH,+CAA0C;AAE1C,yDAAoD;AAEpD;;;;GAIG;AACH,8CAAsD,SAAQ,yBAAW;IAgBvE;;;;;;;;;;OAUG;IACH,YAAY,UAAsB,EACtB,OAAe,EACf,aAAwC,EACxC,GAAW,EACX,SAAkB,EAClB,cAAuB,EACvB,MAAsB,EACtB,eAAiC;QAC3C,KAAK,CAAC,mCAAgB,CAAC,+BAA+B,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QACjH,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;OAGG;IACI,KAAK;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACzE,OAAO,IAAI,CAAC,YAAY,CAAC;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACvD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;YACzC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE;YAC3C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO;YACP,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,gBAAgB,EAAE,IAAI,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBAChE,cAAc,EAAE,IAAI,CAAC,cAAc;aACgB;YACrD,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAsC,EAAE;gBACzF,OAAO;oBACL,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,CAAC,SAAS;oBAC7D,gBAAgB,EAAE,YAAY,CAAC,MAAM;iBACtC,CAAC;YACJ,CAAC,CAAC;SAC4C,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,UAAsB,EACtB,aAAwC,EACxC,cAAuB;QAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,OAAO,IAAI,wCAAwC,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;IAC1H,CAAC;CACF;AAjFD,4FAiFC;AAED;;;;GAIG;AACH,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACvC,+EAAO,CAAA;IACP,qFAAU,CAAA;AACZ,CAAC,EAHW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAGxC;AAED;IAIE;;;;OAIG;IACH,YAAY,kBAAiC,EAAE,MAAqC;QAClF,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAbD,0DAaC"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { TransactionDTO } from "../../infrastructure/transaction/TransactionDTO";
|
2
|
+
import { Address } from "../account/Address";
|
3
|
+
import { TimeWindow } from "./TimeWindow";
|
4
|
+
import { Transaction } from "./Transaction";
|
5
|
+
import { HashData } from "./TransactionInfo";
|
6
|
+
/**
|
7
|
+
* Multisig signature transactions are part of the NEM's multisig account system. Multisig signature transactions are included in the corresponding multisig transaction and are the way a cosignatory of a multisig account can sign a multisig transaction for that account.
|
8
|
+
*/
|
9
|
+
export declare class MultisigSignatureTransaction extends Transaction {
|
10
|
+
/**
|
11
|
+
* The fee for the transaction. The higher the fee, the higher the priority of the transaction. Transactions with high priority get included in a block before transactions with lower priority.
|
12
|
+
*/
|
13
|
+
readonly fee: number;
|
14
|
+
/**
|
15
|
+
* The address of the corresponding multisig account.
|
16
|
+
*/
|
17
|
+
readonly otherAccount: Address;
|
18
|
+
/**
|
19
|
+
* The hash of the inner transaction of the corresponding multisig transaction.
|
20
|
+
*/
|
21
|
+
readonly otherHash: HashData;
|
22
|
+
/**
|
23
|
+
* Create MultisigSignatureTransaction
|
24
|
+
* @returns {MultisigSignatureTransactionDTO}
|
25
|
+
*/
|
26
|
+
toDTO(): TransactionDTO;
|
27
|
+
/**
|
28
|
+
* Create a MultisigSignatureTransaction object
|
29
|
+
* @param timeWindow
|
30
|
+
* @param otherAccount
|
31
|
+
* @param otherHash
|
32
|
+
* @returns {MultisigSignatureTransaction}
|
33
|
+
*/
|
34
|
+
static create(timeWindow: TimeWindow, otherAccount: Address, otherHash: HashData): MultisigSignatureTransaction;
|
35
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* The MIT License (MIT)
|
4
|
+
*
|
5
|
+
* Copyright (c) 2017 NEM
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
15
|
+
* copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
* SOFTWARE.
|
24
|
+
*/
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
const PublicAccount_1 = require("../account/PublicAccount");
|
27
|
+
const TimeWindow_1 = require("./TimeWindow");
|
28
|
+
const Transaction_1 = require("./Transaction");
|
29
|
+
const TransactionInfo_1 = require("./TransactionInfo");
|
30
|
+
const TransactionTypes_1 = require("./TransactionTypes");
|
31
|
+
/**
|
32
|
+
* Multisig signature transactions are part of the NEM's multisig account system. Multisig signature transactions are included in the corresponding multisig transaction and are the way a cosignatory of a multisig account can sign a multisig transaction for that account.
|
33
|
+
*/
|
34
|
+
class MultisigSignatureTransaction extends Transaction_1.Transaction {
|
35
|
+
/**
|
36
|
+
* @internal
|
37
|
+
* @param timeWindow
|
38
|
+
* @param version
|
39
|
+
* @param otherAccount
|
40
|
+
* @param otherHash
|
41
|
+
* @param fee
|
42
|
+
* @param signature
|
43
|
+
* @param signer
|
44
|
+
* @param transactionInfo
|
45
|
+
*/
|
46
|
+
constructor(timeWindow, version, otherAccount, otherHash, fee, signature, signer, transactionInfo) {
|
47
|
+
super(TransactionTypes_1.TransactionTypes.MULTISIG_SIGNATURE, version, timeWindow, signature, signer, transactionInfo);
|
48
|
+
this.otherAccount = otherAccount;
|
49
|
+
this.otherHash = otherHash;
|
50
|
+
this.fee = fee;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* @internal
|
54
|
+
* @param unconfirmedTransaction
|
55
|
+
* @returns {MultisigSignatureTransaction}
|
56
|
+
*/
|
57
|
+
static createUnconfirmedFromDTO(unconfirmedTransaction) {
|
58
|
+
const receiverAccount = PublicAccount_1.PublicAccount.createWithPublicKey(unconfirmedTransaction.transaction.otherTrans.signer);
|
59
|
+
return new MultisigSignatureTransaction(TimeWindow_1.TimeWindow.createFromDTOInfo(unconfirmedTransaction.transaction.timeStamp, unconfirmedTransaction.transaction.deadline), unconfirmedTransaction.transaction.version, receiverAccount.address, new TransactionInfo_1.HashData(unconfirmedTransaction.meta.data), unconfirmedTransaction.transaction.fee, unconfirmedTransaction.transaction.signature);
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* Create MultisigSignatureTransaction
|
63
|
+
* @returns {MultisigSignatureTransactionDTO}
|
64
|
+
*/
|
65
|
+
toDTO() {
|
66
|
+
const version = this.networkVersion ? this.networkVersion : this.version;
|
67
|
+
return this.serializeDTO({
|
68
|
+
fee: this.fee,
|
69
|
+
version,
|
70
|
+
type: this.type,
|
71
|
+
deadline: this.timeWindow.deadlineToDTO(),
|
72
|
+
timeStamp: this.timeWindow.timeStampToDTO(),
|
73
|
+
signature: this.signature,
|
74
|
+
signer: this.signer ? this.signer.publicKey : undefined,
|
75
|
+
otherHash: this.otherHash,
|
76
|
+
otherAccount: this.otherAccount.plain(),
|
77
|
+
});
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* Create a MultisigSignatureTransaction object
|
81
|
+
* @param timeWindow
|
82
|
+
* @param otherAccount
|
83
|
+
* @param otherHash
|
84
|
+
* @returns {MultisigSignatureTransaction}
|
85
|
+
*/
|
86
|
+
static create(timeWindow, otherAccount, otherHash) {
|
87
|
+
const fee = Math.floor(3 * 0.05 * 1000000);
|
88
|
+
return new MultisigSignatureTransaction(timeWindow, 1, otherAccount, otherHash, fee);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
exports.MultisigSignatureTransaction = MultisigSignatureTransaction;
|
92
|
+
//# sourceMappingURL=MultisigSignatureTransaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MultisigSignatureTransaction.js","sourceRoot":"","sources":["../../../../src/models/transaction/MultisigSignatureTransaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAOH,4DAAuD;AACvD,6CAAwC;AACxC,+CAA0C;AAC1C,uDAA4D;AAC5D,yDAAoD;AAEpD;;GAEG;AACH,kCAA0C,SAAQ,yBAAW;IAgB3D;;;;;;;;;;OAUG;IACH,YAAY,UAAsB,EACtB,OAAe,EACf,YAAqB,EACrB,SAAmB,EACnB,GAAW,EACX,SAAkB,EAClB,MAAsB,EACtB,eAAiC;QAC3C,KAAK,CAAC,mCAAgB,CAAC,kBAAkB,EACvC,OAAO,EACP,UAAU,EACV,SAAS,EACT,MAAM,EACN,eAAe,CAChB,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,wBAAwB,CAAC,sBAA6D;QAClG,MAAM,eAAe,GAAG,6BAAa,CAAC,mBAAmB,CAAE,sBAAsB,CAAC,WAAsC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5I,OAAO,IAAI,4BAA4B,CACrC,uBAAU,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,WAAW,CAAC,SAAS,EAAE,sBAAsB,CAAC,WAAW,CAAC,QAAQ,CAAC,EACvH,sBAAsB,CAAC,WAAW,CAAC,OAAO,EAC1C,eAAe,CAAC,OAAO,EACvB,IAAI,0BAAQ,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAK,CAAC,EAC/C,sBAAsB,CAAC,WAAW,CAAC,GAAG,EACtC,sBAAsB,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,KAAK;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACzE,OAAO,IAAI,CAAC,YAAY,CAAC;YACvB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,OAAO;YACP,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;YACzC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE;YAC3C,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACvD,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE;SACL,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,UAAsB,EACtB,YAAqB,EACrB,SAAmB;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC;QAC3C,OAAO,IAAI,4BAA4B,CAAC,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;CACF;AA/FD,oEA+FC"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { TransactionDTO } from "../../infrastructure/transaction/TransactionDTO";
|
2
|
+
import { PublicAccount } from "../account/PublicAccount";
|
3
|
+
import { MultisigSignatureTransaction } from "./MultisigSignatureTransaction";
|
4
|
+
import { TimeWindow } from "./TimeWindow";
|
5
|
+
import { Transaction } from "./Transaction";
|
6
|
+
import { HashData } from "./TransactionInfo";
|
7
|
+
/**
|
8
|
+
* Multisig transaction are the only way to make transaction from a multisig account to another account.
|
9
|
+
* A multisig transaction carries another transaction inside (often referred to as "inner" transaction).
|
10
|
+
* The inner transaction can be a transfer, an importance transfer or an aggregate modification transaction.
|
11
|
+
* A multisig transaction also has multisig signature transactions from the cosignatories of the multisig account inside.
|
12
|
+
*/
|
13
|
+
export declare class MultisigTransaction extends Transaction {
|
14
|
+
/**
|
15
|
+
* The fee for the transaction.
|
16
|
+
*/
|
17
|
+
readonly fee: number;
|
18
|
+
/**
|
19
|
+
* The JSON array of MulsigSignatureTransaction objects.
|
20
|
+
*/
|
21
|
+
readonly signatures: MultisigSignatureTransaction[];
|
22
|
+
/**
|
23
|
+
* The inner transaction. The inner transaction can be a transfer transaction, an importance transfer transaction or a multisig aggregate modification transaction.
|
24
|
+
* The inner transaction does not have a valid signature.
|
25
|
+
*/
|
26
|
+
readonly otherTransaction: Transaction;
|
27
|
+
/**
|
28
|
+
* Hash data
|
29
|
+
*/
|
30
|
+
readonly hashData?: HashData;
|
31
|
+
/**
|
32
|
+
* Check if transaction is pending to sign
|
33
|
+
* @returns {boolean}
|
34
|
+
*/
|
35
|
+
isPendingToSign(): boolean;
|
36
|
+
/**
|
37
|
+
* Create a MultisigTransaction object
|
38
|
+
* @param timeWindow
|
39
|
+
* @param otherTrans
|
40
|
+
* @param multisig
|
41
|
+
* @returns {MultisigTransaction}
|
42
|
+
*/
|
43
|
+
static create(timeWindow: TimeWindow, otherTrans: Transaction, multisig: PublicAccount): MultisigTransaction;
|
44
|
+
/**
|
45
|
+
* Create DTO of MultisigTransaction
|
46
|
+
* @returns {MultisigTransactionDTO}
|
47
|
+
*/
|
48
|
+
toDTO(): TransactionDTO;
|
49
|
+
}
|