wao 0.12.5 → 0.13.1

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.
Files changed (620) hide show
  1. package/cjs/aoconnect-base.js +648 -306
  2. package/cjs/armem-base.js +38 -28
  3. package/cjs/bao.js +13 -2
  4. package/cjs/bar.js +270 -194
  5. package/cjs/hb.js +479 -0
  6. package/cjs/index.js +7 -0
  7. package/cjs/lua/aos_mainnet.wasm +0 -0
  8. package/cjs/run.js +4 -2
  9. package/cjs/server.js +454 -233
  10. package/cjs/tao.js +4 -0
  11. package/cjs/waosm-node.js +1 -22
  12. package/esm/aoconnect-base.js +207 -57
  13. package/esm/armem-base.js +9 -4
  14. package/esm/bao.js +5 -0
  15. package/esm/bar.js +30 -0
  16. package/esm/hb.js +139 -0
  17. package/esm/index.js +2 -1
  18. package/esm/lua/aos_mainnet.wasm +0 -0
  19. package/esm/run.js +2 -1
  20. package/esm/server.js +185 -22
  21. package/esm/tao.js +2 -0
  22. package/esm/waosm-node.js +0 -21
  23. package/package.json +4 -1
  24. package/esm/.cache/data.mdb +0 -0
  25. package/esm/.cache/lock.mdb +0 -0
  26. package/esm/.db/100040/data/1/123.json +0 -1
  27. package/esm/.db/103252/data/0/13315.json +0 -1
  28. package/esm/.db/103252/data/1/120.json +0 -1
  29. package/esm/.db/103252/data/1/123.json +0 -1
  30. package/esm/.db/105470/data/0/0.json +0 -1
  31. package/esm/.db/105470/data/1/120.json +0 -1
  32. package/esm/.db/105470/data/1/123.json +0 -1
  33. package/esm/.db/105470/data/3/104.json +0 -1
  34. package/esm/.db/105667/data/ppl/bob.json +0 -1
  35. package/esm/.db/105869/data/1/120.json +0 -1
  36. package/esm/.db/105869/data/1/123.json +0 -1
  37. package/esm/.db/106417/data/0/0.json +0 -1
  38. package/esm/.db/106417/data/1/120.json +0 -1
  39. package/esm/.db/106417/data/1/123.json +0 -1
  40. package/esm/.db/113125/data/1/example.json +0 -1
  41. package/esm/.db/116234/data/1/123.json +0 -1
  42. package/esm/.db/119911/data/1/120.json +0 -1
  43. package/esm/.db/119911/data/1/123.json +0 -1
  44. package/esm/.db/122989/data/0/0.json +0 -1
  45. package/esm/.db/122989/data/1/120.json +0 -1
  46. package/esm/.db/122989/data/1/123.json +0 -1
  47. package/esm/.db/125755/data/1/123.json +0 -1
  48. package/esm/.db/126241/data/1/123.json +0 -1
  49. package/esm/.db/129099/data/1/123.json +0 -1
  50. package/esm/.db/129781/data/0/14083.json +0 -1
  51. package/esm/.db/129781/data/1/120.json +0 -1
  52. package/esm/.db/129781/data/1/123.json +0 -1
  53. package/esm/.db/129781/data/15/0.json +0 -1
  54. package/esm/.db/132860/data/0/13315.json +0 -1
  55. package/esm/.db/132860/data/1/120.json +0 -1
  56. package/esm/.db/132860/data/1/123.json +0 -1
  57. package/esm/.db/134721/data/1/123.json +0 -1
  58. package/esm/.db/137408/data/ppl/bob.json +0 -1
  59. package/esm/.db/137556/data/1/123.json +0 -1
  60. package/esm/.db/143417/data/1/123.json +0 -1
  61. package/esm/.db/143799/data/1/123.json +0 -1
  62. package/esm/.db/146558/data/0/0.json +0 -1
  63. package/esm/.db/146558/data/1/120.json +0 -1
  64. package/esm/.db/146558/data/1/123.json +0 -1
  65. package/esm/.db/153145/data/1/123.json +0 -1
  66. package/esm/.db/153912/data/1/example.json +0 -1
  67. package/esm/.db/154536/data/0/13315.json +0 -1
  68. package/esm/.db/154536/data/1/120.json +0 -1
  69. package/esm/.db/154536/data/1/123.json +0 -1
  70. package/esm/.db/158777/data/1/123.json +0 -1
  71. package/esm/.db/170678/data/0/13315.json +0 -1
  72. package/esm/.db/170678/data/1/120.json +0 -1
  73. package/esm/.db/170678/data/1/123.json +0 -1
  74. package/esm/.db/17434/data/1/123.json +0 -1
  75. package/esm/.db/176113/data/1/123.json +0 -1
  76. package/esm/.db/179669/data/0/13315.json +0 -1
  77. package/esm/.db/179669/data/1/120.json +0 -1
  78. package/esm/.db/179669/data/1/123.json +0 -1
  79. package/esm/.db/183368/data/1/120.json +0 -1
  80. package/esm/.db/183368/data/1/123.json +0 -1
  81. package/esm/.db/188491/data/0/14083.json +0 -1
  82. package/esm/.db/188491/data/1/120.json +0 -1
  83. package/esm/.db/188491/data/1/123.json +0 -1
  84. package/esm/.db/188491/data/15/0.json +0 -1
  85. package/esm/.db/189189/data/ppl/bob.json +0 -1
  86. package/esm/.db/195025/data/1/120.json +0 -1
  87. package/esm/.db/195025/data/1/123.json +0 -1
  88. package/esm/.db/19852/data/1/123.json +0 -1
  89. package/esm/.db/204968/data/1/123.json +0 -1
  90. package/esm/.db/207069/data/0/0.json +0 -1
  91. package/esm/.db/207069/data/1/120.json +0 -1
  92. package/esm/.db/207069/data/1/123.json +0 -1
  93. package/esm/.db/211038/data/1/120.json +0 -1
  94. package/esm/.db/211038/data/1/123.json +0 -1
  95. package/esm/.db/211580/data/1/120.json +0 -1
  96. package/esm/.db/211580/data/1/123.json +0 -1
  97. package/esm/.db/214305/data/0/0.json +0 -1
  98. package/esm/.db/214305/data/1/120.json +0 -1
  99. package/esm/.db/214305/data/1/123.json +0 -1
  100. package/esm/.db/214712/data/0/13315.json +0 -1
  101. package/esm/.db/214712/data/1/120.json +0 -1
  102. package/esm/.db/214712/data/1/123.json +0 -1
  103. package/esm/.db/218886/data/0/14083.json +0 -1
  104. package/esm/.db/218886/data/1/120.json +0 -1
  105. package/esm/.db/218886/data/1/123.json +0 -1
  106. package/esm/.db/218886/data/15/0.json +0 -1
  107. package/esm/.db/221009/data/1/123.json +0 -1
  108. package/esm/.db/221818/data/1/120.json +0 -1
  109. package/esm/.db/221818/data/1/123.json +0 -1
  110. package/esm/.db/226668/data/0/13315.json +0 -1
  111. package/esm/.db/226668/data/1/120.json +0 -1
  112. package/esm/.db/226668/data/1/123.json +0 -1
  113. package/esm/.db/226981/data/0/123.json +0 -1
  114. package/esm/.db/235331/data/0/13315.json +0 -1
  115. package/esm/.db/235331/data/1/120.json +0 -1
  116. package/esm/.db/235331/data/1/123.json +0 -1
  117. package/esm/.db/247863/data/1/123.json +0 -1
  118. package/esm/.db/247918/data/0/0.json +0 -1
  119. package/esm/.db/247918/data/1/120.json +0 -1
  120. package/esm/.db/247918/data/1/123.json +0 -1
  121. package/esm/.db/247918/data/3/104.json +0 -1
  122. package/esm/.db/250384/data/1/123.json +0 -1
  123. package/esm/.db/253205/data/1/120.json +0 -1
  124. package/esm/.db/253205/data/1/123.json +0 -1
  125. package/esm/.db/26452/data/1/120.json +0 -1
  126. package/esm/.db/26452/data/1/123.json +0 -1
  127. package/esm/.db/265430/data/1/120.json +0 -1
  128. package/esm/.db/265430/data/1/123.json +0 -1
  129. package/esm/.db/269049/data/0/0.json +0 -1
  130. package/esm/.db/269049/data/1/120.json +0 -1
  131. package/esm/.db/269049/data/1/123.json +0 -1
  132. package/esm/.db/273652/data/0/0.json +0 -1
  133. package/esm/.db/273652/data/1/120.json +0 -1
  134. package/esm/.db/273652/data/1/123.json +0 -1
  135. package/esm/.db/281035/data/0/0.json +0 -1
  136. package/esm/.db/281035/data/1/120.json +0 -1
  137. package/esm/.db/281035/data/1/123.json +0 -1
  138. package/esm/.db/281140/data/0/13315.json +0 -1
  139. package/esm/.db/281140/data/1/120.json +0 -1
  140. package/esm/.db/281140/data/1/123.json +0 -1
  141. package/esm/.db/295732/data/ppl/bob.json +0 -1
  142. package/esm/.db/296113/data/1/123.json +0 -1
  143. package/esm/.db/297154/data/0/13315.json +0 -1
  144. package/esm/.db/297154/data/1/120.json +0 -1
  145. package/esm/.db/297154/data/1/123.json +0 -1
  146. package/esm/.db/304770/data/1/120.json +0 -1
  147. package/esm/.db/304770/data/1/123.json +0 -1
  148. package/esm/.db/3081/data/0/0.json +0 -1
  149. package/esm/.db/3081/data/1/120.json +0 -1
  150. package/esm/.db/3081/data/1/123.json +0 -1
  151. package/esm/.db/310793/data/1/120.json +0 -1
  152. package/esm/.db/310793/data/1/123.json +0 -1
  153. package/esm/.db/317310/data/1/123.json +0 -1
  154. package/esm/.db/317819/data/1/example.json +0 -1
  155. package/esm/.db/319464/data/0/0.json +0 -1
  156. package/esm/.db/319464/data/1/120.json +0 -1
  157. package/esm/.db/319464/data/1/123.json +0 -1
  158. package/esm/.db/32053/data/1/120.json +0 -1
  159. package/esm/.db/32053/data/1/123.json +0 -1
  160. package/esm/.db/322473/data/ppl/bob.json +0 -1
  161. package/esm/.db/323300/data/1/123.json +0 -1
  162. package/esm/.db/323840/data/0/0.json +0 -1
  163. package/esm/.db/323840/data/1/120.json +0 -1
  164. package/esm/.db/323840/data/1/123.json +0 -1
  165. package/esm/.db/326623/data/0/0.json +0 -1
  166. package/esm/.db/326623/data/1/120.json +0 -1
  167. package/esm/.db/326623/data/1/123.json +0 -1
  168. package/esm/.db/328731/data/0/0.json +0 -1
  169. package/esm/.db/328731/data/1/120.json +0 -1
  170. package/esm/.db/328731/data/1/123.json +0 -1
  171. package/esm/.db/334158/data/1/example.json +0 -1
  172. package/esm/.db/334577/data/1/example.json +0 -1
  173. package/esm/.db/3364/data/0/0.json +0 -1
  174. package/esm/.db/3364/data/1/120.json +0 -1
  175. package/esm/.db/3364/data/1/123.json +0 -1
  176. package/esm/.db/339914/data/1/123.json +0 -1
  177. package/esm/.db/34265/data/0/0.json +0 -1
  178. package/esm/.db/34265/data/1/120.json +0 -1
  179. package/esm/.db/34265/data/1/123.json +0 -1
  180. package/esm/.db/346364/data/1/123.json +0 -1
  181. package/esm/.db/349791/data/0/14083.json +0 -1
  182. package/esm/.db/349791/data/1/120.json +0 -1
  183. package/esm/.db/349791/data/1/123.json +0 -1
  184. package/esm/.db/349791/data/15/0.json +0 -1
  185. package/esm/.db/350767/data/ppl/bob.json +0 -1
  186. package/esm/.db/352310/data/0/13315.json +0 -1
  187. package/esm/.db/352310/data/1/120.json +0 -1
  188. package/esm/.db/352310/data/1/123.json +0 -1
  189. package/esm/.db/35438/data/1/123.json +0 -1
  190. package/esm/.db/354670/data/0/13315.json +0 -1
  191. package/esm/.db/354670/data/1/120.json +0 -1
  192. package/esm/.db/354670/data/1/123.json +0 -1
  193. package/esm/.db/354805/data/0/0.json +0 -1
  194. package/esm/.db/354805/data/1/120.json +0 -1
  195. package/esm/.db/354805/data/1/123.json +0 -1
  196. package/esm/.db/358368/data/1/example.json +0 -1
  197. package/esm/.db/358831/data/1/123.json +0 -1
  198. package/esm/.db/360133/data/0/0.json +0 -1
  199. package/esm/.db/360133/data/1/120.json +0 -1
  200. package/esm/.db/360133/data/1/123.json +0 -1
  201. package/esm/.db/364220/data/0/0.json +0 -1
  202. package/esm/.db/364220/data/1/120.json +0 -1
  203. package/esm/.db/364220/data/1/123.json +0 -1
  204. package/esm/.db/367925/data/0/13315.json +0 -1
  205. package/esm/.db/367925/data/1/120.json +0 -1
  206. package/esm/.db/367925/data/1/123.json +0 -1
  207. package/esm/.db/369638/data/1/123.json +0 -1
  208. package/esm/.db/3700/data/1/120.json +0 -1
  209. package/esm/.db/3700/data/1/123.json +0 -1
  210. package/esm/.db/374988/data/0/0.json +0 -1
  211. package/esm/.db/374988/data/1/120.json +0 -1
  212. package/esm/.db/374988/data/1/123.json +0 -1
  213. package/esm/.db/380018/data/1/123.json +0 -1
  214. package/esm/.db/380021/data/1/123.json +0 -1
  215. package/esm/.db/386761/data/1/123.json +0 -1
  216. package/esm/.db/387217/data/0/13315.json +0 -1
  217. package/esm/.db/387217/data/1/120.json +0 -1
  218. package/esm/.db/387217/data/1/123.json +0 -1
  219. package/esm/.db/392652/data/1/123.json +0 -1
  220. package/esm/.db/392692/data/0/13315.json +0 -1
  221. package/esm/.db/392692/data/1/120.json +0 -1
  222. package/esm/.db/392692/data/1/123.json +0 -1
  223. package/esm/.db/396339/data/1/123.json +0 -1
  224. package/esm/.db/404348/data/1/123.json +0 -1
  225. package/esm/.db/405894/data/0/14083.json +0 -1
  226. package/esm/.db/405894/data/1/120.json +0 -1
  227. package/esm/.db/405894/data/1/123.json +0 -1
  228. package/esm/.db/405894/data/15/0.json +0 -1
  229. package/esm/.db/406165/data/1/example.json +0 -1
  230. package/esm/.db/407316/data/ppl/bob.json +0 -1
  231. package/esm/.db/407987/data/1/123.json +0 -1
  232. package/esm/.db/410181/data/1/123.json +0 -1
  233. package/esm/.db/411981/data/1/120.json +0 -1
  234. package/esm/.db/411981/data/1/123.json +0 -1
  235. package/esm/.db/416278/data/1/120.json +0 -1
  236. package/esm/.db/416278/data/1/123.json +0 -1
  237. package/esm/.db/418449/data/1/123.json +0 -1
  238. package/esm/.db/425620/data/1/120.json +0 -1
  239. package/esm/.db/425620/data/1/123.json +0 -1
  240. package/esm/.db/429727/data/1/123.json +0 -1
  241. package/esm/.db/435030/data/1/123.json +0 -1
  242. package/esm/.db/444362/data/1/120.json +0 -1
  243. package/esm/.db/444362/data/1/123.json +0 -1
  244. package/esm/.db/446985/data/1/123.json +0 -1
  245. package/esm/.db/451355/data/1/120.json +0 -1
  246. package/esm/.db/451355/data/1/123.json +0 -1
  247. package/esm/.db/45640/data/1/123.json +0 -1
  248. package/esm/.db/46155/data/0/0.json +0 -1
  249. package/esm/.db/46155/data/0/13315.json +0 -1
  250. package/esm/.db/46155/data/1/120.json +0 -1
  251. package/esm/.db/46155/data/1/123.json +0 -1
  252. package/esm/.db/462799/data/0/0.json +0 -1
  253. package/esm/.db/462799/data/1/120.json +0 -1
  254. package/esm/.db/462799/data/1/123.json +0 -1
  255. package/esm/.db/46528/data/1/123.json +0 -1
  256. package/esm/.db/466476/data/1/123.json +0 -1
  257. package/esm/.db/467578/data/0/0.json +0 -1
  258. package/esm/.db/467578/data/1/120.json +0 -1
  259. package/esm/.db/467578/data/1/123.json +0 -1
  260. package/esm/.db/472245/data/1/123.json +0 -1
  261. package/esm/.db/474238/data/1/example.json +0 -1
  262. package/esm/.db/477291/data/1/123.json +0 -1
  263. package/esm/.db/477375/data/1/120.json +0 -1
  264. package/esm/.db/477375/data/1/123.json +0 -1
  265. package/esm/.db/479960/data/1/123.json +0 -1
  266. package/esm/.db/482327/data/1/123.json +0 -1
  267. package/esm/.db/487117/data/1/example.json +0 -1
  268. package/esm/.db/495075/data/1/123.json +0 -1
  269. package/esm/.db/498660/data/1/123.json +0 -1
  270. package/esm/.db/510578/data/1/123.json +0 -1
  271. package/esm/.db/514521/data/1/123.json +0 -1
  272. package/esm/.db/519111/data/0/0.json +0 -1
  273. package/esm/.db/519111/data/1/120.json +0 -1
  274. package/esm/.db/519111/data/1/123.json +0 -1
  275. package/esm/.db/524536/data/1/120.json +0 -1
  276. package/esm/.db/524536/data/1/123.json +0 -1
  277. package/esm/.db/52751/data/1/example.json +0 -1
  278. package/esm/.db/530599/data/ppl/bob.json +0 -1
  279. package/esm/.db/536579/data/1/123.json +0 -1
  280. package/esm/.db/539183/data/1/123.json +0 -1
  281. package/esm/.db/539222/data/1/example.json +0 -1
  282. package/esm/.db/542071/data/0/0.json +0 -1
  283. package/esm/.db/542071/data/0/13315.json +0 -1
  284. package/esm/.db/542071/data/1/120.json +0 -1
  285. package/esm/.db/542071/data/1/123.json +0 -1
  286. package/esm/.db/542939/data/ppl/bob.json +0 -1
  287. package/esm/.db/547077/data/1/123.json +0 -1
  288. package/esm/.db/547195/data/0/0.json +0 -1
  289. package/esm/.db/547195/data/1/120.json +0 -1
  290. package/esm/.db/547195/data/1/123.json +0 -1
  291. package/esm/.db/548947/data/ppl/bob.json +0 -1
  292. package/esm/.db/551385/data/0/0.json +0 -1
  293. package/esm/.db/551385/data/1/120.json +0 -1
  294. package/esm/.db/551385/data/1/123.json +0 -1
  295. package/esm/.db/553486/data/0/0.json +0 -1
  296. package/esm/.db/553486/data/1/120.json +0 -1
  297. package/esm/.db/553486/data/1/123.json +0 -1
  298. package/esm/.db/554578/data/1/123.json +0 -1
  299. package/esm/.db/555963/data/1/123.json +0 -1
  300. package/esm/.db/556201/data/1/123.json +0 -1
  301. package/esm/.db/565071/data/0/0.json +0 -1
  302. package/esm/.db/565071/data/1/120.json +0 -1
  303. package/esm/.db/565071/data/1/123.json +0 -1
  304. package/esm/.db/569887/data/0/0.json +0 -1
  305. package/esm/.db/569887/data/1/120.json +0 -1
  306. package/esm/.db/569887/data/1/123.json +0 -1
  307. package/esm/.db/572000/data/1/123.json +0 -1
  308. package/esm/.db/572151/data/1/123.json +0 -1
  309. package/esm/.db/573301/data/1/123.json +0 -1
  310. package/esm/.db/579648/data/0/0.json +0 -1
  311. package/esm/.db/579648/data/1/120.json +0 -1
  312. package/esm/.db/579648/data/1/123.json +0 -1
  313. package/esm/.db/579648/data/3/104.json +0 -1
  314. package/esm/.db/582311/data/1/example.json +0 -1
  315. package/esm/.db/587351/data/0/14083.json +0 -1
  316. package/esm/.db/587351/data/1/120.json +0 -1
  317. package/esm/.db/587351/data/1/123.json +0 -1
  318. package/esm/.db/587351/data/15/0.json +0 -1
  319. package/esm/.db/588867/data/0/0.json +0 -1
  320. package/esm/.db/588867/data/1/120.json +0 -1
  321. package/esm/.db/588867/data/1/123.json +0 -1
  322. package/esm/.db/589730/data/1/123.json +0 -1
  323. package/esm/.db/591738/data/0/13315.json +0 -1
  324. package/esm/.db/591738/data/1/120.json +0 -1
  325. package/esm/.db/591738/data/1/123.json +0 -1
  326. package/esm/.db/593460/data/1/123.json +0 -1
  327. package/esm/.db/593771/data/0/0.json +0 -1
  328. package/esm/.db/593771/data/1/120.json +0 -1
  329. package/esm/.db/593771/data/1/123.json +0 -1
  330. package/esm/.db/595304/data/1/123.json +0 -1
  331. package/esm/.db/595772/data/0/13315.json +0 -1
  332. package/esm/.db/595772/data/1/120.json +0 -1
  333. package/esm/.db/595772/data/1/123.json +0 -1
  334. package/esm/.db/596051/data/0/0.json +0 -1
  335. package/esm/.db/596051/data/1/120.json +0 -1
  336. package/esm/.db/596051/data/1/123.json +0 -1
  337. package/esm/.db/601728/data/1/120.json +0 -1
  338. package/esm/.db/601728/data/1/123.json +0 -1
  339. package/esm/.db/619154/data/1/123.json +0 -1
  340. package/esm/.db/620185/data/1/123.json +0 -1
  341. package/esm/.db/623179/data/1/123.json +0 -1
  342. package/esm/.db/623265/data/1/123.json +0 -1
  343. package/esm/.db/630002/data/1/120.json +0 -1
  344. package/esm/.db/630002/data/1/123.json +0 -1
  345. package/esm/.db/631961/data/1/123.json +0 -1
  346. package/esm/.db/635637/data/0/14083.json +0 -1
  347. package/esm/.db/635637/data/1/120.json +0 -1
  348. package/esm/.db/635637/data/1/123.json +0 -1
  349. package/esm/.db/635637/data/15/0.json +0 -1
  350. package/esm/.db/636670/data/1/example.json +0 -1
  351. package/esm/.db/640527/data/0/0.json +0 -1
  352. package/esm/.db/640527/data/1/120.json +0 -1
  353. package/esm/.db/640527/data/1/123.json +0 -1
  354. package/esm/.db/644020/data/0/13315.json +0 -1
  355. package/esm/.db/644020/data/1/120.json +0 -1
  356. package/esm/.db/644020/data/1/123.json +0 -1
  357. package/esm/.db/64462/data/0/14083.json +0 -1
  358. package/esm/.db/64462/data/1/120.json +0 -1
  359. package/esm/.db/64462/data/1/123.json +0 -1
  360. package/esm/.db/64462/data/15/0.json +0 -1
  361. package/esm/.db/645180/data/0/0.json +0 -1
  362. package/esm/.db/645180/data/1/120.json +0 -1
  363. package/esm/.db/645180/data/1/123.json +0 -1
  364. package/esm/.db/646266/data/1/123.json +0 -1
  365. package/esm/.db/650764/data/1/120.json +0 -1
  366. package/esm/.db/650764/data/1/123.json +0 -1
  367. package/esm/.db/654655/data/0/0.json +0 -1
  368. package/esm/.db/654655/data/1/120.json +0 -1
  369. package/esm/.db/654655/data/1/123.json +0 -1
  370. package/esm/.db/658164/data/1/120.json +0 -1
  371. package/esm/.db/658164/data/1/123.json +0 -1
  372. package/esm/.db/65937/data/1/123.json +0 -1
  373. package/esm/.db/659738/data/0/13315.json +0 -1
  374. package/esm/.db/659738/data/1/120.json +0 -1
  375. package/esm/.db/659738/data/1/123.json +0 -1
  376. package/esm/.db/660517/data/0/13315.json +0 -1
  377. package/esm/.db/660517/data/1/120.json +0 -1
  378. package/esm/.db/660517/data/1/123.json +0 -1
  379. package/esm/.db/664564/data/1/123.json +0 -1
  380. package/esm/.db/665125/data/0/0.json +0 -1
  381. package/esm/.db/665125/data/1/120.json +0 -1
  382. package/esm/.db/665125/data/1/123.json +0 -1
  383. package/esm/.db/672001/data/1/example.json +0 -1
  384. package/esm/.db/674620/data/1/123.json +0 -1
  385. package/esm/.db/67532/data/1/123.json +0 -1
  386. package/esm/.db/675670/data/1/120.json +0 -1
  387. package/esm/.db/675670/data/1/123.json +0 -1
  388. package/esm/.db/686538/data/1/123.json +0 -1
  389. package/esm/.db/691017/data/1/123.json +0 -1
  390. package/esm/.db/691716/data/1/120.json +0 -1
  391. package/esm/.db/691716/data/1/123.json +0 -1
  392. package/esm/.db/693105/data/0/14083.json +0 -1
  393. package/esm/.db/693105/data/1/120.json +0 -1
  394. package/esm/.db/693105/data/1/123.json +0 -1
  395. package/esm/.db/693105/data/15/0.json +0 -1
  396. package/esm/.db/694486/data/1/123.json +0 -1
  397. package/esm/.db/702106/data/1/120.json +0 -1
  398. package/esm/.db/702106/data/1/123.json +0 -1
  399. package/esm/.db/7047/data/1/123.json +0 -1
  400. package/esm/.db/705954/data/0/13315.json +0 -1
  401. package/esm/.db/705954/data/1/120.json +0 -1
  402. package/esm/.db/705954/data/1/123.json +0 -1
  403. package/esm/.db/710967/data/1/120.json +0 -1
  404. package/esm/.db/710967/data/1/123.json +0 -1
  405. package/esm/.db/715883/data/0/13315.json +0 -1
  406. package/esm/.db/715883/data/1/120.json +0 -1
  407. package/esm/.db/715883/data/1/123.json +0 -1
  408. package/esm/.db/717358/data/1/120.json +0 -1
  409. package/esm/.db/717358/data/1/123.json +0 -1
  410. package/esm/.db/71999/data/0/13315.json +0 -1
  411. package/esm/.db/71999/data/1/120.json +0 -1
  412. package/esm/.db/71999/data/1/123.json +0 -1
  413. package/esm/.db/720364/data/1/123.json +0 -1
  414. package/esm/.db/727249/data/1/120.json +0 -1
  415. package/esm/.db/727249/data/1/123.json +0 -1
  416. package/esm/.db/728258/data/1/example.json +0 -1
  417. package/esm/.db/728986/data/0/13315.json +0 -1
  418. package/esm/.db/728986/data/1/120.json +0 -1
  419. package/esm/.db/728986/data/1/123.json +0 -1
  420. package/esm/.db/732768/data/1/120.json +0 -1
  421. package/esm/.db/732768/data/1/123.json +0 -1
  422. package/esm/.db/733885/data/1/123.json +0 -1
  423. package/esm/.db/736192/data/0/0.json +0 -1
  424. package/esm/.db/736192/data/1/120.json +0 -1
  425. package/esm/.db/736192/data/1/123.json +0 -1
  426. package/esm/.db/73856/data/0/0.json +0 -1
  427. package/esm/.db/73856/data/1/120.json +0 -1
  428. package/esm/.db/73856/data/1/123.json +0 -1
  429. package/esm/.db/738577/data/1/123.json +0 -1
  430. package/esm/.db/744844/data/1/123.json +0 -1
  431. package/esm/.db/745738/data/1/123.json +0 -1
  432. package/esm/.db/747240/data/1/123.json +0 -1
  433. package/esm/.db/749115/data/0/0.json +0 -1
  434. package/esm/.db/749115/data/1/120.json +0 -1
  435. package/esm/.db/749115/data/1/123.json +0 -1
  436. package/esm/.db/749514/data/0/0.json +0 -1
  437. package/esm/.db/749514/data/1/120.json +0 -1
  438. package/esm/.db/749514/data/1/123.json +0 -1
  439. package/esm/.db/754982/data/1/123.json +0 -1
  440. package/esm/.db/765281/data/0/13315.json +0 -1
  441. package/esm/.db/765281/data/1/120.json +0 -1
  442. package/esm/.db/765281/data/1/123.json +0 -1
  443. package/esm/.db/765521/data/0/14083.json +0 -1
  444. package/esm/.db/765521/data/1/120.json +0 -1
  445. package/esm/.db/765521/data/1/123.json +0 -1
  446. package/esm/.db/765521/data/15/0.json +0 -1
  447. package/esm/.db/766288/data/ppl/bob.json +0 -1
  448. package/esm/.db/766864/data/1/123.json +0 -1
  449. package/esm/.db/770788/data/0/14083.json +0 -1
  450. package/esm/.db/770788/data/1/120.json +0 -1
  451. package/esm/.db/770788/data/1/123.json +0 -1
  452. package/esm/.db/770788/data/15/0.json +0 -1
  453. package/esm/.db/774499/data/1/example.json +0 -1
  454. package/esm/.db/774617/data/ppl/bob.json +0 -1
  455. package/esm/.db/775617/data/1/123.json +0 -1
  456. package/esm/.db/779782/data/1/123.json +0 -1
  457. package/esm/.db/779921/data/1/123.json +0 -1
  458. package/esm/.db/782910/data/1/123.json +0 -1
  459. package/esm/.db/783279/data/0/13315.json +0 -1
  460. package/esm/.db/783279/data/1/120.json +0 -1
  461. package/esm/.db/783279/data/1/123.json +0 -1
  462. package/esm/.db/785515/data/1/123.json +0 -1
  463. package/esm/.db/791284/data/0/0.json +0 -1
  464. package/esm/.db/791284/data/1/120.json +0 -1
  465. package/esm/.db/791284/data/1/123.json +0 -1
  466. package/esm/.db/791361/data/0/14083.json +0 -1
  467. package/esm/.db/791361/data/1/120.json +0 -1
  468. package/esm/.db/791361/data/1/123.json +0 -1
  469. package/esm/.db/791361/data/15/0.json +0 -1
  470. package/esm/.db/791754/data/1/120.json +0 -1
  471. package/esm/.db/791754/data/1/123.json +0 -1
  472. package/esm/.db/792232/data/0/13315.json +0 -1
  473. package/esm/.db/792232/data/1/120.json +0 -1
  474. package/esm/.db/792232/data/1/123.json +0 -1
  475. package/esm/.db/792777/data/0/13315.json +0 -1
  476. package/esm/.db/792777/data/1/120.json +0 -1
  477. package/esm/.db/792777/data/1/123.json +0 -1
  478. package/esm/.db/793249/data/0/123.json +0 -1
  479. package/esm/.db/795512/data/0/0.json +0 -1
  480. package/esm/.db/795512/data/1/120.json +0 -1
  481. package/esm/.db/795512/data/1/123.json +0 -1
  482. package/esm/.db/795512/data/3/104.json +0 -1
  483. package/esm/.db/795957/data/0/0.json +0 -1
  484. package/esm/.db/795957/data/1/120.json +0 -1
  485. package/esm/.db/795957/data/1/123.json +0 -1
  486. package/esm/.db/796663/data/1/123.json +0 -1
  487. package/esm/.db/797304/data/0/0.json +0 -1
  488. package/esm/.db/797304/data/1/120.json +0 -1
  489. package/esm/.db/797304/data/1/123.json +0 -1
  490. package/esm/.db/797304/data/3/104.json +0 -1
  491. package/esm/.db/800834/data/1/123.json +0 -1
  492. package/esm/.db/806421/data/1/120.json +0 -1
  493. package/esm/.db/806421/data/1/123.json +0 -1
  494. package/esm/.db/81623/data/0/14083.json +0 -1
  495. package/esm/.db/81623/data/1/120.json +0 -1
  496. package/esm/.db/81623/data/1/123.json +0 -1
  497. package/esm/.db/81623/data/15/0.json +0 -1
  498. package/esm/.db/81941/data/1/120.json +0 -1
  499. package/esm/.db/81941/data/1/123.json +0 -1
  500. package/esm/.db/820340/data/0/0.json +0 -1
  501. package/esm/.db/820340/data/1/120.json +0 -1
  502. package/esm/.db/820340/data/1/123.json +0 -1
  503. package/esm/.db/821932/data/1/120.json +0 -1
  504. package/esm/.db/821932/data/1/123.json +0 -1
  505. package/esm/.db/823440/data/1/123.json +0 -1
  506. package/esm/.db/823889/data/1/120.json +0 -1
  507. package/esm/.db/823889/data/1/123.json +0 -1
  508. package/esm/.db/823896/data/1/123.json +0 -1
  509. package/esm/.db/836077/data/0/14083.json +0 -1
  510. package/esm/.db/836077/data/1/120.json +0 -1
  511. package/esm/.db/836077/data/1/123.json +0 -1
  512. package/esm/.db/836077/data/15/0.json +0 -1
  513. package/esm/.db/837341/data/1/123.json +0 -1
  514. package/esm/.db/837591/data/0/0.json +0 -1
  515. package/esm/.db/837591/data/1/120.json +0 -1
  516. package/esm/.db/837591/data/1/123.json +0 -1
  517. package/esm/.db/844882/data/1/123.json +0 -1
  518. package/esm/.db/847654/data/1/example.json +0 -1
  519. package/esm/.db/856010/data/0/13315.json +0 -1
  520. package/esm/.db/856010/data/1/120.json +0 -1
  521. package/esm/.db/856010/data/1/123.json +0 -1
  522. package/esm/.db/856047/data/1/120.json +0 -1
  523. package/esm/.db/856047/data/1/123.json +0 -1
  524. package/esm/.db/856820/data/1/123.json +0 -1
  525. package/esm/.db/857266/data/1/123.json +0 -1
  526. package/esm/.db/86017/data/0/13315.json +0 -1
  527. package/esm/.db/86017/data/1/120.json +0 -1
  528. package/esm/.db/86017/data/1/123.json +0 -1
  529. package/esm/.db/862600/data/1/120.json +0 -1
  530. package/esm/.db/862600/data/1/123.json +0 -1
  531. package/esm/.db/871866/data/0/13315.json +0 -1
  532. package/esm/.db/871866/data/1/120.json +0 -1
  533. package/esm/.db/871866/data/1/123.json +0 -1
  534. package/esm/.db/875359/data/0/0.json +0 -1
  535. package/esm/.db/875359/data/1/120.json +0 -1
  536. package/esm/.db/875359/data/1/123.json +0 -1
  537. package/esm/.db/875359/data/3/104.json +0 -1
  538. package/esm/.db/876330/data/1/example.json +0 -1
  539. package/esm/.db/880182/data/1/123.json +0 -1
  540. package/esm/.db/882138/data/0/0.json +0 -1
  541. package/esm/.db/882138/data/1/120.json +0 -1
  542. package/esm/.db/882138/data/1/123.json +0 -1
  543. package/esm/.db/882722/data/1/example.json +0 -1
  544. package/esm/.db/885449/data/ppl/bob.json +0 -1
  545. package/esm/.db/893417/data/1/example.json +0 -1
  546. package/esm/.db/897575/data/1/example.json +0 -1
  547. package/esm/.db/897832/data/0/13315.json +0 -1
  548. package/esm/.db/897832/data/1/120.json +0 -1
  549. package/esm/.db/897832/data/1/123.json +0 -1
  550. package/esm/.db/898043/data/0/0.json +0 -1
  551. package/esm/.db/898043/data/1/120.json +0 -1
  552. package/esm/.db/898043/data/1/123.json +0 -1
  553. package/esm/.db/898201/data/ppl/bob.json +0 -1
  554. package/esm/.db/900442/data/1/123.json +0 -1
  555. package/esm/.db/900800/data/0/0.json +0 -1
  556. package/esm/.db/900800/data/1/120.json +0 -1
  557. package/esm/.db/900800/data/1/123.json +0 -1
  558. package/esm/.db/910535/data/1/120.json +0 -1
  559. package/esm/.db/910535/data/1/123.json +0 -1
  560. package/esm/.db/911132/data/1/120.json +0 -1
  561. package/esm/.db/911132/data/1/123.json +0 -1
  562. package/esm/.db/913152/data/1/120.json +0 -1
  563. package/esm/.db/913152/data/1/123.json +0 -1
  564. package/esm/.db/91378/data/1/123.json +0 -1
  565. package/esm/.db/918654/data/1/example.json +0 -1
  566. package/esm/.db/929039/data/ppl/bob.json +0 -1
  567. package/esm/.db/932648/data/1/123.json +0 -1
  568. package/esm/.db/936016/data/1/example.json +0 -1
  569. package/esm/.db/936843/data/1/123.json +0 -1
  570. package/esm/.db/940099/data/1/example.json +0 -1
  571. package/esm/.db/941807/data/1/120.json +0 -1
  572. package/esm/.db/941807/data/1/123.json +0 -1
  573. package/esm/.db/941934/data/0/14083.json +0 -1
  574. package/esm/.db/941934/data/1/120.json +0 -1
  575. package/esm/.db/941934/data/1/123.json +0 -1
  576. package/esm/.db/941934/data/15/0.json +0 -1
  577. package/esm/.db/943744/data/1/120.json +0 -1
  578. package/esm/.db/943744/data/1/123.json +0 -1
  579. package/esm/.db/955716/data/1/123.json +0 -1
  580. package/esm/.db/956030/data/1/123.json +0 -1
  581. package/esm/.db/956395/data/1/120.json +0 -1
  582. package/esm/.db/956395/data/1/123.json +0 -1
  583. package/esm/.db/956498/data/1/123.json +0 -1
  584. package/esm/.db/957435/data/1/123.json +0 -1
  585. package/esm/.db/958642/data/0/0.json +0 -1
  586. package/esm/.db/958642/data/1/120.json +0 -1
  587. package/esm/.db/958642/data/1/123.json +0 -1
  588. package/esm/.db/960302/data/1/example.json +0 -1
  589. package/esm/.db/964149/data/0/0.json +0 -1
  590. package/esm/.db/964149/data/1/120.json +0 -1
  591. package/esm/.db/964149/data/1/123.json +0 -1
  592. package/esm/.db/965213/data/0/13315.json +0 -1
  593. package/esm/.db/965213/data/1/120.json +0 -1
  594. package/esm/.db/965213/data/1/123.json +0 -1
  595. package/esm/.db/966774/data/1/120.json +0 -1
  596. package/esm/.db/966774/data/1/123.json +0 -1
  597. package/esm/.db/972484/data/1/123.json +0 -1
  598. package/esm/.db/973155/data/1/123.json +0 -1
  599. package/esm/.db/973642/data/1/123.json +0 -1
  600. package/esm/.db/975603/data/0/0.json +0 -1
  601. package/esm/.db/975603/data/1/120.json +0 -1
  602. package/esm/.db/975603/data/1/123.json +0 -1
  603. package/esm/.db/978900/data/0/0.json +0 -1
  604. package/esm/.db/978900/data/1/120.json +0 -1
  605. package/esm/.db/978900/data/1/123.json +0 -1
  606. package/esm/.db/979812/data/0/13315.json +0 -1
  607. package/esm/.db/979812/data/1/120.json +0 -1
  608. package/esm/.db/979812/data/1/123.json +0 -1
  609. package/esm/.db/985666/data/1/example.json +0 -1
  610. package/esm/.db/986784/data/0/0.json +0 -1
  611. package/esm/.db/986784/data/1/120.json +0 -1
  612. package/esm/.db/986784/data/1/123.json +0 -1
  613. package/esm/.db/988463/data/1/120.json +0 -1
  614. package/esm/.db/988463/data/1/123.json +0 -1
  615. package/esm/.db/990386/data/1/120.json +0 -1
  616. package/esm/.db/990386/data/1/123.json +0 -1
  617. package/esm/.db/994488/data/0/0.json +0 -1
  618. package/esm/.db/994488/data/1/120.json +0 -1
  619. package/esm/.db/994488/data/1/123.json +0 -1
  620. package/esm/.db/999130/data/ppl/bob.json +0 -1
