zkcloudworker 0.17.7 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) hide show
  1. package/lib/ts/cloud/config.js.map +1 -0
  2. package/lib/ts/cloud/index.d.ts +4 -0
  3. package/lib/ts/cloud/index.js +5 -0
  4. package/lib/ts/cloud/index.js.map +1 -0
  5. package/lib/ts/cloud/networks.js.map +1 -0
  6. package/lib/ts/cloud/utils/base64.js.map +1 -0
  7. package/lib/ts/cloud/utils/graphql.js.map +1 -0
  8. package/lib/ts/cloud/utils/index.d.ts +3 -0
  9. package/lib/ts/cloud/utils/index.js +4 -0
  10. package/lib/ts/cloud/utils/index.js.map +1 -0
  11. package/lib/ts/cloud/utils/utils.js.map +1 -0
  12. package/lib/{web/src → ts}/cloud/worker/cloud.d.ts +3 -3
  13. package/lib/ts/cloud/worker/cloud.js.map +1 -0
  14. package/lib/ts/cloud/worker/index.d.ts +5 -0
  15. package/lib/ts/cloud/worker/index.js +6 -0
  16. package/lib/ts/cloud/worker/index.js.map +1 -0
  17. package/lib/{web/src → ts}/cloud/worker/job.d.ts +1 -1
  18. package/lib/{web/src → ts}/cloud/worker/job.js.map +1 -1
  19. package/lib/{web/src → ts}/cloud/worker/task.d.ts +1 -1
  20. package/lib/{web/src → ts}/cloud/worker/task.js.map +1 -1
  21. package/lib/ts/cloud/worker/transaction.js.map +1 -0
  22. package/lib/{web/src → ts}/cloud/worker/worker.d.ts +1 -1
  23. package/lib/ts/cloud/worker/worker.js.map +1 -0
  24. package/lib/ts/index.d.ts +2 -0
  25. package/lib/ts/index.js +3 -0
  26. package/lib/ts/index.js.map +1 -0
  27. package/lib/ts/{src/mina → mina}/api/api.d.ts +2 -2
  28. package/lib/{web/src → ts}/mina/api/api.js +3 -3
  29. package/lib/ts/mina/api/api.js.map +1 -0
  30. package/lib/ts/mina/index.d.ts +7 -0
  31. package/lib/ts/mina/index.js +9 -0
  32. package/lib/ts/mina/index.js.map +1 -0
  33. package/lib/ts/{src/mina → mina}/local/local.d.ts +2 -2
  34. package/lib/{web/src → ts}/mina/local/local.js +1 -1
  35. package/lib/ts/mina/local/local.js.map +1 -0
  36. package/lib/ts/mina/storage/index.d.ts +3 -0
  37. package/lib/ts/mina/storage/index.js +4 -0
  38. package/lib/ts/mina/storage/index.js.map +1 -0
  39. package/lib/ts/mina/storage/ipfs.js.map +1 -0
  40. package/lib/ts/mina/storage/pinata.js.map +1 -0
  41. package/lib/{web/src → ts}/mina/storage/storage.d.ts +12 -12
  42. package/lib/ts/mina/storage/storage.js.map +1 -0
  43. package/lib/ts/{src/mina → mina}/token/FungibleToken.d.ts +21 -21
  44. package/lib/ts/mina/token/FungibleToken.js.map +1 -0
  45. package/lib/ts/{src/mina → mina}/token/FungibleTokenAdmin.d.ts +2 -2
  46. package/lib/ts/mina/token/FungibleTokenAdmin.js.map +1 -0
  47. package/lib/{web/src → ts}/mina/token/api.d.ts +3 -3
  48. package/lib/{web/src → ts}/mina/token/api.js +1 -1
  49. package/lib/ts/mina/token/api.js.map +1 -0
  50. package/lib/ts/mina/token/index.d.ts +5 -0
  51. package/lib/ts/mina/token/index.js +6 -0
  52. package/lib/ts/mina/token/index.js.map +1 -0
  53. package/lib/ts/mina/token/vk.js.map +1 -0
  54. package/lib/{web/src → ts}/mina/token/whitelist.d.ts +28 -28
  55. package/lib/{web/src → ts}/mina/token/whitelist.js +1 -1
  56. package/lib/{web/src → ts}/mina/token/whitelist.js.map +1 -1
  57. package/lib/{web/src → ts}/mina/transactions/account.js +1 -1
  58. package/lib/ts/mina/transactions/account.js.map +1 -0
  59. package/lib/{web/src → ts}/mina/transactions/blockberry.d.ts +1 -1
  60. package/lib/ts/mina/transactions/blockberry.js.map +1 -0
  61. package/lib/ts/mina/transactions/chain.js.map +1 -0
  62. package/lib/ts/mina/transactions/index.d.ts +8 -0
  63. package/lib/ts/mina/transactions/index.js +9 -0
  64. package/lib/ts/mina/transactions/index.js.map +1 -0
  65. package/lib/ts/{src/mina → mina}/transactions/nonce.d.ts +2 -2
  66. package/lib/{web/src → ts}/mina/transactions/nonce.js +2 -2
  67. package/lib/ts/mina/transactions/nonce.js.map +1 -0
  68. package/lib/{web/src → ts}/mina/transactions/send.d.ts +1 -1
  69. package/lib/{web/src → ts}/mina/transactions/send.js +2 -2
  70. package/lib/ts/mina/transactions/send.js.map +1 -0
  71. package/lib/ts/{src/mina → mina}/transactions/tiny-contract.d.ts +1 -1
  72. package/lib/ts/mina/transactions/tiny-contract.js.map +1 -0
  73. package/lib/{web/src → ts}/mina/transactions/transaction.js +1 -1
  74. package/lib/ts/mina/transactions/transaction.js.map +1 -0
  75. package/lib/ts/{src/mina → mina}/transactions/txstatus.d.ts +1 -1
  76. package/lib/{web/src → ts}/mina/transactions/txstatus.js +1 -1
  77. package/lib/ts/mina/transactions/txstatus.js.map +1 -0
  78. package/lib/{web/src → ts}/mina/utils/base64.js +1 -1
  79. package/lib/ts/mina/utils/base64.js.map +1 -0
  80. package/lib/{web/src → ts}/mina/utils/fee.js +1 -1
  81. package/lib/ts/mina/utils/fee.js.map +1 -0
  82. package/lib/{web/src → ts}/mina/utils/fetch.d.ts +1 -1
  83. package/lib/{web/src → ts}/mina/utils/fetch.js +1 -1
  84. package/lib/ts/mina/utils/fetch.js.map +1 -0
  85. package/lib/{web/src → ts}/mina/utils/fields.js +1 -1
  86. package/lib/ts/mina/utils/fields.js.map +1 -0
  87. package/lib/ts/mina/utils/index.d.ts +6 -0
  88. package/lib/ts/mina/utils/index.js +7 -0
  89. package/lib/ts/mina/utils/index.js.map +1 -0
  90. package/lib/ts/{src/mina → mina}/utils/indexed-map.d.ts +2 -2
  91. package/lib/{web/src → ts}/mina/utils/indexed-map.js +2 -2
  92. package/lib/ts/mina/utils/indexed-map.js.map +1 -0
  93. package/lib/ts/{src/mina → mina}/utils/mina.d.ts +1 -1
  94. package/lib/{web/src → ts}/mina/utils/mina.js +1 -1
  95. package/lib/ts/mina/utils/mina.js.map +1 -0
  96. package/lib/ts/mina/verification/index.d.ts +1 -0
  97. package/lib/ts/mina/verification/index.js +2 -0
  98. package/lib/ts/mina/verification/index.js.map +1 -0
  99. package/lib/{web/src → ts}/mina/verification/verification.d.ts +1 -1
  100. package/lib/ts/mina/verification/verification.js.map +1 -0
  101. package/lib/tsconfig.web.tsbuildinfo +1 -0
  102. package/lib/{ts/src → web}/cloud/config.js +2 -3
  103. package/lib/web/cloud/config.js.map +1 -0
  104. package/lib/web/cloud/index.d.ts +4 -0
  105. package/lib/web/cloud/index.js +5 -0
  106. package/lib/web/cloud/index.js.map +1 -0
  107. package/lib/{ts/src → web}/cloud/networks.js +2 -9
  108. package/lib/web/cloud/networks.js.map +1 -0
  109. package/lib/{ts/src → web}/cloud/utils/base64.js +7 -14
  110. package/lib/web/cloud/utils/base64.js.map +1 -0
  111. package/lib/{ts/src → web}/cloud/utils/graphql.js +6 -10
  112. package/lib/web/cloud/utils/graphql.js.map +1 -0
  113. package/lib/web/cloud/utils/index.d.ts +3 -0
  114. package/lib/web/cloud/utils/index.js +4 -0
  115. package/lib/web/cloud/utils/index.js.map +1 -0
  116. package/lib/{ts/src → web}/cloud/utils/utils.js +5 -11
  117. package/lib/web/cloud/utils/utils.js.map +1 -0
  118. package/lib/{ts/src → web}/cloud/worker/cloud.d.ts +3 -3
  119. package/lib/{ts/src → web}/cloud/worker/cloud.js +2 -5
  120. package/lib/web/cloud/worker/cloud.js.map +1 -0
  121. package/lib/web/cloud/worker/index.d.ts +5 -0
  122. package/lib/web/cloud/worker/index.js +6 -0
  123. package/lib/web/cloud/worker/index.js.map +1 -0
  124. package/lib/{ts/src → web}/cloud/worker/job.d.ts +1 -1
  125. package/lib/web/cloud/worker/job.js +2 -0
  126. package/lib/web/cloud/worker/job.js.map +1 -0
  127. package/lib/{ts/src → web}/cloud/worker/task.d.ts +1 -1
  128. package/lib/web/cloud/worker/task.js +2 -0
  129. package/lib/web/cloud/worker/task.js.map +1 -0
  130. package/lib/{ts/src → web}/cloud/worker/transaction.js +2 -2
  131. package/lib/web/cloud/worker/transaction.js.map +1 -0
  132. package/lib/{ts/src → web}/cloud/worker/worker.d.ts +1 -1
  133. package/lib/{ts/src → web}/cloud/worker/worker.js +2 -5
  134. package/lib/web/cloud/worker/worker.js.map +1 -0
  135. package/lib/web/index.d.ts +2 -0
  136. package/lib/web/index.js +3 -0
  137. package/lib/web/index.js.map +1 -0
  138. package/lib/web/{src/mina → mina}/api/api.d.ts +2 -2
  139. package/lib/{ts/src → web}/mina/api/api.js +17 -23
  140. package/lib/web/mina/api/api.js.map +1 -0
  141. package/lib/web/mina/index.d.ts +7 -0
  142. package/lib/web/mina/index.js +9 -0
  143. package/lib/web/mina/index.js.map +1 -0
  144. package/lib/web/{src/mina → mina}/local/local.d.ts +2 -2
  145. package/lib/{ts/src → web}/mina/local/local.js +5 -9
  146. package/lib/web/mina/local/local.js.map +1 -0
  147. package/lib/web/mina/storage/index.d.ts +3 -0
  148. package/lib/web/mina/storage/index.js +4 -0
  149. package/lib/web/mina/storage/index.js.map +1 -0
  150. package/lib/{ts/src → web}/mina/storage/ipfs.js +2 -4
  151. package/lib/web/mina/storage/ipfs.js.map +1 -0
  152. package/lib/{ts/src → web}/mina/storage/pinata.js +2 -4
  153. package/lib/web/mina/storage/pinata.js.map +1 -0
  154. package/lib/{ts/src → web}/mina/storage/storage.d.ts +12 -12
  155. package/lib/{ts/src → web}/mina/storage/storage.js +6 -9
  156. package/lib/web/mina/storage/storage.js.map +1 -0
  157. package/lib/web/{src/mina → mina}/token/FungibleToken.d.ts +21 -21
  158. package/lib/{ts/src → web}/mina/token/FungibleToken.js +87 -103
  159. package/lib/web/mina/token/FungibleToken.js.map +1 -0
  160. package/lib/web/{src/mina → mina}/token/FungibleTokenAdmin.d.ts +2 -2
  161. package/lib/{ts/src → web}/mina/token/FungibleTokenAdmin.js +24 -35
  162. package/lib/web/mina/token/FungibleTokenAdmin.js.map +1 -0
  163. package/lib/{ts/src → web}/mina/token/api.d.ts +3 -3
  164. package/lib/{ts/src → web}/mina/token/api.js +4 -7
  165. package/lib/web/mina/token/api.js.map +1 -0
  166. package/lib/web/mina/token/index.d.ts +5 -0
  167. package/lib/web/mina/token/index.js +6 -0
  168. package/lib/web/mina/token/index.js.map +1 -0
  169. package/lib/{ts/src → web}/mina/token/vk.js +2 -4
  170. package/lib/web/mina/token/vk.js.map +1 -0
  171. package/lib/{ts/src → web}/mina/token/whitelist.d.ts +28 -28
  172. package/lib/{ts/src → web}/mina/token/whitelist.js +34 -41
  173. package/lib/web/mina/token/whitelist.js.map +1 -0
  174. package/lib/web/mina/transactions/account.js +44 -0
  175. package/lib/web/mina/transactions/account.js.map +1 -0
  176. package/lib/{ts/src → web}/mina/transactions/blockberry.d.ts +1 -1
  177. package/lib/{ts/src → web}/mina/transactions/blockberry.js +5 -10
  178. package/lib/web/mina/transactions/blockberry.js.map +1 -0
  179. package/lib/web/mina/transactions/chain.js +2 -0
  180. package/lib/web/mina/transactions/chain.js.map +1 -0
  181. package/lib/web/mina/transactions/index.d.ts +8 -0
  182. package/lib/web/mina/transactions/index.js +9 -0
  183. package/lib/web/mina/transactions/index.js.map +1 -0
  184. package/lib/web/{src/mina → mina}/transactions/nonce.d.ts +2 -2
  185. package/lib/{ts/src → web}/mina/transactions/nonce.js +15 -18
  186. package/lib/web/mina/transactions/nonce.js.map +1 -0
  187. package/lib/{ts/src → web}/mina/transactions/send.d.ts +1 -1
  188. package/lib/{ts/src → web}/mina/transactions/send.js +12 -15
  189. package/lib/web/mina/transactions/send.js.map +1 -0
  190. package/lib/web/{src/mina → mina}/transactions/tiny-contract.d.ts +1 -1
  191. package/lib/web/mina/transactions/tiny-contract.js +22 -0
  192. package/lib/web/mina/transactions/tiny-contract.js.map +1 -0
  193. package/lib/{ts/src → web}/mina/transactions/transaction.js +18 -22
  194. package/lib/web/mina/transactions/transaction.js.map +1 -0
  195. package/lib/web/{src/mina → mina}/transactions/txstatus.d.ts +1 -1
  196. package/lib/{ts/src → web}/mina/transactions/txstatus.js +4 -6
  197. package/lib/web/mina/transactions/txstatus.js.map +1 -0
  198. package/lib/web/mina/utils/base64.js +29 -0
  199. package/lib/web/mina/utils/base64.js.map +1 -0
  200. package/lib/web/mina/utils/fee.js +11 -0
  201. package/lib/web/mina/utils/fee.js.map +1 -0
  202. package/lib/{ts/src → web}/mina/utils/fetch.d.ts +1 -1
  203. package/lib/{ts/src → web}/mina/utils/fetch.js +11 -15
  204. package/lib/web/mina/utils/fetch.js.map +1 -0
  205. package/lib/{ts/src → web}/mina/utils/fields.js +11 -14
  206. package/lib/web/mina/utils/fields.js.map +1 -0
  207. package/lib/web/mina/utils/index.d.ts +6 -0
  208. package/lib/web/mina/utils/index.js +7 -0
  209. package/lib/web/mina/utils/index.js.map +1 -0
  210. package/lib/web/{src/mina → mina}/utils/indexed-map.d.ts +2 -2
  211. package/lib/{ts/src → web}/mina/utils/indexed-map.js +24 -30
  212. package/lib/web/mina/utils/indexed-map.js.map +1 -0
  213. package/lib/web/{src/mina → mina}/utils/mina.d.ts +1 -1
  214. package/lib/{ts/src → web}/mina/utils/mina.js +21 -29
  215. package/lib/web/mina/utils/mina.js.map +1 -0
  216. package/lib/web/mina/verification/index.d.ts +1 -0
  217. package/lib/web/mina/verification/index.js +2 -0
  218. package/lib/web/mina/verification/index.js.map +1 -0
  219. package/lib/{ts/src → web}/mina/verification/verification.d.ts +1 -1
  220. package/lib/web/mina/verification/verification.js +2 -0
  221. package/lib/web/mina/verification/verification.js.map +1 -0
  222. package/package.json +2 -1
  223. package/lib/ts/src/cloud/index.d.ts +0 -4
  224. package/lib/ts/src/cloud/index.js +0 -20
  225. package/lib/ts/src/cloud/utils/index.d.ts +0 -3
  226. package/lib/ts/src/cloud/utils/index.js +0 -19
  227. package/lib/ts/src/cloud/worker/index.d.ts +0 -5
  228. package/lib/ts/src/cloud/worker/index.js +0 -21
  229. package/lib/ts/src/cloud/worker/job.js +0 -2
  230. package/lib/ts/src/cloud/worker/task.js +0 -2
  231. package/lib/ts/src/index.d.ts +0 -2
  232. package/lib/ts/src/index.js +0 -18
  233. package/lib/ts/src/mina/index.d.ts +0 -7
  234. package/lib/ts/src/mina/index.js +0 -24
  235. package/lib/ts/src/mina/storage/index.d.ts +0 -3
  236. package/lib/ts/src/mina/storage/index.js +0 -19
  237. package/lib/ts/src/mina/token/index.d.ts +0 -5
  238. package/lib/ts/src/mina/token/index.js +0 -21
  239. package/lib/ts/src/mina/transactions/account.js +0 -48
  240. package/lib/ts/src/mina/transactions/chain.js +0 -2
  241. package/lib/ts/src/mina/transactions/index.d.ts +0 -8
  242. package/lib/ts/src/mina/transactions/index.js +0 -24
  243. package/lib/ts/src/mina/transactions/tiny-contract.js +0 -33
  244. package/lib/ts/src/mina/utils/base64.js +0 -34
  245. package/lib/ts/src/mina/utils/fee.js +0 -16
  246. package/lib/ts/src/mina/utils/index.d.ts +0 -6
  247. package/lib/ts/src/mina/utils/index.js +0 -22
  248. package/lib/ts/src/mina/verification/index.d.ts +0 -1
  249. package/lib/ts/src/mina/verification/index.js +0 -17
  250. package/lib/ts/src/mina/verification/verification.js +0 -2
  251. package/lib/ts/tsconfig.tsbuildinfo +0 -1
  252. package/lib/web/src/cloud/config.js.map +0 -1
  253. package/lib/web/src/cloud/index.d.ts +0 -4
  254. package/lib/web/src/cloud/index.js +0 -5
  255. package/lib/web/src/cloud/index.js.map +0 -1
  256. package/lib/web/src/cloud/networks.js.map +0 -1
  257. package/lib/web/src/cloud/utils/base64.js.map +0 -1
  258. package/lib/web/src/cloud/utils/graphql.js.map +0 -1
  259. package/lib/web/src/cloud/utils/index.d.ts +0 -3
  260. package/lib/web/src/cloud/utils/index.js +0 -4
  261. package/lib/web/src/cloud/utils/index.js.map +0 -1
  262. package/lib/web/src/cloud/utils/utils.js.map +0 -1
  263. package/lib/web/src/cloud/worker/cloud.js.map +0 -1
  264. package/lib/web/src/cloud/worker/index.d.ts +0 -5
  265. package/lib/web/src/cloud/worker/index.js +0 -6
  266. package/lib/web/src/cloud/worker/index.js.map +0 -1
  267. package/lib/web/src/cloud/worker/transaction.js.map +0 -1
  268. package/lib/web/src/cloud/worker/worker.js.map +0 -1
  269. package/lib/web/src/index.d.ts +0 -2
  270. package/lib/web/src/index.js +0 -3
  271. package/lib/web/src/index.js.map +0 -1
  272. package/lib/web/src/mina/api/api.js.map +0 -1
  273. package/lib/web/src/mina/index.d.ts +0 -7
  274. package/lib/web/src/mina/index.js +0 -9
  275. package/lib/web/src/mina/index.js.map +0 -1
  276. package/lib/web/src/mina/local/local.js.map +0 -1
  277. package/lib/web/src/mina/storage/index.d.ts +0 -3
  278. package/lib/web/src/mina/storage/index.js +0 -4
  279. package/lib/web/src/mina/storage/index.js.map +0 -1
  280. package/lib/web/src/mina/storage/ipfs.js.map +0 -1
  281. package/lib/web/src/mina/storage/pinata.js.map +0 -1
  282. package/lib/web/src/mina/storage/storage.js.map +0 -1
  283. package/lib/web/src/mina/token/FungibleToken.js.map +0 -1
  284. package/lib/web/src/mina/token/FungibleTokenAdmin.js.map +0 -1
  285. package/lib/web/src/mina/token/api.js.map +0 -1
  286. package/lib/web/src/mina/token/index.d.ts +0 -5
  287. package/lib/web/src/mina/token/index.js +0 -6
  288. package/lib/web/src/mina/token/index.js.map +0 -1
  289. package/lib/web/src/mina/token/vk.js.map +0 -1
  290. package/lib/web/src/mina/transactions/account.js.map +0 -1
  291. package/lib/web/src/mina/transactions/blockberry.js.map +0 -1
  292. package/lib/web/src/mina/transactions/chain.js.map +0 -1
  293. package/lib/web/src/mina/transactions/index.d.ts +0 -8
  294. package/lib/web/src/mina/transactions/index.js +0 -9
  295. package/lib/web/src/mina/transactions/index.js.map +0 -1
  296. package/lib/web/src/mina/transactions/nonce.js.map +0 -1
  297. package/lib/web/src/mina/transactions/send.js.map +0 -1
  298. package/lib/web/src/mina/transactions/tiny-contract.js.map +0 -1
  299. package/lib/web/src/mina/transactions/transaction.js.map +0 -1
  300. package/lib/web/src/mina/transactions/txstatus.js.map +0 -1
  301. package/lib/web/src/mina/utils/base64.js.map +0 -1
  302. package/lib/web/src/mina/utils/fee.js.map +0 -1
  303. package/lib/web/src/mina/utils/fetch.js.map +0 -1
  304. package/lib/web/src/mina/utils/fields.js.map +0 -1
  305. package/lib/web/src/mina/utils/index.d.ts +0 -6
  306. package/lib/web/src/mina/utils/index.js +0 -7
  307. package/lib/web/src/mina/utils/index.js.map +0 -1
  308. package/lib/web/src/mina/utils/indexed-map.js.map +0 -1
  309. package/lib/web/src/mina/utils/mina.js.map +0 -1
  310. package/lib/web/src/mina/verification/index.d.ts +0 -1
  311. package/lib/web/src/mina/verification/index.js +0 -2
  312. package/lib/web/src/mina/verification/index.js.map +0 -1
  313. package/lib/web/src/mina/verification/verification.js.map +0 -1
  314. package/lib/web/tsconfig.web.tsbuildinfo +0 -1
  315. /package/lib/ts/{src/cloud → cloud}/config.d.ts +0 -0
  316. /package/lib/{web/src → ts}/cloud/config.js +0 -0
  317. /package/lib/ts/{src/cloud → cloud}/networks.d.ts +0 -0
  318. /package/lib/{web/src → ts}/cloud/networks.js +0 -0
  319. /package/lib/ts/{src/cloud → cloud}/utils/base64.d.ts +0 -0
  320. /package/lib/{web/src → ts}/cloud/utils/base64.js +0 -0
  321. /package/lib/ts/{src/cloud → cloud}/utils/graphql.d.ts +0 -0
  322. /package/lib/{web/src → ts}/cloud/utils/graphql.js +0 -0
  323. /package/lib/ts/{src/cloud → cloud}/utils/utils.d.ts +0 -0
  324. /package/lib/{web/src → ts}/cloud/utils/utils.js +0 -0
  325. /package/lib/{web/src → ts}/cloud/worker/cloud.js +0 -0
  326. /package/lib/{web/src → ts}/cloud/worker/job.js +0 -0
  327. /package/lib/{web/src → ts}/cloud/worker/task.js +0 -0
  328. /package/lib/ts/{src/cloud → cloud}/worker/transaction.d.ts +0 -0
  329. /package/lib/{web/src → ts}/cloud/worker/transaction.js +0 -0
  330. /package/lib/{web/src → ts}/cloud/worker/worker.js +0 -0
  331. /package/lib/ts/{src/mina → mina}/storage/ipfs.d.ts +0 -0
  332. /package/lib/{web/src → ts}/mina/storage/ipfs.js +0 -0
  333. /package/lib/ts/{src/mina → mina}/storage/pinata.d.ts +0 -0
  334. /package/lib/{web/src → ts}/mina/storage/pinata.js +0 -0
  335. /package/lib/{web/src → ts}/mina/storage/storage.js +0 -0
  336. /package/lib/{web/src → ts}/mina/token/FungibleToken.js +0 -0
  337. /package/lib/{web/src → ts}/mina/token/FungibleTokenAdmin.js +0 -0
  338. /package/lib/ts/{src/mina → mina}/token/vk.d.ts +0 -0
  339. /package/lib/{web/src → ts}/mina/token/vk.js +0 -0
  340. /package/lib/ts/{src/mina → mina}/transactions/account.d.ts +0 -0
  341. /package/lib/{web/src → ts}/mina/transactions/blockberry.js +0 -0
  342. /package/lib/ts/{src/mina → mina}/transactions/chain.d.ts +0 -0
  343. /package/lib/{web/src → ts}/mina/transactions/chain.js +0 -0
  344. /package/lib/{web/src → ts}/mina/transactions/tiny-contract.js +0 -0
  345. /package/lib/ts/{src/mina → mina}/transactions/transaction.d.ts +0 -0
  346. /package/lib/ts/{src/mina → mina}/utils/base64.d.ts +0 -0
  347. /package/lib/ts/{src/mina → mina}/utils/fee.d.ts +0 -0
  348. /package/lib/ts/{src/mina → mina}/utils/fields.d.ts +0 -0
  349. /package/lib/{web/src → ts}/mina/verification/verification.js +0 -0
  350. /package/lib/web/{src/cloud → cloud}/config.d.ts +0 -0
  351. /package/lib/web/{src/cloud → cloud}/networks.d.ts +0 -0
  352. /package/lib/web/{src/cloud → cloud}/utils/base64.d.ts +0 -0
  353. /package/lib/web/{src/cloud → cloud}/utils/graphql.d.ts +0 -0
  354. /package/lib/web/{src/cloud → cloud}/utils/utils.d.ts +0 -0
  355. /package/lib/web/{src/cloud → cloud}/worker/transaction.d.ts +0 -0
  356. /package/lib/web/{src/mina → mina}/storage/ipfs.d.ts +0 -0
  357. /package/lib/web/{src/mina → mina}/storage/pinata.d.ts +0 -0
  358. /package/lib/web/{src/mina → mina}/token/vk.d.ts +0 -0
  359. /package/lib/web/{src/mina → mina}/transactions/account.d.ts +0 -0
  360. /package/lib/web/{src/mina → mina}/transactions/chain.d.ts +0 -0
  361. /package/lib/web/{src/mina → mina}/transactions/transaction.d.ts +0 -0
  362. /package/lib/web/{src/mina → mina}/utils/base64.d.ts +0 -0
  363. /package/lib/web/{src/mina → mina}/utils/fee.d.ts +0 -0
  364. /package/lib/web/{src/mina → mina}/utils/fields.d.ts +0 -0
