nme-library 2.0.0-RC4
Sign up to get free protection for your applications and to get access to all the features.
- package/4xhj3q2e.cjs +1 -0
- 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
@@ -0,0 +1,84 @@
|
|
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 js_joda_1 = require("js-joda");
|
27
|
+
class TimeWindow {
|
28
|
+
/**
|
29
|
+
* @param deadline - LocalDateTime
|
30
|
+
* @param timeStamp - LocalDateTime
|
31
|
+
*/
|
32
|
+
constructor(timeStamp, deadline) {
|
33
|
+
this.deadline = deadline;
|
34
|
+
this.timeStamp = timeStamp;
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* @param deadline
|
38
|
+
* @param chronoUnit
|
39
|
+
* @returns {TimeWindow}
|
40
|
+
*/
|
41
|
+
static createWithDeadline(deadline = 2, chronoUnit = js_joda_1.ChronoUnit.HOURS) {
|
42
|
+
const currentTimeStamp = (new Date()).getTime();
|
43
|
+
const timeStampDateTime = js_joda_1.LocalDateTime.ofInstant(js_joda_1.Instant.ofEpochMilli(currentTimeStamp), js_joda_1.ZoneId.SYSTEM);
|
44
|
+
const deadlineDateTime = timeStampDateTime.plus(deadline, chronoUnit);
|
45
|
+
if (deadline <= 0) {
|
46
|
+
throw new Error("deadline should be greater than 0");
|
47
|
+
}
|
48
|
+
else if (timeStampDateTime.plus(24, js_joda_1.ChronoUnit.HOURS).compareTo(deadlineDateTime) != 1) {
|
49
|
+
throw new Error("deadline should be less than 24 hours");
|
50
|
+
}
|
51
|
+
return new TimeWindow(timeStampDateTime, deadlineDateTime);
|
52
|
+
}
|
53
|
+
/**
|
54
|
+
* @internal
|
55
|
+
* @param timestamp
|
56
|
+
* @param deadline
|
57
|
+
*/
|
58
|
+
static createFromDTOInfo(timeStamp, deadline) {
|
59
|
+
return new TimeWindow(TimeWindow.createLocalDateTimeFromNemDate(timeStamp), TimeWindow.createLocalDateTimeFromNemDate(deadline));
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* @internal
|
63
|
+
* @param dateSeconds
|
64
|
+
* @returns {LocalDateTime}
|
65
|
+
*/
|
66
|
+
static createLocalDateTimeFromNemDate(dateSeconds) {
|
67
|
+
return js_joda_1.LocalDateTime.ofInstant(js_joda_1.Instant.ofEpochMilli(1000 * Math.round(dateSeconds + TimeWindow.timestampNemesisBlock)), js_joda_1.ZoneId.SYSTEM);
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* @internal
|
71
|
+
*/
|
72
|
+
deadlineToDTO() {
|
73
|
+
return this.deadline.atZone(js_joda_1.ZoneId.SYSTEM).toEpochSecond() - TimeWindow.timestampNemesisBlock;
|
74
|
+
}
|
75
|
+
/**
|
76
|
+
* @internal
|
77
|
+
*/
|
78
|
+
timeStampToDTO() {
|
79
|
+
return this.timeStamp.atZone(js_joda_1.ZoneId.SYSTEM).toEpochSecond() - TimeWindow.timestampNemesisBlock;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
TimeWindow.timestampNemesisBlock = 1427587585;
|
83
|
+
exports.TimeWindow = TimeWindow;
|
84
|
+
//# sourceMappingURL=TimeWindow.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TimeWindow.js","sourceRoot":"","sources":["../../../../src/models/transaction/TimeWindow.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH,qCAAmE;AAEnE;IAcE;;;OAGG;IACH,YACE,SAAwB,EACxB,QAAuB;QAEvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAAC,WAAmB,CAAC,EAAE,aAAyB,oBAAU,CAAC,KAAK;QAC9F,MAAM,gBAAgB,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;QAChD,MAAM,iBAAiB,GAAG,uBAAa,CAAC,SAAS,CAAC,iBAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,gBAAM,CAAC,MAAM,CAAC,CAAC;QACzG,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAEtE,IAAI,QAAQ,IAAI,CAAC,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;aAAM,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,oBAAU,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE;YACxF,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;SAC1D;QAED,OAAO,IAAI,UAAU,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,iBAAiB,CAAC,SAAiB,EAAE,QAAgB;QACjE,OAAO,IAAI,UAAU,CACnB,UAAU,CAAC,8BAA8B,CAAC,SAAS,CAAC,EACpD,UAAU,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CACpD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,8BAA8B,CAAC,WAAmB;QAC9D,OAAO,uBAAa,CAAC,SAAS,CAAC,iBAAO,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC,EAAE,gBAAM,CAAC,MAAM,CAAC,CAAC;IACzI,CAAC;IAED;;OAEG;IACI,aAAa;QAClB,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,gBAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAChG,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,GAAG,UAAU,CAAC,qBAAqB,CAAC;IACjG,CAAC;;AA7Ea,gCAAqB,GAAW,UAAU,CAAC;AAD3D,gCA+EC"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { TransactionDTO } from "../../infrastructure/transaction/TransactionDTO";
|
2
|
+
import { PublicAccount } from "../account/PublicAccount";
|
3
|
+
import { NetworkTypes } from "../node/NetworkTypes";
|
4
|
+
import { TimeWindow } from "./TimeWindow";
|
5
|
+
import { TransactionInfo } from "./TransactionInfo";
|
6
|
+
/**
|
7
|
+
* An abstract transaction class that serves as the base class of all NEM transactions.
|
8
|
+
*/
|
9
|
+
export declare abstract class Transaction {
|
10
|
+
/**
|
11
|
+
* The transaction type.
|
12
|
+
*/
|
13
|
+
readonly type: number;
|
14
|
+
/**
|
15
|
+
* The version of the structure.
|
16
|
+
*/
|
17
|
+
readonly version: number;
|
18
|
+
/**
|
19
|
+
* The transaction signature (missing if part of a multisig transaction).
|
20
|
+
*/
|
21
|
+
readonly signature?: string;
|
22
|
+
/**
|
23
|
+
* The public account of the transaction creator.
|
24
|
+
*/
|
25
|
+
signer?: PublicAccount;
|
26
|
+
/**
|
27
|
+
* TimeWindow
|
28
|
+
*/
|
29
|
+
readonly timeWindow: TimeWindow;
|
30
|
+
/**
|
31
|
+
* 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.
|
32
|
+
*/
|
33
|
+
readonly abstract fee: number;
|
34
|
+
/**
|
35
|
+
* Transactions meta data object contains additional information about the transaction.
|
36
|
+
*/
|
37
|
+
protected readonly transactionInfo?: TransactionInfo;
|
38
|
+
/**
|
39
|
+
* Checks if the transaction has been confirmed and included in a block
|
40
|
+
*/
|
41
|
+
isConfirmed(): boolean;
|
42
|
+
/**
|
43
|
+
* Get transaction info
|
44
|
+
*/
|
45
|
+
getTransactionInfo(): TransactionInfo;
|
46
|
+
/**
|
47
|
+
* Create DTO of the transaction
|
48
|
+
*/
|
49
|
+
abstract toDTO(): TransactionDTO;
|
50
|
+
/**
|
51
|
+
* sets the network type for a transaction.
|
52
|
+
* This is done automatically when signing a transaction, you should not use it directly.
|
53
|
+
* @param networkType
|
54
|
+
*/
|
55
|
+
setNetworkType(networkType: NetworkTypes): void;
|
56
|
+
}
|
@@ -0,0 +1,98 @@
|
|
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 _ = require("lodash");
|
27
|
+
const NetworkTypes_1 = require("../node/NetworkTypes");
|
28
|
+
/**
|
29
|
+
* An abstract transaction class that serves as the base class of all NEM transactions.
|
30
|
+
*/
|
31
|
+
class Transaction {
|
32
|
+
/**
|
33
|
+
* @internal
|
34
|
+
* @param type
|
35
|
+
* @param version
|
36
|
+
* @param timeWindow
|
37
|
+
* @param signature
|
38
|
+
* @param sender
|
39
|
+
* @param transactionInfo
|
40
|
+
*/
|
41
|
+
constructor(type, version, timeWindow, signature, sender, transactionInfo) {
|
42
|
+
if (sender && !sender.hasPublicKey()) {
|
43
|
+
throw new Error("signer key pair is required to create a verifiable entity");
|
44
|
+
}
|
45
|
+
this.type = type;
|
46
|
+
this.version = version;
|
47
|
+
this.timeWindow = timeWindow;
|
48
|
+
this.signature = signature;
|
49
|
+
this.signer = sender ? sender : undefined;
|
50
|
+
this.transactionInfo = transactionInfo;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* Checks if the transaction has been confirmed and included in a block
|
54
|
+
*/
|
55
|
+
isConfirmed() {
|
56
|
+
return this.transactionInfo !== undefined;
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* Get transaction info
|
60
|
+
*/
|
61
|
+
getTransactionInfo() {
|
62
|
+
if (!this.isConfirmed()) {
|
63
|
+
throw new Error("TransactionInfo is not available when it is not confirmed");
|
64
|
+
}
|
65
|
+
return this.transactionInfo;
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
* Serialize DTO
|
69
|
+
* @internal
|
70
|
+
* @param dto
|
71
|
+
* @returns {any}
|
72
|
+
*/
|
73
|
+
serializeDTO(dto) {
|
74
|
+
return _.omitBy(dto, _.isUndefined);
|
75
|
+
}
|
76
|
+
/**
|
77
|
+
* sets the network type for a transaction.
|
78
|
+
* This is done automatically when signing a transaction, you should not use it directly.
|
79
|
+
* @param networkType
|
80
|
+
*/
|
81
|
+
setNetworkType(networkType) {
|
82
|
+
if (networkType === NetworkTypes_1.NetworkTypes.MAIN_NET) {
|
83
|
+
this.networkVersion = 0x68000000 | this.version;
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
else if (networkType === NetworkTypes_1.NetworkTypes.TEST_NET) {
|
87
|
+
this.networkVersion = 0x98000000 | this.version;
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
else if (networkType == NetworkTypes_1.NetworkTypes.MIJIN_NET) {
|
91
|
+
this.networkVersion = 0x60000000 | this.version;
|
92
|
+
return;
|
93
|
+
}
|
94
|
+
throw new Error("Unsupported Network Type " + networkType);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
exports.Transaction = Transaction;
|
98
|
+
//# sourceMappingURL=Transaction.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../../src/models/transaction/Transaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH,4BAA4B;AAG5B,uDAAkD;AAIlD;;GAEG;AACH;IA0CE;;;;;;;;OAQG;IACH,YAAY,IAAY,EACZ,OAAe,EACf,UAAsB,EACtB,SAAkB,EAClB,MAAsB,EACtB,eAAiC;QAC3C,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE;YACpC,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;SAC9E;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,WAAW;QAChB,OAAO,IAAI,CAAC,eAAe,KAAK,SAAS,CAAC;IAC5C,CAAC;IAED;;OAEG;IACI,kBAAkB;QACvB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;SAC9E;QACD,OAAO,IAAI,CAAC,eAAgB,CAAC;IAC/B,CAAC;IAOD;;;;;OAKG;IACO,YAAY,CAAC,GAAmB;QACxC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,CAAmB,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,WAAyB;QAC7C,IAAI,WAAW,KAAK,2BAAY,CAAC,QAAQ,EAAE;YACzC,IAAI,CAAC,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;YAChD,OAAO;SACR;aAAM,IAAI,WAAW,KAAK,2BAAY,CAAC,QAAQ,EAAE;YAChD,IAAI,CAAC,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;YAChD,OAAO;SACR;aAAM,IAAI,WAAW,IAAI,2BAAY,CAAC,SAAS,EAAE;YAChD,IAAI,CAAC,cAAc,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;YAChD,OAAO;SACR;QACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,WAAW,CAAC,CAAC;IAC7D,CAAC;CACF;AAtHD,kCAsHC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
export declare class HashData {
|
2
|
+
readonly data: string;
|
3
|
+
constructor(data: string);
|
4
|
+
}
|
5
|
+
export declare class TransactionInfo {
|
6
|
+
/**
|
7
|
+
* The height of the block in which the transaction was included.
|
8
|
+
*/
|
9
|
+
readonly height: number;
|
10
|
+
/**
|
11
|
+
* The id of the transaction.
|
12
|
+
*/
|
13
|
+
readonly id: number;
|
14
|
+
/**
|
15
|
+
* The transaction hash.
|
16
|
+
*/
|
17
|
+
readonly hash: HashData;
|
18
|
+
/**
|
19
|
+
* constructor
|
20
|
+
* @param height
|
21
|
+
* @param id
|
22
|
+
* @param hash
|
23
|
+
*/
|
24
|
+
constructor(height: number, id: number, hash: HashData);
|
25
|
+
}
|
26
|
+
export declare class MultisigTransactionInfo extends TransactionInfo {
|
27
|
+
/**
|
28
|
+
* The hash of the inner transaction. This entry is only available for multisig transactions.
|
29
|
+
*/
|
30
|
+
readonly innerHash: HashData;
|
31
|
+
/**
|
32
|
+
* constructor
|
33
|
+
* @param height
|
34
|
+
* @param id
|
35
|
+
* @param hash
|
36
|
+
* @param innerHash
|
37
|
+
*/
|
38
|
+
constructor(height: number, id: number, hash: HashData, innerHash: HashData);
|
39
|
+
}
|
@@ -0,0 +1,60 @@
|
|
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
|
+
class HashData {
|
27
|
+
constructor(data) {
|
28
|
+
this.data = data;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
exports.HashData = HashData;
|
32
|
+
class TransactionInfo {
|
33
|
+
/**
|
34
|
+
* constructor
|
35
|
+
* @param height
|
36
|
+
* @param id
|
37
|
+
* @param hash
|
38
|
+
*/
|
39
|
+
constructor(height, id, hash) {
|
40
|
+
this.height = height;
|
41
|
+
this.id = id;
|
42
|
+
this.hash = hash;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
exports.TransactionInfo = TransactionInfo;
|
46
|
+
class MultisigTransactionInfo extends TransactionInfo {
|
47
|
+
/**
|
48
|
+
* constructor
|
49
|
+
* @param height
|
50
|
+
* @param id
|
51
|
+
* @param hash
|
52
|
+
* @param innerHash
|
53
|
+
*/
|
54
|
+
constructor(height, id, hash, innerHash) {
|
55
|
+
super(height, id, hash);
|
56
|
+
this.innerHash = innerHash;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
exports.MultisigTransactionInfo = MultisigTransactionInfo;
|
60
|
+
//# sourceMappingURL=TransactionInfo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TransactionInfo.js","sourceRoot":"","sources":["../../../../src/models/transaction/TransactionInfo.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH;IACE,YAAqB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;IACjC,CAAC;CACF;AAHD,4BAGC;AAED;IAgBE;;;;;OAKG;IACH,YACE,MAAc,EACd,EAAU,EACV,IAAc;QAEd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA/BD,0CA+BC;AAED,6BAAqC,SAAQ,eAAe;IAM1D;;;;;;OAMG;IACH,YAAY,MAAc,EAAE,EAAU,EAAE,IAAc,EAAE,SAAmB;QACzE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF;AAjBD,0DAiBC"}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* Static class containing transaction type constants.
|
3
|
+
*/
|
4
|
+
export declare class TransactionTypes {
|
5
|
+
/**
|
6
|
+
* Transfer Transaction
|
7
|
+
* @type {number}
|
8
|
+
*/
|
9
|
+
static readonly TRANSFER: number;
|
10
|
+
/**
|
11
|
+
* Importance transfer transaction.
|
12
|
+
* @type {number}
|
13
|
+
*/
|
14
|
+
static readonly IMPORTANCE_TRANSFER: number;
|
15
|
+
/**
|
16
|
+
* A new asset transaction.
|
17
|
+
* @type {number}
|
18
|
+
*/
|
19
|
+
static readonly ASSET_NEW: number;
|
20
|
+
/**
|
21
|
+
* An asset ask transaction.
|
22
|
+
* @type {number}
|
23
|
+
*/
|
24
|
+
static readonly ASSET_ASK: number;
|
25
|
+
/**
|
26
|
+
* An asset bid transaction.
|
27
|
+
* @type {number}
|
28
|
+
*/
|
29
|
+
static readonly ASSET_BID: number;
|
30
|
+
/**
|
31
|
+
* A snapshot transaction.
|
32
|
+
* @type {number}
|
33
|
+
*/
|
34
|
+
static readonly SNAPSHOT: number;
|
35
|
+
/**
|
36
|
+
* A multisig change transaction (e.g. announce an account as multi-sig).
|
37
|
+
* @type {number}
|
38
|
+
*/
|
39
|
+
static readonly MULTISIG_AGGREGATE_MODIFICATION: number;
|
40
|
+
/**
|
41
|
+
* A multisig signature transaction.
|
42
|
+
* @type {number}
|
43
|
+
*/
|
44
|
+
static readonly MULTISIG_SIGNATURE: number;
|
45
|
+
/**
|
46
|
+
* A multisig transaction.
|
47
|
+
* @type {number}
|
48
|
+
*/
|
49
|
+
static readonly MULTISIG: number;
|
50
|
+
/**
|
51
|
+
* A provision namespace transaction.
|
52
|
+
* @type {number}
|
53
|
+
*/
|
54
|
+
static readonly PROVISION_NAMESPACE: number;
|
55
|
+
/**
|
56
|
+
* A asset definition creation transaction.
|
57
|
+
* @type {number}
|
58
|
+
*/
|
59
|
+
static readonly MOSAIC_DEFINITION_CREATION: number;
|
60
|
+
/**
|
61
|
+
* A asset supply change transaction.
|
62
|
+
* @type {number}
|
63
|
+
*/
|
64
|
+
static readonly MOSAIC_SUPPLY_CHANGE: number;
|
65
|
+
/**
|
66
|
+
* Gets all multisig embeddable types.
|
67
|
+
* @returns {number[]}
|
68
|
+
*/
|
69
|
+
static getMultisigEmbeddableTypes(): number[];
|
70
|
+
/**
|
71
|
+
* Gets all block embeddable types.
|
72
|
+
* @returns {number[]}
|
73
|
+
*/
|
74
|
+
static getBlockEmbeddableTypes(): number[];
|
75
|
+
/**
|
76
|
+
* Gets all active types.
|
77
|
+
* @returns {number[]}
|
78
|
+
*/
|
79
|
+
static getActiveTypes(): number[];
|
80
|
+
}
|
@@ -0,0 +1,159 @@
|
|
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
|
+
/**
|
27
|
+
* Static class containing transaction type constants.
|
28
|
+
*/
|
29
|
+
class TransactionTypes {
|
30
|
+
/**
|
31
|
+
* Gets all multisig embeddable types.
|
32
|
+
* @returns {number[]}
|
33
|
+
*/
|
34
|
+
static getMultisigEmbeddableTypes() {
|
35
|
+
return [
|
36
|
+
TransactionTypes.TRANSFER,
|
37
|
+
TransactionTypes.IMPORTANCE_TRANSFER,
|
38
|
+
TransactionTypes.MULTISIG_AGGREGATE_MODIFICATION,
|
39
|
+
TransactionTypes.PROVISION_NAMESPACE,
|
40
|
+
TransactionTypes.MOSAIC_DEFINITION_CREATION,
|
41
|
+
TransactionTypes.MOSAIC_SUPPLY_CHANGE,
|
42
|
+
];
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* Gets all block embeddable types.
|
46
|
+
* @returns {number[]}
|
47
|
+
*/
|
48
|
+
static getBlockEmbeddableTypes() {
|
49
|
+
const types = TransactionTypes.getMultisigEmbeddableTypes();
|
50
|
+
types.push(TransactionTypes.MULTISIG);
|
51
|
+
return types;
|
52
|
+
}
|
53
|
+
/**
|
54
|
+
* Gets all active types.
|
55
|
+
* @returns {number[]}
|
56
|
+
*/
|
57
|
+
static getActiveTypes() {
|
58
|
+
const types = TransactionTypes.getBlockEmbeddableTypes();
|
59
|
+
types.push(TransactionTypes.MULTISIG_SIGNATURE);
|
60
|
+
return types;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* @internal
|
65
|
+
* @type {number}
|
66
|
+
*/
|
67
|
+
TransactionTypes.TRANSFER_TYPE = 0x0100;
|
68
|
+
/**
|
69
|
+
* @internal
|
70
|
+
* @type {number}
|
71
|
+
*/
|
72
|
+
TransactionTypes.ASSET_TYPE = 0x0200;
|
73
|
+
/**
|
74
|
+
* @internal
|
75
|
+
* @type {number}
|
76
|
+
*/
|
77
|
+
TransactionTypes.SNAPSHOT_TYPE = 0x0400;
|
78
|
+
/**
|
79
|
+
* @internal
|
80
|
+
* @type {number}
|
81
|
+
*/
|
82
|
+
TransactionTypes.IMPORTANCE_TYPE = 0x0800;
|
83
|
+
/**
|
84
|
+
* @internal
|
85
|
+
* @type {number}
|
86
|
+
*/
|
87
|
+
TransactionTypes.MULTISIG_TYPE = 0x1000;
|
88
|
+
/**
|
89
|
+
* @internal
|
90
|
+
* @type {number}
|
91
|
+
*/
|
92
|
+
TransactionTypes.NAMESPACE_TYPE = 0x2000;
|
93
|
+
/**
|
94
|
+
* @internal
|
95
|
+
* @type {number}
|
96
|
+
*/
|
97
|
+
TransactionTypes.MOSAIC_TYPE = 0x4000;
|
98
|
+
/**
|
99
|
+
* Transfer Transaction
|
100
|
+
* @type {number}
|
101
|
+
*/
|
102
|
+
TransactionTypes.TRANSFER = TransactionTypes.TRANSFER_TYPE | 0x01;
|
103
|
+
/**
|
104
|
+
* Importance transfer transaction.
|
105
|
+
* @type {number}
|
106
|
+
*/
|
107
|
+
TransactionTypes.IMPORTANCE_TRANSFER = TransactionTypes.IMPORTANCE_TYPE | 0x01;
|
108
|
+
/**
|
109
|
+
* A new asset transaction.
|
110
|
+
* @type {number}
|
111
|
+
*/
|
112
|
+
TransactionTypes.ASSET_NEW = TransactionTypes.ASSET_TYPE | 0x01;
|
113
|
+
/**
|
114
|
+
* An asset ask transaction.
|
115
|
+
* @type {number}
|
116
|
+
*/
|
117
|
+
TransactionTypes.ASSET_ASK = TransactionTypes.ASSET_TYPE | 0x02;
|
118
|
+
/**
|
119
|
+
* An asset bid transaction.
|
120
|
+
* @type {number}
|
121
|
+
*/
|
122
|
+
TransactionTypes.ASSET_BID = TransactionTypes.ASSET_TYPE | 0x03;
|
123
|
+
/**
|
124
|
+
* A snapshot transaction.
|
125
|
+
* @type {number}
|
126
|
+
*/
|
127
|
+
TransactionTypes.SNAPSHOT = TransactionTypes.SNAPSHOT_TYPE | 0x01;
|
128
|
+
/**
|
129
|
+
* A multisig change transaction (e.g. announce an account as multi-sig).
|
130
|
+
* @type {number}
|
131
|
+
*/
|
132
|
+
TransactionTypes.MULTISIG_AGGREGATE_MODIFICATION = TransactionTypes.MULTISIG_TYPE | 0x01;
|
133
|
+
/**
|
134
|
+
* A multisig signature transaction.
|
135
|
+
* @type {number}
|
136
|
+
*/
|
137
|
+
TransactionTypes.MULTISIG_SIGNATURE = TransactionTypes.MULTISIG_TYPE | 0x02;
|
138
|
+
/**
|
139
|
+
* A multisig transaction.
|
140
|
+
* @type {number}
|
141
|
+
*/
|
142
|
+
TransactionTypes.MULTISIG = TransactionTypes.MULTISIG_TYPE | 0x04;
|
143
|
+
/**
|
144
|
+
* A provision namespace transaction.
|
145
|
+
* @type {number}
|
146
|
+
*/
|
147
|
+
TransactionTypes.PROVISION_NAMESPACE = TransactionTypes.NAMESPACE_TYPE | 0x01;
|
148
|
+
/**
|
149
|
+
* A asset definition creation transaction.
|
150
|
+
* @type {number}
|
151
|
+
*/
|
152
|
+
TransactionTypes.MOSAIC_DEFINITION_CREATION = TransactionTypes.MOSAIC_TYPE | 0x01;
|
153
|
+
/**
|
154
|
+
* A asset supply change transaction.
|
155
|
+
* @type {number}
|
156
|
+
*/
|
157
|
+
TransactionTypes.MOSAIC_SUPPLY_CHANGE = TransactionTypes.MOSAIC_TYPE | 0x02;
|
158
|
+
exports.TransactionTypes = TransactionTypes;
|
159
|
+
//# sourceMappingURL=TransactionTypes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TransactionTypes.js","sourceRoot":"","sources":["../../../../src/models/transaction/TransactionTypes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH;;GAEG;AACH;IAoHE;;;OAGG;IACI,MAAM,CAAC,0BAA0B;QACtC,OAAO;YACL,gBAAgB,CAAC,QAAQ;YACzB,gBAAgB,CAAC,mBAAmB;YACpC,gBAAgB,CAAC,+BAA+B;YAChD,gBAAgB,CAAC,mBAAmB;YACpC,gBAAgB,CAAC,0BAA0B;YAC3C,gBAAgB,CAAC,oBAAoB;SACtC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,uBAAuB;QACnC,MAAM,KAAK,GAAG,gBAAgB,CAAC,0BAA0B,EAAE,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,cAAc;QAC1B,MAAM,KAAK,GAAG,gBAAgB,CAAC,uBAAuB,EAAE,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;;AAnJD;;;GAGG;AACqB,8BAAa,GAAG,MAAM,CAAC;AAE/C;;;GAGG;AACqB,2BAAU,GAAG,MAAM,CAAC;AAE5C;;;GAGG;AACqB,8BAAa,GAAG,MAAM,CAAC;AAE/C;;;GAGG;AACqB,gCAAe,GAAG,MAAM,CAAC;AAEjD;;;GAGG;AACqB,8BAAa,GAAG,MAAM,CAAC;AAE/C;;;GAGG;AACqB,+BAAc,GAAG,MAAM,CAAC;AAEhD;;;GAGG;AACqB,4BAAW,GAAG,MAAM,CAAC;AAE7C;;;GAGG;AACoB,yBAAQ,GAAG,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC;AAExE;;;GAGG;AACoB,oCAAmB,GAAG,gBAAgB,CAAC,eAAe,GAAG,IAAI,CAAC;AAErF;;;GAGG;AACoB,0BAAS,GAAG,gBAAgB,CAAC,UAAU,GAAG,IAAI,CAAC;AAEtE;;;GAGG;AACoB,0BAAS,GAAG,gBAAgB,CAAC,UAAU,GAAG,IAAI,CAAC;AAEtE;;;GAGG;AACoB,0BAAS,GAAG,gBAAgB,CAAC,UAAU,GAAG,IAAI,CAAC;AAEtE;;;GAGG;AACoB,yBAAQ,GAAG,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC;AAExE;;;GAGG;AACoB,gDAA+B,GAAG,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC;AAE/F;;;GAGG;AACoB,mCAAkB,GAAG,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC;AAElF;;;GAGG;AACoB,yBAAQ,GAAG,gBAAgB,CAAC,aAAa,GAAG,IAAI,CAAC;AAExE;;;GAGG;AACoB,oCAAmB,GAAG,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC;AAEpF;;;GAGG;AACoB,2CAA0B,GAAG,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC;AAExF;;;GAGG;AACoB,qCAAoB,GAAG,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC;AAlHpF,4CAsJC"}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import { TransactionDTO } from "../../infrastructure/transaction/TransactionDTO";
|
2
|
+
import { Address } from "../account/Address";
|
3
|
+
import { Asset } from "../asset/Asset";
|
4
|
+
import { AssetId } from "../asset/AssetId";
|
5
|
+
import { AssetTransferable } from "../asset/AssetTransferable";
|
6
|
+
import { XEM } from "../asset/XEM";
|
7
|
+
import { EncryptedMessage } from "./EncryptedMessage";
|
8
|
+
import { PlainMessage } from "./PlainMessage";
|
9
|
+
import { TimeWindow } from "./TimeWindow";
|
10
|
+
import { Transaction } from "./Transaction";
|
11
|
+
/**
|
12
|
+
* Transfer transactions contain data about transfers of XEM or assets to another account.
|
13
|
+
*/
|
14
|
+
export declare class TransferTransaction extends Transaction {
|
15
|
+
/**
|
16
|
+
* 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.
|
17
|
+
*/
|
18
|
+
readonly fee: number;
|
19
|
+
/**
|
20
|
+
* The address of the recipient.
|
21
|
+
*/
|
22
|
+
readonly recipient: Address;
|
23
|
+
/**
|
24
|
+
* The xem of XEM that is transferred from sender to recipient.
|
25
|
+
*/
|
26
|
+
private readonly _xem;
|
27
|
+
/**
|
28
|
+
* Optionally a transaction can contain a message. In this case the transaction contains a message substructure. If not the field is null.
|
29
|
+
*/
|
30
|
+
readonly message: PlainMessage | EncryptedMessage;
|
31
|
+
/**
|
32
|
+
* The array of Asset objects.
|
33
|
+
*/
|
34
|
+
private readonly _assets?;
|
35
|
+
/**
|
36
|
+
* in case that the transfer transaction contains assets, it throws an error
|
37
|
+
* @returns {XEM}
|
38
|
+
*/
|
39
|
+
xem(): XEM;
|
40
|
+
/**
|
41
|
+
* in case that the transfer transaction does not contain assets, it throws an error
|
42
|
+
* @returns {Asset[]}
|
43
|
+
*/
|
44
|
+
assets(): Asset[];
|
45
|
+
/**
|
46
|
+
*
|
47
|
+
* @returns {boolean}
|
48
|
+
*/
|
49
|
+
containAssets(): boolean;
|
50
|
+
/**
|
51
|
+
* all the Asset Identifiers of the attached assets
|
52
|
+
* @returns {AssetId[]}
|
53
|
+
*/
|
54
|
+
assetsIds(): AssetId[];
|
55
|
+
/**
|
56
|
+
* Create DTO of TransferTransaction
|
57
|
+
* @returns {TransferTransactionDTO}
|
58
|
+
*/
|
59
|
+
toDTO(): TransactionDTO;
|
60
|
+
/**
|
61
|
+
* Create a TransferTransaction object
|
62
|
+
* @param timeWindow
|
63
|
+
* @param recipient
|
64
|
+
* @param xem
|
65
|
+
* @param message
|
66
|
+
* @returns {TransferTransaction}
|
67
|
+
*/
|
68
|
+
static create(timeWindow: TimeWindow, recipient: Address, xem: XEM, message: PlainMessage | EncryptedMessage): TransferTransaction;
|
69
|
+
/**
|
70
|
+
* Create a TransferTransaction object
|
71
|
+
* @param timeWindow
|
72
|
+
* @param recipient
|
73
|
+
* @param assets
|
74
|
+
* @param message
|
75
|
+
* @returns {TransferTransaction}
|
76
|
+
*/
|
77
|
+
static createWithAssets(timeWindow: TimeWindow, recipient: Address, assets: AssetTransferable[], message: PlainMessage | EncryptedMessage): TransferTransaction;
|
78
|
+
}
|