nme-library 2.0.0-RC4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. package/4xhj3q2e.cjs +1 -0
  2. package/LICENSE +21 -0
  3. package/README.md +30 -0
  4. package/dist/index.d.ts +4 -0
  5. package/dist/index.js +38 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/src/NEMLibrary.d.ts +25 -0
  8. package/dist/src/NEMLibrary.js +69 -0
  9. package/dist/src/NEMLibrary.js.map +1 -0
  10. package/dist/src/infrastrcture.d.ts +13 -0
  11. package/dist/src/infrastrcture.js +44 -0
  12. package/dist/src/infrastrcture.js.map +1 -0
  13. package/dist/src/infrastructure/AccountHttp.d.ts +204 -0
  14. package/dist/src/infrastructure/AccountHttp.js +415 -0
  15. package/dist/src/infrastructure/AccountHttp.js.map +1 -0
  16. package/dist/src/infrastructure/AccountListener.d.ts +20 -0
  17. package/dist/src/infrastructure/AccountListener.js +71 -0
  18. package/dist/src/infrastructure/AccountListener.js.map +1 -0
  19. package/dist/src/infrastructure/AllTransactionsPageable.d.ts +1 -0
  20. package/dist/src/infrastructure/AllTransactionsPageable.js +35 -0
  21. package/dist/src/infrastructure/AllTransactionsPageable.js.map +1 -0
  22. package/dist/src/infrastructure/AssetHttp.d.ts +36 -0
  23. package/dist/src/infrastructure/AssetHttp.js +85 -0
  24. package/dist/src/infrastructure/AssetHttp.js.map +1 -0
  25. package/dist/src/infrastructure/BlockHttp.d.ts +14 -0
  26. package/dist/src/infrastructure/BlockHttp.js +54 -0
  27. package/dist/src/infrastructure/BlockHttp.js.map +1 -0
  28. package/dist/src/infrastructure/BlockchainListener.d.ts +24 -0
  29. package/dist/src/infrastructure/BlockchainListener.js +93 -0
  30. package/dist/src/infrastructure/BlockchainListener.js.map +1 -0
  31. package/dist/src/infrastructure/ChainHttp.d.ts +23 -0
  32. package/dist/src/infrastructure/ChainHttp.js +68 -0
  33. package/dist/src/infrastructure/ChainHttp.js.map +1 -0
  34. package/dist/src/infrastructure/ConfirmedTransactionListener.d.ts +20 -0
  35. package/dist/src/infrastructure/ConfirmedTransactionListener.js +76 -0
  36. package/dist/src/infrastructure/ConfirmedTransactionListener.js.map +1 -0
  37. package/dist/src/infrastructure/HarvestInfoPageable.d.ts +1 -0
  38. package/dist/src/infrastructure/HarvestInfoPageable.js +52 -0
  39. package/dist/src/infrastructure/HarvestInfoPageable.js.map +1 -0
  40. package/dist/src/infrastructure/HttpEndpoint.d.ts +15 -0
  41. package/dist/src/infrastructure/HttpEndpoint.js +132 -0
  42. package/dist/src/infrastructure/HttpEndpoint.js.map +1 -0
  43. package/dist/src/infrastructure/IncomingTransactionsPageable.d.ts +1 -0
  44. package/dist/src/infrastructure/IncomingTransactionsPageable.js +29 -0
  45. package/dist/src/infrastructure/IncomingTransactionsPageable.js.map +1 -0
  46. package/dist/src/infrastructure/Listener.d.ts +14 -0
  47. package/dist/src/infrastructure/Listener.js +101 -0
  48. package/dist/src/infrastructure/Listener.js.map +1 -0
  49. package/dist/src/infrastructure/NamespaceHttp.d.ts +27 -0
  50. package/dist/src/infrastructure/NamespaceHttp.js +78 -0
  51. package/dist/src/infrastructure/NamespaceHttp.js.map +1 -0
  52. package/dist/src/infrastructure/NamespacesPageable.d.ts +1 -0
  53. package/dist/src/infrastructure/NamespacesPageable.js +28 -0
  54. package/dist/src/infrastructure/NamespacesPageable.js.map +1 -0
  55. package/dist/src/infrastructure/NodeHttp.d.ts +45 -0
  56. package/dist/src/infrastructure/NodeHttp.js +116 -0
  57. package/dist/src/infrastructure/NodeHttp.js.map +1 -0
  58. package/dist/src/infrastructure/OutgoingTransactionsPageable.d.ts +1 -0
  59. package/dist/src/infrastructure/OutgoingTransactionsPageable.js +59 -0
  60. package/dist/src/infrastructure/OutgoingTransactionsPageable.js.map +1 -0
  61. package/dist/src/infrastructure/Pageable.d.ts +10 -0
  62. package/dist/src/infrastructure/Pageable.js +55 -0
  63. package/dist/src/infrastructure/Pageable.js.map +1 -0
  64. package/dist/src/infrastructure/TransactionHttp.d.ts +20 -0
  65. package/dist/src/infrastructure/TransactionHttp.js +68 -0
  66. package/dist/src/infrastructure/TransactionHttp.js.map +1 -0
  67. package/dist/src/infrastructure/UnconfirmedTransactionListener.d.ts +20 -0
  68. package/dist/src/infrastructure/UnconfirmedTransactionListener.js +76 -0
  69. package/dist/src/infrastructure/UnconfirmedTransactionListener.js.map +1 -0
  70. package/dist/src/infrastructure/account/AccountHistoricalDataViewModelDTO.d.ts +1 -0
  71. package/dist/src/infrastructure/account/AccountHistoricalDataViewModelDTO.js +26 -0
  72. package/dist/src/infrastructure/account/AccountHistoricalDataViewModelDTO.js.map +1 -0
  73. package/dist/src/infrastructure/account/AccountImportanceViewModelDTO.d.ts +1 -0
  74. package/dist/src/infrastructure/account/AccountImportanceViewModelDTO.js +26 -0
  75. package/dist/src/infrastructure/account/AccountImportanceViewModelDTO.js.map +1 -0
  76. package/dist/src/infrastructure/account/AccountInfoDTO.d.ts +10 -0
  77. package/dist/src/infrastructure/account/AccountInfoDTO.js +26 -0
  78. package/dist/src/infrastructure/account/AccountInfoDTO.js.map +1 -0
  79. package/dist/src/infrastructure/account/AccountMetaDataDTO.d.ts +1 -0
  80. package/dist/src/infrastructure/account/AccountMetaDataDTO.js +26 -0
  81. package/dist/src/infrastructure/account/AccountMetaDataDTO.js.map +1 -0
  82. package/dist/src/infrastructure/account/AccountMetaDataPairDTO.d.ts +1 -0
  83. package/dist/src/infrastructure/account/AccountMetaDataPairDTO.js +26 -0
  84. package/dist/src/infrastructure/account/AccountMetaDataPairDTO.js.map +1 -0
  85. package/dist/src/infrastructure/account/AccountPrivateKeyTransactionsPageDTO.d.ts +1 -0
  86. package/dist/src/infrastructure/account/AccountPrivateKeyTransactionsPageDTO.js +26 -0
  87. package/dist/src/infrastructure/account/AccountPrivateKeyTransactionsPageDTO.js.map +1 -0
  88. package/dist/src/infrastructure/account/HarvestInfoDTO.d.ts +1 -0
  89. package/dist/src/infrastructure/account/HarvestInfoDTO.js +26 -0
  90. package/dist/src/infrastructure/account/HarvestInfoDTO.js.map +1 -0
  91. package/dist/src/infrastructure/account/KeyPairViewModelDTO.d.ts +1 -0
  92. package/dist/src/infrastructure/account/KeyPairViewModelDTO.js +26 -0
  93. package/dist/src/infrastructure/account/KeyPairViewModelDTO.js.map +1 -0
  94. package/dist/src/infrastructure/account/PrivateKeyDTO.d.ts +1 -0
  95. package/dist/src/infrastructure/account/PrivateKeyDTO.js +26 -0
  96. package/dist/src/infrastructure/account/PrivateKeyDTO.js.map +1 -0
  97. package/dist/src/infrastructure/asset/MosaicDTO.d.ts +1 -0
  98. package/dist/src/infrastructure/asset/MosaicDTO.js +26 -0
  99. package/dist/src/infrastructure/asset/MosaicDTO.js.map +1 -0
  100. package/dist/src/infrastructure/asset/MosaicDefinitionDTO.d.ts +1 -0
  101. package/dist/src/infrastructure/asset/MosaicDefinitionDTO.js +26 -0
  102. package/dist/src/infrastructure/asset/MosaicDefinitionDTO.js.map +1 -0
  103. package/dist/src/infrastructure/asset/MosaicDefinitionMetaDataPairDTO.d.ts +1 -0
  104. package/dist/src/infrastructure/asset/MosaicDefinitionMetaDataPairDTO.js +26 -0
  105. package/dist/src/infrastructure/asset/MosaicDefinitionMetaDataPairDTO.js.map +1 -0
  106. package/dist/src/infrastructure/asset/MosaicIdDTO.d.ts +1 -0
  107. package/dist/src/infrastructure/asset/MosaicIdDTO.js +26 -0
  108. package/dist/src/infrastructure/asset/MosaicIdDTO.js.map +1 -0
  109. package/dist/src/infrastructure/asset/MosaicLevyDTO.d.ts +1 -0
  110. package/dist/src/infrastructure/asset/MosaicLevyDTO.js +26 -0
  111. package/dist/src/infrastructure/asset/MosaicLevyDTO.js.map +1 -0
  112. package/dist/src/infrastructure/asset/MosaicPropertyDTO.d.ts +8 -0
  113. package/dist/src/infrastructure/asset/MosaicPropertyDTO.js +26 -0
  114. package/dist/src/infrastructure/asset/MosaicPropertyDTO.js.map +1 -0
  115. package/dist/src/infrastructure/blockchain/BlockChainScoreDTO.d.ts +1 -0
  116. package/dist/src/infrastructure/blockchain/BlockChainScoreDTO.js +26 -0
  117. package/dist/src/infrastructure/blockchain/BlockChainScoreDTO.js.map +1 -0
  118. package/dist/src/infrastructure/blockchain/BlockDTO.d.ts +6 -0
  119. package/dist/src/infrastructure/blockchain/BlockDTO.js +26 -0
  120. package/dist/src/infrastructure/blockchain/BlockDTO.js.map +1 -0
  121. package/dist/src/infrastructure/blockchain/BlockHeightDTO.d.ts +1 -0
  122. package/dist/src/infrastructure/blockchain/BlockHeightDTO.js +26 -0
  123. package/dist/src/infrastructure/blockchain/BlockHeightDTO.js.map +1 -0
  124. package/dist/src/infrastructure/blockchain/ExplorerBlockViewModelDTO.d.ts +1 -0
  125. package/dist/src/infrastructure/blockchain/ExplorerBlockViewModelDTO.js +26 -0
  126. package/dist/src/infrastructure/blockchain/ExplorerBlockViewModelDTO.js.map +1 -0
  127. package/dist/src/infrastructure/debug/AuditCollectionDTO.d.ts +22 -0
  128. package/dist/src/infrastructure/debug/AuditCollectionDTO.js +26 -0
  129. package/dist/src/infrastructure/debug/AuditCollectionDTO.js.map +1 -0
  130. package/dist/src/infrastructure/debug/NemAsyncTimerVisitorDTO.d.ts +1 -0
  131. package/dist/src/infrastructure/debug/NemAsyncTimerVisitorDTO.js +26 -0
  132. package/dist/src/infrastructure/debug/NemAsyncTimerVisitorDTO.js.map +1 -0
  133. package/dist/src/infrastructure/debug/NisNodeInfoDTO.d.ts +1 -0
  134. package/dist/src/infrastructure/debug/NisNodeInfoDTO.js +26 -0
  135. package/dist/src/infrastructure/debug/NisNodeInfoDTO.js.map +1 -0
  136. package/dist/src/infrastructure/debug/TimeSynchronizationResultDTO.d.ts +1 -0
  137. package/dist/src/infrastructure/debug/TimeSynchronizationResultDTO.js +26 -0
  138. package/dist/src/infrastructure/debug/TimeSynchronizationResultDTO.js.map +1 -0
  139. package/dist/src/infrastructure/namespace/NamespaceDTO.d.ts +1 -0
  140. package/dist/src/infrastructure/namespace/NamespaceDTO.js +26 -0
  141. package/dist/src/infrastructure/namespace/NamespaceDTO.js.map +1 -0
  142. package/dist/src/infrastructure/namespace/NamespaceMetaDataPairDTO.d.ts +1 -0
  143. package/dist/src/infrastructure/namespace/NamespaceMetaDataPairDTO.js +26 -0
  144. package/dist/src/infrastructure/namespace/NamespaceMetaDataPairDTO.js.map +1 -0
  145. package/dist/src/infrastructure/node/ApplicationMetaDataDTO.d.ts +1 -0
  146. package/dist/src/infrastructure/node/ApplicationMetaDataDTO.js +26 -0
  147. package/dist/src/infrastructure/node/ApplicationMetaDataDTO.js.map +1 -0
  148. package/dist/src/infrastructure/node/BootNodeRequestDTO.d.ts +1 -0
  149. package/dist/src/infrastructure/node/BootNodeRequestDTO.js +26 -0
  150. package/dist/src/infrastructure/node/BootNodeRequestDTO.js.map +1 -0
  151. package/dist/src/infrastructure/node/CommunicationTimeStampsDTO.d.ts +1 -0
  152. package/dist/src/infrastructure/node/CommunicationTimeStampsDTO.js +26 -0
  153. package/dist/src/infrastructure/node/CommunicationTimeStampsDTO.js.map +1 -0
  154. package/dist/src/infrastructure/node/ExtendedNodeExperiencePairDTO.d.ts +1 -0
  155. package/dist/src/infrastructure/node/ExtendedNodeExperiencePairDTO.js +26 -0
  156. package/dist/src/infrastructure/node/ExtendedNodeExperiencePairDTO.js.map +1 -0
  157. package/dist/src/infrastructure/node/NodeCollectionDTO.d.ts +1 -0
  158. package/dist/src/infrastructure/node/NodeCollectionDTO.js +26 -0
  159. package/dist/src/infrastructure/node/NodeCollectionDTO.js.map +1 -0
  160. package/dist/src/infrastructure/node/NodeDTO.d.ts +19 -0
  161. package/dist/src/infrastructure/node/NodeDTO.js +26 -0
  162. package/dist/src/infrastructure/node/NodeDTO.js.map +1 -0
  163. package/dist/src/infrastructure/transaction/CreateTransactionFromDTO.d.ts +1 -0
  164. package/dist/src/infrastructure/transaction/CreateTransactionFromDTO.js +162 -0
  165. package/dist/src/infrastructure/transaction/CreateTransactionFromDTO.js.map +1 -0
  166. package/dist/src/infrastructure/transaction/CreateUnconfirmedTransactionFromDTO.d.ts +1 -0
  167. package/dist/src/infrastructure/transaction/CreateUnconfirmedTransactionFromDTO.js +104 -0
  168. package/dist/src/infrastructure/transaction/CreateUnconfirmedTransactionFromDTO.js.map +1 -0
  169. package/dist/src/infrastructure/transaction/ErrorObjectDTO.d.ts +1 -0
  170. package/dist/src/infrastructure/transaction/ErrorObjectDTO.js +26 -0
  171. package/dist/src/infrastructure/transaction/ErrorObjectDTO.js.map +1 -0
  172. package/dist/src/infrastructure/transaction/HashData.d.ts +10 -0
  173. package/dist/src/infrastructure/transaction/HashData.js +26 -0
  174. package/dist/src/infrastructure/transaction/HashData.js.map +1 -0
  175. package/dist/src/infrastructure/transaction/ImportanceTransferTransactionDTO.d.ts +1 -0
  176. package/dist/src/infrastructure/transaction/ImportanceTransferTransactionDTO.js +26 -0
  177. package/dist/src/infrastructure/transaction/ImportanceTransferTransactionDTO.js.map +1 -0
  178. package/dist/src/infrastructure/transaction/Message.d.ts +1 -0
  179. package/dist/src/infrastructure/transaction/Message.js +26 -0
  180. package/dist/src/infrastructure/transaction/Message.js.map +1 -0
  181. package/dist/src/infrastructure/transaction/MosaicDefinitionCreationTransactionDTO.d.ts +1 -0
  182. package/dist/src/infrastructure/transaction/MosaicDefinitionCreationTransactionDTO.js +26 -0
  183. package/dist/src/infrastructure/transaction/MosaicDefinitionCreationTransactionDTO.js.map +1 -0
  184. package/dist/src/infrastructure/transaction/MosaicSupplyChangeTransactionDTO.d.ts +1 -0
  185. package/dist/src/infrastructure/transaction/MosaicSupplyChangeTransactionDTO.js +26 -0
  186. package/dist/src/infrastructure/transaction/MosaicSupplyChangeTransactionDTO.js.map +1 -0
  187. package/dist/src/infrastructure/transaction/MultisigAggregateModificationTransactionDTO.d.ts +1 -0
  188. package/dist/src/infrastructure/transaction/MultisigAggregateModificationTransactionDTO.js +26 -0
  189. package/dist/src/infrastructure/transaction/MultisigAggregateModificationTransactionDTO.js.map +1 -0
  190. package/dist/src/infrastructure/transaction/MultisigCosignatoryModificationDTO.d.ts +1 -0
  191. package/dist/src/infrastructure/transaction/MultisigCosignatoryModificationDTO.js +26 -0
  192. package/dist/src/infrastructure/transaction/MultisigCosignatoryModificationDTO.js.map +1 -0
  193. package/dist/src/infrastructure/transaction/MultisigSignatureTransactionDTO.d.ts +1 -0
  194. package/dist/src/infrastructure/transaction/MultisigSignatureTransactionDTO.js +26 -0
  195. package/dist/src/infrastructure/transaction/MultisigSignatureTransactionDTO.js.map +1 -0
  196. package/dist/src/infrastructure/transaction/MultisigTransactionDTO.d.ts +1 -0
  197. package/dist/src/infrastructure/transaction/MultisigTransactionDTO.js +26 -0
  198. package/dist/src/infrastructure/transaction/MultisigTransactionDTO.js.map +1 -0
  199. package/dist/src/infrastructure/transaction/NemAnnounceResultDTO.d.ts +1 -0
  200. package/dist/src/infrastructure/transaction/NemAnnounceResultDTO.js +26 -0
  201. package/dist/src/infrastructure/transaction/NemAnnounceResultDTO.js.map +1 -0
  202. package/dist/src/infrastructure/transaction/NemRequestResultDTO.d.ts +10 -0
  203. package/dist/src/infrastructure/transaction/NemRequestResultDTO.js +26 -0
  204. package/dist/src/infrastructure/transaction/NemRequestResultDTO.js.map +1 -0
  205. package/dist/src/infrastructure/transaction/ProvisionNamespaceTransactionDTO.d.ts +1 -0
  206. package/dist/src/infrastructure/transaction/ProvisionNamespaceTransactionDTO.js +26 -0
  207. package/dist/src/infrastructure/transaction/ProvisionNamespaceTransactionDTO.js.map +1 -0
  208. package/dist/src/infrastructure/transaction/RequestPrepareAnnonceDTO.d.ts +1 -0
  209. package/dist/src/infrastructure/transaction/RequestPrepareAnnonceDTO.js +26 -0
  210. package/dist/src/infrastructure/transaction/RequestPrepareAnnonceDTO.js.map +1 -0
  211. package/dist/src/infrastructure/transaction/TransactionDTO.d.ts +31 -0
  212. package/dist/src/infrastructure/transaction/TransactionDTO.js +26 -0
  213. package/dist/src/infrastructure/transaction/TransactionDTO.js.map +1 -0
  214. package/dist/src/infrastructure/transaction/TransactionMetaDataDTO.d.ts +1 -0
  215. package/dist/src/infrastructure/transaction/TransactionMetaDataDTO.js +26 -0
  216. package/dist/src/infrastructure/transaction/TransactionMetaDataDTO.js.map +1 -0
  217. package/dist/src/infrastructure/transaction/TransactionMetaDataPairDTO.d.ts +1 -0
  218. package/dist/src/infrastructure/transaction/TransactionMetaDataPairDTO.js +26 -0
  219. package/dist/src/infrastructure/transaction/TransactionMetaDataPairDTO.js.map +1 -0
  220. package/dist/src/infrastructure/transaction/TransferTransactionDTO.d.ts +1 -0
  221. package/dist/src/infrastructure/transaction/TransferTransactionDTO.js +26 -0
  222. package/dist/src/infrastructure/transaction/TransferTransactionDTO.js.map +1 -0
  223. package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataDTO.d.ts +1 -0
  224. package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataDTO.js +26 -0
  225. package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataDTO.js.map +1 -0
  226. package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataPairDTO.d.ts +1 -0
  227. package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataPairDTO.js +26 -0
  228. package/dist/src/infrastructure/transaction/UnconfirmedTransactionMetaDataPairDTO.js.map +1 -0
  229. package/dist/src/infrastructure/transaction/UnconfirmedTransactionsDTO.d.ts +1 -0
  230. package/dist/src/infrastructure/transaction/UnconfirmedTransactionsDTO.js +26 -0
  231. package/dist/src/infrastructure/transaction/UnconfirmedTransactionsDTO.js.map +1 -0
  232. package/dist/src/models/account/Account.d.ts +52 -0
  233. package/dist/src/models/account/Account.js +136 -0
  234. package/dist/src/models/account/Account.js.map +1 -0
  235. package/dist/src/models/account/AccountHarvestInfo.d.ts +25 -0
  236. package/dist/src/models/account/AccountHarvestInfo.js +55 -0
  237. package/dist/src/models/account/AccountHarvestInfo.js.map +1 -0
  238. package/dist/src/models/account/AccountHistoricalInfo.d.ts +25 -0
  239. package/dist/src/models/account/AccountHistoricalInfo.js +58 -0
  240. package/dist/src/models/account/AccountHistoricalInfo.js.map +1 -0
  241. package/dist/src/models/account/AccountImportanceInfo.d.ts +35 -0
  242. package/dist/src/models/account/AccountImportanceInfo.js +77 -0
  243. package/dist/src/models/account/AccountImportanceInfo.js.map +1 -0
  244. package/dist/src/models/account/AccountInfo.d.ts +79 -0
  245. package/dist/src/models/account/AccountInfo.js +129 -0
  246. package/dist/src/models/account/AccountInfo.js.map +1 -0
  247. package/dist/src/models/account/Address.d.ts +25 -0
  248. package/dist/src/models/account/Address.js +80 -0
  249. package/dist/src/models/account/Address.js.map +1 -0
  250. package/dist/src/models/account/Balance.d.ts +17 -0
  251. package/dist/src/models/account/Balance.js +42 -0
  252. package/dist/src/models/account/Balance.js.map +1 -0
  253. package/dist/src/models/account/NodeHarvestInfo.d.ts +10 -0
  254. package/dist/src/models/account/NodeHarvestInfo.js +38 -0
  255. package/dist/src/models/account/NodeHarvestInfo.js.map +1 -0
  256. package/dist/src/models/account/PublicAccount.d.ts +25 -0
  257. package/dist/src/models/account/PublicAccount.js +82 -0
  258. package/dist/src/models/account/PublicAccount.js.map +1 -0
  259. package/dist/src/models/asset/Asset.d.ts +20 -0
  260. package/dist/src/models/asset/Asset.js +59 -0
  261. package/dist/src/models/asset/Asset.js.map +1 -0
  262. package/dist/src/models/asset/AssetDefinition.d.ts +83 -0
  263. package/dist/src/models/asset/AssetDefinition.js +136 -0
  264. package/dist/src/models/asset/AssetDefinition.js.map +1 -0
  265. package/dist/src/models/asset/AssetId.d.ts +31 -0
  266. package/dist/src/models/asset/AssetId.js +77 -0
  267. package/dist/src/models/asset/AssetId.js.map +1 -0
  268. package/dist/src/models/asset/AssetLevy.d.ts +40 -0
  269. package/dist/src/models/asset/AssetLevy.js +76 -0
  270. package/dist/src/models/asset/AssetLevy.js.map +1 -0
  271. package/dist/src/models/asset/AssetTransferable.d.ts +65 -0
  272. package/dist/src/models/asset/AssetTransferable.js +88 -0
  273. package/dist/src/models/asset/AssetTransferable.js.map +1 -0
  274. package/dist/src/models/asset/XEM.d.ts +49 -0
  275. package/dist/src/models/asset/XEM.js +83 -0
  276. package/dist/src/models/asset/XEM.js.map +1 -0
  277. package/dist/src/models/blockchain/Block.d.ts +57 -0
  278. package/dist/src/models/blockchain/Block.js +81 -0
  279. package/dist/src/models/blockchain/Block.js.map +1 -0
  280. package/dist/src/models/namespace/Namespace.d.ts +23 -0
  281. package/dist/src/models/namespace/Namespace.js +64 -0
  282. package/dist/src/models/namespace/Namespace.js.map +1 -0
  283. package/dist/src/models/node/ExtendedNodeExperience.d.ts +34 -0
  284. package/dist/src/models/node/ExtendedNodeExperience.js +79 -0
  285. package/dist/src/models/node/ExtendedNodeExperience.js.map +1 -0
  286. package/dist/src/models/node/NetworkTypes.d.ts +17 -0
  287. package/dist/src/models/node/NetworkTypes.js +44 -0
  288. package/dist/src/models/node/NetworkTypes.js.map +1 -0
  289. package/dist/src/models/node/NisNodeInfo.d.ts +39 -0
  290. package/dist/src/models/node/NisNodeInfo.js +79 -0
  291. package/dist/src/models/node/NisNodeInfo.js.map +1 -0
  292. package/dist/src/models/node/Node.d.ts +76 -0
  293. package/dist/src/models/node/Node.js +131 -0
  294. package/dist/src/models/node/Node.js.map +1 -0
  295. package/dist/src/models/node/NodeCollection.d.ts +22 -0
  296. package/dist/src/models/node/NodeCollection.js +54 -0
  297. package/dist/src/models/node/NodeCollection.js.map +1 -0
  298. package/dist/src/models/transaction/AssetDefinitionCreationTransaction.d.ts +39 -0
  299. package/dist/src/models/transaction/AssetDefinitionCreationTransaction.js +94 -0
  300. package/dist/src/models/transaction/AssetDefinitionCreationTransaction.js.map +1 -0
  301. package/dist/src/models/transaction/AssetSupplyChangeTransaction.d.ts +48 -0
  302. package/dist/src/models/transaction/AssetSupplyChangeTransaction.js +94 -0
  303. package/dist/src/models/transaction/AssetSupplyChangeTransaction.js.map +1 -0
  304. package/dist/src/models/transaction/EncryptedMessage.d.ts +8 -0
  305. package/dist/src/models/transaction/EncryptedMessage.js +86 -0
  306. package/dist/src/models/transaction/EncryptedMessage.js.map +1 -0
  307. package/dist/src/models/transaction/HexMessage.d.ts +10 -0
  308. package/dist/src/models/transaction/HexMessage.js +37 -0
  309. package/dist/src/models/transaction/HexMessage.js.map +1 -0
  310. package/dist/src/models/transaction/ImportanceTransferTransaction.d.ts +45 -0
  311. package/dist/src/models/transaction/ImportanceTransferTransaction.js +92 -0
  312. package/dist/src/models/transaction/ImportanceTransferTransaction.js.map +1 -0
  313. package/dist/src/models/transaction/Message.d.ts +12 -0
  314. package/dist/src/models/transaction/Message.js +110 -0
  315. package/dist/src/models/transaction/Message.js.map +1 -0
  316. package/dist/src/models/transaction/MultisigAggregateModificationTransaction.d.ts +55 -0
  317. package/dist/src/models/transaction/MultisigAggregateModificationTransaction.js +112 -0
  318. package/dist/src/models/transaction/MultisigAggregateModificationTransaction.js.map +1 -0
  319. package/dist/src/models/transaction/MultisigSignatureTransaction.d.ts +35 -0
  320. package/dist/src/models/transaction/MultisigSignatureTransaction.js +92 -0
  321. package/dist/src/models/transaction/MultisigSignatureTransaction.js.map +1 -0
  322. package/dist/src/models/transaction/MultisigTransaction.d.ts +49 -0
  323. package/dist/src/models/transaction/MultisigTransaction.js +102 -0
  324. package/dist/src/models/transaction/MultisigTransaction.js.map +1 -0
  325. package/dist/src/models/transaction/NemAnnounceResult.d.ts +77 -0
  326. package/dist/src/models/transaction/NemAnnounceResult.js +66 -0
  327. package/dist/src/models/transaction/NemAnnounceResult.js.map +1 -0
  328. package/dist/src/models/transaction/PlainMessage.d.ts +19 -0
  329. package/dist/src/models/transaction/PlainMessage.js +77 -0
  330. package/dist/src/models/transaction/PlainMessage.js.map +1 -0
  331. package/dist/src/models/transaction/ProvisionNamespaceTransaction.d.ts +57 -0
  332. package/dist/src/models/transaction/ProvisionNamespaceTransaction.js +117 -0
  333. package/dist/src/models/transaction/ProvisionNamespaceTransaction.js.map +1 -0
  334. package/dist/src/models/transaction/SignedTransaction.d.ts +13 -0
  335. package/dist/src/models/transaction/SignedTransaction.js +26 -0
  336. package/dist/src/models/transaction/SignedTransaction.js.map +1 -0
  337. package/dist/src/models/transaction/TimeWindow.d.ts +24 -0
  338. package/dist/src/models/transaction/TimeWindow.js +84 -0
  339. package/dist/src/models/transaction/TimeWindow.js.map +1 -0
  340. package/dist/src/models/transaction/Transaction.d.ts +56 -0
  341. package/dist/src/models/transaction/Transaction.js +98 -0
  342. package/dist/src/models/transaction/Transaction.js.map +1 -0
  343. package/dist/src/models/transaction/TransactionInfo.d.ts +39 -0
  344. package/dist/src/models/transaction/TransactionInfo.js +60 -0
  345. package/dist/src/models/transaction/TransactionInfo.js.map +1 -0
  346. package/dist/src/models/transaction/TransactionTypes.d.ts +80 -0
  347. package/dist/src/models/transaction/TransactionTypes.js +159 -0
  348. package/dist/src/models/transaction/TransactionTypes.js.map +1 -0
  349. package/dist/src/models/transaction/TransferTransaction.d.ts +78 -0
  350. package/dist/src/models/transaction/TransferTransaction.js +176 -0
  351. package/dist/src/models/transaction/TransferTransaction.js.map +1 -0
  352. package/dist/src/models/wallet/BrainPassword.d.ts +11 -0
  353. package/dist/src/models/wallet/BrainPassword.js +42 -0
  354. package/dist/src/models/wallet/BrainPassword.js.map +1 -0
  355. package/dist/src/models/wallet/BrainWallet.d.ts +34 -0
  356. package/dist/src/models/wallet/BrainWallet.js +101 -0
  357. package/dist/src/models/wallet/BrainWallet.js.map +1 -0
  358. package/dist/src/models/wallet/EncryptedPrivateKey.d.ts +13 -0
  359. package/dist/src/models/wallet/EncryptedPrivateKey.js +56 -0
  360. package/dist/src/models/wallet/EncryptedPrivateKey.js.map +1 -0
  361. package/dist/src/models/wallet/Password.d.ts +14 -0
  362. package/dist/src/models/wallet/Password.js +41 -0
  363. package/dist/src/models/wallet/Password.js.map +1 -0
  364. package/dist/src/models/wallet/SimpleWallet.d.ts +47 -0
  365. package/dist/src/models/wallet/SimpleWallet.js +143 -0
  366. package/dist/src/models/wallet/SimpleWallet.js.map +1 -0
  367. package/dist/src/models/wallet/Wallet.d.ts +51 -0
  368. package/dist/src/models/wallet/Wallet.js +81 -0
  369. package/dist/src/models/wallet/Wallet.js.map +1 -0
  370. package/dist/src/models.d.ts +46 -0
  371. package/dist/src/models.js +74 -0
  372. package/dist/src/models.js.map +1 -0
  373. package/dist/src/services/AccountOwnedAssetService.d.ts +30 -0
  374. package/dist/src/services/AccountOwnedAssetService.js +63 -0
  375. package/dist/src/services/AccountOwnedAssetService.js.map +1 -0
  376. package/dist/src/services/AssetService.d.ts +23 -0
  377. package/dist/src/services/AssetService.js +87 -0
  378. package/dist/src/services/AssetService.js.map +1 -0
  379. package/dist/src/services/QRService.d.ts +66 -0
  380. package/dist/src/services/QRService.js +155 -0
  381. package/dist/src/services/QRService.js.map +1 -0
  382. package/dist/src/services.d.ts +3 -0
  383. package/dist/src/services.js +32 -0
  384. package/dist/src/services.js.map +1 -0
  385. package/dist/src/vendor/sockjs-0.3.4.d.ts +25 -0
  386. package/dist/src/vendor/sockjs-0.3.4.js +2516 -0
  387. package/dist/src/vendor/sockjs-0.3.4.min.js +27 -0
  388. package/package.json +87 -0
