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
@@ -1,22 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadIndexedMerkleMap = loadIndexedMerkleMap;
4
- exports.saveIndexedMerkleMap = saveIndexedMerkleMap;
5
- exports.serializeIndexedMap = serializeIndexedMap;
6
- exports.deserializeIndexedMerkleMap = deserializeIndexedMerkleMap;
7
- exports.parseIndexedMapSerialized = parseIndexedMapSerialized;
8
- const o1js_1 = require("o1js");
9
- const cloud_1 = require("../../cloud");
10
- const pinata_1 = require("../storage/pinata");
11
- const { IndexedMerkleMap } = o1js_1.Experimental;
12
- async function loadIndexedMerkleMap(params) {
1
+ import { Experimental, Field } from "o1js";
2
+ import { bigintToBase64, bigintFromBase64, sleep } from "../../cloud/index.js";
3
+ import { pinJSON } from "../storage/pinata.js";
4
+ const { IndexedMerkleMap } = Experimental;
5
+ export async function loadIndexedMerkleMap(params) {
13
6
  const { url, type, timeout = 60000, attempts = 5 } = params;
14
7
  let attempt = 0;
15
8
  const start = Date.now();
16
9
  let response = await fetch(url);
17
10
  while (!response.ok && attempt < attempts && Date.now() - start < timeout) {
18
11
  attempt++;
19
- await (0, cloud_1.sleep)(5000 * attempt); // handle rate limiting
12
+ await sleep(5000 * attempt); // handle rate limiting
20
13
  response = await fetch(url);
21
14
  }
22
15
  if (!response.ok) {
@@ -35,10 +28,10 @@ async function loadIndexedMerkleMap(params) {
35
28
  }
36
29
  return map;
37
30
  }
38
- async function saveIndexedMerkleMap(params) {
31
+ export async function saveIndexedMerkleMap(params) {
39
32
  const { map, name = "indexed-map", keyvalues, auth } = params;
40
33
  const serialized = serializeIndexedMap(map);
41
- const ipfsHash = await (0, pinata_1.pinJSON)({
34
+ const ipfsHash = await pinJSON({
42
35
  data: { map: serialized },
43
36
  name,
44
37
  keyvalues,
@@ -46,23 +39,23 @@ async function saveIndexedMerkleMap(params) {
46
39
  });
47
40
  return ipfsHash;
48
41
  }
49
- function serializeIndexedMap(map) {
42
+ export function serializeIndexedMap(map) {
50
43
  return {
51
44
  height: map.height,
52
45
  root: map.root.toJSON(),
53
46
  length: map.length.toJSON(),
54
- nodes: JSON.stringify(map.data.get().nodes, (_, v) => typeof v === "bigint" ? "n" + (0, cloud_1.bigintToBase64)(v) : v),
47
+ nodes: JSON.stringify(map.data.get().nodes, (_, v) => typeof v === "bigint" ? "n" + bigintToBase64(v) : v),
55
48
  sortedLeaves: JSON.stringify(map.data
56
49
  .get()
57
50
  .sortedLeaves.map((v) => [
58
- (0, cloud_1.bigintToBase64)(v.key),
59
- (0, cloud_1.bigintToBase64)(v.nextKey),
60
- (0, cloud_1.bigintToBase64)(v.value),
61
- (0, cloud_1.bigintToBase64)(BigInt(v.index)),
51
+ bigintToBase64(v.key),
52
+ bigintToBase64(v.nextKey),
53
+ bigintToBase64(v.value),
54
+ bigintToBase64(BigInt(v.index)),
62
55
  ])),
63
56
  };
64
57
  }
65
- function deserializeIndexedMerkleMap(params) {
58
+ export function deserializeIndexedMerkleMap(params) {
66
59
  try {
67
60
  const { serializedIndexedMap, type } = params;
68
61
  return deserializeIndexedMerkleMapInternal({
@@ -75,7 +68,7 @@ function deserializeIndexedMerkleMap(params) {
75
68
  return undefined;
76
69
  }
77
70
  }
78
- function parseIndexedMapSerialized(serializedMap) {
71
+ export function parseIndexedMapSerialized(serializedMap) {
79
72
  const json = JSON.parse(serializedMap);
80
73
  if (json.height === undefined ||
81
74
  json.root === undefined ||
@@ -105,20 +98,20 @@ function deserializeIndexedMerkleMapInternal(params) {
105
98
  // Check if the value is a string that represents a BigInt
106
99
  if (typeof v === "string" && v[0] === "n") {
107
100
  // Remove the first 'n' and convert the string to a BigInt
108
- return (0, cloud_1.bigintFromBase64)(v.slice(1));
101
+ return bigintFromBase64(v.slice(1));
109
102
  }
110
103
  return v;
111
104
  });
112
105
  const sortedLeaves = JSON.parse(serializedIndexedMap.sortedLeaves).map((row) => {
113
106
  return {
114
- key: (0, cloud_1.bigintFromBase64)(row[0]),
115
- nextKey: (0, cloud_1.bigintFromBase64)(row[1]),
116
- value: (0, cloud_1.bigintFromBase64)(row[2]),
117
- index: Number((0, cloud_1.bigintFromBase64)(row[3])),
107
+ key: bigintFromBase64(row[0]),
108
+ nextKey: bigintFromBase64(row[1]),
109
+ value: bigintFromBase64(row[2]),
110
+ index: Number(bigintFromBase64(row[3])),
118
111
  };
119
112
  });
120
- map.root = o1js_1.Field.fromJSON(serializedIndexedMap.root);
121
- map.length = o1js_1.Field.fromJSON(serializedIndexedMap.length);
113
+ map.root = Field.fromJSON(serializedIndexedMap.root);
114
+ map.length = Field.fromJSON(serializedIndexedMap.length);
122
115
  map.data.updateAsProver(() => {
123
116
  return {
124
117
  nodes: nodes.map((row) => [...row]),
@@ -127,3 +120,4 @@ function deserializeIndexedMerkleMapInternal(params) {
127
120
  });
128
121
  return map;
129
122
  }
123
+ //# sourceMappingURL=indexed-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexed-map.js","sourceRoot":"","sources":["../../../../../src/mina/utils/indexed-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAAC;AAW1C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAK1C;IACC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,GAAG,CAAC,EAAE,GA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,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export { initBlockchain, accountBalance, accountBalanceMina, MinaNetworkInstance, currentNetwork, getNetworkIdHash, getCurrentNetwork, getDeployer, };
2
2
  import { Mina, PublicKey, UInt64, Field } from "o1js";
3
- import { blockchain, MinaNetwork } from "../../cloud";
3
+ import { blockchain, MinaNetwork } from "../../cloud/networks.js";
4
4
  /**
5
5
  * MinaNetworkInstance is the data structure for a Mina network instance, keeping track of the keys, network, and network ID hash.
6
6
  */
@@ -1,16 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.currentNetwork = void 0;
4
- exports.initBlockchain = initBlockchain;
5
- exports.accountBalance = accountBalance;
6
- exports.accountBalanceMina = accountBalanceMina;
7
- exports.getNetworkIdHash = getNetworkIdHash;
8
- exports.getCurrentNetwork = getCurrentNetwork;
9
- exports.getDeployer = getDeployer;
10
- const o1js_1 = require("o1js");
11
- const cloud_1 = require("../../cloud");
1
+ export { initBlockchain, accountBalance, accountBalanceMina, currentNetwork, getNetworkIdHash, getCurrentNetwork, getDeployer, };
2
+ import { Mina, PrivateKey, UInt64, fetchAccount, Lightnet, CircuitString, } from "o1js";
3
+ import { networks, Local, } from "../../cloud/networks.js";
12
4
  let currentNetwork = undefined;
13
- exports.currentNetwork = currentNetwork;
14
5
  function getNetworkIdHash() {
15
6
  if (currentNetwork === undefined) {
16
7
  throw new Error("Network is not initialized");
@@ -53,39 +44,39 @@ async function initBlockchain(instance, deployersNumber = 0) {
53
44
  throw new Error(`Network is already initialized to different chain ${currentNetwork.network.chainId}, cannot initialize to ${instance}`);
54
45
  }
55
46
  }
56
- const networkIdHash = o1js_1.CircuitString.fromString(instance).hash();
47
+ const networkIdHash = CircuitString.fromString(instance).hash();
57
48
  // await used for compatibility with future versions of o1js
58
49
  if (instance === "local") {
59
- const local = await o1js_1.Mina.LocalBlockchain({
50
+ const local = await Mina.LocalBlockchain({
60
51
  proofsEnabled: true,
61
52
  });
62
- o1js_1.Mina.setActiveInstance(local);
53
+ Mina.setActiveInstance(local);
63
54
  if (deployersNumber > local.testAccounts.length)
64
55
  throw new Error("Not enough test accounts");
65
- exports.currentNetwork = currentNetwork = {
56
+ currentNetwork = {
66
57
  keys: local.testAccounts,
67
- network: cloud_1.Local,
58
+ network: Local,
68
59
  networkIdHash,
69
60
  };
70
61
  return currentNetwork;
71
62
  }
72
- const network = cloud_1.networks.find((n) => n.chainId === instance);
63
+ const network = networks.find((n) => n.chainId === instance);
73
64
  if (network === undefined) {
74
65
  throw new Error("Unknown network");
75
66
  }
76
- const networkInstance = o1js_1.Mina.Network({
67
+ const networkInstance = Mina.Network({
77
68
  mina: network.mina,
78
69
  archive: network.archive,
79
70
  lightnetAccountManager: network.accountManager,
80
71
  networkId: instance === "mainnet" ? "mainnet" : "testnet",
81
72
  });
82
- o1js_1.Mina.setActiveInstance(networkInstance);
73
+ Mina.setActiveInstance(networkInstance);
83
74
  const keys = [];
84
75
  if (deployersNumber > 0) {
85
76
  if (instance === "lightnet") {
86
77
  for (let i = 0; i < deployersNumber; i++) {
87
- const keyPair = await o1js_1.Lightnet.acquireKeyPair();
88
- const key = o1js_1.Mina.TestPublicKey(keyPair.privateKey);
78
+ const keyPair = await Lightnet.acquireKeyPair();
79
+ const key = Mina.TestPublicKey(keyPair.privateKey);
89
80
  keys.push(key);
90
81
  }
91
82
  }
@@ -96,13 +87,13 @@ async function initBlockchain(instance, deployersNumber = 0) {
96
87
  deployers.length < deployersNumber)
97
88
  throw new Error("Deployers are not set");
98
89
  for (let i = 0; i < deployersNumber; i++) {
99
- const privateKey = o1js_1.PrivateKey.fromBase58(deployers[i]);
100
- const key = o1js_1.Mina.TestPublicKey(privateKey);
90
+ const privateKey = PrivateKey.fromBase58(deployers[i]);
91
+ const key = Mina.TestPublicKey(privateKey);
101
92
  keys.push(key);
102
93
  }
103
94
  }
104
95
  }
105
- exports.currentNetwork = currentNetwork = {
96
+ currentNetwork = {
106
97
  keys,
107
98
  network,
108
99
  networkIdHash,
@@ -115,11 +106,11 @@ async function initBlockchain(instance, deployersNumber = 0) {
115
106
  * @returns the account balance
116
107
  */
117
108
  async function accountBalance(address) {
118
- await (0, o1js_1.fetchAccount)({ publicKey: address });
119
- if (o1js_1.Mina.hasAccount(address))
120
- return o1js_1.Mina.getBalance(address);
109
+ await fetchAccount({ publicKey: address });
110
+ if (Mina.hasAccount(address))
111
+ return Mina.getBalance(address);
121
112
  else
122
- return o1js_1.UInt64.from(0);
113
+ return UInt64.from(0);
123
114
  }
124
115
  /**
125
116
  * Fetches the account balance for a given public key and returns it in Mina
@@ -129,3 +120,4 @@ async function accountBalance(address) {
129
120
  async function accountBalanceMina(address) {
130
121
  return Number((await accountBalance(address)).toBigInt()) / 1e9;
131
122
  }
123
+ //# sourceMappingURL=mina.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mina.js","sourceRoot":"","sources":["../../../../../src/mina/utils/mina.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAElB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,CAAC;AAEF,OAAO,EACL,IAAI,EAEJ,UAAU,EACV,MAAM,EACN,YAAY,EAEZ,QAAQ,EACR,aAAa,GACd,MAAM,MAAM,CAAC;AACd,OAAO,EACL,QAAQ,EAGR,KAAK,GACN,MAAM,yBAAyB,CAAC;AAgBjC,IAAI,cAAc,GAAoC,SAAS,CAAC;AAEhE,SAAS,gBAAgB;IACvB,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,cAAc,CAAC,aAAa,CAAC;AACtC,CAAC;AAED,SAAS,iBAAiB;IACxB,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,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IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,EAAE,CAAC,EAAE,EAAE,CAAC;gBACzC,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvD,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;gBAC3C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc,GAAG;QACf,IAAI;QACJ,OAAO;QACP,aAAa;KACd,CAAC;IACF,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,cAAc,CAAC,OAAkB;IAC9C,MAAM,YAAY,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3C,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;;QACzD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,kBAAkB,CAAC,OAAkB;IAClD,OAAO,MAAM,CAAC,CAAC,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC;AAClE,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./verification.js";
@@ -0,0 +1,2 @@
1
+ export * from "./verification.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mina/verification/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { blockchain } from "../../cloud/networks";
1
+ import { blockchain } from "../../cloud/networks.js";
2
2
  import { SmartContract } from "o1js";
3
3
  /**
4
4
  * VerificationData is a data structure that contains all the information needed to verify a smart contract on a blockchain.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.js","sourceRoot":"","sources":["../../../../../src/mina/verification/verification.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "zkcloudworker",
3
- "version": "0.17.7",
3
+ "version": "0.18.0",
4
+ "type": "module",
4
5
  "description": "zkCloudWorker library",
5
6
  "author": "zkCloudWorker",
6
7
  "license": "Apache-2.0",
@@ -1,4 +0,0 @@
1
- export * from "./utils";
2
- export * from "./worker";
3
- export * from "./config";
4
- export * from "./networks";
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./utils"), exports);
18
- __exportStar(require("./worker"), exports);
19
- __exportStar(require("./config"), exports);
20
- __exportStar(require("./networks"), exports);
@@ -1,3 +0,0 @@
1
- export * from "./graphql";
2
- export * from "./utils";
3
- export * from "./base64";
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./graphql"), exports);
18
- __exportStar(require("./utils"), exports);
19
- __exportStar(require("./base64"), exports);
@@ -1,5 +0,0 @@
1
- export * from "./cloud";
2
- export * from "./job";
3
- export * from "./task";
4
- export * from "./transaction";
5
- export * from "./worker";
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./cloud"), exports);
18
- __exportStar(require("./job"), exports);
19
- __exportStar(require("./task"), exports);
20
- __exportStar(require("./transaction"), exports);
21
- __exportStar(require("./worker"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from "./cloud";
2
- export * from "./mina";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./cloud"), exports);
18
- __exportStar(require("./mina"), exports);
@@ -1,7 +0,0 @@
1
- export * from "./api/api";
2
- export * from "./utils";
3
- export * from "./local/local";
4
- export * from "./verification";
5
- export * from "./token";
6
- export * from "./transactions";
7
- export * from "./storage";
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./api/api"), exports);
18
- //export * from "./encryption";
19
- __exportStar(require("./utils"), exports);
20
- __exportStar(require("./local/local"), exports);
21
- __exportStar(require("./verification"), exports);
22
- __exportStar(require("./token"), exports);
23
- __exportStar(require("./transactions"), exports);
24
- __exportStar(require("./storage"), exports);
@@ -1,3 +0,0 @@
1
- export * from "./ipfs";
2
- export * from "./pinata";
3
- export * from "./storage";
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ipfs"), exports);
18
- __exportStar(require("./pinata"), exports);
19
- __exportStar(require("./storage"), exports);
@@ -1,5 +0,0 @@
1
- export * from "./FungibleToken";
2
- export * from "./FungibleTokenAdmin";
3
- export * from "./api";
4
- export * from "./vk";
5
- export * from "./whitelist";
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./FungibleToken"), exports);
18
- __exportStar(require("./FungibleTokenAdmin"), exports);
19
- __exportStar(require("./api"), exports);
20
- __exportStar(require("./vk"), exports);
21
- __exportStar(require("./whitelist"), exports);
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.accountExists = accountExists;
4
- exports.tokenBalance = tokenBalance;
5
- exports.checkAddress = checkAddress;
6
- const __1 = require("..");
7
- const o1js_1 = require("o1js");
8
- async function accountExists(address, tokenId) {
9
- try {
10
- const publicKey = typeof address === "string" ? o1js_1.PublicKey.fromBase58(address) : address;
11
- await (0, __1.fetchMinaAccount)({ publicKey, tokenId, force: false });
12
- return o1js_1.Mina.hasAccount(publicKey, tokenId);
13
- }
14
- catch (error) {
15
- return false;
16
- }
17
- }
18
- async function tokenBalance(address, tokenId) {
19
- try {
20
- const publicKey = typeof address === "string" ? o1js_1.PublicKey.fromBase58(address) : address;
21
- await (0, __1.fetchMinaAccount)({ publicKey, tokenId, force: false });
22
- return o1js_1.Mina.hasAccount(publicKey, tokenId)
23
- ? Number(o1js_1.Mina.getAccount(publicKey, tokenId).balance.toBigInt())
24
- : undefined;
25
- }
26
- catch (error) {
27
- console.error("Cannot fetch account balance", error);
28
- return undefined;
29
- }
30
- }
31
- async function checkAddress(address) {
32
- if (!address || typeof address !== "string") {
33
- console.error("checkAddress params are invalid:", address);
34
- return false;
35
- }
36
- try {
37
- const publicKey = o1js_1.PublicKey.fromBase58(address);
38
- if (address !== publicKey.toBase58()) {
39
- console.log("checkAddress: address is not valid", address, publicKey.toBase58());
40
- return false;
41
- }
42
- return true;
43
- }
44
- catch (error) {
45
- console.error("checkAddress catch", { address, error });
46
- return false;
47
- }
48
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- export * from "./nonce";
2
- export * from "./transaction";
3
- export * from "./txstatus";
4
- export * from "./chain";
5
- export * from "./blockberry";
6
- export * from "./tiny-contract";
7
- export * from "./send";
8
- export * from "./account";
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./nonce"), exports);
18
- __exportStar(require("./transaction"), exports);
19
- __exportStar(require("./txstatus"), exports);
20
- __exportStar(require("./chain"), exports);
21
- __exportStar(require("./blockberry"), exports);
22
- __exportStar(require("./tiny-contract"), exports);
23
- __exportStar(require("./send"), exports);
24
- __exportStar(require("./account"), exports);
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.TinyContract = void 0;
13
- const o1js_1 = require("o1js");
14
- class TinyContract extends o1js_1.SmartContract {
15
- constructor() {
16
- super(...arguments);
17
- this.value = (0, o1js_1.State)();
18
- }
19
- async setValue(value) {
20
- this.value.set(value);
21
- }
22
- }
23
- exports.TinyContract = TinyContract;
24
- __decorate([
25
- (0, o1js_1.state)(o1js_1.Field),
26
- __metadata("design:type", Object)
27
- ], TinyContract.prototype, "value", void 0);
28
- __decorate([
29
- o1js_1.method,
30
- __metadata("design:type", Function),
31
- __metadata("design:paramtypes", [o1js_1.Field]),
32
- __metadata("design:returntype", Promise)
33
- ], TinyContract.prototype, "setValue", null);