@@ -8,7 +8,8 @@ exports["default"] = void 0;
8
8
  var WarpArBundles = _interopRequireWildcard(require("warp-arbundles"));
9
9
  var _crypto = _interopRequireDefault(require("crypto"));
10
10
  var _base64url = _interopRequireDefault(require("base64url"));
11
- var _utils = require("./utils.js");
11
+ var _utils = require("../src/utils.js");
12
+ var _utils2 = require("./utils.js");
12
13
  var _weavedrive = _interopRequireDefault(require("./weavedrive.js"));
13
14
  var _ramda = require("ramda");
14
15
  var _WarpArBundles$defaul;
@@ -20,8 +21,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
21
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
21
22
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
23
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
23
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
24
24
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
25
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
25
26
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
26
27
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
27
28
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
@@ -32,6 +33,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
32
33
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
33
34
  var pkg = (_WarpArBundles$defaul = WarpArBundles["default"]) !== null && _WarpArBundles$defaul !== void 0 ? _WarpArBundles$defaul : WarpArBundles;
34
35
  var DataItem = pkg.DataItem;
36
+ var onRecovery = {};
35
37
  var _default = exports["default"] = function _default() {
36
38
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
37
39
  AR = _ref.AR,
@@ -49,7 +51,8 @@ var _default = exports["default"] = function _default() {
49
51
  _ref2$log = _ref2.log,
50
52
  log = _ref2$log === void 0 ? false : _ref2$log,
51
53
  _ref2$extensions = _ref2.extensions,
52
- extensions = _ref2$extensions === void 0 ? {} : _ref2$extensions;
54
+ extensions = _ref2$extensions === void 0 ? {} : _ref2$extensions,
55
+ hb = _ref2.hb;
53
56
  var isMem = ((_mem = mem) === null || _mem === void 0 ? void 0 : _mem.__type__) === "mem";
54
57
  if (!isMem) {
55
58
  var _mem2;
@@ -100,24 +103,49 @@ var _default = exports["default"] = function _default() {
100
103
  var genMsg = /*#__PURE__*/function () {
101
104
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(Id, p, data, Tags, from, Owner) {
102
105
  var dry,
106
+ __tags,
107
+ cap,
108
+ _iterator,
109
+ _step,
110
+ _cap$v$name,
111
+ v,
103
112
  _args = arguments;
104
113
  return _regeneratorRuntime().wrap(function _callee$(_context) {
105
114
  while (1) switch (_context.prev = _context.next) {
106
115
  case 0:
107
116
  dry = _args.length > 6 && _args[6] !== undefined ? _args[6] : false;
108
117
  if (!dry) p.height += 1;
118
+ __tags = Tags !== null && Tags !== void 0 && Tags.length ? Tags : [];
119
+ cap = {
120
+ authority: "Authority",
121
+ action: "Action",
122
+ "on-boot": "On-Boot",
123
+ scheduler: "Scheduler",
124
+ module: "Module"
125
+ };
126
+ _iterator = _createForOfIteratorHelper(__tags);
127
+ try {
128
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
129
+ v = _step.value;
130
+ v.name = (_cap$v$name = cap[v.name]) !== null && _cap$v$name !== void 0 ? _cap$v$name : v.name;
131
+ }
132
+ } catch (err) {
133
+ _iterator.e(err);
134
+ } finally {
135
+ _iterator.f();
136
+ }
109
137
  _context.t0 = Id;
110
138
  _context.t1 = p.id;
111
139
  _context.t2 = Owner;
112
140
  _context.t3 = data !== null && data !== void 0 && data.length ? data : "";
113
- _context.next = 8;
141
+ _context.next = 12;
114
142
  return mem.get("height");
115
- case 8:
143
+ case 12:
116
144
  _context.t4 = _context.sent.toString();
117
145
  _context.t5 = Date.now().toString();
118
146
  _context.t6 = p.module;
119
147
  _context.t7 = from;
120
- _context.t8 = Tags !== null && Tags !== void 0 && Tags.length ? Tags : [];
148
+ _context.t8 = __tags;
121
149
  return _context.abrupt("return", {
122
150
  Id: _context.t0,
123
151
  Target: _context.t1,
@@ -130,7 +158,7 @@ var _default = exports["default"] = function _default() {
130
158
  Cron: false,
131
159
  Tags: _context.t8
132
160
  });
133
- case 14:
161
+ case 18:
134
162
  case "end":
135
163
  return _context.stop();
136
164
  }
@@ -256,21 +284,24 @@ var _default = exports["default"] = function _default() {
256
284
  }();
257
285
  var spawn = /*#__PURE__*/function () {
258
286
  var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
259
- var _opt$tags, _opt$memory;
287
+ var _opt$memory;
260
288
  var opt,
261
289
  _yield$mem$getWasm,
262
290
  mod,
263
291
  wasm,
264
292
  format,
265
- ex,
266
- _iterator,
267
- _step,
268
- v,
269
- _yield$ar$dataitem,
270
293
  id,
271
294
  owner,
272
295
  item,
273
296
  __tags,
297
+ msg_owner,
298
+ _yield$ar$httpmsg,
299
+ _opt$tags,
300
+ ex,
301
+ _iterator2,
302
+ _step2,
303
+ v,
304
+ _yield$ar$dataitem,
274
305
  now,
275
306
  t,
276
307
  ext,
@@ -319,7 +350,27 @@ var _default = exports["default"] = function _default() {
319
350
  mod = _yield$mem$getWasm.mod;
320
351
  wasm = _yield$mem$getWasm.wasm;
321
352
  format = _yield$mem$getWasm.format;
322
- opt.tags = (0, _utils.buildTags)(null, (0, _ramda.mergeLeft)((0, _utils.tags)((_opt$tags = opt.tags) !== null && _opt$tags !== void 0 ? _opt$tags : []), {
353
+ msg_owner = mu.addr;
354
+ if (!ar.isHttpMsg(opt.http_msg)) {
355
+ _context3.next = 26;
356
+ break;
357
+ }
358
+ ;
359
+ _context3.next = 16;
360
+ return ar.httpmsg(opt.http_msg);
361
+ case 16:
362
+ _yield$ar$httpmsg = _context3.sent;
363
+ owner = _yield$ar$httpmsg.owner;
364
+ item = _yield$ar$httpmsg.item;
365
+ __tags = _yield$ar$httpmsg.tags;
366
+ id = opt.http_msg.target;
367
+ opt.tags = (0, _utils2.buildTags)(null, __tags);
368
+ opt.data = opt.http_msg.data;
369
+ msg_owner = owner;
370
+ _context3.next = 43;
371
+ break;
372
+ case 26:
373
+ opt.tags = (0, _utils2.buildTags)(null, (0, _ramda.mergeLeft)((0, _utils2.tags)((_opt$tags = opt.tags) !== null && _opt$tags !== void 0 ? _opt$tags : []), {
323
374
  "Data-Protocol": "ao",
324
375
  Variant: "ao.TN.1",
325
376
  Type: "Process",
@@ -330,16 +381,16 @@ var _default = exports["default"] = function _default() {
330
381
  Authority: mu.addr
331
382
  }));
332
383
  ex = false;
333
- _iterator = _createForOfIteratorHelper(opt.tags);
384
+ _iterator2 = _createForOfIteratorHelper(opt.tags);
334
385
  try {
335
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
336
- v = _step.value;
386
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
387
+ v = _step2.value;
337
388
  if (v.name === "Type") ex = true;
338
389
  }
339
390
  } catch (err) {
340
- _iterator.e(err);
391
+ _iterator2.e(err);
341
392
  } finally {
342
- _iterator.f();
393
+ _iterator2.f();
343
394
  }
344
395
  if (!ex) opt.tags.push({
345
396
  name: "Type",
@@ -349,38 +400,38 @@ var _default = exports["default"] = function _default() {
349
400
  name: "Pushed-For",
350
401
  value: opt["for"]
351
402
  });
352
- _context3.next = 19;
403
+ _context3.next = 34;
353
404
  return ar.dataitem({
354
405
  item: opt.item,
355
406
  data: opt.data,
356
407
  signer: opt.signer,
357
- tags: (0, _utils.tags)(opt.tags)
408
+ tags: (0, _utils2.tags)(opt.tags)
358
409
  });
359
- case 19:
410
+ case 34:
360
411
  _yield$ar$dataitem = _context3.sent;
361
412
  id = _yield$ar$dataitem.id;
362
413
  owner = _yield$ar$dataitem.owner;
363
414
  item = _yield$ar$dataitem.item;
364
415
  __tags = _yield$ar$dataitem.tags;
365
- opt.tags = (0, _utils.buildTags)(null, __tags);
416
+ opt.tags = (0, _utils2.buildTags)(null, __tags);
366
417
  if (opt.item) opt.data = _base64url["default"].decode(item.data);
367
- _context3.next = 28;
418
+ _context3.next = 43;
368
419
  return ar.postItems(item, su.jwk);
369
- case 28:
420
+ case 43:
370
421
  now = Date.now;
371
- t = (0, _utils.tags)(opt.tags);
422
+ t = (0, _utils2.tags)(opt.tags);
372
423
  ext = t.Extension || "WeaveDrive";
373
424
  wdrive = extensions[ext];
374
425
  handle = null;
375
- _context3.prev = 33;
426
+ _context3.prev = 48;
376
427
  _context3.t0 = AoLoader;
377
428
  _context3.t1 = wasm;
378
429
  _context3.t2 = format;
379
430
  _context3.t3 = wdrive;
380
431
  _context3.t4 = item;
381
- _context3.next = 41;
432
+ _context3.next = 56;
382
433
  return mem.getTx(mod);
383
- case 41:
434
+ case 56:
384
435
  _context3.t5 = _context3.sent;
385
436
  _context3.t6 = {
386
437
  format: _context3.t2,
@@ -388,29 +439,30 @@ var _default = exports["default"] = function _default() {
388
439
  spawn: _context3.t4,
389
440
  module: _context3.t5
390
441
  };
391
- _context3.next = 45;
442
+ _context3.next = 60;
392
443
  return (0, _context3.t0)(_context3.t1, _context3.t6);
393
- case 45:
444
+ case 60:
394
445
  handle = _context3.sent;
395
- _context3.next = 50;
446
+ _context3.next = 66;
396
447
  break;
397
- case 48:
398
- _context3.prev = 48;
399
- _context3.t7 = _context3["catch"](33);
400
- case 50:
448
+ case 63:
449
+ _context3.prev = 63;
450
+ _context3.t7 = _context3["catch"](48);
451
+ console.log(mod, _context3.t7);
452
+ case 66:
401
453
  if (handle) {
402
- _context3.next = 52;
454
+ _context3.next = 68;
403
455
  break;
404
456
  }
405
457
  return _context3.abrupt("return", null);
406
- case 52:
458
+ case 68:
407
459
  _module = null;
408
460
  _module = {
409
461
  handle: handle,
410
462
  id: mod
411
463
  };
412
464
  Date.now = now;
413
- _tags = (0, _utils.tags)(opt.tags);
465
+ _tags = (0, _utils2.tags)(opt.tags);
414
466
  res = null;
415
467
  memory = (_opt$memory = opt.memory) !== null && _opt$memory !== void 0 ? _opt$memory : null;
416
468
  p = {
@@ -427,126 +479,126 @@ var _default = exports["default"] = function _default() {
427
479
  results: [id]
428
480
  };
429
481
  if (!memory) {
430
- _context3.next = 62;
482
+ _context3.next = 78;
431
483
  break;
432
484
  }
433
- _context3.next = 103;
485
+ _context3.next = 119;
434
486
  break;
435
- case 62:
487
+ case 78:
436
488
  if (!(_tags["On-Boot"] || true)) {
437
- _context3.next = 102;
489
+ _context3.next = 118;
438
490
  break;
439
491
  }
440
492
  data = "";
441
493
  if (!(_tags["On-Boot"] === "Data")) {
442
- _context3.next = 68;
494
+ _context3.next = 84;
443
495
  break;
444
496
  }
445
497
  data = (_opt$data = opt.data) !== null && _opt$data !== void 0 ? _opt$data : "";
446
- _context3.next = 89;
498
+ _context3.next = 105;
447
499
  break;
448
- case 68:
449
- _context3.next = 70;
500
+ case 84:
501
+ _context3.next = 86;
450
502
  return mem.get("msgs", _tags["On-Boot"]);
451
- case 70:
503
+ case 86:
452
504
  _context3.t10 = _yield$mem$get = _context3.sent;
453
505
  _context3.t9 = _context3.t10 === null;
454
506
  if (_context3.t9) {
455
- _context3.next = 74;
507
+ _context3.next = 90;
456
508
  break;
457
509
  }
458
510
  _context3.t9 = _yield$mem$get === void 0;
459
- case 74:
511
+ case 90:
460
512
  if (!_context3.t9) {
461
- _context3.next = 78;
513
+ _context3.next = 94;
462
514
  break;
463
515
  }
464
516
  _context3.t11 = void 0;
465
- _context3.next = 79;
517
+ _context3.next = 95;
466
518
  break;
467
- case 78:
519
+ case 94:
468
520
  _context3.t11 = _yield$mem$get.data;
469
- case 79:
521
+ case 95:
470
522
  _context3.t12 = _yield$mem$get$data = _context3.t11;
471
523
  _context3.t8 = _context3.t12 !== null;
472
524
  if (!_context3.t8) {
473
- _context3.next = 83;
525
+ _context3.next = 99;
474
526
  break;
475
527
  }
476
528
  _context3.t8 = _yield$mem$get$data !== void 0;
477
- case 83:
529
+ case 99:
478
530
  if (!_context3.t8) {
479
- _context3.next = 87;
531
+ _context3.next = 103;
480
532
  break;
481
533
  }
482
534
  _context3.t13 = _yield$mem$get$data;
483
- _context3.next = 88;
535
+ _context3.next = 104;
484
536
  break;
485
- case 87:
537
+ case 103:
486
538
  _context3.t13 = "";
487
- case 88:
539
+ case 104:
488
540
  data = _context3.t13;
489
- case 89:
490
- _context3.next = 91;
491
- return genMsg(id, p, data, opt.tags, owner, mu.addr, true);
492
- case 91:
541
+ case 105:
542
+ _context3.next = 107;
543
+ return genMsg(id, p, data, opt.tags, owner, msg_owner, true);
544
+ case 107:
493
545
  msg = _context3.sent;
494
- _context3.next = 94;
546
+ _context3.next = 110;
495
547
  return genEnv({
496
548
  pid: p.id,
497
549
  owner: p.owner,
498
550
  module: p.module
499
551
  });
500
- case 94:
552
+ case 110:
501
553
  _env = _context3.sent;
502
- _context3.next = 97;
554
+ _context3.next = 113;
503
555
  return _module.handle(null, msg, _env);
504
- case 97:
556
+ case 113:
505
557
  res = _context3.sent;
506
558
  p.memory = res.Memory;
507
559
  delete res.Memory;
508
- _context3.next = 103;
560
+ _context3.next = 119;
509
561
  break;
510
- case 102:
562
+ case 118:
511
563
  p.height += 1;
512
- case 103:
564
+ case 119:
513
565
  _msg = _objectSpread(_objectSpread({}, (0, _ramda.o)((0, _ramda.dissoc)("signer"), (0, _ramda.dissoc)("memory"))(opt)), {}, {
514
566
  res: res
515
567
  });
516
- _context3.next = 106;
568
+ _context3.next = 122;
517
569
  return mem.set(_msg, "msgs", id);
518
- case 106:
570
+ case 122:
519
571
  if (!_tags["Cron-Interval"]) {
520
- _context3.next = 130;
572
+ _context3.next = 146;
521
573
  break;
522
574
  }
523
575
  _tags$CronInterval$s = _tags["Cron-Interval"].split("-"), _tags$CronInterval$s2 = _slicedToArray(_tags$CronInterval$s, 2), num = _tags$CronInterval$s2[0], unit = _tags$CronInterval$s2[1];
524
576
  _int = 0;
525
577
  _context3.t14 = unit.replace(/s$/, "");
526
- _context3.next = _context3.t14 === "millisecond" ? 112 : _context3.t14 === "second" ? 114 : _context3.t14 === "minute" ? 116 : _context3.t14 === "hour" ? 118 : _context3.t14 === "day" ? 120 : _context3.t14 === "month" ? 122 : _context3.t14 === "year" ? 124 : 126;
578
+ _context3.next = _context3.t14 === "millisecond" ? 128 : _context3.t14 === "second" ? 130 : _context3.t14 === "minute" ? 132 : _context3.t14 === "hour" ? 134 : _context3.t14 === "day" ? 136 : _context3.t14 === "month" ? 138 : _context3.t14 === "year" ? 140 : 142;
527
579
  break;
528
- case 112:
580
+ case 128:
529
581
  _int = num;
530
- return _context3.abrupt("break", 126);
531
- case 114:
582
+ return _context3.abrupt("break", 142);
583
+ case 130:
532
584
  _int = num * 1000;
533
- return _context3.abrupt("break", 126);
534
- case 116:
585
+ return _context3.abrupt("break", 142);
586
+ case 132:
535
587
  _int = num * 1000 * 60;
536
- return _context3.abrupt("break", 126);
537
- case 118:
588
+ return _context3.abrupt("break", 142);
589
+ case 134:
538
590
  _int = num * 1000 * 60 * 60;
539
- return _context3.abrupt("break", 126);
540
- case 120:
591
+ return _context3.abrupt("break", 142);
592
+ case 136:
541
593
  _int = num * 1000 * 60 * 60 * 24;
542
- return _context3.abrupt("break", 126);
543
- case 122:
594
+ return _context3.abrupt("break", 142);
595
+ case 138:
544
596
  _int = num * 1000 * 60 * 60 * 24 * 30;
545
- return _context3.abrupt("break", 126);
546
- case 124:
597
+ return _context3.abrupt("break", 142);
598
+ case 140:
547
599
  _int = num * 1000 * 60 * 60 * 24 * 365;
548
- return _context3.abrupt("break", 126);
549
- case 126:
600
+ return _context3.abrupt("break", 142);
601
+ case 142:
550
602
  cronTags = [];
551
603
  for (_k in _tags) {
552
604
  if (/^Cron-Tag-/.test(_k)) {
@@ -558,16 +610,16 @@ var _default = exports["default"] = function _default() {
558
610
  }
559
611
  p.cronTags = cronTags;
560
612
  p.span = _int;
561
- case 130:
562
- _context3.next = 132;
613
+ case 146:
614
+ _context3.next = 148;
563
615
  return mem.set(p, "env", id);
564
- case 132:
616
+ case 148:
565
617
  return _context3.abrupt("return", id);
566
- case 133:
618
+ case 149:
567
619
  case "end":
568
620
  return _context3.stop();
569
621
  }
570
- }, _callee3, null, [[33, 48]]);
622
+ }, _callee3, null, [[48, 63]]);
571
623
  }));
572
624
  return function spawn() {
573
625
  return _ref8.apply(this, arguments);
@@ -585,7 +637,7 @@ var _default = exports["default"] = function _default() {
585
637
  var _assign = /*#__PURE__*/function () {
586
638
  var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(opt) {
587
639
  var _opt$tags2;
588
- var p, _opt, hash, _yield$ar$dataitem2, id, owner, item, _opt$data2, _ref10, _opt$from, _res$Messages, _res$Spawns, _res$Assignments, data, _tags, from, raw_owner, hashBuffer, msg, _env, _yield$mem$getWasm2, format, mod, wasm, wdrive, res, _msg, _iterator2, _step2, v, _iterator3, _step3, _v, __tags, _iterator4, _step4, _v2, _iterator5, _step5, v2;
640
+ var p, _opt, hash, _yield$ar$dataitem2, id, owner, item, _opt$data2, _ref10, _opt$from, _res$Messages, _res$Spawns, _res$Assignments, data, _tags, from, raw_owner, hashBuffer, msg, _env, _yield$mem$getWasm2, format, mod, wasm, wdrive, res, _msg, _iterator3, _step3, v, _iterator4, _step4, _v, __tags, _iterator5, _step5, _v2, _iterator6, _step6, v2;
589
641
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
590
642
  while (1) switch (_context4.prev = _context4.next) {
591
643
  case 0:
@@ -605,9 +657,9 @@ var _default = exports["default"] = function _default() {
605
657
  _opt = _context4.sent;
606
658
  hash = genHashChain(p.hash, opt.message);
607
659
  p.hash = hash;
608
- _context4.t0 = _utils.buildTags;
660
+ _context4.t0 = _utils2.buildTags;
609
661
  _context4.t1 = _ramda.mergeLeft;
610
- _context4.t2 = (0, _utils.tags)((_opt$tags2 = opt.tags) !== null && _opt$tags2 !== void 0 ? _opt$tags2 : []);
662
+ _context4.t2 = (0, _utils2.tags)((_opt$tags2 = opt.tags) !== null && _opt$tags2 !== void 0 ? _opt$tags2 : []);
611
663
  _context4.t3 = Date.now();
612
664
  _context4.t4 = p.epochs.length;
613
665
  _context4.next = 17;
@@ -637,7 +689,7 @@ var _default = exports["default"] = function _default() {
637
689
  return ar.dataitem({
638
690
  data: opt.data,
639
691
  signer: opt.signer,
640
- tags: (0, _utils.tags)(opt.tags),
692
+ tags: (0, _utils2.tags)(opt.tags),
641
693
  target: opt.process
642
694
  });
643
695
  case 27:
@@ -753,15 +805,15 @@ var _default = exports["default"] = function _default() {
753
805
  _context4.next = 99;
754
806
  return mem.set(_msg, "msgs", opt.message);
755
807
  case 99:
756
- _iterator2 = _createForOfIteratorHelper((_res$Messages = res.Messages) !== null && _res$Messages !== void 0 ? _res$Messages : []);
808
+ _iterator3 = _createForOfIteratorHelper((_res$Messages = res.Messages) !== null && _res$Messages !== void 0 ? _res$Messages : []);
757
809
  _context4.prev = 100;
758
- _iterator2.s();
810
+ _iterator3.s();
759
811
  case 102:
760
- if ((_step2 = _iterator2.n()).done) {
812
+ if ((_step3 = _iterator3.n()).done) {
761
813
  _context4.next = 111;
762
814
  break;
763
815
  }
764
- v = _step2.value;
816
+ v = _step3.value;
765
817
  _context4.next = 106;
766
818
  return mem.get("env", v.Target);
767
819
  case 106:
@@ -787,22 +839,22 @@ var _default = exports["default"] = function _default() {
787
839
  case 113:
788
840
  _context4.prev = 113;
789
841
  _context4.t21 = _context4["catch"](100);
790
- _iterator2.e(_context4.t21);
842
+ _iterator3.e(_context4.t21);
791
843
  case 116:
792
844
  _context4.prev = 116;
793
- _iterator2.f();
845
+ _iterator3.f();
794
846
  return _context4.finish(116);
795
847
  case 119:
796
- _iterator3 = _createForOfIteratorHelper((_res$Spawns = res.Spawns) !== null && _res$Spawns !== void 0 ? _res$Spawns : []);
848
+ _iterator4 = _createForOfIteratorHelper((_res$Spawns = res.Spawns) !== null && _res$Spawns !== void 0 ? _res$Spawns : []);
797
849
  _context4.prev = 120;
798
- _iterator3.s();
850
+ _iterator4.s();
799
851
  case 122:
800
- if ((_step3 = _iterator3.n()).done) {
852
+ if ((_step4 = _iterator4.n()).done) {
801
853
  _context4.next = 129;
802
854
  break;
803
855
  }
804
- _v = _step3.value;
805
- __tags = (0, _utils.tags)(_v.Tags);
856
+ _v = _step4.value;
857
+ __tags = (0, _utils2.tags)(_v.Tags);
806
858
  _context4.next = 127;
807
859
  return spawn({
808
860
  "for": opt.message,
@@ -822,30 +874,30 @@ var _default = exports["default"] = function _default() {
822
874
  case 131:
823
875
  _context4.prev = 131;
824
876
  _context4.t22 = _context4["catch"](120);
825
- _iterator3.e(_context4.t22);
877
+ _iterator4.e(_context4.t22);
826
878
  case 134:
827
879
  _context4.prev = 134;
828
- _iterator3.f();
880
+ _iterator4.f();
829
881
  return _context4.finish(134);
830
882
  case 137:
831
- _iterator4 = _createForOfIteratorHelper((_res$Assignments = res.Assignments) !== null && _res$Assignments !== void 0 ? _res$Assignments : []);
883
+ _iterator5 = _createForOfIteratorHelper((_res$Assignments = res.Assignments) !== null && _res$Assignments !== void 0 ? _res$Assignments : []);
832
884
  _context4.prev = 138;
833
- _iterator4.s();
885
+ _iterator5.s();
834
886
  case 140:
835
- if ((_step4 = _iterator4.n()).done) {
887
+ if ((_step5 = _iterator5.n()).done) {
836
888
  _context4.next = 161;
837
889
  break;
838
890
  }
839
- _v2 = _step4.value;
840
- _iterator5 = _createForOfIteratorHelper(_v2.Processes);
891
+ _v2 = _step5.value;
892
+ _iterator6 = _createForOfIteratorHelper(_v2.Processes);
841
893
  _context4.prev = 143;
842
- _iterator5.s();
894
+ _iterator6.s();
843
895
  case 145:
844
- if ((_step5 = _iterator5.n()).done) {
896
+ if ((_step6 = _iterator6.n()).done) {
845
897
  _context4.next = 151;
846
898
  break;
847
899
  }
848
- v2 = _step5.value;
900
+ v2 = _step6.value;
849
901
  _context4.next = 149;
850
902
  return _assign({
851
903
  message: _v2.Message,
@@ -862,10 +914,10 @@ var _default = exports["default"] = function _default() {
862
914
  case 153:
863
915
  _context4.prev = 153;
864
916
  _context4.t23 = _context4["catch"](143);
865
- _iterator5.e(_context4.t23);
917
+ _iterator6.e(_context4.t23);
866
918
  case 156:
867
919
  _context4.prev = 156;
868
- _iterator5.f();
920
+ _iterator6.f();
869
921
  return _context4.finish(156);
870
922
  case 159:
871
923
  _context4.next = 140;
@@ -876,10 +928,10 @@ var _default = exports["default"] = function _default() {
876
928
  case 163:
877
929
  _context4.prev = 163;
878
930
  _context4.t24 = _context4["catch"](138);
879
- _iterator4.e(_context4.t24);
931
+ _iterator5.e(_context4.t24);
880
932
  case 166:
881
933
  _context4.prev = 166;
882
- _iterator4.f();
934
+ _iterator5.f();
883
935
  return _context4.finish(166);
884
936
  case 169:
885
937
  return _context4.abrupt("return", id);
@@ -901,48 +953,74 @@ var _default = exports["default"] = function _default() {
901
953
  }();
902
954
  var message = /*#__PURE__*/function () {
903
955
  var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(opt) {
904
- var _opt$item$id, _opt$item, _opt$owner;
905
- var p, ex, id, owner, item, _opt$tags3, _iterator6, _step6, v, _yield$mem$getTx$tags3, _yield$mem$getTx3, pr, module, _yield$ar$dataitem3, _msg;
956
+ var id, owner, item, _yield$ar$httpmsg2, _p, new_slot, last_slot, _opt$item$id, _opt$item, _opt$owner, _id, _owner, _item, p, _opt$tags3, _yield$mem$getTx$tags3, _yield$mem$getTx3, pr, module, _yield$ar$dataitem3, _msg, _opt, _ref12, _opt$from2, _opt$http_msg$data, from, data, _tags, msg, _env, _yield$mem$getWasm3, format, mod, wasm, wdrive, res, _msg2;
906
957
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
907
958
  while (1) switch (_context5.prev = _context5.next) {
908
959
  case 0:
909
- _context5.next = 2;
960
+ id = "";
961
+ owner = "";
962
+ item = null;
963
+ if (!ar.isHttpMsg(opt.http_msg)) {
964
+ _context5.next = 24;
965
+ break;
966
+ }
967
+ ;
968
+ _context5.next = 7;
969
+ return ar.httpmsg(opt.http_msg);
970
+ case 7:
971
+ _yield$ar$httpmsg2 = _context5.sent;
972
+ id = _yield$ar$httpmsg2.id;
973
+ owner = _yield$ar$httpmsg2.owner;
974
+ item = _yield$ar$httpmsg2.item;
975
+ _context5.next = 13;
910
976
  return mem.get("env", opt.process);
911
- case 2:
977
+ case 13:
978
+ _p = _context5.sent;
979
+ new_slot = opt.slot * 1;
980
+ last_slot = !_p ? -1 : _p.results.length - 1;
981
+ if (!(last_slot + 1 !== new_slot)) {
982
+ _context5.next = 22;
983
+ break;
984
+ }
985
+ console.log("need process recovery from HB:", opt.process);
986
+ if (!(!hb || opt.recovery)) {
987
+ _context5.next = 20;
988
+ break;
989
+ }
990
+ return _context5.abrupt("return", null);
991
+ case 20:
992
+ _context5.next = 22;
993
+ return _recover(opt.process);
994
+ case 22:
995
+ _context5.next = 27;
996
+ break;
997
+ case 24:
998
+ _id = (_opt$item$id = opt === null || opt === void 0 || (_opt$item = opt.item) === null || _opt$item === void 0 ? void 0 : _opt$item.id) !== null && _opt$item$id !== void 0 ? _opt$item$id : "";
999
+ _owner = (_opt$owner = opt.owner) !== null && _opt$owner !== void 0 ? _opt$owner : "";
1000
+ _item = opt.item;
1001
+ case 27:
1002
+ _context5.next = 29;
1003
+ return mem.get("env", opt.process);
1004
+ case 29:
912
1005
  p = _context5.sent;
913
1006
  if (p) {
914
- _context5.next = 5;
1007
+ _context5.next = 32;
915
1008
  break;
916
1009
  }
917
1010
  return _context5.abrupt("return", null);
918
- case 5:
919
- ex = false;
920
- id = (_opt$item$id = opt === null || opt === void 0 || (_opt$item = opt.item) === null || _opt$item === void 0 ? void 0 : _opt$item.id) !== null && _opt$item$id !== void 0 ? _opt$item$id : "";
921
- owner = (_opt$owner = opt.owner) !== null && _opt$owner !== void 0 ? _opt$owner : "";
922
- item = opt.item;
1011
+ case 32:
923
1012
  if (!(!opt.item && opt.signer)) {
924
- _context5.next = 46;
1013
+ _context5.next = 67;
925
1014
  break;
926
1015
  }
927
- _iterator6 = _createForOfIteratorHelper(opt.tags);
928
- try {
929
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
930
- v = _step6.value;
931
- if (v.name === "Type") ex = true;
932
- }
933
- } catch (err) {
934
- _iterator6.e(err);
935
- } finally {
936
- _iterator6.f();
937
- }
938
- opt.tags = (0, _utils.buildTags)(null, (0, _ramda.mergeLeft)((0, _utils.tags)((_opt$tags3 = opt.tags) !== null && _opt$tags3 !== void 0 ? _opt$tags3 : []), {
1016
+ opt.tags = (0, _utils2.buildTags)(null, (0, _ramda.mergeLeft)((0, _utils2.tags)((_opt$tags3 = opt.tags) !== null && _opt$tags3 !== void 0 ? _opt$tags3 : []), {
939
1017
  "Data-Protocol": "ao",
940
1018
  Variant: "ao.TN.1",
941
1019
  Type: "Message",
942
1020
  SDK: "aoconnect"
943
1021
  }));
944
1022
  if (!opt["for"]) {
945
- _context5.next = 39;
1023
+ _context5.next = 60;
946
1024
  break;
947
1025
  }
948
1026
  opt.tags.push({
@@ -953,71 +1031,155 @@ var _default = exports["default"] = function _default() {
953
1031
  name: "From-Process",
954
1032
  value: opt.from
955
1033
  });
956
- _context5.next = 18;
1034
+ _context5.next = 39;
957
1035
  return mem.getTx(opt.from);
958
- case 18:
1036
+ case 39:
959
1037
  _context5.t2 = _yield$mem$getTx3 = _context5.sent;
960
1038
  _context5.t1 = _context5.t2 === null;
961
1039
  if (_context5.t1) {
962
- _context5.next = 22;
1040
+ _context5.next = 43;
963
1041
  break;
964
1042
  }
965
1043
  _context5.t1 = _yield$mem$getTx3 === void 0;
966
- case 22:
1044
+ case 43:
967
1045
  if (!_context5.t1) {
968
- _context5.next = 26;
1046
+ _context5.next = 47;
969
1047
  break;
970
1048
  }
971
1049
  _context5.t3 = void 0;
972
- _context5.next = 27;
1050
+ _context5.next = 48;
973
1051
  break;
974
- case 26:
1052
+ case 47:
975
1053
  _context5.t3 = _yield$mem$getTx3.tags;
976
- case 27:
1054
+ case 48:
977
1055
  _context5.t4 = _yield$mem$getTx$tags3 = _context5.t3;
978
1056
  _context5.t0 = _context5.t4 !== null;
979
1057
  if (!_context5.t0) {
980
- _context5.next = 31;
1058
+ _context5.next = 52;
981
1059
  break;
982
1060
  }
983
1061
  _context5.t0 = _yield$mem$getTx$tags3 !== void 0;
984
- case 31:
1062
+ case 52:
985
1063
  if (!_context5.t0) {
986
- _context5.next = 35;
1064
+ _context5.next = 56;
987
1065
  break;
988
1066
  }
989
1067
  _context5.t5 = _yield$mem$getTx$tags3;
990
- _context5.next = 36;
1068
+ _context5.next = 57;
991
1069
  break;
992
- case 35:
1070
+ case 56:
993
1071
  _context5.t5 = [];
994
- case 36:
1072
+ case 57:
995
1073
  pr = _context5.t5;
996
- module = (0, _utils.tags)(pr).Module;
1074
+ module = (0, _utils2.tags)(pr).Module;
997
1075
  if (module) opt.tags.push({
998
1076
  name: "From-Module",
999
1077
  value: module
1000
1078
  });
1001
- case 39:
1079
+ case 60:
1002
1080
  ;
1003
- _context5.next = 42;
1081
+ _context5.next = 63;
1004
1082
  return ar.dataitem({
1005
1083
  data: opt.data,
1006
1084
  signer: opt.signer,
1007
- tags: (0, _utils.tags)(opt.tags),
1085
+ tags: (0, _utils2.tags)(opt.tags),
1008
1086
  target: opt.process
1009
1087
  });
1010
- case 42:
1088
+ case 63:
1011
1089
  _yield$ar$dataitem3 = _context5.sent;
1012
1090
  item = _yield$ar$dataitem3.item;
1013
1091
  id = _yield$ar$dataitem3.id;
1014
1092
  owner = _yield$ar$dataitem3.owner;
1015
- case 46:
1093
+ case 67:
1016
1094
  _msg = (0, _ramda.dissoc)("signer", opt);
1017
- _context5.next = 49;
1095
+ _context5.next = 70;
1018
1096
  return mem.set(_msg, "msgs", id);
1019
- case 49:
1020
- _context5.next = 51;
1097
+ case 70:
1098
+ if (!ar.isHttpMsg(opt.http_msg)) {
1099
+ _context5.next = 125;
1100
+ break;
1101
+ }
1102
+ p.epochs.push([id]);
1103
+ _opt = opt;
1104
+ _context5.prev = 73;
1105
+ // todo: not sure if this is correct
1106
+ from = (_ref12 = (_opt$from2 = _opt.from) !== null && _opt$from2 !== void 0 ? _opt$from2 : opt.from) !== null && _ref12 !== void 0 ? _ref12 : owner;
1107
+ data = (_opt$http_msg$data = opt.http_msg.data) !== null && _opt$http_msg$data !== void 0 ? _opt$http_msg$data : "";
1108
+ _tags = _opt.http_msg.tags; // todo: check if owner=mu.addr right?
1109
+ _context5.next = 79;
1110
+ return genMsg(opt.http_msg, p, data, _tags, from, owner);
1111
+ case 79:
1112
+ msg = _context5.sent;
1113
+ _context5.next = 82;
1114
+ return genEnv({
1115
+ pid: p.id,
1116
+ owner: p.owner,
1117
+ module: p.module
1118
+ });
1119
+ case 82:
1120
+ _env = _context5.sent;
1121
+ if (p.handle) {
1122
+ _context5.next = 106;
1123
+ break;
1124
+ }
1125
+ _context5.next = 86;
1126
+ return mem.getWasm(p.modulea);
1127
+ case 86:
1128
+ _yield$mem$getWasm3 = _context5.sent;
1129
+ format = _yield$mem$getWasm3.format;
1130
+ mod = _yield$mem$getWasm3.mod;
1131
+ wasm = _yield$mem$getWasm3.wasm;
1132
+ wdrive = extensions[p.extention];
1133
+ _context5.t6 = AoLoader;
1134
+ _context5.t7 = wasm;
1135
+ _context5.t8 = format;
1136
+ _context5.t9 = wdrive;
1137
+ _context5.next = 97;
1138
+ return mem.getTx(p.id);
1139
+ case 97:
1140
+ _context5.t10 = _context5.sent.item;
1141
+ _context5.next = 100;
1142
+ return mem.getTx(mod);
1143
+ case 100:
1144
+ _context5.t11 = _context5.sent;
1145
+ _context5.t12 = {
1146
+ format: _context5.t8,
1147
+ WeaveDrive: _context5.t9,
1148
+ spawn: _context5.t10,
1149
+ module: _context5.t11
1150
+ };
1151
+ _context5.next = 104;
1152
+ return (0, _context5.t6)(_context5.t7, _context5.t12);
1153
+ case 104:
1154
+ p.handle = _context5.sent;
1155
+ mem.env[opt.process].handle = p.handle;
1156
+ case 106:
1157
+ _context5.next = 108;
1158
+ return p.handle(p.memory, msg, _env);
1159
+ case 108:
1160
+ res = _context5.sent;
1161
+ p.memory = res.Memory;
1162
+ delete res.Memory;
1163
+ p.results.push(id);
1164
+ _context5.next = 114;
1165
+ return mem.set(p, "env", opt.process);
1166
+ case 114:
1167
+ _msg2 = _objectSpread(_objectSpread({}, (0, _ramda.dissoc)("signer", _opt)), {}, {
1168
+ res: res
1169
+ });
1170
+ _context5.next = 117;
1171
+ return mem.set(_msg2, "msgs", id);
1172
+ case 117:
1173
+ return _context5.abrupt("return", id);
1174
+ case 120:
1175
+ _context5.prev = 120;
1176
+ _context5.t13 = _context5["catch"](73);
1177
+ console.log(_context5.t13);
1178
+ case 123:
1179
+ _context5.next = 127;
1180
+ break;
1181
+ case 125:
1182
+ _context5.next = 127;
1021
1183
  return _assign({
1022
1184
  message_item: item,
1023
1185
  message: id,
@@ -1025,99 +1187,278 @@ var _default = exports["default"] = function _default() {
1025
1187
  from: owner,
1026
1188
  signer: mu.signer
1027
1189
  });
1028
- case 51:
1190
+ case 127:
1029
1191
  return _context5.abrupt("return", id);
1030
- case 52:
1192
+ case 128:
1031
1193
  case "end":
1032
1194
  return _context5.stop();
1033
1195
  }
1034
- }, _callee5);
1196
+ }, _callee5, null, [[73, 120]]);
1035
1197
  }));
1036
1198
  return function message(_x9) {
1037
1199
  return _ref11.apply(this, arguments);
1038
1200
  };
1039
1201
  }();
1040
- var result = /*#__PURE__*/function () {
1041
- var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(opt) {
1042
- var _yield$mem$get2;
1202
+ var _recover = /*#__PURE__*/function () {
1203
+ var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(pid, next) {
1204
+ var count, success, _success, i, p, from, msgs, _iterator7, _step7, v, item, _k2, _tags;
1043
1205
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1044
1206
  while (1) switch (_context6.prev = _context6.next) {
1045
1207
  case 0:
1046
- _context6.next = 2;
1208
+ count = 0;
1209
+ success = false;
1210
+ if (!hb) {
1211
+ _context6.next = 77;
1212
+ break;
1213
+ }
1214
+ if (!onRecovery[pid]) {
1215
+ _context6.next = 20;
1216
+ break;
1217
+ }
1218
+ _success = false;
1219
+ i = 0;
1220
+ case 6:
1221
+ if (!true) {
1222
+ _context6.next = 17;
1223
+ break;
1224
+ }
1225
+ _context6.next = 9;
1226
+ return (0, _utils.wait)(1000);
1227
+ case 9:
1228
+ if (onRecovery[pid]) {
1229
+ _context6.next = 12;
1230
+ break;
1231
+ }
1232
+ _success = true;
1233
+ return _context6.abrupt("break", 17);
1234
+ case 12:
1235
+ if (!(i > 10)) {
1236
+ _context6.next = 14;
1237
+ break;
1238
+ }
1239
+ return _context6.abrupt("break", 17);
1240
+ case 14:
1241
+ i++;
1242
+ _context6.next = 6;
1243
+ break;
1244
+ case 17:
1245
+ return _context6.abrupt("return", {
1246
+ success: _success
1247
+ });
1248
+ case 20:
1249
+ onRecovery[pid] = true;
1250
+ _context6.prev = 21;
1251
+ _context6.next = 24;
1252
+ return mem.get("env", pid);
1253
+ case 24:
1254
+ p = _context6.sent;
1255
+ from = p ? p.results.length : 0;
1256
+ if (!next) {
1257
+ _context6.next = 32;
1258
+ break;
1259
+ }
1260
+ _context6.next = 29;
1261
+ return next();
1262
+ case 29:
1263
+ _context6.t0 = _context6.sent;
1264
+ _context6.next = 35;
1265
+ break;
1266
+ case 32:
1267
+ _context6.next = 34;
1268
+ return hb.messages({
1269
+ target: pid,
1270
+ from: from
1271
+ });
1272
+ case 34:
1273
+ _context6.t0 = _context6.sent;
1274
+ case 35:
1275
+ msgs = _context6.t0;
1276
+ _iterator7 = _createForOfIteratorHelper(msgs.edges);
1277
+ _context6.prev = 37;
1278
+ _iterator7.s();
1279
+ case 39:
1280
+ if ((_step7 = _iterator7.n()).done) {
1281
+ _context6.next = 59;
1282
+ break;
1283
+ }
1284
+ v = _step7.value;
1285
+ item = {};
1286
+ for (_k2 in v.node.message) {
1287
+ item[_k2.toLowerCase()] = v.node.message[_k2];
1288
+ }
1289
+ item.tags.push({
1290
+ name: "signature-input",
1291
+ value: "http-sig-"
1292
+ });
1293
+ item.tags.push({
1294
+ name: "siot",
1295
+ value: Number(v.cursor).toString()
1296
+ });
1297
+ item.tags.push({
1298
+ name: "Owner",
1299
+ value: v.node.message.Owner
1300
+ });
1301
+ // todo: why all the ids from Hyperbeam are the same?
1302
+ item.tags.push({
1303
+ name: "id",
1304
+ value: v.node.message.Id
1305
+ });
1306
+ item.target = pid;
1307
+ _tags = (0, _utils2.tags)(item.tags);
1308
+ if (!(_tags.Type === "Process")) {
1309
+ _context6.next = 54;
1310
+ break;
1311
+ }
1312
+ _context6.next = 52;
1313
+ return spawn({
1314
+ http_msg: item,
1315
+ scheduler: _tags.Scheduler,
1316
+ module: _tags.Module,
1317
+ slot: v.cursor,
1318
+ recovery: true
1319
+ });
1320
+ case 52:
1321
+ _context6.next = 56;
1322
+ break;
1323
+ case 54:
1324
+ _context6.next = 56;
1325
+ return message({
1326
+ process: pid,
1327
+ http_msg: item,
1328
+ slot: v.cursor,
1329
+ recovery: true
1330
+ });
1331
+ case 56:
1332
+ count++;
1333
+ case 57:
1334
+ _context6.next = 39;
1335
+ break;
1336
+ case 59:
1337
+ _context6.next = 64;
1338
+ break;
1339
+ case 61:
1340
+ _context6.prev = 61;
1341
+ _context6.t1 = _context6["catch"](37);
1342
+ _iterator7.e(_context6.t1);
1343
+ case 64:
1344
+ _context6.prev = 64;
1345
+ _iterator7.f();
1346
+ return _context6.finish(64);
1347
+ case 67:
1348
+ if (!msgs.next) {
1349
+ _context6.next = 70;
1350
+ break;
1351
+ }
1352
+ _context6.next = 70;
1353
+ return _recover(pid, msgs.next);
1354
+ case 70:
1355
+ _context6.next = 75;
1356
+ break;
1357
+ case 72:
1358
+ _context6.prev = 72;
1359
+ _context6.t2 = _context6["catch"](21);
1360
+ console.log(_context6.t2);
1361
+ case 75:
1362
+ delete onRecovery[pid];
1363
+ case 76:
1364
+ success = true;
1365
+ case 77:
1366
+ return _context6.abrupt("return", {
1367
+ recovered: count,
1368
+ pid: pid,
1369
+ success: success
1370
+ });
1371
+ case 78:
1372
+ case "end":
1373
+ return _context6.stop();
1374
+ }
1375
+ }, _callee6, null, [[21, 72], [37, 61, 64, 67]]);
1376
+ }));
1377
+ return function recover(_x10, _x11) {
1378
+ return _ref13.apply(this, arguments);
1379
+ };
1380
+ }();
1381
+ var result = /*#__PURE__*/function () {
1382
+ var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(opt) {
1383
+ var _yield$mem$get2;
1384
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
1385
+ while (1) switch (_context7.prev = _context7.next) {
1386
+ case 0:
1387
+ _context7.next = 2;
1047
1388
  return mem.get("msgs", opt.message);
1048
1389
  case 2:
1049
- _context6.t1 = _yield$mem$get2 = _context6.sent;
1050
- _context6.t0 = _context6.t1 === null;
1051
- if (_context6.t0) {
1052
- _context6.next = 6;
1390
+ _context7.t1 = _yield$mem$get2 = _context7.sent;
1391
+ _context7.t0 = _context7.t1 === null;
1392
+ if (_context7.t0) {
1393
+ _context7.next = 6;
1053
1394
  break;
1054
1395
  }
1055
- _context6.t0 = _yield$mem$get2 === void 0;
1396
+ _context7.t0 = _yield$mem$get2 === void 0;
1056
1397
  case 6:
1057
- if (!_context6.t0) {
1058
- _context6.next = 10;
1398
+ if (!_context7.t0) {
1399
+ _context7.next = 10;
1059
1400
  break;
1060
1401
  }
1061
- _context6.t2 = void 0;
1062
- _context6.next = 11;
1402
+ _context7.t2 = void 0;
1403
+ _context7.next = 11;
1063
1404
  break;
1064
1405
  case 10:
1065
- _context6.t2 = _yield$mem$get2.res;
1406
+ _context7.t2 = _yield$mem$get2.res;
1066
1407
  case 11:
1067
- return _context6.abrupt("return", _context6.t2);
1408
+ return _context7.abrupt("return", _context7.t2);
1068
1409
  case 12:
1069
1410
  case "end":
1070
- return _context6.stop();
1411
+ return _context7.stop();
1071
1412
  }
1072
- }, _callee6);
1413
+ }, _callee7);
1073
1414
  }));
1074
- return function result(_x10) {
1075
- return _ref12.apply(this, arguments);
1415
+ return function result(_x12) {
1416
+ return _ref14.apply(this, arguments);
1076
1417
  };
1077
1418
  }();
1078
1419
  return {
1079
1420
  message: message,
1080
1421
  unmonitor: function () {
1081
- var _unmonitor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(opt) {
1422
+ var _unmonitor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(opt) {
1082
1423
  var p;
1083
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
1084
- while (1) switch (_context7.prev = _context7.next) {
1424
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1425
+ while (1) switch (_context8.prev = _context8.next) {
1085
1426
  case 0:
1086
- _context7.next = 2;
1427
+ _context8.next = 2;
1087
1428
  return mem.get("env", opt.process);
1088
1429
  case 2:
1089
- p = _context7.sent;
1430
+ p = _context8.sent;
1090
1431
  try {
1091
1432
  clearInterval(p.cron);
1092
1433
  p.cron = null;
1093
1434
  } catch (e) {}
1094
1435
  case 4:
1095
1436
  case "end":
1096
- return _context7.stop();
1437
+ return _context8.stop();
1097
1438
  }
1098
- }, _callee7);
1439
+ }, _callee8);
1099
1440
  }));
1100
- function unmonitor(_x11) {
1441
+ function unmonitor(_x13) {
1101
1442
  return _unmonitor.apply(this, arguments);
1102
1443
  }
1103
1444
  return unmonitor;
1104
1445
  }(),
1105
1446
  monitor: function () {
1106
- var _monitor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(opt) {
1447
+ var _monitor = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(opt) {
1107
1448
  var p;
1108
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1109
- while (1) switch (_context9.prev = _context9.next) {
1449
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1450
+ while (1) switch (_context10.prev = _context10.next) {
1110
1451
  case 0:
1111
- _context9.next = 2;
1452
+ _context10.next = 2;
1112
1453
  return mem.get("env", opt.process);
1113
1454
  case 2:
1114
- p = _context9.sent;
1455
+ p = _context10.sent;
1115
1456
  if ((0, _ramda.isNil)(p.cron)) {
1116
- p.cron = setInterval(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1117
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1118
- while (1) switch (_context8.prev = _context8.next) {
1457
+ p.cron = setInterval(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
1458
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1459
+ while (1) switch (_context9.prev = _context9.next) {
1119
1460
  case 0:
1120
- _context8.next = 2;
1461
+ _context9.next = 2;
1121
1462
  return message({
1122
1463
  tags: p.cronTags,
1123
1464
  process: opt.process,
@@ -1126,18 +1467,18 @@ var _default = exports["default"] = function _default() {
1126
1467
  });
1127
1468
  case 2:
1128
1469
  case "end":
1129
- return _context8.stop();
1470
+ return _context9.stop();
1130
1471
  }
1131
- }, _callee8);
1472
+ }, _callee9);
1132
1473
  })), p.span);
1133
1474
  }
1134
1475
  case 4:
1135
1476
  case "end":
1136
- return _context9.stop();
1477
+ return _context10.stop();
1137
1478
  }
1138
- }, _callee9);
1479
+ }, _callee10);
1139
1480
  }));
1140
- function monitor(_x12) {
1481
+ function monitor(_x14) {
1141
1482
  return _monitor.apply(this, arguments);
1142
1483
  }
1143
1484
  return monitor;
@@ -1147,135 +1488,135 @@ var _default = exports["default"] = function _default() {
1147
1488
  ar: ar,
1148
1489
  result: result,
1149
1490
  results: function () {
1150
- var _results = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(opt) {
1151
- var p, results, _ref14, _ref14$from, from, _ref14$to, to, _ref14$sort, sort, _ref14$limit, limit, _res, count, started, _iterator7, _step7, v;
1152
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1153
- while (1) switch (_context10.prev = _context10.next) {
1491
+ var _results = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(opt) {
1492
+ var p, results, _ref16, _ref16$from, from, _ref16$to, to, _ref16$sort, sort, _ref16$limit, limit, _res, count, started, _iterator8, _step8, v;
1493
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1494
+ while (1) switch (_context11.prev = _context11.next) {
1154
1495
  case 0:
1155
- _context10.next = 2;
1496
+ _context11.next = 2;
1156
1497
  return mem.get("env", opt.process);
1157
1498
  case 2:
1158
- p = _context10.sent;
1499
+ p = _context11.sent;
1159
1500
  if (p) {
1160
- _context10.next = 5;
1501
+ _context11.next = 5;
1161
1502
  break;
1162
1503
  }
1163
- return _context10.abrupt("return", {
1504
+ return _context11.abrupt("return", {
1164
1505
  edges: []
1165
1506
  });
1166
1507
  case 5:
1167
1508
  results = (p === null || p === void 0 ? void 0 : p.results) || [];
1168
- _ref14 = opt || {}, _ref14$from = _ref14.from, from = _ref14$from === void 0 ? null : _ref14$from, _ref14$to = _ref14.to, to = _ref14$to === void 0 ? null : _ref14$to, _ref14$sort = _ref14.sort, sort = _ref14$sort === void 0 ? "ASC" : _ref14$sort, _ref14$limit = _ref14.limit, limit = _ref14$limit === void 0 ? 25 : _ref14$limit;
1509
+ _ref16 = opt || {}, _ref16$from = _ref16.from, from = _ref16$from === void 0 ? null : _ref16$from, _ref16$to = _ref16.to, to = _ref16$to === void 0 ? null : _ref16$to, _ref16$sort = _ref16.sort, sort = _ref16$sort === void 0 ? "ASC" : _ref16$sort, _ref16$limit = _ref16.limit, limit = _ref16$limit === void 0 ? 25 : _ref16$limit;
1169
1510
  if (sort === "DESC") results = (0, _ramda.reverse)(results);
1170
1511
  _res = [];
1171
1512
  count = 0;
1172
1513
  started = (0, _ramda.isNil)(from);
1173
- _iterator7 = _createForOfIteratorHelper(results);
1174
- _context10.prev = 12;
1175
- _iterator7.s();
1514
+ _iterator8 = _createForOfIteratorHelper(results);
1515
+ _context11.prev = 12;
1516
+ _iterator8.s();
1176
1517
  case 14:
1177
- if ((_step7 = _iterator7.n()).done) {
1178
- _context10.next = 34;
1518
+ if ((_step8 = _iterator8.n()).done) {
1519
+ _context11.next = 34;
1179
1520
  break;
1180
1521
  }
1181
- v = _step7.value;
1522
+ v = _step8.value;
1182
1523
  if (!started) {
1183
- _context10.next = 31;
1524
+ _context11.next = 31;
1184
1525
  break;
1185
1526
  }
1186
- _context10.t0 = _res;
1187
- _context10.t1 = v;
1188
- _context10.next = 21;
1527
+ _context11.t0 = _res;
1528
+ _context11.t1 = v;
1529
+ _context11.next = 21;
1189
1530
  return result({
1190
1531
  message: v
1191
1532
  });
1192
1533
  case 21:
1193
- _context10.t2 = _context10.sent;
1194
- _context10.t3 = {
1195
- cursor: _context10.t1,
1196
- node: _context10.t2
1534
+ _context11.t2 = _context11.sent;
1535
+ _context11.t3 = {
1536
+ cursor: _context11.t1,
1537
+ node: _context11.t2
1197
1538
  };
1198
- _context10.t0.push.call(_context10.t0, _context10.t3);
1539
+ _context11.t0.push.call(_context11.t0, _context11.t3);
1199
1540
  count++;
1200
1541
  if (!(!(0, _ramda.isNil)(to) && v === to)) {
1201
- _context10.next = 27;
1542
+ _context11.next = 27;
1202
1543
  break;
1203
1544
  }
1204
- return _context10.abrupt("break", 34);
1545
+ return _context11.abrupt("break", 34);
1205
1546
  case 27:
1206
1547
  if (!(limit <= count)) {
1207
- _context10.next = 29;
1548
+ _context11.next = 29;
1208
1549
  break;
1209
1550
  }
1210
- return _context10.abrupt("break", 34);
1551
+ return _context11.abrupt("break", 34);
1211
1552
  case 29:
1212
- _context10.next = 32;
1553
+ _context11.next = 32;
1213
1554
  break;
1214
1555
  case 31:
1215
1556
  if (from === v) started = true;
1216
1557
  case 32:
1217
- _context10.next = 14;
1558
+ _context11.next = 14;
1218
1559
  break;
1219
1560
  case 34:
1220
- _context10.next = 39;
1561
+ _context11.next = 39;
1221
1562
  break;
1222
1563
  case 36:
1223
- _context10.prev = 36;
1224
- _context10.t4 = _context10["catch"](12);
1225
- _iterator7.e(_context10.t4);
1564
+ _context11.prev = 36;
1565
+ _context11.t4 = _context11["catch"](12);
1566
+ _iterator8.e(_context11.t4);
1226
1567
  case 39:
1227
- _context10.prev = 39;
1228
- _iterator7.f();
1229
- return _context10.finish(39);
1568
+ _context11.prev = 39;
1569
+ _iterator8.f();
1570
+ return _context11.finish(39);
1230
1571
  case 42:
1231
- return _context10.abrupt("return", {
1572
+ return _context11.abrupt("return", {
1232
1573
  edges: _res
1233
1574
  });
1234
1575
  case 43:
1235
1576
  case "end":
1236
- return _context10.stop();
1577
+ return _context11.stop();
1237
1578
  }
1238
- }, _callee10, null, [[12, 36, 39, 42]]);
1579
+ }, _callee11, null, [[12, 36, 39, 42]]);
1239
1580
  }));
1240
- function results(_x13) {
1581
+ function results(_x15) {
1241
1582
  return _results.apply(this, arguments);
1242
1583
  }
1243
1584
  return results;
1244
1585
  }(),
1245
1586
  dryrun: function () {
1246
- var _dryrun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(opt) {
1587
+ var _dryrun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(opt) {
1247
1588
  var _opt$id, _opt$owner2;
1248
- var p, id, owner, _yield$ar$dataitem4, _opt$data3, cloneMemory, msg, _env, _yield$mem$getWasm3, format, mod, wasm, wdrive, res;
1249
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1250
- while (1) switch (_context11.prev = _context11.next) {
1589
+ var p, id, owner, _yield$ar$dataitem4, _opt$data3, cloneMemory, msg, _env, _yield$mem$getWasm4, format, mod, wasm, wdrive, res;
1590
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
1591
+ while (1) switch (_context12.prev = _context12.next) {
1251
1592
  case 0:
1252
- _context11.next = 2;
1593
+ _context12.next = 2;
1253
1594
  return mem.get("env", opt.process);
1254
1595
  case 2:
1255
- p = _context11.sent;
1596
+ p = _context12.sent;
1256
1597
  if (p) {
1257
- _context11.next = 5;
1598
+ _context12.next = 5;
1258
1599
  break;
1259
1600
  }
1260
- return _context11.abrupt("return", null);
1601
+ return _context12.abrupt("return", null);
1261
1602
  case 5:
1262
1603
  id = (_opt$id = opt.id) !== null && _opt$id !== void 0 ? _opt$id : "";
1263
- owner = (_opt$owner2 = opt.owner) !== null && _opt$owner2 !== void 0 ? _opt$owner2 : "";
1604
+ owner = (_opt$owner2 = opt.owner) !== null && _opt$owner2 !== void 0 ? _opt$owner2 : mu.addr;
1264
1605
  if (!(!opt.id && opt.signer)) {
1265
- _context11.next = 14;
1606
+ _context12.next = 14;
1266
1607
  break;
1267
1608
  }
1268
1609
  ;
1269
- _context11.next = 11;
1610
+ _context12.next = 11;
1270
1611
  return ar.dataitem(_objectSpread(_objectSpread({}, opt), {}, {
1271
1612
  target: opt.process
1272
1613
  }));
1273
1614
  case 11:
1274
- _yield$ar$dataitem4 = _context11.sent;
1615
+ _yield$ar$dataitem4 = _context12.sent;
1275
1616
  id = _yield$ar$dataitem4.id;
1276
1617
  owner = _yield$ar$dataitem4.owner;
1277
1618
  case 14:
1278
- _context11.prev = 14;
1619
+ _context12.prev = 14;
1279
1620
  cloneMemory = function cloneMemory(memory) {
1280
1621
  var buffer = memory.buffer.slice(0);
1281
1622
  return new WebAssembly.Memory({
@@ -1284,76 +1625,77 @@ var _default = exports["default"] = function _default() {
1284
1625
  shared: memory.shared || false
1285
1626
  });
1286
1627
  };
1287
- _context11.next = 18;
1288
- return genMsg(id, p, (_opt$data3 = opt.data) !== null && _opt$data3 !== void 0 ? _opt$data3 : "", opt.tags, owner, mu.addr, true);
1628
+ _context12.next = 18;
1629
+ return genMsg(id, p, (_opt$data3 = opt.data) !== null && _opt$data3 !== void 0 ? _opt$data3 : "", opt.tags, owner, owner, true);
1289
1630
  case 18:
1290
- msg = _context11.sent;
1291
- _context11.next = 21;
1631
+ msg = _context12.sent;
1632
+ _context12.next = 21;
1292
1633
  return genEnv({
1293
1634
  pid: p.id,
1294
1635
  owner: p.owner,
1295
1636
  module: p.module
1296
1637
  });
1297
1638
  case 21:
1298
- _env = _context11.sent;
1639
+ _env = _context12.sent;
1299
1640
  if (p.handle) {
1300
- _context11.next = 45;
1641
+ _context12.next = 45;
1301
1642
  break;
1302
1643
  }
1303
- _context11.next = 25;
1644
+ _context12.next = 25;
1304
1645
  return mem.getWasm(p.module);
1305
1646
  case 25:
1306
- _yield$mem$getWasm3 = _context11.sent;
1307
- format = _yield$mem$getWasm3.format;
1308
- mod = _yield$mem$getWasm3.mod;
1309
- wasm = _yield$mem$getWasm3.wasm;
1647
+ _yield$mem$getWasm4 = _context12.sent;
1648
+ format = _yield$mem$getWasm4.format;
1649
+ mod = _yield$mem$getWasm4.mod;
1650
+ wasm = _yield$mem$getWasm4.wasm;
1310
1651
  wdrive = extensions[p.extention];
1311
- _context11.t0 = AoLoader;
1312
- _context11.t1 = wasm;
1313
- _context11.t2 = format;
1314
- _context11.t3 = wdrive;
1315
- _context11.next = 36;
1652
+ _context12.t0 = AoLoader;
1653
+ _context12.t1 = wasm;
1654
+ _context12.t2 = format;
1655
+ _context12.t3 = wdrive;
1656
+ _context12.next = 36;
1316
1657
  return mem.getTx(p.id);
1317
1658
  case 36:
1318
- _context11.t4 = _context11.sent.item;
1319
- _context11.next = 39;
1659
+ _context12.t4 = _context12.sent.item;
1660
+ _context12.next = 39;
1320
1661
  return mem.getTx(mod);
1321
1662
  case 39:
1322
- _context11.t5 = _context11.sent;
1323
- _context11.t6 = {
1324
- format: _context11.t2,
1325
- WeaveDrive: _context11.t3,
1326
- spawn: _context11.t4,
1327
- module: _context11.t5
1663
+ _context12.t5 = _context12.sent;
1664
+ _context12.t6 = {
1665
+ format: _context12.t2,
1666
+ WeaveDrive: _context12.t3,
1667
+ spawn: _context12.t4,
1668
+ module: _context12.t5
1328
1669
  };
1329
- _context11.next = 43;
1330
- return (0, _context11.t0)(_context11.t1, _context11.t6);
1670
+ _context12.next = 43;
1671
+ return (0, _context12.t0)(_context12.t1, _context12.t6);
1331
1672
  case 43:
1332
- p.handle = _context11.sent;
1673
+ p.handle = _context12.sent;
1333
1674
  mem.env[opt.process].handle = p.handle;
1334
1675
  case 45:
1335
- _context11.next = 47;
1676
+ _context12.next = 47;
1336
1677
  return p.handle(p.memory, msg, _env);
1337
1678
  case 47:
1338
- res = _context11.sent;
1339
- return _context11.abrupt("return", res);
1679
+ res = _context12.sent;
1680
+ return _context12.abrupt("return", res);
1340
1681
  case 51:
1341
- _context11.prev = 51;
1342
- _context11.t7 = _context11["catch"](14);
1343
- console.log(_context11.t7);
1682
+ _context12.prev = 51;
1683
+ _context12.t7 = _context12["catch"](14);
1684
+ console.log(_context12.t7);
1344
1685
  case 54:
1345
- return _context11.abrupt("return", null);
1686
+ return _context12.abrupt("return", null);
1346
1687
  case 55:
1347
1688
  case "end":
1348
- return _context11.stop();
1689
+ return _context12.stop();
1349
1690
  }
1350
- }, _callee11, null, [[14, 51]]);
1691
+ }, _callee12, null, [[14, 51]]);
1351
1692
  }));
1352
- function dryrun(_x14) {
1693
+ function dryrun(_x16) {
1353
1694
  return _dryrun.apply(this, arguments);
1354
1695
  }
1355
1696
  return dryrun;
1356
1697
  }(),
1698
+ recover: _recover,
1357
1699
  mem: mem
1358
1700
  };
1359
1701
  };