@@ -0,0 +1,415 @@
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 requestPromise = require("request-promise-native");
27
+ const rxjs_1 = require("rxjs");
28
+ const models_1 = require("../models");
29
+ const AccountHarvestInfo_1 = require("../models/account/AccountHarvestInfo");
30
+ const AccountHistoricalInfo_1 = require("../models/account/AccountHistoricalInfo");
31
+ const AccountImportanceInfo_1 = require("../models/account/AccountImportanceInfo");
32
+ const AccountInfo_1 = require("../models/account/AccountInfo");
33
+ const NodeHarvestInfo_1 = require("../models/account/NodeHarvestInfo");
34
+ const Asset_1 = require("../models/asset/Asset");
35
+ const AssetDefinition_1 = require("../models/asset/AssetDefinition");
36
+ const Namespace_1 = require("../models/namespace/Namespace");
37
+ const AllTransactionsPageable_1 = require("./AllTransactionsPageable");
38
+ const HarvestInfoPageable_1 = require("./HarvestInfoPageable");
39
+ const HttpEndpoint_1 = require("./HttpEndpoint");
40
+ const IncomingTransactionsPageable_1 = require("./IncomingTransactionsPageable");
41
+ const OutgoingTransactionsPageable_1 = require("./OutgoingTransactionsPageable");
42
+ const CreateTransactionFromDTO_1 = require("./transaction/CreateTransactionFromDTO");
43
+ const CreateUnconfirmedTransactionFromDTO_1 = require("./transaction/CreateUnconfirmedTransactionFromDTO");
44
+ const operators_1 = require("rxjs/operators");
45
+ /**
46
+ *
47
+ */
48
+ class AccountHttp extends HttpEndpoint_1.HttpEndpoint {
49
+ constructor(nodes) {
50
+ super("account", nodes);
51
+ }
52
+ /**
53
+ * Gets an AccountInfoWithMetaData for an account.
54
+ * @param address - Address
55
+ * @return Observable<AccountInfoWithMetaData>
56
+ */
57
+ getFromAddress(address) {
58
+ return rxjs_1.of("get?address=" + address.plain())
59
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((accountMetaDataPairDTO) => {
60
+ return AccountInfo_1.AccountInfoWithMetaData.createFromAccountMetaDataPairDTO(accountMetaDataPairDTO);
61
+ }));
62
+ }
63
+ /**
64
+ * Gets an AccountInfoWithMetaData for an account with publicKey
65
+ * @param publicKey - NEM
66
+ * @return Observable<AccountInfoWithMetaData>
67
+ */
68
+ getFromPublicKey(publicKey) {
69
+ return rxjs_1.of("get/from-public-key?publicKey=" + publicKey)
70
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((accountMetaDataPairDTO) => {
71
+ return AccountInfo_1.AccountInfoWithMetaData.createFromAccountMetaDataPairDTO(accountMetaDataPairDTO);
72
+ }));
73
+ }
74
+ /**
75
+ * Given a delegate (formerly known as remote) account's address, gets the AccountMetaDataPair for the account for which the given account is the delegate account.
76
+ * If the given account address is not a delegate account for any account, the request returns the AccountMetaDataPair for the given address.
77
+ * @param address - Address
78
+ * @return Observable<AccountInfoWithMetaData>
79
+ */
80
+ getOriginalAccountDataFromDelegatedAccountAddress(address) {
81
+ return rxjs_1.of("get/forwarded?address=" + address.plain())
82
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((accountMetaDataPairDTO) => {
83
+ return AccountInfo_1.AccountInfoWithMetaData.createFromAccountMetaDataPairDTO(accountMetaDataPairDTO);
84
+ }));
85
+ }
86
+ /**
87
+ * retrieve the original account data by providing the public key of the delegate account.
88
+ * @param publicKey - string
89
+ * @return Observable<AccountInfoWithMetaData>
90
+ */
91
+ getOriginalAccountDataFromDelegatedAccountPublicKey(publicKey) {
92
+ return rxjs_1.of("get/forwarded/from-public-key?publicKey=" + publicKey)
93
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((accountMetaDataPairDTO) => {
94
+ return AccountInfo_1.AccountInfoWithMetaData.createFromAccountMetaDataPairDTO(accountMetaDataPairDTO);
95
+ }));
96
+ }
97
+ /**
98
+ * Gets the AccountMetaData from an account.
99
+ * @param address - NEM Address
100
+ * @return Observable<AccountStatus>
101
+ */
102
+ status(address) {
103
+ return rxjs_1.of("status?address=" + address.plain())
104
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((result) => models_1.AccountStatus.createFromAccountMetaDataDTO(result)));
105
+ }
106
+ /**
107
+ * A transaction is said to be incoming with respect to an account if the account is the recipient of the transaction.
108
+ * In the same way outgoing transaction are the transactions where the account is the sender of the transaction.
109
+ * Unconfirmed transactions are those transactions that have not yet been included in a block.
110
+ * Unconfirmed transactions are not guaranteed to be included in any block
111
+ * @param address - The address of the account.
112
+ * @param params
113
+ */
114
+ incomingTransactions(address, params) {
115
+ if (params == undefined)
116
+ params = {};
117
+ params.pageSize = params.pageSize && (params.pageSize >= 5 && params.pageSize <= 100) ? params.pageSize : 10;
118
+ const url = "transfers/incoming?address=" + address.plain() +
119
+ (params.hash === undefined ? "" : "&hash=" + params.hash) +
120
+ (params.id === undefined ? "" : "&id=" + params.id) +
121
+ (params.pageSize === undefined ? "" : "&pageSize=" + params.pageSize);
122
+ return rxjs_1.of(url)
123
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((transactions) => transactions.data.map((dto) => CreateTransactionFromDTO_1.CreateTransactionFromDTO(dto))));
124
+ }
125
+ /**
126
+ * Paginaged version of incomingTransactions request
127
+ * @param address
128
+ * @param params
129
+ */
130
+ incomingTransactionsPaginated(address, params) {
131
+ if (params === undefined)
132
+ params = {};
133
+ return new IncomingTransactionsPageable_1.IncomingTransactionsPageable(this, address, params);
134
+ }
135
+ /**
136
+ * Gets an array of transaction meta data pairs where the recipient has the address given as parameter to the request.
137
+ * A maximum of 25 transaction meta data pairs is returned. For details about sorting and discussion of the second parameter see Incoming transactions.
138
+ * @param address - The address of the account.
139
+ * @param params
140
+ */
141
+ outgoingTransactions(address, params) {
142
+ if (params == undefined)
143
+ params = {};
144
+ params.pageSize = params.pageSize && (params.pageSize >= 5 && params.pageSize <= 100) ? params.pageSize : 10;
145
+ const url = "transfers/outgoing?address=" + address.plain() +
146
+ (params.hash === undefined ? "" : "&hash=" + params.hash) +
147
+ (params.id === undefined ? "" : "&id=" + params.id) +
148
+ (params.pageSize === undefined ? "" : "&pageSize=" + params.pageSize);
149
+ return rxjs_1.of(url)
150
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((transactions) => transactions.data.map((dto) => CreateTransactionFromDTO_1.CreateTransactionFromDTO(dto))));
151
+ }
152
+ /**
153
+ * Paginaged version of outgoingTransactions request
154
+ * @param address
155
+ * @param params
156
+ * @param params
157
+ */
158
+ outgoingTransactionsPaginated(address, params) {
159
+ if (params === undefined)
160
+ params = {};
161
+ return new OutgoingTransactionsPageable_1.OutgoingTransactionsPageable(this, address, params);
162
+ }
163
+ /**
164
+ * Gets an array of transaction meta data pairs for which an account is the sender or receiver.
165
+ * A maximum of 25 transaction meta data pairs is returned.
166
+ * For details about sorting and discussion of the second parameter see Incoming transactions.
167
+ * @param address - The address of the account.
168
+ * @param params
169
+ */
170
+ allTransactions(address, params) {
171
+ if (params == undefined)
172
+ params = {};
173
+ params.pageSize = params.pageSize && (params.pageSize >= 5 && params.pageSize <= 100) ? params.pageSize : 10;
174
+ const url = "transfers/all?address=" + address.plain() +
175
+ (params.hash === undefined ? "" : "&hash=" + params.hash) +
176
+ (params.id === undefined ? "" : "&id=" + params.id) +
177
+ (params.pageSize === undefined ? "" : "&pageSize=" + params.pageSize);
178
+ return rxjs_1.of(url)
179
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((transactions) => transactions.data.map((dto) => CreateTransactionFromDTO_1.CreateTransactionFromDTO(dto))));
180
+ }
181
+ /**
182
+ * Paginaged version of allTransactions request
183
+ * @param address
184
+ * @param params
185
+ */
186
+ allTransactionsPaginated(address, params) {
187
+ if (params === undefined)
188
+ params = {};
189
+ return new AllTransactionsPageable_1.AllTransactionsPageable(this, address, params);
190
+ }
191
+ /**
192
+ * Gets the array of transactions for which an account is the sender or receiver and which have not yet been included in a block
193
+ * @param address - NEM Address
194
+ * @return Observable<Transaction[]>
195
+ */
196
+ unconfirmedTransactions(address) {
197
+ return rxjs_1.of("unconfirmedTransactions?address=" + address.plain())
198
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((unconfirmedTransactions) => {
199
+ return unconfirmedTransactions.data.map((unconfirmedTransaction) => {
200
+ return CreateUnconfirmedTransactionFromDTO_1.CreateUnconfirmedTransactionFromDTO(unconfirmedTransaction);
201
+ });
202
+ }));
203
+ }
204
+ /**
205
+ * Gets an array of harvest info objects for an account.
206
+ * @param address - Address
207
+ * @param id - string (optional)
208
+ * @return Observable<AccountHarvestInfo[]>
209
+ */
210
+ getHarvestInfoDataForAnAccount(address, id) {
211
+ const url = "harvests?address=" + address.plain() +
212
+ (id === undefined ? "" : "&id=" + id);
213
+ return rxjs_1.of(url)
214
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((harvestInfoData) => {
215
+ return harvestInfoData.data.map((harvestInfoDTO) => {
216
+ return AccountHarvestInfo_1.AccountHarvestInfo.createFromHarvestInfoDTO(harvestInfoDTO);
217
+ });
218
+ }));
219
+ }
220
+ /**
221
+ * Paginaged version of allTransactions request
222
+ * @param address
223
+ * @param id
224
+ * @returns {HarvestInfoPageable}
225
+ */
226
+ getHarvestInfoDataForAnAccountPaginated(address, id) {
227
+ return new HarvestInfoPageable_1.HarvestInfoPageable(this, address, id);
228
+ }
229
+ /**
230
+ * Gets an array of account importance view model objects.
231
+ * @return Observable<AccountImportanceInfo[]>
232
+ */
233
+ getAccountImportances() {
234
+ return rxjs_1.of("importances")
235
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((importanceData) => {
236
+ return importanceData.data.map((accountImportanceViewModel) => {
237
+ return AccountImportanceInfo_1.AccountImportanceInfo.createFromAccountImportanceViewModelDTO(accountImportanceViewModel);
238
+ });
239
+ }));
240
+ }
241
+ /**
242
+ * Gets an array of namespace objects for a given account address.
243
+ * The parent parameter is optional. If supplied, only sub-namespaces of the parent namespace are returned.
244
+ * @param address - Address
245
+ * @param parent - The optional parent namespace id.
246
+ * @param id - The optional namespace database id up to which namespaces are returned.
247
+ * @param pageSize - The (optional) number of namespaces to be returned.
248
+ * @return Observable<Namespace[]>
249
+ */
250
+ getNamespaceOwnedByAddress(address, parent, pageSize, id) {
251
+ const url = "namespace/page?address=" + address.plain() +
252
+ (parent === undefined ? "" : "&parent=" + parent) +
253
+ (id === undefined ? "" : "&id=" + id) +
254
+ (pageSize === undefined ? "" : "&pageSize=" + pageSize);
255
+ return rxjs_1.of(url)
256
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((namespacesData) => {
257
+ return namespacesData.data.map((namespaceDTO) => {
258
+ return Namespace_1.Namespace.createFromNamespaceDTO(namespaceDTO);
259
+ });
260
+ }));
261
+ }
262
+ /**
263
+ * Gets an array of asset definition objects for a given account address. The parent parameter is optional.
264
+ * If supplied, only asset definitions for the given parent namespace are returned.
265
+ * The id parameter is optional and allows retrieving asset definitions in batches of 25 asset definitions.
266
+ * @param address - The address of the account.
267
+ * @param parent - The optional parent namespace id.
268
+ * @param id - The optional asset definition database id up to which asset definitions are returned.
269
+ * @return Observable<AssetDefinition[]>
270
+ */
271
+ getAssetsCreatedByAddress(address, parent, id) {
272
+ const url = "mosaic/definition/page?address=" + address.plain() +
273
+ (parent === undefined ? "" : "&parent=" + parent) +
274
+ (id === undefined ? "" : "&id=" + id);
275
+ return rxjs_1.of(url)
276
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((mosaicsData) => {
277
+ return mosaicsData.data.map((mosaicDefinitionDTO) => {
278
+ return AssetDefinition_1.AssetDefinition.createFromMosaicDefinitionDTO(mosaicDefinitionDTO);
279
+ });
280
+ }));
281
+ }
282
+ /**
283
+ * Gets an array of asset objects for a given account address.
284
+ * @param address - Address
285
+ * @return Observable<Asset[]>
286
+ */
287
+ getAssetsOwnedByAddress(address) {
288
+ return rxjs_1.of("mosaic/owned?address=" + address.plain())
289
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((mosaicsData) => {
290
+ return mosaicsData.data.map((mosaicDTO) => {
291
+ return Asset_1.Asset.createFromMosaicDTO(mosaicDTO);
292
+ });
293
+ }));
294
+ }
295
+ /**
296
+ * Unlocks an account (starts harvesting).
297
+ * @param host - string
298
+ * @param privateKey - string
299
+ * @return Observable<boolean>
300
+ */
301
+ unlockHarvesting(host, privateKey) {
302
+ return rxjs_1.from(requestPromise.post({
303
+ uri: "http://" + host + ":7890/account/unlock",
304
+ body: {
305
+ value: privateKey,
306
+ },
307
+ json: true,
308
+ }).promise())
309
+ .pipe(operators_1.map((x) => true));
310
+ }
311
+ /**
312
+ * Locks an account (stops harvesting).
313
+ * @param host - string
314
+ * @param privateKey - string
315
+ * @return Observable<boolean>
316
+ */
317
+ lockHarvesting(host, privateKey) {
318
+ return rxjs_1.from(requestPromise.post({
319
+ uri: "http://" + host + ":7890/account/lock",
320
+ body: {
321
+ value: privateKey,
322
+ },
323
+ json: true,
324
+ }).promise())
325
+ .pipe(operators_1.map((x) => true));
326
+ }
327
+ /**
328
+ * Each node can allow users to harvest with their delegated key on that node.
329
+ * The NIS configuration has entries for configuring the maximum number of allowed harvesters and optionally allow harvesting only for certain account addresses.
330
+ * The unlock info gives information about the maximum number of allowed harvesters and how many harvesters are already using the node.
331
+ * @return Observable<NodeHarvestInfo>
332
+ */
333
+ unlockInfo() {
334
+ return rxjs_1.of("unlocked/info")
335
+ .pipe(operators_1.flatMap((url) => requestPromise.post({
336
+ uri: this.nextNode() + url,
337
+ json: true,
338
+ })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((nodeHarvestInfo) => {
339
+ return new NodeHarvestInfo_1.NodeHarvestInfo(nodeHarvestInfo["max-unlocked"], nodeHarvestInfo["num-unlocked"]);
340
+ }));
341
+ }
342
+ /**
343
+ * Gets historical information for an account.
344
+ * @param address - The address of the account.
345
+ * @param startHeight - The block height from which on the data should be supplied.
346
+ * @param endHeight - The block height up to which the data should be supplied. The end height must be greater than or equal to the start height.
347
+ * @param increment - The value by which the height is incremented between each data point. The value must be greater than 0. NIS can supply up to 1000 data points with one request. Requesting more than 1000 data points results in an error.
348
+ * @return Observable<AccountHistoricalInfo[]>
349
+ */
350
+ getHistoricalAccountData(address, startHeight, endHeight, increment) {
351
+ return rxjs_1.of("historical/get?address=" + address.plain() + "&startHeight=" + startHeight + "&endHeight=" + endHeight + "&increment=" + increment)
352
+ .pipe(operators_1.flatMap((url) => requestPromise.get(this.nextHistoricalNode() + url, { json: true })), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((historicalAccountData) => {
353
+ return historicalAccountData.data.map((accountHistoricalDataViewModelDTO) => {
354
+ return AccountHistoricalInfo_1.AccountHistoricalInfo.createFromAccountHistoricalDataViewModelDTO(accountHistoricalDataViewModelDTO);
355
+ });
356
+ }));
357
+ }
358
+ /**
359
+ * Gets historical information for an array of accounts.
360
+ * @param addresses - The addresses of the accounts as an array of addresses.
361
+ * @param startHeight - The block height from which on the data should be supplied.
362
+ * @param endHeight - The block height up to which the data should be supplied. The end height must be greater than or equal to the start height.
363
+ * @param increment - The value by which the height is incremented between each data point. The value must be greater than 0. NIS can supply up to 1000 data points with one request. Requesting more than 1000 data points results in an error.
364
+ * @return Observable<AccountHistoricalInfo[][]>
365
+ */
366
+ getBatchHistoricalAccountData(addresses, startHeight, endHeight, increment) {
367
+ return rxjs_1.of("historical/get/batch")
368
+ .pipe(operators_1.flatMap((url) => {
369
+ return requestPromise.post({
370
+ uri: this.nextHistoricalNode() + url,
371
+ body: {
372
+ accounts: addresses.map((a) => {
373
+ return { account: a.plain() };
374
+ }),
375
+ startHeight: (startHeight),
376
+ endHeight: (endHeight),
377
+ incrementBy: increment,
378
+ },
379
+ json: true,
380
+ });
381
+ }), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((batchHistoricalAccountData) => {
382
+ return batchHistoricalAccountData.data.map((historicalAccountData) => {
383
+ return historicalAccountData.data.map((accountHistoricalDataViewModelDTO) => {
384
+ return AccountHistoricalInfo_1.AccountHistoricalInfo.createFromAccountHistoricalDataViewModelDTO(accountHistoricalDataViewModelDTO);
385
+ });
386
+ });
387
+ }));
388
+ }
389
+ /**
390
+ * Gets batch information for an array of accounts.
391
+ * @param addresses - The addresses of the accounts as an array of addresses.
392
+ * @return Observable<AccountInfoWithMetadata[]>
393
+ */
394
+ getBatchAccountData(addresses) {
395
+ return rxjs_1.of("get/batch")
396
+ .pipe(operators_1.flatMap((url) => {
397
+ const options = {
398
+ uri: this.nextNode() + url,
399
+ body: {
400
+ data: addresses.map((a) => {
401
+ return { account: a.plain() };
402
+ }),
403
+ },
404
+ json: true,
405
+ };
406
+ return requestPromise.post(options);
407
+ }), operators_1.retryWhen(this.replyWhenRequestError), operators_1.map((batchAccountData) => {
408
+ return batchAccountData.data.map((accountMetaDataPairDTO) => {
409
+ return AccountInfo_1.AccountInfoWithMetaData.createFromAccountMetaDataPairDTO(accountMetaDataPairDTO);
410
+ });
411
+ }));
412
+ }
413
+ }
414
+ exports.AccountHttp = AccountHttp;
415
+ //# sourceMappingURL=AccountHttp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountHttp.js","sourceRoot":"","sources":["../../../src/infrastructure/AccountHttp.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AAEH,yDAAyD;AACzD,+BAA0C;AAC1C,sCAAwC;AACxC,6EAAwE;AACxE,mFAA8E;AAC9E,mFAA8E;AAC9E,+DAAsE;AAEtE,uEAAkE;AAClE,iDAA4C;AAC5C,qEAAgE;AAChE,6DAAwD;AAOxD,uEAAkE;AAClE,+DAA0D;AAC1D,iDAA0D;AAC1D,iFAA4E;AAI5E,iFAA4E;AAE5E,qFAAgF;AAChF,2GAAsG;AAGtG,8CAAuD;AAiBvD;;GAEG;AACH,iBAAyB,SAAQ,2BAAY;IAE3C,YAAY,KAAsB;QAChC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,OAAgB;QACpC,OAAO,SAAE,CAAC,cAAc,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;aACxC,IAAI,CACH,mBAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC,EACzE,qBAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,EACrC,eAAG,CAAC,CAAC,sBAA8C,EAAE,EAAE;YACrD,OAAO,qCAAuB,CAAC,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;QAC1F,CAAC,CAAC,CACH,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,SAAiB;QACvC,OAAO,SA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,EACF,qBAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,EACrC,eAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE;YACvB,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,sBAA8C,EAAE,EAAE;gBAClF,OAAO,qCAAuB,CAAC,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;YAC1F,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CACH,CAAA;IACL,CAAC;CAEF;AAjdD,kCAidC"}
@@ -0,0 +1,20 @@
1
+ import { Observable } from "rxjs";
2
+ import { AccountInfoWithMetaData } from "../models/account/AccountInfo";
3
+ import { Address } from "../models/account/Address";
4
+ import { Listener, WebSocketConfig } from "./Listener";
5
+ /**
6
+ * Account listener
7
+ */
8
+ export declare class AccountListener extends Listener {
9
+ /**
10
+ * Constructor
11
+ * @param nodes
12
+ */
13
+ constructor(nodes?: WebSocketConfig[]);
14
+ /**
15
+ * Start listening updates
16
+ * @param address
17
+ * @returns {Observable<AccountInfoWithMetaData>}
18
+ */
19
+ given(address: Address): Observable<AccountInfoWithMetaData>;
20
+ }
@@ -0,0 +1,71 @@
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 rxjs_1 = require("rxjs");
27
+ const operators_1 = require("rxjs/operators");
28
+ const AccountInfo_1 = require("../models/account/AccountInfo");
29
+ const Listener_1 = require("./Listener");
30
+ /**
31
+ * Account listener
32
+ */
33
+ class AccountListener extends Listener_1.Listener {
34
+ /**
35
+ * Constructor
36
+ * @param nodes
37
+ */
38
+ constructor(nodes) {
39
+ super(nodes);
40
+ }
41
+ /**
42
+ * Start listening updates
43
+ * @param address
44
+ * @returns {Observable<AccountInfoWithMetaData>}
45
+ */
46
+ given(address) {
47
+ return rxjs_1.Observable.create((observer) => {
48
+ const client = this.createClient();
49
+ client.connect({}, () => {
50
+ //initial subscription to address.
51
+ client.send("/w/api/account/subscribe", {}, "{'account':'" + address.plain() + "'}");
52
+ client.subscribe("/account/" + address.plain(), (data) => {
53
+ try {
54
+ const account = AccountInfo_1.AccountInfoWithMetaData.createFromAccountMetaDataPairDTO(JSON.parse(data.body));
55
+ observer.next(account);
56
+ }
57
+ catch (e) {
58
+ observer.error(e);
59
+ }
60
+ });
61
+ }, (err) => {
62
+ observer.error(err);
63
+ });
64
+ return () => {
65
+ client.unsubscribe();
66
+ };
67
+ }).pipe(operators_1.retry(10));
68
+ }
69
+ }
70
+ exports.AccountListener = AccountListener;
71
+ //# sourceMappingURL=AccountListener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountListener.js","sourceRoot":"","sources":["../../../src/infrastructure/AccountListener.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;AA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 "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Pageable_1 = require("./Pageable");
4
+ /**
5
+ * @internal
6
+ */
7
+ class AllTransactionsPageable extends Pageable_1.Pageable {
8
+ /**
9
+ * @param source
10
+ * @param address
11
+ * @param params
12
+ */
13
+ constructor(source, address, params) {
14
+ super();
15
+ this.resource = source;
16
+ this.address = address;
17
+ this.params = params;
18
+ }
19
+ nextPage() {
20
+ this.resource.allTransactions(this.address, this.params)
21
+ .subscribe((next) => {
22
+ if (next.length != 0) {
23
+ this.params.id = next[next.length - 1].getTransactionInfo().id;
24
+ this.next(next);
25
+ }
26
+ else {
27
+ this.complete();
28
+ }
29
+ }, (err) => {
30
+ this.error(err);
31
+ });
32
+ }
33
+ }
34
+ exports.AllTransactionsPageable = AllTransactionsPageable;
35
+ //# sourceMappingURL=AllTransactionsPageable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllTransactionsPageable.js","sourceRoot":"","sources":["../../../src/infrastructure/AllTransactionsPageable.ts"],"names":[],"mappings":";;AAwBA,yCAAoC;AAEpC;;GAEG;AACH,6BAAqC,SAAQ,mBAAuB;IAKlE;;;;OAIG;IACH,YAAY,MAAmB,EAAE,OAAgB,EAAE,MAAmB;QACpE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;aACrD,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;YAClB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;gBACpB,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,EAAE,CAAC;gBAC/D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACjB;iBAAM;gBACL,IAAI,CAAC,QAAQ,EAAE,CAAC;aACjB;QACH,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE;YACT,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AA9BD,0DA8BC"}
@@ -0,0 +1,36 @@
1
+ import { Observable } from "rxjs";
2
+ import { AssetDefinition } from "../models/asset/AssetDefinition";
3
+ import { AssetId } from "../models/asset/AssetId";
4
+ import { AssetTransferable } from "../models/asset/AssetTransferable";
5
+ import { HttpEndpoint, ServerConfig } from "./HttpEndpoint";
6
+ export declare class AssetHttp extends HttpEndpoint {
7
+ constructor(nodes?: ServerConfig[]);
8
+ /**
9
+ * Gets the asset definitions for a given namespace. The request supports paging.
10
+ * @param namespace
11
+ * @param id - The topmost asset definition database id up to which root asset definitions are returned. The parameter is optional. If not supplied the most recent asset definitiona are returned.
12
+ * @param pageSize - The number of asset definition objects to be returned for each request. The parameter is optional. The default value is 25, the minimum value is 5 and hte maximum value is 100.
13
+ * @returns Observable<AssetDefinition[]>
14
+ */
15
+ getAllAssetsGivenNamespace(namespace: string, id?: number, pageSize?: number): Observable<AssetDefinition[]>;
16
+ /**
17
+ * Return the Mosaic Definition given a namespace and asset. Throw exception if no asset is found
18
+ * @param {string} assetId
19
+ * @returns {Observable<AssetDefinition>}
20
+ */
21
+ getAssetDefinition(assetId: AssetId): Observable<AssetDefinition>;
22
+ /**
23
+ * Return a AssetTransferable
24
+ * @param {string} assetId
25
+ * @param {number} quantity
26
+ * @returns {Observable<AssetTransferable>}
27
+ */
28
+ getAssetTransferableWithAbsoluteAmount(assetId: AssetId, quantity: number): Observable<AssetTransferable>;
29
+ /**
30
+ * Return a AssetTransferable
31
+ * @param {string} assetId
32
+ * @param {number} quantity
33
+ * @returns {Observable<AssetTransferable>}
34
+ */
35
+ getAssetTransferableWithRelativeAmount(assetId: AssetId, quantity: number): Observable<AssetTransferable>;
36
+ }