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,57 @@
|
|
1
|
+
import { BlockHeight } from "../../infrastructure/BlockHttp";
|
2
|
+
import { HashData } from "../../infrastructure/transaction/HashData";
|
3
|
+
import { PublicAccount } from "../account/PublicAccount";
|
4
|
+
import { Transaction } from "../transaction/Transaction";
|
5
|
+
/**
|
6
|
+
* 0x68 << 24 + 1 (1744830465 as 4 byte integer): the main network version
|
7
|
+
* 0x98 << 24 + 1 (-1744830463 as 4 byte integer): the test network version
|
8
|
+
*/
|
9
|
+
export declare enum BlockVersion {
|
10
|
+
MAIN_NET = 104,
|
11
|
+
TEST_NET = 152,
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* -1: Only the nemesis blockchain has this type.
|
15
|
+
* 1: Regular blockchain type.
|
16
|
+
*/
|
17
|
+
export declare enum BlockType {
|
18
|
+
NEMESIS = -1,
|
19
|
+
REGULAR = 1,
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* A blockchain is the structure that contains the transaction information. A blockchain can contain up to 120 transactions. Blocks are generated and signed by accounts and are the instrument by which information is spread in the network.
|
23
|
+
*/
|
24
|
+
export declare class Block {
|
25
|
+
/**
|
26
|
+
* The height of the blockchain. Each blockchain has a unique height. Subsequent blocks differ in height by 1.
|
27
|
+
*/
|
28
|
+
readonly height: BlockHeight;
|
29
|
+
/**
|
30
|
+
* The blockchain type
|
31
|
+
*/
|
32
|
+
readonly type: BlockType;
|
33
|
+
/**
|
34
|
+
* The number of seconds elapsed since the creation of the nemesis blockchain.
|
35
|
+
*/
|
36
|
+
readonly timeStamp: number;
|
37
|
+
/**
|
38
|
+
* The sha3-256 hash of the last blockchain as hex-string.
|
39
|
+
*/
|
40
|
+
readonly prevBlockHash: HashData;
|
41
|
+
/**
|
42
|
+
* The signature of the blockchain. The signature was generated by the signer and can be used to validate that the blockchain data was not modified by a node.
|
43
|
+
*/
|
44
|
+
readonly signature: string;
|
45
|
+
/**
|
46
|
+
* The public account of the harvester of the blockchain as hexadecimal number.
|
47
|
+
*/
|
48
|
+
readonly signer: PublicAccount;
|
49
|
+
/**
|
50
|
+
* The array of transaction
|
51
|
+
*/
|
52
|
+
readonly transactions: Transaction[];
|
53
|
+
/**
|
54
|
+
* The blockchain version
|
55
|
+
*/
|
56
|
+
readonly version: BlockVersion;
|
57
|
+
}
|
@@ -0,0 +1,81 @@
|
|
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 CreateTransactionFromDTO_1 = require("../../infrastructure/transaction/CreateTransactionFromDTO");
|
27
|
+
const PublicAccount_1 = require("../account/PublicAccount");
|
28
|
+
/**
|
29
|
+
* 0x68 << 24 + 1 (1744830465 as 4 byte integer): the main network version
|
30
|
+
* 0x98 << 24 + 1 (-1744830463 as 4 byte integer): the test network version
|
31
|
+
*/
|
32
|
+
var BlockVersion;
|
33
|
+
(function (BlockVersion) {
|
34
|
+
BlockVersion[BlockVersion["MAIN_NET"] = 104] = "MAIN_NET";
|
35
|
+
BlockVersion[BlockVersion["TEST_NET"] = 152] = "TEST_NET";
|
36
|
+
})(BlockVersion = exports.BlockVersion || (exports.BlockVersion = {}));
|
37
|
+
/**
|
38
|
+
* -1: Only the nemesis blockchain has this type.
|
39
|
+
* 1: Regular blockchain type.
|
40
|
+
*/
|
41
|
+
var BlockType;
|
42
|
+
(function (BlockType) {
|
43
|
+
BlockType[BlockType["NEMESIS"] = -1] = "NEMESIS";
|
44
|
+
BlockType[BlockType["REGULAR"] = 1] = "REGULAR";
|
45
|
+
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
46
|
+
/**
|
47
|
+
* A blockchain is the structure that contains the transaction information. A blockchain can contain up to 120 transactions. Blocks are generated and signed by accounts and are the instrument by which information is spread in the network.
|
48
|
+
*/
|
49
|
+
class Block {
|
50
|
+
/**
|
51
|
+
* @internal
|
52
|
+
* @param height
|
53
|
+
* @param type
|
54
|
+
* @param timeStamp
|
55
|
+
* @param prevBlockHash
|
56
|
+
* @param signature
|
57
|
+
* @param signer
|
58
|
+
* @param transactions
|
59
|
+
* @param version
|
60
|
+
*/
|
61
|
+
constructor(height, type, timeStamp, prevBlockHash, signature, signer, transactions, version) {
|
62
|
+
this.height = height;
|
63
|
+
this.type = type;
|
64
|
+
this.timeStamp = timeStamp;
|
65
|
+
this.prevBlockHash = prevBlockHash;
|
66
|
+
this.signature = signature;
|
67
|
+
this.signer = signer;
|
68
|
+
this.transactions = transactions;
|
69
|
+
this.version = version;
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* @internal
|
73
|
+
* @param dto
|
74
|
+
* @returns {Block}
|
75
|
+
*/
|
76
|
+
static createFromBlockDTO(dto) {
|
77
|
+
return new Block(dto.height, dto.type, dto.timeStamp, dto.prevBlockHash, dto.signature, PublicAccount_1.PublicAccount.createWithPublicKey(dto.signer), dto.transactions.map((transaction) => CreateTransactionFromDTO_1.CreateSimpleTransactionFromDTO(transaction)), dto.version);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
exports.Block = Block;
|
81
|
+
//# sourceMappingURL=Block.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../../src/models/blockchain/Block.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAIH,wGAAyG;AAEzG,4DAAuD;AAGvD;;;GAGG;AACH,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,yDAAe,CAAA;IACf,yDAAe,CAAA;AACjB,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AAED;;;GAGG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,gDAAY,CAAA;IACZ,+CAAW,CAAA;AACb,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED;;GAEG;AACH;IA0CE;;;;;;;;;;OAUG;IACH,YAAoB,MAAmB,EACnB,IAAe,EACf,SAAiB,EACjB,aAAuB,EACvB,SAAiB,EACjB,MAAqB,EACrB,YAA2B,EAC3B,OAAqB;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAAC,GAAa;QAC5C,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,EACzB,GAAG,CAAC,IAAI,EACR,GAAG,CAAC,SAAS,EACb,GAAG,CAAC,aAAa,EACjB,GAAG,CAAC,SAAS,EACb,6BAAa,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,EAC7C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,yDAA8B,CAAC,WAAW,CAAC,CAAC,EAClF,GAAG,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAtFD,sBAsFC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Address } from "../account/Address";
|
2
|
+
/**
|
3
|
+
* A namespace is the NEM version of a domain. You can rent a namespace for the duration of a year by paying a fee.
|
4
|
+
* The naming of the parts of a namespace has certain restrictions, see the corresponding chapter on namespaces.
|
5
|
+
*/
|
6
|
+
export declare class Namespace {
|
7
|
+
/**
|
8
|
+
* The fully qualified name of the namespace, also named namespace id.
|
9
|
+
*/
|
10
|
+
readonly name: string;
|
11
|
+
/**
|
12
|
+
* The owner of the namespace.
|
13
|
+
*/
|
14
|
+
readonly owner: Address;
|
15
|
+
/**
|
16
|
+
* The height at which the ownership begins.
|
17
|
+
*/
|
18
|
+
readonly height: number;
|
19
|
+
/**
|
20
|
+
* The database id for the namespace object.
|
21
|
+
*/
|
22
|
+
readonly id?: number;
|
23
|
+
}
|
@@ -0,0 +1,64 @@
|
|
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 Address_1 = require("../account/Address");
|
27
|
+
/**
|
28
|
+
* A namespace is the NEM version of a domain. You can rent a namespace for the duration of a year by paying a fee.
|
29
|
+
* The naming of the parts of a namespace has certain restrictions, see the corresponding chapter on namespaces.
|
30
|
+
*/
|
31
|
+
class Namespace {
|
32
|
+
/**
|
33
|
+
* constructor
|
34
|
+
* @internal
|
35
|
+
* @param name
|
36
|
+
* @param owner
|
37
|
+
* @param height
|
38
|
+
* @param id
|
39
|
+
*/
|
40
|
+
constructor(name, owner, height, id) {
|
41
|
+
this.name = name;
|
42
|
+
this.owner = owner;
|
43
|
+
this.height = height;
|
44
|
+
this.id = id;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* @internal
|
48
|
+
* @param dto
|
49
|
+
* @returns {Namespace}
|
50
|
+
*/
|
51
|
+
static createFromNamespaceMetaDataPairDTO(dto) {
|
52
|
+
return new Namespace(dto.namespace.fqn, new Address_1.Address(dto.namespace.owner), dto.namespace.height, dto.meta.id);
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* @internal
|
56
|
+
* @param dto
|
57
|
+
* @returns {Namespace}
|
58
|
+
*/
|
59
|
+
static createFromNamespaceDTO(dto) {
|
60
|
+
return new Namespace(dto.fqn, new Address_1.Address(dto.owner), dto.height);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
exports.Namespace = Namespace;
|
64
|
+
//# sourceMappingURL=Namespace.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Namespace.js","sourceRoot":"","sources":["../../../../src/models/namespace/Namespace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAIH,gDAA2C;AAE3C;;;GAGG;AACH;IAqBE;;;;;;;OAOG;IACH,YACE,IAAY,EACZ,KAAc,EACd,MAAc,EACd,EAAW;QAEX,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,kCAAkC,CAAC,GAA6B;QAC5E,OAAO,IAAI,SAAS,CAClB,GAAG,CAAC,SAAS,CAAC,GAAG,EACjB,IAAI,iBAAO,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,EAChC,GAAG,CAAC,SAAS,CAAC,MAAM,EACpB,GAAG,CAAC,IAAI,CAAC,EAAE,CACZ,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,sBAAsB,CAAC,GAAiB;QACpD,OAAO,IAAI,SAAS,CAClB,GAAG,CAAC,GAAG,EACP,IAAI,iBAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EACtB,GAAG,CAAC,MAAM,CACX,CAAC;IACJ,CAAC;CACF;AAnED,8BAmEC"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { Node } from "./Node";
|
2
|
+
/**
|
3
|
+
* When exchanging data with other nodes the result of the communication is divided into three
|
4
|
+
* different outcomes: success, neutral and failure.
|
5
|
+
* In the cases of success and failure the result is saved to be able to judge the quality of a node.
|
6
|
+
* This has influence on the probability that a certain node is selected as partner.
|
7
|
+
*/
|
8
|
+
export declare class ExtendedNodeExperience {
|
9
|
+
/**
|
10
|
+
* Denotes the beginning of the of the Node substructure.
|
11
|
+
*/
|
12
|
+
readonly node: Node;
|
13
|
+
/**
|
14
|
+
* The number of synchronization attempts the node had with the remote node.
|
15
|
+
*/
|
16
|
+
readonly syncs: number;
|
17
|
+
/**
|
18
|
+
* Denotes the beginning of the of the NodeExperience substructure.
|
19
|
+
*/
|
20
|
+
readonly experience: ExtendedNodeExperienceData;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Node experience data
|
24
|
+
*/
|
25
|
+
export declare class ExtendedNodeExperienceData {
|
26
|
+
/**
|
27
|
+
* The number of successful communications with the remote node.
|
28
|
+
*/
|
29
|
+
readonly s: number;
|
30
|
+
/**
|
31
|
+
* The number of failed communications with the remote node.
|
32
|
+
*/
|
33
|
+
readonly f: number;
|
34
|
+
}
|
@@ -0,0 +1,79 @@
|
|
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 Node_1 = require("./Node");
|
27
|
+
/**
|
28
|
+
* When exchanging data with other nodes the result of the communication is divided into three
|
29
|
+
* different outcomes: success, neutral and failure.
|
30
|
+
* In the cases of success and failure the result is saved to be able to judge the quality of a node.
|
31
|
+
* This has influence on the probability that a certain node is selected as partner.
|
32
|
+
*/
|
33
|
+
class ExtendedNodeExperience {
|
34
|
+
/**
|
35
|
+
* @internal
|
36
|
+
* @param node
|
37
|
+
* @param syncs
|
38
|
+
* @param experience
|
39
|
+
*/
|
40
|
+
constructor(node, syncs, experience) {
|
41
|
+
this.node = node;
|
42
|
+
this.syncs = syncs;
|
43
|
+
this.experience = experience;
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* @internal
|
47
|
+
* @param dto
|
48
|
+
* @returns {ExtendedNodeExperience}
|
49
|
+
*/
|
50
|
+
static createFromExtendedNodeExperiencePairDTO(dto) {
|
51
|
+
return new ExtendedNodeExperience(Node_1.Node.createFromNodeDTO(dto.node), dto.syncs, ExtendedNodeExperienceData.createFromExtendedNodeExperienceDataDTO(dto.experience));
|
52
|
+
}
|
53
|
+
}
|
54
|
+
exports.ExtendedNodeExperience = ExtendedNodeExperience;
|
55
|
+
/**
|
56
|
+
* Node experience data
|
57
|
+
*/
|
58
|
+
class ExtendedNodeExperienceData {
|
59
|
+
/**
|
60
|
+
* constructor
|
61
|
+
* @internal
|
62
|
+
* @param s
|
63
|
+
* @param f
|
64
|
+
*/
|
65
|
+
constructor(s, f) {
|
66
|
+
this.s = s;
|
67
|
+
this.f = f;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* @internal
|
71
|
+
* @param dto
|
72
|
+
* @returns {ExtendedNodeExperienceData}
|
73
|
+
*/
|
74
|
+
static createFromExtendedNodeExperienceDataDTO(dto) {
|
75
|
+
return new ExtendedNodeExperienceData(dto.s, dto.f);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
exports.ExtendedNodeExperienceData = ExtendedNodeExperienceData;
|
79
|
+
//# sourceMappingURL=ExtendedNodeExperience.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExtendedNodeExperience.js","sourceRoot":"","sources":["../../../../src/models/node/ExtendedNodeExperience.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAGH,iCAA4B;AAE5B;;;;;GAKG;AACH;IAgBE;;;;;OAKG;IACH,YACE,IAAU,EACV,KAAa,EACb,UAAsC;QAEtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,uCAAuC,CAAC,GAAkC;QACtF,OAAO,IAAI,sBAAsB,CAC/B,WAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAChC,GAAG,CAAC,KAAK,EACT,0BAA0B,CAAC,uCAAuC,CAAC,GAAG,CAAC,UAAU,CAAC,CACnF,CAAC;IACJ,CAAC;CACF;AA5CD,wDA4CC;AAED;;GAEG;AACH;IAYE;;;;;OAKG;IACH,YACE,CAAS,EACT,CAAS;QAET,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,uCAAuC,CAAC,GAA+B;QACnF,OAAO,IAAI,0BAA0B,CACnC,GAAG,CAAC,CAAC,EACL,GAAG,CAAC,CAAC,CACN,CAAC;IACJ,CAAC;CACF;AArCD,gEAqCC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export declare enum NetworkTypes {
|
2
|
+
/**
|
3
|
+
* Main net network
|
4
|
+
* @type {number}
|
5
|
+
*/
|
6
|
+
MAIN_NET = 104,
|
7
|
+
/**
|
8
|
+
* Test net network
|
9
|
+
* @type {number}
|
10
|
+
*/
|
11
|
+
TEST_NET = 152,
|
12
|
+
/**
|
13
|
+
* mijin net network
|
14
|
+
* @type {number}
|
15
|
+
*/
|
16
|
+
MIJIN_NET = 96,
|
17
|
+
}
|
@@ -0,0 +1,44 @@
|
|
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
|
+
var NetworkTypes;
|
27
|
+
(function (NetworkTypes) {
|
28
|
+
/**
|
29
|
+
* Main net network
|
30
|
+
* @type {number}
|
31
|
+
*/
|
32
|
+
NetworkTypes[NetworkTypes["MAIN_NET"] = 104] = "MAIN_NET";
|
33
|
+
/**
|
34
|
+
* Test net network
|
35
|
+
* @type {number}
|
36
|
+
*/
|
37
|
+
NetworkTypes[NetworkTypes["TEST_NET"] = 152] = "TEST_NET";
|
38
|
+
/**
|
39
|
+
* mijin net network
|
40
|
+
* @type {number}
|
41
|
+
*/
|
42
|
+
NetworkTypes[NetworkTypes["MIJIN_NET"] = 96] = "MIJIN_NET";
|
43
|
+
})(NetworkTypes = exports.NetworkTypes || (exports.NetworkTypes = {}));
|
44
|
+
//# sourceMappingURL=NetworkTypes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"NetworkTypes.js","sourceRoot":"","sources":["../../../../src/models/node/NetworkTypes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH,IAAY,YAoBX;AApBD,WAAY,YAAY;IAEtB;;;OAGG;IACH,yDAAe,CAAA;IAEf;;;OAGG;IACH,yDAAe,CAAA;IAEf;;;OAGG;IACH,0DAAgB,CAAA;AAElB,CAAC,EApBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAoBvB"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { Node } from "./Node";
|
2
|
+
/**
|
3
|
+
* A NodeCollection object holds arrays of nodes with different statuses.
|
4
|
+
*/
|
5
|
+
export declare class NisNodeInfo {
|
6
|
+
/**
|
7
|
+
* Denotes the beginning of the node substructure.
|
8
|
+
*/
|
9
|
+
readonly node: Node;
|
10
|
+
/**
|
11
|
+
* Denotes the beginning of the application meta data substructure.
|
12
|
+
*/
|
13
|
+
readonly nisInfo: ApplicationMetaData;
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* The application meta data object supplies additional information about the application running on a node.
|
17
|
+
*/
|
18
|
+
export declare class ApplicationMetaData {
|
19
|
+
/**
|
20
|
+
* The current network time, i.e. the number of seconds that have elapsed since the creation of the nemesis block.
|
21
|
+
*/
|
22
|
+
readonly currentTime: number;
|
23
|
+
/**
|
24
|
+
* The name of the application running on the node.
|
25
|
+
*/
|
26
|
+
readonly application: string;
|
27
|
+
/**
|
28
|
+
* The network time when the application was started.
|
29
|
+
*/
|
30
|
+
readonly startTime: number;
|
31
|
+
/**
|
32
|
+
* The application version.
|
33
|
+
*/
|
34
|
+
readonly version: string;
|
35
|
+
/**
|
36
|
+
* The signer of the certificate used by the application.
|
37
|
+
*/
|
38
|
+
readonly signer: string;
|
39
|
+
}
|
@@ -0,0 +1,79 @@
|
|
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 Node_1 = require("./Node");
|
27
|
+
/**
|
28
|
+
* A NodeCollection object holds arrays of nodes with different statuses.
|
29
|
+
*/
|
30
|
+
class NisNodeInfo {
|
31
|
+
/**
|
32
|
+
* @internal
|
33
|
+
* @param node
|
34
|
+
* @param nisInfo
|
35
|
+
*/
|
36
|
+
constructor(node, nisInfo) {
|
37
|
+
this.node = node;
|
38
|
+
this.nisInfo = nisInfo;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* @internal
|
42
|
+
* @param dto
|
43
|
+
* @returns {NisNodeInfo}
|
44
|
+
*/
|
45
|
+
static createFromNisNodeInfoDTO(dto) {
|
46
|
+
return new NisNodeInfo(Node_1.Node.createFromNodeDTO(dto.node), ApplicationMetaData.createFromApplicationMetaDataDTO(dto.nisInfo));
|
47
|
+
}
|
48
|
+
}
|
49
|
+
exports.NisNodeInfo = NisNodeInfo;
|
50
|
+
/**
|
51
|
+
* The application meta data object supplies additional information about the application running on a node.
|
52
|
+
*/
|
53
|
+
class ApplicationMetaData {
|
54
|
+
/**
|
55
|
+
* @internal
|
56
|
+
* @param currentTime
|
57
|
+
* @param application
|
58
|
+
* @param startTime
|
59
|
+
* @param version
|
60
|
+
* @param signer
|
61
|
+
*/
|
62
|
+
constructor(currentTime, application, startTime, version, signer) {
|
63
|
+
this.currentTime = currentTime;
|
64
|
+
this.application = application;
|
65
|
+
this.startTime = startTime;
|
66
|
+
this.version = version;
|
67
|
+
this.signer = signer;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* @internal
|
71
|
+
* @param dto
|
72
|
+
* @returns {ApplicationMetaData}
|
73
|
+
*/
|
74
|
+
static createFromApplicationMetaDataDTO(dto) {
|
75
|
+
return new ApplicationMetaData(dto.currentTime, dto.application, dto.startTime, dto.version, dto.signer);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
exports.ApplicationMetaData = ApplicationMetaData;
|
79
|
+
//# sourceMappingURL=NisNodeInfo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"NisNodeInfo.js","sourceRoot":"","sources":["../../../../src/models/node/NisNodeInfo.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAIH,iCAA4B;AAE5B;;GAEG;AACH;IAYE;;;;OAIG;IACH,YACE,IAAU,EACV,OAA4B;QAE5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,wBAAwB,CAAC,GAAmB;QACtD,OAAO,IAAI,WAAW,CACpB,WAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAChC,mBAAmB,CAAC,gCAAgC,CAAC,GAAG,CAAC,OAAO,CAAC,CAClE,CAAC;IACN,CAAC;CAEF;AArCD,kCAqCC;AAED;;GAEG;AACH;IA2BE;;;;;;;OAOG;IACH,YACE,WAAmB,EACnB,WAAmB,EACnB,SAAiB,EACjB,OAAe,EACf,MAAc;QAEd,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,gCAAgC,CAAC,GAA2B;QACxE,OAAO,IAAI,mBAAmB,CAC5B,GAAG,CAAC,WAAW,EACf,GAAG,CAAC,WAAW,EACf,GAAG,CAAC,SAAS,EACb,GAAG,CAAC,OAAO,EACX,GAAG,CAAC,MAAM,CACX,CAAC;IACJ,CAAC;CACF;AA/DD,kDA+DC"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import { PublicAccount } from "../account/PublicAccount";
|
2
|
+
import { NetworkTypes } from "./NetworkTypes";
|
3
|
+
/**
|
4
|
+
* Nodes are the entities that perform communication in the network like sending and receiving data.
|
5
|
+
* A node has an identity which is tied to an account through which the node can identify itself to the network.
|
6
|
+
* The communication is done through the endpoint of the node. Additionally a node provides meta data information.
|
7
|
+
*/
|
8
|
+
export declare class Node {
|
9
|
+
/**
|
10
|
+
* Denotes the beginning of the meta data substructure.
|
11
|
+
*/
|
12
|
+
readonly metaData: NodeMetaData;
|
13
|
+
/**
|
14
|
+
* Denotes the beginning of the endpoint substructure.
|
15
|
+
*/
|
16
|
+
readonly endpoint: NodeEndpoint;
|
17
|
+
/**
|
18
|
+
* Denotes the beginning of the identity substructure.
|
19
|
+
*/
|
20
|
+
readonly identity: NodeIdentity;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Node meta data
|
24
|
+
*/
|
25
|
+
export declare class NodeMetaData {
|
26
|
+
/**
|
27
|
+
* The number of features the nodes has.
|
28
|
+
*/
|
29
|
+
readonly features: number;
|
30
|
+
/**
|
31
|
+
* The network id
|
32
|
+
*/
|
33
|
+
readonly network: NetworkTypes;
|
34
|
+
/**
|
35
|
+
* The name of the application that is running the node.
|
36
|
+
*/
|
37
|
+
readonly application: string;
|
38
|
+
/**
|
39
|
+
* The version of the application.
|
40
|
+
*/
|
41
|
+
readonly version: string;
|
42
|
+
/**
|
43
|
+
* The underlying platform (OS, java version).
|
44
|
+
*/
|
45
|
+
readonly platform: string;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Node endpoint
|
49
|
+
*/
|
50
|
+
export declare class NodeEndpoint {
|
51
|
+
/**
|
52
|
+
* The protocol used for the communication (HTTP or HTTPS).
|
53
|
+
*/
|
54
|
+
readonly protocol: string;
|
55
|
+
/**
|
56
|
+
* The port used for the communication.
|
57
|
+
*/
|
58
|
+
readonly port: number;
|
59
|
+
/**
|
60
|
+
* The IP address of the endpoint.
|
61
|
+
*/
|
62
|
+
readonly host: string;
|
63
|
+
}
|
64
|
+
/**
|
65
|
+
* Node identity
|
66
|
+
*/
|
67
|
+
export declare class NodeIdentity {
|
68
|
+
/**
|
69
|
+
* The name of the node.
|
70
|
+
*/
|
71
|
+
readonly name: string;
|
72
|
+
/**
|
73
|
+
* The public account used to identify the node.
|
74
|
+
*/
|
75
|
+
readonly publicAccount?: PublicAccount;
|
76
|
+
}
|