@@ -0,0 +1,5 @@
1
+ export * from "./utils/index.js";
2
+ export * from "./worker/index.js";
3
+ export * from "./config.js";
4
+ export * from "./networks.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cloud/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Local = exports.Lightnet = exports.Zeko = exports.Devnet = exports.Mainnet = exports.networks = void 0;
1
+ export { networks, Mainnet, Devnet, Zeko, Lightnet, Local, };
4
2
  const Mainnet = {
5
3
  mina: [
6
4
  //"https://proxy.devnet.minaexplorer.com/graphql",
@@ -15,13 +13,11 @@ const Mainnet = {
15
13
  chainId: "mainnet",
16
14
  name: "Mainnet",
17
15
  };
18
- exports.Mainnet = Mainnet;
19
16
  const Local = {
20
17
  mina: [],
21
18
  archive: [],
22
19
  chainId: "local",
23
20
  };
24
- exports.Local = Local;
25
21
  const Devnet = {
26
22
  mina: [
27
23
  "https://api.minascan.io/node/devnet/v1/graphql",
@@ -37,7 +33,6 @@ const Devnet = {
37
33
  name: "Devnet",
38
34
  faucet: "https://faucet.minaprotocol.com",
39
35
  };
40
- exports.Devnet = Devnet;
41
36
  const Zeko = {
42
37
  mina: ["https://devnet.zeko.io/graphql"],
43
38
  archive: ["https://devnet.zeko.io/graphql"],
@@ -47,7 +42,6 @@ const Zeko = {
47
42
  name: "Zeko",
48
43
  faucet: "https://zeko.io/faucet",
49
44
  };
50
- exports.Zeko = Zeko;
51
45
  const Lightnet = {
52
46
  mina: ["http://localhost:8080/graphql"],
53
47
  archive: ["http://localhost:8282"],
@@ -55,9 +49,7 @@ const Lightnet = {
55
49
  chainId: "lightnet",
56
50
  name: "Lightnet",
57
51
  };
58
- exports.Lightnet = Lightnet;
59
52
  const networks = [Mainnet, Local, Devnet, Zeko, Lightnet];
60
- exports.networks = networks;
61
53
  /*
62
54
  // not supported by o1js v1
63
55
 
@@ -86,3 +78,4 @@ const TestWorld2: MinaNetwork = {
86
78
  };
87
79
 
88
80
  */
81
+ //# sourceMappingURL=networks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"networks.js","sourceRoot":"","sources":["../../../../src/cloud/networks.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,GACN,CAAC;AAoCF,MAAM,OAAO,GAAgB;IAC3B,IAAI,EAAE;QACJ,kDAAkD;QAClD,iDAAiD;KAClD;IACD,OAAO,EAAE;QACP,oDAAoD;QACpD,4CAA4C;KAC7C;IACD,kBAAkB,EAAE,sCAAsC;IAC1D,sBAAsB,EAAE,iCAAiC;IACzD,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,KAAK,GAAgB;IACzB,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,MAAM,MAAM,GAAgB;IAC1B,IAAI,EAAE;QACJ,gDAAgD;QAChD,kDAAkD;KACnD;IACD,OAAO,EAAE;QACP,mDAAmD;QACnD,4CAA4C;KAC7C;IACD,kBAAkB,EAAE,qCAAqC;IACzD,sBAAsB,EAAE,gCAAgC;IACxD,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,iCAAiC;CAC1C,CAAC;AAEF,MAAM,IAAI,GAAgB;IACxB,IAAI,EAAE,CAAC,gCAAgC,CAAC;IACxC,OAAO,EAAE,CAAC,gCAAgC,CAAC;IAC3C,kBAAkB,EAAE,qCAAqC;IACzD,sBAAsB,EAAE,gCAAgC;IACxD,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,wBAAwB;CACjC,CAAC;AAEF,MAAM,QAAQ,GAAgB;IAC5B,IAAI,EAAE,CAAC,+BAA+B,CAAC;IACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;IAClC,cAAc,EAAE,uBAAuB;IACvC,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,UAAU;CACjB,CAAC;AAEF,MAAM,QAAQ,GAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BE"}
@@ -1,38 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bigintToBase56 = bigintToBase56;
4
- exports.bigintFromBase56 = bigintFromBase56;
5
- exports.bigintToBase64 = bigintToBase64;
6
- exports.bigintFromBase64 = bigintFromBase64;
7
- exports.fromBase = fromBase;
8
- exports.toBase = toBase;
9
1
  // URL friendly base64 encoding
10
2
  const TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
11
- function bigintToBase56(value) {
3
+ export function bigintToBase56(value) {
12
4
  const digits = toBase(value, 56n);
13
5
  //console.log("digits:", digits);
14
6
  const str = digits.map((x) => TABLE[Number(x)]).join("");
15
7
  //console.log("str:", str);
16
8
  return str;
17
9
  }
18
- function bigintFromBase56(str) {
10
+ export function bigintFromBase56(str) {
19
11
  const base56Digits = str.split("").map((x) => BigInt(TABLE.indexOf(x)));
20
12
  const x = fromBase(base56Digits, 56n);
21
13
  return x;
22
14
  }
23
- function bigintToBase64(value) {
15
+ export function bigintToBase64(value) {
24
16
  const digits = toBase(value, 64n);
25
17
  //console.log("digits:", digits);
26
18
  const str = digits.map((x) => TABLE[Number(x)]).join("");
27
19
  //console.log("str:", str);
28
20
  return str;
29
21
  }
30
- function bigintFromBase64(str) {
22
+ export function bigintFromBase64(str) {
31
23
  const base64Digits = str.split("").map((x) => BigInt(TABLE.indexOf(x)));
32
24
  const x = fromBase(base64Digits, 64n);
33
25
  return x;
34
26
  }
35
- function fromBase(digits, base) {
27
+ export function fromBase(digits, base) {
36
28
  if (base <= 0n)
37
29
  throw Error("fromBase: base must be positive");
38
30
  // compute powers base, base^2, base^4, ..., base^(2^k)
@@ -58,7 +50,7 @@ function fromBase(digits, base) {
58
50
  let [digit] = digits;
59
51
  return digit;
60
52
  }
61
- function toBase(x, base) {
53
+ export function toBase(x, base) {
62
54
  if (base <= 0n)
63
55
  throw Error("toBase: base must be positive");
64
56
  // compute powers base, base^2, base^4, ..., base^(2^k)
@@ -88,3 +80,4 @@ function toBase(x, base) {
88
80
  }
89
81
  return digits;
90
82
  }
83
+ //# sourceMappingURL=base64.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../../../src/cloud/utils/base64.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,KAAK,GACT,kEAAkE,CAAC;AAErE,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,iCAAiC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzD,2BAA2B;IAC3B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,YAAY,GAAG,GAAG,C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AC,EAAE,KAAK,KAAK,EAAE,EAAE,CAAC;QAChD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IACD,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,oCAAoC;IACtD,gFAAgF;IAChF,wCAAwC;IACxC,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YAClB,IAAI,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC;YACzB,SAAS,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;YAC5B,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;QAC1C,CAAC;QACD,MAAM,GAAG,SAAS,CAAC;IACrB,CAAC;IACD,4BAA4B;IAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,12 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultToken = void 0;
4
- exports.getBalanceFromGraphQL = getBalanceFromGraphQL;
5
- exports.getAccountFromGraphQL = getAccountFromGraphQL;
6
- exports.defaultToken = "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf";
7
- async function getBalanceFromGraphQL(params) {
1
+ export const defaultToken = "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf";
2
+ export async function getBalanceFromGraphQL(params) {
8
3
  const { publicKey, mina } = params;
9
- const tokenId = params.tokenId ?? exports.defaultToken;
4
+ const tokenId = params.tokenId ?? defaultToken;
10
5
  if (mina.length === 0)
11
6
  throw new Error("no mina endpoints provided");
12
7
  const account = await fetchAccountInternal({
@@ -19,9 +14,9 @@ async function getBalanceFromGraphQL(params) {
19
14
  const balance = account?.account?.balance?.total;
20
15
  return balance ? BigInt(balance) : 0n;
21
16
  }
22
- async function getAccountFromGraphQL(params) {
17
+ export async function getAccountFromGraphQL(params) {
23
18
  const { publicKey, mina } = params;
24
- const tokenId = params.tokenId ?? exports.defaultToken;
19
+ const tokenId = params.tokenId ?? defaultToken;
25
20
  if (mina.length === 0)
26
21
  throw new Error("no mina endpoints provided");
27
22
  const account = await fetchAccountInternal({
@@ -227,3 +222,4 @@ const accountQuery = (publicKey, tokenId) => `{
227
222
  }
228
223
  }
229
224
  `;
225
+ //# sourceMappingURL=graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../src/cloud/utils/graphql.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GACvB,oDAAoD,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAI3C;IACC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IACnC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,YAAY,CAAC;IAC/C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IACrE,MAAM,OAAO,G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AS;gBACT;oBACE,UAAU,EAAE,QAAQ,CAAC,MAAM;oBAC3B,UAAU,EAAE,YAAY,CAAC,MAAM;yBAC5B,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;yBAClC,IAAI,CAAC,IAAI,CAAC;iBACd;aACF,CAAC;QACJ,CAAC;aAAM,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC3C,OAAO;gBACL,SAAS;gBACT;oBACE,UAAU,EAAE,QAAQ,CAAC,MAAM;oBAC3B,UAAU,EAAE,oCAAoC;iBACjD;aACF,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACnC,CAAC;SAAM,CAAC;QACN,OAAO;YACL,SAAS;YACT;gBACE,UAAU,EAAE,QAAQ,CAAC,MAAM;gBAC3B,UAAU,EAAE,QAAQ,CAAC,UAAU;aAChC;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAE,EAAE,CAAC;wBACrC,SAAS,cAAc,OAAO;;;;CAIrD,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAE,EAAE,CAAC;wBACrC,SAAS,cAAc,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CrD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./graphql.js";
2
+ export * from "./utils.js";
3
+ export * from "./base64.js";
@@ -0,0 +1,4 @@
1
+ export * from "./graphql.js";
2
+ export * from "./utils.js";
3
+ export * from "./base64.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cloud/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -1,13 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Memory = void 0;
4
- exports.sleep = sleep;
5
- exports.makeString = makeString;
6
- exports.formatTime = formatTime;
7
- function sleep(ms) {
1
+ export function sleep(ms) {
8
2
  return new Promise((resolve) => setTimeout(resolve, ms));
9
3
  }
10
- function makeString(length) {
4
+ export function makeString(length) {
11
5
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
12
6
  let outString = ``;
13
7
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
@@ -17,7 +11,7 @@ function makeString(length) {
17
11
  }
18
12
  return outString;
19
13
  }
20
- function formatTime(ms) {
14
+ export function formatTime(ms) {
21
15
  if (ms === undefined)
22
16
  return "";
23
17
  if (ms < 1000)
@@ -35,7 +29,7 @@ function formatTime(ms) {
35
29
  return hours.toString() + " h " + minutes.toString() + " min";
36
30
  }
37
31
  }
38
- class Memory {
32
+ export class Memory {
39
33
  constructor() {
40
34
  Memory.rss = 0;
41
35
  }
@@ -62,6 +56,6 @@ class Memory {
62
56
  console.log(memoryUsage);
63
57
  }
64
58
  }
65
- exports.Memory = Memory;
66
59
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
67
60
  Memory.rss = 0;
61
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/cloud/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,kEAAkE;IAClE,IAAI,SAAS,GAAW,EAAE,CAAC;IAC3B,kEAAkE;IAClE,MAAM,SAAS,GAAW,gEAAgE,CAAC;IAE3F,KAAK,IAAI,CAAC,GAAG,CAAC,EA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ACpB,wBAAwB;aAC1B;YACH,CAAC,CAAC,cAAc,WAAW,KAAK,iBAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,GAC7D,MAAM,KAAK,CAAC;gBACV,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,eAAe,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,QAAQ,EAAE,GAAG,KAC3D,EAAE,CAAC;QAEP,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC3B,CAAC;;AAzCD,kEAAkE;AAC3D,UAAG,GAAW,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { blockchain } from "../networks";
2
- import { JobData } from "./job";
3
- import { TransactionMetadata } from "./transaction";
1
+ import { blockchain } from "../networks.js";
2
+ import { JobData } from "./job.js";
3
+ import { TransactionMetadata } from "./transaction.js";
4
4
  /**
5
5
  * Interface for the deployer key pair
6
6
  * Used to get the public and private keys of the deployer for test networks only.
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Cloud = void 0;
4
1
  /*
5
2
  * Abstract class for the cloud service
6
3
  * Used to define the cloud methods and properties
@@ -19,7 +16,7 @@ exports.Cloud = void 0;
19
16
  * @param chain the blockchain network
20
17
  * @param isLocalCloud a boolean to check if the cloud is local or not
21
18
  */
22
- class Cloud {
19
+ export class Cloud {
23
20
  /**
24
21
  * Constructor for the Cloud class
25
22
  * @param params the parameters for the Cloud class
@@ -54,4 +51,4 @@ class Cloud {
54
51
  this.chain = chain;
55
52
  }
56
53
  }
57
- exports.Cloud = Cloud;
54
+ //# sourceMappingURL=cloud.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/cloud.ts"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAgB,KAAK;IAezB;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,MAcX;QACC,MAAM,EACJ,EAAE,EACF,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,KAAK,GACN,GAAG,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CAqMF"}
@@ -0,0 +1,5 @@
1
+ export * from "./cloud.js";
2
+ export * from "./job.js";
3
+ export * from "./task.js";
4
+ export * from "./transaction.js";
5
+ export * from "./worker.js";
@@ -0,0 +1,6 @@
1
+ export * from "./cloud.js";
2
+ export * from "./job.js";
3
+ export * from "./task.js";
4
+ export * from "./transaction.js";
5
+ export * from "./worker.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- import { blockchain } from "../networks";
1
+ import { blockchain } from "../networks.js";
2
2
  export type JobStatus = "created" | "started" | "finished" | "failed" | "used" | "restarted";
3
3
  /**
4
4
  * LogStream is a subset of the log stream data returned by AWS CloudWatch Logs when running the worker.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"job.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/job.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { blockchain } from "../networks";
1
+ import { blockchain } from "../networks.js";
2
2
  /**
3
3
  * TaskData is the data structure for a task, keeping track of the task status, result, logs, and metadata.
4
4
  */
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/task.ts"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
- "use strict";
2
1
  /**
3
2
  * Human-readable transaction metadata
4
3
  * events: the events
5
4
  * actions: the actions
6
5
  * custom: the custom metadata defined by the developer
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
7
+ export {};
8
+ //# sourceMappingURL=transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/transaction.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,4 +1,4 @@
1
- import { Cloud, CloudTransaction } from "./cloud";
1
+ import { Cloud, CloudTransaction } from "./cloud.js";
2
2
  /**
3
3
  * Abstract class for the zkCloudWorker
4
4
  * Used to define the zkCloudWorker methods and properties
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zkCloudWorker = void 0;
4
1
  /**
5
2
  * Abstract class for the zkCloudWorker
6
3
  * Used to define the zkCloudWorker methods and properties
7
4
  * Should be implemented for by the developer for the zkCloudWorker in the cloud
8
5
  */
9
- class zkCloudWorker {
6
+ export class zkCloudWorker {
10
7
  /**
11
8
  * Constructor for the zkCloudWorker class
12
9
  * @param cloud the cloud instance provided by the zkCloudWorker in the local environment or in the cloud
@@ -53,4 +50,4 @@ class zkCloudWorker {
53
50
  return undefined;
54
51
  }
55
52
  }
56
- exports.zkCloudWorker = zkCloudWorker;
53
+ //# sourceMappingURL=worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../../../src/cloud/worker/worker.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,OAAgB,aAAa;IAIjC;;;OAGG;IACH,YAAY,KAAY;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,wEAAwE;IACxE;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,WAAmB;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CAAC,MAAc,EAAE,MAAc;QACxC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,+EAA+E;IAC/E;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,YAAsB;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CAAC,YAAgC,IAAkB,CAAC;IAE7E;;;OAGG;IACH,KAAK,CAAC,IAAI;QACR,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./cloud/index.js";
2
+ export * from "./mina/index.js";
@@ -0,0 +1,3 @@
1
+ export * from "./cloud/index.js";
2
+ export * from "./mina/index.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { zkCloudWorker, Cloud, JobData } from "../../cloud/worker";
2
- import { blockchain } from "../../cloud/networks";
1
+ import { zkCloudWorker, Cloud, JobData } from "../../cloud/worker/index.js";
2
+ import { blockchain } from "../../cloud/networks.js";
3
3
  /**
4
4
  * The APICommand type for interacting with the zkCloudWorker
5
5
  * @typedef { "recursiveProof" | "execute" | "sendTransactions" | "jobResult" | "deploy" | "getBalance" | "queryBilling" } ApiCommand
@@ -1,15 +1,9 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.zkCloudWorkerClient = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const chalk_1 = __importDefault(require("chalk"));
9
- const utils_1 = require("../../cloud/utils");
10
- const local_1 = require("../local/local");
11
- const config_1 = __importDefault(require("../../cloud/config"));
12
- const { ZKCLOUDWORKER_AUTH, ZKCLOUDWORKER_API } = config_1.default;
1
+ import axios from "axios";
2
+ import chalk from "chalk";
3
+ import { sleep } from "../../cloud/utils/index.js";
4
+ import { LocalCloud, LocalStorage } from "../local/local.js";
5
+ import config from "../../cloud/config.js";
6
+ const { ZKCLOUDWORKER_AUTH, ZKCLOUDWORKER_API } = config;
13
7
  /**
14
8
  * API class for interacting with the zkCloudWorker
15
9
  * @property jwt The jwt token for authentication, get it at https://t.me/minanft_bot?start=auth
@@ -18,7 +12,7 @@ const { ZKCLOUDWORKER_AUTH, ZKCLOUDWORKER_API } = config_1.default;
18
12
  * @property webhook The webhook for the serverless api to get the results
19
13
  * @property localWorker The local worker for the serverless api to test the code locally
20
14
  */
21
- class zkCloudWorkerClient {
15
+ export class zkCloudWorkerClient {
22
16
  /**
23
17
  * Constructor for the API class
24
18
  * @param params the parameters for the API class
@@ -286,7 +280,7 @@ class zkCloudWorkerClient {
286
280
  printedLogs.push(log);
287
281
  if (printLogs) {
288
282
  // replace all occurrences of "error" with red color
289
- const text = log.replace(/error/gi, (matched) => chalk_1.default.red(matched));
283
+ const text = log.replace(/error/gi, (matched) => chalk.red(matched));
290
284
  console.log(text);
291
285
  }
292
286
  }
@@ -314,7 +308,7 @@ class zkCloudWorkerClient {
314
308
  result: undefined,
315
309
  };
316
310
  }
317
- await (0, utils_1.sleep)(errorDelay * errors);
311
+ await sleep(errorDelay * errors);
318
312
  }
319
313
  else {
320
314
  if (this.isError(result.data) && isAllLogsFetched)
@@ -337,7 +331,7 @@ class zkCloudWorkerClient {
337
331
  result: result.data,
338
332
  };
339
333
  }
340
- await (0, utils_1.sleep)(interval);
334
+ await sleep(interval);
341
335
  }
342
336
  attempts++;
343
337
  }
@@ -362,7 +356,7 @@ class zkCloudWorkerClient {
362
356
  throw new Error("localWorker is undefined");
363
357
  switch (command) {
364
358
  case "recursiveProof": {
365
- const jobId = await local_1.LocalCloud.run({
359
+ const jobId = await LocalCloud.run({
366
360
  command: "recursiveProof",
367
361
  data,
368
362
  chain: this.chain,
@@ -374,7 +368,7 @@ class zkCloudWorkerClient {
374
368
  };
375
369
  }
376
370
  case "execute": {
377
- const jobId = await local_1.LocalCloud.run({
371
+ const jobId = await LocalCloud.run({
378
372
  command: "execute",
379
373
  data,
380
374
  chain: this.chain,
@@ -383,7 +377,7 @@ class zkCloudWorkerClient {
383
377
  if (data.mode === "sync")
384
378
  return {
385
379
  success: true,
386
- data: local_1.LocalStorage.jobEvents[jobId].result,
380
+ data: LocalStorage.jobEvents[jobId].result,
387
381
  };
388
382
  else
389
383
  return {
@@ -392,7 +386,7 @@ class zkCloudWorkerClient {
392
386
  };
393
387
  }
394
388
  case "jobResult": {
395
- const job = local_1.LocalStorage.jobs[data.jobId];
389
+ const job = LocalStorage.jobs[data.jobId];
396
390
  if (job === undefined) {
397
391
  return {
398
392
  success: false,
@@ -409,7 +403,7 @@ class zkCloudWorkerClient {
409
403
  case "sendTransactions": {
410
404
  return {
411
405
  success: true,
412
- data: await local_1.LocalCloud.addTransactions(data.transactions),
406
+ data: await LocalCloud.addTransactions(data.transactions),
413
407
  };
414
408
  }
415
409
  case "deploy":
@@ -441,7 +435,7 @@ class zkCloudWorkerClient {
441
435
  webhook: this.webhook, // TODO: implement webhook code on AWS
442
436
  };
443
437
  try {
444
- const response = await axios_1.default.post(this.endpoint, apiData);
438
+ const response = await axios.post(this.endpoint, apiData);
445
439
  return { success: true, data: response.data };
446
440
  }
447
441
  catch (error) {
@@ -463,4 +457,4 @@ class zkCloudWorkerClient {
463
457
  return false;
464
458
  }
465
459
  }
466
- exports.zkCloudWorkerClient = zkCloudWorkerClient;
460
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../src/mina/api/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAc,MAAM,OAAO,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAG3C,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC;AAsBzD;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAmB;IAO9B;;;;;;;OAOG;IACH,YAAY,MAKX;QACC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC/C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAEf,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,QAAQ,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ;YACX,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM;gBACpC,CAAC,CAAC,iBAAiB,GAAG,KAAK;gBAC3B,CAAC,CAAC,SAAS,CAAC;QAChB,I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;CACF"}
@@ -0,0 +1,7 @@
1
+ export * from "./api/api.js";
2
+ export * from "./utils/index.js";
3
+ export * from "./local/local.js";
4
+ export * from "./verification/index.js";
5
+ export * from "./token/index.js";
6
+ export * from "./transactions/index.js";
7
+ export * from "./storage/index.js";
@@ -0,0 +1,9 @@
1
+ export * from "./api/api.js";
2
+ //export * from "./encryption";
3
+ export * from "./utils/index.js";
4
+ export * from "./local/local.js";
5
+ export * from "./verification/index.js";
6
+ export * from "./token/index.js";
7
+ export * from "./transactions/index.js";
8
+ export * from "./storage/index.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mina/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,+BAA+B;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
@@ -1,5 +1,5 @@
1
- import { blockchain, TransactionMetadata, CloudTransaction, DeployerKeyPair, TaskData, JobData, JobEvent, Cloud, zkCloudWorker } from "../../cloud";
2
- import { ApiCommand } from "../api/api";
1
+ import { blockchain, TransactionMetadata, CloudTransaction, DeployerKeyPair, TaskData, JobData, JobEvent, Cloud, zkCloudWorker } from "../../cloud/index.js";
2
+ import { ApiCommand } from "../api/api.js";
3
3
  /**
4
4
  * LocalCloud is a cloud that runs on the local machine for testing and development
5
5
  * It uses LocalStorage to store jobs, tasks, transactions, and data
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalStorage = exports.LocalCloud = void 0;
4
- const cloud_1 = require("../../cloud");
1
+ import { makeString, Cloud, } from "../../cloud/index.js";
5
2
  /**
6
3
  * LocalCloud is a cloud that runs on the local machine for testing and development
7
4
  * It uses LocalStorage to store jobs, tasks, transactions, and data
@@ -9,7 +6,7 @@ const cloud_1 = require("../../cloud");
9
6
  * It can be used to test the cloud functionality without deploying to the cloud
10
7
  * @param localWorker the worker to execute the tasks
11
8
  */
12
- class LocalCloud extends cloud_1.Cloud {
9
+ export class LocalCloud extends Cloud {
13
10
  /**
14
11
  * Constructor for LocalCloud
15
12
  * @param params the parameters to create the LocalCloud
@@ -145,7 +142,7 @@ class LocalCloud extends cloud_1.Cloud {
145
142
  //const data =
146
143
  // tx ?? JSON.stringify({ time: Date.now(), data: makeString(32) });
147
144
  //return stringHash(data);
148
- return Date.now() + "." + (0, cloud_1.makeString)(32);
145
+ return Date.now() + "." + makeString(32);
149
146
  }
150
147
  /**
151
148
  * Send transactions to the local cloud
@@ -475,13 +472,12 @@ class LocalCloud extends cloud_1.Cloud {
475
472
  throw new Error("forceWorkerRestart called in LocalCloud");
476
473
  }
477
474
  }
478
- exports.LocalCloud = LocalCloud;
479
475
  /**
480
476
  * LocalStorage is a local storage for the local cloud.
481
477
  * It stores jobs, tasks, transactions, and data.
482
478
  * It can be used to test the cloud functionality without deploying to the cloud.
483
479
  */
484
- class LocalStorage {
480
+ export class LocalStorage {
485
481
  /**
486
482
  * Saves the data.
487
483
  * @param name The name to save the data under.
@@ -516,7 +512,6 @@ class LocalStorage {
516
512
  */
517
513
  }
518
514
  }
519
- exports.LocalStorage = LocalStorage;
520
515
  /** The jobs */
521
516
  LocalStorage.jobs = {};
522
517
  /** The job events */
@@ -529,3 +524,4 @@ LocalStorage.files = {};
529
524
  LocalStorage.transactions = {};
530
525
  /** The tasks */
531
526
  LocalStorage.tasks = {};
527
+ //# sourceMappingURL=local.js.map